1import{ag as Jn,ah as Tt,ai as ou,aj as Ti,ak as uu,f as Q,A as Ce,al as cu,F as Fe,U as Vt,k as G,h as ot,e as K,N as be,x as J,i as de,H as Ae,y as St,B as Ie,a3 as Ws,D as We,am as lu,z as Pe,an as fu,J as du,a as hu,_ as gu,n as mu,o as vu,s as pu,g as Ee,E as yu,M as Su,G as Ru,r as Nt,m as bu}from"./CxaD00LB.js";function _u(e,t,n){if(!e)throw new Error("You need to provide `widgetName` in your data");var r=["ais-".concat(e)];return t&&r.push("-".concat(t)),n&&r.push("--".concat(n)),r.join("")}var ae=function(e){var t=e.name;return{props:{classNames:{type:Object,default:void 0}},methods:{suit:function(n,r){var a=_u(t,n,r),i=this.classNames&&this.classNames[a];return i?[a,i].join(" "):a}}}};function N(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable}))),r.forEach(function(a){wu(e,a,n[a])})}return e}function wu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Be(e){"@swc/helpers - typeof";return e&&typeof Symbol<"u"&&e.constructor===Symbol?"symbol":typeof e}var Oi=new Set;function Rt(e){Oi.has(e)||(Oi.add(e),console.warn(e))}var le=function(){var e,t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).connector,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return N(e={inject:{instantSearchInstance:{from:"$_ais_instantSearchInstance",default:function(){var r=this.$options._componentTag;throw new TypeError('It looks like you forgot to wrap your Algolia search component "<'.concat(r,'>" inside of an "<ais-instant-search>" component.'))}},getParentIndex:{from:"$_ais_getParentIndex",default:function(){var r=this;return function(){return r.instantSearchInstance.mainIndex}}}},data:function(){return{state:null}},created:function(){if(typeof t=="function"){if(this.factory=t(this.updateState,function(){}),this.widget=jt(this.factory(this.widgetParams),n),this.getParentIndex().addWidgets([this.widget]),this.instantSearchInstance._initialResults&&!this.instantSearchInstance.started){if(typeof this.instantSearchInstance.__forceRender!="function")throw new Error("You are using server side rendering with <ais-instant-search> instead of <ais-instant-search-ssr>.");this.instantSearchInstance.__forceRender(this.widget,this.getParentIndex())}}else t!==!0&&Rt(`You are using the InstantSearch widget mixin, but didn't provide a connector. 2While this is technically possible, and will give you access to the Helper, 3it's not the recommended way of making custom components. 4 5If you want to disable this message, pass { connector: true } to the mixin. 6 7Read more on using connectors: https://alg.li/vue-custom`)}},"beforeUnmount",function(){this.widget&&this.getParentIndex().removeWidgets([this.widget])}),N(e,"watch",{widgetParams:{handler:function(r){this.state=null;var a=this.widget;this.widget=jt(this.factory(r),n),this.getParentIndex().updateWidget(a,this.widget)},deep:!0}}),N(e,"methods",{updateState:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};arguments.length>1&&arguments[1]&&this.widget.dependsOn!=="none"||(this.state=r)}}),e};function E(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(a){return Object.getOwnPropertyDescriptor(n,a).enumerable}))),r.forEach(function(a){N(e,a,n[a])})}return e}function Pu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}function O(e,t){return t=t??{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Pu(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function Fu(e){var t=e.name,n=e.connector,r=n===void 0?!1:n;return["https://www.algolia.com/doc/api-reference/widgets/",t,"/js/",r?"#connector":""].join("")}function ge(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.map(function(a){return Fu(a)}).join(", ");return function(a){return[a,"See documentation: ".concat(r)].filter(
7Boolean).join(` 8 9`)}}function xu(e){return Object.prototype.toString.call(e).slice(8,-1)}function Se(e,t){if(e===void 0||typeof e!="function")throw new Error("The render function is not valid (received type ".concat(xu(e),`). 10 11`).concat(t))}function kn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Iu(e){if(Array.isArray(e))return kn(e)}function Eu(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Au(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 12In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Hs(e,t){if(e){if(typeof e=="string")return kn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kn(e,t)}}function ce(e){return Iu(e)||Eu(e)||Hs(e)||Au()}function Bn(){return Bn=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Bn.apply(this,arguments)}function Tu(e){if(e==null)throw new TypeError("Cannot destructure "+e);return e}var Ou={"&":"&","<":"<",">":">",'"':""","'":"'"},Ns=/[&<>"']/g,ju=RegExp(Ns.source);function Cu(e){return e&&ju.test(e)?e.replace(Ns,function(t){return Ou[t]}):e}var $u={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ms=/&(amp|quot|lt|gt|#39);/g,Lu=RegExp(Ms.source);function Wu(e){return e&&Lu.test(e)?e.replace(Ms,function(t){return $u[t]}):e}function Hu(e){return e===null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function Nu(e){return(typeof e>"u"?"undefined":Be(e))==="object"&&e!==null}function Us(e){if(!Nu(e)||Hu(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}var Ve={highlightPreTag:"__ais-highlight__",highlightPostTag:"__/ais-highlight__"},_t={highlightPreTag:"<mark>",highlightPostTag:"</mark>"};function Ds(e){return Cu(e).replace(new RegExp(Ve.highlightPreTag,"g"),_t.highlightPreTag).replace(new RegExp(Ve.highlightPostTag,"g"),_t.highlightPostTag)}function zt(e){return Us(e)&&typeof e.value!="string"?Object.keys(e).reduce(function(t,n){return O(E({},t),N({},n,zt(e[n])))},{}):Array.isArray(e)?e.map(zt):O(E({},e),{value:Ds(e.value)})}function Yn(e){return e.__escaped===void 0&&(e=e.map(function(t){Tu(t);var n=Bn({},t);return n._highlightResult&&(n._highlightResult=zt(n._highlightResult)),n._snippetResult&&(n._snippetResult=zt(n._snippetResult)),n}),e.__escaped=!0),e}function Mu(e){return e.map(function(t){return O(E({},t),{highlighted:Ds(t.highlighted)})})}function Xn(e,t,n){return e.map(function(r,a){return O(E({},r),{__position:n*t+a+1})})}function Zn(e,t){return t?e.map(function(n){return O(E({},n),{__queryID:t})}):e}function he(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n]}var cr,ji;function ei(){if(ji)return cr;ji=1;function e(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}cr=e,e.prototype._events=void 0,e.prototype._maxListeners=void 0,e.defaultMaxListeners=10,e.prototype.setMaxListeners=function(i){if(!n(i)||i<0||isNaN(i))throw TypeError("n must be a positive number");return this._maxListeners=i,this},e.prototype.emit=function(i){var o,u,d,f,p,h;if(this._events||(this._events={}),i==="error"&&(!this._events.error||r(this._events.error)&&!this._events.error.length)){if(o=arguments[1],o instanceof Error)throw o;var _=new Error('Uncaught, unspecified "error" event. ('+o+")");throw _.context=o,_}if(u=this._events[i],a(u))return!1;if(t(u))switch(arguments.length){case 1:u.call(this);break;case 2:u.call(this,arguments[1]);break;case 3:u.call(this,arguments[1],arguments[2]);break;default:f=Array.prototype.slice.call(arguments,1),u.apply(this,f)}
12else if(r(u))for(f=Array.prototype.slice.call(arguments,1),h=u.slice(),d=h.length,p=0;p<d;p++)h[p].apply(this,f);return!0},e.prototype.addListener=function(i,o){var u;if(!t(o))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",i,t(o.listener)?o.listener:o),this._events[i]?r(this._events[i])?this._events[i].push(o):this._events[i]=[this._events[i],o]:this._events[i]=o,r(this._events[i])&&!this._events[i].warned&&(a(this._maxListeners)?u=e.defaultMaxListeners:u=this._maxListeners,u&&u>0&&this._events[i].length>u&&(this._events[i].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[i].length),typeof console.trace=="function"&&console.trace())),this},e.prototype.on=e.prototype.addListener,e.prototype.once=function(i,o){if(!t(o))throw TypeError("listener must be a function");var u=!1;function d(){this.removeListener(i,d),u||(u=!0,o.apply(this,arguments))}return d.listener=o,this.on(i,d),this},e.prototype.removeListener=function(i,o){var u,d,f,p;if(!t(o))throw TypeError("listener must be a function");if(!this._events||!this._events[i])return this;if(u=this._events[i],f=u.length,d=-1,u===o||t(u.listener)&&u.listener===o)delete this._events[i],this._events.removeListener&&this.emit("removeListener",i,o);else if(r(u)){for(p=f;p-- >0;)if(u[p]===o||u[p].listener&&u[p].listener===o){d=p;break}if(d<0)return this;u.length===1?(u.length=0,delete this._events[i]):u.splice(d,1),this._events.removeListener&&this.emit("removeListener",i,o)}return this},e.prototype.removeAllListeners=function(i){var o,u;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[i]&&delete this._events[i],this;if(arguments.length===0){for(o in this._events)o!=="removeListener"&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events={},this}if(u=this._events[i],t(u))this.removeListener(i,u);else if(u)for(;u.length;)this.removeListener(i,u[u.length-1]);return delete this._events[i],this},e.prototype.listeners=function(i){var o;return!this._events||!this._events[i]?o=[]:t(this._events[i])?o=[this._events[i]]:o=this._events[i].slice(),o},e.prototype.listenerCount=function(i){if(this._events){var o=this._events[i];if(t(o))return 1;if(o)return o.length}return 0},e.listenerCount=function(i,o){return i.listenerCount(o)};function t(i){return typeof i=="function"}function n(i){return typeof i=="number"}function r(i){return typeof i=="object"&&i!==null}function a(i){return i===void 0}return cr}var lr,Ci;function qs(){if(Ci)return lr;Ci=1;function e(t,n){t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}return lr=e,lr}var fr,$i;
12function Uu(){if($i)return fr;$i=1;var e=ei(),t=qs();function n(r,a,i){this.main=r,this.fn=a,this.recommendFn=i,this.lastResults=null,this.lastRecommendResults=null}return t(n,e),n.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},n.prototype.getModifiedState=function(r){return this.fn(r)},n.prototype.getModifiedRecommendState=function(r){return this.recommendFn(r)},fr=n,fr}var dr,Li;function ti(){if(Li)return dr;Li=1;function e(n){return typeof n!="string"?n:String(n).replace(/^-/,"\\-")}function t(n){return typeof n!="string"?n:n.replace(/^\\-/,"-")}return dr={escapeFacetValue:e,unescapeFacetValue:t},dr}var hr,Wi;function ri(){if(Wi)return hr;Wi=1;function e(a){return typeof a=="object"&&a!==null?n(Array.isArray(a)?[]:{},a):a}function t(a){return typeof a=="function"||Array.isArray(a)||Object.prototype.toString.call(a)==="[object Object]"}function n(a,i){if(a===i)return a;for(var o in i)if(!(!Object.prototype.hasOwnProperty.call(i,o)||o==="__proto__"||o==="constructor")){var u=i[o],d=a[o];typeof d<"u"&&typeof u>"u"||(t(d)&&t(u)?a[o]=n(d,u):a[o]=e(u))}return a}function r(a){t(a)||(a={});for(var i=1,o=arguments.length;i<o;i++){var u=arguments[i];t(u)&&n(a,u)}return a}return hr=r,hr}var gr,Hi;function ni(){if(Hi)return gr;Hi=1;function e(t){return t&&Object.keys(t).length>0}return gr=e,gr}var mr,Ni;function ii(){if(Ni)return mr;Ni=1;function e(t,n){if(t===null)return{};var r={},a=Object.keys(t),i,o;for(o=0;o<a.length;o++)i=a[o],!(n.indexOf(i)>=0)&&(r[i]=t[i]);return r}return mr=e,mr}var vr,Mi;function ks(){if(Mi)return vr;Mi=1;function e(t){t=t||{},this.params=t.params||[]}return e.prototype={constructor:e,addParams:function(t){var n=this.params.slice();return n.push(t),new e({params:n})},removeParams:function(t){return new e({params:this.params.filter(function(n){return n.$$id!==t})})},addFrequentlyBoughtTogether:function(t){return this.addParams(Object.assign({},t,{model:"bought-together"}))},addRelatedProducts:function(t){return this.addParams(Object.assign({},t,{model:"related-products"}))},addTrendingItems:function(t){return this.addParams(Object.assign({},t,{model:"trending-items"}))},addTrendingFacets:function(t){return this.addParams(Object.assign({},t,{model:"trending-facets"}))},addLookingSimilar:function(t){return this.addParams(Object.assign({},t,{model:"looking-similar"}))},_buildQueries:function(t,n){return this.params.filter(function(r){return n[r.$$id]===void 0}).map(function(r){var a=Object.assign({},r,{indexName:t,threshold:r.threshold||0});return delete a.$$id,a})}},vr=e,vr}var pr,Ui;function Bs(){if(Ui)return pr;Ui=1;function e(t,n){this._state=t,this._rawResults={};var r=this;t.params.forEach(function(a){var i=a.$$id;r[i]=n[i],r._rawResults[i]=n[i]})}return e.prototype={constructor:e},pr=e,pr}var yr,Di;function Du(){if(Di)return yr;Di=1;var e=ri();function t(r){return Object.keys(r).sort().reduce(function(a,i){return a[i]=r[i],a},{})}var n={_getQueries:function(a,i){var o=[];return o.push({indexName:a,params:n._getHitsSearchParams(i)}),i.getRefinedDisjunctiveFacets().forEach(function(u){o.push({indexName:a,params:n._getDisjunctiveFacetSearchParams(i,u)})}),i.getRefinedHierarchicalFacets().forEach(function(u){var d=i.getHierarchicalFacetByName(u),f=i.getHierarchicalRefinement(u),p=i._getHierarchicalFacetSeparator(d);if(f.length>0&&f[0].split(p).length>1){var h=f[0].split(p).slice(0,-1).reduce(function(l,s,g){return l.concat({attribute:d.attributes[g],value:g===0?s:[l[l.length-1].value,s].join(p)})},[]);h.forEach(function(_,l){var s=n._getDisjunctiveFacetSearchParams(i,_.attribute,l===0);function g(v){return d.attributes.some(function(y){return y===v.split(":")[0]})}var m=(s.facetFilters||[]).reduce(function(v,y){if(Array.isArray(y)){var b=y.filter(function(S){return!g(S)});b.length>0&&v.push(b)}return typeof y=="string"&&!g(y)&&v.push(y),v},[]),c=h[l-1];l>0?s.facetFilters=m.concat(c.attribute+":"+c.value):m.length>0?s.facetFilters=m:delete s.facetFilters,o.push({indexName:a,params:s})})}}),o},_getCompositionQueries:function(a){return[{compositionID:a.index,requestBody:{params:n._getCompositionHitsSearchParams(a)}}]},_getHitsSearchParams:function(r){var a=r.facets.concat(r.disjunctiveFacets).concat(n._getHitsHierarchicalFacetsAttributes(r)).sort(),i=n._getFacetFilters(r),o=n._getNumericFilters(r),u=n._getTagFilters(r),d={};return a.length>0&&(d.facets=a.indexOf("*")>-1?["*"]:a),u.length>0&&(d.tagFilters=u),i.length>0&&(d.facetFilters=i),o.length>0&&(d.numericFilters=o),t(e({},r.getQueryParams(),d))},_getCompositionHitsSearchParams:function(r){var a=r.facets.concat(r.disjunctiveFacets.map(function(p){return r.disjunctiveFacetsRefinements&&r.disjunctiveFacetsRefinements[p]&&r.disjunctiveFacetsRefinements[p].length>0?"disjunctive("+p+")":p})).concat(n._getHitsHierarchicalFacetsAttributes(r)).sort(),i=n._getFacetFilters(r),o=n._getNumericFilters(r),u=n._getTagFilters(r),d={};a.length>0&&(d.facets=a.indexOf("*")>-1?["*"]:a),u.length>0&&(d.tagFilters=u),i.length>0&&(d.facetFilters=i),o.length>0&&(d.numericFilters=o);var f=r.getQueryParams();return delete f.highlightPreTag,delete f.highlightPostTag,delete f.index,t(e({},f,d))},_getDisjunctiveFacetSearchParams:function(r,a,i){var o=n._getFacetFilters(r,a,i),u=n._getNumericFilters(r,a),d=n._getTagFilters(r),f={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};d.length>0&&(f.tagFilters=d);var p=r.getHierarchicalFacetByName(a);return p?f.facets=n._getDisjunctiveHierarchicalFacetAttribute(r,p,i):f.facets=a,u.length>0&&(f.numericFilters=u),o.length>0&&(f.facetFilters=o),t(e({},r.getQueryParams(),f))}
12,_getNumericFilters:function(r,a){if(r.numericFilters)return r.numericFilters;var i=[];return Object.keys(r.numericRefinements).forEach(function(o){var u=r.numericRefinements[o]||{};Object.keys(u).forEach(function(d){var f=u[d]||[];a!==o&&f.forEach(function(p){if(Array.isArray(p)){var h=p.map(function(_){return o+d+_});i.push(h)}else i.push(o+d+p)})})}),i},_getTagFilters:function(r){return r.tagFilters?r.tagFilters:r.tagRefinements.join(",")},_getFacetFilters:function(r,a,i){var o=[],u=r.facetsRefinements||{};Object.keys(u).sort().forEach(function(h){var _=u[h]||[];_.slice().sort().forEach(function(l){o.push(h+":"+l)})});var d=r.facetsExcludes||{};Object.keys(d).sort().forEach(function(h){var _=d[h]||[];_.sort().forEach(function(l){o.push(h+":-"+l)})});var f=r.disjunctiveFacetsRefinements||{};Object.keys(f).sort().forEach(function(h){var _=f[h]||[];if(!(h===a||!_||_.length===0)){var l=[];_.slice().sort().forEach(function(s){l.push(h+":"+s)}),o.push(l)}});var p=r.hierarchicalFacetsRefinements||{};return Object.keys(p).sort().forEach(function(h){var _=p[h]||[],l=_[0];if(l!==void 0){var s=r.getHierarchicalFacetByName(h),g=r._getHierarchicalFacetSeparator(s),m=r._getHierarchicalRootPath(s),c,v;if(a===h){if(l.indexOf(g)===-1||!m&&i===!0||m&&m.split(g).length===l.split(g).length)return;m?(v=m.split(g).length-1,l=m):(v=l.split(g).length-2,l=l.slice(0,l.lastIndexOf(g))),c=s.attributes[v]}else v=l.split(g).length-1,c=s.attributes[v];c&&o.push([c+":"+l])}}),o},_getHitsHierarchicalFacetsAttributes:function(r){var a=[];return r.hierarchicalFacets.reduce(function(o,u){var d=r.getHierarchicalRefinement(u.name)[0];if(!d)return o.push(u.attributes[0]),o;var f=r._getHierarchicalFacetSeparator(u),p=d.split(f).length,h=u.attributes.slice(0,p+1);return o.concat(h)},a)},_getDisjunctiveHierarchicalFacetAttribute:function(r,a,i){var o=r._getHierarchicalFacetSeparator(a);if(i===!0){var u=r._getHierarchicalRootPath(a),d=0;return u&&(d=u.split(o).length),[a.attributes[d]]}var f=r.getHierarchicalRefinement(a.name)[0]||"",p=f.split(o).length-1;return a.attributes.slice(0,p+1)},getSearchForFacetQuery:function(r,a,i,o){var u=o.isDisjunctiveFacet(r)?o.clearRefinements(r):o,d={facetQuery:a,facetName:r};return typeof i=="number"&&(d.maxFacetHits=i),t(e({},n._getHitsSearchParams(u),d))}};return yr=n,yr}var Sr,qi;function ai(){return qi||(qi=1,Sr=function(){var t=Array.prototype.slice.call(arguments);return t.reduceRight(function(n,r){return Object.keys(Object(r)).forEach(function(a){r[a]!==void 0&&(n[a]!==void 0&&delete n[a],n[a]=r[a])}),n},{})}),Sr}var Rr,ki;function Ct(){return ki||(ki=1,Rr=function(t,n){if(Array.isArray(t)){for(var r=0;r<t.length;r++)if(n(t[r]))return t[r]}}),Rr}var br,Bi;function qu(){if(Bi)return br;Bi=1;function e(t,n){return t.filter(function(r,a){return n.indexOf(r)>-1&&t.indexOf(r)===a})}return br=e,br}var _r,Qi;function ku(){if(Qi)return _r;Qi=1;function e(t){if(typeof t=="number")return t;if(typeof t=="string")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.")}return _r=e,_r}var wr,Vi;function Bu(){return Vi||(Vi=1,wr=function(t){return t===null?!1:/^[a-zA-Z0-9_-]{1,64}$/.test(t)}),wr}var Pr,zi;function Qu(){if(zi)return Pr;zi=1;var e=ai(),t=ni(),n=ii(),r={addRefinement:function(i,o,u){if(r.isRefined(i,o,u))return i;var d=""+u,f=i[o]?i[o].concat(d):[d],p={};return p[o]=f,e(p,i)},removeRefinement:function(i,o,u){if(u===void 0)return r.clearRefinement(i,function(f,p){return o===p});var d=""+u;return r.clearRefinement(i,function(f,p){return o===p&&d===f})},toggleRefinement:function(i,o,u){if(u===void 0)throw new Error("toggleRefinement should be used with a value");return r.isRefined(i,o,u)?r.removeRefinement(i,o,u):r.addRefinement(i,o,u)},clearRefinement:function(i,o,u){if(o===void 0)return t(i)?{}:i;if(typeof o=="string")return n(i,[o]);if(typeof o=="function"){var d=!1,f=Object.keys(i).reduce(function(p,h){var _=i[h]||[],l=_.filter(function(s){return!o(s,h,u)});return l.length!==_.length&&(d=!0),p[h]=l,p},{});return d?f:i}},isRefined:function(i,o,u){var d=!!i[o]&&i[o].length>0;if(u===void 0||!d)return d;var f=""+u;return i[o].indexOf(f)!==-1}};return Pr=r,Pr}var Fr,Gi;function Qs(){if(Gi)return Fr;Gi=1;var e=ai(),t=Ct(),n=qu(),r=ri(),a=ni(),i=ii(),o=ku(),u=Bu(),d=Qu();function f(l,s){return Array.isArray(l)&&Array.isArray(s)?l.length===s.length&&l.every(function(g,m){return f(s[m],g)}):l===s}function p(l,s){return t(l,function(g){return f(g,s)})}function h(l){var s=l?h._parseNumbers(l):{};s.userToken!==void 0&&!u(s.userToken)&&console.warn("[algoliasearch-helper] The `userToken` parameter is invali
12d. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=s.facets||[],this.disjunctiveFacets=s.disjunctiveFacets||[],this.hierarchicalFacets=s.hierarchicalFacets||[],this.facetsRefinements=s.facetsRefinements||{},this.facetsExcludes=s.facetsExcludes||{},this.disjunctiveFacetsRefinements=s.disjunctiveFacetsRefinements||{},this.numericRefinements=s.numericRefinements||{},this.tagRefinements=s.tagRefinements||[],this.hierarchicalFacetsRefinements=s.hierarchicalFacetsRefinements||{};var g=this;Object.keys(s).forEach(function(m){var c=h.PARAMETERS.indexOf(m)!==-1,v=s[m]!==void 0;!c&&v&&(g[m]=s[m])})}h.PARAMETERS=Object.keys(new h);function _(l){var s=parseFloat(l);return isFinite(s)?s:null}return h._parseNumbers=function(l){if(l instanceof h)return l;var s={},g=["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"];if(g.forEach(function(c){var v=l[c];if(typeof v=="string"){var y=parseFloat(v);isNaN(y)?s[c]=v:isFinite(y)?s[c]=y:s[c]=null}else typeof v=="number"&&!isFinite(v)&&(s[c]=null)}),Array.isArray(l.insideBoundingBox)&&(s.insideBoundingBox=l.insideBoundingBox.map(function(c){return Array.isArray(c)?c.map(function(v){return typeof v=="string"?_(v):typeof v=="number"&&!isFinite(v)?null:v}):c})),l.numericRefinements){var m={};Object.keys(l.numericRefinements).forEach(function(c){var v=l.numericRefinements[c]||{};m[c]={},Object.keys(v).forEach(function(y){var b=v[y],S=b.map(function(P){return Array.isArray(P)?P.map(function(F){return typeof F=="string"?_(F):typeof F=="number"&&!isFinite(F)?null:F}):typeof P=="string"?_(P):typeof P=="number"&&!isFinite(P)?null:P});m[c][y]=S})}),s.numericRefinements=m}return r(l,s)},h.make=function(s){var g=new h(s),m=s.hierarchicalFacets||[];return m.forEach(function(c){if(c.rootPath){var v=g.getHierarchicalRefinement(c.name);v.length>0&&v[0].indexOf(c.rootPath)!==0&&(g=g.clearRefinements(c.name)),v=g.getHierarchicalRefinement(c.name),v.length===0&&(g=g.toggleHierarchicalFacetRefinement(c.name,c.rootPath))}}),g},h.validate=function(l,s){var g=s||{};return l.tagFilters&&g.tagRefinements&&g.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."):l.tagRefinements.length>0&&g.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."):l.numericFilters&&g.numericRefinements&&a(g.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."):a(l.numericRefinements)&&g.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},h.prototype={constructor:h,clearRefinements:function(s){var g={numericRefinements:this._clearNumericRefinements(s),facetsRefinements:d.clearRefinement(this.facetsRefinements,s,"conjunctiveFacet"),facetsExcludes:d.clearRefinement(this.facetsExcludes,s,"exclude"),disjunctiveFacetsRefinements:d.clearRefinement(this.disjunctiveFacetsRefinements,s,"disjunctiveFacet"),hierarchicalFacetsRefinements:d.clearRefinement(this.hierarchicalFacetsRefinements,s,"hierarchicalFacet")};return g.numericRefinements===this.numericRefinements&&g.facetsRefinements===this.facetsRefinements&&g.facetsExcludes===this.facetsExcludes&&g.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&g.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(g)},clearTags:function(){return this.tagFilters===void 0&&this.tagRefinements.length===0?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(s){return s===this.index?this:this.setQueryParameters({index:s})},setQuery:function(s){return s===this.query?this:this.setQueryParameters({query:s})},setPage:function(s){return s===this.page?this:this.setQueryParameters({page:s})},setFacets:function(s){return this.setQueryParameters({facets:s})},setDisjunctiveFacets:function(s){return this.setQueryParameters({disjunctiveFacets:s})},setHitsPerPage:function(s){return this.hitsPerPage===s?this:this.setQueryParameters({hitsPerPage:s})},setTypoTolerance:function(s){return this.typoTolerance===s?this:this.setQueryParameters({typoTolerance:s})},addNumericRefinement:function(l,s,g){var m=o(g);if(this.isNumericRefined(l,s,m))return this;var c=r({},this.numericRefinements);return c[l]=r({},c[l]),c[l][s]?(c[l][s]=c[l][s].slice(),c[l][s].push(m)):c[l][s]=[m],this.setQueryParameters({numericRefinements:c})},getConjunctiveRefinements:function(l){return this.isConjunctiveFacet(l)?this.facetsRefinements[l]||[]:[]},getDisjunctiveRefinements:function(l){return this.isDisjunctiveFacet(l)?this.disjunctiveFacetsRefinements[l]||[]:[]},getHierarchicalRefinement:function(l){return this.hierarchicalFacetsRefinements[l]||[]},getExcludeRefinements:function(l){return this.isConjunctiveFacet(l)?this.facetsExcludes[l]||[]:[]},removeNumericRefinement:function(l,s,g){var m=g;return m!==void 0?this.isNumericRefined(l,s,m)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(c,v){return v===l&&c.op===s&&f(c.val,o(m))})}):this:s!==void 0?this.isNumericRefined(l,s)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(c,v){return v===l&&c.op===s})}):this:this.isNumericRefined(l)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(c,v){return v===l})}):this},getNumericRefinements:function(l){return this.numericRefinements[l]||{}},getNumericRefinement:function(l,s){return this.numericRefinements[l]&&this.numericRefinements[l][s]},_clearNumericRefinements:function(s){if(s===void 0)return a(this.numericRefinements)?{}:this.numericRefinements;if(typeof s=="string")return i(this.numericRefinements,[s]);if(typeof s=="function"){var g=!1,m=this.numericRefinements,c=Object.keys(m).reduce(function(v,y){var b=m[y],S={};return b=b||{},Object.keys(b).forEach(function(P){var F=b[P]||[],w=[];F.forEach(function(R){var x=s({val:R,op:P},y,"numeric");x||w.push(R)}),w.length!==F.length&&(g=!0),S[P]=w}),v[y]=S,v},{});return g?c:this.numericRefinements}},addFacet:function(s){return this.isConjunctiveFacet(s)?this:this.setQueryParameters({facets:this.facets.concat([s])})},addDisjunctiveFacet:function(s){return this.isDisjunctiveFacet(s)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([s])})},addHierarchicalFacet:function(s){if(this.isHierarchicalFacet(s.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+s.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([s])})},addFacetRefinement:function(s,g){if(!this.isConjunctiveFacet(s))throw new Error(s+" is not defined in the facets attribute of the helper configuration");
12return d.isRefined(this.facetsRefinements,s,g)?this:this.setQueryParameters({facetsRefinements:d.addRefinement(this.facetsRefinements,s,g)})},addExcludeRefinement:function(s,g){if(!this.isConjunctiveFacet(s))throw new Error(s+" is not defined in the facets attribute of the helper configuration");return d.isRefined(this.facetsExcludes,s,g)?this:this.setQueryParameters({facetsExcludes:d.addRefinement(this.facetsExcludes,s,g)})},addDisjunctiveFacetRefinement:function(s,g){if(!this.isDisjunctiveFacet(s))throw new Error(s+" is not defined in the disjunctiveFacets attribute of the helper configuration");return d.isRefined(this.disjunctiveFacetsRefinements,s,g)?this:this.setQueryParameters({disjunctiveFacetsRefinements:d.addRefinement(this.disjunctiveFacetsRefinements,s,g)})},addTagRefinement:function(s){if(this.isTagRefined(s))return this;var g={tagRefinements:this.tagRefinements.concat(s)};return this.setQueryParameters(g)},removeFacet:function(s){return this.isConjunctiveFacet(s)?this.clearRefinements(s).setQueryParameters({facets:this.facets.filter(function(g){return g!==s})}):this},removeDisjunctiveFacet:function(s){return this.isDisjunctiveFacet(s)?this.clearRefinements(s).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter(function(g){return g!==s})}):this},removeHierarchicalFacet:function(s){return this.isHierarchicalFacet(s)?this.clearRefinements(s).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter(function(g){return g.name!==s})}):this},removeFacetRefinement:function(s,g){if(!this.isConjunctiveFacet(s))throw new Error(s+" is not defined in the facets attribute of the helper configuration");return d.isRefined(this.facetsRefinements,s,g)?this.setQueryParameters({facetsRefinements:d.removeRefinement(this.facetsRefinements,s,g)}):this},removeExcludeRefinement:function(s,g){if(!this.isConjunctiveFacet(s))throw new Error(s+" is not defined in the facets attribute of the helper configuration");return d.isRefined(this.facetsExcludes,s,g)?this.setQueryParameters({facetsExcludes:d.removeRefinement(this.facetsExcludes,s,g)}):this},removeDisjunctiveFacetRefinement:function(s,g){if(!this.isDisjunctiveFacet(s))throw new Error(s+" is not defined in the disjunctiveFacets attribute of the helper configuration");return d.isRefined(this.disjunctiveFacetsRefinements,s,g)?this.setQueryParameters({disjunctiveFacetsRefinements:d.removeRefinement(this.disjunctiveFacetsRefinements,s,g)}):this},removeTagRefinement:function(s){if(!this.isTagRefined(s))return this;var g={tagRefinements:this.tagRefinements.filter(function(m){return m!==s})};return this.setQueryParameters(g)},toggleRefinement:function(s,g){return this.toggleFacetRefinement(s,g)},toggleFacetRefinement:function(s,g){if(this.isHierarchicalFacet(s))return this.toggleHierarchicalFacetRefinement(s,g);if(this.isConjunctiveFacet(s))return this.toggleConjunctiveFacetRefinement(s,g);if(this.isDisjunctiveFacet(s))return this.toggleDisjunctiveFacetRefinement(s,g);throw new Error("Cannot refine the undeclared facet "+s+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(s,g){if(!this.isConjunctiveFacet(s))throw new Error(s+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:d.toggleRefinement(this.facetsRefinements,s,g)})},toggleExcludeFacetRefinement:function(s,g){if(!this.isConjunctiveFacet(s))throw new Error(s+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:d.toggleRefinement(this.facetsExcludes,s,g)})},toggleDisjunctiveFacetRefinement:function(s,g){if(!this.isDisjunctiveFacet(s))throw new Error(s+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:d.toggleRefinement(this.disjunctiveFacetsRefinements,s,g)})},toggleHierarchicalFacetRefinement:function(s,g){if(!this.isHierarchicalFacet(s))throw new Error(s+" is not defined in the hierarchicalFacets attribute of the helper configuration");var m=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(s)),c={},v=this.hierarchicalFacetsRefinements[s]!==void 0&&this.hierarchicalFacetsRefinements[s].length>0&&(this.hierarchicalFacetsRefinements[s][0]===g||this.hierarchicalFacetsRefinements[s][0].indexOf(g+m)===0);return v?g.indexOf(m)===-1?c[s]=[]:c[s]=[g.slice(0,g.lastIndexOf(m))]:c[s]=[g],this.setQueryParameters({hierarchicalFacetsRefinements:e(c,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(l,s){if(this.isHierarchicalFacetRefined(l))throw new Error(l+" is already refined.");if(!this.isHierarchicalFacet(l))throw new Error(l+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var g={};return g[l]=[s],this.setQueryParameters({hierarchicalFacetsRefinements:e(g,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(l){if(!this.isHierarchicalFacetRefined(l))return this;var s={};return s[l]=[],this.setQueryParameters({hierarchicalFacetsRefinements:e(s,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(s){return this.isTagRefined(s)?this.removeTagRefinement(s):this.addTagRefinement(s)},isDisjunctiveFacet:function(l){return this.disjunctiveFacets.indexOf(l)>-1},isHierarchicalFacet:function(l){return this.getHierarchicalFacetByName(l)!==void 0},isConjunctiveFacet:function(l){return this.facets.indexOf(l)>-1},isFacetRefined:function(s,g){return this.isConjunctiveFacet(s)?d.isRef
12ined(this.facetsRefinements,s,g):!1},isExcludeRefined:function(s,g){return this.isConjunctiveFacet(s)?d.isRefined(this.facetsExcludes,s,g):!1},isDisjunctiveFacetRefined:function(s,g){return this.isDisjunctiveFacet(s)?d.isRefined(this.disjunctiveFacetsRefinements,s,g):!1},isHierarchicalFacetRefined:function(s,g){if(!this.isHierarchicalFacet(s))return!1;var m=this.getHierarchicalRefinement(s);return g?m.indexOf(g)!==-1:m.length>0},isNumericRefined:function(s,g,m){if(m===void 0&&g===void 0)return!!this.numericRefinements[s];var c=this.numericRefinements[s]&&this.numericRefinements[s][g]!==void 0;if(m===void 0||!c)return c;var v=o(m),y=p(this.numericRefinements[s][g],v)!==void 0;return c&&y},isTagRefined:function(s){return this.tagRefinements.indexOf(s)!==-1},getRefinedDisjunctiveFacets:function(){var s=this,g=n(Object.keys(this.numericRefinements).filter(function(m){return Object.keys(s.numericRefinements[m]).length>0}),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter(function(m){return s.disjunctiveFacetsRefinements[m].length>0}).concat(g).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var s=this;return n(this.hierarchicalFacets.map(function(g){return g.name}),Object.keys(this.hierarchicalFacetsRefinements).filter(function(g){return s.hierarchicalFacetsRefinements[g].length>0})).sort()},getUnrefinedDisjunctiveFacets:function(){var l=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter(function(s){return l.indexOf(s)===-1})},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var s=this.managedParameters,g={},m=this;return Object.keys(this).forEach(function(c){var v=m[c];s.indexOf(c)===-1&&v!==void 0&&(g[c]=v)}),g},setQueryParameter:function(s,g){if(this[s]===g)return this;var m={};return m[s]=g,this.setQueryParameters(m)},setQueryParameters:function(s){if(!s)return this;var g=h.validate(this,s);if(g)throw g;var m=this,c=h._parseNumbers(s),v=Object.keys(this).reduce(function(b,S){return b[S]=m[S],b},{}),y=Object.keys(c).reduce(function(b,S){var P=b[S]!==void 0,F=c[S]!==void 0;return P&&!F?i(b,[S]):(F&&(b[S]=c[S]),b)},v);return new this.constructor(y)},resetPage:function(){return this.page===void 0?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(l){return l.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(l){return l.separator||" > "},_getHierarchicalRootPath:function(l){return l.rootPath||null},_getHierarchicalShowParentLevel:function(l){return typeof l.showParentLevel=="boolean"?l.showParentLevel:!0},getHierarchicalFacetByName:function(l){return t(this.hierarchicalFacets,function(s){return s.name===l})},getHierarchicalFacetBreadcrumb:function(l){if(!this.isHierarchicalFacet(l))return[];var s=this.getHierarchicalRefinement(l)[0];if(!s)return[];var g=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(l)),m=s.split(g);return m.map(function(c){return c.trim()})},toString:function(){return JSON.stringify(this,null,2)}},Fr=h,Fr}var xr,Ki;function Vu(){return Ki||(Ki=1,xr=function(t){return Array.isArray(t)?t.filter(Boolean):[]}),xr}var Ir,Ji;function zu(){return Ji||(Ji=1,Ir=function(t,n){if(!Array.isArray(t))return-1;for(var r=0;r<t.length;r++)if(n(t[r]))return r;return-1}),Ir}var Er,Yi;function Vs(){if(Yi)return Er;Yi=1;var e=Ct();return Er=function(n,r){var a=(r||[]).map(function(i){return i.split(":")});return n.reduce(function(o,u){var d=u.split(":"),f=e(a,function(p){return p[0]===d[0]});return d.length>1||!f?(o[0].push(d[0]),o[1].push(d[1]),o):(o[0].push(f[0]),o[1].push(f[1]),o)},[[],[]])},Er}var Ar,Xi;function Gu(){if(Xi)return Ar;Xi=1;function e(){var t=Array.prototype.slice.call(arguments);return t.reduceRight(function(n,r){return Object.keys(Object(r)).forEach(function(a){var i=typeof n[a]=="number"?n[a]:0,o=r[a];o!==void 0&&o>=i&&(n[a]!==void 0&&delete n[a],n[a]=o)}),n},{})}return Ar=e,Ar}var Tr,Zi;function zs(){if(Zi)return Tr;Zi=1;function e(n,r){if(n!==r){var a=n!==void 0,i=n===null,o=r!==void 0,u=r===null;if(!u&&n>r||i&&o||!a)return 1;if(!i&&n<r||u&&a||!o)return-1}return 0}function t(n,r,a){if(!Array.isArray(n))return[];Array.isArray(a)||(a=[]);var i=n.map(function(o,u){return{criteria:r.map(function(d){return o[d]}),index:u,value:o}});return i.sort(function(u,d){for(var f=-1;++f<u.criteria.length;){var p=e(u.criteria[f],d.criteria[f]);if(p)return f>=a.length?p:a[f]==="desc"?-p:p}return u.index-d.index}),i.map(function(o){return o.value})}return Tr=t,Tr}var Or,ea;
12function Ku(){if(ea)return Or;ea=1,Or=o;var e=ti(),t=Ct(),n=Vs(),r=zs(),a=e.escapeFacetValue,i=e.unescapeFacetValue;function o(p){return function(_,l){var s=p.hierarchicalFacets[l],g=p.hierarchicalFacetsRefinements[s.name]&&p.hierarchicalFacetsRefinements[s.name][0]||"",m=p._getHierarchicalFacetSeparator(s),c=p._getHierarchicalRootPath(s),v=p._getHierarchicalShowParentLevel(s),y=n(p._getHierarchicalFacetSortBy(s)),b=_.every(function(F){return F.exhaustive}),S=u(y,m,c,v,g),P=_;return c&&(P=_.slice(c.split(m).length)),P.reduce(S,{name:p.hierarchicalFacets[l].name,count:null,isRefined:!0,path:null,escapedValue:null,exhaustive:b,data:null})}}function u(p,h,_,l,s){return function(m,c,v){var y=m;if(v>0){var b=0;for(y=m;b<v;){var S=y&&Array.isArray(y.data)?y.data:[];y=t(S,function(F){return F.isRefined}),b++}}if(y){var P=Object.keys(c.data).map(function(F){return[F,c.data[F]]}).filter(function(F){var w=F[0];return d(w,y.path||_,s,h,_,l)});y.data=r(P.map(function(F){var w=F[0],R=F[1];return f(R,w,h,i(s),c.exhaustive)}),p[0],p[1])}return m}}function d(p,h,_,l,s,g){return s&&(p.indexOf(s)!==0||s===p)?!1:!s&&p.indexOf(l)===-1||s&&p.split(l).length-s.split(l).length===1||p.indexOf(l)===-1&&_.indexOf(l)===-1||_.indexOf(p)===0||p.indexOf(h+l)===0&&(g||p.indexOf(_)===0)}function f(p,h,_,l,s){var g=h.split(_);return{name:g[g.length-1].trim(),path:h,escapedValue:a(h),count:p,isRefined:l===h||l.indexOf(h+_)===0,exhaustive:s,data:null}}return Or}var jr,ta;function Gs(){if(ta)return jr;ta=1;var e=Vu(),t=ai(),n=ti(),r=Ct(),a=zu(),i=Vs(),o=Gu(),u=zs(),d=n.escapeFacetValue,f=n.unescapeFacetValue,p=Ku();function h(w){var R={};return w.forEach(function(x,I){R[x]=I}),R}function _(w,R,x){R&&R[x]&&(w.stats=R[x])}function l(w,R){return r(w,function(I){var A=I.attributes||[];return A.indexOf(R)>-1})}function s(w,R,x){var I=R[0]||{};this._rawResults=R;var A=this;Object.keys(I).forEach(function(W){A[W]=I[W]});var M=t(x,{persistHierarchicalRootCount:!1});Object.keys(M).forEach(function(W){A[W]=M[W]}),this.processingTimeMS=R.reduce(function(W,$){return $.processingTimeMS===void 0?W:W+$.processingTimeMS},0),this.disjunctiveFacets=[],this.hierarchicalFacets=w.hierarchicalFacets.map(function(){return[]}),this.facets=[];var j=w.getRefinedDisjunctiveFacets(),q=h(w.facets),D=h(w.disjunctiveFacets),C=1,T=I.facets||{};Object.keys(T).forEach(function(W){var $=T[W],U=l(w.hierarchicalFacets,W);if(U){var k=U.attributes.indexOf(W),B=a(w.hierarchicalFacets,function(Y){return Y.name===U.name});A.hierarchicalFacets[B][k]={attribute:W,data:$,exhaustive:I.exhaustiveFacetsCount}}else{var X=w.disjunctiveFacets.indexOf(W)!==-1,z=w.facets.indexOf(W)!==-1,V;X&&(V=D[W],A.disjunctiveFacets[V]={name:W,data:$,exhaustive:I.exhaustiveFacetsCount},_(A.disjunctiveFacets[V],I.facets_stats,W)),z&&(V=q[W],A.facets[V]={name:W,data:$,exhaustive:I.exhaustiveFacetsCount},_(A.facets[V],I.facets_stats,W))}}),this.hierarchicalFacets=e(this.hierarchicalFacets),j.forEach(function(W){var $=R[C],U=$&&$.facets?$.facets:{},k=w.getHierarchicalFacetByName(W);Object.keys(U).forEach(function(B){var X=U[B],z;if(k){z=a(w.hierarchicalFacets,function(te){return te.name===k.name});var V=a(A.hierarchicalFacets[z],function(te){return te.attribute===B});if(V===-1)return;A.hierarchicalFacets[z][V].data=A.persistHierarchicalRootCount?o(A.hierarchicalFacets[z][V].data,X):t(X,A.hierarchicalFacets[z][V].data)}else{z=D[B];var Y=I.facets&&I.facets[B]||{};A.disjunctiveFacets[z]={name:B,data:o(Y,X),exhaustive:$.exhaustiveFacetsCount},_(A.disjunctiveFacets[z],$.facets_stats,B),w.disjunctiveFacetsRefinements[B]&&w.disjunctiveFacetsRefinements[B].forEach(function(te){!A.disjunctiveFacets[z].data[te]&&w.disjunctiveFacetsRefinements[B].indexOf(f(te))>-1&&(A.disjunctiveFacets[z].data[te]=0)})}}),C++}),w.getRefinedHierarchicalFacets().forEach(function(W){var $=w.getHierarchicalFacetByName(W),U=w._getHierarchicalFacetSeparator($),k=w.getHierarchicalRefinement(W);k.length===0||k[0].split(U).length<2||R.slice(C).forEach(function(B){var X=B&&B.facets?B.facets:{};Object.keys(X).forEach(function(z){var V=X[z],Y=a(w.hierarchicalFacets,function(ie){return ie.name===$.name}),te=a(A.hierarchicalFacets[Y],function(ie){return ie.attribute===z});if(te!==-1){var se={};if(k.length>0&&!A.persistHierarchicalRootCount){var Z=k[0].split(U)[0];se[Z]=A.hierarchicalFacets[Y][te].data[Z]}A.hierarchicalFacets[Y][te].data=t(se,V,A.hierarchicalFacets[Y][te].data)}}),C++})}
12),Object.keys(w.facetsExcludes).forEach(function(W){var $=w.facetsExcludes[W],U=q[W];A.facets[U]={name:W,data:T[W],exhaustive:I.exhaustiveFacetsCount},$.forEach(function(k){A.facets[U]=A.facets[U]||{name:W},A.facets[U].data=A.facets[U].data||{},A.facets[U].data[k]=0})}),this.hierarchicalFacets=this.hierarchicalFacets.map(p(w)),this.facets=e(this.facets),this.disjunctiveFacets=e(this.disjunctiveFacets),this._state=w}s.prototype.getFacetByName=function(w){function R(x){return x.name===w}return r(this.facets,R)||r(this.disjunctiveFacets,R)||r(this.hierarchicalFacets,R)};function g(w,R){function x(T){return T.name===R}if(w._state.isConjunctiveFacet(R)){var I=r(w.facets,x);return I?Object.keys(I.data).map(function(T){var W=d(T);return{name:T,escapedValue:W,count:I.data[T],isRefined:w._state.isFacetRefined(R,W),isExcluded:w._state.isExcludeRefined(R,T)}}):[]}else if(w._state.isDisjunctiveFacet(R)){var A=r(w.disjunctiveFacets,x);return A?Object.keys(A.data).map(function(T){var W=d(T);return{name:T,escapedValue:W,count:A.data[T],isRefined:w._state.isDisjunctiveFacetRefined(R,W)}}):[]}else if(w._state.isHierarchicalFacet(R)){var M=r(w.hierarchicalFacets,x);if(!M)return M;var j=w._state.getHierarchicalFacetByName(R),q=w._state._getHierarchicalFacetSeparator(j),D=f(w._state.getHierarchicalRefinement(R)[0]||"");D.indexOf(j.rootPath)===0&&(D=D.replace(j.rootPath+q,""));var C=D.split(q);return C.unshift(R),m(M,C,0),M}}function m(w,R,x){w.isRefined=w.name===(R[x]&&R[x].trim()),w.data&&w.data.forEach(function(I){m(I,R,x+1)})}function c(w,R,x,I){if(I=I||0,Array.isArray(R))return w(R,x[I]);if(!R.data||R.data.length===0)return R;var A=R.data.map(function(q){return c(w,q,x,I+1)}),M=w(A,x[I]),j=t({data:M},R);return j}s.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"];function v(w,R){return R.sort(w)}function y(w,R){var x=[],I=[],A=R.hide||[],M=R.order||[],j=M.reduce(function(C,T,W){return C[T]=W,C},{});w.forEach(function(C){var T=C.path||C.name,W=A.indexOf(T)>-1;!W&&j[T]!==void 0?x[j[T]]=C:W||I.push(C)}),x=x.filter(function(C){return C});var q=R.sortRemainingBy,D;return q==="hidden"?x:(q==="alpha"?D=[["path","name"],["asc","asc"]]:D=[["count"],["desc"]],x.concat(u(I,D[0],D[1])))}function b(w,R){return w.renderingContent&&w.renderingContent.facetOrdering&&w.renderingContent.facetOrdering.values&&w.renderingContent.facetOrdering.values[R]}s.prototype.getFacetValues=function(w,R){var x=g(this,w);if(x){var I=t(R,{sortBy:s.DEFAULT_SORT,facetOrdering:!(R&&R.sortBy)}),A=this,M;if(Array.isArray(x))M=[w];else{var j=A._state.getHierarchicalFacetByName(x.name);M=j.attributes}return c(function(q,D){var C=b(A,D);if(I.facetOrdering&&C)return y(q,C);if(Array.isArray(I.sortBy)){var T=i(I.sortBy,s.DEFAULT_SORT),W=u(q,T[0],T[1]),$=C&&C.hide?C.hide:[];if($.length>0){var U=[];return W.forEach(function(k){var B=k.path||k.name;$.indexOf(B)===-1&&U.push(k)}),U}return W}else if(typeof I.sortBy=="function")return v(I.sortBy,q);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")},x,M)}},s.prototype.getFacetStats=function(w){if(this._state.isConjunctiveFacet(w))return S(this.facets,w);if(this._state.isDisjunctiveFacet(w))return S(this.disjunctiveFacets,w)};function S(w,R){var x=r(w,function(I){return I.name===R});return x&&x.stats}s.prototype.getRefinements=function(){var w=this._state,R=this,x=[];return Object.keys(w.facetsRefinements).forEach(function(I){w.facetsRefinements[I].forEach(function(A){x.push(P(w,"facet",I,A,R.facets))})}),Object.keys(w.facetsExcludes).forEach(function(I){w.facetsExcludes[I].forEach(function(A){x.push(P(w,"exclude",I,A,R.facets))})}),Object.keys(w.disjunctiveFacetsRefinements).forEach(function(I){w.disjunctiveFacetsRefinements[I].forEach(function(A){x.push(P(w,"disjunctive",I,A,R.disjunctiveFacets))})}),Object.keys(w.hierarchicalFacetsRefinements).forEach(function(I){w.hierarchicalFacetsRefinements[I].forEach(function(A){x.push(F(w,I,A,R.hierarchicalFacets))})}),Object.keys(w.numericRefinements).forEach(function(I){var A=w.numericRefinements[I];
12Object.keys(A).forEach(function(M){A[M].forEach(function(j){x.push({type:"numeric",attributeName:I,name:j,numericValue:j,operator:M})})})}),w.tagRefinements.forEach(function(I){x.push({type:"tag",attributeName:"_tags",name:I})}),x};function P(w,R,x,I,A){var M=r(A,function(D){return D.name===x}),j=M&&M.data&&M.data[I]?M.data[I]:0,q=M&&M.exhaustive||!1;return{type:R,attributeName:x,name:I,count:j,exhaustive:q}}function F(w,R,x,I){var A=w.getHierarchicalFacetByName(R),M=w._getHierarchicalFacetSeparator(A),j=x.split(M),q=r(I,function($){return $.name===R}),D=j.reduce(function($,U){var k=$&&r($.data,function(B){return B.name===U});return k!==void 0?k:$},q),C=D&&D.count||0,T=D&&D.exhaustive||!1,W=D&&D.path||"";return{type:"hierarchical",attributeName:R,name:W,count:C,exhaustive:T}}return jr=s,jr}var Cr,ra;function Ju(){return ra||(ra=1,Cr=function(t){return t.reduce(function(n,r){return n.concat(r)},[])}),Cr}var $r,na;function Yu(){if(na)return $r;na=1;var e=Ct(),t=Ju();function n(a,i){var o=[];return Object.keys(a).forEach(function(u){a[u].count<2&&(a[u].indexSum+=100),o.push({objectID:u,avgOfIndices:a[u].indexSum/i})}),o.sort(function(u,d){return u.avgOfIndices>d.avgOfIndices?1:-1})}function r(a,i){var o={};i.forEach(function(f){f.forEach(function(p,h){a.includes(p.objectID)||(o[p.objectID]?o[p.objectID]={indexSum:o[p.objectID].indexSum+h,count:o[p.objectID].count+1}:o[p.objectID]={indexSum:h,count:1})})});var u=n(o,i.length),d=u.reduce(function(f,p){var h=e(t(i),function(_){return _.objectID===p.objectID});return h?f.concat(h):f},[]);return d}return $r=r,$r}var Lr,ia;function Ks(){return ia||(ia=1,Lr="3.29.3"),Lr}var Wr,aa;function Xu(){if(aa)return Wr;aa=1;var e=ei(),t=Uu(),n=ti().escapeFacetValue,r=qs(),a=ri(),i=ni(),o=ii(),u=ks(),d=Bs(),f=Du(),p=Qs(),h=Gs(),_=Yu(),l=Ks();function s(c,v,y,b){typeof c.addAlgoliaAgent=="function"&&c.addAlgoliaAgent("JS Helper ("+l+")"),this.setClient(c);var S=y||{};S.index=v,this.state=p.make(S),this.recommendState=new u({params:S.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=b,this._recommendCache={}}r(s,e),s.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},s.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},s.prototype.searchWithComposition=function(){return this._runComposition({onlyWithDerivedHelpers:!0}),this},s.prototype.recommend=function(){return this._recommend(),this},s.prototype.getQuery=function(){var c=this.state;return f._getHitsSearchParams(c)},s.prototype.searchOnce=function(c,v){var y=c?this.state.setQueryParameters(c):this.state,b=f._getQueries(y.index,y),S=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:y}),v){this.client.search(b).then(function(P){S._currentNbQueries--,S._currentNbQueries===0&&S.emit("searchQueueEmpty"),v(null,new h(y,P.results),y)}).catch(function(P){S._currentNbQueries--,S._currentNbQueries===0&&S.emit("searchQueueEmpty"),v(P,null,y)});return}return this.client.search(b).then(function(P){return S._currentNbQueries--,S._currentNbQueries===0&&S.emit("searchQueueEmpty"),{content:new h(y,P.results),state:y,_originalResponse:P}},function(P){throw S._currentNbQueries--,S._currentNbQueries===0&&S.emit("searchQueueEmpty"),P})},s.prototype.findAnswers=function(c){console.warn("[algoliasearch-helper] answers is no longer supported");var v=this.state,y=this.derivedHelpers[0];if(!y)return Promise.resolve([]);var b=y.getModifiedState(v),S=a({attributesForPrediction:c.attributesForPrediction,nbHits:c.nbHits},{params:o(f._getHitsSearchParams(b),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),P="search for answers was called, but this client does not have a function client.initIndex(index).findAnswers";if(typeof this.client.initIndex!="function")throw new Error(P);var F=this.client.initIndex(b.index);if(typeof F.findAnswers!="function")throw new Error(P);return F.findAnswers(b.query,c.queryLanguages,S)},s.prototype.searchForFacetValues=function(c,v,y,b){var S=typeof this.client.searchForFacetValues=="function"&&typeof this.client.searchForFacets!="function",P=typeof this.client.initIndex=="function";if(!S&&!P&&typeof this.client.search!="function")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 F=this.state.setQueryParameters(b||{}),w=F.isDisjunctiveFacet(c),R=f.getSearchForFacetQuery(c,v,y,F);this._currentNbQueries++;var x=this,I;S?I=this.client.searchForFacetValues([{indexName:F.index,params:R}]):P?I=this.client.initIndex(F.index).searchForFacetValues(R):(delete R.facetName,I=this.client.search([{type:"facet",facet:c,indexName:F.index,params:R}]).then(function(j){return j.results[0]}
12)),this.emit("searchForFacetValues",{state:F,facet:c,query:v});var A=this.lastResults&&this.lastResults.index===F.index&&this.lastResults.renderingContent&&this.lastResults.renderingContent.facetOrdering&&this.lastResults.renderingContent.facetOrdering.values&&this.lastResults.renderingContent.facetOrdering.values[c]&&this.lastResults.renderingContent.facetOrdering.values[c].hide||[];return I.then(function(j){return x._currentNbQueries--,x._currentNbQueries===0&&x.emit("searchQueueEmpty"),j=Array.isArray(j)?j[0]:j,j.facetHits=j.facetHits.reduce(function(q,D){return A.indexOf(D.value)>-1||(D.escapedValue=n(D.value),D.isRefined=w?F.isDisjunctiveFacetRefined(c,D.escapedValue):F.isFacetRefined(c,D.escapedValue),q.push(D)),q},[]),j},function(M){throw x._currentNbQueries--,x._currentNbQueries===0&&x.emit("searchQueueEmpty"),M})},s.prototype.searchForCompositionFacetValues=function(c,v,y,b){if(typeof this.client.searchForFacetValues!="function")throw new Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues");var S=this.state.setQueryParameters(b||{}),P=S.isDisjunctiveFacet(c);this._currentNbQueries++;var F=this,w;return w=this.client.searchForFacetValues({compositionID:S.index,facetName:c,searchForFacetValuesRequest:{params:{query:v,maxFacetHits:y,searchQuery:f._getCompositionHitsSearchParams(S)}}}),this.emit("searchForFacetValues",{state:S,facet:c,query:v}),w.then(function(x){return F._currentNbQueries--,F._currentNbQueries===0&&F.emit("searchQueueEmpty"),x=x.results[0],x.facetHits.forEach(function(I){I.escapedValue=n(I.value),I.isRefined=P?S.isDisjunctiveFacetRefined(c,I.escapedValue):S.isFacetRefined(c,I.escapedValue)}),x},function(R){throw F._currentNbQueries--,F._currentNbQueries===0&&F.emit("searchQueueEmpty"),R})},s.prototype.setQuery=function(c){return this._change({state:this.state.resetPage().setQuery(c),isPageReset:!0}),this},s.prototype.clearRefinements=function(c){return this._change({state:this.state.resetPage().clearRefinements(c),isPageReset:!0}),this},s.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},s.prototype.addDisjunctiveFacetRefinement=function(c,v){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(c,v),isPageReset:!0}),this},s.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},s.prototype.addHierarchicalFacetRefinement=function(c,v){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(c,v),isPageReset:!0}),this},s.prototype.addNumericRefinement=function(c,v,y){return this._change({state:this.state.resetPage().addNumericRefinement(c,v,y),isPageReset:!0}),this},s.prototype.addFacetRefinement=function(c,v){return this._change({state:this.state.resetPage().addFacetRefinement(c,v),isPageReset:!0}),this},s.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},s.prototype.addFacetExclusion=function(c,v){return this._change({state:this.state.resetPage().addExcludeRefinement(c,v),isPageReset:!0}),this},s.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},s.prototype.addTag=function(c){return this._change({state:this.state.resetPage().addTagRefinement(c),isPageReset:!0}),this},s.prototype.addFrequentlyBoughtTogether=function(c){return this._recommendChange({state:this.recommendState.addFrequentlyBoughtTogether(c)}),this},s.prototype.addRelatedProducts=function(c){return this._recommendChange({state:this.recommendState.addRelatedProducts(c)}),this},s.prototype.addTrendingItems=function(c){return this._recommendChange({state:this.recommendState.addTrendingItems(c)}),this},s.prototype.addTrendingFacets=function(c){return this._recommendChange({state:this.recommendState.addTrendingFacets(c)}),this},s.prototype.addLookingSimilar=function(c){return this._recommendChange({state:this.recommendState.addLookingSimilar(c)}),this},s.prototype.removeNumericRefinement=function(c,v,y){return this._change({state:this.state.resetPage().removeNumericRefinement(c,v,y),isPageReset:!0}),this},s.prototype.removeDisjunctiveFacetRefinement=function(c,v){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(c,v),isPageReset:!0}),this},s.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},s.prototype.removeHierarchicalFacetRefinement=function(c){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(c),isPageReset:!0}),this},s.prototype.removeFacetRefinement=function(c,v){return this._change({state:this.state.resetPage().removeFacetRefinement(c,v),isPageReset:!0}),this},s.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},s.prototype.removeFacetExclusion=function(c,v){return this._change({state:this.state.resetPage().removeExcludeRefinement(c,v),isPageReset:!0}),this},s.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},s.prototype.removeTag=function(c){return this._change({state:this.state.resetPage().removeTagRefinement(c),isPageReset:!0}),this},s.prototype.removeFrequentlyBoughtTogether=function(c){return this._recommendChange({state:this.recommendState.removeParam
12s(c)}),this},s.prototype.removeRelatedProducts=function(c){return this._recommendChange({state:this.recommendState.removeParams(c)}),this},s.prototype.removeTrendingItems=function(c){return this._recommendChange({state:this.recommendState.removeParams(c)}),this},s.prototype.removeTrendingFacets=function(c){return this._recommendChange({state:this.recommendState.removeParams(c)}),this},s.prototype.removeLookingSimilar=function(c){return this._recommendChange({state:this.recommendState.removeParams(c)}),this},s.prototype.toggleFacetExclusion=function(c,v){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(c,v),isPageReset:!0}),this},s.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},s.prototype.toggleRefinement=function(c,v){return this.toggleFacetRefinement(c,v)},s.prototype.toggleFacetRefinement=function(c,v){return this._change({state:this.state.resetPage().toggleFacetRefinement(c,v),isPageReset:!0}),this},s.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},s.prototype.toggleTag=function(c){return this._change({state:this.state.resetPage().toggleTagRefinement(c),isPageReset:!0}),this},s.prototype.nextPage=function(){var c=this.state.page||0;return this.setPage(c+1)},s.prototype.previousPage=function(){var c=this.state.page||0;return this.setPage(c-1)};function g(c){if(c<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(c),isPageReset:!1}),this}s.prototype.setCurrentPage=g,s.prototype.setPage=g,s.prototype.setIndex=function(c){return this._change({state:this.state.resetPage().setIndex(c),isPageReset:!0}),this},s.prototype.setQueryParameter=function(c,v){return this._change({state:this.state.resetPage().setQueryParameter(c,v),isPageReset:!0}),this},s.prototype.setState=function(c){return this._change({state:p.make(c),isPageReset:!1}),this},s.prototype.overrideStateWithoutTriggeringChangeEvent=function(c){return this.state=new p(c),this},s.prototype.hasRefinements=function(c){return i(this.state.getNumericRefinements(c))?!0:this.state.isConjunctiveFacet(c)?this.state.isFacetRefined(c):this.state.isDisjunctiveFacet(c)?this.state.isDisjunctiveFacetRefined(c):this.state.isHierarchicalFacet(c)?this.state.isHierarchicalFacetRefined(c):!1},s.prototype.isExcluded=function(c,v){return this.state.isExcludeRefined(c,v)},s.prototype.isDisjunctiveRefined=function(c,v){return this.state.isDisjunctiveFacetRefined(c,v)},s.prototype.hasTag=function(c){return this.state.isTagRefined(c)},s.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},s.prototype.getIndex=function(){return this.state.index};function m(){return this.state.page}return s.prototype.getCurrentPage=m,s.prototype.getPage=m,s.prototype.getTags=function(){return this.state.tagRefinements},s.prototype.getRefinements=function(c){var v=[];if(this.state.isConjunctiveFacet(c)){var y=this.state.getConjunctiveRefinements(c);y.forEach(function(F){v.push({value:F,type:"conjunctive"})});var b=this.state.getExcludeRefinements(c);b.forEach(function(F){v.push({value:F,type:"exclude"})})}else if(this.state.isDisjunctiveFacet(c)){var S=this.state.getDisjunctiveRefinements(c);S.forEach(function(F){v.push({value:F,type:"disjunctive"})})}var P=this.state.getNumericRefinements(c);return Object.keys(P).forEach(function(F){var w=P[F];v.push({value:w,operator:F,type:"numeric"})}),v},s.prototype.getNumericRefinement=function(c,v){return this.state.getNumericRefinement(c,v)},s.prototype.getHierarchicalFacetBreadcrumb=function(c){return this.state.getHierarchicalFacetBreadcrumb(c)},s.prototype._search=function(c){var v=this.state,y=[],b=[];c.onlyWithDerivedHelpers||(b=f._getQueries(v.index,v),y.push({state:v,queriesCount:b.length,helper:this}),this.emit("search",{state:v,results:this.lastResults}));var S=this.derivedHelpers.map(function(w){var R=w.getModifiedState(v),x=R.index?f._getQueries(R.index,R):[];return y.push({state:R,queriesCount:x.length,helper:w}),w.emit("search",{state:R,results:w.lastResults}),x}),P=Array.prototype.concat.apply(b,S),F=this._queryId++;if(this._currentNbQueries++,!P.length)return Promise.resolve({results:[]}
12).then(this._dispatchAlgoliaResponse.bind(this,y,F));try{this.client.search(P).then(this._dispatchAlgoliaResponse.bind(this,y,F)).catch(this._dispatchAlgoliaError.bind(this,F))}catch(w){this.emit("error",{error:w})}},s.prototype._runComposition=function(){var c=this.state,v=[],y=[],b=this.derivedHelpers.map(function(w){var R=w.getModifiedState(c),x=f._getCompositionQueries(R);return v.push({state:R,helper:w}),w.emit("search",{state:R,results:w.lastResults}),x}),S=Array.prototype.concat.apply(y,b),P=this._queryId++;if(this._currentNbQueries++,!S.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,v,P));if(S.length>1)throw new Error("Only one query is allowed when using a composition.");var F=S[0];try{this.client.search(F).then(this._dispatchAlgoliaResponse.bind(this,v,P)).catch(this._dispatchAlgoliaError.bind(this,P))}catch(w){this.emit("error",{error:w})}},s.prototype._recommend=function(){var c=this.state,v=this.recommendState,y=this.getIndex(),b=[{state:v,index:y,helper:this}],S=v.params.map(function(x){return x.$$id});this.emit("fetch",{recommend:{state:v,results:this.lastRecommendResults}});var P=this._recommendCache,F=this.derivedHelpers.map(function(x){var I=x.getModifiedState(c).index;if(!I)return[];var A=x.getModifiedRecommendState(new u);return b.push({state:A,index:I,helper:x}),S=Array.prototype.concat.apply(S,A.params.map(function(M){return M.$$id})),x.emit("fetch",{recommend:{state:A,results:x.lastRecommendResults}}),A._buildQueries(I,P)}),w=Array.prototype.concat.apply(this.recommendState._buildQueries(y,P),F);if(w.length!==0){if(w.length>0&&typeof this.client.getRecommendations>"u"){console.warn("Please update algoliasearch/lite to the latest version in order to use recommend widgets.");return}var R=this._recommendQueryId++;this._currentNbRecommendQueries++;try{this.client.getRecommendations(w).then(this._dispatchRecommendResponse.bind(this,R,b,S)).catch(this._dispatchRecommendError.bind(this,R))}catch(x){this.emit("error",{error:x})}}},s.prototype._dispatchAlgoliaResponse=function(c,v,y){var b=this;if(!(v<this._lastQueryIdReceived)){this._currentNbQueries-=v-this._lastQueryIdReceived,this._lastQueryIdReceived=v,this._currentNbQueries===0&&this.emit("searchQueueEmpty");var S=y.results.slice(),P=Object.keys(y).reduce(function(F,w){return w!=="results"&&(F[w]=y[w]),F},{});Object.keys(P).length<=0&&(P=void 0),c.forEach(function(F){var w=F.state,R=F.queriesCount,x=F.helper,I=R!==void 0?S.splice(0,R):S;if(!w.index){x.emit("result",{results:null,state:w});return}if(I.length>0&&I[0].feedID){var A=I.map(function(M){var j=new h(w,[M],b._searchResultsOptions);return P!==void 0&&(j._rawContent=P),j});x.lastResults=new h(w,[I[0]],b._searchResultsOptions),x.lastResults.feeds=A,P!==void 0&&(x.lastResults._rawContent=P)}else x.lastResults=new h(w,I,b._searchResultsOptions),P!==void 0&&(x.lastResults._rawContent=P);x.emit("result",{results:x.lastResults,state:w})})}},s.prototype._dispatchRecommendResponse=function(c,v,y,b){if(!(c<this._lastRecommendQueryIdReceived)){this._currentNbRecommendQueries-=c-this._lastRecommendQueryIdReceived,this._lastRecommendQueryIdReceived=c,this._currentNbRecommendQueries===0&&this.emit("recommendQueueEmpty");var S=this._recommendCache,P={};y.filter(function(w){return S[w]===void 0}).forEach(function(w,R){P[w]||(P[w]=[]),P[w].push(R)}),Object.keys(P).forEach(function(w){var R=P[w],x=b.results[R[0]];if(R.length===1){S[w]=x;return}S[w]=Object.assign({},x,{hits:_(y,R.map(function(I){return b.results[I].hits}))})});var F={};y.forEach(function(w){F[w]=S[w]}),v.forEach(function(w){var R=w.state,x=w.helper;if(!w.index){x.emit("recommend:result",{results:null,state:R});return}x.lastRecommendResults=new d(R,F),x.emit("recommend:result",{recommend:{results:x.lastRecommendResults,state:R}})})}},s.prototype._dispatchAlgoliaError=function(c,v){c<this._lastQueryIdReceived||(this._currentNbQueries-=c-this._lastQueryIdReceived,this._lastQueryIdReceived=c,this.emit("error",{error:v}),this._currentNbQueries===0&&this.emit("searchQueueEmpty"))},s.prototype._dispatchRecommendError=function(c,v){c<this._lastRecommendQueryId
12Received||(this._currentNbRecommendQueries-=c-this._lastRecommendQueryIdReceived,this._lastRecommendQueryIdReceived=c,this.emit("error",{error:v}),this._currentNbRecommendQueries===0&&this.emit("recommendQueueEmpty"))},s.prototype.containsRefinement=function(c,v,y,b){return c||v.length!==0||y.length!==0||b.length!==0},s.prototype._hasDisjunctiveRefinements=function(c){return this.state.disjunctiveRefinements[c]&&this.state.disjunctiveRefinements[c].length>0},s.prototype._change=function(c){var v=c.state,y=c.isPageReset;v!==this.state&&(this.state=v,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:y}))},s.prototype._recommendChange=function(c){var v=c.state;v!==this.recommendState&&(this.recommendState=v,this.emit("recommend:change",{search:{results:this.lastResults,state:this.state},recommend:{results:this.lastRecommendResults,state:this.recommendState}}))},s.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},s.prototype.setClient=function(c){return this.client===c?this:(typeof c.addAlgoliaAgent=="function"&&c.addAlgoliaAgent("JS Helper ("+l+")"),this.client=c,this)},s.prototype.getClient=function(){return this.client},s.prototype.derive=function(c,v){var y=new t(this,c,v);return this.derivedHelpers.push(y),y},s.prototype.detachDerivedHelper=function(c){var v=this.derivedHelpers.indexOf(c);if(v===-1)throw new Error("Derived helper already detached");this.derivedHelpers.splice(v,1)},s.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},Wr=s,Wr}var Hr,sa;function Zu(){if(sa)return Hr;sa=1;var e=Xu(),t=ks(),n=Bs(),r=Qs(),a=Gs();function i(o,u,d,f){return new e(o,u,d,f)}return i.version=Ks(),i.AlgoliaSearchHelper=e,i.SearchParameters=r,i.RecommendParameters=t,i.SearchResults=a,i.RecommendResults=n,Hr=i,Hr}var ec=Zu();const ee=Jn(ec);function tc(e,t){if(e==null)return{};var n={},r=Object.getOwnPropertyNames(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a]);return n}function we(e,t){if(e==null)return{};var n={},r,a,i;if(typeof Reflect<"u"&&Reflect.ownKeys){for(r=Reflect.ownKeys(e),i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a]);return n}if(n=tc(e,t),Object.getOwnPropertySymbols)for(r=Object.getOwnPropertySymbols(e),i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a]);return n}function rc(e,t){if(!Array.isArray(e))return-1;for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function si(e){return e.filter(function(t,n,r){return r.indexOf(t)===n})}var nc=function(t,n){n.facets,n.disjunctiveFacets,n.facetsRefinements,n.facetsExcludes,n.disjunctiveFacetsRefinements,n.numericRefinements,n.tagRefinements,n.hierarchicalFacets,n.hierarchicalFacetsRefinements,n.ruleContexts;var r=we(n,["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"]);return t.setQueryParameters(r)},ic=function(t,n){return n.facets.reduce(function(r,a){return r.addFacet(a)},t)},ac=function(t,n){return n.disjunctiveFacets.reduce(function(r,a){return r.addDisjunctiveFacet(a)},t)},sc=function(t,n){return t.setQueryParameters({hierarchicalFacets:n.hierarchicalFacets.reduce(function(r,a){var i=rc(r,function(u){return u.name===a.name});if(i===-1)return r.concat(a);var o=r.slice();return o.splice(i,1,a),o},t.hierarchicalFacets)})},oc=function(t,n){return n.tagRefinements.reduce(function(r,a){return r.addTagRefinement(a)},t)},uc=function(t,n){return t.setQueryParameters({facetsRefinements:E({},t.facetsRefinements,n.facetsRefinements)})},cc=function(t,n){return t.setQueryParameters({facetsExcludes:E({},t.facetsExcludes,n.facetsExcludes)})},lc=function(t,n){return t.setQueryParameters({disjunctiveFacetsRefinements:E({},t.disjunctiveFacetsRefinements,n.disjunctiveFacetsRefinements)})},fc=function(t,n){return t.setQueryParameters({numericRefinements:E({},t.numericRefinements,n.numericRefinements)})},dc=function(t,n){return t.setQueryParameters({hierarchicalFacetsRefinements:E({},t.hierarchicalFacetsRefinements,n.hierarchicalFacetsRefinements)})},hc=function(t,n){var r=si([].concat(t.ruleContexts).concat(n.ruleContexts).filter(
12Boolean));return r.length>0?t.setQueryParameters({ruleContexts:r}):t},bt=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.reduce(function(a,i){var o=dc(a,i),u=sc(o,i),d=oc(u,i),f=fc(d,i),p=lc(f,i),h=cc(p,i),_=uc(h,i),l=ac(_,i),s=hc(l,i),g=ic(s,i);return nc(g,i)})},gc=ge({name:"configure",connector:!0});function oa(e,t){return e.setQueryParameters(Object.keys(t.searchParameters).reduce(function(n,r){return O(E({},n),N({},r,void 0))},{}))}var Js=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:he,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return function(r){if(!r||!Us(r.searchParameters))throw new Error(gc("The `searchParameters` option expects an object."));var a={};function i(o){return function(u){var d=oa(o.state,r),f=bt(d,new ee.SearchParameters(u));r.searchParameters=u,o.setState(f).search()}}return{$$type:"ais.configure",init:function(u){var d=u.instantSearchInstance;t(O(E({},this.getWidgetRenderState(u)),{instantSearchInstance:d}),!0)},render:function(u){var d=u.instantSearchInstance;t(O(E({},this.getWidgetRenderState(u)),{instantSearchInstance:d}),!1)},dispose:function(u){var d=u.state;return n(),oa(d,r)},getRenderState:function(u,d){var f,p=this.getWidgetRenderState(d);return O(E({},u),{configure:O(E({},p),{widgetParams:O(E({},p.widgetParams),{searchParameters:bt(new ee.SearchParameters((f=u.configure)===null||f===void 0?void 0:f.widgetParams.searchParameters),new ee.SearchParameters(p.widgetParams.searchParameters)).getQueryParams()})})})},getWidgetRenderState:function(u){var d=u.helper;return a.refine||(a.refine=i(d)),{refine:a.refine,widgetParams:r}},getWidgetSearchParameters:function(u,d){var f=d.uiState;return bt(u,new ee.SearchParameters(E({},f.configure,r.searchParameters)))},getWidgetUiState:function(u){return O(E({},u),{configure:E({},u.configure,r.searchParameters)})}}}};function Ys(e,t){var n=Array.isArray(t)?t:t.split(".");return n.reduce(function(r,a){return r&&r[a]},e)}var ua=ge({name:"configure-related-items",connector:!0});function ca(e){var t=e.attributeName,n=e.attributeValue,r=e.attributeScore;return"".concat(t,":").concat(n,"<score=").concat(r||1,">")}var mc=function(t,n){return function(r){var a=r||{},i=a.hit,o=a.matchingPatterns,u=a.transformSearchParameters,d=u===void 0?function(_){return _}:u;if(!i)throw new Error(ua("The `hit` option is required."));if(!o)throw new Error(ua("The `matchingPatterns` option is required."));var f=Object.keys(o).reduce(function(_,l){var s=o[l],g=Ys(i,l),m=s.score;return Array.isArray(g)?ce(_).concat([g.map(function(c){return ca({attributeName:l,attributeValue:c,attributeScore:m})})]):typeof g=="string"?ce(_).concat([ca({attributeName:l,attributeValue:g,attributeScore:m})]):_},[]),p=E({},d(new ee.SearchParameters({sumOrFiltersScores:!0,facetFilters:["objectID:-".concat(i.objectID)],optionalFilters:f}))),h=Js(t,n);return O(E({},h({searchParameters:p})),{$$type:"ais.configureRelatedItems"})}};function vc(e,t){var n,r=(n=e.getWidgetRenderState)===null||n===void 0?void 0:n.call(e,t),a=null;if(r&&r.widgetParams){var i=r.widgetParams;i.attribute?a=i.attribute:Array.isArray(i.attributes)&&(a=i.attributes[0])}if(typeof a!="string")throw new Error(`Could not find the attribute of the widget: 13 14`.concat(JSON.stringify(e),` 15 16Please check whether the widget's getWidgetRenderState returns widgetParams.attribute correctly.`));return a}var Mt=ge({name:"dynamic-widgets",connector:!0}),pc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return Se(t,Mt()),function(r){var a=r.widgets,i=r.maxValuesPerFacet,o=i===void 0?20:i,u=r.facets,d=u===void 0?["*"]:u,f=r.transformItems,p=f===void 0?function(l){return l}:f,h=r.fallbackWidget;if(!(a&&Array.isArray(a)&&a.every(function(l){return(typeof l>"u"?"undefined":Be(l))==="object"})))throw new Error(Mt("The `widgets` option expects an array of widgets."));if(!Array.isArray(d))throw new Error(Mt("The `facets` option only accepts an array of facets, you passed ".concat(JSON.stringify(d))));var _=new Map;return{$$type:"ais.dynamicWidgets",init:function(s){a.forEach(function(g){var m=vc(g,s);_.set(m,{widget:g,isMounted:!1})}),t(O(E({},this.getWidgetRenderState(s)),{instantSearchInstance:s.instantSearchInstance}),!0)},render:function(s){var g=s.parent,m=this.getWidgetRenderState(s),c=[],v=[];h&&m.attributesToRender.forEach(function(y){if(!_.has(y)){var b=h({attribute:y});_.set(y,{widget:b,isMounted:!1})}}),_.forEach(function(y,b){var S=y.widget,P=y.isMounted,F=m.attributesToRender.indexOf(b)>-1;!P&&F?(v.push(S),_.set(b,{widget:S,isMounted:!0})):P&&!F&&(c.push(S),_.set(b,{widget:S,isMounted:!1}))}),g.addWidgets(v),setTimeout(function(){return g.removeWidgets(c)},0),t(O(E({},m),{instantSearchInstance:s.instantSearchInstance}),!1)},dispose:function(s){var g=s.parent,m=[];_.forEach(function(c){var v=c.widget,y=c.isMounted;y&&m.push(v)}),g.removeWidgets(m),n()},getWidgetSearchParameters:function(s){return d.reduce(function(g,m){return g.addFacet(m)},s.setQueryParameters({maxValuesPerFacet:Math.max(o||0,s.maxValuesPerFacet||0)}))},getRenderState:function(s,g){return O(E({},s),{dynamicWidgets:this.getWidgetRenderState(g)})},getWidgetRenderState:function(s){var g=s.results;s.state;var m,c,v,y;if(!g)return{attributesToRender:[],widgetParams:r};var b=p((m=(y=g.renderingContent)===null||y===void 0||(v=y.facetOrdering)===null||v===void 0||(c=v.facets)===null||c===void 0?void 0:c.order)!==null&&m!==void 0?m:[],{results:g});if(!Array.isArray(b))throw new Error(Mt("The `transformItems` option expects a function that returns an Array."));return{attributesToRender:b,widgetParams:r}}}}};function yc(e){return typeof e=="string"?e.replace(/^\\-/,"-"):e}function At(e){return typeof e=="number"&&e<0||typeof e=="string"?String(e).replace(/^-/,"\\-"):e}function ut(e,t){for(var n,r=0;r<e.length;r++)if(n=e[r],t(n,r,e))return n}function Nr(e,t,n,r){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],i={type:t,attribute:n,name:r,escapedValue:At(r)},o=ut(a,function(l){return l.name===n}),u;if(t==="hierarchical"){for(var d=function(l){o=o&&o.data&&ut(Object.keys(o.data).map(h(o.data)),function(s){return s.name===p[l]})}
16,f=e.getHierarchicalFacetByName(n),p=r.split(f.separator),h=function(s){return function(g){return s[g]}},_=0;o!==void 0&&_<p.length;++_)d(_);u=o&&o.count}else u=o&&o.data&&o.data[i.name];return u!==void 0&&(i.count=u),o&&o.exhaustive!==void 0&&(i.exhaustive=o.exhaustive),i}function oi(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=e||{},a=[],i=t.facetsRefinements,o=i===void 0?{}:i,u=t.facetsExcludes,d=u===void 0?{}:u,f=t.disjunctiveFacetsRefinements,p=f===void 0?{}:f,h=t.hierarchicalFacetsRefinements,_=h===void 0?{}:h,l=t.numericRefinements,s=l===void 0?{}:l,g=t.tagRefinements,m=g===void 0?[]:g;return Object.keys(o).forEach(function(c){var v=o[c];v.forEach(function(y){a.push(Nr(t,"facet",c,y,r.facets))})}),Object.keys(d).forEach(function(c){var v=d[c];v.forEach(function(y){a.push({type:"exclude",attribute:c,name:y,exclude:!0})})}),Object.keys(p).forEach(function(c){var v=p[c];v.forEach(function(y){a.push(Nr(t,"disjunctive",c,yc(y),r.disjunctiveFacets))})}),Object.keys(_).forEach(function(c){var v=_[c];v.forEach(function(y){a.push(Nr(t,"hierarchical",c,y,r.hierarchicalFacets))})}),Object.keys(s).forEach(function(c){var v=s[c];Object.keys(v).forEach(function(y){var b=y,S=v[b],P=Array.isArray(S)?S:[S];P.forEach(function(F){a.push({type:"numeric",attribute:c,name:"".concat(F),numericValue:F,operator:b})})})}),m.forEach(function(c){a.push({type:"tag",attribute:"_tags",name:c})}),n&&t.query&&t.query.trim()&&a.push({attribute:"query",type:"query",name:t.query,query:t.query}),a}function la(e){var t=e.helper,n=e.attributesToClear,r=n===void 0?[]:n,a=t.state.setPage(0);return a=r.reduce(function(i,o){return a.isNumericRefined(o)?i.removeNumericRefinement(o):a.isHierarchicalFacet(o)?i.removeHierarchicalFacetRefinement(o):a.isDisjunctiveFacet(o)?i.removeDisjunctiveFacetRefinement(o):a.isConjunctiveFacet(o)?i.removeFacetRefinement(o):i},a),r.indexOf("query")!==-1&&(a=a.setQuery("")),a}var fa=ge({name:"clear-refinements",connector:!0}),Sc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return Se(t,fa()),function(r){var a=r||{},i=a.includedAttributes,o=i===void 0?[]:i,u=a.excludedAttributes,d=u===void 0?["query"]:u,f=a.transformItems,p=f===void 0?function(s){return s}:f;if(r&&r.includedAttributes&&r.excludedAttributes)throw new Error(fa("The options `includedAttributes` and `excludedAttributes` cannot be used together."));var h={refine:he,createURL:function(){return""},attributesToClear:[]},_=function(){return h.refine()},l=function(){return h.createURL()};return{$$type:"ais.clearRefinements",init:function(g){var m=g.instantSearchInstance;t(O(E({},this.getWidgetRenderState(g)),{instantSearchInstance:m}),!0)},render:function(g){var m=g.instantSearchInstance;t(O(E({},this.getWidgetRenderState(g)),{instantSearchInstance:m}),!1)},dispose:function(){n()},getRenderState:function(g,m){return O(E({},g),{clearRefinements:this.getWidgetRenderState(m)})},getWidgetRenderState:function(g){var m=g.createURL,c=g.scopedResults,v=g.results;h.attributesToClear=c.reduce(function(b,S){return b.concat(Rc({scopedResult:S,includedAttributes:o,excludedAttributes:d,transformItems:p,results:v}))},[]),h.refine=function(){h.attributesToClear.forEach(function(b){var S=b.helper,P=b.items;S.setState(la({helper:S,attributesToClear:P})).search()})},h.createURL=function(){return m(bt.apply(void 0,ce(h.attributesToClear.map(function(b){var S=b.helper,P=b.items;return la({helper:S,attributesToClear:P})}))))};var y=h.attributesToClear.some(function(b){return b.items.length>0});return{canRefine:y,hasRefinements:y,refine:_,createURL:l,widgetParams:r}}}}};function Rc(e){var t=e.scopedResult,n=e.includedAttributes,r=e.excludedAttributes,a=e.transformItems,i=e.results,o=n.indexOf("query")!==-1||r.indexOf("query")===-1;return{helper:t.helper,items:a(si(oi(t.results,t.helper.state,o).map(function(u){return u.attribute}).filter(function(u){return n.length===0||n.indexOf(u)!==-1}).filter(function(u){return u==="query"&&o||r.indexOf(u)===-1})),{results:i})}}var da=ge({name:"current-refinements",connector:!0}),bc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return Se(t,da()),function(r){if((r||{}).includedAttributes&&(r||{}).excludedAttributes)throw new Error(da("The options `includedAttributes` and `excludedAttributes` cannot be used together."));var a=r||{},i=a.includedAttributes,o=a.excludedAttributes,u=o===void 0?["query"]:o,d=a.transformItems,f=d===void 0?function(p){return p}:d;return{$$type:"ais.currentRefinements",init:function(h){var _=h.instantSearchInstance;t(O(E({},this.getWidgetRenderState(h)),{instantSearchInstance:_}),!0)},render:function(h){var _=h.instantSearchInstance;t(O(E({},this.getWidgetRenderState(h)),{instantSearchInstance:_}),!1)},dispose:function(){n()},getRenderState:function(h,_){return O(E({},h),{currentRefinements:this.getWidgetRenderState(_)}
16)},getWidgetRenderState:function(h){var _=h.results,l=h.scopedResults,s=h.createURL,g=h.helper;function m(){return _?l.reduce(function(v,y){return v.concat(f(ha({results:y.results,helper:y.helper,indexId:y.indexId,includedAttributes:i,excludedAttributes:u}),{results:_}))},[]):f(ha({results:null,helper:g,indexId:g.state.index,includedAttributes:i,excludedAttributes:u}),{results:_})}var c=m();return{items:c,canRefine:c.length>0,refine:function(y){return Zs(g,y)},createURL:function(y){return s(Xs(g.state,y))},widgetParams:r}}}}};function ha(e){var t=e.results,n=e.helper,r=e.indexId,a=e.includedAttributes,i=e.excludedAttributes,o=(a||[]).indexOf("query")!==-1||(i||[]).indexOf("query")===-1,u=a?function(f){return a.indexOf(f.attribute)!==-1}:function(f){return i.indexOf(f.attribute)===-1},d=oi(t,n.state,o).map(wc).filter(u);return d.reduce(function(f,p){return ce(f.filter(function(h){return h.attribute!==p.attribute})).concat([{indexName:n.state.index,indexId:r,attribute:p.attribute,label:p.attribute,refinements:d.filter(function(h){return h.attribute===p.attribute}).sort(function(h,_){return h.type==="numeric"?h.value-_.value:0}),refine:function(_){return Zs(n,_)}}])},[])}function Xs(e,t){switch(e=e.resetPage(),t.type){case"facet":return e.removeFacetRefinement(t.attribute,String(t.value));case"disjunctive":return e.removeDisjunctiveFacetRefinement(t.attribute,String(t.value));case"hierarchical":return e.removeHierarchicalFacetRefinement(t.attribute);case"exclude":return e.removeExcludeRefinement(t.attribute,String(t.value));case"numeric":return e.removeNumericRefinement(t.attribute,t.operator,String(t.value));case"tag":return e.removeTagRefinement(String(t.value));case"query":return e.setQueryParameter("query","");default:return e}}function Zs(e,t){e.setState(Xs(e.state,t)).search()}function _c(e){switch(e){case">=":return"â¥";case"<=":return"â¤";default:return e}}function wc(e){var t=Pc(e),n=e.operator?"".concat(_c(e.operator)," ").concat(e.name):e.name,r={attribute:e.attribute,type:e.type,value:t,label:n};return e.operator!==void 0&&(r.operator=e.operator),e.count!==void 0&&(r.count=e.count),e.exhaustive!==void 0&&(r.exhaustive=e.exhaustive),r}function Pc(e){return e.type==="numeric"?Number(e.name):"escapedValue"in e?e.escapedValue:e.name}function Fc(e){if(Array.isArray(e))return e}function xc(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],a=!0,i=!1,o,u;try{for(n=n.call(e);!(a=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));a=!0);}catch(d){i=!0,u=d}finally{try{!a&&n.return!=null&&n.return()}finally{if(i)throw u}}return r}}function Ic(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 17In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oe(e,t){return Fc(e)||xc(e,t)||Hs(e,t)||Ic()}function Ec(e,t,n){return e.state.isHierarchicalFacet(t)?e.state.isHierarchicalFacetRefined(t,n):e.state.isConjunctiveFacet(t)?e.state.isFacetRefined(t,n):e.state.isDisjunctiveFacetRefined(t,n)}function ui(e){var t=e.instantSearchInstance,n=e.helper,r=e.attribute,a=e.widgetType,i=function(){for(var u=arguments.length,d=new Array(u),f=0;f<u;f++)d[f]=arguments[f];var p=oe(d,4),h=p[1],_=p[2],l=_===void 0?"Filter Applied":_,s=p[3],g=s===void 0?{}:s,m=oe(d[0].split(":"),2),c=m[0],v=m[1],y=typeof r=="string"?r:r(h);if(d.length===1&&Be(d[0])==="object")t.sendEventToInsights(d[0]);else if(c==="click"&&d.length>=2&&d.length<=4&&!Ec(n,y,h)){var b;t.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:a,eventType:c,eventModifier:v,payload:E({eventName:l,index:((b=n.lastResults)===null||b===void 0?void 0:b.index)||n.state.index,filters:["".concat(y,":").concat(h)]},g),attribute:y})}};return i}var Mr=ge({name:"hierarchical-menu",connector:!0}),ga=["name:asc"],Ac=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return Se(t,Mr()),function(r){var a=r||{},i=a.attributes,o=a.separator,u=o===void 0?" > ":o,d=a.rootPath,f=d===void 0?null:d,p=a.showParentLevel,h=p===void 0?!0:p,_=a.limit,l=_===void 0?10:_,s=a.showMore,g=s===void 0?!1:s,m=a.showMoreLimit,c=m===void 0?20:m,v=a.sortBy,y=v===void 0?ga:v,b=a.transformItems,S=b===void 0?function(C){return C}:b;if(!i||!Array.isArray(i)||i.length===0)throw new Error(Mr("The `attributes` option expects an array of str
17ings."));if(g===!0&&c<=l)throw new Error(Mr("The `showMoreLimit` option must be greater than `limit`."));var P=oe(i,1),F=P[0],w,R=function(){};function x(){R()}var I,A=!1;function M(C,T){return function(){A=!A,T.render(C)}}function j(){return A?c:l}function q(C){return C.slice(0,j()).map(function(T){var W=T.name,$=T.escapedValue,U=T.data;T.path;var k=we(T,["name","escapedValue","data","path"]),B=O(E({},k),{value:$,label:W,data:null});return Array.isArray(U)&&(B.data=q(U)),B})}function D(C,T){var W=j();return!(T>W?C.length<=W:C.length<W)||C.slice(0,l).some(function($){return Array.isArray($.data)&&$.data.length>0&&D($.data,T)})}return{$$type:"ais.hierarchicalMenu",init:function(T){var W=T.instantSearchInstance;t(O(E({},this.getWidgetRenderState(T)),{instantSearchInstance:W}),!0)},render:function(T){var W=T.instantSearchInstance;R=M(T,this),t(O(E({},this.getWidgetRenderState(T)),{instantSearchInstance:W}),!1)},dispose:function(T){var W=T.state;return n(),W.removeHierarchicalFacet(F).setQueryParameter("maxValuesPerFacet",void 0)},getRenderState:function(T,W){return O(E({},T),{hierarchicalMenu:O(E({},T.hierarchicalMenu),N({},F,this.getWidgetRenderState(W)))})},getWidgetRenderState:function(T){var W=this,$=T.results,U=T.state,k=T.createURL,B=T.instantSearchInstance,X=T.helper,z=[],V=!1,Y=function(re){return k(function(me){return W.getWidgetUiState(me,{searchParameters:U.resetPage().toggleFacetRefinement(F,re),helper:X})})};if(w||(w=ui({instantSearchInstance:B,helper:X,attribute:function(re){var me=re.split(u).length-1;return i[me]},widgetType:this.$$type})),I||(I=function(re){w("click:internal",re),X.toggleFacetRefinement(F,re).search()}),$){var te=$.getFacetValues(F,{sortBy:y,facetOrdering:y===ga}),se=te&&!Array.isArray(te)&&te.data?te.data:[],Z=D(se,U.maxValuesPerFacet||0);V=g&&(A||Z),z=S(q(se),{results:$})}return{items:z,refine:I,canRefine:z.length>0,createURL:Y,sendEvent:w,widgetParams:r,isShowingMore:A,toggleShowMore:x,canToggleShowMore:V}},getWidgetUiState:function(T,W){var $=W.searchParameters,U=$.getHierarchicalFacetBreadcrumb(F);return Tc(O(E({},T),{hierarchicalMenu:O(E({},T.hierarchicalMenu),N({},F,U))}),F)},getWidgetSearchParameters:function(T,W){var $=W.uiState,U=$.hierarchicalMenu&&$.hierarchicalMenu[F];if(T.isConjunctiveFacet(F)||T.isDisjunctiveFacet(F))return T;T.isHierarchicalFacet(F)&&T.getHierarchicalFacetByName(F);var k=T.removeHierarchicalFacet(F).addHierarchicalFacet({name:F,attributes:i,separator:u,rootPath:f,showParentLevel:h}),B=k.maxValuesPerFacet||0,X=Math.max(B,g?c:l),z=k.setQueryParameter("maxValuesPerFacet",X);return U?z.addHierarchicalFacetRefinement(F,U.join(u)):z.setQueryParameters({hierarchicalFacetsRefinements:O(E({},z.hierarchicalFacetsRefinements),N({},F,[]))})}}}};function Tc(e,t){return e.hierarchicalMenu&&((!e.hierarchicalMenu[t]||e.hierarchicalMenu[t].length===0)&&delete e.hierarchicalMenu[t],Object.keys(e.hierarchicalMenu).length===0&&delete e.hierarchicalMenu),e}function Oc(e){return btoa(encodeURIComponent(JSON.stringify(e)))}function jc(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:20,n=[],r=0;r<Math.ceil(e.length/t);r++)n.push(e.slice(r*t,(r+1)*t));return n}function eo(e){var t=e.helper,n=e.widgetType;e.methodName;var r=e.args,a=e.instantSearchInstance;if(r.length===1&&Be(r[0])==="object")return[r[0]];var i=oe(r[0].split(":"),2),o=i[0],u=i[1],d=r[1],f=r[2],p=r[3]||{};if(!d)return[];if((o==="click"||o==="conversion")&&!f)return[];var h=Array.isArray(d)?d:[d];if(h.length===0)return[];var _=h[0].__queryID,l=jc(h),s=l.map(function(m){return m.map(function(c){return c.objectID})}),g=l.map(function(m){return m.map(function(c){return c.__position})});return o==="view"?a.status!=="idle"?[]:l.map(function(m,c){var v;return{insightsMethod:"viewedObjectIDs",widgetType:n,eventType:o,payload:E({eventName:f||"Hits Viewed",index:((v=t.lastResults)===null||v===void 0?void 0:v.index)||t.state.index,objectIDs:s[c]},p),hits:m,eventModifier:u}}):o==="click"?l.map(function(m,c){var v;return{insightsMethod:"clickedObjectIDsAfterSearch",widgetType:n,eventType:o,payload:E({eventName:f||"Hit Clicked",index:((v=t.lastResults)===null||v===void 0?void 0:v.index)||t.state.index,queryID:_,objectIDs:s[c],positions:g[c]},p),hits:m,eventModifier:u}}):o==="conversion"?l.map(function(m,c){var v;return{insightsMethod:"convertedObjectIDsAfterSearch",widgetType:n,eventType:o,payload:E({eventName:f||"Hit Converted",index:((v=t.lastResults)===null||v===void 0?void 0:v.index)||t.state.index,queryID:_,objectIDs:s[c]},p),hits:m,eventModifier:u}}):[]}function ci(e){var t=e.instantSearchInstance,n=e.helper,r=e.widgetType,a={},i=void 0,o=function(){for(var d=arguments.length,f=new Array(d),p=0;p<d;p++)f[p]=arguments[p];var h=eo({widgetType:r,helper:n,methodName:"sendEvent",args:f,instantSearchInstance:t});h.forEach(function(_){_.eventType==="click"&&_.eventModifier==="internal"&&a[_.eventType]||(a[_.eventType]=!0,t.sendEventToInsights(_))}),clearTimeout(i),i=setTimeout(function(){a={}},0)};return o}function to(e){var t=e.helper,n=e.widgetType,r=e.instantSearchInstance,a=function(){for(var o=arguments.length,u=new Array(o),d=0;d<o;d++)u[d]=arguments[d];var f=eo({widgetType:n,helper:t,methodName:"bindEvent",args:u,instantSearchInstance:r});return f.length?"data-insights-event=".concat(Oc(f)):""};return a}var Cc=ge({name:"hits",connector:!0}),$c=(function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return Se(t,Cc()),function(r){var a=r||{},i=a.escapeHTML,o=i===void 0?!0:i,u=a.transformItems,d=u===void 0?function(h){return h}:u,f,p;return{$$type:"ais.hits",init:function(_){t(O(E({},this.getWidgetRenderState(_)),{instantSearchInstance:_.instantSearchInstance}),!0)},render:function(_){var l=this.getWidgetRenderState(_);t(O(E({},l),{instantSearchInstance:_.instantSearchInstance}),!1),l.sendEvent("view:internal",l.items)},getRenderState:function(_,l){return O(E({},_),{hits:this.getWidgetRenderState(l)})},getWidgetRenderState:function(_){var l=_.results,s=_.helper,g=_.instantSearchInstance,m,c,v;if(f||(f=ci({instantSearchInstance:g,helper:s,widgetType:this.$$type})),p||(p=to({helper:s,widgetType:this.$$type,instantSearchInstance:g})),!l)return{hits:[],items:[],results:void 0,banner:void 0,sendEvent:f,bindEvent:p,widgetParams:r};o&&l.hits.length>0&&(l.hits=Yn(l.hits));var y=Xn(l.hits,l.page,l.hitsPerPage),b=Zn(y,l.queryID),S=d(b,{results:l}),P=(v=l.renderingContent)===null||v===void 0||(c=v.widgets)===null||c===void 0||(m=c.banners)===null||m===void 0?void 0:m[0];return{hits:S,items:S,results:l,banner:P,sendEvent:f,bindEvent:p,widgetParams:r}},dispose:function(_){var l=_.state;return n(),o?l.setQueryParameters(Object.keys(Ve).reduce(function(s,g){return O(E({},s),N({},g,void 0))},{})):l},getWidgetSearchParameters:function(_,l){return o?_.setQueryParameters(Ve):_}}}}),Lc=function(t,n){return n.map(function(r){var a=ut(t,function(i){return i.objectID===r});if(typeof a>"u")throw new Error('Could not find objectID "'.concat(r,'" passed to `clickedObjectIDsAfterSearch` in the returned hits. This is necessary to infer the absolute position and the query ID.'));return a})},Wc=function(t){var n=si(t.map(function(a){return a.__queryID}));if(n.length>
171)throw new Error("Insights currently allows a single `queryID`. The `objectIDs` provided map to multiple `queryID`s.");var r=n[0];if(typeof r!="string")throw new Error("Could not infer `queryID`. Ensure InstantSearch `clickAnalytics: true` was added with the Configure widget.\n\nSee: https://alg.li/lNiZZ7");return r},Hc=function(t){return t.map(function(n){return n.__position})},Nc=function(t){var n=t.method,r=t.results,a=t.hits,i=t.objectIDs,o=r.index,u=Lc(a,i),d=Wc(u);switch(n){case"clickedObjectIDsAfterSearch":{var f=Hc(u);return{index:o,queryID:d,objectIDs:i,positions:f}}case"convertedObjectIDsAfterSearch":return{index:o,queryID:d,objectIDs:i};default:throw new Error('Unsupported method passed to insights: "'.concat(n,'".'))}},Mc=function(t,n,r){return function(a){for(var i=arguments.length,o=new Array(i>1?i-1:0),u=1;u<i;u++)o[u-1]=arguments[u];var d=oe(o,1),f=d[0];if(!t){var p=ge({name:"instantsearch"});throw new Error(p("The `insightsClient` option has not been provided to `instantsearch`."))}if(!Array.isArray(f.objectIDs))throw new TypeError("Expected `objectIDs` to be an array.");var h=Nc({method:a,results:n,hits:r,objectIDs:f.objectIDs});t(a,E({},h,f))}};function ro(e){return function(t,n){return e(function(r,a){var i=r.results,o=r.hits,u=r.instantSearchInstance;if(i&&o&&u){var d=Mc(u.insightsClient,i,o);return t(O(E({},r),{insights:d}),a)}return t(r,a)},n)}}var Uc=ro($c),Ut=ge({name:"hits-per-page",connector:!0}),Dc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return Se(t,Ut()),function(r){var a=r||{},i=a.items,o=a.transformItems,u=o===void 0?function(l){return l}:o;if(!Array.isArray(i))throw new Error(Ut("The `items` option expects an array of objects."));var d=i,f=d.filter(function(l){return l.default===!0});if(f.length===0)throw new Error(Ut("A default value must be specified in `items`."));if(f.length>1)throw new Error(Ut("More than one default value is specified in `items`."));var p=f[0],h=function(s){var g=s.hitsPerPage;return d.map(function(m){return O(E({},m),{isRefined:Number(m.value)===Number(g)})})},_={getRefine:function(s){return function(g){return!g&&g!==0?s.setQueryParameter("hitsPerPage",void 0).search():s.setQueryParameter("hitsPerPage",g).search()}},createURLFactory:function(s){var g=s.state,m=s.createURL,c=s.getWidgetUiState,v=s.helper;return function(y){return m(function(b){return c(b,{searchParameters:g.resetPage().setQueryParameter("hitsPerPage",!y&&y!==0?void 0:y),helper:v})})}}};return{$$type:"ais.hitsPerPage",init:function(s){var g=s.state,m=s.instantSearchInstance,c=d.some(function(v){return Number(g.hitsPerPage)===Number(v.value)});c||(d=[{value:"",label:""}].concat(ce(d))),t(O(E({},this.getWidgetRenderState(s)),{instantSearchInstance:m}),!0)},render:function(s){var g=s.instantSearchInstance;t(O(E({},this.getWidgetRenderState(s)),{instantSearchInstance:g}),!1)},dispose:function(s){var g=s.state;return n(),g.setQueryParameter("hitsPerPage",void 0)},getRenderState:function(s,g){return O(E({},s),{hitsPerPage:this.getWidgetRenderState(g)})},getWidgetRenderState:function(s){var g=s.state,m=s.results,c=s.createURL,v=s.helper,y=m?m.nbHits>0:!1;return{items:u(h(g),{results:m}),refine:_.getRefine(v),createURL:_.createURLFactory({state:g,createURL:c,getWidgetUiState:this.getWidgetUiState,helper:v}),hasNoResults:!y,canRefine:y,widgetParams:r}},getWidgetUiState:function(s,g){var m=g.searchParameters,c=m.hitsPerPage;return c===void 0||c===p.value?s:O(E({},s),{hitsPerPage:c})},getWidgetSearchParameters:function(s,g){var m=g.uiState;return s.setQueryParameters({hitsPerPage:m.hitsPerPage||p.value})}}}};function qc(e){return e.$$type==="ais.dynamicWidgets"||e.$$type==="ais.feeds"}var kc=["ais.index","ais.feedContainer"];function ke(e){return kc.includes(e.$$type)}function no(e,t){t(e),e.getWidgets().forEach(function(n){ke(n)&&no(n,t)})}function ma(e){return e!==Object(e)}function li(e,t){if(e===t)return!0;if(ma(e)||ma(t)||typeof e=="function"||typeof t=="function")return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;var n=!0,r=!1,a=void 0;try{for(var i=Object.keys(e)[Symbol.iterator](),o;!(n=(o=i.next()).done);
17n=!0){var u=o.value;if(!(u in t)||!li(e[u],t[u]))return!1}}catch(d){r=!0,a=d}finally{try{!n&&i.return!=null&&i.return()}finally{if(r)throw a}}return!0}var Bc=ge({name:"infinite-hits",connector:!0});function va(e){var t=e||{};t.page;var n=we(t,["page"]);return n}function pa(e){var t=e||{};t.clickAnalytics,t.userToken;var n=we(t,["clickAnalytics","userToken"]);return n}function Qc(){var e=null,t=null;return{read:function(r){var a=r.state;return li(t,va(a))?e:null},write:function(r){var a=r.state,i=r.hits;t=va(a),e=i}}}function Vc(e){return Object.keys(e).map(Number).sort(function(t,n){return t-n}).reduce(function(t,n){return t.concat(e[n])},[])}var zc=(function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return Se(t,Bc()),function(r){var a=r||{},i=a.escapeHTML,o=i===void 0?!0:i,u=a.transformItems,d=u===void 0?function(y){return y}:u,f=a.cache,p=f===void 0?Qc():f,h,_,l,s,g=function(b,S){var P=b.page,F=P===void 0?0:P,w=Object.keys(S).map(Number);if(w.length===0)return F;var R;return(R=Math).min.apply(R,[F].concat(ce(w)))},m=function(b,S){var P=b.page,F=P===void 0?0:P,w=Object.keys(S).map(Number);if(w.length===0)return F;var R;return(R=Math).max.apply(R,[F].concat(ce(w)))},c=function(b,S){return function(){var P=S();b.overrideStateWithoutTriggeringChangeEvent(O(E({},b.state),{page:g(b.state,P)-1})).searchWithoutTriggeringOnStateChange()}},v=function(b,S){return function(){var P=S();b.setPage(m(b.state,P)+1).search()}};return{$$type:"ais.infiniteHits",init:function(b){t(O(E({},this.getWidgetRenderState(b)),{instantSearchInstance:b.instantSearchInstance}),!0)},render:function(b){var S=b.instantSearchInstance,P=this.getWidgetRenderState(b);t(O(E({},P),{instantSearchInstance:S}),!1),l("view:internal",P.currentPageHits)},getRenderState:function(b,S){return O(E({},b),{infiniteHits:this.getWidgetRenderState(S)})},getWidgetRenderState:function(b){var S=b.results,P=b.helper,F=b.parent,w=b.state,R=b.instantSearchInstance,x,I,A,M=function(){var ie=F.getPreviousState()||w;return p.read({state:pa(ie)})||{}},j,q=[],D=F.getPreviousState()||w,C=M(),T=S==null||(A=S.renderingContent)===null||A===void 0||(I=A.widgets)===null||I===void 0||(x=I.banners)===null||x===void 0?void 0:x[0];if(h||(h=function(){return c(P,M)()},_=function(){return v(P,M)()}),l||(l=ci({instantSearchInstance:R,helper:P,widgetType:this.$$type}),s=to({helper:P,widgetType:this.$$type,instantSearchInstance:R})),!S)j=D.page===void 0||g(D,C)===0;else{var W,$,U=D.page,k=U===void 0?0:U;o&&S.hits.length>0&&(S.hits=Yn(S.hits));var B=Xn(S.hits,S.page,S.hitsPerPage),X=Zn(B,S.queryID),z=d(X,{results:S}),V=!1;no(R.mainIndex,function(Z){!V&&Z.getWidgets().some(qc)&&(V=!0)});var Y=!(!((W=D.disjunctiveFacets)===null||W===void 0)&&W.length)&&!(D.facets||[]).filter(function(Z){return Z!=="*"}).length&&!(!(($=D.hierarchicalFacets)===null||$===void 0)&&$.length);C[k]===void 0&&!S.__isArtificial&&R.status==="idle"&&!(V&&Y)&&(C[k]=z,p.write({state:pa(D),hits:C})),q=z,j=g(D,C)===0}var te=Vc(C),se=S?S.nbPages<=m(D,C)+1:!0;return{hits:te,items:te,currentPageHits:q,sendEvent:l,bindEvent:s,banner:T,results:S||void 0,showPrevious:h,showMore:_,isFirstPage:j,isLastPage:se,widgetParams:r}},dispose:function(b){var S=b.state;n();var P=S.setQueryParameter("page",void 0);return o?P.setQueryParameters(Object.keys(Ve).reduce(function(F,w){return O(E({},F),N({},w,void 0))},{})):P},getWidgetUiState:function(b,S){var P=S.searchParameters,F=P.page||0;return F?O(E({},b),{page:F+1}):b},getWidgetSearchParameters:function(b,S){var P=S.uiState,F=b;o&&(F=b.setQueryParameters(Ve));var w=P.page?P.page-1:0;return F.setQueryParameter("page",w)}}}}),Gc=ro(zc),Ur=ge({name:"menu",connector:!0}),ya=["isRefined","name:asc"],io=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return Se(t,Ur()),function(r){var a=r||{},i=a.attribute,o=a.limit,u=o===void 0?10:o,d=a.showMore,f=d===void 0?!1:d,p=a.showMoreLimit,h=p===void 0?20:p,_=a.sortBy,l=_===void 0?ya:_,s=a.transformItems,g=s===void 0?function(w){return w}:s;
17if(!i)throw new Error(Ur("The `attribute` option is required."));if(f===!0&&h<=u)throw new Error(Ur("The `showMoreLimit` option must be greater than `limit`."));var m,c,v,y=!1,b=function(){};function S(w,R){return function(){y=!y,R.render(w)}}function P(){b()}function F(){return y?h:u}return{$$type:"ais.menu",init:function(R){var x=R.instantSearchInstance;t(O(E({},this.getWidgetRenderState(R)),{instantSearchInstance:x}),!0)},render:function(R){var x=R.instantSearchInstance;t(O(E({},this.getWidgetRenderState(R)),{instantSearchInstance:x}),!1)},dispose:function(R){var x=R.state;return n(),x.removeHierarchicalFacet(i).setQueryParameter("maxValuesPerFacet",void 0)},getRenderState:function(R,x){return O(E({},R),{menu:O(E({},R.menu),N({},i,this.getWidgetRenderState(x)))})},getWidgetRenderState:function(R){var x=this,I=R.results,A=R.createURL,M=R.instantSearchInstance,j=R.helper,q=[],D=!1;if(m||(m=ui({instantSearchInstance:M,helper:j,attribute:i,widgetType:this.$$type})),c||(c=function($){return A(function(U){return x.getWidgetUiState(U,{searchParameters:j.state.resetPage().toggleFacetRefinement(i,$),helper:j})})}),v||(v=function($){var U=oe(j.getHierarchicalFacetBreadcrumb(i),1),k=U[0];m("click:internal",$||k),j.toggleFacetRefinement(i,$||k).search()}),R.results&&(b=S(R,this)),I){var C=I.getFacetValues(i,{sortBy:l,facetOrdering:l===ya}),T=C&&!Array.isArray(C)&&C.data?C.data:[];D=f&&(y||T.length>F()),q=g(T.slice(0,F()).map(function(W){var $=W.name,U=W.escapedValue;W.path;var k=we(W,["name","escapedValue","path"]);return O(E({},k),{label:$,value:U})}),{results:I})}return{items:q,createURL:c,refine:v,sendEvent:m,canRefine:q.length>0,widgetParams:r,isShowingMore:y,toggleShowMore:P,canToggleShowMore:D}},getWidgetUiState:function(R,x){var I=x.searchParameters,A=oe(I.getHierarchicalFacetBreadcrumb(i),1),M=A[0];return Kc(O(E({},R),{menu:O(E({},R.menu),N({},i,M))}),i)},getWidgetSearchParameters:function(R,x){var I=x.uiState,A=I.menu&&I.menu[i];if(R.isConjunctiveFacet(i)||R.isDisjunctiveFacet(i))return R;var M=R.removeHierarchicalFacet(i).addHierarchicalFacet({name:i,attributes:[i]}),j=M.maxValuesPerFacet||0,q=Math.max(j,f?h:u),D=M.setQueryParameter("maxValuesPerFacet",q);return A?D.addHierarchicalFacetRefinement(i,A):D.setQueryParameters({hierarchicalFacetsRefinements:O(E({},D.hierarchicalFacetsRefinements),N({},i,[]))})}}}};function Kc(e,t){return e.menu&&(e.menu[t]===void 0&&delete e.menu[t],Object.keys(e.menu).length===0&&delete e.menu),e}function fe(e){return typeof e=="number"&&isFinite(e)}var Dr=ge({name:"numeric-menu",connector:!0}),Jc="ais.numericMenu",Yc=function(t){var n=t.instantSearchInstance;return function(){for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];if(a.length===1){n.sendEventToInsights(a[0]);return}}},Xc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return Se(t,Dr()),function(r){var a=r||{},i=a.attribute,o=i===void 0?"":i,u=a.items,d=u===void 0?[]:u,f=a.transformItems,p=f===void 0?function(l){return l}:f;if(o==="")throw new Error(Dr("The `attribute` option is required."));if(!d||d.length===0)throw new Error(Dr("The `items` option expects an array of objects."));var h=function(s){return d.map(function(g){var m=g.start,c=g.end,v=g.label;return{label:v,value:encodeURI(JSON.stringify({start:m,end:c})),isRefined:ao(s,o,{start:m,end:c})}})},_={};return{$$type:Jc,init:function(s){var g=s.instantSearchInstance;t(O(E({},this.getWidgetRenderState(s)),{instantSearchInstance:g}),!0)},render:function(s){var g=s.instantSearchInstance;t(O(E({},this.getWidgetRenderState(s)),{instantSearchInstance:g}),!1)},dispose:function(s){var g=s.state;return n(),g.removeNumericRefinement(o)},getWidgetUiState:function(s,g){var m=g.searchParameters,c=m.getNumericRefinements(o),v=c["="]&&c["="][0];if(v||v===0)return O(E({},s),{numericMenu:O(E({},s.numericMenu),N({},o,"".concat(c["="])))});var y=c[">="]&&c[">="][0]||"",b=c["<="]&&c["<="][0]||"";return Zc(O(E({},s),{numericMenu:O(E({},s.numericMenu),N({},o,"".concat(y,":").concat(b)))}),o)},getWidgetSearchParameters:function(s,g){var m=g.uiState,c=m.numericMenu&&m.numericMenu[o],v=s.setQueryParameters({numericRefinements:O(E({},s.numericRefinements),N({},o,{}))});if(!c)return v;var y=c.indexOf(":")===-1;if(y)return v.addNumericRefinement(o,"=",Number(c));var b=oe(c.split(":").map(parseFloat),2),S=b[0],P=b[1],F=fe(S)?v.addNumericRefinement(o,">=",S):v,w=fe(P)?F.addNumericRefinement(o,"<=",P):F;return w},getRenderState:function(s,g){return O(E({},s),{numericMenu:O(E({},s.numericMenu),N({},o,this.getWidgetRenderState(g)))})},getWidgetRenderState:function(s){var g=this,m=s.results,c=s.state,v=s.instantSearchInstance,y=s.helper,b=s.createURL;_.refine||(_.refine=function(j){var q=Sa(y.state,o,j);_.sendEvent("click:internal",j),y.setState(q).search()}),_.createURL||(_.createURL=function(j){return function(q){return b(function(D){return g.getWidgetUiState(D,{searchParameters:Sa(j,o,q),helper:y})})}}),_.sendEvent||(_.sendEvent=Yc({instantSearchInstance:v}));var S=m?m.nbHits===0:!0,P=h(c),F=!0,w=!0,R=!1,x=void 0;try{for(var I=P[Symbol.iterator](),A;!(w=(A=I.next()).done);w=!0){var M=A.value;if(M.isRefined&&decodeURI(M.value)!=="{}"){F=!1;break}}}catch(j){R=!0,x=j}finally{try{!w&&I.return!=null&&I.return()}finally{if(R)throw x}}return{createURL:_.createURL(c),items:p(P,{results:m}),hasNoResults:S,canRefine:!(S&&F),refine:_.refine,sendEvent:_.sendEvent,widgetParams:r}}}}};
17function ao(e,t,n){var r=e.getNumericRefinements(t);return n.start!==void 0&&n.end!==void 0?n.start===n.end?et(r,"=",n.start):et(r,">=",n.start)&&et(r,"<=",n.end):n.start!==void 0?et(r,">=",n.start):n.end!==void 0?et(r,"<=",n.end):n.start===void 0&&n.end===void 0?Object.keys(r).every(function(a){return(r[a]||[]).length===0}):!1}function Sa(e,t,n){var r=e,a=JSON.parse(decodeURI(n)),i=r.getNumericRefinements(t);if(a.start===void 0&&a.end===void 0)return r.removeNumericRefinement(t);if(ao(r,t,a)||(r=r.removeNumericRefinement(t)),a.start!==void 0&&a.end!==void 0){if(a.start>a.end)throw new Error("option.start should be > to option.end");if(a.start===a.end)return et(i,"=",a.start)?r=r.removeNumericRefinement(t,"=",a.start):r=r.addNumericRefinement(t,"=",a.start),r}return a.start!==void 0&&(et(i,">=",a.start)&&(r=r.removeNumericRefinement(t,">=",a.start)),r=r.addNumericRefinement(t,">=",a.start)),a.end!==void 0&&(et(i,"<=",a.end)&&(r=r.removeNumericRefinement(t,"<=",a.end)),r=r.addNumericRefinement(t,"<=",a.end)),typeof r.page=="number"&&(r.page=0),r}function et(e,t,n){var r=e[t];return r!==void 0&&r.includes(n)}function Zc(e,t){return e.numericMenu&&(e.numericMenu[t]===":"&&delete e.numericMenu[t],Object.keys(e.numericMenu).length===0&&delete e.numericMenu),e}function fi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function el(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function di(e,t,n){return t&&el(e.prototype,t),e}function Ra(e){var t=e.start,n=t===void 0?0:t,r=e.end,a=e.step,i=a===void 0?1:a,o=i===0?1:i,u=Math.round((r-n)/o);return ce(Array(u)).map(function(d,f){return n+f*o})}var tl=(function(){function e(t){fi(this,e),N(this,"currentPage",void 0),N(this,"total",void 0),N(this,"padding",void 0),this.currentPage=t.currentPage,this.total=t.total,this.padding=t.padding}return di(e,[{key:"pages",value:function(){var n=this,r=n.total,a=n.currentPage,i=n.padding;if(r===0)return[0];var o=this.nbPagesDisplayed(i,r);if(o===r)return Ra({end:r});var u=this.calculatePaddingLeft(a,i,r,o),d=o-u,f=a-u,p=a+d;return Ra({start:f,end:p})}},{key:"nbPagesDisplayed",value:function(n,r){return Math.min(2*n+1,r)}},{key:"calculatePaddingLeft",value:function(n,r,a,i){return n<=r?n:n>=a-r?i-(a-n):r}},{key:"isLastPage",value:function(){return this.currentPage>=this.total-1}},{key:"isFirstPage",value:function(){return this.currentPage<=0}}]),e})(),rl=ge({name:"pagination",connector:!0}),nl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return Se(t,rl()),function(r){var a=r||{},i=a.totalPages,o=a.padding,u=o===void 0?3:o,d=new tl({currentPage:0,total:0,padding:u}),f={};function p(h){var _=h.nbPages;return i!==void 0?Math.min(i,_):_}return{$$type:"ais.pagination",init:function(_){var l=_.instantSearchInstance;t(O(E({},this.getWidgetRenderState(_)),{instantSearchInstance:l}),!0)},render:function(_){var l=_.instantSearchInstance;t(O(E({},this.getWidgetRenderState(_)),{instantSearchInstance:l}),!1)},dispose:function(_){var l=_.state;return n(),l.setQueryParameter("page",void 0)},getWidgetUiState:function(_,l){var s=l.searchParameters,g=s.page||0;return g?O(E({},_),{page:g+1}):_},getWidgetSearchParameters:function(_,l){var s=l.uiState,g=s.page?s.page-1:0;return _.setQueryParameter("page",g)},getWidgetRenderState:function(_){var l=_.results,s=_.helper,g=_.state,m=_.createURL;f.refine||(f.refine=function(y){s.setPage(y),s.search()}),f.createURL||(f.createURL=function(y){return m(function(b){return O(E({},b),{page:y+1})})});var c=g.page||0,v=p(l||{nbPages:0});return d.currentPage=c,d.total=v,{createURL:f.createURL,refine:f.refine,canRefine:v>1,currentRefinement:c,nbHits:l?.nbHits||0,nbPages:v,pages:l?d.pages():[],isFirstPage:d.isFirstPage(),isLastPage:d.isLastPage(),widgetParams:r}},getRenderState:function(_,l){return O(E({},_),{pagination:this.getWidgetRenderState(l)})}}}},qr=ge({name:"range-input",connector:!0},{name:"range-slider",connector:!0}),il="ais.range";function ba(e){var t=e.min,n=e.max,r=e.precision,a=Math.pow(10,r);return{min:t&&Math.floor(t*a)/a,max:n&&Math.ceil(n*a)/a}}var al=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return Se(t,qr()),function(r){var a=r||{},i=a.attribute,o=i===void 0?"":i,u=a.min,d=a.max,f=a.precision,p=f===void 0?0:f;if(!o)throw new Error(qr("The `attribute` option is required."));if(fe(u)&&fe(d)&&u>d)throw new Error(qr("The `max` option can't be lower than `min`."));var h=function(y){return Number(Number(y).toFixed(p))}
17,_={from:function(y){return y.toLocaleString()},to:function(y){return h(y).toLocaleString()}},l=function(y,b,S,P){var F=y.state,w=b.min,R=b.max,x=oe(F.getNumericRefinement(o,">=")||[],1),I=x[0],A=oe(F.getNumericRefinement(o,"<=")||[],1),M=A[0],j=S===void 0||S==="",q=P===void 0||P==="",D=ba({min:j?void 0:parseFloat(S),max:q?void 0:parseFloat(P),precision:p}),C=D.min,T=D.max,W;!fe(u)&&w===C?W=void 0:fe(u)&&j?W=u:W=C;var $;!fe(d)&&R===T?$=void 0:fe(d)&&q?$=d:$=T;var U=W===void 0,k=fe(w)&&w<=W,B=U||fe(W)&&(!fe(w)||k),X=$===void 0,z=fe($)&&R>=$,V=X||fe($)&&(!fe(R)||z),Y=I!==W,te=M!==$;return(Y||te)&&B&&V?(F=F.removeNumericRefinement(o),fe(W)&&(F=F.addNumericRefinement(o,">=",W)),fe($)&&(F=F.addNumericRefinement(o,"<=",$)),F.resetPage()):null},s=function(y){return function(){for(var b=arguments.length,S=new Array(b),P=0;P<b;P++)S[P]=arguments[P];if(S.length===1){y.sendEventToInsights(S[0]);return}}};function g(v){var y;fe(u)?y=u:fe(v.min)?y=v.min:y=0;var b;return fe(d)?b=d:fe(v.max)?b=v.max:b=0,ba({min:y,max:b,precision:p})}function m(v){var y=oe(v.getNumericRefinement(o,">=")||[],1),b=y[0],S=oe(v.getNumericRefinement(o,"<=")||[],1),P=S[0],F=fe(b)?b:-1/0,w=fe(P)?P:1/0;return[F,w]}function c(v,y){return function(){var b=oe(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[void 0,void 0],2),S=b[0],P=b[1],F=l(v,y,S,P);F&&v.setState(F).search()}}return{$$type:il,init:function(y){t(O(E({},this.getWidgetRenderState(y)),{instantSearchInstance:y.instantSearchInstance}),!0)},render:function(y){t(O(E({},this.getWidgetRenderState(y)),{instantSearchInstance:y.instantSearchInstance}),!1)},getRenderState:function(y,b){return O(E({},y),{range:O(E({},y.range),N({},o,this.getWidgetRenderState(b)))})},getWidgetRenderState:function(y){var b=y.results,S=y.helper,P=y.instantSearchInstance,F=b&&b.disjunctiveFacets||[],w=ut(F,function(M){return M.name===o}),R=w&&w.stats||{min:void 0,max:void 0},x=g(R),I=m(S),A;return b?A=c(S,x):A=c(S,{min:void 0,max:void 0}),{refine:A,canRefine:x.min!==x.max,format:_,range:x,sendEvent:s(P),widgetParams:O(E({},r),{precision:p}),start:I}},dispose:function(y){var b=y.state;return n(),b.removeDisjunctiveFacet(o).removeNumericRefinement(o)},getWidgetUiState:function(y,b){var S=b.searchParameters,P=S.getNumericRefinements(o),F=P[">="],w=F===void 0?[]:F,R=P["<="],x=R===void 0?[]:R;return w.length===0&&x.length===0?y:O(E({},y),{range:O(E({},y.range),N({},o,"".concat(w,":").concat(x)))})},getWidgetSearchParameters:function(y,b){var S=b.uiState,P=y.addDisjunctiveFacet(o).setQueryParameters({numericRefinements:O(E({},y.numericRefinements),N({},o,{}))});fe(u)&&(P=P.addNumericRefinement(o,">=",u)),fe(d)&&(P=P.addNumericRefinement(o,"<=",d));var F=S.range&&S.range[o];if(!F||F.indexOf(":")===-1)return P;var w=oe(F.split(":").map(parseFloat),2),R=w[0],x=w[1];return fe(R)&&(!fe(u)||u<R)&&(P=P.removeNumericRefinement(o,">="),P=P.addNumericRefinement(o,">=",R)),fe(x)&&(!fe(d)||x<d)&&(P=P.removeNumericRefinement(o,"<="),P=P.addNumericRefinement(o,"<=",x)),P}}}},Dt=ge({name:"refinement-list",connector:!0}),_a=["isRefined","count:desc","name:asc"],sl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return Se(t,Dt()),function(r){var a=r||{},i=a.attribute,o=a.operator,u=o===void 0?"or":o,d=a.limit,f=d===void 0?10:d,p=a.showMore,h=p===void 0?!1:p,_=a.showMoreLimit,l=_===void 0?20:_,s=a.sortBy,g=s===void 0?_a:s,m=a.escapeFacetValues,c=m===void 0?!0:m,v=a.transformItems,y=v===void 0?function(C){return C}:v;if(!i)throw new Error(Dt("The `attribute` option is required."));if(!/^(and|or)$/.test(u))throw new Error(Dt('The `operator` must one of: `"and"`, `"or"` (got "'.concat(u,'").')));if(h===!0&&l<=f)throw new Error(Dt("`showMoreLimit` should be greater than `limit`."));var b=function(T){var W=T.name,$=T.escapedValue,U=we(T,["name","escapedValue"]);return O(E({},U),{value:$,label:W,highlighted:W})},S,P=[],F=!0,w,R,x=!1,I=function(){};function A(){I()}function M(C,T){return function(){x=!x,T.render(C)}}function j(){return x?l:f}var q=function(){return function(){}},D=function(T,W){return function($){return function(U){var k=$.instantSearchInstance,B=$.results;if(U===""&&P)t(O(E({},W.getWidgetRenderState(O(E({},$),{results:S}))),{instantSearchInstance:k}),!1);else{var X={highlightPreTag:c?Ve.highlightPreTag:_t.highlightPreTag,highlightPostTag:c?Ve.highlightPostTag:_t.highlightPostTag};T.searchForFacetValues(i,U,Math.min(j(),100),X).then(function(z){var V=c?Mu(z.facetHits):z.facetHits,Y=y(V.map(function(te){var se=te.escapedValue,Z=te.value,ie=we(te,["escapedValue","value"]);return O(E({},ie),{value:se,label:Z})}),{results:B});t(O(E({},W.getWidgetRenderState(O(E({},$),{results:S}))),{items:Y,canToggleShowMore:!1,canRefine:!0,isFromSearch:!0,instantSearchInstance:k}),!1)})}}}};return{$$type:"ais.refinementList",init:function(T){t(O(E({},this.getWidgetRenderState(T)),{instantSearchInstance:T.instantSearchInstance}),!0)},render:function(T){t(O(E({},this.getWidgetRenderState(T)),{instantSearchInstance:T.instantSearchInstance}),!1)},getRenderState:function(T,W){return O(E({},T),{refinementList:O(E({},T.refinementList),N({},i,this.getWidgetRenderState(W)))})},getWidgetRenderState:function(T){var W=this,$=T.results,U=T.state,k=T.createURL,B=T.instantSearchInstance,X=T.helper,z=[],V=[];if((!R||!w||!q)&&(R=ui({instantSearchInstance:B,helper:X,attribute:i,widgetType:this.$$type}),w=function(xe){R("click:internal",xe),X.toggleFacetRefinement(i,xe).search()},q=D(X,this)),$){var Y=$.getFacetValues(i,{sortBy:g,facetOrdering:g===_a});V=Y&&Array.isArray(Y)?Y:[],z=y(V.slice(0,j()).map(b),{results:$});var te=U.maxValuesPerFacet,se=j();F=te>se?V.length<=se:V.length<se,S=$,P=z,T.results&&(I=M(T,this))}var Z=q&&q(T),ie=x&&P.length>f,re=h&&!F,me=ie||re;return{createURL:function(xe){return k(function(Re){return W.getWidgetUiState(Re,{searchParameters:U.resetPage().toggleFacetRefinement(i,xe),helper:X})})},items:z,refine:w,searchForItems:Z,isFromSearch:!1,canRefine:z.length>0,widgetParams:r,isShowingMore:x,canToggleShowMore:me,toggleShowMore:A,sendEvent:R,hasExhaustiveItems:F}},dispose:function(T){var W=T.state;n();var $=W.setQueryParameter("maxValuesPerFacet",void 0);return u==="and"?$.removeFacet(i):$.removeDisjunctiveFacet(i)},getWidgetUiState:function(T,W){var $=W.searchParameters,U=u==="or"?$.getDisjunctiveRefinements(i):$.getConjunctiveRefinements(i);return ol(O(E({},T),{refinementList:O(E({},T.refinementList),N({},i,U))}),i)},getWidgetSearchParameters:function(T,W){var $=W.uiState,U=u==="or";
17if(T.isHierarchicalFacet(i)||U&&T.isConjunctiveFacet(i)||!U&&T.isDisjunctiveFacet(i))return T;var k=$.refinementList&&$.refinementList[i],B=U?T.addDisjunctiveFacet(i).removeDisjunctiveFacetRefinement(i):T.addFacet(i).removeFacetRefinement(i),X=B.maxValuesPerFacet||0,z=Math.max(X,h?l:f),V=B.setQueryParameter("maxValuesPerFacet",z);if(!k){var Y=U?"disjunctiveFacetsRefinements":"facetsRefinements";return V.setQueryParameters(N({},Y,O(E({},V[Y]),N({},i,[]))))}return k.reduce(function(te,se){return U?te.addDisjunctiveFacetRefinement(i,se):te.addFacetRefinement(i,se)},V)}}}};function ol(e,t){return e.refinementList&&((!e.refinementList[t]||e.refinementList[t].length===0)&&delete e.refinementList[t],Object.keys(e.refinementList).length===0&&delete e.refinementList),e}var ul=ge({name:"search-box",connector:!0}),cl=function(t,n){return n(t)},ll=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return Se(t,ul()),function(r){var a=r||{},i=a.queryHook,o=i===void 0?cl:i,u,d;return{$$type:"ais.searchBox",init:function(p){var h=p.instantSearchInstance;t(O(E({},this.getWidgetRenderState(p)),{instantSearchInstance:h}),!0)},render:function(p){var h=p.instantSearchInstance;t(O(E({},this.getWidgetRenderState(p)),{instantSearchInstance:h}),!1)},dispose:function(p){var h=p.state;return n(),h.setQueryParameter("query",void 0)},getRenderState:function(p,h){return O(E({},p),{searchBox:this.getWidgetRenderState(h)})},getWidgetRenderState:function(p){var h=p.helper,_=p.instantSearchInstance,l=p.state;return u||(u=function(g){o(g,function(m){return h.setQuery(m).search()})},d=function(){h.setQuery("").search()}),{query:l.query||"",refine:u,clear:d,widgetParams:r,isSearchStalled:_.status==="stalled"}},getWidgetUiState:function(p,h){var _=h.searchParameters,l=_.query||"";return l===""||p&&p.query===l?p:O(E({},p),{query:l})},getWidgetSearchParameters:function(p,h){var _=h.uiState;return p.setQueryParameter("query",_.query||"")}}}},xt=ge({name:"sort-by",connector:!0});function hi(e){return"strategy"in e&&e.strategy!==void 0}function kr(e){return hi(e)?e.strategy:e.value}function Br(e,t){if(!t)return!1;var n=e[t];return n!==void 0&&hi(n)}var fl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;Se(t,xt());var r={};return function(a){var i=a||{},o=i.items,u=i.transformItems,d=u===void 0?function(p){return p}:u;if(!Array.isArray(o))throw new Error(xt("The `items` option expects an array of objects."));var f={};return o.forEach(function(p,h){var _="value"in p&&p.value!==void 0,l="strategy"in p&&p.strategy!==void 0;if(_&&l)throw new Error(xt("Item at index ".concat(h,' cannot have both "value" and "strategy" properties.')));if(!_&&!l)throw new Error(xt("Item at index ".concat(h,' must have either a "value" or "strategy" property.')));var s=kr(p);f[s]=p}),r.itemsLookup=f,{$$type:"ais.sortBy",init:function(h){var _=h.instantSearchInstance,l=o.some(function(m){return"strategy"in m&&m.strategy});if(l&&!_.compositionID)throw new Error(xt('Sorting strategies can only be used in composition mode. Please provide a "compositionID" to your InstantSearch instance.'));var s=this.getWidgetRenderState(h),g=s.currentRefinement;ut(o,function(m){return kr(m)===g}),t(O(E({},s),{instantSearchInstance:_}),!0)},render:function(h){var _=h.instantSearchInstance;t(O(E({},this.getWidgetRenderState(h)),{instantSearchInstance:_}),!1)},dispose:function(h){var _=h.state;return n(),r.isUsingComposition&&_.sortBy&&(_=_.setQueryParameter("sortBy",void 0)),r.initialValue&&_.index!==r.initialValue?_.setIndex(r.initialValue):_},getRenderState:function(h,_){return O(E({},h),{sortBy:this.getWidgetRenderState(_)})},getWidgetRenderState:function(h){var _=h.results,l=h.helper,s=h.state,g=h.parent,m=h.instantSearchInstance;!r.initialValue&&g&&(r.initialValue=g.getIndexName()),r.refine||(r.isUsingComposition=!!m?.compositionID,r.refine=function(S){var P=r.itemsLookup[S];P&&hi(P)?l.setQueryParameter("sortBy",P.strategy).search():l.setQueryParameter("sortBy",void 0).setIndex(S).search()});var c=d(o,{results:_}),v=c.map(function(S){return{label:S.label,value:kr(S)}}),y=r.isUsingComposition&&Br(r.itemsLookup,s.sortBy)?s.sortBy:s.index,b=_?_.nbHits===0:!0;return{currentRefinement:y,options:v,refine:r.refine,hasNoResults:b,canRefine:!b&&o.length>0,widgetParams:a}},getWidgetUiState:function(h,_){var l=_.searchParameters,s=r.isUsingComposition&&Br(r.itemsLookup,l.sortBy)?l.sortBy:l.index;return O(E({},h),{sortBy:s!==r.initialValue?s:void 0})},getWidgetSearchParameters:function(h,_){var l=_.uiState,s=!l.sortBy||Object.prototype.hasOwnProperty.call(r.itemsLookup,l.sortBy),g=(s?l.sortBy:void 0)||r.initialValue||h.index;if(Br(r.itemsLookup,g)){var m=r.itemsLookup[g];return h.setQueryParameter("sortBy",m.strategy)}return h.setQueryParameter("index",g)}}}},wa=ge({name:"rating-menu",connector:!0}),so="ais.ratingMenu",qt=1,dl=function(t){var n=t.instantSearchInstance,r=t.helper,a=t.getRefinedStar,i=t.attribute;return function(){for(var o=arguments.length,u=new Array(o),d=0;d<o;d++)u[d]=arguments[d];if(u.length===1){n.sendEventToInsights(u[0]);return}var f=oe(u,3),p=f[1],h=f[2],_=h===void 0?"Filter Applied":h,l=oe(u[0].split(":"),2),s=l[0],g=l[1];if(s==="click"){var m=a()===Number(p);if(!m){var c;n.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:so,eventType:s,eventModifier:g,payload:{eventName:_,index:((c=r.lastResults)===null||c===void 0?void 0:c.index)||r.state.index,filters:["".concat(i,">=").concat(p)]},attribute:i})}}}},hl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return Se(t,wa()),function(r){var a=r||{},i=a.attribute,o=a.max,u=o===void 0?5:o,d;if(!i)throw new Error(wa("The `attribute` option is required."));var f=function(g){var m,c=g.getNumericRefinements(i);if(!((m=c[">="])===null||m===void 0)&&m.length)return c[">="][0]},p=function(g){var m=0;return g.forEach(function(c){var v=oe(c.name.split("."),2),y=v[1],b=y===void 0?"":y;m=Math.max(m,b.length)}),m};function h(s,g){var m=f(s)===Number(g),c=s.resetPage().removeNumericRefinement(i);return m?c:c.addNumericRefinement(i,"<=",u).addNumericRefinement(i,">=",Number(g))}var _=function(g,m){d("click:internal",m),g.setState(h(g.state,m)).search()},l={toggleRefinementFactory:function(g){return _.bind(null,g)},createURLFactory:function(g){var m=g.state,c=g.createURL,v=g.getW
17idgetUiState,y=g.helper;return function(b){return c(function(S){return v(S,{searchParameters:h(m,b),helper:y})})}}};return{$$type:so,init:function(g){var m=g.instantSearchInstance;t(O(E({},this.getWidgetRenderState(g)),{instantSearchInstance:m}),!0)},render:function(g){var m=g.instantSearchInstance;t(O(E({},this.getWidgetRenderState(g)),{instantSearchInstance:m}),!1)},getRenderState:function(g,m){return O(E({},g),{ratingMenu:O(E({},g.ratingMenu),N({},i,this.getWidgetRenderState(m)))})},getWidgetRenderState:function(g){var m=g.helper,c=g.results,v=g.state,y=g.instantSearchInstance,b=g.createURL,S=[];d||(d=dl({instantSearchInstance:y,helper:m,getRefinedStar:function(){return f(m.state)},attribute:i}));var P=!1,F=0,w=c?.getFacetValues(i,{});if(c&&w){var R=function(M){var j=x===M;P=P||j;var q=w.filter(function(C){return Number(C.name)>=M&&Number(C.name)<=u}).map(function(C){return C.count}).reduce(function(C,T){return C+T},0);if(F+=q,x&&!j&&q===0)return"continue";var D=ce(new Array(Math.floor(u/qt))).map(function(C,T){return T*qt<M});S.push({stars:D,name:String(M),label:String(M),value:String(M),count:q,isRefined:j})};w.length,p(w);for(var x=f(v),I=qt;I<u;I+=qt)R(I)}S=S.reverse();var A=c?c.nbHits===0:!0;return{items:S,hasNoResults:A,canRefine:(!A||P)&&F>0,refine:l.toggleRefinementFactory(m),sendEvent:d,createURL:l.createURLFactory({state:v,createURL:b,helper:m,getWidgetUiState:this.getWidgetUiState}),widgetParams:r}},dispose:function(g){var m=g.state;return n(),m.removeNumericRefinement(i)},getWidgetUiState:function(g,m){var c=m.searchParameters,v=f(c);return gl(O(E({},g),{ratingMenu:O(E({},g.ratingMenu),N({},i,typeof v=="number"?v:void 0))}),i)},getWidgetSearchParameters:function(g,m){var c=m.uiState,v=c.ratingMenu&&c.ratingMenu[i],y=g.addDisjunctiveFacet(i).removeNumericRefinement(i).removeDisjunctiveFacetRefinement(i);return v?y.addNumericRefinement(i,"<=",u).addNumericRefinement(i,">=",v):y.setQueryParameters({numericRefinements:O(E({},y.numericRefinements),N({},i,{}))})}}}};function gl(e,t){return e.ratingMenu&&(typeof e.ratingMenu[t]!="number"&&delete e.ratingMenu[t],Object.keys(e.ratingMenu).length===0&&delete e.ratingMenu),e}var ml=ge({name:"stats",connector:!0}),vl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return Se(t,ml()),function(r){return{$$type:"ais.stats",init:function(i){var o=i.instantSearchInstance;t(O(E({},this.getWidgetRenderState(i)),{instantSearchInstance:o}),!0)},render:function(i){var o=i.instantSearchInstance;t(O(E({},this.getWidgetRenderState(i)),{instantSearchInstance:o}),!1)},dispose:function(){n()},getRenderState:function(i,o){return O(E({},i),{stats:this.getWidgetRenderState(o)})},getWidgetRenderState:function(i){var o=i.results,u=i.state;return o?{hitsPerPage:o.hitsPerPage,nbHits:o.nbHits,nbSortedHits:o.nbSortedHits,areHitsSorted:typeof o.appliedRelevancyStrictness<"u"&&o.appliedRelevancyStrictness>0&&o.nbSortedHits!==o.nbHits,nbPages:o.nbPages,page:o.page,processingTimeMS:o.processingTimeMS,query:o.query,widgetParams:r}:{hitsPerPage:u.hitsPerPage,nbHits:0,nbSortedHits:void 0,areHitsSorted:!1,nbPages:0,page:u.page||0,processingTimeMS:-1,query:u.query||"",widgetParams:r}}}}};function Qr(e){return Array.isArray(e)?e:[e]}var Pa=ge({name:"toggle-refinement",connector:!0}),oo="ais.toggleRefinement",pl=function(t){var n=t.instantSearchInstance,r=t.helper,a=t.attribute,i=t.on,o=function(){for(var d=arguments.length,f=new Array(d),p=0;p<d;p++)f[p]=arguments[p];if(f.length===1){n.sendEventToInsights(f[0]);return}var h=oe(f,3),_=h[1],l=h[2],s=l===void 0?"Filter Applied":l,g=oe(f[0].split(":"),2),m=g[0],c=g[1];if(!(m!=="click"||i===void 0)&&!_){var v;n.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:oo,eventType:m,eventModifier:c,payload:{eventName:s,index:((v=r.lastResults)===null||v===void 0?void 0:v.index)||r.state.index,filters:i.map(function(y){return"".concat(a,":").concat(y)})},attribute:a})}};return o},yl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return Se(t,Pa()),function(r){var a=r||{},i=a.attribute,o=a.on,u=o===void 0?!0:o,d=a.off;if(!i)throw new Error(Pa("The `attribute` option is required."));var f=d!==void 0,p=Qr(u).map(At),h=f?Qr(d).map(At):void 0,_,l=function(m){return function(){var c=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{isRefined:!1}).isRefined;
17c?(p.forEach(function(v){return m.removeDisjunctiveFacetRefinement(i,v)}),f&&h.forEach(function(v){return m.addDisjunctiveFacetRefinement(i,v)})):(_("click:internal",c),f&&h.forEach(function(v){return m.removeDisjunctiveFacetRefinement(i,v)}),p.forEach(function(v){return m.addDisjunctiveFacetRefinement(i,v)})),m.search()}},s={createURLFactory:function(m,c){var v=c.state,y=c.createURL,b=c.getWidgetUiState,S=c.helper;return function(){v=v.resetPage();var P=m?p:h;P&&P.forEach(function(w){v=v.removeDisjunctiveFacetRefinement(i,w)});var F=m?h:p;return F&&F.forEach(function(w){v=v.addDisjunctiveFacetRefinement(i,w)}),y(function(w){return b(w,{searchParameters:v,helper:S})})}}};return{$$type:oo,init:function(m){var c=m.instantSearchInstance;t(O(E({},this.getWidgetRenderState(m)),{instantSearchInstance:c}),!0)},render:function(m){var c=m.instantSearchInstance;t(O(E({},this.getWidgetRenderState(m)),{instantSearchInstance:c}),!1)},dispose:function(m){var c=m.state;return n(),c.removeDisjunctiveFacet(i)},getRenderState:function(m,c){return O(E({},m),{toggleRefinement:O(E({},m.toggleRefinement),N({},i,this.getWidgetRenderState(c)))})},getWidgetRenderState:function(m){var c=m.state,v=m.helper,y=m.results,b=m.createURL,S=m.instantSearchInstance,P=y?p.every(function(j){return c.isDisjunctiveFacetRefined(i,j)}):p.every(function(j){return c.isDisjunctiveFacetRefined(i,j)}),F={isRefined:P,count:0},w={isRefined:f&&!P,count:0};if(y){var R=Qr(h||!1),x=y.getFacetValues(i,{})||[],I=p.map(function(j){return ut(x,function(q){var D=q.escapedValue;return D===At(String(j))})}).filter(function(j){return j!==void 0}),A=f?R.map(function(j){return ut(x,function(q){var D=q.escapedValue;return D===At(String(j))})}).filter(function(j){return j!==void 0}):[];F={isRefined:I.length?I.every(function(j){return j.isRefined}):!1,count:I.reduce(function(j,q){return j+q.count},0)||null},w={isRefined:A.length?A.every(function(j){return j.isRefined}):!1,count:A.reduce(function(j,q){return j+q.count},0)||x.reduce(function(j,q){var D=q.count;return j+D},0)}}_||(_=pl({instantSearchInstance:S,attribute:i,on:p,helper:v}));var M=P?w:F;return{value:{name:i,isRefined:P,count:y?M.count:null,onFacetValue:F,offFacetValue:w},createURL:s.createURLFactory(P,{state:c,createURL:b,helper:v,getWidgetUiState:this.getWidgetUiState}),sendEvent:_,canRefine:!!(y&&M.count),refine:l(v),widgetParams:r}},getWidgetUiState:function(m,c){var v=c.searchParameters,y=p&&p.every(function(S){return v.isDisjunctiveFacetRefined(i,S)});if(!y){var b;return(b=m.toggle)===null||b===void 0||delete b[i],m}return O(E({},m),{toggle:O(E({},m.toggle),N({},i,y))})},getWidgetSearchParameters:function(m,c){var v=c.uiState;if(m.isHierarchicalFacet(i)||m.isConjunctiveFacet(i))return m;var y=m.addDisjunctiveFacet(i).removeDisjunctiveFacetRefinement(i),b=!!(v.toggle&&v.toggle[i]);return b?(p&&p.forEach(function(S){y=y.addDisjunctiveFacetRefinement(i,S)}),y):f?(h&&h.forEach(function(S){y=y.addDisjunctiveFacetRefinement(i,S)}),y):y.setQueryParameters({disjunctiveFacetsRefinements:O(E({},m.disjunctiveFacetsRefinements),N({},i,[]))})}}}},Fa=ge({name:"breadcrumb",connector:!0}),Sl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;Se(t,Fa());var r={};return function(a){var i=a||{},o=i.attributes,u=i.separator,d=u===void 0?" > ":u,f=i.rootPath,p=f===void 0?null:f,h=i.transformItems,_=h===void 0?function(m){return m}:h;if(!o||!Array.isArray(o)||o.length===0)throw new Error(Fa("The `attributes` option expects an array of strings."));var l=oe(o,1),s=l[0];function g(m,c){if(!c){var v=m.getHierarchicalFacetBreadcrumb(s);return v.length===0?m:m.resetPage().toggleFacetRefinement(s,v[0])}return m.resetPage().toggleFacetRefinement(s,c)}return{$$type:"ais.breadcrumb",init:function(c){t(O(E({},this.getWidgetRenderState(c)),{instantSearchInstance:c.instantSearchInstance}),!0)},render:function(c){t(O(E({},this.getWidgetRenderState(c)),{instantSearchInstance:c.instantSearchInstance}),!1)},dispose:function(){n()},getRenderState:function(c,v){return O(E({},c),{breadcrumb:O(E({},c.breadcrumb),N({},s,this.getWidgetRenderState(v)))})},getWidgetRenderState:function(c){var v=this,y=c.helper,b=c.createURL,S=c.results,P=c.state;function F(){if(!S||P.hierarchicalFacets.length===0)return[];var R=S.getFacetValues(s,{}
17),x=R&&!Array.isArray(R)&&R.data?R.data:[],I=_(Rl(uo(x)),{results:S});return I}var w=F();return r.createURL||(r.createURL=function(R){return b(function(x){return v.getWidgetUiState(x,{searchParameters:g(y.state,R),helper:y})})}),r.refine||(r.refine=function(R){y.setState(g(y.state,R)).search()}),{canRefine:w.length>0,createURL:r.createURL,items:w,refine:r.refine,widgetParams:a}},getWidgetUiState:function(c,v){var y=v.searchParameters,b=y.getHierarchicalFacetBreadcrumb(s);return bl(O(E({},c),{hierarchicalMenu:O(E({},c.hierarchicalMenu),N({},s,b))}),s)},getWidgetSearchParameters:function(c,v){var y=v.uiState,b=y.hierarchicalMenu&&y.hierarchicalMenu[s];if(c.isConjunctiveFacet(s)||c.isDisjunctiveFacet(s))return c;c.isHierarchicalFacet(s)&&c.getHierarchicalFacetByName(s);var S=c.removeHierarchicalFacet(s).addHierarchicalFacet({name:s,attributes:o,separator:d,rootPath:p});return b?S.addHierarchicalFacetRefinement(s,b.join(d)):S.setQueryParameters({hierarchicalFacetsRefinements:O(E({},S.hierarchicalFacetsRefinements),N({},s,[]))})}}}};function uo(e){return e.reduce(function(t,n){return n.isRefined&&(t.push({label:n.name,value:n.escapedValue}),Array.isArray(n.data)&&(t=t.concat(uo(n.data)))),t},[])}function Rl(e){return e.map(function(t,n){return{label:t.label,value:n+1===e.length?null:e[n+1].value}})}function bl(e,t){return e.hierarchicalMenu&&((!e.hierarchicalMenu[t]||!e.hierarchicalMenu[t].length)&&delete e.hierarchicalMenu[t],Object.keys(e.hierarchicalMenu).length===0&&delete e.hierarchicalMenu),e}var _l=ge({name:"autocomplete",connector:!0}),wl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return Se(t,_l()),function(r){var a=r||{},i=a.escapeHTML,o=i===void 0?!0:i,u=a.transformItems,d=u===void 0?function(m){return m}:u,f=a.requiresSearch,p=f===void 0?!0:f,h=a.future,_=h===void 0?{}:h,l=_.undefinedEmptyQuery,s=l===void 0?!1:l,g={};return{$$type:"ais.autocomplete",dependsOn:p?"search":"none",shouldRender:p?void 0:function(){return!0},init:function(c){var v=c.instantSearchInstance;t(O(E({},this.getWidgetRenderState(c)),{instantSearchInstance:v}),!0)},render:function(c){var v=c.instantSearchInstance,y=this.getWidgetRenderState(c);y.indices.forEach(function(b){var S=b.sendEvent,P=b.hits;S("view:internal",P)}),t(O(E({},y),{instantSearchInstance:v}),!1)},getRenderState:function(c,v){return O(E({},c),{autocomplete:this.getWidgetRenderState(v)})},getWidgetRenderState:function(c){var v=this,y=c.helper,b=c.state,S=c.scopedResults,P=c.instantSearchInstance;g.refine||(g.refine=function(R){y.setQuery(R).search()});var F={},w=S.map(function(R){var x;R.results&&(R.results.hits=o?Yn(R.results.hits):R.results.hits),F[R.indexId]=ci({instantSearchInstance:P,helper:R.helper,widgetType:v.$$type});var I=R.results?Zn(Xn(R.results.hits,R.results.page,R.results.hitsPerPage),R.results.queryID):[];return{indexId:R.indexId,indexName:((x=R.results)===null||x===void 0?void 0:x.index)||"",hits:I,results:R.results||{}}});return{currentRefinement:s?b.query:b.query||"",indices:d(w).map(function(R){return O(E({},R),{sendEvent:F[R.indexId]})}),refine:g.refine,widgetParams:r}},getWidgetUiState:function(c,v){var y=v.searchParameters,b=s?y.query:y.query||"";return!b||b===""||c&&c.query===b?c:O(E({},c),{query:b})},getWidgetSearchParameters:function(c,v){var y=v.uiState,b={query:s?y.query:y.query||""};return o?c.setQueryParameters(E({},b,Ve)):c.setQueryParameters(b)},dispose:function(c){var v=c.state;n();var y=v.setQueryParameter("query",void 0);return o?y.setQueryParameters(Object.keys(Ve).reduce(function(b,S){return O(E({},b),N({},S,void 0))},{})):y}}}},xa=ge({name:"query-rules",connector:!0});function Pl(e){return[e.disjunctiveFacetsRefinements,e.facetsRefinements,e.hierarchicalFacetsRefinements,e.numericRefinements].some(function(t){return!!(t&&Object.keys(t).length>0)})}function Fl(e){return e.replace(/[^a-z0-9-_]+/gi,"_")}function xl(e){var t=e.helper,n=e.sharedHelperState,r=e.trackedFilters,a=Object.keys(r).reduce(function(i,o){var u=oi(t.lastResults||{},n,!0).filter(function(p){return p.attribute===o}).map(function(p){return p.numericValue||p.name}),d=r[o],f=d(u);return ce(i).concat(ce(u.filter(function(p){return f.includes(p)}).map(function(p){return Fl("ais-".concat(o,"-").concat(p))})))},[]);return a}function Il(e){var t=this,n=t.helper,r=t.initialRuleContexts,a=t.trackedFilters,i=t.transformRuleContexts,o=e.state,u=o.ruleContexts||[],d=xl({helper:n,sharedHelperState:o,trackedFilters:a}),f=ce(r).concat(ce(d)),p=i(f).slice(0,10);li(u,p)||n.overrideStateWithoutTriggeringChangeEvent(O(E({},o),{ruleContexts:p}))}var co=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return Se(t,xa()),function(r){var a=r||{},i=a.trackedFilters,o=i===void 0?{}:i,u=a.transformRuleContexts,d=u===void 0?function(s){return s}:u,f=a.transformItems,p=f===void 0?function(s){return s}:f;
17Object.keys(o).forEach(function(s){if(typeof o[s]!="function")throw new Error(xa(`'The "`.concat(s,'" filter value in the `trackedFilters` option expects a function.')))});var h=Object.keys(o).length>0,_=[],l;return{$$type:"ais.queryRules",init:function(g){var m=g.helper,c=g.state,v=g.instantSearchInstance;_=c.ruleContexts||[],l=Il.bind({helper:m,initialRuleContexts:_,trackedFilters:o,transformRuleContexts:d}),h&&((Pl(c)||r.transformRuleContexts)&&l({state:c}),m.on("change",l)),t(O(E({},this.getWidgetRenderState(g)),{instantSearchInstance:v}),!0)},render:function(g){var m=g.instantSearchInstance;t(O(E({},this.getWidgetRenderState(g)),{instantSearchInstance:m}),!1)},getWidgetRenderState:function(g){var m=g.results,c=m||{},v=c.userData,y=v===void 0?[]:v,b=p(y,{results:m});return{items:b,widgetParams:r}},getRenderState:function(g,m){return O(E({},g),{queryRules:this.getWidgetRenderState(m)})},dispose:function(g){var m=g.helper,c=g.state;return n(),h?(m.removeListener("change",l),c.setQueryParameter("ruleContexts",_)):c}}}},El=function(t){var n=t.searchAsYouSpeak,r=t.language,a=t.onQueryChange,i=t.onStateChange,o=window.webkitSpeechRecognition||window.SpeechRecognition,u=function(F){return{status:F,transcript:"",isSpeechFinal:!1,errorCode:void 0}},d=u("initial"),f,p=function(){return!!o},h=function(){return d.status==="askingPermission"||d.status==="waiting"||d.status==="recognizing"},_=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};d=E({},d,F),i()},l=function(){return d},s=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"initial";_(u(F))},g=function(){_({status:"waiting"})},m=function(F){_({status:"error",errorCode:F.error})},c=function(F){_({status:"recognizing",transcript:F.results[0]&&F.results[0][0]&&F.results[0][0].transcript||"",isSpeechFinal:F.results[0]&&F.results[0].isFinal}),n&&d.transcript&&a(d.transcript)},v=function(){!d.errorCode&&d.transcript&&!n&&a(d.transcript),d.status!=="error"&&_({status:"finished"})},y=function(){f=new o,f&&(s("askingPermission"),f.interimResults=!0,r&&(f.lang=r),f.addEventListener("start",g),f.addEventListener("error",m),f.addEventListener("result",c),f.addEventListener("end",v),f.start())},b=function(){f&&(f.stop(),f.removeEventListener("start",g),f.removeEventListener("error",m),f.removeEventListener("result",c),f.removeEventListener("end",v),f=void 0)},S=function(){b(),s("finished")};return{getState:l,isBrowserSupported:p,isListening:h,startListening:y,stopListening:S,dispose:b}},Al=ge({name:"voice-search",connector:!0}),Tl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return Se(t,Al()),function(r){var a=r.searchAsYouSpeak,i=a===void 0?!1:a,o=r.language,u=r.additionalQueryParameters,d=r.createVoiceSearchHelper,f=d===void 0?El:d;return{$$type:"ais.voiceSearch",init:function(h){var _=h.instantSearchInstance;t(O(E({},this.getWidgetRenderState(h)),{instantSearchInstance:_}),!0)},render:function(h){var _=h.instantSearchInstance;t(O(E({},this.getWidgetRenderState(h)),{instantSearchInstance:_}),!1)},getRenderState:function(h,_){return O(E({},h),{voiceSearch:this.getWidgetRenderState(_)})},getWidgetRenderState:function(h){var _=this,l=h.helper,s=h.instantSearchInstance;this._refine||(this._refine=function(S){if(S!==l.state.query){var P=o?[o.split("-")[0]]:void 0;l.setQueryParameter("queryLanguages",P),typeof u=="function"&&l.setState(l.state.setQueryParameters(E({ignorePlurals:!0,removeStopWords:!0,optionalWords:S},u({query:S})))),l.setQuery(S).search()}}),this._voiceSearchHelper||(this._voiceSearchHelper=f({searchAsYouSpeak:i,language:o,onQueryChange:function(P){return _._refine(P)},onStateChange:function(){t(O(E({},_.getWidgetRenderState(h)),{instantSearchInstance:s}),!1)}}));var g=this._voiceSearchHelper,m=g.isBrowserSupported,c=g.isListening,v=g.startListening,y=g.stopListening,b=g.getState;return{isBrowserSupported:m(),isListening:c(),toggleListening:function(){m()&&(c()?y():v())},voiceListeningState:b(),widgetParams:r}},dispose:function(h){var _=h.state;this._voiceSearchHelper.dispose(),n();var l=_;if(typeof u=="function"){var s=u({query:""}),g=s?Object.keys(s).reduce(function(m,c){return m[c]=void 0,m},{}):{};l=_.setQueryParameters(E({queryLanguages:void 0,ignorePlurals:void 0,removeStopWords:void 0,optionalWords:void 0},g))}return l.setQueryParameter("query",void 0)},getWidgetUiState:function(h,_){var l=_.searchParameters,s=l.query||"";return s?O(E({},h),{query:s}):h},getWidgetSearchParameters:function(h,_){var l=_.uiState;return h.setQueryParameter("query",l.query||"")}}}},Ol=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:he,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return function(r){var a={};return{$$type:"ais.relevantSort",init:function(o){var u=o.instantSearchInstance;t(O(E({},this.getWidgetRenderState(o)),{instantSearchInstance:u}),!0)},render:function(o){var u=o.instantSearchInstance;t(O(E({},this.getWidgetRenderState(o)),{instantSearchInstance:u}),!1)},dispose:function(o){var u=o.state;return n(),u.setQueryParameter("relevancyStrictness",void 0)},getRenderState:function(o,u){return O(E({},o),{relevantSort:this.getWidgetRenderState(u)})},getWidgetRenderState:function(o){var u=o.results,d=o.helper;a.refine||(a.refine=function(h){d.setQueryParameter("relevancyStrictness",h).search()});var f=(u||{}).appliedRelevancyStrictness,p=f!==void 0;return{isRelevantSorted:typeof f<"u"&&f>0,isVirtualReplica:p,canRefine:p,refine:a.refine,widgetParams:r}},getWidgetSearchParameters:function(o,u){var d=u.uiState,f;return o.setQueryParameter("relevancyStrictness",(f=d.relevantSort)!==null&&f!==void 0?f:o.relevancyStrictness)},getWidgetUiState:function(o,u){var d=u.searchParameters;return O(E({},o),{relevantSort:d.relevancyStrictness||o.relevantSort})}}}};function $e(e,t){return t!=null&&typeof Symbol<"u"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Qe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(function(r,a){return Array.isArray(a)?r.concat(a):r.concat([a])}
17,[]).filter(Boolean).join(" ")}function jl(e){var t=e.createElement;return function(r){var a=r.classNames,i=r.children,o=r.highlightedTagName,u=r.isHighlighted,d=r.nonHighlightedTagName,f=u?o:d;return t(f,{className:u?a.highlighted:a.nonHighlighted},i)}}function Cl(e){var t=e.createElement,n=e.Fragment,r=jl({createElement:t});return function(i){var o=i.parts,u=i.highlightedTagName,d=u===void 0?"mark":u,f=i.nonHighlightedTagName,p=f===void 0?"span":f,h=i.separator,_=h===void 0?", ":h,l=i.className,s=i.classNames,g=s===void 0?{}:s,m=we(i,["parts","highlightedTagName","nonHighlightedTagName","separator","className","classNames"]);return t("span",O(E({},m),{className:Qe(g.root,l)}),o.map(function(c,v){var y=v===o.length-1;return t(n,{key:v},c.map(function(b,S){return t(r,{key:S,classNames:g,highlightedTagName:d,nonHighlightedTagName:p,isHighlighted:b.isHighlighted},b.value)}),!y&&t("span",{className:g.separator},_))}))}}function $l(e){var t=e.createElement;return function(r){var a=r.classNames,i=r.banner;return i.image.urls[0].url?t("aside",{className:Qe("ais-Hits-banner",a.bannerRoot)},i.link?t("a",{className:Qe("ais-Hits-banner-link",a.bannerLink),href:i.link.url,target:i.link.target},t("img",{className:Qe("ais-Hits-banner-image",a.bannerImage),src:i.image.urls[0].url,alt:i.image.title})):t("img",{className:Qe("ais-Hits-banner-image",a.bannerImage),src:i.image.urls[0].url,alt:i.image.title})):null}}function Ll(e){var t=e.createElement,n=$l({createElement:t});return function(a){var i=a.classNames,o=i===void 0?{}:i,u=a.hits,d=a.itemComponent,f=a.sendEvent,p=a.emptyComponent,h=a.banner,_=a.bannerComponent,l=we(a,["classNames","hits","itemComponent","sendEvent","emptyComponent","banner","bannerComponent"]);return t("div",O(E({},l),{className:Qe("ais-Hits",o.root,u.length===0&&Qe("ais-Hits--empty",o.emptyRoot),l.className)}),h&&(_?t(_,{className:Qe("ais-Hits-banner",o.bannerRoot),banner:h}):t(n,{classNames:o,banner:h})),u.length===0&&p?t(p,null):t("ol",{className:Qe("ais-Hits-list",o.list)},u.map(function(s,g){return t(d,{key:s.objectID,hit:s,index:g,className:Qe("ais-Hits-item",o.item),onClick:function(){f("click:internal",s,"Hit Clicked")},onAuxClick:function(){f("click:internal",s,"Hit Clicked")}})})))}}function Gt(e){return Gt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Gt(e)}function lo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(lo=function(){return!!e})()}function Wl(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Hl(e,t){return t&&(Be(t)==="object"||typeof t=="function")?t:Wl(e)}function Nl(e,t,n){return t=Gt(t),Hl(e,lo()?Reflect.construct(t,[],Gt(e).constructor):t.apply(e,n))}function Qn(e,t){return Qn=Object.setPrototypeOf||function(r,a){return r.__proto__=a,r},Qn(e,t)}function Ml(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Qn(e,t)}var Ul=Promise.resolve();function Dl(e,t){var n=null,r=!1,a=null,i=function(){for(var u=arguments.length,d=new Array(u),f=0;f<u;f++)d[f]=arguments[f];n===null&&(a=d,n=Ul.then(function(){n=null;var p=a;if(a=null,r){r=!1;return}e.apply(void 0,ce(p))}))};return i.wait=function(){if(n===null)throw new Error("The deferred function should be called before calling `wait()`");return n},i.cancel=function(){n!==null&&(r=!0)},i}function fo(e,t){return Object.assign(new ee.SearchResults(e,[t]),{feedID:t.feedID})}function ql(e,t){var n,r,a=(n=e._initialResults)===null||n===void 0?void 0:n[t.getIndexId()],i=a?.compositionFeedsResults||[];if(i.length!==0){var o=(r=t.getHelper())===null||r===void 0?void 0:r.lastResults;o&&(o.feeds&&o.feeds.length>0||(o.feeds=i.map(function(u){return fo(o._state,u)})))}}var It=ge({name:"feeds",connector:!0}),kl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return Se(t,It()),function(r){var a=r.isolated,i=r.transformFeeds,o=i===void 0?function(u){return u}:i;if(a!==!1)throw new Error(It("The `isolated` option currently only supports `false`."));return{$$type:"ais.feeds",$$widgetType:"ais.feeds",init:function(d){var f=d.instantSearchInstance;if(!f.compositionID)throw new Error(It("The `feeds` widget requires a composition-based InstantSearch instance (compositionID must be set)."));ql(f,d.parent),t(O(E({},this.getWidgetRenderState(d)),{instantSearchInstance:f}),!0)},render:function(d){var f=d.instantSearchInstance;t(O(E({},this.getWidgetRenderState(d)),{instantSearchInstance:f}),!1)},dispose:function(){n()},getWidgetSearchParameters:function(d){return d},getRenderState:function(d,f){return O(E({},d),{feeds:this.getWidgetRenderState(f)})},getWidgetRenderState:function(d){var f=d.results;if(!f)return{feedIDs:[],widgetParams:r};Array.isArray(f.feeds)&&f.feeds.length>0&&!f.feeds.every(function(h){return $e(h,ee.SearchResults)})&&(f.feeds=f.feeds.map(function(h){return $e(h,ee.SearchResults)?h:fo(f._state,h)}));var p=f.feeds?f.feeds.map(function(h){return h.feedID}):[""];if(p=o(p),!Array.isArray(p))throw new Error(It("The `transformFeeds` option expects a function that returns an Array."));if(!p.every(function(h){return typeof h=="string"}))throw new Error(It("The `transformFeeds` option expects a function that returns an array of feed IDs (strings)."));return{feedIDs:p,widgetParams:r}}}}},Bl=function(t,n){return t},Ql=Bl(mc),Vl=!1,zl=!0;function ct(e){function t(n,r){for(var a=arguments.length,i=new Array(a>2?a-2:0),o=2;o<a;o++)i[o-2]=arguments[o];var u=i.length>0?i:void 0;if((r===void 0?"undefined":Be(r))==="object"&&(r.attrs||r.props||r.scopedSlots||r.on)){var d=Object.keys(r.on||{}),f=Object.assign({},r,r.attrs,r.props,d.reduce(function(p,h){return p["on".concat(h[0].toUpperCase()).concat(h.slice(1))]=r.on[h],p},{}));return delete f.attrs,delete f.props,delete f.scopedSlots,d.forEach(function(p){return delete f.on[p]}),f.on&&Object.keys(f.on).length===0&&delete f.on,Tt(n,f,r.scopedSlots?Object.assign({default:function(){return u}},r.scopedSlots):u)}return Tt(n,r,u)}return function(){return e.call(this,t)}}function gi(e){var t=e.$slots||e.slots;return typeof t.default=="function"?t.default():t.default}function Ot(e,t){return(e.$slots||e.slots||{})[t]}var Gl={inheritAttrs:!1,name:"AisConfigure",mixins:[ae({name:"Configure"}),le({connector:Js},{$$widgetType:"ais.configure"})],computed:{widgetParams:function(){return{searchParameters:Object.assign({},this.$attrs)}}},render:ct(function(e){var t=this.$slots.default;return this.state&&t?e("div",{class:this.suit()},[t({refine:this.state.refine,searchParameters:this.state.widgetParams.searchParameters})]):null})};le({connector:Ql},{$$widgetType:"ais.configureRelatedItems"});var Kl={name:"AisHits",mixins:[le({connector:Uc},{$$widgetType:"ais.hits"}),ae({name:"Hits"})],props:{showBanner:{type:Boolean,default:!0},escapeHTML:{type:Boolean,default:!0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{showBanner:this.showBanner,escapeHTML:this.escapeHTML,transformItems:this.transformItems}}},render:ct(function(e){var t=this;if(!this.state)return null;var n=Ot(this,"default"),r=Ot(this,"item"),a=Ot(this,"banner");return r||a||!n?e(Ll({createElement:e}),{hits:this.state.items,itemComponent:function(i){var o=i.hit,u=i.index,d=i.onClick,f=i.onAuxClick;i.key;
17var p=we(i,["hit","index","onClick","onAuxClick","key"]);return e("li",{key:o.objectID,attrs:p,on:{click:d,auxclick:f}},[r&&r({item:o,index:u,insights:t.state.insights,sendEvent:t.state.sendEvent})||"objectID: ".concat(o.objectID,", index: ").concat(u)])},banner:this.showBanner?this.state.banner:void 0,bannerComponent:a,sendEvent:this.state.sendEvent,classNames:this.classNames&&{root:this.classNames["ais-Hits"],list:this.classNames["ais-Hits-list"],item:this.classNames["ais-Hits-item"],bannerRoot:this.classNames["ais-Hits-banner"],bannerImage:this.classNames["ais-Hits-banner-image"],bannerLink:this.classNames["ais-Hits-banner-link"]}}):e("div",{attrs:{class:this.suit()}},[n({banner:this.state.banner,items:this.state.items,insights:this.state.insights,sendEvent:this.state.sendEvent})])})},Jl=0;function Ia(e){e.dependsOn==="recommend"&&(e.$$id=Jl++)}function Ea(e){for(var t=e.getParent(),n=[e.getHelper().state];t!==null;)n=[t.getHelper().state].concat(n),t=t.getParent();return n}function Yl(e,t){var n=t.userToken,r=t.clickAnalytics;if(n===void 0&&r===void 0)return e;var a=E({},r===void 0?{}:{clickAnalytics:r},n===void 0?{}:{userToken:n});return new ee.RecommendParameters({params:e.params.map(function(i){var o=i.queryParameters,u=i.fallbackParameters;return E(O(E({},i),{queryParameters:E({},a,o)}),u&&{fallbackParameters:E({},a,u)})})})}function He(e,t,n){var r=t.getHelper();return{uiState:n,helper:r,parent:t,instantSearchInstance:e,state:r.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,scopedResults:[],searchMetadata:{isSearchStalled:e.status==="stalled"},status:e.status,error:e.error}}function Kt(e,t,n){var r=t.getResultsForWidget(n),a=t.getHelper();return{helper:a,parent:t,instantSearchInstance:e,results:r,scopedResults:t.getScopedResults(),state:r&&"_state"in r?r._state:a.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,searchMetadata:{isSearchStalled:e.status==="stalled"},status:e.status,error:e.error}}function tt(e){var t=e.renderState,n=e.instantSearchInstance,r=e.parent,a=r?r.getIndexId():n.mainIndex.getIndexId();n.renderState=O(E({},n.renderState),N({},a,E({},n.renderState[a],t)))}var nt=ge({name:"index-widget"});function Vn(e,t){var n=t.state,r=t.recommendState,a=t.isPageReset,i=t._uiState;n!==e.state&&(e.state=n,e.emit("change",{state:e.state,results:e.lastResults,isPageReset:a,_uiState:i})),r!==e.recommendState&&(e.recommendState=r)}function vt(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return e.reduce(function(r,a){return ke(a)||!a.getWidgetUiState&&!a.getWidgetState?r:a.getWidgetUiState?a.getWidgetUiState(r,t):a.getWidgetState(r,t)},n)}function it(e,t){var n=t.initialSearchParameters,r=we(t,["initialSearchParameters"]);return e.reduce(function(a,i){return!i.getWidgetSearchParameters||ke(i)?a:i.dependsOn==="search"&&i.getWidgetParameters?i.getWidgetParameters(a,r):i.getWidgetSearchParameters(a,r)},n)}function Vr(e,t){var n=t.initialRecommendParameters,r=we(t,["initialRecommendParameters"]);return e.reduce(function(a,i){return!ke(i)&&i.dependsOn==="recommend"&&i.getWidgetParameters?i.getWidgetParameters(a,r):a},n)}function ho(e){var t=e.filter(ke);t.length!==0&&t.forEach(function(n){var r=n.getHelper();Vn(r,{state:r.state.resetPage(),recommendState:r.recommendState,isPageReset:!0}),ho(n.getWidgets())})}function go(e){var t=e.filter(ke);return t.reduce(function(n,r){var a;return(a=n).concat.apply(a,[{indexId:r.getIndexId(),results:r.getResults(),helper:r.getHelper()}].concat(ce(go(r.getWidgets()))))},[])}function mo(e){return e.reduce(function(t,n){if(ke(n)){if(n._isolated)return t;var r=mo(n.getWidgets());return{hasSearchWidget:t.hasSearchWidget||r.hasSearchWidget,hasRecommendWidget:t.hasRecommendWidget||r.hasRecommendWidget}}return n.dependsOn==="recommend"?O(E({},t),{hasRecommendWidget:!0}):n.dependsOn==="none"?t:O(E({},t),{hasSearchWidget:!0})},{hasSearchWidget:!1,hasRecommendWidget:!1})}function Xl(e){var t=mo(e.mainIndex.getWidgets()),n=t.hasSearchWidget,r=t.hasRecommendWidget;e._hasSearchWidget=n,e._hasRecommendWidget=r}var Zl=function(t){var n;if(t===void 0||t.indexName===void 0&&!t.isolated&&!t.EXPERIMENTAL_isolated)throw new Error(nt("The `indexName` option is required."));var r=t.indexName,a=r===void 0?"":r,i=t.indexId,o=i===void 0?a:i,u=t.isolated,d=u===void 0?(n=t.
17EXPERIMENTAL_isolated)!==null&&n!==void 0?n:!1:u,f=[],p={},h=null,_=null,l=null,s=null,g=null,m,c=function(){h&&Xl(h)};return{$$type:"ais.index",$$widgetType:"ais.index",_isolated:d,getIndexName:function(){return a},getIndexId:function(){return o},getHelper:function(){return l},getResults:function(){return s?.lastResults?(s.lastResults._state=l.state,s.lastResults):null},getResultsForWidget:function(y){return y.dependsOn!=="recommend"||ke(y)||y.$$id===void 0?this.getResults():l?.lastRecommendResults?l.lastRecommendResults[y.$$id]:null},getPreviousState:function(){return g},getScopedResults:function(){var y=this.getParent(),b;return y?b=y.getWidgets():a.length===0?b=this.getWidgets():b=[this],go(b)},getParent:function(){return d?null:_},createURL:function(y){return typeof y=="function"?h._createURL(N({},o,y(p))):h._createURL(N({},o,vt(f,{searchParameters:y,helper:l})))},scheduleLocalSearch:Dl(function(){d&&l?.search()}),getWidgets:function(){return f},addWidgets:function(y){var b=this;if(!Array.isArray(y))throw new Error(nt("The `addWidgets` method expects an array of widgets."));var S=y.reduce(function(P,F){return P.concat(Array.isArray(F)?F:[F])},[]);if(S.some(function(P){return typeof P.init!="function"&&typeof P.render!="function"}))throw new Error(nt("The widget definition expects a `render` and/or an `init` method."));return S.forEach(function(P){P.parent=b,ke(P)||Ia(P)}),f=f.concat(S),c(),h&&S.length&&(Vn(l,{state:it(f,{uiState:p,initialSearchParameters:l.state}),recommendState:Vr(f,{uiState:p,initialRecommendParameters:l.recommendState}),_uiState:p}),S.forEach(function(P){if(P.getRenderState){var F=P.getRenderState(h.renderState[b.getIndexId()]||{},He(h,b,h._initialUiState));tt({renderState:F,instantSearchInstance:h,parent:b})}}),S.forEach(function(P){P.init&&P.init(He(h,b,h._initialUiState))}),d?this.scheduleLocalSearch():h.scheduleSearch()),this},updateWidget:function(y,b){if(typeof y.dispose!="function")throw new Error(nt("The widget definition expects a `dispose` method."));if(typeof b.init!="function"&&typeof b.render!="function")throw new Error(nt("The widget definition expects a `render` and/or an `init` method."));var S=p;y.parent=void 0,b.parent=this,ke(b)||Ia(b);var P=f.slice(),F=P.indexOf(y);if(F===-1?P.push(b):P[F]=b,f=P,c(),!h)return this;var w=y.dispose({helper:l,state:l.state,recommendState:l.recommendState,parent:this}),R=$e(w,ee.RecommendParameters)?w:l.recommendState,x=w&&!$e(w,ee.RecommendParameters)?w:l.state,I=h.future.preserveSharedStateOnUnmount?new ee.SearchParameters({index:this.getIndexName()}):x;p=vt(f,{searchParameters:it(f,{uiState:S,initialSearchParameters:I}),helper:l});var A=it(f,{uiState:p,initialSearchParameters:I});if(Vn(l,{state:A,recommendState:Vr(f,{uiState:p,initialRecommendParameters:R}),_uiState:p}),b.getRenderState){var M=b.getRenderState(h.renderState[this.getIndexId()]||{},He(h,this,h._initialUiState));tt({renderState:M,instantSearchInstance:h,parent:this})}return b.init&&b.init(He(h,this,h._initialUiState)),d?this.scheduleLocalSearch():h.scheduleSearch(),this},removeWidgets:function(y){var b=this;if(!Array.isArray(y))throw new Error(nt("The `removeWidgets` method expects an array of widgets."));var S=y.reduce(function(x,I){return x.concat(Array.isArray(I)?I:[I])},[]);if(S.some(function(x){return typeof x.dispose!="function"}))throw new Error(nt("The widget definition expects a `dispose` method."));if(f=f.filter(function(x){return S.indexOf(x)===-1}),S.forEach(function(x){x.parent=void 0}),c(),h&&S.length){var P=S.reduce(function(x,I){var A=I.dispose({helper:l,state:x.cleanedSearchState,recommendState:x.cleanedRecommendState,parent:b});return $e(A,ee.RecommendParameters)?x.cleanedRecommendState=A:A&&(x.cleanedSearchState=A),x},{cleanedSearchState:l.state,cleanedRecommendState:l.recommendState}),F=P.cleanedSearchState,w=P.cleanedRecommendState,R=h.future.preserveSharedStateOnUnmount?it(f,{uiState:p,initialSearchParameters:new ee.SearchParameters({index:this.getIndexName()})}):it(f,{uiState:vt(f,{searchParameters:F,helper:l}),initialSearchParameters:F});p=vt(f,{searchParameters:R,helper:l}),l.setState(R),l.recommendState=w,f.length&&(d?this.scheduleLocalSearch():h.scheduleSearch())}return this},init:function(y){var b=this,S=y.instantSearchInstance,P=y.parent,F=y.uiState,w;if(l===null){h=S,_=P,p=F[o]||{};var R=S.mainHelper,x=it(f,{uiState:p,initialSearchParameters:new ee.SearchParameters({index:a})}),I=Vr(f,{uiState:p,initialRecommendParameters:new ee.RecommendParameters});l=ee(R.getClient(),x.index,x),l.recommendState=I,l.search=function(){return d?(S.status="loading",b.render({instantSearchInstance:S}),S.compositionID?l.searchWithComposition():l.searchOnlyWithDerivedHelpers()):S.onStateChange?(S.onStateChange({uiState:S.mainIndex.getWidgetUiState({}),setUiState:function(T){return S.setUiState(T,!1)}}),R):R.search()},l.searchWithoutTriggeringOnStateChange=function(){return R.search()},l.searchForFacetValues=function(C,T,W,$){var U=bt.apply(void 0,[R.state].concat(ce(Ea(b)))).setQueryParameters($);return R.searchForFacetValues(C,T,W,U)};var A=a?l:ee({},"__empty_index__",{}),M=d?A:ef(P,R);s=M.derive(function(){return bt.apply(void 0,[R.state].concat(ce(Ea(b))))},function(){return Yl(b.getHelper().recommendState,R.state)});var j=(w=S._initialResults)===null||w===void 0?void 0:w[this.getIndexId()];if(j?.results){var q=new ee.SearchResults(new ee.SearchParameters(j.state),j.results);s.lastResults=q,l.lastResults=q}if(j?.recommendResults){var D=new ee.RecommendResults(new ee.RecommendParameters({params:j.recommendResults.params}),j.recommendResults.results);s.lastRecommendResults=D,l.lastRecommendResults=D}l.on("change",function(C){var T=C.isPageReset;T&&ho(f)}),s.on("search",function(){S.scheduleStalledRender()}),s.on("result",function(C){var T=C.results;S.scheduleRender(),l.lastResults=T,g=T?._state}),s.on("recommend:result",function(C){var T=C.recommend;S.scheduleRender(),l.lastRecommendResults=T.results}),f.forEach(function(C){if(C.getRenderState){var T=C.getRenderState(S.renderState[b.getIndexId()]||{},He(S,b,F));
17tt({renderState:T,instantSearchInstance:S,parent:b})}}),f.forEach(function(C){C.init&&C.init(He(S,b,F))}),l.on("change",function(C){var T=C.state,W=C._uiState;p=vt(f,{searchParameters:T,helper:l},W||{}),S.onStateChange||S.onInternalStateChange()}),j&&S.scheduleRender(),c()}},render:function(y){var b=this,S=y.instantSearchInstance;S.status!=="error"?m=void 0:S.error!==m&&!S.mainHelper.hasPendingRequests()&&g&&(m=S.error,l.setState(g));var P=this.getResults()||s?.lastRecommendResults||d&&!a?f:f.filter(function(F){return F.shouldRender});P=P.filter(function(F){return F.shouldRender?F.shouldRender({instantSearchInstance:S}):!0}),P.forEach(function(F){if(F.getRenderState){var w=F.getRenderState(S.renderState[b.getIndexId()]||{},Kt(S,b,F));tt({renderState:w,instantSearchInstance:S,parent:b})}}),P.forEach(function(F){F.render&&F.render(Kt(S,b,F))})},dispose:function(){var y=this;f.forEach(function(b){b.dispose&&l&&b.dispose({helper:l,state:l.state,recommendState:l.recommendState,parent:y})}),h=null,_=null,l?.removeAllListeners(),l=null,s?.detach(),s=null},getWidgetUiState:function(y){return f.filter(ke).filter(function(b){return!b._isolated}).reduce(function(b,S){return S.getWidgetUiState(b)},O(E({},y),N({},o,E({},y[o],p))))},getWidgetState:function(y){return this.getWidgetUiState(y)},getWidgetSearchParameters:function(y,b){var S=b.uiState;return it(f,{uiState:S,initialSearchParameters:y})},shouldRender:function(){return!0},refreshUiState:function(){p=vt(f,{searchParameters:this.getHelper().state,helper:this.getHelper()},p)},setIndexUiState:function(y){var b=typeof y=="function"?y(p):y;h.setUiState(function(S){return O(E({},S),N({},o,b))})}}};function ef(e,t){for(;e;){if(e._isolated)return e.getHelper();e=e.getParent()}return t}ae({name:"Index"}),le({connector:function(){return Zl}},{$$widgetType:"ais.index"});var tf="ais",Jt=function(t){return function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=n.descendantName,a=n.modifierName,i=r?"-".concat(r):"",o=a?"--".concat(a):"";return"".concat(tf,"-").concat(t).concat(i).concat(o)}},Ne={highlightPreTag:"<mark>",highlightPostTag:"</mark>"},rf=Promise.resolve();function yt(e,t){var n=null,r=!1,a=null,i=function(){for(var u=arguments.length,d=new Array(u),f=0;f<u;f++)d[f]=arguments[f];if(n!==null){t&&a!==null&&(a=t(a,d));return}a=d,n=rf.then(function(){n=null;var p=a;if(a=null,r){r=!1;return}e.apply(void 0,ce(p))})};return i.wait=function(){if(n===null)throw new Error("The deferred function should be called before calling `wait()`");return n},i.cancel=function(){n!==null&&(r=!0)},i}function Yt(e,t){var n=Array.isArray(t)?t:t.split(".");return n.reduce(function(r,a){return r&&r[a]},e)}var nf=Jt("Highlight");function vo(e){var t=e.attribute,n=e.highlightedTagName,r=n===void 0?"mark":n,a=e.hit,i=e.cssClasses,o=i===void 0?{}:i,u=Yt(a._highlightResult,t),d=u||{},f=d.value,p=f===void 0?"":f,h=nf({descendantName:"highlighted"})+(o.highlighted?" ".concat(o.highlighted):"");return p.replace(new RegExp(Ne.highlightPreTag,"g"),"<".concat(r,' class="').concat(h,'">')).replace(new RegExp(Ne.highlightPostTag,"g"),"</".concat(r,">"))}function po(e){var t=Ne.highlightPreTag,n=Ne.highlightPostTag;return e.map(function(r){return r.isHighlighted?t+r.value+n:r.value}).join("")}function yo(e){var t=Ne.highlightPostTag,n=Ne.highlightPreTag,r=e.split(n),a=r.shift(),i=a?[{value:a,isHighlighted:!1}]:[];return r.forEach(function(o){var u=o.split(t);i.push({value:u[0],isHighlighted:!0}),u[1]!==""&&i.push({value:u[1],isHighlighted:!1})}),i}var af={"&":"&","<":"<",">":">",""":'"',"'":"'"},So=/&(amp|quot|lt|gt|#39);/g,sf=RegExp(So.source);function of(e){return e&&sf.test(e)?e.replace(So,function(t){return af[t]}):e}var uf=new RegExp(/\w/i);function cf(e,t){var n,r,a,i,o=e[t],u=(n=(a=e[t+1])===null||a===void 0?void 0:a.isHighlighted)!==null&&n!==void 0?n:!0,d=(r=(i=e[t-1])===null||i===void 0?void 0:i.isHighlighted)!==null&&r!==void 0?r:!0;return!uf.test(of(o.value))&&d===u?d:o.isHighlighted}function Ro(e){return e.some(function(t){return t.isHighlighted})?e.map(function(t,n){return O(E({},t),{isHighlighted:!cf(e,n)})}):e.map(function(t){return O(E({},t),{isHighlighted:!1})})}var lf=Jt("ReverseHighlight");function bo(e){var t=e.attribute,n=e.highlightedTagName,r=n===void 0?"mark":n,a=e.hit,i=e.cssClasse
17s,o=i===void 0?{}:i,u=Yt(a._highlightResult,t),d=u||{},f=d.value,p=f===void 0?"":f,h=lf({descendantName:"highlighted"})+(o.highlighted?" ".concat(o.highlighted):""),_=po(Ro(yo(p)));return _.replace(new RegExp(Ne.highlightPreTag,"g"),"<".concat(r,' class="').concat(h,'">')).replace(new RegExp(Ne.highlightPostTag,"g"),"</".concat(r,">"))}var ff=Jt("Snippet");function _o(e){var t=e.attribute,n=e.highlightedTagName,r=n===void 0?"mark":n,a=e.hit,i=e.cssClasses,o=i===void 0?{}:i,u=Yt(a._snippetResult,t),d=u||{},f=d.value,p=f===void 0?"":f,h=ff({descendantName:"highlighted"})+(o.highlighted?" ".concat(o.highlighted):"");return p.replace(new RegExp(Ne.highlightPreTag,"g"),"<".concat(r,' class="').concat(h,'">')).replace(new RegExp(Ne.highlightPostTag,"g"),"</".concat(r,">"))}var df=Jt("ReverseSnippet");function wo(e){var t=e.attribute,n=e.highlightedTagName,r=n===void 0?"mark":n,a=e.hit,i=e.cssClasses,o=i===void 0?{}:i,u=Yt(a._snippetResult,t),d=u||{},f=d.value,p=f===void 0?"":f,h=df({descendantName:"highlighted"})+(o.highlighted?" ".concat(o.highlighted):""),_=po(Ro(yo(p)));return _.replace(new RegExp(Ne.highlightPreTag,"g"),"<".concat(r,' class="').concat(h,'">')).replace(new RegExp(Ne.highlightPostTag,"g"),"</".concat(r,">"))}function hf(e){return btoa(encodeURIComponent(JSON.stringify(e)))}function zn(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16|0,n=e==="x"?t:t&3|8;return n.toString(16)})}var Aa="ais.usage.sessionId",ze=null;function gf(){if(ze)return ze;try{var e=sessionStorage.getItem(Aa);return e?(ze=e,ze):(ze=zn(),sessionStorage.setItem(Aa,ze),ze)}catch{return ze=zn(),ze}}function mf(e){var t=e.method,n=e.payload;if((typeof n>"u"?"undefined":Be(n))!=="object")throw new Error("The insights helper expects the payload to be an object.");var r;try{r=hf(n)}catch{throw new Error("Could not JSON serialize the payload object.")}return'data-insights-method="'.concat(t,'" data-insights-payload="').concat(r,'"')}function Po(e,t){return mf({method:e,payload:t})}var vf="_ALGOLIA";function pf(e){if(!((typeof document>"u"?"undefined":Be(document))!=="object"||typeof document.cookie!="string"))for(var t="".concat(e,"="),n=document.cookie.split(";"),r=0;r<n.length;r++){for(var a=n[r];a.charAt(0)===" ";)a=a.substring(1);if(a.indexOf(t)===0)return a.substring(t.length,a.length)}}function Fo(){return pf(vf)}function yf(){return Fo()}function Ta(e){return e!==Object(e)}function mi(e,t){if(e===t)return!0;if(Ta(e)||Ta(t)||typeof e=="function"||typeof t=="function")return e===t;if(Object.keys(e).length!==Object.keys(t).length)return!1;var n=!0,r=!1,a=void 0;try{for(var i=Object.keys(e)[Symbol.iterator](),o;!(n=(o=i.next()).done);n=!0){var u=o.value;if(!(u in t)||!mi(e[u],t[u]))return!1}}catch(d){r=!0,a=d}finally{try{!n&&i.return!=null&&i.return()}finally{if(r)throw a}}return!0}function qe(e){var t=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{fallback:function(){}}).fallback;return typeof window>"u"?t():e({window})}function Oa(e){var t=e||{};t.page;var n=we(t,["page"]);return n}function Sf(){var e=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}
17).key,t=["ais.infiniteHits",e].filter(Boolean).join(":");return{read:function(r){var a=r.state,i=qe(function(u){var d=u.window;return d.sessionStorage});if(!i)return null;try{var o=JSON.parse(i.getItem(t));return o&&mi(o.state,Oa(a))?o.hits:null}catch(u){if($e(u,SyntaxError))try{i.removeItem(t)}catch{}return null}},write:function(r){var a=r.state,i=r.hits,o=qe(function(u){var d=u.window;return d.sessionStorage});if(o)try{o.setItem(t,JSON.stringify({state:Oa(a),hits:i}))}catch{}}}}var Rf=ei();const bf=Jn(Rf);function Ke(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n]}function ja(e,t){for(var n,r=0;r<e.length;r++)if(n=e[r],t(n,r,e))return n}function xo(e){var t=e;return t.transporter&&t.transporter.userAgent?t.transporter.userAgent.value:t._ua}function Ca(e){if(e.appId&&e.apiKey)return[e.appId,e.apiKey];if(e.transporter){var t=e.transporter,n=t.headers||t.baseHeaders,r=t.queryParameters||t.baseQueryParameters,a="x-algolia-application-id",i="x-algolia-api-key",o=n[a]||r[a],u=n[i]||r[i];return[o,u]}else return[e.applicationID,e.apiKey]}function _f(e,t){return e==null?e:Object.keys(e).reduce(function(n,r){if(t.indexOf(r)>=0)return n;var a=r;return n[a]=e[a],n},{})}var wf=["ais.index","ais.feedContainer"];function Te(e){return wf.includes(e.$$type)}function Ze(e,t,n){var r=t.getHelper();return{uiState:n,helper:r,parent:t,instantSearchInstance:e,state:r.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,scopedResults:[],searchMetadata:{isSearchStalled:e.status==="stalled"},status:e.status,error:e.error}}function $a(e,t,n){var r=t.getResultsForWidget(n),a=t.getHelper();return{helper:a,parent:t,instantSearchInstance:e,results:r,scopedResults:t.getScopedResults(),state:r&&"_state"in r?r._state:a.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,searchMetadata:{isSearchStalled:e.status==="stalled"},status:e.status,error:e.error}}function kt(e){var t=e.renderState,n=e.instantSearchInstance,r=e.parent,a=r?r.getIndexId():n.mainIndex.getIndexId();n.renderState=O(E({},n.renderState),N({},a,E({},n.renderState[a],t)))}function Pf(e){if(e==null)return null;var t=typeof e>"u"?"undefined":Be(e);if(t==="string"||t==="number"||t==="boolean")return{value:String(e),type:t};if(Array.isArray(e)||t==="object"){var n=Array.isArray(e)?"array":"object";try{return{value:JSON.stringify(e),type:n}}catch{return{type:n}}}return t==="function"?{value:e.name,type:"function"}:null}function Io(e){var t=[];return Object.keys(e).forEach(function(n){var r=e[n];if(r!==void 0){var a=Pf(r);a?t.push(E({name:n},a)):t.push({name:n})}}),t}function Eo(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.mainIndex,r=Ze(t,n,t._initialUiState);return e.map(function(a){var i={};if(a.getWidgetRenderState){var o=a.getWidgetRenderState(r);o&&o.widgetParams&&(i=o.widgetParams)}var u=Io(i),d=Te(a)?Eo(a.getWidgets(),t,a):[];return{type:a.$$widgetType||a.$$type||"unknown",params:u,children:d}})}var Ao=typeof performance<"u"?function(){return performance.now()}:function(){return Date.now()},vi="4.116.0",To="2.17.2",Ff="https://cdn.jsdelivr.net/npm/search-insights@".concat(To,"/dist/search-insights.min.js"),xf=["searchClient","insightsClient","initialUiState"];function La(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.insightsClient,n=e.insightsInitParams,r=e.onEvent,a=e.$$internal,i=a===void 0?!1:a,o=e.$$automatic,u=o===void 0?!1:o,d=t;!t&&t!==null&&qe(function(p){var h=p.window,_=h.AlgoliaAnalyticsObject||"aa";typeof _=="string"&&(d=h[_]),d||(h.AlgoliaAnalyticsObject=_,h[_]||(h[_]=function(){for(var l=arguments.length,s=new Array(l),g=0;g<l;g++)s[g]=arguments[g];h[_].queue||(h[_].queue=[]),h[_].queue.push(s)},h[_].version=To,h[_].shouldAddScript=!0),d=h[_])});var f=d||Ke;return function(p){var h=p.instantSearchInstance,_,l=h.middleware.filter(function(R){return R.instance.$$type==="ais.insights"&&R.instance.$$internal}).map(function(R){return R.creator});(_=h).unuse.apply(_,ce(l));var s=oe(Ca(h.client),2),g=s[0],m=s[1],c=void 0,v=void 0,y=void 0,b=f.queue;if(Array.isArray(b)){var S;S=oe(["setUserToken","init"].map(function(R){var x=oe(ja(b.slice().reverse(),function(A){var M=oe(A,1),j=M[0];return j===R})||[],2),I=x[1];return I}),2),v=S[0],c=S[1]}f("getUserToken",null,function(R,x){y=Ha(x)}),(n||!Wa(f))&&f("init",E({appId:g,apiKey:m,partial:!0},n));var P,F,w=null;return{$$type:"ais.insights",$$internal:i,$$automatic:u,onStateChange:function(){},subscribe:function(){if(f.shouldAddScript){var x="[insights middleware]: could not load search-insights.js. Please load it manually following https://alg.li/insights-init";try{var I=document.createElement("script");I.async=!0,I.src=Ff,I.onerror=function(){h.emit("error",new Error(x))},document.body.appendChild(I),f.shouldAddScript=!1}catch{f.shouldAddScript=!1,h.emit("error",new Error(x))}}},started:function(){f("addAlgoliaAgent","insights-middleware"),F=h.mainHelper;var x=f.queue;if(Array.isArray(x)){var I;I=oe(["setUserToken","init"].map(function(k){var B=oe(ja(x.slice().reverse(),function(z){var V=oe(z,1),Y=V[0];return Y===k})||[],2),X=B[1];return X}),2),v=I[0],c=I[1]}
17P=If(h),u||F.overrideStateWithoutTriggeringChangeEvent(O(E({},F.state),{clickAnalytics:!0})),i||h.scheduleSearch();var A=function(B){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,z=Ha(B);if(!z)return;var V=F.state.userToken;function Y(){F.overrideStateWithoutTriggeringChangeEvent(O(E({},F.state),{userToken:z})),V&&V!==z&&(F._recommendCache={},h.scheduleSearch())}X?Y():setTimeout(Y,0)};function M(k){A(k,!0),f("setUserToken",k)}var j=void 0,q=Fo();if(q)j=q;else{var D="anonymous-".concat(zn());j=D}var C,T=P.userToken;n?.userToken&&(C=n.userToken),C?M(C):T?M(T):y?M(y):v?M(v):j&&(M(j),(n?.useCookie||c?.useCookie)&&Ef(j,n?.cookieDuration||c?.cookieDuration)),f("onUserTokenChange",function(k){return A(k,!0)},{immediate:!0});var W=f;Wa(f)&&(W=function(B,X){var z=oe(Ca(h.client),2),V=z[0],Y=z[1],te={headers:{"X-Algolia-Application-Id":V,"X-Algolia-API-Key":Y}};return f(B,X,te)});var $=new Set,U;h.mainHelper.derivedHelpers[0].on("result",function(k){var B=k.results;B&&(!B.queryID||B.queryID!==U)&&(U=B.queryID,$.clear())}),h.sendEventToInsights=function(k){if(r)r(k,W);else if(k.insightsMethod){if(k.insightsMethod==="viewedObjectIDs"){var B=k.payload,X=function(Y){return B.queryID?"".concat(B.queryID,":").concat(Y):Y},z=B.objectIDs.filter(function(V){return!$.has(X(V))});if(z.length===0)return;z.forEach(function(V){return $.add(X(V))}),B.objectIDs=z}k.payload.algoliaSource=["instantsearch"],u&&k.payload.algoliaSource.push("instantsearch-automatic"),k.eventModifier==="internal"&&k.payload.algoliaSource.push("instantsearch-internal"),W(k.insightsMethod,k.payload)}},qe(function(){var k=gf();function B(z){var V,Y=(V=F.state)===null||V===void 0?void 0:V.userToken;W("sendEvents",[E({eventType:"instantsearch",timestamp:Date.now(),sessionID:k,userToken:Y?String(Y):void 0},z)])}var X=function(){try{var V=Math.round(Ao()-h._createdAt);B({eventName:"__start__",algoliaAgent:xo(h.client),version:vi,applicationId:g,performance:{bootstrapMs:V},widgets:[{type:"ais.instantSearch",params:h._initialOptions?Io(_f(h._initialOptions,ce(xf))):[],children:Eo(h.mainIndex.getWidgets(),h)}]})}catch{}};h.once("render",X),w=function(){return h.removeListener("render",X)}})},unsubscribe:function(){w&&w(),f("onUserTokenChange",void 0),h.sendEventToInsights=Ke,F&&P&&(F.overrideStateWithoutTriggeringChangeEvent(E({},F.state,P)),h.scheduleSearch())}}}}function If(e){var t,n,r=((n=e._initialResults)===null||n===void 0||(t=n[e.indexName])===null||t===void 0?void 0:t.state)||{},a=e.mainHelper.state;return{userToken:r.userToken||a.userToken,clickAnalytics:r.clickAnalytics||a.clickAnalytics}}function Ef(e,t){var n=2592e6,r=new Date;r.setTime(r.getTime()+(t||n*6));var a="expires=".concat(r.toUTCString());document.cookie="_ALGOLIA=".concat(e,";").concat(a,";path=/")}function Wa(e){var t=oe((e.version||"").split(".").map(Number),2),n=t[0],r=t[1],a=n>=3,i=n===2&&r>=6,o=n===1&&r>=10;return a||i||o}function Ha(e){if(e)return typeof e=="number"?e.toString():e}function Oo(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t.mainIndex,a=Ze(t,r,t._initialUiState);e.forEach(function(i){var o={};if(i.getWidgetRenderState){var u=i.getWidgetRenderState(a);u&&u.widgetParams&&(o=u.widgetParams)}var d=Object.keys(o).filter(function(f){return o[f]!==void 0});n.widgets.push({type:i.$$type,widgetType:i.$$widgetType,params:d}),Te(i)&&Oo(i.getWidgets(),t,n,i)})}function Af(){return qe(function(e){var t=e.window,n,r;return((r=t.navigator)===null||r===void 0||(n=r.userAgent)===null||n===void 0?void 0:n.indexOf("Algolia Crawler"))>-1},{fallback:function(){return!1}})}function Tf(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.$$internal,n=t===void 0?!1:t;return function(r){var a=r.instantSearchInstance,i={widgets:[]},o=document.createElement("meta"),u=document.querySelector("head");return o.name="instantsearch:widgets",{$$type:"ais.metadata",$$internal:n,onStateChange:function(){},subscribe:function(){setTimeout(function(){i.ua=xo(a.client),Oo(a.mainIndex.getWidgets(),a,i),a.middleware.forEach(function(f){return i.widgets.push({middleware:!0,type:f.instance.$$type,internal:f.instance.$$internal})}),o.content=JSON.stringify(i),u.appendChild(o)}
vendor: 26,347 bytes, lines 17-20
17,0)},started:function(){},unsubscribe:function(){o.remove()}}}}var zr,Na;function wt(){return Na||(Na=1,zr=TypeError),zr}var Gr,Ma;function Xt(){if(Ma)return Gr;Ma=1;var e=typeof Map=="function"&&Map.prototype,t=Object.getOwnPropertyDescriptor&&e?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,n=e&&t&&typeof t.get=="function"?t.get:null,r=e&&Map.prototype.forEach,a=typeof Set=="function"&&Set.prototype,i=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,o=a&&i&&typeof i.get=="function"?i.get:null,u=a&&Set.prototype.forEach,d=typeof WeakMap=="function"&&WeakMap.prototype,f=d?WeakMap.prototype.has:null,p=typeof WeakSet=="function"&&WeakSet.prototype,h=p?WeakSet.prototype.has:null,_=typeof WeakRef=="function"&&WeakRef.prototype,l=_?WeakRef.prototype.deref:null,s=Boolean.prototype.valueOf,g=Object.prototype.toString,m=Function.prototype.toString,c=String.prototype.match,v=String.prototype.slice,y=String.prototype.replace,b=String.prototype.toUpperCase,S=String.prototype.toLowerCase,P=RegExp.prototype.test,F=Array.prototype.concat,w=Array.prototype.join,R=Array.prototype.slice,x=Math.floor,I=typeof BigInt=="function"?BigInt.prototype.valueOf:null,A=Object.getOwnPropertySymbols,M=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,j=typeof Symbol=="function"&&typeof Symbol.iterator=="object",q=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===j||!0)?Symbol.toStringTag:null,D=Object.prototype.propertyIsEnumerable,C=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(L){return L.__proto__}:null);function T(L,H){if(L===1/0||L===-1/0||L!==L||L&&L>-1e3&&L<1e3||P.call(/e/,H))return H;var ue=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof L=="number"){var ve=L<0?-x(-L):x(L);if(ve!==L){var pe=String(ve),ne=v.call(H,pe.length+1);return y.call(pe,ue,"$&_")+"."+y.call(y.call(ne,/([0-9]{3})/g,"$&_"),/_$/,"")}}return y.call(H,ue,"$&_")}var W=ou,$=W.custom,U=_e($)?$:null,k={__proto__:null,double:'"',single:"'"},B={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Gr=function L(H,ue,ve,pe){var ne=ue||{};if(ye(ne,"quoteStyle")&&!ye(k,ne.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(ye(ne,"maxStringLength")&&(typeof ne.maxStringLength=="number"?ne.maxStringLength<0&&ne.maxStringLength!==1/0:ne.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Ye=ye(ne,"customInspect")?ne.customInspect:!0;if(typeof Ye!="boolean"&&Ye!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(ye(ne,"indent")&&ne.indent!==null&&ne.indent!==" "&&!(parseInt(ne.indent,10)===ne.indent&&ne.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(ye(ne,"numericSeparator")&&typeof ne.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var rt=ne.numericSeparator;if(typeof H>"u")return"undefined";if(H===null)return"null";if(typeof H=="boolean")return H?"true":"false";if(typeof H=="string")return Ri(H,ne);if(typeof H=="number"){if(H===0)return 1/0/H>0?"0":"-0";var je=String(H);return rt?T(H,je):je}if(typeof H=="bigint"){var Xe=String(H)+"n";return rt?T(H,Xe):Xe}var rr=typeof ne.depth>"u"?5:ne.depth;if(typeof ve>"u"&&(ve=0),ve>=rr&&rr>0&&typeof H=="object")return Y(H)?"[Array]":"[Object]";var gt=iu(ne,ve);if(typeof pe>"u")pe=[];else if(Je(pe,H)>=0)return"[Circular]";function De(mt,Ht,su){if(Ht&&(pe=R.call(pe),pe.push(Ht)),su){var Ai={depth:ne.depth};return ye(ne,"quoteStyle")&&(Ai.quoteStyle=ne.quoteStyle),L(mt,Ai,ve+1,pe)}return L(mt,ne,ve+1,pe)}if(typeof H=="function"&&!se(H)){var _i=lt(H),wi=Lt(H,De);return"[Function"+(_i?": "+_i:" (anonymous)")+"]"+(wi.length>0?" { "+w.call(wi,", ")+" }":"")}if(_e(H)){var Pi=j?y.call(String(H),/^(Symbol\(.*\))_[^)]*$/,"$1"):M.call(H);return typeof H=="object"&&!j?Pt(Pi):Pi}if(tu(H)){for(var Ft="<"+S.call(String(H.nodeName)),nr=H.attributes||[],Wt=0;Wt<nr.length;Wt++)Ft+=" "+nr[Wt].name+"="+X(z(nr[Wt].value),"double",ne);return Ft+=">",H.childNodes&&H.childNodes.length&&(Ft+="..."),Ft+="</"+S.call(String(H.nodeName))+">",Ft}if(Y(H)){if(H.length===0)return"[]";var ir=Lt(H,De);return gt&&!nu(ir)?"["+tr(ir,gt)+"]":"[ "+w.call(ir,", ")+" ]"}if(Z(H)){var ar=Lt(H,De);return!("cause"in Error.prototype)&&"cause"in H&&!D.call(H,"cause")?"{ ["+String(H)+"] "+w.call(F.call("[cause]: "+De(H.cause),ar),", ")+" }":ar.length===0?"["+String(H)+"]":"{ ["+String(H)+"] "+w.call(ar,", ")+" }"}if(typeof H=="object"&&Ye){if(U&&typeof H[U]=="function"&&W)return W(H,{depth:rr-ve});if(Ye!=="symbol"&&typeof H.inspect=="function")return H.inspect()}if(Ue(H)){var Fi=[];return r&&r.call(H,function(mt,Ht){Fi.push(De(Ht,H,!0)+" => "+De(mt,H))}),bi("Map",n.call(H),Fi,gt)}if(ht(H)){var xi=[];return u&&u.call(H,function(mt){xi.push(De(mt,H))}),bi("Set",o.call(H),xi,gt)}if(ft(H))return er("WeakMap");if(eu(H))return er("WeakSet");if(dt(H))return er("WeakRef");if(re(H))return Pt(De(Number(H)));if(xe(H))return Pt(De(I.call(H)));if(me(H))return Pt(s.call(H));if(ie(H))return Pt(De(String(H)));if(typeof window<"u"&&H===window)return"{ [object Window] }";if(typeof globalThis<"u"&&H===globalThis||typeof Ti<"u"&&H===Ti)return"{ [object globalThis] }";if(!te(H)&&!se(H)){var sr=Lt(H,De),Ii=C?C(H)===Object.prototype:H instanceof Object||H.constructor===Object,or=H instanceof Object?"":"null prototype",Ei=!Ii&&q&&Object(H)===H&&q in H?v.call(Le(H),8,-1):or?"Object":"",au=Ii||typeof H.constructor!="function"?"":H.constructor.name?H.constructor.name+" ":"",ur=au+(Ei||or?"["+w.call(F.call([],Ei||[],or||[]),": ")+"] ":"");return sr.length===0?ur+"{}":gt?ur+"{"+tr(sr,gt)+"}":ur+"{ "+w.call(sr,", ")+" }"}return String(H)};function X(L,H,ue){var ve=ue.quoteStyle||H,pe=k[ve];return pe+L+pe}function z(L){return y.call(String(L),/"/g,""")}function V(L){return!q||!(typeof L=="object"&&(q in L||typeof L[q]<"u"))}function Y(L){return Le(L)==="[object Array]"&&V(L)}function te(L){return Le(L)==="[object Date]"&&V(L)}function se(L){return Le(L)==="[object RegExp]"&&V(L)}function Z(L){return Le(L)==="[object Error]"&&V(L)}function ie(L){return Le(L)==="[object String]"&&V(L)}function re(L){return Le(L)==="[object Number]"&&V(L)}function me(L){return Le(L)==="[object Boolean]"&&V(L)}function _e(L){if(j)return L&&typeof L=="object"&&L instanceof Symbol;if(typeof L=="symbol")return!0;if(!L||typeof L!="object"||!M)return!1;try{return M.call(L),!0}catch{}return!1}function xe(L){if(!L||typeof L!="object"||!I)return!1;try{return I.call(L),!0}catch{}return!1}var Re=Object.prototype.hasOwnProperty||function(L){return L in this};function ye(L,H){return Re.call(L,H)}function Le(L){return g.call(L)}function lt(L){if(L.name)return L.name;var H=c.call(m.call(L),/^function\s*([\w$]+)/);return H?H[1]:null}function Je(L,H){if(L.indexOf)return L.indexOf(H);for(var ue=0,ve=L.length;ue<ve;ue++)if(L[ue]===H)return ue;return-1}function Ue(L){if(!n||!L||typeof L!="object")return!1;try{n.call(L);try{o.call(L)}catch{return!0}return L instanceof Map}catch{}return!1}function ft(L){if(!f||!L||typeof L!="object")return!1;try{f.call(L,f);try{h.call(L,h)}catch{return!0}return L instanceof WeakMap}catch{}return!1}function dt(L){if(!l||!L||typeof L!="object")return!1;try{return l.call(L),!0}catch{}return!1}function ht(L){if(!o||!L||typeof L!="object")return!1;try{o.call(L);try{n.call(L)}catch{return!0}return L instanceof Set}catch{}return!1}function eu(L){if(!h||!L||typeof L!="object")return!1;try{h.call(L,h);try{f.call(L,f)}catch{return!0}return L instanceof WeakSet}catch{}return!1}function tu(L){return!L||typeof L!="object"?!1:typeof HTMLElement<"u"&&L instanceof HTMLElement?!0:typeof L.nodeName=="string"&&typeof L.getAttribute=="function"}function Ri(L,H){if(L.length>H.maxStringLength){var ue=L.length-H.maxStringLength,ve="... "+ue+" more character"+(ue>1?"s":"");return Ri(v.call(L,0,H.maxStringLength),H)+ve}var pe=B[H.quoteStyle||"single"];pe.lastIndex=0;var ne=y.call(y.call(L,pe,"\\$1"),/[\x00-\x1f]/g,ru);return X(ne,"single",H)}function ru(L){var H=L.charCodeAt(0),ue={8:"b",9:"t",10:"n",12:"f",13:"r"}[H];return ue?"\\"+ue:"\\x"+(H<16?"0":"")+b.call(H.toString(16))}function Pt(L){return"Object("+L+")"}function er(L){return L+" { ? }"}function bi(L,H,ue,ve){var pe=ve?tr(ue,ve):w.call(ue,", ");return L+" ("+H+") {"+pe+"}"}function nu(L){for(var H=0;H<L.length;H++)if(Je(L[H],` 18`)>=0)return!1;return!0}function iu(L,H){var ue;if(L.indent===" ")ue=" ";else if(typeof L.indent=="number"&&L.indent>0)ue=w.call(Array(L.indent+1)," ");else return null;return{base:ue,prev:w.call(Array(H+1),ue)}}function tr(L,H){if(L.length===0)return"";var ue=` 19`+H.prev+H.base;return ue+w.call(L,","+ue)+` 20`+H.prev}function Lt(L,H){var ue=Y(L),ve=[];if(ue){ve.length=L.length;for(var pe=0;pe<L.length;pe++)ve[pe]=ye(L,pe)?H(L[pe],L):""}var ne=typeof A=="function"?A(L):[],Ye;if(j){Ye={};for(var rt=0;rt<ne.length;rt++)Ye["$"+ne[rt]]=ne[rt]}for(var je in L)ye(L,je)&&(ue&&String(Number(je))===je&&je<L.length||j&&Ye["$"+je]instanceof Symbol||(P.call(/[^\w$]/,je)?ve.push(H(je,L)+": "+H(L[je],L)):ve.push(je+": "+H(L[je],L))));if(typeof A=="function")for(var Xe=0;Xe<ne.length;Xe++)D.call(L,ne[Xe])&&ve.push("["+H(ne[Xe])+"]: "+H(L[ne[Xe]],L));return ve}return Gr}var Kr,Ua;function Of(){if(Ua)return Kr;Ua=1;var e=Xt(),t=wt(),n=function(u,d,f){for(var p=u,h;(h=p.next)!=null;p=h)if(h.key===d)return p.next=h.next,f||(h.next=u.next,u.next=h),h},r=function(u,d){if(u){var f=n(u,d);return f&&f.value}},a=function(u,d,f){var p=n(u,d);p?p.value=f:u.next={key:d,next:u.next,value:f}},i=function(u,d){return u?!!n(u,d):!1},o=function(u,d){if(u)return n(u,d,!0)};return Kr=function(){var d,f={assert:function(p){if(!f.has(p))throw new t("Side channel does not contain "+e(p))},delete:function(p){var h=o(d,p);return h&&d&&!d.next&&(d=void 0),!!h},get:function(p){return r(d,p)},has:function(p){return i(d,p)},set:function(p,h){d||(d={next:void 0}),a(d,p,h)}};return f},Kr}var Jr,Da;function jo(){return Da||(Da=1,Jr=Object),Jr}var Yr,qa;function jf(){return qa||(qa=1,Yr=Error),Yr}var Xr,ka;function Cf(){return ka||(ka=1,Xr=EvalError),Xr}var Zr,Ba;function $f(){return Ba||(Ba=1,Zr=RangeError),Zr}var en,Qa;function Lf(){return Qa||(Qa=1,en=ReferenceError),en}var tn,Va;function Wf(){return Va||(Va=1,tn=SyntaxError),tn}var rn,za;function Hf(){return za||(za=1,rn=URIError),rn}var nn,Ga;function Nf(){return Ga||(Ga=1,nn=Math.abs),nn}var an,Ka;function Mf(){return Ka||(Ka=1,an=Math.floor),an}var sn,Ja;function Uf(){return Ja||(Ja=1,sn=Math.max),sn}var on,Ya;function Df(){return Ya||(Ya=1,on=Math.min),on}var un,Xa;function qf(){return Xa||(Xa=1,un=Math.pow),un}var cn,Za;function kf(){return Za||(Za=1,cn=Math.round),cn}var ln,es;function Bf(){return es||(es=1,ln=Number.isNaN||function(t){return t!==t}),ln}var fn,ts;function Qf(){if(ts)return fn;ts=1;var e=Bf();return fn=function(n){return e(n)||n===0?n:n<0?-1:1},fn}var dn,rs;function Vf(){return rs||(rs=1,dn=Object.getOwnPropertyDescriptor),dn}var hn,ns;function Co(){if(ns)return hn;ns=1;var e=Vf();if(e)try{e([],"length")}catch{e=null}return hn=e,hn}var gn,is;function $o(){if(is)return gn;is=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return gn=e,gn}var mn,as;function zf(){return as||(as=1,mn=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},n=Symbol("test"),r=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var a=42;t[n]=a;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(t,n);if(u.value!==a||u.enumerable!==!0)return!1}return!0}),mn}var vn,ss;function Gf(){if(ss)return vn;ss=1;var e=typeof Symbol<"u"&&Symbol,t=zf();return vn=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},vn}var pn,os;function Lo(){return os||(os=1,pn=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),pn}var yn,us;function Wo(){if(us)return yn;us=1;var e=jo();return yn=e.getPrototypeOf||null,yn}var Sn,cs;function Kf(){if(cs)return Sn;cs=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",a=function(d,f){for(var p=[],h=0;h<d.length;h+=1)p[h]=d[h];for(var _=0;_<f.length;_+=1)p[_+d.length]=f[_];return p},i=function(d,f){for(var p=[],h=f,_=0;h<d.length;h+=1,_+=1)p[_]=d[h];return p},o=function(u,d){for(var f="",p=0;p<u.length;p+=1)f+=u[p],p+1<u.length&&(f+=d);return f};return Sn=function(d){var f=this;if(typeof f!="function"||t.apply(f)!==r)throw new TypeError(e+f);for(var p=i(arguments,1),h,_=function(){if(this instanceof h){var c=f.apply(this,a(p,arguments));return Object(c)===c?c:this}return f.apply(d,a(p,arguments))},l=n(0,f.length-p.length),s=[],g=0;g<l;g++)s[g]="$"+g;if(h=Function("binder","return function ("+o(s,",")+"){ return binder.apply(this,arguments); }")(_),f.prototype){var m=function(){};m.prototype=f.prototype,h.prototype=new m,m.prototype=null}return h},Sn}var Rn,ls;function Zt(){if(ls)return Rn;ls=1;var e=Kf();return Rn=Function.prototype.bind||e,Rn}var bn,fs;function pi(){return fs||(fs=1,bn=Function.prototype.call),bn}var _n,ds;function Ho(){return ds||(ds=1,_n=Function.prototype.apply),_n}var wn,hs;function Jf(){return hs||(hs=1,wn=typeof Reflect<"u"&&Reflect&&Reflect.apply),wn}var Pn,gs;function Yf(){if(gs)return Pn;gs=1;var e=Zt(),t=Ho(),n=pi(),r=Jf();return Pn=r||e.call(n,t),Pn}var Fn,ms;function No(){if(ms)return Fn;ms=1;var e=Zt(),t=wt(),n=pi(),r=Yf();return Fn=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},Fn}var xn,vs;function Xf(){if(vs)return xn;vs=1;var e=No(),t=Co(),n;try{n=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var r=!!n&&t&&t(Object.prototype,"__proto__"),a=Object,i=a.getPrototypeOf;return xn=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(u){return i(u==null?u:a(u))}:!1,xn}var In,ps;function Zf(){if(ps)return In;ps=1;var e=Lo(),t=Wo(),n=Xf();return In=e?function(a){return e(a)}:t?function(a){if(!a||typeof a!="object"&&typeof a!="function")throw new TypeError("getProto: not an object");return t(a)}:n?function(a){return n(a)}:null,In}var En,ys;function ed(){if(ys)return En;ys=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Zt();return En=n.call(e,t),En}var An,Ss;function yi(){if(Ss)return An;Ss=1;var e,t=jo(),n=jf(),r=Cf(),a=$f(),i=Lf(),o=Wf(),u=wt(),d=Hf(),f=Nf(),p=Mf(),h=Uf(),_=Df(),l=qf(),s=kf(),g=Qf(),m=Function,c=function(se){try{return m('"use strict"; return ('+se+").constructor;")()}catch{}},v=Co(),y=$o(),b=function(){throw new u},S=v?(function(){try{return arguments.callee,b}catch{try{return v(arguments,"callee").get}catch{return b}}})():b,P=Gf()(),F=Zf(),w=Wo(),R=Lo(),x=Ho(),I=pi(),A={},M=typeof Uint8Array>"u"||!F?e:F(Uint8Array),j={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?e:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?e:ArrayBuffer,"%ArrayIteratorPrototype%":P&&F?F([][Symbol.iterator]()):e,"%AsyncFromSyncIteratorPrototype%":e,"%AsyncFunction%":A,"%AsyncGenerator%":A,"%AsyncGeneratorFunction%":A,"%AsyncIteratorPrototype%":A,"%Atomics%":typeof Atomics>"u"?e:Atomics,"%BigInt%":typeof BigInt>"u"?e:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?e:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?e:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?e:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?e:Float16Array,"%Float32Array%":typeof Float32Array>"u"?e:Float32Array,"%Float64Array%":typeof Float64Array>"u"?e:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?e:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":A,"%Int8Array%":typeof Int8Array>"u"?e:Int8Array,"%Int16Array%":typeof Int16Array>"u"?e:Int16Array,"%Int32Array%":typeof Int32Array>"u"?e:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":P&&F?F(F([][Symbol.iterator]())):e,"%JSON%":typeof JSON=="object"?JSON:e,"%Map%":typeof Map>"u"?e:Map,"%MapIteratorPrototype%":typeof Map>"u"||!P||!F?e:F(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":v,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?e:Promise,"%Proxy%":typeof Proxy>"u"?e:Proxy,"%RangeError%":a,"%ReferenceError%":i,"%Reflect%":typeof Reflect>"u"?e:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?e:Set,"%SetIteratorPrototype%":typeof Set>"u"||!P||!F?e:F(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?e:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":P&&F?F(""[Symbol.iterator]()):e,"%Symbol%":P?Symbol:e,"%SyntaxError%":o,"%ThrowTypeError%":S,"%TypedArray%":M,"%TypeError%":u,"%Uint8Array%":typeof Uint8Array>"u"?e:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?e:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?e:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?e:Uint32Array,"%URIError%":d,"%WeakMap%":typeof WeakMap>"u"?e:WeakMap,"%WeakRef%":typeof WeakRef>"u"?e:WeakRef,"%WeakSet%":typeof WeakSet>"u"?e:WeakSet,"%Function.prototype.call%":I,"%Function.prototype.apply%":x,"%Object.defineProperty%":y,"%Object.getPrototypeOf%":w,"%Math.abs%":f,"%Math.floor%":p,"%Math.max%":h,"%Math.min%":_,"%Math.pow%":l,"%Math.round%":s,"%Math.sign%":g,"%Reflect.getPrototypeOf%":R};if(F)try{null.error}catch(se){var q=F(F(se));j["%Error.prototype%"]=q}var D=function se(Z){var ie;if(Z==="%AsyncFunction%")ie=c("async function () {}");else if(Z==="%GeneratorFunction%")ie=c("function* () {}");else if(Z==="%AsyncGeneratorFunction%")ie=c("async function* () {}");else if(Z==="%AsyncGenerator%"){var re=se("%AsyncGeneratorFunction%");re&&(ie=re.prototype)}else if(Z==="%AsyncIteratorPrototype%"){var me=se("%AsyncGenerator%");me&&F&&(ie=F(me.prototype))}return j[Z]=ie,ie},C={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},T=Zt(),W=ed(),$=T.call(I,Array.prototype.concat),U=T.call(x,Array.prototype.splice),k=T.call(I,String.prototype.replace),B=T.call(I,String.prototype.slice),X=T.call(I,RegExp.prototype.exec),z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,V=/\\(\\)?/g,Y=function(Z){var ie=B(Z,0,1),re=B(Z,-1);if(ie==="%"&&re!=="%")throw new o("invalid intrinsic syntax, expected closing `%`");if(re==="%"&&ie!=="%")throw new o("invalid intrinsic syntax, expected opening `%`");var me=[];return k(Z,z,function(_e,xe,Re,ye){me[me.length]=Re?k(ye,V,"$1"):xe||_e}),me},te=function(Z,ie){var re=Z,me;if(W(C,re)&&(me=C[re],re="%"+me[0]+"%"),W(j,re)){var _e=j[re];if(_e===A&&(_e=D(re)),typeof _e>"u"&&!ie)throw new u("intrinsic "+Z+" exists, but is not available. Please file an issue!");return{alias:me,name:re,value:_e}}throw new o("intrinsic "+Z+" does not exist!")};return An=function(Z,ie){if(typeof Z!="string"||Z.length===0)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ie!="boolean")throw new u('"allowMissing" argument must be a boolean');if(X(/^%?[^%]*%?$/,Z)===null)throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var re=Y(Z),me=re.length>0?re[0]:"",_e=te("%"+me+"%",ie),xe=_e.name,Re=_e.value,ye=!1,Le=_e.alias;Le&&(me=Le[0],U(re,$([0,1],Le)));for(var lt=1,Je=!0;lt<re.length;lt+=1){var Ue=re[lt],ft=B(Ue,0,1),dt=B(Ue,-1);if((ft==='"'||ft==="'"||ft==="`"||dt==='"'||dt==="'"||dt==="`")&&ft!==dt)throw new o("property names with quotes must have matching quotes");if((Ue==="constructor"||!Je)&&(ye=!0),me+="."+Ue,xe="%"+me+"%",W(j,xe))Re=j[xe];else if(Re!=null){if(!(Ue in Re)){if(!ie)throw new u("base intrinsic for "+Z+" exists, but the property is not available.");return}if(v&<+1>=re.length){var ht=v(Re,Ue);Je=!!ht,Je&&"get"in ht&&!("originalValue"in ht.get)?Re=ht.get:Re=Re[Ue]}else Je=W(Re,Ue),Re=Re[Ue];Je&&!ye&&(j[xe]=Re)}}return Re},An}var Tn,Rs;function Mo(){if(Rs)return Tn;Rs=1;var e=yi(),t=No(),n=t([e("%String.prototype.indexOf%")]);return Tn=function(a,i){var o=e(a,!!i);return typeof o=="function"&&n(a,".prototype.")>-1?t([o]):o},Tn}var On,bs;function Uo(){if(bs)return On;bs=1;var e=yi(),t=Mo(),n=Xt(),r=wt(),a=e("%Map%",!0),i=t("Map.prototype.get",!0),o=t("Map.prototype.set",!0),u=t("Map.prototype.has",!0),d=t("Map.prototype.delete",!0),f=t("Map.prototype.size",!0);return On=!!a&&function(){var h,_={assert:function(l){if(!_.has(l))throw new r("Side channel does not contain "+n(l))},delete:function(l){if(h){var s=d(h,l);return f(h)===0&&(h=void 0),s}return!1},get:function(l){if(h)return i(h,l)},has:function(l){return h?u(h,l):!1},set:function(l,s){h||(h=new a),o(h,l,s)}};return _},On}var jn,_s;function td(){if(_s)return jn;_s=1;var e=yi(),t=Mo(),n=Xt(),r=Uo(),a=wt(),i=e("%WeakMap%",!0),o=t("WeakMap.prototype.get",!0),u=t("WeakMap.prototype.set",!0),d=t("WeakMap.prototype.has",!0),f=t("WeakMap.prototype.delete",!0);return jn=i?function(){var h,_,l={assert:function(s){if(!l.has(s))throw new a("Side channel does not contain "+n(s))},delete:function(s){if(i&&s&&(typeof s=="object"||typeof s=="function")){if(h)return f(h,s)}else if(r&&_)return _.delete(s);return!1},get:function(s){return i&&s&&(typeof s=="object"||typeof s=="function")&&h?o(h,s):_&&_.get(s)},has:function(s){return i&&s&&(typeof s=="object"||typeof s=="function")&&h?d(h,s):!!_&&_.has(s)},set:function(s,g){i&&s&&(typeof s=="object"||typeof s=="function")?(h||(h=new i),u(h,s,g)):r&&(_||(_=r()),_.set(s,g))}};return l}:r,jn}var Cn,ws;function Do(){if(ws)return Cn;ws=1;var e=wt(),t=Xt(),n=Of(),r=Uo(),a=td(),i=a||r||n;return Cn=function(){var u,d={assert:function(f){if(!d.has(f)){var p=f&&Object(f)===f?"the given object key":t(f);throw new e("Side channel does not contain "+p)}},delete:function(f){return!!u&&u.delete(f)},get:function(f){return u&&u.get(f)},has:function(f){return!!u&&u.has(f)},set:function(f,p){u||(u=i()),u.set(f,p)}};return d},Cn}var $n,Ps;function Si(){if(Ps)return $n;Ps=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return $n={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},$n}var Ln,Fs;function qo(){if(Fs)return Ln;Fs=1;var e=Si(),t=Do(),n=$o(),r=Object.prototype.hasOwnProperty,a=Array.isArray,i=t(),o=function(R,x){return i.set(R,x),R},u=function(R){return i.has(R)},d=function(R){return i.get(R)},f=function(R,x){i.set(R,x)},p=(function(){for(var w=[],R=0;R<256;++R)w[w.length]="%"+((R<16?"0":"")+R.toString(16)).toUpperCase();return w})(),h=function(R){for(;R.length>1;){var x=R.pop(),I=x.obj[x.prop];if(a(I)){for(var A=[],M=0;M<I.length;++M)typeof I[M]<"u"&&(A[A.length]=I[M]);x.obj[x.prop]=A}}},_=function(R,x){for(var I=x&&x.plainObjects?{__proto__:null}:{},A=0;A<R.length;++A)typeof R[A]<"u"&&(I[A]=R[A]);return I},l=function(R,x,I){x==="__proto__"&&n?n(R,x,{configurable:!0,enumerable:!0,value:
20I,writable:!0}):R[x]=I},s=function w(R,x,I){if(!x)return R;if(typeof x!="object"&&typeof x!="function"){if(a(R)){var A=R.length;if(I&&typeof I.arrayLimit=="number"&&A>=I.arrayLimit){if(I.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+I.arrayLimit+" element"+(I.arrayLimit===1?"":"s")+" allowed in an array.");return o(_(R.concat(x),I),A)}R[A]=x}else if(R&&typeof R=="object")if(u(R)){var M=d(R)+1;R[M]=x,f(R,M)}else{if(I&&I.strictMerge)return[R,x];(I&&(I.plainObjects||I.allowPrototypes)||!r.call(Object.prototype,x))&&(R[x]=!0)}else return[R,x];return R}if(!R||typeof R!="object"){if(u(x)){for(var j=Object.keys(x),q=I&&I.plainObjects?{__proto__:null,0:R}:{0:R},D=0;D<j.length;D++){var C=parseInt(j[D],10);q[C+1]=x[j[D]]}return o(q,d(x)+1)}var T=[R].concat(x);if(I&&typeof I.arrayLimit=="number"&&T.length>I.arrayLimit){if(I.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+I.arrayLimit+" element"+(I.arrayLimit===1?"":"s")+" allowed in an array.");return o(_(T,I),T.length-1)}return T}var W=R;if(a(R)&&!a(x)&&(W=_(R,I)),a(R)&&a(x)){if(x.forEach(function($,U){if(r.call(R,U)){var k=R[U];k&&typeof k=="object"&&$&&typeof $=="object"?R[U]=w(k,$,I):R[R.length]=$}else R[U]=$}),I&&typeof I.arrayLimit=="number"&&R.length>I.arrayLimit){if(I.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+I.arrayLimit+" element"+(I.arrayLimit===1?"":"s")+" allowed in an array.");return o(_(R,I),R.length-1)}return R}return Object.keys(x).reduce(function($,U){var k=x[U];if(r.call($,U)?l($,U,w($[U],k,I)):l($,U,k),u(x)&&!u($)&&o($,d(x)),u($)){var B=parseInt(U,10);String(B)===U&&B>=0&&B>d($)&&f($,B)}return $},W)},g=function(R,x){return Object.keys(x).reduce(function(I,A){return l(I,A,x[A]),I},R)},m=function(w,R,x){var I=w.replace(/\+/g," ");if(x==="iso-8859-1")return I.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(I)}catch{return I}},c=1024,v=function(R,x,I,A,M){if(R.length===0)return R;var j=R;if(typeof R=="symbol"?j=Symbol.prototype.toString.call(R):typeof R!="string"&&(j=String(R)),I==="iso-8859-1")return escape(j).replace(/%u[0-9a-f]{4}/gi,function(k){return"%26%23"+parseInt(k.slice(2),16)+"%3B"});for(var q="",D=0;D<j.length;D+=c){var C=j.length>=c?j.slice(D,D+c):j;if(D+c<j.length){var T=C.charCodeAt(C.length-1);T>=55296&&T<=56319&&(C=C.slice(0,-1),D-=1)}for(var W=[],$=0;$<C.length;++$){var U=C.charCodeAt($);if(U===45||U===46||U===95||U===126||U>=48&&U<=57||U>=65&&U<=90||U>=97&&U<=122||M===e.RFC1738&&(U===40||U===41)){W[W.length]=C.charAt($);continue}if(U<128){W[W.length]=p[U];continue}if(U<2048){W[W.length]=p[192|U>>6]+p[128|U&63];continue}if(U<55296||U>=57344){W[W.length]=p[224|U>>12]+p[128|U>>6&63]+p[128|U&63];continue}$+=1,U=65536+((U&1023)<<10|C.charCodeAt($)&1023),W[W.length]=p[240|U>>18]+p[128|U>>12&63]+p[128|U>>6&63]+p[128|U&63]}q+=W.join("")}return q},y=function(R){for(var x=[{obj:{o:R},prop:"o"}],I=t(),A=0;A<x.length;++A)for(var M=x[A],j=M.obj[M.prop],q=Object.keys(j),D=0;D<q.length;++D){var C=q[D],T=j[C];typeof T=="object"&&T!==null&&!I.has(T)&&(x[x.length]={obj:j,prop:C},I.set(T,!0))}return h(x),R},b=function(R){return Object.prototype.toString.call(R)==="[object RegExp]"},S=function(R){return!R||typeof R!="object"?!1:!!(R.constructor&&typeof R.constructor.isBuffer=="function"&&R.constructor.isBuffer(R))},P=function(R,x,I,A,M){if(u(R)){if(M)throw new RangeError("Array limit exceeded. Only "+I+" element"+(I===1?"":"s")+" allowed in an array.");for(var j=a(x)?x:[x],q=d(R),D=0;D<j.length;++D)q+=1,R[q]=j[D];return f(R,q),R}var C=[].concat(R,x);if(C.length>I){if(M)throw new RangeError("Array limit exceeded. Only "+I+" element"+(I===1?"":"s")+" allowed in an array.");return o(_(C,{plainObjects:A}),C.length-1)}return C},F=function(R,x){if(a(R)){for(var I=[],A=0;A<R.length;A+=1)I[I.length]=x(R[A]);return I}return x(R)};return Ln={arrayToObject:_,assign:g,combine:P,compact:y,decode:m,encode:v,isBuffer:S,isOverflow:u,isRegExp:b,markOverflow:o,maybeMap:F,merge:s},Ln}var Wn,xs;function rd(){if(xs)return Wn;xs=1;var e=Do(),t=qo(),n=Si(),r=Object.prototype.hasOwnProperty,a={brackets:function(m){return m+"[]"},comma:"comma",indices:function(m,c){return m+"["+c+"]"},repeat:function(m){return m}},i=Array.isArray,o=Array.prototype.push,u=function(g,m){o.apply(g,i(m)?m:[m])},d=Date.prototype.toISOString,f=n.default,p={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset
vendor: 9,371 bytes, line 20
20:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",depth:1/0,encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:f,formatter:n.formatters[f],indices:!1,serializeDate:function(m){return d.call(m)},skipNulls:!1,strictNullHandling:!1},h=function(m){return typeof m=="string"||typeof m=="number"||typeof m=="boolean"||typeof m=="symbol"||typeof m=="bigint"},_={},l=function g(m,c,v,y,b,S,P,F,w,R,x,I,A,M,j,q,D,C,T,W){var $=m;if(W>T)throw new RangeError("Input depth exceeded depth option of "+T);for(var U=C,k=0,B=!1;(U=U.get(_))!==void 0&&!B;){var X=U.get(m);if(k+=1,typeof X<"u"){if(X===k)throw new RangeError("Cyclic object value");B=!0}typeof U.get(_)>"u"&&(k=0)}if($=typeof R=="function"?R(c,$):$,$ instanceof Date?$=A($):v==="comma"&&i($)&&($=t.maybeMap($,function(ye){return ye instanceof Date?A(ye):ye})),$===null){if(S)return j(w&&!q?w(c,p.encoder,D,"key",M):c);$=""}if(h($)||t.isBuffer($)){if(w){var z=q?c:w(c,p.encoder,D,"key",M);return[j(z)+"="+j(w($,p.encoder,D,"value",M))]}return[j(c)+"="+j(String($))]}var V=[];if(typeof $>"u")return V;var Y;if(v==="comma"&&i($))q&&w&&($=t.maybeMap($,function(ye){return ye==null?ye:w(ye)})),Y=[{value:$.length>0?$.join(",")||null:void 0}];else if(i(R))Y=R;else{var te=Object.keys($);Y=x?te.sort(x):te}var se=F?String(c).replace(/\./g,"%2E"):String(c),Z=y&&i($)&&$.length===1?se+"[]":se;if(b&&i($)&&$.length===0&&Object.keys($).length===0)return Z+"[]";for(var ie=0;ie<Y.length;++ie){var re=Y[ie],me=typeof re=="object"&&re&&typeof re.value<"u"?re.value:$[re];if(!(P&&me===null)){var _e=I&&F?String(re).replace(/\./g,"%2E"):String(re),xe=i($)?typeof v=="function"?v(Z,_e):Z:Z+(I?"."+_e:"["+_e+"]");C.set(m,k);var Re=e();Re.set(_,C),u(V,g(me,xe,v,y,b,S,P,F,v==="comma"&&q&&i($)?null:w,R,x,I,A,M,j,q,D,Re,T,W+1))}}return V},s=function(m){if(!m)return p;if(typeof m.allowEmptyArrays<"u"&&typeof m.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof m.encodeDotInKeys<"u"&&typeof m.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(m.encoder!==null&&typeof m.encoder<"u"&&typeof m.encoder!="function")throw new TypeError("Encoder has to be a function.");var c=m.charset||p.charset;if(typeof m.charset<"u"&&m.charset!=="utf-8"&&m.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var v=n.default;if(typeof m.format<"u"){if(!r.call(n.formatters,m.format))throw new TypeError("Unknown format option provided.");v=m.format}var y=n.formatters[v],b=p.filter;(typeof m.filter=="function"||i(m.filter))&&(b=m.filter);var S;if(m.arrayFormat in a?S=m.arrayFormat:"indices"in m?S=m.indices?"indices":"repeat":S=p.arrayFormat,"commaRoundTrip"in m&&typeof m.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var P=typeof m.allowDots>"u"?m.encodeDotInKeys===!0?!0:p.allowDots:!!m.allowDots;return{addQueryPrefix:typeof m.addQueryPrefix=="boolean"?m.addQueryPrefix:p.addQueryPrefix,allowDots:P,allowEmptyArrays:typeof m.allowEmptyArrays=="boolean"?!!m.allowEmptyArrays:p.allowEmptyArrays,arrayFormat:S,charset:c,charsetSentinel:typeof m.charsetSentinel=="boolean"?m.charsetSentinel:p.charsetSentinel,commaRoundTrip:!!m.commaRoundTrip,delimiter:typeof m.delimiter>"u"?p.delimiter:m.delimiter,depth:typeof m.depth=="number"?m.depth:p.depth,encode:typeof m.encode=="boolean"?m.encode:p.encode,encodeDotInKeys:typeof m.encodeDotInKeys=="boolean"?m.encodeDotInKeys:p.encodeDotInKeys,encoder:typeof m.encoder=="function"?m.encoder:p.encoder,encodeValuesOnly:typeof m.encodeValuesOnly=="boolean"?m.encodeValuesOnly:p.encodeValuesOnly,filter:b,format:v,formatter:y,serializeDate:typeof m.serializeDate=="function"?m.serializeDate:p.serializeDate,skipNulls:typeof m.skipNulls=="boolean"?m.skipNulls:p.skipNulls,sort:typeof m.sort=="function"?m.sort:null,strictNullHandling:typeof m.strictNullHandling=="boolean"?m.strictNullHandling:p.strictNullHandling}};return Wn=function(g,m){var c=g,v=s(m),y,b;typeof v.filter=="function"?(b=v.filter,c=b("",c)):i(v.filter)&&(b=v.filter,y=b);var S=[];if(typeof c!="object"||c===null)return"";var P=a[v.arrayFormat],F=P==="comma"&&v.commaRoundTrip;y||(y=Object.keys(c)),v.sort&&y.sort(v.sort);for(var w=e(),R=0;R<y.length;++R){var x=y[R];if(!(typeof x>"u"||x===null)){var I=c[x];if(!(v.skipNulls&&I===null)){var A=v.encodeDotInKeys?String(x).replace(/\./g,"%2E"):String(x);u(S,l(I,A,P,F,v.allowEmptyArrays,v.strictNullHandling,v.skipNulls,v.encodeDotInKeys,v.encode?v.encoder:null,v.filter,v.sort,v.allowDots,v.serializeDate,v.format,v.formatter,v.encodeValuesOnly,v.charset,w,v.depth,0))}}}var M=S.join(v.delimiter),j=v.addQueryPrefix===!0?"?":"";return v.charsetSentinel&&(v.charset==="iso-8859-1"?j+="utf8=%26%2310003%3B"+v.delimiter:j+="utf8=%E2%9C%93"+v.delimiter),M.length>0?j+M:""},Wn}var Hn,Is;function nd(){if(Is)return Hn;Is=1;var e=qo(),t=Object.prototype.hasOwnProperty,n=Array.isArray,r={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:e.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},a=function(l){return l.replace(/&#(\d+);/g,function(s,g){return String.fromCharCode(parseInt(g,10))})},i=function(l,s,g){if(l&&typeof l=="string"&&s.comma&&l.indexOf(",")>-1){if(s.throwOnLimitExceeded)for(var m=0,c=l.indexOf(",");c>-1;){if(m+=1,m>=s.arrayLimit)throw new RangeError("Array limit exceeded. Only "+s.arrayLimit+" element"+(s.arrayLimit===1?"":"s")+" allowed in an array.");c=l.indexOf(",",c+1)}return l.split(",")}if(s.throwOnLimitExceeded&&g>=s.arrayLimit)throw new RangeError("Array limit exceeded. Only "+s.arrayLimit+" element"+(s.arrayLimit===1?"":"s")+" allowed in an array.");return l},o="utf8=%26%2310003%3B",u="utf8=%E2%9C%93",d=function(s,g){var m={__proto__:null},c=g.ignoreQueryPrefix?s.replace(/^\?/,""):s;c=c.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var v=g.parameterLimit===1/0?void 0:g.parameterLimit,y=c.split(g.delimiter,g.throwOnLimitExceeded&&typeof v<"u"?v+1:v);if(g.throwOnLimitExceeded&&typeof v<"u"&&y.length>v)throw new RangeError("Parameter limit exceeded. Only "+v+" parameter"+(v===1?"":"s")+" allowed.");var b=-1,S,P=g.charset;if(g.charsetSentinel)for(S=0;S<y.length;++S)y[S].indexOf("utf8=")===0&&(y[S]===u?P="utf-8":y[S]===o&&(P="iso-8859-1"),b=S,S=y.length);for(S=0;S<y.length;++S)if(S!==b){var F=y[S],w=F.indexOf("]="),R=w===-1?F.indexOf("="):w+1,x,I;if(R===-1?(x=g.decoder(F,r.decoder,P,"key"),I=g.strictNullHandling?null:""):(x=g.decoder(F.slice(0,R),r.decoder,P,"key"),x!==null&&(I=e.maybeMap(i(F.slice(R+1),g,n(m[x])?m[x].length:0),function(M){return g.decoder(M,r.decoder,P,"value")}))),I&&g.interpretNumericEntities&&P==="iso-8859-1"&&(I=a(String(I))),F.indexOf("[]=")>-1&&(I=n(I)?[I]:I),g.comma&&n(I)&&I.length>g.arrayLimit&&(I=e.combine([],I,g.arrayLimit,g.plainObjects,g.throwOnLimitExceeded)),x!==null){var A=t.call(m,x);A&&(g.duplicates==="combine"||F.indexOf("[]=")>-1)?m[x]=e.combine(m[x],I,g.arrayLimit,g.plainObjects,g.throwOnLimitExceeded):(!A||g.duplicates==="last")&&(m[x]=I)}}return m},f=function(l,s,g,m){var c=0;if(l.length>0&&l[l.length-1]==="[]"){var v=l.slice(0,-1).join("");c=Array.isArray(s)&&s[v]?s[v].length:0}for(var y=m?s:i(s,g,c),b=l.length-1;b>=0;--b){var S,P=l[b];if(P==="[]"&&g.parseArrays)e.isOverflow(y)?S=y:S=g.allowEmptyArrays&&(y===""||g.strictNullHandling&&y===null)?[]:e.combine([],y,g.arrayLimit,g.plainObjects,g.throwOnLimitExceeded);else{S=g.plainObjects?{__proto__:null}:{};var F=P.charAt(0)==="["&&P.charAt(P.length-1)==="]"?P.slice(1,-1):P,w=g.decodeDotInKeys?F.replace(/%2E/g,"."):F,R=parseInt(w,10),x=!isNaN(R)&&P!==w&&String(R)===w&&R>=0&&g.parseArrays;if(!g.parseArrays&&w==="")S={0:y};else if(x&&R<g.arrayLimit)S=[],S[R]=y;else{if(x&&g.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+g.arrayLimit+" element"+(g.arrayLimit===1?"":"s")+" allowed in an array.");x?(S[R]=y,e.markOverflow(S,R)):w!=="__proto__"&&(S[w]=y)}}y=S}return y},p=function(s,g){var m=g.allowDots?s.replace(/\.([^.[]+)/g,"[$1]"):s;if(g.depth<=0)return!g.plainObjects&&t.call(Object.prototype,m)&&!g.allowPrototypes?void 0:[m];var c=[],v=m.indexOf("["),y=v>=0?m.slice(0,v):m;if(y){if(!g.plainObjects&&t.call(Object.prototype,y)&&!g.allowPrototypes)return;c[c.length]=y}for(var b=m.length,S=v,P=0;S>=0&&P<g.depth;){for(var F=1,w=S+1,R=-1;w<b&&R<0;){var x=m.charCodeAt(w);x===91?F+=1:x===93&&(F-=1,F===0&&(R=w)),w+=1}if(R<0)return c[c.length]="["+m.slice(S)+"]",c;var I=m.slice(S,R+1),A=I.slice(1,-1);if(!g.plainObjects&&t.call(Object.prototype,A)&&!g.allowPrototypes)return;c[c.length]=I,P+=1,S=m.indexOf("[",R+1)}if(S>=0){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");c[c.length]="["+m.slice(S)+"]"}return c},h=function(s,g,m,c){if(s){var v=p(s,m);if(v)return f(v,g,m,c)}},_=function(s){if(!s)return r;if(typeof s.allowEmptyArrays<"u"&&typeof s.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
20if(typeof s.decodeDotInKeys<"u"&&typeof s.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(s.decoder!==null&&typeof s.decoder<"u"&&typeof s.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof s.charset<"u"&&s.charset!=="utf-8"&&s.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof s.throwOnLimitExceeded<"u"&&typeof s.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var g=typeof s.charset>"u"?r.charset:s.charset,m=typeof s.duplicates>"u"?r.duplicates:s.duplicates;if(m!=="combine"&&m!=="first"&&m!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var c=typeof s.allowDots>"u"?s.decodeDotInKeys===!0?!0:r.allowDots:!!s.allowDots;return{allowDots:c,allowEmptyArrays:typeof s.allowEmptyArrays=="boolean"?!!s.allowEmptyArrays:r.allowEmptyArrays,allowPrototypes:typeof s.allowPrototypes=="boolean"?s.allowPrototypes:r.allowPrototypes,allowSparse:typeof s.allowSparse=="boolean"?s.allowSparse:r.allowSparse,arrayLimit:typeof s.arrayLimit=="number"?s.arrayLimit:r.arrayLimit,charset:g,charsetSentinel:typeof s.charsetSentinel=="boolean"?s.charsetSentinel:r.charsetSentinel,comma:typeof s.comma=="boolean"?s.comma:r.comma,decodeDotInKeys:typeof s.decodeDotInKeys=="boolean"?s.decodeDotInKeys:r.decodeDotInKeys,decoder:typeof s.decoder=="function"?s.decoder:r.decoder,delimiter:typeof s.delimiter=="string"||e.isRegExp(s.delimiter)?s.delimiter:r.delimiter,depth:typeof s.depth=="number"||s.depth===!1?+s.depth:r.depth,duplicates:m,ignoreQueryPrefix:s.ignoreQueryPrefix===!0,interpretNumericEntities:typeof s.interpretNumericEntities=="boolean"?s.interpretNumericEntities:r.interpretNumericEntities,parameterLimit:typeof s.parameterLimit=="number"?s.parameterLimit:r.parameterLimit,parseArrays:s.parseArrays!==!1,plainObjects:typeof s.plainObjects=="boolean"?s.plainObjects:r.plainObjects,strictDepth:typeof s.strictDepth=="boolean"?!!s.strictDepth:r.strictDepth,strictMerge:typeof s.strictMerge=="boolean"?!!s.strictMerge:r.strictMerge,strictNullHandling:typeof s.strictNullHandling=="boolean"?s.strictNullHandling:r.strictNullHandling,throwOnLimitExceeded:typeof s.throwOnLimitExceeded=="boolean"?s.throwOnLimitExceeded:!1}};return Hn=function(l,s){var g=_(s);if(l===""||l===null||typeof l>"u")return g.plainObjects?{__proto__:null}:{};for(var m=typeof l=="string"?d(l,g):l,c=g.plainObjects?{__proto__:null}:{},v=Object.keys(m),y=0;y<v.length;++y){var b=v[y],S=h(b,m[b],g,typeof l=="string");c=e.merge(c,S,g)}return g.allowSparse===!0?c:e.compact(c)},Hn}var Nn,Es;function id(){if(Es)return Nn;Es=1;var e=rd(),t=nd(),n=Si();return Nn={formats:n,parse:t,stringify:e},Nn}var ad=id();const As=Jn(ad);var Ts=function(t){t&&(window.document.title=t)},sd=(function(){function e(t){var n=this,r=t.windowTitle,a=t.writeDelay,i=a===void 0?400:a,o=t.createURL,u=t.parseURL,d=t.getLocation,f=t.start,p=t.dispose,h=t.push,_=t.cleanUrlOnDispose;fi(this,e),N(this,"$$type","ais.browser"),N(this,"windowTitle",void 0),N(this,"writeDelay",void 0),N(this,"_createURL",void 0),N(this,"parseURL",void 0),N(this,"getLocation",void 0),N(this,"writeTimer",void 0),N(this,"_onPopState",void 0),N(this,"inPopState",!1),N(this,"isDisposed",!1),N(this,"latestAcknowledgedHistory",0),N(this,"_start",void 0),N(this,"_dispose",void 0),N(this,"_push",void 0),N(this,"_cleanUrlOnDispose",void 0),this.windowTitle=r,this.writeTimer=void 0,this.writeDelay=i,this._createURL=o,this.parseURL=u,this.getLocation=d,this._start=f,this._dispose=p,this._push=h,this._cleanUrlOnDispose=typeof _>"u"?!0:_,qe(function(l){var s=l.window,g=n.windowTitle&&n.windowTitle(n.read());Ts(g),n.latestAcknowledgedHistory=s.history.length})}return di(e,[{key:"read",value:function(){return this.parseURL({qsModule:As,location:this.getLocation()})}},{key:"write",value:function(n){var r=this;qe(function(a){var i=a.window,o=r.createURL(n),u=r.windowTitle&&r.windowTitle(n);r.writeTimer&&clearTimeout(r.writeTimer),r.writeTimer=setTimeout(function(){Ts(u),r.shouldWrite(o)&&(r._push?r._push(o):i.history.pushState(n,u||"",o),r.latestAcknowledgedHistory=i.history.length),r.inPopState=!1,r.writeTimer=void 0},r.writeDelay)})}}
20,{key:"onUpdate",value:function(n){var r=this;this._start&&this._start(function(){n(r.read())}),this._onPopState=function(){r.writeTimer&&(clearTimeout(r.writeTimer),r.writeTimer=void 0),r.inPopState=!0,n(r.read())},qe(function(a){var i=a.window;i.addEventListener("popstate",r._onPopState)})}},{key:"createURL",value:function(n){var r=this._createURL({qsModule:As,routeState:n,location:this.getLocation()});return r}},{key:"dispose",value:function(){var n=this;this._dispose&&this._dispose(),this.isDisposed=!0,qe(function(r){var a=r.window;n._onPopState&&a.removeEventListener("popstate",n._onPopState)}),this.writeTimer&&clearTimeout(this.writeTimer),this._cleanUrlOnDispose&&this.write({})}},{key:"start",value:function(){this.isDisposed=!1}},{key:"shouldWrite",value:function(n){var r=this;return qe(function(a){var i=a.window;if(r.isDisposed&&!r._cleanUrlOnDispose)return!1;var o=!(r.isDisposed&&r.latestAcknowledgedHistory!==i.history.length);return!r.inPopState&&o&&n!==i.location.href})}}]),e})();function od(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.createURL,n=t===void 0?function(s){var g=s.qsModule,m=s.routeState,c=s.location,v=c.protocol,y=c.hostname,b=c.port,S=b===void 0?"":b,P=c.pathname,F=c.hash,w=g.stringify(m),R=S===""?"":":".concat(S);return w?"".concat(v,"//").concat(y).concat(R).concat(P,"?").concat(w).c
20oncat(F):"".concat(v,"//").concat(y).concat(R).concat(P).concat(F)}:t,r=e.parseURL,a=r===void 0?function(s){var g=s.qsModule,m=s.location;return g.parse(m.search.slice(1),{arrayLimit:99})}:r,i=e.writeDelay,o=i===void 0?400:i,u=e.windowTitle,d=e.getLocation,f=d===void 0?function(){return qe(function(s){var g=s.window;return g.location},{fallback:function(){throw new Error("You need to provide `getLocation` to the `history` router in environments where `window` does not exist.")}})}:d,p=e.start,h=e.dispose,_=e.push,l=e.cleanUrlOnDispose;return new sd({createURL:n,parseURL:a,writeDelay:o,windowTitle:u,getLocation:f,start:p,dispose:h,push:_,cleanUrlOnDispose:l})}function Os(e){e.configure;var t=we(e,["configure"]);return t}function ud(){return{$$type:"ais.simple",stateToRoute:function(t){return Object.keys(t).reduce(function(n,r){return O(E({},n),N({},r,Os(t[r])))},{})},routeToState:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(t).reduce(function(n,r){var a=t[r];return(typeof a>"u"?"undefined":Be(a))!=="object"||a===null?n:O(E({},n),N({},r,Os(a)))},{})}}}var cd=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.router,r=n===void 0?od():n,a=t.stateMapping,i=a===void 0?ud():a,o=t.$$internal,u=o===void 0?!1:o;return function(d){var f=d.instantSearchInstance;function p(l){var s=f.mainIndex.getWidgets().length===0?f._initialUiState:f.mainIndex.getWidgetUiState({}),g=Object.keys(l).reduce(function(c,v){return O(E({},c),N({},v,l[v]))},s),m=i.stateToRoute(g);return r.createURL(m)}f._createURL=p;var h=void 0,_=f._initialUiState;return{$$type:"ais.router({router:".concat(r.$$type||"__unknown__",", stateMapping:").concat(i.$$type||"__unknown__","})"),$$internal:u,onStateChange:function(s){var g=s.uiState,m=i.stateToRoute(g);(h===void 0||!mi(h,m))&&(r.write(m),h=m)},subscribe:function(){f._initialUiState=E({},_,i.routeToState(r.read())),r.onUpdate(function(s){f.mainIndex.getWidgets().length>0&&f.setUiState(i.routeToState(s))})},started:function(){var s;(s=r.start)===null||s===void 0||s.call(r)},unsubscribe:function(){r.dispose()}}}};function ld(e,t){var n=t.userToken,r=t.clickAnalytics;if(n===void 0&&r===void 0)return e;var a=E({},r===void 0?{}:{clickAnalytics:r},n===void 0?{}:{userToken:n});return new ee.RecommendParameters({params:e.params.map(function(i){var o=i.queryParameters,u=i.fallbackParameters;return E(O(E({},i),{queryParameters:E({},a,o)}),u&&{fallbackParameters:E({},a,u)})})})}var fd=0;function js(e){e.dependsOn==="recommend"&&(e.$$id=fd++)}function dd(e){var t=e.name,n=e.connector,r=n===void 0?!1:n;return["https://www.algolia.com/doc/api-reference/widgets/",t,"/js/",r?"#connector":""].join("")}function ko(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.map(function(a){return dd(a)}).join(", ");return function(a){return[a,"See documentation: ".concat(r)].filter(Boolean).join(` 21 22`)}}function hd(e,t){if(!Array.isArray(e))return-1;for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function gd(e){return e.filter(function(t,n,r){return r.indexOf(t)===n})}var md=function(t,n){n.facets,n.disjunctiveFacets,n.facetsRefinements,n.facetsExcludes,n.disjunctiveFacetsRefinements,n.numericRefinements,n.tagRefinements,n.hierarchicalFacets,n.hierarchicalFacetsRefinements,n.ruleContexts;var r=we(n,["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"]);return t.setQueryParameters(r)},vd=function(t,n){return n.facets.reduce(function(r,a){return r.addFacet(a)},t)},pd=function(t,n){return n.disjunctiveFacets.reduce(function(r,a){return r.addDisjunctiveFacet(a)},t)},yd=function(t,n){return t.setQueryParameters({hierarchicalFacets:n.hierarchicalFacets.reduce(function(r,a){var i=hd(r,function(u){return u.name===a.name});if(i===-1)return r.concat(a);var o=r.slice();return o.splice(i,1,a),o},t.hierarchicalFacets)})},Sd=function(t,n){return n.tagRefinements.reduce(function(r,a){return r.addTagRefinement(a)},t)},Rd=function(t,n){return t.setQueryParameters({facetsRefinements:E({},t.facetsRefinements,n.facetsRefinements)})},bd=function(t,n){return t.setQueryParameters({facetsExcludes:E({},t.facetsExcludes,n.facetsExcludes)})},_d=function(t,n){return t.setQueryParameters({disjunctiveFacetsRefinements:E({},t.disjunctiveFacetsRefinements,n.disjunctiveFacetsRefinements)})},wd=function(t,n){return t.setQueryParameters({numericRefinements:E({},t.numericRefinements,n.numericRefinements)})},Pd=function(t,n){return t.setQueryParameters({hierarchicalFacetsRefinements:E({},t.hierarchicalFacetsRefinements,n.hierarchicalFacetsRefinements)})},Fd=function(t,n){var r=gd([].concat(t.ruleContexts).concat(n.ruleContexts).filter(
22Boolean));return r.length>0?t.setQueryParameters({ruleContexts:r}):t},Cs=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.reduce(function(a,i){var o=Pd(a,i),u=yd(o,i),d=Sd(u,i),f=wd(d,i),p=_d(f,i),h=bd(p,i),_=Rd(h,i),l=pd(_,i),s=Fd(l,i),g=vd(s,i);return md(g,i)})};function $s(e){for(var t=e.getParent(),n=[e.getHelper().state];t!==null;)n=[t.getHelper().state].concat(n),t=t.getParent();return n}var at=ko({name:"index-widget"});function Gn(e,t){var n=t.state,r=t.recommendState,a=t.isPageReset,i=t._uiState;n!==e.state&&(e.state=n,e.emit("change",{state:e.state,results:e.lastResults,isPageReset:a,_uiState:i})),r!==e.recommendState&&(e.recommendState=r)}function pt(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return e.reduce(function(r,a){return Te(a)||!a.getWidgetUiState&&!a.getWidgetState?r:a.getWidgetUiState?a.getWidgetUiState(r,t):a.getWidgetState(r,t)},n)}function st(e,t){var n=t.initialSearchParameters,r=we(t,["initialSearchParameters"]);return e.reduce(function(a,i){return!i.getWidgetSearchParameters||Te(i)?a:i.dependsOn==="search"&&i.getWidgetParameters?i.getWidgetParameters(a,r):i.getWidgetSearchParameters(a,r)},n)}function Mn(e,t){var n=t.initialRecommendParameters,r=we(t,["initialRecommendParameters"]);return e.reduce(function(a,i){return!Te(i)&&i.dependsOn==="recommend"&&i.getWidgetParameters?i.getWidgetParameters(a,r):a},n)}function Bo(e){var t=e.filter(Te);t.length!==0&&t.forEach(function(n){var r=n.getHelper();Gn(r,{state:r.state.resetPage(),recommendState:r.recommendState,isPageReset:!0}),Bo(n.getWidgets())})}function Qo(e){var t=e.filter(Te);return t.reduce(function(n,r){var a;return(a=n).concat.apply(a,[{indexId:r.getIndexId(),results:r.getResults(),helper:r.getHelper()}].concat(ce(Qo(r.getWidgets()))))},[])}function Vo(e){return e.reduce(function(t,n){if(Te(n)){if(n._isolated)return t;var r=Vo(n.getWidgets());return{hasSearchWidget:t.hasSearchWidget||r.hasSearchWidget,hasRecommendWidget:t.hasRecommendWidget||r.hasRecommendWidget}}return n.dependsOn==="recommend"?O(E({},t),{hasRecommendWidget:!0}):n.dependsOn==="none"?t:O(E({},t),{hasSearchWidget:!0})},{hasSearchWidget:!1,hasRecommendWidget:!1})}function xd(e){var t=Vo(e.mainIndex.getWidgets()),n=t.hasSearchWidget,r=t.hasRecommendWidget;e._hasSearchWidget=n,e._hasRecommendWidget=r}var Id=function(t){var n;if(t===void 0||t.indexName===void 0&&!t.isolated&&!t.EXPERIMENTAL_isolated)throw new Error(at("The `indexName` option is required."));var r=t.indexName,a=r===void 0?"":r,i=t.indexId,o=i===void 0?a:i,u=t.isolated,d=u===void 0?(n=t.EXPERIMENTAL_isolated)!==null&&n!==void 0?n:!1:u,f=[],p={},h=null,_=null,l=null,s=null,g=null,m,c=function(){h&&xd(h)};return{$$type:"ais.index",$$widgetType:"ais.index",_isolated:d,getIndexName:function(){return a},getIndexId:function(){return o},getHelper:function(){return l},getResults:function(){return s?.lastResults?(s.lastResults._state=l.state,s.lastResults):null},getResultsForWidget:function(y){return y.dependsOn!=="recommend"||Te(y)||y.$$id===void 0?this.getResults():l?.lastRecommendResults?l.lastRecommendResults[y.$$id]:null},getPreviousState:function(){return g},getScopedResults:function(){var y=this.getParent(),b;return y?b=y.getWidgets():a.length===0?b=this.getWidgets():b=[this],Qo(b)},getParent:function(){return d?null:_},createURL:function(y){return typeof y=="function"?h._createURL(N({},o,y(p))):h._createURL(N({},o,pt(f,{searchParameters:y,helper:l})))},scheduleLocalSearch:yt(function(){d&&l?.search()}),getWidgets:function(){return f},addWidgets:function(y){var b=this;if(!Array.isArray(y))throw new Error(at("The `addWidgets` method expects an array of widgets."));var S=y.reduce(function(P,F){return P.concat(Array.isArray(F)?F:[F])},[]);if(S.some(function(P){return typeof P.init!="function"&&typeof P.render!="function"}))throw new Error(at("The widget definition expects a `render` and/or an `init` method."));return S.forEach(function(P){P.parent=b,Te(P)||js(P)}),f=f.concat(S),c(),h&&S.length&&(Gn(l,{state:st(f,{uiState:p,initialSearchParameters:l.state}),recommendState:Mn(f,{uiState:p,initialRecommendParameters:l.recommendState}),_uiState:p}
22),S.forEach(function(P){if(P.getRenderState){var F=P.getRenderState(h.renderState[b.getIndexId()]||{},Ze(h,b,h._initialUiState));kt({renderState:F,instantSearchInstance:h,parent:b})}}),S.forEach(function(P){P.init&&P.init(Ze(h,b,h._initialUiState))}),d?this.scheduleLocalSearch():h.scheduleSearch()),this},updateWidget:function(y,b){if(typeof y.dispose!="function")throw new Error(at("The widget definition expects a `dispose` method."));if(typeof b.init!="function"&&typeof b.render!="function")throw new Error(at("The widget definition expects a `render` and/or an `init` method."));var S=p;y.parent=void 0,b.parent=this,Te(b)||js(b);var P=f.slice(),F=P.indexOf(y);if(F===-1?P.push(b):P[F]=b,f=P,c(),!h)return this;var w=y.dispose({helper:l,state:l.state,recommendState:l.recommendState,parent:this}),R=$e(w,ee.RecommendParameters)?w:l.recommendState,x=w&&!$e(w,ee.RecommendParameters)?w:l.state,I=h.future.preserveSharedStateOnUnmount?new ee.SearchParameters({index:this.getIndexName()}):x;p=pt(f,{searchParameters:st(f,{uiState:S,initialSearchParameters:I}),helper:l});var A=st(f,{uiState:p,initialSearchParameters:I});if(Gn(l,{state:A,recommendState:Mn(f,{uiState:p,initialRecommendParameters:R}),_uiState:p}),b.getRenderState){var M=b.getRenderState(h.renderState[this.getIndexId()]||{},Ze(h,this,h._initialUiState));kt({renderState:M,instantSearchInstance:h,parent:this})}return b.init&&b.init(Ze(h,this,h._initialUiState)),d?this.scheduleLocalSearch():h.scheduleSearch(),this},removeWidgets:function(y){var b=this;if(!Array.isArray(y))throw new Error(at("The `removeWidgets` method expects an array of widgets."));var S=y.reduce(function(x,I){return x.concat(Array.isArray(I)?I:[I])},[]);if(S.some(function(x){return typeof x.dispose!="function"}))throw new Error(at("The widget definition expects a `dispose` method."));if(f=f.filter(function(x){return S.indexOf(x)===-1}),S.forEach(function(x){x.parent=void 0}),c(),h&&S.length){var P=S.reduce(function(x,I){var A=I.dispose({helper:l,state:x.cleanedSearchState,recommendState:x.cleanedRecommendState,parent:b});return $e(A,ee.RecommendParameters)?x.cleanedRecommendState=A:A&&(x.cleanedSearchState=A),x},{cleanedSearchState:l.state,cleanedRecommendState:l.recommendState}),F=P.cleanedSearchState,w=P.cleanedRecommendState,R=h.future.preserveSharedStateOnUnmount?st(f,{uiState:p,initialSearchParameters:new ee.SearchParameters({index:this.getIndexName()})}):st(f,{uiState:pt(f,{searchParameters:F,helper:l}),initialSearchParameters:F});p=pt(f,{searchParameters:R,helper:l}),l.setState(R),l.recommendState=w,f.length&&(d?this.scheduleLocalSearch():h.scheduleSearch())}return this},init:function(y){var b=this,S=y.instantSearchInstance,P=y.parent,F=y.uiState,w;if(l===null){h=S,_=P,p=F[o]||{};var R=S.mainHelper,x=st(f,{uiState:p,initialSearchParameters:new ee.SearchParameters({index:a})}),I=Mn(f,{uiState:p,initialRecommendParameters:new ee.RecommendParameters});l=ee(R.getClient(),x.index,x),l.recommendState=I,l.search=function(){return d?(S.status="loading",b.render({instantSearchInstance:S}),S.compositionID?l.searchWithComposition():l.searchOnlyWithDerivedHelpers()):S.onStateChange?(S.onStateChange({uiState:S.mainIndex.getWidgetUiState({}),setUiState:function(T){return S.setUiState(T,!1)}}),R):R.search()},l.searchWithoutTriggeringOnStateChange=function(){return R.search()},l.searchForFacetValues=function(C,T,W,$){var U=Cs.apply(void 0,[R.state].concat(ce($s(b)))).setQueryParameters($);return R.searchForFacetValues(C,T,W,U)};var A=a?l:ee({},"__empty_index__",{}),M=d?A:Ed(P,R);s=M.derive(function(){return Cs.apply(void 0,[R.state].concat(ce($s(b))))},function(){return ld(b.getHelper().recommendState,R.state)});var j=(w=S._initialResults)===null||w===void 0?void 0:w[this.getIndexId()];if(j?.results){var q=new ee.SearchResults(new ee.SearchParameters(j.state),j.results);s.lastResults=q,l.lastResults=q}if(j?.recommendResults){var D=new ee.RecommendResults(new ee.RecommendParameters({params:j.recommendResults.params}),j.recommendResults.results);s.lastRecommendResults=D,l.lastRecommendResults=D}l.on("change",function(C){var T=C.isPageReset;T&&Bo(f)}),s.on("search",function(){S.scheduleStalledRender()}),s.on("result",function(C){var T=C.results;S.scheduleRender(),l.lastResults=T,g=T?._state}),s.on("recommend:result",function(C){var T=C.recommend;S.scheduleRender(),l.lastRecommendResults=T.results}),f.forEach(function(C){if(C.getRenderState){var T=C.getRenderState(S.renderState[b.getIndexId()]||{},Ze(S,b,F));
22kt({renderState:T,instantSearchInstance:S,parent:b})}}),f.forEach(function(C){C.init&&C.init(Ze(S,b,F))}),l.on("change",function(C){var T=C.state,W=C._uiState;p=pt(f,{searchParameters:T,helper:l},W||{}),S.onStateChange||S.onInternalStateChange()}),j&&S.scheduleRender(),c()}},render:function(y){var b=this,S=y.instantSearchInstance;S.status!=="error"?m=void 0:S.error!==m&&!S.mainHelper.hasPendingRequests()&&g&&(m=S.error,l.setState(g));var P=this.getResults()||s?.lastRecommendResults||d&&!a?f:f.filter(function(F){return F.shouldRender});P=P.filter(function(F){return F.shouldRender?F.shouldRender({instantSearchInstance:S}):!0}),P.forEach(function(F){if(F.getRenderState){var w=F.getRenderState(S.renderState[b.getIndexId()]||{},$a(S,b,F));kt({renderState:w,instantSearchInstance:S,parent:b})}}),P.forEach(function(F){F.render&&F.render($a(S,b,F))})},dispose:function(){var y=this;f.forEach(function(b){b.dispose&&l&&b.dispose({helper:l,state:l.state,recommendState:l.recommendState,parent:y})}),h=null,_=null,l?.removeAllListeners(),l=null,s?.detach(),s=null},getWidgetUiState:function(y){return f.filter(Te).filter(function(b){return!b._isolated}).reduce(function(b,S){return S.getWidgetUiState(b)},O(E({},y),N({},o,E({},y[o],p))))},getWidgetState:function(y){return this.getWidgetUiState(y)},getWidgetSearchParameters:function(y,b){var S=b.uiState;return st(f,{uiState:S,initialSearchParameters:y})},shouldRender:function(){return!0},refreshUiState:function(){p=pt(f,{searchParameters:this.getHelper().state,helper:this.getHelper()},p)},setIndexUiState:function(y){var b=typeof y=="function"?y(p):y;h.setUiState(function(S){return O(E({},S),N({},o,b))})}}};function Ed(e,t){for(;e;){if(e._isolated)return e.getHelper();e=e.getParent()}return t}function Ad(e,t){return e.toLocaleString(t)}function Td(e){var t=e.numberLocale;return{formatNumber:function(r,a){return Ad(Number(a(r)),t)},highlight:function(r,a){try{var i=JSON.parse(r);return a(vo(O(E({},i),{hit:this})))}catch{throw new Error(` 23The highlight helper expects a JSON object of the format: 24{ "attribute": "name", "highlightedTagName": "mark" }`)}},reverseHighlight:function(r,a){try{var i=JSON.parse(r);return a(bo(O(E({},i),{hit:this})))}catch{throw new Error(` 25 The reverseHighlight helper expects a JSON object of the format: 26 { "attribute": "name", "highlightedTagName": "mark" }`)}},snippet:function(r,a){try{var i=JSON.parse(r);return a(_o(O(E({},i),{hit:this})))}catch{throw new Error(` 27The snippet helper expects a JSON object of the format: 28{ "attribute": "name", "highlightedTagName": "mark" }`)}},reverseSnippet:function(r,a){try{var i=JSON.parse(r);return a(wo(O(E({},i),{hit:this})))}catch{throw new Error(` 29 The reverseSnippet helper expects a JSON object of the format: 30 { "attribute": "name", "highlightedTagName": "mark" }`)}},insights:function(r,a){try{var i=JSON.parse(r),o=i.method,u=i.payload;return a(Po(o,E({objectIDs:[this.objectID]},u)))}catch{throw new Error(` 31The insights helper expects a JSON object of the format: 32{ "method": "method-name", "payload": { "eventName": "name of the event" } }`)}}}}function Kn(e,t){var n=e[t.getIndexId()]||{};t.getHelper().setState(t.getWidgetSearchParameters(t.getHelper().state,{uiState:n})),t.getWidgets().filter(Te).forEach(function(r){return Kn(e,r)})}function Od(e,t){var n=Object.keys(t).reduce(function(r,a){var i=t[a];return i.recommendResults?E({},r,i.recommendResults.results):r},{});e._recommendCache=n}function Un(e){var t;return!((t=e.compositionFeedsResults)===null||t===void 0)&&t.length?e.compositionFeedsResults:e.results||[]}function jd(e,t){if(t&&!((!("transporter"in e)||e._cacheHydrated)&&(!e._useCache||typeof e.addAlgoliaAgent!="function"))){var n=[Object.keys(t).reduce(function(o,u){var d=t[u],f=d.state,p=d.requestParams,h=Un(d),_=h&&f?h.map(function(l,s){return E({indexName:f.index||l.index},p?.[s]||l.params?{params:Dn(p?.[s]||Cd(l.params))}:{})}):[];return o.concat(_)},[])],r=Object.keys(t).reduce(function(o,u){var d=Un(t[u]);return d?o.concat(d):o},[]);if("transporter"in e&&!e._cacheHydrated){e._cacheHydrated=!0;var a=e.search.bind(e);e.search=function(o){for(var u=arguments.length,d=new Array(u>1?u-1:0),f=1;f<u;f++)d[f-1]=arguments[f];var p=Array.isArray(o)?o.map(function(h){return O(E({},h),{params:Dn(h.params)})}):Dn(o.requestBody.params);return e.transporter.responsesCache.get({method:"search",args:[p].concat(ce(d))},function(){return a.apply(void 0,[o].concat(ce(d)))})},e.transporter.responsesCache.set({method:"search",args:n},{results:r})}if(!("transporter"in e)){var i="/1/indexes/*/queries_body_".concat(JSON.stringify({requests:n}));e.cache=O(E({},e.cache),N({},i,JSON.stringify({results:Object.keys(t).map(function(o){return Un(t[o])})})))}}}function Cd(e){return e.split("&").reduce(function(t,n){var r=oe(n.split("="),2),a=r[0],i=r[1];
32return t[a]=i?decodeURIComponent(i):"",t},{})}function Dn(e){var t=function(a){return Object.prototype.toString.call(a)==="[object Object]"||Object.prototype.toString.call(a)==="[object Array]"},n=function(a){for(var i=arguments.length,o=new Array(i>1?i-1:0),u=1;u<i;u++)o[u-1]=arguments[u];var d=0;return a.replace(/%s/g,function(){return encodeURIComponent(o[d++])})};return Object.keys(e).map(function(r){return n("%s=%s",r,t(e[r])?JSON.stringify(e[r]):e[r])}).join("&")}var Ge=ko({name:"instantsearch"});function $d(){return"#"}var Ld={preserveSharedStateOnUnmount:!1,persistHierarchicalRootCount:!1},Wd=(function(e){Ml(t,e);function t(n){fi(this,t);var r;r=Nl(this,t),N(r,"client",void 0),N(r,"indexName",void 0),N(r,"compositionID",void 0),N(r,"insightsClient",void 0),N(r,"onStateChange",null),N(r,"future",void 0),N(r,"helper",void 0),N(r,"mainHelper",void 0),N(r,"mainIndex",void 0),N(r,"started",void 0),N(r,"templatesConfig",void 0),N(r,"renderState",{}),N(r,"_stalledSearchDelay",void 0),N(r,"_searchStalledTimer",void 0),N(r,"_initialUiState",void 0),N(r,"_initialResults",void 0),N(r,"_manuallyResetScheduleSearch",!1),N(r,"_resetScheduleSearch",void 0),N(r,"_createURL",void 0),N(r,"_searchFunction",void 0),N(r,"_mainHelperSearch",void 0),N(r,"_hasSearchWidget",!1),N(r,"_hasRecommendWidget",!1),N(r,"_insights",void 0),N(r,"_initialOptions",void 0),N(r,"middleware",[]),N(r,"sendEventToInsights",void 0),N(r,"_createdAt",Ao()),N(r,"status","idle"),N(r,"error",void 0),N(r,"scheduleSearch",yt(function(){r.started&&r.mainHelper.search()})),N(r,"scheduleRender",yt(function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,A;!((A=r.mainHelper)===null||A===void 0)&&A.hasPendingRequests()||(clearTimeout(r._searchStalledTimer),r._searchStalledTimer=null,I&&(r.status="idle",r.error=void 0)),r.mainIndex.render({instantSearchInstance:r}),r.emit("render")},function(I,A){var M=oe(I,1),j=M[0],q=j===void 0?!0:j,D=oe(A,1),C=D[0],T=C===void 0?!0:C;return[q||T]})),N(r,"onInternalStateChange",yt(function(){var I=r.mainIndex.getWidgetUiState({});r.middleware.forEach(function(A){var M=A.instance;M.onStateChange({uiState:I})})})),r.setMaxListeners(100);var a=n.indexName,i=a===void 0?"":a,o=n.compositionID,u=n.numberLocale,d=n.initialUiState,f=d===void 0?{}:d,p=n.routing,h=p===void 0?null:p,_=n.insights,l=_===void 0?void 0:_,s=n.searchFunction,g=n.stalledSearchDelay,m=g===void 0?200:g,c=n.searchClient,v=c===void 0?null:c,y=n.insightsClient,b=y===void 0?null:y,S=n.onStateChange,P=S===void 0?null:S,F=n.future,w=F===void 0?E({},Ld,n.future||{}):F;if(v===null)throw new Error(Ge("The `searchClient` option is required."));if(typeof v.search!="function")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(typeof v.addAlgoliaAgent=="function"&&v.addAlgoliaAgent("instantsearch.js (".concat(vi,")")),b&&typeof b!="function")throw new Error(Ge("The `insightsClient` option should be a function."));if(r._initialOptions=n,r.client=v,r.future=w,r.insightsClient=b,r.indexName=i,r.compositionID=o,r.helper=null,r.mainHelper=null,r.mainIndex=Id({indexName:r.compositionID||r.indexName}),r.onStateChange=P,r.started=!1,r.templatesConfig={helpers:Td({numberLocale:u}),compileOptions:{}},r._stalledSearchDelay=m,r._searchStalledTimer=null,r._createURL=$d,r._initialUiState=f,r._initialResults=null,r._insights=l,s&&(r._searchFunction=s),r.sendEventToInsights=Ke,h){var R=typeof h=="boolean"?{}:h;R.$$internal=!0,r.use(cd(R))}if(l){var x=typeof l=="boolean"?{}:l;x.$$internal=!0,r.use(La(x))}return Af()&&r.use(Tf({$$internal:!0})),r}return di(t,[{key:"_isSearchStalled",get:function(){return this.status==="stalled"}},{key:"use",value:function(){for(var r=this,a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];var u=i.map(function(d){var f=E({$$type:"__unknown__",$$internal:!1,subscribe:Ke,started:Ke,unsubscribe:Ke,onStateChange:Ke},d({instantSearchInstance:r}));return r.middleware.push({creator:d,instance:f}),f});return this.started&&u.forEach(function(d){d.subscribe(),d.started()}),this}},{key:"unuse",value:function(){for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return this.middleware.filter(function(o){return a.includes(o.creator)}
32).forEach(function(o){return o.instance.unsubscribe()}),this.middleware=this.middleware.filter(function(o){return!a.includes(o.creator)}),this}},{key:"EXPERIMENTAL_use",value:function(){for(var r=arguments.length,a=new Array(r),i=0;i<r;i++)a[i]=arguments[i];return this.use.apply(this,ce(a))}},{key:"addWidget",value:function(r){return this.addWidgets([r])}},{key:"addWidgets",value:function(r){if(!Array.isArray(r))throw new Error(Ge("The `addWidgets` method expects an array of widgets. Please use `addWidget`."));if(this.compositionID&&r.some(function(a){return!Array.isArray(a)&&Te(a)&&!a._isolated}))throw new Error(Ge("The `index` widget cannot be used with a composition-based InstantSearch implementation."));return this.mainIndex.addWidgets(r),this}},{key:"removeWidget",value:function(r){return this.removeWidgets([r])}},{key:"removeWidgets",value:function(r){if(!Array.isArray(r))throw new Error(Ge("The `removeWidgets` method expects an array of widgets. Please use `removeWidget`."));return this.mainIndex.removeWidgets(r),this}},{key:"start",value:function(){var r=this;if(this.started)throw new Error(Ge("The `start` method has already been called once."));var a=this.mainHelper||ee(this.client,this.indexName,void 0,{persistHierarchicalRootCount:this.future.persistHierarchicalRootCount});if(this.compositionID&&(a.searchForFacetValues=a.searchForCompositionFacetValues.bind(a)),a.search=function(){var u=r._hasSearchWidget||r._hasRecommendWidget;return u&&(r.status="loading"),r.scheduleRender(!u),r._hasSearchWidget&&(r.compositionID?a.searchWithComposition():a.searchOnlyWithDerivedHelpers()),r._hasRecommendWidget&&a.recommend(),a},this._searchFunction){var i={search:function(){return new Promise(Ke)}};this._mainHelperSearch=a.search.bind(a),a.search=function(){var u=r.mainIndex.getHelper(),d=ee(i,u.state.index,u.state);return d.once("search",function(f){var p=f.state;u.overrideStateWithoutTriggeringChangeEvent(p),r._mainHelperSearch()}),d.on("change",function(f){var p=f.state;u.setState(p)}),r._searchFunction(d),a}}if(a.on("error",function(u){var d=u.error;if(!$e(d,Error)){var f=d;d=Object.keys(f).reduce(function(p,h){return p[h]=f[h],p},new Error(f.message))}d.error=d,r.error=d,r.status="error",r.scheduleRender(!r._hasSearchWidget&&!r._hasRecommendWidget),r.emit("error",d)}),this.mainHelper=a,this.middleware.forEach(function(u){var d=u.instance;d.subscribe()}),this.mainIndex.init({instantSearchInstance:this,parent:null,uiState:this._initialUiState}),this._initialResults){jd(this.client,this._initialResults),Od(this.mainHelper,this._initialResults);var o=this.scheduleSearch;this.scheduleSearch=yt(Ke),this._manuallyResetScheduleSearch?this._resetScheduleSearch=function(){r.scheduleSearch=o}:yt(function(){r.scheduleSearch=o})()}else this.mainIndex.getWidgets().length>0&&this.scheduleSearch();this.helper=this.mainIndex.getHelper(),this.started=!0,this.middleware.forEach(function(u){var d=u.instance;d.started()}),typeof this._insights>"u"&&a.derivedHelpers[0].once("result",function(){var u=r.mainIndex.getScopedResults().some(function(d){var f=d.results;return f?._automaticInsights});u&&r.use(La({$$internal:!0,$$automatic:!0}))})}},{key:"dispose",value:function(){var r;this.scheduleSearch.cancel(),this.scheduleRender.cancel(),clearTimeout(this._searchStalledTimer),this.removeWidgets(this.mainIndex.getWidgets()),this.mainIndex.dispose(),this.started=!1,this.removeAllListeners(),(r=this.mainHelper)===null||r===void 0||r.removeAllListeners(),this.mainHelper=null,this.helper=null,this.middleware.forEach(function(a){var i=a.instance;i.unsubscribe()}),this._initialOptions=null}},{key:"scheduleStalledRender",value:function(){var r=this;this._searchStalledTimer||(this._searchStalledTimer=setTimeout(function(){r.status="stalled",r.scheduleRender()},this._stalledSearchDelay))}},{key:"setUiState",value:function(r){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!this.mainHelper)throw new Error(Ge("The `start` method needs to be called before `setUiState`."));this.mainIndex.refreshUiState();var o=typeof r=="function"?r(this.mainIndex.getWidgetUiState({})):r;this.onStateChange&&i?this.onStateChange({uiState:o,setUiState:function(d){Kn(typeof d=="function"?d(o):d,a.mainIndex),a.scheduleSearch(),a.onInternalStateChange()}}):(Kn(o,this.mainIndex),this.scheduleSearch(),this.onInternalStateChange())}},{key:"getUiState",value:function(){return this.started&&this.mainIndex.refreshUiState(),this.mainIndex.getWidgetUiState({})}},{key:"createURL",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.started)throw new Error(Ge("The `start` method needs to be called before `createURL`."));return this._createURL(r)}},{key:"refresh",value:function(){if(!this.mainHelper)throw new Error(Ge("The `start` method needs to be called before `refresh`."));this.mainHelper.clearCache().search()}}]),t})(bf),$t=function(t,n){return t},Me=function(t){return new Wd(t)};Me.version=vi;Me.createInfiniteHitsSessionStorageCache=$t(Sf);Me.highlight=$t(vo);Me.reverseHighlight=$t(bo);Me.snippet=$t(_o);Me.reverseSnippet=$t(wo);Me.insights=Po;Me.getInsightsAnonymousUserToken=yf;Object.defineProperty(Me,"widgets",{get:function(){throw new ReferenceError(`"instantsearch.widgets" are not available from the ES build. 33 34To import the widgets: 35 36import { searchBox } from 'instantsearch.js/es/widgets'`)}});Object.defineProperty(Me,"connectors",{get:function(){throw new ReferenceError(`"instantsearch.connectors" are not available from the ES build. 37 38To import the connectors: 39 40import { connectSearchBox } from 'instantsearch.js/es/connectors'`)}});Object.defineProperty(Me,"templates",{get:function(){throw new ReferenceError(`"instantsearch.templates" are not available from the ES build. 41 42To import the templates: 43 44import { carousel } from 'instantsearch.js/es/templates'`)}});function Hd(e){var t=_t.highlightPostTag,n=_t.highlightPreTag,r=e.split(n),a=r.shift(),i=a?[{value:a,isHighlighted:!1}]:[];return r.forEach(function(o){var u=o.split(t);i.push({value:u[0],isHighlighted:!0}),u[1]!==""&&i.push({value:u[1],isHighlighted:!1})}),i}ge({name:"instantsearch"});var Nd={preserveSharedStateOnUnmount:!1,persistHierarchicalRootCount:!1},Md="4.29.8",zo=function(e){return jt(N({mixins:[ae({name:"InstantSearch"})],provide:function(){return{$_ais_instantSearchInstance:this.instantSearchInstance}},watch:{searchClient:function(t){Rt(!1),this.instantSearchInstance.helper.setClient(t).search()},indexName:function(t){this.instantSearchInstance.helper.setIndex(t||"").search()},compositionID:function(t){this.instantSearchInstance.helper.setIndex(t||"").search()},stalledSearchDelay:function(t){this.instantSearchInstance._stalledSearchDelay=t},routing:function(){throw new Error(`routing configuration can not be changed dynamically at this point. 45 46Please open a new issue: https://github.com/algolia/instantsearch/discussions/new?category=ideas&labels=triage%2cLibrary%3A+Vue+InstantSearch&title=Feature%20request%3A%20dynamic%20props`)},onStateChange:function(){throw new Error(`onStateChange configuration can not be changed dynamically at this point. 47 48Please open a new issue: https://github.com/algolia/instantsearch/discussions/new?category=ideas&labels=triage%2cLibrary%3A+Vue+InstantSearch&title=Feature%20request%3A%20dynamic%20props`)},searchFunction:function(t){this.instantSearchInstance._searchFunction=t},middlewares:{immediate:!0,handler:function(t,n){var r=this;(n||[]).filter(function(a){return(t||[]).indexOf(a)===-1}
48).forEach(function(a){r.instantSearchInstance.unuse(a)}),(t||[]).filter(function(a){return(n||[]).indexOf(a)===-1}).forEach(function(a){r.instantSearchInstance.use(a)})}},future:function(t){this.instantSearchInstance.future=Object.assign(Nd,t)}},created:function(){var t=this.instantSearchInstance.client;typeof t.addAlgoliaAgent=="function"&&(t.addAlgoliaAgent("Vue (".concat(uu,")")),t.addAlgoliaAgent("Vue InstantSearch (".concat(Md,")")))},mounted:function(){var t=this;this.$nextTick(function(){t.instantSearchInstance.started||t.instantSearchInstance.start()})}},"beforeUnmount",function(){this.instantSearchInstance.started&&this.instantSearchInstance.dispose(),this.instantSearchInstance.__initialSearchResults=void 0}),e)},Ls=`Vue InstantSearch: You used the prop api-key or app-id. 49These have been replaced by search-client. 50 51See more info here: https://www.algolia.com/doc/api-reference/widgets/instantsearch/vue/#widget-param-search-client`,Ud=zo({name:"AisInstantSearch",props:{searchClient:{type:Object,required:!0},insightsClient:{type:Function,default:void 0},indexName:{type:String,required:!1},compositionID:{type:String,required:!1},routing:{default:void 0,validator:function(e){return!(typeof e=="boolean"||!e.router&&!e.stateMapping)||(Rt("The `routing` option expects an object with `router` and/or `stateMapping`.\n\nSee https://www.algolia.com/doc/api-reference/widgets/instantsearch/vue/#widget-param-routing"),!1)}},insights:{default:void 0,validator:function(e){return e===void 0||typeof e=="boolean"||(e===void 0?"undefined":Be(e))==="object"}},stalledSearchDelay:{type:Number,default:void 0},searchFunction:{type:Function,default:void 0},onStateChange:{type:Function,default:void 0},initialUiState:{type:Object,default:void 0},apiKey:{type:String,default:void 0,validator:function(e){return e&&Rt(Ls),!1}},appId:{type:String,default:void 0,validator:function(e){return e&&Rt(Ls),!1}},middlewares:{type:Array,default:null},future:{type:Object,default:void 0}},data:function(){return{instantSearchInstance:Me({searchClient:this.searchClient,insightsClient:this.insightsClient,insights:this.insights,indexName:this.indexName,compositionID:this.compositionID,routing:this.routing,stalledSearchDelay:this.stalledSearchDelay,searchFunction:this.searchFunction,onStateChange:this.onStateChange,initialUiState:this.initialUiState,future:this.future})}},render:ct(function(e){var t;return e("div",{class:(t={},N(t,this.suit(),!0),N(t,this.suit("","ssr"),!1),t)},gi(this))})});zo({name:"AisInstantSearchSsr",inject:{$_ais_ssrInstantSearchInstance:{default:function(){throw new Error("`createServerRootMixin` is required when using SSR.")}}},data:function(){return{instantSearchInstance:this.$_ais_ssrInstantSearchInstance}},render:ct(function(e){var t;return e("div",{class:(t={},N(t,this.suit(),!0),N(t,this.suit("","ssr"),!0),t)},gi(this))})});ae({name:"QueryRuleContext"}),le({connector:co},{$$widgetType:"ais.queryRuleContext"});function Go(e){var t,n=e.props;if(n){if(n.attribute)return n.attribute;if(Array.isArray(n.attributes))return n.attributes[0]}if(t=e.children&&e.children.default&&e.children.default(),Array.isArray(t))return t.reduce(function(r,a){return r||Go(a)},void 0)}var Dd={name:"AisDynamicWidgets",mixins:[le({connector:pc},{$$widgetType:"ais.dynamicWidgets"}),ae({name:"DynamicWidgets"})],props:{transformItems:{type:Function,default:void 0},facets:{type:Array,default:void 0},maxValuesPerFacet:{type:Number,default:void 0}},render:ct(function(e){var t=this,n=new Map;if((gi(this)||[]).forEach(function(a){var i=Go(a);i&&n.set(i,e("div",{key:i,class:[t.suit("widget")]},[a]))}),!this.state){var r=[];return n.forEach(function(a){return r.push(a)}),e("div",jt({class:[this.suit()]},{attrs:{hidden:!0}}),r)}return e("div",{class:[this.suit()]},this.state.attributesToRender.map(function(a){return n.get(a)}))}),computed:{widgetParams:function(){return{transformItems:this.transformItems,facets:this.facets,maxValuesPerFacet:this.maxValuesPerFacet,widgets:[]}}}};Object.assign({},Dd,{name:"AisExperimentalDynamicWidgets",mounted:function(){Rt("Use AisDynamicWidgets instead of AisExperimentalDynamicWidgets.")}});
51function qn(e,t,n){return e.reduce(function(r,a){return a.getWidgetUiState?a.getWidgetUiState(r,n):r},t)}function qd(e,t,n){var r=[],a=!1,i={$$type:"ais.feedContainer",$$widgetType:"ais.feedContainer",_isolated:!0,getIndexName:function(){return t.getIndexName()},getIndexId:function(){return e},getHelper:function(){return t.getHelper()},getResults:function(){var u=t.getResults();if(!u)return null;if(!u.feeds)return e===""?(u._state=t.getHelper().state,u):null;var d=u.feeds.find(function(f){return f.feedID===e});return d?(d._state=t.getHelper().state,d):null},getResultsForWidget:function(){return this.getResults()},getParent:function(){return t},getWidgets:function(){return r},getScopedResults:function(){return t.getScopedResults()},getPreviousState:function(){return null},createURL:function(u){return t.createURL(u)},scheduleLocalSearch:function(){return t.scheduleLocalSearch()},addWidgets:function(u){var d=u.reduce(function(h,_){return h.concat(Array.isArray(_)?_:[_])},[]);if(d.forEach(function(h){h.parent=i}),r=r.concat(d),a){d.forEach(function(h){if(h.getRenderState){var _=h.getRenderState(n.renderState[i.getIndexId()]||{},He(n,i,n._initialUiState));tt({renderState:_,instantSearchInstance:n,parent:i})}}),d.forEach(function(h){h.init&&h.init(He(n,i,n._initialUiState))});var f=t.getHelper(),p=i.getWidgetSearchParameters(f.state,{uiState:{}});p!==f.state&&f.setState(p)}return i},removeWidgets:function(u){var d=u.reduce(function(h,_){return h.concat(Array.isArray(_)?_:[_])},[]),f=t.getHelper();if(!f)return r=r.filter(function(h){return!d.includes(h)}),i;var p=f.state;return d.forEach(function(h){if(h.dispose){var _=h.dispose({helper:f,state:p,recommendState:f.recommendState,parent:i});$e(_,ee.RecommendParameters)||_&&(p=_)}}),r=r.filter(function(h){return!d.includes(h)}),p!==f.state&&f.setState(p),i},init:function(){a=!0,r.forEach(function(u){if(u.getRenderState){var d=u.getRenderState(n.renderState[i.getIndexId()]||{},He(n,i,n._initialUiState));tt({renderState:d,instantSearchInstance:n,parent:i})}}),r.forEach(function(u){u.init&&u.init(He(n,i,n._initialUiState))})},render:function(){r.forEach(function(u){if(u.getRenderState){var d=u.getRenderState(n.renderState[i.getIndexId()]||{},Kt(n,i,u));tt({renderState:d,instantSearchInstance:n,parent:i})}}),r.forEach(function(u){u.render&&u.render(Kt(n,i,u))})},dispose:function(u){var d,f=t.getHelper(),p=(d=u?.state)!==null&&d!==void 0?d:f?.state;return r.forEach(function(h){if(h.dispose&&f){var _=h.dispose({helper:f,state:p,recommendState:f.recommendState,parent:i});$e(_,ee.RecommendParameters)||_&&(p=_)}}),r=[],a=!1,p},getWidgetState:function(u){return this.getWidgetUiState(u)},getWidgetUiState:function(u){var d=t.getHelper();return qn(r,u,{searchParameters:d.state,helper:d})},getWidgetSearchParameters:function(u,d){var f=d.uiState;return r.reduce(function(p,h){return h.getWidgetSearchParameters?h.getWidgetSearchParameters(p,{uiState:f}):p},u)},updateWidget:function(u,d){var f=t.getHelper(),p=f?qn(r,{},{searchParameters:f.state,helper:f}):{};u.parent=void 0,d.parent=i;var h=r.slice(),_=h.indexOf(u);if(_===-1?h.push(d):h[_]=d,r=h,!f||!a)return i;var l=f.state;if(u.dispose){var s=u.dispose({helper:f,state:l,recommendState:f.recommendState,parent:i});s&&!$e(s,ee.RecommendParameters)&&(l=s)}var g=qn(r,{},{searchParameters:i.getWidgetSearchParameters(l,{uiState:p}),helper:f}),m=i.getWidgetSearchParameters(l,{uiState:g});if(d.getRenderState){var c=d.getRenderState(n.renderState[i.getIndexId()]||{},He(n,i,n._initialUiState));tt({renderState:c,instantSearchInstance:n,parent:i})}return d.init&&d.init(He(n,i,n._initialUiState)),m!==f.state&&f.setState(m),i},refreshUiState:function(){},setIndexUiState:function(){}};return i}var Et,kd={name:"AisFeedProvider",props:{feedContainer:{type:Object,required:!0}},provide:function(){var e=this;return{$_ais_getParentIndex:function(){return e.feedContainer}}},render:ct(function(e){var t=Ot(this,"default");return e("div",{},t?t():[])})};N(Et={name:"AisFeeds",mixins:[le({connector:kl},{$$widgetType:"ais.feeds"}),ae({name:"Feeds"})],props:{isolated:{type:Boolean,required:!0},transformFeeds:{type:Function,default:void 0}},data:function(){return{feedContainers:new Map,removalTimer:null,pendingRemovals:new Map}},watch:{state:function(e){e&&this.reconcileContainers(e.feedIDs||[])}}},"beforeUnmount",function(){this.removalTimer!==null&&(clearTimeout(this.removalTimer),this.removalTimer=null);var e=Array.from(new Set(ce(this.feedContainers.values()).concat(ce(this.pendingRemovals.values())
51)));this.pendingRemovals.clear(),this.feedContainers.clear(),e.length>0&&this.getParentIndex().removeWidgets(e)}),N(Et,"methods",{reconcileContainers:function(e){var t=this,n=this.getParentIndex(),r=new Set(e),a=[];this.feedContainers.forEach(function(o,u){r.has(u)||(a.push([u,o]),t.feedContainers.delete(u))}),a.length>0&&(a.forEach(function(o){var u=oe(o,2),d=u[0],f=u[1];t.pendingRemovals.set(d,f)}),this.removalTimer!==null&&clearTimeout(this.removalTimer),this.removalTimer=setTimeout(function(){var o=Array.from(t.pendingRemovals.values());t.pendingRemovals.clear(),t.removalTimer=null,o.length>0&&n.removeWidgets(o)},0));var i=[];e.forEach(function(o){if(!t.feedContainers.has(o)){var u=t.pendingRemovals.get(o);if(u)return t.pendingRemovals.delete(o),void t.feedContainers.set(o,u);var d=qd(o,n,t.instantSearchInstance);t.feedContainers.set(o,d),i.push(d)}}),i.length>0&&n.addWidgets(i)}}),N(Et,"render",ct(function(e){var t=this;if(!this.state)return e("div",{class:[this.suit()]});var n=this.state.feedIDs||[],r=Ot(this,"default"),a=n.map(function(i){var o=t.feedContainers.get(i);if(!o||!r)return null;var u=r({feedID:i});return e(kd,{key:i,feedContainer:o,scopedSlots:{default:function(){return u}}},u)});return e("div",{class:[this.suit()]},a)})),N(Et,"computed",{widgetParams:function(){return{isolated:this.isolated,transformFeeds:this.transformFeeds}}});le({connector:wl},{$$widgetType:"ais.autocomplete"}),ae({name:"Autocomplete"});Q("p",null," This widget doesn't render anything without a filled in default slot. ",-1);Q("p",null,"query, function to refine and results are provided.",-1);Q("pre",null,"refine: Function",-1);Q("summary",null,[Q("code",null,"indices"),Ce(":")],-1);var Ko="instantSearchPanelEmitter",Jo="PANEL_CHANGE_EVENT",Bd=function(){var e;return e={props:{emitter:{type:Object,required:!1,default:function(){return cu()}}},provide:function(){return N({},Ko,this.emitter)},data:function(){return{canRefine:!0}},created:function(){var t=this;this.emitter.on(Jo,function(n){t.updateCanRefine(n)})}},N(e,"beforeUnmount",function(){this.emitter.all.clear()}),N(e,"methods",{updateCanRefine:function(t){this.canRefine=t}}),e},Oe=function(){var e=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).mapStateToCanRefine,t=e===void 0?function(n){return!!n.canRefine}:e;return{inject:{emitter:{from:Ko,default:function(){return{emit:function(){}}}}},data:function(){return{state:null,hasAlreadyEmitted:!1}},watch:{state:{immediate:!0,handler:function(n,r){if(n){var a=t(r||{}),i=t(n);this.hasAlreadyEmitted&&a===i||(this.emitter.emit(Jo,i),this.hasAlreadyEmitted=!0)}}}}}};le({connector:Sl},{$$widgetType:"ais.breadcrumb"}),Oe(),ae({name:"Breadcrumb"});le({connector:Sc},{$$widgetType:"ais.clearRefinements"}),Oe(),ae({name:"ClearRefinements"});ae({name:"CurrentRefinements"}),le({connector:bc},{$$widgetType:"ais.currentRefinements"}),Oe();ae({name:"HierarchicalMenu"}),le({connector:Ac},{$$widgetType:"ais.hierarchicalMenu"}),Oe();var Yo=function(e,t,n){if(!n)return Tt(e,t);if(e===Fe)return Tt(e,Array.isArray(n)?n:[n]);var r=typeof n=="string"?{default:function(){return n}}:n,a=typeof e=="string"?t:Object.assign(t,{children:n});return Tt(e,a,r)},Qd=Cl({createElement:Yo,Fragment:Fe}),Vd={name:"AisHighlighter",props:{hit:{type:Object,required:!0},attribute:{type:String,required:!0},highlightedTagName:{type:String,default:"mark"},suit:{type:Function,required:!0},highlightProperty:{type:String,required:!0},preTag:{type:String,required:!0},postTag:{type:String,required:!0}},render:function(){var e=Ys(this.hit[this.highlightProperty],this.attribute)||[],t=(Array.isArray(e)?e:[e]).map(function(n){return Hd(Wu(n.value||"")).map(function(r){var a=r.value;return{value:a===" "?" ":a,isHighlighted:r.isHighlighted}})});return Yo(Qd,{classNames:{root:this.suit(),highlighted:this.suit("highlighted")},highlightedTagName:this.highlightedTagName,nonHighlightedTagName:Fe,parts:t})}},zd={name:"AisHighlight",mixins:[ae({name:"Highlight"})],components:{AisHighlighter:Vd},props:{hit:{type:Object,required:!0},attribute:{type:String,required:!0},highlightedTagName:{type:String,default:"mark"}}};function Gd(e,t,n,r,a,i){var o=Vt("ais-highlighter");return G(),ot(o,{hit:n.hit,attribute:n.attribute,"highlighted-tag-name":n.highlightedTagName,suit:e.suit,"highlight-property":"_highlightResult","pre-tag":"<mark>","post-tag":"</mark>"},null,8,["hit","attribute","highlighted-tag-name","suit"])}const Xo={...zd,render:Gd};var rg={name:"AisHitsPerPage",mixins:[ae({name:"HitsPerPage"}),le({connector:Dc},{$$widgetType:"ais.hitsPerPage"}),Oe()],props:{items:{type:Array,required:!0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{items:this.items,transformItems:this.transformItems}}}};le({connector:Gc},{$$widgetType:"ais.infiniteHits"}),ae({name:"InfiniteHits"});ae({name:"Menu"}),le({connector:io},{$$widgetType:"ais.menu"}),Oe();ae({name:"MenuSelect"}),le({connector:io},{$$widgetType:"ais.menuSelect"}),Oe();var ng={name:"AisNumericMenu",mixins:[le({connector:Xc},{$$widgetType:"ais.numericMenu"}),ae({name:"NumericMenu"}),Oe()],props:{attribute:{type:String,required:!0},items:{type:Array,required:!0},transformItems:{type:Function,default:void 0}},computed:{widgetParams:function(){return{attribute:this.attribute,transformItems:this.transformItems,items:this.items}}}},Kd={name:"AisPagination",mixins:[ae({name:"Pagination"}),le({connector:nl},{$$widgetType:"ais.pagination"}
51),Oe()],props:{padding:{type:Number,default:void 0,validator:function(e){return e>0}},totalPages:{type:Number,default:void 0,validator:function(e){return e>0}},showFirst:{type:Boolean,default:!0},showLast:{type:Boolean,default:!0},showNext:{type:Boolean,default:!0},showPrevious:{type:Boolean,default:!0}},computed:{widgetParams:function(){return{padding:this.padding,totalPages:this.totalPages}}},emits:["page-change"],methods:{refine:function(e){var t=Math.min(Math.max(e,0),this.state.nbPages-1);this.state.refine(t),this.$emit("page-change",t)}}},Jd=["href"],Yd=["href"],Xd=["href","aria-label","aria-current","onClick"],Zd=["href"],eh=["aria-label","href"],th=["aria-label"];function rh(e,t,n,r,a,i){var o;return e.state?(G(),K("div",{key:0,class:J((o={},N(o,e.suit(),!0),N(o,e.suit("","noRefinement"),e.state.nbPages<=1),o))},[be(e.$slots,"default",{refine:i.refine,createURL:e.state.createURL,currentRefinement:e.state.currentRefinement,nbHits:e.state.nbHits,nbPages:e.state.nbPages,pages:e.state.pages,isFirstPage:e.state.isFirstPage,isLastPage:e.state.isLastPage},function(){var u,d,f,p;return[Q("ul",{class:J(e.suit("list"))},[n.showFirst?(G(),K("li",{key:0,class:J((u={},N(u,e.suit("item"),!0),N(u,e.suit("item","disabled"),e.state.isFirstPage),N(u,e.suit("item","firstPage"),!0),u))},[be(e.$slots,"first",{createURL:function(){return e.state.createURL(0)},isFirstPage:e.state.isFirstPage,refine:function(){return i.refine(0)}},function(){return[e.state.isFirstPage?(G(),K("span",{key:1,class:J(e.suit("link")),"aria-label":"First Page"},"â¹â¹",2)):(G(),K("a",{key:0,class:J(e.suit("link")),"aria-label":"First Page",href:e.state.createURL(0),onClick:t[0]||(t[0]=Ae(function(h){return i.refine(0)},["exact","left","prevent"]))},"â¹â¹",10,Jd))]})],2)):de("",!0),n.showPrevious?(G(),K("li",{key:1,class:J((d={},N(d,e.suit("item"),!0),N(d,e.suit("item","disabled"),e.state.isFirstPage),N(d,e.suit("item","previousPage"),!0),d))},[be(e.$slots,"previous",{createURL:function(){return e.state.createURL(e.state.currentRefinement-1)},isFirstPage:e.state.isFirstPage,refine:function(){return i.refine(e.state.currentRefinement-1)}},function(){return[e.state.isFirstPage?(G(),K("span",{key:1,class:J(e.suit("link")),"aria-label":"Previous Page"},"â¹",2)):(G(),K("a",{key:0,class:J(e.suit("link")),"aria-label":"Previous Page",href:e.state.createURL(e.state.currentRefinement-1),onClick:t[1]||(t[1]=Ae(function(h){return i.refine(e.state.currentRefinement-1)},["exact","left","prevent"]))},"â¹",10,Yd))]})],2)):de("",!0),(G(!0),K(Fe,null,St(e.state.pages,function(h){var _;return G(),K("li",{class:J((_={},N(_,e.suit("item"),!0),N(_,e.suit("item","page"),!0),N(_,e.suit("item","selected"),e.state.currentRefinement===h),_)),key:h},[be(e.$slots,"item",{page:h,createURL:function(){return e.state.createURL(h)},isFirstPage:e.state.isFirstPage,isLastPage:e.state.isLastPage,refine:function(){return i.refine(h)}},function(){return[Q("a",{class:J(e.suit("link")),href:e.state.createURL(h),"aria-label":"Page ".concat(h+1),"aria-current":e.state.currentRefinement===h?"page":void 0,onClick:Ae(function(l){return i.refine(h)},["exact","left","prevent"])},Ie(h+1),11,Xd)]})],2)}),128)),n.showNext?(G(),K("li",{key:2,class:J((f={},N(f,e.suit("item"),!0),N(f,e.suit("item","disabled"),e.state.isLastPage),N(f,e.suit("item","nextPage"),!0),f))},[be(e.$slots,"next",{createURL:function(){return e.state.createURL(e.state.currentRefinement+1)},isLastPage:e.state.isLastPage,refine:function(){return i.refine(e.state.currentRefinement+1)}},function(){return[e.state.isLastPage?(G(),K("span",{key:1,class:J(e.suit("link")),"aria-label":"Next Page"},"âº",2)):(G(),K("a",{key:0,class:J(e.suit("link")),"aria-label":"Next Page",href:e.state.createURL(e.state.currentRefinement+1),onClick:t[2]||(t[2]=Ae(function(h){return i.refine(e.state.currentRefinement+1)},["exact","left","prevent"]))},"âº",10,Zd))]})],2)):de("",!0),n.showLast?(G(),K("li",{key:3,class:J((p={},N(p,e.suit("item"),!0),N(p,e.suit("item","disabled"),e.state.isLastPage),N(p,e.suit("item","lastPage"),!0),p))},[be(e.$slots,"last",{createURL:function(){return e.state.createURL(e.state.nbPages-1)},isLastPage:e.state.isLastPage,refine:function(){return i.refine(e.state.nbPages-1)}},function(){return[e.state.isLastPage?(G(),K("span",{key:1,class:J(e.suit("link")),"aria-label":"Last Page, Page ".concat(e.state.nbPages)}," âºâº ",10,th)):(G(),K("a",{key:0,class:J(e.suit("link")),"aria-label":"Last Page, Page ".concat(e.state.nbPages),href:e.state.createURL(e.state.nbPages-1),onClick:t[3]||(t[3]=Ae(function(h){return i.refine(e.state.nbPages-1)},["exact","left","prevent"]))},"âºâº",10,eh))]})],2)):de("",!0)],2)]})],2)):de("",!0)}const nh={...Kd,render:rh};ae({name:"Panel"}),Bd();ae({name:"PoweredBy"});ae({name:"QueryRuleCustomData"}),le({connector:co},{$$widgetType:"ais.queryRuleCustomData"});ae({name:"RangeInput"}),le({connector:al},{$$widgetType:"ais.rangeInput"}),Oe();ae({name:"RatingMenu"}),le({connector:hl},{$$widgetType:"ais.ratingMenu"}),Oe();Q("symbol",{id:"ais-RatingMenu-starSymbol",viewBox:"0 0 24 24"},[Q("path",{d:"M12 .288l2.833 8.718h9.167l-7.417 5.389 2.833 8.718-7.416-5.388-7.417 5.388 2.833-8.718-7.416-5.389h9.167z"})],-1),Q("symbol",{id:"ais-RatingMenu-starEmptySymbol",viewBox:"0 0 24 24"},[Q("path",{d:"M12 6.76l1.379 4.246h4.465l-3.612 2.625 1.379 4.246-3.611-2.625-3.612 2.625 1.379-4.246-3.612-2.625h4.465l1.38-4.246zm0-6.472l-2.833 8.718h-9.167l7.416 5.389-2.833 8.718 7.417-5.388 7.416 5.388-2.833-8.718 7.417-5.389h-9.167l-2.833-8.718z"})],-1);Q("use",{"xlink:href":"#ais-RatingMenu-starSymbol"},null,-1);Q("use",{"xlink:href":"#ais-RatingMenu-starEmptySymbol"},null,-1);var ih={name:"SearchInput",mixins:[ae({name:"SearchBox"})],props:{placeholder:{type:String,default:"Search hereâ¦"},autofocus:{type:Boolean,default:!1},showLoadingIndicator:{type:Boolean,default:!1},shouldShowLoadingIndicator:{type:Boolean,default:!1},ignoreCompositionEvents:{type:Boolean,default:!1},submitTitle:{type:String,default:"Search"},resetTitle:{type:String,default:"Clear"},value:{type:String,required:!1,default:void 0},modelValue:{type:String,required:!1,default:void 0}},emits:["input","update:modelValue","blur","focus","reset"],data:function(){return{query:""}},methods:{isFocused:function(){return document.activeElement===this.$refs.input},onInput:function(e){this.ignoreCompositionEvents&&e.isComposing||(this.$emit("input",e.target.value),this.$emit("update:modelValue",e.target.value))},onFormSubmit:function(){this.$refs.input.blur()},onFormReset:function(){this.$emit("input",""),this.$emit("update:modelValue",""),this.$emit("reset")}}},ah=["placeholder","autofocus","value"],sh=["title","aria-label","hidden"],oh=[Q("path",{d:"M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z"},null,-1)],uh=["title","aria-label","hidden"],ch=[Q("path",{d:"M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z"},null,-1)],lh=["hidden"],fh=["aria-hidden"],dh=[Ws('<g fill="none" fill-rule="evenodd"><g transform="translate(1 1)" stroke-width="2"><circle stroke-opacity=".5" cx="18" cy="18" r="18"></circle><path d="M36 18c0-9.94-8.06-18-18-18"><animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="1s" repeatCount="indef
51inite"></animateTransform></path></g></g>',1)];function hh(e,t,n,r,a,i){var o,u;return G(),K("form",{action:"",role:"search",novalidate:"",class:J(e.suit("form")),onSubmit:t[4]||(t[4]=Ae(function(){for(var d=arguments.length,f=new Array(d),p=0;p<d;p++)f[p]=arguments[p];return i.onFormSubmit&&(o=i).onFormSubmit.apply(o,ce(f))},["prevent"])),onReset:t[5]||(t[5]=Ae(function(){for(var d=arguments.length,f=new Array(d),p=0;p<d;p++)f[p]=arguments[p];return i.onFormReset&&(u=i).onFormReset.apply(u,ce(f))},["prevent"]))},[Q("input",{type:"search",autocorrect:"off",autocapitalize:"off",autocomplete:"off",spellcheck:"false",maxlength:"512","aria-label":"Search",placeholder:n.placeholder,autofocus:n.autofocus,class:J(e.suit("input")),value:n.value||n.modelValue,onFocus:t[0]||(t[0]=function(d){return e.$emit("focus",d)}),onBlur:t[1]||(t[1]=function(d){return e.$emit("blur",d)}),onInput:t[2]||(t[2]=function(d){return i.onInput(d)}),onCompositionend:t[3]||(t[3]=function(d){return i.onInput(d)}),ref:"input"},null,42,ah),Q("button",{type:"submit",title:n.submitTitle,"aria-label":n.submitTitle,class:J(e.suit("submit")),hidden:n.showLoadingIndicator&&n.shouldShowLoadingIndicator},[be(e.$slots,"submit-icon",{},function(){return[(G(),K("svg",{"aria-hidden":"true",width:"10",height:"10",viewBox:"0 0 40 40",class:J(e.suit("submitIcon"))},oh,2))]})],10,sh),Q("button",{type:"reset",title:n.resetTitle,"aria-label":n.resetTitle,class:J(e.suit("reset")),hidden:!n.value&&!n.modelValue||n.showLoadingIndicator&&n.shouldShowLoadingIndicator},[be(e.$slots,"reset-icon",{},function(){return[(G(),K("svg",{"aria-hidden":"true",height:"10",viewBox:"0 0 20 20",class:J(e.suit("resetIcon")),width:"10"},ch,2))]})],10,uh),n.showLoadingIndicator?(G(),K("span",{key:0,hidden:!n.shouldShowLoadingIndicator,class:J(e.suit("loadingIndicator"))},[be(e.$slots,"loading-indicator",{},function(){return[(G(),K("svg",{"aria-hidden":!n.shouldShowLoadingIndicator,"aria-label":"Results are loading",width:"16",height:"16",stroke:"#444",viewBox:"0 0 38 38",class:J(e.suit("loadingIcon"))},dh,10,fh))]})],10,lh)):de("",!0)],34)}const Zo={...ih,render:hh};var gh=function(){},mh={name:"AisRefinementList",components:{SearchInput:Zo,AisHighlight:Xo},mixins:[ae({name:"RefinementList"}),le({connector:sl},{$$widgetType:"ais.refinementList"}),Oe()],props:{attribute:{type:String,required:!0},searchable:{type:Boolean,default:void 0},searchablePlaceholder:{type:String,required:!1,default:"Search hereâ¦"},operator:{default:"or",validator:function(e){return e==="and"||e==="or"},required:!1},limit:{type:Number,required:!1,default:void 0},showMoreLimit:{type:Number,required:!1,default:void 0},showMore:{type:Boolean,required:!1,default:!1},showMoreButtonLabel:{type:String,required:!1,default:void 0},sortBy:{type:[Array,Function],required:!1,default:void 0},transformItems:{type:Function,required:!1,default:void 0}},data:function(){return{searchForFacetValuesQuery:""}},computed:{searchForFacetValues:{get:function(){return this.searchForFacetValuesQuery},set:function(e){this.state.searchForItems(e),this.searchForFacetValuesQuery=e}},toggleShowMore:function(){return this.state.toggleShowMore||gh},items:function(){return this.state.items.map(function(e){return Object.assign({},e,{_highlightResult:{item:{value:e.highlighted}}})})},widgetParams:function(){return{attribute:this.attribute,operator:this.operator,limit:this.limit,showMore:this.showMore,showMoreLimit:this.showMoreLimit,sortBy:this.sortBy,escapeFacetValues:!0,transformItems:this.transformItems}}},methods:{refine:function(e){this.state.refine(e),this.searchForFacetValuesQuery=""}}},vh=["value","checked","onChange"],ph=["disabled","aria-expanded","aria-label"];function yh(e,t,n,r,a,i){var o,u=Vt("search-input"),d=Vt("ais-highlight");return e.state?(G(),K("div",{key:0,class:J([e.suit(),i.items.length===0&&e.suit("","noRefinement")])},[be(e.$slots,"default",{items:i.items,refine:i.refine,searchForItems:e.state.searchForItems,searchForItemsQuery:a.searchForFacetValuesQuery,toggleShowMore:i.toggleShowMore,canToggleShowMore:e.state.canToggleShowMore,isShowingMore:e.state.isShowingMore,createURL:e.state.createURL,isFromSearch:e.state.isFromSearch,c
51anRefine:e.state.canRefine,sendEvent:e.state.sendEvent},function(){return[n.searchable?(G(),K("div",{key:0,class:J(e.suit("searchBox"))},[We(u,{modelValue:i.searchForFacetValues,"onUpdate:modelValue":t[0]||(t[0]=function(f){return i.searchForFacetValues=f}),"show-loading-indicator":!0,placeholder:n.searchablePlaceholder,"class-names":e.classNames},null,8,["modelValue","placeholder","class-names"])],2)):de("",!0),e.state.isFromSearch&&i.items.length===0?be(e.$slots,"noResults",{key:1,query:i.searchForFacetValues},function(){return[Q("div",{class:J(e.suit("noResults"))},"No results.",2)]}):de("",!0),i.items.length>0?(G(),K("ul",{key:2,class:J(e.suit("list"))},[(G(!0),K(Fe,null,St(i.items,function(f){return G(),K("li",{class:J([e.suit("item"),f.isRefined&&e.suit("item","selected")]),key:f.value},[be(e.$slots,"item",{item:f,refine:i.refine,createURL:e.state.createURL},function(){return[Q("label",{class:J(e.suit("label"))},[Q("input",{class:J(e.suit("checkbox")),type:"checkbox",value:f.value,checked:f.isRefined,onChange:function(p){return i.refine(f.value)}},null,42,vh),n.searchable?(G(),K("span",{key:0,class:J(e.suit("labelText"))},[We(d,{attribute:"item",hit:f},null,8,["hit"])],2)):(G(),K("span",{key:1,class:J(e.suit("labelText"))},Ie(f.label),3)),Q("span",{class:J(e.suit("count"))},Ie(f.count),3)],2)]})],2)}),128))],2)):de("",!0),n.showMore?(G(),K("button",{key:3,class:J([e.suit("showMore"),N({},e.suit("showMore","disabled"),!e.state.canToggleShowMore)]),onClick:t[1]||(t[1]=function(){for(var f=arguments.length,p=new Array(f),h=0;h<f;h++)p[h]=arguments[h];return i.toggleShowMore&&(o=i).toggleShowMore.apply(o,ce(p))}),disabled:!e.state.canToggleShowMore,"aria-expanded":e.state.isShowingMore?"true":"false","aria-label":n.showMoreButtonLabel},[be(e.$slots,"showMoreLabel",{isShowingMore:e.state.isShowingMore},function(){return[Ce(" Show "+Ie(e.state.isShowingMore?"less":"more"),1)]})],10,ph)):de("",!0)]})],2)):de("",!0)}const Sh={...mh,render:yh};var Bt,Rh=(N(Bt={name:"AisStateResults",mixins:[le({connector:!0}),ae({name:"StateResults"})],props:{catchError:{type:Boolean,default:!1}},data:function(){var e=this;return{renderFn:function(){var t=e.instantSearchInstance,n=t.status,r=t.error,a=e.getParentIndex().getResults(),i=e.getParentIndex().getHelper(),o=i?i.state:null;e.state={results:a,state:o,status:n,error:r}}}},created:function(){this.instantSearchInstance.addListener("render",this.renderFn),this.renderFn()}},"beforeUnmount",function(){this.widget&&(this.instantSearchInstance.removeListener("render",this.renderFn),this.errorFn&&this.instantSearchInstance.removeListener("error",this.errorFn))}),N(Bt,"watch",{catchError:{immediate:!0,handler:function(e){e?(this.errorFn=function(){},this.instantSearchInstance.addListener("error",this.errorFn)):this.errorFn&&(this.instantSearchInstance.removeListener("error",this.errorFn),this.errorFn=void 0)}}}),N(Bt,"computed",{stateResults:function(){var e=this.state,t=e.results,n=e.state,r=e.status,a=e.error;return jt({},t,{results:t,state:n,status:r,error:a})}}),Bt);Q("p",null," Use this component to have a different layout based on a certain state. ",-1);Q("p",null,"Fill in the slot, and get access to the following things:",-1);({...Rh});var bh={name:"AisSearchBox",mixins:[le({connector:ll},{$$widgetType:"ais.searchBox"}),ae({name:"SearchBox"})],components:{SearchInput:Zo},props:{placeholder:{type:String,default:""},autofocus:{type:Boolean,default:!1},showLoadingIndicator:{type:Boolean,default:!0},ignoreCompositionEvents:{type:Boolean,default:!1},submitTitle:{type:String,default:"Submit the search query"},resetTitle:{type:String,default:"Clear the search query"},value:{type:String,default:void 0},modelValue:{type:String,default:void 0},queryHook:{type:Function,default:void 0}},data:function(){return{localValue:"",isVue2:Vl,isVue3:zl}},computed:{widgetParams:function(){return{queryHook:this.queryHook}},isControlled:function(){return this.value!==void 0||this.modelValue!==void 0},model:function(){return this.value||this.modelValue},currentRefinement:{get:function(){this.isControlled&&this.model!==this.localValue&&(this.localValue=this.model,this.$emit("input",this.model),this.$emit("update:modelValue",this.model),this.state.refine(this.model));var e=this.$refs.searchInput;return e&&e.isFocused()?this.localValue:this.model||this.state.query||""},set:function(e){this.localValue=e,this.state.refine(e),this.isControlled&&(this.$emit("input",e),this.$emit("update:modelValue",e))}}}};function _h(e,t,n,r,a,i){var o=Vt("search-input");return e.state?(G(),K("div",{key:0,class:J(e.suit())},[be(e.$slots,"default",{currentRefinement:i.currentRefinement,isSearchStalled:e.state.isSearchStalled,refine:e.state.refine},function(){return[We(o,{onFocus:t[0]||(t[0]=function(u){return e.$emit("focus",u)}),onBlur:t[1]||(t[1]=function(u){return e.$emit("blur",u)}),onReset:t[2]||(t[2]=function(u){return e.$emit("reset")}),placeholder:n.placeholder,autofocus:n.autofocus,"show-loading-indicator":n.showLoadingIndicator,"should-show-loading-indicator":e.state.isSearchStalled,"ignore-composition-events":n.ignoreCompositionEvents,"submit-title":n.submitTitle,"reset-title":n.resetTitle,"class-names":e.classNames,modelValue:i.currentRefinement,"onUpdate:modelValue":t[3]||(t[3]=function(u){return i.currentRefinement=u}),ref:"searchInput"},lu({default:Pe(function(){return[a.isVue2?be(e.$slots,"loading-indicator",{key:0,slot:"loading-indicator"}):de("",!0),a.isVue2?be(e.$slots,"submit-icon",{key:1,slot:"submit-icon"}):de("",!0),a.isVue2?be(e.$slots,"reset-icon",{key:2,slot:"reset-icon"}):de("",!0)]}),_:2},[a.isVue3?{name:"loading-indicator",fn:Pe(function(){return[be(e.$slots,"loading-indicator")]}),key:"0"}:void 0,a.isVue3?{name:"submit-icon",fn:Pe(function(){return[be(e.$slots,"submit-icon")]}),key:"1"}:void 0,a.isVue3?{name:"reset-icon",fn:Pe(function(){return[be(e.$slots,"reset-icon")]}),key:"2"}:void 0]),1032,["placeholder","autofocus","show-loading-indicator","should-show-loading-indicator","
51ignore-composition-events","submit-title","reset-title","class-names","modelValue"])]})],2)):de("",!0)}const wh={...bh,render:_h};ae({name:"Snippet"});ae({name:"SortBy"}),le({connector:fl},{$$widgetType:"ais.sortBy"}),Oe();var Qt,Ph=(N(Qt={name:"AisStats",mixins:[le({connector:vl},{$$widgetType:"ais.stats"}),ae({name:"Stats"})],data:function(){return{announcement:"",announcementTimer:void 0,isInitialAnnouncement:!0,visuallyHiddenStyle:{position:"absolute",width:"1px",height:"1px",padding:0,margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",border:0}}}},"beforeUnmount",function(){clearTimeout(this.announcementTimer)}),N(Qt,"watch",{announcementText:function(e){var t=this;this.isInitialAnnouncement?this.isInitialAnnouncement=!1:(clearTimeout(this.announcementTimer),this.announcementTimer=setTimeout(function(){t.announcement=e},1400))}}),N(Qt,"computed",{announcementText:function(){return this.state?this.state.areHitsSorted?this.sortedResultsSentence:this.resultsSentence:""},sortedResultsSentence:function(){var e=this.state,t=e.nbHits,n=e.nbSortedHits,r="sorted out of ".concat(t.toLocaleString());return n===0?"No relevant results ".concat(r):n===1?"1 relevant result ".concat(r):n>1?"".concat((n||0).toLocaleString()," relevant results ").concat(r):""},resultsSentence:function(){var e=this.state.nbHits;return e===0?"No results":e===1?"1 result":e>1?"".concat(e.toLocaleString()," results"):""},widgetParams:function(){return{}}}),Qt);function Fh(e,t,n,r,a,i){return e.state?(G(),K("div",{key:0,class:J(e.suit())},[be(e.$slots,"default",fu(e.state,{results:e.state.instantSearchInstance.helper.lastResults}),function(){return[Q("span",{class:J(e.suit("text"))},[e.state.areHitsSorted?(G(),K(Fe,{key:0},[Ce(Ie(i.sortedResultsSentence),1)],64)):(G(),K(Fe,{key:1},[Ce(Ie(i.resultsSentence),1)],64)),Ce(" found in "+Ie(e.state.processingTimeMS.toLocaleString())+"ms",1)],2)]}),Q("span",{class:J(e.suit("announcement")),role:"status","aria-live":"polite","aria-atomic":"true",style:du(a.visuallyHiddenStyle)},Ie(a.announcement),7)],2)):de("",!0)}const xh={...Ph,render:Fh};var ig={name:"AisToggleRefinement",mixins:[ae({name:"ToggleRefinement"}),le({connector:yl},{$$widgetType:"ais.toggleRefinement"}),Oe()],props:{attribute:{type:String,required:!0},on:{type:[String,Number,Boolean,Array],required:!1,default:!0},off:{type:[String,Number,Boolean,Array],required:!1,default:void 0},label:{type:String,default:void 0}},computed:{widgetParams:function(){return{attribute:this.attribute,on:this.on,off:this.off}}}};le({connector:Tl},{$$widgetType:"ais.voiceSearch"}),ae({name:"VoiceSearch"});Ws('<line x1="1" y1="1" x2="23" y2="23"></line><path d="M9 9v3a3 3 0 0 0 5.12 2.12M15 9.34V4a3 3 0 0 0-5.94-.6"></path><path d="M17 16.95A7 7 0 0 1 5 12v-2m14 0v2a7 7 0 0 1-.11 1.23"></path><line x1="12" y1="19" x2="12" y2="23"></line><line x1="8" y1="23" x2="16" y2="23"></line>',5);Q("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"},null,-1);Q("line",{x1:"12",y1:"19",x2:"12",y2:"23"},null,-1);Q("line",{x1:"8",y1:"23",x2:"16",y2:"23"},null,-1);ae({name:"RelevantSort"}),le({connector:Ol},{$$widgetType:"ais.relevantSort"});const Ih=()=>hu().$algolia,Eh={class:"pointer-events-none fixed inset-0 overflow-hidden"},Ah={class:"pointer-events-none absolute inset-0 overflow-hidden"},Th={class:"pointer-events-none fixed inset-x-0 bottom-0 flex"},Oh={class:"custom-container sticky top-0 z-20 mb-6 h-[20%] bg-white"},jh={class:""},Ch=["value","placeholder","onInput"],$h=["onClick"],Lh={class:"bg-white"},Wh={class:"custom-container"},Hh={key:0,class:"relative w-5/12 lg:w-2/12"},Nh={class:"pb-3"},Mh=["innerHTML"],Uh={class:"hidden py-3 lg:block"},Dh={key:0},qh=["innerHTML"],kh={key:1},Bh={key:0,class:"tag-fluid me-2 inline-flex items-center justify-center rounded-full border border-green p-[5px] font-raleway font-semibold uppercase text-green"},Qh={key:1,class:"tag-fluid me-2 inline-flex items-center justify-center rounded-full border border-green p-[5px] font-raleway font-semibold uppercase text-black"},Vh={key:2,class:"tag-fluid me-2 inline-flex items-center justify-center rounded-full border border-green p-[5px] font-raleway font-semibold uppercase text-black"},zh={class:"hidden justify-end lg:flex"},Gh={class:"mt-3 flex w-full justify-end lg:hidden"},Kh={class:"my-12 flex items-center justify-center space-x-6 text-lg font-medium text-black"},Jh={key:0,class:"mx-2 flex items-center"},Yh={key:1,class:"mx-2 flex items-center"},Xh="unisport_posts_index",Zh={__name:"WidgetOffcanvasSearch",props:{offcanvasSearchVisible:{type:Boolean,default:!1},handleOffcanvasSearch:Function,seccionPagina:{type:String,default:"home"},tipoPagina:{type:String,default:"pagina"},searchLocation:{type:String,default:"global"}},setup(e){const t=e,n=Nt(),r=Nt(),a=Nt(),{search:i,selectItem:o,selectContent:u}=mu(),d=Ih(),f=Nt(!1),p=bu(()=>t.searchLocation==="blog"?"filterType:Noticias":""),h=()=>{a.value&&a.value.scrollTo({top:0,behavior:"smooth"})};let _;const l=m=>{i({search_term:m,modulo:"header"})},s=m=>{f.value=m!=="",clearTimeout(_),_=setTimeout(()=>{l(m)},1500)},g=m=>{let c;if(m.postType==="formacion"){let v;m.tags&&m.tags.length>0&&m.title&&(v=m.tags[0]==="Curso"?m.tags[0]+" de "+m.title:m.tags[0]+" en "+m.title),c={nombre_formacion:v||void 0,id_formacion:m.id_formacion?m.id_formacion:void 0,categoria_formacion:m.categories&&m.categories.length>0?m.categories[0]:void 0,tipo_formacion:m.tags&&m.tags.length>0?m.tags[0]:void 0,modulo:"buscador",seccion_pagina:t.seccionPagina,tipo_pagina:t.t
51ipoPagina},o(c)}else{let v;m.producto_relacionado&&m.producto_relacionado.post_title&&(v=m.producto_relacionado.post_title),c={autor_contenido:m.author,categoria_contenido:m.categories&&m.categories.length>0?m.categories[0]:void 0,titulo_contenido:m.title,nombre_formacion:v||void 0,id_formacion:m.producto_relacionado&&m.producto_relacionado.id_formacion?m.producto_relacionado.id_formacion:void 0,categoria_formacion:m.producto_relacionado&&m.producto_relacionado.categoria_formacion?m.producto_relacionado.categoria_formacion:void 0,tipo_formacion:m.producto_relacionado&&m.producto_relacionado.tag_formacion?m.producto_relacionado.tag_formacion:void 0,modulo:"buscador"},u(c)}t.handleOffcanvasSearch()};return vu(()=>{n.value?.classList.remove("hidden")}),pu(()=>t.offcanvasSearchVisible,async()=>{t.offcanvasSearchVisible&&r.value?.focus()}),(m,c)=>{const v=yu,y=Su;return G(),K("div",{ref_key:"offcanvas",ref:n,class:"relative z-[100] hidden"},[Q("div",{class:J(["pointer-events-none fixed inset-0 bg-black/50 backdrop-blur duration-500 ease-in-out",e.offcanvasSearchVisible?"pointer-events-auto opacity-100":"pointer-events-none opacity-0"]),onClick:c[0]||(c[0]=Ae((...b)=>e.handleOffcanvasSearch&&e.handleOffcanvasSearch(...b),["prevent"]))},null,2),Q("div",Eh,[Q("div",Ah,[Q("div",Th,[Q("div",{class:J(["relative w-screen duration-500 ease-in-out",e.offcanvasSearchVisible?"pointer-events-auto translate-y-0":"pointer-events-none translate-y-[85vh] lg:translate-y-[75vh]"])},[Q("div",{class:J(["relative flex h-[85vh] flex-col bg-white pt-8 shadow-xl duration-300 ease-in-out lg:h-[75vh]",e.offcanvasSearchVisible?"opacity-100":"opacity-0"])},[Q("a",{href:"#",class:"absolute right-6 top-6 z-40 h-[16px] w-[16px] lg:right-8 lg:top-7 lg:h-[22px] lg:w-[22px]",onClick:c[1]||(c[1]=Ae((...b)=>e.handleOffcanvasSearch&&e.handleOffcanvasSearch(...b),["prevent"]))},[...c[3]||(c[3]=[Q("svg",{class:"h-[16px] w-[16px] lg:h-[22px] lg:w-[22px]",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Q("path",{d:"M22 2.2L19.8 0L11 8.8L2.2 0L0 2.2L8.8 11L0 19.8L2.2 22L11 13.2L19.8 22L22 19.8L13.2 11L22 2.2Z",fill:"#000000"})],-1)])]),Q("div",{ref_key:"wrapperSearch",ref:a,class:"h-full overflow-y-scroll"},[We(Ee(Ud),{indexName:Xh,searchClient:Ee(d)},{default:Pe(()=>[We(Ee(Gl),{filters:Ee(p)},null,8,["filters"]),Q("div",Oh,[We(Ee(xh),null,{default:Pe(({_hitsPerPage:b,_nbPages:S,nbHits:P,_page:F,_processingTimeMS:w,_query:R})=>[Q("div",{class:J(["text-center font-raleway text-sm font-medium text-black lg:text-base",!Ee(f)&&"opacity-0"])},Ie(P)+" resultados encontrados ",3)]),_:1}),Q("div",jh,[We(Ee(wh),{class:"relative mt-3 flex w-full items-center lg:mt-0"},{default:Pe(({currentRefinement:b,_isSearchStalled:S,refine:P})=>[Q("input",{ref_key:"inputSearch",ref:r,type:"text",value:b,placeholder:e.searchLocation==="blog"?"Busca en nuestro blog":"¿En qué quieres formarte?",class:"w-full border-x-0 border-b border-t-0 border-black pl-6 pr-6 font-raleway text-lg font-medium leading-[50px] text-black placeholder:text-gray-400 focus:border-black focus:ring-0 lg:h-[69px] lg:pl-8 lg:text-2xl lg:leading-[69px]",onInput:F=>P(F.currentTarget.value),onKeyup:c[2]||(c[2]=F=>s(F.currentTarget.value))},null,40,Ch),c[5]||(c[5]=Q("svg",{class:"absolute h-[18px] w-[18px] lg:h-[24px] lg:w-[23px]",width:"23",height:"24",viewBox:"0 0 23 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Q("g",{"clip-path":"url(#clip0_2514_6885)"},[Q("path",{d:"M22.8428 21.5639L17.3893 16.1104C17.2859 16.007 17.1512 15.9531 17.0074 15.9531H16.4145C17.8295 14.3135 18.6875 12.1797 18.6875 9.84375C18.6875 4.68223 14.5053 0.5 9.34375 0.5C4.18223 0.5 0 4.68223 0 9.84375C0 15.0053 4.18223 19.1875 9.34375 19.1875C11.6797 19.1875 13.8135 18.3295 15.4531 16.9145V17.5074C15.4531 17.6512 15.5115 17.7859 15.6104 17.8893L21.0639 23.3428C21.275 23.5539 21.6164 23.5539 21.8275 23.3428L22.8428 22.3275C23.0539 22.1164 23.0539 21.775 22.8428 21.5639ZM9.34375 17.0312C5.37266 17.0312 2.15625 13.8148 2.15625 9.84375C2.15625 5.87266 5.37266 2.65625 9.34375 2.65625C13.3148 2.65625 16.5312 5.87266 16.5312 9.84375C16.5312 13.8148 13.3148 17.0312 9.34375 17.0312Z",fill:"#979899"})]),Q("defs",null,[Q("clipPath",{id:"clip0_2514_6885"},[Q("rect",{width:"23",height:"23",fill:"white",transform:"translate(0 0.5)"})])])],-1)),b!==""?(G(),K("a",{key:0,href:"#",class:"absolute right-0 h-[14px] w-[14px]",onClick:Ae(F=>P(""),["prevent"])},[...c[4]||(c[4]=[Q("svg",{class:"h-[14px] w-[14px]",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Q("path",{d:"M22 2.2L19.8 0L11 8.8L2.2 0L0 2.2L8.8 11L0 19.8L2.2 22L11 13.2L19.8 22L22 19.8L13.2 11L22 2.2Z",fill:"#000000"})],-1)])],8,$h)):de("",!0)]),_:1})]),Ee(f)&&e.searchLocation!=="blog"?(G(),ot(Ee(Sh),{key:0,attribute:"filterType",sortBy:["isRefined","name:asc"]},{default:Pe(({items:b,_isShowingMore:S,_isFromSearch:P,_canToggleShowMore:F,refine:w,createURL:R,_toggleShowMore:x,_searchForItems:I,_sendEvent:A})=>[Q("div",{class:J(["mt-4 flex items-center gap-6 overflow-x-auto",b&&b.length>0&&"border-b"])},[(G(!0),K(Fe,null,St(b,M=>(G(),ot(v,{key:M.value,to:R(M),class:J(["text-nowrap border-b-2 px-2 py-3 font-raleway text-black",M.isRef
51ined?"border-black font-bold":"border-transparent font-medium"]),onClick:Ae(j=>w(M.value),["prevent"])},{default:Pe(()=>[We(Ee(Xo),{class:J(["text-lg text-black",M.isRefined?"font-bold":"font-medium"]),attribute:"item",hit:M},null,8,["class","hit"]),Ce(" ("+Ie(M.count.toLocaleString())+") ",1)]),_:2},1032,["to","class","onClick"]))),128))],2)]),_:1})):de("",!0)]),Q("div",Lh,[Q("div",Wh,[Ee(f)?(G(),ot(Ee(Kl),{key:0},{default:Pe(({items:b,_sendEvent:S})=>[(G(!0),K(Fe,null,St(b,P=>(G(),K("div",{key:P.objectID,class:"relative mb-5 flex flex-wrap rounded-md border border-grey-100 p-3 lg:min-h-[240px] lg:p-6"},[P.postType==="formacion"?(G(),K("div",Hh,[We(y,{src:P.image,alt:P.title,loading:"lazy",class:"relative h-[120px] w-full object-cover lg:absolute lg:h-full"},null,8,["src","alt"])])):de("",!0),Q("div",{class:J(P.postType==="formacion"?"w-7/12 lg:w-10/12":"w-full")},[Q("div",{class:J(["flex h-full flex-col justify-between lg:pr-8",P.postType==="formacion"&&"pl-3 lg:pl-8"])},[Q("div",Nh,[Q("div",{class:"h3-slider-text font-agrandir font-[617] uppercase leading-[110%] text-black",innerHTML:P.title},null,8,Mh),Q("div",Uh,[P.postType==="noticias"?(G(),K("div",Dh,[Q("p",{class:"font-raleway text-sm font-medium text-black lg:text-base",innerHTML:P.excerpt},null,8,qh)])):(G(),K("div",kh,[P.es_nueva===!0?(G(),K("span",Bh," nuevo ")):de("",!0),(G(!0),K(Fe,null,St(P.etiquetas,F=>(G(),K("span",{key:F.term_id,class:"tag-fluid me-2 inline-flex items-center justify-center rounded-full border border-green p-[5px] font-raleway font-semibold uppercase text-black",style:{display:"inline-flex","justify-content":"center","align-items":"center"}}
51,Ie(F.name),1))),128)),P.horas?(G(),K("span",Qh,Ie(P.horas),1)):de("",!0),P.creditos?(G(),K("span",Vh,Ie(P.creditos),1)):de("",!0)]))])]),Q("div",zh,[We(v,{to:P.url,class:"mt-3 flex items-center font-raleway text-sm font-bold text-black after:absolute after:bottom-0 after:left-0 after:right-0 after:top-0 lg:mt-0 lg:text-base",onClick:F=>g(P)},{default:Pe(()=>[P.postType==="formacion"?(G(),K(Fe,{key:0},[Ce(" Ver formación ")],64)):(G(),K(Fe,{key:1},[Ce(" Leer ")],64)),c[6]||(c[6]=Q("img",{src:Ru,class:"ml-3",width:"20",height:"20",loading:"lazy"},null,-1))]),_:2},1032,["to","onClick"])])],2)],2),Q("div",Gh,[We(v,{to:P.url,class:"mt-3 flex items-center font-raleway text-sm font-semibold text-black after:absolute after:bottom-0 after:left-0 after:right-0 after:top-0 lg:mt-0 lg:text-base",onClick:F=>g(P)},{default:Pe(()=>[P.postType==="formacion"?(G(),K(Fe,{key:0},[Ce(" Ver formación ")],64)):(G(),K(Fe,{key:1},[Ce(" Leer ")],64)),c[7]||(c[7]=Q("svg",{class:"ml-3",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Q("path",{d:"M3.82156 1.50012H14.5M14.5 1.50012L14.5 12.1786M14.5 1.50012L1.5 14.4999",stroke:"#000000","stroke-width":"1.84086"})],-1))]),_:2},1032,["to","onClick"])])]))),128))]),_:1})):de("",!0),Ee(f)?(G(),ot(Ee(nh),{key:1},{default:Pe(({currentRefinement:b,nbPages:S,_pages:P,isFirstPage:F,isLastPage:w,refine:R,createURL:x})=>[Q("div",Kh,[We(v,{to:x(0),class:J(["font-agrandir text-[16px] font-bold",{"bg-image-class px-[20px] py-[15px] font-bold text-white":F}]),onClick:Ae(()=>{R(0),h()},["prevent"])},{default:Pe(()=>[...c[8]||(c[8]=[Ce(" 1 ",-1)])]),_:1},8,["to","class","onClick"]),b>2?(G(),K("div",Jh," ... ")):de("",!0),(G(!0),K(Fe,null,St([b,b+1,b+2],I=>(G(),K(Fe,null,[I<S-1&&I>0?(G(),ot(v,{key:I,to:x(I),class:J(["font-agrandir text-[16px] font-bold",{"bg-image-class px-[20px] py-[15px] font-bold text-white":I===b}]),onClick:Ae(()=>{R(I),h()},["prevent"])},{default:Pe(()=>[Ce(Ie(I+1),1)]),_:2},1032,["to","class","onClick"])):de("",!0)],64))),256)),b+2<S-1?(G(),K("div",Yh," ... ")):de("",!0),S>1?(G(),ot(v,{key:2,to:x(S-1),class:J(["font-agrandir text-[16px] font-bold",{"bg-image-class px-[20px] py-[15px] font-bold text-white":w}]),onClick:Ae(()=>{R(S-1),h()},["prevent"])},{default:Pe(()=>[Ce(Ie(S),1)]),_:2},1032,["to","class","onClick"])):de("",!0)])]),_:1})):de("",!0)])])]),_:1},8,["searchClient"])],512)],2)],2)])])])],512)}}},eg=gu(Zh,[["__scopeId","data-v-28865b14"]]),ag=Object.freeze(Object.defineProperty({__proto__:null,default:eg},Symbol.toStringTag,{value:"Module"}));export{xh as A,ag as W,eg as _,Ud as a,wh as b,nh as c,ig as n,Kl as o,rg as r,ng as s,Ih as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.