blob: c166178da16225c142d431f1cbf2c5fa4030515a [file] [log] [blame]
/*! docsearch 1.5.0 | © Algolia | github.com/algolia/docsearch */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.docsearch=e():t.docsearch=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return t[r].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";t.exports=n(1)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),o=r(i),s=n(3),a=r(s),u=n(68),c=r(u),l=(0,o.default)(a.default);l.version=c.default,e.default=l,t.exports=e.default},function(t,e){"use strict";function n(t){var e=function(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];return new(r.apply(t,[null].concat(n)))};return e.__proto__=t,e.prototype=t.prototype,e}var r=Function.prototype.bind;t.exports=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},s=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),a=n(4),u=r(a),c=n(7),l=r(c),h=n(43),p=r(h),f=n(65),d=r(f),m=n(66),y=r(m),g=n(68),v=r(g),b=n(67),w=r(b),_="Usage:\n documentationSearch({\n apiKey,\n indexName,\n inputSelector,\n [ appId ],\n [ algoliaOptions.{hitsPerPage} ]\n [ autocompleteOptions.{hint,debug} ]\n})",x=function(){function t(e){var n=e.apiKey,r=e.indexName,s=e.inputSelector,a=e.appId,u=void 0===a?"BH4D9OD16A":a,c=e.debug,h=void 0!==c&&c,f=e.algoliaOptions,m=void 0===f?{}:f,y=e.autocompleteOptions,g=void 0===y?{debug:!1,hint:!1,autoselect:!0}:y;i(this,t),t.checkArguments({apiKey:n,indexName:r,inputSelector:s,debug:h,algoliaOptions:m,autocompleteOptions:g}),this.apiKey=n,this.appId=u,this.indexName=r,this.input=t.getInputFromSelector(s),this.algoliaOptions=o({hitsPerPage:5},m);var b=!(!g||!g.debug)&&g.debug;g.debug=h||b,this.autocompleteOptions=g,this.client=(0,l.default)(this.appId,this.apiKey),this.client.addAlgoliaAgent("docsearch.js "+v.default),this.autocomplete=(0,p.default)(this.input,g,[{source:this.getAutocompleteSource(),templates:{suggestion:t.getSuggestionTemplate(),footer:d.default.footer}}]),this.autocomplete.on("autocomplete:selected",this.handleSelected.bind(null,this.autocomplete.autocomplete)),this.autocomplete.on("autocomplete:shown",this.handleShown.bind(null,this.input))}return s(t,[{key:"getAutocompleteSource",value:function(){var e=this;return function(n,r){e.client.search([{indexName:e.indexName,query:n,params:e.algoliaOptions}]).then(function(e){r(t.formatHits(e.results[0].hits))})}}},{key:"handleSelected",value:function(t,e,n){t.setVal(""),window.location.href=n.url}},{key:"handleShown",value:function(t,e){var n=t.offset().left+t.width()/2,r=(0,w.default)(document).width()/2;isNaN(r)&&(r=900);var i=n-r>=0?"algolia-autocomplete-right":"algolia-autocomplete-left",o=n-r<0?"algolia-autocomplete-right":"algolia-autocomplete-left",s=(0,w.default)(".algolia-autocomplete");s.hasClass(i)||s.addClass(i),s.hasClass(o)&&s.removeClass(o)}}],[{key:"checkArguments",value:function(e){if(!e.apiKey||!e.indexName)throw new Error(_);if(!t.getInputFromSelector(e.inputSelector))throw new Error("Error: No input element in the page matches "+e.inputSelector)}},{key:"getInputFromSelector",value:function(t){var e=(0,w.default)(t).filter("input");return e.length?(0,w.default)(e[0]):null}},{key:"formatHits",value:function(e){var n=y.default.deepClone(e),r=n.map(function(t){return t._highlightResult&&(t._highlightResult=y.default.mergeKeyWithParent(t._highlightResult,"hierarchy")),y.default.mergeKeyWithParent(t,"hierarchy")}),i=y.default.groupBy(r,"lvl0");return w.default.each(i,function(t,e){var n=y.default.groupBy(e,"lvl1"),r=y.default.flattenAndFlagFirst(n,"isSubCategoryHeader");i[t]=r}),i=y.default.flattenAndFlagFirst(i,"isCategoryHeader"),i.map(function(e){var n=t.formatURL(e),r=y.default.getHighlightedValue(e,"lvl0"),i=y.default.getHighlightedValue(e,"lvl1")||r,o=i==r,s=y.default.compact([y.default.getHighlightedValue(e,"lvl2")||i,y.default.getHighlightedValue(e,"lvl3"),y.default.getHighlightedValue(e,"lvl4"),y.default.getHighlightedValue(e,"lvl5"),y.default.getHighlightedValue(e,"lvl6")]).join('<span class="aa-suggestion-title-separator" aria-hidden="true"> › </span>'),a=s==i,u=y.default.getSnippetedValue(e,"content"),c=i&&""!=i||s&&""!=s;return{isCategoryHeader:e.isCategoryHeader,isSubCategoryHeader:e.isSubCategoryHeader,isSubcategoryDuplicate:o,isDisplayTitleDuplicate:a,isTextOrSubcatoryNonEmpty:c,category:r,subcategory:i,title:s,text:u,url:n}})}},{key:"formatURL",value:function(t){var e=t.url,n=t.anchor;if(e){var r=e.indexOf("#")!==-1;return r?e:n?t.url+"#"+t.anchor:e}return n?"#"+t.anchor:(console.warn("no anchor nor url for : ",JSON.stringify(t)),null)}},{key:"getSuggestionTemplate",value:function(){var t=u.default.compile(d.default.suggestion);return function(e){return t.render(e)}}}]),t}();e.default=x,t.exports=e.default},function(t,e,n){var r=n(5);r.Template=n(6).Template,r.template=r.Template,t.exports=r},function(t,e,n){!function(t){function e(t){"}"===t.n.substr(t.n.length-1)&&(t.n=t.n.substring(0,t.n.length-1))}function n(t){return t.trim?t.trim():t.replace(/^\s*|\s*$/g,"")}function r(t,e,n){if(e.charAt(n)!=t.charAt(0))return!1;for(var r=1,i=t.length;r<i;r++)if(e.charAt(n+r)!=t.charAt(r))return!1;return!0}function i(e,n,r,a){var u=[],c=null,l=null,h=null;for(l=r[r.length-1];e.length>0;){if(h=e.shift(),l&&"<"==l.tag&&!(h.tag in _))throw new Error("Illegal content in < super tag.");if(t.tags[h.tag]<=t.tags.$||o(h,a))r.push(h),h.nodes=i(e,h.tag,r,a);else{if("/"==h.tag){if(0===r.length)throw new Error("Closing tag without opener: /"+h.n);if(c=r.pop(),h.n!=c.n&&!s(h.n,c.n,a))throw new Error("Nesting error: "+c.n+" vs. "+h.n);return c.end=h.i,u}"\n"==h.tag&&(h.last=0==e.length||"\n"==e[0].tag)}u.push(h)}if(r.length>0)throw new Error("missing closing tag: "+r.pop().n);return u}function o(t,e){for(var n=0,r=e.length;n<r;n++)if(e[n].o==t.n)return t.tag="#",!0}function s(t,e,n){for(var r=0,i=n.length;r<i;r++)if(n[r].c==t&&n[r].o==e)return!0}function a(t){var e=[];for(var n in t)e.push('"'+c(n)+'": function(c,p,t,i) {'+t[n]+"}");return"{ "+e.join(",")+" }"}function u(t){var e=[];for(var n in t.partials)e.push('"'+c(n)+'":{name:"'+c(t.partials[n].name)+'", '+u(t.partials[n])+"}");return"partials: {"+e.join(",")+"}, subs: "+a(t.subs)}function c(t){return t.replace(v,"\\\\").replace(m,'\\"').replace(y,"\\n").replace(g,"\\r").replace(b,"\\u2028").replace(w,"\\u2029")}function l(t){return~t.indexOf(".")?"d":"f"}function h(t,e){var n="<"+(e.prefix||""),r=n+t.n+x++;return e.partials[r]={name:t.n,partials:{}},e.code+='t.b(t.rp("'+c(r)+'",c,p,"'+(t.indent||"")+'"));',r}function p(t,e){e.code+="t.b(t.t(t."+l(t.n)+'("'+c(t.n)+'",c,p,0)));'}function f(t){return"t.b("+t+");"}var d=/\S/,m=/\"/g,y=/\n/g,g=/\r/g,v=/\\/g,b=/\u2028/,w=/\u2029/;t.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},t.scan=function(i,o){function s(){v.length>0&&(b.push({tag:"_t",text:new String(v)}),v="")}function a(){for(var e=!0,n=x;n<b.length;n++)if(e=t.tags[b[n].tag]<t.tags._v||"_t"==b[n].tag&&null===b[n].text.match(d),!e)return!1;return e}function u(t,e){if(s(),t&&a())for(var n,r=x;r<b.length;r++)b[r].text&&((n=b[r+1])&&">"==n.tag&&(n.indent=b[r].text.toString()),b.splice(r,1));else e||b.push({tag:"\n"});w=!1,x=b.length}function c(t,e){var r="="+S,i=t.indexOf(r,e),o=n(t.substring(t.indexOf("=",e)+1,i)).split(" ");return T=o[0],S=o[o.length-1],i+r.length-1}var l=i.length,h=0,p=1,f=2,m=h,y=null,g=null,v="",b=[],w=!1,_=0,x=0,T="{{",S="}}";for(o&&(o=o.split(" "),T=o[0],S=o[1]),_=0;_<l;_++)m==h?r(T,i,_)?(--_,s(),m=p):"\n"==i.charAt(_)?u(w):v+=i.charAt(_):m==p?(_+=T.length-1,g=t.tags[i.charAt(_+1)],y=g?i.charAt(_+1):"_v","="==y?(_=c(i,_),m=h):(g&&_++,m=f),w=_):r(S,i,_)?(b.push({tag:y,n:n(v),otag:T,ctag:S,i:"/"==y?w-T.length:_+S.length}),v="",_+=S.length-1,m=h,"{"==y&&("}}"==S?_++:e(b[b.length-1]))):v+=i.charAt(_);return u(w,!0),b};var _={_t:!0,"\n":!0,$:!0,"/":!0};t.stringify=function(e,n,r){return"{code: function (c,p,i) { "+t.wrapMain(e.code)+" },"+u(e)+"}"};var x=0;t.generate=function(e,n,r){x=0;var i={code:"",subs:{},partials:{}};return t.walk(e,i),r.asString?this.stringify(i,n,r):this.makeTemplate(i,n,r)},t.wrapMain=function(t){return'var t=this;t.b(i=i||"");'+t+"return t.fl();"},t.template=t.Template,t.makeTemplate=function(t,e,n){var r=this.makePartials(t);return r.code=new Function("c","p","i",this.wrapMain(t.code)),new this.template(r,e,this,n)},t.makePartials=function(t){var e,n={subs:{},partials:t.partials,name:t.name};for(e in n.partials)n.partials[e]=this.makePartials(n.partials[e]);for(e in t.subs)n.subs[e]=new Function("c","p","t","i",t.subs[e]);return n},t.codegen={"#":function(e,n){n.code+="if(t.s(t."+l(e.n)+'("'+c(e.n)+'",c,p,1),c,p,0,'+e.i+","+e.end+',"'+e.otag+" "+e.ctag+'")){t.rs(c,p,function(c,p,t){',t.walk(e.nodes,n),n.code+="});c.pop();}"},"^":function(e,n){n.code+="if(!t.s(t."+l(e.n)+'("'+c(e.n)+'",c,p,1),c,p,1,0,0,"")){',t.walk(e.nodes,n),n.code+="};"},">":h,"<":function(e,n){var r={partials:{},code:"",subs:{},inPartial:!0};t.walk(e.nodes,r);var i=n.partials[h(e,n)];i.subs=r.subs,i.partials=r.partials},$:function(e,n){var r={subs:{},code:"",partials:n.partials,prefix:e.n};t.walk(e.nodes,r),n.subs[e.n]=r.code,n.inPartial||(n.code+='t.sub("'+c(e.n)+'",c,p,i);')},"\n":function(t,e){e.code+=f('"\\n"'+(t.last?"":" + i"))},_v:function(t,e){e.code+="t.b(t.v(t."+l(t.n)+'("'+c(t.n)+'",c,p,0)));'},_t:function(t,e){e.code+=f('"'+c(t.text)+'"')},"{":p,"&":p},t.walk=function(e,n){for(var r,i=0,o=e.length;i<o;i++)r=t.codegen[e[i].tag],r&&r(e[i],n);return n},t.parse=function(t,e,n){return n=n||{},i(t,"",[],n.sectionTags||[])},t.cache={},t.cacheKey=function(t,e){return[t,!!e.asString,!!e.disableLambda,e.delimiters,!!e.modelGet].join("||")},t.compile=function(e,n){n=n||{};var r=t.cacheKey(e,n),i=this.cache[r];if(i){var o=i.partials;for(var s in o)delete o[s].instance;return i}return i=this.generate(this.parse(this.scan(e,n.delimiters),e,n),e,n),this.cache[r]=i}}(e)},function(t,e,n){!function(t){function e(t,e,n){var r;return e&&"object"==typeof e&&(void 0!==e[t]?r=e[t]:n&&e.get&&"function"==typeof e.get&&(r=e.get(t))),r}function n(t,e,n,r,i,o){function s(){}function a(){}s.prototype=t,a.prototype=t.subs;var u,c=new s;c.subs=new a,c.subsText={},c.buf="",r=r||{},c.stackSubs=r,c.subsText=o;for(u in e)r[u]||(r[u]=e[u]);for(u in r)c.subs[u]=r[u];i=i||{},c.stackPartials=i;for(u in n)i[u]||(i[u]=n[u]);for(u in i)c.partials[u]=i[u];return c}function r(t){return String(null===t||void 0===t?"":t)}function i(t){return t=r(t),l.test(t)?t.replace(o,"&amp;").replace(s,"&lt;").replace(a,"&gt;").replace(u,"&#39;").replace(c,"&quot;"):t}t.Template=function(t,e,n,r){t=t||{},this.r=t.code||this.r,this.c=n,this.options=r||{},this.text=e||"",this.partials=t.partials||{},this.subs=t.subs||{},this.buf=""},t.Template.prototype={r:function(t,e,n){return""},v:i,t:r,render:function(t,e,n){return this.ri([t],e||{},n)},ri:function(t,e,n){return this.r(t,e,n)},ep:function(t,e){var r=this.partials[t],i=e[r.name];if(r.instance&&r.base==i)return r.instance;if("string"==typeof i){if(!this.c)throw new Error("No compiler available.");i=this.c.compile(i,this.options)}if(!i)return null;if(this.partials[t].base=i,r.subs){e.stackText||(e.stackText={});for(key in r.subs)e.stackText[key]||(e.stackText[key]=void 0!==this.activeSub&&e.stackText[this.activeSub]?e.stackText[this.activeSub]:this.text);i=n(i,r.subs,r.partials,this.stackSubs,this.stackPartials,e.stackText)}return this.partials[t].instance=i,i},rp:function(t,e,n,r){var i=this.ep(t,n);return i?i.ri(e,n,r):""},rs:function(t,e,n){var r=t[t.length-1];if(!h(r))return void n(t,e,this);for(var i=0;i<r.length;i++)t.push(r[i]),n(t,e,this),t.pop()},s:function(t,e,n,r,i,o,s){var a;return(!h(t)||0!==t.length)&&("function"==typeof t&&(t=this.ms(t,e,n,r,i,o,s)),a=!!t,!r&&a&&e&&e.push("object"==typeof t?t:e[e.length-1]),a)},d:function(t,n,r,i){var o,s=t.split("."),a=this.f(s[0],n,r,i),u=this.options.modelGet,c=null;if("."===t&&h(n[n.length-2]))a=n[n.length-1];else for(var l=1;l<s.length;l++)o=e(s[l],a,u),void 0!==o?(c=a,a=o):a="";return!(i&&!a)&&(i||"function"!=typeof a||(n.push(c),a=this.mv(a,n,r),n.pop()),a)},f:function(t,n,r,i){for(var o=!1,s=null,a=!1,u=this.options.modelGet,c=n.length-1;c>=0;c--)if(s=n[c],o=e(t,s,u),void 0!==o){a=!0;break}return a?(i||"function"!=typeof o||(o=this.mv(o,n,r)),o):!i&&""},ls:function(t,e,n,i,o){var s=this.options.delimiters;return this.options.delimiters=o,this.b(this.ct(r(t.call(e,i)),e,n)),this.options.delimiters=s,!1},ct:function(t,e,n){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(t,this.options).render(e,n)},b:function(t){this.buf+=t},fl:function(){var t=this.buf;return this.buf="",t},ms:function(t,e,n,r,i,o,s){var a,u=e[e.length-1],c=t.call(u);return"function"==typeof c?!!r||(a=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(c,u,n,a.substring(i,o),s)):c},mv:function(t,e,n){var i=e[e.length-1],o=t.call(i);return"function"==typeof o?this.ct(r(o.call(i)),i,n):o},sub:function(t,e,n,r){var i=this.subs[t];i&&(this.activeSub=t,i(e,n,this,r),this.activeSub=!1)}};var o=/&/g,s=/</g,a=/>/g,u=/\'/g,c=/\"/g,l=/[&<>\"\']/,h=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}}(e)},function(t,e,n){"use strict";var r=n(8),i=n(33);t.exports=i(r)},function(t,e,n){function r(){u.apply(this,arguments)}function i(){var t="Not implemented in this environment.\nIf you feel this is a mistake, write to support@algolia.com";throw new l.AlgoliaSearchError(t)}t.exports=r;var o=n(9),s=n(15),a=n(16),u=n(27),c=n(10),l=n(13);c(r,u),r.prototype.deleteIndex=function(t,e){return this._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(t),hostType:"write",callback:e})},r.prototype.moveIndex=function(t,e,n){var r={operation:"move",destination:e};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(t)+"/operation",body:r,hostType:"write",callback:n})},r.prototype.copyIndex=function(t,e,n){var r={operation:"copy",destination:e};return this._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(t)+"/operation",body:r,hostType:"write",callback:n})},r.prototype.getLogs=function(t,e,r){var i=n(18),o={};return"object"==typeof t?(o=i(t),r=e):0===arguments.length||"function"==typeof t?r=t:1===arguments.length||"function"==typeof e?(r=e,o.offset=t):(o.offset=t,o.length=e),void 0===o.offset&&(o.offset=0),void 0===o.length&&(o.length=10),this._jsonRequest({method:"GET",url:"/1/logs?"+this._getSearchParams(o,""),hostType:"read",callback:r})},r.prototype.listIndexes=function(t,e){var n="";return void 0===t||"function"==typeof t?e=t:n="?page="+t,this._jsonRequest({method:"GET",url:"/1/indexes"+n,hostType:"read",callback:e})},r.prototype.initIndex=function(t){return new o(this,t)},r.prototype.listUserKeys=function(t){return this._jsonRequest({method:"GET",url:"/1/keys",hostType:"read",callback:t})},r.prototype.getUserKeyACL=function(t,e){return this._jsonRequest({method:"GET",url:"/1/keys/"+t,hostType:"read",callback:e})},r.prototype.deleteUserKey=function(t,e){return this._jsonRequest({method:"DELETE",url:"/1/keys/"+t,hostType:"write",callback:e})},r.prototype.addUserKey=function(t,e,r){var i=n(22),o="Usage: client.addUserKey(arrayOfAcls[, params, callback])";if(!i(t))throw new Error(o);1!==arguments.length&&"function"!=typeof e||(r=e,e=null);var s={acl:t};return e&&(s.validity=e.validity,s.maxQueriesPerIPPerHour=e.maxQueriesPerIPPerHour,s.maxHitsPerQuery=e.maxHitsPerQuery,s.indexes=e.indexes,s.description=e.description,e.queryParameters&&(s.queryParameters=this._getSearchParams(e.queryParameters,"")),s.referers=e.referers),this._jsonRequest({method:"POST",url:"/1/keys",body:s,hostType:"write",callback:r})},r.prototype.addUserKeyWithValidity=s(function(t,e,n){return this.addUserKey(t,e,n)},a("client.addUserKeyWithValidity()","client.addUserKey()")),r.prototype.updateUserKey=function(t,e,r,i){var o=n(22),s="Usage: client.updateUserKey(key, arrayOfAcls[, params, callback])";if(!o(e))throw new Error(s);2!==arguments.length&&"function"!=typeof r||(i=r,r=null);var a={acl:e};return r&&(a.validity=r.validity,a.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,a.maxHitsPerQuery=r.maxHitsPerQuery,a.indexes=r.indexes,a.description=r.description,r.queryParameters&&(a.queryParameters=this._getSearchParams(r.queryParameters,"")),a.referers=r.referers),this._jsonRequest({method:"PUT",url:"/1/keys/"+t,body:a,hostType:"write",callback:i})},r.prototype.startQueriesBatch=s(function(){this._batch=[]},a("client.startQueriesBatch()","client.search()")),r.prototype.addQueryInBatch=s(function(t,e,n){this._batch.push({indexName:t,query:e,params:n})},a("client.addQueryInBatch()","client.search()")),r.prototype.sendQueriesBatch=s(function(t){return this.search(this._batch,t)},a("client.sendQueriesBatch()","client.search()")),r.prototype.batch=function(t,e){var r=n(22),i="Usage: client.batch(operations[, callback])";if(!r(t))throw new Error(i);return this._jsonRequest({method:"POST",url:"/1/indexes/*/batch",body:{requests:t},hostType:"write",callback:e})},r.prototype.destroy=i,r.prototype.enableRateLimitForward=i,r.prototype.disableRateLimitForward=i,r.prototype.useSecuredAPIKey=i,r.prototype.disableSecuredAPIKey=i,r.prototype.generateSecuredApiKey=i},function(t,e,n){function r(){o.apply(this,arguments)}var i=n(10),o=n(11),s=n(15),a=n(16),u=n(24),c=n(13),l=s(function(){},a("forwardToSlaves","forwardToReplicas"));t.exports=r,i(r,o),r.prototype.addObject=function(t,e,n){var r=this;return 1!==arguments.length&&"function"!=typeof e||(n=e,e=void 0),this.as._jsonRequest({method:void 0!==e?"PUT":"POST",url:"/1/indexes/"+encodeURIComponent(r.indexName)+(void 0!==e?"/"+encodeURIComponent(e):""),body:t,hostType:"write",callback:n})},r.prototype.addObjects=function(t,e){var r=n(22),i="Usage: index.addObjects(arrayOfObjects[, callback])";if(!r(t))throw new Error(i);for(var o=this,s={requests:[]},a=0;a<t.length;++a){var u={action:"addObject",body:t[a]};s.requests.push(u)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(o.indexName)+"/batch",body:s,hostType:"write",callback:e})},r.prototype.partialUpdateObject=function(t,e,n){1!==arguments.length&&"function"!=typeof e||(n=e,e=void 0);var r=this,i="/1/indexes/"+encodeURIComponent(r.indexName)+"/"+encodeURIComponent(t.objectID)+"/partial";return e===!1&&(i+="?createIfNotExists=false"),this.as._jsonRequest({method:"POST",url:i,body:t,hostType:"write",callback:n})},r.prototype.partialUpdateObjects=function(t,e){var r=n(22),i="Usage: index.partialUpdateObjects(arrayOfObjects[, callback])";if(!r(t))throw new Error(i);for(var o=this,s={requests:[]},a=0;a<t.length;++a){var u={action:"partialUpdateObject",objectID:t[a].objectID,body:t[a]};s.requests.push(u)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(o.indexName)+"/batch",body:s,hostType:"write",callback:e})},r.prototype.saveObject=function(t,e){var n=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/"+encodeURIComponent(t.objectID),body:t,hostType:"write",callback:e})},r.prototype.saveObjects=function(t,e){var r=n(22),i="Usage: index.saveObjects(arrayOfObjects[, callback])";if(!r(t))throw new Error(i);for(var o=this,s={requests:[]},a=0;a<t.length;++a){var u={action:"updateObject",objectID:t[a].objectID,body:t[a]};s.requests.push(u)}return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(o.indexName)+"/batch",body:s,hostType:"write",callback:e})},r.prototype.deleteObject=function(t,e){if("function"==typeof t||"string"!=typeof t&&"number"!=typeof t){var n=new c.AlgoliaSearchError("Cannot delete an object without an objectID");return e=t,"function"==typeof e?e(n):this.as._promise.reject(n)}var r=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/"+encodeURIComponent(t),hostType:"write",callback:e})},r.prototype.deleteObjects=function(t,e){var r=n(22),i=n(23),o="Usage: index.deleteObjects(arrayOfObjectIDs[, callback])";if(!r(t))throw new Error(o);var s=this,a={requests:i(t,function(t){return{action:"deleteObject",objectID:t,body:{objectID:t}}})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(s.indexName)+"/batch",body:a,hostType:"write",callback:e})},r.prototype.deleteByQuery=function(t,e,r){function i(t){if(0===t.nbHits)return t;var e=h(t.hits,function(t){return t.objectID});return p.deleteObjects(e).then(o).then(s)}function o(t){return p.waitTask(t.taskID)}function s(){return p.deleteByQuery(t,e)}function a(){u(function(){r(null)},f._setTimeout||setTimeout)}function c(t){u(function(){r(t)},f._setTimeout||setTimeout)}var l=n(18),h=n(23),p=this,f=p.as;1===arguments.length||"function"==typeof e?(r=e,e={}):e=l(e),e.attributesToRetrieve="objectID",e.hitsPerPage=1e3,e.distinct=!1,this.clearCache();var d=this.search(t,e).then(i);return r?void d.then(a,c):d},r.prototype.browseAll=function(t,e){function r(t){if(!a._stopped){var e;e=void 0!==t?"cursor="+encodeURIComponent(t):l,u._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(c.indexName)+"/browse?"+e,hostType:"read",callback:i})}}function i(t,e){if(!a._stopped)return t?void a._error(t):(a._result(e),void 0===e.cursor?void a._end():void r(e.cursor))}"object"==typeof t&&(e=t,t=void 0);var o=n(17),s=n(25),a=new s,u=this.as,c=this,l=u._getSearchParams(o({},e||{},{query:t}),"");return r(),a},r.prototype.ttAdapter=function(t){var e=this;return function(n,r,i){var o;o="function"==typeof i?i:r,e.search(n,t,function(t,e){return t?void o(t):void o(e.hits)})}},r.prototype.waitTask=function(t,e){function n(){return l._jsonRequest({method:"GET",hostType:"read",url:"/1/indexes/"+encodeURIComponent(c.indexName)+"/task/"+t}).then(function(t){a++;var e=o*a*a;return e>s&&(e=s),"published"!==t.status?l._promise.delay(e).then(n):t})}function r(t){u(function(){e(null,t)},l._setTimeout||setTimeout)}function i(t){u(function(){e(t)},l._setTimeout||setTimeout)}var o=100,s=5e3,a=0,c=this,l=c.as,h=n();return e?void h.then(r,i):h},r.prototype.clearIndex=function(t){var e=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(e.indexName)+"/clear",hostType:"write",callback:t})},r.prototype.getSettings=function(t){var e=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(e.indexName)+"/settings?getVersion=2",hostType:"read",callback:t})},r.prototype.searchSynonyms=function(t,e){return"function"==typeof t?(e=t,t={}):void 0===t&&(t={}),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/search",body:t,hostType:"read",callback:e})},r.prototype.saveSynonym=function(t,e,n){"function"==typeof e?(n=e,e={}):void 0===e&&(e={}),void 0!==e.forwardToSlaves&&l();var r=e.forwardToSlaves||e.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(t.objectID)+"?forwardToReplicas="+r,body:t,hostType:"write",callback:n})},r.prototype.getSynonym=function(t,e){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(t),hostType:"read",callback:e})},r.prototype.deleteSynonym=function(t,e,n){"function"==typeof e?(n=e,e={}):void 0===e&&(e={}),void 0!==e.forwardToSlaves&&l();var r=e.forwardToSlaves||e.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(t)+"?forwardToReplicas="+r,hostType:"write",callback:n})},r.prototype.clearSynonyms=function(t,e){"function"==typeof t?(e=t,t={}):void 0===t&&(t={}),void 0!==t.forwardToSlaves&&l();var n=t.forwardToSlaves||t.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/clear?forwardToReplicas="+n,hostType:"write",callback:e})},r.prototype.batchSynonyms=function(t,e,n){"function"==typeof e?(n=e,e={}):void 0===e&&(e={}),void 0!==e.forwardToSlaves&&l();var r=e.forwardToSlaves||e.forwardToReplicas?"true":"false";return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/batch?forwardToReplicas="+r+"&replaceExistingSynonyms="+(e.replaceExistingSynonyms?"true":"false"),hostType:"write",body:t,callback:n})},r.prototype.setSettings=function(t,e,n){1!==arguments.length&&"function"!=typeof e||(n=e,e={}),void 0!==e.forwardToSlaves&&l();var r=e.forwardToSlaves||e.forwardToReplicas?"true":"false",i=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(i.indexName)+"/settings?forwardToReplicas="+r,hostType:"write",body:t,callback:n})},r.prototype.listUserKeys=function(t){var e=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(e.indexName)+"/keys",hostType:"read",callback:t})},r.prototype.getUserKeyACL=function(t,e){var n=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/keys/"+t,hostType:"read",callback:e})},r.prototype.deleteUserKey=function(t,e){var n=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(n.indexName)+"/keys/"+t,hostType:"write",callback:e})},r.prototype.addUserKey=function(t,e,r){var i=n(22),o="Usage: index.addUserKey(arrayOfAcls[, params, callback])";if(!i(t))throw new Error(o);1!==arguments.length&&"function"!=typeof e||(r=e,e=null);var s={acl:t};return e&&(s.validity=e.validity,s.maxQueriesPerIPPerHour=e.maxQueriesPerIPPerHour,s.maxHitsPerQuery=e.maxHitsPerQuery,s.description=e.description,e.queryParameters&&(s.queryParameters=this.as._getSearchParams(e.queryParameters,"")),s.referers=e.referers),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:s,hostType:"write",callback:r})},r.prototype.addUserKeyWithValidity=s(function(t,e,n){return this.addUserKey(t,e,n)},a("index.addUserKeyWithValidity()","index.addUserKey()")),r.prototype.updateUserKey=function(t,e,r,i){var o=n(22),s="Usage: index.updateUserKey(key, arrayOfAcls[, params, callback])";if(!o(e))throw new Error(s);2!==arguments.length&&"function"!=typeof r||(i=r,r=null);var a={acl:e};return r&&(a.validity=r.validity,a.maxQueriesPerIPPerHour=r.maxQueriesPerIPPerHour,a.maxHitsPerQuery=r.maxHitsPerQuery,a.description=r.description,r.queryParameters&&(a.queryParameters=this.as._getSearchParams(r.queryParameters,"")),a.referers=r.referers),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+t,body:a,hostType:"write",callback:i})}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(t,e,n){function r(t,e){this.indexName=e,this.as=t,this.typeAheadArgs=null,this.typeAheadValueOption=null,this.cache={}}var i=n(12),o=n(15),s=n(16);t.exports=r,r.prototype.clearCache=function(){this.cache={}},r.prototype.search=i("query"),r.prototype.similarSearch=i("similarQuery"),r.prototype.browse=function(t,e,r){var i,o,s=n(17),a=this;0===arguments.length||1===arguments.length&&"function"==typeof arguments[0]?(i=0,r=arguments[0],t=void 0):"number"==typeof arguments[0]?(i=arguments[0],"number"==typeof arguments[1]?o=arguments[1]:"function"==typeof arguments[1]&&(r=arguments[1],o=void 0),t=void 0,e=void 0):"object"==typeof arguments[0]?("function"==typeof arguments[1]&&(r=arguments[1]),e=arguments[0],t=void 0):"string"==typeof arguments[0]&&"function"==typeof arguments[1]&&(r=arguments[1],e=void 0),e=s({},e||{},{page:i,hitsPerPage:o,query:t});var u=this.as._getSearchParams(e,"");return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(a.indexName)+"/browse?"+u,hostType:"read",callback:r})},r.prototype.browseFrom=function(t,e){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse?cursor="+encodeURIComponent(t),hostType:"read",callback:e})},r.prototype.searchForFacetValues=function(t,e){var r=n(18),i=n(19),o="Usage: index.searchForFacetValues({facetName, facetQuery, ...params}[, callback])";if(void 0===t.facetName||void 0===t.facetQuery)throw new Error(o);var s=t.facetName,a=i(r(t),function(t){return"facetName"===t}),u=this.as._getSearchParams(a,"");return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/facets/"+encodeURIComponent(s)+"/query",hostType:"read",body:{params:u},callback:e})},r.prototype.searchFacet=o(function(t,e){return this.searchForFacetValues(t,e)},s("index.searchFacet(params[, callback])","index.searchForFacetValues(params[, callback])")),r.prototype._search=function(t,e,n,r){return this.as._jsonRequest({cache:this.cache,method:"POST",url:e||"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:t},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:t}},callback:n,additionalUA:r})},r.prototype.getObject=function(t,e,n){var r=this;1!==arguments.length&&"function"!=typeof e||(n=e,e=void 0);var i="";if(void 0!==e){i="?attributes=";for(var o=0;o<e.length;++o)0!==o&&(i+=","),i+=e[o]}return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/"+encodeURIComponent(t)+i,hostType:"read",callback:n})},r.prototype.getObjects=function(t,e,r){var i=n(22),o=n(23),s="Usage: index.getObjects(arrayOfObjectIDs[, callback])";if(!i(t))throw new Error(s);var a=this;1!==arguments.length&&"function"!=typeof e||(r=e,e=void 0);var u={requests:o(t,function(t){var n={indexName:a.indexName,objectID:t};return e&&(n.attributesToRetrieve=e.join(",")),n})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",hostType:"read",body:u,callback:r})},r.prototype.as=null,r.prototype.indexName=null,r.prototype.typeAheadArgs=null,r.prototype.typeAheadValueOption=null},function(t,e,n){function r(t,e){return function(n,r,o){if("function"==typeof n&&"object"==typeof r||"object"==typeof o)throw new i.AlgoliaSearchError("index.search usage is index.search(query, params, cb)");0===arguments.length||"function"==typeof n?(o=n,n=""):1!==arguments.length&&"function"!=typeof r||(o=r,r=void 0),"object"==typeof n&&null!==n?(r=n,n=void 0):void 0!==n&&null!==n||(n="");var s="";void 0!==n&&(s+=t+"="+encodeURIComponent(n));var a;return void 0!==r&&(r.additionalUA&&(a=r.additionalUA,delete r.additionalUA),s=this.as._getSearchParams(r,s)),this._search(s,e,o,a)}}t.exports=r;var i=n(13)},function(t,e,n){"use strict";function r(t,e){var r=n(14),i=this;"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):i.stack=(new Error).stack||"Cannot get a stacktrace, browser is too old",this.name="AlgoliaSearchError",this.message=t||"Unknown error",e&&r(e,function(t,e){i[e]=t})}function i(t,e){function n(){var n=Array.prototype.slice.call(arguments,0);"string"!=typeof n[0]&&n.unshift(e),r.apply(this,n),this.name="AlgoliaSearch"+t+"Error"}return o(n,r),n}var o=n(10);
o(r,Error),t.exports={AlgoliaSearchError:r,UnparsableJSON:i("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),RequestTimeout:i("RequestTimeout","Request timedout 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"),JSONPScriptError:i("JSONPScriptError","<script> unable to load due to an `error` event on it"),Unknown:i("Unknown","Unknown error occured")}},function(t,e){var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString;t.exports=function(t,e,i){if("[object Function]"!==r.call(e))throw new TypeError("iterator must be a function");var o=t.length;if(o===+o)for(var s=0;s<o;s++)e.call(i,t[s],s,t);else for(var a in t)n.call(t,a)&&e.call(i,t[a],a,t)}},function(t,e){t.exports=function(t,e){function n(){return r||(console.log(e),r=!0),t.apply(this,arguments)}var r=!1;return n}},function(t,e){t.exports=function(t,e){var n=t.toLowerCase().replace(".","").replace("()","");return"algoliasearch: `"+t+"` was replaced by `"+e+"`. Please see https://github.com/algolia/algoliasearch-client-js/wiki/Deprecated#"+n}},function(t,e,n){var r=n(14);t.exports=function t(e){var n=Array.prototype.slice.call(arguments);return r(n,function(n){for(var r in n)n.hasOwnProperty(r)&&("object"==typeof e[r]&&"object"==typeof n[r]?e[r]=t({},e[r],n[r]):void 0!==n[r]&&(e[r]=n[r]))}),e}},function(t,e){t.exports=function(t){return JSON.parse(JSON.stringify(t))}},function(t,e,n){t.exports=function(t,e){var r=n(20),i=n(14),o={};return i(r(t),function(n){e(n)!==!0&&(o[n]=t[n])}),o}},function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Array.prototype.slice,s=n(21),a=Object.prototype.propertyIsEnumerable,u=!a.call({toString:null},"toString"),c=a.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],h=function(t){var e=t.constructor;return e&&e.prototype===t},p={$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},f=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!p["$"+t]&&r.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{h(window[t])}catch(t){return!0}}catch(t){return!0}return!1}(),d=function(t){if("undefined"==typeof window||!f)return h(t);try{return h(t)}catch(t){return!1}},m=function(t){var e=null!==t&&"object"==typeof t,n="[object Function]"===i.call(t),o=s(t),a=e&&"[object String]"===i.call(t),h=[];if(!e&&!n&&!o)throw new TypeError("Object.keys called on a non-object");var p=c&&n;if(a&&t.length>0&&!r.call(t,0))for(var f=0;f<t.length;++f)h.push(String(f));if(o&&t.length>0)for(var m=0;m<t.length;++m)h.push(String(m));else for(var y in t)p&&"prototype"===y||!r.call(t,y)||h.push(String(y));if(u)for(var g=d(t),v=0;v<l.length;++v)g&&"constructor"===l[v]||!r.call(t,l[v])||h.push(l[v]);return h};m.shim=function(){if(Object.keys){var t=function(){return 2===(Object.keys(arguments)||"").length}(1,2);if(!t){var e=Object.keys;Object.keys=function(t){return e(s(t)?o.call(t):t)}}}else Object.keys=m;return Object.keys||m},t.exports=m},function(t,e){"use strict";var n=Object.prototype.toString;t.exports=function(t){var e=n.call(t),r="[object Arguments]"===e;return r||(r="[object Array]"!==e&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===n.call(t.callee)),r}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){var r=n(14);t.exports=function(t,e){var n=[];return r(t,function(r,i){n.push(e(r,i,t))}),n}},function(t,e){t.exports=function(t,e){e(t,0)}},function(t,e,n){"use strict";function r(){}t.exports=r;var i=n(10),o=n(26).EventEmitter;i(r,o),r.prototype.stop=function(){this._stopped=!0,this._clean()},r.prototype._end=function(){this.emit("end"),this._clean()},r.prototype._error=function(t){this.emit("error",t),this._clean()},r.prototype._result=function(t){this.emit("result",t)},r.prototype._clean=function(){this.removeAllListeners("stop"),this.removeAllListeners("end"),this.removeAllListeners("error"),this.removeAllListeners("result")}},function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(t){return"function"==typeof t}function i(t){return"number"==typeof t}function o(t){return"object"==typeof t&&null!==t}function s(t){return void 0===t}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!i(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,n,i,a,u,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var l=new Error('Uncaught, unspecified "error" event. ('+e+")");throw l.context=e,l}if(n=this._events[t],s(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(o(n))for(a=Array.prototype.slice.call(arguments,1),c=n.slice(),i=c.length,u=0;u<i;u++)c[u].apply(this,a);return!0},n.prototype.addListener=function(t,e){var i;if(!r(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,r(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(i=s(this._maxListeners)?n.defaultMaxListeners:this._maxListeners,i&&i>0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function n(){this.removeListener(t,n),i||(i=!0,e.apply(this,arguments))}if(!r(e))throw TypeError("listener must be a function");var i=!1;return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var n,i,s,a;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],s=n.length,i=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(n)){for(a=s;a-- >0;)if(n[a]===e||n[a].listener&&n[a].listener===e){i=a;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],r(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(r(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){function r(t,e,r){var o=n(29)("algoliasearch"),s=n(18),a=n(22),c=n(23),l="Usage: algoliasearch(applicationID, apiKey, opts)";if(r._allowEmptyCredentials!==!0&&!t)throw new u.AlgoliaSearchError("Please provide an application ID. "+l);if(r._allowEmptyCredentials!==!0&&!e)throw new u.AlgoliaSearchError("Please provide an API key. "+l);this.applicationID=t,this.apiKey=e,this.hosts={read:[],write:[]},r=r||{};var h=r.protocol||"https:";if(this._timeouts=r.timeouts||{connect:1e3,read:2e3,write:3e4},r.timeout&&(this._timeouts.connect=this._timeouts.read=this._timeouts.write=r.timeout),/:$/.test(h)||(h+=":"),"http:"!==r.protocol&&"https:"!==r.protocol)throw new u.AlgoliaSearchError("protocol must be `http:` or `https:` (was `"+r.protocol+"`)");if(this._checkAppIdData(),r.hosts)a(r.hosts)?(this.hosts.read=s(r.hosts),this.hosts.write=s(r.hosts)):(this.hosts.read=s(r.hosts.read),this.hosts.write=s(r.hosts.write));else{var p=c(this._shuffleResult,function(e){return t+"-"+e+".algolianet.com"});this.hosts.read=[this.applicationID+"-dsn.algolia.net"].concat(p),this.hosts.write=[this.applicationID+".algolia.net"].concat(p)}this.hosts.read=c(this.hosts.read,i(h)),this.hosts.write=c(this.hosts.write,i(h)),this.extraHeaders=[],this.cache=r._cache||{},this._ua=r._ua,this._useCache=!(void 0!==r._useCache&&!r._cache)||r._useCache,this._useFallback=void 0===r.useFallback||r.useFallback,this._setTimeout=r._setTimeout,o("init done, %j",this)}function i(t){return function(e){return t+"//"+e.toLowerCase()}}function o(t){if(void 0===Array.prototype.toJSON)return JSON.stringify(t);var e=Array.prototype.toJSON;delete Array.prototype.toJSON;var n=JSON.stringify(t);return Array.prototype.toJSON=e,n}function s(t){for(var e,n,r=t.length;0!==r;)n=Math.floor(Math.random()*r),r-=1,e=t[r],t[r]=t[n],t[n]=e;return t}function a(t){var e={};for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var r;r="x-algolia-api-key"===n||"x-algolia-application-id"===n?"**hidden for security purposes**":t[n],e[n]=r}return e}t.exports=r;var u=n(13),c=n(24),l=n(11),h=n(28),p=500,f={NODE_ENV:"production"}.RESET_APP_DATA_TIMER&&parseInt({NODE_ENV:"production"}.RESET_APP_DATA_TIMER,10)||12e4;r.prototype.initIndex=function(t){return new l(this,t)},r.prototype.setExtraHeader=function(t,e){this.extraHeaders.push({name:t.toLowerCase(),value:e})},r.prototype.addAlgoliaAgent=function(t){this._ua.indexOf(";"+t)===-1&&(this._ua+=";"+t)},r.prototype._jsonRequest=function(t){function e(n,c){function p(t){var e=t&&t.body&&t.body.message&&t.body.status||t.statusCode||t&&t.body&&200;s("received response: statusCode: %s, computed statusCode: %d, headers: %j",t.statusCode,e,t.headers);var n=2===Math.floor(e/100),o=new Date;if(g.push({currentHost:T,headers:a(i),content:r||null,contentLength:void 0!==r?r.length:null,method:c.method,timeouts:c.timeouts,url:c.url,startTime:x,endTime:o,duration:o-x,statusCode:e}),n)return f._useCache&&h&&(h[_]=t.responseText),t.body;var l=4!==Math.floor(e/100);if(l)return d+=1,b();s("unrecoverable error");var p=new u.AlgoliaSearchError(t.body&&t.body.message,{debugData:g,statusCode:e});return f._promise.reject(p)}function v(e){s("error: %s, stack: %s",e.message,e.stack);var n=new Date;return g.push({currentHost:T,headers:a(i),content:r||null,contentLength:void 0!==r?r.length:null,method:c.method,timeouts:c.timeouts,url:c.url,startTime:x,endTime:n,duration:n-x}),e instanceof u.AlgoliaSearchError||(e=new u.Unknown(e&&e.message,e)),d+=1,e instanceof u.Unknown||e instanceof u.UnparsableJSON||d>=f.hosts[t.hostType].length&&(m||!y)?(e.debugData=g,f._promise.reject(e)):e instanceof u.RequestTimeout?w():b()}function b(){return s("retrying request"),f._incrementHostIndex(t.hostType),e(n,c)}function w(){return s("retrying request with higher timeout"),f._incrementHostIndex(t.hostType),f._incrementTimeoutMultipler(),c.timeouts=f._getTimeoutsForRequest(t.hostType),e(n,c)}f._checkAppIdData();var _,x=new Date;if(f._useCache&&(_=t.url),f._useCache&&r&&(_+="_body_"+c.body),f._useCache&&h&&void 0!==h[_])return s("serving response from cache"),f._promise.resolve(JSON.parse(h[_]));if(d>=f.hosts[t.hostType].length)return!y||m?(s("could not get any response"),f._promise.reject(new u.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:g}))):(s("switching to fallback"),d=0,c.method=t.fallback.method,c.url=t.fallback.url,c.jsonBody=t.fallback.body,c.jsonBody&&(c.body=o(c.jsonBody)),i=f._computeRequestHeaders(l),c.timeouts=f._getTimeoutsForRequest(t.hostType),f._setHostIndexByType(0,t.hostType),m=!0,e(f._request.fallback,c));var T=f._getHostByType(t.hostType),S=T+c.url,C={body:c.body,jsonBody:c.jsonBody,method:c.method,headers:i,timeouts:c.timeouts,debug:s};return s("method: %s, url: %s, headers: %j, timeouts: %d",C.method,S,C.headers,C.timeouts),n===f._request.fallback&&s("using fallback"),n.call(f,S,C).then(p,v)}this._checkAppIdData();var r,i,s=n(29)("algoliasearch:"+t.url),l=t.additionalUA||"",h=t.cache,f=this,d=0,m=!1,y=f._useFallback&&f._request.fallback&&t.fallback;this.apiKey.length>p&&void 0!==t.body&&(void 0!==t.body.params||void 0!==t.body.requests)?(t.body.apiKey=this.apiKey,i=this._computeRequestHeaders(l,!1)):i=this._computeRequestHeaders(l),void 0!==t.body&&(r=o(t.body)),s("request start");var g=[],v=e(f._request,{url:t.url,method:t.method,body:r,jsonBody:t.body,timeouts:f._getTimeoutsForRequest(t.hostType)});return t.callback?void v.then(function(e){c(function(){t.callback(null,e)},f._setTimeout||setTimeout)},function(e){c(function(){t.callback(e)},f._setTimeout||setTimeout)}):v},r.prototype._getSearchParams=function(t,e){if(void 0===t||null===t)return e;for(var n in t)null!==n&&void 0!==t[n]&&t.hasOwnProperty(n)&&(e+=""===e?"":"&",e+=n+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(t[n])?o(t[n]):t[n]));return e},r.prototype._computeRequestHeaders=function(t,e){var r=n(14),i=t?this._ua+";"+t:this._ua,o={"x-algolia-agent":i,"x-algolia-application-id":this.applicationID};return e!==!1&&(o["x-algolia-api-key"]=this.apiKey),this.userToken&&(o["x-algolia-usertoken"]=this.userToken),this.securityTags&&(o["x-algolia-tagfilters"]=this.securityTags),this.extraHeaders&&r(this.extraHeaders,function(t){o[t.name]=t.value}),o},r.prototype.search=function(t,e,r){var i=n(22),o=n(23),s="Usage: client.search(arrayOfQueries[, callback])";if(!i(t))throw new Error(s);"function"==typeof e?(r=e,e={}):void 0===e&&(e={});var a=this,u={requests:o(t,function(t){var e="";return void 0!==t.query&&(e+="query="+encodeURIComponent(t.query)),{indexName:t.indexName,params:a._getSearchParams(t.params,e)}})},c=o(u.requests,function(t,e){return e+"="+encodeURIComponent("/1/indexes/"+encodeURIComponent(t.indexName)+"?"+t.params)}).join("&"),l="/1/indexes/*/queries";return void 0!==e.strategy&&(l+="?strategy="+e.strategy),this._jsonRequest({cache:this.cache,method:"POST",url:l,body:u,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:c}},callback:r})},r.prototype.setSecurityTags=function(t){if("[object Array]"===Object.prototype.toString.call(t)){for(var e=[],n=0;n<t.length;++n)if("[object Array]"===Object.prototype.toString.call(t[n])){for(var r=[],i=0;i<t[n].length;++i)r.push(t[n][i]);e.push("("+r.join(",")+")")}else e.push(t[n]);t=e.join(",")}this.securityTags=t},r.prototype.setUserToken=function(t){this.userToken=t},r.prototype.clearCache=function(){this.cache={}},r.prototype.setRequestTimeout=function(t){t&&(this._timeouts.connect=this._timeouts.read=this._timeouts.write=t)},r.prototype.setTimeouts=function(t){this._timeouts=t},r.prototype.getTimeouts=function(){return this._timeouts},r.prototype._getAppIdData=function(){var t=h.get(this.applicationID);return null!==t&&this._cacheAppIdData(t),t},r.prototype._setAppIdData=function(t){return t.lastChange=(new Date).getTime(),this._cacheAppIdData(t),h.set(this.applicationID,t)},r.prototype._checkAppIdData=function(){var t=this._getAppIdData(),e=(new Date).getTime();return null===t||e-t.lastChange>f?this._resetInitialAppIdData(t):t},r.prototype._resetInitialAppIdData=function(t){var e=t||{};return e.hostIndexes={read:0,write:0},e.timeoutMultiplier=1,e.shuffleResult=e.shuffleResult||s([1,2,3]),this._setAppIdData(e)},r.prototype._cacheAppIdData=function(t){this._hostIndexes=t.hostIndexes,this._timeoutMultiplier=t.timeoutMultiplier,this._shuffleResult=t.shuffleResult},r.prototype._partialAppIdDataUpdate=function(t){var e=n(14),r=this._getAppIdData();return e(t,function(t,e){r[e]=t}),this._setAppIdData(r)},r.prototype._getHostByType=function(t){return this.hosts[t][this._getHostIndexByType(t)]},r.prototype._getTimeoutMultiplier=function(){return this._timeoutMultiplier},r.prototype._getHostIndexByType=function(t){return this._hostIndexes[t]},r.prototype._setHostIndexByType=function(t,e){var r=n(18),i=r(this._hostIndexes);return i[e]=t,this._partialAppIdDataUpdate({hostIndexes:i}),t},r.prototype._incrementHostIndex=function(t){return this._setHostIndexByType((this._getHostIndexByType(t)+1)%this.hosts[t].length,t)},r.prototype._incrementTimeoutMultipler=function(){var t=Math.max(this._timeoutMultiplier+1,4);return this._partialAppIdDataUpdate({timeoutMultiplier:t})},r.prototype._getTimeoutsForRequest=function(t){return{connect:this._timeouts.connect*this._timeoutMultiplier,complete:this._timeouts[t]*this._timeoutMultiplier}}},function(t,e,n){(function(e){function r(t,e){return u("localStorage failed with",e),s(),a=l,a.get(t)}function i(t,e){return 1===arguments.length?a.get(t):a.set(t,e)}function o(){try{return"localStorage"in e&&null!==e.localStorage&&(e.localStorage[c]||e.localStorage.setItem(c,JSON.stringify({})),!0)}catch(t){return!1}}function s(){try{e.localStorage.removeItem(c)}catch(t){}}var a,u=n(29)("algoliasearch:src/hostIndexState.js"),c="algoliasearch-client-js",l={state:{},set:function(t,e){return this.state[t]=e,this.state[t]},get:function(t){return this.state[t]||null}},h={set:function(t,n){l.set(t,n);try{var i=JSON.parse(e.localStorage[c]);return i[t]=n,e.localStorage[c]=JSON.stringify(i),i[t]}catch(e){return r(t,e)}},get:function(t){try{return JSON.parse(e.localStorage[c])[t]||null}catch(e){return r(t,e)}}};a=o()?h:l,t.exports={get:i,set:i,supportsLocalStorage:o}}).call(e,function(){return this}())},function(t,e,n){(function(r){function i(){return"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function o(){var t=arguments,n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+e.humanize(this.diff),!n)return t;var r="color: "+this.color;t=[t[0],r,"color: inherit"].concat(Array.prototype.slice.call(t,1));var i=0,o=0;return t[0].replace(/%[a-z%]/g,function(t){"%%"!==t&&(i++,"%c"===t&&(o=i))}),t.splice(o,0,r),t}function s(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function a(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}}function u(){try{return e.storage.debug}catch(t){}if("undefined"!=typeof r&&"env"in r)return{NODE_ENV:"production"}.DEBUG}function c(){try{return window.localStorage}catch(t){}}e=t.exports=n(31),e.log=s,e.formatArgs=o,e.save=a,e.load=u,e.useColors=i,e.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:c(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(u())}).call(e,n(30))},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function o(t){if(h===clearTimeout)return clearTimeout(t);if((h===r||!h)&&clearTimeout)return h=clearTimeout,clearTimeout(t);try{return h(t)}catch(e){try{return h.call(null,t)}catch(e){return h.call(this,t)}}}function s(){m&&f&&(m=!1,f.length?d=f.concat(d):y=-1,d.length&&a())}function a(){if(!m){var t=i(s);m=!0;for(var e=d.length;e;){for(f=d,d=[];++y<e;)f&&f[y].run();y=-1,e=d.length}f=null,m=!1,o(t)}}function u(t,e){this.fun=t,this.array=e}function c(){}var l,h,p=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:n}catch(t){l=n}try{h="function"==typeof clearTimeout?clearTimeout:r}catch(t){h=r}}();var f,d=[],m=!1,y=-1;p.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];d.push(new u(t,e)),1!==d.length||m||i(a)},u.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=c,p.addListener=c,p.once=c,p.off=c,p.removeListener=c,p.removeAllListeners=c,p.emit=c,p.binding=function(t){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(t){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(t,e,n){function r(){return e.colors[l++%e.colors.length]}function i(t){function n(){}function i(){var t=i,n=+new Date,o=n-(c||n);t.diff=o,t.prev=c,t.curr=n,c=n,null==t.useColors&&(t.useColors=e.useColors()),null==t.color&&t.useColors&&(t.color=r());for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=e.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var u=0;s[0]=s[0].replace(/%([a-z%])/g,function(n,r){if("%%"===n)return n;u++;var i=e.formatters[r];if("function"==typeof i){var o=s[u];n=i.call(t,o),s.splice(u,1),u--}return n}),s=e.formatArgs.apply(t,s);var l=i.log||e.log||console.log.bind(console);l.apply(t,s)}n.enabled=!1,i.enabled=!0;var o=e.enabled(t)?i:n;return o.namespace=t,o}function o(t){e.save(t);for(var n=(t||"").split(/[\s,]+/),r=n.length,i=0;i<r;i++)n[i]&&(t=n[i].replace(/[\\^$+?.()|[\]{}]/g,"\\$&").replace(/\*/g,".*?"),"-"===t[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")))}function s(){e.enable("")}function a(t){var n,r;for(n=0,r=e.skips.length;n<r;n++)if(e.skips[n].test(t))return!1;for(n=0,r=e.names.length;n<r;n++)if(e.names[n].test(t))return!0;return!1}function u(t){return t instanceof Error?t.stack||t.message:t}e=t.exports=i.debug=i,e.coerce=u,e.disable=s,e.enable=o,e.enabled=a,e.humanize=n(32),e.names=[],e.skips=[],e.formatters={};var c,l=0},function(t,e){function n(t){if(t=String(t),!(t.length>1e4)){var e=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(e){var n=parseFloat(e[1]),r=(e[2]||"ms").toLowerCase();switch(r){case"years":case"year":case"yrs":case"yr":case"y":return n*l;case"days":case"day":case"d":return n*c;case"hours":case"hour":case"hrs":case"hr":case"h":return n*u;case"minutes":case"minute":case"mins":case"min":case"m":return n*a;case"seconds":case"second":case"secs":case"sec":case"s":return n*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function r(t){return t>=c?Math.round(t/c)+"d":t>=u?Math.round(t/u)+"h":t>=a?Math.round(t/a)+"m":t>=s?Math.round(t/s)+"s":t+"ms"}function i(t){return o(t,c,"day")||o(t,u,"hour")||o(t,a,"minute")||o(t,s,"second")||t+" ms"}function o(t,e,n){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+n:Math.ceil(t/e)+" "+n+"s"}var s=1e3,a=60*s,u=60*a,c=24*u,l=365.25*c;t.exports=function(t,e){e=e||{};var o=typeof t;if("string"===o&&t.length>0)return n(t);if("number"===o&&isNaN(t)===!1)return e.long?i(t):r(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,n){"use strict";var r=n(34),i=r.Promise||n(35).Promise;t.exports=function(t,e){function o(t,e,r){var i=n(18),a=n(41);return r=i(r||{}),void 0===r.protocol&&(r.protocol=a()),r._ua=r._ua||o.ua,new s(t,e,r)}function s(){t.apply(this,arguments)}var a=n(10),u=n(13),c=n(37),l=n(39),h=n(40);e=e||"",o.version=n(42),o.ua="Algolia for vanilla JavaScript "+e+o.version,o.initPlaces=h(o),r.__algolia={debug:n(29),algoliasearch:o};var p={hasXMLHttpRequest:"XMLHttpRequest"in r,hasXDomainRequest:"XDomainRequest"in r};return p.hasXMLHttpRequest&&(p.cors="withCredentials"in new XMLHttpRequest),a(s,t),s.prototype._request=function(t,e){return new i(function(n,r){function i(){if(!d){clearTimeout(f);var t;try{t={body:JSON.parse(y.responseText),responseText:y.responseText,statusCode:y.status,headers:y.getAllResponseHeaders&&y.getAllResponseHeaders()||{}}}catch(e){t=new u.UnparsableJSON({more:y.responseText})}t instanceof u.UnparsableJSON?r(t):n(t)}}function o(t){d||(clearTimeout(f),r(new u.Network({more:t})))}function s(){d=!0,y.abort(),r(new u.RequestTimeout)}function a(){g=!0,clearTimeout(f),f=setTimeout(s,e.timeouts.complete)}function l(){g||a()}function h(){!g&&y.readyState>1&&a()}if(!p.cors&&!p.hasXDomainRequest)return void r(new u.Network("CORS not supported"));t=c(t,e.headers);var f,d,m=e.body,y=p.cors?new XMLHttpRequest:new XDomainRequest,g=!1;f=setTimeout(s,e.timeouts.connect),y.onprogress=l,"onreadystatechange"in y&&(y.onreadystatechange=h),y.onload=i,y.onerror=o,y instanceof XMLHttpRequest?y.open(e.method,t,!0):y.open(e.method,t),p.cors&&(m&&("POST"===e.method?y.setRequestHeader("content-type","application/x-www-form-urlencoded"):y.setRequestHeader("content-type","application/json")),y.setRequestHeader("accept","application/json")),y.send(m)})},s.prototype._request.fallback=function(t,e){return t=c(t,e.headers),new i(function(n,r){l(t,e,function(t,e){return t?void r(t):void n(e)})})},s.prototype._promise={reject:function(t){return i.reject(t)},resolve:function(t){return i.resolve(t)},delay:function(t){return new i(function(e){setTimeout(e,t)})}},o}},function(t,e){(function(e){"undefined"!=typeof window?t.exports=window:"undefined"!=typeof e?t.exports=e:"undefined"!=typeof self?t.exports=self:t.exports={}}).call(e,function(){return this}())},function(t,e,n){(function(e,r){!function(e,n){t.exports=n()}(this,function(){"use strict";function t(t){return"function"==typeof t||"object"==typeof t&&null!==t}function i(t){return"function"==typeof t}function o(t){Z=t}function s(t){G=t}function a(){return function(){return e.nextTick(p)}}function u(){return"undefined"!=typeof Q?function(){Q(p)}:h()}function c(){var t=0,e=new Y(p),n=document.createTextNode("");return e.observe(n,{characterData:!0}),function(){n.data=t=++t%2}}function l(){var t=new MessageChannel;return t.port1.onmessage=p,function(){return t.port2.postMessage(0)}}function h(){var t=setTimeout;return function(){return t(p,1)}}function p(){for(var t=0;t<z;t+=2){var e=nt[t],n=nt[t+1];e(n),nt[t]=void 0,nt[t+1]=void 0}z=0}function f(){try{var t=n(36);return Q=t.runOnLoop||t.runOnContext,u()}catch(t){return h()}}function d(t,e){var n=arguments,r=this,i=new this.constructor(y);void 0===i[it]&&D(i);var o=r._state;return o?!function(){var t=n[o-1];G(function(){return N(o,i,t,r._result)})}():A(r,i,t,e),i}function m(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(y);return S(n,t),n}function y(){}function g(){return new TypeError("You cannot resolve a promise with itself")}function v(){return new TypeError("A promises callback cannot return that same promise.")}function b(t){try{return t.then}catch(t){return ut.error=t,ut}}function w(t,e,n,r){try{t.call(e,n,r)}catch(t){return t}}function _(t,e,n){G(function(t){var r=!1,i=w(n,e,function(n){r||(r=!0,e!==n?S(t,n):E(t,n))},function(e){r||(r=!0,O(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&i&&(r=!0,O(t,i))},t)}function x(t,e){e._state===st?E(t,e._result):e._state===at?O(t,e._result):A(e,void 0,function(e){return S(t,e)},function(e){return O(t,e)})}function T(t,e,n){e.constructor===t.constructor&&n===d&&e.constructor.resolve===m?x(t,e):n===ut?O(t,ut.error):void 0===n?E(t,e):i(n)?_(t,e,n):E(t,e)}function S(e,n){e===n?O(e,g()):t(n)?T(e,n,b(n)):E(e,n)}function C(t){t._onerror&&t._onerror(t._result),k(t)}function E(t,e){t._state===ot&&(t._result=e,t._state=st,0!==t._subscribers.length&&G(k,t))}function O(t,e){t._state===ot&&(t._state=at,t._result=e,G(C,t))}function A(t,e,n,r){var i=t._subscribers,o=i.length;t._onerror=null,i[o]=e,i[o+st]=n,i[o+at]=r,0===o&&t._state&&G(k,t)}function k(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,i=void 0,o=t._result,s=0;s<e.length;s+=3)r=e[s],i=e[s+n],r?N(n,r,i,o):i(o);t._subscribers.length=0}}function j(){this.error=null}function I(t,e){try{return t(e)}catch(t){return ct.error=t,ct}}function N(t,e,n,r){var o=i(n),s=void 0,a=void 0,u=void 0,c=void 0;if(o){if(s=I(n,r),s===ct?(c=!0,a=s.error,s=null):u=!0,e===s)return void O(e,v())}else s=r,u=!0;e._state!==ot||(o&&u?S(e,s):c?O(e,a):t===st?E(e,s):t===at&&O(e,s))}function R(t,e){try{e(function(e){S(t,e)},function(e){O(t,e)})}catch(e){O(t,e)}}function P(){return lt++}function D(t){t[it]=lt++,t._state=void 0,t._result=void 0,t._subscribers=[]}function q(t,e){this._instanceConstructor=t,this.promise=new t(y),this.promise[it]||D(this.promise),J(e)?(this._input=e,this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?E(this.promise,this._result):(this.length=this.length||0,this._enumerate(),0===this._remaining&&E(this.promise,this._result))):O(this.promise,$())}function $(){return new Error("Array Methods must be provided an Array")}function U(t){return new q(this,t).promise}function L(t){var e=this;return new e(J(t)?function(n,r){for(var i=t.length,o=0;o<i;o++)e.resolve(t[o]).then(n,r)}:function(t,e){return e(new TypeError("You must pass an array to race."))})}function H(t){var e=this,n=new e(y);return O(n,t),n}function M(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function F(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function B(t){this[it]=P(),this._result=this._state=void 0,this._subscribers=[],y!==t&&("function"!=typeof t&&M(),this instanceof B?R(this,t):F())}function V(){var t=void 0;if("undefined"!=typeof r)t=r;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var e=t.Promise;if(e){var n=null;try{n=Object.prototype.toString.call(e.resolve())}catch(t){}if("[object Promise]"===n&&!e.cast)return}t.Promise=B}var K=void 0;K=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var J=K,z=0,Q=void 0,Z=void 0,G=function(t,e){nt[z]=t,nt[z+1]=e,z+=2,2===z&&(Z?Z(p):rt())},X="undefined"!=typeof window?window:void 0,W=X||{},Y=W.MutationObserver||W.WebKitMutationObserver,tt="undefined"==typeof self&&"undefined"!=typeof e&&"[object process]"==={}.toString.call(e),et="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,nt=new Array(1e3),rt=void 0;rt=tt?a():Y?c():et?l():void 0===X?f():h();var it=Math.random().toString(36).substring(16),ot=void 0,st=1,at=2,ut=new j,ct=new j,lt=0;return q.prototype._enumerate=function(){for(var t=this.length,e=this._input,n=0;this._state===ot&&n<t;n++)this._eachEntry(e[n],n)},q.prototype._eachEntry=function(t,e){var n=this._instanceConstructor,r=n.resolve;if(r===m){var i=b(t);if(i===d&&t._state!==ot)this._settledAt(t._state,e,t._result);else if("function"!=typeof i)this._remaining--,this._result[e]=t;else if(n===B){var o=new n(y);T(o,t,i),this._willSettleAt(o,e)}else this._willSettleAt(new n(function(e){return e(t)}),e)}else this._willSettleAt(r(t),e);
},q.prototype._settledAt=function(t,e,n){var r=this.promise;r._state===ot&&(this._remaining--,t===at?O(r,n):this._result[e]=n),0===this._remaining&&E(r,this._result)},q.prototype._willSettleAt=function(t,e){var n=this;A(t,void 0,function(t){return n._settledAt(st,e,t)},function(t){return n._settledAt(at,e,t)})},B.all=U,B.race=L,B.resolve=m,B.reject=H,B._setScheduler=o,B._setAsap=s,B._asap=G,B.prototype={constructor:B,then:d,catch:function(t){return this.then(null,t)}},B.polyfill=V,B.Promise=B,B})}).call(e,n(30),function(){return this}())},function(t,e){},function(t,e,n){"use strict";function r(t,e){return t+=/\?/.test(t)?"&":"?",t+i(e)}t.exports=r;var i=n(38)},function(t,e){"use strict";function n(t,e){if(t.map)return t.map(e);for(var n=[],r=0;r<t.length;r++)n.push(e(t[r],r));return n}var r=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,e,s,a){return e=e||"&",s=s||"=",null===t&&(t=void 0),"object"==typeof t?n(o(t),function(o){var a=encodeURIComponent(r(o))+s;return i(t[o])?n(t[o],function(t){return a+encodeURIComponent(r(t))}).join(e):a+encodeURIComponent(r(t[o]))}).join(e):a?encodeURIComponent(r(a))+s+encodeURIComponent(r(t)):""};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},o=Object.keys||function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}},function(t,e,n){"use strict";function r(t,e,n){function r(){e.debug("JSONP: success"),y||p||(y=!0,h||(e.debug("JSONP: Fail. Script loaded but did not call the callback"),a(),n(new i.JSONPScriptFail)))}function s(){"loaded"!==this.readyState&&"complete"!==this.readyState||r()}function a(){clearTimeout(g),d.onload=null,d.onreadystatechange=null,d.onerror=null,f.removeChild(d)}function u(){try{delete window[m],delete window[m+"_loaded"]}catch(t){window[m]=window[m+"_loaded"]=void 0}}function c(){e.debug("JSONP: Script timeout"),p=!0,a(),n(new i.RequestTimeout)}function l(){e.debug("JSONP: Script error"),y||p||(a(),n(new i.JSONPScriptError))}if("GET"!==e.method)return void n(new Error("Method "+e.method+" "+t+" is not supported by JSONP."));e.debug("JSONP: start");var h=!1,p=!1;o+=1;var f=document.getElementsByTagName("head")[0],d=document.createElement("script"),m="algoliaJSONP_"+o,y=!1;window[m]=function(t){return u(),p?void e.debug("JSONP: Late answer, ignoring"):(h=!0,a(),void n(null,{body:t}))},t+="&callback="+m,e.jsonBody&&e.jsonBody.params&&(t+="&"+e.jsonBody.params);var g=setTimeout(c,e.timeouts.complete);d.onreadystatechange=s,d.onload=r,d.onerror=l,d.async=!0,d.defer=!0,d.src=t,f.appendChild(d)}t.exports=r;var i=n(13),o=0},function(t,e,n){function r(t){return function(e,r,o){var s=n(18);o=o&&s(o)||{},o.hosts=o.hosts||["places-dsn.algolia.net","places-1.algolianet.com","places-2.algolianet.com","places-3.algolianet.com"],0!==arguments.length&&"object"!=typeof e&&void 0!==e||(e="",r="",o._allowEmptyCredentials=!0);var a=t(e,r,o),u=a.initIndex("places");return u.search=i("query","/1/places/query"),u}}t.exports=r;var i=n(12)},function(t,e){"use strict";function n(){var t=window.document.location.protocol;return"http:"!==t&&"https:"!==t&&(t="http:"),t}t.exports=n},function(t,e){"use strict";t.exports="3.21.0"},function(t,e,n){"use strict";t.exports=n(44)},function(t,e,n){"use strict";function r(t,e,n,r){n=s.isArray(n)?n:[].slice.call(arguments,2);var o=i(t).each(function(t,o){var s=i(o),l=new c({el:s}),h=r||new u({input:s,eventBus:l,dropdownMenuContainer:e.dropdownMenuContainer,hint:void 0===e.hint||!!e.hint,minLength:e.minLength,autoselect:e.autoselect,autoselectOnBlur:e.autoselectOnBlur,openOnFocus:e.openOnFocus,templates:e.templates,debug:e.debug,cssClasses:e.cssClasses,datasets:n,keyboardShortcuts:e.keyboardShortcuts,appendTo:e.appendTo});s.data(a,h)});return o.autocomplete={},s.each(["open","close","getVal","setVal","destroy"],function(t){o.autocomplete[t]=function(){var e,n=arguments;return o.each(function(r,o){var s=i(o).data(a);e=s[t].apply(s,n)}),e}}),o}var i=n(45),o=n(46);o.element=i;var s=n(47);s.isArray=i.isArray,s.isFunction=i.isFunction,s.isObject=i.isPlainObject,s.bind=i.proxy,s.each=function(t,e){function n(t,n){return e(n,t)}i.each(t,n)},s.map=i.map,s.mixin=i.extend,s.Event=i.Event;var a="aaAutocomplete",u=n(48),c=n(49);r.sources=u.sources;var l="autocomplete"in window,h=window.autocomplete;r.noConflict=function(){return l?window.autocomplete=h:delete window.autocomplete,r},t.exports=r},function(t,e){!function(e,n){t.exports=n(e)}(window,function(t){var e=function(){function e(t){return null==t?String(t):Z[G.call(t)]||"object"}function n(t){return"function"==e(t)}function r(t){return null!=t&&t==t.window}function i(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function o(t){return"object"==e(t)}function s(t){return o(t)&&!r(t)&&Object.getPrototypeOf(t)==Object.prototype}function a(t){var e=!!t&&"length"in t&&t.length,n=C.type(t);return"function"!=n&&!r(t)&&("array"==n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function u(t){return I.call(t,function(t){return null!=t})}function c(t){return t.length>0?C.fn.concat.apply([],t):t}function l(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function h(t){return t in D?D[t]:D[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function p(t,e){return"number"!=typeof e||q[l(t)]?e:e+"px"}function f(t){var e,n;return P[t]||(e=R.createElement(t),R.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),P[t]=n),P[t]}function d(t){return"children"in t?N.call(t.children):C.map(t.childNodes,function(t){if(1==t.nodeType)return t})}function m(t,e){var n,r=t?t.length:0;for(n=0;n<r;n++)this[n]=t[n];this.length=r,this.selector=e||""}function y(t,e,n){for(S in e)n&&(s(e[S])||tt(e[S]))?(s(e[S])&&!s(t[S])&&(t[S]={}),tt(e[S])&&!tt(t[S])&&(t[S]=[]),y(t[S],e[S],n)):e[S]!==T&&(t[S]=e[S])}function g(t,e){return null==e?C(t):C(t).filter(e)}function v(t,e,r,i){return n(e)?e.call(t,r,i):e}function b(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function w(t,e){var n=t.className||"",r=n&&n.baseVal!==T;return e===T?r?n.baseVal:n:void(r?n.baseVal=e:t.className=e)}function _(t){try{return t?"true"==t||"false"!=t&&("null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?C.parseJSON(t):t):t}catch(e){return t}}function x(t,e){e(t);for(var n=0,r=t.childNodes.length;n<r;n++)x(t.childNodes[n],e)}var T,S,C,E,O,A,k=[],j=k.concat,I=k.filter,N=k.slice,R=t.document,P={},D={},q={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},$=/^\s*<(\w+|!)[^>]*>/,U=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,L=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,H=/^(?:body|html)$/i,M=/([A-Z])/g,F=["val","css","html","text","data","width","height","offset"],B=["after","prepend","before","append"],V=R.createElement("table"),K=R.createElement("tr"),J={tr:R.createElement("tbody"),tbody:V,thead:V,tfoot:V,td:K,th:K,"*":R.createElement("div")},z=/complete|loaded|interactive/,Q=/^[\w-]*$/,Z={},G=Z.toString,X={},W=R.createElement("div"),Y={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},tt=Array.isArray||function(t){return t instanceof Array};return X.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var r,i=t.parentNode,o=!i;return o&&(i=W).appendChild(t),r=~X.qsa(i,e).indexOf(t),o&&W.removeChild(t),r},O=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},A=function(t){return I.call(t,function(e,n){return t.indexOf(e)==n})},X.fragment=function(t,e,n){var r,i,o;return U.test(t)&&(r=C(R.createElement(RegExp.$1))),r||(t.replace&&(t=t.replace(L,"<$1></$2>")),e===T&&(e=$.test(t)&&RegExp.$1),e in J||(e="*"),o=J[e],o.innerHTML=""+t,r=C.each(N.call(o.childNodes),function(){o.removeChild(this)})),s(n)&&(i=C(r),C.each(n,function(t,e){F.indexOf(t)>-1?i[t](e):i.attr(t,e)})),r},X.Z=function(t,e){return new m(t,e)},X.isZ=function(t){return t instanceof X.Z},X.init=function(t,e){var r;if(!t)return X.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&$.test(t))r=X.fragment(t,RegExp.$1,e),t=null;else{if(e!==T)return C(e).find(t);r=X.qsa(R,t)}else{if(n(t))return C(R).ready(t);if(X.isZ(t))return t;if(tt(t))r=u(t);else if(o(t))r=[t],t=null;else if($.test(t))r=X.fragment(t.trim(),RegExp.$1,e),t=null;else{if(e!==T)return C(e).find(t);r=X.qsa(R,t)}}return X.Z(r,t)},C=function(t,e){return X.init(t,e)},C.extend=function(t){var e,n=N.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){y(t,n,e)}),t},X.qsa=function(t,e){var n,r="#"==e[0],i=!r&&"."==e[0],o=r||i?e.slice(1):e,s=Q.test(o);return t.getElementById&&s&&r?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:N.call(s&&!r&&t.getElementsByClassName?i?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},C.contains=R.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},C.type=e,C.isFunction=n,C.isWindow=r,C.isArray=tt,C.isPlainObject=s,C.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},C.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},C.inArray=function(t,e,n){return k.indexOf.call(e,t,n)},C.camelCase=O,C.trim=function(t){return null==t?"":String.prototype.trim.call(t)},C.uuid=0,C.support={},C.expr={},C.noop=function(){},C.map=function(t,e){var n,r,i,o=[];if(a(t))for(r=0;r<t.length;r++)n=e(t[r],r),null!=n&&o.push(n);else for(i in t)n=e(t[i],i),null!=n&&o.push(n);return c(o)},C.each=function(t,e){var n,r;if(a(t)){for(n=0;n<t.length;n++)if(e.call(t[n],n,t[n])===!1)return t}else for(r in t)if(e.call(t[r],r,t[r])===!1)return t;return t},C.grep=function(t,e){return I.call(t,e)},t.JSON&&(C.parseJSON=JSON.parse),C.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){Z["[object "+e+"]"]=e.toLowerCase()}),C.fn={constructor:X.Z,length:0,forEach:k.forEach,reduce:k.reduce,push:k.push,sort:k.sort,splice:k.splice,indexOf:k.indexOf,concat:function(){var t,e,n=[];for(t=0;t<arguments.length;t++)e=arguments[t],n[t]=X.isZ(e)?e.toArray():e;return j.apply(X.isZ(this)?this.toArray():this,n)},map:function(t){return C(C.map(this,function(e,n){return t.call(e,n,e)}))},slice:function(){return C(N.apply(this,arguments))},ready:function(t){return z.test(R.readyState)&&R.body?t(C):R.addEventListener("DOMContentLoaded",function(){t(C)},!1),this},get:function(t){return t===T?N.call(this):this[t>=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return k.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return n(t)?this.not(this.not(t)):C(I.call(this,function(e){return X.matches(e,t)}))},add:function(t,e){return C(A(this.concat(C(t,e))))},is:function(t){return this.length>0&&X.matches(this[0],t)},not:function(t){var e=[];if(n(t)&&t.call!==T)this.each(function(n){t.call(this,n)||e.push(this)});else{var r="string"==typeof t?this.filter(t):a(t)&&n(t.item)?N.call(t):C(t);this.forEach(function(t){r.indexOf(t)<0&&e.push(t)})}return C(e)},has:function(t){return this.filter(function(){return o(t)?C.contains(this,t):C(this).find(t).size()})},eq:function(t){return t===-1?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!o(t)?t:C(t)},last:function(){var t=this[this.length-1];return t&&!o(t)?t:C(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?C(t).filter(function(){var t=this;return k.some.call(n,function(e){return C.contains(e,t)})}):1==this.length?C(X.qsa(this[0],t)):this.map(function(){return X.qsa(this,t)}):C()},closest:function(t,e){var n=[],r="object"==typeof t&&C(t);return this.each(function(o,s){for(;s&&!(r?r.indexOf(s)>=0:X.matches(s,t));)s=s!==e&&!i(s)&&s.parentNode;s&&n.indexOf(s)<0&&n.push(s)}),C(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=C.map(n,function(t){if((t=t.parentNode)&&!i(t)&&e.indexOf(t)<0)return e.push(t),t});return g(e,t)},parent:function(t){return g(A(this.pluck("parentNode")),t)},children:function(t){return g(this.map(function(){return d(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||N.call(this.childNodes)})},siblings:function(t){return g(this.map(function(t,e){return I.call(d(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return C.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=f(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var e=n(t);if(this[0]&&!e)var r=C(t).get(0),i=r.parentNode||this.length>1;return this.each(function(n){C(this).wrapAll(e?t.call(this,n):i?r.cloneNode(!0):r)})},wrapAll:function(t){if(this[0]){C(this[0]).before(t=C(t));for(var e;(e=t.children()).length;)t=e.first();C(t).append(this)}return this},wrapInner:function(t){var e=n(t);return this.each(function(n){var r=C(this),i=r.contents(),o=e?t.call(this,n):t;i.length?i.wrapAll(o):r.append(o)})},unwrap:function(){return this.parent().each(function(){C(this).replaceWith(C(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var e=C(this);(t===T?"none"==e.css("display"):t)?e.show():e.hide()})},prev:function(t){return C(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return C(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;C(this).empty().append(v(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=v(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this.pluck("textContent").join(""):null},attr:function(t,e){var n;return"string"!=typeof t||1 in arguments?this.each(function(n){if(1===this.nodeType)if(o(t))for(S in t)b(this,S,t[S]);else b(this,t,v(this,e,n,this.getAttribute(t)))}):0 in this&&1==this[0].nodeType&&null!=(n=this[0].getAttribute(t))?n:T},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){b(this,t)},this)})},prop:function(t,e){return t=Y[t]||t,1 in arguments?this.each(function(n){this[t]=v(this,e,n,this[t])}):this[0]&&this[0][t]},removeProp:function(t){return t=Y[t]||t,this.each(function(){delete this[t]})},data:function(t,e){var n="data-"+t.replace(M,"-$1").toLowerCase(),r=1 in arguments?this.attr(n,e):this.attr(n);return null!==r?_(r):T},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each(function(e){this.value=v(this,t,e,this.value)})):this[0]&&(this[0].multiple?C(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each(function(t){var n=C(this),r=v(this,e,t,n.offset()),i=n.offsetParent().offset(),o={top:r.top-i.top,left:r.left-i.left};"static"==n.css("position")&&(o.position="relative"),n.css(o)});if(!this.length)return null;if(R.documentElement!==this[0]&&!C.contains(R.documentElement,this[0]))return{top:0,left:0};var n=this[0].getBoundingClientRect();return{left:n.left+t.pageXOffset,top:n.top+t.pageYOffset,width:Math.round(n.width),height:Math.round(n.height)}},css:function(t,n){if(arguments.length<2){var r=this[0];if("string"==typeof t){if(!r)return;return r.style[O(t)]||getComputedStyle(r,"").getPropertyValue(t)}if(tt(t)){if(!r)return;var i={},o=getComputedStyle(r,"");return C.each(t,function(t,e){i[e]=r.style[O(e)]||o.getPropertyValue(e)}),i}}var s="";if("string"==e(t))n||0===n?s=l(t)+":"+p(t,n):this.each(function(){this.style.removeProperty(l(t))});else for(S in t)t[S]||0===t[S]?s+=l(S)+":"+p(S,t[S])+";":this.each(function(){this.style.removeProperty(l(S))});return this.each(function(){this.style.cssText+=";"+s})},index:function(t){return t?this.indexOf(C(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return!!t&&k.some.call(this,function(t){return this.test(w(t))},h(t))},addClass:function(t){return t?this.each(function(e){if("className"in this){E=[];var n=w(this),r=v(this,t,e,n);r.split(/\s+/g).forEach(function(t){C(this).hasClass(t)||E.push(t)},this),E.length&&w(this,n+(n?" ":"")+E.join(" "))}}):this},removeClass:function(t){return this.each(function(e){if("className"in this){if(t===T)return w(this,"");E=w(this),v(this,t,e,E).split(/\s+/g).forEach(function(t){E=E.replace(h(t)," ")}),w(this,E.trim())}})},toggleClass:function(t,e){return t?this.each(function(n){var r=C(this),i=v(this,t,n,w(this));i.split(/\s+/g).forEach(function(t){(e===T?!r.hasClass(t):e)?r.addClass(t):r.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return t===T?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return t===T?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),r=H.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(C(t).css("margin-top"))||0,n.left-=parseFloat(C(t).css("margin-left"))||0,r.top+=parseFloat(C(e[0]).css("border-top-width"))||0,r.left+=parseFloat(C(e[0]).css("border-left-width"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||R.body;t&&!H.test(t.nodeName)&&"static"==C(t).css("position");)t=t.offsetParent;return t})}},C.fn.detach=C.fn.remove,["width","height"].forEach(function(t){var e=t.replace(/./,function(t){return t[0].toUpperCase()});C.fn[t]=function(n){var o,s=this[0];return n===T?r(s)?s["inner"+e]:i(s)?s.documentElement["scroll"+e]:(o=this.offset())&&o[t]:this.each(function(e){s=C(this),s.css(t,v(this,n,e,s[t]()))})}}),B.forEach(function(n,r){var i=r%2;C.fn[n]=function(){var n,o,s=C.map(arguments,function(t){var r=[];return n=e(t),"array"==n?(t.forEach(function(t){return t.nodeType!==T?r.push(t):C.zepto.isZ(t)?r=r.concat(t.get()):void(r=r.concat(X.fragment(t)))}),r):"object"==n||null==t?t:X.fragment(t)}),a=this.length>1;return s.length<1?this:this.each(function(e,n){o=i?n:n.parentNode,n=0==r?n.nextSibling:1==r?n.firstChild:2==r?n:null;var u=C.contains(R.documentElement,o);s.forEach(function(e){if(a)e=e.cloneNode(!0);else if(!o)return C(e).remove();o.insertBefore(e,n),u&&x(e,function(e){if(!(null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src)){var n=e.ownerDocument?e.ownerDocument.defaultView:t;n.eval.call(n,e.innerHTML)}})})})},C.fn[i?n+"To":"insert"+(r?"Before":"After")]=function(t){return C(t)[n](this),this}}),X.Z.prototype=m.prototype=C.fn,X.uniq=A,X.deserializeValue=_,C.zepto=X,C}();return function(e){function n(t){return t._zid||(t._zid=f++)}function r(t,e,r,s){if(e=i(e),e.ns)var a=o(e.ns);return(g[n(t)]||[]).filter(function(t){return t&&(!e.e||t.e==e.e)&&(!e.ns||a.test(t.ns))&&(!r||n(t.fn)===n(r))&&(!s||t.sel==s)})}function i(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function o(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function s(t,e){return t.del&&!b&&t.e in w||!!e}function a(t){return _[t]||b&&w[t]||t}function u(t,r,o,u,c,h,f){var d=n(t),m=g[d]||(g[d]=[]);r.split(/\s/).forEach(function(n){if("ready"==n)return e(document).ready(o);var r=i(n);r.fn=o,r.sel=c,r.e in _&&(o=function(t){var n=t.relatedTarget;if(!n||n!==this&&!e.contains(this,n))return r.fn.apply(this,arguments)}),r.del=h;var d=h||o;r.proxy=function(e){if(e=l(e),!e.isImmediatePropagationStopped()){e.data=u;var n=d.apply(t,e._args==p?[e]:[e].concat(e._args));return n===!1&&(e.preventDefault(),e.stopPropagation()),n}},r.i=m.length,m.push(r),"addEventListener"in t&&t.addEventListener(a(r.e),r.proxy,s(r,f))})}function c(t,e,i,o,u){var c=n(t);(e||"").split(/\s/).forEach(function(e){r(t,e,i,o).forEach(function(e){delete g[c][e.i],"removeEventListener"in t&&t.removeEventListener(a(e.e),e.proxy,s(e,u))})})}function l(t,n){return!n&&t.isDefaultPrevented||(n||(n=t),e.each(C,function(e,r){var i=n[e];t[e]=function(){return this[r]=x,i&&i.apply(n,arguments)},t[r]=T}),t.timeStamp||(t.timeStamp=Date.now()),(n.defaultPrevented!==p?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(t.isDefaultPrevented=x)),t}function h(t){var e,n={originalEvent:t};for(e in t)S.test(e)||t[e]===p||(n[e]=t[e]);return l(n,t)}var p,f=1,d=Array.prototype.slice,m=e.isFunction,y=function(t){return"string"==typeof t},g={},v={},b="onfocusin"in t,w={focus:"focusin",blur:"focusout"},_={mouseenter:"mouseover",mouseleave:"mouseout"};v.click=v.mousedown=v.mouseup=v.mousemove="MouseEvents",e.event={add:u,remove:c},e.proxy=function(t,r){var i=2 in arguments&&d.call(arguments,2);if(m(t)){var o=function(){return t.apply(r,i?i.concat(d.call(arguments)):arguments)};return o._zid=n(t),o}if(y(r))return i?(i.unshift(t[r],t),e.proxy.apply(null,i)):e.proxy(t[r],t);throw new TypeError("expected function")},e.fn.bind=function(t,e,n){return this.on(t,e,n)},e.fn.unbind=function(t,e){return this.off(t,e)},e.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var x=function(){return!0},T=function(){return!1},S=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,C={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};e.fn.delegate=function(t,e,n){return this.on(e,t,n)},e.fn.undelegate=function(t,e,n){return this.off(e,t,n)},e.fn.live=function(t,n){return e(document.body).delegate(this.selector,t,n),this},e.fn.die=function(t,n){return e(document.body).undelegate(this.selector,t,n),this},e.fn.on=function(t,n,r,i,o){var s,a,l=this;return t&&!y(t)?(e.each(t,function(t,e){l.on(t,n,r,e,o)}),l):(y(n)||m(i)||i===!1||(i=r,r=n,n=p),i!==p&&r!==!1||(i=r,r=p),i===!1&&(i=T),l.each(function(l,p){o&&(s=function(t){return c(p,t.type,i),i.apply(this,arguments)}),n&&(a=function(t){var r,o=e(t.target).closest(n,p).get(0);if(o&&o!==p)return r=e.extend(h(t),{currentTarget:o,liveFired:p}),(s||i).apply(o,[r].concat(d.call(arguments,1)))}),u(p,t,i,r,n,a||s)}))},e.fn.off=function(t,n,r){var i=this;return t&&!y(t)?(e.each(t,function(t,e){i.off(t,n,e)}),i):(y(n)||m(r)||r===!1||(r=n,n=p),r===!1&&(r=T),i.each(function(){c(this,t,r,n)}))},e.fn.trigger=function(t,n){return t=y(t)||e.isPlainObject(t)?e.Event(t):l(t),t._args=n,this.each(function(){t.type in w&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,n)})},e.fn.triggerHandler=function(t,n){var i,o;return this.each(function(s,a){i=h(y(t)?e.Event(t):t),i._args=n,i.target=a,e.each(r(a,t.type||t),function(t,e){if(o=e.proxy(i),i.isImmediatePropagationStopped())return!1})}),o},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}}),e.Event=function(t,e){y(t)||(e=t,t=e.type);var n=document.createEvent(v[t]||"Events"),r=!0;if(e)for(var i in e)"bubbles"==i?r=!!e[i]:n[i]=e[i];return n.initEvent(t,r,!0),l(n)}}(e),function(t){var e,n=[];t.fn.remove=function(){return this.each(function(){this.parentNode&&("IMG"===this.tagName&&(n.push(this),this.src="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",e&&clearTimeout(e),e=setTimeout(function(){n=[]},6e4)),this.parentNode.removeChild(this))})}}(e),function(t){function e(e,r){var u=e[a],c=u&&i[u];if(void 0===r)return c||n(e);if(c){if(r in c)return c[r];var l=s(r);if(l in c)return c[l]}return o.call(t(e),r)}function n(e,n,o){var u=e[a]||(e[a]=++t.uuid),c=i[u]||(i[u]=r(e));return void 0!==n&&(c[s(n)]=o),c}function r(e){var n={};return t.each(e.attributes||u,function(e,r){0==r.name.indexOf("data-")&&(n[s(r.name.replace("data-",""))]=t.zepto.deserializeValue(r.value))}),n}var i={},o=t.fn.data,s=t.camelCase,a=t.expando="Zepto"+ +new Date,u=[];t.fn.data=function(r,i){return void 0===i?t.isPlainObject(r)?this.each(function(e,i){t.each(r,function(t,e){n(i,t,e)})}):0 in this?e(this[0],r):void 0:this.each(function(){n(this,r,i)})},t.data=function(e,n,r){return t(e).data(n,r)},t.hasData=function(e){var n=e[a],r=n&&i[n];return!!r&&!t.isEmptyObject(r)},t.fn.removeData=function(e){return"string"==typeof e&&(e=e.split(/\s+/)),this.each(function(){var n=this[a],r=n&&i[n];r&&t.each(e||r,function(t){delete r[e?s(this):t]})})},["remove","empty"].forEach(function(e){var n=t.fn[e];t.fn[e]=function(){var t=this.find("*");return"remove"===e&&(t=t.add(this)),t.removeData(),n.call(this)}})}(e),e})},function(t,e){"use strict";t.exports={element:null}},function(t,e,n){"use strict";var r=n(46);t.exports={isArray:null,isFunction:null,isObject:null,bind:null,each:null,map:null,mixin:null,isMsie:function(){return!!/(msie|trident)/i.test(navigator.userAgent)&&navigator.userAgent.match(/(msie |rv:)(\d+(.\d+)?)/i)[2]},escapeRegExChars:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},isNumber:function(t){return"number"==typeof t},toStr:function(t){return void 0===t||null===t?"":t+""},cloneDeep:function(t){var e=this.mixin({},t),n=this;return this.each(e,function(t,r){t&&(n.isArray(t)?e[r]=[].concat(t):n.isObject(t)&&(e[r]=n.cloneDeep(t)))}),e},error:function(t){throw new Error(t)},every:function(t,e){var n=!0;return t?(this.each(t,function(r,i){if(n=e.call(null,r,i,t),!n)return!1}),!!n):n},any:function(t,e){var n=!1;return t?(this.each(t,function(r,i){if(e.call(null,r,i,t))return n=!0,!1}),n):n},getUniqueId:function(){var t=0;return function(){return t++}}(),templatify:function(t){if(this.isFunction(t))return t;var e=r.element(t);return"SCRIPT"===e.prop("tagName")?function(){return e.text()}:function(){return String(t)}},defer:function(t){setTimeout(t,0)},noop:function(){},className:function(t,e,n){return(n?"":".")+t+"-"+e}}},function(t,e,n){"use strict";function r(t){var e,n;if(t=t||{},t.input||u.error("missing input"),this.isActivated=!1,this.debug=!!t.debug,this.autoselect=!!t.autoselect,this.autoselectOnBlur=!!t.autoselectOnBlur,this.openOnFocus=!!t.openOnFocus,this.minLength=u.isNumber(t.minLength)?t.minLength:1,t.hint=!!t.hint,t.hint&&t.appendTo)throw new Error("[autocomplete.js] hint and appendTo options can't be used at the same time");this.css=t.css=u.mixin({},d,t.appendTo?d.appendTo:{}),this.cssClasses=t.cssClasses=u.mixin({},d.defaultClasses,t.cssClasses||{}),this.listboxId=t.listboxId=[this.cssClasses.root,"listbox",u.getUniqueId()].join("-");var o=i(t);this.$node=o.wrapper;var s=this.$input=o.input;e=o.menu,n=o.hint,t.dropdownMenuContainer&&c.element(t.dropdownMenuContainer).css("position","relative").append(e.css("top","0")),s.on("blur.aa",function(t){var n=document.activeElement;u.isMsie()&&(e[0]===n||e[0].contains(n))&&(t.preventDefault(),t.stopImmediatePropagation(),u.defer(function(){s.focus()}))}),e.on("mousedown.aa",function(t){t.preventDefault()}),this.eventBus=t.eventBus||new l({el:s}),this.dropdown=new r.Dropdown({appendTo:t.appendTo,wrapper:this.$node,menu:e,datasets:t.datasets,templates:t.templates,cssClasses:t.cssClasses,minLength:this.minLength}).onSync("suggestionClicked",this._onSuggestionClicked,this).onSync("cursorMoved",this._onCursorMoved,this).onSync("cursorRemoved",this._onCursorRemoved,this).onSync("opened",this._onOpened,this).onSync("closed",this._onClosed,this).onSync("shown",this._onShown,this).onSync("empty",this._onEmpty,this).onSync("redrawn",this._onRedrawn,this).onAsync("datasetRendered",this._onDatasetRendered,this),this.input=new r.Input({input:s,hint:n}).onSync("focused",this._onFocused,this).onSync("blurred",this._onBlurred,this).onSync("enterKeyed",this._onEnterKeyed,this).onSync("tabKeyed",this._onTabKeyed,this).onSync("escKeyed",this._onEscKeyed,this).onSync("upKeyed",this._onUpKeyed,this).onSync("downKeyed",this._onDownKeyed,this).onSync("leftKeyed",this._onLeftKeyed,this).onSync("rightKeyed",this._onRightKeyed,this).onSync("queryChanged",this._onQueryChanged,this).onSync("whitespaceChanged",this._onWhitespaceChanged,this),this._bindKeyboardShortcuts(t),this._setLanguageDirection()}function i(t){var e,n,r,i;e=c.element(t.input),n=c.element(f.wrapper.replace("%ROOT%",t.cssClasses.root)).css(t.css.wrapper),t.appendTo||"block"!==e.css("display")||"table"!==e.parent().css("display")||n.css("display","table-cell");var s=f.dropdown.replace("%PREFIX%",t.cssClasses.prefix).replace("%DROPDOWN_MENU%",t.cssClasses.dropdownMenu);r=c.element(s).css(t.css.dropdown).attr({role:"listbox",id:t.listboxId}),t.templates&&t.templates.dropdownMenu&&r.html(u.templatify(t.templates.dropdownMenu)()),i=e.clone().css(t.css.hint).css(o(e)),i.val("").addClass(u.className(t.cssClasses.prefix,t.cssClasses.hint,!0)).removeAttr("id name placeholder required").prop("readonly",!0).attr({"aria-hidden":"true",autocomplete:"off",spellcheck:"false",tabindex:-1}),i.removeData&&i.removeData(),e.data(a,{"aria-autocomplete":e.attr("aria-autocomplete"),"aria-expanded":e.attr("aria-expanded"),"aria-owns":e.attr("aria-owns"),autocomplete:e.attr("autocomplete"),dir:e.attr("dir"),role:e.attr("role"),spellcheck:e.attr("spellcheck"),style:e.attr("style"),type:e.attr("type")}),e.addClass(u.className(t.cssClasses.prefix,t.cssClasses.input,!0)).attr({autocomplete:"off",spellcheck:!1,role:"combobox","aria-autocomplete":t.datasets&&t.datasets[0]&&t.datasets[0].displayKey?"both":"list","aria-expanded":"false","aria-labelledby":e.attr("placeholder")?e.attr("id"):null,"aria-owns":t.listboxId}).css(t.hint?t.css.input:t.css.inputWithNoHint);try{e.attr("dir")||e.attr("dir","auto")}catch(t){}return n=t.appendTo?n.appendTo(c.element(t.appendTo).eq(0)).eq(0):e.wrap(n).parent(),n.prepend(t.hint?i:null).append(r),{wrapper:n,input:e,hint:i,menu:r}}function o(t){return{backgroundAttachment:t.css("background-attachment"),backgroundClip:t.css("background-clip"),backgroundColor:t.css("background-color"),backgroundImage:t.css("background-image"),backgroundOrigin:t.css("background-origin"),backgroundPosition:t.css("background-position"),backgroundRepeat:t.css("background-repeat"),backgroundSize:t.css("background-size")}}function s(t,e){var n=t.find(u.className(e.prefix,e.input));u.each(n.data(a),function(t,e){void 0===t?n.removeAttr(e):n.attr(e,t)}),n.detach().removeClass(u.className(e.prefix,e.input,!0)).insertAfter(t),n.removeData&&n.removeData(a),t.remove()}var a="aaAttrs",u=n(47),c=n(46),l=n(49),h=n(50),p=n(58),f=n(60),d=n(61);u.mixin(r.prototype,{_bindKeyboardShortcuts:function(t){if(t.keyboardShortcuts){var e=this.$input,n=[];u.each(t.keyboardShortcuts,function(t){"string"==typeof t&&(t=t.toUpperCase().charCodeAt(0)),n.push(t)}),c.element(document).keydown(function(t){var r=t.target||t.srcElement,i=r.tagName;if(!r.isContentEditable&&"INPUT"!==i&&"SELECT"!==i&&"TEXTAREA"!==i){var o=t.which||t.keyCode;n.indexOf(o)!==-1&&(e.focus(),t.stopPropagation(),t.preventDefault())}})}},_onSuggestionClicked:function(t,e){
var n;(n=this.dropdown.getDatumForSuggestion(e))&&this._select(n)},_onCursorMoved:function(t,e){var n=this.dropdown.getDatumForCursor(),r=this.dropdown.getCurrentCursor().attr("id");this.input.setActiveDescendant(r),n&&(e&&this.input.setInputValue(n.value,!0),this.eventBus.trigger("cursorchanged",n.raw,n.datasetName))},_onCursorRemoved:function(){this.input.resetInputValue(),this._updateHint(),this.eventBus.trigger("cursorremoved")},_onDatasetRendered:function(){this._updateHint(),this.eventBus.trigger("updated")},_onOpened:function(){this._updateHint(),this.input.expand(),this.eventBus.trigger("opened")},_onEmpty:function(){this.eventBus.trigger("empty")},_onRedrawn:function(){var t=this.$input[0].getBoundingClientRect();this.$node.css("width",t.width+"px"),this.$node.css("top","0px"),this.$node.css("left","0px");var e=this.$node[0].getBoundingClientRect(),n=t.bottom-e.top;this.$node.css("top",n+"px");var r=t.left-e.left;this.$node.css("left",r+"px"),this.eventBus.trigger("redrawn")},_onShown:function(){this.eventBus.trigger("shown"),this.autoselect&&this.dropdown.cursorTopSuggestion()},_onClosed:function(){this.input.clearHint(),this.input.removeActiveDescendant(),this.input.collapse(),this.eventBus.trigger("closed")},_onFocused:function(){if(this.isActivated=!0,this.openOnFocus){var t=this.input.getQuery();t.length>=this.minLength?this.dropdown.update(t):this.dropdown.empty(),this.dropdown.open()}},_onBlurred:function(){var t,e;t=this.dropdown.getDatumForCursor(),e=this.dropdown.getDatumForTopSuggestion(),this.debug||(this.autoselectOnBlur&&t?this._select(t):this.autoselectOnBlur&&e?this._select(e):(this.isActivated=!1,this.dropdown.empty(),this.dropdown.close()))},_onEnterKeyed:function(t,e){var n,r;n=this.dropdown.getDatumForCursor(),r=this.dropdown.getDatumForTopSuggestion(),n?(this._select(n),e.preventDefault()):this.autoselect&&r&&(this._select(r),e.preventDefault())},_onTabKeyed:function(t,e){var n;(n=this.dropdown.getDatumForCursor())?(this._select(n),e.preventDefault()):this._autocomplete(!0)},_onEscKeyed:function(){this.dropdown.close(),this.input.resetInputValue()},_onUpKeyed:function(){var t=this.input.getQuery();this.dropdown.isEmpty&&t.length>=this.minLength?this.dropdown.update(t):this.dropdown.moveCursorUp(),this.dropdown.open()},_onDownKeyed:function(){var t=this.input.getQuery();this.dropdown.isEmpty&&t.length>=this.minLength?this.dropdown.update(t):this.dropdown.moveCursorDown(),this.dropdown.open()},_onLeftKeyed:function(){"rtl"===this.dir&&this._autocomplete()},_onRightKeyed:function(){"ltr"===this.dir&&this._autocomplete()},_onQueryChanged:function(t,e){this.input.clearHintIfInvalid(),e.length>=this.minLength?this.dropdown.update(e):this.dropdown.empty(),this.dropdown.open(),this._setLanguageDirection()},_onWhitespaceChanged:function(){this._updateHint(),this.dropdown.open()},_setLanguageDirection:function(){var t=this.input.getLanguageDirection();this.dir!==t&&(this.dir=t,this.$node.css("direction",t),this.dropdown.setLanguageDirection(t))},_updateHint:function(){var t,e,n,r,i,o;t=this.dropdown.getDatumForTopSuggestion(),t&&this.dropdown.isVisible()&&!this.input.hasOverflow()?(e=this.input.getInputValue(),n=h.normalizeQuery(e),r=u.escapeRegExChars(n),i=new RegExp("^(?:"+r+")(.+$)","i"),o=i.exec(t.value),o?this.input.setHint(e+o[1]):this.input.clearHint()):this.input.clearHint()},_autocomplete:function(t){var e,n,r,i;e=this.input.getHint(),n=this.input.getQuery(),r=t||this.input.isCursorAtEnd(),e&&n!==e&&r&&(i=this.dropdown.getDatumForTopSuggestion(),i&&this.input.setInputValue(i.value),this.eventBus.trigger("autocompleted",i.raw,i.datasetName))},_select:function(t){"undefined"!=typeof t.value&&this.input.setQuery(t.value),this.input.setInputValue(t.value,!0),this._setLanguageDirection();var e=this.eventBus.trigger("selected",t.raw,t.datasetName);e.isDefaultPrevented()===!1&&(this.dropdown.close(),u.defer(u.bind(this.dropdown.empty,this.dropdown)))},open:function(){if(!this.isActivated){var t=this.input.getInputValue();t.length>=this.minLength?this.dropdown.update(t):this.dropdown.empty()}this.dropdown.open()},close:function(){this.dropdown.close()},setVal:function(t){t=u.toStr(t),this.isActivated?this.input.setInputValue(t):(this.input.setQuery(t),this.input.setInputValue(t,!0)),this._setLanguageDirection()},getVal:function(){return this.input.getQuery()},destroy:function(){this.input.destroy(),this.dropdown.destroy(),s(this.$node,this.cssClasses),this.$node=null}}),r.Dropdown=p,r.Input=h,r.sources=n(62),t.exports=r},function(t,e,n){"use strict";function r(t){t&&t.el||o.error("EventBus initialized without el"),this.$el=s.element(t.el)}var i="autocomplete:",o=n(47),s=n(46);o.mixin(r.prototype,{trigger:function(t){var e=[].slice.call(arguments,1),n=o.Event(i+t);return this.$el.trigger(n,e),n}}),t.exports=r},function(t,e,n){"use strict";function r(t){var e,n,r,o,s=this;t=t||{},t.input||u.error("input is missing"),e=u.bind(this._onBlur,this),n=u.bind(this._onFocus,this),r=u.bind(this._onKeydown,this),o=u.bind(this._onInput,this),this.$hint=c.element(t.hint),this.$input=c.element(t.input).on("blur.aa",e).on("focus.aa",n).on("keydown.aa",r),0===this.$hint.length&&(this.setHint=this.getHint=this.clearHint=this.clearHintIfInvalid=u.noop),u.isMsie()?this.$input.on("keydown.aa keypress.aa cut.aa paste.aa",function(t){a[t.which||t.keyCode]||u.defer(u.bind(s._onInput,s,t))}):this.$input.on("input.aa",o),this.query=this.$input.val(),this.$overflowHelper=i(this.$input)}function i(t){return c.element('<pre aria-hidden="true"></pre>').css({position:"absolute",visibility:"hidden",whiteSpace:"pre",fontFamily:t.css("font-family"),fontSize:t.css("font-size"),fontStyle:t.css("font-style"),fontVariant:t.css("font-variant"),fontWeight:t.css("font-weight"),wordSpacing:t.css("word-spacing"),letterSpacing:t.css("letter-spacing"),textIndent:t.css("text-indent"),textRendering:t.css("text-rendering"),textTransform:t.css("text-transform")}).insertAfter(t)}function o(t,e){return r.normalizeQuery(t)===r.normalizeQuery(e)}function s(t){return t.altKey||t.ctrlKey||t.metaKey||t.shiftKey}var a;a={9:"tab",27:"esc",37:"left",39:"right",13:"enter",38:"up",40:"down"};var u=n(47),c=n(46),l=n(51);r.normalizeQuery=function(t){return(t||"").replace(/^\s*/g,"").replace(/\s{2,}/g," ")},u.mixin(r.prototype,l,{_onBlur:function(){this.resetInputValue(),this.$input.removeAttr("aria-activedescendant"),this.trigger("blurred")},_onFocus:function(){this.trigger("focused")},_onKeydown:function(t){var e=a[t.which||t.keyCode];this._managePreventDefault(e,t),e&&this._shouldTrigger(e,t)&&this.trigger(e+"Keyed",t)},_onInput:function(){this._checkInputValue()},_managePreventDefault:function(t,e){var n,r,i;switch(t){case"tab":r=this.getHint(),i=this.getInputValue(),n=r&&r!==i&&!s(e);break;case"up":case"down":n=!s(e);break;default:n=!1}n&&e.preventDefault()},_shouldTrigger:function(t,e){var n;switch(t){case"tab":n=!s(e);break;default:n=!0}return n},_checkInputValue:function(){var t,e,n;t=this.getInputValue(),e=o(t,this.query),n=!(!e||!this.query)&&this.query.length!==t.length,this.query=t,e?n&&this.trigger("whitespaceChanged",this.query):this.trigger("queryChanged",this.query)},focus:function(){this.$input.focus()},blur:function(){this.$input.blur()},getQuery:function(){return this.query},setQuery:function(t){this.query=t},getInputValue:function(){return this.$input.val()},setInputValue:function(t,e){"undefined"==typeof t&&(t=this.query),this.$input.val(t),e?this.clearHint():this._checkInputValue()},expand:function(){this.$input.attr("aria-expanded","true")},collapse:function(){this.$input.attr("aria-expanded","false")},setActiveDescendant:function(t){this.$input.attr("aria-activedescendant",t)},removeActiveDescendant:function(){this.$input.removeAttr("aria-activedescendant")},resetInputValue:function(){this.setInputValue(this.query,!0)},getHint:function(){return this.$hint.val()},setHint:function(t){this.$hint.val(t)},clearHint:function(){this.setHint("")},clearHintIfInvalid:function(){var t,e,n,r;t=this.getInputValue(),e=this.getHint(),n=t!==e&&0===e.indexOf(t),r=""!==t&&n&&!this.hasOverflow(),r||this.clearHint()},getLanguageDirection:function(){return(this.$input.css("direction")||"ltr").toLowerCase()},hasOverflow:function(){var t=this.$input.width()-2;return this.$overflowHelper.text(this.getInputValue()),this.$overflowHelper.width()>=t},isCursorAtEnd:function(){var t,e,n;return t=this.$input.val().length,e=this.$input[0].selectionStart,u.isNumber(e)?e===t:!document.selection||(n=document.selection.createRange(),n.moveStart("character",-t),t===n.text.length)},destroy:function(){this.$hint.off(".aa"),this.$input.off(".aa"),this.$hint=this.$input=this.$overflowHelper=null}}),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){var i;if(!n)return this;for(e=e.split(h),n=r?c(n,r):n,this._callbacks=this._callbacks||{};i=e.shift();)this._callbacks[i]=this._callbacks[i]||{sync:[],async:[]},this._callbacks[i][t].push(n);return this}function i(t,e,n){return r.call(this,"async",t,e,n)}function o(t,e,n){return r.call(this,"sync",t,e,n)}function s(t){var e;if(!this._callbacks)return this;for(t=t.split(h);e=t.shift();)delete this._callbacks[e];return this}function a(t){var e,n,r,i,o;if(!this._callbacks)return this;for(t=t.split(h),r=[].slice.call(arguments,1);(e=t.shift())&&(n=this._callbacks[e]);)i=u(n.sync,this,[e].concat(r)),o=u(n.async,this,[e].concat(r)),i()&&l(o);return this}function u(t,e,n){function r(){for(var r,i=0,o=t.length;!r&&i<o;i+=1)r=t[i].apply(e,n)===!1;return!r}return r}function c(t,e){return t.bind?t.bind(e):function(){t.apply(e,[].slice.call(arguments,0))}}var l=n(52),h=/\s+/;t.exports={onSync:o,onAsync:i,off:s,trigger:a}},function(t,e,n){"use strict";function r(){a&&u&&(a=!1,u.length?p=u.concat(p):h=-1,p.length&&i())}function i(){if(!a){f=!1,a=!0;for(var t=p.length,e=setTimeout(r);t;){for(u=p,p=[];u&&++h<t;)u[h].run();h=-1,t=p.length}u=null,h=-1,a=!1,clearTimeout(e)}}function o(t,e){this.fun=t,this.array=e}function s(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];p.push(new o(t,e)),f||a||(f=!0,c())}for(var a,u,c,l=[n(53),n(54),n(55),n(56),n(57)],h=-1,p=[],f=!1,d=-1,m=l.length;++d<m;)if(l[d]&&l[d].test&&l[d].test()){c=l[d].install(i);break}o.prototype.run=function(){var t=this.fun,e=this.array;switch(e.length){case 0:return t();case 1:return t(e[0]);case 2:return t(e[0],e[1]);case 3:return t(e[0],e[1],e[2]);default:return t.apply(null,e)}},t.exports=s},function(t,e,n){(function(t){"use strict";e.test=function(){return"undefined"!=typeof t&&!t.browser},e.install=function(e){return function(){t.nextTick(e)}}}).call(e,n(30))},function(t,e){(function(t){"use strict";var n=t.MutationObserver||t.WebKitMutationObserver;e.test=function(){return n},e.install=function(e){var r=0,i=new n(e),o=t.document.createTextNode("");return i.observe(o,{characterData:!0}),function(){o.data=r=++r%2}}}).call(e,function(){return this}())},function(t,e){(function(t){"use strict";e.test=function(){return!t.setImmediate&&"undefined"!=typeof t.MessageChannel},e.install=function(e){var n=new t.MessageChannel;return n.port1.onmessage=e,function(){n.port2.postMessage(0)}}}).call(e,function(){return this}())},function(t,e){(function(t){"use strict";e.test=function(){return"document"in t&&"onreadystatechange"in t.document.createElement("script")},e.install=function(e){return function(){var n=t.document.createElement("script");return n.onreadystatechange=function(){e(),n.onreadystatechange=null,n.parentNode.removeChild(n),n=null},t.document.documentElement.appendChild(n),e}}}).call(e,function(){return this}())},function(t,e){"use strict";e.test=function(){return!0},e.install=function(t){return function(){setTimeout(t,0)}}},function(t,e,n){"use strict";function r(t){var e,n,r,a=this;t=t||{},t.menu||o.error("menu is required"),o.isArray(t.datasets)||o.isObject(t.datasets)||o.error("1 or more datasets required"),t.datasets||o.error("datasets is required"),this.isOpen=!1,this.isEmpty=!0,this.minLength=t.minLength||0,this.templates={},this.appendTo=t.appendTo||!1,this.css=o.mixin({},c,t.appendTo?c.appendTo:{}),this.cssClasses=t.cssClasses=o.mixin({},c.defaultClasses,t.cssClasses||{}),e=o.bind(this._onSuggestionClick,this),n=o.bind(this._onSuggestionMouseEnter,this),r=o.bind(this._onSuggestionMouseLeave,this);var u=o.className(this.cssClasses.prefix,this.cssClasses.suggestion);this.$menu=s.element(t.menu).on("click.aa",u,e).on("mouseenter.aa",u,n).on("mouseleave.aa",u,r),this.$container=t.appendTo?t.wrapper:this.$menu,t.templates&&t.templates.header&&(this.templates.header=o.templatify(t.templates.header),this.$menu.prepend(this.templates.header())),t.templates&&t.templates.empty&&(this.templates.empty=o.templatify(t.templates.empty),this.$empty=s.element('<div class="'+o.className(this.cssClasses.prefix,this.cssClasses.empty,!0)+'"></div>'),this.$menu.append(this.$empty)),this.datasets=o.map(t.datasets,function(e){return i(a.$menu,e,t.cssClasses)}),o.each(this.datasets,function(t){var e=t.getRoot();e&&0===e.parent().length&&a.$menu.append(e),t.onSync("rendered",a._onRendered,a)}),t.templates&&t.templates.footer&&(this.templates.footer=o.templatify(t.templates.footer),this.$menu.append(this.templates.footer()));var l=this;s.element(window).resize(function(){l._redraw()})}function i(t,e,n){return new r.Dataset(o.mixin({$menu:t,cssClasses:n},e))}var o=n(47),s=n(46),a=n(51),u=n(59),c=n(61);o.mixin(r.prototype,a,{_onSuggestionClick:function(t){this.trigger("suggestionClicked",s.element(t.currentTarget))},_onSuggestionMouseEnter:function(t){var e=s.element(t.currentTarget);e.hasClass(o.className(this.cssClasses.prefix,this.cssClasses.cursor,!0))||(this._removeCursor(),this._setCursor(e,!1))},_onSuggestionMouseLeave:function(t){if(t.relatedTarget){var e=s.element(t.relatedTarget);if(e.closest("."+o.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).length>0)return}this._removeCursor(),this.trigger("cursorRemoved")},_onRendered:function(t,e){function n(t){return t.isEmpty()}function r(t){return t.templates&&t.templates.empty}if(this.isEmpty=o.every(this.datasets,n),this.isEmpty)if(e.length>=this.minLength&&this.trigger("empty"),this.$empty)if(e.length<this.minLength)this._hide();else{var i=this.templates.empty({query:this.datasets[0]&&this.datasets[0].query});this.$empty.html(i),this._show()}else o.any(this.datasets,r)?e.length<this.minLength?this._hide():this._show():this._hide();else this.isOpen&&(this.$empty&&this.$empty.empty(),e.length>=this.minLength?this._show():this._hide());this.trigger("datasetRendered")},_hide:function(){this.$container.hide()},_show:function(){this.$container.css("display","block"),this._redraw(),this.trigger("shown")},_redraw:function(){this.isOpen&&this.appendTo&&this.trigger("redrawn")},_getSuggestions:function(){return this.$menu.find(o.className(this.cssClasses.prefix,this.cssClasses.suggestion))},_getCursor:function(){return this.$menu.find(o.className(this.cssClasses.prefix,this.cssClasses.cursor)).first()},_setCursor:function(t,e){t.first().addClass(o.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).attr("aria-selected","true"),this.trigger("cursorMoved",e)},_removeCursor:function(){this._getCursor().removeClass(o.className(this.cssClasses.prefix,this.cssClasses.cursor,!0)).removeAttr("aria-selected")},_moveCursor:function(t){var e,n,r,i;if(this.isOpen){if(n=this._getCursor(),e=this._getSuggestions(),this._removeCursor(),r=e.index(n)+t,r=(r+1)%(e.length+1)-1,r===-1)return void this.trigger("cursorRemoved");r<-1&&(r=e.length-1),this._setCursor(i=e.eq(r),!0),this._ensureVisible(i)}},_ensureVisible:function(t){var e,n,r,i;e=t.position().top,n=e+t.height()+parseInt(t.css("margin-top"),10)+parseInt(t.css("margin-bottom"),10),r=this.$menu.scrollTop(),i=this.$menu.height()+parseInt(this.$menu.css("paddingTop"),10)+parseInt(this.$menu.css("paddingBottom"),10),e<0?this.$menu.scrollTop(r+e):i<n&&this.$menu.scrollTop(r+(n-i))},close:function(){this.isOpen&&(this.isOpen=!1,this._removeCursor(),this._hide(),this.trigger("closed"))},open:function(){this.isOpen||(this.isOpen=!0,this.isEmpty||this._show(),this.trigger("opened"))},setLanguageDirection:function(t){this.$menu.css("ltr"===t?this.css.ltr:this.css.rtl)},moveCursorUp:function(){this._moveCursor(-1)},moveCursorDown:function(){this._moveCursor(1)},getDatumForSuggestion:function(t){var e=null;return t.length&&(e={raw:u.extractDatum(t),value:u.extractValue(t),datasetName:u.extractDatasetName(t)}),e},getCurrentCursor:function(){return this._getCursor().first()},getDatumForCursor:function(){return this.getDatumForSuggestion(this._getCursor().first())},getDatumForTopSuggestion:function(){return this.getDatumForSuggestion(this._getSuggestions().first())},cursorTopSuggestion:function(){this._setCursor(this._getSuggestions().first(),!1)},update:function(t){function e(e){e.update(t)}o.each(this.datasets,e)},empty:function(){function t(t){t.clear()}o.each(this.datasets,t),this.isEmpty=!0},isVisible:function(){return this.isOpen&&!this.isEmpty},destroy:function(){function t(t){t.destroy()}this.$menu.off(".aa"),this.$menu=null,o.each(this.datasets,t)}}),r.Dataset=u,t.exports=r},function(t,e,n){"use strict";function r(t){t=t||{},t.templates=t.templates||{},t.source||l.error("missing source"),t.name&&!s(t.name)&&l.error("invalid dataset name: "+t.name),this.query=null,this._isEmpty=!0,this.highlight=!!t.highlight,this.name="undefined"==typeof t.name||null===t.name?l.getUniqueId():t.name,this.source=t.source,this.displayFn=i(t.display||t.displayKey),this.templates=o(t.templates,this.displayFn),this.css=l.mixin({},f,t.appendTo?f.appendTo:{}),this.cssClasses=l.mixin({},f.defaultClasses,t.cssClasses||{});var e=l.className(this.cssClasses.prefix,this.cssClasses.dataset);this.$el=t.$menu&&t.$menu.find(e+"-"+this.name).length>0?h.element(t.$menu.find(e+"-"+this.name)[0]):h.element(p.dataset.replace("%CLASS%",this.name).replace("%PREFIX%",this.cssClasses.prefix).replace("%DATASET%",this.cssClasses.dataset)),this.$menu=t.$menu}function i(t){function e(e){return e[t]}return t=t||"value",l.isFunction(t)?t:e}function o(t,e){function n(t){return"<p>"+e(t)+"</p>"}return{empty:t.empty&&l.templatify(t.empty),header:t.header&&l.templatify(t.header),footer:t.footer&&l.templatify(t.footer),suggestion:t.suggestion||n}}function s(t){return/^[_a-zA-Z0-9-]+$/.test(t)}var a="aaDataset",u="aaValue",c="aaDatum",l=n(47),h=n(46),p=n(60),f=n(61),d=n(51);r.extractDatasetName=function(t){return h.element(t).data(a)},r.extractValue=function(t){return h.element(t).data(u)},r.extractDatum=function(t){var e=h.element(t).data(c);return"string"==typeof e&&(e=JSON.parse(e)),e},l.mixin(r.prototype,d,{_render:function(t,e){function n(){var e=[].slice.call(arguments,0);return e=[{query:t,isEmpty:!0}].concat(e),f.templates.empty.apply(this,e)}function r(){function t(t){var e,n=p.suggestion.replace("%PREFIX%",o.cssClasses.prefix).replace("%SUGGESTION%",o.cssClasses.suggestion);return e=h.element(n).attr({role:"option",id:["option",Math.floor(1e8*Math.random())].join("-")}).append(f.templates.suggestion.apply(this,[t].concat(i))),e.data(a,f.name),e.data(u,f.displayFn(t)||void 0),e.data(c,JSON.stringify(t)),e.children().each(function(){h.element(this).css(o.css.suggestionChild)}),e}var n,r,i=[].slice.call(arguments,0),o=this,s=p.suggestions.replace("%PREFIX%",this.cssClasses.prefix).replace("%SUGGESTIONS%",this.cssClasses.suggestions);return n=h.element(s).css(this.css.suggestions),r=l.map(e,t),n.append.apply(n,r),n}function i(){var e=[].slice.call(arguments,0);return e=[{query:t,isEmpty:!s}].concat(e),f.templates.header.apply(this,e)}function o(){var e=[].slice.call(arguments,0);return e=[{query:t,isEmpty:!s}].concat(e),f.templates.footer.apply(this,e)}if(this.$el){var s,f=this,d=[].slice.call(arguments,2);this.$el.empty(),s=e&&e.length,this._isEmpty=!s,!s&&this.templates.empty?this.$el.html(n.apply(this,d)).prepend(f.templates.header?i.apply(this,d):null).append(f.templates.footer?o.apply(this,d):null):s&&this.$el.html(r.apply(this,d)).prepend(f.templates.header?i.apply(this,d):null).append(f.templates.footer?o.apply(this,d):null),this.$menu&&this.$menu.addClass([this.cssClasses.prefix,s?"with":"without",this.name].join("-")).removeClass([this.cssClasses.prefix,s?"without":"with",this.name].join("-")),this.trigger("rendered",t)}},getRoot:function(){return this.$el},update:function(t){function e(e){if(!n.canceled&&t===n.query){var r=[].slice.call(arguments,1);r=[t,e].concat(r),n._render.apply(n,r)}}var n=this;this.query=t,this.canceled=!1,this.source(t,e)},cancel:function(){this.canceled=!0},clear:function(){this.cancel(),this.$el.empty(),this.trigger("rendered","")},isEmpty:function(){return this._isEmpty},destroy:function(){this.$el=null}}),t.exports=r},function(t,e){"use strict";t.exports={wrapper:'<span class="%ROOT%"></span>',dropdown:'<span class="%PREFIX%-%DROPDOWN_MENU%"></span>',dataset:'<div class="%PREFIX%-%DATASET%-%CLASS%"></div>',suggestions:'<span class="%PREFIX%-%SUGGESTIONS%"></span>',suggestion:'<div class="%PREFIX%-%SUGGESTION%"></div>'}},function(t,e,n){"use strict";var r=n(47),i={wrapper:{position:"relative",display:"inline-block"},hint:{position:"absolute",top:"0",left:"0",borderColor:"transparent",boxShadow:"none",opacity:"1"},input:{position:"relative",verticalAlign:"top",backgroundColor:"transparent"},inputWithNoHint:{position:"relative",verticalAlign:"top"},dropdown:{position:"absolute",top:"100%",left:"0",zIndex:"100",display:"none"},suggestions:{display:"block"},suggestion:{whiteSpace:"nowrap",cursor:"pointer"},suggestionChild:{whiteSpace:"normal"},ltr:{left:"0",right:"auto"},rtl:{left:"auto",right:"0"},defaultClasses:{root:"algolia-autocomplete",prefix:"aa",dropdownMenu:"dropdown-menu",input:"input",hint:"hint",suggestions:"suggestions",suggestion:"suggestion",cursor:"cursor",dataset:"dataset",empty:"empty"},appendTo:{wrapper:{position:"absolute",zIndex:"100",display:"none"},input:{},inputWithNoHint:{},dropdown:{display:"block"}}};r.isMsie()&&r.mixin(i.input,{backgroundImage:"url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)"}),r.isMsie()&&r.isMsie()<=7&&r.mixin(i.input,{marginTop:"-1px"}),t.exports=i},function(t,e,n){"use strict";t.exports={hits:n(63),popularIn:n(64)}},function(t,e,n){"use strict";var r=n(47);t.exports=function(t,e){function n(n,i){t.search(n,e,function(t,e){return t?void r.error(t.message):void i(e.hits,e)})}return n}},function(t,e,n){"use strict";var r=n(47);t.exports=function(t,e,n,i){function o(o,u){t.search(o,e,function(t,e){if(t)return void r.error(t.message);if(e.hits.length>0){var o=e.hits[0],c=r.mixin({hitsPerPage:0},n);return delete c.source,delete c.index,void a.search(s(o),c,function(t,n){if(t)return void r.error(t.message);var s=[];if(i.includeAll){var a=i.allTitle||"All departments";s.push(r.mixin({facet:{value:a,count:n.nbHits}},r.cloneDeep(o)))}r.each(n.facets,function(t,e){r.each(t,function(t,n){s.push(r.mixin({facet:{facet:e,value:n,count:t}},r.cloneDeep(o)))})});for(var c=1;c<e.hits.length;++c)s.push(e.hits[c]);u(s,e)})}u([])})}if(!n.source)return r.error("Missing 'source' key");var s=r.isFunction(n.source)?n.source:function(t){return t[n.source]};if(!n.index)return r.error("Missing 'index' key");var a=n.index;return i=i||{},o}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n="algolia-docsearch",r=n+"-suggestion",i=n+"-footer",o={suggestion:'\n <div class="'+r+"\n {{#isCategoryHeader}}"+r+"__main{{/isCategoryHeader}}\n {{#isSubCategoryHeader}}"+r+'__secondary{{/isSubCategoryHeader}}\n ">\n <div class="'+r+'--category-header">{{{category}}}</div>\n <div class="'+r+'--wrapper">\n <div class="'+r+"--subcategory-column {{#isSubcategoryDuplicate}}"+r+'--duplicate-content{{/isSubcategoryDuplicate}}">\n <span class="'+r+'--subcategory-column-text">{{{subcategory}}}</span>\n </div>\n {{#isTextOrSubcatoryNonEmpty}}\n <div class="'+r+'--content">\n <div class="'+r+"--subcategory-inline {{#isSubcategoryDuplicate}}"+r+'--duplicate-content{{/isSubcategoryDuplicate}}">{{{subcategory}}}</div>\n <div class="'+r+"--title {{#isDisplayTitleDuplicate}}"+r+'--duplicate-content{{/isDisplayTitleDuplicate}}">{{{title}}}</div>\n {{#text}}<div class="'+r+'--text">{{{text}}}</div>{{/text}}\n </div>\n {{/isTextOrSubcatoryNonEmpty}}\n </div>\n </div>\n ',footer:'\n <div class="'+i+'">\n <a class="'+i+'--logo" href="https://www.algolia.com/docsearch">Algolia</a>\n </div>\n '};e.default=o,t.exports=e.default},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var i=n(67),o=r(i),s={mergeKeyWithParent:function(t,e){if(void 0===t[e])return t;if("object"!=typeof t[e])return t;var n=o.default.extend({},t,t[e]);return delete n[e],n},groupBy:function(t,e){var n={};return o.default.each(t,function(t,r){if(void 0===r[e])throw new Error("[groupBy]: Object has no key "+e);var i=r[e];"string"==typeof i&&(i=i.toLowerCase()),n[i]||(n[i]=[]),n[i].push(r)}),n},values:function(t){return Object.keys(t).map(function(e){return t[e]})},flatten:function(t){var e=[];return t.forEach(function(t){return Array.isArray(t)?void t.forEach(function(t){e.push(t)}):void e.push(t)}),e},flattenAndFlagFirst:function(t,e){var n=this.values(t).map(function(t){return t.map(function(t,n){return t[e]=0===n,t})});return this.flatten(n)},compact:function(t){var e=[];return t.forEach(function(t){t&&e.push(t)}),e},getHighlightedValue:function(t,e){return t._highlightResult&&t._highlightResult.hierarchy_camel&&t._highlightResult.hierarchy_camel[e]&&t._highlightResult.hierarchy_camel[e].matchLevel&&"none"!==t._highlightResult.hierarchy_camel[e].matchLevel&&t._highlightResult.hierarchy_camel[e].value?t._highlightResult.hierarchy_camel[e].value:t._highlightResult&&t._highlightResult&&t._highlightResult[e]&&t._highlightResult[e].value?t._highlightResult[e].value:t[e]},getSnippetedValue:function(t,e){if(!t._snippetResult||!t._snippetResult[e]||!t._snippetResult[e].value)return t[e];var n=t._snippetResult[e].value;return n[0]!==n[0].toUpperCase()&&(n="…"+n),[".","!","?"].indexOf(n[n.length-1])===-1&&(n+="…"),n},deepClone:function(t){return JSON.parse(JSON.stringify(t))}};e.default=s,t.exports=e.default},function(t,e,n){var r=function(){function t(t){return null==t?String(t):J[z.call(t)]||"object"}function e(e){return"function"==t(e)}function n(t){return null!=t&&t==t.window}function r(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function i(e){return"object"==t(e)}function o(t){return i(t)&&!n(t)&&Object.getPrototypeOf(t)==Object.prototype}function s(t){return"number"==typeof t.length}function a(t){return k.call(t,function(t){return null!=t})}function u(t){return t.length>0?T.fn.concat.apply([],t):t}function c(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function l(t){return t in N?N[t]:N[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function h(t,e){return"number"!=typeof e||R[c(t)]?e:e+"px"}function p(t){var e,n;return I[t]||(e=j.createElement(t),j.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),I[t]=n),I[t]}function f(t){return"children"in t?A.call(t.children):T.map(t.childNodes,function(t){if(1==t.nodeType)return t})}function d(t,e,n){for(x in e)n&&(o(e[x])||X(e[x]))?(o(e[x])&&!o(t[x])&&(t[x]={}),X(e[x])&&!X(t[x])&&(t[x]=[]),d(t[x],e[x],n)):e[x]!==_&&(t[x]=e[x])}function m(t,e){return null==e?T(t):T(t).filter(e)}function y(t,n,r,i){return e(n)?n.call(t,r,i):n}function g(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function v(t,e){var n=t.className||"",r=n&&n.baseVal!==_;return e===_?r?n.baseVal:n:void(r?n.baseVal=e:t.className=e)}function b(t){try{return t?"true"==t||"false"!=t&&("null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?T.parseJSON(t):t):t}catch(e){return t}}function w(t,e){e(t);for(var n=0,r=t.childNodes.length;n<r;n++)w(t.childNodes[n],e)}var _,x,T,S,C,E,O=[],A=O.slice,k=O.filter,j=window.document,I={},N={},R={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},P=/^\s*<(\w+|!)[^>]*>/,D=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,q=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,$=/^(?:body|html)$/i,U=/([A-Z])/g,L=["val","css","html","text","data","width","height","offset"],H=["after","prepend","before","append"],M=j.createElement("table"),F=j.createElement("tr"),B={tr:j.createElement("tbody"),tbody:M,thead:M,tfoot:M,td:F,th:F,"*":j.createElement("div")},V=/complete|loaded|interactive/,K=/^[\w-]*$/,J={},z=J.toString,Q={},Z=j.createElement("div"),G={tabindex:"tabIndex",readonly:"readOnly",for:"htmlFor",class:"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},X=Array.isArray||function(t){return t instanceof Array};return Q.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var r,i=t.parentNode,o=!i;return o&&(i=Z).appendChild(t),r=~Q.qsa(i,e).indexOf(t),o&&Z.removeChild(t),r},C=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},E=function(t){return k.call(t,function(e,n){return t.indexOf(e)==n})},Q.fragment=function(t,e,n){var r,i,s;return D.test(t)&&(r=T(j.createElement(RegExp.$1))),r||(t.replace&&(t=t.replace(q,"<$1></$2>")),e===_&&(e=P.test(t)&&RegExp.$1),e in B||(e="*"),s=B[e],s.innerHTML=""+t,r=T.each(A.call(s.childNodes),function(){s.removeChild(this)})),o(n)&&(i=T(r),T.each(n,function(t,e){L.indexOf(t)>-1?i[t](e):i.attr(t,e)})),r},Q.Z=function(t,e){return t=t||[],t.__proto__=T.fn,t.selector=e||"",t},Q.isZ=function(t){return t instanceof Q.Z},Q.init=function(t,n){var r;if(!t)return Q.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&P.test(t))r=Q.fragment(t,RegExp.$1,n),t=null;else{if(n!==_)return T(n).find(t);r=Q.qsa(j,t)}else{if(e(t))return T(j).ready(t);if(Q.isZ(t))return t;if(X(t))r=a(t);else if(i(t))r=[t],t=null;else if(P.test(t))r=Q.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==_)return T(n).find(t);r=Q.qsa(j,t)}}return Q.Z(r,t)},T=function(t,e){return Q.init(t,e)},T.extend=function(t){var e,n=A.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){d(t,n,e)}),t},Q.qsa=function(t,e){var n,i="#"==e[0],o=!i&&"."==e[0],s=i||o?e.slice(1):e,a=K.test(s);return r(t)&&a&&i?(n=t.getElementById(s))?[n]:[]:1!==t.nodeType&&9!==t.nodeType?[]:A.call(a&&!i?o?t.getElementsByClassName(s):t.getElementsByTagName(e):t.querySelectorAll(e))},T.contains=j.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},T.type=t,T.isFunction=e,T.isWindow=n,T.isArray=X,T.isPlainObject=o,T.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},T.inArray=function(t,e,n){return O.indexOf.call(e,t,n)},T.camelCase=C,T.trim=function(t){return null==t?"":String.prototype.trim.call(t)},T.uuid=0,T.support={},T.expr={},T.map=function(t,e){var n,r,i,o=[];if(s(t))for(r=0;r<t.length;r++)n=e(t[r],r),null!=n&&o.push(n);else for(i in t)n=e(t[i],i),null!=n&&o.push(n);return u(o)},T.each=function(t,e){var n,r;if(s(t)){for(n=0;n<t.length;n++)if(e.call(t[n],n,t[n])===!1)return t}else for(r in t)if(e.call(t[r],r,t[r])===!1)return t;return t},T.grep=function(t,e){return k.call(t,e)},window.JSON&&(T.parseJSON=JSON.parse),T.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){J["[object "+e+"]"]=e.toLowerCase()}),T.fn={forEach:O.forEach,reduce:O.reduce,push:O.push,sort:O.sort,indexOf:O.indexOf,concat:O.concat,map:function(t){return T(T.map(this,function(e,n){return t.call(e,n,e)}))},
slice:function(){return T(A.apply(this,arguments))},ready:function(t){return V.test(j.readyState)&&j.body?t(T):j.addEventListener("DOMContentLoaded",function(){t(T)},!1),this},get:function(t){return t===_?A.call(this):this[t>=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return O.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return e(t)?this.not(this.not(t)):T(k.call(this,function(e){return Q.matches(e,t)}))},add:function(t,e){return T(E(this.concat(T(t,e))))},is:function(t){return this.length>0&&Q.matches(this[0],t)},not:function(t){var n=[];if(e(t)&&t.call!==_)this.each(function(e){t.call(this,e)||n.push(this)});else{var r="string"==typeof t?this.filter(t):s(t)&&e(t.item)?A.call(t):T(t);this.forEach(function(t){r.indexOf(t)<0&&n.push(t)})}return T(n)},has:function(t){return this.filter(function(){return i(t)?T.contains(this,t):T(this).find(t).size()})},eq:function(t){return t===-1?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!i(t)?t:T(t)},last:function(){var t=this[this.length-1];return t&&!i(t)?t:T(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?T(t).filter(function(){var t=this;return O.some.call(n,function(e){return T.contains(e,t)})}):1==this.length?T(Q.qsa(this[0],t)):this.map(function(){return Q.qsa(this,t)}):T()},closest:function(t,e){var n=this[0],i=!1;for("object"==typeof t&&(i=T(t));n&&!(i?i.indexOf(n)>=0:Q.matches(n,t));)n=n!==e&&!r(n)&&n.parentNode;return T(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=T.map(n,function(t){if((t=t.parentNode)&&!r(t)&&e.indexOf(t)<0)return e.push(t),t});return m(e,t)},parent:function(t){return m(E(this.pluck("parentNode")),t)},children:function(t){return m(this.map(function(){return f(this)}),t)},contents:function(){return this.map(function(){return A.call(this.childNodes)})},siblings:function(t){return m(this.map(function(t,e){return k.call(f(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return T.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=p(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var n=e(t);if(this[0]&&!n)var r=T(t).get(0),i=r.parentNode||this.length>1;return this.each(function(e){T(this).wrapAll(n?t.call(this,e):i?r.cloneNode(!0):r)})},wrapAll:function(t){if(this[0]){T(this[0]).before(t=T(t));for(var e;(e=t.children()).length;)t=e.first();T(t).append(this)}return this},wrapInner:function(t){var n=e(t);return this.each(function(e){var r=T(this),i=r.contents(),o=n?t.call(this,e):t;i.length?i.wrapAll(o):r.append(o)})},unwrap:function(){return this.parent().each(function(){T(this).replaceWith(T(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var e=T(this);(t===_?"none"==e.css("display"):t)?e.show():e.hide()})},prev:function(t){return T(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return T(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;T(this).empty().append(y(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=y(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this[0].textContent:null},attr:function(t,e){var n;return"string"!=typeof t||1 in arguments?this.each(function(n){if(1===this.nodeType)if(i(t))for(x in t)g(this,x,t[x]);else g(this,t,y(this,e,n,this.getAttribute(t)))}):this.length&&1===this[0].nodeType?!(n=this[0].getAttribute(t))&&t in this[0]?this[0][t]:n:_},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){g(this,t)},this)})},prop:function(t,e){return t=G[t]||t,1 in arguments?this.each(function(n){this[t]=y(this,e,n,this[t])}):this[0]&&this[0][t]},data:function(t,e){var n="data-"+t.replace(U,"-$1").toLowerCase(),r=1 in arguments?this.attr(n,e):this.attr(n);return null!==r?b(r):_},val:function(t){return 0 in arguments?this.each(function(e){this.value=y(this,t,e,this.value)}):this[0]&&(this[0].multiple?T(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each(function(e){var n=T(this),r=y(this,t,e,n.offset()),i=n.offsetParent().offset(),o={top:r.top-i.top,left:r.left-i.left};"static"==n.css("position")&&(o.position="relative"),n.css(o)});if(!this.length)return null;var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(e,n){if(arguments.length<2){var r,i=this[0];if(!i)return;if(r=getComputedStyle(i,""),"string"==typeof e)return i.style[C(e)]||r.getPropertyValue(e);if(X(e)){var o={};return T.each(e,function(t,e){o[e]=i.style[C(e)]||r.getPropertyValue(e)}),o}}var s="";if("string"==t(e))n||0===n?s=c(e)+":"+h(e,n):this.each(function(){this.style.removeProperty(c(e))});else for(x in e)e[x]||0===e[x]?s+=c(x)+":"+h(x,e[x])+";":this.each(function(){this.style.removeProperty(c(x))});return this.each(function(){this.style.cssText+=";"+s})},index:function(t){return t?this.indexOf(T(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return!!t&&O.some.call(this,function(t){return this.test(v(t))},l(t))},addClass:function(t){return t?this.each(function(e){if("className"in this){S=[];var n=v(this),r=y(this,t,e,n);r.split(/\s+/g).forEach(function(t){T(this).hasClass(t)||S.push(t)},this),S.length&&v(this,n+(n?" ":"")+S.join(" "))}}):this},removeClass:function(t){return this.each(function(e){if("className"in this){if(t===_)return v(this,"");S=v(this),y(this,t,e,S).split(/\s+/g).forEach(function(t){S=S.replace(l(t)," ")}),v(this,S.trim())}})},toggleClass:function(t,e){return t?this.each(function(n){var r=T(this),i=y(this,t,n,v(this));i.split(/\s+/g).forEach(function(t){(e===_?!r.hasClass(t):e)?r.addClass(t):r.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return t===_?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return t===_?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),r=$.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(T(t).css("margin-top"))||0,n.left-=parseFloat(T(t).css("margin-left"))||0,r.top+=parseFloat(T(e[0]).css("border-top-width"))||0,r.left+=parseFloat(T(e[0]).css("border-left-width"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||j.body;t&&!$.test(t.nodeName)&&"static"==T(t).css("position");)t=t.offsetParent;return t})}},T.fn.detach=T.fn.remove,["width","height"].forEach(function(t){var e=t.replace(/./,function(t){return t[0].toUpperCase()});T.fn[t]=function(i){var o,s=this[0];return i===_?n(s)?s["inner"+e]:r(s)?s.documentElement["scroll"+e]:(o=this.offset())&&o[t]:this.each(function(e){s=T(this),s.css(t,y(this,i,e,s[t]()))})}}),H.forEach(function(e,n){var r=n%2;T.fn[e]=function(){var e,i,o=T.map(arguments,function(n){return e=t(n),"object"==e||"array"==e||null==n?n:Q.fragment(n)}),s=this.length>1;return o.length<1?this:this.each(function(t,e){i=r?e:e.parentNode,e=0==n?e.nextSibling:1==n?e.firstChild:2==n?e:null;var a=T.contains(j.documentElement,i);o.forEach(function(t){if(s)t=t.cloneNode(!0);else if(!i)return T(t).remove();i.insertBefore(t,e),a&&w(t,function(t){null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src||window.eval.call(window,t.innerHTML)})})})},T.fn[r?e+"To":"insert"+(n?"Before":"After")]=function(t){return T(t)[e](this),this}}),Q.Z.prototype=T.fn,Q.uniq=E,Q.deserializeValue=b,T.zepto=Q,T}();window.Zepto=r,void 0===window.$&&(window.$=r),function(t){function e(t){return t._zid||(t._zid=p++)}function n(t,n,o,s){if(n=r(n),n.ns)var a=i(n.ns);return(y[e(t)]||[]).filter(function(t){return t&&(!n.e||t.e==n.e)&&(!n.ns||a.test(t.ns))&&(!o||e(t.fn)===e(o))&&(!s||t.sel==s)})}function r(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function i(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function o(t,e){return t.del&&!v&&t.e in b||!!e}function s(t){return w[t]||v&&b[t]||t}function a(n,i,a,u,l,p,f){var d=e(n),m=y[d]||(y[d]=[]);i.split(/\s/).forEach(function(e){if("ready"==e)return t(document).ready(a);var i=r(e);i.fn=a,i.sel=l,i.e in w&&(a=function(e){var n=e.relatedTarget;if(!n||n!==this&&!t.contains(this,n))return i.fn.apply(this,arguments)}),i.del=p;var d=p||a;i.proxy=function(t){if(t=c(t),!t.isImmediatePropagationStopped()){t.data=u;var e=d.apply(n,t._args==h?[t]:[t].concat(t._args));return e===!1&&(t.preventDefault(),t.stopPropagation()),e}},i.i=m.length,m.push(i),"addEventListener"in n&&n.addEventListener(s(i.e),i.proxy,o(i,f))})}function u(t,r,i,a,u){var c=e(t);(r||"").split(/\s/).forEach(function(e){n(t,e,i,a).forEach(function(e){delete y[c][e.i],"removeEventListener"in t&&t.removeEventListener(s(e.e),e.proxy,o(e,u))})})}function c(e,n){return!n&&e.isDefaultPrevented||(n||(n=e),t.each(S,function(t,r){var i=n[t];e[t]=function(){return this[r]=_,i&&i.apply(n,arguments)},e[r]=x}),(n.defaultPrevented!==h?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(e.isDefaultPrevented=_)),e}function l(t){var e,n={originalEvent:t};for(e in t)T.test(e)||t[e]===h||(n[e]=t[e]);return c(n,t)}var h,p=1,f=Array.prototype.slice,d=t.isFunction,m=function(t){return"string"==typeof t},y={},g={},v="onfocusin"in window,b={focus:"focusin",blur:"focusout"},w={mouseenter:"mouseover",mouseleave:"mouseout"};g.click=g.mousedown=g.mouseup=g.mousemove="MouseEvents",t.event={add:a,remove:u},t.proxy=function(n,r){var i=2 in arguments&&f.call(arguments,2);if(d(n)){var o=function(){return n.apply(r,i?i.concat(f.call(arguments)):arguments)};return o._zid=e(n),o}if(m(r))return i?(i.unshift(n[r],n),t.proxy.apply(null,i)):t.proxy(n[r],n);throw new TypeError("expected function")},t.fn.bind=function(t,e,n){return this.on(t,e,n)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var _=function(){return!0},x=function(){return!1},T=/^([A-Z]|returnValue$|layer[XY]$)/,S={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};t.fn.delegate=function(t,e,n){return this.on(e,t,n)},t.fn.undelegate=function(t,e,n){return this.off(e,t,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,n,r,i,o){var s,c,p=this;return e&&!m(e)?(t.each(e,function(t,e){p.on(t,n,r,e,o)}),p):(m(n)||d(i)||i===!1||(i=r,r=n,n=h),(d(r)||r===!1)&&(i=r,r=h),i===!1&&(i=x),p.each(function(h,p){o&&(s=function(t){return u(p,t.type,i),i.apply(this,arguments)}),n&&(c=function(e){var r,o=t(e.target).closest(n,p).get(0);if(o&&o!==p)return r=t.extend(l(e),{currentTarget:o,liveFired:p}),(s||i).apply(o,[r].concat(f.call(arguments,1)))}),a(p,e,i,r,n,c||s)}))},t.fn.off=function(e,n,r){var i=this;return e&&!m(e)?(t.each(e,function(t,e){i.off(t,n,e)}),i):(m(n)||d(r)||r===!1||(r=n,n=h),r===!1&&(r=x),i.each(function(){u(this,e,r,n)}))},t.fn.trigger=function(e,n){return e=m(e)||t.isPlainObject(e)?t.Event(e):c(e),e._args=n,this.each(function(){e.type in b&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)})},t.fn.triggerHandler=function(e,r){var i,o;return this.each(function(s,a){i=l(m(e)?t.Event(e):e),i._args=r,i.target=a,t.each(n(a,e.type||e),function(t,e){if(o=e.proxy(i),i.isImmediatePropagationStopped())return!1})}),o},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}}),t.Event=function(t,e){m(t)||(e=t,t=e.type);var n=document.createEvent(g[t]||"Events"),r=!0;if(e)for(var i in e)"bubbles"==i?r=!!e[i]:n[i]=e[i];return n.initEvent(t,r,!0),c(n)}}(r),function(t){function e(e,n,r){var i=t.Event(n);return t(e).trigger(i,r),!i.isDefaultPrevented()}function n(t,n,r,i){if(t.global)return e(n||v,r,i)}function r(e){e.global&&0===t.active++&&n(e,null,"ajaxStart")}function i(e){e.global&&!--t.active&&n(e,null,"ajaxStop")}function o(t,e){var r=e.context;return e.beforeSend.call(r,t,e)!==!1&&n(e,r,"ajaxBeforeSend",[t,e])!==!1&&void n(e,r,"ajaxSend",[t,e])}function s(t,e,r,i){var o=r.context,s="success";r.success.call(o,t,s,e),i&&i.resolveWith(o,[t,s,e]),n(r,o,"ajaxSuccess",[e,r,t]),u(s,e,r)}function a(t,e,r,i,o){var s=i.context;i.error.call(s,r,e,t),o&&o.rejectWith(s,[r,e,t]),n(i,s,"ajaxError",[r,i,t||e]),u(e,r,i)}function u(t,e,r){var o=r.context;r.complete.call(o,e,t),n(r,o,"ajaxComplete",[e,r]),i(r)}function c(){}function l(t){return t&&(t=t.split(";",2)[0]),t&&(t==T?"html":t==x?"json":w.test(t)?"script":_.test(t)&&"xml")||"text"}function h(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function p(e){e.processData&&e.data&&"string"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&"GET"!=e.type.toUpperCase()||(e.url=h(e.url,e.data),e.data=void 0)}function f(e,n,r,i){return t.isFunction(n)&&(i=r,r=n,n=void 0),t.isFunction(r)||(i=r,r=void 0),{url:e,data:n,success:r,dataType:i}}function d(e,n,r,i){var o,s=t.isArray(n),a=t.isPlainObject(n);t.each(n,function(n,u){o=t.type(u),i&&(n=r?i:i+"["+(a||"object"==o||"array"==o?n:"")+"]"),!i&&s?e.add(u.name,u.value):"array"==o||!r&&"object"==o?d(e,u,r,n):e.add(n,u)})}var m,y,g=0,v=window.document,b=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,w=/^(?:text|application)\/javascript/i,_=/^(?:text|application)\/xml/i,x="application/json",T="text/html",S=/^\s*$/,C=v.createElement("a");C.href=window.location.href,t.active=0,t.ajaxJSONP=function(e,n){if(!("type"in e))return t.ajax(e);var r,i,u=e.jsonpCallback,c=(t.isFunction(u)?u():u)||"jsonp"+ ++g,l=v.createElement("script"),h=window[c],p=function(e){t(l).triggerHandler("error",e||"abort")},f={abort:p};return n&&n.promise(f),t(l).on("load error",function(o,u){clearTimeout(i),t(l).off().remove(),"error"!=o.type&&r?s(r[0],f,e,n):a(null,u||"error",f,e,n),window[c]=h,r&&t.isFunction(h)&&h(r[0]),h=r=void 0}),o(f,e)===!1?(p("abort"),f):(window[c]=function(){r=arguments},l.src=e.url.replace(/\?(.+)=\?/,"?$1="+c),v.head.appendChild(l),e.timeout>0&&(i=setTimeout(function(){p("timeout")},e.timeout)),f)},t.ajaxSettings={type:"GET",beforeSend:c,success:c,error:c,complete:c,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:x,xml:"application/xml, text/xml",html:T,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0},t.ajax=function(e){var n,i=t.extend({},e||{}),u=t.Deferred&&t.Deferred();for(m in t.ajaxSettings)void 0===i[m]&&(i[m]=t.ajaxSettings[m]);r(i),i.crossDomain||(n=v.createElement("a"),n.href=i.url,n.href=n.href,i.crossDomain=C.protocol+"//"+C.host!=n.protocol+"//"+n.host),i.url||(i.url=window.location.toString()),p(i);var f=i.dataType,d=/\?.+=\?/.test(i.url);if(d&&(f="jsonp"),i.cache!==!1&&(e&&e.cache===!0||"script"!=f&&"jsonp"!=f)||(i.url=h(i.url,"_="+Date.now())),"jsonp"==f)return d||(i.url=h(i.url,i.jsonp?i.jsonp+"=?":i.jsonp===!1?"":"callback=?")),t.ajaxJSONP(i,u);var g,b=i.accepts[f],w={},_=function(t,e){w[t.toLowerCase()]=[t,e]},x=/^([\w-]+:)\/\//.test(i.url)?RegExp.$1:window.location.protocol,T=i.xhr(),E=T.setRequestHeader;if(u&&u.promise(T),i.crossDomain||_("X-Requested-With","XMLHttpRequest"),_("Accept",b||"*/*"),(b=i.mimeType||b)&&(b.indexOf(",")>-1&&(b=b.split(",",2)[0]),T.overrideMimeType&&T.overrideMimeType(b)),(i.contentType||i.contentType!==!1&&i.data&&"GET"!=i.type.toUpperCase())&&_("Content-Type",i.contentType||"application/x-www-form-urlencoded"),i.headers)for(y in i.headers)_(y,i.headers[y]);if(T.setRequestHeader=_,T.onreadystatechange=function(){if(4==T.readyState){T.onreadystatechange=c,clearTimeout(g);var e,n=!1;if(T.status>=200&&T.status<300||304==T.status||0==T.status&&"file:"==x){f=f||l(i.mimeType||T.getResponseHeader("content-type")),e=T.responseText;try{"script"==f?(0,eval)(e):"xml"==f?e=T.responseXML:"json"==f&&(e=S.test(e)?null:t.parseJSON(e))}catch(t){n=t}n?a(n,"parsererror",T,i,u):s(e,T,i,u)}else a(T.statusText||null,T.status?"error":"abort",T,i,u)}},o(T,i)===!1)return T.abort(),a(null,"abort",T,i,u),T;if(i.xhrFields)for(y in i.xhrFields)T[y]=i.xhrFields[y];var O=!("async"in i)||i.async;T.open(i.type,i.url,O,i.username,i.password);for(y in w)E.apply(T,w[y]);return i.timeout>0&&(g=setTimeout(function(){T.onreadystatechange=c,T.abort(),a(null,"timeout",T,i,u)},i.timeout)),T.send(i.data?i.data:null),T},t.get=function(){return t.ajax(f.apply(null,arguments))},t.post=function(){var e=f.apply(null,arguments);return e.type="POST",t.ajax(e)},t.getJSON=function(){var e=f.apply(null,arguments);return e.dataType="json",t.ajax(e)},t.fn.load=function(e,n,r){if(!this.length)return this;var i,o=this,s=e.split(/\s/),a=f(e,n,r),u=a.success;return s.length>1&&(a.url=s[0],i=s[1]),a.success=function(e){o.html(i?t("<div>").html(e.replace(b,"")).find(i):e),u&&u.apply(o,arguments)},t.ajax(a),this};var E=encodeURIComponent;t.param=function(e,n){var r=[];return r.add=function(e,n){t.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(E(e)+"="+E(n))},d(r,e,n),r.join("&").replace(/%20/g,"+")}}(r),function(t){t.fn.serializeArray=function(){var e,n,r=[],i=function(t){return t.forEach?t.forEach(i):void r.push({name:e,value:t})};return this[0]&&t.each(this[0].elements,function(r,o){n=o.type,e=o.name,e&&"fieldset"!=o.nodeName.toLowerCase()&&!o.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||o.checked)&&i(t(o).val())}),r},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(r),function(t){"__proto__"in{}||t.extend(t.zepto,{Z:function(e,n){return e=e||[],t.extend(e,t.fn),e.selector=n||"",e.__Z=!0,e},isZ:function(e){return"array"===t.type(e)&&"__Z"in e}});try{getComputedStyle(void 0)}catch(t){var e=getComputedStyle;window.getComputedStyle=function(t){try{return e(t)}catch(t){return null}}}}(r),t.exports=r},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default="1.5.0",t.exports=e.default}])});
//# sourceMappingURL=dist/cdn/docsearch.min.js.map