!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g0){var d=this.state.results.map(function(a,c){return j.default.createElement(s,{key:a.objectID,post:a,showDetail:b.showDetail.bind(b,c)})});a=j.default.createElement("ul",{role:"list",className:"wpseo-kb-search-results"},d),(0,p.default)(this.props.foundResultsText.replace("%d",c))}else""!==this.state.searchString&&(a=j.default.createElement("p",null,this.props.noResultsText),(0,p.default)(this.props.noResultsText));return a}},{key:"renderDetail",value:function(){var a=this.state.showDetail,b=this.state.results[a];return j.default.createElement("div",{className:"wpseo-kb-search-detail"},j.default.createElement("div",{className:"wpseo-kb-search-navigation"},j.default.createElement("button",{className:"button dashicon-button wpseo-kb-search-back-button","aria-label":this.props.backLabel,onClick:this.hideDetail},this.props.back),j.default.createElement("a",{href:b.permalink,className:"button dashicon-button wpseo-kb-search-ext-link ","aria-label":this.props.openLabel,target:"_blank"},this.props.open)),j.default.createElement(t,{post:b,iframeTitle:this.props.iframeTitle}))}},{key:"renderError",value:function(a){return console.error(a),(0,p.default)(this.props.errorMessage),j.default.createElement("p",null,this.props.errorMessage)}},{key:"render",value:function(){var a="",b=j.default.createElement(r,{headingText:this.props.headingText,submitAction:this.searchButtonClicked,searchString:this.state.searchString,searchButtonText:this.props.searchButtonText});return a=this.state.errorMessage?j.default.createElement("div",null,b,this.renderError(this.state.errorMessage)):this.state.searching?j.default.createElement("div",null,b,j.default.createElement(u,{loadingPlaceholder:this.props.loadingPlaceholder})):this.state.showDetail===!1?j.default.createElement("div",null,b,this.state.results.length>0?j.default.createElement("h2",{className:"screen-reader-text"},this.props.searchResultsHeading):"",this.renderSearchResults()):this.renderDetail(),j.default.createElement("div",{className:"wpseo-kb-search-container"},a)}}]),b}(j.default.Component);q.propTypes={foundResultsText:j.default.PropTypes.string,noResultsText:j.default.PropTypes.string,headingText:j.default.PropTypes.string,searchButtonText:j.default.PropTypes.string,searchResultsHeading:j.default.PropTypes.string,iframeTitle:j.default.PropTypes.string,algoliaApplicationId:j.default.PropTypes.string.isRequired,algoliaApiKey:j.default.PropTypes.string.isRequired,algoliaIndexName:j.default.PropTypes.string.isRequired,errorMessage:j.default.PropTypes.string.isRequired,loadingPlaceholder:j.default.PropTypes.string.isRequired,open:j.default.PropTypes.string.isRequired,openLabel:j.default.PropTypes.string.isRequired,back:j.default.PropTypes.string.isRequired,backLabel:j.default.PropTypes.string.isRequired},q.defaultProps={foundResultsText:"Number of search results: %d",noResultsText:"No results found.",headingText:"Search the Yoast knowledge base",searchButtonText:"Search",searchResultsHeading:"Search results",iframeTitle:"Knowledge base article",algoliaApplicationId:"RC8G2UCWJK",algoliaApiKey:"459903434a7963f83e7d4cd9bfe89c0d",algoliaIndexName:"knowledge_base_all",errorMessage:"Something went wrong. Please try again later.",loadingPlaceholder:"Loading...",back:"Back",backLabel:"Back to search results",open:"Open",openLabel:"Open the knowledge base article in a new window or read it in the iframe below"};var r=function(a){return j.default.createElement("div",{className:"wpseo-kb-search-search-bar"},j.default.createElement("h2",{id:"wpseo-kb-search-heading"},a.headingText),j.default.createElement("form",{onSubmit:function(b){b.preventDefault(),a.submitAction(b)}},j.default.createElement("input",{type:"text","aria-labelledby":"wpseo-kb-search-heading",defaultValue:a.searchString}),j.default.createElement("button",{type:"submit",className:"button wpseo-kb-search-search-button"},a.searchButtonText)))},s=function(a){var b=a.post,c=b.excerpt||b.metadesc;return j.default.createElement("li",null,j.default.createElement("a",{href:b.permalink,onClick:function(b){b.preventDefault(),a.showDetail()},className:"wpseo-kb-search-result-link"},j.default.createElement("div",{className:"wpseo-kb-search-result"},j.default.createElement("h3",{className:"wpseo-kb-search-result-title"},b.post_title),c&&j.default.createElement("p",null,c))))},t=function(a){var b=a.post.permalink+"amp?source=wpseo-kb-search";return j.default.createElement("iframe",{src:b,className:"kb-search-content-frame",title:a.iframeTitle})},u=function(a){return j.default.createElement("div",{className:"wpseo-kb-loader"},a.loadingPlaceholder)};c.default=q},{"a11y-speak":4,algoliasearch:11,"lodash/isUndefined":61,react:209}],3:[function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{default:a}}var e=a("./kb-search/wp-seo-kb-search-init"),f=d(e),g=a("a11y-speak"),h=d(g);!function(){function a(a){var b=!1,c="",d=[],e=["userid","name","user_description"],f=["date"],g=["title","parent_title","excerpt","excerpt_only","caption","focuskw","pt_single","pt_plural","modified","id"],i=["term404","searchphrase"],j=["term_title","term_description"],k=["category","category_description","tag","tag_description"];a.hasClass("posttype-template")?d=d.concat(i,j):a.hasClass("homepage-template")?d=d.concat(e,f,g,i,j,k):a.hasClass("taxonomy-template")?d=d.concat(e,f,g,i):a.hasClass("author-template")?d=d.concat(g,f,i,j,k):a.hasClass("date-template")?d=d.concat(e,g,i,j,k):a.hasClass("search-template")?d=d.concat(e,f,g,j,k,["term404"]):a.hasClass("error404-template")&&(d=d.concat(e,f,g,j,k,["searchphrase"])),jQuery.each(d,function(d,e){if(c=a.attr("id")+"-"+e+"-warning",a.val().search("%%"+e+"%%")!==-1){a.addClass("wpseo-variable-warning-element");var f=wpseoAdminL10n.variable_warning.replace("%s","%%"+e+"%%");jQuery("#"+c).length?jQuery("#"+c).html(f):a.after('
'+f+"
"),(0,h.default)(wpseoAdminL10n.variable_warning.replace("%s",e),"assertive"),b=!0}else jQuery("#"+c).length&&jQuery("#"+c).remove()}),b===!1&&a.removeClass("wpseo-variable-warning-element")}function b(a,b,c,d){jQuery.post(ajaxurl,{action:"wpseo_set_option",option:a,newval:b,_wpnonce:d},function(a){a&&jQuery("#"+c).hide()})}function c(a){jQuery.post(ajaxurl,{action:"wpseo_kill_blocking_files",_ajax_nonce:a}).done(function(a){var b=jQuery(".yoast-notice-blocking-files"),c=jQuery("#blocking_files");c.html(a.data.message),b.attr("tabindex","-1").focus(),a.success?b.removeClass("notice-error").addClass("notice-success"):b.addClass("yoast-blocking-files-error")})}function d(){jQuery("#og_frontpage_desc").val(jQuery("#meta_description").val())}function e(){var a=jQuery("#wpseo-conf");if(a.length){var b=a.attr("action").split("#")[0];a.attr("action",b+window.location.hash)}}function g(){var a=jQuery("#TB_ajaxContent");jQuery.post(ajaxurl,{_wpnonce:a.find("input[name=fb_admin_nonce]").val(),admin_name:a.find("input[name=fb_admin_name]").val(),admin_id:a.find("input[name=fb_admin_id]").val(),action:"wpseo_add_fb_admin"},function(b){var c=jQuery.parseJSON(b);switch(a.find("p.notice").remove(),c.success){case 1:a.find("input[type=text]").val(""),jQuery("#user_admin").append(c.html),jQuery("#connected_fb_admins").show(),tb_remove();break;case 0:a.find(".form-wrap").prepend(c.html)}})}function i(){var a="400px";jQuery("#company_or_person").select2({width:a,language:wpseoSelect2Locale}),jQuery("#twitter_card_type").select2({width:a,language:wpseoSelect2Locale}),jQuery("#post_types-post-maintax").select2({width:a,language:wpseoSelect2Locale}),jQuery("#profile").select2({width:a,language:wpseoSelect2Locale})}function j(){var a=window.location.hash.replace("#top#","");""!==a&&"#"!==a.charAt(0)||(a=jQuery(".wpseotab").attr("id")),jQuery("#"+a).addClass("active"),jQuery("#"+a+"-tab").addClass("nav-tab-active").click()}jQuery(window).on("hashchange",e),jQuery(document).on("ready",e),window.wpseoDetectWrongVariables=a,window.setWPOption=b,window.wpseoKillBlockingFiles=c,window.wpseoCopyHomeMeta=d,window.wpseo_add_fb_admin=g,window.wpseoSetTabHash=e,jQuery(document).ready(function(){(0,f.default)(),jQuery("#enablexmlsitemap").change(function(){jQuery("#sitemapinfo").toggle(jQuery(this).is(":checked"))}).change(),jQuery("#disable-author input[type='radio']").change(function(){jQuery(this).is(":checked")&&jQuery("#author-archives-titles-metas-content").toggle("off"===jQuery(this).val())}).change(),jQuery("#disable-date input[type='radio']").change(function(){jQuery(this).is(":checked")&&jQuery("#date-archives-titles-metas-content").toggle("off"===jQuery(this).val())}).change(),jQuery("#disable-post_format").change(function(){jQuery("#post_format-titles-metas").toggle(jQuery(this).is(":not(:checked)"))}).change(),jQuery("#breadcrumbs-enable").change(function(){jQuery("#breadcrumbsinfo").toggle(jQuery(this).is(":checked"))}).change(),jQuery("#disable_author_sitemap").find("input:radio").change(function(){jQuery(this).is(":checked")&&jQuery("#xml_user_block").toggle("off"===jQuery(this).val())}).change(),jQuery("#cleanpermalinks").change(function(){jQuery("#cleanpermalinksdiv").toggle(jQuery(this).is(":checked"))}).change(),jQuery("#wpseo-tabs").find("a").click(function(){jQuery("#wpseo-tabs").find("a").removeClass("nav-tab-active"),jQuery(".wpseotab").removeClass("active");var a=jQuery(this).attr("id").replace("-tab","");jQuery("#"+a).addClass("active"),jQuery(this).addClass("nav-tab-active")}),jQuery("#company_or_person").change(function(){var a=jQuery(this).val();"company"===a?(jQuery("#knowledge-graph-company").show(),jQuery("#knowledge-graph-person").hide()):"person"===a?(jQuery("#knowledge-graph-company").hide(),jQuery("#knowledge-graph-person").show()):(jQuery("#knowledge-graph-company").hide(),jQuery("#knowledge-graph-person").hide())}).change(),jQuery(".template").change(function(){a(jQuery(this))}).change(),jQuery("#blocking_files .button").on("click",function(){c(jQuery(this).data("nonce"))}),jQuery(".switch-yoast-seo input").on("keydown",function(a){"keydown"===a.type&&13===a.which&&a.preventDefault()}),j(),i()})}()},{"./kb-search/wp-seo-kb-search-init":1,"a11y-speak":4}],4:[function(a,b,c){var d,e,f=function(a){a=a||"polite";var b=document.createElement("div");b.id="a11y-speak-"+a,b.className="a11y-speak-region";var c="clip: rect(1px, 1px, 1px, 1px); position: absolute; height: 1px; width: 1px; overflow: hidden;";return b.setAttribute("style",c),b.setAttribute("aria-live",a),b.setAttribute("aria-relevant","additions text"),b.setAttribute("aria-atomic","true"),document.querySelector("body").appendChild(b),b},g=function(a){return"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?a():void document.addEventListener("DOMContentLoaded",a)};g(function(){d=document.getElementById("a11y-speak-polite"),e=document.getElementById("a11y-speak-assertive"),null===d&&(d=f("polite")),null===e&&(e=f("assertive"))});var h=function(){for(var a=document.querySelectorAll(".a11y-speak-region"),b=0;b]+>/g," "),e&&"assertive"===b?e.textContent=a:d&&(d.textContent=a)};b.exports=i},{}],5:[function(a,b,c){function d(a){if(a=""+a,!(a.length>1e4)){var b=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(a);if(b){var c=parseFloat(b[1]),d=(b[2]||"ms").toLowerCase();switch(d){case"years":case"year":case"yrs":case"yr":case"y":return c*l;case"days":case"day":case"d":return c*k;case"hours":case"hour":case"hrs":case"hr":case"h":return c*j;case"minutes":case"minute":case"mins":case"min":case"m":return c*i;case"seconds":case"second":case"secs":case"sec":case"s":return c*h;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c}}}}function e(a){return a>=k?Math.round(a/k)+"d":a>=j?Math.round(a/j)+"h":a>=i?Math.round(a/i)+"m":a>=h?Math.round(a/h)+"s":a+"ms"}function f(a){return g(a,k,"day")||g(a,j,"hour")||g(a,i,"minute")||g(a,h,"second")||a+" ms"}function g(a,b,c){if(!(a=m.hosts[b.hostType].length&&(o||!p)?(a.debugData=q,m._promise.reject(a)):a instanceof i.RequestTimeout?t():s()}function s(){return g("retrying request"),m.hostIndex[b.hostType]=(m.hostIndex[b.hostType]+1)%m.hosts[b.hostType].length,c(a,j)}function t(){return g("retrying request with higher timeout"),m.hostIndex[b.hostType]=(m.hostIndex[b.hostType]+1)%m.hosts[b.hostType].length,j.timeout=m.requestTimeout*(n+1),c(a,j)}var u,v=new Date;if(m._useCache&&(u=b.url),m._useCache&&d&&(u+="_body_"+j.body),m._useCache&&k&&void 0!==k[u])return g("serving response from cache"),m._promise.resolve(JSON.parse(k[u]));if(n>=m.hosts[b.hostType].length)return!p||o?(g("could not get any response"),m._promise.reject(new i.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue. Application id was: "+m.applicationID,{debugData:q}))):(g("switching to fallback"),n=0,j.method=b.fallback.method,j.url=b.fallback.url,j.jsonBody=b.fallback.body,j.jsonBody&&(j.body=f(j.jsonBody)),e=m._computeRequestHeaders(),j.timeout=m.requestTimeout*(n+1),m.hostIndex[b.hostType]=0,o=!0,c(m._request.fallback,j));var w=m.hosts[b.hostType][m.hostIndex[b.hostType]],x=w+j.url,y={body:j.body,jsonBody:j.jsonBody,method:j.method,headers:e,timeout:j.timeout,debug:g};return g("method: %s, url: %s, headers: %j, timeout: %d",y.method,x,y.headers,y.timeout),a===m._request.fallback&&g("using fallback"),a.call(m,x,y).then(l,r)}var d,e,g=a("debug")("algoliasearch:"+b.url),k=b.cache,m=this,n=0,o=!1,p=m._useFallback&&m._request.fallback&&b.fallback;this.apiKey.length>l&&void 0!==b.body&&(void 0!==b.body.params||void 0!==b.body.requests)?(b.body.apiKey=this.apiKey,e=this._computeRequestHeaders(!1)):e=this._computeRequestHeaders(),void 0!==b.body&&(d=f(b.body)),g("request start");var q=[],r=c(m._request,{url:b.url,method:b.method,body:d,jsonBody:b.body,timeout:m.requestTimeout*(n+1)});return b.callback?void r.then(function(a){j(function(){b.callback(null,a)},m._setTimeout||setTimeout)},function(a){j(function(){b.callback(a)},m._setTimeout||setTimeout)}):r},d.prototype._getSearchParams=function(a,b){if(void 0===a||null===a)return b;for(var c in a)null!==c&&void 0!==a[c]&&a.hasOwnProperty(c)&&(b+=""===b?"":"&",b+=c+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(a[c])?f(a[c]):a[c]));return b},d.prototype._computeRequestHeaders=function(b){var c=a("foreach"),d={"x-algolia-agent":this._ua,"x-algolia-application-id":this.applicationID};return b!==!1&&(d["x-algolia-api-key"]=this.apiKey),this.userToken&&(d["x-algolia-usertoken"]=this.userToken),this.securityTags&&(d["x-algolia-tagfilters"]=this.securityTags),this.extraHeaders&&c(this.extraHeaders,function(a){d[a.name]=a.value}),d},d.prototype.search=function(b,c,d){var e=a("isarray"),f=a("./map.js"),g="Usage: client.search(arrayOfQueries[, callback])";if(!e(b))throw new Error(g);"function"==typeof c?(d=c,c={}):void 0===c&&(c={});var h=this,i={requests:f(b,function(a){var b="";return void 0!==a.query&&(b+="query="+encodeURIComponent(a.query)),{indexName:a.indexName,params:h._getSearchParams(a.params,b)}})},j=f(i.requests,function(a,b){return b+"="+encodeURIComponent("/1/indexes/"+encodeURIComponent(a.indexName)+"?"+a.params)}).join("&"),k="/1/indexes/*/queries";return void 0!==c.strategy&&(k+="?strategy="+c.strategy),this._jsonRequest({cache:this.cache,method:"POST",url:k,body:i,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:j}},callback:d})},d.prototype.setSecurityTags=function(a){if("[object Array]"===Object.prototype.toString.call(a)){for(var b=[],c=0;cg&&(b=g),"published"!==a.status?k._promise.delay(b).then(c):a})}function d(a){i(function(){b(null,a)},k._setTimeout||setTimeout)}function e(a){i(function(){b(a)},k._setTimeout||setTimeout)}var f=100,g=5e3,h=0,j=this,k=j.as,l=c();return b?void l.then(d,e):l},d.prototype.clearIndex=function(a){var b=this;return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(b.indexName)+"/clear",hostType:"write",callback:a})},d.prototype.getSettings=function(a){var b=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(b.indexName)+"/settings?getVersion=2",hostType:"read",callback:a})},d.prototype.searchSynonyms=function(a,b){return"function"==typeof a?(b=a,a={}):void 0===a&&(a={}),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/search",body:a,hostType:"read",callback:b})},d.prototype.saveSynonym=function(a,b,c){return"function"==typeof b?(c=b,b={}):void 0===b&&(b={}),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(a.objectID)+"?forwardToSlaves="+(b.forwardToSlaves?"true":"false"),body:a,hostType:"write",callback:c})},d.prototype.getSynonym=function(a,b){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(a),hostType:"read",callback:b})},d.prototype.deleteSynonym=function(a,b,c){return"function"==typeof b?(c=b,b={}):void 0===b&&(b={}),this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/"+encodeURIComponent(a)+"?forwardToSlaves="+(b.forwardToSlaves?"true":"false"),hostType:"write",callback:c})},d.prototype.clearSynonyms=function(a,b){return"function"==typeof a?(b=a,a={}):void 0===a&&(a={}),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/clear?forwardToSlaves="+(a.forwardToSlaves?"true":"false"),hostType:"write",callback:b})},d.prototype.batchSynonyms=function(a,b,c){return"function"==typeof b?(c=b,b={}):void 0===b&&(b={}),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/synonyms/batch?forwardToSlaves="+(b.forwardToSlaves?"true":"false")+"&replaceExistingSynonyms="+(b.replaceExistingSynonyms?"true":"false"),hostType:"write",body:a,callback:c})},d.prototype.setSettings=function(a,b,c){1!==arguments.length&&"function"!=typeof b||(c=b,b={});var d=b.forwardToSlaves||!1,e=this;return this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(e.indexName)+"/settings?forwardToSlaves="+(d?"true":"false"),hostType:"write",body:a,callback:c})},d.prototype.listUserKeys=function(a){var b=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(b.indexName)+"/keys",hostType:"read",callback:a})},d.prototype.getUserKeyACL=function(a,b){var c=this;return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(c.indexName)+"/keys/"+a,hostType:"read",callback:b})},d.prototype.deleteUserKey=function(a,b){var c=this;return this.as._jsonRequest({method:"DELETE",url:"/1/indexes/"+encodeURIComponent(c.indexName)+"/keys/"+a,hostType:"write",callback:b})},d.prototype.addUserKey=function(b,c,d){var e=a("isarray"),f="Usage: index.addUserKey(arrayOfAcls[, params, callback])";if(!e(b))throw new Error(f);1!==arguments.length&&"function"!=typeof c||(d=c,c=null);var g={acl:b};return c&&(g.validity=c.validity,g.maxQueriesPerIPPerHour=c.maxQueriesPerIPPerHour,g.maxHitsPerQuery=c.maxHitsPerQuery,g.description=c.description,c.queryParameters&&(g.queryParameters=this.as._getSearchParams(c.queryParameters,"")),g.referers=c.referers),this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys",body:g,hostType:"write",callback:d})},d.prototype.addUserKeyWithValidity=g(function(a,b,c){return this.addUserKey(a,b,c)},h("index.addUserKeyWithValidity()","index.addUserKey()")),d.prototype.updateUserKey=function(b,c,d,e){var f=a("isarray"),g="Usage: index.updateUserKey(key, arrayOfAcls[, params, callback])";if(!f(c))throw new Error(g);2!==arguments.length&&"function"!=typeof d||(e=d,d=null);var h={acl:c};return d&&(h.validity=d.validity,h.maxQueriesPerIPPerHour=d.maxQueriesPerIPPerHour,h.maxHitsPerQuery=d.maxHitsPerQuery,h.description=d.description,d.queryParameters&&(h.queryParameters=this.as._getSearchParams(d.queryParameters,"")),h.referers=d.referers),this.as._jsonRequest({method:"PUT",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/keys/"+b,body:h,hostType:"write",callback:e})}},{"./IndexBrowser":9,"./IndexCore.js":10,"./clone.js":17,"./deprecate.js":18,"./deprecatedMessage.js":19,"./errors":20,"./exitPromise.js":21,"./map.js":22,"./merge.js":23,inherits:59,isarray:60}],9:[function(a,b,c){"use strict";function d(){}b.exports=d;var e=a("inherits"),f=a("events").EventEmitter;e(d,f),d.prototype.stop=function(){this._stopped=!0,this._clean()},d.prototype._end=function(){this.emit("end"),this._clean()},d.prototype._error=function(a){this.emit("error",a),this._clean()},d.prototype._result=function(a){this.emit("result",a)},d.prototype._clean=function(){this.removeAllListeners("stop"),this.removeAllListeners("end"),this.removeAllListeners("error"),this.removeAllListeners("result")}},{events:31,inherits:59}],10:[function(a,b,c){function d(a,b){this.indexName=b,this.as=a,this.typeAheadArgs=null,this.typeAheadValueOption=null,this.cache={}}var e=a("./buildSearchMethod.js");b.exports=d,d.prototype.clearCache=function(){this.cache={}},d.prototype.search=e("query"),d.prototype.similarSearch=e("similarQuery"),d.prototype.browse=function(b,c,d){var e,f,g=a("./merge.js"),h=this;0===arguments.length||1===arguments.length&&"function"==typeof arguments[0]?(e=0,d=arguments[0],b=void 0):"number"==typeof arguments[0]?(e=arguments[0],"number"==typeof arguments[1]?f=arguments[1]:"function"==typeof arguments[1]&&(d=arguments[1],f=void 0),b=void 0,c=void 0):"object"==typeof arguments[0]?("function"==typeof arguments[1]&&(d=arguments[1]),c=arguments[0],b=void 0):"string"==typeof arguments[0]&&"function"==typeof arguments[1]&&(d=arguments[1],c=void 0),c=g({},c||{},{page:e,hitsPerPage:f,query:b});var i=this.as._getSearchParams(c,"");return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(h.indexName)+"/browse?"+i,hostType:"read",callback:d})},d.prototype.browseFrom=function(a,b){return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse?cursor="+encodeURIComponent(a),hostType:"read",callback:b})},d.prototype.searchFacet=function(b,c){var d=a("./clone.js"),e=a("./omit.js"),f="Usage: index.searchFacet({facetName, facetQuery, ...params}[, callback])";if(void 0===b.facetName||void 0===b.facetQuery)throw new Error(f);var g=b.facetName,h=e(d(b),function(a){return"facetName"===a}),i=this.as._getSearchParams(h,"");return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/facets/"+encodeURIComponent(g)+"/query",hostType:"read",body:{params:i},callback:c})},d.prototype._search=function(a,b,c){return this.as._jsonRequest({cache:this.cache,method:"POST",url:b||"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:a},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:a}},callback:c})},d.prototype.getObject=function(a,b,c){var d=this;1!==arguments.length&&"function"!=typeof b||(c=b,b=void 0);var e="";if(void 0!==b){e="?attributes=";for(var f=0;f was loaded but did not call our provided callback"),JSONPScriptError:e("JSONPScriptError","