Files
wordpress-preseed/wp-content/plugins/jetpack/_inc/search/dist/jp-search.bundle.js
2019-10-24 00:12:05 +02:00

1 line
27 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
!function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=26)}([function(e,t,n){"use strict";n.r(t),n.d(t,"h",function(){return s}),n.d(t,"createElement",function(){return s}),n.d(t,"cloneElement",function(){return p}),n.d(t,"createRef",function(){return D}),n.d(t,"Component",function(){return F}),n.d(t,"render",function(){return R}),n.d(t,"rerender",function(){return v}),n.d(t,"options",function(){return o});var r=function(){},o={},i=[],u=[];function s(e,t){var n,s,a,c,l=u;for(c=arguments.length;c-- >2;)i.push(arguments[c]);for(t&&null!=t.children&&(i.length||i.push(t.children),delete t.children);i.length;)if((s=i.pop())&&void 0!==s.pop)for(c=s.length;c--;)i.push(s[c]);else"boolean"==typeof s&&(s=null),(a="function"!=typeof e)&&(null==s?s="":"number"==typeof s?s=String(s):"string"!=typeof s&&(a=!1)),a&&n?l[l.length-1]+=s:l===u?l=[s]:l.push(s),n=a;var p=new r;return p.nodeName=e,p.children=l,p.attributes=null==t?void 0:t,p.key=null==t?void 0:t.key,void 0!==o.vnode&&o.vnode(p),p}function a(e,t){for(var n in t)e[n]=t[n];return e}function c(e,t){null!=e&&("function"==typeof e?e(t):e.current=t)}var l="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout;function p(e,t){return s(e.nodeName,a(a({},e.attributes),t),arguments.length>2?[].slice.call(arguments,2):e.children)}var f=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,d=[];function h(e){!e._dirty&&(e._dirty=!0)&&1==d.push(e)&&(o.debounceRendering||l)(v)}function v(){for(var e;e=d.pop();)e._dirty&&I(e)}function y(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function m(e){var t=a({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===t[r]&&(t[r]=n[r]);return t}function b(e){var t=e.parentNode;t&&t.removeChild(e)}function g(e,t,n,r,o){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)c(n,null),c(r,e);else if("class"!==t||o)if("style"===t){if(r&&"string"!=typeof r&&"string"!=typeof n||(e.style.cssText=r||""),r&&"object"==typeof r){if("string"!=typeof n)for(var i in n)i in r||(e.style[i]="");for(var i in r)e.style[i]="number"==typeof r[i]&&!1===f.test(i)?r[i]+"px":r[i]}}else if("dangerouslySetInnerHTML"===t)r&&(e.innerHTML=r.__html||"");else if("o"==t[0]&&"n"==t[1]){var u=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),r?n||e.addEventListener(t,x,u):e.removeEventListener(t,x,u),(e._listeners||(e._listeners={}))[t]=r}else if("list"!==t&&"type"!==t&&!o&&t in e){try{e[t]=null==r?"":r}catch(a){}null!=r&&!1!==r||"spellcheck"==t||e.removeAttribute(t)}else{var s=o&&t!==(t=t.replace(/^xlink:?/,""));null==r||!1===r?s?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!=typeof r&&(s?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),r):e.setAttribute(t,r))}else e.className=r||""}function x(e){return this._listeners[e.type](o.event&&o.event(e)||e)}var _=[],w=0,S=!1,k=!1;function j(){for(var e;e=_.shift();)o.afterMount&&o.afterMount(e),e.componentDidMount&&e.componentDidMount()}function C(e,t,n,r,o,i){w++||(S=null!=o&&void 0!==o.ownerSVGElement,k=null!=e&&!("__preactattr_"in e));var u=O(e,t,n,r,i);return o&&u.parentNode!==o&&o.appendChild(u),--w||(k=!1,i||j()),u}function O(e,t,n,r,o){var i=e,u=S;if(null!=t&&"boolean"!=typeof t||(t=""),"string"==typeof t||"number"==typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||o)?e.nodeValue!=t&&(e.nodeValue=t):(i=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(i,e),P(e,!0))),i.__preactattr_=!0,i;var s,a,c=t.nodeName;if("function"==typeof c)return function(e,t,n,r){var o=e&&e._component,i=o,u=e,s=o&&e._componentConstructor===t.nodeName,a=s,c=m(t);for(;o&&!a&&(o=o._parentComponent);)a=o.constructor===t.nodeName;o&&a&&(!r||o._component)?(U(o,c,3,n,r),e=o.base):(i&&!s&&(L(i),e=u=null),o=E(t.nodeName,c,n),e&&!o.nextBase&&(o.nextBase=e,u=null),U(o,c,1,n,r),e=o.base,u&&e!==u&&(u._component=null,P(u,!1)));return e}(e,t,n,r);if(S="svg"===c||"foreignObject"!==c&&S,c=String(c),(!e||!y(e,c))&&(s=c,(a=S?document.createElementNS("http://www.w3.org/2000/svg",s):document.createElement(s)).normalizedNodeName=s,i=a,e)){for(;e.firstChild;)i.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(i,e),P(e,!0)}var l=i.firstChild,p=i.__preactattr_,f=t.children;if(null==p){p=i.__preactattr_={};for(var d=i.attributes,h=d.length;h--;)p[d[h].name]=d[h].value}return!k&&f&&1===f.length&&"string"==typeof f[0]&&null!=l&&void 0!==l.splitText&&null==l.nextSibling?l.nodeValue!=f[0]&&(l.nodeValue=f[0]):(f&&f.length||null!=l)&&function(e,t,n,r,o){var i,u,s,a,c,l=e.childNodes,p=[],f={},d=0,h=0,v=l.length,m=0,g=t?t.length:0;if(0!==v)for(var x=0;x<v;x++){var _=l[x],w=_.__preactattr_,S=g&&w?_._component?_._component.__key:w.key:null;null!=S?(d++,f[S]=_):(w||(void 0!==_.splitText?!o||_.nodeValue.trim():o))&&(p[m++]=_)}if(0!==g)for(var x=0;x<g;x++){a=t[x],c=null;var S=a.key;if(null!=S)d&&void 0!==f[S]&&(c=f[S],f[S]=void 0,d--);else if(h<m)for(i=h;i<m;i++)if(void 0!==p[i]&&(k=u=p[i],C=o,"string"==typeof(j=a)||"number"==typeof j?void 0!==k.splitText:"string"==typeof j.nodeName?!k._componentConstructor&&y(k,j.nodeName):C||k._componentConstructor===j.nodeName)){c=u,p[i]=void 0,i===m-1&&m--,i===h&&h++;break}c=O(c,a,n,r),s=l[x],c&&c!==e&&c!==s&&(null==s?e.appendChild(c):c===s.nextSibling?b(s):e.insertBefore(c,s))}var k,j,C;if(d)for(var x in f)void 0!==f[x]&&P(f[x],!1);for(;h<=m;)void 0!==(c=p[m--])&&P(c,!1)}(i,f,n,r,k||null!=p.dangerouslySetInnerHTML),function(e,t,n){var r;for(r in n)t&&null!=t[r]||null==n[r]||g(e,r,n[r],n[r]=void 0,S);for(r in t)"children"===r||"innerHTML"===r||r in n&&t[r]===("value"===r||"checked"===r?e[r]:n[r])||g(e,r,n[r],n[r]=t[r],S)}(i,t.attributes,p),S=u,i}function P(e,t){var n=e._component;n?L(n):(null!=e.__preactattr_&&c(e.__preactattr_.ref,null),!1!==t&&null!=e.__preactattr_||b(e),N(e))}function N(e){for(e=e.lastChild;e;){var t=e.previousSibling;P(e,!0),e=t}}var T=[];function E(e,t,n){var r,o=T.length;for(e.prototype&&e.prototype.render?(r=new e(t,n),F.call(r,t,n)):((r=new F(t,n)).constructor=e,r.render=M);o--;)if(T[o].constructor===e)return r.nextBase=T[o].nextBase,T.splice(o,1),r;return r}function M(e,t,n){return this.constructor(e,n)}function U(e,t,n,r,i){e._disable||(e._disable=!0,e.__ref=t.ref,e.__key=t.key,delete t.ref,delete t.key,void 0===e.constructor.getDerivedStateFromProps&&(!e.base||i?e.componentWillMount&&e.componentWillMount():e.componentWillReceiveProps&&e.componentWillReceiveProps(t,r)),r&&r!==e.context&&(e.prevContext||(e.prevContext=e.context),e.context=r),e.prevProps||(e.prevProps=e.props),e.props=t,e._disable=!1,0!==n&&(1!==n&&!1===o.syncComponentUpdates&&e.base?h(e):I(e,1,i)),c(e.__ref,e))}function I(e,t,n,r){if(!e._disable){var i,u,s,c=e.props,l=e.state,p=e.context,f=e.prevProps||c,d=e.prevState||l,h=e.prevContext||p,v=e.base,y=e.nextBase,b=v||y,g=e._component,x=!1,S=h;if(e.constructor.getDerivedStateFromProps&&(l=a(a({},l),e.constructor.getDerivedStateFromProps(c,l)),e.state=l),v&&(e.props=f,e.state=d,e.context=h,2!==t&&e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(c,l,p)?x=!0:e.componentWillUpdate&&e.componentWillUpdate(c,l,p),e.props=c,e.state=l,e.context=p),e.prevProps=e.prevState=e.prevContext=e.nextBase=null,e._dirty=!1,!x){i=e.render(c,l,p),e.getChildContext&&(p=a(a({},p),e.getChildContext())),v&&e.getSnapshotBeforeUpdate&&(S=e.getSnapshotBeforeUpdate(f,d));var k,O,N=i&&i.nodeName;if("function"==typeof N){var T=m(i);(u=g)&&u.constructor===N&&T.key==u.__key?U(u,T,1,p,!1):(k=u,e._component=u=E(N,T,p),u.nextBase=u.nextBase||y,u._parentComponent=e,U(u,T,0,p,!1),I(u,1,n,!0)),O=u.base}else s=b,(k=g)&&(s=e._component=null),(b||1===t)&&(s&&(s._component=null),O=C(s,i,p,n||!v,b&&b.parentNode,!0));if(b&&O!==b&&u!==g){var M=b.parentNode;M&&O!==M&&(M.replaceChild(O,b),k||(b._component=null,P(b,!1)))}if(k&&L(k),e.base=O,O&&!r){for(var F=e,R=e;R=R._parentComponent;)(F=R).base=O;O._component=F,O._componentConstructor=F.constructor}}for(!v||n?_.push(e):x||(e.componentDidUpdate&&e.componentDidUpdate(f,d,S),o.afterUpdate&&o.afterUpdate(e));e._renderCallbacks.length;)e._renderCallbacks.pop().call(e);w||r||j()}}function L(e){o.beforeUnmount&&o.beforeUnmount(e);var t=e.base;e._disable=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var n=e._component;n?L(n):t&&(null!=t.__preactattr_&&c(t.__preactattr_.ref,null),e.nextBase=t,b(t),T.push(e),N(t)),c(e.__ref,null)}function F(e,t){this._dirty=!0,this.context=t,this.props=e,this.state=this.state||{},this._renderCallbacks=[]}function R(e,t,n){return C(n,e,{},!1,t,!1)}function D(){return{}}a(F.prototype,{setState:function(e,t){this.prevState||(this.prevState=this.state),this.state=a(a({},this.state),"function"==typeof e?e(this.state,this.props):e),t&&this._renderCallbacks.push(t),h(this)},forceUpdate:function(e){e&&this._renderCallbacks.push(e),I(this,2)},render:function(){}});var q={h:s,createElement:s,cloneElement:p,createRef:D,Component:F,render:R,rerender:v,options:o};t.default=q},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}},function(e,t,n){var r=n(16),o=n(6);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t}},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},n(t)}e.exports=n},function(e,t,n){var r=n(17);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&r(e,t)}},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){var r;!function(){"use strict";var o={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function i(e){return function(e,t){var n,r,u,s,a,c,l,p,f,d=1,h=e.length,v="";for(r=0;r<h;r++)if("string"==typeof e[r])v+=e[r];else if("object"==typeof e[r]){if((s=e[r]).keys)for(n=t[d],u=0;u<s.keys.length;u++){if(null==n)throw new Error(i('[sprintf] Cannot access property "%s" of undefined value "%s"',s.keys[u],s.keys[u-1]));n=n[s.keys[u]]}else n=s.param_no?t[s.param_no]:t[d++];if(o.not_type.test(s.type)&&o.not_primitive.test(s.type)&&n instanceof Function&&(n=n()),o.numeric_arg.test(s.type)&&"number"!=typeof n&&isNaN(n))throw new TypeError(i("[sprintf] expecting number but found %T",n));switch(o.number.test(s.type)&&(p=n>=0),s.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,s.width?parseInt(s.width):0);break;case"e":n=s.precision?parseFloat(n).toExponential(s.precision):parseFloat(n).toExponential();break;case"f":n=s.precision?parseFloat(n).toFixed(s.precision):parseFloat(n);break;case"g":n=s.precision?String(Number(n.toPrecision(s.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=s.precision?n.substring(0,s.precision):n;break;case"t":n=String(!!n),n=s.precision?n.substring(0,s.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=s.precision?n.substring(0,s.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=s.precision?n.substring(0,s.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}o.json.test(s.type)?v+=n:(!o.number.test(s.type)||p&&!s.sign?f="":(f=p?"+":"-",n=n.toString().replace(o.sign,"")),c=s.pad_char?"0"===s.pad_char?"0":s.pad_char.charAt(1):" ",l=s.width-(f+n).length,a=s.width&&l>0?c.repeat(l):"",v+=s.align?f+n+a:"0"===c?f+a+n:a+f+n)}return v}(function(e){if(s[e])return s[e];var t,n=e,r=[],i=0;for(;n;){if(null!==(t=o.text.exec(n)))r.push(t[0]);else if(null!==(t=o.modulo.exec(n)))r.push("%");else{if(null===(t=o.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){i|=1;var u=[],a=t[2],c=[];if(null===(c=o.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(u.push(c[1]);""!==(a=a.substring(c[0].length));)if(null!==(c=o.key_access.exec(a)))u.push(c[1]);else{if(null===(c=o.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");u.push(c[1])}t[2]=u}else i|=2;if(3===i)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return s[e]=r}(e),arguments)}function u(e,t){return i.apply(null,[e].concat(t||[]))}var s=Object.create(null);t.sprintf=i,t.vsprintf=u,"undefined"!=typeof window&&(window.sprintf=i,window.vsprintf=u,void 0===(r=function(){return{sprintf:i,vsprintf:u}}.call(t,n,t,e))||(e.exports=r))}()},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(19),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},function(e,t,n){var r=n(10).Symbol;e.exports=r},function(e,t){function n(){return e.exports=n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},n.apply(this,arguments)}e.exports=n},function(e,t,n){e.exports=function(e){"use strict";!function(){function e(e){this.value=e}function t(t){var n,r;function o(n,r){try{var u=t[n](r),s=u.value;s instanceof e?Promise.resolve(s.value).then(function(e){o("next",e)},function(e){o("throw",e)}):i(u.done?"return":"normal",u.value)}catch(a){i("throw",a)}}function i(e,t){switch(e){case"return":n.resolve({value:t,done:!0});break;case"throw":n.reject(t);break;default:n.resolve({value:t,done:!1})}(n=n.next)?o(n.key,n.arg):r=null}this._invoke=function(e,t){return new Promise(function(i,u){var s={key:e,arg:t,resolve:i,reject:u,next:null};r?r=r.next=s:(n=r=s,o(e,t))})},"function"!=typeof t.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(t.prototype[Symbol.asyncIterator]=function(){return this}),t.prototype.next=function(e){return this._invoke("next",e)},t.prototype.throw=function(e){return this._invoke("throw",e)},t.prototype.return=function(e){return this._invoke("return",e)}}();var t=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},n=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},o=function(o){function u(){return t(this,u),r(this,o.apply(this,arguments))}return n(u,o),u.prototype.componentDidUpdate=function(e){for(var t in e)if(e[t]!==this.props[t])return setTimeout(this.renderLayer)},u.prototype.componentDidMount=function(){this.isMounted=!0,this.renderLayer=this.renderLayer.bind(this),this.renderLayer()},u.prototype.componentWillUnmount=function(){this.renderLayer(!1),this.isMounted=!1,this.remote&&this.remote.parentNode.removeChild(this.remote)},u.prototype.findNode=function(e){return"string"==typeof e?document.querySelector(e):e},u.prototype.renderLayer=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isMounted&&(this.props.into!==this.intoPointer&&(this.intoPointer=this.props.into,this.into&&this.remote&&(this.remote=e.render(e.h(i,null),this.into,this.remote)),this.into=this.findNode(this.props.into)),this.remote=e.render(e.h(i,{context:this.context},t&&this.props.children||null),this.into,this.remote))},u.prototype.render=function(){return null},u}(e.Component),i=function(e){function o(){return t(this,o),r(this,e.apply(this,arguments))}return n(o,e),o.prototype.getChildContext=function(){return this.props.context},o.prototype.render=function(e){var t=e.children;return t&&t[0]||null},o}(e.Component);return o}(n(0))},function(e,t,n){var r=n(9),o=n(18),i=n(20),u="Expected a function",s=Math.max,a=Math.min;e.exports=function(e,t,n){var c,l,p,f,d,h,v=0,y=!1,m=!1,b=!0;if("function"!=typeof e)throw new TypeError(u);function g(t){var n=c,r=l;return c=l=void 0,v=t,f=e.apply(r,n)}function x(e){var n=e-h;return void 0===h||n>=t||n<0||m&&e-v>=p}function _(){var e=o();if(x(e))return w(e);d=setTimeout(_,function(e){var n=t-(e-h);return m?a(n,p-(e-v)):n}(e))}function w(e){return d=void 0,b&&c?g(e):(c=l=void 0,f)}function S(){var e=o(),n=x(e);if(c=arguments,l=this,h=e,n){if(void 0===d)return function(e){return v=e,d=setTimeout(_,t),y?g(e):f}(h);if(m)return clearTimeout(d),d=setTimeout(_,t),g(h)}return void 0===d&&(d=setTimeout(_,t)),f}return t=i(t)||0,r(n)&&(y=!!n.leading,p=(m="maxWait"in n)?s(i(n.maxWait)||0,t):p,b="trailing"in n?!!n.trailing:b),S.cancel=function(){void 0!==d&&clearTimeout(d),v=0,c=h=l=d=void 0},S.flush=function(){return void 0===d?f:w(o())},S}},function(e,t,n){e.exports=function(e,t){var n,r,o,i=0;function u(){var t,u,s=r,a=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(u=0;u<a;u++)if(s.args[u]!==arguments[u]){s=s.next;continue e}return s!==r&&(s===o&&(o=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=r,s.prev=null,r.prev=s,r=s),s.val}s=s.next}for(t=new Array(a),u=0;u<a;u++)t[u]=arguments[u];return s={args:t,val:e.apply(null,t)},r?(r.prev=s,s.next=r):o=s,i===n?(o=o.prev).next=null:i++,r=s,s.val}return t&&t.maxSize&&(n=t.maxSize),u.clear=function(){r=null,o=null,i=0},u}},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(t){return"function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?e.exports=r=function(e){return n(e)}:e.exports=r=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},r(t)}e.exports=r},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(t,r)}e.exports=n},function(e,t,n){var r=n(10);e.exports=function(){return r.Date.now()}},function(e,t){var n="object"==typeof window&&window&&window.Object===Object&&window;e.exports=n},function(e,t,n){var r=n(9),o=n(21),i=NaN,u=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return i;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(u,"");var n=a.test(e);return n||c.test(e)?l(e.slice(2),n?2:8):s.test(e)?i:+e}},function(e,t,n){var r=n(22),o=n(25),i="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||o(e)&&r(e)==i}},function(e,t,n){var r=n(11),o=n(23),i=n(24),u="[object Null]",s="[object Undefined]",a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?s:u:a&&a in Object(e)?o(e):i(e)}},function(e,t,n){var r=n(11),o=Object.prototype,i=o.hasOwnProperty,u=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(a){}var o=u.call(e);return r&&(t?e[s]=n:delete e[s]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";n.r(t);var r,o,i,u,s=n(0),a=n(12),c=n.n(a),l=n(1),p=n.n(l),f=n(2),d=n.n(f),h=n(3),v=n.n(h),y=n(4),m=n.n(y),b=n(6),g=n.n(b),x=n(5),_=n.n(x),w=n(7),S=n.n(w),k=n(13),j=n.n(k),C=n(14),O=n.n(C);function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){P(e,t,n[t])})}return e}r={"(":9,"!":8,"*":7,"/":7,"%":7,"+":6,"-":6,"<":5,"<=":5,">":5,">=":5,"==":4,"!=":4,"&&":3,"||":2,"?":1,"?:":1},o=["(","?"],i={")":["("],":":["?","?:"]},u=/<=|>=|==|!=|&&|\|\||\?:|\(|!|\*|\/|%|\+|-|<|>|\?|\)|:/;var T={"!":function(e){return!e},"*":function(e,t){return e*t},"/":function(e,t){return e/t},"%":function(e,t){return e%t},"+":function(e,t){return e+t},"-":function(e,t){return e-t},"<":function(e,t){return e<t},"<=":function(e,t){return e<=t},">":function(e,t){return e>t},">=":function(e,t){return e>=t},"==":function(e,t){return e===t},"!=":function(e,t){return e!==t},"&&":function(e,t){return e&&t},"||":function(e,t){return e||t},"?:":function(e,t,n){if(e)throw t;return n}};function E(e){var t=function(e){for(var t,n,s,a,c=[],l=[];t=e.match(u);){for(n=t[0],(s=e.substr(0,t.index).trim())&&c.push(s);a=l.pop();){if(i[n]){if(i[n][0]===a){n=i[n][1]||n;break}}else if(o.indexOf(a)>=0||r[a]<r[n]){l.push(a);break}c.push(a)}i[n]||l.push(n),e=e.substr(t.index+n.length)}return(e=e.trim())&&c.push(e),c.concat(l.reverse())}(e);return function(e){return function(e,t){var n,r,o,i,u,s,a=[];for(n=0;n<e.length;n++){if(u=e[n],i=T[u]){for(r=i.length,o=Array(r);r--;)o[r]=a.pop();try{s=i.apply(null,o)}catch(c){return c}}else s=t.hasOwnProperty(u)?t[u]:+u;a.push(s)}return a[0]}(t,e)}}var M={contextDelimiter:"",onMissingKey:null};function U(e,t){var n;for(n in this.data=e,this.pluralForms={},t=t||{},this.options={},M)this.options[n]=t[n]||M[n]}U.prototype.getPluralForm=function(e,t){var n,r,o,i,u=this.pluralForms[e];return u||("function"!=typeof(o=(n=this.data[e][""])["Plural-Forms"]||n["plural-forms"]||n.plural_forms)&&(r=function(e){var t,n,r;for(t=e.split(";"),n=0;n<t.length;n++)if(0===(r=t[n].trim()).indexOf("plural="))return r.substr(7)}(n["Plural-Forms"]||n["plural-forms"]||n.plural_forms),i=E(r),o=function(e){return+i({n:e})}),u=this.pluralForms[e]=o),u(t)},U.prototype.dcnpgettext=function(e,t,n,r,o){var i,u,s;return i=void 0===o?0:this.getPluralForm(e,o),u=n,t&&(u=t+this.options.contextDelimiter+n),(s=this.data[e][u])&&s[i]?s[i]:(this.options.onMissingKey&&this.options.onMissingKey(n,e),0===i?n:r)};var I=n(15),L=n.n(I),F=n(8),R=n.n(F),D={"":{plural_forms:"plural=(n!=1)"}},q=L()(console.error),B=new U({});function A(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default",t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;return B.data[e]||function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default";B.data[t]=N({},D,B.data[t],e),B.data[t][""]=N({},D[""],B.data[t][""])}(void 0,e),B.dcnpgettext(e,t,n,r,o)}var W=function(e){function t(){return p()(this,t),v()(this,m()(t).apply(this,arguments))}return _()(t,e),d()(t,[{key:"render",value:function(){var e=this.props.result;return Object(s.h)("p",null,e.fields.author)}}]),t}(s.Component),z=function(e){function t(){return p()(this,t),v()(this,m()(t).apply(this,arguments))}return _()(t,e),d()(t,[{key:"render",value:function(){var e,t=this.props,n=t.results,r=void 0===n?[]:n,o=t.query;return Object(s.h)("div",null,Object(s.h)("p",null,function(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return R.a.sprintf.apply(R.a,[e].concat(n))}catch(o){return q("sprintf error: \n\n"+o.toString()),e}}(A(e,void 0,'You are searching for "%s"'),o),"."),r.map(function(e){return Object(s.h)(W,{result:e})}))}}]),t}(s.Component),V=new(function(){function e(){p()(this,e)}return d()(e,[{key:"getAPIUrl",value:function(e){var t="https://public-api.wordpress.com/rest/v1.3/sites/20115252/search?q=";return t+=encodeURIComponent(e),t+="&fields=author"}},{key:"fetch",value:function(e){return t=this.getAPIUrl(e),n=n||{},new Promise(function(e,r){var o=new XMLHttpRequest,i=[],u=[],s={},a=function(){return{ok:2==(o.status/100|0),statusText:o.statusText,status:o.status,url:o.responseURL,text:function(){return Promise.resolve(o.responseText)},json:function(){return Promise.resolve(JSON.parse(o.responseText))},blob:function(){return Promise.resolve(new Blob([o.response]))},clone:a,headers:{keys:function(){return i},entries:function(){return u},get:function(e){return s[e.toLowerCase()]},has:function(e){return e.toLowerCase()in s}}}};for(var c in o.open(n.method||"get",t,!0),o.onload=function(){o.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm,function(e,t,n){i.push(t=t.toLowerCase()),u.push([t,n]),s[t]=s[t]?s[t]+","+n:n}),e(a())},o.onerror=r,o.withCredentials="include"==n.credentials,n.headers)o.setRequestHeader(c,n.headers[c]);o.send(n.body||null)});var t,n}}]),e}()),$=function(e){function t(){var e;return p()(this,t),e=v()(this,m()(t).apply(this,arguments)),S()(g()(e),"bindInput",function(t){return e.input=t}),S()(g()(e),"onChangeQuery",function(t){var n=t.target.value;e.setState({query:n}),e.getResults(n)}),e.requestId=0,e.state={query:e.props.initialValue,results:[]},e.onChangeQuery=e.onChangeQuery.bind(g()(e)),e.getResults=O()(e.getResults.bind(g()(e)),500),e.getResults(e.props.initialValue),e}return _()(t,e),d()(t,[{key:"componentDidMount",value:function(){this.props.grabFocus&&this.input.focus()}},{key:"getResults",value:function(e){var t=this;if(e){if(V){this.requestId++;var n=this.requestId;V.fetch(e).then(function(e){return e.json()}).then(function(e){t.requestId===n&&t.setState({results:e})})}}else this.setState({results:[]})}},{key:"render",value:function(){var e=this.state,t=e.query,n=e.results;return Object(s.h)("div",null,Object(s.h)("p",null,Object(s.h)("input",{type:"search",value:t,onInput:this.onChangeQuery,ref:this.bindInput})),Object(s.h)(j.a,{into:"#results"},Object(s.h)(z,c()({query:t},n))))}}]),t}(s.Component);window.injectSearchWidget=function(e,t,n){Object(s.render)(Object(s.h)($,{initialValue:e,grabFocus:n}),document.body,t)}}]));