/*! For license information please see vendor.23ce186634ebdb993380.js.LICENSE.txt */ (self.webpackChunkui=self.webpackChunkui||[]).push([[25],{131:e=>{function t(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function n(e){return"object"==typeof e&&null!==e}function i(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,o,a,u,c,s;if(this._events||(this._events={}),"error"===e&&(!this._events.error||n(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(i(o=this._events[e]))return!1;if(r(o))switch(arguments.length){case 1:o.call(this);break;case 2:o.call(this,arguments[1]);break;case 3:o.call(this,arguments[1],arguments[2]);break;default:u=Array.prototype.slice.call(arguments,1),o.apply(this,u)}else if(n(o))for(u=Array.prototype.slice.call(arguments,1),a=(s=o.slice()).length,c=0;c0&&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(!r(t))throw TypeError("listener must be a function");var n=!1;function i(){this.removeListener(e,i),n||(n=!0,t.apply(this,arguments))}return i.listener=t,this.on(e,i),this},t.prototype.removeListener=function(e,t){var i,o,a,u;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(a=(i=this._events[e]).length,o=-1,i===t||r(i.listener)&&i.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(n(i)){for(u=a;u-- >0;)if(i[u]===t||i[u].listener&&i[u].listener===t){o=u;break}if(o<0)return this;1===i.length?(i.length=0,delete this._events[e]):i.splice(o,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},t.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},t.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},t.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},t.listenerCount=function(e,t){return e.listenerCount(t)}},56:(e,t,r)=>{"use strict";var n=r(285),i=r(127),o=r(128);function a(e,t,r){return new n(e,t,r)}a.version=r(133),a.AlgoliaSearchHelper=n,a.SearchParameters=i,a.SearchResults=o,e.exports=a},293:(e,t,r)=>{"use strict";var n=r(131);function i(e,t){this.main=e,this.fn=t,this.lastResults=null}r(132)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},e.exports=i},289:(e,t,r)=>{"use strict";var n=r(106),i=r(107),o=r(108),a={addRefinement:function(e,t,r){if(a.isRefined(e,t,r))return e;var i=""+r,o=e[t]?e[t].concat(i):[i],u={};return u[t]=o,n({},u,e)},removeRefinement:function(e,t,r){if(void 0===r)return a.clearRefinement(e,(function(e,r){return t===r}));var n=""+r;return a.clearRefinement(e,(function(e,r){return t===r&&n===e}))},toggleRefinement:function(e,t,r){if(void 0===r)throw new Error("toggleRefinement should be used with a value");return a.isRefined(e,t,r)?a.removeRefinement(e,t,r):a.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return o(e)?{}:e;if("string"==typeof t)return i(e,[t]);if("function"==typeof t){var n=!1,a=Object.keys(e).reduce((function(i,o){var a=e[o]||[],u=a.filter((function(e){return!t(e,o,r)}));return u.length!==a.length&&(n=!0),i[o]=u,i}),{});return n?a:e}},isRefined:function(e,t,r){var n=!!e[t]&&e[t].length>0;if(void 0===r||!n)return n;var i=""+r;return-1!==e[t].indexOf(i)}};e.exports=a},127:(e,t,r)=>{"use strict";var n=r(97),i=r(106),o=r(286),a=r(98),u=r(287),c=r(107),s=r(108),l=r(288),f=r(289);function p(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return p(t[r],e)})):e===t}function m(e){var t=e?m._parseNumbers(e):{};void 0===t.userToken||l(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 r=this;Object.keys(t).forEach((function(e){var n=-1!==m.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[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(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}})),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 r={};Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach((function(e){var i=n[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}));r[t][e]=i}))})),t.numericRefinements=r}return n({},e,t)},m.make=function(e){var t=new m(e);return(e.hierarchicalFacets||[]).forEach((function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}})),t},m.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.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&&r.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&&r.numericRefinements&&s(r.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."):s(e.numericRefinements)&&r.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,r){var i=u(r);if(this.isNumericRefined(e,t,i))return this;var o=n({},this.numericRefinements);return o[e]=n({},o[e]),o[e][t]?(o[e][t]=o[e][t].slice(),o[e][t].push(i)):o[e][t]=[i],this.setQueryParameters({numericRefinements:o})},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,r){return void 0!==r?this.isNumericRefined(e,t,r)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(n,i){return i===e&&n.op===t&&p(n.val,u(r))}))}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,n){return n===e&&r.op===t}))}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(t,r){return r===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 s(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return c(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce((function(n,i){var o=r[i],a={};return o=o||{},Object.keys(o).forEach((function(r){var n=o[r]||[],u=[];n.forEach((function(t){e({val:t,op:r},i,"numeric")||u.push(t)})),u.length!==n.length&&(t=!0),a[r]=u})),n[i]=a,n}),{});return t?n: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 r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),n={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?n[e]=[]:n[e]=[t.slice(0,t.lastIndexOf(r))]:n[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i({},n,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 r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:i({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:i({},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 r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return!!this.numericRefinements[e];var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var i,o,c=u(r),s=void 0!==(i=this.numericRefinements[e][t],o=c,a(i,(function(e){return p(e,o)})));return n&&s},isTagRefined:function(e){return-1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=o(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 o(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={},r=this;return Object.keys(this).forEach((function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)})),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=m.validate(this,e);if(t)throw t;var r=this,n=m._parseNumbers(e),i=Object.keys(this).reduce((function(e,t){return e[t]=r[t],e}),{}),o=Object.keys(n).reduce((function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?c(e,[t]):(i&&(e[t]=n[t]),e)}),i);return new this.constructor(o)},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 r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map((function(e){return e.trim()}))},toString:function(){return JSON.stringify(this,null,2)}},e.exports=m},292:(e,t,r)=>{"use strict";e.exports=function(e){return function(t,r){var a=e.hierarchicalFacets[r],s=e.hierarchicalFacetsRefinements[a.name]&&e.hierarchicalFacetsRefinements[a.name][0]||"",l=e._getHierarchicalFacetSeparator(a),f=e._getHierarchicalRootPath(a),p=e._getHierarchicalShowParentLevel(a),m=o(e._getHierarchicalFacetSortBy(a)),d=t.every((function(e){return e.exhaustive})),y=function(e,t,r,o,a){return function(s,l,f){var p=s;if(f>0){var m=0;for(p=s;m{"use strict";var n=r(97),i=r(106),o=r(129),a=r(290),u=r(98),c=r(291),s=r(130),l=r(109),f=l.escapeFacetValue,p=l.unescapeFacetValue,m=r(292);function d(e){var t={};return e.forEach((function(e,r){t[e]=r})),t}function y(e,t,r){t&&t[r]&&(e.stats=t[r])}function h(e,t,r){var o=t[0];this._rawResults=t;var s=this;Object.keys(o).forEach((function(e){s[e]=o[e]})),Object.keys(r||{}).forEach((function(e){s[e]=r[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 l=e.getRefinedDisjunctiveFacets(),f=d(e.facets),h=d(e.disjunctiveFacets),b=1,v=o.facets||{};Object.keys(v).forEach((function(t){var r,n,i=v[t],a=(r=e.hierarchicalFacets,n=t,u(r,(function(e){return(e.attributes||[]).indexOf(n)>-1})));if(a){var l=a.attributes.indexOf(t),p=c(e.hierarchicalFacets,(function(e){return e.name===a.name}));s.hierarchicalFacets[p][l]={attribute:t,data:i,exhaustive:o.exhaustiveFacetsCount}}else{var m,d=-1!==e.disjunctiveFacets.indexOf(t),b=-1!==e.facets.indexOf(t);d&&(m=h[t],s.disjunctiveFacets[m]={name:t,data:i,exhaustive:o.exhaustiveFacetsCount},y(s.disjunctiveFacets[m],o.facets_stats,t)),b&&(m=f[t],s.facets[m]={name:t,data:i,exhaustive:o.exhaustiveFacetsCount},y(s.facets[m],o.facets_stats,t))}})),this.hierarchicalFacets=a(this.hierarchicalFacets),l.forEach((function(r){var a=t[b],u=a&&a.facets?a.facets:{},l=e.getHierarchicalFacetByName(r);Object.keys(u).forEach((function(t){var r,f=u[t];if(l){r=c(e.hierarchicalFacets,(function(e){return e.name===l.name}));var m=c(s.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===m)return;s.hierarchicalFacets[r][m].data=n({},s.hierarchicalFacets[r][m].data,f)}else{r=h[t];var d=o.facets&&o.facets[t]||{};s.disjunctiveFacets[r]={name:t,data:i({},f,d),exhaustive:a.exhaustiveFacetsCount},y(s.disjunctiveFacets[r],a.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!s.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(p(n))>-1&&(s.disjunctiveFacets[r].data[n]=0)}))}})),b++})),e.getRefinedHierarchicalFacets().forEach((function(r){var n=e.getHierarchicalFacetByName(r),o=e._getHierarchicalFacetSeparator(n),a=e.getHierarchicalRefinement(r);0===a.length||a[0].split(o).length<2||t.slice(b).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var u=r[t],l=c(e.hierarchicalFacets,(function(e){return e.name===n.name})),f=c(s.hierarchicalFacets[l],(function(e){return e.attribute===t}));if(-1!==f){var p={};if(a.length>0){var m=a[0].split(o)[0];p[m]=s.hierarchicalFacets[l][f].data[m]}s.hierarchicalFacets[l][f].data=i(p,u,s.hierarchicalFacets[l][f].data)}})),b++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],n=f[t];s.facets[n]={name:t,data:o.facets[t],exhaustive:o.exhaustiveFacetsCount},r.forEach((function(e){s.facets[n]=s.facets[n]||{name:t},s.facets[n].data=s.facets[n].data||{},s.facets[n].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(m(e)),this.facets=a(this.facets),this.disjunctiveFacets=a(this.disjunctiveFacets),this._state=e}function b(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=u(e.facets,r);return n?Object.keys(n.data).map((function(r){var i=f(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,r)}})):[]}if(e._state.isDisjunctiveFacet(t)){var i=u(e.disjunctiveFacets,r);return i?Object.keys(i.data).map((function(r){var n=f(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}})):[]}if(e._state.isHierarchicalFacet(t)){var o=u(e.hierarchicalFacets,r);if(!o)return o;var a=e._state.getHierarchicalFacetByName(t),c=p(e._state.getHierarchicalRefinement(t)[0]||"").split(e._state._getHierarchicalFacetSeparator(a));return c.unshift(t),v(o,c,0),o}}function v(e,t,r){e.isRefined=e.name===t[r],e.data&&e.data.forEach((function(e){v(e,t,r+1)}))}function g(e,t,r,n){if(n=n||0,Array.isArray(t))return e(t,r[n]);if(!t.data||0===t.data.length)return t;var o=t.data.map((function(t){return g(e,t,r,n+1)})),a=e(o,r[n]);return i({data:a},t)}function x(e,t){var r=u(e,(function(e){return e.name===t}));return r&&r.stats}function O(e,t,r,n,i){var o=u(i,(function(e){return e.name===r})),a=o&&o.data&&o.data[n]?o.data[n]:0,c=o&&o.exhaustive||!1;return{type:t,attributeName:r,name:n,count:a,exhaustive:c}}h.prototype.getFacetByName=function(e){function t(t){return t.name===e}return u(this.facets,t)||u(this.disjunctiveFacets,t)||u(this.hierarchicalFacets,t)},h.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],h.prototype.getFacetValues=function(e,t){var r=b(this,e);if(r){var n=i({},t,{sortBy:h.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),a=this;return g((function(e,t){if(n.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(a,t);if(Boolean(r))return function(e,t){var r=[],n=[],i=(t.order||[]).reduce((function(e,t,r){return e[t]=r,e}),{});e.forEach((function(e){var t=e.path||e.name;void 0!==i[t]?r[i[t]]=e:n.push(e)})),r=r.filter((function(e){return e}));var a,u=t.sortRemainingBy;return"hidden"===u?r:(a="alpha"===u?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(o(n,a[0],a[1])))}(e,r)}if(Array.isArray(n.sortBy)){var i=s(n.sortBy,h.DEFAULT_SORT);return o(e,i[0],i[1])}if("function"==typeof n.sortBy)return function(e,t){return t.sort(e)}(n.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")}),r,Array.isArray(r)?[e]:a._state.getHierarchicalFacetByName(r.name).attributes)}},h.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?x(this.facets,e):this._state.isDisjunctiveFacet(e)?x(this.disjunctiveFacets,e):void 0},h.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(e){r.push(O(0,"facet",n,e,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(e){r.push(O(0,"exclude",n,e,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(e){r.push(O(0,"disjunctive",n,e,t.disjunctiveFacets))}))})),Object.keys(e.hierarchicalFacetsRefinements).forEach((function(n){e.hierarchicalFacetsRefinements[n].forEach((function(i){r.push(function(e,t,r,n){var i=e.getHierarchicalFacetByName(t),o=e._getHierarchicalFacetSeparator(i),a=r.split(o),c=u(n,(function(e){return e.name===t})),s=a.reduce((function(e,t){var r=e&&u(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),c),l=s&&s.count||0,f=s&&s.exhaustive||!1,p=s&&s.path||"";return{type:"hierarchical",attributeName:t,name:p,count:l,exhaustive:f}}(e,n,i,t.hierarchicalFacets))}))})),Object.keys(e.numericRefinements).forEach((function(t){var n=e.numericRefinements[t];Object.keys(n).forEach((function(e){n[e].forEach((function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})}))}))})),e.tagRefinements.forEach((function(e){r.push({type:"tag",attributeName:"_tags",name:e})})),r},e.exports=h},285:(e,t,r)=>{"use strict";var n=r(127),i=r(128),o=r(293),a=r(294),u=r(131),c=r(132),s=r(108),l=r(107),f=r(97),p=r(133),m=r(109).escapeFacetValue;function d(e,t,r){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+p+")"),this.setClient(e);var i=r||{};i.index=t,this.state=n.make(i),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function y(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function h(){return this.state.page}c(d,u),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 r=e?this.state.setQueryParameters(e):this.state,n=a._getQueries(r.index,r),o=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(n).then((function(e){return o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),{content:new i(r,e.results),state:r,_originalResponse:e}}),(function(e){throw o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),t(null,new i(r,e.results),r)})).catch((function(e){o._currentNbQueries--,0===o._currentNbQueries&&o.emit("searchQueueEmpty"),t(e,null,r)}))},d.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=f({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:l(a._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),o="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(o);var u=this.client.initIndex(n.index);if("function"!=typeof u.findAnswers)throw new Error(o);return u.findAnswers(n.query,e.queryLanguages,i)},d.prototype.searchForFacetValues=function(e,t,r,n){var i="function"==typeof this.client.searchForFacetValues,o="function"==typeof this.client.initIndex;if(!i&&!o&&"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 u=this.state.setQueryParameters(n||{}),c=u.isDisjunctiveFacet(e),s=a.getSearchForFacetQuery(e,t,r,u);this._currentNbQueries++;var l,f=this;return i?l=this.client.searchForFacetValues([{indexName:u.index,params:s}]):o?l=this.client.initIndex(u.index).searchForFacetValues(s):(delete s.facetName,l=this.client.search([{type:"facet",facet:e,indexName:u.index,params:s}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:u,facet:e,query:t}),l.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=c?u.isDisjunctiveFacetRefined(e,t.escapedValue):u.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,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),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,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),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=y,d.prototype.setPage=y,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:n.make(e),isPageReset:!1}),this},d.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new n(e),this},d.prototype.hasRefinements=function(e){return!!s(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=h,d.prototype.getPage=h,d.prototype.getTags=function(){return this.state.tagRefinements},d.prototype.getRefinements=function(e){var t=[];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"})}))):this.state.isDisjunctiveFacet(e)&&this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}));var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach((function(e){var n=r[e];t.push({value:n,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,r=[],n=[];e.onlyWithDerivedHelpers||(n=a._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map((function(e){var n=e.getModifiedState(t),i=a._getQueries(n.index,n);return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i})),o=Array.prototype.concat.apply(n,i),u=this._queryId++;this._currentNbQueries++;try{this.client.search(o).then(this._dispatchAlgoliaResponse.bind(this,r,u)).catch(this._dispatchAlgoliaError.bind(this,u))}catch(e){this.emit("error",{error:e})}},d.prototype._dispatchAlgoliaResponse=function(e,t,r){if(!(t0},d.prototype._change=function(e){var t=e.state,r=e.isPageReset;t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},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 ("+p+")"),this.client=e),this},d.prototype.getClient=function(){return this.client},d.prototype.derive=function(e){var t=new o(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},290:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},106:e=>{"use strict";e.exports=function(){return Array.prototype.slice.call(arguments).reduceRight((function(e,t){return Object.keys(Object(t)).forEach((function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])})),e}),{})}},109: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(/^\\-/,"-")}}},98:e=>{"use strict";e.exports=function(e,t){if(Array.isArray(e))for(var r=0;r{"use strict";e.exports=function(e,t){if(!Array.isArray(e))return-1;for(var r=0;r{"use strict";var n=r(98);e.exports=function(e,t){var r=(t||[]).map((function(e){return e.split(":")}));return e.reduce((function(e,t){var i=t.split(":"),o=n(r,(function(e){return e[0]===i[0]}));return i.length>1||!o?(e[0].push(i[0]),e[1].push(i[1]),e):(e[0].push(o[0]),e[1].push(o[1]),e)}),[[],[]])}},132:e=>{"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},286:e=>{"use strict";e.exports=function(e,t){return e.filter((function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n}))}},97:e=>{"use strict";function t(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}function r(e,n){if(e===n)return e;for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)&&"__proto__"!==i&&"constructor"!==i){var o=n[i],a=e[i];void 0!==a&&void 0===o||(t(a)&&t(o)?e[i]=r(a,o):e[i]="object"==typeof(u=o)&&null!==u?r(Array.isArray(u)?[]:{},u):u)}var u;return e}e.exports=function(e){t(e)||(e={});for(var n=1,i=arguments.length;n{"use strict";e.exports=function(e){return e&&Object.keys(e).length>0}},107:e=>{"use strict";e.exports=function(e,t){if(null===e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}},129:e=>{"use strict";function t(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=void 0!==t,o=null===t;if(!o&&e>t||n&&i||!r)return 1;if(!n&&e=n.length?o:"desc"===n[i]?-o:o}return e.index-r.index})),i.map((function(e){return e.value}))}},287: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.")}},294:(e,t,r)=>{"use strict";var n=r(97);function i(e){return Object.keys(e).sort((function(e,t){return e.localeCompare(t)})).reduce((function(t,r){return t[r]=e[r],t}),{})}var o={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:o._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach((function(n){r.push({indexName:e,params:o._getDisjunctiveFacetSearchParams(t,n)})})),t.getRefinedHierarchicalFacets().forEach((function(n){var i=t.getHierarchicalFacetByName(n),a=t.getHierarchicalRefinement(n),u=t._getHierarchicalFacetSeparator(i);if(a.length>0&&a[0].split(u).length>1){var c=a[0].split(u).slice(0,-1).reduce((function(e,t,r){return e.concat({attribute:i.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(u)})}),[]);c.forEach((function(n,a){var u=o._getDisjunctiveFacetSearchParams(t,n.attribute,0===a);function s(e){return i.attributes.some((function(t){return t===e.split(":")[0]}))}var l=(u.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var r=t.filter((function(e){return!s(e)}));r.length>0&&e.push(r)}return"string"!=typeof t||s(t)||e.push(t),e}),[]),f=c[a-1];u.facetFilters=a>0?l.concat(f.attribute+":"+f.value):l.length>0?l:void 0,r.push({indexName:e,params:u})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(o._getHitsHierarchicalFacetsAttributes(e)),r=o._getFacetFilters(e),a=o._getNumericFilters(e),u=o._getTagFilters(e),c={facets:t.indexOf("*")>-1?["*"]:t,tagFilters:u};return r.length>0&&(c.facetFilters=r),a.length>0&&(c.numericFilters=a),i(n({},e.getQueryParams(),c))},_getDisjunctiveFacetSearchParams:function(e,t,r){var a=o._getFacetFilters(e,t,r),u=o._getNumericFilters(e,t),c=o._getTagFilters(e),s={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};c.length>0&&(s.tagFilters=c);var l=e.getHierarchicalFacetByName(t);return s.facets=l?o._getDisjunctiveHierarchicalFacetAttribute(e,l,r):t,u.length>0&&(s.numericFilters=u),a.length>0&&(s.facetFilters=a),i(n({},e.getQueryParams(),s))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach((function(n){var i=e.numericRefinements[n]||{};Object.keys(i).forEach((function(e){var o=i[e]||[];t!==n&&o.forEach((function(t){if(Array.isArray(t)){var i=t.map((function(t){return n+e+t}));r.push(i)}else r.push(n+e+t)}))}))})),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).forEach((function(e){(i[e]||[]).forEach((function(t){n.push(e+":"+t)}))}));var o=e.facetsExcludes||{};Object.keys(o).forEach((function(e){(o[e]||[]).forEach((function(t){n.push(e+":-"+t)}))}));var a=e.disjunctiveFacetsRefinements||{};Object.keys(a).forEach((function(e){var r=a[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.forEach((function(t){i.push(e+":"+t)})),n.push(i)}}));var u=e.hierarchicalFacetsRefinements||{};return Object.keys(u).forEach((function(i){var o=(u[i]||[])[0];if(void 0!==o){var a,c,s=e.getHierarchicalFacetByName(i),l=e._getHierarchicalFacetSeparator(s),f=e._getHierarchicalRootPath(s);if(t===i){if(-1===o.indexOf(l)||!f&&!0===r||f&&f.split(l).length===o.split(l).length)return;f?(c=f.split(l).length-1,o=f):(c=o.split(l).length-2,o=o.slice(0,o.lastIndexOf(l))),a=s.attributes[c]}else c=o.split(l).length-1,a=s.attributes[c];a&&n.push([a+":"+o])}})),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce((function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),o=n.split(i).length,a=r.attributes.slice(0,o+1);return t.concat(a)}),[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),o=0;return i&&(o=i.split(n).length),[t.attributes[o]]}var a=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,a+1)},getSearchForFacetQuery:function(e,t,r,a){var u=a.isDisjunctiveFacet(e)?a.clearRefinements(e):a,c={facetQuery:t,facetName:e};return"number"==typeof r&&(c.maxFacetHits=r),i(n({},o._getHitsSearchParams(u),c))}};e.exports=o},288:e=>{"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},133:e=>{"use strict";e.exports="3.12.0"},5:(e,t)=>{var r;!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t{var t="undefined"!=typeof Element,r="function"==typeof Map,n="function"==typeof Set,i="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function o(e,a){if(e===a)return!0;if(e&&a&&"object"==typeof e&&"object"==typeof a){if(e.constructor!==a.constructor)return!1;var u,c,s,l;if(Array.isArray(e)){if((u=e.length)!=a.length)return!1;for(c=u;0!=c--;)if(!o(e[c],a[c]))return!1;return!0}if(r&&e instanceof Map&&a instanceof Map){if(e.size!==a.size)return!1;for(l=e.entries();!(c=l.next()).done;)if(!a.has(c.value[0]))return!1;for(l=e.entries();!(c=l.next()).done;)if(!o(c.value[1],a.get(c.value[0])))return!1;return!0}if(n&&e instanceof Set&&a instanceof Set){if(e.size!==a.size)return!1;for(l=e.entries();!(c=l.next()).done;)if(!a.has(c.value[0]))return!1;return!0}if(i&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(a)){if((u=e.length)!=a.length)return!1;for(c=u;0!=c--;)if(e[c]!==a[c])return!1;return!0}if(e.constructor===RegExp)return e.source===a.source&&e.flags===a.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===a.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===a.toString();if((u=(s=Object.keys(e)).length)!==Object.keys(a).length)return!1;for(c=u;0!=c--;)if(!Object.prototype.hasOwnProperty.call(a,s[c]))return!1;if(t&&e instanceof Element)return!1;for(c=u;0!=c--;)if(("_owner"!==s[c]&&"__v"!==s[c]&&"__o"!==s[c]||!e.$$typeof)&&!o(e[s[c]],a[s[c]]))return!1;return!0}return e!=e&&a!=a}e.exports=function(e,t){try{return o(e,t)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},15:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Breadcrumb:()=>qi,ClearRefinements:()=>zi,Configure:()=>he,CurrentRefinements:()=>Gi,DynamicWidgets:()=>Us,EXPERIMENTAL_Answers:()=>Bs,EXPERIMENTAL_connectConfigureRelatedItems:()=>Ee,EXPERIMENTAL_connectDynamicWidgets:()=>Bt,EXPERIMENTAL_useAnswers:()=>ks,ExperimentalConfigureRelatedItems:()=>Te,ExperimentalDynamicWidgets:()=>Xs,HIGHLIGHT_TAGS:()=>H,HierarchicalMenu:()=>qo,Highlight:()=>$o,Hits:()=>Yo,HitsPerPage:()=>fa,Index:()=>ze,InfiniteHits:()=>xa,InstantSearch:()=>St,Menu:()=>Ta,MenuSelect:()=>Ba,NumericMenu:()=>tu,Pagination:()=>gu,Panel:()=>xu,PoweredBy:()=>Nu,QueryRuleContext:()=>ke,QueryRuleCustomData:()=>js,RangeInput:()=>$u,RangeSlider:()=>Uu,RatingMenu:()=>ac,RefinementList:()=>bc,RelevantSort:()=>Vc,ScrollTo:()=>Rc,SearchBox:()=>jc,Snippet:()=>Fc,SortBy:()=>Bc,Stats:()=>Wc,ToggleRefinement:()=>Jc,VoiceSearch:()=>ws,connectAutoComplete:()=>Ct,connectBreadcrumb:()=>Nt,connectConfigure:()=>ye,connectCurrentRefinements:()=>qt,connectDynamicWidgets:()=>Dt,connectGeoSearch:()=>Zt,connectHierarchicalMenu:()=>sr,connectHighlight:()=>fr,connectHitInsights:()=>br,connectHits:()=>vr,connectHitsPerPage:()=>Pr,connectInfiniteHits:()=>Nr,connectMenu:()=>Lr,connectNumericMenu:()=>Zr,connectPagination:()=>Xr,connectPoweredBy:()=>en,connectQueryRules:()=>Ie,connectRange:()=>sn,connectRefinementList:()=>vn,connectRelevantSort:()=>Rn,connectScrollTo:()=>gn,connectSearchBox:()=>Sn,connectSortBy:()=>Tn,connectStateResults:()=>Nn,connectStats:()=>Vn,connectToggleRefinement:()=>Hn,createClassNames:()=>Qn,createConnector:()=>M,createInfiniteHitsSessionStorageCache:()=>Gs,createVoiceSearchHelper:()=>us,getInsightsAnonymousUserToken:()=>zs,translatable:()=>Z});var n=r(2),i=r(96),o=r.n(i);function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t0}function v(e,t){if(null==e)return{};for(var r={},n=Object.keys(e),i=0;i=0||(r[o]=e[o])}return r}var g=function(e,t){return(Array.isArray(t)?t:t.replace(/\[(\d+)]/g,".$1").split(".")).reduce((function(e,t){return e?e[t]:void 0}),e)};function x(e){return e.replace(/^\\-/,"-")}var O=(0,n.createContext)({onInternalStateUpdate:function(){},createHrefForState:function(){return"#"},onSearchForFacetValues:function(){},onSearchStateChange:function(){},onSearchParameters:function(){},store:{},widgetsManager:{},mainTargetedIndex:""}),w=O.Consumer,S=O.Provider,P=(0,n.createContext)(void 0),R=P.Consumer,j=P.Provider,E=["contextValue"];function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}function F(){return F=Object.assign?Object.assign.bind():function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},a=function(i){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&V(e,t)}(p,i);var a,u,c,s,f=(c=p,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=k(c);if(s){var r=k(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===C(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return I(e)}(this,e)});function p(t){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),A(I(r=f.call(this,t)),"unsubscribe",void 0),A(I(r),"unregisterWidget",void 0),A(I(r),"cleanupTimerRef",null),A(I(r),"isUnmounting",!1),A(I(r),"state",{providedProps:r.getProvidedProps(r.props)}),A(I(r),"refine",(function(){for(var t,n=arguments.length,i=new Array(n),o=0;o=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,E)),o=this.state.providedProps;if(null===o)return null;var a="function"==typeof e.refine?{refine:this.refine,createURL:this.createURL}:{},u="function"==typeof e.searchForFacetValues?{searchForItems:this.searchForFacetValues}:{};return n.default.createElement(r,F({},i,o,a,u))}}])&&N(a.prototype,u),Object.defineProperty(a,"prototype",{writable:!1}),p}(n.Component);return A(a,"displayName","".concat(e.displayName,"(").concat(f(r),")")),A(a,"$$type",e.$$type),A(a,"$$widgetType",i.$$widgetType),A(a,"propTypes",e.propTypes),A(a,"defaultProps",e.defaultProps),A(a,"_connectorDesc",e),a}}const M=function(e){return function(t,r){var i=D(e)(t,r);return function(e){return n.default.createElement(w,null,(function(t){return n.default.createElement(R,null,(function(r){return n.default.createElement(i,F({contextValue:t,indexContextValue:r},e))}))}))}}};var H={highlightPreTag:"",highlightPostTag:""};function L(e){var t=e.preTag,r=e.postTag,n=e.highlightedValue,i=(void 0===n?"":n).split(t),o=i.shift(),a=""===o?[]:[{value:o,isHighlighted:!1}];if(r===t){var u=!0;i.forEach((function(e){a.push({value:e,isHighlighted:u}),u=!u}))}else i.forEach((function(e){var t=e.split(r);a.push({value:t[0],isHighlighted:!0}),""!==t[1]&&a.push({value:t[1],isHighlighted:!1})}));return a}function B(e){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(e)}function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t1?o-1:0),u=1;u=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}const ye=M({displayName:"AlgoliaConfigure",$$type:"ais.configure",getProvidedProps:function(){return{}},getSearchParameters:function(e,t){t.children,t.contextValue,t.indexContextValue;var r=de(t,se);return e.setQueryParameters(r)},transitionState:function(e,t,r){var n="configure",i=(e.children,e.contextValue,e.indexContextValue,de(e,le)),o=Object.keys(e),a=this._props?Object.keys(this._props).filter((function(e){return-1===o.indexOf(e)})):[];return this._props=e,ie(r,me({},n,pe(pe({},v(r[n],a)),i)),{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){var r="configure",n=te({ais:e.contextValue,multiIndexContext:e.indexContextValue}),i=ne({ais:e.contextValue,multiIndexContext:e.indexContextValue})&&t.indices?t.indices[n]:t,o=(i&&i[r]?Object.keys(i[r]):[]).reduce((function(t,n){return e[n]||(t[n]=i[r][n]),t}),{});return ie(t,me({},r,o),{ais:e.contextValue,multiIndexContext:e.indexContextValue})}}),he=ye((function(){return null}),{$$widgetType:"ais.configure"});var be=r(56),ve=r.n(be);function ge(e){return ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ge(e)}function xe(e){return function(e){if(Array.isArray(e))return Oe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Oe(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Oe(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r")}function je(e){var t=Object.keys(e.matchingPatterns).reduce((function(t,r){var n=e.matchingPatterns[r],i=g(e.hit,r),o=n.score;return Array.isArray(i)?[].concat(xe(t),[i.map((function(e){return Re({attributeName:r,attributeValue:e,attributeScore:o})}))]):"string"==typeof i?[].concat(xe(t),[Re({attributeName:r,attributeValue:i,attributeScore:o})]):t}),[]);return e.transformSearchParameters(new(ve().SearchParameters)({sumOrFiltersScores:!0,facetFilters:["objectID:-".concat(e.hit.objectID)],optionalFilters:t}))}const Ee=M({displayName:"AlgoliaConfigureRelatedItems",$$type:"ais.configureRelatedItems",defaultProps:{transformSearchParameters:function(e){return Se({},e)}},getProvidedProps:function(){return{}},getSearchParameters:function(e,t){return e.setQueryParameters(je(t))},transitionState:function(e,t,r){var n,i="configure",o=(n=m(je(e)),Object.keys(n).forEach((function(e){var t=n[e];Array.isArray(t)&&0===t.length&&delete n[e]})),n),a=Object.keys(o),u=this._searchParameters?Object.keys(this._searchParameters).filter((function(e){return-1===a.indexOf(e)})):[];return this._searchParameters=o,ie(r,Pe({},i,Se(Se({},v(r[i],u)),o)),{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){var r=this,n="configure",i=te({ais:e.contextValue,multiIndexContext:e.indexContextValue}),o=ne({ais:e.contextValue,multiIndexContext:e.indexContextValue})&&t.indices?t.indices[i]:t,a=(o&&o[n]?Object.keys(o[n]):[]).reduce((function(e,t){return r._searchParameters[t]||(e[t]=o[n][t]),e}),{});return ie(t,Pe({},n,a),{ais:e.contextValue,multiIndexContext:e.indexContextValue})}});var Ce=r(359),Fe=r.n(Ce);function _e(){return null}_e.propTypes={hit:Fe().object.isRequired,matchingPatterns:Fe().object.isRequired,transformSearchParameters:Fe().func};const Te=Ee(_e,{$$widgetType:"ais.configureRelatedItems"});function Ne(e){return function(e){if(Array.isArray(e))return Ve(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ve(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ve(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ve(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0}},getSearchParameters:function(e,t,r){if(0===Object.keys(t.trackedFilters).length)return e;var n=function(e){var t=e.searchState,r=e.trackedFilters;return Object.keys(r).reduce((function(e,n){var i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).filter((function(r){return void 0!==t[r]&&void 0!==t[r][e]})).map((function(r){return function(e,t,r){var n=r[t];switch(t){case"range":return Object.keys(n[e]).map((function(t){return n[e][t]}));case"refinementList":return n[e];case"hierarchicalMenu":case"menu":case"toggle":return[n[e]];case"multiRange":return n[e].split(":");default:return[]}}(e,r,t)})).reduce((function(e,t){return e.concat(t)}),[])}(n,t),o=(0,r[n])(i);return[].concat(Ne(e),Ne(i.filter((function(e){return o.includes(e)})).map((function(e){return"ais-".concat(n,"-").concat(e).replace(/[^a-z0-9-_]+/gi,"_")}))))}),[])}({searchState:ne({ais:t.contextValue,multiIndexContext:t.indexContextValue})&&r.indices?r.indices[te({ais:t.contextValue,multiIndexContext:t.indexContextValue})]:r,trackedFilters:t.trackedFilters}),i=e.ruleContexts||[],o=[].concat(Ne(i),Ne(n)),a=t.transformRuleContexts(o).slice(0,10);return e.setQueryParameter("ruleContexts",a)}}),ke=Ie((function(){return null}),{$$widgetType:"ais.queryRuleContext"});function Ae(e){return Ae="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ae(e)}function qe(){return qe=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function et(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function tt(e){for(var t=1;t1?n-1:0),o=1;o1?t-1:0),n=1;n0,error:null}))}}function x(e){var t=e.error,r=y.getState(),n=r.isSearchStalled;u.hasPendingRequests()||(clearTimeout(l),n=!1),r.resultsFacetValues;var i=Xe(r,Ze);y.setState(tt(tt({},i),{},{isSearchStalled:n,error:t,searching:!1}))}return{store:y,widgetsManager:m,getWidgetsIds:function(){return y.getState().metadata.reduce((function(e,t){return void 0!==t.id?e.concat(t.id):e}),[])},getSearchParameters:b,onSearchForFacetValues:function(e){var t=e.facetName,r=e.query,n=e.maxFacetHits,i=void 0===n?10:n,o=Math.max(1,Math.min(i,100));y.setState(tt(tt({},y.getState()),{},{searchingForFacetValues:!0})),u.searchForFacetValues(t,r,o).then((function(e){var n;y.setState(tt(tt({},y.getState()),{},{error:null,searchingForFacetValues:!1,resultsFacetValues:tt(tt({},y.getState().resultsFacetValues),{},(n={},rt(n,t,e.facetHits),rt(n,"query",r),n))}))}),(function(e){y.setState(tt(tt({},y.getState()),{},{searchingForFacetValues:!1,error:e}))})).catch((function(e){setTimeout((function(){throw e}))}))},onExternalStateUpdate:function(e){var t=h(e);y.setState(tt(tt({},y.getState()),{},{widgets:e,metadata:t,searching:!0})),v()},transitionState:function(e){var t=y.getState().widgets;return m.getWidgets().filter((function(e){return Boolean(e.transitionState)})).reduce((function(e,r){return r.transitionState(t,e)}),e)},updateClient:function(e){nt(e),u.setClient(e),v()},updateIndex:function(e){f=f.setIndex(e)},clearCache:function(){u.clearCache(),v()},skipSearch:function(){s=!0}}}function lt(e){return e?e.metadata.map((function(e){return tt(tt({value:function(){return{}}},e),{},{items:e.items&&e.items.map((function(e){return tt(tt({value:function(){return{}}},e),{},{items:e.items&&e.items.map((function(e){return tt({value:function(){return{}}},e)}))})}))})})):[]}function ft(e){return ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ft(e)}function pt(e){return pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pt(e)}function mt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function dt(e){for(var t=1;t from being controlled to uncontrolled");if(!t&&this.state.isControlled)throw new Error("You can't switch from being uncontrolled to controlled");this.props.refresh!==e.refresh&&this.props.refresh&&this.state.instantSearchManager.clearCache(),e.indexName!==this.props.indexName&&this.state.instantSearchManager.updateIndex(this.props.indexName),e.searchClient!==this.props.searchClient&&this.state.instantSearchManager.updateClient(this.props.searchClient)}},{key:"componentDidMount",value:function(){this.cleanupTimerRef&&(clearTimeout(this.cleanupTimerRef),this.cleanupTimerRef=null),"object"===("undefined"==typeof window?"undefined":ft(window))&&"object"===ft(window.navigator)&&"string"==typeof window.navigator.userAgent&&window.navigator.userAgent.includes("Algolia Crawler")&&"object"===ft(window.document)&&function(e,t){var r=document.createElement("meta"),n=document.querySelector("head");r.name="algolia:metadata";var i=function(e,t){var r=["contextValue","indexContextValue"],n=e.map((function(e){var t=e.props,n=e.constructor,i=n._connectorDesc||{},o=i.defaultProps,a=void 0===o?{}:o,u=i.displayName;return{displayName:void 0===u?n.displayName:u,$$type:n.$$type,$$widgetType:n.$$widgetType,params:Object.keys(t).filter((function(e){return!r.includes(e)&&a[e]!==t[e]&&void 0!==t[e]}))}})),i=t;return{ua:i.transporter&&i.transporter.userAgent?i.transporter.userAgent.value:i._ua,widgets:n}}(e,t);r.content=JSON.stringify(i),n.appendChild(r)}(this.state.instantSearchManager.widgetsManager.getWidgets(),this.props.searchClient)}},{key:"componentWillUnmount",value:function(){var e=this;this.cleanupTimerRef=setTimeout((function(){e.isUnmounting=!0,e.state.instantSearchManager.skipSearch()}))}},{key:"createHrefForState",value:function(e){return e=this.state.instantSearchManager.transitionState(e),this.state.isControlled&&this.props.createURL?this.props.createURL(e,this.getKnownKeys()):"#"}},{key:"onWidgetsInternalStateUpdate",value:function(e){e=this.state.instantSearchManager.transitionState(e),this.onSearchStateChange(e),this.state.isControlled||this.state.instantSearchManager.onExternalStateUpdate(e)}},{key:"onSearchStateChange",value:function(e){this.props.onSearchStateChange&&!this.isUnmounting&&this.props.onSearchStateChange(e)}},{key:"onSearchParameters",value:function(e,t,r,n,i){if(this.props.onSearchParameters){var o=this.props.searchState?this.props.searchState:{};this.props.onSearchParameters(e,t,r,o)}if(this.props.widgetsCollector){var a=this.props.searchState?this.props.searchState:{};this.props.widgetsCollector({getSearchParameters:e,getMetadata:n,context:t,props:r,searchState:a,displayName:i})}}},{key:"onSearchForFacetValues",value:function(e){this.state.instantSearchManager.onSearchForFacetValues(e)}},{key:"getKnownKeys",value:function(){return this.state.instantSearchManager.getWidgetsIds()}},{key:"render",value:function(){return 0===n.Children.count(this.props.children)?null:n.default.createElement(S,{value:this.state.contextValue},this.props.children)}}])&&yt(t.prototype,r),i&&yt(t,i),Object.defineProperty(t,"prototype",{writable:!1}),s}(n.Component);gt(wt,"defaultProps",{stalledSearchDelay:200,refresh:!1}),gt(wt,"propTypes",{indexName:Fe().string.isRequired,searchClient:Fe().shape({search:Fe().func.isRequired,searchForFacetValues:Fe().func,addAlgoliaAgent:Fe().func,clearCache:Fe().func}).isRequired,createURL:Fe().func,refresh:Fe().bool,searchState:Fe().object,onSearchStateChange:Fe().func,onSearchParameters:Fe().func,widgetsCollector:Fe().func,resultsState:Fe().oneOfType([Fe().object,Fe().array]),children:Fe().node,stalledSearchDelay:Fe().number});const St=wt;function Pt(e){return Pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pt(e)}function Rt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0,items:u}},refine:function(e,t,r){return function(e,t,r,n){return ie(t,function(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==Ft(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Ft(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Ft(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({},_t(e),r||""),n,!0,"hierarchicalMenu")}(e,t,r,{ais:e.contextValue,multiIndexContext:e.indexContextValue})}});function Vt(e){return Vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vt(e)}function It(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function kt(e){for(var t=1;t0}},refine:function(e,t,r){return(r instanceof Array?r.map((function(e){return e.value})):[r]).reduce((function(e,t){return t(e)}),t)}}),Dt=M({displayName:"AlgoliaDynamicWidgets",$$type:"ais.dynamicWidgets",defaultProps:{transformItems:function(e){return e},maxValuesPerFacet:20},propTypes:{transformItems:Fe().func,facets:Fe().arrayOf(Fe().string),maxValuesPerFacet:Fe().number},getProvidedProps:function(e,t,r){var n=re(r,{ais:e.contextValue,multiIndexContext:e.indexContextValue});if(e.facets&&(!(Array.isArray(e.facets)&&e.facets.length<=1)||"*"!==e.facets[0]&&void 0!==e.facets[0]))throw new Error('The `facets` prop only accepts [] or ["*"], you passed '.concat(JSON.stringify(e.facets)));if(!n)return{attributesToRender:[]};var i=n.renderingContent&&n.renderingContent.facetOrdering&&n.renderingContent.facetOrdering.facets&&n.renderingContent.facetOrdering.facets.order||[],o=e.transformItems(i,{results:n});return o.length>20&&!e.facets&&console.warn("More than ".concat(20," facets are requested to be displayed without explicitly setting which facets to retrieve. This could have a performance impact. Set \"facets\" to [] to do two smaller network requests, or explicitly to ['*'] to avoid this warning.")),e.maxValuesPerFacet=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Qt),i=ae(n,t,r,"aroundLatLng");if(!i){var o=ae(n,t,r,"configure.aroundLatLng");return o&&zt(o)}return i}(e,t,i),s=o&&o._state.aroundLatLng&&zt(o._state.aroundLatLng)||void 0,l=a||u,f=c||s;return{hits:o?o.hits.filter((function(e){return Boolean(e._geoloc)})):[],isRefinedWithMap:Boolean(l),currentRefinement:l,position:f}},refine:function(e,t,r){return Jt(t,r,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},getSearchParameters:function(e,t,r){var n=Yt(t,r,{ais:t.contextValue,multiIndexContext:t.indexContextValue});return n?e.setQueryParameter("insideBoundingBox",Ut(n)):e},cleanUp:function(e,t){return ue(t,{ais:e.contextValue,multiIndexContext:e.indexContextValue},"boundingBox")},getMetadata:function(e,t){var r=[],n="boundingBox",i={ais:e.contextValue,multiIndexContext:e.indexContextValue},o=te(i),a={},u=Yt(e,t,i);return u&&r.push({label:"".concat(n,": ").concat(Ut(u)),value:function(e){return Jt(e,a,i)},currentRefinement:u}),{id:n,index:o,items:r}},shouldComponentUpdate:function(){return!0}});function Kt(e){return Kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kt(e)}function Gt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Xt(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:10;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).slice(0,t).map((function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Array.isArray(r.items)?Xt(Xt({},r),{},{items:e(r.items,t)}):r}))};function ur(e,t,r,n){return ie(t,er({},tr(e),r||""),n,!0,rr)}var cr=["name:asc"];const sr=M({displayName:"AlgoliaHierarchicalMenu",$$type:"ais.hierarchicalMenu",propTypes:{attributes:function(e,t,r){if(!Array.isArray(e[t])||e[t].some((function(e){return"string"!=typeof e}))||e[t].length<1)return new Error("Invalid prop ".concat(t," supplied to ").concat(r,". Expected an Array of Strings"))},separator:Fe().string,rootPath:Fe().string,showParentLevel:Fe().bool,defaultRefinement:Fe().string,showMore:Fe().bool,limit:Fe().number,showMoreLimit:Fe().number,transformItems:Fe().func,facetOrdering:Fe().bool},defaultProps:{showMore:!1,limit:10,showMoreLimit:20,separator:" > ",rootPath:null,showParentLevel:!0,facetOrdering:!0},getProvidedProps:function(e,t,r){var n=e.showMore,i=e.limit,o=e.showMoreLimit,a=e.facetOrdering,u=tr(e),c=re(r,{ais:e.contextValue,multiIndexContext:e.indexContextValue});if(!Boolean(c)||!Boolean(c.getFacetByName(u)))return{items:[],currentRefinement:nr(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),canRefine:!1};var s=n?o:i,l=c.getFacetValues(u,{sortBy:cr,facetOrdering:a}),f=l.data?or(l.data,e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}):[],p=e.transformItems?e.transformItems(f):f;return{items:ar(p,s),currentRefinement:nr(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),canRefine:p.length>0}},refine:function(e,t,r){return ur(e,t,r,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){return function(e,t,r){return ue(t,r,"".concat(rr,".").concat(tr(e)))}(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},getSearchParameters:function(e,t,r){var n=t.attributes,i=t.separator,o=t.rootPath,a=t.showParentLevel,u=t.showMore,c=t.limit,s=t.showMoreLimit,l=t.contextValue,f=tr(t),p=u?s:c;e=e.addHierarchicalFacet({name:f,attributes:n,separator:i,rootPath:o,showParentLevel:a}).setQueryParameters({maxValuesPerFacet:Math.max(e.maxValuesPerFacet||0,p)});var m=nr(t,r,{ais:l,multiIndexContext:t.indexContextValue});return null!==m&&(e=e.toggleHierarchicalFacetRefinement(f,m)),e},getMetadata:function(e,t){var r=e.attributes[0],n=tr(e),i=nr(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),o=i?[{label:"".concat(r,": ").concat(x(i)),attribute:r,value:function(t){return ur(e,t,"",{ais:e.contextValue,multiIndexContext:e.indexContextValue})},currentRefinement:i}]:[];return{id:n,index:te({ais:e.contextValue,multiIndexContext:e.indexContextValue}),items:o}}});var lr=function(e){var t=e.attribute,r=e.hit,n=e.highlightProperty,i=e.preTag,o=void 0===i?H.highlightPreTag:i,a=e.postTag;return function(e){var t=e.preTag,r=void 0===t?"":t,n=e.postTag,i=void 0===n?"":n,o=e.highlightProperty,a=e.attribute,u=e.hit;if(!u)throw new Error("`hit`, the matching record, must be provided");var c=g(u[o],a)||{};return Array.isArray(c)?c.map((function(e){return L({preTag:r,postTag:i,highlightedValue:e.value})})):L({preTag:r,postTag:i,highlightedValue:c.value})}({attribute:t,highlightProperty:n,hit:r,preTag:o,postTag:void 0===a?H.highlightPostTag:a})};const fr=M({displayName:"AlgoliaHighlighter",$$type:"ais.highlighter",propTypes:{},getProvidedProps:function(){return{highlight:lr}}});function pr(e){return pr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pr(e)}function mr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function dr(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,jr)}function Tr(e){return Object.keys(e).map(Number).sort((function(e,t){return e-t})).reduce((function(t,r){return t.concat(e[r])}),[])}const Nr=M({displayName:"AlgoliaInfiniteHits",$$type:"ais.infiniteHits",getProvidedProps:function(e,t,r){var n=this,i=re(r,{ais:e.contextValue,multiIndexContext:e.indexContextValue});if(!i)return{hits:[],hasPrevious:!1,hasMore:!1,refine:function(){},refinePrevious:function(){},refineNext:function(){}};var a=i.page,u=i.hits,c=i.hitsPerPage,s=i.nbPages,l=i._state;this._cache=e.cache?e.cache:this._cache||function(){var e=void 0,t=void 0;return{read:function(r){var n=r.state;return o()(t,_r(n))?e:null},write:function(r){var n=r.state,i=r.hits;t=_r(n),e=i}}}();var f=this._cache.read({state:l})||{},p=y(d(u,c,a),i.queryID);f[a]=p,this._cache.write({state:l,hits:f});var m=Math.min.apply(Math,Er(Object.keys(f).map(Number))),h=Math.max.apply(Math,Er(Object.keys(f).map(Number))),b=m>0,v=h0}},refine:function(e,t,r){return Mr(e,t,r,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},searchForFacetValues:function(e,t,r){return{facetName:e.attribute,query:r,maxFacetHits:Dr(e)}},cleanUp:function(e,t){return function(e,t,r){return ue(t,r,"".concat(Ir,".").concat(kr(e)))}(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},getSearchParameters:function(e,t,r){var n=t.attribute;e=(e=e.setQueryParameters({maxValuesPerFacet:Math.max(e.maxValuesPerFacet||0,Dr(t))})).addDisjunctiveFacet(n);var i=Ar(t,r,{ais:t.contextValue,multiIndexContext:t.indexContextValue});return null!==i&&(e=e.addDisjunctiveFacetRefinement(n,i)),e},getMetadata:function(e,t){var r=kr(e),n=Ar(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return{id:r,index:te({ais:e.contextValue,multiIndexContext:e.indexContextValue}),items:null===n?[]:[{label:"".concat(e.attribute,": ").concat(x(n)),attribute:e.attribute,value:function(t){return Mr(e,t,"",{ais:e.contextValue,multiIndexContext:e.indexContextValue})},currentRefinement:n}]}}});function Br(e){return Br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Br(e)}function $r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=t&&e.min<=r||e.max>=t&&e.max<=r}(n,o,a)||function(e,t,r){return t>=e.min&&t<=e.max||r>=e.min&&r<=e.max}(n,o,a)))}function Jr(e,t,r,n){return ie(t,function(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==Br(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Br(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Br(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({},Wr(e),r),n,!0,Ur)}const Zr=M({displayName:"AlgoliaNumericMenu",$$type:"ais.numericMenu",propTypes:{id:Fe().string,attribute:Fe().string.isRequired,items:Fe().arrayOf(Fe().shape({label:Fe().node,start:Fe().number,end:Fe().number})).isRequired,transformItems:Fe().func},getProvidedProps:function(e,t,r){var n=e.attribute,i=zr(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),o=re(r,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),a=e.items.map((function(t){var r=Qr(t);return{label:t.label,value:r,isRefined:r===i,noRefinement:!!o&&Yr(Wr(e),o,r)}})),u=o&&o.getFacetByName(n)?o.getFacetStats(n):null,c=h(a,(function(e){return!0===e.isRefined}));a.some((function(e){return""===e.value}))||a.push({value:"",isRefined:void 0===c,noRefinement:!u,label:"All"});var s=e.transformItems?e.transformItems(a):a;return{items:s,currentRefinement:i,canRefine:s.length>0&&s.some((function(e){return!1===e.noRefinement}))}},refine:function(e,t,r){return Jr(e,t,r,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){return function(e,t,r){return ue(t,r,"".concat(Ur,".").concat(Wr(e)))}(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},getSearchParameters:function(e,t,r){var n=t.attribute,i=function(e){if(0===e.length)return{start:null,end:null};var t,r,n=(t=e.split(":"),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,u=[],c=!0,s=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=o.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){s=!0,i=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(s)throw i}}return u}}(t,r)||function(e,t){if(e){if("string"==typeof e)return $r(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$r(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=n[0],o=n[1];return{start:i.length>0?parseFloat(i):null,end:o.length>0?parseFloat(o):null}}(zr(t,r,{ais:t.contextValue,multiIndexContext:t.indexContextValue})),o=i.start,a=i.end;return e=e.addDisjunctiveFacet(n),"number"==typeof o&&(e=e.addNumericRefinement(n,">=",o)),"number"==typeof a&&(e=e.addNumericRefinement(n,"<=",a)),e},getMetadata:function(e,t){var r=Wr(e),n=zr(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),i=[],o=te({ais:e.contextValue,multiIndexContext:e.indexContextValue});if(""!==n){var a=h(e.items,(function(e){return Qr(e)===n})).label;i.push({label:"".concat(e.attribute,": ").concat(a),attribute:e.attribute,currentRefinement:a,value:function(t){return Jr(e,t,"",{ais:e.contextValue,multiIndexContext:e.indexContextValue})}})}return{id:r,index:o,items:i}}});function Kr(e){return Kr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kr(e)}function Gr(e,t,r){var n=ae(e,t,r,"page",1);return"string"==typeof n?parseInt(n,10):n}const Xr=M({displayName:"AlgoliaPagination",$$type:"ais.pagination",getProvidedProps:function(e,t,r){var n=re(r,{ais:e.contextValue,multiIndexContext:e.indexContextValue});if(!n)return null;var i=n.nbPages;return{nbPages:i,currentRefinement:Gr(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),canRefine:i>1}},refine:function(e,t,r){return function(e,t,r,n){return ie(t,function(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==Kr(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Kr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Kr(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({},"page",r),n,!1)}(0,t,r,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){return ue(t,{ais:e.contextValue,multiIndexContext:e.indexContextValue},"page")},getSearchParameters:function(e,t,r){return e.setPage(Gr(t,r,{ais:t.contextValue,multiIndexContext:t.indexContextValue})-1)},getMetadata:function(){return{id:"page"}}}),en=M({displayName:"AlgoliaPoweredBy",$$type:"ais.poweredBy",getProvidedProps:function(){var e="undefined"==typeof window||void 0===window.location?"":window.location.hostname;return{url:"https://www.algolia.com/?utm_source=react-instantsearch&utm_medium=website&"+"utm_content=".concat(e,"&")+"utm_campaign=poweredby"}}});function tn(e){return tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tn(e)}function rn(e){return e.attribute}var nn="range";function on(e,t,r,n){var i=ae(e,t,n,"".concat(nn,".").concat(rn(e)),{}),o=i.min,a=i.max,u=Boolean(e.precision),c=o;"string"==typeof c&&(c=u?parseFloat(c):parseInt(c,10));var s=a;"string"==typeof s&&(s=u?parseFloat(s):parseInt(s,10));var l={min:c,max:s},f=void 0!==e.min,p=void 0!==e.max,m=void 0!==l.min,d=void 0!==l.max;if(f&&m&&l.minr.max)throw Error("You can't provide max value greater than range.");return f&&!m&&(l.min=r.min),p&&!d&&(l.max=r.max),l}function an(e,t){return{min:void 0!==e.min?e.min:t.min,max:void 0!==e.max?e.max:t.max}}function un(e,t,r,n){return e||r!==n?e&&t?r:n:void 0}function cn(e,t,r,n,i){var o=r.min,a=r.max,u=n.min,c=n.max,s=void 0===o||""===o,l=void 0===a||""===a,f=s?void 0:parseFloat(o),p=l?void 0:parseFloat(a),m=s||isFinite(f),d=l||isFinite(p);if(!m||!d)throw Error("You can't provide non finite values to the range connector.");if(fc)throw Error("You can't provide max value greater than range.");return ie(t,function(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==tn(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==tn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===tn(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({},rn(e),{min:un(void 0!==e.min,s,u,f),max:un(void 0!==e.max,l,c,p)}),i,!0,nn)}const sn=M({displayName:"AlgoliaRange",$$type:"ais.range",propTypes:{id:Fe().string,attribute:Fe().string.isRequired,defaultRefinement:Fe().shape({min:Fe().number,max:Fe().number}),min:Fe().number,max:Fe().number,precision:Fe().number,header:Fe().node,footer:Fe().node},defaultProps:{precision:0},getProvidedProps:function(e,t,r){var n=e.attribute,i=e.precision,o=e.min,a=e.max,u=re(r,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),c=u&&u.getFacetByName(n),s=c&&u.getFacetStats(n)||{},l=(c?u.getFacetValues(n):[]).map((function(e){return{value:e.name,count:e.count}})),f=function(e,t,r){var n,i,o=Math.pow(10,r);return n="number"==typeof e.min&&isFinite(e.min)?e.min:"number"==typeof t.min&&isFinite(t.min)?t.min:void 0,i="number"==typeof e.max&&isFinite(e.max)?e.max:"number"==typeof t.max&&isFinite(t.max)?t.max:void 0,{min:void 0!==n?Math.floor(n*o)/o:n,max:void 0!==i?Math.ceil(i*o)/o:i}}({min:o,max:a},s,i),p=f.min,m=f.max;this._currentRange={min:p,max:m};var d=on(e,t,this._currentRange,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return{min:p,max:m,canRefine:l.length>0,currentRefinement:an(d,this._currentRange),count:l,precision:i}},refine:function(e,t,r){return cn(e,t,r,this._currentRange,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){return function(e,t,r){return ue(t,r,"".concat(nn,".").concat(rn(e)))}(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},getSearchParameters:function(e,t,r){var n=t.attribute,i=on(t,r,this._currentRange,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),o=i.min,a=i.max;return e=e.addDisjunctiveFacet(n),void 0!==o&&(e=e.addNumericRefinement(n,">=",o)),void 0!==a&&(e=e.addNumericRefinement(n,"<=",a)),e},getMetadata:function(e,t){var r=this,n=this._currentRange,i=n.min,o=n.max,a=on(e,t,this._currentRange,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),u=a.min,c=a.max,s=[],l=void 0!==u,f=void 0!==c;if(l&&u!==i||f&&c!==o){var p=[l?"".concat(u," <= "):"",e.attribute,f?" <= ".concat(c):""];s.push({label:p.join(""),attribute:e.attribute,value:function(t){return cn(e,t,{},r._currentRange,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},currentRefinement:an({min:u,max:c},{min:i,max:o})})}return{id:rn(e),index:te({ais:e.contextValue,multiIndexContext:e.indexContextValue}),items:s}}});function ln(e){return ln="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ln(e)}var fn="refinementList";function pn(e){return e.attribute}function mn(e,t,r){var n=ae(e,t,r,"".concat(fn,".").concat(pn(e)),[]);return"string"!=typeof n?n:n?[n]:[]}function dn(e,t,r,n){var i=mn(t,r,n);return-1===i.indexOf(e)?i.concat([e]):i.filter((function(t){return t!==e}))}function yn(e){var t=e.showMore,r=e.limit,n=e.showMoreLimit;return t?n:r}function hn(e,t,r,n){return ie(t,function(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==ln(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==ln(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===ln(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({},pn(e),r.length>0?r:""),n,!0,fn)}var bn=["isRefined","count:desc","name:asc"];const vn=M({displayName:"AlgoliaRefinementList",$$type:"ais.refinementList",propTypes:{id:Fe().string,attribute:Fe().string.isRequired,operator:Fe().oneOf(["and","or"]),showMore:Fe().bool,limit:Fe().number,showMoreLimit:Fe().number,defaultRefinement:Fe().arrayOf(Fe().oneOfType([Fe().string,Fe().number])),searchable:Fe().bool,transformItems:Fe().func,facetOrdering:Fe().bool},defaultProps:{operator:"or",showMore:!1,limit:10,showMoreLimit:20,facetOrdering:!0},getProvidedProps:function(e,t,r,n,i){var o=e.attribute,a=e.searchable,u=e.indexContextValue,c=e.facetOrdering,s=re(r,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),l=Boolean(s)&&Boolean(s.getFacetByName(o)),f=Boolean(i&&i[o]&&""!==i.query);if(a&&u)throw new Error("react-instantsearch: searching in *List is not available when used inside a multi index context");if(!l)return{items:[],currentRefinement:mn(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),canRefine:l,isFromSearch:f,searchable:a};var p=f?i[o].map((function(r){return{label:r.value,value:dn(r.escapedValue,e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),_highlightResult:{label:{value:r.highlighted}},count:r.count,isRefined:r.isRefined}})):s.getFacetValues(o,{sortBy:bn,facetOrdering:c}).map((function(r){return{label:r.name,value:dn(r.escapedValue,e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),count:r.count,isRefined:r.isRefined}})),m=e.transformItems?e.transformItems(p):p;return{items:m.slice(0,yn(e)),currentRefinement:mn(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),isFromSearch:f,searchable:a,canRefine:m.length>0}},refine:function(e,t,r){return hn(e,t,r,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},searchForFacetValues:function(e,t,r){return{facetName:e.attribute,query:r,maxFacetHits:yn(e)}},cleanUp:function(e,t){return function(e,t,r){return ue(t,r,"".concat(fn,".").concat(pn(e)))}(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},getSearchParameters:function(e,t,r){var n=t.attribute,i="and"===t.operator?"addFacet":"addDisjunctiveFacet",o="".concat(i,"Refinement");return e=(e=e.setQueryParameters({maxValuesPerFacet:Math.max(e.maxValuesPerFacet||0,yn(t))}))[i](n),mn(t,r,{ais:t.contextValue,multiIndexContext:t.indexContextValue}).reduce((function(e,t){return e[o](n,t)}),e)},getMetadata:function(e,t){var r=pn(e),n={ais:e.contextValue,multiIndexContext:e.indexContextValue};return{id:r,index:te(n),items:mn(e,t,n).length>0?[{attribute:e.attribute,label:"".concat(e.attribute,": "),currentRefinement:mn(e,t,n),value:function(t){return hn(e,t,[],n)},items:mn(e,t,n).map((function(r){return{label:x("".concat(r)),value:function(i){var o=mn(e,i,n).filter((function(e){return e!==r}));return hn(e,t,o,n)}}}))}]:[]}}}),gn=M({displayName:"AlgoliaScrollTo",$$type:"ais.scrollTo",propTypes:{scrollOn:Fe().string},defaultProps:{scrollOn:"page"},getProvidedProps:function(e,t){var r=e.scrollOn,n=ae(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue},r,null);this._prevSearchState||(this._prevSearchState={}),ne({ais:e.contextValue,multiIndexContext:e.indexContextValue})&&(t=t.indices?t.indices[te({ais:e.contextValue,multiIndexContext:e.indexContextValue})]:{});var i=v(t,["configure",r]),o=l(this._prevSearchState,i);return this._prevSearchState=i,{value:n,hasNotChanged:o}}});function xn(e){return xn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},xn(e)}function On(e,t,r){return ae(e,t,r,"query","")||""}function wn(e,t,r,n){return ie(t,function(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==xn(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==xn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===xn(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({},"query",r),n,!0)}const Sn=M({displayName:"AlgoliaSearchBox",$$type:"ais.searchBox",propTypes:{defaultRefinement:Fe().string},getProvidedProps:function(e,t,r){return{currentRefinement:On(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),isSearchStalled:r.isSearchStalled}},refine:function(e,t,r){return wn(0,t,r,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){return function(e,t,r){return ue(t,r,"query")}(0,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},getSearchParameters:function(e,t,r){return e.setQuery(On(t,r,{ais:t.contextValue,multiIndexContext:t.indexContextValue}))},getMetadata:function(e,t){var r="query",n=On(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return{id:r,index:te({ais:e.contextValue,multiIndexContext:e.indexContextValue}),items:null===n?[]:[{label:"".concat(r,": ").concat(n),value:function(t){return wn(0,t,"",{ais:e.contextValue,multiIndexContext:e.indexContextValue})},currentRefinement:n}]}}});function Pn(e){return Pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pn(e)}const Rn=M({displayName:"AlgoliaRelevantSort",$$type:"ais.relevantSort",getProvidedProps:function(e,t,r){var n=re(r,{ais:e.contextValue,multiIndexContext:e.indexContextValue});return n?{isVirtualReplica:void 0!==n.appliedRelevancyStrictness,isRelevantSorted:void 0!==n.appliedRelevancyStrictness&&n.appliedRelevancyStrictness>0}:{isVirtualReplica:!1,isRelevantSorted:!1}},getSearchParameters:function(e,t,r){return e.setQueryParameter("relevancyStrictness",function(e,t,r){return ae(e,t,r,"relevancyStrictness")}(t,r,{ais:t.contextValue,multiIndexContext:t.indexContextValue}))},refine:function(e,t,r){return ie(t,function(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==Pn(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==Pn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===Pn(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({},"relevancyStrictness",r),{ais:e.contextValue,multiIndexContext:e.indexContextValue},!0)}});function jn(e){return jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jn(e)}function En(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Cn(e){for(var t=1;t0&&n.nbHits!==n.nbSortedHits,nbHits:n.nbHits,nbSortedHits:n.nbSortedHits,processingTimeMS:n.processingTimeMS}:null}});function In(e){return In="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},In(e)}function kn(e){return e.attribute}var An="toggle",qn=["0","false","null","undefined"];function Dn(e,t,r){var n=ae(e,t,r,"".concat(An,".").concat(kn(e)),!1);return-1===qn.indexOf(n)&&Boolean(n)}function Mn(e,t,r,n){return ie(t,function(e,t,r){return(t=function(e){var t=function(e,t){if("object"!==In(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!==In(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===In(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({},kn(e),r||!1),n,!0,An)}const Hn=M({displayName:"AlgoliaToggle",$$type:"ais.toggle",propTypes:{label:Fe().string.isRequired,attribute:Fe().string.isRequired,value:Fe().any.isRequired,filter:Fe().func,defaultRefinement:Fe().bool},getProvidedProps:function(e,t,r){var n=e.attribute,i=e.value,o=re(r,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),a=Dn(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),u=o&&o.getFacetByName(n)?o.getFacetValues(n):null,c=u&&u.length?h(u,(function(e){return e.name===i.toString()})):null,s=c&&c.count,l=u&&u.length?u.reduce((function(e,t){return e+t.count}),0):null;return{currentRefinement:a,canRefine:a?null!==l&&l>0:null!==s&&s>0,count:{checked:l,unchecked:s}}},refine:function(e,t,r){return Mn(e,t,r,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},cleanUp:function(e,t){return function(e,t,r){return ue(t,r,"".concat(An,".").concat(kn(e)))}(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue})},getSearchParameters:function(e,t,r){var n=t.attribute,i=t.value,o=t.filter,a=Dn(t,r,{ais:t.contextValue,multiIndexContext:t.indexContextValue}),u=e.addDisjunctiveFacet(n);return a&&(u=u.addDisjunctiveFacetRefinement(n,i),o&&(u=o(u))),u},getMetadata:function(e,t){var r=kn(e),n=Dn(e,t,{ais:e.contextValue,multiIndexContext:e.indexContextValue}),i=[],o=te({ais:e.contextValue,multiIndexContext:e.indexContextValue});return n&&i.push({label:e.label,currentRefinement:n,attribute:e.attribute,value:function(t){return Mn(e,t,!1,{ais:e.contextValue,multiIndexContext:e.indexContextValue})}}),{id:r,index:o,items:i}}});var Ln=r(5),Bn=r.n(Ln);function $n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:"ais";return function(){for(var r=arguments.length,n=new Array(r),i=0;i ",className:""});const Ai=Z({rootLabel:"Home"})(ki),qi=Nt((function(e){return n.default.createElement(bi,e,n.default.createElement(Ai,e))}),{$$widgetType:"ais.breadcrumb"});function Di(e){return Di="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Di(e)}function Mi(e,t){for(var r=0;r=this.props.items.length;return t?n.default.createElement("button",{disabled:a,className:i("showMore",a&&"showMore--disabled"),onClick:this.onShowMoreClick},r("showMore",o)):null}},{key:"renderSearchBox",value:function(){var e=this,t=this.props,r=t.cx,i=t.searchForItems,o=t.isFromSearch,a=t.translate,u=t.items,c=t.selectItem,s=0===u.length&&""!==this.state.query?n.default.createElement("div",{className:r("noResults")},a("noResults")):null;return n.default.createElement("div",{className:r("searchBox")},n.default.createElement(yo,{currentRefinement:this.state.query,refine:function(t){e.setState({query:t}),i(t)},focusShortcuts:[],translate:a,onSubmit:function(t){t.preventDefault(),t.stopPropagation(),o&&u.length>0&&c(u[0],e.resetQuery)}}),s)}},{key:"render",value:function(){var e=this,t=this.props,r=t.cx,i=t.items,o=t.className,a=t.searchable,u=t.canRefine,c=a?this.renderSearchBox():null,s=Bn()(r("",!u&&"-noRefinement"),o);return 0===i.length?n.default.createElement("div",{className:s},c):n.default.createElement("div",{className:s},c,n.default.createElement("ul",{className:r("list",!u&&"list--noRefinement")},i.slice(0,this.getLimit()).map((function(t){return e.renderItem(t,e.resetQuery)}))),this.renderShowMore())}}],r&&bo(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),u}(n.Component);Oo(Po,"propTypes",{cx:Fe().func.isRequired,translate:Fe().func,items:So,renderItem:Fe().func.isRequired,selectItem:Fe().func,className:Fe().string,showMore:Fe().bool,limit:Fe().number,showMoreLimit:Fe().number,show:Fe().func,searchForItems:Fe().func,searchable:Fe().bool,isFromSearch:Fe().bool,canRefine:Fe().bool}),Oo(Po,"defaultProps",{className:"",isFromSearch:!1});const Ro=Po;function jo(e){return jo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},jo(e)}function Eo(e,t){for(var r=0;r=Math.min(o,i),label:a(t,r),value:r,ariaLabel:a("aria".concat(Un(t)),r)}}},{key:"render",value:function(){var e=this.props,t=e.listComponent,r=e.nbPages,i=e.totalPages,o=e.currentRefinement,a=e.padding,u=e.showFirst,c=e.showPrevious,s=e.showNext,l=e.showLast,f=e.refine,p=e.createURL,m=e.canRefine,d=e.translate,y=e.className,h=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,cu),b=Math.min(r,i),v=b,g=[];return u&&g.push({key:"first",modifier:"item--firstPage",disabled:1===o,label:d("first"),value:1,ariaLabel:d("ariaFirst")}),c&&g.push({key:"previous",modifier:"item--previousPage",disabled:1===o,label:d("previous"),value:o-1,ariaLabel:d("ariaPrevious")}),g=g.concat(function(e,t,r){var n=function(e,t){return Math.min(2*e+1,t)}(r,t);if(n===t)return Wn({start:1,end:t+1});var i=function(e,t,r,n){return e<=t?e:e>=r-t?n-(r-e):t+1}(e,r,t,n);return Wn({start:e-i+1,end:e+(n-i)+1})}(o,b,a).map((function(e){return{key:e,modifier:"item--page",label:d("page",e),value:e,selected:e===o,ariaLabel:d("ariaPage",e)}}))),s&&g.push({key:"next",modifier:"item--nextPage",disabled:o===v||v<=1,label:d("next"),value:o+1,ariaLabel:d("ariaNext")}),l&&g.push({key:"last",modifier:"item--lastPage",disabled:o===v||v<=1,label:d("last"),value:v,ariaLabel:d("ariaLast")}),n.default.createElement("div",{className:Bn()(hu("",!m&&"-noRefinement"),y)},n.default.createElement(t,lu({},h,{cx:hu,items:g,onSelect:f,createURL:p,canRefine:m})))}}],r&&fu(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),u}(n.Component);du(bu,"propTypes",{nbPages:Fe().number.isRequired,currentRefinement:Fe().number.isRequired,refine:Fe().func.isRequired,createURL:Fe().func.isRequired,canRefine:Fe().bool.isRequired,translate:Fe().func.isRequired,listComponent:Fe().func,showFirst:Fe().bool,showPrevious:Fe().bool,showNext:Fe().bool,showLast:Fe().bool,padding:Fe().number,totalPages:Fe().number,className:Fe().string}),du(bu,"defaultProps",{listComponent:uu,showFirst:!0,showPrevious:!0,showNext:!0,showLast:!1,padding:3,totalPages:1/0,className:""});const vu=Z({previous:"‹",next:"›",first:"«",last:"»",page:function(e){return e.toString()},ariaPrevious:"Previous page",ariaNext:"Next page",ariaFirst:"First page",ariaLast:"Last page",ariaPage:function(e){return"Page ".concat(e.toString())}})(bu),gu=Xr((function(e){return n.default.createElement(bi,e,n.default.createElement(vu,e))}),{$$widgetType:"ais.pagination"}),xu=ai;function Ou(e){return Ou="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ou(e)}function wu(e,t){for(var r=0;r=r?"starIcon--empty":"starIcon--full"),"aria-hidden":"true",width:"24",height:"24"},n.default.createElement("use",{xlinkHref:"#".concat(tc(m>=r?"starEmptySymbol":"starSymbol"))}))," "]);var d=c||u&&l?{}:{href:a({min:r,max:t}),onClick:this.onClick.bind(this,r,t)};return n.default.createElement("li",{key:r,className:tc("item",l&&"item--selected",c&&"item--disabled")},n.default.createElement("a",Ju({className:tc("link"),"aria-label":"".concat(p).concat(o("ratingLabel"))},d),f,n.default.createElement("span",{className:tc("label"),"aria-hidden":"true"},o("ratingLabel"))," ",n.default.createElement("span",{className:tc("count")},i)))}},{key:"render",value:function(){var e=this,t=this.props,r=t.min,i=t.max,o=t.translate,a=t.count,u=t.createURL,c=t.canRefine,s=t.className,l=void 0!==r&&r>=0?r:1,f=void 0!==i&&i>=0?i:0,p=f-l+1,m=a.map((function(e){return Yu(Yu({},e),{},{value:parseFloat(e.value)})})).filter((function(e){return e.value>=l&&e.value<=f})),d=Wn({start:0,end:Math.max(p,0)}).map((function(e){return zn(m,(function(t){return t.value===f-e}))||{value:f-e,count:0,total:0}})).reduce((function(e,t,r){return e.concat(Yu(Yu({},t),{},{total:0===r?t.count:e[r-1].total+t.count}))}),[]).map((function(t,r,n){return e.buildItem({lowerBound:t.value,count:t.total,isLastSelectableItem:n.length-1===r,max:f,translate:o,createURL:u})}));return n.default.createElement("div",{className:Bn()(tc("",!c&&"-noRefinement"),s)},n.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:{display:"none"}},n.default.createElement("symbol",{id:tc("starSymbol"),viewBox:"0 0 24 24"},rc),n.default.createElement("symbol",{id:tc("starEmptySymbol"),viewBox:"0 0 24 24"},nc)),n.default.createElement("ul",{className:tc("list",!c&&"list--noRefinement")},d))}}],r&&Zu(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),u}(n.Component);Xu(ic,"propTypes",{translate:Fe().func.isRequired,refine:Fe().func.isRequired,createURL:Fe().func.isRequired,min:Fe().number,max:Fe().number,currentRefinement:Fe().shape({min:Fe().number,max:Fe().number}),count:Fe().arrayOf(Fe().shape({value:Fe().string,count:Fe().number})),canRefine:Fe().bool.isRequired,className:Fe().string}),Xu(ic,"defaultProps",{className:""});const oc=Z({ratingLabel:" & Up"})(ic),ac=sn((function(e){return n.default.createElement(bi,e,n.default.createElement(oc,e))}),{$$widgetType:"ais.ratingMenu"});function uc(e){return uc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},uc(e)}function cc(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};c=os(os({},c),e),o()},p=function(){f(u(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"initial"))},m=function(){f({status:"waiting"})},d=function(e){f({status:"error",errorCode:e.error})},y=function(e){f({status:"recognizing",transcript:e.results[0]&&e.results[0][0]&&e.results[0][0].transcript||"",isSpeechFinal:e.results[0]&&e.results[0].isFinal}),r&&c.transcript&&i(c.transcript)},h=function(){c.errorCode||!c.transcript||r||i(c.transcript),"error"!==c.status&&f({status:"finished"})},b=function(){t&&(t.stop(),t.removeEventListener("start",m),t.removeEventListener("error",d),t.removeEventListener("result",y),t.removeEventListener("end",h),t=void 0)};return{getState:function(){return c},isBrowserSupported:s,isListening:l,toggleListening:function(){s()&&(l()?(b(),p("finished")):(t=new a)&&(p("askingPermission"),t.interimResults=!0,n&&(t.lang=n),t.addEventListener("start",m),t.addEventListener("error",d),t.addEventListener("result",y),t.addEventListener("end",h),t.start()))},dispose:b}}function cs(e){return cs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},cs(e)}function ss(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,Fs);if(r=(t=Vs(n.default.version.split(".").map(Number),2))[0],i=t[1],!(r>=17||16===r&&i>=8))throw new Error("`Answers` component and `useAnswers` hook require all React packages to be 16.8.0 or higher.");var d=(0,n.useContext)(O),y=Vs((0,n.useState)(d.store.getState().widgets.query),2),h=y[0],b=y[1],v=Vs((0,n.useState)(d.mainTargetedIndex),2),g=v[0],x=v[1],w=Vs((0,n.useState)(!1),2),S=w[0],P=w[1],R=Vs((0,n.useState)([]),2),j=R[0],E=R[1],C=(0,n.useMemo)((function(){return e=-1,t=-1,r=void 0,function(n){var i=++e;return Promise.resolve(n).then((function(e){return r&&i=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,qs))),p=f.hits,m=f.isLoading;return n.default.createElement(l,{hits:p,isLoading:m})}var $s=["children","className"];var Qs=Qn("DynamicWidgets");function Us(e){var t=e.children,r=e.className,i=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,$s);return n.default.createElement("div",{className:Bn()(Qs(""),r)},n.default.createElement(Lt,i,t))}var Ws="_ALGOLIA";function zs(){return function(e){for(var t="".concat(e,"="),r=document.cookie.split(";"),n=0;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,Ys)}var Zs="ais.infiniteHits";function Ks(){return"undefined"!=typeof window&&void 0!==window.sessionStorage}function Gs(){return{read:function(e){var t=e.state;if(!Ks())return null;try{var r=JSON.parse(window.sessionStorage.getItem(Zs));return r&&o()(r.state,Js(t))?r.hits:null}catch(e){if(e instanceof SyntaxError)try{window.sessionStorage.removeItem(Zs)}catch(e){}return null}},write:function(e){var t=e.state,r=e.hits;if(Ks())try{window.sessionStorage.setItem(Zs,JSON.stringify({state:Js(t),hits:r}))}catch(e){}}}}var Xs=Us}}]);