diff --git a/algolia-search/dist/islands/algolia-search.island.js b/algolia-search/dist/islands/algolia-search.island.js index 866ca0b..4f6003d 100644 --- a/algolia-search/dist/islands/algolia-search.island.js +++ b/algolia-search/dist/islands/algolia-search.island.js @@ -1,5 +1,5 @@ /*! For license information please see algolia-search.island.js.LICENSE.txt */ -!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,(()=>(()=>{var e={733: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,s,c,u;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:s=Array.prototype.slice.call(arguments,1),o.apply(this,s)}else if(n(o))for(s=Array.prototype.slice.call(arguments,1),a=(u=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,s;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(s=a;s-- >0;)if(i[s]===t||i[s].listener&&i[s].listener===t){o=s;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)}},103:(e,t,r)=>{"use strict";var n=r(571),i=r(127),o=r(371),a=r(691);function s(e,t,r,i){return new n(e,t,r,i)}s.version=r(938),s.AlgoliaSearchHelper=n,s.SearchParameters=o,s.RecommendParameters=i,s.SearchResults=a,e.exports=s},732:(e,t,r)=>{"use strict";var n=r(733);function i(e,t,r){this.main=e,this.fn=t,this.recommendFn=r,this.lastResults=null,this.lastRecommendResults=null}r(14)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},i.prototype.getModifiedRecommendState=function(e){return this.recommendFn(e)},e.exports=i},127:e=>{"use strict";function t(e){e=e||{},this.params=e.params||[]}t.prototype={constructor:t,addParams:function(e){var r=this.params.slice(),n=this.params.findIndex((function(t){return t.$$id===e.$$id}));return-1!==n?r.splice(n,1,e):r.push(e),new t({params:r})},removeParams:function(e){return new t({params:this.params.filter((function(t){return t.$$id!==e}))})},addFrequentlyBoughtTogether:function(e){return this.addParams(Object.assign({},e,{model:"bought-together"}))},addRelatedProducts:function(e){return this.addParams(Object.assign({},e,{model:"related-products"}))},addTrendingItems:function(e){return this.addParams(Object.assign({},e,{model:"trending-items"}))},addTrendingFacets:function(e){return this.addParams(Object.assign({},e,{model:"trending-facets"}))},addLookingSimilar:function(e){return this.addParams(Object.assign({},e,{model:"looking-similar"}))},_buildQueries:function(e){return this.params.map((function(t){var r=Object.assign({},t,{indexName:e});return delete r.$$id,r}))}},e.exports=t},54:(e,t,r)=>{"use strict";var n=r(110),i=r(317),o=r(383),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],s={};return s[t]=o,n({},s,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 i(e)?{}:e;if("string"==typeof t)return o(e,[t]);if("function"==typeof t){var n=!1,a=Object.keys(e).reduce((function(i,o){var a=e[o]||[],s=a.filter((function(e){return!t(e,o,r)}));return s.length!==a.length&&(n=!0),i[o]=s,i}),{});return n?a:e}},isRefined:function(e,t,r){var n=Boolean(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},371:(e,t,r)=>{"use strict";var n=r(110),i=r(849),o=r(843),a=r(728),s=r(317),c=r(383),u=r(507),l=r(208),f=r(54);function h(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return h(t[r],e)})):e===t}function d(e){var t=e?d._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!==d.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])}))}d.PARAMETERS=Object.keys(new d),d._parseNumbers=function(e){if(e instanceof d)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 a(e,t)},d.make=function(e){var t=new d(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},d.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},d.prototype={constructor:d,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 n=u(r);if(this.isNumericRefined(e,t,n))return this;var i=a({},this.numericRefinements);return i[e]=a({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(n)):i[e][t]=[n],this.setQueryParameters({numericRefinements:i})},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){var n=r;return void 0!==n?this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,i){return i===e&&r.op===t&&h(r.val,u(n))}))}):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]||[],s=[];n.forEach((function(t){e({val:t,op:r},i,"numeric")||s.push(t)})),s.length!==n.length&&(t=!0),a[r]=s})),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)),i={};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)?i[e]=[]:i[e]=[t.slice(0,t.lastIndexOf(r))]:i[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},i,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:n({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:n({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&f.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var 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 Boolean(this.numericRefinements[e]);var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var o,a,s=u(r),c=void 0!==(o=this.numericRefinements[e][t],a=s,i(o,(function(e){return h(e,a)})));return n&&c},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()).sort()},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}))).sort()},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=d.validate(this,e);if(t)throw t;var r=this,n=d._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 i(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=d},673:(e,t,r)=>{"use strict";e.exports=function(e){return function(t,r){var n=e.hierarchicalFacets[r],u=e.hierarchicalFacetsRefinements[n.name]&&e.hierarchicalFacetsRefinements[n.name][0]||"",l=e._getHierarchicalFacetSeparator(n),f=e._getHierarchicalRootPath(n),h=e._getHierarchicalShowParentLevel(n),d=o(e._getHierarchicalFacetSortBy(n)),p=t.every((function(e){return e.exhaustive})),m=function(e,t,r,n,o){return function(u,l,f){var h=u;if(f>0){var d=0;for(h=u;d{"use strict";var n=r(965),i=r(110),o=r(909),a=r(849),s=r(917),c=r(577),u=r(728),l=r(601),f=o.escapeFacetValue,h=o.unescapeFacetValue,d=r(673);function p(e){var t={};return e.forEach((function(e,r){t[e]=r})),t}function m(e,t,r){t&&t[r]&&(e.stats=t[r])}function g(e,t,r){var o=t[0];this._rawResults=t;var c=this;Object.keys(o).forEach((function(e){c[e]=o[e]}));var l=u({persistHierarchicalRootCount:!1},r);Object.keys(l).forEach((function(e){c[e]=l[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 f=e.getRefinedDisjunctiveFacets(),g=p(e.facets),v=p(e.disjunctiveFacets),y=1,b=o.facets||{};Object.keys(b).forEach((function(t){var r,n,i=b[t],u=(r=e.hierarchicalFacets,n=t,a(r,(function(e){return(e.attributes||[]).indexOf(n)>-1})));if(u){var l=u.attributes.indexOf(t),f=s(e.hierarchicalFacets,(function(e){return e.name===u.name}));c.hierarchicalFacets[f][l]={attribute:t,data:i,exhaustive:o.exhaustiveFacetsCount}}else{var h,d=-1!==e.disjunctiveFacets.indexOf(t),p=-1!==e.facets.indexOf(t);d&&(h=v[t],c.disjunctiveFacets[h]={name:t,data:i,exhaustive:o.exhaustiveFacetsCount},m(c.disjunctiveFacets[h],o.facets_stats,t)),p&&(h=g[t],c.facets[h]={name:t,data:i,exhaustive:o.exhaustiveFacetsCount},m(c.facets[h],o.facets_stats,t))}})),this.hierarchicalFacets=n(this.hierarchicalFacets),f.forEach((function(r){var n=t[y],a=n&&n.facets?n.facets:{},l=e.getHierarchicalFacetByName(r);Object.keys(a).forEach((function(t){var r,f=a[t];if(l){r=s(e.hierarchicalFacets,(function(e){return e.name===l.name}));var d=s(c.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===d)return;c.hierarchicalFacets[r][d].data=u({},c.hierarchicalFacets[r][d].data,f)}else{r=v[t];var p=o.facets&&o.facets[t]||{};c.disjunctiveFacets[r]={name:t,data:i({},f,p),exhaustive:n.exhaustiveFacetsCount},m(c.disjunctiveFacets[r],n.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!c.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(h(n))>-1&&(c.disjunctiveFacets[r].data[n]=0)}))}})),y++})),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(y).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var u=r[t],l=s(e.hierarchicalFacets,(function(e){return e.name===n.name})),f=s(c.hierarchicalFacets[l],(function(e){return e.attribute===t}));if(-1!==f){var h={};if(a.length>0&&!c.persistHierarchicalRootCount){var d=a[0].split(o)[0];h[d]=c.hierarchicalFacets[l][f].data[d]}c.hierarchicalFacets[l][f].data=i(h,u,c.hierarchicalFacets[l][f].data)}})),y++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],n=g[t];c.facets[n]={name:t,data:b[t],exhaustive:o.exhaustiveFacetsCount},r.forEach((function(e){c.facets[n]=c.facets[n]||{name:t},c.facets[n].data=c.facets[n].data||{},c.facets[n].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(d(e)),this.facets=n(this.facets),this.disjunctiveFacets=n(this.disjunctiveFacets),this._state=e}function v(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=a(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=a(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=a(e.hierarchicalFacets,r);if(!o)return o;var s=e._state.getHierarchicalFacetByName(t),c=e._state._getHierarchicalFacetSeparator(s),u=h(e._state.getHierarchicalRefinement(t)[0]||"");0===u.indexOf(s.rootPath)&&(u=u.replace(s.rootPath+c,""));var l=u.split(c);return l.unshift(t),y(o,l,0),o}}function y(e,t,r){e.isRefined=e.name===(t[r]&&t[r].trim()),e.data&&e.data.forEach((function(e){y(e,t,r+1)}))}function b(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 b(e,t,r,n+1)})),a=e(o,r[n]);return i({data:a},t)}function _(e,t){var r=a(e,(function(e){return e.name===t}));return r&&r.stats}function S(e,t,r,n,i){var o=a(i,(function(e){return e.name===r})),s=o&&o.data&&o.data[n]?o.data[n]:0,c=o&&o.exhaustive||!1;return{type:t,attributeName:r,name:n,count:s,exhaustive:c}}g.prototype.getFacetByName=function(e){function t(t){return t.name===e}return a(this.facets,t)||a(this.disjunctiveFacets,t)||a(this.hierarchicalFacets,t)},g.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],g.prototype.getFacetValues=function(e,t){var r=v(this,e);if(r){var n,o=i({},t,{sortBy:g.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),a=this;if(Array.isArray(r))n=[e];else n=a._state.getHierarchicalFacetByName(r.name).attributes;return b((function(e,t){if(o.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(a,t);if(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 o,a=t.sortRemainingBy;return"hidden"===a?r:(o="alpha"===a?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(l(n,o[0],o[1])))}(e,r)}if(Array.isArray(o.sortBy)){var n=c(o.sortBy,g.DEFAULT_SORT);return l(e,n[0],n[1])}if("function"==typeof o.sortBy)return function(e,t){return t.sort(e)}(o.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,n)}},g.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?_(this.facets,e):this._state.isDisjunctiveFacet(e)?_(this.disjunctiveFacets,e):void 0},g.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(i){r.push(S(e,"facet",n,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(i){r.push(S(e,"exclude",n,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(i){r.push(S(e,"disjunctive",n,i,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),s=r.split(o),c=a(n,(function(e){return e.name===t})),u=s.reduce((function(e,t){var r=e&&a(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),c),l=u&&u.count||0,f=u&&u.exhaustive||!1,h=u&&u.path||"";return{type:"hierarchical",attributeName:t,name:h,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=g},571:(e,t,r)=>{"use strict";var n=r(733),i=r(732),o=r(909).escapeFacetValue,a=r(14),s=r(728),c=r(317),u=r(383),l=r(127),f=r(228),h=r(371),d=r(691),p=r(938);function m(e,t,r,n){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+p+")"),this.setClient(e);var i=r||{};i.index=t,this.state=h.make(i),this.recommendState=new l({params:i.recommendState}),this.lastResults=null,this.lastRecommendResults=null,this._queryId=0,this._recommendQueryId=0,this._lastQueryIdReceived=-1,this._lastRecommendQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0,this._currentNbRecommendQueries=0,this._searchResultsOptions=n}function g(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function v(){return this.state.page}a(m,n),m.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},m.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},m.prototype.recommend=function(){return this._recommend(),this},m.prototype.getQuery=function(){var e=this.state;return f._getHitsSearchParams(e)},m.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=f._getQueries(r.index,r),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(n).then((function(e){return i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),{content:new d(r,e.results),state:r,_originalResponse:e}}),(function(e){throw i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(null,new d(r,e.results),r)})).catch((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(e,null,r)}))},m.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=s({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:u(f._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 a=this.client.initIndex(n.index);if("function"!=typeof a.findAnswers)throw new Error(o);return a.findAnswers(n.query,e.queryLanguages,i)},m.prototype.searchForFacetValues=function(e,t,r,n){var i="function"==typeof this.client.searchForFacetValues,a="function"==typeof this.client.initIndex;if(!i&&!a&&"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 s=this.state.setQueryParameters(n||{}),c=s.isDisjunctiveFacet(e),u=f.getSearchForFacetQuery(e,t,r,s);this._currentNbQueries++;var l,h=this;return i?l=this.client.searchForFacetValues([{indexName:s.index,params:u}]):a?l=this.client.initIndex(s.index).searchForFacetValues(u):(delete u.facetName,l=this.client.search([{type:"facet",facet:e,indexName:s.index,params:u}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:s,facet:e,query:t}),l.then((function(t){return h._currentNbQueries--,0===h._currentNbQueries&&h.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=o(t.value),t.isRefined=c?s.isDisjunctiveFacetRefined(e,t.escapedValue):s.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw h._currentNbQueries--,0===h._currentNbQueries&&h.emit("searchQueueEmpty"),e}))},m.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},m.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},m.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},m.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},m.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},m.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},m.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},m.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},m.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},m.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},m.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},m.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},m.prototype.addFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.addFrequentlyBoughtTogether(e)}),this},m.prototype.addRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.addRelatedProducts(e)}),this},m.prototype.addTrendingItems=function(e){return this._recommendChange({state:this.recommendState.addTrendingItems(e)}),this},m.prototype.addTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.addTrendingFacets(e)}),this},m.prototype.addLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.addLookingSimilar(e)}),this},m.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},m.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},m.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},m.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},m.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},m.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},m.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},m.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},m.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},m.prototype.removeFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},m.prototype.removeRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},m.prototype.removeTrendingItems=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},m.prototype.removeTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},m.prototype.removeLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},m.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},m.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},m.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},m.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},m.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},m.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},m.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},m.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},m.prototype.setCurrentPage=g,m.prototype.setPage=g,m.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},m.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},m.prototype.setState=function(e){return this._change({state:h.make(e),isPageReset:!1}),this},m.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new h(e),this},m.prototype.hasRefinements=function(e){return!!c(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))},m.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},m.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},m.prototype.hasTag=function(e){return this.state.isTagRefined(e)},m.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},m.prototype.getIndex=function(){return this.state.index},m.prototype.getCurrentPage=v,m.prototype.getPage=v,m.prototype.getTags=function(){return this.state.tagRefinements},m.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var 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},m.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},m.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},m.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=f._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=n.index?f._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),a=this._queryId++;if(this._currentNbQueries++,!o.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,a));try{this.client.search(o).then(this._dispatchAlgoliaResponse.bind(this,r,a)).catch(this._dispatchAlgoliaError.bind(this,a))}catch(e){this.emit("error",{error:e})}},m.prototype._recommend=function(){var e=this.state,t=this.recommendState,r=this.getIndex(),n=[{state:t,index:r,helper:this}];this.emit("fetch",{recommend:{state:t,results:this.lastRecommendResults}});var i=this.derivedHelpers.map((function(t){var r=t.getModifiedState(e).index;if(!r)return[];var i=t.getModifiedRecommendState(new l);return n.push({state:i,index:r,helper:t}),t.emit("fetch",{recommend:{state:i,results:t.lastRecommendResults}}),i._buildQueries(r)})),o=Array.prototype.concat.apply(this.recommendState._buildQueries(r),i);if(0!==o.length)if(o.length>0&&void 0===this.client.getRecommendations)console.warn("Please update algoliasearch/lite to the latest version in order to use recommendations widgets.");else{var a=this._recommendQueryId++;this._currentNbRecommendQueries++;try{this.client.getRecommendations(o).then(this._dispatchRecommendResponse.bind(this,a,n)).catch(this._dispatchRecommendError.bind(this,a))}catch(e){this.emit("error",{error:e})}}},m.prototype._dispatchAlgoliaResponse=function(e,t,r){var n=this;if(!(t0},m.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}))},m.prototype._recommendChange=function(e){var t=e.state;t!==this.recommendState&&(this.recommendState=t,this.emit("recommend:change",{search:{results:this.lastResults,state:this.state},recommend:{results:this.lastRecommendResults,state:this.recommendState}}))},m.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},m.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+p+")"),this.client=e),this},m.prototype.getClient=function(){return this.client},m.prototype.derive=function(e,t){var r=new i(this,e,t);return this.derivedHelpers.push(r),r},m.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)},m.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=m},965:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},110: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}),{})}},909: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(/^\\-/,"-")}}},849: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(849);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)}),[[],[]])}},14:e=>{"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},843:e=>{"use strict";e.exports=function(e,t){return e.filter((function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n}))}},728: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(s=o)&&null!==s?r(Array.isArray(s)?[]:{},s):s)}var s;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}},383: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}},601: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}))}},507: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.")}},228:(e,t,r)=>{"use strict";var n=r(728);function i(e){return Object.keys(e).sort().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),s=t._getHierarchicalFacetSeparator(i);if(a.length>0&&a[0].split(s).length>1){var c=a[0].split(s).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(s)})}),[]);c.forEach((function(n,a){var s=o._getDisjunctiveFacetSearchParams(t,n.attribute,0===a);function u(e){return i.attributes.some((function(t){return t===e.split(":")[0]}))}var l=(s.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var r=t.filter((function(e){return!u(e)}));r.length>0&&e.push(r)}return"string"!=typeof t||u(t)||e.push(t),e}),[]),f=c[a-1];s.facetFilters=a>0?l.concat(f.attribute+":"+f.value):l.length>0?l:void 0,r.push({indexName:e,params:s})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(o._getHitsHierarchicalFacetsAttributes(e)).sort(),r=o._getFacetFilters(e),a=o._getNumericFilters(e),s=o._getTagFilters(e),c={facets:t.indexOf("*")>-1?["*"]:t,tagFilters:s};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),s=o._getNumericFilters(e,t),c=o._getTagFilters(e),u={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};c.length>0&&(u.tagFilters=c);var l=e.getHierarchicalFacetByName(t);return u.facets=l?o._getDisjunctiveHierarchicalFacetAttribute(e,l,r):t,s.length>0&&(u.numericFilters=s),a.length>0&&(u.facetFilters=a),i(n({},e.getQueryParams(),u))},_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).sort().forEach((function(e){(i[e]||[]).slice().sort().forEach((function(t){n.push(e+":"+t)}))}));var o=e.facetsExcludes||{};Object.keys(o).sort().forEach((function(e){(o[e]||[]).sort().forEach((function(t){n.push(e+":-"+t)}))}));var a=e.disjunctiveFacetsRefinements||{};Object.keys(a).sort().forEach((function(e){var r=a[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.slice().sort().forEach((function(t){i.push(e+":"+t)})),n.push(i)}}));var s=e.hierarchicalFacetsRefinements||{};return Object.keys(s).sort().forEach((function(i){var o=(s[i]||[])[0];if(void 0!==o){var a,c,u=e.getHierarchicalFacetByName(i),l=e._getHierarchicalFacetSeparator(u),f=e._getHierarchicalRootPath(u);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=u.attributes[c]}else c=o.split(l).length-1,a=u.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 s=a.isDisjunctiveFacet(e)?a.clearRefinements(e):a,c={facetQuery:t,facetName:e};return"number"==typeof r&&(c.maxFacetHits=r),i(n({},o._getHitsSearchParams(s),c))}};e.exports=o},208:e=>{"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},938:e=>{"use strict";e.exports="3.18.0"},643:function(e){e.exports=function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(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 r(r){for(var n=1;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}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function o(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){s();var t=JSON.stringify(e);return o()[t]})).then((function(e){return Promise.all([e?e.value:t(),void 0!==e])})).then((function(e){var t=i(e,2),n=t[0],o=t[1];return Promise.all([n,o||r.miss(n)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=o();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},n().setItem(r,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=o();delete t[JSON.stringify(e)],n().setItem(r,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function s(e){var t=o(e.caches),r=t.shift();return void 0===r?{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,r.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(e,n,i).catch((function(){return s({caches:t}).get(e,n,i)}))},set:function(e,n){return r.set(e,n).catch((function(){return s({caches:t}).set(e,n)}))},delete:function(e){return r.delete(e).catch((function(){return s({caches:t}).delete(e)}))},clear:function(){return r.clear().catch((function(){return s({caches:t}).clear()}))}}}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},o=JSON.stringify(r);if(o in t)return Promise.resolve(e.serializable?JSON.parse(t[o]):t[o]);var a=n(),s=i&&i.miss||function(){return Promise.resolve()};return a.then((function(e){return s(e)})).then((function(){return a}))},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function u(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function l(e,t){return t?(Object.keys(t).forEach((function(r){e[r]=t[r](e)})),e):e}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var p={Read:1,Write:2,Any:3},m=1,g=2,v=3;function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m;return r(r({},e),{},{status:t,lastUpdate:Date.now()})}function b(e){return"string"==typeof e?{protocol:"https",url:e,accept:p.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||p.Any}}var _="GET",S="POST";function w(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(y(t))}))}))).then((function(e){var r=e.filter((function(e){return function(e){return e.status===m||Date.now()-e.lastUpdate>12e4}(e)})),n=e.filter((function(e){return function(e){return e.status===v&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(o(r),o(n));return{getTimeout:function(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return b(e)})):t}}))}function O(e,t,n,i){var a=[],s=function(e,t){if(e.method!==_&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:r(r({},e.data),t.data);return JSON.stringify(n)}}(n,i),c=function(e,t){var n=r(r({},e.headers),t.headers),i={};return Object.keys(n).forEach((function(e){var t=n[e];i[e.toLowerCase()]=t})),i}(e,i),u=n.method,l=n.method!==_?{}:r(r({},n.data),i.data),f=r(r(r({"x-algolia-agent":e.userAgent.value},e.queryParameters),l),i.queryParameters),h=0,d=function t(r,o){var l=r.pop();if(void 0===l)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:x(a)};var d={data:s,headers:c,method:u,url:P(l,n.path,f),connectTimeout:o(h,e.timeouts.connect),responseTimeout:o(h,i.timeout)},p=function(e){var t={request:d,response:e,host:l,triesLeft:r.length};return a.push(t),t},m={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(n){var i=p(n);return n.isTimedOut&&h++,Promise.all([e.logger.info("Retryable failure",E(i)),e.hostsCache.set(l,y(l,n.isTimedOut?v:g))]).then((function(){return t(r,o)}))},onFail:function(e){throw p(e),function(e,t){var r=e.content,n=e.status,i=r;try{i=JSON.parse(r).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(i,n,t)}(e,x(a))}};return e.requester.send(d).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,r=e.status;return!t&&0==~~r}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSuccess(e):t.onFail(e)}(e,m)}))};return w(e.hostsCache,t).then((function(e){return d(o(e.statelessHosts).reverse(),e.getTimeout)}))}function j(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var r="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(r)&&(t.value="".concat(t.value).concat(r)),t}};return t}function P(e,t,r){var n=R(r),i="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(i+="?".concat(n)),i}function R(e){return Object.keys(e).map((function(t){return f("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function x(e){return e.map((function(e){return E(e)}))}function E(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r(r({},e),{},{request:r(r({},e.request),{},{headers:r(r({},e.request.headers),t)})})}var F=function(e){var t=e.appId,n=function(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===h.WithinHeaders?n:{}},queryParameters:function(){return e===h.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:h.WithinHeaders,t,e.apiKey),o=function(e){var t=e.hostsCache,r=e.logger,n=e.requester,o=e.requestsCache,a=e.responsesCache,s=e.timeouts,c=e.userAgent,u=e.hosts,l=e.queryParameters,f={hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:a,timeouts:s,userAgent:c,headers:e.headers,queryParameters:l,hosts:u.map((function(e){return b(e)})),read:function(e,t){var r=d(t,f.timeouts.read),n=function(){return O(f,f.hosts.filter((function(e){return 0!=(e.accept&p.Read)})),e,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();var o={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(o,(function(){return f.requestsCache.get(o,(function(){return f.requestsCache.set(o,n()).then((function(e){return Promise.all([f.requestsCache.delete(o),e])}),(function(e){return Promise.all([f.requestsCache.delete(o),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return f.responsesCache.set(o,e)}})},write:function(e,t){return O(f,f.hosts.filter((function(e){return 0!=(e.accept&p.Write)})),e,d(t,f.timeouts.write))}};return f}(r(r({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:p.Read},{url:"".concat(t,".algolia.net"),accept:p.Write}].concat(u([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:r(r(r({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:r(r({},n.queryParameters()),e.queryParameters)}));return l({transporter:o,appId:t,addAlgoliaAgent:function(e,t){o.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([o.requestsCache.clear(),o.responsesCache.clear()]).then((function(){}))}},e.methods)},A=function(e){return function(t,r){return t.method===_?e.transporter.read(t,r):e.transporter.write(t,r)}},T=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l({transporter:e.transporter,appId:e.appId,indexName:t},r.methods)}},N=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{params:R(e.params||{})})}));return e.transporter.read({method:S,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},n)}},I=function(e){return function(t,i){return Promise.all(t.map((function(t){var o=t.params,a=o.facetName,s=o.facetQuery,c=n(o,["facetName","facetQuery"]);return T(e)(t.indexName,{methods:{searchForFacetValues:D}}).searchForFacetValues(a,s,r(r({},i),c))})))}},C=function(e){return function(t,r,n){return e.transporter.read({method:S,path:f("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},k=function(e){return function(t,r){return e.transporter.read({method:S,path:f("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},D=function(e){return function(t,r,n){return e.transporter.read({method:S,path:f("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},H=1,L=2,U=3;function $(e,t,n){var i,o={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return r.setRequestHeader(t,e.headers[t])}));var n,i=function(e,n){return setTimeout((function(){r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e)},o=i(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(o),n=i(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(o),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(o),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(i=U,{debug:function(e,t){return H>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return L>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:c(),requestsCache:c({serializable:!1}),hostsCache:s({caches:[a({key:"".concat("4.22.1","-").concat(e)}),c()]}),userAgent:j("4.22.1").add({segment:"Browser",version:"lite"}),authMode:h.WithinQueryParameters};return F(r(r(r({},o),n),{},{methods:{search:N,searchForFacetValues:I,multipleQueries:N,multipleSearchForFacetValues:I,customRequest:A,initIndex:function(e){return function(t){return T(e)(t,{methods:{search:k,searchForFacetValues:D,findAnswers:C}})}}}}))}return $.version="4.22.1",$}()},83:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC1738",i="RFC3986";e.exports={default:i,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:n,RFC3986:i}},87:(e,t,r)=>{"use strict";var n=r(670),i=r(192),o=r(83);e.exports={formats:o,parse:i,stringify:n}},192:(e,t,r)=>{"use strict";var n=r(442),i=Object.prototype.hasOwnProperty,o=Array.isArray,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},c=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},u=function(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(o),u=s?o.slice(0,s.index):o,l=[];if(u){if(!r.plainObjects&&i.call(Object.prototype,u)&&!r.allowPrototypes)return;l.push(u)}for(var f=0;r.depth>0&&null!==(s=a.exec(o))&&f=0;--o){var a,s=e[o];if("[]"===s&&r.parseArrays)a=[].concat(i);else{a=r.plainObjects?Object.create(null):{};var u="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(u,10);r.parseArrays||""!==u?!isNaN(l)&&s!==u&&String(l)===u&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(a=[])[l]=i:"__proto__"!==u&&(a[u]=i):a={0:i}}i=a}return i}(l,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var l="string"==typeof e?function(e,t){var r,u={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,h=l.split(t.delimiter,f),d=-1,p=t.charset;if(t.charsetSentinel)for(r=0;r-1&&(g=o(g)?[g]:g),i.call(u,m)?u[m]=n.combine(u[m],g):u[m]=g}return u}(e,r):e,f=r.plainObjects?Object.create(null):{},h=Object.keys(l),d=0;d{"use strict";var n=r(442),i=r(83),o=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,c=String.prototype.split,u=Array.prototype.push,l=function(e,t){u.apply(e,s(t)?t:[t])},f=Date.prototype.toISOString,h=i.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,format:h,formatter:i.formatters[h],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},p=function e(t,r,i,o,a,u,f,h,p,m,g,v,y,b){var _,S=t;if("function"==typeof f?S=f(r,S):S instanceof Date?S=m(S):"comma"===i&&s(S)&&(S=n.maybeMap(S,(function(e){return e instanceof Date?m(e):e}))),null===S){if(o)return u&&!y?u(r,d.encoder,b,"key",g):r;S=""}if("string"==typeof(_=S)||"number"==typeof _||"boolean"==typeof _||"symbol"==typeof _||"bigint"==typeof _||n.isBuffer(S)){if(u){var w=y?r:u(r,d.encoder,b,"key",g);if("comma"===i&&y){for(var O=c.call(String(S),","),j="",P=0;P0?S.join(",")||null:void 0}];else if(s(f))R=f;else{var E=Object.keys(S);R=h?E.sort(h):E}for(var F=0;F0?y+v:""}},442:(e,t,r)=>{"use strict";var n=r(83),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n1;){var t=e.pop(),r=t.obj[t.prop];if(o(r)){for(var n=[],i=0;i=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||o===n.RFC1738&&(40===l||41===l)?c+=s.charAt(u):l<128?c+=a[l]:l<2048?c+=a[192|l>>6]+a[128|63&l]:l<55296||l>=57344?c+=a[224|l>>12]+a[128|l>>6&63]+a[128|63&l]:(u+=1,l=65536+((1023&l)<<10|1023&s.charCodeAt(u)),c+=a[240|l>>18]+a[128|l>>12&63]+a[128|l>>6&63]+a[128|63&l])}return c},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var r=[],n=0;n{"use strict";r.r(t),r.d(t,{Children:()=>B,Component:()=>s.uA,Fragment:()=>s.FK,PureComponent:()=>$,StrictMode:()=>Ne,Suspense:()=>K,SuspenseList:()=>ee,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>we,cloneElement:()=>xe,createContext:()=>s.q6,createElement:()=>s.n,createFactory:()=>je,createPortal:()=>ie,createRef:()=>s._3,default:()=>$e,findDOMNode:()=>Fe,flushSync:()=>Te,forwardRef:()=>q,hydrate:()=>he,isElement:()=>He,isFragment:()=>Re,isValidElement:()=>Pe,lazy:()=>Z,memo:()=>Q,render:()=>fe,startTransition:()=>Ie,unmountComponentAtNode:()=>Ee,unstable_batchedUpdates:()=>Ae,useCallback:()=>R,useContext:()=>x,useDebugValue:()=>E,useDeferredValue:()=>Ce,useEffect:()=>S,useErrorBoundary:()=>F,useId:()=>A,useImperativeHandle:()=>j,useInsertionEffect:()=>De,useLayoutEffect:()=>w,useMemo:()=>P,useReducer:()=>_,useRef:()=>O,useState:()=>b,useSyncExternalStore:()=>Le,useTransition:()=>ke,version:()=>Oe});var n,i,o,a,s=r(172),c=0,u=[],l=[],f=s.fF,h=f.__b,d=f.__r,p=f.diffed,m=f.__c,g=f.unmount,v=f.__;function y(e,t){f.__h&&f.__h(i,e,c||t),c=0;var r=i.__H||(i.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:l}),r.__[e]}function b(e){return c=1,_(H,e)}function _(e,t,r){var o=y(n++,2);if(o.t=e,!o.__c&&(o.__=[r?r(t):H(void 0,t),function(e){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,e);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=i,!i.u)){var a=function(e,t,r){if(!o.__c.__H)return!0;var n=o.__c.__H.__.filter((function(e){return!!e.__c}));if(n.every((function(e){return!e.__N})))return!s||s.call(this,e,t,r);var i=!1;return n.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}})),!(!i&&o.__c.props===e)&&(!s||s.call(this,e,t,r))};i.u=!0;var s=i.shouldComponentUpdate,c=i.componentWillUpdate;i.componentWillUpdate=function(e,t,r){if(this.__e){var n=s;s=void 0,a(e,t,r),s=n}c&&c.call(this,e,t,r)},i.shouldComponentUpdate=a}return o.__N||o.__}function S(e,t){var r=y(n++,3);!f.__s&&D(r.__H,t)&&(r.__=e,r.i=t,i.__H.__h.push(r))}function w(e,t){var r=y(n++,4);!f.__s&&D(r.__H,t)&&(r.__=e,r.i=t,i.__h.push(r))}function O(e){return c=5,P((function(){return{current:e}}),[])}function j(e,t,r){c=6,w((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==r?r:r.concat(e))}function P(e,t){var r=y(n++,7);return D(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function R(e,t){return c=8,P((function(){return e}),t)}function x(e){var t=i.context[e.__c],r=y(n++,9);return r.c=e,t?(null==r.__&&(r.__=!0,t.sub(i)),t.props.value):e.__}function E(e,t){f.useDebugValue&&f.useDebugValue(t?t(e):e)}function F(e){var t=y(n++,10),r=b();return t.__=e,i.componentDidCatch||(i.componentDidCatch=function(e,n){t.__&&t.__(e,n),r[1](e)}),[r[0],function(){r[1](void 0)}]}function A(){var e=y(n++,11);if(!e.__){for(var t=i.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function T(){for(var e;e=u.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(C),e.__H.__h.forEach(k),e.__H.__h=[]}catch(t){e.__H.__h=[],f.__e(t,e.__v)}}f.__b=function(e){i=null,h&&h(e)},f.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),v&&v(e,t)},f.__r=function(e){d&&d(e),n=0;var t=(i=e.__c).__H;t&&(o===i?(t.__h=[],i.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=l,e.__N=e.i=void 0}))):(t.__h.forEach(C),t.__h.forEach(k),t.__h=[],n=0)),o=i},f.diffed=function(e){p&&p(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==u.push(t)&&a===f.requestAnimationFrame||((a=f.requestAnimationFrame)||I)(T)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==l&&(e.__=e.__V),e.i=void 0,e.__V=l}))),o=i=null},f.__c=function(e,t){t.some((function(e){try{e.__h.forEach(C),e.__h=e.__h.filter((function(e){return!e.__||k(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],f.__e(r,e.__v)}})),m&&m(e,t)},f.unmount=function(e){g&&g(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{C(e)}catch(e){t=e}})),r.__H=void 0,t&&f.__e(t,r.__v))};var N="function"==typeof requestAnimationFrame;function I(e){var t,r=function(){clearTimeout(n),N&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);N&&(t=requestAnimationFrame(r))}function C(e){var t=i,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),i=t}function k(e){var t=i;e.__c=e.__(),i=t}function D(e,t){return!e||e.length!==t.length||t.some((function(t,r){return t!==e[r]}))}function H(e,t){return"function"==typeof t?t(e):t}function L(e,t){for(var r in t)e[r]=t[r];return e}function U(e,t){for(var r in e)if("__source"!==r&&!(r in t))return!0;for(var n in t)if("__source"!==n&&e[n]!==t[n])return!0;return!1}function $(e,t){this.props=e,this.context=t}function Q(e,t){function r(e){var r=this.props.ref,n=r==e.ref;return!n&&r&&(r.call?r(null):r.current=null),t?!t(this.props,e)||!n:U(this.props,e)}function n(t){return this.shouldComponentUpdate=r,(0,s.n)(e,t)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}($.prototype=new s.uA).isPureReactComponent=!0,$.prototype.shouldComponentUpdate=function(e,t){return U(this.props,e)||U(this.state,t)};var W=s.fF.__b;s.fF.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),W&&W(e)};var M="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function q(e){function t(t){var r=L({},t);return delete r.ref,e(r,t.ref||null)}return t.$$typeof=M,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var V=function(e,t){return null==e?null:(0,s.v2)((0,s.v2)(e).map(t))},B={map:V,forEach:V,count:function(e){return e?(0,s.v2)(e).length:0},only:function(e){var t=(0,s.v2)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:s.v2},z=s.fF.__e;s.fF.__e=function(e,t,r,n){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t);z(e,t,r,n)};var G=s.fF.unmount;function J(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=L({},e)).__c&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return J(e,t,r)}))),e}function X(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return X(e,t,r)})),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function K(){this.__u=0,this.t=null,this.__b=null}function Y(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Z(e){var t,r,n;function i(i){if(t||(t=e()).then((function(e){r=e.default||e}),(function(e){n=e})),n)throw n;if(!r)throw t;return(0,s.n)(r,i)}return i.displayName="Lazy",i.__f=!0,i}function ee(){this.u=null,this.o=null}s.fF.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),G&&G(e)},(K.prototype=new s.uA).__c=function(e,t){var r=t.__c,n=this;null==n.t&&(n.t=[]),n.t.push(r);var i=Y(n.__v),o=!1,a=function(){o||(o=!0,r.__R=null,i?i(s):s())};r.__R=a;var s=function(){if(! --n.__u){if(n.state.__a){var e=n.state.__a;n.__v.__k[0]=X(e,e.__c.__P,e.__c.__O)}var t;for(n.setState({__a:n.__b=null});t=n.t.pop();)t.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},K.prototype.componentWillUnmount=function(){this.t=[]},K.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=J(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&(0,s.n)(s.FK,null,e.fallback);return i&&(i.__u&=-33),[(0,s.n)(s.FK,null,t.__a?null:e.children),i]};var te=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]>>1,1),t.i.removeChild(e)}}),(0,s.XX)((0,s.n)(re,{context:t.context},e.__v),t.l)}function ie(e,t){var r=(0,s.n)(ne,{__v:e,i:t});return r.containerInfo=t,r}(ee.prototype=new s.uA).__a=function(e){var t=this,r=Y(t.__v),n=t.o.get(e);return n[0]++,function(i){var o=function(){t.props.revealOrder?(n.push(i),te(t,e,n)):i()};r?r(o):o()}},ee.prototype.render=function(e){this.u=null,this.o=new Map;var t=(0,s.v2)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},ee.prototype.componentDidUpdate=ee.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,r){te(e,r,t)}))};var oe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ae=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,se=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ce=/[A-Z0-9]/g,ue="undefined"!=typeof document,le=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function fe(e,t,r){return null==t.__k&&(t.textContent=""),(0,s.XX)(e,t),"function"==typeof r&&r(),e?e.__c:null}function he(e,t,r){return(0,s.Qv)(e,t),"function"==typeof r&&r(),e?e.__c:null}s.uA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(s.uA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var de=s.fF.event;function pe(){}function me(){return this.cancelBubble}function ge(){return this.defaultPrevented}s.fF.event=function(e){return de&&(e=de(e)),e.persist=pe,e.isPropagationStopped=me,e.isDefaultPrevented=ge,e.nativeEvent=e};var ve,ye={enumerable:!1,configurable:!0,get:function(){return this.class}},be=s.fF.vnode;s.fF.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,r=e.type,n={};for(var i in t){var o=t[i];if(!("value"===i&&"defaultValue"in t&&null==o||ue&&"children"===i&&"noscript"===r||"class"===i||"className"===i)){var a=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===o?o="":"translate"===a&&"no"===o?o=!1:"ondoubleclick"===a?i="ondblclick":"onchange"!==a||"input"!==r&&"textarea"!==r||le(t.type)?"onfocus"===a?i="onfocusin":"onblur"===a?i="onfocusout":se.test(i)?i=a:-1===r.indexOf("-")&&ae.test(i)?i=i.replace(ce,"-$&").toLowerCase():null===o&&(o=void 0):a=i="oninput","oninput"===a&&n[i=a]&&(i="oninputCapture"),n[i]=o}}"select"==r&&n.multiple&&Array.isArray(n.value)&&(n.value=(0,s.v2)(t.children).forEach((function(e){e.props.selected=-1!=n.value.indexOf(e.props.value)}))),"select"==r&&null!=n.defaultValue&&(n.value=(0,s.v2)(t.children).forEach((function(e){e.props.selected=n.multiple?-1!=n.defaultValue.indexOf(e.props.value):n.defaultValue==e.props.value}))),t.class&&!t.className?(n.class=t.class,Object.defineProperty(n,"className",ye)):(t.className&&!t.class||t.class&&t.className)&&(n.class=n.className=t.className),e.props=n}(e),e.$$typeof=oe,be&&be(e)};var _e=s.fF.__r;s.fF.__r=function(e){_e&&_e(e),ve=e.__c};var Se=s.fF.diffed;s.fF.diffed=function(e){Se&&Se(e);var t=e.props,r=e.__e;null!=r&&"textarea"===e.type&&"value"in t&&t.value!==r.value&&(r.value=null==t.value?"":t.value),ve=null};var we={ReactCurrentDispatcher:{current:{readContext:function(e){return ve.__n[e.__c].props.value}}}},Oe="17.0.2";function je(e){return s.n.bind(null,e)}function Pe(e){return!!e&&e.$$typeof===oe}function Re(e){return Pe(e)&&e.type===s.FK}function xe(e){return Pe(e)?s.Ob.apply(null,arguments):e}function Ee(e){return!!e.__k&&((0,s.XX)(null,e),!0)}function Fe(e){return e&&(e.base||1===e.nodeType&&e)||null}var Ae=function(e,t){return e(t)},Te=function(e,t){return e(t)},Ne=s.FK;function Ie(e){e()}function Ce(e){return e}function ke(){return[!1,Ie]}var De=w,He=Pe;function Le(e,t){var r=t(),n=b({h:{__:r,v:t}}),i=n[0].h,o=n[1];return w((function(){i.__=r,i.v=t,Ue(i)&&o({h:i})}),[e,r,t]),S((function(){return Ue(i)&&o({h:i}),e((function(){Ue(i)&&o({h:i})}))}),[e]),r}function Ue(e){var t,r,n=e.v,i=e.__;try{var o=n();return!((t=i)===(r=o)&&(0!==t||1/t==1/r)||t!=t&&r!=r)}catch(e){return!0}}var $e={useState:b,useId:A,useReducer:_,useEffect:S,useLayoutEffect:w,useInsertionEffect:De,useTransition:ke,useDeferredValue:Ce,useSyncExternalStore:Le,startTransition:Ie,useRef:O,useImperativeHandle:j,useMemo:P,useCallback:R,useContext:x,useDebugValue:E,version:"17.0.2",Children:B,render:fe,hydrate:he,unmountComponentAtNode:Ee,createPortal:ie,createElement:s.n,createContext:s.q6,createFactory:je,cloneElement:xe,createRef:s._3,Fragment:s.FK,isValidElement:Pe,isElement:He,isFragment:Re,findDOMNode:Fe,Component:s.uA,PureComponent:$,memo:Q,forwardRef:q,flushSync:Te,unstable_batchedUpdates:Ae,StrictMode:Ne,Suspense:K,SuspenseList:ee,lazy:Z,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:we}},172:(e,t,r)=>{"use strict";r.d(t,{FK:()=>_,Ob:()=>M,Qv:()=>W,XX:()=>Q,_3:()=>b,fF:()=>i,h:()=>v,n:()=>v,q6:()=>q,uA:()=>S,v2:()=>F});var n,i,o,a,s,c,u,l,f={},h=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,p=Array.isArray;function m(e,t){for(var r in t)e[r]=t[r];return e}function g(e){var t=e.parentNode;t&&t.removeChild(e)}function v(e,t,r){var i,o,a,s={};for(a in t)"key"==a?i=t[a]:"ref"==a?o=t[a]:s[a]=t[a];if(arguments.length>2&&(s.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===s[a]&&(s[a]=e.defaultProps[a]);return y(e,s,i,o,null)}function y(e,t,r,n,a){var s={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==a?++o:a,__i:-1,__u:0};return null==a&&null!=i.vnode&&i.vnode(s),s}function b(){return{current:null}}function _(e){return e.children}function S(e,t){this.props=e,this.context=t}function w(e,t){if(null==t)return e.__?w(e.__,e.__i+1):null;for(var r;tt&&a.sort(u));P.__r=0}function R(e,t,r,n,i,o,a,s,c,u,l){var d,p,m,g,v,y=n&&n.__k||h,b=t.length;for(r.__d=c,x(r,t,y),c=r.__d,d=0;d0?y(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=e,i.__b=e.__b+1,s=A(i,r,a,l),i.__i=s,o=null,-1!==s&&(l--,(o=r[s])&&(o.__u|=131072)),null==o||null===o.__v?(-1==s&&f--,"function"!=typeof i.type&&(i.__u|=65536)):s!==a&&(s===a+1?f++:s>a?l>c-a?f+=s-a:f--:s(null!=c&&0==(131072&c.__u)?1:0))for(;a>=0||s=0){if((c=t[a])&&0==(131072&c.__u)&&i==c.key&&o===c.type)return a;a--}if(s2&&(c.children=arguments.length>3?n.call(arguments,2):r),y(e.type,c,i||e.key,o||e.ref,null)}function q(e,t){var r={__c:t="__cC"+l++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,n;return this.getChildContext||(r=[],(n={})[t]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&r.some((function(e){e.__e=!0,j(e)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return r.Provider.__=r.Consumer.contextType=r}n=h.slice,i={__e:function(e,t,r,n){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},o=0,S.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=m({},this.state),"function"==typeof e&&(e=e(m({},r),this.props)),e&&m(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),j(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),j(this))},S.prototype.render=_,a=[],c="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=function(e,t){return e.__v.__b-t.__v.__b},P.__r=0,l=0},833:e=>{e.exports=function(e,t,r,n){var i=r?r.call(n,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c{"use strict";var n=r(299);var i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,a=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=o({inst:{value:r,getSnapshot:t}}),i=n[0].inst,l=n[1];return s((function(){i.value=r,i.getSnapshot=t,u(i)&&l({inst:i})}),[e,r,t]),a((function(){return u(i)&&l({inst:i}),e((function(){u(i)&&l({inst:i})}))}),[e]),c(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:l},888:(e,t,r)=>{"use strict";e.exports=r(63)}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nc=void 0;var n={};return(()=>{"use strict";r.r(n);var e=r(643),t=r.n(e),i=r(172),o=r(299);function a(){return a=Object.assign||function(e){for(var t=1;te instanceof ShadowRoot,c=e=>{const t=e.getRootNode()instanceof ShadowRoot?e.getRootNode().host:e,{dataset:r}=t,n={};for(var i in r){if(!1===r.hasOwnProperty(i))return;const e=`${(o=i.split(/(props?)/).pop()||"").charAt(0).toLowerCase()}${o.slice(1)}`;e&&(n[e]=r[i])}var o;return n},u=e=>["text/props","application/json"].includes(e.getAttribute("type")||""),l=e=>s(e)?[]:Array.from(e.getElementsByTagName("script")).filter(u),f=e=>Array.from(document.querySelectorAll(e)).filter(u),h=e=>{let t={};return e.forEach((e=>{try{t=a({},t,JSON.parse(e.innerHTML))}catch(e){}})),t},d=(e,t,r={},n)=>{const i=c(t),o=e._executedScript?c(e._executedScript):{},s=h(l(t));return a({},r,i,o,n?h(f(n)):{},s)};function p(e,t){var r=(t=[].concat(t))[t.length-1].nextSibling;function n(t,n){e.insertBefore(t,n||r)}return e.__k={nodeType:1,parentNode:e,firstChild:t[0],childNodes:t,insertBefore:n,appendChild:n,removeChild:function(t){e.removeChild(t)}}}const m=({island:e,widget:t,rootFragment:r,props:n})=>{e.props=n,(0,i.XX)((0,i.h)(t,n),r)};function g(){for(var e=arguments.length,t=new Array(e),r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:20,r=[],n=0;n":">",'"':""","'":"'"},E=/[&<>"']/g,F=RegExp(E.source);var A={"&":"&","<":"<",">":">",""":'"',"'":"'"},T=/&(amp|quot|lt|gt|#39);/g,N=RegExp(T.source);function I(e){return e&&N.test(e)?e.replace(T,(function(e){return A[e]})):e}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 k(e){if(!function(e){return"object"===C(e)&&null!==e}(e)||"[object Object]"!==function(e){return null===e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}(e))return!1;if(null===Object.getPrototypeOf(e))return!0;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function D(e){return D="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},D(e)}function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;t",highlightPostTag:""};function M(e){return function(e){return e&&F.test(e)?e.replace(E,(function(e){return x[e]})):e}(e).replace(new RegExp(Q.highlightPreTag,"g"),W.highlightPreTag).replace(new RegExp(Q.highlightPostTag,"g"),W.highlightPostTag)}function q(e){return k(e)&&"string"!=typeof e.value?Object.keys(e).reduce((function(t,r){return U(U({},t),{},$({},r,q(e[r])))}),{}):Array.isArray(e)?e.map(q):U(U({},e),{},{value:M(e.value)})}function V(e){return void 0===e.__escaped&&((e=e.map((function(e){var t=H({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return t._highlightResult&&(t._highlightResult=q(t._highlightResult)),t._snippetResult&&(t._snippetResult=q(t._snippetResult)),t}))).__escaped=!0),e}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 z(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 G(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:v;return y(e,ie()),function(r){var n,i,o=r||{},a=o.escapeHTML,s=void 0===a||a,c=o.transformItems,u=void 0===c?function(e){return e}:c;return{$$type:"ais.hits",init:function(t){e(re(re({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){var r=this.getWidgetRenderState(t);e(re(re({},r),{},{instantSearchInstance:t.instantSearchInstance}),!1),r.sendEvent("view:internal",r.hits)},getRenderState:function(e,t){return re(re({},e),{},{hits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,o=e.helper,a=e.instantSearchInstance;if(n||(n=function(e){var t=e.instantSearchInstance,r=e.getIndex,n=e.widgetType,i={},o=void 0;return function(){for(var e=arguments.length,a=new Array(e),s=0;s0&&(t.hits=V(t.hits));var c,l,f,h=function(e,t){return t?e.map((function(e){return Y(Y({},e),{},{__queryID:t})})):e}((c=t.hits,l=t.page,f=t.hitsPerPage,c.map((function(e,t){return G(G({},e),{},{__position:f*l+t+1})}))),t.queryID);return{hits:u(h,{results:t}),results:t,sendEvent:n,bindEvent:i,widgetParams:r}},dispose:function(e){var r=e.state;return t(),s?r.setQueryParameters(Object.keys(Q).reduce((function(e,t){return re(re({},e),{},ne({},t,void 0))}),{})):r},getWidgetSearchParameters:function(e){return s?e.setQueryParameters(Q):e}}}};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)}var se=Object.prototype.hasOwnProperty;function ce(e,t,r){if(null!=r&&r(e,t))return!0;var n,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((i=e.length)===t.length)for(;i--&&ce(e[i],t[i],r););return-1===i}if(!n||"object"===ae(e)){for(n in i=0,e){if(se.call(e,n)&&++i&&!se.call(t,n))return!1;if(!(n in t)||!ce(e[n],t[n],r))return!1}return Object.keys(t).length===i}}return e!=e&&t!=t}var ue=r(103);function le(e){var t,r,n;return new ue.SearchResults(e,[{query:null!==(t=e.query)&&void 0!==t?t:"",page:null!==(r=e.page)&&void 0!==r?r:0,hitsPerPage:null!==(n=e.hitsPerPage)&&void 0!==n?n:20,hits:[],nbHits:0,nbPages:0,params:"",exhaustiveNbHits:!0,exhaustiveFacetsCount:!0,processingTimeMS:0,index:e.index}],{__isArtificial:!0})}function fe(e){return fe="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},fe(e)}function he(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 de(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);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}function Ue(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=we(),i=_e(),a=ye(),s=Pe(t),c=Pe(r),u=(0,o.useRef)(!0),l=(0,o.useRef)(null),f=(0,o.useRef)(i.status),h=(0,o.useMemo)((function(){var t=e((function(e,t){if(t)u.current=!0;else if(u.current){var r=e.instantSearchInstance,n=(e.widgetParams,Le(e,Te));ce(n,l.current,(function(e,t){return(null==e?void 0:e.constructor)===Function&&(null==t?void 0:t.constructor)===Function}))&&r.status===f.current||(m(n),l.current=n,f.current=r.status)}}),(function(){u.current=!1}));return De(De({},t(s)),c)}),[e,s,c]),d=Ie((0,o.useState)((function(){if(h.getWidgetRenderState){var e,t=a.getHelper(),r=a.getWidgetUiState({})[a.getIndexId()];t.state=(null===(e=h.getWidgetSearchParameters)||void 0===e?void 0:e.call(h,t.state,{uiState:r}))||t.state;var n=me(a),o=n.results,s=n.scopedResults,c=h.getWidgetRenderState({helper:t,parent:a,instantSearchInstance:i,results:o,scopedResults:s,state:t.state,renderState:i.renderState,templatesConfig:i.templatesConfig,createURL:a.createURL,searchMetadata:{isSearchStalled:"stalled"===i.status},status:i.status,error:i.error});c.widgetParams;return Le(c,Ne)}return{}})),2),p=d[0],m=d[1];return function(e){var t,r=e.widget,n=e.parentIndex,i=e.props,a=e.shouldSsr,s=Fe(),c=(0,o.useRef)(i);(0,o.useEffect)((function(){c.current=i}),[i]);var u=(0,o.useRef)(r);(0,o.useEffect)((function(){u.current=r}),[r]);var l,f=(0,o.useRef)(null),h=a&&!n.getWidgets().includes(r),d=_e();xe((function(){var e=u.current;return f.current?(clearTimeout(f.current),ce(i,c.current)||(n.removeWidgets([e]),n.addWidgets([r]))):a||n.addWidgets([r]),function(){f.current=setTimeout((function(){d._schedule((function(){d._preventWidgetCleanup||n.removeWidgets([e])}))}))}}),[n,r,a,d,i]),(h||"pending"===(null==s||null===(t=s.current)||void 0===t?void 0:t.status))&&n.addWidgets([r]),"undefined"==typeof window&&null!=s&&s.current&&"ais.index"!==r.$$type&&(Re(s.current),"ais.dynamicWidgets"!==r.$$type&&null!==(l=d.helper)&&void 0!==l&&l.lastResults&&Re(s.current))}({widget:h,parentIndex:a,props:s,shouldSsr:Boolean(n)}),p}var $e=r(733);function Qe(e){return Qe="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},Qe(e)}var We="_ALGOLIA";function Me(){return function(e){if("object"===("undefined"==typeof document?"undefined":Qe(document))&&"string"==typeof document.cookie)for(var t="".concat(e,"="),r=document.cookie.split(";"),n=0;n1&&void 0!==arguments[1]?arguments[1]:{fallback:function(){}}).fallback;return"undefined"==typeof window?t():e({window})}function Ve(e){return Ve="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},Ve(e)}function Be(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 ze(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{},t=e.insightsClient,r=e.insightsInitParams,n=e.onEvent,i=e.$$internal,o=void 0!==i&&i,a=e.$$automatic,s=void 0!==a&&a,c=t;t||null===t||qe((function(e){var t=e.window,r=t.AlgoliaAnalyticsObject||"aa";"string"==typeof r&&(c=t[r]),c||(t.AlgoliaAnalyticsObject=r,t[r]||(t[r]=function(){t[r].queue||(t[r].queue=[]);for(var e=arguments.length,n=new Array(e),i=0;i1&&void 0!==arguments[1]&&arguments[1],n=nt(e);if(n){var i=c.state.userToken;r?o():setTimeout(o,0)}function o(){c.overrideStateWithoutTriggeringChangeEvent(ze(ze({},c.state),{},{userToken:n})),i&&i!==e&&t.scheduleSearch()}},r=Me();function i(t,r,n){e(t,!0),r&&u("setUserToken",r),n&&u("setAuthenticatedUserToken",n)}r&&e(r,!0);var l=y||g,f=m||p;l?i(l,g,y):f&&i(f,p,m),u("onUserTokenChange",e,{immediate:!0}),u("onAuthenticatedUserTokenChange",(function(t){t||u("getUserToken",null,(function(t,r){e(r)})),e(t)}),{immediate:!0});var v=u;rt(u)&&(v=function(e,t){return u(e,t,{headers:{"X-Algolia-Application-Id":h,"X-Algolia-API-Key":d}})}),t.sendEventToInsights=function(e){n?n(e,v):e.insightsMethod&&(e.payload.algoliaSource=["instantsearch"],s&&e.payload.algoliaSource.push("instantsearch-automatic"),"internal"===e.eventModifier&&e.payload.algoliaSource.push("instantsearch-internal"),v(e.insightsMethod,e.payload))}},unsubscribe:function(){u("onUserTokenChange",void 0),u("onAuthenticatedUserTokenChange",void 0),t.sendEventToInsights=v,c&&a&&(c.overrideStateWithoutTriggeringChangeEvent(ze(ze({},c.state),a)),t.scheduleSearch())}}}}function rt(e){var t=Je((e.version||"").split(".").map(Number),2),r=t[0],n=t[1];return r>=3||2===r&&n>=6||1===r&&n>=10}function nt(e){if(e)return"number"==typeof e?e.toString():e}function it(e,t,r){var n=t.getHelper();return{uiState:r,helper:n,parent:t,instantSearchInstance:e,state:n.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,scopedResults:[],searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function ot(e,t){var r=t.getResults(),n=t.getHelper();return{helper:n,parent:t,instantSearchInstance:e,results:r,scopedResults:t.getScopedResults(),state:r?r._state:n.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function at(e,t,r){var n=it(t,t.mainIndex,t._initialUiState);e.forEach((function(e){var i={};if(e.getWidgetRenderState){var o=e.getWidgetRenderState(n);o&&o.widgetParams&&(i=o.widgetParams)}var a=Object.keys(i).filter((function(e){return void 0!==i[e]}));r.widgets.push({type:e.$$type,widgetType:e.$$widgetType,params:a}),"ais.index"===e.$$type&&at(e.getWidgets(),t,r)}))}function st(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).$$internal,t=void 0!==e&&e;return function(e){var r=e.instantSearchInstance,n={widgets:[]},i=document.createElement("meta"),o=document.querySelector("head");return i.name="instantsearch:widgets",{$$type:"ais.metadata",$$internal:t,onStateChange:function(){},subscribe:function(){setTimeout((function(){var e=r.client;n.ua=e.transporter&&e.transporter.userAgent?e.transporter.userAgent.value:e._ua,at(r.mainIndex.getWidgets(),r,n),r.middleware.forEach((function(e){return n.widgets.push({middleware:!0,type:e.instance.$$type,internal:e.instance.$$internal})})),i.content=JSON.stringify(n),o.appendChild(i)}),0)},started:function(){},unsubscribe:function(){i.remove()}}}}var ct=r(87);function ut(e){return ut="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},ut(e)}function lt(e,t){for(var r=0;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}function St(e){e.configure;return _t(e,gt)}function wt(e){return e!==Object(e)}function Ot(e,t){if(e===t)return!0;if(wt(e)||wt(t)||"function"==typeof e||"function"==typeof t)return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var r=0,n=Object.keys(e);r0&&void 0!==arguments[0]?arguments[0]:{},t=e.router,r=void 0===t?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.createURL,r=void 0===t?function(e){var t=e.qsModule,r=e.routeState,n=e.location,i=n.protocol,o=n.hostname,a=n.port,s=void 0===a?"":a,c=n.pathname,u=n.hash,l=t.stringify(r),f=""===s?"":":".concat(s);return l?"".concat(i,"//").concat(o).concat(f).concat(c,"?").concat(l).concat(u):"".concat(i,"//").concat(o).concat(f).concat(c).concat(u)}:t,n=e.parseURL,i=void 0===n?function(e){var t=e.qsModule,r=e.location;return t.parse(r.search.slice(1),{arrayLimit:99})}:n,o=e.writeDelay,a=void 0===o?400:o,s=e.windowTitle,c=e.getLocation,u=void 0===c?function(){return qe((function(e){return e.window.location}),{fallback:function(){throw new Error("You need to provide `getLocation` to the `history` router in environments where `window` does not exist.")}})}:c,l=e.start,f=e.dispose,h=e.push,d=e.cleanUrlOnDispose;return new pt({createURL:r,parseURL:i,writeDelay:a,windowTitle:s,getLocation:u,start:l,dispose:f,push:h,cleanUrlOnDispose:d})}():t,n=e.stateMapping,i=void 0===n?{$$type:"ais.simple",stateToRoute:function(e){return Object.keys(e).reduce((function(t,r){return yt(yt({},t),{},bt({},r,St(e[r])))}),{})},routeToState:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,r){return yt(yt({},t),{},bt({},r,St(e[r])))}),{})}}:n,o=e.$$internal,a=void 0!==o&&o;return function(e){var t=e.instantSearchInstance;t._createURL=function(e){var n=0===t.mainIndex.getWidgets().length?t._initialUiState:t.mainIndex.getWidgetUiState({}),o=Object.keys(e).reduce((function(t,r){return Rt(Rt({},t),{},xt({},r,e[r]))}),n),a=i.stateToRoute(o);return r.createURL(a)};var n=void 0,o=t._initialUiState;return{$$type:"ais.router({router:".concat(r.$$type||"__unknown__",", stateMapping:").concat(i.$$type||"__unknown__","})"),$$internal:a,onStateChange:function(e){var t=e.uiState,o=i.stateToRoute(t);void 0!==n&&Ot(n,o)||(r.write(o),n=o)},subscribe:function(){t._initialUiState=Rt(Rt({},o),i.routeToState(r.read())),r.onUpdate((function(e){t.mainIndex.getWidgets().length>0&&t.setUiState(i.routeToState(e))}))},started:function(){var e;null===(e=r.start)||void 0===e||e.call(r)},unsubscribe:function(){r.dispose()}}}};function Ft(e){return"ais.index"===e.$$type}function At(e){return At="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},At(e)}var Tt=["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"];function Nt(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 It(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}var Dt=function(e,t){return e.setQueryParameters({hierarchicalFacets:t.hierarchicalFacets.reduce((function(e,t){var r=function(e,t){if(!Array.isArray(e))return-1;for(var r=0;r0?e.setQueryParameters({ruleContexts:r}):e}(c,t),l=function(e,t){return t.facets.reduce((function(e,t){return e.addFacet(t)}),e)}(u,t);return function(e,t){t.facets,t.disjunctiveFacets,t.facetsRefinements,t.facetsExcludes,t.disjunctiveFacetsRefinements,t.numericRefinements,t.tagRefinements,t.hierarchicalFacets,t.hierarchicalFacetsRefinements,t.ruleContexts;var r=kt(t,Tt);return e.setQueryParameters(r)}(l,t)}))};function Lt(e){return Lt="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},Lt(e)}var Ut=["initialSearchParameters"],$t=["initialRecommendParameters"];function Qt(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 Wt(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}var zt=g({name:"index-widget"});function Gt(e,t){var r=t.state,n=t.recommendState,i=t.isPageReset,o=t._uiState;r!==e.state&&(e.state=r,e.emit("change",{state:e.state,results:e.lastResults,isPageReset:i,_uiState:o})),n!==e.recommendState&&(e.recommendState=n)}function Jt(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.reduce((function(e,r){return Ft(r)?e:r.getWidgetUiState||r.getWidgetState?r.getWidgetUiState?r.getWidgetUiState(e,t):r.getWidgetState(e,t):e}),r)}function Xt(e,t){var r=t.initialSearchParameters,n=Bt(t,Ut);return e.reduce((function(e,t){return!t.getWidgetSearchParameters||Ft(t)?e:"search"===t.dependsOn&&t.getWidgetParameters?t.getWidgetParameters(e,n):t.getWidgetSearchParameters(e,n)}),r)}function Kt(e,t){var r=t.initialRecommendParameters,n=Bt(t,$t);return e.reduce((function(e,t){return!Ft(t)&&"recommend"===t.dependsOn&&t.getWidgetParameters?t.getWidgetParameters(e,n):e}),r)}function Yt(e){var t=e.filter(Ft);0!==t.length&&t.forEach((function(e){var t=e.getHelper();Gt(t,{state:t.state.resetPage(),recommendState:t.recommendState,isPageReset:!0}),Yt(e.getWidgets())}))}function Zt(e){return e.filter(Ft).reduce((function(e,t){return e.concat.apply(e,[{indexId:t.getIndexId(),results:t.getResults(),helper:t.getHelper()}].concat(qt(Zt(t.getWidgets()))))}),[])}const er=function(e){if(void 0===e||void 0===e.indexName)throw new Error(zt("The `indexName` option is required."));var t=e.indexName,r=e.indexId,n=void 0===r?t:r,i=[],o={},a=null,s=null,c=null,u=null,l=null;return{$$type:"ais.index",$$widgetType:"ais.index",getIndexName:function(){return t},getIndexId:function(){return n},getHelper:function(){return c},getResults:function(){var e;return null!==(e=u)&&void 0!==e&&e.lastResults?(u.lastResults._state=c.state,u.lastResults):null},getPreviousState:function(){return l},getScopedResults:function(){var e=this.getParent();return Zt(e?e.getWidgets():[this])},getParent:function(){return s},createURL:function(e){return"function"==typeof e?a._createURL(Mt({},n,e(o))):a._createURL(Mt({},n,Jt(i,{searchParameters:e,helper:c})))},getWidgets:function(){return i},addWidgets:function(e){var t=this;if(!Array.isArray(e))throw new Error(zt("The `addWidgets` method expects an array of widgets."));if(e.some((function(e){return"function"!=typeof e.init&&"function"!=typeof e.render})))throw new Error(zt("The widget definition expects a `render` and/or an `init` method."));return i=i.concat(e),a&&Boolean(e.length)&&(Gt(c,{state:Xt(i,{uiState:o,initialSearchParameters:c.state}),recommendState:Kt(i,{uiState:o,initialRecommendParameters:c.recommendState}),_uiState:o}),e.forEach((function(e){e.getRenderState&&tr({renderState:e.getRenderState(a.renderState[t.getIndexId()]||{},it(a,t,a._initialUiState)),instantSearchInstance:a,parent:t})})),e.forEach((function(e){e.init&&e.init(it(a,t,a._initialUiState))})),a.scheduleSearch()),this},removeWidgets:function(e){var t=this;if(!Array.isArray(e))throw new Error(zt("The `removeWidgets` method expects an array of widgets."));if(e.some((function(e){return"function"!=typeof e.dispose})))throw new Error(zt("The widget definition expects a `dispose` method."));if(i=i.filter((function(t){return-1===e.indexOf(t)})),a&&Boolean(e.length)){var r=e.reduce((function(e,r){return r.dispose({helper:c,state:e,parent:t})||e}),c.state),n=a.future.preserveSharedStateOnUnmount?Xt(i,{uiState:o,initialSearchParameters:new ue.SearchParameters({index:this.getIndexName()})}):Xt(i,{uiState:Jt(i,{searchParameters:r,helper:c}),initialSearchParameters:r});o=Jt(i,{searchParameters:n,helper:c}),c.setState(n),i.length&&a.scheduleSearch()}return this},init:function(e){var r,f=this,h=e.instantSearchInstance,d=e.parent,p=e.uiState;if(null===c){a=h,s=d,o=p[n]||{};var m=h.mainHelper,g=Xt(i,{uiState:o,initialSearchParameters:new ue.SearchParameters({index:t})}),v=Kt(i,{uiState:o,initialRecommendParameters:new ue.RecommendParameters});(c=ue({},g.index,g)).recommendState=v,c.search=function(){return h.onStateChange?(h.onStateChange({uiState:h.mainIndex.getWidgetUiState({}),setUiState:function(e){return h.setUiState(e,!1)}}),m):m.search()},c.searchWithoutTriggeringOnStateChange=function(){return m.search()},c.searchForFacetValues=function(e,t,r,n){var i=c.state.setQueryParameters(n);return m.searchForFacetValues(e,t,r,i)},u=m.derive((function(){return Ht.apply(void 0,[m.state].concat(qt(function(e){for(var t=e.getParent(),r=[e.getHelper().state];null!==t;)r=[t.getHelper().state].concat(r),t=t.getParent();return r}(f))))}),(function(){return f.getHelper().recommendState}));var y=null===(r=h._initialResults)||void 0===r?void 0:r[this.getIndexId()];if(y){var b=new ue.SearchResults(new ue.SearchParameters(y.state),y.results);u.lastResults=b,c.lastResults=b}c.on("change",(function(e){e.isPageReset&&Yt(i)})),u.on("search",(function(){h.scheduleStalledRender()})),u.on("result",(function(e){var t=e.results;h.scheduleRender(),c.lastResults=t,l=null==t?void 0:t._state})),u.on("recommend:result",(function(e){var t=e.recommend;h.scheduleRender(),c.lastRecommendResults=t.results})),i.forEach((function(e){e.getRenderState&&tr({renderState:e.getRenderState(h.renderState[f.getIndexId()]||{},it(h,f,p)),instantSearchInstance:h,parent:f})})),i.forEach((function(e){e.init&&e.init(it(h,f,p))})),c.on("change",(function(e){var t=e.state,r=e._uiState;o=Jt(i,{searchParameters:t,helper:c},r||{}),h.onStateChange||h.onInternalStateChange()})),y&&h.scheduleRender()}},render:function(e){var t=this,r=e.instantSearchInstance;"error"===r.status&&!r.mainHelper.hasPendingRequests()&&l&&c.setState(l);var n=this.getResults()?i:i.filter(Ft);(n=n.filter((function(e){return!e.shouldRender||e.shouldRender({instantSearchInstance:r})}))).forEach((function(e){e.getRenderState&&tr({renderState:e.getRenderState(r.renderState[t.getIndexId()]||{},ot(r,t)),instantSearchInstance:r,parent:t})})),n.forEach((function(e){e.render&&e.render(ot(r,t))}))},dispose:function(){var e,t,r=this;i.forEach((function(e){e.dispose&&e.dispose({helper:c,state:c.state,parent:r})})),a=null,s=null,null===(e=c)||void 0===e||e.removeAllListeners(),c=null,null===(t=u)||void 0===t||t.detach(),u=null},getWidgetUiState:function(e){return i.filter(Ft).reduce((function(e,t){return t.getWidgetUiState(e)}),Wt(Wt({},e),{},Mt({},n,Wt(Wt({},e[n]),o))))},getWidgetState:function(e){return this.getWidgetUiState(e)},getWidgetSearchParameters:function(e,t){var r=t.uiState;return Xt(i,{uiState:r,initialSearchParameters:e})},refreshUiState:function(){o=Jt(i,{searchParameters:this.getHelper().state,helper:this.getHelper()},o)},setIndexUiState:function(e){var t="function"==typeof e?e(o):e;a.setUiState((function(e){return Wt(Wt({},e),{},Mt({},n,t))}))}}};function tr(e){var t=e.renderState,r=e.instantSearchInstance,n=e.parent,i=n?n.getIndexId():r.mainIndex.getIndexId();r.renderState=Wt(Wt({},r.renderState),{},Mt({},i,Wt(Wt({},r.renderState[i]),t)))}var rr=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.descendantName,n=t.modifierName,i=r?"-".concat(r):"",o=n?"--".concat(n):"";return"".concat("ais","-").concat(e).concat(i).concat(o)}};function nr(e,t){return(Array.isArray(t)?t:t.split(".")).reduce((function(e,t){return e&&e[t]}),e)}var ir=rr("Highlight");function or(e){var t=W.highlightPreTag,r=W.highlightPostTag;return e.map((function(e){return e.isHighlighted?t+e.value+r:e.value})).join("")}var ar=new RegExp(/\w/i);function sr(e,t){var r,n,i=e[t],o=(null===(r=e[t+1])||void 0===r?void 0:r.isHighlighted)||!0,a=(null===(n=e[t-1])||void 0===n?void 0:n.isHighlighted)||!0;return ar.test(I(i.value))||a!==o?i.isHighlighted:a}function cr(e){return cr="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},cr(e)}function ur(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 lr(e){for(var t=1;t')).replace(new RegExp(W.highlightPostTag,"g"),""))}(Sr(Sr({},JSON.parse(e)),{},{hit:this})))}catch(e){throw new Error('\nThe highlight helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}},reverseHighlight:function(e,t){try{return t(function(e){var t=e.attribute,r=e.highlightedTagName,n=void 0===r?"mark":r,i=e.hit,o=e.cssClasses,a=void 0===o?{}:o,s=(nr(i._highlightResult,t)||{}).value,c=void 0===s?"":s,u=pr({descendantName:"highlighted"})+(a.highlighted?" ".concat(a.highlighted):"");return or(hr(dr(c))).replace(new RegExp(W.highlightPreTag,"g"),"<".concat(n,' class="').concat(u,'">')).replace(new RegExp(W.highlightPostTag,"g"),""))}(Sr(Sr({},JSON.parse(e)),{},{hit:this})))}catch(e){throw new Error('\n The reverseHighlight helper expects a JSON object of the format:\n { "attribute": "name", "highlightedTagName": "mark" }')}},snippet:function(e,t){try{return t(function(e){var t=e.attribute,r=e.highlightedTagName,n=void 0===r?"mark":r,i=e.hit,o=e.cssClasses,a=void 0===o?{}:o,s=(nr(i._snippetResult,t)||{}).value,c=void 0===s?"":s,u=mr({descendantName:"highlighted"})+(a.highlighted?" ".concat(a.highlighted):"");return c.replace(new RegExp(W.highlightPreTag,"g"),"<".concat(n,' class="').concat(u,'">')).replace(new RegExp(W.highlightPostTag,"g"),""))}(Sr(Sr({},JSON.parse(e)),{},{hit:this})))}catch(e){throw new Error('\nThe snippet helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}},reverseSnippet:function(e,t){try{return t(function(e){var t=e.attribute,r=e.highlightedTagName,n=void 0===r?"mark":r,i=e.hit,o=e.cssClasses,a=void 0===o?{}:o,s=(nr(i._snippetResult,t)||{}).value,c=void 0===s?"":s,u=gr({descendantName:"highlighted"})+(a.highlighted?" ".concat(a.highlighted):"");return or(hr(dr(c))).replace(new RegExp(W.highlightPreTag,"g"),"<".concat(n,' class="').concat(u,'">')).replace(new RegExp(W.highlightPostTag,"g"),""))}(Sr(Sr({},JSON.parse(e)),{},{hit:this})))}catch(e){throw new Error('\n The reverseSnippet helper expects a JSON object of the format:\n { "attribute": "name", "highlightedTagName": "mark" }')}},insights:function(e,t){try{var r=JSON.parse(e),n=r.method,i=r.payload;return t(yr(n,Sr({objectIDs:[this.objectID]},i)))}catch(e){throw new Error('\nThe insights helper expects a JSON object of the format:\n{ "method": "method-name", "payload": { "eventName": "name of the event" } }')}}}}var jr=Promise.resolve();function Pr(e){var t=null,r=!1,n=function(){for(var n=arguments.length,i=new Array(n),o=0;oe.length)&&(t=e.length);for(var r=0,n=new Array(t);r1?t-1:0),n=1;n0&&void 0!==arguments[0])||arguments[0];null!==(e=t.mainHelper)&&void 0!==e&&e.hasPendingRequests()||(clearTimeout(t._searchStalledTimer),t._searchStalledTimer=null,r&&(t.status="idle",t.error=void 0)),t.mainIndex.render({instantSearchInstance:$r(t)}),t.emit("render")}))),Wr($r(t),"onInternalStateChange",Pr((function(){var e=t.mainIndex.getWidgetUiState({});t.middleware.forEach((function(t){t.instance.onStateChange({uiState:e})}))}))),t.setMaxListeners(100);var r=e.indexName,n=void 0===r?"":r,a=e.numberLocale,s=e.initialUiState,c=void 0===s?{}:s,u=e.routing,l=void 0===u?null:u,f=e.insights,h=void 0===f?void 0:f,d=e.searchFunction,p=e.stalledSearchDelay,m=void 0===p?200:p,g=e.searchClient,y=void 0===g?null:g,b=e.insightsClient,_=void 0===b?null:b,S=e.onStateChange,w=void 0===S?null:S,O=e.future,j=void 0===O?Dr(Dr({},Br),e.future||{}):O;if(null===y)throw new Error(qr("The `searchClient` option is required."));if("function"!=typeof y.search)throw new Error("The `searchClient` must implement a `search` method.\n\nSee: https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/backend-instantsearch/js/");if("function"==typeof y.addAlgoliaAgent&&y.addAlgoliaAgent("instantsearch.js (".concat("4.67.0",")")),_&&"function"!=typeof _)throw new Error(qr("The `insightsClient` option should be a function."));if(t.client=y,t.future=j,t.insightsClient=_,t.indexName=n,t.helper=null,t.mainHelper=null,t.mainIndex=er({indexName:n}),t.onStateChange=w,t.started=!1,t.templatesConfig={helpers:Or({numberLocale:a}),compileOptions:{}},t._stalledSearchDelay=m,t._searchStalledTimer=null,t._createURL=Vr,t._initialUiState=c,t._initialResults=null,t._insights=h,d&&(t._searchFunction=d),t.sendEventToInsights=v,l){var P="boolean"==typeof l?{}:l;P.$$internal=!0,t.use(Et(P))}if(h){var R="boolean"==typeof h?{}:h;R.$$internal=!0,t.use(tt(R))}return qe((function(e){var t,r;return(null===(t=e.window.navigator)||void 0===t||null===(r=t.userAgent)||void 0===r?void 0:r.indexOf("Algolia Crawler"))>-1}),{fallback:function(){return!1}})&&t.use(st({$$internal:!0})),t}return t=o,r=[{key:"_isSearchStalled",get:function(){return"stalled"===this.status}},{key:"use",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n1?r-1:0),o=1;o0&&this.scheduleSearch();this.helper=this.mainIndex.getHelper(),this.started=!0,this.middleware.forEach((function(e){e.instance.started()})),void 0===this._insights&&t.derivedHelpers[0].once("result",(function(){e.mainIndex.getScopedResults().some((function(e){var t=e.results;return null==t?void 0:t._automaticInsights}))&&e.use(tt({$$internal:!0,$$automatic:!0}))}))}},{key:"dispose",value:function(){var e;this.scheduleSearch.cancel(),this.scheduleRender.cancel(),clearTimeout(this._searchStalledTimer),this.removeWidgets(this.mainIndex.getWidgets()),this.mainIndex.dispose(),this.started=!1,this.removeAllListeners(),null===(e=this.mainHelper)||void 0===e||e.removeAllListeners(),this.mainHelper=null,this.helper=null,this.middleware.forEach((function(e){e.instance.unsubscribe()}))}},{key:"scheduleStalledRender",value:function(){var e=this;this._searchStalledTimer||(this._searchStalledTimer=setTimeout((function(){e.status="stalled",e.scheduleRender()}),this._stalledSearchDelay))}},{key:"setUiState",value:function(e){var t=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!this.mainHelper)throw new Error(qr("The `start` method needs to be called before `setUiState`."));this.mainIndex.refreshUiState();var n="function"==typeof e?e(this.mainIndex.getWidgetUiState({})):e;this.onStateChange&&r?this.onStateChange({uiState:n,setUiState:function(e){Ir("function"==typeof e?e(n):e,t.mainIndex),t.scheduleSearch(),t.onInternalStateChange()}}):(Ir(n,this.mainIndex),this.scheduleSearch(),this.onInternalStateChange())}},{key:"getUiState",value:function(){return this.started&&this.mainIndex.refreshUiState(),this.mainIndex.getWidgetUiState({})}},{key:"createURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.started)throw new Error(qr("The `start` method needs to be called before `createURL`."));return this._createURL(e)}},{key:"refresh",value:function(){if(!this.mainHelper)throw new Error(qr("The `start` method needs to be called before `refresh`."));this.mainHelper.clearCache().search()}}],r&&Hr(t.prototype,r),n&&Hr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}($e);const Gr=zr;var Jr=r(888);const Xr="7.7.2";function Kr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],c=!0,u=!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)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Yr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yr(e,t)}(e,t)||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.")}()}function Yr(e,t){(null==t||t>e.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}function hn(e){var t=e.children,r=cn(fn(e,ln));return r.started?o.default.createElement(be.Provider,{value:r},o.default.createElement(ve.Provider,{value:r.mainIndex},t)):null}function dn(e){return dn="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},dn(e)}function pn(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 mn(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:v;return y(e,vn()),function(r){var n,i,o=(r||{}).queryHook,a=void 0===o?yn:o;return{$$type:"ais.searchBox",init:function(t){var r=t.instantSearchInstance;e(mn(mn({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!0)},render:function(t){var r=t.instantSearchInstance;e(mn(mn({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!1)},dispose:function(e){var r=e.state;return t(),r.setQueryParameter("query",void 0)},getRenderState:function(e,t){return mn(mn({},e),{},{searchBox:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.helper,o=e.instantSearchInstance,s=e.state;return n||(n=function(e){a(e,(function(e){return t.setQuery(e).search()}))},i=function(){t.setQuery("").search()}),{query:s.query||"",refine:n,clear:i,widgetParams:r,isSearchStalled:"stalled"===o.status}},getWidgetUiState:function(e,t){var r=t.searchParameters.query||"";return""===r||e&&e.query===r?e:mn(mn({},e),{},{query:r})},getWidgetSearchParameters:function(e,t){var r=t.uiState;return e.setQueryParameter("query",r.query||"")}}}};function _n(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 Sn(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}var In=g({name:"refinement-list",connector:!0}),Cn=["isRefined","count:desc","name:asc"];const kn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v;return y(e,In()),function(r){var n=r||{},i=n.attribute,o=n.operator,a=void 0===o?"or":o,s=n.limit,c=void 0===s?10:s,u=n.showMore,l=void 0!==u&&u,f=n.showMoreLimit,h=void 0===f?20:f,d=n.sortBy,p=void 0===d?Cn:d,m=n.escapeFacetValues,g=void 0===m||m,v=n.transformItems,y=void 0===v?function(e){return e}:v;if(!i)throw new Error(In("The `attribute` option is required."));if(!/^(and|or)$/.test(a))throw new Error(In('The `operator` must one of: `"and"`, `"or"` (got "'.concat(a,'").')));if(!0===l&&h<=c)throw new Error(In("`showMoreLimit` should be greater than `limit`."));var b,_,S,w=function(e){var t=e.name,r=e.escapedValue;return An(An({},Nn(e,xn)),{},{value:r,label:t,highlighted:t})},O=[],j=!0,P=!1,R=function(){};function x(){R()}function E(){return P?h:c}var F=function(){return function(){}},A=function(t,r){return function(n){return function(o){var a=n.instantSearchInstance,s=n.results;if(""===o&&O)e(An(An({},r.getWidgetRenderState(An(An({},n),{},{results:b}))),{},{instantSearchInstance:a}),!1);else{var c={highlightPreTag:g?Q.highlightPreTag:W.highlightPreTag,highlightPostTag:g?Q.highlightPostTag:W.highlightPostTag};t.searchForFacetValues(i,o,Math.min(E(),100),c).then((function(t){var i=g?t.facetHits.map((function(e){return U(U({},e),{},{highlighted:M(e.highlighted)})})):t.facetHits,o=y(i.map((function(e){var t=e.escapedValue,r=e.value;return An(An({},Nn(e,En)),{},{value:t,label:r})})),{results:s});e(An(An({},r.getWidgetRenderState(An(An({},n),{},{results:b}))),{},{items:o,canToggleShowMore:!1,canRefine:!0,isFromSearch:!0,instantSearchInstance:a}),!1)}))}}}};return{$$type:"ais.refinementList",init:function(t){e(An(An({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){e(An(An({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1)},getRenderState:function(e,t){return An(An({},e),{},{refinementList:An(An({},e.refinementList),{},Tn({},i,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=this,n=e.results,o=e.state,a=e.createURL,s=e.instantSearchInstance,u=e.helper,f=[],h=[];if(S&&_&&F||(S=function(e){var t=e.instantSearchInstance,r=e.helper,n=e.attribute,i=e.widgetType;return function(){for(var e=arguments.length,o=new Array(e),a=0;a=2&&o.length<=4&&(function(e,t,r){return e.state.isHierarchicalFacet(t)?e.state.isHierarchicalFacetRefined(t,r):e.state.isConjunctiveFacet(t)?e.state.isFacetRefined(t,r):e.state.isDisjunctiveFacetRefined(t,r)}(r,m,s)||t.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:i,eventType:d,eventModifier:p,payload:Sn({eventName:u,index:r.getIndex(),filters:["".concat(m,":").concat(s)]},f),attribute:m}))}}({instantSearchInstance:s,helper:u,attribute:i,widgetType:this.$$type}),_=function(e){S("click:internal",e),u.toggleFacetRefinement(i,e).search()},F=A(u,this)),n){var d=n.getFacetValues(i,{sortBy:p,facetOrdering:p===Cn});h=d&&Array.isArray(d)?d:[],f=y(h.slice(0,E()).map(w),{results:n});var m=o.maxValuesPerFacet,g=E();j=m>g?h.length<=g:h.lengthc||l&&!j;return{createURL:function(e){return a((function(r){return t.getWidgetUiState(r,{searchParameters:o.resetPage().toggleFacetRefinement(i,e),helper:u})}))},items:f,refine:_,searchForItems:v,isFromSearch:!1,canRefine:f.length>0,widgetParams:r,isShowingMore:P,canToggleShowMore:T,toggleShowMore:x,sendEvent:S,hasExhaustiveItems:j}},dispose:function(e){var r=e.state;t();var n=r.setQueryParameter("maxValuesPerFacet",void 0);return"and"===a?n.removeFacet(i):n.removeDisjunctiveFacet(i)},getWidgetUiState:function(e,t){var r=t.searchParameters,n="or"===a?r.getDisjunctiveRefinements(i):r.getConjunctiveRefinements(i);return function(e,t){if(!e.refinementList)return e;e.refinementList[t]&&0!==e.refinementList[t].length||delete e.refinementList[t];0===Object.keys(e.refinementList).length&&delete e.refinementList;return e}(An(An({},e),{},{refinementList:An(An({},e.refinementList),{},Tn({},i,n))}),i)},getWidgetSearchParameters:function(e,t){var r=t.uiState,n="or"===a;if(e.isHierarchicalFacet(i))return e;if(n&&e.isConjunctiveFacet(i)||!n&&e.isDisjunctiveFacet(i))return e;var o=r.refinementList&&r.refinementList[i],s=n?e.addDisjunctiveFacet(i).removeDisjunctiveFacetRefinement(i):e.addFacet(i).removeFacetRefinement(i),u=s.maxValuesPerFacet||0,f=Math.max(u,l?h:c),d=s.setQueryParameter("maxValuesPerFacet",f);if(!o){var p=n?"disjunctiveFacetsRefinements":"facetsRefinements";return d.setQueryParameters(Tn({},p,An(An({},d[p]),{},Tn({},i,[]))))}return o.reduce((function(e,t){return n?e.addDisjunctiveFacetRefinement(i,t):e.addFacetRefinement(i,t)}),d)}}}};function Dn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],c=!0,u=!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)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Hn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hn(e,t)}(e,t)||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.")}()}function Hn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{}).catchError,t=_e(),r=function(){var e=_e(),t=ye(),r=t.getIndexId(),n=Ln((0,o.useState)((function(){return e.getUiState()})),2),i=n[0],a=n[1],s=i[r],c=Ln((0,o.useState)((function(){return e.renderState})),2),u=c[0],l=c[1],f=u[r]||{},h=(0,o.useCallback)((function(t){e.setUiState(t)}),[e]),d=(0,o.useCallback)((function(e){t.setIndexUiState(e)}),[t]);return(0,o.useEffect)((function(){function t(){a(e.getUiState()),l(e.renderState)}return e.addListener("render",t),function(){e.removeListener("render",t)}}),[e]),{uiState:i,setUiState:h,indexUiState:s,setIndexUiState:d,renderState:u,indexRenderState:f}}(),n=r.uiState,i=r.setUiState,a=r.indexUiState,s=r.setIndexUiState,c=r.renderState,u=r.indexRenderState,l=function(){var e=_e(),t=ye(),r=Dn((0,o.useState)((function(){return me(t)})),2),n=r[0],i=r[1];return(0,o.useEffect)((function(){function r(){var e=t.getResults();null!==e&&i({results:e,scopedResults:t.getScopedResults()})}return e.addListener("render",r),function(){e.removeListener("render",r)}}),[e,t]),n}(),f=l.results,h=l.scopedResults,d=(0,o.useCallback)((function(){for(var e=arguments.length,r=new Array(e),n=0;n{let r="loading"===e?"Loading":null;return"loading"!=e&&t&&(r=`Showing results for "${t}"`),Wn("div",{className:"visually-hidden","aria-live":"polite","aria-atomic":!0,children:r})},qn=e=>{var t;const r=(0,o.useRef)(!1),n=new URLSearchParams(window.location.search);console.log("search Params: "+n);const{query:i,refine:a}=function(e,t){return Ue(bn,e,t)}(e),{items:s,refine:c}=function(e,t){return Ue(kn,e,t)}({attribute:"basic_page_type"}),[u,l]=(0,o.useState)((null===(t=n.get("news-types"))||void 0===t?void 0:t.split(","))||[]),{status:f}=$n(),h=(0,o.useRef)(null);return console.log(u),(0,o.useEffect)((()=>{r.current||(r.current=!0,u.map((e=>c(e))))}),[r,u]),Wn("form",{action:"",role:"search",className:"left-region flex-lg-3-of-12",noValidate:!0,onSubmit:e=>{var t,r,n;e.preventDefault(),e.stopPropagation(),a(null===(t=h.current)||void 0===t?void 0:t.value);[...u.filter((e=>!s.find((t=>t.value===e)).isRefined)),...s.filter((e=>e.isRefined&&!u.includes(e.value))).map((e=>e.value))].map((e=>c(e)));const i=new URLSearchParams(window.location.search);(null===(r=h.current)||void 0===r?void 0:r.value.length)>0?i.set("key",null===(n=h.current)||void 0===n?void 0:n.value):i.delete("key"),u.length>0?i.set("news-types",u.join(",")):i.delete("news-types"),window.history.replaceState(null,"",`?${i.toString()}`)},onReset:e=>{var t;e.preventDefault(),e.stopPropagation(),a(""),h.current.value="",null===(t=h.current)||void 0===t||t.focus(),s.filter((e=>e.isRefined)).map((e=>c(e.value))),l([]);const r=new URLSearchParams(window.location.search);r.delete("key"),r.delete("news-types"),window.history.replaceState(null,"",`?${r.toString()}`)},style:{marginBottom:"20px"},children:[Wn("div",{children:[Wn("label",{htmlFor:"keyword-search-algolia",children:["Keywords",Wn("span",{className:"visually-hidden",children:" Search"})]}),Wn("input",{id:"keyword-search-algolia",ref:h,autoComplete:"on",autoCorrect:"on",autoCapitalize:"off",spellCheck:!0,maxLength:128,type:"search",defaultValue:i,autoFocus:!0})]}),Wn("fieldset",{children:[Wn("legend",{children:"Basic Page Types"}),Wn("ul",{style:{listStyle:"none"},children:s.sort(((e,t)=>e.countWn("li",{children:Wn("label",{style:{"margin-top":"1rem"},children:[Wn("input",{type:"checkbox",checked:u.findIndex((t=>t===e.value))>=0,onChange:t=>{l((r=>{const n=[...r];return t.currentTarget.checked?n.push(e.value):n.splice(r.findIndex((t=>t===e.value)),1),n}))},style:{border:"black",width:"12px",height:"12px",float:"left",clip:"unset",overflow:"unset",position:"relative","clip-path":"unset"}}),e.value," (",e.count,")"]})},t)))})]}),Wn("div",{style:{display:"flex",gap:"1rem",marginTop:"1rem"},children:[Wn("button",{type:"submit",children:"Submit"}),Wn("button",{type:"reset",children:"Reset"})]}),Wn(Mn,{status:f,query:i})]})};var Vn=function(){return Vn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0?fi(wi,--_i):0,yi--,10===Si&&(yi=1,vi--),Si}function xi(){return Si=_i2||Ti(Si)>3?"":" "}function Di(e,t){for(;--t&&xi()&&!(Si<48||Si>102||Si>57&&Si<65||Si>70&&Si<97););return Ai(e,Fi()+(t<6&&32==Ei()&&32==xi()))}function Hi(e){for(;xi();)switch(Si){case e:return _i;case 34:case 39:34!==e&&39!==e&&Hi(Si);break;case 40:41===e&&Hi(e);break;case 92:xi()}return _i}function Li(e,t){for(;xi()&&e+Si!==57&&(e+Si!==84||47!==Ei()););return"/*"+Ai(t,_i-1)+"*"+oi(47===e?e:xi())}function Ui(e){for(;!Ti(Ei());)xi();return Ai(e,_i)}function $i(e,t){for(var r="",n=0;n6)switch(fi(e,t+1)){case 109:if(45!==fi(e,t+4))break;case 102:return ui(e,/(.+:)(.+)-([^]+)/,"$1"+Kn+"$2-$3$1"+Xn+(108==fi(e,t+3)?"$3":"$2-$3"))+e;case 115:return~li(e,"stretch",0)?Wi(ui(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return ui(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,r,n,i,o,a,s){return Jn+r+":"+n+s+(i?Jn+r+"-span:"+(o?a:+a-+n)+s:"")+e}));case 4949:if(121===fi(e,t+6))return ui(e,":",":"+Kn)+e;break;case 6444:switch(fi(e,45===fi(e,14)?18:11)){case 120:return ui(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Kn+(45===fi(e,14)?"inline-":"")+"box$3$1"+Kn+"$2$3$1"+Jn+"$2box$3")+e;case 100:return ui(e,":",":"+Jn)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return ui(e,"scroll-","scroll-snap-")+e}return e}function Mi(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case ei:return void(e.return=Wi(e.value,e.length,r));case ri:return $i([ji(e,{value:ui(e.value,"@","@"+Kn)})],n);case Zn:if(e.length)return function(e,t){return e.map(t).join("")}(r=e.props,(function(t){switch(ci(t,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Pi(ji(e,{props:[ui(t,/:(read-\w+)/,":"+Xn+"$1")]})),Pi(ji(e,{props:[t]})),ai(e,{props:gi(r,n)});break;case"::placeholder":Pi(ji(e,{props:[ui(t,/:(plac\w+)/,":"+Kn+"input-$1")]})),Pi(ji(e,{props:[ui(t,/:(plac\w+)/,":"+Xn+"$1")]})),Pi(ji(e,{props:[ui(t,/:(plac\w+)/,Jn+"input-$1")]})),Pi(ji(e,{props:[t]})),ai(e,{props:gi(r,n)})}return""}))}}function qi(e){return Ii(Vi("",null,null,null,[""],e=Ni(e),0,[0],e))}function Vi(e,t,r,n,i,o,a,s,c){for(var u=0,l=0,f=a,h=0,d=0,p=0,m=1,g=1,v=1,y=0,b="",_=i,S=o,w=n,O=b;g;)switch(p=y,y=xi()){case 40:if(108!=p&&58==fi(O,f-1)){-1!=li(O+=ui(Ci(y),"&","&\f"),"&\f",ii(u?s[u-1]:0))&&(v=-1);break}case 34:case 39:case 91:O+=Ci(y);break;case 9:case 10:case 13:case 32:O+=ki(p);break;case 92:O+=Di(Fi()-1,7);continue;case 47:switch(Ei()){case 42:case 47:mi(zi(Li(xi(),Fi()),t,r,c),c);break;default:O+="/"}break;case 123*m:s[u++]=di(O)*v;case 125*m:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+l:-1==v&&(O=ui(O,/\f/g,"")),d>0&&di(O)-f&&mi(d>32?Gi(O+";",n,r,f-1,c):Gi(ui(O," ","")+";",n,r,f-2,c),c);break;case 59:O+=";";default:if(mi(w=Bi(O,t,r,u,l,i,s,b,_=[],S=[],f,o),o),123===y)if(0===l)Vi(O,t,w,w,_,o,f,s,S);else switch(99===h&&110===fi(O,3)?100:h){case 100:case 108:case 109:case 115:Vi(e,w,w,n&&mi(Bi(e,w,w,0,0,i,s,b,i,_=[],f,S),S),i,S,f,s,n?_:S);break;default:Vi(O,w,w,w,[""],S,0,s,S)}}u=l=d=0,m=v=1,b=O="",f=a;break;case 58:f=1+di(O),d=p;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==Ri())continue;switch(O+=oi(y),y*m){case 38:v=l>0?1:(O+="\f",-1);break;case 44:s[u++]=(di(O)-1)*v,v=1;break;case 64:45===Ei()&&(O+=Ci(xi())),h=Ei(),l=f=di(b=O+=Ui(Fi())),y++;break;case 45:45===p&&2==di(O)&&(m=0)}}return o}function Bi(e,t,r,n,i,o,a,s,c,u,l,f){for(var h=i-1,d=0===i?o:[""],p=pi(d),m=0,g=0,v=0;m0?d[y]+" "+b:ui(b,/&\f/g,d[y])))&&(c[v++]=_);return Oi(e,t,r,0===i?Zn:s,c,u,l,f)}function zi(e,t,r,n){return Oi(e,t,r,Yn,oi(Si),hi(e,2,-2),0,n)}function Gi(e,t,r,n,i){return Oi(e,t,r,ei,hi(e,0,n),hi(e,n+1,-1),n,i)}const Ji={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var Xi="undefined"!=typeof process&&("MISSING_ENV_VAR".REACT_APP_SC_ATTR||"MISSING_ENV_VAR".SC_ATTR)||"data-styled",Ki="active",Yi="data-styled-version",Zi="6.1.8",eo="/*!sc*/\n",to="undefined"!=typeof window&&"HTMLElement"in window,ro=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!=="MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY&&""!=="MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY?"false"!=="MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY&&"MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!=="MISSING_ENV_VAR".SC_DISABLE_SPEEDY&&""!=="MISSING_ENV_VAR".SC_DISABLE_SPEEDY&&("false"!=="MISSING_ENV_VAR".SC_DISABLE_SPEEDY&&"MISSING_ENV_VAR".SC_DISABLE_SPEEDY)),no=(new Set,Object.freeze([])),io=Object.freeze({});function oo(e,t,r){return void 0===r&&(r=io),e.theme!==r.theme&&e.theme||t||r.theme}var ao=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),so=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,co=/(^-|-$)/g;function uo(e){return e.replace(so,"-").replace(co,"")}var lo=/(a)(d)/gi,fo=52,ho=function(e){return String.fromCharCode(e+(e>25?39:97))};function po(e){var t,r="";for(t=Math.abs(e);t>fo;t=t/fo|0)r=ho(t%fo)+r;return(ho(t%fo)+r).replace(lo,"$1-$2")}var mo,go=5381,vo=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},yo=function(e){return vo(go,e)};function bo(e){return po(yo(e)>>>0)}function _o(e){return e.displayName||e.name||"Component"}function So(e){return"string"==typeof e&&!0}var wo="function"==typeof Symbol&&Symbol.for,Oo=wo?Symbol.for("react.memo"):60115,jo=wo?Symbol.for("react.forward_ref"):60112,Po={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Ro={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},xo={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Eo=((mo={})[jo]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},mo[Oo]=xo,mo);function Fo(e){return("type"in(t=e)&&t.type.$$typeof)===Oo?xo:"$$typeof"in e?Eo[e.$$typeof]:Po;var t}var Ao=Object.defineProperty,To=Object.getOwnPropertyNames,No=Object.getOwnPropertySymbols,Io=Object.getOwnPropertyDescriptor,Co=Object.getPrototypeOf,ko=Object.prototype;function Do(e,t,r){if("string"!=typeof t){if(ko){var n=Co(t);n&&n!==ko&&Do(e,n,r)}var i=To(t);No&&(i=i.concat(No(t)));for(var o=Fo(e),a=Fo(t),s=0;s0?" Args: ".concat(t.join(", ")):""))}var Vo=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,r=0;r=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,i=n;e>=i;)if((i<<=1)<0)throw qo(16,"".concat(e));this.groupSizes=new Uint32Array(i),this.groupSizes.set(r),this.length=i;for(var o=n;o=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),i=n+r,o=n;o=0){var r=document.createTextNode(t);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e0&&(c+="".concat(e,","))})),n+="".concat(a).concat(s,'{content:"').concat(c,'"}').concat(eo)},o=0;o0?".".concat(t):e},l=c.slice();l.push((function(e){e.type===Zn&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(ua,r).replace(n,u))})),a.prefix&&l.push(Mi),l.push(Qi);var f=function(e,i,o,s){void 0===i&&(i=""),void 0===o&&(o=""),void 0===s&&(s="&"),t=s,r=i,n=new RegExp("\\".concat(r,"\\b"),"g");var c=e.replace(la,""),u=qi(o||i?"".concat(o," ").concat(i," { ").concat(c," }"):c);a.namespace&&(u=fa(u,a.namespace));var f,h,d,p=[];return $i(u,(f=l.concat((d=function(e){return p.push(e)},function(e){e.root||(e=e.return)&&d(e)})),h=pi(f),function(e,t,r,n){for(var i="",o=0;o="A"&&e<="Z"};function Sa(e){for(var t="",r=0;r>>0);if(!t.hasNameForId(this.componentId,o)){var a=r(i,".".concat(o),void 0,this.componentId);t.insertRules(this.componentId,o,a)}n=Uo(n,o),this.staticRulesId=o}else{for(var s=vo(this.baseHash,r.hash),c="",u=0;u>>0);t.hasNameForId(this.componentId,h)||t.insertRules(this.componentId,h,r(c,".".concat(h),void 0,this.componentId)),n=Uo(n,h)}}return n},e}(),Ea=o.default.createContext(void 0);Ea.Consumer;var Fa={};new Set;function Aa(e,t,r){var n=Lo(e),i=e,a=!So(e),s=t.attrs,c=void 0===s?no:s,u=t.componentId,l=void 0===u?function(e,t){var r="string"!=typeof e?"sc":uo(e);Fa[r]=(Fa[r]||0)+1;var n="".concat(r,"-").concat(bo(Zi+r+Fa[r]));return t?"".concat(t,"-").concat(n):n}(t.displayName,t.parentComponentId):u,f=t.displayName,h=void 0===f?function(e){return So(e)?"styled.".concat(e):"Styled(".concat(_o(e),")")}(e):f,d=t.displayName&&t.componentId?"".concat(uo(t.displayName),"-").concat(t.componentId):t.componentId||l,p=n&&i.attrs?i.attrs.concat(c).filter(Boolean):c,m=t.shouldForwardProp;if(n&&i.shouldForwardProp){var g=i.shouldForwardProp;if(t.shouldForwardProp){var v=t.shouldForwardProp;m=function(e,t){return g(e,t)&&v(e,t)}}else m=g}var y=new xa(r,d,n?i.componentStyle:void 0);function b(e,t){return function(e,t,r){var n=e.attrs,i=e.componentStyle,a=e.defaultProps,s=e.foldedComponentIds,c=e.styledComponentId,u=e.target,l=o.default.useContext(Ea),f=va(),h=e.shouldForwardProp||f.shouldForwardProp,d=oo(t,l,a)||io,p=function(e,t,r){for(var n,i=Vn(Vn({},t),{className:void 0,theme:r}),o=0;o2&&ca.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,n)}}();(function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString(),r=ta(),n=$o([r&&'nonce="'.concat(r,'"'),"".concat(Xi,'="true"'),"".concat(Yi,'="').concat(Zi,'"')].filter(Boolean)," ");return"")},this.getStyleTags=function(){if(e.sealed)throw qo(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw qo(2);var r=((t={})[Xi]="",t[Yi]=Zi,t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),n=ta();return n&&(r.nonce=n),[o.default.createElement("style",Vn({},r,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new ca({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw qo(2);return o.default.createElement(ya,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw qo(3)}})(),"__sc-".concat(Xi,"__");function Ha(){for(var e=arguments.length,t=new Array(e),r=0;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}var $a=["parts","highlightedTagName","nonHighlightedTagName","separator","className","classNames"];var Qa,Wa,Ma,qa,Va=(Qa={createElement:o.createElement,Fragment:o.Fragment},Wa=Qa.createElement,Ma=Qa.Fragment,qa=function(e){var t=e.createElement;return function(e){var r=e.classNames,n=e.children,i=e.highlightedTagName,o=e.isHighlighted,a=e.nonHighlightedTagName;return t(o?i:a,{className:o?r.highlighted:r.nonHighlighted},n)}}({createElement:Wa,Fragment:Ma}),function(e){var t=e.parts,r=e.highlightedTagName,n=void 0===r?"mark":r,i=e.nonHighlightedTagName,o=void 0===i?"span":i,a=e.separator,s=void 0===a?", ":a,c=e.className,u=e.classNames,l=void 0===u?{}:u,f=Ua(e,$a);return Wa("span",La({},f,{className:Ha(l.root,c)}),t.map((function(e,r){var i=r===t.length-1;return Wa(Ma,{key:r},e.map((function(e,t){return Wa(qa,{key:t,classNames:l,highlightedTagName:n,nonHighlightedTagName:o,isHighlighted:e.isHighlighted},e.value)})),!i&&Wa("span",{className:l.separator},s))})))}),Ba=["classNames"];function za(){return za=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 Ja(e){var t=e.classNames,r=void 0===t?{}:t,n=Ga(e,Ba);return o.default.createElement(Va,za({classNames:{root:Ha("ais-Highlight",r.root),highlighted:Ha("ais-Highlight-highlighted",r.highlighted),nonHighlighted:Ha("ais-Highlight-nonHighlighted",r.nonHighlighted),separator:Ha("ais-Highlight-separator",r.separator)}},n))}var Xa=["hit","attribute","highlightedTagName","nonHighlightedTagName","separator"];function Ka(){return Ka=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 Za(e){var t=e.hit,r=e.attribute,n=e.highlightedTagName,i=e.nonHighlightedTagName,a=e.separator,s=Ya(e,Xa),c=nr(t._highlightResult,r)||[],u=(Array.isArray(c)?c:[c]).map((function(e){return dr(I(e.value||""))}));return o.default.createElement(Ja,Ka({},s,{parts:u,highlightedTagName:n,nonHighlightedTagName:i,separator:a}))}var es=["classNames"];function ts(){return ts=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 ns(e){var t=e.classNames,r=void 0===t?{}:t,n=rs(e,es);return o.default.createElement(Va,ts({classNames:{root:Ha("ais-Snippet",r.root),highlighted:Ha("ais-Snippet-highlighted",r.highlighted),nonHighlighted:Ha("ais-Snippet-nonHighlighted",r.nonHighlighted),separator:Ha("ais-Snippet-separator",r.separator)}},n))}var is=["hit","attribute","highlightedTagName","nonHighlightedTagName","separator"];function os(){return os=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 ss(e){var t=e.hit,r=e.attribute,n=e.highlightedTagName,i=e.nonHighlightedTagName,a=e.separator,s=as(e,is),c=nr(t._snippetResult,r)||[],u=(Array.isArray(c)?c:[c]).map((function(e){return dr(I(e.value||""))}));return o.default.createElement(ns,os({},s,{parts:u,highlightedTagName:n,nonHighlightedTagName:i,separator:a}))}const cs=Da.article` +!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(self,(()=>(()=>{var e={733: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,s,c,u;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:s=Array.prototype.slice.call(arguments,1),o.apply(this,s)}else if(n(o))for(s=Array.prototype.slice.call(arguments,1),a=(u=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,s;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(s=a;s-- >0;)if(i[s]===t||i[s].listener&&i[s].listener===t){o=s;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)}},103:(e,t,r)=>{"use strict";var n=r(571),i=r(127),o=r(371),a=r(691);function s(e,t,r,i){return new n(e,t,r,i)}s.version=r(938),s.AlgoliaSearchHelper=n,s.SearchParameters=o,s.RecommendParameters=i,s.SearchResults=a,e.exports=s},732:(e,t,r)=>{"use strict";var n=r(733);function i(e,t,r){this.main=e,this.fn=t,this.recommendFn=r,this.lastResults=null,this.lastRecommendResults=null}r(14)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},i.prototype.getModifiedRecommendState=function(e){return this.recommendFn(e)},e.exports=i},127:e=>{"use strict";function t(e){e=e||{},this.params=e.params||[]}t.prototype={constructor:t,addParams:function(e){var r=this.params.slice(),n=this.params.findIndex((function(t){return t.$$id===e.$$id}));return-1!==n?r.splice(n,1,e):r.push(e),new t({params:r})},removeParams:function(e){return new t({params:this.params.filter((function(t){return t.$$id!==e}))})},addFrequentlyBoughtTogether:function(e){return this.addParams(Object.assign({},e,{model:"bought-together"}))},addRelatedProducts:function(e){return this.addParams(Object.assign({},e,{model:"related-products"}))},addTrendingItems:function(e){return this.addParams(Object.assign({},e,{model:"trending-items"}))},addTrendingFacets:function(e){return this.addParams(Object.assign({},e,{model:"trending-facets"}))},addLookingSimilar:function(e){return this.addParams(Object.assign({},e,{model:"looking-similar"}))},_buildQueries:function(e){return this.params.map((function(t){var r=Object.assign({},t,{indexName:e});return delete r.$$id,r}))}},e.exports=t},54:(e,t,r)=>{"use strict";var n=r(110),i=r(317),o=r(383),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],s={};return s[t]=o,n({},s,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 i(e)?{}:e;if("string"==typeof t)return o(e,[t]);if("function"==typeof t){var n=!1,a=Object.keys(e).reduce((function(i,o){var a=e[o]||[],s=a.filter((function(e){return!t(e,o,r)}));return s.length!==a.length&&(n=!0),i[o]=s,i}),{});return n?a:e}},isRefined:function(e,t,r){var n=Boolean(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},371:(e,t,r)=>{"use strict";var n=r(110),i=r(849),o=r(843),a=r(728),s=r(317),c=r(383),u=r(507),l=r(208),f=r(54);function h(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((function(e,r){return h(t[r],e)})):e===t}function d(e){var t=e?d._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!==d.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])}))}d.PARAMETERS=Object.keys(new d),d._parseNumbers=function(e){if(e instanceof d)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 a(e,t)},d.make=function(e){var t=new d(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},d.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},d.prototype={constructor:d,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 n=u(r);if(this.isNumericRefined(e,t,n))return this;var i=a({},this.numericRefinements);return i[e]=a({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(n)):i[e][t]=[n],this.setQueryParameters({numericRefinements:i})},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){var n=r;return void 0!==n?this.isNumericRefined(e,t,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements((function(r,i){return i===e&&r.op===t&&h(r.val,u(n))}))}):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]||[],s=[];n.forEach((function(t){e({val:t,op:r},i,"numeric")||s.push(t)})),s.length!==n.length&&(t=!0),a[r]=s})),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)),i={};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)?i[e]=[]:i[e]=[t.slice(0,t.lastIndexOf(r))]:i[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n({},i,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:n({},r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:n({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&f.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var 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 Boolean(this.numericRefinements[e]);var n=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!n)return n;var o,a,s=u(r),c=void 0!==(o=this.numericRefinements[e][t],a=s,i(o,(function(e){return h(e,a)})));return n&&c},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()).sort()},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}))).sort()},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=d.validate(this,e);if(t)throw t;var r=this,n=d._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 i(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=d},673:(e,t,r)=>{"use strict";e.exports=function(e){return function(t,r){var n=e.hierarchicalFacets[r],u=e.hierarchicalFacetsRefinements[n.name]&&e.hierarchicalFacetsRefinements[n.name][0]||"",l=e._getHierarchicalFacetSeparator(n),f=e._getHierarchicalRootPath(n),h=e._getHierarchicalShowParentLevel(n),d=o(e._getHierarchicalFacetSortBy(n)),p=t.every((function(e){return e.exhaustive})),m=function(e,t,r,n,o){return function(u,l,f){var h=u;if(f>0){var d=0;for(h=u;d{"use strict";var n=r(965),i=r(110),o=r(909),a=r(849),s=r(917),c=r(577),u=r(728),l=r(601),f=o.escapeFacetValue,h=o.unescapeFacetValue,d=r(673);function p(e){var t={};return e.forEach((function(e,r){t[e]=r})),t}function m(e,t,r){t&&t[r]&&(e.stats=t[r])}function g(e,t,r){var o=t[0];this._rawResults=t;var c=this;Object.keys(o).forEach((function(e){c[e]=o[e]}));var l=u({persistHierarchicalRootCount:!1},r);Object.keys(l).forEach((function(e){c[e]=l[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 f=e.getRefinedDisjunctiveFacets(),g=p(e.facets),v=p(e.disjunctiveFacets),y=1,b=o.facets||{};Object.keys(b).forEach((function(t){var r,n,i=b[t],u=(r=e.hierarchicalFacets,n=t,a(r,(function(e){return(e.attributes||[]).indexOf(n)>-1})));if(u){var l=u.attributes.indexOf(t),f=s(e.hierarchicalFacets,(function(e){return e.name===u.name}));c.hierarchicalFacets[f][l]={attribute:t,data:i,exhaustive:o.exhaustiveFacetsCount}}else{var h,d=-1!==e.disjunctiveFacets.indexOf(t),p=-1!==e.facets.indexOf(t);d&&(h=v[t],c.disjunctiveFacets[h]={name:t,data:i,exhaustive:o.exhaustiveFacetsCount},m(c.disjunctiveFacets[h],o.facets_stats,t)),p&&(h=g[t],c.facets[h]={name:t,data:i,exhaustive:o.exhaustiveFacetsCount},m(c.facets[h],o.facets_stats,t))}})),this.hierarchicalFacets=n(this.hierarchicalFacets),f.forEach((function(r){var n=t[y],a=n&&n.facets?n.facets:{},l=e.getHierarchicalFacetByName(r);Object.keys(a).forEach((function(t){var r,f=a[t];if(l){r=s(e.hierarchicalFacets,(function(e){return e.name===l.name}));var d=s(c.hierarchicalFacets[r],(function(e){return e.attribute===t}));if(-1===d)return;c.hierarchicalFacets[r][d].data=u({},c.hierarchicalFacets[r][d].data,f)}else{r=v[t];var p=o.facets&&o.facets[t]||{};c.disjunctiveFacets[r]={name:t,data:i({},f,p),exhaustive:n.exhaustiveFacetsCount},m(c.disjunctiveFacets[r],n.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach((function(n){!c.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(h(n))>-1&&(c.disjunctiveFacets[r].data[n]=0)}))}})),y++})),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(y).forEach((function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach((function(t){var u=r[t],l=s(e.hierarchicalFacets,(function(e){return e.name===n.name})),f=s(c.hierarchicalFacets[l],(function(e){return e.attribute===t}));if(-1!==f){var h={};if(a.length>0&&!c.persistHierarchicalRootCount){var d=a[0].split(o)[0];h[d]=c.hierarchicalFacets[l][f].data[d]}c.hierarchicalFacets[l][f].data=i(h,u,c.hierarchicalFacets[l][f].data)}})),y++}))})),Object.keys(e.facetsExcludes).forEach((function(t){var r=e.facetsExcludes[t],n=g[t];c.facets[n]={name:t,data:b[t],exhaustive:o.exhaustiveFacetsCount},r.forEach((function(e){c.facets[n]=c.facets[n]||{name:t},c.facets[n].data=c.facets[n].data||{},c.facets[n].data[e]=0}))})),this.hierarchicalFacets=this.hierarchicalFacets.map(d(e)),this.facets=n(this.facets),this.disjunctiveFacets=n(this.disjunctiveFacets),this._state=e}function v(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=a(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=a(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=a(e.hierarchicalFacets,r);if(!o)return o;var s=e._state.getHierarchicalFacetByName(t),c=e._state._getHierarchicalFacetSeparator(s),u=h(e._state.getHierarchicalRefinement(t)[0]||"");0===u.indexOf(s.rootPath)&&(u=u.replace(s.rootPath+c,""));var l=u.split(c);return l.unshift(t),y(o,l,0),o}}function y(e,t,r){e.isRefined=e.name===(t[r]&&t[r].trim()),e.data&&e.data.forEach((function(e){y(e,t,r+1)}))}function b(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 b(e,t,r,n+1)})),a=e(o,r[n]);return i({data:a},t)}function _(e,t){var r=a(e,(function(e){return e.name===t}));return r&&r.stats}function S(e,t,r,n,i){var o=a(i,(function(e){return e.name===r})),s=o&&o.data&&o.data[n]?o.data[n]:0,c=o&&o.exhaustive||!1;return{type:t,attributeName:r,name:n,count:s,exhaustive:c}}g.prototype.getFacetByName=function(e){function t(t){return t.name===e}return a(this.facets,t)||a(this.disjunctiveFacets,t)||a(this.hierarchicalFacets,t)},g.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],g.prototype.getFacetValues=function(e,t){var r=v(this,e);if(r){var n,o=i({},t,{sortBy:g.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),a=this;if(Array.isArray(r))n=[e];else n=a._state.getHierarchicalFacetByName(r.name).attributes;return b((function(e,t){if(o.facetOrdering){var r=function(e,t){return e.renderingContent&&e.renderingContent.facetOrdering&&e.renderingContent.facetOrdering.values&&e.renderingContent.facetOrdering.values[t]}(a,t);if(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 o,a=t.sortRemainingBy;return"hidden"===a?r:(o="alpha"===a?[["path","name"],["asc","asc"]]:[["count"],["desc"]],r.concat(l(n,o[0],o[1])))}(e,r)}if(Array.isArray(o.sortBy)){var n=c(o.sortBy,g.DEFAULT_SORT);return l(e,n[0],n[1])}if("function"==typeof o.sortBy)return function(e,t){return t.sort(e)}(o.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,n)}},g.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?_(this.facets,e):this._state.isDisjunctiveFacet(e)?_(this.disjunctiveFacets,e):void 0},g.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach((function(n){e.facetsRefinements[n].forEach((function(i){r.push(S(e,"facet",n,i,t.facets))}))})),Object.keys(e.facetsExcludes).forEach((function(n){e.facetsExcludes[n].forEach((function(i){r.push(S(e,"exclude",n,i,t.facets))}))})),Object.keys(e.disjunctiveFacetsRefinements).forEach((function(n){e.disjunctiveFacetsRefinements[n].forEach((function(i){r.push(S(e,"disjunctive",n,i,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),s=r.split(o),c=a(n,(function(e){return e.name===t})),u=s.reduce((function(e,t){var r=e&&a(e.data,(function(e){return e.name===t}));return void 0!==r?r:e}),c),l=u&&u.count||0,f=u&&u.exhaustive||!1,h=u&&u.path||"";return{type:"hierarchical",attributeName:t,name:h,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=g},571:(e,t,r)=>{"use strict";var n=r(733),i=r(732),o=r(909).escapeFacetValue,a=r(14),s=r(728),c=r(317),u=r(383),l=r(127),f=r(228),h=r(371),d=r(691),p=r(938);function m(e,t,r,n){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+p+")"),this.setClient(e);var i=r||{};i.index=t,this.state=h.make(i),this.recommendState=new l({params:i.recommendState}),this.lastResults=null,this.lastRecommendResults=null,this._queryId=0,this._recommendQueryId=0,this._lastQueryIdReceived=-1,this._lastRecommendQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0,this._currentNbRecommendQueries=0,this._searchResultsOptions=n}function g(e){if(e<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function v(){return this.state.page}a(m,n),m.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},m.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},m.prototype.recommend=function(){return this._recommend(),this},m.prototype.getQuery=function(){var e=this.state;return f._getHitsSearchParams(e)},m.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=f._getQueries(r.index,r),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),!t)return this.client.search(n).then((function(e){return i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),{content:new d(r,e.results),state:r,_originalResponse:e}}),(function(e){throw i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),e}));this.client.search(n).then((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(null,new d(r,e.results),r)})).catch((function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(e,null,r)}))},m.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=s({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:u(f._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 a=this.client.initIndex(n.index);if("function"!=typeof a.findAnswers)throw new Error(o);return a.findAnswers(n.query,e.queryLanguages,i)},m.prototype.searchForFacetValues=function(e,t,r,n){var i="function"==typeof this.client.searchForFacetValues,a="function"==typeof this.client.initIndex;if(!i&&!a&&"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 s=this.state.setQueryParameters(n||{}),c=s.isDisjunctiveFacet(e),u=f.getSearchForFacetQuery(e,t,r,s);this._currentNbQueries++;var l,h=this;return i?l=this.client.searchForFacetValues([{indexName:s.index,params:u}]):a?l=this.client.initIndex(s.index).searchForFacetValues(u):(delete u.facetName,l=this.client.search([{type:"facet",facet:e,indexName:s.index,params:u}]).then((function(e){return e.results[0]}))),this.emit("searchForFacetValues",{state:s,facet:e,query:t}),l.then((function(t){return h._currentNbQueries--,0===h._currentNbQueries&&h.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach((function(t){t.escapedValue=o(t.value),t.isRefined=c?s.isDisjunctiveFacetRefined(e,t.escapedValue):s.isFacetRefined(e,t.escapedValue)})),t}),(function(e){throw h._currentNbQueries--,0===h._currentNbQueries&&h.emit("searchQueueEmpty"),e}))},m.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},m.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},m.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},m.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},m.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},m.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},m.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},m.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},m.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},m.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},m.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},m.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},m.prototype.addFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.addFrequentlyBoughtTogether(e)}),this},m.prototype.addRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.addRelatedProducts(e)}),this},m.prototype.addTrendingItems=function(e){return this._recommendChange({state:this.recommendState.addTrendingItems(e)}),this},m.prototype.addTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.addTrendingFacets(e)}),this},m.prototype.addLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.addLookingSimilar(e)}),this},m.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},m.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},m.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},m.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},m.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},m.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},m.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},m.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},m.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},m.prototype.removeFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},m.prototype.removeRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},m.prototype.removeTrendingItems=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},m.prototype.removeTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},m.prototype.removeLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},m.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},m.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},m.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},m.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},m.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},m.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},m.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},m.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},m.prototype.setCurrentPage=g,m.prototype.setPage=g,m.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},m.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},m.prototype.setState=function(e){return this._change({state:h.make(e),isPageReset:!1}),this},m.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new h(e),this},m.prototype.hasRefinements=function(e){return!!c(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))},m.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},m.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},m.prototype.hasTag=function(e){return this.state.isTagRefined(e)},m.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},m.prototype.getIndex=function(){return this.state.index},m.prototype.getCurrentPage=v,m.prototype.getPage=v,m.prototype.getTags=function(){return this.state.tagRefinements},m.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e))this.state.getConjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"conjunctive"})})),this.state.getExcludeRefinements(e).forEach((function(e){t.push({value:e,type:"exclude"})}));else if(this.state.isDisjunctiveFacet(e)){this.state.getDisjunctiveRefinements(e).forEach((function(e){t.push({value:e,type:"disjunctive"})}))}var 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},m.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},m.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},m.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=f._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=n.index?f._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),a=this._queryId++;if(this._currentNbQueries++,!o.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,a));try{this.client.search(o).then(this._dispatchAlgoliaResponse.bind(this,r,a)).catch(this._dispatchAlgoliaError.bind(this,a))}catch(e){this.emit("error",{error:e})}},m.prototype._recommend=function(){var e=this.state,t=this.recommendState,r=this.getIndex(),n=[{state:t,index:r,helper:this}];this.emit("fetch",{recommend:{state:t,results:this.lastRecommendResults}});var i=this.derivedHelpers.map((function(t){var r=t.getModifiedState(e).index;if(!r)return[];var i=t.getModifiedRecommendState(new l);return n.push({state:i,index:r,helper:t}),t.emit("fetch",{recommend:{state:i,results:t.lastRecommendResults}}),i._buildQueries(r)})),o=Array.prototype.concat.apply(this.recommendState._buildQueries(r),i);if(0!==o.length)if(o.length>0&&void 0===this.client.getRecommendations)console.warn("Please update algoliasearch/lite to the latest version in order to use recommendations widgets.");else{var a=this._recommendQueryId++;this._currentNbRecommendQueries++;try{this.client.getRecommendations(o).then(this._dispatchRecommendResponse.bind(this,a,n)).catch(this._dispatchRecommendError.bind(this,a))}catch(e){this.emit("error",{error:e})}}},m.prototype._dispatchAlgoliaResponse=function(e,t,r){var n=this;if(!(t0},m.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}))},m.prototype._recommendChange=function(e){var t=e.state;t!==this.recommendState&&(this.recommendState=t,this.emit("recommend:change",{search:{results:this.lastResults,state:this.state},recommend:{results:this.lastRecommendResults,state:this.recommendState}}))},m.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},m.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+p+")"),this.client=e),this},m.prototype.getClient=function(){return this.client},m.prototype.derive=function(e,t){var r=new i(this,e,t);return this.derivedHelpers.push(r),r},m.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)},m.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=m},965:e=>{"use strict";e.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},110: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}),{})}},909: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(/^\\-/,"-")}}},849: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(849);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)}),[[],[]])}},14:e=>{"use strict";e.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},843:e=>{"use strict";e.exports=function(e,t){return e.filter((function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n}))}},728: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(s=o)&&null!==s?r(Array.isArray(s)?[]:{},s):s)}var s;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}},383: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}},601: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}))}},507: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.")}},228:(e,t,r)=>{"use strict";var n=r(728);function i(e){return Object.keys(e).sort().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),s=t._getHierarchicalFacetSeparator(i);if(a.length>0&&a[0].split(s).length>1){var c=a[0].split(s).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(s)})}),[]);c.forEach((function(n,a){var s=o._getDisjunctiveFacetSearchParams(t,n.attribute,0===a);function u(e){return i.attributes.some((function(t){return t===e.split(":")[0]}))}var l=(s.facetFilters||[]).reduce((function(e,t){if(Array.isArray(t)){var r=t.filter((function(e){return!u(e)}));r.length>0&&e.push(r)}return"string"!=typeof t||u(t)||e.push(t),e}),[]),f=c[a-1];s.facetFilters=a>0?l.concat(f.attribute+":"+f.value):l.length>0?l:void 0,r.push({indexName:e,params:s})}))}})),r},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(o._getHitsHierarchicalFacetsAttributes(e)).sort(),r=o._getFacetFilters(e),a=o._getNumericFilters(e),s=o._getTagFilters(e),c={facets:t.indexOf("*")>-1?["*"]:t,tagFilters:s};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),s=o._getNumericFilters(e,t),c=o._getTagFilters(e),u={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};c.length>0&&(u.tagFilters=c);var l=e.getHierarchicalFacetByName(t);return u.facets=l?o._getDisjunctiveHierarchicalFacetAttribute(e,l,r):t,s.length>0&&(u.numericFilters=s),a.length>0&&(u.facetFilters=a),i(n({},e.getQueryParams(),u))},_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).sort().forEach((function(e){(i[e]||[]).slice().sort().forEach((function(t){n.push(e+":"+t)}))}));var o=e.facetsExcludes||{};Object.keys(o).sort().forEach((function(e){(o[e]||[]).sort().forEach((function(t){n.push(e+":-"+t)}))}));var a=e.disjunctiveFacetsRefinements||{};Object.keys(a).sort().forEach((function(e){var r=a[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.slice().sort().forEach((function(t){i.push(e+":"+t)})),n.push(i)}}));var s=e.hierarchicalFacetsRefinements||{};return Object.keys(s).sort().forEach((function(i){var o=(s[i]||[])[0];if(void 0!==o){var a,c,u=e.getHierarchicalFacetByName(i),l=e._getHierarchicalFacetSeparator(u),f=e._getHierarchicalRootPath(u);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=u.attributes[c]}else c=o.split(l).length-1,a=u.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 s=a.isDisjunctiveFacet(e)?a.clearRefinements(e):a,c={facetQuery:t,facetName:e};return"number"==typeof r&&(c.maxFacetHits=r),i(n({},o._getHitsSearchParams(s),c))}};e.exports=o},208:e=>{"use strict";e.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},938:e=>{"use strict";e.exports="3.18.0"},643:function(e){e.exports=function(){"use strict";function e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t(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 r(r){for(var n=1;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}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!t||r.length!==t);n=!0);}catch(e){i=!0,o=e}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function o(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return Promise.resolve().then((function(){s();var t=JSON.stringify(e);return o()[t]})).then((function(e){return Promise.all([e?e.value:t(),void 0!==e])})).then((function(e){var t=i(e,2),n=t[0],o=t[1];return Promise.all([n,o||r.miss(n)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve().then((function(){var i=o();return i[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},n().setItem(r,JSON.stringify(i)),t}))},delete:function(e){return Promise.resolve().then((function(){var t=o();delete t[JSON.stringify(e)],n().setItem(r,JSON.stringify(t))}))},clear:function(){return Promise.resolve().then((function(){n().removeItem(r)}))}}}function s(e){var t=o(e.caches),r=t.shift();return void 0===r?{get:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return t().then((function(e){return Promise.all([e,r.miss(e)])})).then((function(e){return i(e,1)[0]}))},set:function(e,t){return Promise.resolve(t)},delete:function(e){return Promise.resolve()},clear:function(){return Promise.resolve()}}:{get:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}};return r.get(e,n,i).catch((function(){return s({caches:t}).get(e,n,i)}))},set:function(e,n){return r.set(e,n).catch((function(){return s({caches:t}).set(e,n)}))},delete:function(e){return r.delete(e).catch((function(){return s({caches:t}).delete(e)}))},clear:function(){return r.clear().catch((function(){return s({caches:t}).clear()}))}}}function c(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{serializable:!0},t={};return{get:function(r,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{miss:function(){return Promise.resolve()}},o=JSON.stringify(r);if(o in t)return Promise.resolve(e.serializable?JSON.parse(t[o]):t[o]);var a=n(),s=i&&i.miss||function(){return Promise.resolve()};return a.then((function(e){return s(e)})).then((function(){return a}))},set:function(r,n){return t[JSON.stringify(r)]=e.serializable?JSON.stringify(n):n,Promise.resolve(n)},delete:function(e){return delete t[JSON.stringify(e)],Promise.resolve()},clear:function(){return t={},Promise.resolve()}}}function u(e){for(var t=e.length-1;t>0;t--){var r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}return e}function l(e,t){return t?(Object.keys(t).forEach((function(r){e[r]=t[r](e)})),e):e}function f(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n0?n:void 0,timeout:r.timeout||t,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var p={Read:1,Write:2,Any:3},m=1,g=2,v=3;function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:m;return r(r({},e),{},{status:t,lastUpdate:Date.now()})}function b(e){return"string"==typeof e?{protocol:"https",url:e,accept:p.Any}:{protocol:e.protocol||"https",url:e.url,accept:e.accept||p.Any}}var _="GET",S="POST";function w(e,t){return Promise.all(t.map((function(t){return e.get(t,(function(){return Promise.resolve(y(t))}))}))).then((function(e){var r=e.filter((function(e){return function(e){return e.status===m||Date.now()-e.lastUpdate>12e4}(e)})),n=e.filter((function(e){return function(e){return e.status===v&&Date.now()-e.lastUpdate<=12e4}(e)})),i=[].concat(o(r),o(n));return{getTimeout:function(e,t){return(0===n.length&&0===e?1:n.length+3+e)*t},statelessHosts:i.length>0?i.map((function(e){return b(e)})):t}}))}function O(e,t,n,i){var a=[],s=function(e,t){if(e.method!==_&&(void 0!==e.data||void 0!==t.data)){var n=Array.isArray(e.data)?e.data:r(r({},e.data),t.data);return JSON.stringify(n)}}(n,i),c=function(e,t){var n=r(r({},e.headers),t.headers),i={};return Object.keys(n).forEach((function(e){var t=n[e];i[e.toLowerCase()]=t})),i}(e,i),u=n.method,l=n.method!==_?{}:r(r({},n.data),i.data),f=r(r(r({"x-algolia-agent":e.userAgent.value},e.queryParameters),l),i.queryParameters),h=0,d=function t(r,o){var l=r.pop();if(void 0===l)throw{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:x(a)};var d={data:s,headers:c,method:u,url:P(l,n.path,f),connectTimeout:o(h,e.timeouts.connect),responseTimeout:o(h,i.timeout)},p=function(e){var t={request:d,response:e,host:l,triesLeft:r.length};return a.push(t),t},m={onSuccess:function(e){return function(e){try{return JSON.parse(e.content)}catch(t){throw function(e,t){return{name:"DeserializationError",message:e,response:t}}(t.message,e)}}(e)},onRetry:function(n){var i=p(n);return n.isTimedOut&&h++,Promise.all([e.logger.info("Retryable failure",E(i)),e.hostsCache.set(l,y(l,n.isTimedOut?v:g))]).then((function(){return t(r,o)}))},onFail:function(e){throw p(e),function(e,t){var r=e.content,n=e.status,i=r;try{i=JSON.parse(r).message}catch(e){}return function(e,t,r){return{name:"ApiError",message:e,status:t,transporterStackTrace:r}}(i,n,t)}(e,x(a))}};return e.requester.send(d).then((function(e){return function(e,t){return function(e){var t=e.status;return e.isTimedOut||function(e){var t=e.isTimedOut,r=e.status;return!t&&0==~~r}(e)||2!=~~(t/100)&&4!=~~(t/100)}(e)?t.onRetry(e):2==~~(e.status/100)?t.onSuccess(e):t.onFail(e)}(e,m)}))};return w(e.hostsCache,t).then((function(e){return d(o(e.statelessHosts).reverse(),e.getTimeout)}))}function j(e){var t={value:"Algolia for JavaScript (".concat(e,")"),add:function(e){var r="; ".concat(e.segment).concat(void 0!==e.version?" (".concat(e.version,")"):"");return-1===t.value.indexOf(r)&&(t.value="".concat(t.value).concat(r)),t}};return t}function P(e,t,r){var n=R(r),i="".concat(e.protocol,"://").concat(e.url,"/").concat("/"===t.charAt(0)?t.substr(1):t);return n.length&&(i+="?".concat(n)),i}function R(e){return Object.keys(e).map((function(t){return f("%s=%s",t,(r=e[t],"[object Object]"===Object.prototype.toString.call(r)||"[object Array]"===Object.prototype.toString.call(r)?JSON.stringify(e[t]):e[t]));var r})).join("&")}function x(e){return e.map((function(e){return E(e)}))}function E(e){var t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return r(r({},e),{},{request:r(r({},e.request),{},{headers:r(r({},e.request.headers),t)})})}var F=function(e){var t=e.appId,n=function(e,t,r){var n={"x-algolia-api-key":r,"x-algolia-application-id":t};return{headers:function(){return e===h.WithinHeaders?n:{}},queryParameters:function(){return e===h.WithinQueryParameters?n:{}}}}(void 0!==e.authMode?e.authMode:h.WithinHeaders,t,e.apiKey),o=function(e){var t=e.hostsCache,r=e.logger,n=e.requester,o=e.requestsCache,a=e.responsesCache,s=e.timeouts,c=e.userAgent,u=e.hosts,l=e.queryParameters,f={hostsCache:t,logger:r,requester:n,requestsCache:o,responsesCache:a,timeouts:s,userAgent:c,headers:e.headers,queryParameters:l,hosts:u.map((function(e){return b(e)})),read:function(e,t){var r=d(t,f.timeouts.read),n=function(){return O(f,f.hosts.filter((function(e){return 0!=(e.accept&p.Read)})),e,r)};if(!0!==(void 0!==r.cacheable?r.cacheable:e.cacheable))return n();var o={request:e,mappedRequestOptions:r,transporter:{queryParameters:f.queryParameters,headers:f.headers}};return f.responsesCache.get(o,(function(){return f.requestsCache.get(o,(function(){return f.requestsCache.set(o,n()).then((function(e){return Promise.all([f.requestsCache.delete(o),e])}),(function(e){return Promise.all([f.requestsCache.delete(o),Promise.reject(e)])})).then((function(e){var t=i(e,2);return t[0],t[1]}))}))}),{miss:function(e){return f.responsesCache.set(o,e)}})},write:function(e,t){return O(f,f.hosts.filter((function(e){return 0!=(e.accept&p.Write)})),e,d(t,f.timeouts.write))}};return f}(r(r({hosts:[{url:"".concat(t,"-dsn.algolia.net"),accept:p.Read},{url:"".concat(t,".algolia.net"),accept:p.Write}].concat(u([{url:"".concat(t,"-1.algolianet.com")},{url:"".concat(t,"-2.algolianet.com")},{url:"".concat(t,"-3.algolianet.com")}]))},e),{},{headers:r(r(r({},n.headers()),{"content-type":"application/x-www-form-urlencoded"}),e.headers),queryParameters:r(r({},n.queryParameters()),e.queryParameters)}));return l({transporter:o,appId:t,addAlgoliaAgent:function(e,t){o.userAgent.add({segment:e,version:t})},clearCache:function(){return Promise.all([o.requestsCache.clear(),o.responsesCache.clear()]).then((function(){}))}},e.methods)},A=function(e){return function(t,r){return t.method===_?e.transporter.read(t,r):e.transporter.write(t,r)}},T=function(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l({transporter:e.transporter,appId:e.appId,indexName:t},r.methods)}},N=function(e){return function(t,n){var i=t.map((function(e){return r(r({},e),{},{params:R(e.params||{})})}));return e.transporter.read({method:S,path:"1/indexes/*/queries",data:{requests:i},cacheable:!0},n)}},I=function(e){return function(t,i){return Promise.all(t.map((function(t){var o=t.params,a=o.facetName,s=o.facetQuery,c=n(o,["facetName","facetQuery"]);return T(e)(t.indexName,{methods:{searchForFacetValues:D}}).searchForFacetValues(a,s,r(r({},i),c))})))}},C=function(e){return function(t,r,n){return e.transporter.read({method:S,path:f("1/answers/%s/prediction",e.indexName),data:{query:t,queryLanguages:r},cacheable:!0},n)}},k=function(e){return function(t,r){return e.transporter.read({method:S,path:f("1/indexes/%s/query",e.indexName),data:{query:t},cacheable:!0},r)}},D=function(e){return function(t,r,n){return e.transporter.read({method:S,path:f("1/indexes/%s/facets/%s/query",e.indexName,t),data:{facetQuery:r},cacheable:!0},n)}},H=1,L=2,U=3;function $(e,t,n){var i,o={appId:e,apiKey:t,timeouts:{connect:1,read:2,write:30},requester:{send:function(e){return new Promise((function(t){var r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((function(t){return r.setRequestHeader(t,e.headers[t])}));var n,i=function(e,n){return setTimeout((function(){r.abort(),t({status:0,content:n,isTimedOut:!0})}),1e3*e)},o=i(e.connectTimeout,"Connection timeout");r.onreadystatechange=function(){r.readyState>r.OPENED&&void 0===n&&(clearTimeout(o),n=i(e.responseTimeout,"Socket timeout"))},r.onerror=function(){0===r.status&&(clearTimeout(o),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=function(){clearTimeout(o),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},logger:(i=U,{debug:function(e,t){return H>=i&&console.debug(e,t),Promise.resolve()},info:function(e,t){return L>=i&&console.info(e,t),Promise.resolve()},error:function(e,t){return console.error(e,t),Promise.resolve()}}),responsesCache:c(),requestsCache:c({serializable:!1}),hostsCache:s({caches:[a({key:"".concat("4.22.1","-").concat(e)}),c()]}),userAgent:j("4.22.1").add({segment:"Browser",version:"lite"}),authMode:h.WithinQueryParameters};return F(r(r(r({},o),n),{},{methods:{search:N,searchForFacetValues:I,multipleQueries:N,multipleSearchForFacetValues:I,customRequest:A,initIndex:function(e){return function(t){return T(e)(t,{methods:{search:k,searchForFacetValues:D,findAnswers:C}})}}}}))}return $.version="4.22.1",$}()},83:e=>{"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC1738",i="RFC3986";e.exports={default:i,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:n,RFC3986:i}},87:(e,t,r)=>{"use strict";var n=r(670),i=r(192),o=r(83);e.exports={formats:o,parse:i,stringify:n}},192:(e,t,r)=>{"use strict";var n=r(442),i=Object.prototype.hasOwnProperty,o=Array.isArray,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},c=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},u=function(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(o),u=s?o.slice(0,s.index):o,l=[];if(u){if(!r.plainObjects&&i.call(Object.prototype,u)&&!r.allowPrototypes)return;l.push(u)}for(var f=0;r.depth>0&&null!==(s=a.exec(o))&&f=0;--o){var a,s=e[o];if("[]"===s&&r.parseArrays)a=[].concat(i);else{a=r.plainObjects?Object.create(null):{};var u="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(u,10);r.parseArrays||""!==u?!isNaN(l)&&s!==u&&String(l)===u&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(a=[])[l]=i:"__proto__"!==u&&(a[u]=i):a={0:i}}i=a}return i}(l,t,r,n)}};e.exports=function(e,t){var r=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var l="string"==typeof e?function(e,t){var r,u={},l=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,h=l.split(t.delimiter,f),d=-1,p=t.charset;if(t.charsetSentinel)for(r=0;r-1&&(g=o(g)?[g]:g),i.call(u,m)?u[m]=n.combine(u[m],g):u[m]=g}return u}(e,r):e,f=r.plainObjects?Object.create(null):{},h=Object.keys(l),d=0;d{"use strict";var n=r(442),i=r(83),o=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,c=String.prototype.split,u=Array.prototype.push,l=function(e,t){u.apply(e,s(t)?t:[t])},f=Date.prototype.toISOString,h=i.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,format:h,formatter:i.formatters[h],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},p=function e(t,r,i,o,a,u,f,h,p,m,g,v,y,b){var _,S=t;if("function"==typeof f?S=f(r,S):S instanceof Date?S=m(S):"comma"===i&&s(S)&&(S=n.maybeMap(S,(function(e){return e instanceof Date?m(e):e}))),null===S){if(o)return u&&!y?u(r,d.encoder,b,"key",g):r;S=""}if("string"==typeof(_=S)||"number"==typeof _||"boolean"==typeof _||"symbol"==typeof _||"bigint"==typeof _||n.isBuffer(S)){if(u){var w=y?r:u(r,d.encoder,b,"key",g);if("comma"===i&&y){for(var O=c.call(String(S),","),j="",P=0;P0?S.join(",")||null:void 0}];else if(s(f))R=f;else{var E=Object.keys(S);R=h?E.sort(h):E}for(var F=0;F0?y+v:""}},442:(e,t,r)=>{"use strict";var n=r(83),i=Object.prototype.hasOwnProperty,o=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n1;){var t=e.pop(),r=t.obj[t.prop];if(o(r)){for(var n=[],i=0;i=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||o===n.RFC1738&&(40===l||41===l)?c+=s.charAt(u):l<128?c+=a[l]:l<2048?c+=a[192|l>>6]+a[128|63&l]:l<55296||l>=57344?c+=a[224|l>>12]+a[128|l>>6&63]+a[128|63&l]:(u+=1,l=65536+((1023&l)<<10|1023&s.charCodeAt(u)),c+=a[240|l>>18]+a[128|l>>12&63]+a[128|l>>6&63]+a[128|63&l])}return c},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(o(e)){for(var r=[],n=0;n{"use strict";r.r(t),r.d(t,{Children:()=>B,Component:()=>s.uA,Fragment:()=>s.FK,PureComponent:()=>$,StrictMode:()=>Ne,Suspense:()=>K,SuspenseList:()=>ee,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>we,cloneElement:()=>xe,createContext:()=>s.q6,createElement:()=>s.n,createFactory:()=>je,createPortal:()=>ie,createRef:()=>s._3,default:()=>$e,findDOMNode:()=>Fe,flushSync:()=>Te,forwardRef:()=>q,hydrate:()=>he,isElement:()=>He,isFragment:()=>Re,isValidElement:()=>Pe,lazy:()=>Z,memo:()=>Q,render:()=>fe,startTransition:()=>Ie,unmountComponentAtNode:()=>Ee,unstable_batchedUpdates:()=>Ae,useCallback:()=>R,useContext:()=>x,useDebugValue:()=>E,useDeferredValue:()=>Ce,useEffect:()=>S,useErrorBoundary:()=>F,useId:()=>A,useImperativeHandle:()=>j,useInsertionEffect:()=>De,useLayoutEffect:()=>w,useMemo:()=>P,useReducer:()=>_,useRef:()=>O,useState:()=>b,useSyncExternalStore:()=>Le,useTransition:()=>ke,version:()=>Oe});var n,i,o,a,s=r(172),c=0,u=[],l=[],f=s.fF,h=f.__b,d=f.__r,p=f.diffed,m=f.__c,g=f.unmount,v=f.__;function y(e,t){f.__h&&f.__h(i,e,c||t),c=0;var r=i.__H||(i.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({__V:l}),r.__[e]}function b(e){return c=1,_(H,e)}function _(e,t,r){var o=y(n++,2);if(o.t=e,!o.__c&&(o.__=[r?r(t):H(void 0,t),function(e){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,e);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=i,!i.u)){var a=function(e,t,r){if(!o.__c.__H)return!0;var n=o.__c.__H.__.filter((function(e){return!!e.__c}));if(n.every((function(e){return!e.__N})))return!s||s.call(this,e,t,r);var i=!1;return n.forEach((function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}})),!(!i&&o.__c.props===e)&&(!s||s.call(this,e,t,r))};i.u=!0;var s=i.shouldComponentUpdate,c=i.componentWillUpdate;i.componentWillUpdate=function(e,t,r){if(this.__e){var n=s;s=void 0,a(e,t,r),s=n}c&&c.call(this,e,t,r)},i.shouldComponentUpdate=a}return o.__N||o.__}function S(e,t){var r=y(n++,3);!f.__s&&D(r.__H,t)&&(r.__=e,r.i=t,i.__H.__h.push(r))}function w(e,t){var r=y(n++,4);!f.__s&&D(r.__H,t)&&(r.__=e,r.i=t,i.__h.push(r))}function O(e){return c=5,P((function(){return{current:e}}),[])}function j(e,t,r){c=6,w((function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0}),null==r?r:r.concat(e))}function P(e,t){var r=y(n++,7);return D(r.__H,t)?(r.__V=e(),r.i=t,r.__h=e,r.__V):r.__}function R(e,t){return c=8,P((function(){return e}),t)}function x(e){var t=i.context[e.__c],r=y(n++,9);return r.c=e,t?(null==r.__&&(r.__=!0,t.sub(i)),t.props.value):e.__}function E(e,t){f.useDebugValue&&f.useDebugValue(t?t(e):e)}function F(e){var t=y(n++,10),r=b();return t.__=e,i.componentDidCatch||(i.componentDidCatch=function(e,n){t.__&&t.__(e,n),r[1](e)}),[r[0],function(){r[1](void 0)}]}function A(){var e=y(n++,11);if(!e.__){for(var t=i.__v;null!==t&&!t.__m&&null!==t.__;)t=t.__;var r=t.__m||(t.__m=[0,0]);e.__="P"+r[0]+"-"+r[1]++}return e.__}function T(){for(var e;e=u.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(C),e.__H.__h.forEach(k),e.__H.__h=[]}catch(t){e.__H.__h=[],f.__e(t,e.__v)}}f.__b=function(e){i=null,h&&h(e)},f.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),v&&v(e,t)},f.__r=function(e){d&&d(e),n=0;var t=(i=e.__c).__H;t&&(o===i?(t.__h=[],i.__h=[],t.__.forEach((function(e){e.__N&&(e.__=e.__N),e.__V=l,e.__N=e.i=void 0}))):(t.__h.forEach(C),t.__h.forEach(k),t.__h=[],n=0)),o=i},f.diffed=function(e){p&&p(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==u.push(t)&&a===f.requestAnimationFrame||((a=f.requestAnimationFrame)||I)(T)),t.__H.__.forEach((function(e){e.i&&(e.__H=e.i),e.__V!==l&&(e.__=e.__V),e.i=void 0,e.__V=l}))),o=i=null},f.__c=function(e,t){t.some((function(e){try{e.__h.forEach(C),e.__h=e.__h.filter((function(e){return!e.__||k(e)}))}catch(r){t.some((function(e){e.__h&&(e.__h=[])})),t=[],f.__e(r,e.__v)}})),m&&m(e,t)},f.unmount=function(e){g&&g(e);var t,r=e.__c;r&&r.__H&&(r.__H.__.forEach((function(e){try{C(e)}catch(e){t=e}})),r.__H=void 0,t&&f.__e(t,r.__v))};var N="function"==typeof requestAnimationFrame;function I(e){var t,r=function(){clearTimeout(n),N&&cancelAnimationFrame(t),setTimeout(e)},n=setTimeout(r,100);N&&(t=requestAnimationFrame(r))}function C(e){var t=i,r=e.__c;"function"==typeof r&&(e.__c=void 0,r()),i=t}function k(e){var t=i;e.__c=e.__(),i=t}function D(e,t){return!e||e.length!==t.length||t.some((function(t,r){return t!==e[r]}))}function H(e,t){return"function"==typeof t?t(e):t}function L(e,t){for(var r in t)e[r]=t[r];return e}function U(e,t){for(var r in e)if("__source"!==r&&!(r in t))return!0;for(var n in t)if("__source"!==n&&e[n]!==t[n])return!0;return!1}function $(e,t){this.props=e,this.context=t}function Q(e,t){function r(e){var r=this.props.ref,n=r==e.ref;return!n&&r&&(r.call?r(null):r.current=null),t?!t(this.props,e)||!n:U(this.props,e)}function n(t){return this.shouldComponentUpdate=r,(0,s.n)(e,t)}return n.displayName="Memo("+(e.displayName||e.name)+")",n.prototype.isReactComponent=!0,n.__f=!0,n}($.prototype=new s.uA).isPureReactComponent=!0,$.prototype.shouldComponentUpdate=function(e,t){return U(this.props,e)||U(this.state,t)};var W=s.fF.__b;s.fF.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),W&&W(e)};var M="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function q(e){function t(t){var r=L({},t);return delete r.ref,e(r,t.ref||null)}return t.$$typeof=M,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var V=function(e,t){return null==e?null:(0,s.v2)((0,s.v2)(e).map(t))},B={map:V,forEach:V,count:function(e){return e?(0,s.v2)(e).length:0},only:function(e){var t=(0,s.v2)(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:s.v2},z=s.fF.__e;s.fF.__e=function(e,t,r,n){if(e.then)for(var i,o=t;o=o.__;)if((i=o.__c)&&i.__c)return null==t.__e&&(t.__e=r.__e,t.__k=r.__k),i.__c(e,t);z(e,t,r,n)};var G=s.fF.unmount;function J(e,t,r){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach((function(e){"function"==typeof e.__c&&e.__c()})),e.__c.__H=null),null!=(e=L({},e)).__c&&(e.__c.__P===r&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map((function(e){return J(e,t,r)}))),e}function X(e,t,r){return e&&r&&(e.__v=null,e.__k=e.__k&&e.__k.map((function(e){return X(e,t,r)})),e.__c&&e.__c.__P===t&&(e.__e&&r.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=r)),e}function K(){this.__u=0,this.t=null,this.__b=null}function Y(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function Z(e){var t,r,n;function i(i){if(t||(t=e()).then((function(e){r=e.default||e}),(function(e){n=e})),n)throw n;if(!r)throw t;return(0,s.n)(r,i)}return i.displayName="Lazy",i.__f=!0,i}function ee(){this.u=null,this.o=null}s.fF.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),G&&G(e)},(K.prototype=new s.uA).__c=function(e,t){var r=t.__c,n=this;null==n.t&&(n.t=[]),n.t.push(r);var i=Y(n.__v),o=!1,a=function(){o||(o=!0,r.__R=null,i?i(s):s())};r.__R=a;var s=function(){if(! --n.__u){if(n.state.__a){var e=n.state.__a;n.__v.__k[0]=X(e,e.__c.__P,e.__c.__O)}var t;for(n.setState({__a:n.__b=null});t=n.t.pop();)t.forceUpdate()}};n.__u++||32&t.__u||n.setState({__a:n.__b=n.__v.__k[0]}),e.then(a,a)},K.prototype.componentWillUnmount=function(){this.t=[]},K.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),n=this.__v.__k[0].__c;this.__v.__k[0]=J(this.__b,r,n.__O=n.__P)}this.__b=null}var i=t.__a&&(0,s.n)(s.FK,null,e.fallback);return i&&(i.__u&=-33),[(0,s.n)(s.FK,null,t.__a?null:e.children),i]};var te=function(e,t,r){if(++r[1]===r[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(r=e.u;r;){for(;r.length>3;)r.pop()();if(r[1]>>1,1),t.i.removeChild(e)}}),(0,s.XX)((0,s.n)(re,{context:t.context},e.__v),t.l)}function ie(e,t){var r=(0,s.n)(ne,{__v:e,i:t});return r.containerInfo=t,r}(ee.prototype=new s.uA).__a=function(e){var t=this,r=Y(t.__v),n=t.o.get(e);return n[0]++,function(i){var o=function(){t.props.revealOrder?(n.push(i),te(t,e,n)):i()};r?r(o):o()}},ee.prototype.render=function(e){this.u=null,this.o=new Map;var t=(0,s.v2)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var r=t.length;r--;)this.o.set(t[r],this.u=[1,0,this.u]);return e.children},ee.prototype.componentDidUpdate=ee.prototype.componentDidMount=function(){var e=this;this.o.forEach((function(t,r){te(e,r,t)}))};var oe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,ae=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,se=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ce=/[A-Z0-9]/g,ue="undefined"!=typeof document,le=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function fe(e,t,r){return null==t.__k&&(t.textContent=""),(0,s.XX)(e,t),"function"==typeof r&&r(),e?e.__c:null}function he(e,t,r){return(0,s.Qv)(e,t),"function"==typeof r&&r(),e?e.__c:null}s.uA.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach((function(e){Object.defineProperty(s.uA.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}));var de=s.fF.event;function pe(){}function me(){return this.cancelBubble}function ge(){return this.defaultPrevented}s.fF.event=function(e){return de&&(e=de(e)),e.persist=pe,e.isPropagationStopped=me,e.isDefaultPrevented=ge,e.nativeEvent=e};var ve,ye={enumerable:!1,configurable:!0,get:function(){return this.class}},be=s.fF.vnode;s.fF.vnode=function(e){"string"==typeof e.type&&function(e){var t=e.props,r=e.type,n={};for(var i in t){var o=t[i];if(!("value"===i&&"defaultValue"in t&&null==o||ue&&"children"===i&&"noscript"===r||"class"===i||"className"===i)){var a=i.toLowerCase();"defaultValue"===i&&"value"in t&&null==t.value?i="value":"download"===i&&!0===o?o="":"translate"===a&&"no"===o?o=!1:"ondoubleclick"===a?i="ondblclick":"onchange"!==a||"input"!==r&&"textarea"!==r||le(t.type)?"onfocus"===a?i="onfocusin":"onblur"===a?i="onfocusout":se.test(i)?i=a:-1===r.indexOf("-")&&ae.test(i)?i=i.replace(ce,"-$&").toLowerCase():null===o&&(o=void 0):a=i="oninput","oninput"===a&&n[i=a]&&(i="oninputCapture"),n[i]=o}}"select"==r&&n.multiple&&Array.isArray(n.value)&&(n.value=(0,s.v2)(t.children).forEach((function(e){e.props.selected=-1!=n.value.indexOf(e.props.value)}))),"select"==r&&null!=n.defaultValue&&(n.value=(0,s.v2)(t.children).forEach((function(e){e.props.selected=n.multiple?-1!=n.defaultValue.indexOf(e.props.value):n.defaultValue==e.props.value}))),t.class&&!t.className?(n.class=t.class,Object.defineProperty(n,"className",ye)):(t.className&&!t.class||t.class&&t.className)&&(n.class=n.className=t.className),e.props=n}(e),e.$$typeof=oe,be&&be(e)};var _e=s.fF.__r;s.fF.__r=function(e){_e&&_e(e),ve=e.__c};var Se=s.fF.diffed;s.fF.diffed=function(e){Se&&Se(e);var t=e.props,r=e.__e;null!=r&&"textarea"===e.type&&"value"in t&&t.value!==r.value&&(r.value=null==t.value?"":t.value),ve=null};var we={ReactCurrentDispatcher:{current:{readContext:function(e){return ve.__n[e.__c].props.value}}}},Oe="17.0.2";function je(e){return s.n.bind(null,e)}function Pe(e){return!!e&&e.$$typeof===oe}function Re(e){return Pe(e)&&e.type===s.FK}function xe(e){return Pe(e)?s.Ob.apply(null,arguments):e}function Ee(e){return!!e.__k&&((0,s.XX)(null,e),!0)}function Fe(e){return e&&(e.base||1===e.nodeType&&e)||null}var Ae=function(e,t){return e(t)},Te=function(e,t){return e(t)},Ne=s.FK;function Ie(e){e()}function Ce(e){return e}function ke(){return[!1,Ie]}var De=w,He=Pe;function Le(e,t){var r=t(),n=b({h:{__:r,v:t}}),i=n[0].h,o=n[1];return w((function(){i.__=r,i.v=t,Ue(i)&&o({h:i})}),[e,r,t]),S((function(){return Ue(i)&&o({h:i}),e((function(){Ue(i)&&o({h:i})}))}),[e]),r}function Ue(e){var t,r,n=e.v,i=e.__;try{var o=n();return!((t=i)===(r=o)&&(0!==t||1/t==1/r)||t!=t&&r!=r)}catch(e){return!0}}var $e={useState:b,useId:A,useReducer:_,useEffect:S,useLayoutEffect:w,useInsertionEffect:De,useTransition:ke,useDeferredValue:Ce,useSyncExternalStore:Le,startTransition:Ie,useRef:O,useImperativeHandle:j,useMemo:P,useCallback:R,useContext:x,useDebugValue:E,version:"17.0.2",Children:B,render:fe,hydrate:he,unmountComponentAtNode:Ee,createPortal:ie,createElement:s.n,createContext:s.q6,createFactory:je,cloneElement:xe,createRef:s._3,Fragment:s.FK,isValidElement:Pe,isElement:He,isFragment:Re,findDOMNode:Fe,Component:s.uA,PureComponent:$,memo:Q,forwardRef:q,flushSync:Te,unstable_batchedUpdates:Ae,StrictMode:Ne,Suspense:K,SuspenseList:ee,lazy:Z,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:we}},172:(e,t,r)=>{"use strict";r.d(t,{FK:()=>_,Ob:()=>M,Qv:()=>W,XX:()=>Q,_3:()=>b,fF:()=>i,h:()=>v,n:()=>v,q6:()=>q,uA:()=>S,v2:()=>F});var n,i,o,a,s,c,u,l,f={},h=[],d=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,p=Array.isArray;function m(e,t){for(var r in t)e[r]=t[r];return e}function g(e){var t=e.parentNode;t&&t.removeChild(e)}function v(e,t,r){var i,o,a,s={};for(a in t)"key"==a?i=t[a]:"ref"==a?o=t[a]:s[a]=t[a];if(arguments.length>2&&(s.children=arguments.length>3?n.call(arguments,2):r),"function"==typeof e&&null!=e.defaultProps)for(a in e.defaultProps)void 0===s[a]&&(s[a]=e.defaultProps[a]);return y(e,s,i,o,null)}function y(e,t,r,n,a){var s={type:e,props:t,key:r,ref:n,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==a?++o:a,__i:-1,__u:0};return null==a&&null!=i.vnode&&i.vnode(s),s}function b(){return{current:null}}function _(e){return e.children}function S(e,t){this.props=e,this.context=t}function w(e,t){if(null==t)return e.__?w(e.__,e.__i+1):null;for(var r;tt&&a.sort(u));P.__r=0}function R(e,t,r,n,i,o,a,s,c,u,l){var d,p,m,g,v,y=n&&n.__k||h,b=t.length;for(r.__d=c,x(r,t,y),c=r.__d,d=0;d0?y(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=e,i.__b=e.__b+1,s=A(i,r,a,l),i.__i=s,o=null,-1!==s&&(l--,(o=r[s])&&(o.__u|=131072)),null==o||null===o.__v?(-1==s&&f--,"function"!=typeof i.type&&(i.__u|=65536)):s!==a&&(s===a+1?f++:s>a?l>c-a?f+=s-a:f--:s(null!=c&&0==(131072&c.__u)?1:0))for(;a>=0||s=0){if((c=t[a])&&0==(131072&c.__u)&&i==c.key&&o===c.type)return a;a--}if(s2&&(c.children=arguments.length>3?n.call(arguments,2):r),y(e.type,c,i||e.key,o||e.ref,null)}function q(e,t){var r={__c:t="__cC"+l++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,n;return this.getChildContext||(r=[],(n={})[t]=this,this.getChildContext=function(){return n},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&r.some((function(e){e.__e=!0,j(e)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return r.Provider.__=r.Consumer.contextType=r}n=h.slice,i={__e:function(e,t,r,n){for(var i,o,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(e)),a=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(e,n||{}),a=i.__d),a)return i.__E=i}catch(t){e=t}throw e}},o=0,S.prototype.setState=function(e,t){var r;r=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=m({},this.state),"function"==typeof e&&(e=e(m({},r),this.props)),e&&m(r,e),null!=e&&this.__v&&(t&&this._sb.push(t),j(this))},S.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),j(this))},S.prototype.render=_,a=[],c="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,u=function(e,t){return e.__v.__b-t.__v.__b},P.__r=0,l=0},833:e=>{e.exports=function(e,t,r,n){var i=r?r.call(n,e,t):void 0;if(void 0!==i)return!!i;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),a=Object.keys(t);if(o.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),c=0;c{"use strict";var n=r(299);var i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=n.useState,a=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var l="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=o({inst:{value:r,getSnapshot:t}}),i=n[0].inst,l=n[1];return s((function(){i.value=r,i.getSnapshot=t,u(i)&&l({inst:i})}),[e,r,t]),a((function(){return u(i)&&l({inst:i}),e((function(){u(i)&&l({inst:i})}))}),[e]),c(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:l},888:(e,t,r)=>{"use strict";e.exports=r(63)}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nc=void 0;var n={};return(()=>{"use strict";r.r(n);var e=r(643),t=r.n(e),i=r(172),o=r(299);function a(){return a=Object.assign||function(e){for(var t=1;te instanceof ShadowRoot,c=e=>{const t=e.getRootNode()instanceof ShadowRoot?e.getRootNode().host:e,{dataset:r}=t,n={};for(var i in r){if(!1===r.hasOwnProperty(i))return;const e=`${(o=i.split(/(props?)/).pop()||"").charAt(0).toLowerCase()}${o.slice(1)}`;e&&(n[e]=r[i])}var o;return n},u=e=>["text/props","application/json"].includes(e.getAttribute("type")||""),l=e=>s(e)?[]:Array.from(e.getElementsByTagName("script")).filter(u),f=e=>Array.from(document.querySelectorAll(e)).filter(u),h=e=>{let t={};return e.forEach((e=>{try{t=a({},t,JSON.parse(e.innerHTML))}catch(e){}})),t},d=(e,t,r={},n)=>{const i=c(t),o=e._executedScript?c(e._executedScript):{},s=h(l(t));return a({},r,i,o,n?h(f(n)):{},s)};function p(e,t){var r=(t=[].concat(t))[t.length-1].nextSibling;function n(t,n){e.insertBefore(t,n||r)}return e.__k={nodeType:1,parentNode:e,firstChild:t[0],childNodes:t,insertBefore:n,appendChild:n,removeChild:function(t){e.removeChild(t)}}}const m=({island:e,widget:t,rootFragment:r,props:n})=>{e.props=n,(0,i.XX)((0,i.h)(t,n),r)};function g(){for(var e=arguments.length,t=new Array(e),r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:20,r=[],n=0;n":">",'"':""","'":"'"},E=/[&<>"']/g,F=RegExp(E.source);var A={"&":"&","<":"<",">":">",""":'"',"'":"'"},T=/&(amp|quot|lt|gt|#39);/g,N=RegExp(T.source);function I(e){return e&&N.test(e)?e.replace(T,(function(e){return A[e]})):e}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 k(e){if(!function(e){return"object"===C(e)&&null!==e}(e)||"[object Object]"!==function(e){return null===e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}(e))return!1;if(null===Object.getPrototypeOf(e))return!0;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function D(e){return D="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},D(e)}function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;t",highlightPostTag:""};function M(e){return function(e){return e&&F.test(e)?e.replace(E,(function(e){return x[e]})):e}(e).replace(new RegExp(Q.highlightPreTag,"g"),W.highlightPreTag).replace(new RegExp(Q.highlightPostTag,"g"),W.highlightPostTag)}function q(e){return k(e)&&"string"!=typeof e.value?Object.keys(e).reduce((function(t,r){return U(U({},t),{},$({},r,q(e[r])))}),{}):Array.isArray(e)?e.map(q):U(U({},e),{},{value:M(e.value)})}function V(e){return void 0===e.__escaped&&((e=e.map((function(e){var t=H({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));return t._highlightResult&&(t._highlightResult=q(t._highlightResult)),t._snippetResult&&(t._snippetResult=q(t._snippetResult)),t}))).__escaped=!0),e}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 z(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 G(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:v;return y(e,ie()),function(r){var n,i,o=r||{},a=o.escapeHTML,s=void 0===a||a,c=o.transformItems,u=void 0===c?function(e){return e}:c;return{$$type:"ais.hits",init:function(t){e(re(re({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){var r=this.getWidgetRenderState(t);e(re(re({},r),{},{instantSearchInstance:t.instantSearchInstance}),!1),r.sendEvent("view:internal",r.hits)},getRenderState:function(e,t){return re(re({},e),{},{hits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,o=e.helper,a=e.instantSearchInstance;if(n||(n=function(e){var t=e.instantSearchInstance,r=e.getIndex,n=e.widgetType,i={},o=void 0;return function(){for(var e=arguments.length,a=new Array(e),s=0;s0&&(t.hits=V(t.hits));var c,l,f,h=function(e,t){return t?e.map((function(e){return Y(Y({},e),{},{__queryID:t})})):e}((c=t.hits,l=t.page,f=t.hitsPerPage,c.map((function(e,t){return G(G({},e),{},{__position:f*l+t+1})}))),t.queryID);return{hits:u(h,{results:t}),results:t,sendEvent:n,bindEvent:i,widgetParams:r}},dispose:function(e){var r=e.state;return t(),s?r.setQueryParameters(Object.keys(Q).reduce((function(e,t){return re(re({},e),{},ne({},t,void 0))}),{})):r},getWidgetSearchParameters:function(e){return s?e.setQueryParameters(Q):e}}}};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)}var se=Object.prototype.hasOwnProperty;function ce(e,t,r){if(null!=r&&r(e,t))return!0;var n,i;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((i=e.length)===t.length)for(;i--&&ce(e[i],t[i],r););return-1===i}if(!n||"object"===ae(e)){for(n in i=0,e){if(se.call(e,n)&&++i&&!se.call(t,n))return!1;if(!(n in t)||!ce(e[n],t[n],r))return!1}return Object.keys(t).length===i}}return e!=e&&t!=t}var ue=r(103);function le(e){var t,r,n;return new ue.SearchResults(e,[{query:null!==(t=e.query)&&void 0!==t?t:"",page:null!==(r=e.page)&&void 0!==r?r:0,hitsPerPage:null!==(n=e.hitsPerPage)&&void 0!==n?n:20,hits:[],nbHits:0,nbPages:0,params:"",exhaustiveNbHits:!0,exhaustiveFacetsCount:!0,processingTimeMS:0,index:e.index}],{__isArtificial:!0})}function fe(e){return fe="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},fe(e)}function he(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 de(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);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}function Ue(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=we(),i=_e(),a=ye(),s=Pe(t),c=Pe(r),u=(0,o.useRef)(!0),l=(0,o.useRef)(null),f=(0,o.useRef)(i.status),h=(0,o.useMemo)((function(){var t=e((function(e,t){if(t)u.current=!0;else if(u.current){var r=e.instantSearchInstance,n=(e.widgetParams,Le(e,Te));ce(n,l.current,(function(e,t){return(null==e?void 0:e.constructor)===Function&&(null==t?void 0:t.constructor)===Function}))&&r.status===f.current||(m(n),l.current=n,f.current=r.status)}}),(function(){u.current=!1}));return De(De({},t(s)),c)}),[e,s,c]),d=Ie((0,o.useState)((function(){if(h.getWidgetRenderState){var e,t=a.getHelper(),r=a.getWidgetUiState({})[a.getIndexId()];t.state=(null===(e=h.getWidgetSearchParameters)||void 0===e?void 0:e.call(h,t.state,{uiState:r}))||t.state;var n=me(a),o=n.results,s=n.scopedResults,c=h.getWidgetRenderState({helper:t,parent:a,instantSearchInstance:i,results:o,scopedResults:s,state:t.state,renderState:i.renderState,templatesConfig:i.templatesConfig,createURL:a.createURL,searchMetadata:{isSearchStalled:"stalled"===i.status},status:i.status,error:i.error});c.widgetParams;return Le(c,Ne)}return{}})),2),p=d[0],m=d[1];return function(e){var t,r=e.widget,n=e.parentIndex,i=e.props,a=e.shouldSsr,s=Fe(),c=(0,o.useRef)(i);(0,o.useEffect)((function(){c.current=i}),[i]);var u=(0,o.useRef)(r);(0,o.useEffect)((function(){u.current=r}),[r]);var l,f=(0,o.useRef)(null),h=a&&!n.getWidgets().includes(r),d=_e();xe((function(){var e=u.current;return f.current?(clearTimeout(f.current),ce(i,c.current)||(n.removeWidgets([e]),n.addWidgets([r]))):a||n.addWidgets([r]),function(){f.current=setTimeout((function(){d._schedule((function(){d._preventWidgetCleanup||n.removeWidgets([e])}))}))}}),[n,r,a,d,i]),(h||"pending"===(null==s||null===(t=s.current)||void 0===t?void 0:t.status))&&n.addWidgets([r]),"undefined"==typeof window&&null!=s&&s.current&&"ais.index"!==r.$$type&&(Re(s.current),"ais.dynamicWidgets"!==r.$$type&&null!==(l=d.helper)&&void 0!==l&&l.lastResults&&Re(s.current))}({widget:h,parentIndex:a,props:s,shouldSsr:Boolean(n)}),p}var $e=r(733);function Qe(e){return Qe="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},Qe(e)}var We="_ALGOLIA";function Me(){return function(e){if("object"===("undefined"==typeof document?"undefined":Qe(document))&&"string"==typeof document.cookie)for(var t="".concat(e,"="),r=document.cookie.split(";"),n=0;n1&&void 0!==arguments[1]?arguments[1]:{fallback:function(){}}).fallback;return"undefined"==typeof window?t():e({window})}function Ve(e){return Ve="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},Ve(e)}function Be(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 ze(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{},t=e.insightsClient,r=e.insightsInitParams,n=e.onEvent,i=e.$$internal,o=void 0!==i&&i,a=e.$$automatic,s=void 0!==a&&a,c=t;t||null===t||qe((function(e){var t=e.window,r=t.AlgoliaAnalyticsObject||"aa";"string"==typeof r&&(c=t[r]),c||(t.AlgoliaAnalyticsObject=r,t[r]||(t[r]=function(){t[r].queue||(t[r].queue=[]);for(var e=arguments.length,n=new Array(e),i=0;i1&&void 0!==arguments[1]&&arguments[1],n=nt(e);if(n){var i=c.state.userToken;r?o():setTimeout(o,0)}function o(){c.overrideStateWithoutTriggeringChangeEvent(ze(ze({},c.state),{},{userToken:n})),i&&i!==e&&t.scheduleSearch()}},r=Me();function i(t,r,n){e(t,!0),r&&u("setUserToken",r),n&&u("setAuthenticatedUserToken",n)}r&&e(r,!0);var l=y||g,f=m||p;l?i(l,g,y):f&&i(f,p,m),u("onUserTokenChange",e,{immediate:!0}),u("onAuthenticatedUserTokenChange",(function(t){t||u("getUserToken",null,(function(t,r){e(r)})),e(t)}),{immediate:!0});var v=u;rt(u)&&(v=function(e,t){return u(e,t,{headers:{"X-Algolia-Application-Id":h,"X-Algolia-API-Key":d}})}),t.sendEventToInsights=function(e){n?n(e,v):e.insightsMethod&&(e.payload.algoliaSource=["instantsearch"],s&&e.payload.algoliaSource.push("instantsearch-automatic"),"internal"===e.eventModifier&&e.payload.algoliaSource.push("instantsearch-internal"),v(e.insightsMethod,e.payload))}},unsubscribe:function(){u("onUserTokenChange",void 0),u("onAuthenticatedUserTokenChange",void 0),t.sendEventToInsights=v,c&&a&&(c.overrideStateWithoutTriggeringChangeEvent(ze(ze({},c.state),a)),t.scheduleSearch())}}}}function rt(e){var t=Je((e.version||"").split(".").map(Number),2),r=t[0],n=t[1];return r>=3||2===r&&n>=6||1===r&&n>=10}function nt(e){if(e)return"number"==typeof e?e.toString():e}function it(e,t,r){var n=t.getHelper();return{uiState:r,helper:n,parent:t,instantSearchInstance:e,state:n.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,scopedResults:[],searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function ot(e,t){var r=t.getResults(),n=t.getHelper();return{helper:n,parent:t,instantSearchInstance:e,results:r,scopedResults:t.getScopedResults(),state:r?r._state:n.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function at(e,t,r){var n=it(t,t.mainIndex,t._initialUiState);e.forEach((function(e){var i={};if(e.getWidgetRenderState){var o=e.getWidgetRenderState(n);o&&o.widgetParams&&(i=o.widgetParams)}var a=Object.keys(i).filter((function(e){return void 0!==i[e]}));r.widgets.push({type:e.$$type,widgetType:e.$$widgetType,params:a}),"ais.index"===e.$$type&&at(e.getWidgets(),t,r)}))}function st(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).$$internal,t=void 0!==e&&e;return function(e){var r=e.instantSearchInstance,n={widgets:[]},i=document.createElement("meta"),o=document.querySelector("head");return i.name="instantsearch:widgets",{$$type:"ais.metadata",$$internal:t,onStateChange:function(){},subscribe:function(){setTimeout((function(){var e=r.client;n.ua=e.transporter&&e.transporter.userAgent?e.transporter.userAgent.value:e._ua,at(r.mainIndex.getWidgets(),r,n),r.middleware.forEach((function(e){return n.widgets.push({middleware:!0,type:e.instance.$$type,internal:e.instance.$$internal})})),i.content=JSON.stringify(n),o.appendChild(i)}),0)},started:function(){},unsubscribe:function(){i.remove()}}}}var ct=r(87);function ut(e){return ut="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},ut(e)}function lt(e,t){for(var r=0;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}function St(e){e.configure;return _t(e,gt)}function wt(e){return e!==Object(e)}function Ot(e,t){if(e===t)return!0;if(wt(e)||wt(t)||"function"==typeof e||"function"==typeof t)return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var r=0,n=Object.keys(e);r0&&void 0!==arguments[0]?arguments[0]:{},t=e.router,r=void 0===t?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.createURL,r=void 0===t?function(e){var t=e.qsModule,r=e.routeState,n=e.location,i=n.protocol,o=n.hostname,a=n.port,s=void 0===a?"":a,c=n.pathname,u=n.hash,l=t.stringify(r),f=""===s?"":":".concat(s);return l?"".concat(i,"//").concat(o).concat(f).concat(c,"?").concat(l).concat(u):"".concat(i,"//").concat(o).concat(f).concat(c).concat(u)}:t,n=e.parseURL,i=void 0===n?function(e){var t=e.qsModule,r=e.location;return t.parse(r.search.slice(1),{arrayLimit:99})}:n,o=e.writeDelay,a=void 0===o?400:o,s=e.windowTitle,c=e.getLocation,u=void 0===c?function(){return qe((function(e){return e.window.location}),{fallback:function(){throw new Error("You need to provide `getLocation` to the `history` router in environments where `window` does not exist.")}})}:c,l=e.start,f=e.dispose,h=e.push,d=e.cleanUrlOnDispose;return new pt({createURL:r,parseURL:i,writeDelay:a,windowTitle:s,getLocation:u,start:l,dispose:f,push:h,cleanUrlOnDispose:d})}():t,n=e.stateMapping,i=void 0===n?{$$type:"ais.simple",stateToRoute:function(e){return Object.keys(e).reduce((function(t,r){return yt(yt({},t),{},bt({},r,St(e[r])))}),{})},routeToState:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,r){return yt(yt({},t),{},bt({},r,St(e[r])))}),{})}}:n,o=e.$$internal,a=void 0!==o&&o;return function(e){var t=e.instantSearchInstance;t._createURL=function(e){var n=0===t.mainIndex.getWidgets().length?t._initialUiState:t.mainIndex.getWidgetUiState({}),o=Object.keys(e).reduce((function(t,r){return Rt(Rt({},t),{},xt({},r,e[r]))}),n),a=i.stateToRoute(o);return r.createURL(a)};var n=void 0,o=t._initialUiState;return{$$type:"ais.router({router:".concat(r.$$type||"__unknown__",", stateMapping:").concat(i.$$type||"__unknown__","})"),$$internal:a,onStateChange:function(e){var t=e.uiState,o=i.stateToRoute(t);void 0!==n&&Ot(n,o)||(r.write(o),n=o)},subscribe:function(){t._initialUiState=Rt(Rt({},o),i.routeToState(r.read())),r.onUpdate((function(e){t.mainIndex.getWidgets().length>0&&t.setUiState(i.routeToState(e))}))},started:function(){var e;null===(e=r.start)||void 0===e||e.call(r)},unsubscribe:function(){r.dispose()}}}};function Ft(e){return"ais.index"===e.$$type}function At(e){return At="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},At(e)}var Tt=["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"];function Nt(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 It(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}var Dt=function(e,t){return e.setQueryParameters({hierarchicalFacets:t.hierarchicalFacets.reduce((function(e,t){var r=function(e,t){if(!Array.isArray(e))return-1;for(var r=0;r0?e.setQueryParameters({ruleContexts:r}):e}(c,t),l=function(e,t){return t.facets.reduce((function(e,t){return e.addFacet(t)}),e)}(u,t);return function(e,t){t.facets,t.disjunctiveFacets,t.facetsRefinements,t.facetsExcludes,t.disjunctiveFacetsRefinements,t.numericRefinements,t.tagRefinements,t.hierarchicalFacets,t.hierarchicalFacetsRefinements,t.ruleContexts;var r=kt(t,Tt);return e.setQueryParameters(r)}(l,t)}))};function Lt(e){return Lt="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},Lt(e)}var Ut=["initialSearchParameters"],$t=["initialRecommendParameters"];function Qt(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 Wt(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}var zt=g({name:"index-widget"});function Gt(e,t){var r=t.state,n=t.recommendState,i=t.isPageReset,o=t._uiState;r!==e.state&&(e.state=r,e.emit("change",{state:e.state,results:e.lastResults,isPageReset:i,_uiState:o})),n!==e.recommendState&&(e.recommendState=n)}function Jt(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.reduce((function(e,r){return Ft(r)?e:r.getWidgetUiState||r.getWidgetState?r.getWidgetUiState?r.getWidgetUiState(e,t):r.getWidgetState(e,t):e}),r)}function Xt(e,t){var r=t.initialSearchParameters,n=Bt(t,Ut);return e.reduce((function(e,t){return!t.getWidgetSearchParameters||Ft(t)?e:"search"===t.dependsOn&&t.getWidgetParameters?t.getWidgetParameters(e,n):t.getWidgetSearchParameters(e,n)}),r)}function Kt(e,t){var r=t.initialRecommendParameters,n=Bt(t,$t);return e.reduce((function(e,t){return!Ft(t)&&"recommend"===t.dependsOn&&t.getWidgetParameters?t.getWidgetParameters(e,n):e}),r)}function Yt(e){var t=e.filter(Ft);0!==t.length&&t.forEach((function(e){var t=e.getHelper();Gt(t,{state:t.state.resetPage(),recommendState:t.recommendState,isPageReset:!0}),Yt(e.getWidgets())}))}function Zt(e){return e.filter(Ft).reduce((function(e,t){return e.concat.apply(e,[{indexId:t.getIndexId(),results:t.getResults(),helper:t.getHelper()}].concat(qt(Zt(t.getWidgets()))))}),[])}const er=function(e){if(void 0===e||void 0===e.indexName)throw new Error(zt("The `indexName` option is required."));var t=e.indexName,r=e.indexId,n=void 0===r?t:r,i=[],o={},a=null,s=null,c=null,u=null,l=null;return{$$type:"ais.index",$$widgetType:"ais.index",getIndexName:function(){return t},getIndexId:function(){return n},getHelper:function(){return c},getResults:function(){var e;return null!==(e=u)&&void 0!==e&&e.lastResults?(u.lastResults._state=c.state,u.lastResults):null},getPreviousState:function(){return l},getScopedResults:function(){var e=this.getParent();return Zt(e?e.getWidgets():[this])},getParent:function(){return s},createURL:function(e){return"function"==typeof e?a._createURL(Mt({},n,e(o))):a._createURL(Mt({},n,Jt(i,{searchParameters:e,helper:c})))},getWidgets:function(){return i},addWidgets:function(e){var t=this;if(!Array.isArray(e))throw new Error(zt("The `addWidgets` method expects an array of widgets."));if(e.some((function(e){return"function"!=typeof e.init&&"function"!=typeof e.render})))throw new Error(zt("The widget definition expects a `render` and/or an `init` method."));return i=i.concat(e),a&&Boolean(e.length)&&(Gt(c,{state:Xt(i,{uiState:o,initialSearchParameters:c.state}),recommendState:Kt(i,{uiState:o,initialRecommendParameters:c.recommendState}),_uiState:o}),e.forEach((function(e){e.getRenderState&&tr({renderState:e.getRenderState(a.renderState[t.getIndexId()]||{},it(a,t,a._initialUiState)),instantSearchInstance:a,parent:t})})),e.forEach((function(e){e.init&&e.init(it(a,t,a._initialUiState))})),a.scheduleSearch()),this},removeWidgets:function(e){var t=this;if(!Array.isArray(e))throw new Error(zt("The `removeWidgets` method expects an array of widgets."));if(e.some((function(e){return"function"!=typeof e.dispose})))throw new Error(zt("The widget definition expects a `dispose` method."));if(i=i.filter((function(t){return-1===e.indexOf(t)})),a&&Boolean(e.length)){var r=e.reduce((function(e,r){return r.dispose({helper:c,state:e,parent:t})||e}),c.state),n=a.future.preserveSharedStateOnUnmount?Xt(i,{uiState:o,initialSearchParameters:new ue.SearchParameters({index:this.getIndexName()})}):Xt(i,{uiState:Jt(i,{searchParameters:r,helper:c}),initialSearchParameters:r});o=Jt(i,{searchParameters:n,helper:c}),c.setState(n),i.length&&a.scheduleSearch()}return this},init:function(e){var r,f=this,h=e.instantSearchInstance,d=e.parent,p=e.uiState;if(null===c){a=h,s=d,o=p[n]||{};var m=h.mainHelper,g=Xt(i,{uiState:o,initialSearchParameters:new ue.SearchParameters({index:t})}),v=Kt(i,{uiState:o,initialRecommendParameters:new ue.RecommendParameters});(c=ue({},g.index,g)).recommendState=v,c.search=function(){return h.onStateChange?(h.onStateChange({uiState:h.mainIndex.getWidgetUiState({}),setUiState:function(e){return h.setUiState(e,!1)}}),m):m.search()},c.searchWithoutTriggeringOnStateChange=function(){return m.search()},c.searchForFacetValues=function(e,t,r,n){var i=c.state.setQueryParameters(n);return m.searchForFacetValues(e,t,r,i)},u=m.derive((function(){return Ht.apply(void 0,[m.state].concat(qt(function(e){for(var t=e.getParent(),r=[e.getHelper().state];null!==t;)r=[t.getHelper().state].concat(r),t=t.getParent();return r}(f))))}),(function(){return f.getHelper().recommendState}));var y=null===(r=h._initialResults)||void 0===r?void 0:r[this.getIndexId()];if(y){var b=new ue.SearchResults(new ue.SearchParameters(y.state),y.results);u.lastResults=b,c.lastResults=b}c.on("change",(function(e){e.isPageReset&&Yt(i)})),u.on("search",(function(){h.scheduleStalledRender()})),u.on("result",(function(e){var t=e.results;h.scheduleRender(),c.lastResults=t,l=null==t?void 0:t._state})),u.on("recommend:result",(function(e){var t=e.recommend;h.scheduleRender(),c.lastRecommendResults=t.results})),i.forEach((function(e){e.getRenderState&&tr({renderState:e.getRenderState(h.renderState[f.getIndexId()]||{},it(h,f,p)),instantSearchInstance:h,parent:f})})),i.forEach((function(e){e.init&&e.init(it(h,f,p))})),c.on("change",(function(e){var t=e.state,r=e._uiState;o=Jt(i,{searchParameters:t,helper:c},r||{}),h.onStateChange||h.onInternalStateChange()})),y&&h.scheduleRender()}},render:function(e){var t=this,r=e.instantSearchInstance;"error"===r.status&&!r.mainHelper.hasPendingRequests()&&l&&c.setState(l);var n=this.getResults()?i:i.filter(Ft);(n=n.filter((function(e){return!e.shouldRender||e.shouldRender({instantSearchInstance:r})}))).forEach((function(e){e.getRenderState&&tr({renderState:e.getRenderState(r.renderState[t.getIndexId()]||{},ot(r,t)),instantSearchInstance:r,parent:t})})),n.forEach((function(e){e.render&&e.render(ot(r,t))}))},dispose:function(){var e,t,r=this;i.forEach((function(e){e.dispose&&e.dispose({helper:c,state:c.state,parent:r})})),a=null,s=null,null===(e=c)||void 0===e||e.removeAllListeners(),c=null,null===(t=u)||void 0===t||t.detach(),u=null},getWidgetUiState:function(e){return i.filter(Ft).reduce((function(e,t){return t.getWidgetUiState(e)}),Wt(Wt({},e),{},Mt({},n,Wt(Wt({},e[n]),o))))},getWidgetState:function(e){return this.getWidgetUiState(e)},getWidgetSearchParameters:function(e,t){var r=t.uiState;return Xt(i,{uiState:r,initialSearchParameters:e})},refreshUiState:function(){o=Jt(i,{searchParameters:this.getHelper().state,helper:this.getHelper()},o)},setIndexUiState:function(e){var t="function"==typeof e?e(o):e;a.setUiState((function(e){return Wt(Wt({},e),{},Mt({},n,t))}))}}};function tr(e){var t=e.renderState,r=e.instantSearchInstance,n=e.parent,i=n?n.getIndexId():r.mainIndex.getIndexId();r.renderState=Wt(Wt({},r.renderState),{},Mt({},i,Wt(Wt({},r.renderState[i]),t)))}var rr=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.descendantName,n=t.modifierName,i=r?"-".concat(r):"",o=n?"--".concat(n):"";return"".concat("ais","-").concat(e).concat(i).concat(o)}};function nr(e,t){return(Array.isArray(t)?t:t.split(".")).reduce((function(e,t){return e&&e[t]}),e)}var ir=rr("Highlight");function or(e){var t=W.highlightPreTag,r=W.highlightPostTag;return e.map((function(e){return e.isHighlighted?t+e.value+r:e.value})).join("")}var ar=new RegExp(/\w/i);function sr(e,t){var r,n,i=e[t],o=(null===(r=e[t+1])||void 0===r?void 0:r.isHighlighted)||!0,a=(null===(n=e[t-1])||void 0===n?void 0:n.isHighlighted)||!0;return ar.test(I(i.value))||a!==o?i.isHighlighted:a}function cr(e){return cr="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},cr(e)}function ur(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 lr(e){for(var t=1;t')).replace(new RegExp(W.highlightPostTag,"g"),""))}(Sr(Sr({},JSON.parse(e)),{},{hit:this})))}catch(e){throw new Error('\nThe highlight helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}},reverseHighlight:function(e,t){try{return t(function(e){var t=e.attribute,r=e.highlightedTagName,n=void 0===r?"mark":r,i=e.hit,o=e.cssClasses,a=void 0===o?{}:o,s=(nr(i._highlightResult,t)||{}).value,c=void 0===s?"":s,u=pr({descendantName:"highlighted"})+(a.highlighted?" ".concat(a.highlighted):"");return or(hr(dr(c))).replace(new RegExp(W.highlightPreTag,"g"),"<".concat(n,' class="').concat(u,'">')).replace(new RegExp(W.highlightPostTag,"g"),""))}(Sr(Sr({},JSON.parse(e)),{},{hit:this})))}catch(e){throw new Error('\n The reverseHighlight helper expects a JSON object of the format:\n { "attribute": "name", "highlightedTagName": "mark" }')}},snippet:function(e,t){try{return t(function(e){var t=e.attribute,r=e.highlightedTagName,n=void 0===r?"mark":r,i=e.hit,o=e.cssClasses,a=void 0===o?{}:o,s=(nr(i._snippetResult,t)||{}).value,c=void 0===s?"":s,u=mr({descendantName:"highlighted"})+(a.highlighted?" ".concat(a.highlighted):"");return c.replace(new RegExp(W.highlightPreTag,"g"),"<".concat(n,' class="').concat(u,'">')).replace(new RegExp(W.highlightPostTag,"g"),""))}(Sr(Sr({},JSON.parse(e)),{},{hit:this})))}catch(e){throw new Error('\nThe snippet helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}},reverseSnippet:function(e,t){try{return t(function(e){var t=e.attribute,r=e.highlightedTagName,n=void 0===r?"mark":r,i=e.hit,o=e.cssClasses,a=void 0===o?{}:o,s=(nr(i._snippetResult,t)||{}).value,c=void 0===s?"":s,u=gr({descendantName:"highlighted"})+(a.highlighted?" ".concat(a.highlighted):"");return or(hr(dr(c))).replace(new RegExp(W.highlightPreTag,"g"),"<".concat(n,' class="').concat(u,'">')).replace(new RegExp(W.highlightPostTag,"g"),""))}(Sr(Sr({},JSON.parse(e)),{},{hit:this})))}catch(e){throw new Error('\n The reverseSnippet helper expects a JSON object of the format:\n { "attribute": "name", "highlightedTagName": "mark" }')}},insights:function(e,t){try{var r=JSON.parse(e),n=r.method,i=r.payload;return t(yr(n,Sr({objectIDs:[this.objectID]},i)))}catch(e){throw new Error('\nThe insights helper expects a JSON object of the format:\n{ "method": "method-name", "payload": { "eventName": "name of the event" } }')}}}}var jr=Promise.resolve();function Pr(e){var t=null,r=!1,n=function(){for(var n=arguments.length,i=new Array(n),o=0;oe.length)&&(t=e.length);for(var r=0,n=new Array(t);r1?t-1:0),n=1;n0&&void 0!==arguments[0])||arguments[0];null!==(e=t.mainHelper)&&void 0!==e&&e.hasPendingRequests()||(clearTimeout(t._searchStalledTimer),t._searchStalledTimer=null,r&&(t.status="idle",t.error=void 0)),t.mainIndex.render({instantSearchInstance:$r(t)}),t.emit("render")}))),Wr($r(t),"onInternalStateChange",Pr((function(){var e=t.mainIndex.getWidgetUiState({});t.middleware.forEach((function(t){t.instance.onStateChange({uiState:e})}))}))),t.setMaxListeners(100);var r=e.indexName,n=void 0===r?"":r,a=e.numberLocale,s=e.initialUiState,c=void 0===s?{}:s,u=e.routing,l=void 0===u?null:u,f=e.insights,h=void 0===f?void 0:f,d=e.searchFunction,p=e.stalledSearchDelay,m=void 0===p?200:p,g=e.searchClient,y=void 0===g?null:g,b=e.insightsClient,_=void 0===b?null:b,S=e.onStateChange,w=void 0===S?null:S,O=e.future,j=void 0===O?Dr(Dr({},Br),e.future||{}):O;if(null===y)throw new Error(qr("The `searchClient` option is required."));if("function"!=typeof y.search)throw new Error("The `searchClient` must implement a `search` method.\n\nSee: https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/backend-instantsearch/js/");if("function"==typeof y.addAlgoliaAgent&&y.addAlgoliaAgent("instantsearch.js (".concat("4.67.0",")")),_&&"function"!=typeof _)throw new Error(qr("The `insightsClient` option should be a function."));if(t.client=y,t.future=j,t.insightsClient=_,t.indexName=n,t.helper=null,t.mainHelper=null,t.mainIndex=er({indexName:n}),t.onStateChange=w,t.started=!1,t.templatesConfig={helpers:Or({numberLocale:a}),compileOptions:{}},t._stalledSearchDelay=m,t._searchStalledTimer=null,t._createURL=Vr,t._initialUiState=c,t._initialResults=null,t._insights=h,d&&(t._searchFunction=d),t.sendEventToInsights=v,l){var P="boolean"==typeof l?{}:l;P.$$internal=!0,t.use(Et(P))}if(h){var R="boolean"==typeof h?{}:h;R.$$internal=!0,t.use(tt(R))}return qe((function(e){var t,r;return(null===(t=e.window.navigator)||void 0===t||null===(r=t.userAgent)||void 0===r?void 0:r.indexOf("Algolia Crawler"))>-1}),{fallback:function(){return!1}})&&t.use(st({$$internal:!0})),t}return t=o,r=[{key:"_isSearchStalled",get:function(){return"stalled"===this.status}},{key:"use",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n1?r-1:0),o=1;o0&&this.scheduleSearch();this.helper=this.mainIndex.getHelper(),this.started=!0,this.middleware.forEach((function(e){e.instance.started()})),void 0===this._insights&&t.derivedHelpers[0].once("result",(function(){e.mainIndex.getScopedResults().some((function(e){var t=e.results;return null==t?void 0:t._automaticInsights}))&&e.use(tt({$$internal:!0,$$automatic:!0}))}))}},{key:"dispose",value:function(){var e;this.scheduleSearch.cancel(),this.scheduleRender.cancel(),clearTimeout(this._searchStalledTimer),this.removeWidgets(this.mainIndex.getWidgets()),this.mainIndex.dispose(),this.started=!1,this.removeAllListeners(),null===(e=this.mainHelper)||void 0===e||e.removeAllListeners(),this.mainHelper=null,this.helper=null,this.middleware.forEach((function(e){e.instance.unsubscribe()}))}},{key:"scheduleStalledRender",value:function(){var e=this;this._searchStalledTimer||(this._searchStalledTimer=setTimeout((function(){e.status="stalled",e.scheduleRender()}),this._stalledSearchDelay))}},{key:"setUiState",value:function(e){var t=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!this.mainHelper)throw new Error(qr("The `start` method needs to be called before `setUiState`."));this.mainIndex.refreshUiState();var n="function"==typeof e?e(this.mainIndex.getWidgetUiState({})):e;this.onStateChange&&r?this.onStateChange({uiState:n,setUiState:function(e){Ir("function"==typeof e?e(n):e,t.mainIndex),t.scheduleSearch(),t.onInternalStateChange()}}):(Ir(n,this.mainIndex),this.scheduleSearch(),this.onInternalStateChange())}},{key:"getUiState",value:function(){return this.started&&this.mainIndex.refreshUiState(),this.mainIndex.getWidgetUiState({})}},{key:"createURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.started)throw new Error(qr("The `start` method needs to be called before `createURL`."));return this._createURL(e)}},{key:"refresh",value:function(){if(!this.mainHelper)throw new Error(qr("The `start` method needs to be called before `refresh`."));this.mainHelper.clearCache().search()}}],r&&Hr(t.prototype,r),n&&Hr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),o}($e);const Gr=zr;var Jr=r(888);const Xr="7.7.2";function Kr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],c=!0,u=!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)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Yr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yr(e,t)}(e,t)||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.")}()}function Yr(e,t){(null==t||t>e.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}function hn(e){var t=e.children,r=cn(fn(e,ln));return r.started?o.default.createElement(be.Provider,{value:r},o.default.createElement(ve.Provider,{value:r.mainIndex},t)):null}function dn(e){return dn="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},dn(e)}function pn(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 mn(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:v;return y(e,vn()),function(r){var n,i,o=(r||{}).queryHook,a=void 0===o?yn:o;return{$$type:"ais.searchBox",init:function(t){var r=t.instantSearchInstance;e(mn(mn({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!0)},render:function(t){var r=t.instantSearchInstance;e(mn(mn({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!1)},dispose:function(e){var r=e.state;return t(),r.setQueryParameter("query",void 0)},getRenderState:function(e,t){return mn(mn({},e),{},{searchBox:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.helper,o=e.instantSearchInstance,s=e.state;return n||(n=function(e){a(e,(function(e){return t.setQuery(e).search()}))},i=function(){t.setQuery("").search()}),{query:s.query||"",refine:n,clear:i,widgetParams:r,isSearchStalled:"stalled"===o.status}},getWidgetUiState:function(e,t){var r=t.searchParameters.query||"";return""===r||e&&e.query===r?e:mn(mn({},e),{},{query:r})},getWidgetSearchParameters:function(e,t){var r=t.uiState;return e.setQueryParameter("query",r.query||"")}}}};function _n(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 Sn(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}var In=g({name:"refinement-list",connector:!0}),Cn=["isRefined","count:desc","name:asc"];const kn=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:v;return y(e,In()),function(r){var n=r||{},i=n.attribute,o=n.operator,a=void 0===o?"or":o,s=n.limit,c=void 0===s?10:s,u=n.showMore,l=void 0!==u&&u,f=n.showMoreLimit,h=void 0===f?20:f,d=n.sortBy,p=void 0===d?Cn:d,m=n.escapeFacetValues,g=void 0===m||m,v=n.transformItems,y=void 0===v?function(e){return e}:v;if(!i)throw new Error(In("The `attribute` option is required."));if(!/^(and|or)$/.test(a))throw new Error(In('The `operator` must one of: `"and"`, `"or"` (got "'.concat(a,'").')));if(!0===l&&h<=c)throw new Error(In("`showMoreLimit` should be greater than `limit`."));var b,_,S,w=function(e){var t=e.name,r=e.escapedValue;return An(An({},Nn(e,xn)),{},{value:r,label:t,highlighted:t})},O=[],j=!0,P=!1,R=function(){};function x(){R()}function E(){return P?h:c}var F=function(){return function(){}},A=function(t,r){return function(n){return function(o){var a=n.instantSearchInstance,s=n.results;if(""===o&&O)e(An(An({},r.getWidgetRenderState(An(An({},n),{},{results:b}))),{},{instantSearchInstance:a}),!1);else{var c={highlightPreTag:g?Q.highlightPreTag:W.highlightPreTag,highlightPostTag:g?Q.highlightPostTag:W.highlightPostTag};t.searchForFacetValues(i,o,Math.min(E(),100),c).then((function(t){var i=g?t.facetHits.map((function(e){return U(U({},e),{},{highlighted:M(e.highlighted)})})):t.facetHits,o=y(i.map((function(e){var t=e.escapedValue,r=e.value;return An(An({},Nn(e,En)),{},{value:t,label:r})})),{results:s});e(An(An({},r.getWidgetRenderState(An(An({},n),{},{results:b}))),{},{items:o,canToggleShowMore:!1,canRefine:!0,isFromSearch:!0,instantSearchInstance:a}),!1)}))}}}};return{$$type:"ais.refinementList",init:function(t){e(An(An({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){e(An(An({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1)},getRenderState:function(e,t){return An(An({},e),{},{refinementList:An(An({},e.refinementList),{},Tn({},i,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t=this,n=e.results,o=e.state,a=e.createURL,s=e.instantSearchInstance,u=e.helper,f=[],h=[];if(S&&_&&F||(S=function(e){var t=e.instantSearchInstance,r=e.helper,n=e.attribute,i=e.widgetType;return function(){for(var e=arguments.length,o=new Array(e),a=0;a=2&&o.length<=4&&(function(e,t,r){return e.state.isHierarchicalFacet(t)?e.state.isHierarchicalFacetRefined(t,r):e.state.isConjunctiveFacet(t)?e.state.isFacetRefined(t,r):e.state.isDisjunctiveFacetRefined(t,r)}(r,m,s)||t.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:i,eventType:d,eventModifier:p,payload:Sn({eventName:u,index:r.getIndex(),filters:["".concat(m,":").concat(s)]},f),attribute:m}))}}({instantSearchInstance:s,helper:u,attribute:i,widgetType:this.$$type}),_=function(e){S("click:internal",e),u.toggleFacetRefinement(i,e).search()},F=A(u,this)),n){var d=n.getFacetValues(i,{sortBy:p,facetOrdering:p===Cn});h=d&&Array.isArray(d)?d:[],f=y(h.slice(0,E()).map(w),{results:n});var m=o.maxValuesPerFacet,g=E();j=m>g?h.length<=g:h.lengthc||l&&!j;return{createURL:function(e){return a((function(r){return t.getWidgetUiState(r,{searchParameters:o.resetPage().toggleFacetRefinement(i,e),helper:u})}))},items:f,refine:_,searchForItems:v,isFromSearch:!1,canRefine:f.length>0,widgetParams:r,isShowingMore:P,canToggleShowMore:T,toggleShowMore:x,sendEvent:S,hasExhaustiveItems:j}},dispose:function(e){var r=e.state;t();var n=r.setQueryParameter("maxValuesPerFacet",void 0);return"and"===a?n.removeFacet(i):n.removeDisjunctiveFacet(i)},getWidgetUiState:function(e,t){var r=t.searchParameters,n="or"===a?r.getDisjunctiveRefinements(i):r.getConjunctiveRefinements(i);return function(e,t){if(!e.refinementList)return e;e.refinementList[t]&&0!==e.refinementList[t].length||delete e.refinementList[t];0===Object.keys(e.refinementList).length&&delete e.refinementList;return e}(An(An({},e),{},{refinementList:An(An({},e.refinementList),{},Tn({},i,n))}),i)},getWidgetSearchParameters:function(e,t){var r=t.uiState,n="or"===a;if(e.isHierarchicalFacet(i))return e;if(n&&e.isConjunctiveFacet(i)||!n&&e.isDisjunctiveFacet(i))return e;var o=r.refinementList&&r.refinementList[i],s=n?e.addDisjunctiveFacet(i).removeDisjunctiveFacetRefinement(i):e.addFacet(i).removeFacetRefinement(i),u=s.maxValuesPerFacet||0,f=Math.max(u,l?h:c),d=s.setQueryParameter("maxValuesPerFacet",f);if(!o){var p=n?"disjunctiveFacetsRefinements":"facetsRefinements";return d.setQueryParameters(Tn({},p,An(An({},d[p]),{},Tn({},i,[]))))}return o.reduce((function(e,t){return n?e.addDisjunctiveFacetRefinement(i,t):e.addFacetRefinement(i,t)}),d)}}}};function Dn(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],c=!0,u=!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)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Hn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Hn(e,t)}(e,t)||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.")}()}function Hn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{}).catchError,t=_e(),r=function(){var e=_e(),t=ye(),r=t.getIndexId(),n=Ln((0,o.useState)((function(){return e.getUiState()})),2),i=n[0],a=n[1],s=i[r],c=Ln((0,o.useState)((function(){return e.renderState})),2),u=c[0],l=c[1],f=u[r]||{},h=(0,o.useCallback)((function(t){e.setUiState(t)}),[e]),d=(0,o.useCallback)((function(e){t.setIndexUiState(e)}),[t]);return(0,o.useEffect)((function(){function t(){a(e.getUiState()),l(e.renderState)}return e.addListener("render",t),function(){e.removeListener("render",t)}}),[e]),{uiState:i,setUiState:h,indexUiState:s,setIndexUiState:d,renderState:u,indexRenderState:f}}(),n=r.uiState,i=r.setUiState,a=r.indexUiState,s=r.setIndexUiState,c=r.renderState,u=r.indexRenderState,l=function(){var e=_e(),t=ye(),r=Dn((0,o.useState)((function(){return me(t)})),2),n=r[0],i=r[1];return(0,o.useEffect)((function(){function r(){var e=t.getResults();null!==e&&i({results:e,scopedResults:t.getScopedResults()})}return e.addListener("render",r),function(){e.removeListener("render",r)}}),[e,t]),n}(),f=l.results,h=l.scopedResults,d=(0,o.useCallback)((function(){for(var e=arguments.length,r=new Array(e),n=0;n{let r="loading"===e?"Loading":null;return"loading"!=e&&t&&(r=`Showing results for "${t}"`),Wn("div",{className:"visually-hidden","aria-live":"polite","aria-atomic":!0,children:r})},qn=e=>{var t;const r=(0,o.useRef)(!1),n=new URLSearchParams(window.location.search),{query:i,refine:a}=function(e,t){return Ue(bn,e,t)}(e),{items:s,refine:c}=function(e,t){return Ue(kn,e,t)}({attribute:"basic_page_type"}),[u,l]=(0,o.useState)((null===(t=n.get("basic-page-type"))||void 0===t?void 0:t.split(","))||[]),{status:f}=$n(),h=(0,o.useRef)(null);return(0,o.useEffect)((()=>{r.current||(r.current=!0,u.map((e=>c(e))))}),[r,u]),Wn("form",{action:"",role:"search",className:"left-region flex-lg-3-of-12",noValidate:!0,onSubmit:e=>{var t,r,n;e.preventDefault(),e.stopPropagation(),a(null===(t=h.current)||void 0===t?void 0:t.value);[...u.filter((e=>!s.find((t=>t.value===e)).isRefined)),...s.filter((e=>e.isRefined&&!u.includes(e.value))).map((e=>e.value))].map((e=>c(e)));const i=new URLSearchParams(window.location.search);(null===(r=h.current)||void 0===r?void 0:r.value.length)>0?i.set("key",null===(n=h.current)||void 0===n?void 0:n.value):i.delete("key"),u.length>0?i.set("basic-page-type",u.join(",")):i.delete("basic-page-type"),window.history.replaceState(null,"",`?${i.toString()}`)},onReset:e=>{var t;e.preventDefault(),e.stopPropagation(),a(""),h.current.value="",null===(t=h.current)||void 0===t||t.focus(),s.filter((e=>e.isRefined)).map((e=>c(e.value))),l([]);const r=new URLSearchParams(window.location.search);r.delete("key"),r.delete("basic-page-type"),window.history.replaceState(null,"",`?${r.toString()}`)},style:{marginBottom:"20px"},children:[Wn("div",{className:"lg:w-2/3 mx-auto mb-20 flex gap-5 items-center",children:[Wn("label",{htmlFor:"keyword-search-algolia",children:["Keywords",Wn("span",{className:"visually-hidden",children:" Search"})]}),Wn("input",{id:"keyword-search-algolia",className:"flex-grow border-0 border-b border-black-30 text-m2",ref:h,autoComplete:"on",autoCorrect:"on",autoCapitalize:"off",spellCheck:!0,maxLength:128,type:"search",defaultValue:i,autoFocus:!0}),Wn("div",{style:{display:"flex",gap:"1rem",marginTop:"1rem"},children:[Wn("button",{type:"submit",children:"Submit"}),Wn("button",{type:"reset",children:"Reset"})]})]}),Wn("fieldset",{children:[Wn("legend",{children:"Basic Page Types"}),Wn("ul",{style:{listStyle:"none"},children:s.sort(((e,t)=>e.countWn("li",{children:Wn("label",{style:{"margin-top":"1rem"},children:[Wn("input",{type:"checkbox",checked:u.findIndex((t=>t===e.value))>=0,onChange:r=>{l((t=>{const n=[...t];return r.currentTarget.checked?n.push(e.value):n.splice(t.findIndex((t=>t===e.value)),1),n})),((r,n,i,o)=>{console.log(t),console.log(e.value),r.preventDefault(),r.stopPropagation(),a(null===(n=h.current)||void 0===n?void 0:n.value);const l=u.filter((e=>!s.find((t=>t.value===e)).isRefined));[...l,...s.filter((e=>e.isRefined&&!u.includes(e.value))).map((e=>e.value))].map((e=>c(e)));const f=new URLSearchParams(window.location.search);(null===(i=h.current)||void 0===i?void 0:i.value.length)>0?f.set("key",null===(o=h.current)||void 0===o?void 0:o.value):f.delete("key"),u.length>0?f.set("basic-page-type",u.join(",")):f.delete("basic-page-type"),window.history.replaceState(null,"",`?${f.toString()}`)})(r)},style:{border:"black",width:"12px",height:"12px",float:"left",clip:"unset",overflow:"unset",position:"relative","clip-path":"unset"}}),e.value," (",e.count,")"]})},t)))})]}),Wn("fieldset",{children:[Wn("legend",{children:"Subject"}),Wn("ul",{style:{listStyle:"none"}})]}),"Status: ",Wn(Mn,{status:f,query:i})]})};var Vn=function(){return Vn=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0?fi(wi,--_i):0,yi--,10===Si&&(yi=1,vi--),Si}function xi(){return Si=_i2||Ti(Si)>3?"":" "}function Di(e,t){for(;--t&&xi()&&!(Si<48||Si>102||Si>57&&Si<65||Si>70&&Si<97););return Ai(e,Fi()+(t<6&&32==Ei()&&32==xi()))}function Hi(e){for(;xi();)switch(Si){case e:return _i;case 34:case 39:34!==e&&39!==e&&Hi(Si);break;case 40:41===e&&Hi(e);break;case 92:xi()}return _i}function Li(e,t){for(;xi()&&e+Si!==57&&(e+Si!==84||47!==Ei()););return"/*"+Ai(t,_i-1)+"*"+oi(47===e?e:xi())}function Ui(e){for(;!Ti(Ei());)xi();return Ai(e,_i)}function $i(e,t){for(var r="",n=0;n6)switch(fi(e,t+1)){case 109:if(45!==fi(e,t+4))break;case 102:return ui(e,/(.+:)(.+)-([^]+)/,"$1"+Kn+"$2-$3$1"+Xn+(108==fi(e,t+3)?"$3":"$2-$3"))+e;case 115:return~li(e,"stretch",0)?Wi(ui(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return ui(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,(function(t,r,n,i,o,a,s){return Jn+r+":"+n+s+(i?Jn+r+"-span:"+(o?a:+a-+n)+s:"")+e}));case 4949:if(121===fi(e,t+6))return ui(e,":",":"+Kn)+e;break;case 6444:switch(fi(e,45===fi(e,14)?18:11)){case 120:return ui(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Kn+(45===fi(e,14)?"inline-":"")+"box$3$1"+Kn+"$2$3$1"+Jn+"$2box$3")+e;case 100:return ui(e,":",":"+Jn)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return ui(e,"scroll-","scroll-snap-")+e}return e}function Mi(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case ei:return void(e.return=Wi(e.value,e.length,r));case ri:return $i([ji(e,{value:ui(e.value,"@","@"+Kn)})],n);case Zn:if(e.length)return function(e,t){return e.map(t).join("")}(r=e.props,(function(t){switch(ci(t,n=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Pi(ji(e,{props:[ui(t,/:(read-\w+)/,":"+Xn+"$1")]})),Pi(ji(e,{props:[t]})),ai(e,{props:gi(r,n)});break;case"::placeholder":Pi(ji(e,{props:[ui(t,/:(plac\w+)/,":"+Kn+"input-$1")]})),Pi(ji(e,{props:[ui(t,/:(plac\w+)/,":"+Xn+"$1")]})),Pi(ji(e,{props:[ui(t,/:(plac\w+)/,Jn+"input-$1")]})),Pi(ji(e,{props:[t]})),ai(e,{props:gi(r,n)})}return""}))}}function qi(e){return Ii(Vi("",null,null,null,[""],e=Ni(e),0,[0],e))}function Vi(e,t,r,n,i,o,a,s,c){for(var u=0,l=0,f=a,h=0,d=0,p=0,m=1,g=1,v=1,y=0,b="",_=i,S=o,w=n,O=b;g;)switch(p=y,y=xi()){case 40:if(108!=p&&58==fi(O,f-1)){-1!=li(O+=ui(Ci(y),"&","&\f"),"&\f",ii(u?s[u-1]:0))&&(v=-1);break}case 34:case 39:case 91:O+=Ci(y);break;case 9:case 10:case 13:case 32:O+=ki(p);break;case 92:O+=Di(Fi()-1,7);continue;case 47:switch(Ei()){case 42:case 47:mi(zi(Li(xi(),Fi()),t,r,c),c);break;default:O+="/"}break;case 123*m:s[u++]=di(O)*v;case 125*m:case 59:case 0:switch(y){case 0:case 125:g=0;case 59+l:-1==v&&(O=ui(O,/\f/g,"")),d>0&&di(O)-f&&mi(d>32?Gi(O+";",n,r,f-1,c):Gi(ui(O," ","")+";",n,r,f-2,c),c);break;case 59:O+=";";default:if(mi(w=Bi(O,t,r,u,l,i,s,b,_=[],S=[],f,o),o),123===y)if(0===l)Vi(O,t,w,w,_,o,f,s,S);else switch(99===h&&110===fi(O,3)?100:h){case 100:case 108:case 109:case 115:Vi(e,w,w,n&&mi(Bi(e,w,w,0,0,i,s,b,i,_=[],f,S),S),i,S,f,s,n?_:S);break;default:Vi(O,w,w,w,[""],S,0,s,S)}}u=l=d=0,m=v=1,b=O="",f=a;break;case 58:f=1+di(O),d=p;default:if(m<1)if(123==y)--m;else if(125==y&&0==m++&&125==Ri())continue;switch(O+=oi(y),y*m){case 38:v=l>0?1:(O+="\f",-1);break;case 44:s[u++]=(di(O)-1)*v,v=1;break;case 64:45===Ei()&&(O+=Ci(xi())),h=Ei(),l=f=di(b=O+=Ui(Fi())),y++;break;case 45:45===p&&2==di(O)&&(m=0)}}return o}function Bi(e,t,r,n,i,o,a,s,c,u,l,f){for(var h=i-1,d=0===i?o:[""],p=pi(d),m=0,g=0,v=0;m0?d[y]+" "+b:ui(b,/&\f/g,d[y])))&&(c[v++]=_);return Oi(e,t,r,0===i?Zn:s,c,u,l,f)}function zi(e,t,r,n){return Oi(e,t,r,Yn,oi(Si),hi(e,2,-2),0,n)}function Gi(e,t,r,n,i){return Oi(e,t,r,ei,hi(e,0,n),hi(e,n+1,-1),n,i)}const Ji={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var Xi="undefined"!=typeof process&&("MISSING_ENV_VAR".REACT_APP_SC_ATTR||"MISSING_ENV_VAR".SC_ATTR)||"data-styled",Ki="active",Yi="data-styled-version",Zi="6.1.8",eo="/*!sc*/\n",to="undefined"!=typeof window&&"HTMLElement"in window,ro=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!=="MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY&&""!=="MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY?"false"!=="MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY&&"MISSING_ENV_VAR".REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!=="MISSING_ENV_VAR".SC_DISABLE_SPEEDY&&""!=="MISSING_ENV_VAR".SC_DISABLE_SPEEDY&&("false"!=="MISSING_ENV_VAR".SC_DISABLE_SPEEDY&&"MISSING_ENV_VAR".SC_DISABLE_SPEEDY)),no=(new Set,Object.freeze([])),io=Object.freeze({});function oo(e,t,r){return void 0===r&&(r=io),e.theme!==r.theme&&e.theme||t||r.theme}var ao=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),so=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,co=/(^-|-$)/g;function uo(e){return e.replace(so,"-").replace(co,"")}var lo=/(a)(d)/gi,fo=52,ho=function(e){return String.fromCharCode(e+(e>25?39:97))};function po(e){var t,r="";for(t=Math.abs(e);t>fo;t=t/fo|0)r=ho(t%fo)+r;return(ho(t%fo)+r).replace(lo,"$1-$2")}var mo,go=5381,vo=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},yo=function(e){return vo(go,e)};function bo(e){return po(yo(e)>>>0)}function _o(e){return e.displayName||e.name||"Component"}function So(e){return"string"==typeof e&&!0}var wo="function"==typeof Symbol&&Symbol.for,Oo=wo?Symbol.for("react.memo"):60115,jo=wo?Symbol.for("react.forward_ref"):60112,Po={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Ro={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},xo={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Eo=((mo={})[jo]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},mo[Oo]=xo,mo);function Fo(e){return("type"in(t=e)&&t.type.$$typeof)===Oo?xo:"$$typeof"in e?Eo[e.$$typeof]:Po;var t}var Ao=Object.defineProperty,To=Object.getOwnPropertyNames,No=Object.getOwnPropertySymbols,Io=Object.getOwnPropertyDescriptor,Co=Object.getPrototypeOf,ko=Object.prototype;function Do(e,t,r){if("string"!=typeof t){if(ko){var n=Co(t);n&&n!==ko&&Do(e,n,r)}var i=To(t);No&&(i=i.concat(No(t)));for(var o=Fo(e),a=Fo(t),s=0;s0?" Args: ".concat(t.join(", ")):""))}var Vo=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}return e.prototype.indexOfGroup=function(e){for(var t=0,r=0;r=this.groupSizes.length){for(var r=this.groupSizes,n=r.length,i=n;e>=i;)if((i<<=1)<0)throw qo(16,"".concat(e));this.groupSizes=new Uint32Array(i),this.groupSizes.set(r),this.length=i;for(var o=n;o=this.length||0===this.groupSizes[e])return t;for(var r=this.groupSizes[e],n=this.indexOfGroup(e),i=n+r,o=n;o=0){var r=document.createTextNode(t);return this.element.insertBefore(r,this.nodes[e]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},e.prototype.getRule=function(e){return e0&&(c+="".concat(e,","))})),n+="".concat(a).concat(s,'{content:"').concat(c,'"}').concat(eo)},o=0;o0?".".concat(t):e},l=c.slice();l.push((function(e){e.type===Zn&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(ua,r).replace(n,u))})),a.prefix&&l.push(Mi),l.push(Qi);var f=function(e,i,o,s){void 0===i&&(i=""),void 0===o&&(o=""),void 0===s&&(s="&"),t=s,r=i,n=new RegExp("\\".concat(r,"\\b"),"g");var c=e.replace(la,""),u=qi(o||i?"".concat(o," ").concat(i," { ").concat(c," }"):c);a.namespace&&(u=fa(u,a.namespace));var f,h,d,p=[];return $i(u,(f=l.concat((d=function(e){return p.push(e)},function(e){e.root||(e=e.return)&&d(e)})),h=pi(f),function(e,t,r,n){for(var i="",o=0;o="A"&&e<="Z"};function Sa(e){for(var t="",r=0;r>>0);if(!t.hasNameForId(this.componentId,o)){var a=r(i,".".concat(o),void 0,this.componentId);t.insertRules(this.componentId,o,a)}n=Uo(n,o),this.staticRulesId=o}else{for(var s=vo(this.baseHash,r.hash),c="",u=0;u>>0);t.hasNameForId(this.componentId,h)||t.insertRules(this.componentId,h,r(c,".".concat(h),void 0,this.componentId)),n=Uo(n,h)}}return n},e}(),Ea=o.default.createContext(void 0);Ea.Consumer;var Fa={};new Set;function Aa(e,t,r){var n=Lo(e),i=e,a=!So(e),s=t.attrs,c=void 0===s?no:s,u=t.componentId,l=void 0===u?function(e,t){var r="string"!=typeof e?"sc":uo(e);Fa[r]=(Fa[r]||0)+1;var n="".concat(r,"-").concat(bo(Zi+r+Fa[r]));return t?"".concat(t,"-").concat(n):n}(t.displayName,t.parentComponentId):u,f=t.displayName,h=void 0===f?function(e){return So(e)?"styled.".concat(e):"Styled(".concat(_o(e),")")}(e):f,d=t.displayName&&t.componentId?"".concat(uo(t.displayName),"-").concat(t.componentId):t.componentId||l,p=n&&i.attrs?i.attrs.concat(c).filter(Boolean):c,m=t.shouldForwardProp;if(n&&i.shouldForwardProp){var g=i.shouldForwardProp;if(t.shouldForwardProp){var v=t.shouldForwardProp;m=function(e,t){return g(e,t)&&v(e,t)}}else m=g}var y=new xa(r,d,n?i.componentStyle:void 0);function b(e,t){return function(e,t,r){var n=e.attrs,i=e.componentStyle,a=e.defaultProps,s=e.foldedComponentIds,c=e.styledComponentId,u=e.target,l=o.default.useContext(Ea),f=va(),h=e.shouldForwardProp||f.shouldForwardProp,d=oo(t,l,a)||io,p=function(e,t,r){for(var n,i=Vn(Vn({},t),{className:void 0,theme:r}),o=0;o2&&ca.registerId(this.componentId+e),this.removeStyles(e,r),this.createStyles(e,t,r,n)}}();(function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString(),r=ta(),n=$o([r&&'nonce="'.concat(r,'"'),"".concat(Xi,'="true"'),"".concat(Yi,'="').concat(Zi,'"')].filter(Boolean)," ");return"")},this.getStyleTags=function(){if(e.sealed)throw qo(2);return e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)throw qo(2);var r=((t={})[Xi]="",t[Yi]=Zi,t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),n=ta();return n&&(r.nonce=n),[o.default.createElement("style",Vn({},r,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new ca({isServer:!0}),this.sealed=!1}e.prototype.collectStyles=function(e){if(this.sealed)throw qo(2);return o.default.createElement(ya,{sheet:this.instance},e)},e.prototype.interleaveWithNodeStream=function(e){throw qo(3)}})(),"__sc-".concat(Xi,"__");function Ha(){for(var e=arguments.length,t=new Array(e),r=0;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}var $a=["parts","highlightedTagName","nonHighlightedTagName","separator","className","classNames"];var Qa,Wa,Ma,qa,Va=(Qa={createElement:o.createElement,Fragment:o.Fragment},Wa=Qa.createElement,Ma=Qa.Fragment,qa=function(e){var t=e.createElement;return function(e){var r=e.classNames,n=e.children,i=e.highlightedTagName,o=e.isHighlighted,a=e.nonHighlightedTagName;return t(o?i:a,{className:o?r.highlighted:r.nonHighlighted},n)}}({createElement:Wa,Fragment:Ma}),function(e){var t=e.parts,r=e.highlightedTagName,n=void 0===r?"mark":r,i=e.nonHighlightedTagName,o=void 0===i?"span":i,a=e.separator,s=void 0===a?", ":a,c=e.className,u=e.classNames,l=void 0===u?{}:u,f=Ua(e,$a);return Wa("span",La({},f,{className:Ha(l.root,c)}),t.map((function(e,r){var i=r===t.length-1;return Wa(Ma,{key:r},e.map((function(e,t){return Wa(qa,{key:t,classNames:l,highlightedTagName:n,nonHighlightedTagName:o,isHighlighted:e.isHighlighted},e.value)})),!i&&Wa("span",{className:l.separator},s))})))}),Ba=["classNames"];function za(){return za=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 Ja(e){var t=e.classNames,r=void 0===t?{}:t,n=Ga(e,Ba);return o.default.createElement(Va,za({classNames:{root:Ha("ais-Highlight",r.root),highlighted:Ha("ais-Highlight-highlighted",r.highlighted),nonHighlighted:Ha("ais-Highlight-nonHighlighted",r.nonHighlighted),separator:Ha("ais-Highlight-separator",r.separator)}},n))}var Xa=["hit","attribute","highlightedTagName","nonHighlightedTagName","separator"];function Ka(){return Ka=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 Za(e){var t=e.hit,r=e.attribute,n=e.highlightedTagName,i=e.nonHighlightedTagName,a=e.separator,s=Ya(e,Xa),c=nr(t._highlightResult,r)||[],u=(Array.isArray(c)?c:[c]).map((function(e){return dr(I(e.value||""))}));return o.default.createElement(Ja,Ka({},s,{parts:u,highlightedTagName:n,nonHighlightedTagName:i,separator:a}))}var es=["classNames"];function ts(){return ts=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 ns(e){var t=e.classNames,r=void 0===t?{}:t,n=rs(e,es);return o.default.createElement(Va,ts({classNames:{root:Ha("ais-Snippet",r.root),highlighted:Ha("ais-Snippet-highlighted",r.highlighted),nonHighlighted:Ha("ais-Snippet-nonHighlighted",r.nonHighlighted),separator:Ha("ais-Snippet-separator",r.separator)}},n))}var is=["hit","attribute","highlightedTagName","nonHighlightedTagName","separator"];function os(){return os=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 ss(e){var t=e.hit,r=e.attribute,n=e.highlightedTagName,i=e.nonHighlightedTagName,a=e.separator,s=as(e,is),c=nr(t._snippetResult,r)||[],u=(Array.isArray(c)?c:[c]).map((function(e){return dr(I(e.value||""))}));return o.default.createElement(ns,os({},s,{parts:u,highlightedTagName:n,nonHighlightedTagName:i,separator:a}))}const cs=Da.article` display: flex; flex-direction: column; justify-content: space-between; @@ -30,4 +30,4 @@ border-bottom: none; } } -`,Ss=e=>{const{hits:t}=function(e,t){return Ue(oe,e,t)}(e);return 0===t.length?Wn("p",{children:"No results for your search. Please try another search."}):Wn("ul",{style:{listStyle:"none",padding:0},className:"flex-lg-9-of-12 main-region",children:t.map((e=>Wn("li",{children:Wn(bs,{hit:e})},e.objectID)))})},ws=((e,t)=>{if(null==customElements.get(e)){class t extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}}customElements.define(e,t)}const r=(e=>{const t={_rootsToObservers:new WeakMap,_roots:[],_executedScript:document.currentScript,props:{},render:({selector:r,clean:n=!1,replace:i=!1,inline:o=!1,initialProps:c={},propsSelector:u,elementName:h})=>{let g=!1;const v=()=>{if(!0===g)return;const v=(({selector:e,inline:t,elementName:r})=>{const n=document.currentScript;if(t&&null!=n&&n.parentNode)return[n.parentNode];const i=null==n?void 0:n.dataset.mountIn;return i?Array.from(document.querySelectorAll(i)).map((e=>{if(null!=r){const t=document.createElement(r),n=e.appendChild(t);return null!=n.shadowRoot?n.shadowRoot:n}return e})):e?Array.from(document.querySelectorAll(e)).map((e=>null!=e.shadowRoot?e.shadowRoot:e)):[]})({selector:r,inline:o,elementName:h});if(0===v.length)return;const{rootFragments:y}=(({island:e,widget:t,hostElements:r,clean:n,replace:i,initialProps:o,propsSelector:c})=>{const u=[];return r.forEach((r=>{const h=d(e,r,o,c);let g;if(n&&r.replaceChildren(),i)g=p(r.parentElement||document.body,r);else{const e=document.createElement("div");r.appendChild(e),g=p(r,e)}u.push(g),m({island:e,widget:t,rootFragment:g,props:h});const v=(({island:e,hostElement:t,initialProps:r,onNewProps:n,propsSelector:i})=>{const o=new MutationObserver((function(o){o.forEach((function(){n(d(e,t,r,i))}))})),c={attributes:!0,childList:!0,characterData:!0};return e._executedScript&&o.observe(e._executedScript,c),l(t).forEach((e=>{o.observe(e,a({},c,{subtree:!0}))})),i&&f(i).forEach((e=>{o.observe(e,a({},c,{subtree:!0}))})),o.observe(s(t)?t.host:t,c),o})({island:e,hostElement:r,initialProps:o,onNewProps:r=>{m({island:e,widget:t,rootFragment:g,props:r})},propsSelector:c});e._rootsToObservers.set(g,v)})),{rootFragments:u}})({island:t,widget:e,clean:n,hostElements:v,replace:i,initialProps:c,propsSelector:u});t._roots=t._roots.concat(y),g=!0};v(),document.addEventListener("DOMContentLoaded",v),document.addEventListener("load",v)},rerender:r=>{t._roots.forEach((n=>{m({island:t,widget:e,rootFragment:n,props:a({},t.props,r)})}))},destroy:()=>{t._roots.forEach((e=>{var r;null==(r=t._rootsToObservers.get(e))||r.disconnect(),(0,i.XX)(null,e)}))}};return t})(t);return a({},r,{render:t=>r.render(a({elementName:e},t)),injectStyles:e=>{r._roots.forEach((t=>{const r=document.createElement("style");r.innerHTML=e,t.parentNode.prepend(r)}))}})})(ms,(()=>{var e;const t=new URLSearchParams(window.location.search).get("key"),r=(null===(e=window.drupalSettings)||void 0===e?void 0:e.stanfordAlgolia.index)||"MISSING_ENV_VAR".ALGOLIA_INDEX;return Wn("div",{className:"this works",children:Wn(hn,{searchClient:ys,indexName:r,initialUiState:{[r]:{query:t}},children:Wn(_s,{className:"flex-container",children:[Wn(qn,{}),Wn(Ss,{})]})})})}));ws.render({selector:`${ms}, #${ms}`})})(),n})())); \ No newline at end of file +`,Ss=e=>{const{hits:t}=function(e,t){return Ue(oe,e,t)}(e);return 0===t.length?Wn("p",{children:"No results for your search. Please try another search."}):Wn("ul",{style:{listStyle:"none",padding:0},className:"flex-lg-9-of-12 main-region",children:t.map((e=>Wn("li",{children:Wn(bs,{hit:e})},e.objectID)))})},ws=((e,t)=>{if(null==customElements.get(e)){class t extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}}customElements.define(e,t)}const r=(e=>{const t={_rootsToObservers:new WeakMap,_roots:[],_executedScript:document.currentScript,props:{},render:({selector:r,clean:n=!1,replace:i=!1,inline:o=!1,initialProps:c={},propsSelector:u,elementName:h})=>{let g=!1;const v=()=>{if(!0===g)return;const v=(({selector:e,inline:t,elementName:r})=>{const n=document.currentScript;if(t&&null!=n&&n.parentNode)return[n.parentNode];const i=null==n?void 0:n.dataset.mountIn;return i?Array.from(document.querySelectorAll(i)).map((e=>{if(null!=r){const t=document.createElement(r),n=e.appendChild(t);return null!=n.shadowRoot?n.shadowRoot:n}return e})):e?Array.from(document.querySelectorAll(e)).map((e=>null!=e.shadowRoot?e.shadowRoot:e)):[]})({selector:r,inline:o,elementName:h});if(0===v.length)return;const{rootFragments:y}=(({island:e,widget:t,hostElements:r,clean:n,replace:i,initialProps:o,propsSelector:c})=>{const u=[];return r.forEach((r=>{const h=d(e,r,o,c);let g;if(n&&r.replaceChildren(),i)g=p(r.parentElement||document.body,r);else{const e=document.createElement("div");r.appendChild(e),g=p(r,e)}u.push(g),m({island:e,widget:t,rootFragment:g,props:h});const v=(({island:e,hostElement:t,initialProps:r,onNewProps:n,propsSelector:i})=>{const o=new MutationObserver((function(o){o.forEach((function(){n(d(e,t,r,i))}))})),c={attributes:!0,childList:!0,characterData:!0};return e._executedScript&&o.observe(e._executedScript,c),l(t).forEach((e=>{o.observe(e,a({},c,{subtree:!0}))})),i&&f(i).forEach((e=>{o.observe(e,a({},c,{subtree:!0}))})),o.observe(s(t)?t.host:t,c),o})({island:e,hostElement:r,initialProps:o,onNewProps:r=>{m({island:e,widget:t,rootFragment:g,props:r})},propsSelector:c});e._rootsToObservers.set(g,v)})),{rootFragments:u}})({island:t,widget:e,clean:n,hostElements:v,replace:i,initialProps:c,propsSelector:u});t._roots=t._roots.concat(y),g=!0};v(),document.addEventListener("DOMContentLoaded",v),document.addEventListener("load",v)},rerender:r=>{t._roots.forEach((n=>{m({island:t,widget:e,rootFragment:n,props:a({},t.props,r)})}))},destroy:()=>{t._roots.forEach((e=>{var r;null==(r=t._rootsToObservers.get(e))||r.disconnect(),(0,i.XX)(null,e)}))}};return t})(t);return a({},r,{render:t=>r.render(a({elementName:e},t)),injectStyles:e=>{r._roots.forEach((t=>{const r=document.createElement("style");r.innerHTML=e,t.parentNode.prepend(r)}))}})})(ms,(()=>{var e;const t=new URLSearchParams(window.location.search).get("key"),r=(null===(e=window.drupalSettings)||void 0===e?void 0:e.stanfordAlgolia.index)||"MISSING_ENV_VAR".ALGOLIA_INDEX;return Wn("div",{className:"works",children:Wn(hn,{searchClient:ys,indexName:r,initialUiState:{[r]:{query:t}},children:Wn(_s,{className:"flex-container",children:[Wn(qn,{}),Wn(Ss,{})]})})})}));ws.render({selector:`${ms}, #${ms}`})})(),n})())); \ No newline at end of file diff --git a/algolia-search/src/search-form.tsx b/algolia-search/src/search-form.tsx index 780a550..5f0a86e 100644 --- a/algolia-search/src/search-form.tsx +++ b/algolia-search/src/search-form.tsx @@ -11,14 +11,14 @@ const SearchForm = (props) => { const windowSearchParams = new URLSearchParams(window.location.search) const {query, refine} = useSearchBox(props); const {items: pageTypeRefinements, refine: refineNewsType} = useRefinementList({attribute: "basic_page_type"}); - const [chosenNewsTypes, setChosenNewsTypes] = useState(windowSearchParams.get('news-types')?.split(',') || []); + const [chosenBasicPageTypes, setChosenNewsTypes] = useState(windowSearchParams.get('basic-page-type')?.split(',') || []); const {status} = useInstantSearch(); const inputRef = useRef(null); useEffect(() => { if (ref.current) return ref.current = true; - chosenNewsTypes.map(newsType => refineNewsType(newsType)); - }, [ref, chosenNewsTypes]) + chosenBasicPageTypes.map(basicPageType => refineNewsType(basicPageType)); + }, [ref, chosenBasicPageTypes]) return (
{ e.stopPropagation(); refine(inputRef.current?.value); - const addRefinements = chosenNewsTypes.filter(newsType => !pageTypeRefinements.find(item => item.value === newsType).isRefined) - const removeRefinements = pageTypeRefinements.filter(refinement => refinement.isRefined && !chosenNewsTypes.includes(refinement.value)).map(refinement => refinement.value); + const addRefinements = chosenBasicPageTypes.filter(basicPageType => !pageTypeRefinements.find(item => item.value === basicPageType).isRefined) + const removeRefinements = pageTypeRefinements.filter(refinement => refinement.isRefined && !chosenBasicPageTypes.includes(refinement.value)).map(refinement => refinement.value); - [...addRefinements, ...removeRefinements].map(newsType => refineNewsType(newsType)) + [...addRefinements, ...removeRefinements].map(basicPageType => refineNewsType(basicPageType)) const searchParams = new URLSearchParams(window.location.search) inputRef.current?.value.length > 0 ? searchParams.set('key', inputRef.current?.value): searchParams.delete('key'); - chosenNewsTypes.length > 0 ? searchParams.set('news-types', chosenNewsTypes.join(',')) : searchParams.delete('news-types') + chosenBasicPageTypes.length > 0 ? searchParams.set('basic-page-type', chosenBasicPageTypes.join(',')) : searchParams.delete('basic-page-type') window.history.replaceState(null, '', `?${searchParams.toString()}`) }} @@ -53,7 +53,7 @@ const SearchForm = (props) => { setChosenNewsTypes([]); const searchParams = new URLSearchParams(window.location.search) searchParams.delete('key') - searchParams.delete('news-types'); + searchParams.delete('basic-page-type'); window.history.replaceState(null, '', `?${searchParams.toString()}`) }} style={{marginBottom: "20px"}} @@ -95,17 +95,36 @@ const SearchForm = (props) => { }}> value === item.value) >= 0} + checked={chosenBasicPageTypes.findIndex(value => value === item.value) >= 0} onChange={(e) => { setChosenNewsTypes(prevTypes => { - const newTypes = [...prevTypes]; + const pageTypes = [...prevTypes]; if (e.currentTarget.checked) { - newTypes.push(item.value); + pageTypes.push(item.value); } else { - newTypes.splice(prevTypes.findIndex(value => value === item.value), 1) + pageTypes.splice(prevTypes.findIndex(value => value === item.value), 1) } - return newTypes; + return pageTypes; }); + ((e) => { + console.log(i); + console.log(item.value); + e.preventDefault(); + e.stopPropagation(); + refine(inputRef.current?.value); + + const addRefinements = chosenBasicPageTypes.filter(basicPageType => !pageTypeRefinements.find(item => item.value === basicPageType).isRefined) + const removeRefinements = pageTypeRefinements.filter(refinement => refinement.isRefined && !chosenBasicPageTypes.includes(refinement.value)).map(refinement => refinement.value); + + [...addRefinements, ...removeRefinements].map(basicPageType => refineNewsType(basicPageType)) + + const searchParams = new URLSearchParams(window.location.search) + inputRef.current?.value.length > 0 ? searchParams.set('key', inputRef.current?.value): searchParams.delete('key'); + chosenBasicPageTypes.length > 0 ? searchParams.set('basic-page-type', chosenBasicPageTypes.join(',')) : searchParams.delete('basic-page-type') + + window.history.replaceState(null, '', `?${searchParams.toString()}`) + + })(e) }} style={{ border: 'black', @@ -131,7 +150,7 @@ const SearchForm = (props) => { - + Status: ); }