(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[93780],{17331:e=>{function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"===typeof e}function r(e){return"object"===typeof e&&null!==e}function n(e){return void 0===e}e.exports=t,t.prototype._events=void 0,t.prototype._maxListeners=void 0,t.defaultMaxListeners=10,t.prototype.setMaxListeners=function(e){if("number"!==typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},t.prototype.emit=function(e){var t,s,a,c,u,o;if(this._events||(this._events={}),"error"===e&&(!this._events.error||r(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var h=new Error('Uncaught, unspecified "error" event. ('+t+")");throw h.context=t,h}if(n(s=this._events[e]))return!1;if(i(s))switch(arguments.length){case 1:s.call(this);break;case 2:s.call(this,arguments[1]);break;case 3:s.call(this,arguments[1],arguments[2]);break;default:c=Array.prototype.slice.call(arguments,1),s.apply(this,c)}else if(r(s))for(c=Array.prototype.slice.call(arguments,1),a=(o=s.slice()).length,u=0;u0&&this._events[e].length>a&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"===typeof console.trace&&console.trace()),this},t.prototype.on=t.prototype.addListener,t.prototype.once=function(e,t){if(!i(t))throw TypeError("listener must be a function");var r=!1;function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}return n.listener=t,this.on(e,n),this},t.prototype.removeListener=function(e,t){var n,s,a,c;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(n=this._events[e]).length,s=-1,n===t||i(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(r(n)){for(c=a;c-- >0;)if(n[c]===t||n[c].listener&&n[c].listener===t){s=c;break}if(s<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(s,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(i(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},8131:(e,t,i)=>{"use strict";var r=i(49374),n=i(17775),s=i(23076);function a(e,t,i){return new r(e,t,i)}a.version=i(24336),a.AlgoliaSearchHelper=r,a.SearchParameters=n,a.SearchResults=s,e.exports=a},68078:(e,t,i)=>{"use strict";var r=i(17331);function n(e,t){this.main=e,this.fn=t,this.lastResults=null}i(14853)(n,r),n.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},n.prototype.getModifiedState=function(e){return this.fn(e)},e.exports=n},82437:(e,t,i)=>{"use strict";var r=i(52344),n=i(49803),s=i(90116),a={addRefinement:function(e,t,i){if(a.isRefined(e,t,i))return e;var n=""+i,s=e[t]?e[t].concat(n):[n],c={};return c[t]=s,r({},c,e)},removeRefinement:function(e,t,i){if(void 0===i)return a.clearRefinement(e,(function(e,i){return t===i}));var r=""+i;return a.clearRefinement(e,(function(e,i){return t===i&&r===e}))},toggleRefinement:function(e,t,i){if(void 0===i)throw new Error("toggleRefinement should be used with a value");return a.isRefined(e,t,i)?a.removeRefinement(e,t,i):a.addRefinement(e,t,i)},clearRefinement:function(e,t,i){if(void 0===t)return s(e)?{}:e;if("string"===typeof t)return n(e,[t]);if("function"===typeof t){var r=!1,a=Object.keys(e).reduce((function(n,s){var a=e[s]||[],c=a.filter((function(e){return!t(e,s,i)}));return c.length!==a.length&&(r=!0),n[s]=c,n}),{});return r?a:e}},isRefined:function(e,t,i){var r=Boolean(e[t])&&e[t].length>0;if(void 0===i||!r)return r;var n=""+i;return-1!==e[t].indexOf(n)}};e.exports=a},17775:(e,t,i)=>{"use strict";var r=i(60185),n=i(52344),s=i(22686),a=i(7888),c=i(28023),u=i(49803),o=i(90116),h=i(46801),f=i(82437);function l(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,i){return l(t[i],e)})):e===t}function m(e){var t=e?m._parseNumbers(e):{};void 0===t.userToken||h(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invalid. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var i=this;Object.keys(t).forEach((function(e){var r=-1!==m.PARAMETERS.indexOf(e),n=void 0!==t[e];!r&&n&&(i[e]=t[e])}))}m.PARAMETERS=Object.keys(new m),m._parseNumbers=function(e){if(e instanceof m)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach((function(i){var r=e[i];if("string"===typeof r){var n=parseFloat(r);t[i]=isNaN(n)?r:n}})),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map((function(e){return Array.isArray(e)?e.map((function(e){return parseFloat(e)})):e}))),e.numericRefinements){var i={};Object.keys(e.numericRefinements).forEach((function(t){var r=e.numericRefinements[t]||{};i[t]={},Object.keys(r).forEach((function(e){var n=r[e].map((function(e){return Array.isArray(e)?e.map((function(e){return"string"===typeof e?parseFloat(e):e})):"string"===typeof e?parseFloat(e):e}));i[t][e]=n}))})),t.numericRefinements=i}return r({},e,t)},m.make=function(e){var t=new m(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var i=t.getHierarchicalRefinement(e.name);i.length>0&&0!==i[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(i=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},m.validate=function(e,t){var i=t||{};return e.tagFilters&&i.tagRefinements&&i.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&i.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&i.numericRefinements&&o(i.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):o(e.numericRefinements)&&i.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},m.prototype={constructor:m,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:f.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:f.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:f.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:f.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,i){var n=c(i);if(this.isNumericRefined(e,t,n))return this;var s=r({},this.numericRefinements);return s[e]=r({},s[e]),s[e][t]?(s[e][t]=s[e][t].slice(),s[e][t].push(n)):s[e][t]=[n],this.setQueryParameters({numericRefinements:s})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,i){var r=i;return void 0!==r?this.isNumericRefined(e,t,r)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(i,n){return n===e&&i.op===t&&l(i.val,c(r))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(i,r){return r===e&&i.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,i){return i===e}))}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return o(this.numericRefinements)?{}:this.numericRefinements;if("string"===typeof e)return u(this.numericRefinements,[e]);if("function"===typeof e){var t=!1,i=this.numericRefinements,r=Object.keys(i).reduce((function(r,n){var s=i[n],a={};return s=s||{},Object.keys(s).forEach((function(i){var r=s[i]||[],c=[];r.forEach((function(t){e({val:t,op:i},n,"numeric")||c.push(t)})),c.length!==r.length&&(t=!0),a[i]=c})),r[n]=a,r}),{});return t?r:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:f.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:f.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:f.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter((function(t){return t!==e}))}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter((function(t){return t!==e}))}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter((function(t){return t.name!==e}))}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:f.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:f.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:f.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter((function(t){return t!==e}))};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:f.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:f.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:f.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var i=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),r={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+i))?-1===t.indexOf(i)?r[e]=[]:r[e]=[t.slice(0,t.lastIndexOf(i))]:r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},r,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var i={};return i[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},i,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:n({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&f.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var i=this.getHierarchicalRefinement(e);return t?-1!==i.indexOf(t):i.length>0},isNumericRefined:function(e,t,i){if(void 0===i&&void 0===t)return Boolean(this.numericRefinements[e]);var r=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===i||!r)return r;var n,s,u=c(i),o=void 0!==(n=this.numericRefinements[e][t],s=u,a(n,(function(e){return l(e,s)})));return r&&o},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=s(Object.keys(this.numericRefinements).filter((function(t){return Object.keys(e.numericRefinements[t]).length>0})),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter((function(t){return e.disjunctiveFacetsRefinements[t].length>0})).concat(t).concat(this.getRefinedHierarchicalFacets())},getRefinedHierarchicalFacets:function(){var e=this;return s(this.hierarchicalFacets.map((function(e){return e.name})),Object.keys(this.hierarchicalFacetsRefinements).filter((function(t){return e.hierarchicalFacetsRefinements[t].length>0})))},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter((function(t){return-1===e.indexOf(t)}))},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},i=this;return Object.keys(this).forEach((function(r){var n=i[r];-1===e.indexOf(r)&&void 0!==n&&(t[r]=n)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var i={};return i[e]=t,this.setQueryParameters(i)},setQueryParameters:function(e){if(!e)return this;var t=m.validate(this,e);if(t)throw t;var i=this,r=m._parseNumbers(e),n=Object.keys(this).reduce((function(e,t){return e[t]=i[t],e}),{}),s=Object.keys(r).reduce((function(e,t){var i=void 0!==e[t],n=void 0!==r[t];return i&&!n?u(e,[t]):(n&&(e[t]=r[t]),e)}),n);return new this.constructor(s)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!==typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return a(this.hierarchicalFacets,(function(t){return t.name===e}))},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var i=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(i).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=m},10210:(e,t,i)=>{"use strict";e.exports=function(e){return function(t,i){var a=e.hierarchicalFacets[i],o=e.hierarchicalFacetsRefinements[a.name]&&e.hierarchicalFacetsRefinements[a.name][0]||"",h=e._getHierarchicalFacetSeparator(a),f=e._getHierarchicalRootPath(a),l=e._getHierarchicalShowParentLevel(a),m=s(e._getHierarchicalFacetSortBy(a)),d=t.every((function(e){return e.exhaustive})),v=function(e,t,i,s,a){return function(o,h,f){var l=o;if(f>0){var m=0;for(l=o;m{"use strict";var r=i(60185),n=i(52344),s=i(42148),a=i(74587),c=i(7888),u=i(69725),o=i(82293),h=i(94039),f=h.escapeFacetValue,l=h.unescapeFacetValue,m=i(10210);function d(e){var t={};return e.forEach((function(e,i){t[e]=i})),t}function v(e,t,i){t&&t[i]&&(e.stats=t[i])}function p(e,t,i){var s=t[0];this._rawResults=t;var o=this;Object.keys(s).forEach((function(e){o[e]=s[e]})),Object.keys(i||{}).forEach((function(e){o[e]=i[e]})),this.processingTimeMS=t.reduce((function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS}),0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map((function(){return[]})),this.facets=[];var h=e.getRefinedDisjunctiveFacets(),f=d(e.facets),p=d(e.disjunctiveFacets),g=1,y=s.facets||{};Object.keys(y).forEach((function(t){var i,r,n=y[t],a=(i=e.hierarchicalFacets,r=t,c(i,(function(e){return(e.attributes||[]).indexOf(r)>-1})));if(a){var h=a.attributes.indexOf(t),l=u(e.hierarchicalFacets,(function(e){return e.name===a.name}));o.hierarchicalFacets[l][h]={attribute:t,data:n,exhaustive:s.exhaustiveFacetsCount}}else{var m,d=-1!==e.disjunctiveFacets.indexOf(t),g=-1!==e.facets.indexOf(t);d&&(m=p[t],o.disjunctiveFacets[m]={name:t,data:n,exhaustive:s.exhaustiveFacetsCount},v(o.disjunctiveFacets[m],s.facets_stats,t)),g&&(m=f[t],o.facets[m]={name:t,data:n,exhaustive:s.exhaustiveFacetsCount},v(o.facets[m],s.facets_stats,t))}})),this.hierarchicalFacets=a(this.hierarchicalFacets),h.forEach((function(i){var a=t[g],c=a&&a.facets?a.facets:{},h=e.getHierarchicalFacetByName(i);Object.keys(c).forEach((function(t){var i,f=c[t];if(h){i=u(e.hierarchicalFacets,(function(e){return e.name===h.name}));var m=u(o.hierarchicalFacets[i],(function(e){return e.attribute===t}));if(-1===m)return;o.hierarchicalFacets[i][m].data=r({},o.hierarchicalFacets[i][m].data,f)}else{i=p[t];var d=s.facets&&s.facets[t]||{};o.disjunctiveFacets[i]={name:t,data:n({},f,d),exhaustive:a.exhaustiveFacetsCount},v(o.disjunctiveFacets[i],a.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(r){!o.disjunctiveFacets[i].data[r]&&e.disjunctiveFacetsRefinements[t].indexOf(l(r))>-1&&(o.disjunctiveFacets[i].data[r]=0)}))}})),g++})),e.getRefinedHierarchicalFacets().forEach((function(i){var r=e.getHierarchicalFacetByName(i),s=e._getHierarchicalFacetSeparator(r),a=e.getHierarchicalRefinement(i);0===a.length||a[0].split(s).length<2||t.slice(g).forEach((function(t){var i=t&&t.facets?t.facets:{};Object.keys(i).forEach((function(t){var c=i[t],h=u(e.hierarchicalFacets,(function(e){return e.name===r.name})),f=u(o.hierarchicalFacets[h],(function(e){return e.attribute===t}));if(-1!==f){var l={};if(a.length>0){var m=a[0].split(s)[0];l[m]=o.hierarchicalFacets[h][f].data[m]}o.hierarchicalFacets[h][f].data=n(l,c,o.hierarchicalFacets[h][f].data)}})),g++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var i=e.facetsExcludes[t],r=f[t];o.facets[r]={name:t,data:y[t],exhaustive:s.exhaustiveFacetsCount},i.forEach((function(e){o.facets[r]=o.facets[r]||{name:t},o.facets[r].data=o.facets[r].data||{},o.facets[r].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(m(e)),this.facets=a(this.facets),this.disjunctiveFacets=a(this.disjunctiveFacets),this._state=e}function g(e,t){function i(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var r=c(e.facets,i);return r?Object.keys(r.data).map((function(i){var n=f(i);return{name:i,escapedValue:n,count:r.data[i],isRefined:e._state.isFacetRefined(t,n),isExcluded:e._state.isExcludeRefined(t,i)}})):[]}if(e._state.isDisjunctiveFacet(t)){var n=c(e.disjunctiveFacets,i);return n?Object.keys(n.data).map((function(i){var r=f(i);return{name:i,escapedValue:r,count:n.data[i],isRefined:e._state.isDisjunctiveFacetRefined(t,r)}})):[]}if(e._state.isHierarchicalFacet(t)){var s=c(e.hierarchicalFacets,i);if(!s)return s;var a=e._state.getHierarchicalFacetByName(t),u=e._state._getHierarchicalFacetSeparator(a),o=l(e._state.getHierarchicalRefinement(t)[0]||"");0===o.indexOf(a.rootPath)&&(o=o.replace(a.rootPath+u,""));var h=o.split(u);return h.unshift(t),y(s,h,0),s}}function y(e,t,i){e.isRefined=e.name===t[i],e.data&&e.data.forEach((function(e){y(e,t,i+1)}))}function R(e,t,i,r){if(r=r||0,Array.isArray(t))return e(t,i[r]);if(!t.data||0===t.data.length)return t;var s=t.data.map((function(t){return R(e,t,i,r+1)})),a=e(s,i[r]);return n({data:a},t)}function F(e,t){var i=c(e,(function(e){return e.name===t}));return i&&i.stats}function _(e,t,i,r,n){var s=c(n,(function(e){return e.name===i})),a=s&&s.data&&s.data[r]?s.data[r]:0,u=s&&s.exhaustive||!1;return{type:t,attributeName:i,name:r,count:a,exhaustive:u}}p.prototype.getFacetByName=function(e){function t(t){return t.name===e}return c(this.facets,t)||c(this.disjunctiveFacets,t)||c(this.hierarchicalFacets,t)},p.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],p.prototype.getFacetValues=function(e,t){var i=g(this,e);if(i){var r,a=n({},t,{sortBy:p.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),c=this;if(Array.isArray(i))r=[e];else r=c._state.getHierarchicalFacetByName(i.name).attributes;return R((function(e,t){if(a.facetOrdering){var i=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(c,t);if(i)return function(e,t){var i=[],r=[],n=(t.order||[]).reduce((function(e,t,i){return e[t]=i,e}),{});e.forEach((function(e){var t=e.path||e.name;void 0!==n[t]?i[n[t]]=e:r.push(e)})),i=i.filter((function(e){return e}));var a,c=t.sortRemainingBy;return"hidden"===c?i:(a="alpha"===c?[["path","name"],["asc","asc"]]:[["count"],["desc"]],i.concat(s(r,a[0],a[1])))}(e,i)}if(Array.isArray(a.sortBy)){var r=o(a.sortBy,p.DEFAULT_SORT);return s(e,r[0],r[1])}if("function"===typeof a.sortBy)return function(e,t){return t.sort(e)}(a.sortBy,e);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")}),i,r)}},p.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?F(this.facets,e):this._state.isDisjunctiveFacet(e)?F(this.disjunctiveFacets,e):void 0},p.prototype.getRefinements=function(){var e=this._state,t=this,i=[];return Object.keys(e.facetsRefinements).forEach((function(r){e.facetsRefinements[r].forEach((function(n){i.push(_(e,"facet",r,n,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(r){e.facetsExcludes[r].forEach((function(n){i.push(_(e,"exclude",r,n,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(r){e.disjunctiveFacetsRefinements[r].forEach((function(n){i.push(_(e,"disjunctive",r,n,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(r){e.hierarchicalFacetsRefinements[r].forEach((function(n){i.push(function(e,t,i,r){var n=e.getHierarchicalFacetByName(t),s=e._getHierarchicalFacetSeparator(n),a=i.split(s),u=c(r,(function(e){return e.name===t})),o=a.reduce((function(e,t){var i=e&&c(e.data,(function(e){return e.name===t}));return void 0!==i?i:e}),u),h=o&&o.count||0,f=o&&o.exhaustive||!1,l=o&&o.path||"";return{type:"hierarchical",attributeName:t,name:l,count:h,exhaustive:f}}(e,r,n,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var r=e.numericRefinements[t];Object.keys(r).forEach((function(e){r[e].forEach((function(r){i.push({type:"numeric",attributeName:t,name:r,numericValue:r,operator:e})}))}))})),e.tagRefinements.forEach((function(e){i.push({type:"tag",attributeName:"_tags",name:e})})),i},e.exports=p},49374:(e,t,i)=>{"use strict";var r=i(17775),n=i(23076),s=i(68078),a=i(96394),c=i(17331),u=i(14853),o=i(90116),h=i(49803),f=i(60185),l=i(24336),m=i(94039).escapeFacetValue;function d(e,t,i){"function"===typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+l+")"),this.setClient(e);var n=i||{};n.index=t,this.state=r.make(n),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function v(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function p(){return this.state.page}u(d,c),d.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},d.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},d.prototype.getQuery=function(){var e=this.state;return a._getHitsSearchParams(e)},d.prototype.searchOnce=function(e,t){var i=e?this.state.setQueryParameters(e):this.state,r=a._getQueries(i.index,i),s=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:i}),!t)return this.client.search(r).then((function(e){return s._currentNbQueries--,0===s._currentNbQueries&&s.emit("searchQueueEmpty"),{content:new n(i,e.results),state:i,_originalResponse:e}}),(function(e){throw s._currentNbQueries--,0===s._currentNbQueries&&s.emit("searchQueueEmpty"),e}));this.client.search(r).then((function(e){s._currentNbQueries--,0===s._currentNbQueries&&s.emit("searchQueueEmpty"),t(null,new n(i,e.results),i)})).catch((function(e){s._currentNbQueries--,0===s._currentNbQueries&&s.emit("searchQueueEmpty"),t(e,null,i)}))},d.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,i=this.derivedHelpers[0];if(!i)return Promise.resolve([]);var r=i.getModifiedState(t),n=f({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:h(a._getHitsSearchParams(r),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),s="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if("function"!==typeof this.client.initIndex)throw new Error(s);var c=this.client.initIndex(r.index);if("function"!==typeof c.findAnswers)throw new Error(s);return c.findAnswers(r.query,e.queryLanguages,n)},d.prototype.searchForFacetValues=function(e,t,i,r){var n="function"===typeof this.client.searchForFacetValues,s="function"===typeof this.client.initIndex;if(!n&&!s&&"function"!==typeof this.client.search)throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var c=this.state.setQueryParameters(r||{}),u=c.isDisjunctiveFacet(e),o=a.getSearchForFacetQuery(e,t,i,c);this._currentNbQueries++;var h,f=this;return n?h=this.client.searchForFacetValues([{indexName:c.index,params:o}]):s?h=this.client.initIndex(c.index).searchForFacetValues(o):(delete o.facetName,h=this.client.search([{type:"facet",facet:e,indexName:c.index,params:o}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:c,facet:e,query:t}),h.then((function(t){return f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=m(t.value),t.isRefined=u?c.isDisjunctiveFacetRefined(e,t.escapedValue):c.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),e}))},d.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},d.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},d.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},d.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addNumericRefinement=function(e,t,i){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,i),isPageReset:!0}),this},d.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},d.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},d.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},d.prototype.removeNumericRefinement=function(e,t,i){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,i),isPageReset:!0}),this},d.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},d.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},d.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},d.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},d.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},d.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},d.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},d.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},d.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},d.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},d.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},d.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},d.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},d.prototype.setCurrentPage=v,d.prototype.setPage=v,d.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},d.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},d.prototype.setState=function(e){return this._change({state:r.make(e),isPageReset:!1}),this},d.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new r(e),this},d.prototype.hasRefinements=function(e){return!!o(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},d.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},d.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},d.prototype.hasTag=function(e){return this.state.isTagRefined(e)},d.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},d.prototype.getIndex=function(){return this.state.index},d.prototype.getCurrentPage=p,d.prototype.getPage=p,d.prototype.getTags=function(){return this.state.tagRefinements},d.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var i=this.state.getNumericRefinements(e);return Object.keys(i).forEach((function(e){var r=i[e];t.push({value:r,operator:e,type:"numeric"})})),t},d.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},d.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},d.prototype._search=function(e){var t=this.state,i=[],r=[];e.onlyWithDerivedHelpers||(r=a._getQueries(t.index,t),i.push({state:t,queriesCount:r.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var n=this.derivedHelpers.map((function(e){var r=e.getModifiedState(t),n=r.index?a._getQueries(r.index,r):[];return i.push({state:r,queriesCount:n.length,helper:e}),e.emit("search",{state:r,results:e.lastResults}),n})),s=Array.prototype.concat.apply(r,n),c=this._queryId++;if(this._currentNbQueries++,!s.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,i,c));try{this.client.search(s).then(this._dispatchAlgoliaResponse.bind(this,i,c)).catch(this._dispatchAlgoliaError.bind(this,c))}catch(e){this.emit("error",{error:e})}},d.prototype._dispatchAlgoliaResponse=function(e,t,i){if(!(t0},d.prototype._change=function(e){var t=e.state,i=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:i}))},d.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},d.prototype.setClient=function(e){return this.client===e||("function"===typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+l+")"),this.client=e),this},d.prototype.getClient=function(){return this.client},d.prototype.derive=function(e){var t=new s(this,e);return this.derivedHelpers.push(t),t},d.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},d.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=d},74587:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},52344:e=>{"use strict";e.exports=function(){var e=Array.prototype.slice.call(arguments);return e.reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(i){void 0!==t[i]&&(void 0!==e[i]&&delete e[i],e[i]=t[i])})),e}),{})}},94039:e=>{"use strict";e.exports={escapeFacetValue:function(e){return"string"!==typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!==typeof e?e:e.replace(/^\\-/,"-")}}},7888:e=>{"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var i=0;i{"use strict";e.exports=function(e,t){if(!Array.isArray(e))return-1;for(var i=0;i{"use strict";var r=i(7888);e.exports=function(e,t){var i=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var n=t.split(":"),s=r(i,(function(e){return e[0]===n[0]}));return n.length>1||!s?(e[0].push(n[0]),e[1].push(n[1]),e):(e[0].push(s[0]),e[1].push(s[1]),e)}),[[],[]])}},14853:e=>{"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},22686:e=>{"use strict";e.exports=function(e,t){return e.filter((function(i,r){return t.indexOf(i)>-1&&e.indexOf(i)===r}))}},60185:e=>{"use strict";function t(e){return"function"===typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function i(e,r){if(e===r)return e;for(var n in r)if(Object.prototype.hasOwnProperty.call(r,n)&&"__proto__"!==n&&"constructor"!==n){var s=r[n],a=e[n];"undefined"!==typeof a&&"undefined"===typeof s||(t(a)&&t(s)?e[n]=i(a,s):e[n]="object"===typeof(c=s)&&null!==c?i(Array.isArray(c)?[]:{},c):c)}var c;return e}e.exports=function(e){t(e)||(e={});for(var r=1,n=arguments.length;r{"use strict";e.exports=function(e){return e&&Object.keys(e).length>0}},49803:e=>{"use strict";e.exports=function(e,t){if(null===e)return{};var i,r,n={},s=Object.keys(e);for(r=0;r=0||(n[i]=e[i]);return n}},42148:e=>{"use strict";function t(e,t){if(e!==t){var i=void 0!==e,r=null===e,n=void 0!==t,s=null===t;if(!s&&e>t||r&&n||!i)return 1;if(!r&&e=r.length?s:"desc"===r[n]?-s:s}return e.index-i.index})),n.map((function(e){return e.value}))}},28023:e=>{"use strict";e.exports=function e(t){if("number"===typeof t)return t;if("string"===typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw new Error("The value should be a number, a parsable string or an array of those.")}},96394:(e,t,i)=>{"use strict";var r=i(60185);function n(e){return Object.keys(e).sort((function(e,t){return e.localeCompare(t)})).reduce((function(t,i){return t[i]=e[i],t}),{})}var s={_getQueries:function(e,t){var i=[];return i.push({indexName:e,params:s._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(r){i.push({indexName:e,params:s._getDisjunctiveFacetSearchParams(t,r)})})),t.getRefinedHierarchicalFacets().forEach((function(r){var n=t.getHierarchicalFacetByName(r),a=t.getHierarchicalRefinement(r),c=t._getHierarchicalFacetSeparator(n);if(a.length>0&&a[0].split(c).length>1){var u=a[0].split(c).slice(0,-1).reduce((function(e,t,i){return e.concat({attribute:n.attributes[i],value:0===i?t:[e[e.length-1].value,t].join(c)})}),[]);u.forEach((function(r,a){var c=s._getDisjunctiveFacetSearchParams(t,r.attribute,0===a);function o(e){return n.attributes.some((function(t){return t===e.split(":")[0]}))}var h=(c.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var i=t.filter((function(e){return!o(e)}));i.length>0&&e.push(i)}return"string"!==typeof t||o(t)||e.push(t),e}),[]),f=u[a-1];c.facetFilters=a>0?h.concat(f.attribute+":"+f.value):h.length>0?h:void 0,i.push({indexName:e,params:c})}))}})),i},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(s._getHitsHierarchicalFacetsAttributes(e)),i=s._getFacetFilters(e),a=s._getNumericFilters(e),c=s._getTagFilters(e),u={facets:t.indexOf("*")>-1?["*"]:t,tagFilters:c};return i.length>0&&(u.facetFilters=i),a.length>0&&(u.numericFilters=a),n(r({},e.getQueryParams(),u))},_getDisjunctiveFacetSearchParams:function(e,t,i){var a=s._getFacetFilters(e,t,i),c=s._getNumericFilters(e,t),u=s._getTagFilters(e),o={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};u.length>0&&(o.tagFilters=u);var h=e.getHierarchicalFacetByName(t);return o.facets=h?s._getDisjunctiveHierarchicalFacetAttribute(e,h,i):t,c.length>0&&(o.numericFilters=c),a.length>0&&(o.facetFilters=a),n(r({},e.getQueryParams(),o))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var i=[];return Object.keys(e.numericRefinements).forEach((function(r){var n=e.numericRefinements[r]||{};Object.keys(n).forEach((function(e){var s=n[e]||[];t!==r&&s.forEach((function(t){if(Array.isArray(t)){var n=t.map((function(t){return r+e+t}));i.push(n)}else i.push(r+e+t)}))}))})),i},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,i){var r=[],n=e.facetsRefinements||{};Object.keys(n).forEach((function(e){(n[e]||[]).forEach((function(t){r.push(e+":"+t)}))}));var s=e.facetsExcludes||{};Object.keys(s).forEach((function(e){(s[e]||[]).forEach((function(t){r.push(e+":-"+t)}))}));var a=e.disjunctiveFacetsRefinements||{};Object.keys(a).forEach((function(e){var i=a[e]||[];if(e!==t&&i&&0!==i.length){var n=[];i.forEach((function(t){n.push(e+":"+t)})),r.push(n)}}));var c=e.hierarchicalFacetsRefinements||{};return Object.keys(c).forEach((function(n){var s=(c[n]||[])[0];if(void 0!==s){var a,u,o=e.getHierarchicalFacetByName(n),h=e._getHierarchicalFacetSeparator(o),f=e._getHierarchicalRootPath(o);if(t===n){if(-1===s.indexOf(h)||!f&&!0===i||f&&f.split(h).length===s.split(h).length)return;f?(u=f.split(h).length-1,s=f):(u=s.split(h).length-2,s=s.slice(0,s.lastIndexOf(h))),a=o.attributes[u]}else u=s.split(h).length-1,a=o.attributes[u];a&&r.push([a+":"+s])}})),r},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,i){var r=e.getHierarchicalRefinement(i.name)[0];if(!r)return t.push(i.attributes[0]),t;var n=e._getHierarchicalFacetSeparator(i),s=r.split(n).length,a=i.attributes.slice(0,s+1);return t.concat(a)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,i){var r=e._getHierarchicalFacetSeparator(t);if(!0===i){var n=e._getHierarchicalRootPath(t),s=0;return n&&(s=n.split(r).length),[t.attributes[s]]}var a=(e.getHierarchicalRefinement(t.name)[0]||"").split(r).length-1;return t.attributes.slice(0,a+1)},getSearchForFacetQuery:function(e,t,i,a){var c=a.isDisjunctiveFacet(e)?a.clearRefinements(e):a,u={facetQuery:t,facetName:e};return"number"===typeof i&&(u.maxFacetHits=i),n(r({},s._getHitsSearchParams(c),u))}};e.exports=s},46801:e=>{"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},24336:e=>{"use strict";e.exports="3.13.3"},18533:(e,t,i)=>{"use strict";var r=i(42092).forEach,n=i(9341)("forEach");e.exports=n?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},9341:(e,t,i)=>{"use strict";var r=i(47293);e.exports=function(e,t){var i=[][e];return!!i&&r((function(){i.call(null,t||function(){return 1},1)}))}},57327:(e,t,i)=>{"use strict";var r=i(82109),n=i(42092).filter;r({target:"Array",proto:!0,forced:!i(81194)("filter")},{filter:function(e){return n(this,e,arguments.length>1?arguments[1]:void 0)}})},89554:(e,t,i)=>{"use strict";var r=i(82109),n=i(18533);r({target:"Array",proto:!0,forced:[].forEach!=n},{forEach:n})},33321:(e,t,i)=>{var r=i(82109),n=i(19781),s=i(36048).f;r({target:"Object",stat:!0,forced:Object.defineProperties!==s,sham:!n},{defineProperties:s})},69070:(e,t,i)=>{var r=i(82109),n=i(19781),s=i(3070).f;r({target:"Object",stat:!0,forced:Object.defineProperty!==s,sham:!n},{defineProperty:s})},38880:(e,t,i)=>{var r=i(82109),n=i(47293),s=i(45656),a=i(31236).f,c=i(19781),u=n((function(){a(1)}));r({target:"Object",stat:!0,forced:!c||u,sham:!c},{getOwnPropertyDescriptor:function(e,t){return a(s(e),t)}})},49337:(e,t,i)=>{var r=i(82109),n=i(19781),s=i(53887),a=i(45656),c=i(31236),u=i(86135);r({target:"Object",stat:!0,sham:!n},{getOwnPropertyDescriptors:function(e){for(var t,i,r=a(e),n=c.f,o=s(r),h={},f=0;o.length>f;)void 0!==(i=n(r,t=o[f++]))&&u(h,t,i);return h}})},47941:(e,t,i)=>{var r=i(82109),n=i(47908),s=i(81956);r({target:"Object",stat:!0,forced:i(47293)((function(){s(1)}))},{keys:function(e){return s(n(e))}})},54747:(e,t,i)=>{var r=i(17854),n=i(48324),s=i(98509),a=i(18533),c=i(68880),u=function(e){if(e&&e.forEach!==a)try{c(e,"forEach",a)}catch(t){e.forEach=a}};for(var o in n)n[o]&&u(r[o]&&r[o].prototype);u(s)}}]); //# sourceMappingURL=93780.js.map