sinzmise-cetastories 2.0.0-1729401485124 → 2.0.0-1730024687183
Sign up to get free protection for your applications and to get access to all the features.
- package/404/index.html +1 -1
- package/about/index.html +1 -1
- package/album/index.html +1 -1
- package/archives/2021/12/index.html +1 -1
- package/archives/2021/index.html +1 -1
- package/archives/2022/12/index.html +1 -1
- package/archives/2022/index.html +1 -1
- package/archives/2023/01/index.html +1 -1
- package/archives/2023/02/index.html +1 -1
- package/archives/2023/03/index.html +1 -1
- package/archives/2023/04/index.html +1 -1
- package/archives/2023/07/index.html +1 -1
- package/archives/2023/08/index.html +1 -1
- package/archives/2023/09/index.html +1 -1
- package/archives/2023/10/index.html +1 -1
- package/archives/2023/11/index.html +1 -1
- package/archives/2023/12/index.html +1 -1
- package/archives/2023/index.html +1 -1
- package/archives/2023/page/2/index.html +1 -1
- package/archives/2023/page/3/index.html +1 -1
- package/archives/2024/01/index.html +1 -1
- package/archives/2024/02/index.html +1 -1
- package/archives/2024/03/index.html +1 -1
- package/archives/2024/04/index.html +1 -1
- package/archives/2024/05/index.html +1 -1
- package/archives/2024/06/index.html +1 -1
- package/archives/2024/07/index.html +1 -1
- package/archives/2024/08/index.html +1 -1
- package/archives/2024/09/index.html +1 -1
- package/archives/2024/10/index.html +1 -1
- package/archives/2024/index.html +1 -1
- package/archives/2024/page/2/index.html +1 -1
- package/archives/index.html +1 -1
- package/archives/page/2/index.html +1 -1
- package/archives/page/3/index.html +1 -1
- package/archives/page/4/index.html +1 -1
- package/archives/page/5/index.html +1 -0
- package/assets/algolia/algoliasearch.js +2 -1
- package/assets/algolia/algoliasearchLite.js +2 -1
- package/atom.xml +114 -204
- package/bbs/bbs.html +1 -1
- package/bbs/bbs.js +2 -1
- package/bbs/index.html +1 -1
- package/categories/index.html +1 -1
- package/categories//344/270/252/344/272/272/345/260/217/350/256/260/index.html +1 -1
- package/categories//344/270/252/344/272/272/345/260/217/350/256/260/page/2/index.html +1 -1
- package/categories//346/255/214/346/233/262/346/224/266/351/233/206/index.html +1 -1
- package/categories//346/270/270/346/210/217/347/233/270/345/205/263/index.html +1 -1
- package/categories//347/253/231/347/202/271/346/212/230/350/205/276/index.html +1 -1
- package/categories//347/253/231/347/202/271/346/212/230/350/205/276/page/2/index.html +1 -1
- package/categories//351/241/271/347/233/256/346/212/230/350/205/276/index.html +1 -1
- package/charts/index.html +1 -1
- package/comments/index.html +1 -1
- package/css/custom2.css +2 -1
- package/css/first.css +2 -0
- package/css/pace/big-counter.css +2 -1
- package/css/pace/corner-indicator.css +2 -1
- package/css/pace/flash.css +2 -1
- package/css/pace/mac-osx.css +2 -1
- package/css/pace/pace.css +2 -1
- package/css/plane.css +2 -1
- package/css/style.css +2 -0
- package/css/tags.css +2 -1
- package/essay/index.html +1 -1
- package/fcircle/index.html +1 -1
- package/games +3831 -509
- package/index.html +1 -1
- package/js/app.js +2 -0
- package/js/autoload.js +2 -1
- package/js/ceta/fancybox.css +2 -0
- package/js/ceta/fancybox.umd.js +2 -0
- package/js/ceta/iconfontInkss.js +2 -0
- package/js/ceta/lazyload.min.js +1 -0
- package/js/ceta/message.css +2 -0
- package/js/ceta/message.js +2 -0
- package/js/ceta/pjax.min.js +1 -0
- package/js/clock.js +2 -1
- package/js/kslink.js +2 -1
- package/js/newyear.js +2 -1
- package/js/plane.js +2 -1
- package/js/plugins/aplayer.js +2 -0
- package/js/plugins/parallax.js +2 -0
- package/js/plugins/rightMenus.js +2 -0
- package/js/plugins/tags/contributors.js +2 -0
- package/js/plugins/tags/friends.js +2 -0
- package/js/plugins/tags/sites.js +2 -0
- package/js/search/algolia.js +2 -0
- package/js/search/hexo.js +2 -0
- package/js/search/meilisearch.js +2 -0
- package/js/txmap.js +2 -1
- package/link/index.html +1 -1
- package/load.html +1 -1
- package/maps/assets/algolia/algoliasearch.js.map +1 -0
- package/maps/assets/algolia/algoliasearchLite.js.map +1 -0
- package/maps/bbs/bbs.js.map +1 -0
- package/maps/css/custom2.css.map +1 -0
- package/maps/css/first.css.map +1 -0
- package/maps/css/pace/big-counter.css.map +1 -0
- package/maps/css/pace/corner-indicator.css.map +1 -0
- package/maps/css/pace/flash.css.map +1 -0
- package/maps/css/pace/mac-osx.css.map +1 -0
- package/maps/css/pace/pace.css.map +1 -0
- package/maps/css/plane.css.map +1 -0
- package/maps/css/style.css.map +1 -0
- package/maps/css/tags.css.map +1 -0
- package/maps/js/app.js.map +1 -0
- package/maps/js/autoload.js.map +1 -0
- package/maps/js/ceta/fancybox.css.map +1 -0
- package/maps/js/ceta/fancybox.umd.js.map +1 -0
- package/maps/js/ceta/iconfontInkss.js.map +1 -0
- package/maps/js/ceta/message.css.map +1 -0
- package/maps/js/ceta/message.js.map +1 -0
- package/maps/js/clock.js.map +1 -0
- package/maps/js/kslink.js.map +1 -0
- package/maps/js/newyear.js.map +1 -0
- package/maps/js/plane.js.map +1 -0
- package/maps/js/plugins/aplayer.js.map +1 -0
- package/maps/js/plugins/parallax.js.map +1 -0
- package/maps/js/plugins/rightMenus.js.map +1 -0
- package/maps/js/plugins/tags/contributors.js.map +1 -0
- package/maps/js/plugins/tags/friends.js.map +1 -0
- package/maps/js/plugins/tags/sites.js.map +1 -0
- package/maps/js/search/algolia.js.map +1 -0
- package/maps/js/search/hexo.js.map +1 -0
- package/maps/js/search/meilisearch.js.map +1 -0
- package/maps/js/txmap.js.map +1 -0
- package/maps/sw.js.map +1 -0
- package/maps/weichuncai/css/style.css.map +1 -0
- package/maps/weichuncai/js/common.js.map +1 -0
- package/maps/weichuncai/js/jquery.js.map +1 -0
- package/maps/weichuncai/wcc-config.js.map +1 -0
- package/music/index.html +1 -1
- package/package.json +1 -1
- package/page/2/index.html +1 -1
- package/page/3/index.html +1 -1
- package/page/4/index.html +1 -1
- package/page/5/index.html +1 -0
- package/posts/10021/index.html +5 -1
- package/posts/10045/index.html +1 -1
- package/posts/10733/index.html +1 -1
- package/posts/10996/index.html +5 -1
- package/posts/12779/index.html +1 -1
- package/posts/13624/index.html +1 -1
- package/posts/15688/index.html +1 -1
- package/posts/15748/index.html +5 -1
- package/posts/15799/index.html +1 -1
- package/posts/15842/index.html +5 -1
- package/posts/16107/index.html +1 -1
- package/posts/18063/index.html +1 -1
- package/posts/20412/index.html +1 -1
- package/posts/21375/index.html +1 -1
- package/posts/22945/index.html +4 -1
- package/posts/23021/index.html +1 -1
- package/posts/27531/index.html +5 -1
- package/posts/28536/index.html +1 -1
- package/posts/28733/index.html +1 -1
- package/posts/29196/index.html +1 -1
- package/posts/38917/index.html +1 -1
- package/posts/38964/index.html +1 -1
- package/posts/42487/index.html +1 -1
- package/posts/42580/index.html +1 -1
- package/posts/45875/index.html +1 -1
- package/posts/46640/index.html +1 -1
- package/posts/48762/index.html +1 -1
- package/posts/50710/index.html +1 -1
- package/posts/52677/index.html +1 -1
- package/posts/53662/index.html +1 -1
- package/posts/54386/index.html +1 -1
- package/posts/54481/index.html +1 -1
- package/posts/54787/index.html +5 -1
- package/posts/56467/index.html +1 -1
- package/posts/57692/index.html +1 -1
- package/posts/58203/index.html +1 -1
- package/posts/61417/index.html +1 -1
- package/posts/61712/index.html +1 -0
- package/posts/646/index.html +1 -1
- package/posts/64856/index.html +1 -1
- package/posts/64935/index.html +1 -1
- package/search.xml +256 -343
- package/seas/index.html +1 -1
- package/sw.js +2 -1
- package/tags/Flash/347/233/270/345/205/263/index.html +1 -1
- package/tags/Steam/346/270/270/346/210/217/index.html +1 -1
- package/tags/Windows/350/275/257/344/273/266/index.html +1 -1
- package/tags/index.html +1 -1
- package/tags//344/270/252/344/272/272/345/260/217/350/256/260/index.html +1 -1
- package/tags//344/270/252/344/272/272/345/260/217/350/256/260/page/2/index.html +1 -1
- package/tags//345/205/266/345/256/203/346/270/270/346/210/217/index.html +1 -1
- package/tags//345/212/240/350/275/275/345/212/250/347/224/273/index.html +1 -1
- package/tags//346/202/254/346/265/256/345/256/240/347/211/251-/347/234/213/346/235/277/345/250/230/index.html +1 -1
- package/tags//346/255/214/346/233/262/346/224/266/351/233/206/index.html +1 -1
- package/tags//346/270/270/346/210/217/347/233/270/345/205/263/index.html +1 -1
- package/tags//347/253/231/347/202/271/345/272/225/351/203/250/351/255/224/346/224/271/index.html +1 -1
- package/tags//347/253/231/347/202/271/346/212/230/350/205/276/index.html +1 -1
- package/tags//347/253/231/347/202/271/346/212/230/350/205/276/page/2/index.html +1 -1
- package/tags//350/207/252/345/273/272/351/203/250/347/275/262/index.html +1 -1
- package/tags//351/241/265/351/235/242/351/255/224/346/224/271/index.html +1 -1
- package/tags//351/241/271/347/233/256/346/212/230/350/205/276/index.html +1 -1
- package/update/index.html +1 -1
- package/weichuncai/css/style.css +2 -1
- package/weichuncai/js/common.js +2 -1
- package/weichuncai/js/jquery.js +2 -1
- package/weichuncai/wcc-config.js +2 -1
- package/css/index.css +0 -1
- package/css/plugins/bootstrap.min.css +0 -6
- package/css/plugins/bootstrap.row.css +0 -1
- package/css/plugins/font-awesome.min.css +0 -1
- package/failure.ico +0 -0
- package/fonts/webfonts/fa-brands-400.woff2 +0 -0
- package/fonts/webfonts/fa-regular-400.woff2 +0 -0
- package/fonts/webfonts/fa-solid-900.woff2 +0 -0
- package/img/404.jpg +0 -0
- package/img/avatar.jpg +0 -0
- package/img/banner.png +0 -0
- package/img/block.jpg +0 -0
- package/img/favicon.svg +0 -39
- package/js/main.js +0 -1
- package/js/plugins/danmu.js +0 -1
- package/js/plugins/local_search.js +0 -1
- package/js/plugins/typing.js +0 -1
- package/serviceworker.js +0 -1
@@ -7,4 +7,5 @@
|
|
7
7
|
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
|
8
8
|
* @version 4.1.1
|
9
9
|
*/
|
10
|
-
!function(e,o){"object"==typeof r&&void 0!==t?t.exports=o():e.ES6Promise=o()}(this,(function(){"use strict";function t(e){return"function"==typeof e}var r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=0,i=void 0,a=void 0,c=function(e,t){y[s]=e,y[s+1]=t,2===(s+=2)&&(a?a(m):_())};var u="undefined"!=typeof window?window:void 0,l=u||{},p=l.MutationObserver||l.WebKitMutationObserver,d="undefined"==typeof self&&void 0!==o&&"[object process]"==={}.toString.call(o),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function f(){var e=setTimeout;return function(){return e(m,1)}}var y=new Array(1e3);function m(){for(var e=0;e<s;e+=2){(0,y[e])(y[e+1]),y[e]=void 0,y[e+1]=void 0}s=0}var v,g,b,w,_=void 0;function T(e,t){var r=arguments,o=this,n=new this.constructor(A);void 0===n[R]&&F(n);var s,i=o._state;return i?(s=r[i-1],c((function(){return H(i,n,s,o._result)}))):N(o,n,e,t),n}function x(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(A);return U(t,e),t}d?_=function(){return o.nextTick(m)}:p?(g=0,b=new p(m),w=document.createTextNode(""),b.observe(w,{characterData:!0}),_=function(){w.data=g=++g%2}):h?((v=new MessageChannel).port1.onmessage=m,_=function(){return v.port2.postMessage(0)}):_=void 0===u&&"function"==typeof e?function(){try{var t=e("vertx");return void 0!==(i=t.runOnLoop||t.runOnContext)?function(){i(m)}:f()}catch(e){return f()}}():f();var R=Math.random().toString(36).substring(16);function A(){}var j=void 0,S=1,I=2,k=new K;function O(e){try{return e.then}catch(e){return k.error=e,k}}function q(e,r,o){r.constructor===e.constructor&&o===T&&r.constructor.resolve===x?function(e,t){t._state===S?P(e,t._result):t._state===I?C(e,t._result):N(t,void 0,(function(t){return U(e,t)}),(function(t){return C(e,t)}))}(e,r):o===k?(C(e,k.error),k.error=null):void 0===o?P(e,r):t(o)?function(e,t,r){c((function(e){var o=!1,n=function(e,t,r,o){try{e.call(t,r,o)}catch(e){return e}}(r,t,(function(r){o||(o=!0,t!==r?U(e,r):P(e,r))}),(function(t){o||(o=!0,C(e,t))}),e._label);!o&&n&&(o=!0,C(e,n))}),e)}(e,r,o):P(e,r)}function U(e,t){var r,o;e===t?C(e,new TypeError("You cannot resolve a promise with itself")):(o=typeof(r=t),null===r||"object"!==o&&"function"!==o?P(e,t):q(e,t,O(t)))}function E(e){e._onerror&&e._onerror(e._result),D(e)}function P(e,t){e._state===j&&(e._result=t,e._state=S,0!==e._subscribers.length&&c(D,e))}function C(e,t){e._state===j&&(e._state=I,e._result=t,c(E,e))}function N(e,t,r,o){var n=e._subscribers,s=n.length;e._onerror=null,n[s]=t,n[s+S]=r,n[s+I]=o,0===s&&e._state&&c(D,e)}function D(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var o=void 0,n=void 0,s=e._result,i=0;i<t.length;i+=3)o=t[i],n=t[i+r],o?H(r,o,n,s):n(s);e._subscribers.length=0}}function K(){this.error=null}var L=new K;function H(e,r,o,n){var s=t(o),i=void 0,a=void 0,c=void 0,u=void 0;if(s){if(i=function(e,t){try{return e(t)}catch(e){return L.error=e,L}}(o,n),i===L?(u=!0,a=i.error,i.error=null):c=!0,r===i)return void C(r,new TypeError("A promises callback cannot return that same promise."))}else i=n,c=!0;r._state!==j||(s&&c?U(r,i):u?C(r,a):e===S?P(r,i):e===I&&C(r,i))}var M=0;function F(e){e[R]=M++,e._state=void 0,e._result=void 0,e._subscribers=[]}function J(e,t){this._instanceConstructor=e,this.promise=new e(A),this.promise[R]||F(this.promise),r(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?P(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&P(this.promise,this._result))):C(this.promise,new Error("Array Methods must be provided an Array"))}function B(e){this[R]=M++,this._result=this._state=void 0,this._subscribers=[],A!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof B?function(e,t){try{t((function(t){U(e,t)}),(function(t){C(e,t)}))}catch(t){C(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return J.prototype._enumerate=function(e){for(var t=0;this._state===j&&t<e.length;t++)this._eachEntry(e[t],t)},J.prototype._eachEntry=function(e,t){var r=this._instanceConstructor,o=r.resolve;if(o===x){var n=O(e);if(n===T&&e._state!==j)this._settledAt(e._state,t,e._result);else if("function"!=typeof n)this._remaining--,this._result[t]=e;else if(r===B){var s=new r(A);q(s,e,n),this._willSettleAt(s,t)}else this._willSettleAt(new r((function(t){return t(e)})),t)}else this._willSettleAt(o(e),t)},J.prototype._settledAt=function(e,t,r){var o=this.promise;o._state===j&&(this._remaining--,e===I?C(o,r):this._result[t]=r),0===this._remaining&&P(o,this._result)},J.prototype._willSettleAt=function(e,t){var r=this;N(e,void 0,(function(e){return r._settledAt(S,t,e)}),(function(e){return r._settledAt(I,t,e)}))},B.all=function(e){return new J(this,e).promise},B.race=function(e){var t=this;return r(e)?new t((function(r,o){for(var n=e.length,s=0;s<n;s++)t.resolve(e[s]).then(r,o)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},B.resolve=x,B.reject=function(e){var t=new this(A);return C(t,e),t},B._setScheduler=function(e){a=e},B._setAsap=function(e){c=e},B._asap=c,B.prototype={constructor:B,then:T,catch:function(e){return this.then(null,e)}},B.polyfill=function(){var e=void 0;if(void 0!==n)e=n;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===r&&!t.cast)return}e.Promise=B},B.Promise=B,B}))}).call(this,e(12),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{12:12}],4:[function(e,t,r){function o(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function s(e){return"object"==typeof e&&null!==e}function i(e){return void 0===e}t.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._maxListeners=void 0,o.defaultMaxListeners=10,o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},o.prototype.emit=function(e){var t,r,o,a,c,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(i(r=this._events[e]))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),r.apply(this,a)}else if(s(r))for(a=Array.prototype.slice.call(arguments,1),o=(u=r.slice()).length,c=0;c<o;c++)u[c].apply(this,a);return!0},o.prototype.addListener=function(e,t){var r;if(!n(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,n(t.listener)?t.listener:t),this._events[e]?s(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,s(this._events[e])&&!this._events[e].warned&&(r=i(this._maxListeners)?o.defaultMaxListeners:this._maxListeners)&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},o.prototype.on=o.prototype.addListener,o.prototype.once=function(e,t){if(!n(t))throw TypeError("listener must be a function");var r=!1;function o(){this.removeListener(e,o),r||(r=!0,t.apply(this,arguments))}return o.listener=t,this.on(e,o),this},o.prototype.removeListener=function(e,t){var r,o,i,a;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(r=this._events[e]).length,o=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(r)){for(a=i;a-- >0;)if(r[a]===t||r[a].listener&&r[a].listener===t){o=a;break}if(o<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},o.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},o.prototype.listeners=function(e){return this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},o.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},o.listenerCount=function(e,t){return e.listenerCount(t)}},{}],5:[function(e,t,r){var o=Object.prototype.hasOwnProperty,n=Object.prototype.toString;t.exports=function(e,t,r){if("[object Function]"!==n.call(t))throw new TypeError("iterator must be a function");var s=e.length;if(s===+s)for(var i=0;i<s;i++)t.call(r,e[i],i,e);else for(var a in e)o.call(e,a)&&t.call(r,e[a],a,e)}},{}],6:[function(e,t,r){(function(e){var r;r="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],7:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],8:[function(e,t,r){var o={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==o.call(e)}},{}],9:[function(e,t,r){var o=1e3,n=60*o,s=60*n,i=24*s,a=365.25*i;function c(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}t.exports=function(e,t){t=t||{};var r,u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*a;case"days":case"day":case"d":return r*i;case"hours":case"hour":case"hrs":case"hr":case"h":return r*s;case"minutes":case"minute":case"mins":case"min":case"m":return r*n;case"seconds":case"second":case"secs":case"sec":case"s":return r*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?c(r=e,i,"day")||c(r,s,"hour")||c(r,n,"minute")||c(r,o,"second")||r+" ms":function(e){if(e>=i)return Math.round(e/i)+"d";if(e>=s)return Math.round(e/s)+"h";if(e>=n)return Math.round(e/n)+"m";if(e>=o)return Math.round(e/o)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],10:[function(e,t,r){"use strict";var o=Object.prototype.hasOwnProperty,n=Object.prototype.toString,s=Array.prototype.slice,i=e(11),a=Object.prototype.propertyIsEnumerable,c=!a.call({toString:null},"toString"),u=a.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],p=function(e){var t=e.constructor;return t&&t.prototype===e},d={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{p(window[e])}catch(e){return!0}}catch(e){return!0}return!1}(),f=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===n.call(e),s=i(e),a=t&&"[object String]"===n.call(e),d=[];if(!t&&!r&&!s)throw new TypeError("Object.keys called on a non-object");var f=u&&r;if(a&&e.length>0&&!o.call(e,0))for(var y=0;y<e.length;++y)d.push(String(y));if(s&&e.length>0)for(var m=0;m<e.length;++m)d.push(String(m));else for(var v in e)f&&"prototype"===v||!o.call(e,v)||d.push(String(v));if(c)for(var g=function(e){if("undefined"==typeof window||!h)return p(e);try{return p(e)}catch(e){return!1}}(e),b=0;b<l.length;++b)g&&"constructor"===l[b]||!o.call(e,l[b])||d.push(l[b]);return d};f.shim=function(){if(Object.keys){var e=function(){return 2===(Object.keys(arguments)||"").length}(1,2);if(!e){var t=Object.keys;Object.keys=function(e){return i(e)?t(s.call(e)):t(e)}}}else Object.keys=f;return Object.keys||f},t.exports=f},{11:11}],11:[function(e,t,r){"use strict";var o=Object.prototype.toString;t.exports=function(e){var t=o.call(e),r="[object Arguments]"===t;return r||(r="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===o.call(e.callee)),r}},{}],12:[function(e,t,r){var o,n,s=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(o===setTimeout)return setTimeout(e,0);if((o===i||!o)&&setTimeout)return o=setTimeout,setTimeout(e,0);try{return o(e,0)}catch(t){try{return o.call(null,e,0)}catch(t){return o.call(this,e,0)}}}!function(){try{o="function"==typeof setTimeout?setTimeout:i}catch(e){o=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var u,l=[],p=!1,d=-1;function h(){p&&u&&(p=!1,u.length?l=u.concat(l):d=-1,l.length&&f())}function f(){if(!p){var e=c(h);p=!0;for(var t=l.length;t;){for(u=l,l=[];++d<t;)u&&u[d].run();d=-1,t=l.length}u=null,p=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function m(){}s.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new y(e,t)),1!==l.length||p||c(f)},y.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=m,s.addListener=m,s.once=m,s.off=m,s.removeListener=m,s.removeAllListeners=m,s.emit=m,s.binding=function(e){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},{}],13:[function(e,t,r){"use strict";function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,s){t=t||"&",r=r||"=";var i={};if("string"!=typeof e||0===e.length)return i;var a=/\+/g;e=e.split(t);var c=1e3;s&&"number"==typeof s.maxKeys&&(c=s.maxKeys);var u=e.length;c>0&&u>c&&(u=c);for(var l=0;l<u;++l){var p,d,h,f,y=e[l].replace(a,"%20"),m=y.indexOf(r);m>=0?(p=y.substr(0,m),d=y.substr(m+1)):(p=y,d=""),h=decodeURIComponent(p),f=decodeURIComponent(d),o(i,h)?n(i[h])?i[h].push(f):i[h]=[i[h],f]:i[h]=f}return i};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],14:[function(e,t,r){"use strict";var o=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,a){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?s(i(e),(function(i){var a=encodeURIComponent(o(i))+r;return n(e[i])?s(e[i],(function(e){return a+encodeURIComponent(o(e))})).join(t):a+encodeURIComponent(o(e[i]))})).join(t):a?encodeURIComponent(o(a))+r+encodeURIComponent(o(e)):""};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function s(e,t){if(e.map)return e.map(t);for(var r=[],o=0;o<e.length;o++)r.push(t(e[o],o));return r}var i=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],15:[function(e,t,r){"use strict";r.decode=r.parse=e(13),r.encode=r.stringify=e(14)},{13:13,14:14}],16:[function(e,t,r){t.exports=u;var o=e(18),n=e(28),s=e(29),i=e(17),a=e(7),c=e(30);function u(){i.apply(this,arguments)}function l(){throw new c.AlgoliaSearchError("Not implemented in this environment.\nIf you feel this is a mistake, write to support@algolia.com")}a(u,i),u.prototype.deleteIndex=function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(e),hostType:"write",callback:t})},u.prototype.moveIndex=function(e,t,r){var o={operation:"move",destination:t};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(e)+"/operation",body:o,hostType:"write",callback:r})},u.prototype.copyIndex=function(e,t,r,o){var n={operation:"copy",destination:t},s=o;if("function"==typeof r)s=r;else if(Array.isArray(r)&&r.length>0)n.scope=r;else if(void 0!==r)throw new Error("the scope given to `copyIndex` was not an array with settings, synonyms or rules");return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(e)+"/operation",body:n,hostType:"write",callback:s})},u.prototype.getLogs=function(t,r,o){var n=e(26),s={};return"object"==typeof t?(s=n(t),o=r):0===arguments.length||"function"==typeof t?o=t:1===arguments.length||"function"==typeof r?(o=r,s.offset=t):(s.offset=t,s.length=r),void 0===s.offset&&(s.offset=0),void 0===s.length&&(s.length=10),this._jsonRequest({method:"GET",url:"/1/logs?"+this._getSearchParams(s,""),hostType:"read",callback:o})},u.prototype.listIndexes=function(e,t){var r="";return void 0===e||"function"==typeof e?t=e:r="?page="+e,this._jsonRequest({method:"GET",url:"/1/indexes"+r,hostType:"read",callback:t})},u.prototype.initIndex=function(e){return new o(this,e)},u.prototype.initAnalytics=function(t){return e(27)(this.applicationID,this.apiKey,t)},u.prototype.listUserKeys=n((function(e){return this.listApiKeys(e)}),s("client.listUserKeys()","client.listApiKeys()")),u.prototype.listApiKeys=function(e){return this._jsonRequest({method:"GET",url:"/1/keys",hostType:"read",callback:e})},u.prototype.getUserKeyACL=n((function(e,t){return this.getApiKey(e,t)}),s("client.getUserKeyACL()","client.getApiKey()")),u.prototype.getApiKey=function(e,t){return this._jsonRequest({method:"GET",url:"/1/keys/"+e,hostType:"read",callback:t})},u.prototype.deleteUserKey=n((function(e,t){return this.deleteApiKey(e,t)}),s("client.deleteUserKey()","client.deleteApiKey()")),u.prototype.deleteApiKey=function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/keys/"+e,hostType:"write",callback:t})},u.prototype.restoreApiKey=function(e,t){return this._jsonRequest({method:"POST",url:"/1/keys/"+e+"/restore",hostType:"write",callback:t})},u.prototype.addUserKey=n((function(e,t,r){return this.addApiKey(e,t,r)}),s("client.addUserKey()","client.addApiKey()")),u.prototype.addApiKey=function(t,r,o){if(!e(8)(t))throw new Error("Usage: client.addApiKey(arrayOfAcls[, params, callback])");1!==arguments.length&&"function"!=typeof r||(o=r,r=null);var n={acl:t};return r&&(n.validity=r.validity,n.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,n.maxHitsPerQuery=r.maxHitsPerQuery,n.indexes=r.indexes,n.description=r.description,r.queryParameters&&(n.queryParameters=this._getSearchParams(r.queryParameters,"")),n.referers=r.referers),this._jsonRequest({method:"POST",url:"/1/keys",body:n,hostType:"write",callback:o})},u.prototype.addUserKeyWithValidity=n((function(e,t,r){return this.addApiKey(e,t,r)}),s("client.addUserKeyWithValidity()","client.addApiKey()")),u.prototype.updateUserKey=n((function(e,t,r,o){return this.updateApiKey(e,t,r,o)}),s("client.updateUserKey()","client.updateApiKey()")),u.prototype.updateApiKey=function(t,r,o,n){if(!e(8)(r))throw new Error("Usage: client.updateApiKey(key, arrayOfAcls[, params, callback])");2!==arguments.length&&"function"!=typeof o||(n=o,o=null);var s={acl:r};return o&&(s.validity=o.validity,s.maxQueriesPerIPPerHour=o.maxQueriesPerIPPerHour,s.maxHitsPerQuery=o.maxHitsPerQuery,s.indexes=o.indexes,s.description=o.description,o.queryParameters&&(s.queryParameters=this._getSearchParams(o.queryParameters,"")),s.referers=o.referers),this._jsonRequest({method:"PUT",url:"/1/keys/"+t,body:s,hostType:"write",callback:n})},u.prototype.startQueriesBatch=n((function(){this._batch=[]}),s("client.startQueriesBatch()","client.search()")),u.prototype.addQueryInBatch=n((function(e,t,r){this._batch.push({indexName:e,query:t,params:r})}),s("client.addQueryInBatch()","client.search()")),u.prototype.sendQueriesBatch=n((function(e){return this.search(this._batch,e)}),s("client.sendQueriesBatch()","client.search()")),u.prototype.batch=function(t,r){if(!e(8)(t))throw new Error("Usage: client.batch(operations[, callback])");return this._jsonRequest({method:"POST",url:"/1/indexes/*/batch",body:{requests:t},hostType:"write",callback:r})},u.prototype.assignUserID=function(e,t){if(!e.userID||!e.cluster)throw new c.AlgoliaSearchError("You have to provide both a userID and cluster",e);return this._jsonRequest({method:"POST",url:"/1/clusters/mapping",hostType:"write",body:{cluster:e.cluster},callback:t,headers:{"x-algolia-user-id":e.userID}})},u.prototype.assignUserIDs=function(e,t){if(!e.userIDs||!e.cluster)throw new c.AlgoliaSearchError("You have to provide both an array of userIDs and cluster",e);return this._jsonRequest({method:"POST",url:"/1/clusters/mapping/batch",hostType:"write",body:{cluster:e.cluster,users:e.userIDs},callback:t})},u.prototype.getTopUserID=function(e){return this._jsonRequest({method:"GET",url:"/1/clusters/mapping/top",hostType:"read",callback:e})},u.prototype.getUserID=function(e,t){if(!e.userID)throw new c.AlgoliaSearchError("You have to provide a userID",{debugData:e});return this._jsonRequest({method:"GET",url:"/1/clusters/mapping/"+e.userID,hostType:"read",callback:t})},u.prototype.listClusters=function(e){return this._jsonRequest({method:"GET",url:"/1/clusters",hostType:"read",callback:e})},u.prototype.listUserIDs=function(e,t){return this._jsonRequest({method:"GET",url:"/1/clusters/mapping",body:e,hostType:"read",callback:t})},u.prototype.removeUserID=function(e,t){if(!e.userID)throw new c.AlgoliaSearchError("You have to provide a userID",{debugData:e});return this._jsonRequest({method:"DELETE",url:"/1/clusters/mapping",hostType:"write",callback:t,headers:{"x-algolia-user-id":e.userID}})},u.prototype.searchUserIDs=function(e,t){return this._jsonRequest({method:"POST",url:"/1/clusters/mapping/search",body:e,hostType:"read",callback:t})},u.prototype.setPersonalizationStrategy=function(e,t){return this._jsonRequest({method:"POST",url:"/1/recommendation/personalization/strategy",body:e,hostType:"write",callback:t})},u.prototype.getPersonalizationStrategy=function(e){return this._jsonRequest({method:"GET",url:"/1/recommendation/personalization/strategy",hostType:"read",callback:e})},u.prototype.destroy=l,u.prototype.enableRateLimitForward=l,u.prototype.disableRateLimitForward=l,u.prototype.useSecuredAPIKey=l,u.prototype.disableSecuredAPIKey=l,u.prototype.generateSecuredApiKey=l,u.prototype.getSecuredApiKeyRemainingValidity=l},{17:17,18:18,26:26,27:27,28:28,29:29,30:30,7:7,8:8}],17:[function(e,t,r){(function(r){t.exports=c;var o=e(30),n=e(31),s=e(20),i=e(36),a=r.env.RESET_APP_DATA_TIMER&&parseInt(r.env.RESET_APP_DATA_TIMER,10)||12e4;function c(t,r,n){var s=e(1)("algoliasearch"),i=e(26),a=e(8),c=e(32),l="Usage: algoliasearch(applicationID, apiKey, opts)";if(!0!==n._allowEmptyCredentials&&!t)throw new o.AlgoliaSearchError("Please provide an application ID. "+l);if(!0!==n._allowEmptyCredentials&&!r)throw new o.AlgoliaSearchError("Please provide an API key. "+l);this.applicationID=t,this.apiKey=r,this.hosts={read:[],write:[]},n=n||{},this._timeouts=n.timeouts||{connect:1e3,read:2e3,write:3e4},n.timeout&&(this._timeouts.connect=this._timeouts.read=this._timeouts.write=n.timeout);var p=n.protocol||"https:";if(/:$/.test(p)||(p+=":"),"http:"!==p&&"https:"!==p)throw new o.AlgoliaSearchError("protocol must be `http:` or `https:` (was `"+n.protocol+"`)");if(this._checkAppIdData(),n.hosts)a(n.hosts)?(this.hosts.read=i(n.hosts),this.hosts.write=i(n.hosts)):(this.hosts.read=i(n.hosts.read),this.hosts.write=i(n.hosts.write));else{var d=c(this._shuffleResult,(function(e){return t+"-"+e+".algolianet.com"})),h=(!1===n.dsn?"":"-dsn")+".algolia.net";this.hosts.read=[this.applicationID+h].concat(d),this.hosts.write=[this.applicationID+".algolia.net"].concat(d)}this.hosts.read=c(this.hosts.read,u(p)),this.hosts.write=c(this.hosts.write,u(p)),this.extraHeaders={},this.cache=n._cache||{},this._ua=n._ua,this._useCache=!(void 0!==n._useCache&&!n._cache)||n._useCache,this._useRequestCache=this._useCache&&n._useRequestCache,this._useFallback=void 0===n.useFallback||n.useFallback,this._setTimeout=n._setTimeout,s("init done, %j",this)}function u(e){return function(t){return e+"//"+t.toLowerCase()}}function l(e){if(void 0===Array.prototype.toJSON)return JSON.stringify(e);var t=Array.prototype.toJSON;delete Array.prototype.toJSON;var r=JSON.stringify(e);return Array.prototype.toJSON=t,r}function p(e){var t={};for(var r in e){var o;if(Object.prototype.hasOwnProperty.call(e,r))o="x-algolia-api-key"===r||"x-algolia-application-id"===r?"**hidden for security purposes**":e[r],t[r]=o}return t}c.prototype.initIndex=function(e){return new s(this,e)},c.prototype.setExtraHeader=function(e,t){this.extraHeaders[e.toLowerCase()]=t},c.prototype.getExtraHeader=function(e){return this.extraHeaders[e.toLowerCase()]},c.prototype.unsetExtraHeader=function(e){delete this.extraHeaders[e.toLowerCase()]},c.prototype.addAlgoliaAgent=function(e){var t="; "+e;-1===this._ua.indexOf(t)&&(this._ua+=t)},c.prototype._jsonRequest=function(t){this._checkAppIdData();var r,s,i,a=e(1)("algoliasearch:"+t.url),c=t.additionalUA||"",u=t.cache,d=this,h=0,f=!1,y=d._useFallback&&d._request.fallback&&t.fallback;this.apiKey.length>500&&void 0!==t.body&&(void 0!==t.body.params||void 0!==t.body.requests)?(t.body.apiKey=this.apiKey,i=this._computeRequestHeaders({additionalUA:c,withApiKey:!1,headers:t.headers})):i=this._computeRequestHeaders({additionalUA:c,headers:t.headers}),void 0!==t.body&&(r=l(t.body)),a("request start");var m=[];function v(e,t,r){return d._useCache&&e&&t&&void 0!==t[r]}function g(e,r){if(v(d._useRequestCache,u,s)&&e.catch((function(){delete u[s]})),"function"!=typeof t.callback)return e.then(r);e.then((function(e){n((function(){t.callback(null,r(e))}),d._setTimeout||setTimeout)}),(function(e){n((function(){t.callback(e)}),d._setTimeout||setTimeout)}))}if(d._useCache&&d._useRequestCache&&(s=t.url),d._useCache&&d._useRequestCache&&r&&(s+="_body_"+r),v(d._useRequestCache,u,s)){a("serving request from cache");var b=u[s];return g("function"!=typeof b.then?d._promise.resolve({responseText:b}):b,(function(e){return JSON.parse(e.responseText)}))}var w=function e(n,g){d._checkAppIdData();var b=new Date;if(d._useCache&&!d._useRequestCache&&(s=t.url),d._useCache&&!d._useRequestCache&&r&&(s+="_body_"+g.body),v(!d._useRequestCache,u,s)){a("serving response from cache");var w=u[s];return d._promise.resolve({body:JSON.parse(w),responseText:w})}if(h>=d.hosts[t.hostType].length)return!y||f?(a("could not get any response"),d._promise.reject(new o.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue. Application id was: "+d.applicationID,{debugData:m}))):(a("switching to fallback"),h=0,g.method=t.fallback.method,g.url=t.fallback.url,g.jsonBody=t.fallback.body,g.jsonBody&&(g.body=l(g.jsonBody)),i=d._computeRequestHeaders({additionalUA:c,headers:t.headers}),g.timeouts=d._getTimeoutsForRequest(t.hostType),d._setHostIndexByType(0,t.hostType),f=!0,e(d._request.fallback,g));var _=d._getHostByType(t.hostType),T=_+g.url,x={body:g.body,jsonBody:g.jsonBody,method:g.method,headers:i,timeouts:g.timeouts,debug:a,forceAuthHeaders:g.forceAuthHeaders};return a("method: %s, url: %s, headers: %j, timeouts: %d",x.method,T,x.headers,x.timeouts),n===d._request.fallback&&a("using fallback"),n.call(d,T,x).then((function(e){var t=e&&e.body&&e.body.message&&e.body.status||e.statusCode||e&&e.body&&200;a("received response: statusCode: %s, computed statusCode: %d, headers: %j",e.statusCode,t,e.headers);var n=2===Math.floor(t/100),c=new Date;if(m.push({currentHost:_,headers:p(i),content:r||null,contentLength:void 0!==r?r.length:null,method:g.method,timeouts:g.timeouts,url:g.url,startTime:b,endTime:c,duration:c-b,statusCode:t}),n)return d._useCache&&!d._useRequestCache&&u&&(u[s]=e.responseText),{responseText:e.responseText,body:e.body};if(4!==Math.floor(t/100))return h+=1,R();a("unrecoverable error");var l=new o.AlgoliaSearchError(e.body&&e.body.message,{debugData:m,statusCode:t});return d._promise.reject(l)}),(function(s){a("error: %s, stack: %s",s.message,s.stack);var c=new Date;m.push({currentHost:_,headers:p(i),content:r||null,contentLength:void 0!==r?r.length:null,method:g.method,timeouts:g.timeouts,url:g.url,startTime:b,endTime:c,duration:c-b}),s instanceof o.AlgoliaSearchError||(s=new o.Unknown(s&&s.message,s));if(h+=1,s instanceof o.Unknown||s instanceof o.UnparsableJSON||h>=d.hosts[t.hostType].length&&(f||!y))return s.debugData=m,d._promise.reject(s);if(s instanceof o.RequestTimeout)return a("retrying request with higher timeout"),d._incrementHostIndex(t.hostType),d._incrementTimeoutMultipler(),g.timeouts=d._getTimeoutsForRequest(t.hostType),e(n,g);return R()}));function R(){return a("retrying request"),d._incrementHostIndex(t.hostType),e(n,g)}}(d._request,{url:t.url,method:t.method,body:r,jsonBody:t.body,timeouts:d._getTimeoutsForRequest(t.hostType),forceAuthHeaders:t.forceAuthHeaders});return d._useCache&&d._useRequestCache&&u&&(u[s]=w),g(w,(function(e){return e.body}))},c.prototype._getSearchParams=function(e,t){if(null==e)return t;for(var r in e)null!==r&&void 0!==e[r]&&e.hasOwnProperty(r)&&(t+=""===t?"":"&",t+=r+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(e[r])?l(e[r]):e[r]));return t},c.prototype._computeRequestHeaders=function(t){var r=e(5),o={"x-algolia-agent":t.additionalUA?this._ua+"; "+t.additionalUA:this._ua,"x-algolia-application-id":this.applicationID};return!1!==t.withApiKey&&(o["x-algolia-api-key"]=this.apiKey),this.userToken&&(o["x-algolia-usertoken"]=this.userToken),this.securityTags&&(o["x-algolia-tagfilters"]=this.securityTags),r(this.extraHeaders,(function(e,t){o[t]=e})),t.headers&&r(t.headers,(function(e,t){o[t]=e})),o},c.prototype.search=function(t,r,o){var n=e(8),s=e(32);if(!n(t))throw new Error("Usage: client.search(arrayOfQueries[, callback])");"function"==typeof r?(o=r,r={}):void 0===r&&(r={});var i=this,a={requests:s(t,(function(e){var t="";return void 0!==e.query&&(t+="query="+encodeURIComponent(e.query)),{indexName:e.indexName,params:i._getSearchParams(e.params,t)}}))},c=s(a.requests,(function(e,t){return t+"="+encodeURIComponent("/1/indexes/"+encodeURIComponent(e.indexName)+"?"+e.params)})).join("&");return void 0!==r.strategy&&(a.strategy=r.strategy),this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:a,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:c}},callback:o})},c.prototype.searchForFacetValues=function(t){var r=e(8),o=e(32),n="Usage: client.searchForFacetValues([{indexName, params: {facetName, facetQuery, ...params}}, ...queries])";if(!r(t))throw new Error(n);var s=this;return s._promise.all(o(t,(function(t){if(!t||void 0===t.indexName||void 0===t.params.facetName||void 0===t.params.facetQuery)throw new Error(n);var r=e(26),o=e(34),i=t.indexName,a=t.params,c=a.facetName,u=o(r(a),(function(e){return"facetName"===e})),l=s._getSearchParams(u,"");return s._jsonRequest({cache:s.cache,method:"POST",url:"/1/indexes/"+encodeURIComponent(i)+"/facets/"+encodeURIComponent(c)+"/query",hostType:"read",body:{params:l}})})))},c.prototype.setSecurityTags=function(e){if("[object Array]"===Object.prototype.toString.call(e)){for(var t=[],r=0;r<e.length;++r)if("[object Array]"===Object.prototype.toString.call(e[r])){for(var o=[],n=0;n<e[r].length;++n)o.push(e[r][n]);t.push("("+o.join(",")+")")}else t.push(e[r]);e=t.join(",")}this.securityTags=e},c.prototype.setUserToken=function(e){this.userToken=e},c.prototype.clearCache=function(){this.cache={}},c.prototype.setRequestTimeout=function(e){e&&(this._timeouts.connect=this._timeouts.read=this._timeouts.write=e)},c.prototype.setTimeouts=function(e){this._timeouts=e},c.prototype.getTimeouts=function(){return this._timeouts},c.prototype._getAppIdData=function(){var e=i.get(this.applicationID);return null!==e&&this._cacheAppIdData(e),e},c.prototype._setAppIdData=function(e){return e.lastChange=(new Date).getTime(),this._cacheAppIdData(e),i.set(this.applicationID,e)},c.prototype._checkAppIdData=function(){var e=this._getAppIdData(),t=(new Date).getTime();return null===e||t-e.lastChange>a?this._resetInitialAppIdData(e):e},c.prototype._resetInitialAppIdData=function(e){var t=e||{};return t.hostIndexes={read:0,write:0},t.timeoutMultiplier=1,t.shuffleResult=t.shuffleResult||function(e){var t,r,o=e.length;for(;0!==o;)r=Math.floor(Math.random()*o),t=e[o-=1],e[o]=e[r],e[r]=t;return e}([1,2,3]),this._setAppIdData(t)},c.prototype._cacheAppIdData=function(e){this._hostIndexes=e.hostIndexes,this._timeoutMultiplier=e.timeoutMultiplier,this._shuffleResult=e.shuffleResult},c.prototype._partialAppIdDataUpdate=function(t){var r=e(5),o=this._getAppIdData();return r(t,(function(e,t){o[t]=e})),this._setAppIdData(o)},c.prototype._getHostByType=function(e){return this.hosts[e][this._getHostIndexByType(e)]},c.prototype._getTimeoutMultiplier=function(){return this._timeoutMultiplier},c.prototype._getHostIndexByType=function(e){return this._hostIndexes[e]},c.prototype._setHostIndexByType=function(t,r){var o=e(26)(this._hostIndexes);return o[r]=t,this._partialAppIdDataUpdate({hostIndexes:o}),t},c.prototype._incrementHostIndex=function(e){return this._setHostIndexByType((this._getHostIndexByType(e)+1)%this.hosts[e].length,e)},c.prototype._incrementTimeoutMultipler=function(){var e=Math.max(this._timeoutMultiplier+1,4);return this._partialAppIdDataUpdate({timeoutMultiplier:e})},c.prototype._getTimeoutsForRequest=function(e){return{connect:this._timeouts.connect*this._timeoutMultiplier,complete:this._timeouts[e]*this._timeoutMultiplier}}}).call(this,e(12))},{1:1,12:12,20:20,26:26,30:30,31:31,32:32,34:34,36:36,5:5,8:8}],18:[function(e,t,r){var o=e(7),n=e(20),s=e(28),i=e(29),a=e(31),c=e(30),u=s((function(){}),i("forwardToSlaves","forwardToReplicas"));function l(){n.apply(this,arguments)}function p(e,t,r){return function r(o,n){var s={page:o||0,hitsPerPage:t||100},i=n||[];return e(s).then((function(e){var t=e.hits,o=e.nbHits,n=t.map((function(e){return delete e._highlightResult,e})),a=i.concat(n);return a.length<o?r(s.page+1,a):a}))}().then((function(e){if("function"!=typeof r)return e;r(e)}))}t.exports=l,o(l,n),l.prototype.addObject=function(e,t,r){return 1!==arguments.length&&"function"!=typeof t||(r=t,t=void 0),this.as._jsonRequest({method:void 0!==t?"PUT":"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+(void 0!==t?"/"+encodeURIComponent(t):""),body:e,hostType:"write",callback:r})},l.prototype.addObjects=function(t,r){if(!e(8)(t))throw new Error("Usage: index.addObjects(arrayOfObjects[, callback])");for(var o={requests:[]},n=0;n<t.length;++n){var s={action:"addObject",body:t[n]};o.requests.push(s)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:o,hostType:"write",callback:r})},l.prototype.partialUpdateObject=function(e,t,r){1!==arguments.length&&"function"!=typeof t||(r=t,t=void 0);var o="/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(e.objectID)+"/partial";return!1===t&&(o+="?createIfNotExists=false"),this.as._jsonRequest({method:"POST",url:o,body:e,hostType:"write",callback:r})},l.prototype.partialUpdateObjects=function(t,r,o){1!==arguments.length&&"function"!=typeof r||(o=r,r=!0);if(!e(8)(t))throw new Error("Usage: index.partialUpdateObjects(arrayOfObjects[, callback])");for(var n={requests:[]},s=0;s<t.length;++s){var i={action:!0===r?"partialUpdateObject":"partialUpdateObjectNoCreate",objectID:t[s].objectID,body:t[s]};n.requests.push(i)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:n,hostType:"write",callback:o})},l.prototype.saveObject=function(e,t){return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(e.objectID),body:e,hostType:"write",callback:t})},l.prototype.saveObjects=function(t,r){if(!e(8)(t))throw new Error("Usage: index.saveObjects(arrayOfObjects[, callback])");for(var o={requests:[]},n=0;n<t.length;++n){var s={action:"updateObject",objectID:t[n].objectID,body:t[n]};o.requests.push(s)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:o,hostType:"write",callback:r})},l.prototype.deleteObject=function(e,t){if("function"==typeof e||"string"!=typeof e&&"number"!=typeof e){var r=new c.AlgoliaSearchError(e&&"function"!=typeof e?"ObjectID must be a string":"Cannot delete an object without an objectID");return"function"==typeof(t=e)?t(r):this.as._promise.reject(r)}return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(e),hostType:"write",callback:t})},l.prototype.deleteObjects=function(t,r){var o=e(8),n=e(32);if(!o(t))throw new Error("Usage: index.deleteObjects(arrayOfObjectIDs[, callback])");var s={requests:n(t,(function(e){return{action:"deleteObject",objectID:e,body:{objectID:e}}}))};return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:s,hostType:"write",callback:r})},l.prototype.deleteByQuery=s((function(t,r,o){var n=e(26),s=e(32),i=this,c=i.as;1===arguments.length||"function"==typeof r?(o=r,r={}):r=n(r),r.attributesToRetrieve="objectID",r.hitsPerPage=1e3,r.distinct=!1,this.clearCache();var u=this.search(t,r).then((function(e){if(0===e.nbHits)return e;var t=s(e.hits,(function(e){return e.objectID}));return i.deleteObjects(t).then(l).then(p)}));function l(e){return i.waitTask(e.taskID)}function p(){return i.deleteByQuery(t,r)}if(!o)return u;u.then((function(){a((function(){o(null)}),c._setTimeout||setTimeout)}),(function(e){a((function(){o(e)}),c._setTimeout||setTimeout)}))}),i("index.deleteByQuery()","index.deleteBy()")),l.prototype.deleteBy=function(e,t){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/deleteByQuery",body:{params:this.as._getSearchParams(e,"")},hostType:"write",callback:t})},l.prototype.browseAll=function(t,r){"object"==typeof t&&(r=t,t=void 0);var o=e(33),n=new(e(19)),s=this.as,i=this,a=s._getSearchParams(o({},r||{},{query:t}),"");function c(e){var t;n._stopped||(t=void 0!==e?{cursor:e}:{params:a},s._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(i.indexName)+"/browse",hostType:"read",body:t,callback:u}))}function u(e,t){n._stopped||(e?n._error(e):(n._result(t),void 0!==t.cursor?c(t.cursor):n._end()))}return c(),n},l.prototype.ttAdapter=s((function(e){var t=this;return function(r,o,n){var s;s="function"==typeof n?n:o,t.search(r,e,(function(e,t){s(e||t.hits)}))}}),"ttAdapter is not necessary anymore and will be removed in the next version,\nhave a look at autocomplete.js (https://github.com/algolia/autocomplete.js)"),l.prototype.waitTask=function(e,t){var r=0,o=this,n=o.as,s=function t(){return n._jsonRequest({method:"GET",hostType:"read",url:"/1/indexes/"+encodeURIComponent(o.indexName)+"/task/"+e}).then((function(e){var o=100*++r*r;return o>5e3&&(o=5e3),"published"!==e.status?n._promise.delay(o).then(t):e}))}();if(!t)return s;s.then((function(e){a((function(){t(null,e)}),n._setTimeout||setTimeout)}),(function(e){a((function(){t(e)}),n._setTimeout||setTimeout)}))},l.prototype.clearIndex=function(e){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/clear",hostType:"write",callback:e})},l.prototype.getSettings=function(e,t){1===arguments.length&&"function"==typeof e&&(t=e,e={}),e=e||{};var r=encodeURIComponent(this.indexName);return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+r+"/settings?getVersion=2"+(e.advanced?"&advanced="+e.advanced:""),hostType:"read",callback:t})},l.prototype.searchSynonyms=function(e,t){return"function"==typeof e?(t=e,e={}):void 0===e&&(e={}),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/search",body:e,hostType:"read",callback:t})},l.prototype.exportSynonyms=function(e,t){return p(this.searchSynonyms.bind(this),e,t)},l.prototype.saveSynonym=function(e,t,r){"function"==typeof t?(r=t,t={}):void 0===t&&(t={}),void 0!==t.forwardToSlaves&&u();var o=t.forwardToSlaves||t.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(e.objectID)+"?forwardToReplicas="+o,body:e,hostType:"write",callback:r})},l.prototype.getSynonym=function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(e),hostType:"read",callback:t})},l.prototype.deleteSynonym=function(e,t,r){"function"==typeof t?(r=t,t={}):void 0===t&&(t={}),void 0!==t.forwardToSlaves&&u();var o=t.forwardToSlaves||t.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(e)+"?forwardToReplicas="+o,hostType:"write",callback:r})},l.prototype.clearSynonyms=function(e,t){"function"==typeof e?(t=e,e={}):void 0===e&&(e={}),void 0!==e.forwardToSlaves&&u();var r=e.forwardToSlaves||e.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/clear?forwardToReplicas="+r,hostType:"write",callback:t})},l.prototype.batchSynonyms=function(e,t,r){"function"==typeof t?(r=t,t={}):void 0===t&&(t={}),void 0!==t.forwardToSlaves&&u();var o=t.forwardToSlaves||t.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/batch?forwardToReplicas="+o+"&replaceExistingSynonyms="+(t.replaceExistingSynonyms?"true":"false"),hostType:"write",body:e,callback:r})},l.prototype.searchRules=function(e,t){return"function"==typeof e?(t=e,e={}):void 0===e&&(e={}),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/search",body:e,hostType:"read",callback:t})},l.prototype.exportRules=function(e,t){return p(this.searchRules.bind(this),e,t)},l.prototype.saveRule=function(e,t,r){if("function"==typeof t?(r=t,t={}):void 0===t&&(t={}),!e.objectID)throw new c.AlgoliaSearchError("Missing or empty objectID field for rule");var o=!0===t.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/"+encodeURIComponent(e.objectID)+"?forwardToReplicas="+o,body:e,hostType:"write",callback:r})},l.prototype.getRule=function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/"+encodeURIComponent(e),hostType:"read",callback:t})},l.prototype.deleteRule=function(e,t,r){"function"==typeof t?(r=t,t={}):void 0===t&&(t={});var o=!0===t.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/"+encodeURIComponent(e)+"?forwardToReplicas="+o,hostType:"write",callback:r})},l.prototype.clearRules=function(e,t){"function"==typeof e?(t=e,e={}):void 0===e&&(e={});var r=!0===e.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/clear?forwardToReplicas="+r,hostType:"write",callback:t})},l.prototype.batchRules=function(e,t,r){"function"==typeof t?(r=t,t={}):void 0===t&&(t={});var o=!0===t.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/batch?forwardToReplicas="+o+"&clearExistingRules="+(!0===t.clearExistingRules?"true":"false"),hostType:"write",body:e,callback:r})},l.prototype.exists=function(e){var t=this.getSettings().then((function(){return!0})).catch((function(e){if(e instanceof c.AlgoliaSearchError&&404===e.statusCode)return!1;throw e}));if("function"!=typeof e)return t;t.then((function(t){e(null,t)})).catch((function(t){e(t)}))},l.prototype.findObject=function(e,t,r){var o=void 0===(t=void 0===t?{}:t).paginate||t.paginate,n=void 0!==t.query?t.query:"",s=this,i=0,a=function(){return t.page=i,s.search(n,t).then((function(t){for(var r=t.hits,n=0;n<r.length;n++){var s=r[n];if(e(s))return{object:s,position:n,page:i}}if(i+=1,!o||i>=t.nbPages)throw new c.ObjectNotFound("Object not found");return a()}))},u=a(i);if(void 0===r)return u;u.then((function(e){r(null,e)})).catch((function(e){r(e)}))},l.prototype.getObjectPosition=function(e,t){for(var r=e.hits,o=0;o<r.length;o++)if(r[o].objectID===t)return o;return-1},l.prototype.setSettings=function(e,t,r){1!==arguments.length&&"function"!=typeof t||(r=t,t={}),void 0!==t.forwardToSlaves&&u();var o=t.forwardToSlaves||t.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/settings?forwardToReplicas="+o,hostType:"write",body:e,callback:r})},l.prototype.listUserKeys=s((function(e){return this.listApiKeys(e)}),i("index.listUserKeys()","client.listApiKeys()")),l.prototype.listApiKeys=s((function(e){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",hostType:"read",callback:e})}),i("index.listApiKeys()","client.listApiKeys()")),l.prototype.getUserKeyACL=s((function(e,t){return this.getApiKey(e,t)}),i("index.getUserKeyACL()","client.getApiKey()")),l.prototype.getApiKey=s((function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+e,hostType:"read",callback:t})}),i("index.getApiKey()","client.getApiKey()")),l.prototype.deleteUserKey=s((function(e,t){return this.deleteApiKey(e,t)}),i("index.deleteUserKey()","client.deleteApiKey()")),l.prototype.deleteApiKey=s((function(e,t){return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+e,hostType:"write",callback:t})}),i("index.deleteApiKey()","client.deleteApiKey()")),l.prototype.addUserKey=s((function(e,t,r){return this.addApiKey(e,t,r)}),i("index.addUserKey()","client.addApiKey()")),l.prototype.addApiKey=s((function(t,r,o){if(!e(8)(t))throw new Error("Usage: index.addApiKey(arrayOfAcls[, params, callback])");1!==arguments.length&&"function"!=typeof r||(o=r,r=null);var n={acl:t};return r&&(n.validity=r.validity,n.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,n.maxHitsPerQuery=r.maxHitsPerQuery,n.description=r.description,r.queryParameters&&(n.queryParameters=this.as._getSearchParams(r.queryParameters,"")),n.referers=r.referers),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:n,hostType:"write",callback:o})}),i("index.addApiKey()","client.addApiKey()")),l.prototype.addUserKeyWithValidity=s((function(e,t,r){return this.addApiKey(e,t,r)}),i("index.addUserKeyWithValidity()","client.addApiKey()")),l.prototype.updateUserKey=s((function(e,t,r,o){return this.updateApiKey(e,t,r,o)}),i("index.updateUserKey()","client.updateApiKey()")),l.prototype.updateApiKey=s((function(t,r,o,n){if(!e(8)(r))throw new Error("Usage: index.updateApiKey(key, arrayOfAcls[, params, callback])");2!==arguments.length&&"function"!=typeof o||(n=o,o=null);var s={acl:r};return o&&(s.validity=o.validity,s.maxQueriesPerIPPerHour=o.maxQueriesPerIPPerHour,s.maxHitsPerQuery=o.maxHitsPerQuery,s.description=o.description,o.queryParameters&&(s.queryParameters=this.as._getSearchParams(o.queryParameters,"")),s.referers=o.referers),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+t,body:s,hostType:"write",callback:n})}),i("index.updateApiKey()","client.updateApiKey()"))},{19:19,20:20,26:26,28:28,29:29,30:30,31:31,32:32,33:33,7:7,8:8}],19:[function(e,t,r){"use strict";function o(){}t.exports=o,e(7)(o,e(4).EventEmitter),o.prototype.stop=function(){this._stopped=!0,this._clean()},o.prototype._end=function(){this.emit("end"),this._clean()},o.prototype._error=function(e){this.emit("error",e),this._clean()},o.prototype._result=function(e){this.emit("result",e)},o.prototype._clean=function(){this.removeAllListeners("stop"),this.removeAllListeners("end"),this.removeAllListeners("error"),this.removeAllListeners("result")}},{4:4,7:7}],20:[function(e,t,r){var o=e(25),n=e(28),s=e(29);function i(e,t){this.indexName=t,this.as=e,this.typeAheadArgs=null,this.typeAheadValueOption=null,this.cache={}}t.exports=i,i.prototype.clearCache=function(){this.cache={}},i.prototype.search=o("query"),i.prototype.similarSearch=n(o("similarQuery"),s("index.similarSearch(query[, callback])","index.search({ similarQuery: query }[, callback])")),i.prototype.browse=function(t,r,o){var n,s,i=e(33);0===arguments.length||1===arguments.length&&"function"==typeof arguments[0]?(n=0,o=arguments[0],t=void 0):"number"==typeof arguments[0]?(n=arguments[0],"number"==typeof arguments[1]?s=arguments[1]:"function"==typeof arguments[1]&&(o=arguments[1],s=void 0),t=void 0,r=void 0):"object"==typeof arguments[0]?("function"==typeof arguments[1]&&(o=arguments[1]),r=arguments[0],t=void 0):"string"==typeof arguments[0]&&"function"==typeof arguments[1]&&(o=arguments[1],r=void 0),r=i({},r||{},{page:n,hitsPerPage:s,query:t});var a=this.as._getSearchParams(r,"");return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse",body:{params:a},hostType:"read",callback:o})},i.prototype.browseFrom=function(e,t){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse",body:{cursor:e},hostType:"read",callback:t})},i.prototype.searchForFacetValues=function(t,r){var o=e(26),n=e(34);if(void 0===t.facetName||void 0===t.facetQuery)throw new Error("Usage: index.searchForFacetValues({facetName, facetQuery, ...params}[, callback])");var s=t.facetName,i=n(o(t),(function(e){return"facetName"===e})),a=this.as._getSearchParams(i,"");return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/facets/"+encodeURIComponent(s)+"/query",hostType:"read",body:{params:a},callback:r})},i.prototype.searchFacet=n((function(e,t){return this.searchForFacetValues(e,t)}),s("index.searchFacet(params[, callback])","index.searchForFacetValues(params[, callback])")),i.prototype._search=function(e,t,r,o){return this.as._jsonRequest({cache:this.cache,method:"POST",url:t||"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:e},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:e}},callback:r,additionalUA:o})},i.prototype.getObject=function(e,t,r){1!==arguments.length&&"function"!=typeof t||(r=t,t=void 0);var o="";if(void 0!==t){o="?attributes=";for(var n=0;n<t.length;++n)0!==n&&(o+=","),o+=t[n]}return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(e)+o,hostType:"read",callback:r})},i.prototype.getObjects=function(t,r,o){var n=e(8),s=e(32);if(!n(t))throw new Error("Usage: index.getObjects(arrayOfObjectIDs[, callback])");var i=this;1!==arguments.length&&"function"!=typeof r||(o=r,r=void 0);var a={requests:s(t,(function(e){var t={indexName:i.indexName,objectID:e};return r&&(t.attributesToRetrieve=r.join(",")),t}))};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",hostType:"read",body:a,callback:o})},i.prototype.as=null,i.prototype.indexName=null,i.prototype.typeAheadArgs=null,i.prototype.typeAheadValueOption=null},{25:25,26:26,28:28,29:29,32:32,33:33,34:34,8:8}],21:[function(e,t,r){"use strict";var o=e(16),n=e(22);t.exports=n(o,"Browser")},{16:16,22:22}],22:[function(e,t,r){(function(r){"use strict";var o=e(6),n=o.Promise||e(3).Promise;t.exports=function(t,s){var i=e(7),a=e(30),c=e(23),u=e(24),l=e(35);function p(t,r,o){return(o=e(26)(o||{}))._ua=o._ua||p.ua,new h(t,r,o)}s=s||"","debug"===r.env.NODE_ENV&&e(1).enable("algoliasearch*"),p.version=e(37),p.ua="Algolia for JavaScript ("+p.version+"); "+s,p.initPlaces=l(p),o.__algolia={debug:e(1),algoliasearch:p};var d={hasXMLHttpRequest:"XMLHttpRequest"in o,hasXDomainRequest:"XDomainRequest"in o};function h(){t.apply(this,arguments)}return d.hasXMLHttpRequest&&(d.cors="withCredentials"in new XMLHttpRequest),i(h,t),h.prototype._request=function(e,t){return new n((function(r,o){if(d.cors||d.hasXDomainRequest){e=c(e,t.headers);var n,s,i=t.body,u=d.cors?new XMLHttpRequest:new XDomainRequest,l=!1;n=setTimeout(p,t.timeouts.connect),u.onprogress=function(){l||h()},"onreadystatechange"in u&&(u.onreadystatechange=function(){!l&&u.readyState>1&&h()}),u.onload=function(){if(s)return;var e;clearTimeout(n);try{e={body:JSON.parse(u.responseText),responseText:u.responseText,statusCode:u.status,headers:u.getAllResponseHeaders&&u.getAllResponseHeaders()||{}}}catch(t){e=new a.UnparsableJSON({more:u.responseText})}e instanceof a.UnparsableJSON?o(e):r(e)},u.onerror=function(e){if(s)return;clearTimeout(n),o(new a.Network({more:e}))},u instanceof XMLHttpRequest?(u.open(t.method,e,!0),t.forceAuthHeaders&&(u.setRequestHeader("x-algolia-application-id",t.headers["x-algolia-application-id"]),u.setRequestHeader("x-algolia-api-key",t.headers["x-algolia-api-key"]))):u.open(t.method,e),d.cors&&(i&&("POST"===t.method?u.setRequestHeader("content-type","application/x-www-form-urlencoded"):u.setRequestHeader("content-type","application/json")),u.setRequestHeader("accept","application/json")),i?u.send(i):u.send()}else o(new a.Network("CORS not supported"));function p(){s=!0,u.abort(),o(new a.RequestTimeout)}function h(){l=!0,clearTimeout(n),n=setTimeout(p,t.timeouts.complete)}}))},h.prototype._request.fallback=function(e,t){return e=c(e,t.headers),new n((function(r,o){u(e,t,(function(e,t){e?o(e):r(t)}))}))},h.prototype._promise={reject:function(e){return n.reject(e)},resolve:function(e){return n.resolve(e)},delay:function(e){return new n((function(t){setTimeout(t,e)}))},all:function(e){return n.all(e)}},p}}).call(this,e(12))},{1:1,12:12,23:23,24:24,26:26,3:3,30:30,35:35,37:37,6:6,7:7}],23:[function(e,t,r){"use strict";t.exports=function(e,t){/\?/.test(e)?e+="&":e+="?";return e+o(t)};var o=e(14)},{14:14}],24:[function(e,t,r){"use strict";t.exports=function(e,t,r){if("GET"!==t.method)return void r(new Error("Method "+t.method+" "+e+" is not supported by JSONP."));t.debug("JSONP: start");var s=!1,i=!1;n+=1;var a=document.getElementsByTagName("head")[0],c=document.createElement("script"),u="algoliaJSONP_"+n,l=!1;window[u]=function(e){!function(){try{delete window[u],delete window[u+"_loaded"]}catch(e){window[u]=window[u+"_loaded"]=void 0}}(),i?t.debug("JSONP: Late answer, ignoring"):(s=!0,h(),r(null,{body:e,responseText:JSON.stringify(e)}))},e+="&callback="+u,t.jsonBody&&t.jsonBody.params&&(e+="&"+t.jsonBody.params);var p=setTimeout((function(){t.debug("JSONP: Script timeout"),i=!0,h(),r(new o.RequestTimeout)}),t.timeouts.complete);function d(){t.debug("JSONP: success"),l||i||(l=!0,s||(t.debug("JSONP: Fail. Script loaded but did not call the callback"),h(),r(new o.JSONPScriptFail)))}function h(){clearTimeout(p),c.onload=null,c.onreadystatechange=null,c.onerror=null,a.removeChild(c)}c.onreadystatechange=function(){"loaded"!==this.readyState&&"complete"!==this.readyState||d()},c.onload=d,c.onerror=function(){t.debug("JSONP: Script error"),l||i||(h(),r(new o.JSONPScriptError))},c.async=!0,c.defer=!0,c.src=e,a.appendChild(c)};var o=e(30),n=0},{30:30}],25:[function(e,t,r){t.exports=function(e,t){return function(r,n,s){if("function"==typeof r&&"object"==typeof n||"object"==typeof s)throw new o.AlgoliaSearchError("index.search usage is index.search(query, params, cb)");0===arguments.length||"function"==typeof r?(s=r,r=""):1!==arguments.length&&"function"!=typeof n||(s=n,n=void 0),"object"==typeof r&&null!==r?(n=r,r=void 0):null==r&&(r="");var i,a="";return void 0!==r&&(a+=e+"="+encodeURIComponent(r)),void 0!==n&&(n.additionalUA&&(i=n.additionalUA,delete n.additionalUA),a=this.as._getSearchParams(n,a)),this._search(a,t,s,i)}};var o=e(30)},{30:30}],26:[function(e,t,r){t.exports=function(e){return JSON.parse(JSON.stringify(e))}},{}],27:[function(e,t,r){t.exports=function(e,t,r){var n={};return(r=r||{}).hosts=r.hosts||["analytics.algolia.com","analytics.algolia.com","analytics.algolia.com","analytics.algolia.com"],r.protocol=r.protocol||"https:",n.as=o(e,t,r),n.getABTests=function(e,t){var r=r||{},o=r.offset||0,n=r.limit||10;return this.as._jsonRequest({method:"GET",url:"/2/abtests?offset="+encodeURIComponent(o)+"&limit="+encodeURIComponent(n),hostType:"read",forceAuthHeaders:!0,callback:t})},n.getABTest=function(e,t){return this.as._jsonRequest({method:"GET",url:"/2/abtests/"+encodeURIComponent(e),hostType:"read",forceAuthHeaders:!0,callback:t})},n.addABTest=function(e,t){return this.as._jsonRequest({method:"POST",url:"/2/abtests",body:e,hostType:"read",forceAuthHeaders:!0,callback:t})},n.stopABTest=function(e,t){return this.as._jsonRequest({method:"POST",url:"/2/abtests/"+encodeURIComponent(e)+"/stop",hostType:"read",forceAuthHeaders:!0,callback:t})},n.deleteABTest=function(e,t){return this.as._jsonRequest({method:"DELETE",url:"/2/abtests/"+encodeURIComponent(e),hostType:"write",forceAuthHeaders:!0,callback:t})},n.waitTask=function(e,t,r){return this.as.initIndex(e).waitTask(t,r)},n};var o=e(21)},{21:21}],28:[function(e,t,r){t.exports=function(e,t){var r=!1;return function(){return r||(console.warn(t),r=!0),e.apply(this,arguments)}}},{}],29:[function(e,t,r){t.exports=function(e,t){var r=e.toLowerCase().replace(/[\.\(\)]/g,"");return"algoliasearch: `"+e+"` was replaced by `"+t+"`. Please see https://github.com/algolia/algoliasearch-client-javascript/wiki/Deprecated#"+r}},{}],30:[function(e,t,r){"use strict";var o=e(7);function n(t,r){var o=e(5),n=this;"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):n.stack=(new Error).stack||"Cannot get a stacktrace, browser is too old",this.name="AlgoliaSearchError",this.message=t||"Unknown error",r&&o(r,(function(e,t){n[t]=e}))}function s(e,t){function r(){var r=Array.prototype.slice.call(arguments,0);"string"!=typeof r[0]&&r.unshift(t),n.apply(this,r),this.name="AlgoliaSearch"+e+"Error"}return o(r,n),r}o(n,Error),t.exports={AlgoliaSearchError:n,UnparsableJSON:s("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),RequestTimeout:s("RequestTimeout","Request timed out before getting a response"),Network:s("Network","Network issue, see err.more for details"),JSONPScriptFail:s("JSONPScriptFail","<script> was loaded but did not call our provided callback"),ValidUntilNotFound:s("ValidUntilNotFound","The SecuredAPIKey does not have a validUntil parameter."),JSONPScriptError:s("JSONPScriptError","<script> unable to load due to an `error` event on it"),ObjectNotFound:s("ObjectNotFound","Object not found"),Unknown:s("Unknown","Unknown error occured")}},{5:5,7:7}],31:[function(e,t,r){t.exports=function(e,t){t(e,0)}},{}],32:[function(e,t,r){var o=e(5);t.exports=function(e,t){var r=[];return o(e,(function(o,n){r.push(t(o,n,e))})),r}},{5:5}],33:[function(e,t,r){var o=e(5);t.exports=function e(t){var r=Array.prototype.slice.call(arguments);return o(r,(function(r){for(var o in r)r.hasOwnProperty(o)&&("object"==typeof t[o]&&"object"==typeof r[o]?t[o]=e({},t[o],r[o]):void 0!==r[o]&&(t[o]=r[o]))})),t}},{5:5}],34:[function(e,t,r){t.exports=function(t,r){var o=e(10),n=e(5),s={};return n(o(t),(function(e){!0!==r(e)&&(s[e]=t[e])})),s}},{10:10,5:5}],35:[function(e,t,r){t.exports=function(t){return function(r,s,i){var a=e(26);(i=i&&a(i)||{}).hosts=i.hosts||["places-dsn.algolia.net","places-1.algolianet.com","places-2.algolianet.com","places-3.algolianet.com"],0!==arguments.length&&"object"!=typeof r&&void 0!==r||(r="",s="",i._allowEmptyCredentials=!0);var c=t(r,s,i).initIndex("places");return c.search=n("query","/1/places/query"),c.reverse=function(e,t){var r=o.encode(e);return this.as._jsonRequest({method:"GET",url:"/1/places/reverse?"+r,hostType:"read",callback:t})},c.getObject=function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/places/"+encodeURIComponent(e),hostType:"read",callback:t})},c}};var o=e(15),n=e(25)},{15:15,25:25,26:26}],36:[function(e,t,r){(function(r){var o,n=e(1)("algoliasearch:src/hostIndexState.js"),s="algoliasearch-client-js",i={state:{},set:function(e,t){return this.state[e]=t,this.state[e]},get:function(e){return this.state[e]||null}},a={set:function(e,t){i.set(e,t);try{var o=JSON.parse(r.localStorage[s]);return o[e]=t,r.localStorage[s]=JSON.stringify(o),o[e]}catch(t){return c(e,t)}},get:function(e){try{return JSON.parse(r.localStorage[s])[e]||null}catch(t){return c(e,t)}}};function c(e,t){return n("localStorage failed with",t),function(){try{r.localStorage.removeItem(s)}catch(e){}}(),(o=i).get(e)}function u(e,t){return 1===arguments.length?o.get(e):o.set(e,t)}function l(){try{return"localStorage"in r&&null!==r.localStorage&&(r.localStorage[s]||r.localStorage.setItem(s,JSON.stringify({})),!0)}catch(e){return!1}}o=l()?a:i,t.exports={get:u,set:u,supportsLocalStorage:l}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{1:1}],37:[function(e,t,r){"use strict";t.exports="3.35.1"},{}]},{},[21])(21)}));
|
10
|
+
!function(e,o){"object"==typeof r&&void 0!==t?t.exports=o():e.ES6Promise=o()}(this,(function(){"use strict";function t(e){return"function"==typeof e}var r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=0,i=void 0,a=void 0,c=function(e,t){y[s]=e,y[s+1]=t,2===(s+=2)&&(a?a(m):_())};var u="undefined"!=typeof window?window:void 0,l=u||{},p=l.MutationObserver||l.WebKitMutationObserver,d="undefined"==typeof self&&void 0!==o&&"[object process]"==={}.toString.call(o),h="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function f(){var e=setTimeout;return function(){return e(m,1)}}var y=new Array(1e3);function m(){for(var e=0;e<s;e+=2){(0,y[e])(y[e+1]),y[e]=void 0,y[e+1]=void 0}s=0}var v,g,b,w,_=void 0;function T(e,t){var r=arguments,o=this,n=new this.constructor(A);void 0===n[R]&&F(n);var s,i=o._state;return i?(s=r[i-1],c((function(){return H(i,n,s,o._result)}))):N(o,n,e,t),n}function x(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(A);return U(t,e),t}d?_=function(){return o.nextTick(m)}:p?(g=0,b=new p(m),w=document.createTextNode(""),b.observe(w,{characterData:!0}),_=function(){w.data=g=++g%2}):h?((v=new MessageChannel).port1.onmessage=m,_=function(){return v.port2.postMessage(0)}):_=void 0===u&&"function"==typeof e?function(){try{var t=e("vertx");return void 0!==(i=t.runOnLoop||t.runOnContext)?function(){i(m)}:f()}catch(e){return f()}}():f();var R=Math.random().toString(36).substring(16);function A(){}var j=void 0,S=1,I=2,k=new K;function O(e){try{return e.then}catch(e){return k.error=e,k}}function q(e,r,o){r.constructor===e.constructor&&o===T&&r.constructor.resolve===x?function(e,t){t._state===S?P(e,t._result):t._state===I?C(e,t._result):N(t,void 0,(function(t){return U(e,t)}),(function(t){return C(e,t)}))}(e,r):o===k?(C(e,k.error),k.error=null):void 0===o?P(e,r):t(o)?function(e,t,r){c((function(e){var o=!1,n=function(e,t,r,o){try{e.call(t,r,o)}catch(e){return e}}(r,t,(function(r){o||(o=!0,t!==r?U(e,r):P(e,r))}),(function(t){o||(o=!0,C(e,t))}),e._label);!o&&n&&(o=!0,C(e,n))}),e)}(e,r,o):P(e,r)}function U(e,t){var r,o;e===t?C(e,new TypeError("You cannot resolve a promise with itself")):(o=typeof(r=t),null===r||"object"!==o&&"function"!==o?P(e,t):q(e,t,O(t)))}function E(e){e._onerror&&e._onerror(e._result),D(e)}function P(e,t){e._state===j&&(e._result=t,e._state=S,0!==e._subscribers.length&&c(D,e))}function C(e,t){e._state===j&&(e._state=I,e._result=t,c(E,e))}function N(e,t,r,o){var n=e._subscribers,s=n.length;e._onerror=null,n[s]=t,n[s+S]=r,n[s+I]=o,0===s&&e._state&&c(D,e)}function D(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var o=void 0,n=void 0,s=e._result,i=0;i<t.length;i+=3)o=t[i],n=t[i+r],o?H(r,o,n,s):n(s);e._subscribers.length=0}}function K(){this.error=null}var L=new K;function H(e,r,o,n){var s=t(o),i=void 0,a=void 0,c=void 0,u=void 0;if(s){if(i=function(e,t){try{return e(t)}catch(e){return L.error=e,L}}(o,n),i===L?(u=!0,a=i.error,i.error=null):c=!0,r===i)return void C(r,new TypeError("A promises callback cannot return that same promise."))}else i=n,c=!0;r._state!==j||(s&&c?U(r,i):u?C(r,a):e===S?P(r,i):e===I&&C(r,i))}var M=0;function F(e){e[R]=M++,e._state=void 0,e._result=void 0,e._subscribers=[]}function J(e,t){this._instanceConstructor=e,this.promise=new e(A),this.promise[R]||F(this.promise),r(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?P(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&P(this.promise,this._result))):C(this.promise,new Error("Array Methods must be provided an Array"))}function B(e){this[R]=M++,this._result=this._state=void 0,this._subscribers=[],A!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof B?function(e,t){try{t((function(t){U(e,t)}),(function(t){C(e,t)}))}catch(t){C(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return J.prototype._enumerate=function(e){for(var t=0;this._state===j&&t<e.length;t++)this._eachEntry(e[t],t)},J.prototype._eachEntry=function(e,t){var r=this._instanceConstructor,o=r.resolve;if(o===x){var n=O(e);if(n===T&&e._state!==j)this._settledAt(e._state,t,e._result);else if("function"!=typeof n)this._remaining--,this._result[t]=e;else if(r===B){var s=new r(A);q(s,e,n),this._willSettleAt(s,t)}else this._willSettleAt(new r((function(t){return t(e)})),t)}else this._willSettleAt(o(e),t)},J.prototype._settledAt=function(e,t,r){var o=this.promise;o._state===j&&(this._remaining--,e===I?C(o,r):this._result[t]=r),0===this._remaining&&P(o,this._result)},J.prototype._willSettleAt=function(e,t){var r=this;N(e,void 0,(function(e){return r._settledAt(S,t,e)}),(function(e){return r._settledAt(I,t,e)}))},B.all=function(e){return new J(this,e).promise},B.race=function(e){var t=this;return r(e)?new t((function(r,o){for(var n=e.length,s=0;s<n;s++)t.resolve(e[s]).then(r,o)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},B.resolve=x,B.reject=function(e){var t=new this(A);return C(t,e),t},B._setScheduler=function(e){a=e},B._setAsap=function(e){c=e},B._asap=c,B.prototype={constructor:B,then:T,catch:function(e){return this.then(null,e)}},B.polyfill=function(){var e=void 0;if(void 0!==n)e=n;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===r&&!t.cast)return}e.Promise=B},B.Promise=B,B}))}).call(this,e(12),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{12:12}],4:[function(e,t,r){function o(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(e){return"function"==typeof e}function s(e){return"object"==typeof e&&null!==e}function i(e){return void 0===e}t.exports=o,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._maxListeners=void 0,o.defaultMaxListeners=10,o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},o.prototype.emit=function(e){var t,r,o,a,c,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(i(r=this._events[e]))return!1;if(n(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),r.apply(this,a)}else if(s(r))for(a=Array.prototype.slice.call(arguments,1),o=(u=r.slice()).length,c=0;c<o;c++)u[c].apply(this,a);return!0},o.prototype.addListener=function(e,t){var r;if(!n(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,n(t.listener)?t.listener:t),this._events[e]?s(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,s(this._events[e])&&!this._events[e].warned&&(r=i(this._maxListeners)?o.defaultMaxListeners:this._maxListeners)&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},o.prototype.on=o.prototype.addListener,o.prototype.once=function(e,t){if(!n(t))throw TypeError("listener must be a function");var r=!1;function o(){this.removeListener(e,o),r||(r=!0,t.apply(this,arguments))}return o.listener=t,this.on(e,o),this},o.prototype.removeListener=function(e,t){var r,o,i,a;if(!n(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(r=this._events[e]).length,o=-1,r===t||n(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(s(r)){for(a=i;a-- >0;)if(r[a]===t||r[a].listener&&r[a].listener===t){o=a;break}if(o<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},o.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},o.prototype.listeners=function(e){return this._events&&this._events[e]?n(this._events[e])?[this._events[e]]:this._events[e].slice():[]},o.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(n(t))return 1;if(t)return t.length}return 0},o.listenerCount=function(e,t){return e.listenerCount(t)}},{}],5:[function(e,t,r){var o=Object.prototype.hasOwnProperty,n=Object.prototype.toString;t.exports=function(e,t,r){if("[object Function]"!==n.call(t))throw new TypeError("iterator must be a function");var s=e.length;if(s===+s)for(var i=0;i<s;i++)t.call(r,e[i],i,e);else for(var a in e)o.call(e,a)&&t.call(r,e[a],a,e)}},{}],6:[function(e,t,r){(function(e){var r;r="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],7:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],8:[function(e,t,r){var o={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==o.call(e)}},{}],9:[function(e,t,r){var o=1e3,n=60*o,s=60*n,i=24*s,a=365.25*i;function c(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}t.exports=function(e,t){t=t||{};var r,u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*a;case"days":case"day":case"d":return r*i;case"hours":case"hour":case"hrs":case"hr":case"h":return r*s;case"minutes":case"minute":case"mins":case"min":case"m":return r*n;case"seconds":case"second":case"secs":case"sec":case"s":return r*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?c(r=e,i,"day")||c(r,s,"hour")||c(r,n,"minute")||c(r,o,"second")||r+" ms":function(e){if(e>=i)return Math.round(e/i)+"d";if(e>=s)return Math.round(e/s)+"h";if(e>=n)return Math.round(e/n)+"m";if(e>=o)return Math.round(e/o)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],10:[function(e,t,r){"use strict";var o=Object.prototype.hasOwnProperty,n=Object.prototype.toString,s=Array.prototype.slice,i=e(11),a=Object.prototype.propertyIsEnumerable,c=!a.call({toString:null},"toString"),u=a.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],p=function(e){var t=e.constructor;return t&&t.prototype===e},d={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},h=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!d["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{p(window[e])}catch(e){return!0}}catch(e){return!0}return!1}(),f=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===n.call(e),s=i(e),a=t&&"[object String]"===n.call(e),d=[];if(!t&&!r&&!s)throw new TypeError("Object.keys called on a non-object");var f=u&&r;if(a&&e.length>0&&!o.call(e,0))for(var y=0;y<e.length;++y)d.push(String(y));if(s&&e.length>0)for(var m=0;m<e.length;++m)d.push(String(m));else for(var v in e)f&&"prototype"===v||!o.call(e,v)||d.push(String(v));if(c)for(var g=function(e){if("undefined"==typeof window||!h)return p(e);try{return p(e)}catch(e){return!1}}(e),b=0;b<l.length;++b)g&&"constructor"===l[b]||!o.call(e,l[b])||d.push(l[b]);return d};f.shim=function(){if(Object.keys){var e=function(){return 2===(Object.keys(arguments)||"").length}(1,2);if(!e){var t=Object.keys;Object.keys=function(e){return i(e)?t(s.call(e)):t(e)}}}else Object.keys=f;return Object.keys||f},t.exports=f},{11:11}],11:[function(e,t,r){"use strict";var o=Object.prototype.toString;t.exports=function(e){var t=o.call(e),r="[object Arguments]"===t;return r||(r="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===o.call(e.callee)),r}},{}],12:[function(e,t,r){var o,n,s=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(o===setTimeout)return setTimeout(e,0);if((o===i||!o)&&setTimeout)return o=setTimeout,setTimeout(e,0);try{return o(e,0)}catch(t){try{return o.call(null,e,0)}catch(t){return o.call(this,e,0)}}}!function(){try{o="function"==typeof setTimeout?setTimeout:i}catch(e){o=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var u,l=[],p=!1,d=-1;function h(){p&&u&&(p=!1,u.length?l=u.concat(l):d=-1,l.length&&f())}function f(){if(!p){var e=c(h);p=!0;for(var t=l.length;t;){for(u=l,l=[];++d<t;)u&&u[d].run();d=-1,t=l.length}u=null,p=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function m(){}s.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new y(e,t)),1!==l.length||p||c(f)},y.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=m,s.addListener=m,s.once=m,s.off=m,s.removeListener=m,s.removeAllListeners=m,s.emit=m,s.binding=function(e){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},{}],13:[function(e,t,r){"use strict";function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,s){t=t||"&",r=r||"=";var i={};if("string"!=typeof e||0===e.length)return i;var a=/\+/g;e=e.split(t);var c=1e3;s&&"number"==typeof s.maxKeys&&(c=s.maxKeys);var u=e.length;c>0&&u>c&&(u=c);for(var l=0;l<u;++l){var p,d,h,f,y=e[l].replace(a,"%20"),m=y.indexOf(r);m>=0?(p=y.substr(0,m),d=y.substr(m+1)):(p=y,d=""),h=decodeURIComponent(p),f=decodeURIComponent(d),o(i,h)?n(i[h])?i[h].push(f):i[h]=[i[h],f]:i[h]=f}return i};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],14:[function(e,t,r){"use strict";var o=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,a){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?s(i(e),(function(i){var a=encodeURIComponent(o(i))+r;return n(e[i])?s(e[i],(function(e){return a+encodeURIComponent(o(e))})).join(t):a+encodeURIComponent(o(e[i]))})).join(t):a?encodeURIComponent(o(a))+r+encodeURIComponent(o(e)):""};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function s(e,t){if(e.map)return e.map(t);for(var r=[],o=0;o<e.length;o++)r.push(t(e[o],o));return r}var i=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],15:[function(e,t,r){"use strict";r.decode=r.parse=e(13),r.encode=r.stringify=e(14)},{13:13,14:14}],16:[function(e,t,r){t.exports=u;var o=e(18),n=e(28),s=e(29),i=e(17),a=e(7),c=e(30);function u(){i.apply(this,arguments)}function l(){throw new c.AlgoliaSearchError("Not implemented in this environment.\nIf you feel this is a mistake, write to support@algolia.com")}a(u,i),u.prototype.deleteIndex=function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(e),hostType:"write",callback:t})},u.prototype.moveIndex=function(e,t,r){var o={operation:"move",destination:t};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(e)+"/operation",body:o,hostType:"write",callback:r})},u.prototype.copyIndex=function(e,t,r,o){var n={operation:"copy",destination:t},s=o;if("function"==typeof r)s=r;else if(Array.isArray(r)&&r.length>0)n.scope=r;else if(void 0!==r)throw new Error("the scope given to `copyIndex` was not an array with settings, synonyms or rules");return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(e)+"/operation",body:n,hostType:"write",callback:s})},u.prototype.getLogs=function(t,r,o){var n=e(26),s={};return"object"==typeof t?(s=n(t),o=r):0===arguments.length||"function"==typeof t?o=t:1===arguments.length||"function"==typeof r?(o=r,s.offset=t):(s.offset=t,s.length=r),void 0===s.offset&&(s.offset=0),void 0===s.length&&(s.length=10),this._jsonRequest({method:"GET",url:"/1/logs?"+this._getSearchParams(s,""),hostType:"read",callback:o})},u.prototype.listIndexes=function(e,t){var r="";return void 0===e||"function"==typeof e?t=e:r="?page="+e,this._jsonRequest({method:"GET",url:"/1/indexes"+r,hostType:"read",callback:t})},u.prototype.initIndex=function(e){return new o(this,e)},u.prototype.initAnalytics=function(t){return e(27)(this.applicationID,this.apiKey,t)},u.prototype.listUserKeys=n((function(e){return this.listApiKeys(e)}),s("client.listUserKeys()","client.listApiKeys()")),u.prototype.listApiKeys=function(e){return this._jsonRequest({method:"GET",url:"/1/keys",hostType:"read",callback:e})},u.prototype.getUserKeyACL=n((function(e,t){return this.getApiKey(e,t)}),s("client.getUserKeyACL()","client.getApiKey()")),u.prototype.getApiKey=function(e,t){return this._jsonRequest({method:"GET",url:"/1/keys/"+e,hostType:"read",callback:t})},u.prototype.deleteUserKey=n((function(e,t){return this.deleteApiKey(e,t)}),s("client.deleteUserKey()","client.deleteApiKey()")),u.prototype.deleteApiKey=function(e,t){return this._jsonRequest({method:"DELETE",url:"/1/keys/"+e,hostType:"write",callback:t})},u.prototype.restoreApiKey=function(e,t){return this._jsonRequest({method:"POST",url:"/1/keys/"+e+"/restore",hostType:"write",callback:t})},u.prototype.addUserKey=n((function(e,t,r){return this.addApiKey(e,t,r)}),s("client.addUserKey()","client.addApiKey()")),u.prototype.addApiKey=function(t,r,o){if(!e(8)(t))throw new Error("Usage: client.addApiKey(arrayOfAcls[, params, callback])");1!==arguments.length&&"function"!=typeof r||(o=r,r=null);var n={acl:t};return r&&(n.validity=r.validity,n.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,n.maxHitsPerQuery=r.maxHitsPerQuery,n.indexes=r.indexes,n.description=r.description,r.queryParameters&&(n.queryParameters=this._getSearchParams(r.queryParameters,"")),n.referers=r.referers),this._jsonRequest({method:"POST",url:"/1/keys",body:n,hostType:"write",callback:o})},u.prototype.addUserKeyWithValidity=n((function(e,t,r){return this.addApiKey(e,t,r)}),s("client.addUserKeyWithValidity()","client.addApiKey()")),u.prototype.updateUserKey=n((function(e,t,r,o){return this.updateApiKey(e,t,r,o)}),s("client.updateUserKey()","client.updateApiKey()")),u.prototype.updateApiKey=function(t,r,o,n){if(!e(8)(r))throw new Error("Usage: client.updateApiKey(key, arrayOfAcls[, params, callback])");2!==arguments.length&&"function"!=typeof o||(n=o,o=null);var s={acl:r};return o&&(s.validity=o.validity,s.maxQueriesPerIPPerHour=o.maxQueriesPerIPPerHour,s.maxHitsPerQuery=o.maxHitsPerQuery,s.indexes=o.indexes,s.description=o.description,o.queryParameters&&(s.queryParameters=this._getSearchParams(o.queryParameters,"")),s.referers=o.referers),this._jsonRequest({method:"PUT",url:"/1/keys/"+t,body:s,hostType:"write",callback:n})},u.prototype.startQueriesBatch=n((function(){this._batch=[]}),s("client.startQueriesBatch()","client.search()")),u.prototype.addQueryInBatch=n((function(e,t,r){this._batch.push({indexName:e,query:t,params:r})}),s("client.addQueryInBatch()","client.search()")),u.prototype.sendQueriesBatch=n((function(e){return this.search(this._batch,e)}),s("client.sendQueriesBatch()","client.search()")),u.prototype.batch=function(t,r){if(!e(8)(t))throw new Error("Usage: client.batch(operations[, callback])");return this._jsonRequest({method:"POST",url:"/1/indexes/*/batch",body:{requests:t},hostType:"write",callback:r})},u.prototype.assignUserID=function(e,t){if(!e.userID||!e.cluster)throw new c.AlgoliaSearchError("You have to provide both a userID and cluster",e);return this._jsonRequest({method:"POST",url:"/1/clusters/mapping",hostType:"write",body:{cluster:e.cluster},callback:t,headers:{"x-algolia-user-id":e.userID}})},u.prototype.assignUserIDs=function(e,t){if(!e.userIDs||!e.cluster)throw new c.AlgoliaSearchError("You have to provide both an array of userIDs and cluster",e);return this._jsonRequest({method:"POST",url:"/1/clusters/mapping/batch",hostType:"write",body:{cluster:e.cluster,users:e.userIDs},callback:t})},u.prototype.getTopUserID=function(e){return this._jsonRequest({method:"GET",url:"/1/clusters/mapping/top",hostType:"read",callback:e})},u.prototype.getUserID=function(e,t){if(!e.userID)throw new c.AlgoliaSearchError("You have to provide a userID",{debugData:e});return this._jsonRequest({method:"GET",url:"/1/clusters/mapping/"+e.userID,hostType:"read",callback:t})},u.prototype.listClusters=function(e){return this._jsonRequest({method:"GET",url:"/1/clusters",hostType:"read",callback:e})},u.prototype.listUserIDs=function(e,t){return this._jsonRequest({method:"GET",url:"/1/clusters/mapping",body:e,hostType:"read",callback:t})},u.prototype.removeUserID=function(e,t){if(!e.userID)throw new c.AlgoliaSearchError("You have to provide a userID",{debugData:e});return this._jsonRequest({method:"DELETE",url:"/1/clusters/mapping",hostType:"write",callback:t,headers:{"x-algolia-user-id":e.userID}})},u.prototype.searchUserIDs=function(e,t){return this._jsonRequest({method:"POST",url:"/1/clusters/mapping/search",body:e,hostType:"read",callback:t})},u.prototype.setPersonalizationStrategy=function(e,t){return this._jsonRequest({method:"POST",url:"/1/recommendation/personalization/strategy",body:e,hostType:"write",callback:t})},u.prototype.getPersonalizationStrategy=function(e){return this._jsonRequest({method:"GET",url:"/1/recommendation/personalization/strategy",hostType:"read",callback:e})},u.prototype.destroy=l,u.prototype.enableRateLimitForward=l,u.prototype.disableRateLimitForward=l,u.prototype.useSecuredAPIKey=l,u.prototype.disableSecuredAPIKey=l,u.prototype.generateSecuredApiKey=l,u.prototype.getSecuredApiKeyRemainingValidity=l},{17:17,18:18,26:26,27:27,28:28,29:29,30:30,7:7,8:8}],17:[function(e,t,r){(function(r){t.exports=c;var o=e(30),n=e(31),s=e(20),i=e(36),a=r.env.RESET_APP_DATA_TIMER&&parseInt(r.env.RESET_APP_DATA_TIMER,10)||12e4;function c(t,r,n){var s=e(1)("algoliasearch"),i=e(26),a=e(8),c=e(32),l="Usage: algoliasearch(applicationID, apiKey, opts)";if(!0!==n._allowEmptyCredentials&&!t)throw new o.AlgoliaSearchError("Please provide an application ID. "+l);if(!0!==n._allowEmptyCredentials&&!r)throw new o.AlgoliaSearchError("Please provide an API key. "+l);this.applicationID=t,this.apiKey=r,this.hosts={read:[],write:[]},n=n||{},this._timeouts=n.timeouts||{connect:1e3,read:2e3,write:3e4},n.timeout&&(this._timeouts.connect=this._timeouts.read=this._timeouts.write=n.timeout);var p=n.protocol||"https:";if(/:$/.test(p)||(p+=":"),"http:"!==p&&"https:"!==p)throw new o.AlgoliaSearchError("protocol must be `http:` or `https:` (was `"+n.protocol+"`)");if(this._checkAppIdData(),n.hosts)a(n.hosts)?(this.hosts.read=i(n.hosts),this.hosts.write=i(n.hosts)):(this.hosts.read=i(n.hosts.read),this.hosts.write=i(n.hosts.write));else{var d=c(this._shuffleResult,(function(e){return t+"-"+e+".algolianet.com"})),h=(!1===n.dsn?"":"-dsn")+".algolia.net";this.hosts.read=[this.applicationID+h].concat(d),this.hosts.write=[this.applicationID+".algolia.net"].concat(d)}this.hosts.read=c(this.hosts.read,u(p)),this.hosts.write=c(this.hosts.write,u(p)),this.extraHeaders={},this.cache=n._cache||{},this._ua=n._ua,this._useCache=!(void 0!==n._useCache&&!n._cache)||n._useCache,this._useRequestCache=this._useCache&&n._useRequestCache,this._useFallback=void 0===n.useFallback||n.useFallback,this._setTimeout=n._setTimeout,s("init done, %j",this)}function u(e){return function(t){return e+"//"+t.toLowerCase()}}function l(e){if(void 0===Array.prototype.toJSON)return JSON.stringify(e);var t=Array.prototype.toJSON;delete Array.prototype.toJSON;var r=JSON.stringify(e);return Array.prototype.toJSON=t,r}function p(e){var t={};for(var r in e){var o;if(Object.prototype.hasOwnProperty.call(e,r))o="x-algolia-api-key"===r||"x-algolia-application-id"===r?"**hidden for security purposes**":e[r],t[r]=o}return t}c.prototype.initIndex=function(e){return new s(this,e)},c.prototype.setExtraHeader=function(e,t){this.extraHeaders[e.toLowerCase()]=t},c.prototype.getExtraHeader=function(e){return this.extraHeaders[e.toLowerCase()]},c.prototype.unsetExtraHeader=function(e){delete this.extraHeaders[e.toLowerCase()]},c.prototype.addAlgoliaAgent=function(e){var t="; "+e;-1===this._ua.indexOf(t)&&(this._ua+=t)},c.prototype._jsonRequest=function(t){this._checkAppIdData();var r,s,i,a=e(1)("algoliasearch:"+t.url),c=t.additionalUA||"",u=t.cache,d=this,h=0,f=!1,y=d._useFallback&&d._request.fallback&&t.fallback;this.apiKey.length>500&&void 0!==t.body&&(void 0!==t.body.params||void 0!==t.body.requests)?(t.body.apiKey=this.apiKey,i=this._computeRequestHeaders({additionalUA:c,withApiKey:!1,headers:t.headers})):i=this._computeRequestHeaders({additionalUA:c,headers:t.headers}),void 0!==t.body&&(r=l(t.body)),a("request start");var m=[];function v(e,t,r){return d._useCache&&e&&t&&void 0!==t[r]}function g(e,r){if(v(d._useRequestCache,u,s)&&e.catch((function(){delete u[s]})),"function"!=typeof t.callback)return e.then(r);e.then((function(e){n((function(){t.callback(null,r(e))}),d._setTimeout||setTimeout)}),(function(e){n((function(){t.callback(e)}),d._setTimeout||setTimeout)}))}if(d._useCache&&d._useRequestCache&&(s=t.url),d._useCache&&d._useRequestCache&&r&&(s+="_body_"+r),v(d._useRequestCache,u,s)){a("serving request from cache");var b=u[s];return g("function"!=typeof b.then?d._promise.resolve({responseText:b}):b,(function(e){return JSON.parse(e.responseText)}))}var w=function e(n,g){d._checkAppIdData();var b=new Date;if(d._useCache&&!d._useRequestCache&&(s=t.url),d._useCache&&!d._useRequestCache&&r&&(s+="_body_"+g.body),v(!d._useRequestCache,u,s)){a("serving response from cache");var w=u[s];return d._promise.resolve({body:JSON.parse(w),responseText:w})}if(h>=d.hosts[t.hostType].length)return!y||f?(a("could not get any response"),d._promise.reject(new o.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue. Application id was: "+d.applicationID,{debugData:m}))):(a("switching to fallback"),h=0,g.method=t.fallback.method,g.url=t.fallback.url,g.jsonBody=t.fallback.body,g.jsonBody&&(g.body=l(g.jsonBody)),i=d._computeRequestHeaders({additionalUA:c,headers:t.headers}),g.timeouts=d._getTimeoutsForRequest(t.hostType),d._setHostIndexByType(0,t.hostType),f=!0,e(d._request.fallback,g));var _=d._getHostByType(t.hostType),T=_+g.url,x={body:g.body,jsonBody:g.jsonBody,method:g.method,headers:i,timeouts:g.timeouts,debug:a,forceAuthHeaders:g.forceAuthHeaders};return a("method: %s, url: %s, headers: %j, timeouts: %d",x.method,T,x.headers,x.timeouts),n===d._request.fallback&&a("using fallback"),n.call(d,T,x).then((function(e){var t=e&&e.body&&e.body.message&&e.body.status||e.statusCode||e&&e.body&&200;a("received response: statusCode: %s, computed statusCode: %d, headers: %j",e.statusCode,t,e.headers);var n=2===Math.floor(t/100),c=new Date;if(m.push({currentHost:_,headers:p(i),content:r||null,contentLength:void 0!==r?r.length:null,method:g.method,timeouts:g.timeouts,url:g.url,startTime:b,endTime:c,duration:c-b,statusCode:t}),n)return d._useCache&&!d._useRequestCache&&u&&(u[s]=e.responseText),{responseText:e.responseText,body:e.body};if(4!==Math.floor(t/100))return h+=1,R();a("unrecoverable error");var l=new o.AlgoliaSearchError(e.body&&e.body.message,{debugData:m,statusCode:t});return d._promise.reject(l)}),(function(s){a("error: %s, stack: %s",s.message,s.stack);var c=new Date;m.push({currentHost:_,headers:p(i),content:r||null,contentLength:void 0!==r?r.length:null,method:g.method,timeouts:g.timeouts,url:g.url,startTime:b,endTime:c,duration:c-b}),s instanceof o.AlgoliaSearchError||(s=new o.Unknown(s&&s.message,s));if(h+=1,s instanceof o.Unknown||s instanceof o.UnparsableJSON||h>=d.hosts[t.hostType].length&&(f||!y))return s.debugData=m,d._promise.reject(s);if(s instanceof o.RequestTimeout)return a("retrying request with higher timeout"),d._incrementHostIndex(t.hostType),d._incrementTimeoutMultipler(),g.timeouts=d._getTimeoutsForRequest(t.hostType),e(n,g);return R()}));function R(){return a("retrying request"),d._incrementHostIndex(t.hostType),e(n,g)}}(d._request,{url:t.url,method:t.method,body:r,jsonBody:t.body,timeouts:d._getTimeoutsForRequest(t.hostType),forceAuthHeaders:t.forceAuthHeaders});return d._useCache&&d._useRequestCache&&u&&(u[s]=w),g(w,(function(e){return e.body}))},c.prototype._getSearchParams=function(e,t){if(null==e)return t;for(var r in e)null!==r&&void 0!==e[r]&&e.hasOwnProperty(r)&&(t+=""===t?"":"&",t+=r+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(e[r])?l(e[r]):e[r]));return t},c.prototype._computeRequestHeaders=function(t){var r=e(5),o={"x-algolia-agent":t.additionalUA?this._ua+"; "+t.additionalUA:this._ua,"x-algolia-application-id":this.applicationID};return!1!==t.withApiKey&&(o["x-algolia-api-key"]=this.apiKey),this.userToken&&(o["x-algolia-usertoken"]=this.userToken),this.securityTags&&(o["x-algolia-tagfilters"]=this.securityTags),r(this.extraHeaders,(function(e,t){o[t]=e})),t.headers&&r(t.headers,(function(e,t){o[t]=e})),o},c.prototype.search=function(t,r,o){var n=e(8),s=e(32);if(!n(t))throw new Error("Usage: client.search(arrayOfQueries[, callback])");"function"==typeof r?(o=r,r={}):void 0===r&&(r={});var i=this,a={requests:s(t,(function(e){var t="";return void 0!==e.query&&(t+="query="+encodeURIComponent(e.query)),{indexName:e.indexName,params:i._getSearchParams(e.params,t)}}))},c=s(a.requests,(function(e,t){return t+"="+encodeURIComponent("/1/indexes/"+encodeURIComponent(e.indexName)+"?"+e.params)})).join("&");return void 0!==r.strategy&&(a.strategy=r.strategy),this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:a,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:c}},callback:o})},c.prototype.searchForFacetValues=function(t){var r=e(8),o=e(32),n="Usage: client.searchForFacetValues([{indexName, params: {facetName, facetQuery, ...params}}, ...queries])";if(!r(t))throw new Error(n);var s=this;return s._promise.all(o(t,(function(t){if(!t||void 0===t.indexName||void 0===t.params.facetName||void 0===t.params.facetQuery)throw new Error(n);var r=e(26),o=e(34),i=t.indexName,a=t.params,c=a.facetName,u=o(r(a),(function(e){return"facetName"===e})),l=s._getSearchParams(u,"");return s._jsonRequest({cache:s.cache,method:"POST",url:"/1/indexes/"+encodeURIComponent(i)+"/facets/"+encodeURIComponent(c)+"/query",hostType:"read",body:{params:l}})})))},c.prototype.setSecurityTags=function(e){if("[object Array]"===Object.prototype.toString.call(e)){for(var t=[],r=0;r<e.length;++r)if("[object Array]"===Object.prototype.toString.call(e[r])){for(var o=[],n=0;n<e[r].length;++n)o.push(e[r][n]);t.push("("+o.join(",")+")")}else t.push(e[r]);e=t.join(",")}this.securityTags=e},c.prototype.setUserToken=function(e){this.userToken=e},c.prototype.clearCache=function(){this.cache={}},c.prototype.setRequestTimeout=function(e){e&&(this._timeouts.connect=this._timeouts.read=this._timeouts.write=e)},c.prototype.setTimeouts=function(e){this._timeouts=e},c.prototype.getTimeouts=function(){return this._timeouts},c.prototype._getAppIdData=function(){var e=i.get(this.applicationID);return null!==e&&this._cacheAppIdData(e),e},c.prototype._setAppIdData=function(e){return e.lastChange=(new Date).getTime(),this._cacheAppIdData(e),i.set(this.applicationID,e)},c.prototype._checkAppIdData=function(){var e=this._getAppIdData(),t=(new Date).getTime();return null===e||t-e.lastChange>a?this._resetInitialAppIdData(e):e},c.prototype._resetInitialAppIdData=function(e){var t=e||{};return t.hostIndexes={read:0,write:0},t.timeoutMultiplier=1,t.shuffleResult=t.shuffleResult||function(e){var t,r,o=e.length;for(;0!==o;)r=Math.floor(Math.random()*o),t=e[o-=1],e[o]=e[r],e[r]=t;return e}([1,2,3]),this._setAppIdData(t)},c.prototype._cacheAppIdData=function(e){this._hostIndexes=e.hostIndexes,this._timeoutMultiplier=e.timeoutMultiplier,this._shuffleResult=e.shuffleResult},c.prototype._partialAppIdDataUpdate=function(t){var r=e(5),o=this._getAppIdData();return r(t,(function(e,t){o[t]=e})),this._setAppIdData(o)},c.prototype._getHostByType=function(e){return this.hosts[e][this._getHostIndexByType(e)]},c.prototype._getTimeoutMultiplier=function(){return this._timeoutMultiplier},c.prototype._getHostIndexByType=function(e){return this._hostIndexes[e]},c.prototype._setHostIndexByType=function(t,r){var o=e(26)(this._hostIndexes);return o[r]=t,this._partialAppIdDataUpdate({hostIndexes:o}),t},c.prototype._incrementHostIndex=function(e){return this._setHostIndexByType((this._getHostIndexByType(e)+1)%this.hosts[e].length,e)},c.prototype._incrementTimeoutMultipler=function(){var e=Math.max(this._timeoutMultiplier+1,4);return this._partialAppIdDataUpdate({timeoutMultiplier:e})},c.prototype._getTimeoutsForRequest=function(e){return{connect:this._timeouts.connect*this._timeoutMultiplier,complete:this._timeouts[e]*this._timeoutMultiplier}}}).call(this,e(12))},{1:1,12:12,20:20,26:26,30:30,31:31,32:32,34:34,36:36,5:5,8:8}],18:[function(e,t,r){var o=e(7),n=e(20),s=e(28),i=e(29),a=e(31),c=e(30),u=s((function(){}),i("forwardToSlaves","forwardToReplicas"));function l(){n.apply(this,arguments)}function p(e,t,r){return function r(o,n){var s={page:o||0,hitsPerPage:t||100},i=n||[];return e(s).then((function(e){var t=e.hits,o=e.nbHits,n=t.map((function(e){return delete e._highlightResult,e})),a=i.concat(n);return a.length<o?r(s.page+1,a):a}))}().then((function(e){if("function"!=typeof r)return e;r(e)}))}t.exports=l,o(l,n),l.prototype.addObject=function(e,t,r){return 1!==arguments.length&&"function"!=typeof t||(r=t,t=void 0),this.as._jsonRequest({method:void 0!==t?"PUT":"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+(void 0!==t?"/"+encodeURIComponent(t):""),body:e,hostType:"write",callback:r})},l.prototype.addObjects=function(t,r){if(!e(8)(t))throw new Error("Usage: index.addObjects(arrayOfObjects[, callback])");for(var o={requests:[]},n=0;n<t.length;++n){var s={action:"addObject",body:t[n]};o.requests.push(s)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:o,hostType:"write",callback:r})},l.prototype.partialUpdateObject=function(e,t,r){1!==arguments.length&&"function"!=typeof t||(r=t,t=void 0);var o="/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(e.objectID)+"/partial";return!1===t&&(o+="?createIfNotExists=false"),this.as._jsonRequest({method:"POST",url:o,body:e,hostType:"write",callback:r})},l.prototype.partialUpdateObjects=function(t,r,o){1!==arguments.length&&"function"!=typeof r||(o=r,r=!0);if(!e(8)(t))throw new Error("Usage: index.partialUpdateObjects(arrayOfObjects[, callback])");for(var n={requests:[]},s=0;s<t.length;++s){var i={action:!0===r?"partialUpdateObject":"partialUpdateObjectNoCreate",objectID:t[s].objectID,body:t[s]};n.requests.push(i)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:n,hostType:"write",callback:o})},l.prototype.saveObject=function(e,t){return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(e.objectID),body:e,hostType:"write",callback:t})},l.prototype.saveObjects=function(t,r){if(!e(8)(t))throw new Error("Usage: index.saveObjects(arrayOfObjects[, callback])");for(var o={requests:[]},n=0;n<t.length;++n){var s={action:"updateObject",objectID:t[n].objectID,body:t[n]};o.requests.push(s)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:o,hostType:"write",callback:r})},l.prototype.deleteObject=function(e,t){if("function"==typeof e||"string"!=typeof e&&"number"!=typeof e){var r=new c.AlgoliaSearchError(e&&"function"!=typeof e?"ObjectID must be a string":"Cannot delete an object without an objectID");return"function"==typeof(t=e)?t(r):this.as._promise.reject(r)}return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(e),hostType:"write",callback:t})},l.prototype.deleteObjects=function(t,r){var o=e(8),n=e(32);if(!o(t))throw new Error("Usage: index.deleteObjects(arrayOfObjectIDs[, callback])");var s={requests:n(t,(function(e){return{action:"deleteObject",objectID:e,body:{objectID:e}}}))};return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/batch",body:s,hostType:"write",callback:r})},l.prototype.deleteByQuery=s((function(t,r,o){var n=e(26),s=e(32),i=this,c=i.as;1===arguments.length||"function"==typeof r?(o=r,r={}):r=n(r),r.attributesToRetrieve="objectID",r.hitsPerPage=1e3,r.distinct=!1,this.clearCache();var u=this.search(t,r).then((function(e){if(0===e.nbHits)return e;var t=s(e.hits,(function(e){return e.objectID}));return i.deleteObjects(t).then(l).then(p)}));function l(e){return i.waitTask(e.taskID)}function p(){return i.deleteByQuery(t,r)}if(!o)return u;u.then((function(){a((function(){o(null)}),c._setTimeout||setTimeout)}),(function(e){a((function(){o(e)}),c._setTimeout||setTimeout)}))}),i("index.deleteByQuery()","index.deleteBy()")),l.prototype.deleteBy=function(e,t){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/deleteByQuery",body:{params:this.as._getSearchParams(e,"")},hostType:"write",callback:t})},l.prototype.browseAll=function(t,r){"object"==typeof t&&(r=t,t=void 0);var o=e(33),n=new(e(19)),s=this.as,i=this,a=s._getSearchParams(o({},r||{},{query:t}),"");function c(e){var t;n._stopped||(t=void 0!==e?{cursor:e}:{params:a},s._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(i.indexName)+"/browse",hostType:"read",body:t,callback:u}))}function u(e,t){n._stopped||(e?n._error(e):(n._result(t),void 0!==t.cursor?c(t.cursor):n._end()))}return c(),n},l.prototype.ttAdapter=s((function(e){var t=this;return function(r,o,n){var s;s="function"==typeof n?n:o,t.search(r,e,(function(e,t){s(e||t.hits)}))}}),"ttAdapter is not necessary anymore and will be removed in the next version,\nhave a look at autocomplete.js (https://github.com/algolia/autocomplete.js)"),l.prototype.waitTask=function(e,t){var r=0,o=this,n=o.as,s=function t(){return n._jsonRequest({method:"GET",hostType:"read",url:"/1/indexes/"+encodeURIComponent(o.indexName)+"/task/"+e}).then((function(e){var o=100*++r*r;return o>5e3&&(o=5e3),"published"!==e.status?n._promise.delay(o).then(t):e}))}();if(!t)return s;s.then((function(e){a((function(){t(null,e)}),n._setTimeout||setTimeout)}),(function(e){a((function(){t(e)}),n._setTimeout||setTimeout)}))},l.prototype.clearIndex=function(e){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/clear",hostType:"write",callback:e})},l.prototype.getSettings=function(e,t){1===arguments.length&&"function"==typeof e&&(t=e,e={}),e=e||{};var r=encodeURIComponent(this.indexName);return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+r+"/settings?getVersion=2"+(e.advanced?"&advanced="+e.advanced:""),hostType:"read",callback:t})},l.prototype.searchSynonyms=function(e,t){return"function"==typeof e?(t=e,e={}):void 0===e&&(e={}),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/search",body:e,hostType:"read",callback:t})},l.prototype.exportSynonyms=function(e,t){return p(this.searchSynonyms.bind(this),e,t)},l.prototype.saveSynonym=function(e,t,r){"function"==typeof t?(r=t,t={}):void 0===t&&(t={}),void 0!==t.forwardToSlaves&&u();var o=t.forwardToSlaves||t.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(e.objectID)+"?forwardToReplicas="+o,body:e,hostType:"write",callback:r})},l.prototype.getSynonym=function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(e),hostType:"read",callback:t})},l.prototype.deleteSynonym=function(e,t,r){"function"==typeof t?(r=t,t={}):void 0===t&&(t={}),void 0!==t.forwardToSlaves&&u();var o=t.forwardToSlaves||t.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(e)+"?forwardToReplicas="+o,hostType:"write",callback:r})},l.prototype.clearSynonyms=function(e,t){"function"==typeof e?(t=e,e={}):void 0===e&&(e={}),void 0!==e.forwardToSlaves&&u();var r=e.forwardToSlaves||e.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/clear?forwardToReplicas="+r,hostType:"write",callback:t})},l.prototype.batchSynonyms=function(e,t,r){"function"==typeof t?(r=t,t={}):void 0===t&&(t={}),void 0!==t.forwardToSlaves&&u();var o=t.forwardToSlaves||t.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/batch?forwardToReplicas="+o+"&replaceExistingSynonyms="+(t.replaceExistingSynonyms?"true":"false"),hostType:"write",body:e,callback:r})},l.prototype.searchRules=function(e,t){return"function"==typeof e?(t=e,e={}):void 0===e&&(e={}),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/search",body:e,hostType:"read",callback:t})},l.prototype.exportRules=function(e,t){return p(this.searchRules.bind(this),e,t)},l.prototype.saveRule=function(e,t,r){if("function"==typeof t?(r=t,t={}):void 0===t&&(t={}),!e.objectID)throw new c.AlgoliaSearchError("Missing or empty objectID field for rule");var o=!0===t.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/"+encodeURIComponent(e.objectID)+"?forwardToReplicas="+o,body:e,hostType:"write",callback:r})},l.prototype.getRule=function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/"+encodeURIComponent(e),hostType:"read",callback:t})},l.prototype.deleteRule=function(e,t,r){"function"==typeof t?(r=t,t={}):void 0===t&&(t={});var o=!0===t.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/"+encodeURIComponent(e)+"?forwardToReplicas="+o,hostType:"write",callback:r})},l.prototype.clearRules=function(e,t){"function"==typeof e?(t=e,e={}):void 0===e&&(e={});var r=!0===e.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/clear?forwardToReplicas="+r,hostType:"write",callback:t})},l.prototype.batchRules=function(e,t,r){"function"==typeof t?(r=t,t={}):void 0===t&&(t={});var o=!0===t.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/rules/batch?forwardToReplicas="+o+"&clearExistingRules="+(!0===t.clearExistingRules?"true":"false"),hostType:"write",body:e,callback:r})},l.prototype.exists=function(e){var t=this.getSettings().then((function(){return!0})).catch((function(e){if(e instanceof c.AlgoliaSearchError&&404===e.statusCode)return!1;throw e}));if("function"!=typeof e)return t;t.then((function(t){e(null,t)})).catch((function(t){e(t)}))},l.prototype.findObject=function(e,t,r){var o=void 0===(t=void 0===t?{}:t).paginate||t.paginate,n=void 0!==t.query?t.query:"",s=this,i=0,a=function(){return t.page=i,s.search(n,t).then((function(t){for(var r=t.hits,n=0;n<r.length;n++){var s=r[n];if(e(s))return{object:s,position:n,page:i}}if(i+=1,!o||i>=t.nbPages)throw new c.ObjectNotFound("Object not found");return a()}))},u=a(i);if(void 0===r)return u;u.then((function(e){r(null,e)})).catch((function(e){r(e)}))},l.prototype.getObjectPosition=function(e,t){for(var r=e.hits,o=0;o<r.length;o++)if(r[o].objectID===t)return o;return-1},l.prototype.setSettings=function(e,t,r){1!==arguments.length&&"function"!=typeof t||(r=t,t={}),void 0!==t.forwardToSlaves&&u();var o=t.forwardToSlaves||t.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/settings?forwardToReplicas="+o,hostType:"write",body:e,callback:r})},l.prototype.listUserKeys=s((function(e){return this.listApiKeys(e)}),i("index.listUserKeys()","client.listApiKeys()")),l.prototype.listApiKeys=s((function(e){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",hostType:"read",callback:e})}),i("index.listApiKeys()","client.listApiKeys()")),l.prototype.getUserKeyACL=s((function(e,t){return this.getApiKey(e,t)}),i("index.getUserKeyACL()","client.getApiKey()")),l.prototype.getApiKey=s((function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+e,hostType:"read",callback:t})}),i("index.getApiKey()","client.getApiKey()")),l.prototype.deleteUserKey=s((function(e,t){return this.deleteApiKey(e,t)}),i("index.deleteUserKey()","client.deleteApiKey()")),l.prototype.deleteApiKey=s((function(e,t){return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+e,hostType:"write",callback:t})}),i("index.deleteApiKey()","client.deleteApiKey()")),l.prototype.addUserKey=s((function(e,t,r){return this.addApiKey(e,t,r)}),i("index.addUserKey()","client.addApiKey()")),l.prototype.addApiKey=s((function(t,r,o){if(!e(8)(t))throw new Error("Usage: index.addApiKey(arrayOfAcls[, params, callback])");1!==arguments.length&&"function"!=typeof r||(o=r,r=null);var n={acl:t};return r&&(n.validity=r.validity,n.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,n.maxHitsPerQuery=r.maxHitsPerQuery,n.description=r.description,r.queryParameters&&(n.queryParameters=this.as._getSearchParams(r.queryParameters,"")),n.referers=r.referers),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:n,hostType:"write",callback:o})}),i("index.addApiKey()","client.addApiKey()")),l.prototype.addUserKeyWithValidity=s((function(e,t,r){return this.addApiKey(e,t,r)}),i("index.addUserKeyWithValidity()","client.addApiKey()")),l.prototype.updateUserKey=s((function(e,t,r,o){return this.updateApiKey(e,t,r,o)}),i("index.updateUserKey()","client.updateApiKey()")),l.prototype.updateApiKey=s((function(t,r,o,n){if(!e(8)(r))throw new Error("Usage: index.updateApiKey(key, arrayOfAcls[, params, callback])");2!==arguments.length&&"function"!=typeof o||(n=o,o=null);var s={acl:r};return o&&(s.validity=o.validity,s.maxQueriesPerIPPerHour=o.maxQueriesPerIPPerHour,s.maxHitsPerQuery=o.maxHitsPerQuery,s.description=o.description,o.queryParameters&&(s.queryParameters=this.as._getSearchParams(o.queryParameters,"")),s.referers=o.referers),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+t,body:s,hostType:"write",callback:n})}),i("index.updateApiKey()","client.updateApiKey()"))},{19:19,20:20,26:26,28:28,29:29,30:30,31:31,32:32,33:33,7:7,8:8}],19:[function(e,t,r){"use strict";function o(){}t.exports=o,e(7)(o,e(4).EventEmitter),o.prototype.stop=function(){this._stopped=!0,this._clean()},o.prototype._end=function(){this.emit("end"),this._clean()},o.prototype._error=function(e){this.emit("error",e),this._clean()},o.prototype._result=function(e){this.emit("result",e)},o.prototype._clean=function(){this.removeAllListeners("stop"),this.removeAllListeners("end"),this.removeAllListeners("error"),this.removeAllListeners("result")}},{4:4,7:7}],20:[function(e,t,r){var o=e(25),n=e(28),s=e(29);function i(e,t){this.indexName=t,this.as=e,this.typeAheadArgs=null,this.typeAheadValueOption=null,this.cache={}}t.exports=i,i.prototype.clearCache=function(){this.cache={}},i.prototype.search=o("query"),i.prototype.similarSearch=n(o("similarQuery"),s("index.similarSearch(query[, callback])","index.search({ similarQuery: query }[, callback])")),i.prototype.browse=function(t,r,o){var n,s,i=e(33);0===arguments.length||1===arguments.length&&"function"==typeof arguments[0]?(n=0,o=arguments[0],t=void 0):"number"==typeof arguments[0]?(n=arguments[0],"number"==typeof arguments[1]?s=arguments[1]:"function"==typeof arguments[1]&&(o=arguments[1],s=void 0),t=void 0,r=void 0):"object"==typeof arguments[0]?("function"==typeof arguments[1]&&(o=arguments[1]),r=arguments[0],t=void 0):"string"==typeof arguments[0]&&"function"==typeof arguments[1]&&(o=arguments[1],r=void 0),r=i({},r||{},{page:n,hitsPerPage:s,query:t});var a=this.as._getSearchParams(r,"");return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse",body:{params:a},hostType:"read",callback:o})},i.prototype.browseFrom=function(e,t){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse",body:{cursor:e},hostType:"read",callback:t})},i.prototype.searchForFacetValues=function(t,r){var o=e(26),n=e(34);if(void 0===t.facetName||void 0===t.facetQuery)throw new Error("Usage: index.searchForFacetValues({facetName, facetQuery, ...params}[, callback])");var s=t.facetName,i=n(o(t),(function(e){return"facetName"===e})),a=this.as._getSearchParams(i,"");return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/facets/"+encodeURIComponent(s)+"/query",hostType:"read",body:{params:a},callback:r})},i.prototype.searchFacet=n((function(e,t){return this.searchForFacetValues(e,t)}),s("index.searchFacet(params[, callback])","index.searchForFacetValues(params[, callback])")),i.prototype._search=function(e,t,r,o){return this.as._jsonRequest({cache:this.cache,method:"POST",url:t||"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:e},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:e}},callback:r,additionalUA:o})},i.prototype.getObject=function(e,t,r){1!==arguments.length&&"function"!=typeof t||(r=t,t=void 0);var o="";if(void 0!==t){o="?attributes=";for(var n=0;n<t.length;++n)0!==n&&(o+=","),o+=t[n]}return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(e)+o,hostType:"read",callback:r})},i.prototype.getObjects=function(t,r,o){var n=e(8),s=e(32);if(!n(t))throw new Error("Usage: index.getObjects(arrayOfObjectIDs[, callback])");var i=this;1!==arguments.length&&"function"!=typeof r||(o=r,r=void 0);var a={requests:s(t,(function(e){var t={indexName:i.indexName,objectID:e};return r&&(t.attributesToRetrieve=r.join(",")),t}))};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",hostType:"read",body:a,callback:o})},i.prototype.as=null,i.prototype.indexName=null,i.prototype.typeAheadArgs=null,i.prototype.typeAheadValueOption=null},{25:25,26:26,28:28,29:29,32:32,33:33,34:34,8:8}],21:[function(e,t,r){"use strict";var o=e(16),n=e(22);t.exports=n(o,"Browser")},{16:16,22:22}],22:[function(e,t,r){(function(r){"use strict";var o=e(6),n=o.Promise||e(3).Promise;t.exports=function(t,s){var i=e(7),a=e(30),c=e(23),u=e(24),l=e(35);function p(t,r,o){return(o=e(26)(o||{}))._ua=o._ua||p.ua,new h(t,r,o)}s=s||"","debug"===r.env.NODE_ENV&&e(1).enable("algoliasearch*"),p.version=e(37),p.ua="Algolia for JavaScript ("+p.version+"); "+s,p.initPlaces=l(p),o.__algolia={debug:e(1),algoliasearch:p};var d={hasXMLHttpRequest:"XMLHttpRequest"in o,hasXDomainRequest:"XDomainRequest"in o};function h(){t.apply(this,arguments)}return d.hasXMLHttpRequest&&(d.cors="withCredentials"in new XMLHttpRequest),i(h,t),h.prototype._request=function(e,t){return new n((function(r,o){if(d.cors||d.hasXDomainRequest){e=c(e,t.headers);var n,s,i=t.body,u=d.cors?new XMLHttpRequest:new XDomainRequest,l=!1;n=setTimeout(p,t.timeouts.connect),u.onprogress=function(){l||h()},"onreadystatechange"in u&&(u.onreadystatechange=function(){!l&&u.readyState>1&&h()}),u.onload=function(){if(s)return;var e;clearTimeout(n);try{e={body:JSON.parse(u.responseText),responseText:u.responseText,statusCode:u.status,headers:u.getAllResponseHeaders&&u.getAllResponseHeaders()||{}}}catch(t){e=new a.UnparsableJSON({more:u.responseText})}e instanceof a.UnparsableJSON?o(e):r(e)},u.onerror=function(e){if(s)return;clearTimeout(n),o(new a.Network({more:e}))},u instanceof XMLHttpRequest?(u.open(t.method,e,!0),t.forceAuthHeaders&&(u.setRequestHeader("x-algolia-application-id",t.headers["x-algolia-application-id"]),u.setRequestHeader("x-algolia-api-key",t.headers["x-algolia-api-key"]))):u.open(t.method,e),d.cors&&(i&&("POST"===t.method?u.setRequestHeader("content-type","application/x-www-form-urlencoded"):u.setRequestHeader("content-type","application/json")),u.setRequestHeader("accept","application/json")),i?u.send(i):u.send()}else o(new a.Network("CORS not supported"));function p(){s=!0,u.abort(),o(new a.RequestTimeout)}function h(){l=!0,clearTimeout(n),n=setTimeout(p,t.timeouts.complete)}}))},h.prototype._request.fallback=function(e,t){return e=c(e,t.headers),new n((function(r,o){u(e,t,(function(e,t){e?o(e):r(t)}))}))},h.prototype._promise={reject:function(e){return n.reject(e)},resolve:function(e){return n.resolve(e)},delay:function(e){return new n((function(t){setTimeout(t,e)}))},all:function(e){return n.all(e)}},p}}).call(this,e(12))},{1:1,12:12,23:23,24:24,26:26,3:3,30:30,35:35,37:37,6:6,7:7}],23:[function(e,t,r){"use strict";t.exports=function(e,t){/\?/.test(e)?e+="&":e+="?";return e+o(t)};var o=e(14)},{14:14}],24:[function(e,t,r){"use strict";t.exports=function(e,t,r){if("GET"!==t.method)return void r(new Error("Method "+t.method+" "+e+" is not supported by JSONP."));t.debug("JSONP: start");var s=!1,i=!1;n+=1;var a=document.getElementsByTagName("head")[0],c=document.createElement("script"),u="algoliaJSONP_"+n,l=!1;window[u]=function(e){!function(){try{delete window[u],delete window[u+"_loaded"]}catch(e){window[u]=window[u+"_loaded"]=void 0}}(),i?t.debug("JSONP: Late answer, ignoring"):(s=!0,h(),r(null,{body:e,responseText:JSON.stringify(e)}))},e+="&callback="+u,t.jsonBody&&t.jsonBody.params&&(e+="&"+t.jsonBody.params);var p=setTimeout((function(){t.debug("JSONP: Script timeout"),i=!0,h(),r(new o.RequestTimeout)}),t.timeouts.complete);function d(){t.debug("JSONP: success"),l||i||(l=!0,s||(t.debug("JSONP: Fail. Script loaded but did not call the callback"),h(),r(new o.JSONPScriptFail)))}function h(){clearTimeout(p),c.onload=null,c.onreadystatechange=null,c.onerror=null,a.removeChild(c)}c.onreadystatechange=function(){"loaded"!==this.readyState&&"complete"!==this.readyState||d()},c.onload=d,c.onerror=function(){t.debug("JSONP: Script error"),l||i||(h(),r(new o.JSONPScriptError))},c.async=!0,c.defer=!0,c.src=e,a.appendChild(c)};var o=e(30),n=0},{30:30}],25:[function(e,t,r){t.exports=function(e,t){return function(r,n,s){if("function"==typeof r&&"object"==typeof n||"object"==typeof s)throw new o.AlgoliaSearchError("index.search usage is index.search(query, params, cb)");0===arguments.length||"function"==typeof r?(s=r,r=""):1!==arguments.length&&"function"!=typeof n||(s=n,n=void 0),"object"==typeof r&&null!==r?(n=r,r=void 0):null==r&&(r="");var i,a="";return void 0!==r&&(a+=e+"="+encodeURIComponent(r)),void 0!==n&&(n.additionalUA&&(i=n.additionalUA,delete n.additionalUA),a=this.as._getSearchParams(n,a)),this._search(a,t,s,i)}};var o=e(30)},{30:30}],26:[function(e,t,r){t.exports=function(e){return JSON.parse(JSON.stringify(e))}},{}],27:[function(e,t,r){t.exports=function(e,t,r){var n={};return(r=r||{}).hosts=r.hosts||["analytics.algolia.com","analytics.algolia.com","analytics.algolia.com","analytics.algolia.com"],r.protocol=r.protocol||"https:",n.as=o(e,t,r),n.getABTests=function(e,t){var r=r||{},o=r.offset||0,n=r.limit||10;return this.as._jsonRequest({method:"GET",url:"/2/abtests?offset="+encodeURIComponent(o)+"&limit="+encodeURIComponent(n),hostType:"read",forceAuthHeaders:!0,callback:t})},n.getABTest=function(e,t){return this.as._jsonRequest({method:"GET",url:"/2/abtests/"+encodeURIComponent(e),hostType:"read",forceAuthHeaders:!0,callback:t})},n.addABTest=function(e,t){return this.as._jsonRequest({method:"POST",url:"/2/abtests",body:e,hostType:"read",forceAuthHeaders:!0,callback:t})},n.stopABTest=function(e,t){return this.as._jsonRequest({method:"POST",url:"/2/abtests/"+encodeURIComponent(e)+"/stop",hostType:"read",forceAuthHeaders:!0,callback:t})},n.deleteABTest=function(e,t){return this.as._jsonRequest({method:"DELETE",url:"/2/abtests/"+encodeURIComponent(e),hostType:"write",forceAuthHeaders:!0,callback:t})},n.waitTask=function(e,t,r){return this.as.initIndex(e).waitTask(t,r)},n};var o=e(21)},{21:21}],28:[function(e,t,r){t.exports=function(e,t){var r=!1;return function(){return r||(console.warn(t),r=!0),e.apply(this,arguments)}}},{}],29:[function(e,t,r){t.exports=function(e,t){var r=e.toLowerCase().replace(/[\.\(\)]/g,"");return"algoliasearch: `"+e+"` was replaced by `"+t+"`. Please see https://github.com/algolia/algoliasearch-client-javascript/wiki/Deprecated#"+r}},{}],30:[function(e,t,r){"use strict";var o=e(7);function n(t,r){var o=e(5),n=this;"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):n.stack=(new Error).stack||"Cannot get a stacktrace, browser is too old",this.name="AlgoliaSearchError",this.message=t||"Unknown error",r&&o(r,(function(e,t){n[t]=e}))}function s(e,t){function r(){var r=Array.prototype.slice.call(arguments,0);"string"!=typeof r[0]&&r.unshift(t),n.apply(this,r),this.name="AlgoliaSearch"+e+"Error"}return o(r,n),r}o(n,Error),t.exports={AlgoliaSearchError:n,UnparsableJSON:s("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),RequestTimeout:s("RequestTimeout","Request timed out before getting a response"),Network:s("Network","Network issue, see err.more for details"),JSONPScriptFail:s("JSONPScriptFail","<script> was loaded but did not call our provided callback"),ValidUntilNotFound:s("ValidUntilNotFound","The SecuredAPIKey does not have a validUntil parameter."),JSONPScriptError:s("JSONPScriptError","<script> unable to load due to an `error` event on it"),ObjectNotFound:s("ObjectNotFound","Object not found"),Unknown:s("Unknown","Unknown error occured")}},{5:5,7:7}],31:[function(e,t,r){t.exports=function(e,t){t(e,0)}},{}],32:[function(e,t,r){var o=e(5);t.exports=function(e,t){var r=[];return o(e,(function(o,n){r.push(t(o,n,e))})),r}},{5:5}],33:[function(e,t,r){var o=e(5);t.exports=function e(t){var r=Array.prototype.slice.call(arguments);return o(r,(function(r){for(var o in r)r.hasOwnProperty(o)&&("object"==typeof t[o]&&"object"==typeof r[o]?t[o]=e({},t[o],r[o]):void 0!==r[o]&&(t[o]=r[o]))})),t}},{5:5}],34:[function(e,t,r){t.exports=function(t,r){var o=e(10),n=e(5),s={};return n(o(t),(function(e){!0!==r(e)&&(s[e]=t[e])})),s}},{10:10,5:5}],35:[function(e,t,r){t.exports=function(t){return function(r,s,i){var a=e(26);(i=i&&a(i)||{}).hosts=i.hosts||["places-dsn.algolia.net","places-1.algolianet.com","places-2.algolianet.com","places-3.algolianet.com"],0!==arguments.length&&"object"!=typeof r&&void 0!==r||(r="",s="",i._allowEmptyCredentials=!0);var c=t(r,s,i).initIndex("places");return c.search=n("query","/1/places/query"),c.reverse=function(e,t){var r=o.encode(e);return this.as._jsonRequest({method:"GET",url:"/1/places/reverse?"+r,hostType:"read",callback:t})},c.getObject=function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/places/"+encodeURIComponent(e),hostType:"read",callback:t})},c}};var o=e(15),n=e(25)},{15:15,25:25,26:26}],36:[function(e,t,r){(function(r){var o,n=e(1)("algoliasearch:src/hostIndexState.js"),s="algoliasearch-client-js",i={state:{},set:function(e,t){return this.state[e]=t,this.state[e]},get:function(e){return this.state[e]||null}},a={set:function(e,t){i.set(e,t);try{var o=JSON.parse(r.localStorage[s]);return o[e]=t,r.localStorage[s]=JSON.stringify(o),o[e]}catch(t){return c(e,t)}},get:function(e){try{return JSON.parse(r.localStorage[s])[e]||null}catch(t){return c(e,t)}}};function c(e,t){return n("localStorage failed with",t),function(){try{r.localStorage.removeItem(s)}catch(e){}}(),(o=i).get(e)}function u(e,t){return 1===arguments.length?o.get(e):o.set(e,t)}function l(){try{return"localStorage"in r&&null!==r.localStorage&&(r.localStorage[s]||r.localStorage.setItem(s,JSON.stringify({})),!0)}catch(e){return!1}}o=l()?a:i,t.exports={get:u,set:u,supportsLocalStorage:l}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{1:1}],37:[function(e,t,r){"use strict";t.exports="3.35.1"},{}]},{},[21])(21)}));
|
11
|
+
//# sourceMappingURL=../../maps/assets/algolia/algoliasearch.js.map
|
@@ -7,4 +7,5 @@
|
|
7
7
|
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
|
8
8
|
* @version 4.1.1
|
9
9
|
*/
|
10
|
-
!function(e,o){"object"==typeof r&&void 0!==t?t.exports=o():e.ES6Promise=o()}(this,(function(){"use strict";function t(e){return"function"==typeof e}var r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=0,a=void 0,s=void 0,c=function(e,t){y[i]=e,y[i+1]=t,2===(i+=2)&&(s?s(m):_())};var u="undefined"!=typeof window?window:void 0,l=u||{},p=l.MutationObserver||l.WebKitMutationObserver,f="undefined"==typeof self&&void 0!==o&&"[object process]"==={}.toString.call(o),d="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function h(){var e=setTimeout;return function(){return e(m,1)}}var y=new Array(1e3);function m(){for(var e=0;e<i;e+=2){(0,y[e])(y[e+1]),y[e]=void 0,y[e+1]=void 0}i=0}var g,v,b,w,_=void 0;function x(e,t){var r=arguments,o=this,n=new this.constructor(A);void 0===n[S]&&$(n);var i,a=o._state;return a?(i=r[a-1],c((function(){return J(a,n,i,o._result)}))):P(o,n,e,t),n}function T(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(A);return q(t,e),t}f?_=function(){return o.nextTick(m)}:p?(v=0,b=new p(m),w=document.createTextNode(""),b.observe(w,{characterData:!0}),_=function(){w.data=v=++v%2}):d?((g=new MessageChannel).port1.onmessage=m,_=function(){return g.port2.postMessage(0)}):_=void 0===u&&"function"==typeof e?function(){try{var t=e("vertx");return void 0!==(a=t.runOnLoop||t.runOnContext)?function(){a(m)}:h()}catch(e){return h()}}():h();var S=Math.random().toString(36).substring(16);function A(){}var j=void 0,O=1,k=2,R=new H;function C(e){try{return e.then}catch(e){return R.error=e,R}}function I(e,r,o){r.constructor===e.constructor&&o===x&&r.constructor.resolve===T?function(e,t){t._state===O?E(e,t._result):t._state===k?U(e,t._result):P(t,void 0,(function(t){return q(e,t)}),(function(t){return U(e,t)}))}(e,r):o===R?(U(e,R.error),R.error=null):void 0===o?E(e,r):t(o)?function(e,t,r){c((function(e){var o=!1,n=function(e,t,r,o){try{e.call(t,r,o)}catch(e){return e}}(r,t,(function(r){o||(o=!0,t!==r?q(e,r):E(e,r))}),(function(t){o||(o=!0,U(e,t))}),e._label);!o&&n&&(o=!0,U(e,n))}),e)}(e,r,o):E(e,r)}function q(e,t){var r,o;e===t?U(e,new TypeError("You cannot resolve a promise with itself")):(o=typeof(r=t),null===r||"object"!==o&&"function"!==o?E(e,t):I(e,t,C(t)))}function N(e){e._onerror&&e._onerror(e._result),D(e)}function E(e,t){e._state===j&&(e._result=t,e._state=O,0!==e._subscribers.length&&c(D,e))}function U(e,t){e._state===j&&(e._state=k,e._result=t,c(N,e))}function P(e,t,r,o){var n=e._subscribers,i=n.length;e._onerror=null,n[i]=t,n[i+O]=r,n[i+k]=o,0===i&&e._state&&c(D,e)}function D(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var o=void 0,n=void 0,i=e._result,a=0;a<t.length;a+=3)o=t[a],n=t[a+r],o?J(r,o,n,i):n(i);e._subscribers.length=0}}function H(){this.error=null}var F=new H;function J(e,r,o,n){var i=t(o),a=void 0,s=void 0,c=void 0,u=void 0;if(i){if(a=function(e,t){try{return e(t)}catch(e){return F.error=e,F}}(o,n),a===F?(u=!0,s=a.error,a.error=null):c=!0,r===a)return void U(r,new TypeError("A promises callback cannot return that same promise."))}else a=n,c=!0;r._state!==j||(i&&c?q(r,a):u?U(r,s):e===O?E(r,a):e===k&&U(r,a))}var M=0;function $(e){e[S]=M++,e._state=void 0,e._result=void 0,e._subscribers=[]}function L(e,t){this._instanceConstructor=e,this.promise=new e(A),this.promise[S]||$(this.promise),r(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?E(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&E(this.promise,this._result))):U(this.promise,new Error("Array Methods must be provided an Array"))}function B(e){this[S]=M++,this._result=this._state=void 0,this._subscribers=[],A!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof B?function(e,t){try{t((function(t){q(e,t)}),(function(t){U(e,t)}))}catch(t){U(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return L.prototype._enumerate=function(e){for(var t=0;this._state===j&&t<e.length;t++)this._eachEntry(e[t],t)},L.prototype._eachEntry=function(e,t){var r=this._instanceConstructor,o=r.resolve;if(o===T){var n=C(e);if(n===x&&e._state!==j)this._settledAt(e._state,t,e._result);else if("function"!=typeof n)this._remaining--,this._result[t]=e;else if(r===B){var i=new r(A);I(i,e,n),this._willSettleAt(i,t)}else this._willSettleAt(new r((function(t){return t(e)})),t)}else this._willSettleAt(o(e),t)},L.prototype._settledAt=function(e,t,r){var o=this.promise;o._state===j&&(this._remaining--,e===k?U(o,r):this._result[t]=r),0===this._remaining&&E(o,this._result)},L.prototype._willSettleAt=function(e,t){var r=this;P(e,void 0,(function(e){return r._settledAt(O,t,e)}),(function(e){return r._settledAt(k,t,e)}))},B.all=function(e){return new L(this,e).promise},B.race=function(e){var t=this;return r(e)?new t((function(r,o){for(var n=e.length,i=0;i<n;i++)t.resolve(e[i]).then(r,o)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},B.resolve=T,B.reject=function(e){var t=new this(A);return U(t,e),t},B._setScheduler=function(e){s=e},B._setAsap=function(e){c=e},B._asap=c,B.prototype={constructor:B,then:x,catch:function(e){return this.then(null,e)}},B.polyfill=function(){var e=void 0;if(void 0!==n)e=n;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===r&&!t.cast)return}e.Promise=B},B.Promise=B,B}))}).call(this,e(11),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{11:11}],4:[function(e,t,r){var o=Object.prototype.hasOwnProperty,n=Object.prototype.toString;t.exports=function(e,t,r){if("[object Function]"!==n.call(t))throw new TypeError("iterator must be a function");var i=e.length;if(i===+i)for(var a=0;a<i;a++)t.call(r,e[a],a,e);else for(var s in e)o.call(e,s)&&t.call(r,e[s],s,e)}},{}],5:[function(e,t,r){(function(e){var r;r="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],6:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],7:[function(e,t,r){var o={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==o.call(e)}},{}],8:[function(e,t,r){var o=1e3,n=60*o,i=60*n,a=24*i,s=365.25*a;function c(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}t.exports=function(e,t){t=t||{};var r,u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*s;case"days":case"day":case"d":return r*a;case"hours":case"hour":case"hrs":case"hr":case"h":return r*i;case"minutes":case"minute":case"mins":case"min":case"m":return r*n;case"seconds":case"second":case"secs":case"sec":case"s":return r*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?c(r=e,a,"day")||c(r,i,"hour")||c(r,n,"minute")||c(r,o,"second")||r+" ms":function(e){if(e>=a)return Math.round(e/a)+"d";if(e>=i)return Math.round(e/i)+"h";if(e>=n)return Math.round(e/n)+"m";if(e>=o)return Math.round(e/o)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],9:[function(e,t,r){"use strict";var o=Object.prototype.hasOwnProperty,n=Object.prototype.toString,i=Array.prototype.slice,a=e(10),s=Object.prototype.propertyIsEnumerable,c=!s.call({toString:null},"toString"),u=s.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],p=function(e){var t=e.constructor;return t&&t.prototype===e},f={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},d=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!f["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{p(window[e])}catch(e){return!0}}catch(e){return!0}return!1}(),h=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===n.call(e),i=a(e),s=t&&"[object String]"===n.call(e),f=[];if(!t&&!r&&!i)throw new TypeError("Object.keys called on a non-object");var h=u&&r;if(s&&e.length>0&&!o.call(e,0))for(var y=0;y<e.length;++y)f.push(String(y));if(i&&e.length>0)for(var m=0;m<e.length;++m)f.push(String(m));else for(var g in e)h&&"prototype"===g||!o.call(e,g)||f.push(String(g));if(c)for(var v=function(e){if("undefined"==typeof window||!d)return p(e);try{return p(e)}catch(e){return!1}}(e),b=0;b<l.length;++b)v&&"constructor"===l[b]||!o.call(e,l[b])||f.push(l[b]);return f};h.shim=function(){if(Object.keys){var e=function(){return 2===(Object.keys(arguments)||"").length}(1,2);if(!e){var t=Object.keys;Object.keys=function(e){return a(e)?t(i.call(e)):t(e)}}}else Object.keys=h;return Object.keys||h},t.exports=h},{10:10}],10:[function(e,t,r){"use strict";var o=Object.prototype.toString;t.exports=function(e){var t=o.call(e),r="[object Arguments]"===t;return r||(r="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===o.call(e.callee)),r}},{}],11:[function(e,t,r){var o,n,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function c(e){if(o===setTimeout)return setTimeout(e,0);if((o===a||!o)&&setTimeout)return o=setTimeout,setTimeout(e,0);try{return o(e,0)}catch(t){try{return o.call(null,e,0)}catch(t){return o.call(this,e,0)}}}!function(){try{o="function"==typeof setTimeout?setTimeout:a}catch(e){o=a}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var u,l=[],p=!1,f=-1;function d(){p&&u&&(p=!1,u.length?l=u.concat(l):f=-1,l.length&&h())}function h(){if(!p){var e=c(d);p=!0;for(var t=l.length;t;){for(u=l,l=[];++f<t;)u&&u[f].run();f=-1,t=l.length}u=null,p=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function m(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new y(e,t)),1!==l.length||p||c(h)},y.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],12:[function(e,t,r){"use strict";function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,i){t=t||"&",r=r||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var c=1e3;i&&"number"==typeof i.maxKeys&&(c=i.maxKeys);var u=e.length;c>0&&u>c&&(u=c);for(var l=0;l<u;++l){var p,f,d,h,y=e[l].replace(s,"%20"),m=y.indexOf(r);m>=0?(p=y.substr(0,m),f=y.substr(m+1)):(p=y,f=""),d=decodeURIComponent(p),h=decodeURIComponent(f),o(a,d)?n(a[d])?a[d].push(h):a[d]=[a[d],h]:a[d]=h}return a};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],13:[function(e,t,r){"use strict";var o=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,s){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?i(a(e),(function(a){var s=encodeURIComponent(o(a))+r;return n(e[a])?i(e[a],(function(e){return s+encodeURIComponent(o(e))})).join(t):s+encodeURIComponent(o(e[a]))})).join(t):s?encodeURIComponent(o(s))+r+encodeURIComponent(o(e)):""};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var r=[],o=0;o<e.length;o++)r.push(t(e[o],o));return r}var a=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],14:[function(e,t,r){"use strict";r.decode=r.parse=e(12),r.encode=r.stringify=e(13)},{12:12,13:13}],15:[function(e,t,r){(function(r){t.exports=c;var o=e(25),n=e(26),i=e(16),a=e(31),s=r.env.RESET_APP_DATA_TIMER&&parseInt(r.env.RESET_APP_DATA_TIMER,10)||12e4;function c(t,r,n){var i=e(1)("algoliasearch"),a=e(22),s=e(7),c=e(27),l="Usage: algoliasearch(applicationID, apiKey, opts)";if(!0!==n._allowEmptyCredentials&&!t)throw new o.AlgoliaSearchError("Please provide an application ID. "+l);if(!0!==n._allowEmptyCredentials&&!r)throw new o.AlgoliaSearchError("Please provide an API key. "+l);this.applicationID=t,this.apiKey=r,this.hosts={read:[],write:[]},n=n||{},this._timeouts=n.timeouts||{connect:1e3,read:2e3,write:3e4},n.timeout&&(this._timeouts.connect=this._timeouts.read=this._timeouts.write=n.timeout);var p=n.protocol||"https:";if(/:$/.test(p)||(p+=":"),"http:"!==p&&"https:"!==p)throw new o.AlgoliaSearchError("protocol must be `http:` or `https:` (was `"+n.protocol+"`)");if(this._checkAppIdData(),n.hosts)s(n.hosts)?(this.hosts.read=a(n.hosts),this.hosts.write=a(n.hosts)):(this.hosts.read=a(n.hosts.read),this.hosts.write=a(n.hosts.write));else{var f=c(this._shuffleResult,(function(e){return t+"-"+e+".algolianet.com"})),d=(!1===n.dsn?"":"-dsn")+".algolia.net";this.hosts.read=[this.applicationID+d].concat(f),this.hosts.write=[this.applicationID+".algolia.net"].concat(f)}this.hosts.read=c(this.hosts.read,u(p)),this.hosts.write=c(this.hosts.write,u(p)),this.extraHeaders={},this.cache=n._cache||{},this._ua=n._ua,this._useCache=!(void 0!==n._useCache&&!n._cache)||n._useCache,this._useRequestCache=this._useCache&&n._useRequestCache,this._useFallback=void 0===n.useFallback||n.useFallback,this._setTimeout=n._setTimeout,i("init done, %j",this)}function u(e){return function(t){return e+"//"+t.toLowerCase()}}function l(e){if(void 0===Array.prototype.toJSON)return JSON.stringify(e);var t=Array.prototype.toJSON;delete Array.prototype.toJSON;var r=JSON.stringify(e);return Array.prototype.toJSON=t,r}function p(e){var t={};for(var r in e){var o;if(Object.prototype.hasOwnProperty.call(e,r))o="x-algolia-api-key"===r||"x-algolia-application-id"===r?"**hidden for security purposes**":e[r],t[r]=o}return t}c.prototype.initIndex=function(e){return new i(this,e)},c.prototype.setExtraHeader=function(e,t){this.extraHeaders[e.toLowerCase()]=t},c.prototype.getExtraHeader=function(e){return this.extraHeaders[e.toLowerCase()]},c.prototype.unsetExtraHeader=function(e){delete this.extraHeaders[e.toLowerCase()]},c.prototype.addAlgoliaAgent=function(e){var t="; "+e;-1===this._ua.indexOf(t)&&(this._ua+=t)},c.prototype._jsonRequest=function(t){this._checkAppIdData();var r,i,a,s=e(1)("algoliasearch:"+t.url),c=t.additionalUA||"",u=t.cache,f=this,d=0,h=!1,y=f._useFallback&&f._request.fallback&&t.fallback;this.apiKey.length>500&&void 0!==t.body&&(void 0!==t.body.params||void 0!==t.body.requests)?(t.body.apiKey=this.apiKey,a=this._computeRequestHeaders({additionalUA:c,withApiKey:!1,headers:t.headers})):a=this._computeRequestHeaders({additionalUA:c,headers:t.headers}),void 0!==t.body&&(r=l(t.body)),s("request start");var m=[];function g(e,t,r){return f._useCache&&e&&t&&void 0!==t[r]}function v(e,r){if(g(f._useRequestCache,u,i)&&e.catch((function(){delete u[i]})),"function"!=typeof t.callback)return e.then(r);e.then((function(e){n((function(){t.callback(null,r(e))}),f._setTimeout||setTimeout)}),(function(e){n((function(){t.callback(e)}),f._setTimeout||setTimeout)}))}if(f._useCache&&f._useRequestCache&&(i=t.url),f._useCache&&f._useRequestCache&&r&&(i+="_body_"+r),g(f._useRequestCache,u,i)){s("serving request from cache");var b=u[i];return v("function"!=typeof b.then?f._promise.resolve({responseText:b}):b,(function(e){return JSON.parse(e.responseText)}))}var w=function e(n,v){f._checkAppIdData();var b=new Date;if(f._useCache&&!f._useRequestCache&&(i=t.url),f._useCache&&!f._useRequestCache&&r&&(i+="_body_"+v.body),g(!f._useRequestCache,u,i)){s("serving response from cache");var w=u[i];return f._promise.resolve({body:JSON.parse(w),responseText:w})}if(d>=f.hosts[t.hostType].length)return!y||h?(s("could not get any response"),f._promise.reject(new o.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue. Application id was: "+f.applicationID,{debugData:m}))):(s("switching to fallback"),d=0,v.method=t.fallback.method,v.url=t.fallback.url,v.jsonBody=t.fallback.body,v.jsonBody&&(v.body=l(v.jsonBody)),a=f._computeRequestHeaders({additionalUA:c,headers:t.headers}),v.timeouts=f._getTimeoutsForRequest(t.hostType),f._setHostIndexByType(0,t.hostType),h=!0,e(f._request.fallback,v));var _=f._getHostByType(t.hostType),x=_+v.url,T={body:v.body,jsonBody:v.jsonBody,method:v.method,headers:a,timeouts:v.timeouts,debug:s,forceAuthHeaders:v.forceAuthHeaders};return s("method: %s, url: %s, headers: %j, timeouts: %d",T.method,x,T.headers,T.timeouts),n===f._request.fallback&&s("using fallback"),n.call(f,x,T).then((function(e){var t=e&&e.body&&e.body.message&&e.body.status||e.statusCode||e&&e.body&&200;s("received response: statusCode: %s, computed statusCode: %d, headers: %j",e.statusCode,t,e.headers);var n=2===Math.floor(t/100),c=new Date;if(m.push({currentHost:_,headers:p(a),content:r||null,contentLength:void 0!==r?r.length:null,method:v.method,timeouts:v.timeouts,url:v.url,startTime:b,endTime:c,duration:c-b,statusCode:t}),n)return f._useCache&&!f._useRequestCache&&u&&(u[i]=e.responseText),{responseText:e.responseText,body:e.body};if(4!==Math.floor(t/100))return d+=1,S();s("unrecoverable error");var l=new o.AlgoliaSearchError(e.body&&e.body.message,{debugData:m,statusCode:t});return f._promise.reject(l)}),(function(i){s("error: %s, stack: %s",i.message,i.stack);var c=new Date;m.push({currentHost:_,headers:p(a),content:r||null,contentLength:void 0!==r?r.length:null,method:v.method,timeouts:v.timeouts,url:v.url,startTime:b,endTime:c,duration:c-b}),i instanceof o.AlgoliaSearchError||(i=new o.Unknown(i&&i.message,i));if(d+=1,i instanceof o.Unknown||i instanceof o.UnparsableJSON||d>=f.hosts[t.hostType].length&&(h||!y))return i.debugData=m,f._promise.reject(i);if(i instanceof o.RequestTimeout)return s("retrying request with higher timeout"),f._incrementHostIndex(t.hostType),f._incrementTimeoutMultipler(),v.timeouts=f._getTimeoutsForRequest(t.hostType),e(n,v);return S()}));function S(){return s("retrying request"),f._incrementHostIndex(t.hostType),e(n,v)}}(f._request,{url:t.url,method:t.method,body:r,jsonBody:t.body,timeouts:f._getTimeoutsForRequest(t.hostType),forceAuthHeaders:t.forceAuthHeaders});return f._useCache&&f._useRequestCache&&u&&(u[i]=w),v(w,(function(e){return e.body}))},c.prototype._getSearchParams=function(e,t){if(null==e)return t;for(var r in e)null!==r&&void 0!==e[r]&&e.hasOwnProperty(r)&&(t+=""===t?"":"&",t+=r+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(e[r])?l(e[r]):e[r]));return t},c.prototype._computeRequestHeaders=function(t){var r=e(4),o={"x-algolia-agent":t.additionalUA?this._ua+"; "+t.additionalUA:this._ua,"x-algolia-application-id":this.applicationID};return!1!==t.withApiKey&&(o["x-algolia-api-key"]=this.apiKey),this.userToken&&(o["x-algolia-usertoken"]=this.userToken),this.securityTags&&(o["x-algolia-tagfilters"]=this.securityTags),r(this.extraHeaders,(function(e,t){o[t]=e})),t.headers&&r(t.headers,(function(e,t){o[t]=e})),o},c.prototype.search=function(t,r,o){var n=e(7),i=e(27);if(!n(t))throw new Error("Usage: client.search(arrayOfQueries[, callback])");"function"==typeof r?(o=r,r={}):void 0===r&&(r={});var a=this,s={requests:i(t,(function(e){var t="";return void 0!==e.query&&(t+="query="+encodeURIComponent(e.query)),{indexName:e.indexName,params:a._getSearchParams(e.params,t)}}))},c=i(s.requests,(function(e,t){return t+"="+encodeURIComponent("/1/indexes/"+encodeURIComponent(e.indexName)+"?"+e.params)})).join("&");return void 0!==r.strategy&&(s.strategy=r.strategy),this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:s,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:c}},callback:o})},c.prototype.searchForFacetValues=function(t){var r=e(7),o=e(27),n="Usage: client.searchForFacetValues([{indexName, params: {facetName, facetQuery, ...params}}, ...queries])";if(!r(t))throw new Error(n);var i=this;return i._promise.all(o(t,(function(t){if(!t||void 0===t.indexName||void 0===t.params.facetName||void 0===t.params.facetQuery)throw new Error(n);var r=e(22),o=e(29),a=t.indexName,s=t.params,c=s.facetName,u=o(r(s),(function(e){return"facetName"===e})),l=i._getSearchParams(u,"");return i._jsonRequest({cache:i.cache,method:"POST",url:"/1/indexes/"+encodeURIComponent(a)+"/facets/"+encodeURIComponent(c)+"/query",hostType:"read",body:{params:l}})})))},c.prototype.setSecurityTags=function(e){if("[object Array]"===Object.prototype.toString.call(e)){for(var t=[],r=0;r<e.length;++r)if("[object Array]"===Object.prototype.toString.call(e[r])){for(var o=[],n=0;n<e[r].length;++n)o.push(e[r][n]);t.push("("+o.join(",")+")")}else t.push(e[r]);e=t.join(",")}this.securityTags=e},c.prototype.setUserToken=function(e){this.userToken=e},c.prototype.clearCache=function(){this.cache={}},c.prototype.setRequestTimeout=function(e){e&&(this._timeouts.connect=this._timeouts.read=this._timeouts.write=e)},c.prototype.setTimeouts=function(e){this._timeouts=e},c.prototype.getTimeouts=function(){return this._timeouts},c.prototype._getAppIdData=function(){var e=a.get(this.applicationID);return null!==e&&this._cacheAppIdData(e),e},c.prototype._setAppIdData=function(e){return e.lastChange=(new Date).getTime(),this._cacheAppIdData(e),a.set(this.applicationID,e)},c.prototype._checkAppIdData=function(){var e=this._getAppIdData(),t=(new Date).getTime();return null===e||t-e.lastChange>s?this._resetInitialAppIdData(e):e},c.prototype._resetInitialAppIdData=function(e){var t=e||{};return t.hostIndexes={read:0,write:0},t.timeoutMultiplier=1,t.shuffleResult=t.shuffleResult||function(e){var t,r,o=e.length;for(;0!==o;)r=Math.floor(Math.random()*o),t=e[o-=1],e[o]=e[r],e[r]=t;return e}([1,2,3]),this._setAppIdData(t)},c.prototype._cacheAppIdData=function(e){this._hostIndexes=e.hostIndexes,this._timeoutMultiplier=e.timeoutMultiplier,this._shuffleResult=e.shuffleResult},c.prototype._partialAppIdDataUpdate=function(t){var r=e(4),o=this._getAppIdData();return r(t,(function(e,t){o[t]=e})),this._setAppIdData(o)},c.prototype._getHostByType=function(e){return this.hosts[e][this._getHostIndexByType(e)]},c.prototype._getTimeoutMultiplier=function(){return this._timeoutMultiplier},c.prototype._getHostIndexByType=function(e){return this._hostIndexes[e]},c.prototype._setHostIndexByType=function(t,r){var o=e(22)(this._hostIndexes);return o[r]=t,this._partialAppIdDataUpdate({hostIndexes:o}),t},c.prototype._incrementHostIndex=function(e){return this._setHostIndexByType((this._getHostIndexByType(e)+1)%this.hosts[e].length,e)},c.prototype._incrementTimeoutMultipler=function(){var e=Math.max(this._timeoutMultiplier+1,4);return this._partialAppIdDataUpdate({timeoutMultiplier:e})},c.prototype._getTimeoutsForRequest=function(e){return{connect:this._timeouts.connect*this._timeoutMultiplier,complete:this._timeouts[e]*this._timeoutMultiplier}}}).call(this,e(11))},{1:1,11:11,16:16,22:22,25:25,26:26,27:27,29:29,31:31,4:4,7:7}],16:[function(e,t,r){var o=e(21),n=e(23),i=e(24);function a(e,t){this.indexName=t,this.as=e,this.typeAheadArgs=null,this.typeAheadValueOption=null,this.cache={}}t.exports=a,a.prototype.clearCache=function(){this.cache={}},a.prototype.search=o("query"),a.prototype.similarSearch=n(o("similarQuery"),i("index.similarSearch(query[, callback])","index.search({ similarQuery: query }[, callback])")),a.prototype.browse=function(t,r,o){var n,i,a=e(28);0===arguments.length||1===arguments.length&&"function"==typeof arguments[0]?(n=0,o=arguments[0],t=void 0):"number"==typeof arguments[0]?(n=arguments[0],"number"==typeof arguments[1]?i=arguments[1]:"function"==typeof arguments[1]&&(o=arguments[1],i=void 0),t=void 0,r=void 0):"object"==typeof arguments[0]?("function"==typeof arguments[1]&&(o=arguments[1]),r=arguments[0],t=void 0):"string"==typeof arguments[0]&&"function"==typeof arguments[1]&&(o=arguments[1],r=void 0),r=a({},r||{},{page:n,hitsPerPage:i,query:t});var s=this.as._getSearchParams(r,"");return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse",body:{params:s},hostType:"read",callback:o})},a.prototype.browseFrom=function(e,t){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse",body:{cursor:e},hostType:"read",callback:t})},a.prototype.searchForFacetValues=function(t,r){var o=e(22),n=e(29);if(void 0===t.facetName||void 0===t.facetQuery)throw new Error("Usage: index.searchForFacetValues({facetName, facetQuery, ...params}[, callback])");var i=t.facetName,a=n(o(t),(function(e){return"facetName"===e})),s=this.as._getSearchParams(a,"");return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/facets/"+encodeURIComponent(i)+"/query",hostType:"read",body:{params:s},callback:r})},a.prototype.searchFacet=n((function(e,t){return this.searchForFacetValues(e,t)}),i("index.searchFacet(params[, callback])","index.searchForFacetValues(params[, callback])")),a.prototype._search=function(e,t,r,o){return this.as._jsonRequest({cache:this.cache,method:"POST",url:t||"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:e},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:e}},callback:r,additionalUA:o})},a.prototype.getObject=function(e,t,r){1!==arguments.length&&"function"!=typeof t||(r=t,t=void 0);var o="";if(void 0!==t){o="?attributes=";for(var n=0;n<t.length;++n)0!==n&&(o+=","),o+=t[n]}return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(e)+o,hostType:"read",callback:r})},a.prototype.getObjects=function(t,r,o){var n=e(7),i=e(27);if(!n(t))throw new Error("Usage: index.getObjects(arrayOfObjectIDs[, callback])");var a=this;1!==arguments.length&&"function"!=typeof r||(o=r,r=void 0);var s={requests:i(t,(function(e){var t={indexName:a.indexName,objectID:e};return r&&(t.attributesToRetrieve=r.join(",")),t}))};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",hostType:"read",body:s,callback:o})},a.prototype.as=null,a.prototype.indexName=null,a.prototype.typeAheadArgs=null,a.prototype.typeAheadValueOption=null},{21:21,22:22,23:23,24:24,27:27,28:28,29:29,7:7}],17:[function(e,t,r){"use strict";var o=e(15),n=e(18);t.exports=n(o,"Browser (lite)")},{15:15,18:18}],18:[function(e,t,r){(function(r){"use strict";var o=e(5),n=o.Promise||e(3).Promise;t.exports=function(t,i){var a=e(6),s=e(25),c=e(19),u=e(20),l=e(30);function p(t,r,o){return(o=e(22)(o||{}))._ua=o._ua||p.ua,new d(t,r,o)}i=i||"","debug"===r.env.NODE_ENV&&e(1).enable("algoliasearch*"),p.version=e(32),p.ua="Algolia for JavaScript ("+p.version+"); "+i,p.initPlaces=l(p),o.__algolia={debug:e(1),algoliasearch:p};var f={hasXMLHttpRequest:"XMLHttpRequest"in o,hasXDomainRequest:"XDomainRequest"in o};function d(){t.apply(this,arguments)}return f.hasXMLHttpRequest&&(f.cors="withCredentials"in new XMLHttpRequest),a(d,t),d.prototype._request=function(e,t){return new n((function(r,o){if(f.cors||f.hasXDomainRequest){e=c(e,t.headers);var n,i,a=t.body,u=f.cors?new XMLHttpRequest:new XDomainRequest,l=!1;n=setTimeout(p,t.timeouts.connect),u.onprogress=function(){l||d()},"onreadystatechange"in u&&(u.onreadystatechange=function(){!l&&u.readyState>1&&d()}),u.onload=function(){if(i)return;var e;clearTimeout(n);try{e={body:JSON.parse(u.responseText),responseText:u.responseText,statusCode:u.status,headers:u.getAllResponseHeaders&&u.getAllResponseHeaders()||{}}}catch(t){e=new s.UnparsableJSON({more:u.responseText})}e instanceof s.UnparsableJSON?o(e):r(e)},u.onerror=function(e){if(i)return;clearTimeout(n),o(new s.Network({more:e}))},u instanceof XMLHttpRequest?(u.open(t.method,e,!0),t.forceAuthHeaders&&(u.setRequestHeader("x-algolia-application-id",t.headers["x-algolia-application-id"]),u.setRequestHeader("x-algolia-api-key",t.headers["x-algolia-api-key"]))):u.open(t.method,e),f.cors&&(a&&("POST"===t.method?u.setRequestHeader("content-type","application/x-www-form-urlencoded"):u.setRequestHeader("content-type","application/json")),u.setRequestHeader("accept","application/json")),a?u.send(a):u.send()}else o(new s.Network("CORS not supported"));function p(){i=!0,u.abort(),o(new s.RequestTimeout)}function d(){l=!0,clearTimeout(n),n=setTimeout(p,t.timeouts.complete)}}))},d.prototype._request.fallback=function(e,t){return e=c(e,t.headers),new n((function(r,o){u(e,t,(function(e,t){e?o(e):r(t)}))}))},d.prototype._promise={reject:function(e){return n.reject(e)},resolve:function(e){return n.resolve(e)},delay:function(e){return new n((function(t){setTimeout(t,e)}))},all:function(e){return n.all(e)}},p}}).call(this,e(11))},{1:1,11:11,19:19,20:20,22:22,25:25,3:3,30:30,32:32,5:5,6:6}],19:[function(e,t,r){"use strict";t.exports=function(e,t){/\?/.test(e)?e+="&":e+="?";return e+o(t)};var o=e(13)},{13:13}],20:[function(e,t,r){"use strict";t.exports=function(e,t,r){if("GET"!==t.method)return void r(new Error("Method "+t.method+" "+e+" is not supported by JSONP."));t.debug("JSONP: start");var i=!1,a=!1;n+=1;var s=document.getElementsByTagName("head")[0],c=document.createElement("script"),u="algoliaJSONP_"+n,l=!1;window[u]=function(e){!function(){try{delete window[u],delete window[u+"_loaded"]}catch(e){window[u]=window[u+"_loaded"]=void 0}}(),a?t.debug("JSONP: Late answer, ignoring"):(i=!0,d(),r(null,{body:e,responseText:JSON.stringify(e)}))},e+="&callback="+u,t.jsonBody&&t.jsonBody.params&&(e+="&"+t.jsonBody.params);var p=setTimeout((function(){t.debug("JSONP: Script timeout"),a=!0,d(),r(new o.RequestTimeout)}),t.timeouts.complete);function f(){t.debug("JSONP: success"),l||a||(l=!0,i||(t.debug("JSONP: Fail. Script loaded but did not call the callback"),d(),r(new o.JSONPScriptFail)))}function d(){clearTimeout(p),c.onload=null,c.onreadystatechange=null,c.onerror=null,s.removeChild(c)}c.onreadystatechange=function(){"loaded"!==this.readyState&&"complete"!==this.readyState||f()},c.onload=f,c.onerror=function(){t.debug("JSONP: Script error"),l||a||(d(),r(new o.JSONPScriptError))},c.async=!0,c.defer=!0,c.src=e,s.appendChild(c)};var o=e(25),n=0},{25:25}],21:[function(e,t,r){t.exports=function(e,t){return function(r,n,i){if("function"==typeof r&&"object"==typeof n||"object"==typeof i)throw new o.AlgoliaSearchError("index.search usage is index.search(query, params, cb)");0===arguments.length||"function"==typeof r?(i=r,r=""):1!==arguments.length&&"function"!=typeof n||(i=n,n=void 0),"object"==typeof r&&null!==r?(n=r,r=void 0):null==r&&(r="");var a,s="";return void 0!==r&&(s+=e+"="+encodeURIComponent(r)),void 0!==n&&(n.additionalUA&&(a=n.additionalUA,delete n.additionalUA),s=this.as._getSearchParams(n,s)),this._search(s,t,i,a)}};var o=e(25)},{25:25}],22:[function(e,t,r){t.exports=function(e){return JSON.parse(JSON.stringify(e))}},{}],23:[function(e,t,r){t.exports=function(e,t){var r=!1;return function(){return r||(console.warn(t),r=!0),e.apply(this,arguments)}}},{}],24:[function(e,t,r){t.exports=function(e,t){var r=e.toLowerCase().replace(/[\.\(\)]/g,"");return"algoliasearch: `"+e+"` was replaced by `"+t+"`. Please see https://github.com/algolia/algoliasearch-client-javascript/wiki/Deprecated#"+r}},{}],25:[function(e,t,r){"use strict";var o=e(6);function n(t,r){var o=e(4),n=this;"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):n.stack=(new Error).stack||"Cannot get a stacktrace, browser is too old",this.name="AlgoliaSearchError",this.message=t||"Unknown error",r&&o(r,(function(e,t){n[t]=e}))}function i(e,t){function r(){var r=Array.prototype.slice.call(arguments,0);"string"!=typeof r[0]&&r.unshift(t),n.apply(this,r),this.name="AlgoliaSearch"+e+"Error"}return o(r,n),r}o(n,Error),t.exports={AlgoliaSearchError:n,UnparsableJSON:i("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),RequestTimeout:i("RequestTimeout","Request timed out before getting a response"),Network:i("Network","Network issue, see err.more for details"),JSONPScriptFail:i("JSONPScriptFail","<script> was loaded but did not call our provided callback"),ValidUntilNotFound:i("ValidUntilNotFound","The SecuredAPIKey does not have a validUntil parameter."),JSONPScriptError:i("JSONPScriptError","<script> unable to load due to an `error` event on it"),ObjectNotFound:i("ObjectNotFound","Object not found"),Unknown:i("Unknown","Unknown error occured")}},{4:4,6:6}],26:[function(e,t,r){t.exports=function(e,t){t(e,0)}},{}],27:[function(e,t,r){var o=e(4);t.exports=function(e,t){var r=[];return o(e,(function(o,n){r.push(t(o,n,e))})),r}},{4:4}],28:[function(e,t,r){var o=e(4);t.exports=function e(t){var r=Array.prototype.slice.call(arguments);return o(r,(function(r){for(var o in r)r.hasOwnProperty(o)&&("object"==typeof t[o]&&"object"==typeof r[o]?t[o]=e({},t[o],r[o]):void 0!==r[o]&&(t[o]=r[o]))})),t}},{4:4}],29:[function(e,t,r){t.exports=function(t,r){var o=e(9),n=e(4),i={};return n(o(t),(function(e){!0!==r(e)&&(i[e]=t[e])})),i}},{4:4,9:9}],30:[function(e,t,r){t.exports=function(t){return function(r,i,a){var s=e(22);(a=a&&s(a)||{}).hosts=a.hosts||["places-dsn.algolia.net","places-1.algolianet.com","places-2.algolianet.com","places-3.algolianet.com"],0!==arguments.length&&"object"!=typeof r&&void 0!==r||(r="",i="",a._allowEmptyCredentials=!0);var c=t(r,i,a).initIndex("places");return c.search=n("query","/1/places/query"),c.reverse=function(e,t){var r=o.encode(e);return this.as._jsonRequest({method:"GET",url:"/1/places/reverse?"+r,hostType:"read",callback:t})},c.getObject=function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/places/"+encodeURIComponent(e),hostType:"read",callback:t})},c}};var o=e(14),n=e(21)},{14:14,21:21,22:22}],31:[function(e,t,r){(function(r){var o,n=e(1)("algoliasearch:src/hostIndexState.js"),i="algoliasearch-client-js",a={state:{},set:function(e,t){return this.state[e]=t,this.state[e]},get:function(e){return this.state[e]||null}},s={set:function(e,t){a.set(e,t);try{var o=JSON.parse(r.localStorage[i]);return o[e]=t,r.localStorage[i]=JSON.stringify(o),o[e]}catch(t){return c(e,t)}},get:function(e){try{return JSON.parse(r.localStorage[i])[e]||null}catch(t){return c(e,t)}}};function c(e,t){return n("localStorage failed with",t),function(){try{r.localStorage.removeItem(i)}catch(e){}}(),(o=a).get(e)}function u(e,t){return 1===arguments.length?o.get(e):o.set(e,t)}function l(){try{return"localStorage"in r&&null!==r.localStorage&&(r.localStorage[i]||r.localStorage.setItem(i,JSON.stringify({})),!0)}catch(e){return!1}}o=l()?s:a,t.exports={get:u,set:u,supportsLocalStorage:l}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{1:1}],32:[function(e,t,r){"use strict";t.exports="3.35.1"},{}]},{},[17])(17)}));
|
10
|
+
!function(e,o){"object"==typeof r&&void 0!==t?t.exports=o():e.ES6Promise=o()}(this,(function(){"use strict";function t(e){return"function"==typeof e}var r=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=0,a=void 0,s=void 0,c=function(e,t){y[i]=e,y[i+1]=t,2===(i+=2)&&(s?s(m):_())};var u="undefined"!=typeof window?window:void 0,l=u||{},p=l.MutationObserver||l.WebKitMutationObserver,f="undefined"==typeof self&&void 0!==o&&"[object process]"==={}.toString.call(o),d="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function h(){var e=setTimeout;return function(){return e(m,1)}}var y=new Array(1e3);function m(){for(var e=0;e<i;e+=2){(0,y[e])(y[e+1]),y[e]=void 0,y[e+1]=void 0}i=0}var g,v,b,w,_=void 0;function x(e,t){var r=arguments,o=this,n=new this.constructor(A);void 0===n[S]&&$(n);var i,a=o._state;return a?(i=r[a-1],c((function(){return J(a,n,i,o._result)}))):P(o,n,e,t),n}function T(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(A);return q(t,e),t}f?_=function(){return o.nextTick(m)}:p?(v=0,b=new p(m),w=document.createTextNode(""),b.observe(w,{characterData:!0}),_=function(){w.data=v=++v%2}):d?((g=new MessageChannel).port1.onmessage=m,_=function(){return g.port2.postMessage(0)}):_=void 0===u&&"function"==typeof e?function(){try{var t=e("vertx");return void 0!==(a=t.runOnLoop||t.runOnContext)?function(){a(m)}:h()}catch(e){return h()}}():h();var S=Math.random().toString(36).substring(16);function A(){}var j=void 0,O=1,k=2,R=new H;function C(e){try{return e.then}catch(e){return R.error=e,R}}function I(e,r,o){r.constructor===e.constructor&&o===x&&r.constructor.resolve===T?function(e,t){t._state===O?E(e,t._result):t._state===k?U(e,t._result):P(t,void 0,(function(t){return q(e,t)}),(function(t){return U(e,t)}))}(e,r):o===R?(U(e,R.error),R.error=null):void 0===o?E(e,r):t(o)?function(e,t,r){c((function(e){var o=!1,n=function(e,t,r,o){try{e.call(t,r,o)}catch(e){return e}}(r,t,(function(r){o||(o=!0,t!==r?q(e,r):E(e,r))}),(function(t){o||(o=!0,U(e,t))}),e._label);!o&&n&&(o=!0,U(e,n))}),e)}(e,r,o):E(e,r)}function q(e,t){var r,o;e===t?U(e,new TypeError("You cannot resolve a promise with itself")):(o=typeof(r=t),null===r||"object"!==o&&"function"!==o?E(e,t):I(e,t,C(t)))}function N(e){e._onerror&&e._onerror(e._result),D(e)}function E(e,t){e._state===j&&(e._result=t,e._state=O,0!==e._subscribers.length&&c(D,e))}function U(e,t){e._state===j&&(e._state=k,e._result=t,c(N,e))}function P(e,t,r,o){var n=e._subscribers,i=n.length;e._onerror=null,n[i]=t,n[i+O]=r,n[i+k]=o,0===i&&e._state&&c(D,e)}function D(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var o=void 0,n=void 0,i=e._result,a=0;a<t.length;a+=3)o=t[a],n=t[a+r],o?J(r,o,n,i):n(i);e._subscribers.length=0}}function H(){this.error=null}var F=new H;function J(e,r,o,n){var i=t(o),a=void 0,s=void 0,c=void 0,u=void 0;if(i){if(a=function(e,t){try{return e(t)}catch(e){return F.error=e,F}}(o,n),a===F?(u=!0,s=a.error,a.error=null):c=!0,r===a)return void U(r,new TypeError("A promises callback cannot return that same promise."))}else a=n,c=!0;r._state!==j||(i&&c?q(r,a):u?U(r,s):e===O?E(r,a):e===k&&U(r,a))}var M=0;function $(e){e[S]=M++,e._state=void 0,e._result=void 0,e._subscribers=[]}function L(e,t){this._instanceConstructor=e,this.promise=new e(A),this.promise[S]||$(this.promise),r(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?E(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&E(this.promise,this._result))):U(this.promise,new Error("Array Methods must be provided an Array"))}function B(e){this[S]=M++,this._result=this._state=void 0,this._subscribers=[],A!==e&&("function"!=typeof e&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof B?function(e,t){try{t((function(t){q(e,t)}),(function(t){U(e,t)}))}catch(t){U(e,t)}}(this,e):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return L.prototype._enumerate=function(e){for(var t=0;this._state===j&&t<e.length;t++)this._eachEntry(e[t],t)},L.prototype._eachEntry=function(e,t){var r=this._instanceConstructor,o=r.resolve;if(o===T){var n=C(e);if(n===x&&e._state!==j)this._settledAt(e._state,t,e._result);else if("function"!=typeof n)this._remaining--,this._result[t]=e;else if(r===B){var i=new r(A);I(i,e,n),this._willSettleAt(i,t)}else this._willSettleAt(new r((function(t){return t(e)})),t)}else this._willSettleAt(o(e),t)},L.prototype._settledAt=function(e,t,r){var o=this.promise;o._state===j&&(this._remaining--,e===k?U(o,r):this._result[t]=r),0===this._remaining&&E(o,this._result)},L.prototype._willSettleAt=function(e,t){var r=this;P(e,void 0,(function(e){return r._settledAt(O,t,e)}),(function(e){return r._settledAt(k,t,e)}))},B.all=function(e){return new L(this,e).promise},B.race=function(e){var t=this;return r(e)?new t((function(r,o){for(var n=e.length,i=0;i<n;i++)t.resolve(e[i]).then(r,o)})):new t((function(e,t){return t(new TypeError("You must pass an array to race."))}))},B.resolve=T,B.reject=function(e){var t=new this(A);return U(t,e),t},B._setScheduler=function(e){s=e},B._setAsap=function(e){c=e},B._asap=c,B.prototype={constructor:B,then:x,catch:function(e){return this.then(null,e)}},B.polyfill=function(){var e=void 0;if(void 0!==n)e=n;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var r=null;try{r=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===r&&!t.cast)return}e.Promise=B},B.Promise=B,B}))}).call(this,e(11),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{11:11}],4:[function(e,t,r){var o=Object.prototype.hasOwnProperty,n=Object.prototype.toString;t.exports=function(e,t,r){if("[object Function]"!==n.call(t))throw new TypeError("iterator must be a function");var i=e.length;if(i===+i)for(var a=0;a<i;a++)t.call(r,e[a],a,e);else for(var s in e)o.call(e,s)&&t.call(r,e[s],s,e)}},{}],5:[function(e,t,r){(function(e){var r;r="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],6:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],7:[function(e,t,r){var o={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==o.call(e)}},{}],8:[function(e,t,r){var o=1e3,n=60*o,i=60*n,a=24*i,s=365.25*a;function c(e,t,r){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}t.exports=function(e,t){t=t||{};var r,u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var r=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*s;case"days":case"day":case"d":return r*a;case"hours":case"hour":case"hrs":case"hr":case"h":return r*i;case"minutes":case"minute":case"mins":case"min":case"m":return r*n;case"seconds":case"second":case"secs":case"sec":case"s":return r*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}(e);if("number"===u&&!1===isNaN(e))return t.long?c(r=e,a,"day")||c(r,i,"hour")||c(r,n,"minute")||c(r,o,"second")||r+" ms":function(e){if(e>=a)return Math.round(e/a)+"d";if(e>=i)return Math.round(e/i)+"h";if(e>=n)return Math.round(e/n)+"m";if(e>=o)return Math.round(e/o)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],9:[function(e,t,r){"use strict";var o=Object.prototype.hasOwnProperty,n=Object.prototype.toString,i=Array.prototype.slice,a=e(10),s=Object.prototype.propertyIsEnumerable,c=!s.call({toString:null},"toString"),u=s.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],p=function(e){var t=e.constructor;return t&&t.prototype===e},f={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},d=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!f["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{p(window[e])}catch(e){return!0}}catch(e){return!0}return!1}(),h=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===n.call(e),i=a(e),s=t&&"[object String]"===n.call(e),f=[];if(!t&&!r&&!i)throw new TypeError("Object.keys called on a non-object");var h=u&&r;if(s&&e.length>0&&!o.call(e,0))for(var y=0;y<e.length;++y)f.push(String(y));if(i&&e.length>0)for(var m=0;m<e.length;++m)f.push(String(m));else for(var g in e)h&&"prototype"===g||!o.call(e,g)||f.push(String(g));if(c)for(var v=function(e){if("undefined"==typeof window||!d)return p(e);try{return p(e)}catch(e){return!1}}(e),b=0;b<l.length;++b)v&&"constructor"===l[b]||!o.call(e,l[b])||f.push(l[b]);return f};h.shim=function(){if(Object.keys){var e=function(){return 2===(Object.keys(arguments)||"").length}(1,2);if(!e){var t=Object.keys;Object.keys=function(e){return a(e)?t(i.call(e)):t(e)}}}else Object.keys=h;return Object.keys||h},t.exports=h},{10:10}],10:[function(e,t,r){"use strict";var o=Object.prototype.toString;t.exports=function(e){var t=o.call(e),r="[object Arguments]"===t;return r||(r="[object Array]"!==t&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===o.call(e.callee)),r}},{}],11:[function(e,t,r){var o,n,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function c(e){if(o===setTimeout)return setTimeout(e,0);if((o===a||!o)&&setTimeout)return o=setTimeout,setTimeout(e,0);try{return o(e,0)}catch(t){try{return o.call(null,e,0)}catch(t){return o.call(this,e,0)}}}!function(){try{o="function"==typeof setTimeout?setTimeout:a}catch(e){o=a}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(e){n=s}}();var u,l=[],p=!1,f=-1;function d(){p&&u&&(p=!1,u.length?l=u.concat(l):f=-1,l.length&&h())}function h(){if(!p){var e=c(d);p=!0;for(var t=l.length;t;){for(u=l,l=[];++f<t;)u&&u[f].run();f=-1,t=l.length}u=null,p=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{return n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function m(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new y(e,t)),1!==l.length||p||c(h)},y.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],12:[function(e,t,r){"use strict";function o(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,r,i){t=t||"&",r=r||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var c=1e3;i&&"number"==typeof i.maxKeys&&(c=i.maxKeys);var u=e.length;c>0&&u>c&&(u=c);for(var l=0;l<u;++l){var p,f,d,h,y=e[l].replace(s,"%20"),m=y.indexOf(r);m>=0?(p=y.substr(0,m),f=y.substr(m+1)):(p=y,f=""),d=decodeURIComponent(p),h=decodeURIComponent(f),o(a,d)?n(a[d])?a[d].push(h):a[d]=[a[d],h]:a[d]=h}return a};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],13:[function(e,t,r){"use strict";var o=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};t.exports=function(e,t,r,s){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?i(a(e),(function(a){var s=encodeURIComponent(o(a))+r;return n(e[a])?i(e[a],(function(e){return s+encodeURIComponent(o(e))})).join(t):s+encodeURIComponent(o(e[a]))})).join(t):s?encodeURIComponent(o(s))+r+encodeURIComponent(o(e)):""};var n=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function i(e,t){if(e.map)return e.map(t);for(var r=[],o=0;o<e.length;o++)r.push(t(e[o],o));return r}var a=Object.keys||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t}},{}],14:[function(e,t,r){"use strict";r.decode=r.parse=e(12),r.encode=r.stringify=e(13)},{12:12,13:13}],15:[function(e,t,r){(function(r){t.exports=c;var o=e(25),n=e(26),i=e(16),a=e(31),s=r.env.RESET_APP_DATA_TIMER&&parseInt(r.env.RESET_APP_DATA_TIMER,10)||12e4;function c(t,r,n){var i=e(1)("algoliasearch"),a=e(22),s=e(7),c=e(27),l="Usage: algoliasearch(applicationID, apiKey, opts)";if(!0!==n._allowEmptyCredentials&&!t)throw new o.AlgoliaSearchError("Please provide an application ID. "+l);if(!0!==n._allowEmptyCredentials&&!r)throw new o.AlgoliaSearchError("Please provide an API key. "+l);this.applicationID=t,this.apiKey=r,this.hosts={read:[],write:[]},n=n||{},this._timeouts=n.timeouts||{connect:1e3,read:2e3,write:3e4},n.timeout&&(this._timeouts.connect=this._timeouts.read=this._timeouts.write=n.timeout);var p=n.protocol||"https:";if(/:$/.test(p)||(p+=":"),"http:"!==p&&"https:"!==p)throw new o.AlgoliaSearchError("protocol must be `http:` or `https:` (was `"+n.protocol+"`)");if(this._checkAppIdData(),n.hosts)s(n.hosts)?(this.hosts.read=a(n.hosts),this.hosts.write=a(n.hosts)):(this.hosts.read=a(n.hosts.read),this.hosts.write=a(n.hosts.write));else{var f=c(this._shuffleResult,(function(e){return t+"-"+e+".algolianet.com"})),d=(!1===n.dsn?"":"-dsn")+".algolia.net";this.hosts.read=[this.applicationID+d].concat(f),this.hosts.write=[this.applicationID+".algolia.net"].concat(f)}this.hosts.read=c(this.hosts.read,u(p)),this.hosts.write=c(this.hosts.write,u(p)),this.extraHeaders={},this.cache=n._cache||{},this._ua=n._ua,this._useCache=!(void 0!==n._useCache&&!n._cache)||n._useCache,this._useRequestCache=this._useCache&&n._useRequestCache,this._useFallback=void 0===n.useFallback||n.useFallback,this._setTimeout=n._setTimeout,i("init done, %j",this)}function u(e){return function(t){return e+"//"+t.toLowerCase()}}function l(e){if(void 0===Array.prototype.toJSON)return JSON.stringify(e);var t=Array.prototype.toJSON;delete Array.prototype.toJSON;var r=JSON.stringify(e);return Array.prototype.toJSON=t,r}function p(e){var t={};for(var r in e){var o;if(Object.prototype.hasOwnProperty.call(e,r))o="x-algolia-api-key"===r||"x-algolia-application-id"===r?"**hidden for security purposes**":e[r],t[r]=o}return t}c.prototype.initIndex=function(e){return new i(this,e)},c.prototype.setExtraHeader=function(e,t){this.extraHeaders[e.toLowerCase()]=t},c.prototype.getExtraHeader=function(e){return this.extraHeaders[e.toLowerCase()]},c.prototype.unsetExtraHeader=function(e){delete this.extraHeaders[e.toLowerCase()]},c.prototype.addAlgoliaAgent=function(e){var t="; "+e;-1===this._ua.indexOf(t)&&(this._ua+=t)},c.prototype._jsonRequest=function(t){this._checkAppIdData();var r,i,a,s=e(1)("algoliasearch:"+t.url),c=t.additionalUA||"",u=t.cache,f=this,d=0,h=!1,y=f._useFallback&&f._request.fallback&&t.fallback;this.apiKey.length>500&&void 0!==t.body&&(void 0!==t.body.params||void 0!==t.body.requests)?(t.body.apiKey=this.apiKey,a=this._computeRequestHeaders({additionalUA:c,withApiKey:!1,headers:t.headers})):a=this._computeRequestHeaders({additionalUA:c,headers:t.headers}),void 0!==t.body&&(r=l(t.body)),s("request start");var m=[];function g(e,t,r){return f._useCache&&e&&t&&void 0!==t[r]}function v(e,r){if(g(f._useRequestCache,u,i)&&e.catch((function(){delete u[i]})),"function"!=typeof t.callback)return e.then(r);e.then((function(e){n((function(){t.callback(null,r(e))}),f._setTimeout||setTimeout)}),(function(e){n((function(){t.callback(e)}),f._setTimeout||setTimeout)}))}if(f._useCache&&f._useRequestCache&&(i=t.url),f._useCache&&f._useRequestCache&&r&&(i+="_body_"+r),g(f._useRequestCache,u,i)){s("serving request from cache");var b=u[i];return v("function"!=typeof b.then?f._promise.resolve({responseText:b}):b,(function(e){return JSON.parse(e.responseText)}))}var w=function e(n,v){f._checkAppIdData();var b=new Date;if(f._useCache&&!f._useRequestCache&&(i=t.url),f._useCache&&!f._useRequestCache&&r&&(i+="_body_"+v.body),g(!f._useRequestCache,u,i)){s("serving response from cache");var w=u[i];return f._promise.resolve({body:JSON.parse(w),responseText:w})}if(d>=f.hosts[t.hostType].length)return!y||h?(s("could not get any response"),f._promise.reject(new o.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue. Application id was: "+f.applicationID,{debugData:m}))):(s("switching to fallback"),d=0,v.method=t.fallback.method,v.url=t.fallback.url,v.jsonBody=t.fallback.body,v.jsonBody&&(v.body=l(v.jsonBody)),a=f._computeRequestHeaders({additionalUA:c,headers:t.headers}),v.timeouts=f._getTimeoutsForRequest(t.hostType),f._setHostIndexByType(0,t.hostType),h=!0,e(f._request.fallback,v));var _=f._getHostByType(t.hostType),x=_+v.url,T={body:v.body,jsonBody:v.jsonBody,method:v.method,headers:a,timeouts:v.timeouts,debug:s,forceAuthHeaders:v.forceAuthHeaders};return s("method: %s, url: %s, headers: %j, timeouts: %d",T.method,x,T.headers,T.timeouts),n===f._request.fallback&&s("using fallback"),n.call(f,x,T).then((function(e){var t=e&&e.body&&e.body.message&&e.body.status||e.statusCode||e&&e.body&&200;s("received response: statusCode: %s, computed statusCode: %d, headers: %j",e.statusCode,t,e.headers);var n=2===Math.floor(t/100),c=new Date;if(m.push({currentHost:_,headers:p(a),content:r||null,contentLength:void 0!==r?r.length:null,method:v.method,timeouts:v.timeouts,url:v.url,startTime:b,endTime:c,duration:c-b,statusCode:t}),n)return f._useCache&&!f._useRequestCache&&u&&(u[i]=e.responseText),{responseText:e.responseText,body:e.body};if(4!==Math.floor(t/100))return d+=1,S();s("unrecoverable error");var l=new o.AlgoliaSearchError(e.body&&e.body.message,{debugData:m,statusCode:t});return f._promise.reject(l)}),(function(i){s("error: %s, stack: %s",i.message,i.stack);var c=new Date;m.push({currentHost:_,headers:p(a),content:r||null,contentLength:void 0!==r?r.length:null,method:v.method,timeouts:v.timeouts,url:v.url,startTime:b,endTime:c,duration:c-b}),i instanceof o.AlgoliaSearchError||(i=new o.Unknown(i&&i.message,i));if(d+=1,i instanceof o.Unknown||i instanceof o.UnparsableJSON||d>=f.hosts[t.hostType].length&&(h||!y))return i.debugData=m,f._promise.reject(i);if(i instanceof o.RequestTimeout)return s("retrying request with higher timeout"),f._incrementHostIndex(t.hostType),f._incrementTimeoutMultipler(),v.timeouts=f._getTimeoutsForRequest(t.hostType),e(n,v);return S()}));function S(){return s("retrying request"),f._incrementHostIndex(t.hostType),e(n,v)}}(f._request,{url:t.url,method:t.method,body:r,jsonBody:t.body,timeouts:f._getTimeoutsForRequest(t.hostType),forceAuthHeaders:t.forceAuthHeaders});return f._useCache&&f._useRequestCache&&u&&(u[i]=w),v(w,(function(e){return e.body}))},c.prototype._getSearchParams=function(e,t){if(null==e)return t;for(var r in e)null!==r&&void 0!==e[r]&&e.hasOwnProperty(r)&&(t+=""===t?"":"&",t+=r+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(e[r])?l(e[r]):e[r]));return t},c.prototype._computeRequestHeaders=function(t){var r=e(4),o={"x-algolia-agent":t.additionalUA?this._ua+"; "+t.additionalUA:this._ua,"x-algolia-application-id":this.applicationID};return!1!==t.withApiKey&&(o["x-algolia-api-key"]=this.apiKey),this.userToken&&(o["x-algolia-usertoken"]=this.userToken),this.securityTags&&(o["x-algolia-tagfilters"]=this.securityTags),r(this.extraHeaders,(function(e,t){o[t]=e})),t.headers&&r(t.headers,(function(e,t){o[t]=e})),o},c.prototype.search=function(t,r,o){var n=e(7),i=e(27);if(!n(t))throw new Error("Usage: client.search(arrayOfQueries[, callback])");"function"==typeof r?(o=r,r={}):void 0===r&&(r={});var a=this,s={requests:i(t,(function(e){var t="";return void 0!==e.query&&(t+="query="+encodeURIComponent(e.query)),{indexName:e.indexName,params:a._getSearchParams(e.params,t)}}))},c=i(s.requests,(function(e,t){return t+"="+encodeURIComponent("/1/indexes/"+encodeURIComponent(e.indexName)+"?"+e.params)})).join("&");return void 0!==r.strategy&&(s.strategy=r.strategy),this._jsonRequest({cache:this.cache,method:"POST",url:"/1/indexes/*/queries",body:s,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:c}},callback:o})},c.prototype.searchForFacetValues=function(t){var r=e(7),o=e(27),n="Usage: client.searchForFacetValues([{indexName, params: {facetName, facetQuery, ...params}}, ...queries])";if(!r(t))throw new Error(n);var i=this;return i._promise.all(o(t,(function(t){if(!t||void 0===t.indexName||void 0===t.params.facetName||void 0===t.params.facetQuery)throw new Error(n);var r=e(22),o=e(29),a=t.indexName,s=t.params,c=s.facetName,u=o(r(s),(function(e){return"facetName"===e})),l=i._getSearchParams(u,"");return i._jsonRequest({cache:i.cache,method:"POST",url:"/1/indexes/"+encodeURIComponent(a)+"/facets/"+encodeURIComponent(c)+"/query",hostType:"read",body:{params:l}})})))},c.prototype.setSecurityTags=function(e){if("[object Array]"===Object.prototype.toString.call(e)){for(var t=[],r=0;r<e.length;++r)if("[object Array]"===Object.prototype.toString.call(e[r])){for(var o=[],n=0;n<e[r].length;++n)o.push(e[r][n]);t.push("("+o.join(",")+")")}else t.push(e[r]);e=t.join(",")}this.securityTags=e},c.prototype.setUserToken=function(e){this.userToken=e},c.prototype.clearCache=function(){this.cache={}},c.prototype.setRequestTimeout=function(e){e&&(this._timeouts.connect=this._timeouts.read=this._timeouts.write=e)},c.prototype.setTimeouts=function(e){this._timeouts=e},c.prototype.getTimeouts=function(){return this._timeouts},c.prototype._getAppIdData=function(){var e=a.get(this.applicationID);return null!==e&&this._cacheAppIdData(e),e},c.prototype._setAppIdData=function(e){return e.lastChange=(new Date).getTime(),this._cacheAppIdData(e),a.set(this.applicationID,e)},c.prototype._checkAppIdData=function(){var e=this._getAppIdData(),t=(new Date).getTime();return null===e||t-e.lastChange>s?this._resetInitialAppIdData(e):e},c.prototype._resetInitialAppIdData=function(e){var t=e||{};return t.hostIndexes={read:0,write:0},t.timeoutMultiplier=1,t.shuffleResult=t.shuffleResult||function(e){var t,r,o=e.length;for(;0!==o;)r=Math.floor(Math.random()*o),t=e[o-=1],e[o]=e[r],e[r]=t;return e}([1,2,3]),this._setAppIdData(t)},c.prototype._cacheAppIdData=function(e){this._hostIndexes=e.hostIndexes,this._timeoutMultiplier=e.timeoutMultiplier,this._shuffleResult=e.shuffleResult},c.prototype._partialAppIdDataUpdate=function(t){var r=e(4),o=this._getAppIdData();return r(t,(function(e,t){o[t]=e})),this._setAppIdData(o)},c.prototype._getHostByType=function(e){return this.hosts[e][this._getHostIndexByType(e)]},c.prototype._getTimeoutMultiplier=function(){return this._timeoutMultiplier},c.prototype._getHostIndexByType=function(e){return this._hostIndexes[e]},c.prototype._setHostIndexByType=function(t,r){var o=e(22)(this._hostIndexes);return o[r]=t,this._partialAppIdDataUpdate({hostIndexes:o}),t},c.prototype._incrementHostIndex=function(e){return this._setHostIndexByType((this._getHostIndexByType(e)+1)%this.hosts[e].length,e)},c.prototype._incrementTimeoutMultipler=function(){var e=Math.max(this._timeoutMultiplier+1,4);return this._partialAppIdDataUpdate({timeoutMultiplier:e})},c.prototype._getTimeoutsForRequest=function(e){return{connect:this._timeouts.connect*this._timeoutMultiplier,complete:this._timeouts[e]*this._timeoutMultiplier}}}).call(this,e(11))},{1:1,11:11,16:16,22:22,25:25,26:26,27:27,29:29,31:31,4:4,7:7}],16:[function(e,t,r){var o=e(21),n=e(23),i=e(24);function a(e,t){this.indexName=t,this.as=e,this.typeAheadArgs=null,this.typeAheadValueOption=null,this.cache={}}t.exports=a,a.prototype.clearCache=function(){this.cache={}},a.prototype.search=o("query"),a.prototype.similarSearch=n(o("similarQuery"),i("index.similarSearch(query[, callback])","index.search({ similarQuery: query }[, callback])")),a.prototype.browse=function(t,r,o){var n,i,a=e(28);0===arguments.length||1===arguments.length&&"function"==typeof arguments[0]?(n=0,o=arguments[0],t=void 0):"number"==typeof arguments[0]?(n=arguments[0],"number"==typeof arguments[1]?i=arguments[1]:"function"==typeof arguments[1]&&(o=arguments[1],i=void 0),t=void 0,r=void 0):"object"==typeof arguments[0]?("function"==typeof arguments[1]&&(o=arguments[1]),r=arguments[0],t=void 0):"string"==typeof arguments[0]&&"function"==typeof arguments[1]&&(o=arguments[1],r=void 0),r=a({},r||{},{page:n,hitsPerPage:i,query:t});var s=this.as._getSearchParams(r,"");return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse",body:{params:s},hostType:"read",callback:o})},a.prototype.browseFrom=function(e,t){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse",body:{cursor:e},hostType:"read",callback:t})},a.prototype.searchForFacetValues=function(t,r){var o=e(22),n=e(29);if(void 0===t.facetName||void 0===t.facetQuery)throw new Error("Usage: index.searchForFacetValues({facetName, facetQuery, ...params}[, callback])");var i=t.facetName,a=n(o(t),(function(e){return"facetName"===e})),s=this.as._getSearchParams(a,"");return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/facets/"+encodeURIComponent(i)+"/query",hostType:"read",body:{params:s},callback:r})},a.prototype.searchFacet=n((function(e,t){return this.searchForFacetValues(e,t)}),i("index.searchFacet(params[, callback])","index.searchForFacetValues(params[, callback])")),a.prototype._search=function(e,t,r,o){return this.as._jsonRequest({cache:this.cache,method:"POST",url:t||"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:e},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:e}},callback:r,additionalUA:o})},a.prototype.getObject=function(e,t,r){1!==arguments.length&&"function"!=typeof t||(r=t,t=void 0);var o="";if(void 0!==t){o="?attributes=";for(var n=0;n<t.length;++n)0!==n&&(o+=","),o+=t[n]}return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/"+encodeURIComponent(e)+o,hostType:"read",callback:r})},a.prototype.getObjects=function(t,r,o){var n=e(7),i=e(27);if(!n(t))throw new Error("Usage: index.getObjects(arrayOfObjectIDs[, callback])");var a=this;1!==arguments.length&&"function"!=typeof r||(o=r,r=void 0);var s={requests:i(t,(function(e){var t={indexName:a.indexName,objectID:e};return r&&(t.attributesToRetrieve=r.join(",")),t}))};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",hostType:"read",body:s,callback:o})},a.prototype.as=null,a.prototype.indexName=null,a.prototype.typeAheadArgs=null,a.prototype.typeAheadValueOption=null},{21:21,22:22,23:23,24:24,27:27,28:28,29:29,7:7}],17:[function(e,t,r){"use strict";var o=e(15),n=e(18);t.exports=n(o,"Browser (lite)")},{15:15,18:18}],18:[function(e,t,r){(function(r){"use strict";var o=e(5),n=o.Promise||e(3).Promise;t.exports=function(t,i){var a=e(6),s=e(25),c=e(19),u=e(20),l=e(30);function p(t,r,o){return(o=e(22)(o||{}))._ua=o._ua||p.ua,new d(t,r,o)}i=i||"","debug"===r.env.NODE_ENV&&e(1).enable("algoliasearch*"),p.version=e(32),p.ua="Algolia for JavaScript ("+p.version+"); "+i,p.initPlaces=l(p),o.__algolia={debug:e(1),algoliasearch:p};var f={hasXMLHttpRequest:"XMLHttpRequest"in o,hasXDomainRequest:"XDomainRequest"in o};function d(){t.apply(this,arguments)}return f.hasXMLHttpRequest&&(f.cors="withCredentials"in new XMLHttpRequest),a(d,t),d.prototype._request=function(e,t){return new n((function(r,o){if(f.cors||f.hasXDomainRequest){e=c(e,t.headers);var n,i,a=t.body,u=f.cors?new XMLHttpRequest:new XDomainRequest,l=!1;n=setTimeout(p,t.timeouts.connect),u.onprogress=function(){l||d()},"onreadystatechange"in u&&(u.onreadystatechange=function(){!l&&u.readyState>1&&d()}),u.onload=function(){if(i)return;var e;clearTimeout(n);try{e={body:JSON.parse(u.responseText),responseText:u.responseText,statusCode:u.status,headers:u.getAllResponseHeaders&&u.getAllResponseHeaders()||{}}}catch(t){e=new s.UnparsableJSON({more:u.responseText})}e instanceof s.UnparsableJSON?o(e):r(e)},u.onerror=function(e){if(i)return;clearTimeout(n),o(new s.Network({more:e}))},u instanceof XMLHttpRequest?(u.open(t.method,e,!0),t.forceAuthHeaders&&(u.setRequestHeader("x-algolia-application-id",t.headers["x-algolia-application-id"]),u.setRequestHeader("x-algolia-api-key",t.headers["x-algolia-api-key"]))):u.open(t.method,e),f.cors&&(a&&("POST"===t.method?u.setRequestHeader("content-type","application/x-www-form-urlencoded"):u.setRequestHeader("content-type","application/json")),u.setRequestHeader("accept","application/json")),a?u.send(a):u.send()}else o(new s.Network("CORS not supported"));function p(){i=!0,u.abort(),o(new s.RequestTimeout)}function d(){l=!0,clearTimeout(n),n=setTimeout(p,t.timeouts.complete)}}))},d.prototype._request.fallback=function(e,t){return e=c(e,t.headers),new n((function(r,o){u(e,t,(function(e,t){e?o(e):r(t)}))}))},d.prototype._promise={reject:function(e){return n.reject(e)},resolve:function(e){return n.resolve(e)},delay:function(e){return new n((function(t){setTimeout(t,e)}))},all:function(e){return n.all(e)}},p}}).call(this,e(11))},{1:1,11:11,19:19,20:20,22:22,25:25,3:3,30:30,32:32,5:5,6:6}],19:[function(e,t,r){"use strict";t.exports=function(e,t){/\?/.test(e)?e+="&":e+="?";return e+o(t)};var o=e(13)},{13:13}],20:[function(e,t,r){"use strict";t.exports=function(e,t,r){if("GET"!==t.method)return void r(new Error("Method "+t.method+" "+e+" is not supported by JSONP."));t.debug("JSONP: start");var i=!1,a=!1;n+=1;var s=document.getElementsByTagName("head")[0],c=document.createElement("script"),u="algoliaJSONP_"+n,l=!1;window[u]=function(e){!function(){try{delete window[u],delete window[u+"_loaded"]}catch(e){window[u]=window[u+"_loaded"]=void 0}}(),a?t.debug("JSONP: Late answer, ignoring"):(i=!0,d(),r(null,{body:e,responseText:JSON.stringify(e)}))},e+="&callback="+u,t.jsonBody&&t.jsonBody.params&&(e+="&"+t.jsonBody.params);var p=setTimeout((function(){t.debug("JSONP: Script timeout"),a=!0,d(),r(new o.RequestTimeout)}),t.timeouts.complete);function f(){t.debug("JSONP: success"),l||a||(l=!0,i||(t.debug("JSONP: Fail. Script loaded but did not call the callback"),d(),r(new o.JSONPScriptFail)))}function d(){clearTimeout(p),c.onload=null,c.onreadystatechange=null,c.onerror=null,s.removeChild(c)}c.onreadystatechange=function(){"loaded"!==this.readyState&&"complete"!==this.readyState||f()},c.onload=f,c.onerror=function(){t.debug("JSONP: Script error"),l||a||(d(),r(new o.JSONPScriptError))},c.async=!0,c.defer=!0,c.src=e,s.appendChild(c)};var o=e(25),n=0},{25:25}],21:[function(e,t,r){t.exports=function(e,t){return function(r,n,i){if("function"==typeof r&&"object"==typeof n||"object"==typeof i)throw new o.AlgoliaSearchError("index.search usage is index.search(query, params, cb)");0===arguments.length||"function"==typeof r?(i=r,r=""):1!==arguments.length&&"function"!=typeof n||(i=n,n=void 0),"object"==typeof r&&null!==r?(n=r,r=void 0):null==r&&(r="");var a,s="";return void 0!==r&&(s+=e+"="+encodeURIComponent(r)),void 0!==n&&(n.additionalUA&&(a=n.additionalUA,delete n.additionalUA),s=this.as._getSearchParams(n,s)),this._search(s,t,i,a)}};var o=e(25)},{25:25}],22:[function(e,t,r){t.exports=function(e){return JSON.parse(JSON.stringify(e))}},{}],23:[function(e,t,r){t.exports=function(e,t){var r=!1;return function(){return r||(console.warn(t),r=!0),e.apply(this,arguments)}}},{}],24:[function(e,t,r){t.exports=function(e,t){var r=e.toLowerCase().replace(/[\.\(\)]/g,"");return"algoliasearch: `"+e+"` was replaced by `"+t+"`. Please see https://github.com/algolia/algoliasearch-client-javascript/wiki/Deprecated#"+r}},{}],25:[function(e,t,r){"use strict";var o=e(6);function n(t,r){var o=e(4),n=this;"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):n.stack=(new Error).stack||"Cannot get a stacktrace, browser is too old",this.name="AlgoliaSearchError",this.message=t||"Unknown error",r&&o(r,(function(e,t){n[t]=e}))}function i(e,t){function r(){var r=Array.prototype.slice.call(arguments,0);"string"!=typeof r[0]&&r.unshift(t),n.apply(this,r),this.name="AlgoliaSearch"+e+"Error"}return o(r,n),r}o(n,Error),t.exports={AlgoliaSearchError:n,UnparsableJSON:i("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),RequestTimeout:i("RequestTimeout","Request timed out before getting a response"),Network:i("Network","Network issue, see err.more for details"),JSONPScriptFail:i("JSONPScriptFail","<script> was loaded but did not call our provided callback"),ValidUntilNotFound:i("ValidUntilNotFound","The SecuredAPIKey does not have a validUntil parameter."),JSONPScriptError:i("JSONPScriptError","<script> unable to load due to an `error` event on it"),ObjectNotFound:i("ObjectNotFound","Object not found"),Unknown:i("Unknown","Unknown error occured")}},{4:4,6:6}],26:[function(e,t,r){t.exports=function(e,t){t(e,0)}},{}],27:[function(e,t,r){var o=e(4);t.exports=function(e,t){var r=[];return o(e,(function(o,n){r.push(t(o,n,e))})),r}},{4:4}],28:[function(e,t,r){var o=e(4);t.exports=function e(t){var r=Array.prototype.slice.call(arguments);return o(r,(function(r){for(var o in r)r.hasOwnProperty(o)&&("object"==typeof t[o]&&"object"==typeof r[o]?t[o]=e({},t[o],r[o]):void 0!==r[o]&&(t[o]=r[o]))})),t}},{4:4}],29:[function(e,t,r){t.exports=function(t,r){var o=e(9),n=e(4),i={};return n(o(t),(function(e){!0!==r(e)&&(i[e]=t[e])})),i}},{4:4,9:9}],30:[function(e,t,r){t.exports=function(t){return function(r,i,a){var s=e(22);(a=a&&s(a)||{}).hosts=a.hosts||["places-dsn.algolia.net","places-1.algolianet.com","places-2.algolianet.com","places-3.algolianet.com"],0!==arguments.length&&"object"!=typeof r&&void 0!==r||(r="",i="",a._allowEmptyCredentials=!0);var c=t(r,i,a).initIndex("places");return c.search=n("query","/1/places/query"),c.reverse=function(e,t){var r=o.encode(e);return this.as._jsonRequest({method:"GET",url:"/1/places/reverse?"+r,hostType:"read",callback:t})},c.getObject=function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/places/"+encodeURIComponent(e),hostType:"read",callback:t})},c}};var o=e(14),n=e(21)},{14:14,21:21,22:22}],31:[function(e,t,r){(function(r){var o,n=e(1)("algoliasearch:src/hostIndexState.js"),i="algoliasearch-client-js",a={state:{},set:function(e,t){return this.state[e]=t,this.state[e]},get:function(e){return this.state[e]||null}},s={set:function(e,t){a.set(e,t);try{var o=JSON.parse(r.localStorage[i]);return o[e]=t,r.localStorage[i]=JSON.stringify(o),o[e]}catch(t){return c(e,t)}},get:function(e){try{return JSON.parse(r.localStorage[i])[e]||null}catch(t){return c(e,t)}}};function c(e,t){return n("localStorage failed with",t),function(){try{r.localStorage.removeItem(i)}catch(e){}}(),(o=a).get(e)}function u(e,t){return 1===arguments.length?o.get(e):o.set(e,t)}function l(){try{return"localStorage"in r&&null!==r.localStorage&&(r.localStorage[i]||r.localStorage.setItem(i,JSON.stringify({})),!0)}catch(e){return!1}}o=l()?s:a,t.exports={get:u,set:u,supportsLocalStorage:l}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{1:1}],32:[function(e,t,r){"use strict";t.exports="3.35.1"},{}]},{},[17])(17)}));
|
11
|
+
//# sourceMappingURL=../../maps/assets/algolia/algoliasearchLite.js.map
|