/*! algoliasearch 3.13.1 | © 2014, 2015 Algolia SAS | github.com/algolia/algoliasearch-client-js */ !function(e){var t;"undefined"!=typeof window?t=window:"undefined"!=typeof self&&(t=self),t.ALGOLIA_MIGRATION_LAYER=e()}(function(){return function e(t,r,n){function o(s,a){if(!r[s]){if(!t[s]){var c="function"==typeof require&&require;if(!a&&c)return c(s,!0);if(i)return i(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var l=r[s]={exports:{}};t[s][0].call(l.exports,function(e){var r=t[s][1][e];return o(r?r:e)},l,l.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;so;o++)if(r[o].src&&t.test(r[o].src)){n=!0;break}return n}t.exports=n},{}],3:[function(e,t,r){"use strict";function n(t){var r=e(1),n="//cdn.jsdelivr.net/algoliasearch/2/"+t+".min.js",i="-- AlgoliaSearch `latest` warning --\nWarning, you are using the `latest` version string from jsDelivr to load the AlgoliaSearch library.\nUsing `latest` is no more recommended, you should load //cdn.jsdelivr.net/algoliasearch/2/algoliasearch.min.js\n\nAlso, we updated the AlgoliaSearch JavaScript client to V3. If you want to upgrade,\nplease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch `latest` warning --";window.console&&(window.console.warn?window.console.warn(i):window.console.log&&window.console.log(i));try{document.write(""),window.ALGOLIA_SUPPORTS_DOCWRITE===!0?(document.write(''),o("document.write")()):r(n,o("DOMElement"))}catch(s){r(n,o("DOMElement"))}}function o(e){return function(){var t="AlgoliaSearch: loaded V2 script using "+e;window.console&&window.console.log&&window.console.log(t)}}t.exports=n},{1:1}],4:[function(e,t,r){"use strict";function n(){var e="-- AlgoliaSearch V2 => V3 error --\nYou are trying to use a new version of the AlgoliaSearch JavaScript client with an old notation.\nPlease read our migration guide at https://github.com/algolia/algoliasearch-client-js/wiki/Migration-guide-from-2.x.x-to-3.x.x\n-- /AlgoliaSearch V2 => V3 error --";window.AlgoliaSearch=function(){throw new Error(e)},window.AlgoliaSearchHelper=function(){throw new Error(e)},window.AlgoliaExplainResults=function(){throw new Error(e)}}t.exports=n},{}],5:[function(e,t,r){"use strict";function n(t){var r=e(2),n=e(3),o=e(4);r(t)?n(t):o()}n("algoliasearch.jquery")},{2:2,3:3,4:4}]},{},[5])(5)}),function e(t,r,n){function o(s,a){if(!r[s]){if(!t[s]){var c="function"==typeof require&&require;if(!a&&c)return c(s,!0);if(i)return i(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var l=r[s]={exports:{}};t[s][0].call(l.exports,function(e){var r=t[s][1][e];return o(r?r:e)},l,l.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s=31}function o(){var e=arguments,t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+r.humanize(this.diff),!t)return e;var n="color: "+this.color;e=[e[0],n,"color: inherit"].concat(Array.prototype.slice.call(e,1));var o=0,i=0;return e[0].replace(/%[a-z%]/g,function(e){"%%"!==e&&(o++,"%c"===e&&(i=o))}),e.splice(i,0,n),e}function i(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?r.storage.removeItem("debug"):r.storage.debug=e}catch(t){}}function a(){var e;try{e=r.storage.debug}catch(t){}return e}function c(){try{return window.localStorage}catch(e){}}r=t.exports=e(2),r.log=i,r.formatArgs=o,r.save=s,r.load=a,r.useColors=n,r.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:c(),r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(e){return JSON.stringify(e)},r.enable(a())},{2:2}],2:[function(e,t,r){function n(){return r.colors[l++%r.colors.length]}function o(e){function t(){}function o(){var e=o,t=+new Date,i=t-(u||t);e.diff=i,e.prev=u,e.curr=t,u=t,null==e.useColors&&(e.useColors=r.useColors()),null==e.color&&e.useColors&&(e.color=n());var s=Array.prototype.slice.call(arguments);s[0]=r.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var a=0;s[0]=s[0].replace(/%([a-z%])/g,function(t,n){if("%%"===t)return t;a++;var o=r.formatters[n];if("function"==typeof o){var i=s[a];t=o.call(e,i),s.splice(a,1),a--}return t}),"function"==typeof r.formatArgs&&(s=r.formatArgs.apply(e,s));var c=o.log||r.log||console.log.bind(console);c.apply(e,s)}t.enabled=!1,o.enabled=!0;var i=r.enabled(e)?o:t;return i.namespace=e,i}function i(e){r.save(e);for(var t=(e||"").split(/[\s,]+/),n=t.length,o=0;n>o;o++)t[o]&&(e=t[o].replace(/\*/g,".*?"),"-"===e[0]?r.skips.push(new RegExp("^"+e.substr(1)+"$")):r.names.push(new RegExp("^"+e+"$")))}function s(){r.enable("")}function a(e){var t,n;for(t=0,n=r.skips.length;n>t;t++)if(r.skips[t].test(e))return!1;for(t=0,n=r.names.length;n>t;t++)if(r.names[t].test(e))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}r=t.exports=o,r.coerce=c,r.disable=s,r.enable=i,r.enabled=a,r.humanize=e(3),r.names=[],r.skips=[],r.formatters={};var u,l=0},{3:3}],3:[function(e,t,r){function n(e){if(e=""+e,!(e.length>1e4)){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){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*f;case"days":case"day":case"d":return r*l;case"hours":case"hour":case"hrs":case"hr":case"h":return r*u;case"minutes":case"minute":case"mins":case"min":case"m":return r*c;case"seconds":case"second":case"secs":case"sec":case"s":return r*a;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r}}}}function o(e){return e>=l?Math.round(e/l)+"d":e>=u?Math.round(e/u)+"h":e>=c?Math.round(e/c)+"m":e>=a?Math.round(e/a)+"s":e+"ms"}function i(e){return s(e,l,"day")||s(e,u,"hour")||s(e,c,"minute")||s(e,a,"second")||e+" ms"}function s(e,t,r){return t>e?void 0:1.5*t>e?Math.floor(e/t)+" "+r:Math.ceil(e/t)+" "+r+"s"}var a=1e3,c=60*a,u=60*c,l=24*u,f=365.25*l;t.exports=function(e,t){return t=t||{},"string"==typeof e?n(e):t["long"]?i(e):o(e)}},{}],4:[function(e,t,r){(function(r,n){(function(){"use strict";function o(e){return"function"==typeof e||"object"==typeof e&&null!==e}function i(e){return"function"==typeof e}function s(e){Q=e}function a(e){W=e}function c(){return function(){r.nextTick(h)}}function u(){return function(){B(h)}}function l(){var e=0,t=new z(h),r=document.createTextNode("");return t.observe(r,{characterData:!0}),function(){r.data=e=++e%2}}function f(){var e=new MessageChannel;return e.port1.onmessage=h,function(){e.port2.postMessage(0)}}function p(){return function(){setTimeout(h,1)}}function h(){for(var e=0;V>e;e+=2){var t=te[e],r=te[e+1];t(r),te[e]=void 0,te[e+1]=void 0}V=0}function d(){try{var t=e,r=t("vertx");return B=r.runOnLoop||r.runOnContext,u()}catch(n){return p()}}function y(e,t){var r=this,n=r._state;if(n===ie&&!e||n===se&&!t)return this;var o=new this.constructor(m),i=r._result;if(n){var s=arguments[n-1];W(function(){E(n,o,s,i)})}else R(r,o,e,t);return o}function v(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var r=new t(m);return A(r,e),r}function m(){}function b(){return new TypeError("You cannot resolve a promise with itself")}function g(){return new TypeError("A promises callback cannot return that same promise.")}function w(e){try{return e.then}catch(t){return ae.error=t,ae}}function x(e,t,r,n){try{e.call(t,r,n)}catch(o){return o}}function _(e,t,r){W(function(e){var n=!1,o=x(r,t,function(r){n||(n=!0,t!==r?A(e,r):S(e,r))},function(t){n||(n=!0,k(e,t))},"Settle: "+(e._label||" unknown promise"));!n&&o&&(n=!0,k(e,o))},e)}function j(e,t){t._state===ie?S(e,t._result):t._state===se?k(e,t._result):R(t,void 0,function(t){A(e,t)},function(t){k(e,t)})}function T(e,t,r){t.constructor===e.constructor&&r===re&&constructor.resolve===ne?j(e,t):r===ae?k(e,ae.error):void 0===r?S(e,t):i(r)?_(e,t,r):S(e,t)}function A(e,t){e===t?k(e,b()):o(t)?T(e,t,w(t)):S(e,t)}function O(e){e._onerror&&e._onerror(e._result),P(e)}function S(e,t){e._state===oe&&(e._result=t,e._state=ie,0!==e._subscribers.length&&W(P,e))}function k(e,t){e._state===oe&&(e._state=se,e._result=t,W(O,e))}function R(e,t,r,n){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+ie]=r,o[i+se]=n,0===i&&e._state&&W(P,e)}function P(e){var t=e._subscribers,r=e._state;if(0!==t.length){for(var n,o,i=e._result,s=0;ss;s++)R(n.resolve(e[s]),void 0,t,r);return o}function L(e){var t=this,r=new t(m);return k(r,e),r}function D(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function H(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function M(e){this._id=pe++,this._state=void 0,this._result=void 0,this._subscribers=[],m!==e&&("function"!=typeof e&&D(),this instanceof M?q(this,e):H())}function K(e,t){this._instanceConstructor=e,this.promise=new e(m),Array.isArray(t)?(this._input=t,this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?S(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&S(this.promise,this._result))):k(this.promise,this._validationError())}function J(){var e;if("undefined"!=typeof n)e=n;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var r=e.Promise;r&&"[object Promise]"===Object.prototype.toString.call(r.resolve())&&!r.cast||(e.Promise=he)}var F;F=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var B,Q,G,$=F,V=0,W=function(e,t){te[V]=e,te[V+1]=t,V+=2,2===V&&(Q?Q(h):G())},X="undefined"!=typeof window?window:void 0,Y=X||{},z=Y.MutationObserver||Y.WebKitMutationObserver,Z="undefined"!=typeof r&&"[object process]"==={}.toString.call(r),ee="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,te=new Array(1e3);G=Z?c():z?l():ee?f():void 0===X&&"function"==typeof e?d():p();var re=y,ne=v,oe=void 0,ie=1,se=2,ae=new I,ce=new I,ue=C,le=N,fe=L,pe=0,he=M;M.all=ue,M.race=le,M.resolve=ne,M.reject=fe,M._setScheduler=s,M._setAsap=a,M._asap=W,M.prototype={constructor:M,then:re,"catch":function(e){return this.then(null,e)}};var de=K;K.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},K.prototype._enumerate=function(){for(var e=this.length,t=this._input,r=0;this._state===oe&&e>r;r++)this._eachEntry(t[r],r)},K.prototype._eachEntry=function(e,t){var r=this._instanceConstructor,n=r.resolve;if(n===ne){var o=w(e);if(o===re&&e._state!==oe)this._settledAt(e._state,t,e._result);else if("function"!=typeof o)this._remaining--,this._result[t]=e;else if(r===he){var i=new r(m);T(i,e,o),this._willSettleAt(i,t)}else this._willSettleAt(new r(function(t){t(e)}),t)}else this._willSettleAt(n(e),t)},K.prototype._settledAt=function(e,t,r){var n=this.promise;n._state===oe&&(this._remaining--,e===se?k(n,r):this._result[t]=r),0===this._remaining&&S(n,this._result)},K.prototype._willSettleAt=function(e,t){var r=this;R(e,void 0,function(e){r._settledAt(ie,t,e)},function(e){r._settledAt(se,t,e)})};var ye=J,ve={Promise:he,polyfill:ye};"function"==typeof define&&define.amd?define(function(){return ve}):"undefined"!=typeof t&&t.exports?t.exports=ve:"undefined"!=typeof this&&(this.ES6Promise=ve),ye()}).call(this)}).call(this,e(77),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{77:77}],5:[function(e,t,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function o(e){return"function"==typeof e}function i(e){return"number"==typeof e}function s(e){return"object"==typeof e&&null!==e}function a(e){return void 0===e}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||0>e||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,r,n,i,c,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||s(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;throw TypeError('Uncaught, unspecified "error" event.')}if(r=this._events[e],a(r))return!1;if(o(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:i=Array.prototype.slice.call(arguments,1),r.apply(this,i)}else if(s(r))for(i=Array.prototype.slice.call(arguments,1),u=r.slice(),n=u.length,c=0;n>c;c++)u[c].apply(this,i);return!0},n.prototype.addListener=function(e,t){var r;if(!o(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,o(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=a(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,r&&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},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}if(!o(t))throw TypeError("listener must be a function");var n=!1;return r.listener=t,this.on(e,r),this},n.prototype.removeListener=function(e,t){var r,n,i,a;if(!o(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],i=r.length,n=-1,r===t||o(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){n=a;break}if(0>n)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.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(r=this._events[e],o(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?o(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(o(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},{}],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){function n(e){var t=e?e.length:0;return t?e[t-1]:void 0}t.exports=n},{}],8:[function(e,t,r){var n=e(12),o=e(19),i=e(41),s=i(n,o);t.exports=s},{12:12,19:19,41:41}],9:[function(e,t,r){function n(e,t,r){var n=a(e)?o:s;return t=i(t,r,3),n(e,t)}var o=e(13),i=e(16),s=e(27),a=e(64);t.exports=n},{13:13,16:16,27:27,64:64}],10:[function(e,t,r){function n(e,t){if("function"!=typeof e)throw new TypeError(o);return t=i(void 0===t?e.length-1:+t||0,0),function(){for(var r=arguments,n=-1,o=i(r.length-t,0),s=Array(o);++nn;)e=e[t[n++]];return n&&n==i?e:void 0}}var o=e(59);t.exports=n},{59:59}],24:[function(e,t,r){function n(e,t,r,a,c,u){return e===t?!0:null==e||null==t||!i(e)&&!s(t)?e!==e&&t!==t:o(e,t,n,r,a,c,u)}var o=e(25),i=e(67),s=e(56);t.exports=n},{25:25,56:56,67:67}],25:[function(e,t,r){function n(e,t,r,n,p,y,v){var m=a(e),b=a(t),g=l,w=l;m||(g=d.call(e),g==u?g=f:g!=f&&(m=c(e))),b||(w=d.call(t),w==u?w=f:w!=f&&(b=c(t)));var x=g==f,_=w==f,j=g==w;if(j&&!m&&!x)return i(e,t,g);if(!p){var T=x&&h.call(e,"__wrapped__"),A=_&&h.call(t,"__wrapped__");if(T||A)return r(T?e.value():e,A?t.value():t,n,p,y,v)}if(!j)return!1;y||(y=[]),v||(v=[]);for(var O=y.length;O--;)if(y[O]==e)return v[O]==t;y.push(e),v.push(t);var S=(m?o:s)(e,t,r,n,p,y,v);return y.pop(),v.pop(),S}var o=e(42),i=e(43),s=e(44),a=e(64),c=e(69),u="[object Arguments]",l="[object Array]",f="[object Object]",p=Object.prototype,h=p.hasOwnProperty,d=p.toString;t.exports=n},{42:42,43:43,44:44,64:64,69:69}],26:[function(e,t,r){function n(e,t,r){var n=t.length,s=n,a=!r;if(null==e)return!s;for(e=i(e);n--;){var c=t[n];if(a&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++nt&&(t=-t>o?0:o+t),r=void 0===r||r>o?o:+r||0,0>r&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n2?r[s-2]:void 0,c=s>2?r[2]:void 0,u=s>1?r[s-1]:void 0;for("function"==typeof a?(a=o(a,u,5),s-=2):(a="function"==typeof u?u:void 0,s-=a?1:0),c&&i(r[0],r[1],c)&&(a=3>s?void 0:a,s=1);++nu))return!1;for(;++c-1&&e%1==0&&t>e}var o=/^\d+$/,i=9007199254740991;t.exports=n},{}],53:[function(e,t,r){function n(e,t,r){if(!s(r))return!1;var n=typeof t;if("number"==n?o(r)&&i(t,r.length):"string"==n&&t in r){var a=r[t];return e===e?e===a:a!==a}return!1}var o=e(51),i=e(52),s=e(67);t.exports=n},{51:51,52:52,67:67}],54:[function(e,t,r){function n(e,t){var r=typeof e;if("string"==r&&a.test(e)||"number"==r)return!0;if(o(e))return!1;var n=!s.test(e);return n||null!=t&&e in i(t)}var o=e(64),i=e(59),s=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,a=/^\w*$/;t.exports=n},{59:59,64:64}],55:[function(e,t,r){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&o>=e}var o=9007199254740991;t.exports=n},{}],56:[function(e,t,r){function n(e){return!!e&&"object"==typeof e}t.exports=n},{}],57:[function(e,t,r){function n(e){return e===e&&!o(e)}var o=e(67);t.exports=n},{67:67}],58:[function(e,t,r){function n(e){for(var t=c(e),r=t.length,n=r&&e.length,u=!!n&&a(n)&&(i(e)||o(e)),f=-1,p=[];++f0;++n1)for(var r=1;r0&&u>c&&(u=c);for(var l=0;u>l;++l){var f,p,h,d,y=e[l].replace(a,"%20"),v=y.indexOf(r);v>=0?(f=y.substr(0,v),p=y.substr(v+1)):(f=y,p=""),h=decodeURIComponent(f),d=decodeURIComponent(p),n(s,h)?o(s[h])?s[h].push(d):s[h]=[s[h],d]:s[h]=d}return s};var o=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],79:[function(e,t,r){"use strict";function n(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n=c.hosts[t.hostType].length&&(h||!d)?c._promise.reject(n):(c.hostIndex[t.hostType]=++c.hostIndex[t.hostType]%c.hosts[t.hostType].length,n instanceof l.RequestTimeout?v():(h||(f=1/0),r(e,a)))}function v(){return c.hostIndex[t.hostType]=++c.hostIndex[t.hostType]%c.hosts[t.hostType].length,a.timeout=c.requestTimeout*(f+1),r(e,a)}var m;if(c._useCache&&(m=t.url),c._useCache&&n&&(m+="_body_"+a.body),c._useCache&&s&&void 0!==s[m])return i("serving response from cache"),c._promise.resolve(JSON.parse(s[m]));if(f>=c.hosts[t.hostType].length)return!d||h?(i("could not get any response"),c._promise.reject(new l.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue. Application id was: "+c.applicationID))):(i("switching to fallback"),f=0,a.method=t.fallback.method,a.url=t.fallback.url,a.jsonBody=t.fallback.body,a.jsonBody&&(a.body=u(a.jsonBody)),o=c._computeRequestHeaders(),a.timeout=c.requestTimeout*(f+1),c.hostIndex[t.hostType]=0,h=!0,r(c._request.fallback,a));var b=c.hosts[t.hostType][c.hostIndex[t.hostType]]+a.url,g={body:a.body,jsonBody:a.jsonBody,method:a.method,headers:o,timeout:a.timeout,debug:i};return i("method: %s, url: %s, headers: %j, timeout: %d",g.method,b,g.headers,g.timeout),e===c._request.fallback&&i("using fallback"),e.call(c,b,g).then(p,y)}var n,o,i=e(1)("algoliasearch:"+t.url),s=t.cache,c=this,f=0,h=!1,d=c._useFallback&&c._request.fallback&&t.fallback;this.apiKey.length>p&&void 0!==t.body&&void 0!==t.body.params?(t.body.apiKey=this.apiKey,o=this._computeRequestHeaders(!1)):o=this._computeRequestHeaders(),void 0!==t.body&&(n=u(t.body)),i("request start");var y=r(c._request,{url:t.url,method:t.method,body:n,jsonBody:t.body,timeout:c.requestTimeout*(f+1)});return t.callback?void y.then(function(e){a(function(){t.callback(null,e)},c._setTimeout||setTimeout)},function(e){a(function(){t.callback(e)},c._setTimeout||setTimeout)}):y},_getSearchParams:function(e,t){if(void 0===e||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])?u(e[r]):e[r]));return t},_computeRequestHeaders:function(t){var r=e(8),n={"x-algolia-agent":this._ua,"x-algolia-application-id":this.applicationID};return t!==!1&&(n["x-algolia-api-key"]=this.apiKey),this.userToken&&(n["x-algolia-usertoken"]=this.userToken),this.securityTags&&(n["x-algolia-tagfilters"]=this.securityTags),this.extraHeaders&&r(this.extraHeaders,function(e){n[e.name]=e.value}),n}},n.prototype.Index.prototype={clearCache:function(){this.cache={}},addObject:function(e,t,r){var n=this;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(n.indexName)+(void 0!==t?"/"+encodeURIComponent(t):""),body:e,hostType:"write",callback:r})},addObjects:function(t,r){var n=e(64),o="Usage: index.addObjects(arrayOfObjects[, callback])";if(!n(t))throw new Error(o);for(var i=this,s={requests:[]},a=0;as&&(t=s),"published"!==e.status?l._promise.delay(t).then(r):e})}function n(e){a(function(){t(null,e)},l._setTimeout||setTimeout)}function o(e){a(function(){t(e)},l._setTimeout||setTimeout)}var i=100,s=5e3,c=0,u=this,l=u.as,f=r();return t?void f.then(n,o):f},clearIndex:function(e){var t=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/clear",hostType:"write",callback:e})},getSettings:function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/settings",hostType:"read",callback:e})},setSettings:function(e,t){var r=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/settings",hostType:"write",body:e,callback:t})},listUserKeys:function(e){var t=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(t.indexName)+"/keys",hostType:"read",callback:e})},getUserKeyACL:function(e,t){var r=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/keys/"+e,hostType:"read",callback:t})},deleteUserKey:function(e,t){var r=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/keys/"+e,hostType:"write",callback:t})},addUserKey:function(t,r,n){var o=e(64),i="Usage: index.addUserKey(arrayOfAcls[, params, callback])";if(!o(t))throw new Error(i);1!==arguments.length&&"function"!=typeof r||(n=r,r=null);var s={acl:t};return r&&(s.validity=r.validity,s.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,s.maxHitsPerQuery=r.maxHitsPerQuery,s.description=r.description,r.queryParameters&&(s.queryParameters=this.as._getSearchParams(r.queryParameters,"")),s.referers=r.referers),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:s,hostType:"write",callback:n})},addUserKeyWithValidity:c(function(e,t,r){return this.addUserKey(e,t,r)},s("index.addUserKeyWithValidity()","index.addUserKey()")),updateUserKey:function(t,r,n,o){var i=e(64),s="Usage: index.updateUserKey(key, arrayOfAcls[, params, callback])";if(!i(r))throw new Error(s);2!==arguments.length&&"function"!=typeof n||(o=n,n=null);var a={acl:r};return n&&(a.validity=n.validity,a.maxQueriesPerIPPerHour=n.maxQueriesPerIPPerHour,a.maxHitsPerQuery=n.maxHitsPerQuery,a.description=n.description,n.queryParameters&&(a.queryParameters=this.as._getSearchParams(n.queryParameters,"")),a.referers=n.referers),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+t,body:a,hostType:"write",callback:o})},_search:function(e,t,r){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})},as:null,indexName:null,typeAheadArgs:null,typeAheadValueOption:null}},{1:1,61:61,64:64,73:73,8:8,82:82,88:88,89:89,9:9}],82:[function(e,t,r){"use strict";function n(){}t.exports=n;var o=e(6),i=e(5).EventEmitter;o(n,i),n.prototype.stop=function(){this._stopped=!0,this._clean()},n.prototype._end=function(){this.emit("end"),this._clean()},n.prototype._error=function(e){this.emit("error",e),this._clean()},n.prototype._result=function(e){this.emit("result",e)},n.prototype._clean=function(){this.removeAllListeners("stop"),this.removeAllListeners("end"),this.removeAllListeners("error"),this.removeAllListeners("result")}},{5:5,6:6}],83:[function(e,t,r){"use strict";function n(t,r,i){var s=e(62),a=e(85);return i=s(i||{}),void 0===i.protocol&&(i.protocol=a()),i._ua=i._ua||n.ua,new o(t,r,i)}function o(){s.apply(this,arguments)}var i=e(6),s=e(81),a=e(89),c=e(86),u=e(87),l=e(90);window.algoliasearch=e(84),n.version=e(91),n.ua="Algolia for jQuery "+n.version,n.initPlaces=l(n),window.__algolia={debug:e(1),algoliasearch:n};var f=window.jQuery;f.algolia={Client:n,ua:n.ua,version:n.version},i(o,s),o.prototype._request=function(e,t){return new f.Deferred(function(r){var n=t.body;e=c(e,t.headers);var o={accept:"application/json"};n&&("POST"===t.method?o["content-type"]="application/x-www-form-urlencoded":o["content-type"]="application/json"),f.ajax(e,{type:t.method,timeout:t.timeout,dataType:"json",data:n,headers:o,complete:function(e,t){return"timeout"===t?void r.reject(new a.RequestTimeout):0===e.status?void r.reject(new a.Network({more:e})):void r.resolve({statusCode:e.status,body:e.responseJSON,responseText:e.responseText,headers:e.getAllResponseHeaders()})}})}).promise()},o.prototype._request.fallback=function(e,t){return e=c(e,t.headers),new f.Deferred(function(r){u(e,t,function(e,t){return e?void r.reject(e):void r.resolve(t)})}).promise()},o.prototype._promise={reject:function(e){return new f.Deferred(function(t){t.reject(e)}).promise()},resolve:function(e){return new f.Deferred(function(t){t.resolve(e)}).promise()},delay:function(e){return new f.Deferred(function(t){setTimeout(function(){t.resolve()},e)}).promise()}}},{1:1,6:6,62:62,81:81,84:84,85:85,86:86,87:87,89:89,90:90,91:91}],84:[function(e,t,r){"use strict";function n(t,r,i){var s=e(62),a=e(85);return i=s(i||{}),void 0===i.protocol&&(i.protocol=a()),i._ua=i._ua||n.ua,new o(t,r,i)}function o(){a.apply(this,arguments)}t.exports=n;var i=e(6),s=window.Promise||e(4).Promise,a=e(81),c=e(89),u=e(86),l=e(87),f=e(90);n.version=e(91),n.ua="Algolia for vanilla JavaScript "+n.version,n.initPlaces=f(n),window.__algolia={debug:e(1),algoliasearch:n};var p={hasXMLHttpRequest:"XMLHttpRequest"in window,hasXDomainRequest:"XDomainRequest"in window,cors:"withCredentials"in new XMLHttpRequest,timeout:"timeout"in new XMLHttpRequest};i(o,a),o.prototype._request=function(e,t){return new s(function(r,n){function o(){if(!l){p.timeout||clearTimeout(a);var e;try{e={body:JSON.parse(h.responseText),responseText:h.responseText,statusCode:h.status,headers:h.getAllResponseHeaders&&h.getAllResponseHeaders()||{}}}catch(t){e=new c.UnparsableJSON({more:h.responseText})}e instanceof c.UnparsableJSON?n(e):r(e)}}function i(e){l||(p.timeout||clearTimeout(a),n(new c.Network({more:e})))}function s(){p.timeout||(l=!0,h.abort()),n(new c.RequestTimeout)}if(!p.cors&&!p.hasXDomainRequest)return void n(new c.Network("CORS not supported"));e=u(e,t.headers);var a,l,f=t.body,h=p.cors?new XMLHttpRequest:new XDomainRequest;h instanceof XMLHttpRequest?h.open(t.method,e,!0):h.open(t.method,e),p.cors&&(f&&("POST"===t.method?h.setRequestHeader("content-type","application/x-www-form-urlencoded"):h.setRequestHeader("content-type","application/json")),h.setRequestHeader("accept","application/json")),h.onprogress=function(){},h.onload=o,h.onerror=i,p.timeout?(h.timeout=t.timeout,h.ontimeout=s):a=setTimeout(s,t.timeout),h.send(f)})},o.prototype._request.fallback=function(e,t){return e=u(e,t.headers),new s(function(r,n){l(e,t,function(e,t){return e?void n(e):void r(t)})})},o.prototype._promise={reject:function(e){return s.reject(e)},resolve:function(e){return s.resolve(e)},delay:function(e){return new s(function(t){setTimeout(t,e)})}}},{1:1,4:4,6:6,62:62,81:81,85:85,86:86,87:87,89:89,90:90,91:91}],85:[function(e,t,r){"use strict";function n(){var e=window.document.location.protocol;return"http:"!==e&&"https:"!==e&&(e="http:"),e}t.exports=n},{}],86:[function(e,t,r){"use strict";function n(e,t){return e+=/\?/.test(e)?"&":"?",e+o.encode(t)}t.exports=n;var o=e(80)},{80:80}],87:[function(e,t,r){"use strict";function n(e,t,r){function n(){t.debug("JSONP: success"),y||f||(y=!0,l||(t.debug("JSONP: Fail. Script loaded but did not call the callback"),a(),r(new o.JSONPScriptFail)))}function s(){"loaded"!==this.readyState&&"complete"!==this.readyState||n()}function a(){clearTimeout(v),h.onload=null,h.onreadystatechange=null,h.onerror=null,p.removeChild(h);try{delete window[d],delete window[d+"_loaded"]}catch(e){window[d]=null,window[d+"_loaded"]=null}}function c(){t.debug("JSONP: Script timeout"),f=!0,a(),r(new o.RequestTimeout)}function u(){t.debug("JSONP: Script error"),y||f||(a(),r(new o.JSONPScriptError))}if("GET"!==t.method)return void r(new Error("Method "+t.method+" "+e+" is not supported by JSONP."));t.debug("JSONP: start");var l=!1,f=!1;i+=1;var p=document.getElementsByTagName("head")[0],h=document.createElement("script"),d="algoliaJSONP_"+i,y=!1;window[d]=function(e){try{delete window[d]}catch(t){window[d]=void 0}f||(l=!0,a(),r(null,{body:e}))},e+="&callback="+d,t.jsonBody&&t.jsonBody.params&&(e+="&"+t.jsonBody.params);var v=setTimeout(c,t.timeout);h.onreadystatechange=s,h.onload=n,h.onerror=u,h.async=!0,h.defer=!0,h.src=e,p.appendChild(h)}t.exports=n;var o=e(89),i=0},{89:89}],88:[function(e,t,r){function n(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):void 0!==r&&null!==r||(r="");var s="";return void 0!==r&&(s+=e+"="+encodeURIComponent(r)),void 0!==n&&(s=this.as._getSearchParams(n,s)),this._search(s,t,i)}}t.exports=n;var o=e(89)},{89:89}],89:[function(e,t,r){"use strict";function n(t,r){var n=e(8),o=this;"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):o.stack=(new Error).stack||"Cannot get a stacktrace, browser is too old",this.name=this.constructor.name,this.message=t||"Unknown error",r&&n(r,function(e,t){o[t]=e})}function o(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 i(r,n),r}var i=e(6);i(n,Error),t.exports={AlgoliaSearchError:n,UnparsableJSON:o("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),RequestTimeout:o("RequestTimeout","Request timedout before getting a response"),Network:o("Network","Network issue, see err.more for details"),JSONPScriptFail:o("JSONPScriptFail","