PageSourceSearch

https://nubika.es/vue/_nuxt/Mhur2l7a.js

js nubika.es collected 2026-10-02 11:13:29 UTC 299,234 bytes, 51 lines download raw bytes

1import{S as Ot,al as iu,k as B,y as Ae,F as Pe,Q as Qt,i as z,f as ze,d as K,W as Re,n as X,g as de,q as Ie,m as dt,t as Te,H as Os,l as je,am as au,p as be,U as su,D as ou,M as uu,a as cu,o as lu,z as fu,e as xe,G as du,r as lt}from"./C4UnAbjb.js";import{h as Qn,i as hu,j as Fi,a as gu,k as mu,l as vu}from"./B2QzYKm2.js";function pu(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=pu(t,n,r),i=this.classNames&&this.classNames[a];return i?[a,i].join(" "):a}}}};function H(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){yu(e,a,n[a])})}return e}function yu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ue(e){"@swc/helpers - typeof";return e&&typeof Symbol<"u"&&e.constructor===Symbol?"symbol":typeof e}var xi=new Set;function gt(e){xi.has(e)||(xi.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 H(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&&gt(`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])}),H(e,"watch",{widgetParams:{handler:function(r){this.state=null,this.getParentIndex().removeWidgets([this.widget]),this.widget=jt(this.factory(r),n),this.getParentIndex().addWidgets([this.widget])},deep:!0}}),H(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){H(e,a,n[a])})}return e}function Su(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n}function T(e,t){return t=t??{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Su(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function Ru(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 Ru(a)}).join(", ");return function(a){return[a,"See documentation: ".concat(r)].filter(
7Boolean).join(`
8
9`)}}function bu(e){return Object.prototype.toString.call(e).slice(8,-1)}function ye(e,t){if(e===void 0||typeof e!="function")throw new Error("The render function is not valid (received type ".concat(bu(e),`).
10
11`).concat(t))}function Dn(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 _u(e){if(Array.isArray(e))return Dn(e)}function wu(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Pu(){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 Cs(e,t){if(e){if(typeof e=="string")return Dn(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 Dn(e,t)}}function ce(e){return _u(e)||wu(e)||Cs(e)||Pu()}function Un(){return Un=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},Un.apply(this,arguments)}function Fu(e){if(e==null)throw new TypeError("Cannot destructure "+e);return e}var xu={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},js=/[&<>"']/g,Iu=RegExp(js.source);function Eu(e){return e&&Iu.test(e)?e.replace(js,function(t){return xu[t]}):e}var Au={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Ws=/&(amp|quot|lt|gt|#39);/g,Tu=RegExp(Ws.source);function Ou(e){return e&&Tu.test(e)?e.replace(Ws,function(t){return Au[t]}):e}function Cu(e){return e===null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function ju(e){return(typeof e>"u"?"undefined":Ue(e))==="object"&&e!==null}function $s(e){if(!ju(e)||Cu(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 Be={highlightPreTag:"__ais-highlight__",highlightPostTag:"__/ais-highlight__"},pt={highlightPreTag:"<mark>",highlightPostTag:"</mark>"};function Ls(e){return Eu(e).replace(new RegExp(Be.highlightPreTag,"g"),pt.highlightPreTag).replace(new RegExp(Be.highlightPostTag,"g"),pt.highlightPostTag)}function Vt(e){return $s(e)&&typeof e.value!="string"?Object.keys(e).reduce(function(t,n){return T(E({},t),H({},n,Vt(e[n])))},{}):Array.isArray(e)?e.map(Vt):T(E({},e),{value:Ls(e.value)})}function Vn(e){return e.__escaped===void 0&&(e=e.map(function(t){Fu(t);var n=Un({},t);return n._highlightResult&&(n._highlightResult=Vt(n._highlightResult)),n._snippetResult&&(n._snippetResult=Vt(n._snippetResult)),n}),e.__escaped=!0),e}function Wu(e){return e.map(function(t){return T(E({},t),{highlighted:Ls(t.highlighted)})})}function zn(e,t,n){return e.map(function(r,a){return T(E({},r),{__position:n*t+a+1})})}function Gn(e,t){return t?e.map(function(n){return T(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 ur,Ii;function Kn(){if(Ii)return ur;Ii=1;function e(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}ur=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 u,c,h,d,v,m;if(this._events||(this._events={}),i==="error"&&(!this._events.error||r(this._events.error)&&!this._events.error.length)){if(u=arguments[1],u instanceof Error)throw u;var b=new Error('Uncaught, unspecified "error" event. ('+u+")");throw b.context=u,b}if(c=this._events[i],a(c))return!1;if(t(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:d=Array.prototype.slice.call(arguments,1),c.apply(this,d)}
12else if(r(c))for(d=Array.prototype.slice.call(arguments,1),m=c.slice(),h=m.length,v=0;v<h;v++)m[v].apply(this,d);return!0},e.prototype.addListener=function(i,u){var c;if(!t(u))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",i,t(u.listener)?u.listener:u),this._events[i]?r(this._events[i])?this._events[i].push(u):this._events[i]=[this._events[i],u]:this._events[i]=u,r(this._events[i])&&!this._events[i].warned&&(a(this._maxListeners)?c=e.defaultMaxListeners:c=this._maxListeners,c&&c>0&&this._events[i].length>c&&(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,u){if(!t(u))throw TypeError("listener must be a function");var c=!1;function h(){this.removeListener(i,h),c||(c=!0,u.apply(this,arguments))}return h.listener=u,this.on(i,h),this},e.prototype.removeListener=function(i,u){var c,h,d,v;if(!t(u))throw TypeError("listener must be a function");if(!this._events||!this._events[i])return this;if(c=this._events[i],d=c.length,h=-1,c===u||t(c.listener)&&c.listener===u)delete this._events[i],this._events.removeListener&&this.emit("removeListener",i,u);else if(r(c)){for(v=d;v-- >0;)if(c[v]===u||c[v].listener&&c[v].listener===u){h=v;break}if(h<0)return this;c.length===1?(c.length=0,delete this._events[i]):c.splice(h,1),this._events.removeListener&&this.emit("removeListener",i,u)}return this},e.prototype.removeAllListeners=function(i){var u,c;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(u in this._events)u!=="removeListener"&&this.removeAllListeners(u);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[i],t(c))this.removeListener(i,c);else if(c)for(;c.length;)this.removeListener(i,c[c.length-1]);return delete this._events[i],this},e.prototype.listeners=function(i){var u;return!this._events||!this._events[i]?u=[]:t(this._events[i])?u=[this._events[i]]:u=this._events[i].slice(),u},e.prototype.listenerCount=function(i){if(this._events){var u=this._events[i];if(t(u))return 1;if(u)return u.length}return 0},e.listenerCount=function(i,u){return i.listenerCount(u)};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 ur}var cr,Ei;function Hs(){if(Ei)return cr;Ei=1;function e(t,n){t.prototype=Object.create(n.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}return cr=e,cr}var lr,Ai;function $u(){if(Ai)return lr;Ai=1;var e=Kn(),t=Hs();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)},lr=n,lr}var fr,Ti;function Jn(){if(Ti)return fr;Ti=1;function e(n){return typeof n!="string"?n:String(n).replace(/^-/,"\\-")}function t(n){return typeof n!="string"?n:n.replace(/^\\-/,"-")}return fr={escapeFacetValue:e,unescapeFacetValue:t},fr}var dr,Oi;function Yn(){if(Oi)return dr;Oi=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 u in i)if(!(!Object.prototype.hasOwnProperty.call(i,u)||u==="__proto__"||u==="constructor")){var c=i[u],h=a[u];typeof h<"u"&&typeof c>"u"||(t(h)&&t(c)?a[u]=n(h,c):a[u]=e(c))}return a}function r(a){t(a)||(a={});for(var i=1,u=arguments.length;i<u;i++){var c=arguments[i];t(c)&&n(a,c)}return a}return dr=r,dr}var hr,Ci;function Xn(){if(Ci)return hr;Ci=1;function e(t){return t&&Object.keys(t).length>0}return hr=e,hr}var gr,ji;function Zn(){if(ji)return gr;ji=1;function e(t,n){if(t===null)return{};var r={},a=Object.keys(t),i,u;for(u=0;
12u<a.length;u++)i=a[u],!(n.indexOf(i)>=0)&&(r[i]=t[i]);return r}return gr=e,gr}var mr,Wi;function Ms(){if(Wi)return mr;Wi=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})}},mr=e,mr}var vr,$i;function Ns(){if($i)return vr;$i=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},vr=e,vr}var pr,Li;function Lu(){if(Li)return pr;Li=1;var e=Yn();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 u=[];return u.push({indexName:a,params:n._getHitsSearchParams(i)}),i.getRefinedDisjunctiveFacets().forEach(function(c){u.push({indexName:a,params:n._getDisjunctiveFacetSearchParams(i,c)})}),i.getRefinedHierarchicalFacets().forEach(function(c){var h=i.getHierarchicalFacetByName(c),d=i.getHierarchicalRefinement(c),v=i._getHierarchicalFacetSeparator(h);if(d.length>0&&d[0].split(v).length>1){var m=d[0].split(v).slice(0,-1).reduce(function(f,s,g){return f.concat({attribute:h.attributes[g],value:g===0?s:[f[f.length-1].value,s].join(v)})},[]);m.forEach(function(b,f){var s=n._getDisjunctiveFacetSearchParams(i,b.attribute,f===0);function g(l){return h.attributes.some(function(y){return y===l.split(":")[0]})}var p=(s.facetFilters||[]).reduce(function(l,y){if(Array.isArray(y)){var R=y.filter(function(_){return!g(_)});R.length>0&&l.push(R)}return typeof y=="string"&&!g(y)&&l.push(y),l},[]),o=m[f-1];f>0?s.facetFilters=p.concat(o.attribute+":"+o.value):p.length>0?s.facetFilters=p:delete s.facetFilters,u.push({indexName:a,params:s})})}}),u},_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),u=n._getNumericFilters(r),c=n._getTagFilters(r),h={};return a.length>0&&(h.facets=a.indexOf("*")>-1?["*"]:a),c.length>0&&(h.tagFilters=c),i.length>0&&(h.facetFilters=i),u.length>0&&(h.numericFilters=u),t(e({},r.getQueryParams(),h))},_getCompositionHitsSearchParams:function(r){var a=r.facets.concat(r.disjunctiveFacets.map(function(v){return r.disjunctiveFacetsRefinements&&r.disjunctiveFacetsRefinements[v]&&r.disjunctiveFacetsRefinements[v].length>0?"disjunctive("+v+")":v})).concat(n._getHitsHierarchicalFacetsAttributes(r)).sort(),i=n._getFacetFilters(r),u=n._getNumericFilters(r),c=n._getTagFilters(r),h={};a.length>0&&(h.facets=a.indexOf("*")>-1?["*"]:a),c.length>0&&(h.tagFilters=c),i.length>0&&(h.facetFilters=i),u.length>0&&(h.numericFilters=u);var d=r.getQueryParams();return delete d.highlightPreTag,delete d.highlightPostTag,delete d.index,t(e({},d,h))},_getDisjunctiveFacetSearchParams:function(r,a,i){var u=n._getFacetFilters(r,a,i),c=n._getNumericFilters(r,a),h=n._getTagFilters(r),d={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};h.length>0&&(d.tagFilters=h);var v=r.getHierarchicalFacetByName(a);return v?d.facets=n._getDisjunctiveHierarchicalFacetAttribute(r,v,i):d.facets=a,c.length>0&&(d.numericFilters=c),u.length>0&&(d.facetFilters=u),t(e({},r.getQueryParams(),d))}
12,_getNumericFilters:function(r,a){if(r.numericFilters)return r.numericFilters;var i=[];return Object.keys(r.numericRefinements).forEach(function(u){var c=r.numericRefinements[u]||{};Object.keys(c).forEach(function(h){var d=c[h]||[];a!==u&&d.forEach(function(v){if(Array.isArray(v)){var m=v.map(function(b){return u+h+b});i.push(m)}else i.push(u+h+v)})})}),i},_getTagFilters:function(r){return r.tagFilters?r.tagFilters:r.tagRefinements.join(",")},_getFacetFilters:function(r,a,i){var u=[],c=r.facetsRefinements||{};Object.keys(c).sort().forEach(function(m){var b=c[m]||[];b.slice().sort().forEach(function(f){u.push(m+":"+f)})});var h=r.facetsExcludes||{};Object.keys(h).sort().forEach(function(m){var b=h[m]||[];b.sort().forEach(function(f){u.push(m+":-"+f)})});var d=r.disjunctiveFacetsRefinements||{};Object.keys(d).sort().forEach(function(m){var b=d[m]||[];if(!(m===a||!b||b.length===0)){var f=[];b.slice().sort().forEach(function(s){f.push(m+":"+s)}),u.push(f)}});var v=r.hierarchicalFacetsRefinements||{};return Object.keys(v).sort().forEach(function(m){var b=v[m]||[],f=b[0];if(f!==void 0){var s=r.getHierarchicalFacetByName(m),g=r._getHierarchicalFacetSeparator(s),p=r._getHierarchicalRootPath(s),o,l;if(a===m){if(f.indexOf(g)===-1||!p&&i===!0||p&&p.split(g).length===f.split(g).length)return;p?(l=p.split(g).length-1,f=p):(l=f.split(g).length-2,f=f.slice(0,f.lastIndexOf(g))),o=s.attributes[l]}else l=f.split(g).length-1,o=s.attributes[l];o&&u.push([o+":"+f])}}),u},_getHitsHierarchicalFacetsAttributes:function(r){var a=[];return r.hierarchicalFacets.reduce(function(u,c){var h=r.getHierarchicalRefinement(c.name)[0];if(!h)return u.push(c.attributes[0]),u;var d=r._getHierarchicalFacetSeparator(c),v=h.split(d).length,m=c.attributes.slice(0,v+1);return u.concat(m)},a)},_getDisjunctiveHierarchicalFacetAttribute:function(r,a,i){var u=r._getHierarchicalFacetSeparator(a);if(i===!0){var c=r._getHierarchicalRootPath(a),h=0;return c&&(h=c.split(u).length),[a.attributes[h]]}var d=r.getHierarchicalRefinement(a.name)[0]||"",v=d.split(u).length-1;return a.attributes.slice(0,v+1)},getSearchForFacetQuery:function(r,a,i,u){var c=u.isDisjunctiveFacet(r)?u.clearRefinements(r):u,h={facetQuery:a,facetName:r};return typeof i=="number"&&(h.maxFacetHits=i),t(e({},n._getHitsSearchParams(c),h))}};return pr=n,pr}var yr,Hi;function ei(){return Hi||(Hi=1,yr=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},{})}),yr}var Sr,Mi;function Wt(){return Mi||(Mi=1,Sr=function(t,n){if(Array.isArray(t)){for(var r=0;r<t.length;r++)if(n(t[r]))return t[r]}}),Sr}var Rr,Ni;function Hu(){if(Ni)return Rr;Ni=1;function e(t,n){return t.filter(function(r,a){return n.indexOf(r)>-1&&t.indexOf(r)===a})}return Rr=e,Rr}var br,Di;function Mu(){if(Di)return br;Di=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 br=e,br}var _r,Ui;function Nu(){return Ui||(Ui=1,_r=function(t){return t===null?!1:/^[a-zA-Z0-9_-]{1,64}$/.test(t)}),_r}var wr,qi;function Du(){if(qi)return wr;qi=1;var e=ei(),t=Xn(),n=Zn(),r={addRefinement:function(i,u,c){if(r.isRefined(i,u,c))return i;var h=""+c,d=i[u]?i[u].concat(h):[h],v={};return v[u]=d,e(v,i)},removeRefinement:function(i,u,c){if(c===void 0)return r.clearRefinement(i,function(d,v){return u===v});var h=""+c;return r.clearRefinement(i,function(d,v){return u===v&&h===d})},toggleRefinement:function(i,u,c){if(c===void 0)throw new Error("toggleRefinement should be used with a value");return r.isRefined(i,u,c)?r.removeRefinement(i,u,c):r.addRefinement(i,u,c)},clearRefinement:function(i,u,c){if(u===void 0)return t(i)?{}:i;if(typeof u=="string")return n(i,[u]);if(typeof u=="function"){var h=!1,d=Object.keys(i).reduce(function(v,m){var b=i[m]||[],f=b.filter(function(s){return!u(s,m,c)});return f.length!==b.length&&(h=!0),v[m]=f,v},{});return h?d:i}},isRefined:function(i,u,c){var h=!!i[u]&&i[u].length>0;if(c===void 0||!h)return h;var d=""+c;return i[u].indexOf(d)!==-1}};return wr=r,wr}var Pr,ki;function Ds(){if(ki)return Pr;ki=1;var e=ei(),t=Wt(),n=Hu(),r=Yn(),a=Xn(),i=Zn(),u=Mu(),c=Nu(),h=Du();function d(f,s){return Array.isArray(f)&&Array.isArray(s)?f.length===s.length&&f.every(function(g,p){return d(s[p],g)}):f===s}function v(f,s){return t(f,function(g){return d(g,s)})}function m(f){var s=f?m._parseNumbers(f):{};s.userToken!==void 0&&!c(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(p){var o=m.PARAMETERS.indexOf(p)!==-1,l=s[p]!==void 0;!o&&l&&(g[p]=s[p])})}m.PARAMETERS=Object.keys(new m);function b(f){var s=parseFloat(f);return isFinite(s)?s:null}return m._parseNumbers=function(f){if(f instanceof m)return f;var s={},g=["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"];if(g.forEach(function(o){var l=f[o];if(typeof l=="string"){var y=parseFloat(l);isNaN(y)?s[o]=l:isFinite(y)?s[o]=y:s[o]=null}else typeof l=="number"&&!isFinite(l)&&(s[o]=null)}),Array.isArray(f.insideBoundingBox)&&(s.insideBoundingBox=f.insideBoundingBox.map(function(o){return Array.isArray(o)?o.map(function(l){return typeof l=="string"?b(l):typeof l=="number"&&!isFinite(l)?null:l}):o})),f.numericRefinements){var p={};Object.keys(f.numericRefinements).forEach(function(o){var l=f.numericRefinements[o]||{};p[o]={},Object.keys(l).forEach(function(y){var R=l[y],_=R.map(function(P){return Array.isArray(P)?P.map(function(F){return typeof F=="string"?b(F):typeof F=="number"&&!isFinite(F)?null:F}):typeof P=="string"?b(P):typeof P=="number"&&!isFinite(P)?null:P});p[o][y]=_})}),s.numericRefinements=p}return r(f,s)},m.make=function(s){var g=new m(s),p=s.hierarchicalFacets||[];return p.forEach(function(o){if(o.rootPath){var l=g.getHierarchicalRefinement(o.name);l.length>0&&l[0].indexOf(o.rootPath)!==0&&(g=g.clearRefinements(o.name)),l=g.getHierarchicalRefinement(o.name),l.length===0&&(g=g.toggleHierarchicalFacetRefinement(o.name,o.rootPath))}}),g},m.validate=function(f,s){var g=s||{};return f.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."):f.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."):f.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(f.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},m.prototype={constructor:m,clearRefinements:function(s){var g={numericRefinements:this._clearNumericRefinements(s),facetsRefinements:h.clearRefinement(this.facetsRefinements,s,"conjunctiveFacet"),facetsExcludes:h.clearRefinement(this.facetsExcludes,s,"exclude"),disjunctiveFacetsRefinements:h.clearRefinement(this.disjunctiveFacetsRefinements,s,"disjunctiveFacet"),hierarchicalFacetsRefinements:h.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(f,s,g){var p=u(g);if(this.isNumericRefined(f,s,p))return this;var o=r({},this.numericRefinements);return o[f]=r({},o[f]),o[f][s]?(o[f][s]=o[f][s].slice(),o[f][s].push(p)):o[f][s]=[p],this.setQueryParameters({numericRefinements:o})},getConjunctiveRefinements:function(f){return this.isConjunctiveFacet(f)?this.facetsRefinements[f]||[]:[]},getDisjunctiveRefinements:function(f){return this.isDisjunctiveFacet(f)?this.disjunctiveFacetsRefinements[f]||[]:[]},getHierarchicalRefinement:function(f){return this.hierarchicalFacetsRefinements[f]||[]},getExcludeRefinements:function(f){return this.isConjunctiveFacet(f)?this.facetsExcludes[f]||[]:[]},removeNumericRefinement:function(f,s,g){var p=g;return p!==void 0?this.isNumericRefined(f,s,p)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(o,l){return l===f&&o.op===s&&d(o.val,u(p))})}):this:s!==void 0?this.isNumericRefined(f,s)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(o,l){return l===f&&o.op===s})}):this:this.isNumericRefined(f)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(o,l){return l===f})}):this},getNumericRefinements:function(f){return this.numericRefinements[f]||{}},getNumericRefinement:function(f,s){return this.numericRefinements[f]&&this.numericRefinements[f][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,p=this.numericRefinements,o=Object.keys(p).reduce(function(l,y){var R=p[y],_={};return R=R||{}
12,Object.keys(R).forEach(function(P){var F=R[P]||[],w=[];F.forEach(function(S){var x=s({val:S,op:P},y,"numeric");x||w.push(S)}),w.length!==F.length&&(g=!0),_[P]=w}),l[y]=_,l},{});return g?o: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");return h.isRefined(this.facetsRefinements,s,g)?this:this.setQueryParameters({facetsRefinements:h.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 h.isRefined(this.facetsExcludes,s,g)?this:this.setQueryParameters({facetsExcludes:h.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 h.isRefined(this.disjunctiveFacetsRefinements,s,g)?this:this.setQueryParameters({disjunctiveFacetsRefinements:h.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 h.isRefined(this.facetsRefinements,s,g)?this.setQueryParameters({facetsRefinements:h.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 h.isRefined(this.facetsExcludes,s,g)?this.setQueryParameters({facetsExcludes:h.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 h.isRefined(this.disjunctiveFacetsRefinements,s,g)?this.setQueryParameters({disjunctiveFacetsRefinements:h.removeRefinement(this.disjunctiveFacetsRefinements,s,g)}):this},removeTagRefinement:function(s){if(!this.isTagRefined(s))return this;var g={tagRefinements:this.tagRefinements.filter(function(p){return p!==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:h.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:h.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:h.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 p=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(s)),o={},l=this.hierarchicalFacetsRefinements[s]!==void 0&&this.hierarchicalFacetsRefinements[s].length>0&&(this.hierarchicalFacetsRefinements[s][0]===g||this.hierarchicalFacetsRefinements[s][0].indexOf(g+p)===0);return l?g.indexOf(p)===-1?o[s]=[]:o[s]=[g.slice(0,g.lastIndexOf(p))]:o[s]=[g],this.setQueryParameters({hierarchicalFacetsRefinements:e(o,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(f,s){if(this.isHierarchicalFacetRefined(f))throw new Error(f+" is already refined.");if(!this.isHierarchicalFacet(f))throw new Error(f+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var g={};return g[f]=[s],this.setQueryParameters({hierarchicalFacetsRefinements:e(g,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(f){if(!this.isHierarchicalFacetRefined(f))return this;var s={};return s[f]=[],this.setQueryParameters({hierarchicalFacetsRefinements:e(s,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(s){return this.isTagRefined(s)?this.removeTagRefinement(s):this.addTagRefinement(s)},isDisjunctiveFacet:function(f){return this.disjunctiveFacets.indexOf(f)>-1},isHierarchicalFacet:function(f){return this.getHierarchicalFacetByName(f)!==void 0},isConjunctiveFacet:function(f){return this.facets.indexOf(f)>-1},isFacetRefined:function(s,g){return this.isConjunctiveFacet(s)?h.isRefined(this.facetsRefinements,s,g):!1},isExcludeRefined:function(s,g){return this.isConjunctiveFacet(s)?h.isRefined(this.facetsExcludes,s,g):!1},isDisjunctiveFacetRefined:function(s,g){return this.isDisjunctiveFacet(s)?h.isRefined(this.disjunctiveFacetsRefinements,s,g):!1},isHierarchicalFacetRefined:function(s,g){if(!this.isHierarchicalFacet(s))return!1;var p=this.getHierarchicalRefinement(s);return g?p.indexOf(g)!==-1:p.length>0},isNumericRefined:function(s,g,p){if(p===void 0&&g===void 0)return!!this.numericRefinements[s];var o=this.numericRefinements[s]&&this.numericRefinements[s][g]!==void 0;if(p===void 0||!o)return o;var l=u(p),y=v(this.numericRefinements[s][g],l)!==void 0;return o&&y},isTagRefined:function(s){return this.tagRefinements.indexOf(s)!==-1},getRefinedDisjunctiveFacets:function(){var s=this,g=n(Object.keys(this.numericRefinements).filter(function(p){return Object.keys(s.numericRefinements[p]).length>0}),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter(function(p){return s.disjunctiveFacetsRefinements[p].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 f=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter(function(s){return f.indexOf(s)===-1})},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var s=this.managedParameters,g={},p=this;
12return Object.keys(this).forEach(function(o){var l=p[o];s.indexOf(o)===-1&&l!==void 0&&(g[o]=l)}),g},setQueryParameter:function(s,g){if(this[s]===g)return this;var p={};return p[s]=g,this.setQueryParameters(p)},setQueryParameters:function(s){if(!s)return this;var g=m.validate(this,s);if(g)throw g;var p=this,o=m._parseNumbers(s),l=Object.keys(this).reduce(function(R,_){return R[_]=p[_],R},{}),y=Object.keys(o).reduce(function(R,_){var P=R[_]!==void 0,F=o[_]!==void 0;return P&&!F?i(R,[_]):(F&&(R[_]=o[_]),R)},l);return new this.constructor(y)},resetPage:function(){return this.page===void 0?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(f){return f.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(f){return f.separator||" > "},_getHierarchicalRootPath:function(f){return f.rootPath||null},_getHierarchicalShowParentLevel:function(f){return typeof f.showParentLevel=="boolean"?f.showParentLevel:!0},getHierarchicalFacetByName:function(f){return t(this.hierarchicalFacets,function(s){return s.name===f})},getHierarchicalFacetBreadcrumb:function(f){if(!this.isHierarchicalFacet(f))return[];var s=this.getHierarchicalRefinement(f)[0];if(!s)return[];var g=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(f)),p=s.split(g);return p.map(function(o){return o.trim()})},toString:function(){return JSON.stringify(this,null,2)}},Pr=m,Pr}var Fr,Bi;function Uu(){return Bi||(Bi=1,Fr=function(t){return Array.isArray(t)?t.filter(Boolean):[]}),Fr}var xr,Qi;function qu(){return Qi||(Qi=1,xr=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}),xr}var Ir,Vi;function Us(){if(Vi)return Ir;Vi=1;var e=Wt();return Ir=function(n,r){var a=(r||[]).map(function(i){return i.split(":")});return n.reduce(function(u,c){var h=c.split(":"),d=e(a,function(v){return v[0]===h[0]});return h.length>1||!d?(u[0].push(h[0]),u[1].push(h[1]),u):(u[0].push(d[0]),u[1].push(d[1]),u)},[[],[]])},Ir}var Er,zi;function ku(){if(zi)return Er;zi=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,u=r[a];u!==void 0&&u>=i&&(n[a]!==void 0&&delete n[a],n[a]=u)}),n},{})}return Er=e,Er}var Ar,Gi;function qs(){if(Gi)return Ar;Gi=1;function e(n,r){if(n!==r){var a=n!==void 0,i=n===null,u=r!==void 0,c=r===null;if(!c&&n>r||i&&u||!a)return 1;if(!i&&n<r||c&&a||!u)return-1}return 0}function t(n,r,a){if(!Array.isArray(n))return[];Array.isArray(a)||(a=[]);var i=n.map(function(u,c){return{criteria:r.map(function(h){return u[h]}),index:c,value:u}});return i.sort(function(c,h){for(var d=-1;++d<c.criteria.length;){var v=e(c.criteria[d],h.criteria[d]);if(v)return d>=a.length?v:a[d]==="desc"?-v:v}return c.index-h.index}),i.map(function(u){return u.value})}return Ar=t,Ar}var Tr,Ki;function Bu(){if(Ki)return Tr;Ki=1,Tr=u;var e=Jn(),t=Wt(),n=Us(),r=qs(),a=e.escapeFacetValue,i=e.unescapeFacetValue;function u(v){return function(b,f){var s=v.hierarchicalFacets[f],g=v.hierarchicalFacetsRefinements[s.name]&&v.hierarchicalFacetsRefinements[s.name][0]||"",p=v._getHierarchicalFacetSeparator(s),o=v._getHierarchicalRootPath(s),l=v._getHierarchicalShowParentLevel(s),y=n(v._getHierarchicalFacetSortBy(s)),R=b.every(function(F){return F.exhaustive}),_=c(y,p,o,l,g),P=b;return o&&(P=b.slice(o.split(p).length)),P.reduce(_,{name:v.hierarchicalFacets[f].name,count:null,isRefined:!0,path:null,escapedValue:null,exhaustive:R,data:null})}}function c(v,m,b,f,s){return function(p,o,l){var y=p;if(l>0){var R=0;for(y=p;R<l;){var _=y&&Array.isArray(y.data)?y.data:[];y=t(_,function(F){return F.isRefined}),R++}}if(y){var P=Object.keys(o.data).map(function(F){return[F,o.data[F]]}).filter(function(F){var w=F[0];return h(w,y.path||b,s,m,b,f)});y.data=r(P.map(function(F){var w=F[0],S=F[1];return d(S,w,m,i(s),o.exhaustive)}),v[0],v[1])}return p}}function h(v,m,b,f,s,g){return s&&(v.indexOf(s)!==0||s===v)?!1:!s&&v.indexOf(f)===-1||s&&v.split(f).length-s.split(f).length===1||v.indexOf(f)===-1&&b.indexOf(f)===-1||b.indexOf(v)===0||v.indexOf(m+f)===0&&(g||v.indexOf(b)===0)}function d(v,m,b,f,s){var g=m.split(b);return{name:g[g.length-1].trim(),path:m,escapedValue:a(m),count:v,isRefined:f===m||f.indexOf(m+b)===0,exhaustive:s,data:null}}return Tr}var Or,Ji;function ks(){if(Ji)return Or;Ji=1;var e=Uu(),t=ei(),n=Jn(),r=Wt(),a=qu(),i=Us(),u=ku(),c=qs(),h=n.escapeFacetValue,d=n.unescapeFacetValue,v=Bu();function m(w){var S={};
12return w.forEach(function(x,I){S[x]=I}),S}function b(w,S,x){S&&S[x]&&(w.stats=S[x])}function f(w,S){return r(w,function(I){var O=I.attributes||[];return O.indexOf(S)>-1})}function s(w,S,x){var I=S[0]||{};this._rawResults=S;var O=this;Object.keys(I).forEach(function(W){O[W]=I[W]});var M=t(x,{persistHierarchicalRootCount:!1});Object.keys(M).forEach(function(W){O[W]=M[W]}),this.processingTimeMS=S.reduce(function(W,D){return D.processingTimeMS===void 0?W:W+D.processingTimeMS},0),this.disjunctiveFacets=[],this.hierarchicalFacets=w.hierarchicalFacets.map(function(){return[]}),this.facets=[];var $=w.getRefinedDisjunctiveFacets(),q=m(w.facets),N=m(w.disjunctiveFacets),j=1,A=I.facets||{};Object.keys(A).forEach(function(W){var D=A[W],U=f(w.hierarchicalFacets,W);if(U){var k=U.attributes.indexOf(W),Q=a(w.hierarchicalFacets,function(Z){return Z.name===U.name});O.hierarchicalFacets[Q][k]={attribute:W,data:D,exhaustive:I.exhaustiveFacetsCount}}else{var J=w.disjunctiveFacets.indexOf(W)!==-1,V=w.facets.indexOf(W)!==-1,G;J&&(G=N[W],O.disjunctiveFacets[G]={name:W,data:D,exhaustive:I.exhaustiveFacetsCount},b(O.disjunctiveFacets[G],I.facets_stats,W)),V&&(G=q[W],O.facets[G]={name:W,data:D,exhaustive:I.exhaustiveFacetsCount},b(O.facets[G],I.facets_stats,W))}}),this.hierarchicalFacets=e(this.hierarchicalFacets),$.forEach(function(W){var D=S[j],U=D&&D.facets?D.facets:{},k=w.getHierarchicalFacetByName(W);Object.keys(U).forEach(function(Q){var J=U[Q],V;if(k){V=a(w.hierarchicalFacets,function(ee){return ee.name===k.name});var G=a(O.hierarchicalFacets[V],function(ee){return ee.attribute===Q});if(G===-1)return;O.hierarchicalFacets[V][G].data=O.persistHierarchicalRootCount?u(O.hierarchicalFacets[V][G].data,J):t(J,O.hierarchicalFacets[V][G].data)}else{V=N[Q];var Z=I.facets&&I.facets[Q]||{};O.disjunctiveFacets[V]={name:Q,data:u(Z,J),exhaustive:D.exhaustiveFacetsCount},b(O.disjunctiveFacets[V],D.facets_stats,Q),w.disjunctiveFacetsRefinements[Q]&&w.disjunctiveFacetsRefinements[Q].forEach(function(ee){!O.disjunctiveFacets[V].data[ee]&&w.disjunctiveFacetsRefinements[Q].indexOf(d(ee))>-1&&(O.disjunctiveFacets[V].data[ee]=0)})}}),j++}),w.getRefinedHierarchicalFacets().forEach(function(W){var D=w.getHierarchicalFacetByName(W),U=w._getHierarchicalFacetSeparator(D),k=w.getHierarchicalRefinement(W);k.length===0||k[0].split(U).length<2||S.slice(j).forEach(function(Q){var J=Q&&Q.facets?Q.facets:{};Object.keys(J).forEach(function(V){var G=J[V],Z=a(w.hierarchicalFacets,function(ie){return ie.name===D.name}),ee=a(O.hierarchicalFacets[Z],function(ie){return ie.attribute===V});if(ee!==-1){var ne={};if(k.length>0&&!O.persistHierarchicalRootCount){var Y=k[0].split(U)[0];ne[Y]=O.hierarchicalFacets[Z][ee].data[Y]}O.hierarchicalFacets[Z][ee].data=t(ne,G,O.hierarchicalFacets[Z][ee].data)}}),j++})}),Object.keys(w.facetsExcludes).forEach(function(W){var D=w.facetsExcludes[W],U=q[W];O.facets[U]={name:W,data:A[W],exhaustive:I.exhaustiveFacetsCount},D.forEach(function(k){O.facets[U]=O.facets[U]||{name:W},O.facets[U].data=O.facets[U].data||{},O.facets[U].data[k]=0})}),this.hierarchicalFacets=this.hierarchicalFacets.map(v(w)),this.facets=e(this.facets),this.disjunctiveFacets=e(this.disjunctiveFacets),this._state=w}s.prototype.getFacetByName=function(w){function S(x){return x.name===w}return r(this.facets,S)||r(this.disjunctiveFacets,S)||r(this.hierarchicalFacets,S)};function g(w,S){function x(A){return A.name===S}if(w._state.isConjunctiveFacet(S)){var I=r(w.facets,x);return I?Object.keys(I.data).map(function(A){var W=h(A);return{name:A,escapedValue:W,count:I.data[A],isRefined:w._state.isFacetRefined(S,W),isExcluded:w._state.isExcludeRefined(S,A)}}):[]}else if(w._state.isDisjunctiveFacet(S)){var O=r(w.disjunctiveFacets,x);return O?Object.keys(O.data).map(function(A){var W=h(A);return{name:A,escapedValue:W,count:O.data[A],isRefined:w._state.isDisjunctiveFacetRefined(S,W)}}):[]}else if(w._state.isHierarchicalFacet(S)){var M=r(w.hierarchicalFacets,x);if(!M)return M;var $=w._state.getHierarchicalFacetByName(S),q=w._state._getHierarchicalFacetSeparator($),N=d(w._state.getHierarchicalRefinement(S)[0]||"");N.indexOf($.rootPath)===0&&(N=N.replace($.rootPath+q,""));var j=N.split(q);return j.unshift(S),p(M,j,0),M}}function p(w,S,x){w.isRefined=w.name===(S[x]&&S[x].trim()),w.data&&w.data.forEach(function(I){p(I,S,x+1)})}function o(w,S,x,I){if(I=I||0,Array.isArray(S))return w(S,x[I]);if(!S.data||S.data.length===0)return S;var O=S.data.map(function(q){return o(w,q,x,I+1)}),M=w(O,x[I]),$=t({data:M},S);return $}
12s.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"];function l(w,S){return S.sort(w)}function y(w,S){var x=[],I=[],O=S.hide||[],M=S.order||[],$=M.reduce(function(j,A,W){return j[A]=W,j},{});w.forEach(function(j){var A=j.path||j.name,W=O.indexOf(A)>-1;!W&&$[A]!==void 0?x[$[A]]=j:W||I.push(j)}),x=x.filter(function(j){return j});var q=S.sortRemainingBy,N;return q==="hidden"?x:(q==="alpha"?N=[["path","name"],["asc","asc"]]:N=[["count"],["desc"]],x.concat(c(I,N[0],N[1])))}function R(w,S){return w.renderingContent&&w.renderingContent.facetOrdering&&w.renderingContent.facetOrdering.values&&w.renderingContent.facetOrdering.values[S]}s.prototype.getFacetValues=function(w,S){var x=g(this,w);if(x){var I=t(S,{sortBy:s.DEFAULT_SORT,facetOrdering:!(S&&S.sortBy)}),O=this,M;if(Array.isArray(x))M=[w];else{var $=O._state.getHierarchicalFacetByName(x.name);M=$.attributes}return o(function(q,N){var j=R(O,N);if(I.facetOrdering&&j)return y(q,j);if(Array.isArray(I.sortBy)){var A=i(I.sortBy,s.DEFAULT_SORT),W=c(q,A[0],A[1]),D=j&&j.hide?j.hide:[];if(D.length>0){var U=[];return W.forEach(function(k){var Q=k.path||k.name;D.indexOf(Q)===-1&&U.push(k)}),U}return W}else if(typeof I.sortBy=="function")return l(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 _(this.facets,w);if(this._state.isDisjunctiveFacet(w))return _(this.disjunctiveFacets,w)};function _(w,S){var x=r(w,function(I){return I.name===S});return x&&x.stats}s.prototype.getRefinements=function(){var w=this._state,S=this,x=[];return Object.keys(w.facetsRefinements).forEach(function(I){w.facetsRefinements[I].forEach(function(O){x.push(P(w,"facet",I,O,S.facets))})}),Object.keys(w.facetsExcludes).forEach(function(I){w.facetsExcludes[I].forEach(function(O){x.push(P(w,"exclude",I,O,S.facets))})}),Object.keys(w.disjunctiveFacetsRefinements).forEach(function(I){w.disjunctiveFacetsRefinements[I].forEach(function(O){x.push(P(w,"disjunctive",I,O,S.disjunctiveFacets))})}),Object.keys(w.hierarchicalFacetsRefinements).forEach(function(I){w.hierarchicalFacetsRefinements[I].forEach(function(O){x.push(F(w,I,O,S.hierarchicalFacets))})}),Object.keys(w.numericRefinements).forEach(function(I){var O=w.numericRefinements[I];Object.keys(O).forEach(function(M){O[M].forEach(function($){x.push({type:"numeric",attributeName:I,name:$,numericValue:$,operator:M})})})}),w.tagRefinements.forEach(function(I){x.push({type:"tag",attributeName:"_tags",name:I})}),x};function P(w,S,x,I,O){var M=r(O,function(N){return N.name===x}),$=M&&M.data&&M.data[I]?M.data[I]:0,q=M&&M.exhaustive||!1;return{type:S,attributeName:x,name:I,count:$,exhaustive:q}}function F(w,S,x,I){var O=w.getHierarchicalFacetByName(S),M=w._getHierarchicalFacetSeparator(O),$=x.split(M),q=r(I,function(D){return D.name===S}),N=$.reduce(function(D,U){var k=D&&r(D.data,function(Q){return Q.name===U});return k!==void 0?k:D},q),j=N&&N.count||0,A=N&&N.exhaustive||!1,W=N&&N.path||"";return{type:"hierarchical",attributeName:S,name:W,count:j,exhaustive:A}}return Or=s,Or}var Cr,Yi;function Qu(){return Yi||(Yi=1,Cr=function(t){return t.reduce(function(n,r){return n.concat(r)},[])}),Cr}var jr,Xi;function Vu(){if(Xi)return jr;Xi=1;var e=Wt(),t=Qu();function n(a,i){var u=[];return Object.keys(a).forEach(function(c){a[c].count<2&&(a[c].indexSum+=100),u.push({objectID:c,avgOfIndices:a[c].indexSum/i})}),u.sort(function(c,h){return c.avgOfIndices>h.avgOfIndices?1:-1})}function r(a,i){var u={};i.forEach(function(d){d.forEach(function(v,m){a.includes(v.objectID)||(u[v.objectID]?u[v.objectID]={indexSum:u[v.objectID].indexSum+m,count:u[v.objectID].count+1}:u[v.objectID]={indexSum:m,count:1})})});var c=n(u,i.length),h=c.reduce(function(d,v){var m=e(t(i),function(b){return b.objectID===v.objectID});return m?d.concat(m):d},[]);return h}return jr=r,jr}var Wr,Zi;function Bs(){return Zi||(Zi=1,Wr="3.29.2"),Wr}var $r,ea;function zu(){if(ea)return $r;ea=1;var e=Kn(),t=$u(),n=Jn().escapeFacetValue,r=Hs(),a=Yn(),i=Xn(),u=Zn(),c=Ms(),h=Ns(),d=Lu(),v=Ds(),m=ks(),b=Vu(),f=Bs();function s(o,l,y,R){typeof o.addAlgoliaAgent=="function"&&o.addAlgoliaAgent("JS Helper ("+f+")"),this.setClient(o);var _=y||{};_.index=l,this.state=v.make(_),this.recommendState=new c({params:_.recommendState}),this.lastResults=null,this.lastRecommendResults=null,this._queryId=0,this._recommendQueryId=0,this._lastQueryIdReceived=-1,this._lastRecommendQueryId
12Received=-1,this.derivedHelpers=[],this._currentNbQueries=0,this._currentNbRecommendQueries=0,this._searchResultsOptions=R,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 o=this.state;return d._getHitsSearchParams(o)},s.prototype.searchOnce=function(o,l){var y=o?this.state.setQueryParameters(o):this.state,R=d._getQueries(y.index,y),_=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:y}),l){this.client.search(R).then(function(P){_._currentNbQueries--,_._currentNbQueries===0&&_.emit("searchQueueEmpty"),l(null,new m(y,P.results),y)}).catch(function(P){_._currentNbQueries--,_._currentNbQueries===0&&_.emit("searchQueueEmpty"),l(P,null,y)});return}return this.client.search(R).then(function(P){return _._currentNbQueries--,_._currentNbQueries===0&&_.emit("searchQueueEmpty"),{content:new m(y,P.results),state:y,_originalResponse:P}},function(P){throw _._currentNbQueries--,_._currentNbQueries===0&&_.emit("searchQueueEmpty"),P})},s.prototype.findAnswers=function(o){console.warn("[algoliasearch-helper] answers is no longer supported");var l=this.state,y=this.derivedHelpers[0];if(!y)return Promise.resolve([]);var R=y.getModifiedState(l),_=a({attributesForPrediction:o.attributesForPrediction,nbHits:o.nbHits},{params:u(d._getHitsSearchParams(R),["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(R.index);if(typeof F.findAnswers!="function")throw new Error(P);return F.findAnswers(R.query,o.queryLanguages,_)},s.prototype.searchForFacetValues=function(o,l,y,R){var _=typeof this.client.searchForFacetValues=="function"&&typeof this.client.searchForFacets!="function",P=typeof this.client.initIndex=="function";if(!_&&!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(R||{}),w=F.isDisjunctiveFacet(o),S=d.getSearchForFacetQuery(o,l,y,F);this._currentNbQueries++;var x=this,I;_?I=this.client.searchForFacetValues([{indexName:F.index,params:S}]):P?I=this.client.initIndex(F.index).searchForFacetValues(S):(delete S.facetName,I=this.client.search([{type:"facet",facet:o,indexName:F.index,params:S}]).then(function($){return $.results[0]})),this.emit("searchForFacetValues",{state:F,facet:o,query:l});var O=this.lastResults&&this.lastResults.index===F.index&&this.lastResults.renderingContent&&this.lastResults.renderingContent.facetOrdering&&this.lastResults.renderingContent.facetOrdering.values&&this.lastResults.renderingContent.facetOrdering.values[o]&&this.lastResults.renderingContent.facetOrdering.values[o].hide||[];return I.then(function($){return x._currentNbQueries--,x._currentNbQueries===0&&x.emit("searchQueueEmpty"),$=Array.isArray($)?$[0]:$,$.facetHits=$.facetHits.reduce(function(q,N){return O.indexOf(N.value)>-1||(N.escapedValue=n(N.value),N.isRefined=w?F.isDisjunctiveFacetRefined(o,N.escapedValue):F.isFacetRefined(o,N.escapedValue),q.push(N)),q},[]),$},function(M){throw x._currentNbQueries--,x._currentNbQueries===0&&x.emit("searchQueueEmpty"),M})},s.prototype.searchForCompositionFacetValues=function(o,l,y,R){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 _=this.state.setQueryParameters(R||{}),P=_.isDisjunctiveFacet(o);this._currentNbQueries++;var F=this,w;return w=this.client.searchForFacetValues({compositionID:_.index,facetName:o,searchForFacetValuesRequest:{params:{query:l,maxFacetHits:y,searchQuery:d._getCompositionHitsSearchParams(_)}}}
12),this.emit("searchForFacetValues",{state:_,facet:o,query:l}),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?_.isDisjunctiveFacetRefined(o,I.escapedValue):_.isFacetRefined(o,I.escapedValue)}),x},function(S){throw F._currentNbQueries--,F._currentNbQueries===0&&F.emit("searchQueueEmpty"),S})},s.prototype.setQuery=function(o){return this._change({state:this.state.resetPage().setQuery(o),isPageReset:!0}),this},s.prototype.clearRefinements=function(o){return this._change({state:this.state.resetPage().clearRefinements(o),isPageReset:!0}),this},s.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},s.prototype.addDisjunctiveFacetRefinement=function(o,l){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(o,l),isPageReset:!0}),this},s.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},s.prototype.addHierarchicalFacetRefinement=function(o,l){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(o,l),isPageReset:!0}),this},s.prototype.addNumericRefinement=function(o,l,y){return this._change({state:this.state.resetPage().addNumericRefinement(o,l,y),isPageReset:!0}),this},s.prototype.addFacetRefinement=function(o,l){return this._change({state:this.state.resetPage().addFacetRefinement(o,l),isPageReset:!0}),this},s.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},s.prototype.addFacetExclusion=function(o,l){return this._change({state:this.state.resetPage().addExcludeRefinement(o,l),isPageReset:!0}),this},s.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},s.prototype.addTag=function(o){return this._change({state:this.state.resetPage().addTagRefinement(o),isPageReset:!0}),this},s.prototype.addFrequentlyBoughtTogether=function(o){return this._recommendChange({state:this.recommendState.addFrequentlyBoughtTogether(o)}),this},s.prototype.addRelatedProducts=function(o){return this._recommendChange({state:this.recommendState.addRelatedProducts(o)}),this},s.prototype.addTrendingItems=function(o){return this._recommendChange({state:this.recommendState.addTrendingItems(o)}),this},s.prototype.addTrendingFacets=function(o){return this._recommendChange({state:this.recommendState.addTrendingFacets(o)}),this},s.prototype.addLookingSimilar=function(o){return this._recommendChange({state:this.recommendState.addLookingSimilar(o)}),this},s.prototype.removeNumericRefinement=function(o,l,y){return this._change({state:this.state.resetPage().removeNumericRefinement(o,l,y),isPageReset:!0}),this},s.prototype.removeDisjunctiveFacetRefinement=function(o,l){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(o,l),isPageReset:!0}),this},s.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},s.prototype.removeHierarchicalFacetRefinement=function(o){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(o),isPageReset:!0}),this},s.prototype.removeFacetRefinement=function(o,l){return this._change({state:this.state.resetPage().removeFacetRefinement(o,l),isPageReset:!0}),this},s.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},s.prototype.removeFacetExclusion=function(o,l){return this._change({state:this.state.resetPage().removeExcludeRefinement(o,l),isPageReset:!0}),this},s.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},s.prototype.removeTag=function(o){return this._change({state:this.state.resetPage().removeTagRefinement(o),isPageReset:!0}),this},s.prototype.removeFrequentlyBoughtTogether=function(o){return this._recommendChange({state:this.recommendState.removeParams(o)}),this},s.prototype.removeRelatedProducts=function(o){return this._recommendChange({state:this.recommendState.removeParam
12s(o)}),this},s.prototype.removeTrendingItems=function(o){return this._recommendChange({state:this.recommendState.removeParams(o)}),this},s.prototype.removeTrendingFacets=function(o){return this._recommendChange({state:this.recommendState.removeParams(o)}),this},s.prototype.removeLookingSimilar=function(o){return this._recommendChange({state:this.recommendState.removeParams(o)}),this},s.prototype.toggleFacetExclusion=function(o,l){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(o,l),isPageReset:!0}),this},s.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},s.prototype.toggleRefinement=function(o,l){return this.toggleFacetRefinement(o,l)},s.prototype.toggleFacetRefinement=function(o,l){return this._change({state:this.state.resetPage().toggleFacetRefinement(o,l),isPageReset:!0}),this},s.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},s.prototype.toggleTag=function(o){return this._change({state:this.state.resetPage().toggleTagRefinement(o),isPageReset:!0}),this},s.prototype.nextPage=function(){var o=this.state.page||0;return this.setPage(o+1)},s.prototype.previousPage=function(){var o=this.state.page||0;return this.setPage(o-1)};function g(o){if(o<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(o),isPageReset:!1}),this}s.prototype.setCurrentPage=g,s.prototype.setPage=g,s.prototype.setIndex=function(o){return this._change({state:this.state.resetPage().setIndex(o),isPageReset:!0}),this},s.prototype.setQueryParameter=function(o,l){return this._change({state:this.state.resetPage().setQueryParameter(o,l),isPageReset:!0}),this},s.prototype.setState=function(o){return this._change({state:v.make(o),isPageReset:!1}),this},s.prototype.overrideStateWithoutTriggeringChangeEvent=function(o){return this.state=new v(o),this},s.prototype.hasRefinements=function(o){return i(this.state.getNumericRefinements(o))?!0:this.state.isConjunctiveFacet(o)?this.state.isFacetRefined(o):this.state.isDisjunctiveFacet(o)?this.state.isDisjunctiveFacetRefined(o):this.state.isHierarchicalFacet(o)?this.state.isHierarchicalFacetRefined(o):!1},s.prototype.isExcluded=function(o,l){return this.state.isExcludeRefined(o,l)},s.prototype.isDisjunctiveRefined=function(o,l){return this.state.isDisjunctiveFacetRefined(o,l)},s.prototype.hasTag=function(o){return this.state.isTagRefined(o)},s.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},s.prototype.getIndex=function(){return this.state.index};function p(){return this.state.page}return s.prototype.getCurrentPage=p,s.prototype.getPage=p,s.prototype.getTags=function(){return this.state.tagRefinements},s.prototype.getRefinements=function(o){var l=[];if(this.state.isConjunctiveFacet(o)){var y=this.state.getConjunctiveRefinements(o);y.forEach(function(F){l.push({value:F,type:"conjunctive"})});var R=this.state.getExcludeRefinements(o);R.forEach(function(F){l.push({value:F,type:"exclude"})})}else if(this.state.isDisjunctiveFacet(o)){var _=this.state.getDisjunctiveRefinements(o);_.forEach(function(F){l.push({value:F,type:"disjunctive"})})}var P=this.state.getNumericRefinements(o);return Object.keys(P).forEach(function(F){var w=P[F];l.push({value:w,operator:F,type:"numeric"})}),l},s.prototype.getNumericRefinement=function(o,l){return this.state.getNumericRefinement(o,l)},s.prototype.getHierarchicalFacetBreadcrumb=function(o){return this.state.getHierarchicalFacetBreadcrumb(o)},s.prototype._search=function(o){var l=this.state,y=[],R=[];o.onlyWithDerivedHelpers||(R=d._getQueries(l.index,l),y.push({state:l,queriesCount:R.length,helper:this}),this.emit("search",{state:l,results:this.lastResults}));var _=this.derivedHelpers.map(function(w){var S=w.getModifiedState(l),x=S.index?d._getQueries(S.index,S):[];return y.push({state:S,queriesCount:x.length,helper:w}),w.emit("search",{state:S,results:w.lastResults}),x}),P=Array.prototype.concat.apply(R,_),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 o=this.state,l=[],y=[],R=this.derivedHelpers.map(function(w){var S=w.getModifiedState(o),x=d._getCompositionQueries(S);return l.push({state:S,helper:w}),w.emit("search",{state:S,results:w.lastResults}),x}),_=Array.prototype.concat.apply(y,R),P=this._queryId++;if(this._currentNbQueries++,!_.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,l,P));if(_.length>1)throw new Error("Only one query is allowed when using a composition.");var F=_[0];try{this.client.search(F).then(this._dispatchAlgoliaResponse.bind(this,l,P)).catch(this._dispatchAlgoliaError.bind(this,P))}catch(w){this.emit("error",{error:w})}},s.prototype._recommend=function(){var o=this.state,l=this.recommendState,y=this.getIndex(),R=[{state:l,index:y,helper:this}],_=l.params.map(function(x){return x.$$id});this.emit("fetch",{recommend:{state:l,results:this.lastRecommendResults}});var P=this._recommendCache,F=this.derivedHelpers.map(function(x){var I=x.getModifiedState(o).index;if(!I)return[];var O=x.getModifiedRecommendState(new c);return R.push({state:O,index:I,helper:x}),_=Array.prototype.concat.apply(_,O.params.map(function(M){return M.$$id})),x.emit("fetch",{recommend:{state:O,results:x.lastRecommendResults}}),O._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 S=this._recommendQueryId++;this._currentNbRecommendQueries++;try{this.client.getRecommendations(w).then(this._dispatchRecommendResponse.bind(this,S,R,_)).catch(this._dispatchRecommendError.bind(this,S))}catch(x){this.emit("error",{error:x})}}},s.prototype._dispatchAlgoliaResponse=function(o,l,y){var R=this;if(!(l<this._lastQueryIdReceived)){this._currentNbQueries-=l-this._lastQueryIdReceived,this._lastQueryIdReceived=l,this._currentNbQueries===0&&this.emit("searchQueueEmpty");var _=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),o.forEach(function(F){var w=F.state,S=F.queriesCount,x=F.helper,I=S!==void 0?_.splice(0,S):_;if(!w.index){x.emit("result",{results:null,state:w});return}if(I.length>0&&I[0].feedID){var O=I.map(function(M){var $=new m(w,[M],R._searchResultsOptions);return P!==void 0&&($._rawContent=P),$});x.lastResults=new m(w,[I[0]],R._searchResultsOptions),x.lastResults.feeds=O,P!==void 0&&(x.lastResults._rawContent=P)}else x.lastResults=new m(w,I,R._searchResultsOptions),P!==void 0&&(x.lastResults._rawContent=P);x.emit("result",{results:x.lastResults,state:w})})}},s.prototype._dispatchRecommendResponse=function(o,l,y,R){if(!(o<this._lastRecommendQueryIdReceived)){this._currentNbRecommendQueries-=o-this._lastRecommendQueryIdReceived,this._lastRecommendQueryIdReceived=o,this._currentNbRecommendQueries===0&&this.emit("recommendQueueEmpty");var _=this._recommendCache,P={};y.filter(function(w){return _[w]===void 0}).forEach(function(w,S){P[w]||(P[w]=[]),P[w].push(S)}),Object.keys(P).forEach(function(w){var S=P[w],x=R.results[S[0]];if(S.length===1){_[w]=x;return}_[w]=Object.assign({},x,{hits:b(y,S.map(function(I){return R.results[I].hits}))})});var F={};y.forEach(function(w){F[w]=_[w]}),l.forEach(function(w){var S=w.state,x=w.helper;if(!w.index){x.emit("recommend:result",{results:null,state:S});return}x.lastRecommendResults=new h(S,F),x.emit("recommend:result",{recommend:{results:x.lastRecommendResults,state:S}})})}},s.prototype._dispatchAlgoliaError=function(o,l){o<this._lastQueryIdReceived||(this._currentNbQueries-=o-this._lastQueryIdReceived,this._lastQueryIdReceived=o,this.emit("error",{error:l}),this._currentNbQueries===0&&this.emit("searchQueueEmpty"))},s.prototype._dispatchRecommendError=function(o,l){o<this._lastRecommendQueryId
12Received||(this._currentNbRecommendQueries-=o-this._lastRecommendQueryIdReceived,this._lastRecommendQueryIdReceived=o,this.emit("error",{error:l}),this._currentNbRecommendQueries===0&&this.emit("recommendQueueEmpty"))},s.prototype.containsRefinement=function(o,l,y,R){return o||l.length!==0||y.length!==0||R.length!==0},s.prototype._hasDisjunctiveRefinements=function(o){return this.state.disjunctiveRefinements[o]&&this.state.disjunctiveRefinements[o].length>0},s.prototype._change=function(o){var l=o.state,y=o.isPageReset;l!==this.state&&(this.state=l,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:y}))},s.prototype._recommendChange=function(o){var l=o.state;l!==this.recommendState&&(this.recommendState=l,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(o){return this.client===o?this:(typeof o.addAlgoliaAgent=="function"&&o.addAlgoliaAgent("JS Helper ("+f+")"),this.client=o,this)},s.prototype.getClient=function(){return this.client},s.prototype.derive=function(o,l){var y=new t(this,o,l);return this.derivedHelpers.push(y),y},s.prototype.detachDerivedHelper=function(o){var l=this.derivedHelpers.indexOf(o);if(l===-1)throw new Error("Derived helper already detached");this.derivedHelpers.splice(l,1)},s.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},$r=s,$r}var Lr,ta;function Gu(){if(ta)return Lr;ta=1;var e=zu(),t=Ms(),n=Ns(),r=Ds(),a=ks();function i(u,c,h,d){return new e(u,c,h,d)}return i.version=Bs(),i.AlgoliaSearchHelper=e,i.SearchParameters=r,i.RecommendParameters=t,i.SearchResults=a,i.RecommendResults=n,Lr=i,Lr}var Ku=Gu();const se=Qn(Ku);function Ju(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 Fe(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=Ju(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 Yu(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 ti(e){return e.filter(function(t,n,r){return r.indexOf(t)===n})}var Xu=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=Fe(n,["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"]);return t.setQueryParameters(r)},Zu=function(t,n){return n.facets.reduce(function(r,a){return r.addFacet(a)},t)},ec=function(t,n){return n.disjunctiveFacets.reduce(function(r,a){return r.addDisjunctiveFacet(a)},t)},tc=function(t,n){return t.setQueryParameters({hierarchicalFacets:n.hierarchicalFacets.reduce(function(r,a){var i=Yu(r,function(c){return c.name===a.name});if(i===-1)return r.concat(a);var u=r.slice();return u.splice(i,1,a),u},t.hierarchicalFacets)})},rc=function(t,n){return n.tagRefinements.reduce(function(r,a){return r.addTagRefinement(a)},t)},nc=function(t,n){return t.setQueryParameters({facetsRefinements:E({},t.facetsRefinements,n.facetsRefinements)})},ic=function(t,n){return t.setQueryParameters({facetsExcludes:E({},t.facetsExcludes,n.facetsExcludes)})},ac=function(t,n){return t.setQueryParameters({disjunctiveFacetsRefinements:E({},t.disjunctiveFacetsRefinements,n.disjunctiveFacetsRefinements)})},sc=function(t,n){return t.setQueryParameters({numericRefinements:E({},t.numericRefinements,n.numericRefinements)})},oc=function(t,n){return t.setQueryParameters({hierarchicalFacetsRefinements:E({},t.hierarchicalFacetsRefinements,n.hierarchicalFacetsRefinements)})},uc=function(t,n){var r=ti([].concat(t.ruleContexts).concat(n.ruleContexts).filter(
12Boolean));return r.length>0?t.setQueryParameters({ruleContexts:r}):t},mt=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 u=oc(a,i),c=tc(u,i),h=rc(c,i),d=sc(h,i),v=ac(d,i),m=ic(v,i),b=nc(m,i),f=ec(b,i),s=uc(f,i),g=Zu(s,i);return Xu(g,i)})},cc=ge({name:"configure",connector:!0});function ra(e,t){return e.setQueryParameters(Object.keys(t.searchParameters).reduce(function(n,r){return T(E({},n),H({},r,void 0))},{}))}var Qs=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||!$s(r.searchParameters))throw new Error(cc("The `searchParameters` option expects an object."));var a={};function i(u){return function(c){var h=ra(u.state,r),d=mt(h,new se.SearchParameters(c));r.searchParameters=c,u.setState(d).search()}}return{$$type:"ais.configure",init:function(c){var h=c.instantSearchInstance;t(T(E({},this.getWidgetRenderState(c)),{instantSearchInstance:h}),!0)},render:function(c){var h=c.instantSearchInstance;t(T(E({},this.getWidgetRenderState(c)),{instantSearchInstance:h}),!1)},dispose:function(c){var h=c.state;return n(),ra(h,r)},getRenderState:function(c,h){var d,v=this.getWidgetRenderState(h);return T(E({},c),{configure:T(E({},v),{widgetParams:T(E({},v.widgetParams),{searchParameters:mt(new se.SearchParameters((d=c.configure)===null||d===void 0?void 0:d.widgetParams.searchParameters),new se.SearchParameters(v.widgetParams.searchParameters)).getQueryParams()})})})},getWidgetRenderState:function(c){var h=c.helper;return a.refine||(a.refine=i(h)),{refine:a.refine,widgetParams:r}},getWidgetSearchParameters:function(c,h){var d=h.uiState;return mt(c,new se.SearchParameters(E({},d.configure,r.searchParameters)))},getWidgetUiState:function(c){return T(E({},c),{configure:E({},c.configure,r.searchParameters)})}}}};function Vs(e,t){var n=Array.isArray(t)?t:t.split(".");return n.reduce(function(r,a){return r&&r[a]},e)}var na=ge({name:"configure-related-items",connector:!0});function ia(e){var t=e.attributeName,n=e.attributeValue,r=e.attributeScore;return"".concat(t,":").concat(n,"<score=").concat(r||1,">")}var lc=function(t,n){return function(r){var a=r||{},i=a.hit,u=a.matchingPatterns,c=a.transformSearchParameters,h=c===void 0?function(b){return b}:c;if(!i)throw new Error(na("The `hit` option is required."));if(!u)throw new Error(na("The `matchingPatterns` option is required."));var d=Object.keys(u).reduce(function(b,f){var s=u[f],g=Vs(i,f),p=s.score;return Array.isArray(g)?ce(b).concat([g.map(function(o){return ia({attributeName:f,attributeValue:o,attributeScore:p})})]):typeof g=="string"?ce(b).concat([ia({attributeName:f,attributeValue:g,attributeScore:p})]):b},[]),v=E({},h(new se.SearchParameters({sumOrFiltersScores:!0,facetFilters:["objectID:-".concat(i.objectID)],optionalFilters:d}))),m=Qs(t,n);return T(E({},m({searchParameters:v})),{$$type:"ais.configureRelatedItems"})}};function fc(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 Nt=ge({name:"dynamic-widgets",connector:!0}),dc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return ye(t,Nt()),function(r){var a=r.widgets,i=r.maxValuesPerFacet,u=i===void 0?20:i,c=r.facets,h=c===void 0?["*"]:c,d=r.transformItems,v=d===void 0?function(f){return f}:d,m=r.fallbackWidget;if(!(a&&Array.isArray(a)&&a.every(function(f){return(typeof f>"u"?"undefined":Ue(f))==="object"})))throw new Error(Nt("The `widgets` option expects an array of widgets."));if(!Array.isArray(h))throw new Error(Nt("The `facets` option only accepts an array of facets, you passed ".concat(JSON.stringify(h))));var b=new Map;return{$$type:"ais.dynamicWidgets",init:function(s){a.forEach(function(g){var p=fc(g,s);b.set(p,{widget:g,isMounted:!1})}),t(T(E({},this.getWidgetRenderState(s)),{instantSearchInstance:s.instantSearchInstance}),!0)},render:function(s){var g=s.parent,p=this.getWidgetRenderState(s),o=[],l=[];m&&p.attributesToRender.forEach(function(y){if(!b.has(y)){var R=m({attribute:y});b.set(y,{widget:R,isMounted:!1})}}),b.forEach(function(y,R){var _=y.widget,P=y.isMounted,F=p.attributesToRender.indexOf(R)>-1;!P&&F?(l.push(_),b.set(R,{widget:_,isMounted:!0})):P&&!F&&(o.push(_),b.set(R,{widget:_,isMounted:!1}))}),g.addWidgets(l),setTimeout(function(){return g.removeWidgets(o)},0),t(T(E({},p),{instantSearchInstance:s.instantSearchInstance}),!1)},dispose:function(s){var g=s.parent,p=[];b.forEach(function(o){var l=o.widget,y=o.isMounted;y&&p.push(l)}),g.removeWidgets(p),n()},getWidgetSearchParameters:function(s){return h.reduce(function(g,p){return g.addFacet(p)},s.setQueryParameters({maxValuesPerFacet:Math.max(u||0,s.maxValuesPerFacet||0)}))},getRenderState:function(s,g){return T(E({},s),{dynamicWidgets:this.getWidgetRenderState(g)})},getWidgetRenderState:function(s){var g=s.results;s.state;var p,o,l,y;if(!g)return{attributesToRender:[],widgetParams:r};var R=v((p=(y=g.renderingContent)===null||y===void 0||(l=y.facetOrdering)===null||l===void 0||(o=l.facets)===null||o===void 0?void 0:o.order)!==null&&p!==void 0?p:[],{results:g});if(!Array.isArray(R))throw new Error(Nt("The `transformItems` option expects a function that returns an Array."));return{attributesToRender:R,widgetParams:r}}}}};function hc(e){return typeof e=="string"?e.replace(/^\\-/,"-"):e}function Tt(e){return typeof e=="number"&&e<0||typeof e=="string"?String(e).replace(/^-/,"\\-"):e}function rt(e,t){for(var n,r=0;r<e.length;r++)if(n=e[r],t(n,r,e))return n}function Hr(e,t,n,r){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],i={type:t,attribute:n,name:r,escapedValue:Tt(r)},u=rt(a,function(f){return f.name===n}),c;if(t==="hierarchical"){for(var h=function(f){u=u&&u.data&&rt(Object.keys(u.data).map(m(u.data)),function(s){return s.name===v[f]})},d=e.getHierarchicalFacetByName(n),v=r.split(d.separator),m=function(s){return function(g){return s[g]}},b=0;u!==void 0&&b<v.length;++b)h(b);c=u&&u.count}else c=u&&u.data&&u.data[i.name];return c!==void 0&&(i.count=c),u&&u.exhaustive!==void 0&&(i.exhaustive=u.exhaustive),i}function ri(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=e||{},a=[],i=t.facetsRefinements,u=i===void 0?{}:i,c=t.facetsExcludes,h=c===void 0?{}:c,d=t.disjunctiveFacetsRefinements,v=d===void 0?{}:d,m=t.hierarchicalFacetsRefinements,b=m===void 0?{}:m,f=t.numericRefinements,s=f===void 0?{}:f,g=t.tagRefinements,p=g===void 0?[]:g;return Object.keys(u).forEach(function(o){var l=u[o];l.forEach(function(y){a.push(Hr(t,"facet",o,y,r.facets))})}
16),Object.keys(h).forEach(function(o){var l=h[o];l.forEach(function(y){a.push({type:"exclude",attribute:o,name:y,exclude:!0})})}),Object.keys(v).forEach(function(o){var l=v[o];l.forEach(function(y){a.push(Hr(t,"disjunctive",o,hc(y),r.disjunctiveFacets))})}),Object.keys(b).forEach(function(o){var l=b[o];l.forEach(function(y){a.push(Hr(t,"hierarchical",o,y,r.hierarchicalFacets))})}),Object.keys(s).forEach(function(o){var l=s[o];Object.keys(l).forEach(function(y){var R=y,_=l[R],P=Array.isArray(_)?_:[_];P.forEach(function(F){a.push({type:"numeric",attribute:o,name:"".concat(F),numericValue:F,operator:R})})})}),p.forEach(function(o){a.push({type:"tag",attribute:"_tags",name:o})}),n&&t.query&&t.query.trim()&&a.push({attribute:"query",type:"query",name:t.query,query:t.query}),a}function aa(e){var t=e.helper,n=e.attributesToClear,r=n===void 0?[]:n,a=t.state.setPage(0);return a=r.reduce(function(i,u){return a.isNumericRefined(u)?i.removeNumericRefinement(u):a.isHierarchicalFacet(u)?i.removeHierarchicalFacetRefinement(u):a.isDisjunctiveFacet(u)?i.removeDisjunctiveFacetRefinement(u):a.isConjunctiveFacet(u)?i.removeFacetRefinement(u):i},a),r.indexOf("query")!==-1&&(a=a.setQuery("")),a}var sa=ge({name:"clear-refinements",connector:!0}),gc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return ye(t,sa()),function(r){var a=r||{},i=a.includedAttributes,u=i===void 0?[]:i,c=a.excludedAttributes,h=c===void 0?["query"]:c,d=a.transformItems,v=d===void 0?function(s){return s}:d;if(r&&r.includedAttributes&&r.excludedAttributes)throw new Error(sa("The options `includedAttributes` and `excludedAttributes` cannot be used together."));var m={refine:he,createURL:function(){return""},attributesToClear:[]},b=function(){return m.refine()},f=function(){return m.createURL()};return{$$type:"ais.clearRefinements",init:function(g){var p=g.instantSearchInstance;t(T(E({},this.getWidgetRenderState(g)),{instantSearchInstance:p}),!0)},render:function(g){var p=g.instantSearchInstance;t(T(E({},this.getWidgetRenderState(g)),{instantSearchInstance:p}),!1)},dispose:function(){n()},getRenderState:function(g,p){return T(E({},g),{clearRefinements:this.getWidgetRenderState(p)})},getWidgetRenderState:function(g){var p=g.createURL,o=g.scopedResults,l=g.results;m.attributesToClear=o.reduce(function(R,_){return R.concat(mc({scopedResult:_,includedAttributes:u,excludedAttributes:h,transformItems:v,results:l}))},[]),m.refine=function(){m.attributesToClear.forEach(function(R){var _=R.helper,P=R.items;_.setState(aa({helper:_,attributesToClear:P})).search()})},m.createURL=function(){return p(mt.apply(void 0,ce(m.attributesToClear.map(function(R){var _=R.helper,P=R.items;return aa({helper:_,attributesToClear:P})}))))};var y=m.attributesToClear.some(function(R){return R.items.length>0});return{canRefine:y,hasRefinements:y,refine:b,createURL:f,widgetParams:r}}}}};function mc(e){var t=e.scopedResult,n=e.includedAttributes,r=e.excludedAttributes,a=e.transformItems,i=e.results,u=n.indexOf("query")!==-1||r.indexOf("query")===-1;return{helper:t.helper,items:a(ti(ri(t.results,t.helper.state,u).map(function(c){return c.attribute}).filter(function(c){return n.length===0||n.indexOf(c)!==-1}).filter(function(c){return c==="query"&&u||r.indexOf(c)===-1})),{results:i})}}var oa=ge({name:"current-refinements",connector:!0}),vc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return ye(t,oa()),function(r){if((r||{}).includedAttributes&&(r||{}).excludedAttributes)throw new Error(oa("The options `includedAttributes` and `excludedAttributes` cannot be used together."));var a=r||{},i=a.includedAttributes,u=a.excludedAttributes,c=u===void 0?["query"]:u,h=a.transformItems,d=h===void 0?function(v){return v}:h;return{$$type:"ais.currentRefinements",init:function(m){var b=m.instantSearchInstance;t(T(E({},this.getWidgetRenderState(m)),{instantSearchInstance:b}),!0)},render:function(m){var b=m.instantSearchInstance;t(T(E({},this.getWidgetRenderState(m)),{instantSearchInstance:b}),!1)},dispose:function(){n()},getRenderState:function(m,b){return T(E({},m),{currentRefinements:this.getWidgetRenderState(b)})},getWidgetRenderState:function(m){var b=m.results,f=m.scopedResults,s=m.createURL,g=m.helper;function p(){return b?f.reduce(function(l,y){return l.concat(d(ua({results:y.results,helper:y.helper,indexId:y.indexId,includedAttributes:i,excludedAttributes:c}),{results:b}))},[]):d(ua({results:null,helper:g,indexId:g.state.index,includedAttributes:i,excludedAttributes:c}),{results:b})}var o=p();return{items:o,canRefine:o.length>0,refine:function(y){return Gs(g,y)},createURL:function(y){return s(zs(g.state,y))},widgetParams:r}}}}};function ua(e){var t=e.results,n=e.helper,r=e.indexId,a=e.includedAttributes,i=e.excludedAttributes,u=(a||[]).indexOf("query")!==-1||(i||[]).indexOf("query")===-1,c=a?function(d){return a.indexOf(d.attribute)!==-1}:function(d){return i.indexOf(d.attribute)===-1},h=ri(t,n.state,u).map(yc).filter(c);return h.reduce(function(d,v){return ce(d.filter(function(m){return m.attribute!==v.attribute})).concat([{indexName:n.state.index,indexId:r,attribute:v.attribute,label:v.attribute,refinements:h.filter(function(m){return m.attribute===v.attribute}).sort(function(m,b){return m.type==="numeric"?m.value-b.value:0}),refine:function(b){return Gs(n,b)}}])},[])}function zs(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 Gs(e,t){e.setState(zs(e.state,t)).search()}function pc(e){switch(e){case">=":return"≥";case"<=":return"≤";default:return e}}function yc(e){var t=Sc(e),n=e.operator?"".concat(pc(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 Sc(e){return e.type==="numeric"?Number(e.name):"escapedValue"in e?e.escapedValue:e.name}function Rc(e){if(Array.isArray(e))return e}function bc(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],a=!0,i=!1,u,c;try{for(n=n.call(e);!(a=(u=n.next()).done)&&(r.push(u.value),!(t&&r.length===t));a=!0);}catch(h){i=!0,c=h}finally{try{!a&&n.return!=null&&n.return()}finally{if(i)throw c}}return r}}
16function _c(){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 ue(e,t){return Rc(e)||bc(e,t)||Cs(e,t)||_c()}function wc(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 ni(e){var t=e.instantSearchInstance,n=e.helper,r=e.attribute,a=e.widgetType,i=function(){for(var c=arguments.length,h=new Array(c),d=0;d<c;d++)h[d]=arguments[d];var v=ue(h,4),m=v[1],b=v[2],f=b===void 0?"Filter Applied":b,s=v[3],g=s===void 0?{}:s,p=ue(h[0].split(":"),2),o=p[0],l=p[1],y=typeof r=="string"?r:r(m);if(h.length===1&&Ue(h[0])==="object")t.sendEventToInsights(h[0]);else if(o==="click"&&h.length>=2&&h.length<=4&&!wc(n,y,m)){var R;t.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:a,eventType:o,eventModifier:l,payload:E({eventName:f,index:((R=n.lastResults)===null||R===void 0?void 0:R.index)||n.state.index,filters:["".concat(y,":").concat(m)]},g),attribute:y})}};return i}var Mr=ge({name:"hierarchical-menu",connector:!0}),ca=["name:asc"],Pc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return ye(t,Mr()),function(r){var a=r||{},i=a.attributes,u=a.separator,c=u===void 0?" > ":u,h=a.rootPath,d=h===void 0?null:h,v=a.showParentLevel,m=v===void 0?!0:v,b=a.limit,f=b===void 0?10:b,s=a.showMore,g=s===void 0?!1:s,p=a.showMoreLimit,o=p===void 0?20:p,l=a.sortBy,y=l===void 0?ca:l,R=a.transformItems,_=R===void 0?function(j){return j}:R;if(!i||!Array.isArray(i)||i.length===0)throw new Error(Mr("The `attributes` option expects an array of strings."));if(g===!0&&o<=f)throw new Error(Mr("The `showMoreLimit` option must be greater than `limit`."));var P=ue(i,1),F=P[0],w,S=function(){};function x(){S()}var I,O=!1;function M(j,A){return function(){O=!O,A.render(j)}}function $(){return O?o:f}function q(j){return j.slice(0,$()).map(function(A){var W=A.name,D=A.escapedValue,U=A.data;A.path;var k=Fe(A,["name","escapedValue","data","path"]),Q=T(E({},k),{value:D,label:W,data:null});return Array.isArray(U)&&(Q.data=q(U)),Q})}function N(j,A){var W=$();return!(A>W?j.length<=W:j.length<W)||j.slice(0,f).some(function(D){return Array.isArray(D.data)&&D.data.length>0&&N(D.data,A)})}return{$$type:"ais.hierarchicalMenu",init:function(A){var W=A.instantSearchInstance;t(T(E({},this.getWidgetRenderState(A)),{instantSearchInstance:W}),!0)},render:function(A){var W=A.instantSearchInstance;S=M(A,this),t(T(E({},this.getWidgetRenderState(A)),{instantSearchInstance:W}),!1)},dispose:function(A){var W=A.state;return n(),W.removeHierarchicalFacet(F).setQueryParameter("maxValuesPerFacet",void 0)},getRenderState:function(A,W){return T(E({},A),{hierarchicalMenu:T(E({},A.hierarchicalMenu),H({},F,this.getWidgetRenderState(W)))})},getWidgetRenderState:function(A){var W=this,D=A.results,U=A.state,k=A.createURL,Q=A.instantSearchInstance,J=A.helper,V=[],G=!1,Z=function(re){return k(function(ve){return W.getWidgetUiState(ve,{searchParameters:U.resetPage().toggleFacetRefinement(F,re),helper:J})})};if(w||(w=ni({instantSearchInstance:Q,helper:J,attribute:function(re){var ve=re.split(c).length-1;return i[ve]},widgetType:this.$$type})),I||(I=function(re){w("click:internal",re),J.toggleFacetRefinement(F,re).search()}),D){var ee=D.getFacetValues(F,{sortBy:y,facetOrdering:y===ca}),ne=ee&&!Array.isArray(ee)&&ee.data?ee.data:[],Y=N(ne,U.maxValuesPerFacet||0);G=g&&(O||Y),V=_(q(ne),{results:D})}return{items:V,refine:I,canRefine:V.length>0,createURL:Z,sendEvent:w,widgetParams:r,isShowingMore:O,toggleShowMore:x,canToggleShowMore:G}},getWidgetUiState:function(A,W){var D=W.searchParameters,U=D.getHierarchicalFacetBreadcrumb(F);return Fc(T(E({},A),{hierarchicalMenu:T(E({},A.hierarchicalMenu),H({}
17,F,U))}),F)},getWidgetSearchParameters:function(A,W){var D=W.uiState,U=D.hierarchicalMenu&&D.hierarchicalMenu[F];if(A.isConjunctiveFacet(F)||A.isDisjunctiveFacet(F))return A;A.isHierarchicalFacet(F)&&A.getHierarchicalFacetByName(F);var k=A.removeHierarchicalFacet(F).addHierarchicalFacet({name:F,attributes:i,separator:c,rootPath:d,showParentLevel:m}),Q=k.maxValuesPerFacet||0,J=Math.max(Q,g?o:f),V=k.setQueryParameter("maxValuesPerFacet",J);return U?V.addHierarchicalFacetRefinement(F,U.join(c)):V.setQueryParameters({hierarchicalFacetsRefinements:T(E({},V.hierarchicalFacetsRefinements),H({},F,[]))})}}}};function Fc(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 xc(e){return btoa(encodeURIComponent(JSON.stringify(e)))}function Ic(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 Ks(e){var t=e.helper,n=e.widgetType;e.methodName;var r=e.args,a=e.instantSearchInstance;if(r.length===1&&Ue(r[0])==="object")return[r[0]];var i=ue(r[0].split(":"),2),u=i[0],c=i[1],h=r[1],d=r[2],v=r[3]||{};if(!h)return[];if((u==="click"||u==="conversion")&&!d)return[];var m=Array.isArray(h)?h:[h];if(m.length===0)return[];var b=m[0].__queryID,f=Ic(m),s=f.map(function(p){return p.map(function(o){return o.objectID})}),g=f.map(function(p){return p.map(function(o){return o.__position})});return u==="view"?a.status!=="idle"?[]:f.map(function(p,o){var l;return{insightsMethod:"viewedObjectIDs",widgetType:n,eventType:u,payload:E({eventName:d||"Hits Viewed",index:((l=t.lastResults)===null||l===void 0?void 0:l.index)||t.state.index,objectIDs:s[o]},v),hits:p,eventModifier:c}}):u==="click"?f.map(function(p,o){var l;return{insightsMethod:"clickedObjectIDsAfterSearch",widgetType:n,eventType:u,payload:E({eventName:d||"Hit Clicked",index:((l=t.lastResults)===null||l===void 0?void 0:l.index)||t.state.index,queryID:b,objectIDs:s[o],positions:g[o]},v),hits:p,eventModifier:c}}):u==="conversion"?f.map(function(p,o){var l;return{insightsMethod:"convertedObjectIDsAfterSearch",widgetType:n,eventType:u,payload:E({eventName:d||"Hit Converted",index:((l=t.lastResults)===null||l===void 0?void 0:l.index)||t.state.index,queryID:b,objectIDs:s[o]},v),hits:p,eventModifier:c}}):[]}function ii(e){var t=e.instantSearchInstance,n=e.helper,r=e.widgetType,a={},i=void 0,u=function(){for(var h=arguments.length,d=new Array(h),v=0;v<h;v++)d[v]=arguments[v];var m=Ks({widgetType:r,helper:n,methodName:"sendEvent",args:d,instantSearchInstance:t});m.forEach(function(b){b.eventType==="click"&&b.eventModifier==="internal"&&a[b.eventType]||(a[b.eventType]=!0,t.sendEventToInsights(b))}),clearTimeout(i),i=setTimeout(function(){a={}},0)};return u}function Js(e){var t=e.helper,n=e.widgetType,r=e.instantSearchInstance,a=function(){for(var u=arguments.length,c=new Array(u),h=0;h<u;h++)c[h]=arguments[h];var d=Ks({widgetType:n,helper:t,methodName:"bindEvent",args:c,instantSearchInstance:r});return d.length?"data-insights-event=".concat(xc(d)):""};return a}var Ec=ge({name:"hits",connector:!0}),Ac=(function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return ye(t,Ec()),function(r){var a=r||{},i=a.escapeHTML,u=i===void 0?!0:i,c=a.transformItems,h=c===void 0?function(m){return m}:c,d,v;return{$$type:"ais.hits",init:function(b){t(T(E({},this.getWidgetRenderState(b)),{instantSearchInstance:b.instantSearchInstance}),!0)},render:function(b){var f=this.getWidgetRenderState(b);t(T(E({},f),{instantSearchInstance:b.instantSearchInstance}),!1),f.sendEvent("view:internal",f.items)},getRenderState:function(b,f){return T(E({},b),{hits:this.getWidgetRenderState(f)})},getWidgetRenderState:function(b){var f=b.results,s=b.helper,g=b.instantSearchInstance,p,o,l;if(d||(d=ii({instantSearchInstance:g,helper:s,widgetType:this.$$type})),v||(v=Js({helper:s,widgetType:this.$$type,instantSearchInstance:g})),!f)return{hits:[],items:[],results:void 0,banner:void 0,sendEvent:d,bindEvent:v,widgetParams:r};u&&f.hits.length>0&&(f.hits=Vn(f.hits));var y=zn(f.hits,f.page,f.hitsPerPage),R=Gn(y,f.queryID),_=h(R,{results:f}),P=(l=f.renderingContent)===null||l===void 0||(o=l.widgets)===null||o===void 0||(p=o.banners)===null||p===void 0?void 0:p[0];return{hits:_,items:_,results:f,banner:P,sendEvent:d,bindEvent:v,widgetParams:r}},dispose:function(b){var f=b.state;return n(),u?f.setQueryParameters(Object.keys(Be).reduce(function(s,g){return T(E({},s),H({},g,void 0))},{})):f},getWidgetSearchParameters:function(b,f){return u?b.setQueryParameters(Be):b}}}}),Tc=function(t,n){return n.map(function(r){var a=rt(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})},Oc=function(t){var n=ti(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},Cc=function(t){return t.map(function(n){return n.__position})},jc=function(t){var n=t.method,r=t.results,a=t.hits,i=t.objectIDs,u=r.index,c=Tc(a,i),h=Oc(c);switch(n){case"clickedObjectIDsAfterSearch":{var d=Cc(c);return{index:u,queryID:h,objectIDs:i,positions:d}}case"convertedObjectIDsAfterSearch":return{index:u,queryID:h,objectIDs:i};default:throw new Error('Unsupported method passed to insights: "'.concat(n,'".'))}},Wc=function(t,n,r){return function(a){for(var i=arguments.length,u=new Array(i>1?i-1:0),c=1;c<i;c++)u[c-1]=arguments[c];var h=ue(u,1),d=h[0];if(!t){var v=ge({name:"instantsearch"});throw new Error(v("The `insightsClient` option has not been provided to `instantsearch`."))}if(!Array.isArray(d.objectIDs))throw new TypeError("Expected `objectIDs` to be an array.");var m=jc({method:a,results:n,hits:r,objectIDs:d.objectIDs});t(a,E({},m,d))}};function Ys(e){return function(t,n){return e(function(r,a){var i=r.results,u=r.hits,c=r.instantSearchInstance;if(i&&u&&c){var h=Wc(c.insightsClient,i,u);return t(T(E({},r),{insights:h}),a)}return t(r,a)},n)}}var $c=Ys(Ac),Dt=ge({name:"hits-per-page",connector:!0}),Lc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return ye(t,Dt()),function(r){var a=r||{},i=a.items,u=a.transformItems,c=u===void 0?function(f){return f}:u;if(!Array.isArray(i))throw new Error(Dt("The `items` option expects an array of objects."));var h=i,d=h.filter(function(f){return f.default===!0});if(d.length===0)throw new Error(Dt("A default value must be specified in `items`."));if(d.length>1)throw new Error(Dt("More than one default value is specified in `items`."));var v=d[0],m=function(s){var g=s.hitsPerPage;return h.map(function(p){return T(E({},p),{isRefined:Number(p.value)===Number(g)})})},b={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,p=s.createURL,o=s.getWidgetUiState,l=s.helper;return function(y){return p(function(R){return o(R,{searchParameters:g.resetPage().setQueryParameter("hitsPerPage",!y&&y!==0?void 0:y),helper:l})})}}};return{$$type:"ais.hitsPerPage",init:function(s){var g=s.state,p=s.instantSearchInstance,o=h.some(function(l){return Number(g.hitsPerPage)===Number(l.value)});o||(h=[{value:"",label:""}].concat(ce(h))),t(T(E({},this.getWidgetRenderState(s)),{instantSearchInstance:p}),!0)},render:function(s){var g=s.instantSearchInstance;t(T(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 T(E({},s),{hitsPerPage:this.getWidgetRenderState(g)})},getWidgetRenderState:function(s){var g=s.state,p=s.results,o=s.createURL,l=s.helper,y=p?p.nbHits>0:!1;return{items:c(m(g),{results:p}),refine:b.getRefine(l),createURL:b.createURLFactory({state:g,createURL:o,getWidgetUiState:this.getWidgetUiState,helper:l}),hasNoResults:!y,canRefine:y,widgetParams:r}},getWidgetUiState:function(s,g){var p=g.searchParameters,o=p.hitsPerPage;return o===void 0||o===v.value?s:T(E({},s),{hitsPerPage:o})},getWidgetSearchParameters:function(s,g){var p=g.uiState;return s.setQueryParameters({hitsPerPage:p.hitsPerPage||v.value})}}}};function Hc(e){return e.$$type==="ais.dynamicWidgets"||e.$$type==="ais.feeds"}var Mc=["ais.index","ais.feedContainer"];function ke(e){return Mc.includes(e.$$type)}function Xs(e,t){t(e),e.getWidgets().forEach(function(n){ke(n)&&Xs(n,t)})}function la(e){return e!==Object(e)}function ai(e,t){if(e===t)return!0;if(la(e)||la(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](),u;!(n=(u=i.next()).done);
17n=!0){var c=u.value;if(!(c in t)||!ai(e[c],t[c]))return!1}}catch(h){r=!0,a=h}finally{try{!n&&i.return!=null&&i.return()}finally{if(r)throw a}}return!0}var Nc=ge({name:"infinite-hits",connector:!0});function fa(e){var t=e||{};t.page;var n=Fe(t,["page"]);return n}function da(e){var t=e||{};t.clickAnalytics,t.userToken;var n=Fe(t,["clickAnalytics","userToken"]);return n}function Dc(){var e=null,t=null;return{read:function(r){var a=r.state;return ai(t,fa(a))?e:null},write:function(r){var a=r.state,i=r.hits;t=fa(a),e=i}}}function Uc(e){return Object.keys(e).map(Number).sort(function(t,n){return t-n}).reduce(function(t,n){return t.concat(e[n])},[])}var qc=(function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return ye(t,Nc()),function(r){var a=r||{},i=a.escapeHTML,u=i===void 0?!0:i,c=a.transformItems,h=c===void 0?function(y){return y}:c,d=a.cache,v=d===void 0?Dc():d,m,b,f,s,g=function(R,_){var P=R.page,F=P===void 0?0:P,w=Object.keys(_).map(Number);if(w.length===0)return F;var S;return(S=Math).min.apply(S,[F].concat(ce(w)))},p=function(R,_){var P=R.page,F=P===void 0?0:P,w=Object.keys(_).map(Number);if(w.length===0)return F;var S;return(S=Math).max.apply(S,[F].concat(ce(w)))},o=function(R,_){return function(){var P=_();R.overrideStateWithoutTriggeringChangeEvent(T(E({},R.state),{page:g(R.state,P)-1})).searchWithoutTriggeringOnStateChange()}},l=function(R,_){return function(){var P=_();R.setPage(p(R.state,P)+1).search()}};return{$$type:"ais.infiniteHits",init:function(R){t(T(E({},this.getWidgetRenderState(R)),{instantSearchInstance:R.instantSearchInstance}),!0)},render:function(R){var _=R.instantSearchInstance,P=this.getWidgetRenderState(R);t(T(E({},P),{instantSearchInstance:_}),!1),f("view:internal",P.currentPageHits)},getRenderState:function(R,_){return T(E({},R),{infiniteHits:this.getWidgetRenderState(_)})},getWidgetRenderState:function(R){var _=R.results,P=R.helper,F=R.parent,w=R.state,S=R.instantSearchInstance,x,I,O,M=function(){var ie=F.getPreviousState()||w;return v.read({state:da(ie)})||{}},$,q=[],N=F.getPreviousState()||w,j=M(),A=_==null||(O=_.renderingContent)===null||O===void 0||(I=O.widgets)===null||I===void 0||(x=I.banners)===null||x===void 0?void 0:x[0];if(m||(m=function(){return o(P,M)()},b=function(){return l(P,M)()}),f||(f=ii({instantSearchInstance:S,helper:P,widgetType:this.$$type}),s=Js({helper:P,widgetType:this.$$type,instantSearchInstance:S})),!_)$=N.page===void 0||g(N,j)===0;else{var W,D,U=N.page,k=U===void 0?0:U;u&&_.hits.length>0&&(_.hits=Vn(_.hits));var Q=zn(_.hits,_.page,_.hitsPerPage),J=Gn(Q,_.queryID),V=h(J,{results:_}),G=!1;Xs(S.mainIndex,function(Y){!G&&Y.getWidgets().some(Hc)&&(G=!0)});var Z=!(!((W=N.disjunctiveFacets)===null||W===void 0)&&W.length)&&!(N.facets||[]).filter(function(Y){return Y!=="*"}).length&&!(!((D=N.hierarchicalFacets)===null||D===void 0)&&D.length);j[k]===void 0&&!_.__isArtificial&&S.status==="idle"&&!(G&&Z)&&(j[k]=V,v.write({state:da(N),hits:j})),q=V,$=g(N,j)===0}var ee=Uc(j),ne=_?_.nbPages<=p(N,j)+1:!0;return{hits:ee,items:ee,currentPageHits:q,sendEvent:f,bindEvent:s,banner:A,results:_||void 0,showPrevious:m,showMore:b,isFirstPage:$,isLastPage:ne,widgetParams:r}},dispose:function(R){var _=R.state;n();var P=_.setQueryParameter("page",void 0);return u?P.setQueryParameters(Object.keys(Be).reduce(function(F,w){return T(E({},F),H({},w,void 0))},{})):P},getWidgetUiState:function(R,_){var P=_.searchParameters,F=P.page||0;return F?T(E({},R),{page:F+1}):R},getWidgetSearchParameters:function(R,_){var P=_.uiState,F=R;u&&(F=R.setQueryParameters(Be));var w=P.page?P.page-1:0;return F.setQueryParameter("page",w)}}}}),kc=Ys(qc),Nr=ge({name:"menu",connector:!0}),ha=["isRefined","name:asc"],Zs=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return ye(t,Nr()),function(r){var a=r||{},i=a.attribute,u=a.limit,c=u===void 0?10:u,h=a.showMore,d=h===void 0?!1:h,v=a.showMoreLimit,m=v===void 0?20:v,b=a.sortBy,f=b===void 0?ha:b,s=a.transformItems,g=s===void 0?function(w){return w}:s;
17if(!i)throw new Error(Nr("The `attribute` option is required."));if(d===!0&&m<=c)throw new Error(Nr("The `showMoreLimit` option must be greater than `limit`."));var p,o,l,y=!1,R=function(){};function _(w,S){return function(){y=!y,S.render(w)}}function P(){R()}function F(){return y?m:c}return{$$type:"ais.menu",init:function(S){var x=S.instantSearchInstance;t(T(E({},this.getWidgetRenderState(S)),{instantSearchInstance:x}),!0)},render:function(S){var x=S.instantSearchInstance;t(T(E({},this.getWidgetRenderState(S)),{instantSearchInstance:x}),!1)},dispose:function(S){var x=S.state;return n(),x.removeHierarchicalFacet(i).setQueryParameter("maxValuesPerFacet",void 0)},getRenderState:function(S,x){return T(E({},S),{menu:T(E({},S.menu),H({},i,this.getWidgetRenderState(x)))})},getWidgetRenderState:function(S){var x=this,I=S.results,O=S.createURL,M=S.instantSearchInstance,$=S.helper,q=[],N=!1;if(p||(p=ni({instantSearchInstance:M,helper:$,attribute:i,widgetType:this.$$type})),o||(o=function(D){return O(function(U){return x.getWidgetUiState(U,{searchParameters:$.state.resetPage().toggleFacetRefinement(i,D),helper:$})})}),l||(l=function(D){var U=ue($.getHierarchicalFacetBreadcrumb(i),1),k=U[0];p("click:internal",D||k),$.toggleFacetRefinement(i,D||k).search()}),S.results&&(R=_(S,this)),I){var j=I.getFacetValues(i,{sortBy:f,facetOrdering:f===ha}),A=j&&!Array.isArray(j)&&j.data?j.data:[];N=d&&(y||A.length>F()),q=g(A.slice(0,F()).map(function(W){var D=W.name,U=W.escapedValue;W.path;var k=Fe(W,["name","escapedValue","path"]);return T(E({},k),{label:D,value:U})}),{results:I})}return{items:q,createURL:o,refine:l,sendEvent:p,canRefine:q.length>0,widgetParams:r,isShowingMore:y,toggleShowMore:P,canToggleShowMore:N}},getWidgetUiState:function(S,x){var I=x.searchParameters,O=ue(I.getHierarchicalFacetBreadcrumb(i),1),M=O[0];return Bc(T(E({},S),{menu:T(E({},S.menu),H({},i,M))}),i)},getWidgetSearchParameters:function(S,x){var I=x.uiState,O=I.menu&&I.menu[i];if(S.isConjunctiveFacet(i)||S.isDisjunctiveFacet(i))return S;var M=S.removeHierarchicalFacet(i).addHierarchicalFacet({name:i,attributes:[i]}),$=M.maxValuesPerFacet||0,q=Math.max($,d?m:c),N=M.setQueryParameter("maxValuesPerFacet",q);return O?N.addHierarchicalFacetRefinement(i,O):N.setQueryParameters({hierarchicalFacetsRefinements:T(E({},N.hierarchicalFacetsRefinements),H({},i,[]))})}}}};function Bc(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}),Qc="ais.numericMenu",Vc=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}}},zc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return ye(t,Dr()),function(r){var a=r||{},i=a.attribute,u=i===void 0?"":i,c=a.items,h=c===void 0?[]:c,d=a.transformItems,v=d===void 0?function(f){return f}:d;if(u==="")throw new Error(Dr("The `attribute` option is required."));if(!h||h.length===0)throw new Error(Dr("The `items` option expects an array of objects."));var m=function(s){return h.map(function(g){var p=g.start,o=g.end,l=g.label;return{label:l,value:encodeURI(JSON.stringify({start:p,end:o})),isRefined:eo(s,u,{start:p,end:o})}})},b={};return{$$type:Qc,init:function(s){var g=s.instantSearchInstance;t(T(E({},this.getWidgetRenderState(s)),{instantSearchInstance:g}),!0)},render:function(s){var g=s.instantSearchInstance;t(T(E({},this.getWidgetRenderState(s)),{instantSearchInstance:g}),!1)},dispose:function(s){var g=s.state;return n(),g.removeNumericRefinement(u)},getWidgetUiState:function(s,g){var p=g.searchParameters,o=p.getNumericRefinements(u),l=o["="]&&o["="][0];if(l||l===0)return T(E({},s),{numericMenu:T(E({},s.numericMenu),H({},u,"".concat(o["="])))});var y=o[">="]&&o[">="][0]||"",R=o["<="]&&o["<="][0]||"";return Gc(T(E({},s),{numericMenu:T(E({},s.numericMenu),H({},u,"".concat(y,":").concat(R)))}),u)},getWidgetSearchParameters:function(s,g){var p=g.uiState,o=p.numericMenu&&p.numericMenu[u],l=s.setQueryParameters({numericRefinements:T(E({},s.numericRefinements),H({},u,{}))});if(!o)return l;var y=o.indexOf(":")===-1;if(y)return l.addNumericRefinement(u,"=",Number(o));var R=ue(o.split(":").map(parseFloat),2),_=R[0],P=R[1],F=fe(_)?l.addNumericRefinement(u,">=",_):l,w=fe(P)?F.addNumericRefinement(u,"<=",P):F;return w},getRenderState:function(s,g){return T(E({},s),{numericMenu:T(E({},s.numericMenu),H({},u,this.getWidgetRenderState(g)))})},getWidgetRenderState:function(s){var g=this,p=s.results,o=s.state,l=s.instantSearchInstance,y=s.helper,R=s.createURL;b.refine||(b.refine=function($){var q=ga(y.state,u,$);b.sendEvent("click:internal",$),y.setState(q).search()}),b.createURL||(b.createURL=function($){return function(q){return R(function(N){return g.getWidgetUiState(N,{searchParameters:ga($,u,q),helper:y})})}}
17),b.sendEvent||(b.sendEvent=Vc({instantSearchInstance:l}));var _=p?p.nbHits===0:!0,P=m(o),F=!0,w=!0,S=!1,x=void 0;try{for(var I=P[Symbol.iterator](),O;!(w=(O=I.next()).done);w=!0){var M=O.value;if(M.isRefined&&decodeURI(M.value)!=="{}"){F=!1;break}}}catch($){S=!0,x=$}finally{try{!w&&I.return!=null&&I.return()}finally{if(S)throw x}}return{createURL:b.createURL(o),items:v(P,{results:p}),hasNoResults:_,canRefine:!(_&&F),refine:b.refine,sendEvent:b.sendEvent,widgetParams:r}}}}};function eo(e,t,n){var r=e.getNumericRefinements(t);return n.start!==void 0&&n.end!==void 0?n.start===n.end?Xe(r,"=",n.start):Xe(r,">=",n.start)&&Xe(r,"<=",n.end):n.start!==void 0?Xe(r,">=",n.start):n.end!==void 0?Xe(r,"<=",n.end):n.start===void 0&&n.end===void 0?Object.keys(r).every(function(a){return(r[a]||[]).length===0}):!1}function ga(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(eo(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 Xe(i,"=",a.start)?r=r.removeNumericRefinement(t,"=",a.start):r=r.addNumericRefinement(t,"=",a.start),r}return a.start!==void 0&&(Xe(i,">=",a.start)&&(r=r.removeNumericRefinement(t,">=",a.start)),r=r.addNumericRefinement(t,">=",a.start)),a.end!==void 0&&(Xe(i,"<=",a.end)&&(r=r.removeNumericRefinement(t,"<=",a.end)),r=r.addNumericRefinement(t,"<=",a.end)),typeof r.page=="number"&&(r.page=0),r}function Xe(e,t,n){var r=e[t];return r!==void 0&&r.includes(n)}function Gc(e,t){return e.numericMenu&&(e.numericMenu[t]===":"&&delete e.numericMenu[t],Object.keys(e.numericMenu).length===0&&delete e.numericMenu),e}function si(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Kc(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 oi(e,t,n){return t&&Kc(e.prototype,t),e}function ma(e){var t=e.start,n=t===void 0?0:t,r=e.end,a=e.step,i=a===void 0?1:a,u=i===0?1:i,c=Math.round((r-n)/u);return ce(Array(c)).map(function(h,d){return n+d*u})}var Jc=(function(){function e(t){si(this,e),H(this,"currentPage",void 0),H(this,"total",void 0),H(this,"padding",void 0),this.currentPage=t.currentPage,this.total=t.total,this.padding=t.padding}return oi(e,[{key:"pages",value:function(){var n=this,r=n.total,a=n.currentPage,i=n.padding;if(r===0)return[0];var u=this.nbPagesDisplayed(i,r);if(u===r)return ma({end:r});var c=this.calculatePaddingLeft(a,i,r,u),h=u-c,d=a-c,v=a+h;return ma({start:d,end:v})}},{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})(),Yc=ge({name:"pagination",connector:!0}),Xc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return ye(t,Yc()),function(r){var a=r||{},i=a.totalPages,u=a.padding,c=u===void 0?3:u,h=new Jc({currentPage:0,total:0,padding:c}),d={};function v(m){var b=m.nbPages;return i!==void 0?Math.min(i,b):b}return{$$type:"ais.pagination",init:function(b){var f=b.instantSearchInstance;t(T(E({},this.getWidgetRenderState(b)),{instantSearchInstance:f}),!0)},render:function(b){var f=b.instantSearchInstance;t(T(E({},this.getWidgetRenderState(b)),{instantSearchInstance:f}),!1)},dispose:function(b){var f=b.state;return n(),f.setQueryParameter("page",void 0)},getWidgetUiState:function(b,f){var s=f.searchParameters,g=s.page||0;return g?T(E({},b),{page:g+1}):b},getWidgetSearchParameters:function(b,f){var s=f.uiState,g=s.page?s.page-1:0;return b.setQueryParameter("page",g)},getWidgetRenderState:function(b){var f=b.results,s=b.helper,g=b.state,p=b.createURL;d.refine||(d.refine=function(y){s.setPage(y),s.search()}),d.createURL||(d.createURL=function(y){return p(function(R){return T(E({},R),{page:y+1})})});var o=g.page||0,l=v(f||{nbPages:0});return h.currentPage=o,h.total=l,{createURL:d.createURL,refine:d.refine,canRefine:l>1,currentRefinement:o,nbHits:f?.nbHits||0,nbPages:l,pages:f?h.pages():[],isFirstPage:h.isFirstPage(),isLastPage:h.isLastPage(),widgetParams:r}},getRenderState:function(b,f){return T(E({},b),{pagination:this.getWidgetRenderState(f)})}}}},Ur=ge({name:"range-input",connector:!0},{name:"range-slider",connector:!0}),Zc="ais.range";function va(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 el=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return ye(t,Ur()),function(r){var a=r||{},i=a.attribute,u=i===void 0?"":i,c=a.min,h=a.max,d=a.precision,v=d===void 0?0:d;if(!u)throw new Error(Ur("The `attribute` option is required."));if(fe(c)&&fe(h)&&c>h)throw new Error(Ur("The `max` option can't be lower than `min`."));var m=function(y){return Number(Number(y).toFixed(v))}
17,b={from:function(y){return y.toLocaleString()},to:function(y){return m(y).toLocaleString()}},f=function(y,R,_,P){var F=y.state,w=R.min,S=R.max,x=ue(F.getNumericRefinement(u,">=")||[],1),I=x[0],O=ue(F.getNumericRefinement(u,"<=")||[],1),M=O[0],$=_===void 0||_==="",q=P===void 0||P==="",N=va({min:$?void 0:parseFloat(_),max:q?void 0:parseFloat(P),precision:v}),j=N.min,A=N.max,W;!fe(c)&&w===j?W=void 0:fe(c)&&$?W=c:W=j;var D;!fe(h)&&S===A?D=void 0:fe(h)&&q?D=h:D=A;var U=W===void 0,k=fe(w)&&w<=W,Q=U||fe(W)&&(!fe(w)||k),J=D===void 0,V=fe(D)&&S>=D,G=J||fe(D)&&(!fe(S)||V),Z=I!==W,ee=M!==D;return(Z||ee)&&Q&&G?(F=F.removeNumericRefinement(u),fe(W)&&(F=F.addNumericRefinement(u,">=",W)),fe(D)&&(F=F.addNumericRefinement(u,"<=",D)),F.resetPage()):null},s=function(y){return function(){for(var R=arguments.length,_=new Array(R),P=0;P<R;P++)_[P]=arguments[P];if(_.length===1){y.sendEventToInsights(_[0]);return}}};function g(l){var y;fe(c)?y=c:fe(l.min)?y=l.min:y=0;var R;return fe(h)?R=h:fe(l.max)?R=l.max:R=0,va({min:y,max:R,precision:v})}function p(l){var y=ue(l.getNumericRefinement(u,">=")||[],1),R=y[0],_=ue(l.getNumericRefinement(u,"<=")||[],1),P=_[0],F=fe(R)?R:-1/0,w=fe(P)?P:1/0;return[F,w]}function o(l,y){return function(){var R=ue(arguments.length>0&&arguments[0]!==void 0?arguments[0]:[void 0,void 0],2),_=R[0],P=R[1],F=f(l,y,_,P);F&&l.setState(F).search()}}return{$$type:Zc,init:function(y){t(T(E({},this.getWidgetRenderState(y)),{instantSearchInstance:y.instantSearchInstance}),!0)},render:function(y){t(T(E({},this.getWidgetRenderState(y)),{instantSearchInstance:y.instantSearchInstance}),!1)},getRenderState:function(y,R){return T(E({},y),{range:T(E({},y.range),H({},u,this.getWidgetRenderState(R)))})},getWidgetRenderState:function(y){var R=y.results,_=y.helper,P=y.instantSearchInstance,F=R&&R.disjunctiveFacets||[],w=rt(F,function(M){return M.name===u}),S=w&&w.stats||{min:void 0,max:void 0},x=g(S),I=p(_),O;return R?O=o(_,x):O=o(_,{min:void 0,max:void 0}),{refine:O,canRefine:x.min!==x.max,format:b,range:x,sendEvent:s(P),widgetParams:T(E({},r),{precision:v}),start:I}},dispose:function(y){var R=y.state;return n(),R.removeDisjunctiveFacet(u).removeNumericRefinement(u)},getWidgetUiState:function(y,R){var _=R.searchParameters,P=_.getNumericRefinements(u),F=P[">="],w=F===void 0?[]:F,S=P["<="],x=S===void 0?[]:S;return w.length===0&&x.length===0?y:T(E({},y),{range:T(E({},y.range),H({},u,"".concat(w,":").concat(x)))})},getWidgetSearchParameters:function(y,R){var _=R.uiState,P=y.addDisjunctiveFacet(u).setQueryParameters({numericRefinements:T(E({},y.numericRefinements),H({},u,{}))});fe(c)&&(P=P.addNumericRefinement(u,">=",c)),fe(h)&&(P=P.addNumericRefinement(u,"<=",h));var F=_.range&&_.range[u];if(!F||F.indexOf(":")===-1)return P;var w=ue(F.split(":").map(parseFloat),2),S=w[0],x=w[1];return fe(S)&&(!fe(c)||c<S)&&(P=P.removeNumericRefinement(u,">="),P=P.addNumericRefinement(u,">=",S)),fe(x)&&(!fe(h)||x<h)&&(P=P.removeNumericRefinement(u,"<="),P=P.addNumericRefinement(u,"<=",x)),P}}}},Ut=ge({name:"refinement-list",connector:!0}),pa=["isRefined","count:desc","name:asc"],tl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return ye(t,Ut()),function(r){var a=r||{},i=a.attribute,u=a.operator,c=u===void 0?"or":u,h=a.limit,d=h===void 0?10:h,v=a.showMore,m=v===void 0?!1:v,b=a.showMoreLimit,f=b===void 0?20:b,s=a.sortBy,g=s===void 0?pa:s,p=a.escapeFacetValues,o=p===void 0?!0:p,l=a.transformItems,y=l===void 0?function(j){return j}:l;if(!i)throw new Error(Ut("The `attribute` option is required."));if(!/^(and|or)$/.test(c))throw new Error(Ut('The `operator` must one of: `"and"`, `"or"` (got "'.concat(c,'").')));if(m===!0&&f<=d)throw new Error(Ut("`showMoreLimit` should be greater than `limit`."));var R=function(A){var W=A.name,D=A.escapedValue,U=Fe(A,["name","escapedValue"]);return T(E({},U),{value:D,label:W,highlighted:W})},_,P=[],F=!0,w,S,x=!1,I=function(){};function O(){I()}function M(j,A){return function(){x=!x,A.render(j)}}function $(){return x?f:d}var q=function(){return function(){}},N=function(A,W){return function(D){return function(U){var k=D.instantSearchInstance,Q=D.results;if(U===""&&P)t(T(E({},W.getWidgetRenderState(T(E({},D),{results:_}))),{instantSearchInstance:k}),!1);else{var J={highlightPreTag:o?Be.highlightPreTag:pt.highlightPreTag,highlightPostTag:o?Be.highlightPostTag:pt.highlightPostTag};A.searchForFacetValues(i,U,Math.min($(),100),J).then(function(V){var G=o?Wu(V.facetHits):V.facetHits,Z=y(G.map(function(ee){var ne=ee.escapedValue,Y=ee.value,ie=Fe(ee,["escapedValue","value"]);return T(E({},ie),{value:ne,label:Y})}),{results:Q});t(T(E({},W.getWidgetRenderState(T(E({},D),{results:_}))),{items:Z,canToggleShowMore:!1,canRefine:!0,isFromSearch:!0,instantSearchInstance:k}),!1)})}}}};return{$$type:"ais.refinementList",init:function(A){t(T(E({},this.getWidgetRenderState(A)),{instantSearchInstance:A.instantSearchInstance}),!0)},render:function(A){t(T(E({},this.getWidgetRenderState(A)),{instantSearchInstance:A.instantSearchInstance}),!1)},getRenderState:function(A,W){return T(E({},A),{refinementList:T(E({},A.refinementList),H({},i,this.getWidgetRenderState(W)))})},getWidgetRenderState:function(A){var W=this,D=A.results,U=A.state,k=A.createURL,Q=A.instantSearchInstance,J=A.helper,V=[],G=[];if((!S||!w||!q)&&(S=ni({instantSearchInstance:Q,helper:J,attribute:i,widgetType:this.$$type}),w=function(Se){S("click:internal",Se),J.toggleFacetRefinement(i,Se).search()},q=N(J,this)),D){var Z=D.getFacetValues(i,{sortBy:g,facetOrdering:g===pa});G=Z&&Array.isArray(Z)?Z:[],V=y(G.slice(0,$()).map(R),{results:D});var ee=U.maxValuesPerFacet,ne=$();F=ee>
17ne?G.length<=ne:G.length<ne,_=D,P=V,A.results&&(I=M(A,this))}var Y=q&&q(A),ie=x&&P.length>d,re=m&&!F,ve=ie||re;return{createURL:function(Se){return k(function(we){return W.getWidgetUiState(we,{searchParameters:U.resetPage().toggleFacetRefinement(i,Se),helper:J})})},items:V,refine:w,searchForItems:Y,isFromSearch:!1,canRefine:V.length>0,widgetParams:r,isShowingMore:x,canToggleShowMore:ve,toggleShowMore:O,sendEvent:S,hasExhaustiveItems:F}},dispose:function(A){var W=A.state;n();var D=W.setQueryParameter("maxValuesPerFacet",void 0);return c==="and"?D.removeFacet(i):D.removeDisjunctiveFacet(i)},getWidgetUiState:function(A,W){var D=W.searchParameters,U=c==="or"?D.getDisjunctiveRefinements(i):D.getConjunctiveRefinements(i);return rl(T(E({},A),{refinementList:T(E({},A.refinementList),H({},i,U))}),i)},getWidgetSearchParameters:function(A,W){var D=W.uiState,U=c==="or";if(A.isHierarchicalFacet(i)||U&&A.isConjunctiveFacet(i)||!U&&A.isDisjunctiveFacet(i))return A;var k=D.refinementList&&D.refinementList[i],Q=U?A.addDisjunctiveFacet(i).removeDisjunctiveFacetRefinement(i):A.addFacet(i).removeFacetRefinement(i),J=Q.maxValuesPerFacet||0,V=Math.max(J,m?f:d),G=Q.setQueryParameter("maxValuesPerFacet",V);if(!k){var Z=U?"disjunctiveFacetsRefinements":"facetsRefinements";return G.setQueryParameters(H({},Z,T(E({},G[Z]),H({},i,[]))))}return k.reduce(function(ee,ne){return U?ee.addDisjunctiveFacetRefinement(i,ne):ee.addFacetRefinement(i,ne)},G)}}}};function rl(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 nl=ge({name:"search-box",connector:!0}),il=function(t,n){return n(t)},al=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return ye(t,nl()),function(r){var a=r||{},i=a.queryHook,u=i===void 0?il:i,c,h;return{$$type:"ais.searchBox",init:function(v){var m=v.instantSearchInstance;t(T(E({},this.getWidgetRenderState(v)),{instantSearchInstance:m}),!0)},render:function(v){var m=v.instantSearchInstance;t(T(E({},this.getWidgetRenderState(v)),{instantSearchInstance:m}),!1)},dispose:function(v){var m=v.state;return n(),m.setQueryParameter("query",void 0)},getRenderState:function(v,m){return T(E({},v),{searchBox:this.getWidgetRenderState(m)})},getWidgetRenderState:function(v){var m=v.helper,b=v.instantSearchInstance,f=v.state;return c||(c=function(g){u(g,function(p){return m.setQuery(p).search()})},h=function(){m.setQuery("").search()}),{query:f.query||"",refine:c,clear:h,widgetParams:r,isSearchStalled:b.status==="stalled"}},getWidgetUiState:function(v,m){var b=m.searchParameters,f=b.query||"";return f===""||v&&v.query===f?v:T(E({},v),{query:f})},getWidgetSearchParameters:function(v,m){var b=m.uiState;return v.setQueryParameter("query",b.query||"")}}}},bt=ge({name:"sort-by",connector:!0});function ui(e){return"strategy"in e&&e.strategy!==void 0}function qr(e){return ui(e)?e.strategy:e.value}function kr(e,t){if(!t)return!1;var n=e[t];return n!==void 0&&ui(n)}var sl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;ye(t,bt());var r={};return function(a){var i=a||{},u=i.items,c=i.transformItems,h=c===void 0?function(v){return v}:c;if(!Array.isArray(u))throw new Error(bt("The `items` option expects an array of objects."));var d={};return u.forEach(function(v,m){var b="value"in v&&v.value!==void 0,f="strategy"in v&&v.strategy!==void 0;if(b&&f)throw new Error(bt("Item at index ".concat(m,' cannot have both "value" and "strategy" properties.')));if(!b&&!f)throw new Error(bt("Item at index ".concat(m,' must have either a "value" or "strategy" property.')));var s=qr(v);d[s]=v}),r.itemsLookup=d,{$$type:"ais.sortBy",init:function(m){var b=m.instantSearchInstance,f=u.some(function(p){return"strategy"in p&&p.strategy});if(f&&!b.compositionID)throw new Error(bt('Sorting strategies can only be used in composition mode. Please provide a "compositionID" to your InstantSearch instance.'));var s=this.getWidgetRenderState(m),g=s.currentRefinement;rt(u,function(p){return qr(p)===g}),t(T(E({},s),{instantSearchInstance:b}),!0)},render:function(m){var b=m.instantSearchInstance;t(T(E({},this.getWidgetRenderState(m)),{instantSearchInstance:b}),!1)},dispose:function(m){var b=m.state;return n(),r.isUsingComposition&&b.sortBy&&(b=b.setQueryParameter("sortBy",void 0)),r.initialValue&&b.index!==r.initialValue?b.setIndex(r.initialValue):b},getRenderState:function(m,b){return T(E({},m),{sortBy:this.getWidgetRenderState(b)})},getWidgetRenderState:function(m){var b=m.results,f=m.helper,s=m.state,g=m.parent,p=m.instantSearchInstance;!r.initialValue&&g&&(r.initialValue=g.getIndexName()),r.refine||(r.isUsingComposition=!!p?.compositionID,r.refine=function(_){var P=r.itemsLookup[_];P&&ui(P)?f.setQueryParameter("sortBy",P.strategy).search():f.setQueryParameter("sortBy",void 0).setIndex(_).search()});var o=h(u,{results:b}),l=o.map(function(_){return{label:_.label,value:qr(_)}}),y=r.isUsingComposition&&kr(r.itemsLookup,s.sortBy)?s.sortBy:s.index,R=b?b.nbHits===0:!0;return{currentRefinement:y,options:l,refine:r.refine,hasNoResults:R,canRefine:!R&&u.length>0,widgetParams:a}},getWidgetUiState:function(m,b){var f=b.searchParameters,s=r.isUsingComposition&&kr(r.itemsLookup,f.sortBy)?f.sortBy:f.index;return T(E({},m),{sortBy:s!==r.initialValue?s:void 0})},getWidgetSearchParameters:function(m,b){var f=b.uiState,s=!f.sortBy||Object.prototype.hasOwnProperty.call(r.itemsLookup,f.sortBy),g=(s?f.sortBy:void 0)||r.initialValue||m.index;if(kr(r.itemsLookup,g)){var p=r.itemsLookup[g];return m.setQueryParameter("sortBy",p.strategy)}return m.setQueryParameter("index",g)}}}},ya=ge({name:"rating-menu",connector:!0}),to="ais.ratingMenu",qt=1,ol=function(t){var n=t.instantSearchInstance,r=t.helper,a=t.getRefinedStar,i=t.attribute;return function(){for(var u=arguments.length,c=new Array(u),h=0;h<u;h++)c[h]=arguments[h];if(c.length===1){n.sendEventToInsights(c[0]);return}var d=ue(c,3),v=d[1],m=d[2],b=m===void 0?"Filter Applied":m,f=ue(c[0].split(":"),2),s=f[0],g=f[1];if(s==="click"){var p=a()===Number(v);if(!p){var o;n.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:to,eventType:s,eventModifier:g,payload:{eventName:b,index:((o=r.lastResults)===null||o===void 0?void 0:o.index)||r.state.index,filters:["".concat(i,">=").concat(v)]},attribute:i})}}}},ul=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return ye(t,ya()),function(r){var a=r||{},i=a.attribute,u=a.max,c=u===void 0?5:u,h;if(!i)throw new Error(ya("The `attribute` option is required."));var d=function(g){var p,o=g.getNumericRefinements(i);if(!((p=o[">="])===null||p===void 0)&&p.length)return o[">="][0]},v=function(g){var p=0;return g.forEach(function(o){var l=ue(o.name.split("."),2),y=l[1],R=y===void 0?"":y;p=Math.max(p,R.length)}),p};function m(s,g){var p=d(s)===Number(g),o=s.resetPage().removeNumericRefinement(i);return p?o:o.addNumericRefinement(i,"<=",c).addNumericRefinement(i,">=",Number(g))}var b=function(g,p){h("click:internal",p),g.setState(m(g.state,p)).search()},f={toggleRefinementFactory:function(g){return b.bind(null,g)},createURLFactory:function(g){var p=g.state,o=g.createURL,l=g.getW
17idgetUiState,y=g.helper;return function(R){return o(function(_){return l(_,{searchParameters:m(p,R),helper:y})})}}};return{$$type:to,init:function(g){var p=g.instantSearchInstance;t(T(E({},this.getWidgetRenderState(g)),{instantSearchInstance:p}),!0)},render:function(g){var p=g.instantSearchInstance;t(T(E({},this.getWidgetRenderState(g)),{instantSearchInstance:p}),!1)},getRenderState:function(g,p){return T(E({},g),{ratingMenu:T(E({},g.ratingMenu),H({},i,this.getWidgetRenderState(p)))})},getWidgetRenderState:function(g){var p=g.helper,o=g.results,l=g.state,y=g.instantSearchInstance,R=g.createURL,_=[];h||(h=ol({instantSearchInstance:y,helper:p,getRefinedStar:function(){return d(p.state)},attribute:i}));var P=!1,F=0,w=o?.getFacetValues(i,{});if(o&&w){var S=function(M){var $=x===M;P=P||$;var q=w.filter(function(j){return Number(j.name)>=M&&Number(j.name)<=c}).map(function(j){return j.count}).reduce(function(j,A){return j+A},0);if(F+=q,x&&!$&&q===0)return"continue";var N=ce(new Array(Math.floor(c/qt))).map(function(j,A){return A*qt<M});_.push({stars:N,name:String(M),label:String(M),value:String(M),count:q,isRefined:$})};w.length,v(w);for(var x=d(l),I=qt;I<c;I+=qt)S(I)}_=_.reverse();var O=o?o.nbHits===0:!0;return{items:_,hasNoResults:O,canRefine:(!O||P)&&F>0,refine:f.toggleRefinementFactory(p),sendEvent:h,createURL:f.createURLFactory({state:l,createURL:R,helper:p,getWidgetUiState:this.getWidgetUiState}),widgetParams:r}},dispose:function(g){var p=g.state;return n(),p.removeNumericRefinement(i)},getWidgetUiState:function(g,p){var o=p.searchParameters,l=d(o);return cl(T(E({},g),{ratingMenu:T(E({},g.ratingMenu),H({},i,typeof l=="number"?l:void 0))}),i)},getWidgetSearchParameters:function(g,p){var o=p.uiState,l=o.ratingMenu&&o.ratingMenu[i],y=g.addDisjunctiveFacet(i).removeNumericRefinement(i).removeDisjunctiveFacetRefinement(i);return l?y.addNumericRefinement(i,"<=",c).addNumericRefinement(i,">=",l):y.setQueryParameters({numericRefinements:T(E({},y.numericRefinements),H({},i,{}))})}}}};function cl(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 ll=ge({name:"stats",connector:!0}),fl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return ye(t,ll()),function(r){return{$$type:"ais.stats",init:function(i){var u=i.instantSearchInstance;t(T(E({},this.getWidgetRenderState(i)),{instantSearchInstance:u}),!0)},render:function(i){var u=i.instantSearchInstance;t(T(E({},this.getWidgetRenderState(i)),{instantSearchInstance:u}),!1)},dispose:function(){n()},getRenderState:function(i,u){return T(E({},i),{stats:this.getWidgetRenderState(u)})},getWidgetRenderState:function(i){var u=i.results,c=i.state;return u?{hitsPerPage:u.hitsPerPage,nbHits:u.nbHits,nbSortedHits:u.nbSortedHits,areHitsSorted:typeof u.appliedRelevancyStrictness<"u"&&u.appliedRelevancyStrictness>0&&u.nbSortedHits!==u.nbHits,nbPages:u.nbPages,page:u.page,processingTimeMS:u.processingTimeMS,query:u.query,widgetParams:r}:{hitsPerPage:c.hitsPerPage,nbHits:0,nbSortedHits:void 0,areHitsSorted:!1,nbPages:0,page:c.page||0,processingTimeMS:-1,query:c.query||"",widgetParams:r}}}}};function Br(e){return Array.isArray(e)?e:[e]}var Sa=ge({name:"toggle-refinement",connector:!0}),ro="ais.toggleRefinement",dl=function(t){var n=t.instantSearchInstance,r=t.helper,a=t.attribute,i=t.on,u=function(){for(var h=arguments.length,d=new Array(h),v=0;v<h;v++)d[v]=arguments[v];if(d.length===1){n.sendEventToInsights(d[0]);return}var m=ue(d,3),b=m[1],f=m[2],s=f===void 0?"Filter Applied":f,g=ue(d[0].split(":"),2),p=g[0],o=g[1];if(!(p!=="click"||i===void 0)&&!b){var l;n.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:ro,eventType:p,eventModifier:o,payload:{eventName:s,index:((l=r.lastResults)===null||l===void 0?void 0:l.index)||r.state.index,filters:i.map(function(y){return"".concat(a,":").concat(y)})},attribute:a})}};return u},hl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return ye(t,Sa()),function(r){var a=r||{},i=a.attribute,u=a.on,c=u===void 0?!0:u,h=a.off;if(!i)throw new Error(Sa("The `attribute` option is required."));var d=h!==void 0,v=Br(c).map(Tt),m=d?Br(h).map(Tt):void 0,b,f=function(p){return function(){var o=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{isRefined:!1}).isRefined;o?(v.forEach(function(l){return p.removeDisjunctiveFacetRefinement(i,l)}),d&&m.forEach(function(l){return p.addDisjunctiveFacetRefinement(i,l)})):(b("click:internal",o),d&&m.forEach(function(l){return p.removeDisjunctiveFacetRefinement(i,l)}),v.forEach(function(l){return p.addDisjunctiveFacetRefinement(i,l)})),p.search()}},s={createURLFactory:function(p,o){var l=o.state,y=o.createURL,R=o.getWidgetUiState,_=o.helper;return function(){l=l.resetPage();var P=p?v:m;P&&P.forEach(function(w){l=l.removeDisjunctiveFacetRefinement(i,w)});var F=p?m:v;return F&&F.forEach(function(w){l=l.addDisjunctiveFacetRefinement(i,w)}),y(function(w){return R(w,{searchParameters:l,helper:_})})}}};return{$$type:ro,init:function(p){var o=p.instantSearchInstance;t(T(E({},this.getWidgetRenderState(p)),{instantSearchInstance:o}),!0)},render:function(p){var o=p.instantSearchInstance;t(T(E({},this.getWidgetRenderState(p)),{instantSearchInstance:o}),!1)},dispose:function(p){var o=p.state;return n(),o.removeDisjunctiveFacet(i)},getRenderState:function(p,o){return T(E({},p),{toggleRefinement:T(E({},p.toggleRefinement),H({},i,this.getWidgetRenderState(o)))})},getWidgetRenderState:function(p){var o=p.state,l=p.helper,y=p.results,R=p.createURL,_=p.instantSearchInstance,P=y?v.every(function($){return o.isDisjunctiveFacetRefined(i,$)}):v.every(function($){return o.isDisjunctiveFacetRefined(i,$)}),F={isRefined:P,count:0},w={isRefined:d&&!P,count:0};if(y){var S=Br(m||!1),x=y.getFacetValues(i,{}
17)||[],I=v.map(function($){return rt(x,function(q){var N=q.escapedValue;return N===Tt(String($))})}).filter(function($){return $!==void 0}),O=d?S.map(function($){return rt(x,function(q){var N=q.escapedValue;return N===Tt(String($))})}).filter(function($){return $!==void 0}):[];F={isRefined:I.length?I.every(function($){return $.isRefined}):!1,count:I.reduce(function($,q){return $+q.count},0)||null},w={isRefined:O.length?O.every(function($){return $.isRefined}):!1,count:O.reduce(function($,q){return $+q.count},0)||x.reduce(function($,q){var N=q.count;return $+N},0)}}b||(b=dl({instantSearchInstance:_,attribute:i,on:v,helper:l}));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:o,createURL:R,helper:l,getWidgetUiState:this.getWidgetUiState}),sendEvent:b,canRefine:!!(y&&M.count),refine:f(l),widgetParams:r}},getWidgetUiState:function(p,o){var l=o.searchParameters,y=v&&v.every(function(_){return l.isDisjunctiveFacetRefined(i,_)});if(!y){var R;return(R=p.toggle)===null||R===void 0||delete R[i],p}return T(E({},p),{toggle:T(E({},p.toggle),H({},i,y))})},getWidgetSearchParameters:function(p,o){var l=o.uiState;if(p.isHierarchicalFacet(i)||p.isConjunctiveFacet(i))return p;var y=p.addDisjunctiveFacet(i).removeDisjunctiveFacetRefinement(i),R=!!(l.toggle&&l.toggle[i]);return R?(v&&v.forEach(function(_){y=y.addDisjunctiveFacetRefinement(i,_)}),y):d?(m&&m.forEach(function(_){y=y.addDisjunctiveFacetRefinement(i,_)}),y):y.setQueryParameters({disjunctiveFacetsRefinements:T(E({},p.disjunctiveFacetsRefinements),H({},i,[]))})}}}},Ra=ge({name:"breadcrumb",connector:!0}),gl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;ye(t,Ra());var r={};return function(a){var i=a||{},u=i.attributes,c=i.separator,h=c===void 0?" > ":c,d=i.rootPath,v=d===void 0?null:d,m=i.transformItems,b=m===void 0?function(p){return p}:m;if(!u||!Array.isArray(u)||u.length===0)throw new Error(Ra("The `attributes` option expects an array of strings."));var f=ue(u,1),s=f[0];function g(p,o){if(!o){var l=p.getHierarchicalFacetBreadcrumb(s);return l.length===0?p:p.resetPage().toggleFacetRefinement(s,l[0])}return p.resetPage().toggleFacetRefinement(s,o)}return{$$type:"ais.breadcrumb",init:function(o){t(T(E({},this.getWidgetRenderState(o)),{instantSearchInstance:o.instantSearchInstance}),!0)},render:function(o){t(T(E({},this.getWidgetRenderState(o)),{instantSearchInstance:o.instantSearchInstance}),!1)},dispose:function(){n()},getRenderState:function(o,l){return T(E({},o),{breadcrumb:T(E({},o.breadcrumb),H({},s,this.getWidgetRenderState(l)))})},getWidgetRenderState:function(o){var l=this,y=o.helper,R=o.createURL,_=o.results,P=o.state;function F(){if(!_||P.hierarchicalFacets.length===0)return[];var S=_.getFacetValues(s,{}),x=S&&!Array.isArray(S)&&S.data?S.data:[],I=b(ml(no(x)),{results:_});return I}var w=F();return r.createURL||(r.createURL=function(S){return R(function(x){return l.getWidgetUiState(x,{searchParameters:g(y.state,S),helper:y})})}),r.refine||(r.refine=function(S){y.setState(g(y.state,S)).search()}),{canRefine:w.length>0,createURL:r.createURL,items:w,refine:r.refine,widgetParams:a}},getWidgetUiState:function(o,l){var y=l.searchParameters,R=y.getHierarchicalFacetBreadcrumb(s);return vl(T(E({},o),{hierarchicalMenu:T(E({},o.hierarchicalMenu),H({},s,R))}),s)},getWidgetSearchParameters:function(o,l){var y=l.uiState,R=y.hierarchicalMenu&&y.hierarchicalMenu[s];if(o.isConjunctiveFacet(s)||o.isDisjunctiveFacet(s))return o;o.isHierarchicalFacet(s)&&o.getHierarchicalFacetByName(s);var _=o.removeHierarchicalFacet(s).addHierarchicalFacet({name:s,attributes:u,separator:h,rootPath:v});return R?_.addHierarchicalFacetRefinement(s,R.join(h)):_.setQueryParameters({hierarchicalFacetsRefinements:T(E({},_.hierarchicalFacetsRefinements),H({},s,[]))})}}}};function no(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(no(n.data)))),t},[])}function ml(e){return e.map(function(t,n){return{label:t.label,value:n+1===e.length?null:e[n+1].value}})}function vl(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 pl=ge({name:"autocomplete",connector:!0}),yl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return ye(t,pl()),function(r){var a=r||{},i=a.escapeHTML,u=i===void 0?!0:i,c=a.transformItems,h=c===void 0?function(p){return p}:c,d=a.requiresSearch,v=d===void 0?!0:d,m=a.future,b=m===void 0?{}:m,f=b.undefinedEmptyQuery,s=f===void 0?!1:f,g={};return{$$type:"ais.autocomplete",dependsOn:v?"search":"none",shouldRender:v?void 0:function(){return!0},init:function(o){var l=o.instantSearchInstance;t(T(E({},this.getWidgetRenderState(o)),{instantSearchInstance:l}),!0)},render:function(o){var l=o.instantSearchInstance,y=this.getWidgetRenderState(o);
17y.indices.forEach(function(R){var _=R.sendEvent,P=R.hits;_("view:internal",P)}),t(T(E({},y),{instantSearchInstance:l}),!1)},getRenderState:function(o,l){return T(E({},o),{autocomplete:this.getWidgetRenderState(l)})},getWidgetRenderState:function(o){var l=this,y=o.helper,R=o.state,_=o.scopedResults,P=o.instantSearchInstance;g.refine||(g.refine=function(S){y.setQuery(S).search()});var F={},w=_.map(function(S){var x;S.results&&(S.results.hits=u?Vn(S.results.hits):S.results.hits),F[S.indexId]=ii({instantSearchInstance:P,helper:S.helper,widgetType:l.$$type});var I=S.results?Gn(zn(S.results.hits,S.results.page,S.results.hitsPerPage),S.results.queryID):[];return{indexId:S.indexId,indexName:((x=S.results)===null||x===void 0?void 0:x.index)||"",hits:I,results:S.results||{}}});return{currentRefinement:s?R.query:R.query||"",indices:h(w).map(function(S){return T(E({},S),{sendEvent:F[S.indexId]})}),refine:g.refine,widgetParams:r}},getWidgetUiState:function(o,l){var y=l.searchParameters,R=s?y.query:y.query||"";return!R||R===""||o&&o.query===R?o:T(E({},o),{query:R})},getWidgetSearchParameters:function(o,l){var y=l.uiState,R={query:s?y.query:y.query||""};return u?o.setQueryParameters(E({},R,Be)):o.setQueryParameters(R)},dispose:function(o){var l=o.state;n();var y=l.setQueryParameter("query",void 0);return u?y.setQueryParameters(Object.keys(Be).reduce(function(R,_){return T(E({},R),H({},_,void 0))},{})):y}}}},ba=ge({name:"query-rules",connector:!0});function Sl(e){return[e.disjunctiveFacetsRefinements,e.facetsRefinements,e.hierarchicalFacetsRefinements,e.numericRefinements].some(function(t){return!!(t&&Object.keys(t).length>0)})}function Rl(e){return e.replace(/[^a-z0-9-_]+/gi,"_")}function bl(e){var t=e.helper,n=e.sharedHelperState,r=e.trackedFilters,a=Object.keys(r).reduce(function(i,u){var c=ri(t.lastResults||{},n,!0).filter(function(v){return v.attribute===u}).map(function(v){return v.numericValue||v.name}),h=r[u],d=h(c);return ce(i).concat(ce(c.filter(function(v){return d.includes(v)}).map(function(v){return Rl("ais-".concat(u,"-").concat(v))})))},[]);return a}function _l(e){var t=this,n=t.helper,r=t.initialRuleContexts,a=t.trackedFilters,i=t.transformRuleContexts,u=e.state,c=u.ruleContexts||[],h=bl({helper:n,sharedHelperState:u,trackedFilters:a}),d=ce(r).concat(ce(h)),v=i(d).slice(0,10);ai(c,v)||n.overrideStateWithoutTriggeringChangeEvent(T(E({},u),{ruleContexts:v}))}var io=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return ye(t,ba()),function(r){var a=r||{},i=a.trackedFilters,u=i===void 0?{}:i,c=a.transformRuleContexts,h=c===void 0?function(s){return s}:c,d=a.transformItems,v=d===void 0?function(s){return s}:d;Object.keys(u).forEach(function(s){if(typeof u[s]!="function")throw new Error(ba(`'The "`.concat(s,'" filter value in the `trackedFilters` option expects a function.')))});var m=Object.keys(u).length>0,b=[],f;return{$$type:"ais.queryRules",init:function(g){var p=g.helper,o=g.state,l=g.instantSearchInstance;b=o.ruleContexts||[],f=_l.bind({helper:p,initialRuleContexts:b,trackedFilters:u,transformRuleContexts:h}),m&&((Sl(o)||r.transformRuleContexts)&&f({state:o}),p.on("change",f)),t(T(E({},this.getWidgetRenderState(g)),{instantSearchInstance:l}),!0)},render:function(g){var p=g.instantSearchInstance;t(T(E({},this.getWidgetRenderState(g)),{instantSearchInstance:p}),!1)},getWidgetRenderState:function(g){var p=g.results,o=p||{},l=o.userData,y=l===void 0?[]:l,R=v(y,{results:p});return{items:R,widgetParams:r}},getRenderState:function(g,p){return T(E({},g),{queryRules:this.getWidgetRenderState(p)})},dispose:function(g){var p=g.helper,o=g.state;return n(),m?(p.removeListener("change",f),o.setQueryParameter("ruleContexts",b)):o}}}},wl=function(t){var n=t.searchAsYouSpeak,r=t.language,a=t.onQueryChange,i=t.onStateChange,u=window.webkitSpeechRecognition||window.SpeechRecognition,c=function(F){return{status:F,transcript:"",isSpeechFinal:!1,errorCode:void 0}},h=c("initial"),d,v=function(){return!!u},m=function(){return h.status==="askingPermission"||h.status==="waiting"||h.status==="recognizing"},b=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};h=E({},h,F),i()},f=function(){return h},s=function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"initial";b(c(F))},g=function(){b({status:"waiting"})},p=function(F){b({status:"error",errorCode:F.error})},o=function(F){b({status:"recognizing",transcript:F.results[0]&&F.results[0][0]&&F.results[0][0].transcript||"",isSpeechFinal:F.results[0]&&F.results[0].isFinal}),n&&h.transcript&&a(h.transcript)},l=function(){!h.errorCode&&h.transcript&&!n&&a(h.transcript),h.status!=="error"&&b({status:"finished"})},y=function(){d=new u,d&&(s("askingPermission"),d.interimResults=!0,r&&(d.lang=r),d.addEventListener("start",g),d.addEventListener("error",p),d.addEventListener("result",o),d.addEventListener("end",l),d.start())},R=function(){d&&(d.stop(),d.removeEventListener("start",g),d.removeEventListener("error",p),d.removeEventListener("result",o),d.removeEventListener("end",l),d=void 0)},_=function(){R(),s("finished")};return{getState:f,isBrowserSupported:v,isListening:m,startListening:y,stopListening:_,dispose:R}},Pl=ge({name:"voice-search",connector:!0}),Fl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return ye(t,Pl()),function(r){var a=r.searchAsYouSpeak,i=a===void 0?!1:a,u=r.language,c=r.additionalQueryParameters,h=r.createVoiceSearchHelper,d=h===void 0?wl:h;return{$$type:"ais.voiceSearch",init:function(m){var b=m.instantSearchInstance;t(T(E({},this.getWidgetRenderState(m)),{instantSearchInstance:b}),!0)},render:function(m){var b=m.instantSearchInstance;t(T(E({},this.getWidgetRenderState(m)),{instantSearchInstance:b}),!1)},getRenderState:function(m,b){return T(E({},m),{voiceSearch:this.getWidgetRenderState(b)})},getWidgetRenderState:function(m){var b=this,f=m.helper,s=m.instantSearchInstance;this._refine||(this._refine=function(_){if(_!==f.state.query){var P=u?[u.split("-")[0]]:void 0;f.setQueryParameter("queryLanguages",P),typeof c=="function"&&f.setState(f.state.setQueryParameters(E({ignorePlurals:!0,removeStopWords:!0,optionalWords:_},c({query:_})))),f.setQuery(_).search()}}),this._voiceSearchHelper||(this._voiceSearchHelper=d({searchAsYouSpeak:i,language:u,onQueryChange:function(P){return b._refine(P)},onStateChange:function(){t(T(E({},b.getWidgetRenderState(m)),{instantSearchInstance:s}),!1)}}));var g=this._voiceSearchHelper,p=g.isBrowserSupported,o=g.isListening,l=g.startListening,y=g.stopListening,R=g.getState;return{isBrowserSupported:p(),isListening:o(),toggleListening:function(){p()&&(o()?y():l())},voiceListeningState:R(),widgetParams:r}},dispose:function(m){var b=m.state;
17this._voiceSearchHelper.dispose(),n();var f=b;if(typeof c=="function"){var s=c({query:""}),g=s?Object.keys(s).reduce(function(p,o){return p[o]=void 0,p},{}):{};f=b.setQueryParameters(E({queryLanguages:void 0,ignorePlurals:void 0,removeStopWords:void 0,optionalWords:void 0},g))}return f.setQueryParameter("query",void 0)},getWidgetUiState:function(m,b){var f=b.searchParameters,s=f.query||"";return s?T(E({},m),{query:s}):m},getWidgetSearchParameters:function(m,b){var f=b.uiState;return m.setQueryParameter("query",f.query||"")}}}},xl=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(u){var c=u.instantSearchInstance;t(T(E({},this.getWidgetRenderState(u)),{instantSearchInstance:c}),!0)},render:function(u){var c=u.instantSearchInstance;t(T(E({},this.getWidgetRenderState(u)),{instantSearchInstance:c}),!1)},dispose:function(u){var c=u.state;return n(),c.setQueryParameter("relevancyStrictness",void 0)},getRenderState:function(u,c){return T(E({},u),{relevantSort:this.getWidgetRenderState(c)})},getWidgetRenderState:function(u){var c=u.results,h=u.helper;a.refine||(a.refine=function(m){h.setQueryParameter("relevancyStrictness",m).search()});var d=(c||{}).appliedRelevancyStrictness,v=d!==void 0;return{isRelevantSorted:typeof d<"u"&&d>0,isVirtualReplica:v,canRefine:v,refine:a.refine,widgetParams:r}},getWidgetSearchParameters:function(u,c){var h=c.uiState,d;return u.setQueryParameter("relevancyStrictness",(d=h.relevantSort)!==null&&d!==void 0?d:u.relevancyStrictness)},getWidgetUiState:function(u,c){var h=c.searchParameters;return T(E({},u),{relevantSort:h.relevancyStrictness||u.relevantSort})}}}};function et(e,t){return t!=null&&typeof Symbol<"u"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function zt(e){return zt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},zt(e)}function ao(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(ao=function(){return!!e})()}function Il(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function El(e,t){return t&&(Ue(t)==="object"||typeof t=="function")?t:Il(e)}function Al(e,t,n){return t=zt(t),El(e,ao()?Reflect.construct(t,[],zt(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 Tl(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)}function so(e,t){return Object.assign(new se.SearchResults(e,[t]),{feedID:t.feedID})}function Ol(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 u=(r=t.getHelper())===null||r===void 0?void 0:r.lastResults;u&&(u.feeds&&u.feeds.length>0||(u.feeds=i.map(function(c){return so(u._state,c)})))}}var _t=ge({name:"feeds",connector:!0}),Cl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:he;return ye(t,_t()),function(r){var a=r.isolated,i=r.transformFeeds,u=i===void 0?function(c){return c}:i;if(a!==!1)throw new Error(_t("The `isolated` option currently only supports `false`."));return{$$type:"ais.feeds",$$widgetType:"ais.feeds",init:function(h){var d=h.instantSearchInstance;if(!d.compositionID)throw new Error(_t("The `feeds` widget requires a composition-based InstantSearch instance (compositionID must be set)."));Ol(d,h.parent),t(T(E({},this.getWidgetRenderState(h)),{instantSearchInstance:d}),!0)},render:function(h){var d=h.instantSearchInstance;t(T(E({},this.getWidgetRenderState(h)),{instantSearchInstance:d}),!1)},dispose:function(){n()},getWidgetSearchParameters:function(h){return h},getRenderState:function(h,d){return T(E({},h),{feeds:this.getWidgetRenderState(d)})},getWidgetRenderState:function(h){var d=h.results;if(!d)return{feedIDs:[],widgetParams:r};Array.isArray(d.feeds)&&d.feeds.length>0&&!d.feeds.every(function(m){return et(m,se.SearchResults)})&&(d.feeds=d.feeds.map(function(m){return et(m,se.SearchResults)?m:so(d._state,m)}));var v=d.feeds?d.feeds.map(function(m){return m.feedID}):[""];if(v=u(v),!Array.isArray(v))throw new Error(_t("The `transformFeeds` option expects a function that returns an Array."));if(!v.every(function(m){return typeof m=="string"}))throw new Error(_t("The `transformFeeds` option expects a function that returns an array of feed IDs (strings)."));return{feedIDs:v,widgetParams:r}}}}},jl=function(t,n){return t},Wl=jl(lc),$l=!1,Ll=!0;function nt(e){function t(n,r){for(var a=arguments.length,i=new Array(a>2?a-2:0),u=2;u<a;u++)i[u-2]=arguments[u];var c=i.length>0?i:void 0;if((r===void 0?"undefined":Ue(r))==="object"&&(r.attrs||r.props||r.scopedSlots||r.on)){var h=Object.keys(r.on||{}),d=Object.assign({},r,r.attrs,r.props,h.reduce(function(v,m){return v["on".concat(m[0].toUpperCase()).concat(m.slice(1))]=r.on[m],v},{}));return delete d.attrs,delete d.props,delete d.scopedSlots,h.forEach(function(v){return delete d.on[v]}),d.on&&Object.keys(d.on).length===0&&delete d.on,Ot(n,d,r.scopedSlots?Object.assign({default:function(){return c}},r.scopedSlots):c)}return Ot(n,r,c)}return function(){return e.call(this,t)}}function ci(e){var t=e.$slots||e.slots;return typeof t.default=="function"?t.default():t.default}function Ct(e,t){return(e.$slots||e.slots||{})[t]}var Hl={inheritAttrs:!1,name:"AisConfigure",mixins:[ae({name:"Configure"}),le({connector:Qs},{$$widgetType:"ais.configure"})],computed:{widgetParams:function(){return{searchParameters:Object.assign({},this.$attrs)}}},render:nt(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:Wl},{$$widgetType:"ais.configureRelatedItems"});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 Ml(e){var t=e.createElement;return function(r){var a=r.classNames,i=r.children,u=r.highlightedTagName,c=r.isHighlighted,h=r.nonHighlightedTagName,d=c?u:h;return t(d,{className:c?a.highlighted:a.nonHighlighted},i)}}function Nl(e){var t=e.createElement,n=e.Fragment,r=Ml({createElement:t});return function(i){var u=i.parts,c=i.highlightedTagName,h=c===void 0?"mark":c,d=i.nonHighlightedTagName,v=d===void 0?"span":d,m=i.separator,b=m===void 0?", ":m,f=i.className,s=i.classNames,g=s===void 0?{}:s,p=Fe(i,["parts","highlightedTagName","nonHighlightedTagName","separator","className","classNames"]);return t("span",T(E({},p),{className:qe(g.root,f)}),u.map(function(o,l){var y=l===u.length-1;return t(n,{key:l},o.map(function(R,_){return t(r,{key:_,classNames:g,highlightedTagName:h,nonHighlightedTagName:v,isHighlighted:R.isHighlighted},R.value)}),!y&&t("span",{className:g.separator},b))}))}}function Dl(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 Ul(e){var t=e.createElement,n=Dl({createElement:t});return function(a){var i=a.classNames,u=i===void 0?{}:i,c=a.hits,h=a.itemComponent,d=a.sendEvent,v=a.emptyComponent,m=a.banner,b=a.bannerComponent,f=Fe(a,["classNames","hits","itemComponent","sendEvent","emptyComponent","banner","bannerComponent"]);return t("div",T(E({},f),{className:qe("ais-Hits",u.root,c.length===0&&qe("ais-Hits--empty",u.emptyRoot),f.className)}),m&&(b?t(b,{className:qe("ais-Hits-banner",u.bannerRoot),banner:m}):t(n,{classNames:u,banner:m})),c.length===0&&v?t(v,null):t("ol",{className:qe("ais-Hits-list",u.list)},c.map(function(s,g){return t(h,{key:s.objectID,hit:s,index:g,className:qe("ais-Hits-item",u.item),onClick:function(){d("click:internal",s,"Hit Clicked")},onAuxClick:function(){d("click:internal",s,"Hit Clicked")}})})))}}var ql={name:"AisHits",mixins:[le({connector:$c},{$$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:nt(function(e){var t=this;if(!this.state)return null;var n=Ct(this,"default"),r=Ct(this,"item"),a=Ct(this,"banner");return r||a||!n?e(Ul({createElement:e}),{hits:this.state.items,itemComponent:function(i){var u=i.hit,c=i.index,h=i.onClick,d=i.onAuxClick;i.key;var v=Fe(i,["hit","index","onClick","onAuxClick","key"]);return e("li",{key:u.objectID,attrs:v,on:{click:h,auxclick:d}},[r&&r({item:u,index:c,insights:t.state.insights,sendEvent:t.state.sendEvent})||"objectID: ".concat(u.objectID,", index: ").concat(c)])},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})])})},kl=0;function Bl(e){e.dependsOn==="recommend"&&(e.$$id=kl++)}var Ql=Promise.resolve();function Vl(e){var t=null,n=!1,r=function(){for(var i=arguments.length,u=new Array(i),c=0;c<i;c++)u[c]=arguments[c];t===null&&(t=Ql.then(function(){if(t=null,n){n=!1;return}e.apply(void 0,ce(u))}))};return r.wait=function(){if(t===null)throw new Error("The deferred function should be called before calling `wait()`");return t},r.cancel=function(){t!==null&&(n=!0)},r}function _a(e){for(var t=e.getParent(),n=[e.getHelper().state];t!==null;)n=[t.getHelper().state].concat(n),t=t.getParent();return n}function Ze(e,t,n){var r=t.getHelper();return{uiState:n,helper:r,parent:t,instantSearchInstance:e,state:r.state,render
17State:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,scopedResults:[],searchMetadata:{isSearchStalled:e.status==="stalled"},status:e.status,error:e.error}}function Gt(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 vt(e){var t=e.renderState,n=e.instantSearchInstance,r=e.parent,a=r?r.getIndexId():n.mainIndex.getIndexId();n.renderState=T(E({},n.renderState),H({},a,E({},n.renderState[a],t)))}var wt=ge({name:"index-widget"});function oo(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 ke(a)||!a.getWidgetUiState&&!a.getWidgetState?r:a.getWidgetUiState?a.getWidgetUiState(r,t):a.getWidgetState(r,t)},n)}function Ft(e,t){var n=t.initialSearchParameters,r=Fe(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 wa(e,t){var n=t.initialRecommendParameters,r=Fe(t,["initialRecommendParameters"]);return e.reduce(function(a,i){return!ke(i)&&i.dependsOn==="recommend"&&i.getWidgetParameters?i.getWidgetParameters(a,r):a},n)}function uo(e){var t=e.filter(ke);t.length!==0&&t.forEach(function(n){var r=n.getHelper();oo(r,{state:r.state.resetPage(),recommendState:r.recommendState,isPageReset:!0}),uo(n.getWidgets())})}function co(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(co(r.getWidgets()))))},[])}function lo(e){return e.reduce(function(t,n){if(ke(n)){if(n._isolated)return t;var r=lo(n.getWidgets());return{hasSearchWidget:t.hasSearchWidget||r.hasSearchWidget,hasRecommendWidget:t.hasRecommendWidget||r.hasRecommendWidget}}return n.dependsOn==="recommend"?T(E({},t),{hasRecommendWidget:!0}):n.dependsOn==="none"?t:T(E({},t),{hasSearchWidget:!0})},{hasSearchWidget:!1,hasRecommendWidget:!1})}function zl(e){var t=lo(e.mainIndex.getWidgets()),n=t.hasSearchWidget,r=t.hasRecommendWidget;e._hasSearchWidget=n,e._hasRecommendWidget=r}var Gl=function(t){var n;if(t===void 0||t.indexName===void 0&&!t.isolated&&!t.EXPERIMENTAL_isolated)throw new Error(wt("The `indexName` option is required."));var r=t.indexName,a=r===void 0?"":r,i=t.indexId,u=i===void 0?a:i,c=t.isolated,h=c===void 0?(n=t.EXPERIMENTAL_isolated)!==null&&n!==void 0?n:!1:c,d=[],v={},m=null,b=null,f=null,s=null,g=null,p=function(){m&&zl(m)};return{$$type:"ais.index",$$widgetType:"ais.index",_isolated:h,getIndexName:function(){return a},getIndexId:function(){return u},getHelper:function(){return f},getResults:function(){return s?.lastResults?(s.lastResults._state=f.state,s.lastResults):null},getResultsForWidget:function(l){return l.dependsOn!=="recommend"||ke(l)||l.$$id===void 0?this.getResults():f?.lastRecommendResults?f.lastRecommendResults[l.$$id]:null},getPreviousState:function(){return g},getScopedResults:function(){var l=this.getParent(),y;return l?y=l.getWidgets():a.length===0?y=this.getWidgets():y=[this],co(y)},getParent:function(){return h?null:b},createURL:function(l){return typeof l=="function"?m._createURL(H({},u,l(v))):m._createURL(H({},u,Pt(d,{searchParameters:l,helper:f})))},scheduleLocalSearch:Vl(function(){h&&f?.search()}),getWidgets:function(){return d},addWidgets:function(l){var y=this;if(!Array.isArray(l))throw new Error(wt("The `addWidgets` method expects an array of widgets."));var R=l.reduce(function(_,P){return _.concat(Array.isArray(P)?P:[P])},[]);if(R.some(function(_){return typeof _.init!="function"&&typeof _.render!="function"}))throw new Error(wt("The widget definition expects a `render` and/or an `init` method."));return R.forEach(function(_){_.parent=y,ke(_)||Bl(_)}),d=d.concat(R),p(),m&&R.length&&(oo(f,{state:Ft(d,{uiState:v,initialSearchParameters:f.state}),recommendState:wa(d,{uiState:v,initialRecommendParameters:f.recommendState}),_uiState:v}),R.forEach(function(_){if(_.getRenderState){var P=_.getRenderState(m.renderState[y.getIndexId()]||{},Ze(m,y,m._initialUiState));
17vt({renderState:P,instantSearchInstance:m,parent:y})}}),R.forEach(function(_){_.init&&_.init(Ze(m,y,m._initialUiState))}),h?this.scheduleLocalSearch():m.scheduleSearch()),this},removeWidgets:function(l){var y=this;if(!Array.isArray(l))throw new Error(wt("The `removeWidgets` method expects an array of widgets."));var R=l.reduce(function(S,x){return S.concat(Array.isArray(x)?x:[x])},[]);if(R.some(function(S){return typeof S.dispose!="function"}))throw new Error(wt("The widget definition expects a `dispose` method."));if(d=d.filter(function(S){return R.indexOf(S)===-1}),R.forEach(function(S){S.parent=void 0}),p(),m&&R.length){var _=R.reduce(function(S,x){var I=x.dispose({helper:f,state:S.cleanedSearchState,recommendState:S.cleanedRecommendState,parent:y});return et(I,se.RecommendParameters)?S.cleanedRecommendState=I:I&&(S.cleanedSearchState=I),S},{cleanedSearchState:f.state,cleanedRecommendState:f.recommendState}),P=_.cleanedSearchState,F=_.cleanedRecommendState,w=m.future.preserveSharedStateOnUnmount?Ft(d,{uiState:v,initialSearchParameters:new se.SearchParameters({index:this.getIndexName()})}):Ft(d,{uiState:Pt(d,{searchParameters:P,helper:f}),initialSearchParameters:P});v=Pt(d,{searchParameters:w,helper:f}),f.setState(w),f.recommendState=F,d.length&&(h?this.scheduleLocalSearch():m.scheduleSearch())}return this},init:function(l){var y=this,R=l.instantSearchInstance,_=l.parent,P=l.uiState,F;if(f===null){m=R,b=_,v=P[u]||{};var w=R.mainHelper,S=Ft(d,{uiState:v,initialSearchParameters:new se.SearchParameters({index:a})}),x=wa(d,{uiState:v,initialRecommendParameters:new se.RecommendParameters});f=se(w.getClient(),S.index,S),f.recommendState=x,f.search=function(){return h?(R.status="loading",y.render({instantSearchInstance:R}),R.compositionID?f.searchWithComposition():f.searchOnlyWithDerivedHelpers()):R.onStateChange?(R.onStateChange({uiState:R.mainIndex.getWidgetUiState({}),setUiState:function(j){return R.setUiState(j,!1)}}),w):w.search()},f.searchWithoutTriggeringOnStateChange=function(){return w.search()},f.searchForFacetValues=function(N,j,A,W){var D=mt.apply(void 0,[w.state].concat(ce(_a(y)))).setQueryParameters(W);return w.searchForFacetValues(N,j,A,D)};var I=a?f:se({},"__empty_index__",{}),O=h?I:Kl(_,w);s=O.derive(function(){return mt.apply(void 0,[w.state].concat(ce(_a(y))))},function(){return y.getHelper().recommendState});var M=(F=R._initialResults)===null||F===void 0?void 0:F[this.getIndexId()];if(M?.results){var $=new se.SearchResults(new se.SearchParameters(M.state),M.results);s.lastResults=$,f.lastResults=$}if(M?.recommendResults){var q=new se.RecommendResults(new se.RecommendParameters({params:M.recommendResults.params}),M.recommendResults.results);s.lastRecommendResults=q,f.lastRecommendResults=q}f.on("change",function(N){var j=N.isPageReset;j&&uo(d)}),s.on("search",function(){R.scheduleStalledRender()}),s.on("result",function(N){var j=N.results;R.scheduleRender(),f.lastResults=j,g=j?._state}),s.on("recommend:result",function(N){var j=N.recommend;R.scheduleRender(),f.lastRecommendResults=j.results}),d.forEach(function(N){if(N.getRenderState){var j=N.getRenderState(R.renderState[y.getIndexId()]||{},Ze(R,y,P));
17vt({renderState:j,instantSearchInstance:R,parent:y})}}),d.forEach(function(N){N.init&&N.init(Ze(R,y,P))}),f.on("change",function(N){var j=N.state,A=N._uiState;v=Pt(d,{searchParameters:j,helper:f},A||{}),R.onStateChange||R.onInternalStateChange()}),M&&R.scheduleRender(),p()}},render:function(l){var y=this,R=l.instantSearchInstance;R.status==="error"&&!R.mainHelper.hasPendingRequests()&&g&&f.setState(g);var _=this.getResults()||s?.lastRecommendResults||h&&!a?d:d.filter(function(P){return P.shouldRender});_=_.filter(function(P){return P.shouldRender?P.shouldRender({instantSearchInstance:R}):!0}),_.forEach(function(P){if(P.getRenderState){var F=P.getRenderState(R.renderState[y.getIndexId()]||{},Gt(R,y,P));vt({renderState:F,instantSearchInstance:R,parent:y})}}),_.forEach(function(P){P.render&&P.render(Gt(R,y,P))})},dispose:function(){var l=this;d.forEach(function(y){y.dispose&&f&&y.dispose({helper:f,state:f.state,recommendState:f.recommendState,parent:l})}),m=null,b=null,f?.removeAllListeners(),f=null,s?.detach(),s=null},getWidgetUiState:function(l){return d.filter(ke).filter(function(y){return!y._isolated}).reduce(function(y,R){return R.getWidgetUiState(y)},T(E({},l),H({},u,E({},l[u],v))))},getWidgetState:function(l){return this.getWidgetUiState(l)},getWidgetSearchParameters:function(l,y){var R=y.uiState;return Ft(d,{uiState:R,initialSearchParameters:l})},shouldRender:function(){return!0},refreshUiState:function(){v=Pt(d,{searchParameters:this.getHelper().state,helper:this.getHelper()},v)},setIndexUiState:function(l){var y=typeof l=="function"?l(v):l;m.setUiState(function(R){return T(E({},R),H({},u,y))})}}};function Kl(e,t){for(;e;){if(e._isolated)return e.getHelper();e=e.getParent()}return t}ae({name:"Index"}),le({connector:function(){return Gl}},{$$widgetType:"ais.index"});var Jl="ais",Kt=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):"",u=a?"--".concat(a):"";return"".concat(Jl,"-").concat(t).concat(i).concat(u)}},Le={highlightPreTag:"<mark>",highlightPostTag:"</mark>"},Yl=Promise.resolve();function ft(e){var t=null,n=!1,r=function(){for(var i=arguments.length,u=new Array(i),c=0;c<i;c++)u[c]=arguments[c];t===null&&(t=Yl.then(function(){if(t=null,n){n=!1;return}e.apply(void 0,ce(u))}))};return r.wait=function(){if(t===null)throw new Error("The deferred function should be called before calling `wait()`");return t},r.cancel=function(){t!==null&&(n=!0)},r}function Jt(e,t){var n=Array.isArray(t)?t:t.split(".");return n.reduce(function(r,a){return r&&r[a]},e)}var Xl=Kt("Highlight");function fo(e){var t=e.attribute,n=e.highlightedTagName,r=n===void 0?"mark":n,a=e.hit,i=e.cssClasses,u=i===void 0?{}:i,c=Jt(a._highlightResult,t),h=c||{},d=h.value,v=d===void 0?"":d,m=Xl({descendantName:"highlighted"})+(u.highlighted?" ".concat(u.highlighted):"");return v.replace(new RegExp(Le.highlightPreTag,"g"),"<".concat(r,' class="').concat(m,'">')).replace(new RegExp(Le.highlightPostTag,"g"),"</".concat(r,">"))}function ho(e){var t=Le.highlightPreTag,n=Le.highlightPostTag;return e.map(function(r){return r.isHighlighted?t+r.value+n:r.value}).join("")}function go(e){var t=Le.highlightPostTag,n=Le.highlightPreTag,r=e.split(n),a=r.shift(),i=a?[{value:a,isHighlighted:!1}]:[];return r.forEach(function(u){var c=u.split(t);i.push({value:c[0],isHighlighted:!0}),c[1]!==""&&i.push({value:c[1],isHighlighted:!1})}),i}var Zl={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},mo=/&(amp|quot|lt|gt|#39);/g,ef=RegExp(mo.source);function tf(e){return e&&ef.test(e)?e.replace(mo,function(t){return Zl[t]}):e}var rf=new RegExp(/\w/i);function nf(e,t){var n,r,a,i,u=e[t],c=(n=(a=e[t+1])===null||a===void 0?void 0:a.isHighlighted)!==null&&n!==void 0?n:!0,h=(r=(i=e[t-1])===null||i===void 0?void 0:i.isHighlighted)!==null&&r!==void 0?r:!0;return!rf.test(tf(u.value))&&h===c?h:u.isHighlighted}function vo(e){return e.some(function(t){return t.isHighlighted})?e.map(function(t,n){return T(E({},t),{isHighlighted:!nf(e,n)})}):e.map(function(t){return T(E({},t),{isHighlighted:!1})})}var af=Kt("ReverseHighlight");function po(e){var t=e.attribute,n=e.highlightedTagName,r=n===void 0?"mark":n,a=e.hit,i=e.cssClasse
17s,u=i===void 0?{}:i,c=Jt(a._highlightResult,t),h=c||{},d=h.value,v=d===void 0?"":d,m=af({descendantName:"highlighted"})+(u.highlighted?" ".concat(u.highlighted):""),b=ho(vo(go(v)));return b.replace(new RegExp(Le.highlightPreTag,"g"),"<".concat(r,' class="').concat(m,'">')).replace(new RegExp(Le.highlightPostTag,"g"),"</".concat(r,">"))}var sf=Kt("Snippet");function yo(e){var t=e.attribute,n=e.highlightedTagName,r=n===void 0?"mark":n,a=e.hit,i=e.cssClasses,u=i===void 0?{}:i,c=Jt(a._snippetResult,t),h=c||{},d=h.value,v=d===void 0?"":d,m=sf({descendantName:"highlighted"})+(u.highlighted?" ".concat(u.highlighted):"");return v.replace(new RegExp(Le.highlightPreTag,"g"),"<".concat(r,' class="').concat(m,'">')).replace(new RegExp(Le.highlightPostTag,"g"),"</".concat(r,">"))}var of=Kt("ReverseSnippet");function So(e){var t=e.attribute,n=e.highlightedTagName,r=n===void 0?"mark":n,a=e.hit,i=e.cssClasses,u=i===void 0?{}:i,c=Jt(a._snippetResult,t),h=c||{},d=h.value,v=d===void 0?"":d,m=of({descendantName:"highlighted"})+(u.highlighted?" ".concat(u.highlighted):""),b=ho(vo(go(v)));return b.replace(new RegExp(Le.highlightPreTag,"g"),"<".concat(r,' class="').concat(m,'">')).replace(new RegExp(Le.highlightPostTag,"g"),"</".concat(r,">"))}function uf(e){return btoa(encodeURIComponent(JSON.stringify(e)))}function kn(){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 Pa="ais.usage.sessionId",Qe=null;function cf(){if(Qe)return Qe;try{var e=sessionStorage.getItem(Pa);return e?(Qe=e,Qe):(Qe=kn(),sessionStorage.setItem(Pa,Qe),Qe)}catch{return Qe=kn(),Qe}}function lf(e){var t=e.method,n=e.payload;if((typeof n>"u"?"undefined":Ue(n))!=="object")throw new Error("The insights helper expects the payload to be an object.");var r;try{r=uf(n)}catch{throw new Error("Could not JSON serialize the payload object.")}return'data-insights-method="'.concat(t,'" data-insights-payload="').concat(r,'"')}function Ro(e,t){return lf({method:e,payload:t})}var ff="_ALGOLIA";function df(e){if(!((typeof document>"u"?"undefined":Ue(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 bo(){return df(ff)}function hf(){return bo()}function Fa(e){return e!==Object(e)}function li(e,t){if(e===t)return!0;if(Fa(e)||Fa(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](),u;!(n=(u=i.next()).done);n=!0){var c=u.value;if(!(c in t)||!li(e[c],t[c]))return!1}}catch(h){r=!0,a=h}finally{try{!n&&i.return!=null&&i.return()}finally{if(r)throw a}}return!0}function De(e){var t=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{fallback:function(){}}).fallback;return typeof window>"u"?t():e({window})}function xa(e){var t=e||{};t.page;var n=Fe(t,["page"]);return n}function gf(){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=De(function(c){var h=c.window;return h.sessionStorage});if(!i)return null;try{var u=JSON.parse(i.getItem(t));return u&&li(u.state,xa(a))?u.hits:null}catch(c){if(et(c,SyntaxError))try{i.removeItem(t)}catch{}return null}},write:function(r){var a=r.state,i=r.hits,u=De(function(c){var h=c.window;return h.sessionStorage});if(u)try{u.setItem(t,JSON.stringify({state:xa(a),hits:i}))}catch{}}}}var mf=Kn();const vf=Qn(mf);function Ge(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n]}function Ia(e,t){for(var n,r=0;r<e.length;r++)if(n=e[r],t(n,r,e))return n}function _o(e){var t=e;return t.transporter&&t.transporter.userAgent?t.transporter.userAgent.value:t._ua}function Ea(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",u=n[a]||r[a],c=n[i]||r[i];return[u,c]}else return[e.applicationID,e.apiKey]}function pf(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 yf=["ais.index","ais.feedContainer"];function We(e){return yf.includes(e.$$type)}function ht(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 Aa(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 Qr(e){var t=e.renderState,n=e.instantSearchInstance,r=e.parent,a=r?r.getIndexId():n.mainIndex.getIndexId();n.renderState=T(E({},n.renderState),H({},a,E({},n.renderState[a],t)))}function Sf(e){if(e==null)return null;var t=typeof e>"u"?"undefined":Ue(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 wo(e){var t=[];return Object.keys(e).forEach(function(n){var r=e[n];if(r!==void 0){var a=Sf(r);a?t.push(E({name:n},a)):t.push({name:n})}}),t}function Po(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.mainIndex,r=ht(t,n,t._initialUiState);return e.map(function(a){var i={};if(a.getWidgetRenderState){var u=a.getWidgetRenderState(r);u&&u.widgetParams&&(i=u.widgetParams)}var c=wo(i),h=We(a)?Po(a.getWidgets(),t,a):[];return{type:a.$$widgetType||a.$$type||"unknown",params:c,children:h}})}var Fo=typeof performance<"u"?function(){return performance.now()}:function(){return Date.now()},fi="4.108.0",xo="2.17.2",Rf="https://cdn.jsdelivr.net/npm/search-insights@".concat(xo,"/dist/search-insights.min.js"),bf=["searchClient","insightsClient","initialUiState"];function Ta(){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,u=e.$$automatic,c=u===void 0?!1:u,h=t;!t&&t!==null&&De(function(v){var m=v.window,b=m.AlgoliaAnalyticsObject||"aa";typeof b=="string"&&(h=m[b]),h||(m.AlgoliaAnalyticsObject=b,m[b]||(m[b]=function(){for(var f=arguments.length,s=new Array(f),g=0;g<f;g++)s[g]=arguments[g];m[b].queue||(m[b].queue=[]),m[b].queue.push(s)},m[b].version=xo,m[b].shouldAddScript=!0),h=m[b])});var d=h||Ge;return function(v){var m=v.instantSearchInstance,b,f=m.middleware.filter(function(S){return S.instance.$$type==="ais.insights"&&S.instance.$$internal}).map(function(S){return S.creator});(b=m).unuse.apply(b,ce(f));var s=ue(Ea(m.client),2),g=s[0],p=s[1],o=void 0,l=void 0,y=void 0,R=d.queue;if(Array.isArray(R)){var _;_=ue(["setUserToken","init"].map(function(S){var x=ue(Ia(R.slice().reverse(),function(O){var M=ue(O,1),$=M[0];return $===S})||[],2),I=x[1];return I}),2),l=_[0],o=_[1]}d("getUserToken",null,function(S,x){y=Ca(x)}),(n||!Oa(d))&&d("init",E({appId:g,apiKey:p,partial:!0},n));var P,F,w=null;return{$$type:"ais.insights",$$internal:i,$$automatic:c,onStateChange:function(){},subscribe:function(){if(d.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=Rf,I.onerror=function(){m.emit("error",new Error(x))},document.body.appendChild(I),d.shouldAddScript=!1}catch{d.shouldAddScript=!1,m.emit("error",new Error(x))}}},started:function(){d("addAlgoliaAgent","insights-middleware"),F=m.mainHelper;var x=d.queue;if(Array.isArray(x)){var I;I=ue(["setUserToken","init"].map(function(k){var Q=ue(Ia(x.slice().reverse(),function(V){var G=ue(V,1),Z=G[0];return Z===k})||[],2),J=Q[1];return J}),2),l=I[0],o=I[1]}P=_f(m),c||F.overrideStateWithoutTriggeringChangeEvent(T(E({},F.state),{clickAnalytics:!0})),i||m.scheduleSearch();var O=function(Q){var J=arguments.length>
171&&arguments[1]!==void 0?arguments[1]:!1,V=Ca(Q);if(!V)return;var G=F.state.userToken;function Z(){F.overrideStateWithoutTriggeringChangeEvent(T(E({},F.state),{userToken:V})),G&&G!==Q&&m.scheduleSearch()}J?Z():setTimeout(Z,0)};function M(k){O(k,!0),d("setUserToken",k)}var $=void 0,q=bo();if(q)$=q;else{var N="anonymous-".concat(kn());$=N}var j,A=P.userToken;n?.userToken&&(j=n.userToken),j?M(j):A?M(A):y?M(y):l?M(l):$&&(M($),(n?.useCookie||o?.useCookie)&&wf($,n?.cookieDuration||o?.cookieDuration)),d("onUserTokenChange",function(k){return O(k,!0)},{immediate:!0});var W=d;Oa(d)&&(W=function(Q,J){var V=ue(Ea(m.client),2),G=V[0],Z=V[1],ee={headers:{"X-Algolia-Application-Id":G,"X-Algolia-API-Key":Z}};return d(Q,J,ee)});var D=new Set,U;m.mainHelper.derivedHelpers[0].on("result",function(k){var Q=k.results;Q&&(!Q.queryID||Q.queryID!==U)&&(U=Q.queryID,D.clear())}),m.sendEventToInsights=function(k){if(r)r(k,W);else if(k.insightsMethod){if(k.insightsMethod==="viewedObjectIDs"){var Q=k.payload,J=Q.objectIDs.filter(function(V){return!D.has(V)});if(J.length===0)return;J.forEach(function(V){return D.add(V)}),Q.objectIDs=J}k.payload.algoliaSource=["instantsearch"],c&&k.payload.algoliaSource.push("instantsearch-automatic"),k.eventModifier==="internal"&&k.payload.algoliaSource.push("instantsearch-internal"),W(k.insightsMethod,k.payload)}},De(function(){var k=cf();function Q(V){var G,Z=(G=F.state)===null||G===void 0?void 0:G.userToken;W("sendEvents",[E({eventType:"instantsearch",timestamp:Date.now(),sessionID:k,userToken:Z?String(Z):void 0},V)])}var J=function(){try{var G=Math.round(Fo()-m._createdAt);Q({eventName:"__start__",algoliaAgent:_o(m.client),version:fi,applicationId:g,performance:{bootstrapMs:G},widgets:[{type:"ais.instantSearch",params:m._initialOptions?wo(pf(m._initialOptions,ce(bf))):[],children:Po(m.mainIndex.getWidgets(),m)}]})}catch{}};m.once("render",J),w=function(){return m.removeListener("render",J)}})},unsubscribe:function(){w&&w(),d("onUserTokenChange",void 0),m.sendEventToInsights=Ge,F&&P&&(F.overrideStateWithoutTriggeringChangeEvent(E({},F.state,P)),m.scheduleSearch())}}}}function _f(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 wf(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 Oa(e){var t=ue((e.version||"").split(".").map(Number),2),n=t[0],r=t[1],a=n>=3,i=n===2&&r>=6,u=n===1&&r>=10;return a||i||u}function Ca(e){if(e)return typeof e=="number"?e.toString():e}function Io(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:t.mainIndex,a=ht(t,r,t._initialUiState);e.forEach(function(i){var u={};if(i.getWidgetRenderState){var c=i.getWidgetRenderState(a);c&&c.widgetParams&&(u=c.widgetParams)}var h=Object.keys(u).filter(function(d){return u[d]!==void 0});n.widgets.push({type:i.$$type,widgetType:i.$$widgetType,params:h}),We(i)&&Io(i.getWidgets(),t,n,i)})}function Pf(){return De(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 Ff(){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:[]},u=document.createElement("meta"),c=document.querySelector("head");return u.name="instantsearch:widgets",{$$type:"ais.metadata",$$internal:n,onStateChange:function(){},subscribe:function(){setTimeout(function(){i.ua=_o(a.client),Io(a.mainIndex.getWidgets(),a,i),a.middleware.forEach(function(d){return i.widgets.push({middleware:!0,type:d.instance.$$type,internal:d.instance.$$internal})}),u.content=JSON.stringify(i),c.appendChild(u)},0)},started:function(){},unsubscribe:function(){u.remove()}}}}var Vr,ja;function yt(){return ja||(ja=1,Vr=TypeError),Vr}const xf={},If=Object.freeze(Object.defineProperty({__proto__:null,default:xf},Symbol.toStringTag,{value:"Module"})),Ef=hu(If);var zr,Wa;function Yt(){if(Wa)return zr;Wa=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,u=a&&i&&typeof i.get=="function"?i.get:null,c=a&&Set.prototype.forEach,h=typeof WeakMap=="function"&&WeakMap.prototype,d=h?WeakMap.prototype.has:null,v=typeof WeakSet=="function"&&WeakSet.prototype,m=v?WeakSet.prototype.has:null,b=typeof WeakRef=="function"&&WeakRef.prototype,f=b?WeakRef.prototype.deref:null,s=Boolean.prototype.valueOf,g=Object.prototype.toString,p=Function.prototype.toString,o=String.prototype.match,l=String.prototype.slice,y=String.prototype.replace,R=String.prototype.toUpperCase,_=String.prototype.toLowerCase,P=RegExp.prototype.test,F=Array.prototype.concat,w=Array.prototype.join,S=Array.prototype.slice,x=Math.floor,I=typeof BigInt=="function"?BigInt.prototype.valueOf:null,O=Object.getOwnPropertySymbols,M=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,$=typeof Symbol=="function"&&typeof Symbol.iterator=="object",q=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===$||!0)?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,j=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(C){return C.__proto__}:null);function A(C,L){if(C===1/0||C===-1/0||C!==C||C&&C>-1e3&&C<1e3||P.call(/e/,L))return L;var oe=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof C=="number"){var me=C<0?-x(-C):x(C);if(me!==C){var pe=String(me),te=l.call(L,pe.length+1);
vendor: 23,233 bytes, lines 17-20
17return y.call(pe,oe,"$&_")+"."+y.call(y.call(te,/([0-9]{3})/g,"$&_"),/_$/,"")}}return y.call(L,oe,"$&_")}var W=Ef,D=W.custom,U=_e(D)?D:null,k={__proto__:null,double:'"',single:"'"},Q={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};zr=function C(L,oe,me,pe){var te=oe||{};if(Ee(te,"quoteStyle")&&!Ee(k,te.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ee(te,"maxStringLength")&&(typeof te.maxStringLength=="number"?te.maxStringLength<0&&te.maxStringLength!==1/0:te.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var Je=Ee(te,"customInspect")?te.customInspect:!0;if(typeof Je!="boolean"&&Je!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Ee(te,"indent")&&te.indent!==null&&te.indent!=="	"&&!(parseInt(te.indent,10)===te.indent&&te.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ee(te,"numericSeparator")&&typeof te.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var tt=te.numericSeparator;if(typeof L>"u")return"undefined";if(L===null)return"null";if(typeof L=="boolean")return L?"true":"false";if(typeof L=="string")return mi(L,te);if(typeof L=="number"){if(L===0)return 1/0/L>0?"0":"-0";var Ce=String(L);return tt?A(L,Ce):Ce}if(typeof L=="bigint"){var Ye=String(L)+"n";return tt?A(L,Ye):Ye}var tr=typeof te.depth>"u"?5:te.depth;if(typeof me>"u"&&(me=0),me>=tr&&tr>0&&typeof L=="object")return Z(L)?"[Array]":"[Object]";var ut=tu(te,me);if(typeof pe>"u")pe=[];else if(Ke(pe,L)>=0)return"[Circular]";function Ne(ct,Mt,nu){if(Mt&&(pe=S.call(pe),pe.push(Mt)),nu){var Pi={depth:te.depth};return Ee(te,"quoteStyle")&&(Pi.quoteStyle=te.quoteStyle),C(ct,Pi,me+1,pe)}return C(ct,te,me+1,pe)}if(typeof L=="function"&&!ne(L)){var pi=it(L),yi=Lt(L,Ne);return"[Function"+(pi?": "+pi:" (anonymous)")+"]"+(yi.length>0?" { "+w.call(yi,", ")+" }":"")}if(_e(L)){var Si=$?y.call(String(L),/^(Symbol\(.*\))_[^)]*$/,"$1"):M.call(L);return typeof L=="object"&&!$?St(Si):Si}if(Xo(L)){for(var Rt="<"+_.call(String(L.nodeName)),rr=L.attributes||[],Ht=0;Ht<rr.length;Ht++)Rt+=" "+rr[Ht].name+"="+J(V(rr[Ht].value),"double",te);return Rt+=">",L.childNodes&&L.childNodes.length&&(Rt+="..."),Rt+="</"+_.call(String(L.nodeName))+">",Rt}if(Z(L)){if(L.length===0)return"[]";var nr=Lt(L,Ne);return ut&&!eu(nr)?"["+er(nr,ut)+"]":"[ "+w.call(nr,", ")+" ]"}if(Y(L)){var ir=Lt(L,Ne);return!("cause"in Error.prototype)&&"cause"in L&&!N.call(L,"cause")?"{ ["+String(L)+"] "+w.call(F.call("[cause]: "+Ne(L.cause),ir),", ")+" }":ir.length===0?"["+String(L)+"]":"{ ["+String(L)+"] "+w.call(ir,", ")+" }"}if(typeof L=="object"&&Je){if(U&&typeof L[U]=="function"&&W)return W(L,{depth:tr-me});if(Je!=="symbol"&&typeof L.inspect=="function")return L.inspect()}if(Me(L)){var Ri=[];return r&&r.call(L,function(ct,Mt){Ri.push(Ne(Mt,L,!0)+" => "+Ne(ct,L))}),vi("Map",n.call(L),Ri,ut)}if(ot(L)){var bi=[];return c&&c.call(L,function(ct){bi.push(Ne(ct,L))}),vi("Set",u.call(L),bi,ut)}if(at(L))return Zt("WeakMap");if(Yo(L))return Zt("WeakSet");if(st(L))return Zt("WeakRef");if(re(L))return St(Ne(Number(L)));if(Se(L))return St(Ne(I.call(L)));if(ve(L))return St(s.call(L));if(ie(L))return St(Ne(String(L)));if(typeof window<"u"&&L===window)return"{ [object Window] }";if(typeof globalThis<"u"&&L===globalThis||typeof Fi<"u"&&L===Fi)return"{ [object globalThis] }";if(!ee(L)&&!ne(L)){var ar=Lt(L,Ne),_i=j?j(L)===Object.prototype:L instanceof Object||L.constructor===Object,sr=L instanceof Object?"":"null prototype",wi=!_i&&q&&Object(L)===L&&q in L?l.call($e(L),8,-1):sr?"Object":"",ru=_i||typeof L.constructor!="function"?"":L.constructor.name?L.constructor.name+" ":"",or=ru+(wi||sr?"["+w.call(F.call([],wi||[],sr||[]),": ")+"] ":"");return ar.length===0?or+"{}":ut?or+"{"+er(ar,ut)+"}":or+"{ "+w.call(ar,", ")+" }"}return String(L)};function J(C,L,oe){var me=oe.quoteStyle||L,pe=k[me];return pe+C+pe}function V(C){return y.call(String(C),/"/g,"&quot;")}function G(C){return!q||!(typeof C=="object"&&(q in C||typeof C[q]<"u"))}function Z(C){return $e(C)==="[object Array]"&&G(C)}function ee(C){return $e(C)==="[object Date]"&&G(C)}function ne(C){return $e(C)==="[object RegExp]"&&G(C)}function Y(C){return $e(C)==="[object Error]"&&G(C)}function ie(C){return $e(C)==="[object String]"&&G(C)}function re(C){return $e(C)==="[object Number]"&&G(C)}function ve(C){return $e(C)==="[object Boolean]"&&G(C)}function _e(C){if($)return C&&typeof C=="object"&&C instanceof Symbol;if(typeof C=="symbol")return!0;if(!C||typeof C!="object"||!M)return!1;try{return M.call(C),!0}catch{}return!1}function Se(C){if(!C||typeof C!="object"||!I)return!1;try{return I.call(C),!0}catch{}return!1}var we=Object.prototype.hasOwnProperty||function(C){return C in this};function Ee(C,L){return we.call(C,L)}function $e(C){return g.call(C)}function it(C){if(C.name)return C.name;var L=o.call(p.call(C),/^function\s*([\w$]+)/);return L?L[1]:null}function Ke(C,L){if(C.indexOf)return C.indexOf(L);for(var oe=0,me=C.length;oe<me;oe++)if(C[oe]===L)return oe;return-1}function Me(C){if(!n||!C||typeof C!="object")return!1;try{n.call(C);try{u.call(C)}catch{return!0}return C instanceof Map}catch{}return!1}function at(C){if(!d||!C||typeof C!="object")return!1;try{d.call(C,d);try{m.call(C,m)}catch{return!0}return C instanceof WeakMap}catch{}return!1}function st(C){if(!f||!C||typeof C!="object")return!1;try{return f.call(C),!0}catch{}return!1}function ot(C){if(!u||!C||typeof C!="object")return!1;try{u.call(C);try{n.call(C)}catch{return!0}return C instanceof Set}catch{}return!1}function Yo(C){if(!m||!C||typeof C!="object")return!1;try{m.call(C,m);try{d.call(C,d)}catch{return!0}return C instanceof WeakSet}catch{}return!1}function Xo(C){return!C||typeof C!="object"?!1:typeof HTMLElement<"u"&&C instanceof HTMLElement?!0:typeof C.nodeName=="string"&&typeof C.getAttribute=="function"}function mi(C,L){if(C.length>L.maxStringLength){var oe=C.length-L.maxStringLength,me="... "+oe+" more character"+(oe>1?"s":"");return mi(l.call(C,0,L.maxStringLength),L)+me}var pe=Q[L.quoteStyle||"single"];pe.lastIndex=0;var te=y.call(y.call(C,pe,"\\$1"),/[\x00-\x1f]/g,Zo);return J(te,"single",L)}function Zo(C){var L=C.charCodeAt(0),oe={8:"b",9:"t",10:"n",12:"f",13:"r"}[L];return oe?"\\"+oe:"\\x"+(L<16?"0":"")+R.call(L.toString(16))}function St(C){return"Object("+C+")"}function Zt(C){return C+" { ? }"}function vi(C,L,oe,me){var pe=me?er(oe,me):w.call(oe,", ");return C+" ("+L+") {"+pe+"}"}function eu(C){for(var L=0;L<C.length;L++)if(Ke(C[L],`
18`)>=0)return!1;return!0}function tu(C,L){var oe;if(C.indent==="	")oe="	";else if(typeof C.indent=="number"&&C.indent>0)oe=w.call(Array(C.indent+1)," ");else return null;return{base:oe,prev:w.call(Array(L+1),oe)}}function er(C,L){if(C.length===0)return"";var oe=`
19`+L.prev+L.base;return oe+w.call(C,","+oe)+`
20`+L.prev}function Lt(C,L){var oe=Z(C),me=[];if(oe){me.length=C.length;for(var pe=0;pe<C.length;pe++)me[pe]=Ee(C,pe)?L(C[pe],C):""}var te=typeof O=="function"?O(C):[],Je;if($){Je={};for(var tt=0;tt<te.length;tt++)Je["$"+te[tt]]=te[tt]}for(var Ce in C)Ee(C,Ce)&&(oe&&String(Number(Ce))===Ce&&Ce<C.length||$&&Je["$"+Ce]instanceof Symbol||(P.call(/[^\w$]/,Ce)?me.push(L(Ce,C)+": "+L(C[Ce],C)):me.push(Ce+": "+L(C[Ce],C))));if(typeof O=="function")for(var Ye=0;Ye<te.length;Ye++)N.call(C,te[Ye])&&me.push("["+L(te[Ye])+"]: "+L(C[te[Ye]],C));return me}return zr}var Gr,$a;function Af(){if($a)return Gr;$a=1;var e=Yt(),t=yt(),n=function(c,h,d){for(var v=c,m;(m=v.next)!=null;v=m)if(m.key===h)return v.next=m.next,d||(m.next=c.next,c.next=m),m},r=function(c,h){if(c){var d=n(c,h);return d&&d.value}},a=function(c,h,d){var v=n(c,h);v?v.value=d:c.next={key:h,next:c.next,value:d}},i=function(c,h){return c?!!n(c,h):!1},u=function(c,h){if(c)return n(c,h,!0)};return Gr=function(){var h,d={assert:function(v){if(!d.has(v))throw new t("Side channel does not contain "+e(v))},delete:function(v){var m=u(h,v);return m&&h&&!h.next&&(h=void 0),!!m},get:function(v){return r(h,v)},has:function(v){return i(h,v)},set:function(v,m){h||(h={next:void 0}),a(h,v,m)}};return d},Gr}var Kr,La;function Eo(){return La||(La=1,Kr=Object),Kr}var Jr,Ha;function Tf(){return Ha||(Ha=1,Jr=Error),Jr}var Yr,Ma;function Of(){return Ma||(Ma=1,Yr=EvalError),Yr}var Xr,Na;function Cf(){return Na||(Na=1,Xr=RangeError),Xr}var Zr,Da;function jf(){return Da||(Da=1,Zr=ReferenceError),Zr}var en,Ua;function Wf(){return Ua||(Ua=1,en=SyntaxError),en}var tn,qa;function $f(){return qa||(qa=1,tn=URIError),tn}var rn,ka;function Lf(){return ka||(ka=1,rn=Math.abs),rn}var nn,Ba;function Hf(){return Ba||(Ba=1,nn=Math.floor),nn}var an,Qa;function Mf(){return Qa||(Qa=1,an=Math.max),an}var sn,Va;function Nf(){return Va||(Va=1,sn=Math.min),sn}var on,za;function Df(){return za||(za=1,on=Math.pow),on}var un,Ga;function Uf(){return Ga||(Ga=1,un=Math.round),un}var cn,Ka;function qf(){return Ka||(Ka=1,cn=Number.isNaN||function(t){return t!==t}),cn}var ln,Ja;function kf(){if(Ja)return ln;Ja=1;var e=qf();return ln=function(n){return e(n)||n===0?n:n<0?-1:1},ln}var fn,Ya;function Bf(){return Ya||(Ya=1,fn=Object.getOwnPropertyDescriptor),fn}var dn,Xa;function Ao(){if(Xa)return dn;Xa=1;var e=Bf();if(e)try{e([],"length")}catch{e=null}return dn=e,dn}var hn,Za;function To(){if(Za)return hn;Za=1;var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch{e=!1}return hn=e,hn}var gn,es;function Qf(){return es||(es=1,gn=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 u=Object.getOwnPropertySymbols(t);if(u.length!==1||u[0]!==n||!Object.prototype.propertyIsEnumerable.call(t,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(t,n);if(c.value!==a||c.enumerable!==!0)return!1}return!0}),gn}var mn,ts;function Vf(){if(ts)return mn;ts=1;var e=typeof Symbol<"u"&&Symbol,t=Qf();return mn=function(){return typeof e!="function"||typeof Symbol!="function"||typeof e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},mn}var vn,rs;function Oo(){return rs||(rs=1,vn=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),vn}var pn,ns;function Co(){if(ns)return pn;ns=1;var e=Eo();return pn=e.getPrototypeOf||null,pn}var yn,is;function zf(){if(is)return yn;is=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,n=Math.max,r="[object Function]",a=function(h,d){for(var v=[],m=0;m<h.length;m+=1)v[m]=h[m];for(var b=0;b<d.length;b+=1)v[b+h.length]=d[b];return v},i=function(h,d){for(var v=[],m=d,b=0;m<h.length;m+=1,b+=1)v[b]=h[m];return v},u=function(c,h){for(var d="",v=0;v<c.length;v+=1)d+=c[v],v+1<c.length&&(d+=h);return d};return yn=function(h){var d=this;if(typeof d!="function"||t.apply(d)!==r)throw new TypeError(e+d);for(var v=i(arguments,1),m,b=function(){if(this instanceof m){var o=d.apply(this,a(v,arguments));return Object(o)===o?o:this}return d.apply(h,a(v,arguments))},f=n(0,d.length-v.length),s=[],g=0;g<f;g++)s[g]="$"+g;if(m=Function("binder","return function ("+u(s,",")+"){ return binder.apply(this,arguments); }")(b),d.prototype){var p=function(){};p.prototype=d.prototype,m.prototype=new p,p.prototype=null}return m},yn}var Sn,as;function Xt(){if(as)return Sn;as=1;var e=zf();return Sn=Function.prototype.bind||e,Sn}var Rn,ss;function di(){return ss||(ss=1,Rn=Function.prototype.call),Rn}var bn,os;function jo(){return os||(os=1,bn=Function.prototype.apply),bn}var _n,us;function Gf(){return us||(us=1,_n=typeof Reflect<"u"&&Reflect&&Reflect.apply),_n}var wn,cs;function Kf(){if(cs)return wn;cs=1;var e=Xt(),t=jo(),n=di(),r=Gf();return wn=r||e.call(n,t),wn}var Pn,ls;function Wo(){if(ls)return Pn;ls=1;var e=Xt(),t=yt(),n=di(),r=Kf();return Pn=function(i){if(i.length<1||typeof i[0]!="function")throw new t("a function is required");return r(e,n,i)},Pn}var Fn,fs;function Jf(){if(fs)return Fn;fs=1;var e=Wo(),t=Ao(),n;try{n=[].__proto__===Array.prototype}catch(u){if(!u||typeof u!="object"||!("code"in u)||u.code!=="ERR_PROTO_ACCESS")throw u}var r=!!n&&t&&t(Object.prototype,"__proto__"),a=Object,i=a.getPrototypeOf;return Fn=r&&typeof r.get=="function"?e([r.get]):typeof i=="function"?function(c){return i(c==null?c:a(c))}:!1,Fn}var xn,ds;function Yf(){if(ds)return xn;ds=1;var e=Oo(),t=Co(),n=Jf();return xn=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,xn}var In,hs;function Xf(){if(hs)return In;hs=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,n=Xt();return In=n.call(e,t),In}var En,gs;function hi(){if(gs)return En;gs=1;var e,t=Eo(),n=Tf(),r=Of(),a=Cf(),i=jf(),u=Wf(),c=yt(),h=$f(),d=Lf(),v=Hf(),m=Mf(),b=Nf(),f=Df(),s=Uf(),g=kf(),p=Function,o=function(ne){try{return p('"use strict"; return ('+ne+").constructor;")()}catch{}},l=Ao(),y=To(),R=function(){throw new c},_=l?(function(){try{return arguments.callee,R}catch{try{return l(arguments,"callee").get}catch{return R}}})():R,P=Vf()(),F=Yf(),w=Co(),S=Oo(),x=jo(),I=di(),O={},M=typeof Uint8Array>"u"||!F?e:F(Uint8Array),$={__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%":O,"%AsyncGenerator%":O,"%AsyncGeneratorFunction%":O,"%AsyncIteratorPrototype%":O,"%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%":p,"%GeneratorFunction%":O,"%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%":l,"%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%":u,"%ThrowTypeError%":_,"%TypedArray%":M,"%TypeError%":c,"%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%":h,"%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%":d,"%Math.floor%":v,"%Math.max%":m,"%Math.min%":b,"%Math.pow%":f,"%Math.round%":s,"%Math.sign%":g,"%Reflect.getPrototypeOf%":S};if(F)try{null.error}catch(ne){var q=F(F(ne));$["%Error.prototype%"]=q}var N=function ne(Y){var ie;if(Y==="%AsyncFunction%")ie=o("async function () {}");else if(Y==="%GeneratorFunction%")ie=o("function* () {}");else if(Y==="%AsyncGeneratorFunction%")ie=o("async function* () {}");else if(Y==="%AsyncGenerator%"){var re=ne("%AsyncGeneratorFunction%");re&&(ie=re.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var ve=ne("%AsyncGenerator%");ve&&F&&(ie=F(ve.prototype))}return $[Y]=ie,ie},j={__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"]},A=Xt(),W=Xf(),D=A.call(I,Array.prototype.concat),U=A.call(x,Array.prototype.splice),k=A.call(I,String.prototype.replace),Q=A.call(I,String.prototype.slice),J=A.call(I,RegExp.prototype.exec),V=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,G=/\\(\\)?/g,Z=function(Y){var ie=Q(Y,0,1),re=Q(Y,-1);if(ie==="%"&&re!=="%")throw new u("invalid intrinsic syntax, expected closing `%`");if(re==="%"&&ie!=="%")throw new u("invalid intrinsic syntax, expected opening `%`");var ve=[];return k(Y,V,function(_e,Se,we,Ee){ve[ve.length]=we?k(Ee,G,"$1"):Se||_e}),ve},ee=function(Y,ie){var re=Y,ve;if(W(j,re)&&(ve=j[re],re="%"+ve[0]+"%"),W($,re)){var _e=$[re];if(_e===O&&(_e=N(re)),typeof _e>"u"&&!ie)throw new c("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:ve,name:re,value:_e}}throw new u("intrinsic "+Y+" does not exist!")};return En=function(Y,ie){if(typeof Y!="string"||Y.length===0)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof ie!="boolean")throw new c('"allowMissing" argument must be a boolean');if(J(/^%?[^%]*%?$/,Y)===null)throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var re=Z(Y),ve=re.length>0?re[0]:"",_e=ee("%"+ve+"%",ie),Se=_e.name,we=_e.value,Ee=!1,$e=_e.alias;$e&&(ve=$e[0],U(re,D([0,1],$e)));for(var it=1,Ke=!0;it<re.length;it+=1){var Me=re[it],at=Q(Me,0,1),st=Q(Me,-1);if((at==='"'||at==="'"||at==="`"||st==='"'||st==="'"||st==="`")&&at!==st)throw new u("property names with quotes must have matching quotes");if((Me==="constructor"||!Ke)&&(Ee=!0),ve+="."+Me,Se="%"+ve+"%",W($,Se))we=$[Se];else if(we!=null){if(!(Me in we)){if(!ie)throw new c("base intrinsic for "+Y+" exists, but the property is not available.");return}if(l&&it+1>=re.length){var ot=l(we,Me);Ke=!!ot,Ke&&"get"in ot&&!("originalValue"in ot.get)?we=ot.get:we=we[Me]}else Ke=W(we,Me),we=we[Me];Ke&&!Ee&&($[Se]=we)}}return we},En}var An,ms;function $o(){if(ms)return An;ms=1;var e=hi(),t=Wo(),n=t([e("%String.prototype.indexOf%")]);return An=function(a,i){var u=e(a,!!i);return typeof u=="function"&&n(a,".prototype.")>-1?t([u]):u},An}var Tn,vs;function Lo(){if(vs)return Tn;vs=1;var e=hi(),t=$o(),n=Yt(),r=yt(),a=e("%Map%",!0),i=t("Map.prototype.get",!0),u=t("Map.prototype.set",!0),c=t("Map.prototype.has",!0),h=t("Map.prototype.delete",!0),d=t("Map.prototype.size",!0);return Tn=!!a&&function(){var m,b={assert:function(f){if(!b.has(f))throw new r("Side channel does not contain "+n(f))},delete:function(f){if(m){var s=h(m,f);return d(m)===0&&(m=void 0),s}return!1},get:function(f){if(m)return i(m,f)},has:function(f){return m?c(m,f):!1},set:function(f,s){m||(m=new a),u(m,f,s)}};return b},Tn}var On,ps;function Zf(){if(ps)return On;ps=1;var e=hi(),t=$o(),n=Yt(),r=Lo(),a=yt(),i=e("%WeakMap%",!0),u=t("WeakMap.prototype.get",!0),c=t("WeakMap.prototype.set",!0),h=t("WeakMap.prototype.has",!0),d=t("WeakMap.prototype.delete",!0);return On=i?function(){var m,b,f={assert:function(s){if(!f.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(m)return d(m,s)}else if(r&&b)return b.delete(s);return!1},get:function(s){return i&&s&&(typeof s=="object"||typeof s=="function")&&m?u(m,s):b&&b.get(s)},has:function(s){return i&&s&&(typeof s=="object"||typeof s=="function")&&m?h(m,s):!!b&&b.has(s)},set:function(s,g){i&&s&&(typeof s=="object"||typeof s=="function")?(m||(m=new i),c(m,s,g)):r&&(b||(b=r()),b.set(s,g))}};return f}:r,On}var Cn,ys;function Ho(){if(ys)return Cn;ys=1;var e=yt(),t=Yt(),n=Af(),r=Lo(),a=Zf(),i=a||r||n;return Cn=function(){var c,h={assert:function(d){if(!h.has(d)){var v=d&&Object(d)===d?"the given object key":t(d);throw new e("Side channel does not contain "+v)}}
20,delete:function(d){return!!c&&c.delete(d)},get:function(d){return c&&c.get(d)},has:function(d){return!!c&&c.has(d)},set:function(d,v){c||(c=i()),c.set(d,v)}};return h},Cn}var jn,Ss;function gi(){if(Ss)return jn;Ss=1;var e=String.prototype.replace,t=/%20/g,n={RFC1738:"RFC1738",RFC3986:"RFC3986"};return jn={default:n.RFC3986,formatters:{RFC1738:function(r){return e.call(r,t,"+")},RFC3986:function(r){return String(r)}},RFC1738:n.RFC1738,RFC3986:n.RFC3986},jn}var Wn,Rs;function Mo(){if(Rs)return Wn;Rs=1;var e=gi(),t=Ho(),n=To(),r=Object.prototype.hasOwnProperty,a=Array.isArray,i=t(),u=function(S,x){return i.set(S,x),S},c=function(S){return i.has(S)},h=function(S){return i.get(S)},d=function(S,x){i.set(S,x)},v=(function(){for(var w=[],S=0;S<256;++S)w[w.length]="%"+((S<16?"0":"")+S.toString(16)).toUpperCase();return w})(),m=function(S){for(;S.length>1;){var x=S.pop(),I=x.obj[x.prop];if(a(I)){for(var O=[],M=0;M<I.length;++M)typeof I[M]<"u"&&(O[O.length]=I[M]);x.obj[x.prop]=O}}},b=function(S,x){for(var I=x&&x.plainObjects?{__proto__:null}:{},O=0;O<S.length;++O)typeof S[O]<"u"&&(I[O]=S[O]);return I},f=function(S,x,I){x==="__proto__"&&n?n(S,x,{configurable:!0,enumerable:!0,value:I,writable:!0}):S[x]=I},s=function w(S,x,I){if(!x)return S;if(typeof x!="object"&&typeof x!="function"){if(a(S)){var O=S.length;if(I&&typeof I.arrayLimit=="number"&&O>=I.arrayLimit){if(I.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+I.arrayLimit+" element"+(I.arrayLimit===1?"":"s")+" allowed in an array.");return u(b(S.concat(x),I),O)}S[O]=x}else if(S&&typeof S=="object")if(c(S)){var M=h(S)+1;S[M]=x,d(S,M)}else{if(I&&I.strictMerge)return[S,x];(I&&(I.plainObjects||I.allowPrototypes)||!r.call(Object.prototype,x))&&(S[x]=!0)}else return[S,x];return S}if(!S||typeof S!="object"){if(c(x)){for(var $=Object.keys(x),q=I&&I.plainObjects?{__proto__:null,0:S}:{0:S},N=0;N<$.length;N++){var j=parseInt($[N],10);q[j+1]=x[$[N]]}return u(q,h(x)+1)}var A=[S].concat(x);if(I&&typeof I.arrayLimit=="number"&&A.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 u(b(A,I),A.length-1)}return A}var W=S;if(a(S)&&!a(x)&&(W=b(S,I)),a(S)&&a(x)){if(x.forEach(function(D,U){if(r.call(S,U)){var k=S[U];k&&typeof k=="object"&&D&&typeof D=="object"?S[U]=w(k,D,I):S[S.length]=D}else S[U]=D}),I&&typeof I.arrayLimit=="number"&&S.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 u(b(S,I),S.length-1)}return S}return Object.keys(x).reduce(function(D,U){var k=x[U];if(r.call(D,U)?f(D,U,w(D[U],k,I)):f(D,U,k),c(x)&&!c(D)&&u(D,h(x)),c(D)){var Q=parseInt(U,10);String(Q)===U&&Q>=0&&Q>h(D)&&d(D,Q)}return D},W)},g=function(S,x){return Object.keys(x).reduce(function(I,O){return f(I,O,x[O]),I},S)},p=function(w,S,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}},o=1024,l=function(S,x,I,O,M){if(S.length===0)return S;var $=S;if(typeof S=="symbol"?$=Symbol.prototype.toString.call(S):typeof S!="string"&&($=String(S)),I==="iso-8859-1")return escape($).replace(/%u[0-9a-f]{4}/gi,function(k){return"%26%23"+parseInt(k.slice(2),16)+"%3B"});for(var q="",N=0;N<$.length;N+=o){var j=$.length>=o?$.slice(N,N+o):$;if(N+o<$.length){var A=j.charCodeAt(j.length-1);A>=55296&&A<=56319&&(j=j.slice(0,-1),N-=1)}for(var W=[],D=0;D<j.length;++D){var U=j.charCodeAt(D);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]=j.charAt(D);continue}if(U<128){W[W.length]=v[U];continue}if(U<2048){W[W.length]=v[192|U>>6]+v[128|U&63];continue}if(U<55296||U>=57344){W[W.length]=v[224|U>>12]+v[128|U>>6&63]+v[128|U&63];continue}D+=1,U=65536+((U&1023)<<10|j.charCodeAt(D)&1023),W[W.length]=v[240|U>>18]+v[128|U>>12&63]+v[128|U>>6&63]+v[128|U&63]}q+=W.join("")}return q},y=function(S){for(var x=[{obj:{o:S},prop:"o"}],I=t(),O=0;O<x.length;++O)for(var M=x[O],$=M.obj[M.prop],q=Object.keys($),N=0;N<q.length;++N){var j=q[N],A=$[j];typeof A=="object"&&A!==null&&!I.has(A)&&(x[x.length]={obj:$,prop:j},I.set(A,!0))}return m(x),S},R=function(S){return Object.prototype.toString.call(S)==="[object RegExp]"},_=function(S){return!S||typeof S!="object"?!1:!!(S.constructor&&S.constructor.isBuffer&&S.constructor.isBuffer(S))},P=function(S,x,I,O,M){if(c(S)){if(M)throw new RangeError("Array limit exceeded. Only "+I+" element"+(I===1?"":"s")+" allowed in an array.");var $=h(S)+1;return S[$]=x,d(S,$),S}var q=[].concat(S,x);if(q.length>I){if(M)throw new RangeError("Array limit exceeded. Only "+I+" element"+(I===1?"":"s")+" allowed in an array.");return u(b(q,{plainObjects:O}),q.length-1)}return q},F=function(S,x){if(a(S)){for(var I=[],O=0;O<S.length;O+=1)I[I.length]=x(S[O]);return I}return x(S)};return Wn={arrayToObject:b,assign:g,combine:P,compact:y,decode:p,encode:l,isBuffer:_,isOverflow:c,isRegExp:R,markOverflow:u,maybeMap:F,merge:s},Wn}var $n,bs;function ed(){if(bs)return $n;bs=1;var e=Ho(),t=Mo(),n=gi(),r=Object.prototype.hasOwnProperty,a={brackets:function(p){return p+"[]"},comma:"comma",indices:function(p,o){return p+"["+o+"]"},repeat:function(p){return p}},i=Array.isArray,u=Array.prototype.push,c=function(g,p){u.apply(g,i(p)?p:[p])},h=Date.prototype.toISOString,d=n.default,v={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset
vendor: 8,442 bytes, line 20
20:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:t.encode,encodeValuesOnly:!1,filter:void 0,format:d,formatter:n.formatters[d],indices:!1,serializeDate:function(p){return h.call(p)},skipNulls:!1,strictNullHandling:!1},m=function(p){return typeof p=="string"||typeof p=="number"||typeof p=="boolean"||typeof p=="symbol"||typeof p=="bigint"},b={},f=function g(p,o,l,y,R,_,P,F,w,S,x,I,O,M,$,q,N,j){for(var A=p,W=j,D=0,U=!1;(W=W.get(b))!==void 0&&!U;){var k=W.get(p);if(D+=1,typeof k<"u"){if(k===D)throw new RangeError("Cyclic object value");U=!0}typeof W.get(b)>"u"&&(D=0)}if(typeof S=="function"?A=S(o,A):A instanceof Date?A=O(A):l==="comma"&&i(A)&&(A=t.maybeMap(A,function(Se){return Se instanceof Date?O(Se):Se})),A===null){if(_)return $(w&&!q?w(o,v.encoder,N,"key",M):o);A=""}if(m(A)||t.isBuffer(A)){if(w){var Q=q?o:w(o,v.encoder,N,"key",M);return[$(Q)+"="+$(w(A,v.encoder,N,"value",M))]}return[$(o)+"="+$(String(A))]}var J=[];if(typeof A>"u")return J;var V;if(l==="comma"&&i(A))q&&w&&(A=t.maybeMap(A,function(Se){return Se==null?Se:w(Se)})),V=[{value:A.length>0?A.join(",")||null:void 0}];else if(i(S))V=S;else{var G=Object.keys(A);V=x?G.sort(x):G}var Z=F?String(o).replace(/\./g,"%2E"):String(o),ee=y&&i(A)&&A.length===1?Z+"[]":Z;if(R&&i(A)&&A.length===0)return ee+"[]";for(var ne=0;ne<V.length;++ne){var Y=V[ne],ie=typeof Y=="object"&&Y&&typeof Y.value<"u"?Y.value:A[Y];if(!(P&&ie===null)){var re=I&&F?String(Y).replace(/\./g,"%2E"):String(Y),ve=i(A)?typeof l=="function"?l(ee,re):ee:ee+(I?"."+re:"["+re+"]");j.set(p,D);var _e=e();_e.set(b,j),c(J,g(ie,ve,l,y,R,_,P,F,l==="comma"&&q&&i(A)?null:w,S,x,I,O,M,$,q,N,_e))}}return J},s=function(p){if(!p)return v;if(typeof p.allowEmptyArrays<"u"&&typeof p.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof p.encodeDotInKeys<"u"&&typeof p.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(p.encoder!==null&&typeof p.encoder<"u"&&typeof p.encoder!="function")throw new TypeError("Encoder has to be a function.");var o=p.charset||v.charset;if(typeof p.charset<"u"&&p.charset!=="utf-8"&&p.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var l=n.default;if(typeof p.format<"u"){if(!r.call(n.formatters,p.format))throw new TypeError("Unknown format option provided.");l=p.format}var y=n.formatters[l],R=v.filter;(typeof p.filter=="function"||i(p.filter))&&(R=p.filter);var _;if(p.arrayFormat in a?_=p.arrayFormat:"indices"in p?_=p.indices?"indices":"repeat":_=v.arrayFormat,"commaRoundTrip"in p&&typeof p.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var P=typeof p.allowDots>"u"?p.encodeDotInKeys===!0?!0:v.allowDots:!!p.allowDots;return{addQueryPrefix:typeof p.addQueryPrefix=="boolean"?p.addQueryPrefix:v.addQueryPrefix,allowDots:P,allowEmptyArrays:typeof p.allowEmptyArrays=="boolean"?!!p.allowEmptyArrays:v.allowEmptyArrays,arrayFormat:_,charset:o,charsetSentinel:typeof p.charsetSentinel=="boolean"?p.charsetSentinel:v.charsetSentinel,commaRoundTrip:!!p.commaRoundTrip,delimiter:typeof p.delimiter>"u"?v.delimiter:p.delimiter,encode:typeof p.encode=="boolean"?p.encode:v.encode,encodeDotInKeys:typeof p.encodeDotInKeys=="boolean"?p.encodeDotInKeys:v.encodeDotInKeys,encoder:typeof p.encoder=="function"?p.encoder:v.encoder,encodeValuesOnly:typeof p.encodeValuesOnly=="boolean"?p.encodeValuesOnly:v.encodeValuesOnly,filter:R,format:l,formatter:y,serializeDate:typeof p.serializeDate=="function"?p.serializeDate:v.serializeDate,skipNulls:typeof p.skipNulls=="boolean"?p.skipNulls:v.skipNulls,sort:typeof p.sort=="function"?p.sort:null,strictNullHandling:typeof p.strictNullHandling=="boolean"?p.strictNullHandling:v.strictNullHandling}};return $n=function(g,p){var o=g,l=s(p),y,R;typeof l.filter=="function"?(R=l.filter,o=R("",o)):i(l.filter)&&(R=l.filter,y=R);var _=[];if(typeof o!="object"||o===null)return"";var P=a[l.arrayFormat],F=P==="comma"&&l.commaRoundTrip;y||(y=Object.keys(o)),l.sort&&y.sort(l.sort);for(var w=e(),S=0;S<y.length;++S){var x=y[S];if(!(typeof x>"u"||x===null)){var I=o[x];l.skipNulls&&I===null||c(_,f(I,x,P,F,l.allowEmptyArrays,l.strictNullHandling,l.skipNulls,l.encodeDotInKeys,l.encode?l.encoder:null,l.filter,l.sort,l.allowDots,l.serializeDate,l.format,l.formatter,l.encodeValuesOnly,l.charset,w))}}var O=_.join(l.delimiter),M=l.addQueryPrefix===!0?"?":"";return l.charsetSentinel&&(l.charset==="iso-8859-1"?M+="utf8=%26%2310003%3B"+l.delimiter:M+="utf8=%E2%9C%93"+l.delimiter),O.length>0?M+O:""},$n}var Ln,_s;function td(){if(_s)return Ln;_s=1;var e=Mo(),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(f){return f.replace(/&#(\d+);/g,function(s,g){return String.fromCharCode(parseInt(g,10))})},i=function(f,s,g,p){if(f&&typeof f=="string"&&s.comma&&f.indexOf(",")>-1){if(p&&s.throwOnLimitExceeded)for(var o=0,l=f.indexOf(",");l>-1;){if(o+=1,o>=s.arrayLimit)throw new RangeError("Array limit exceeded. Only "+s.arrayLimit+" element"+(s.arrayLimit===1?"":"s")+" allowed in an array.");l=f.indexOf(",",l+1)}return f.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 f},u="utf8=%26%2310003%3B",c="utf8=%E2%9C%93",h=function(s,g){var p={__proto__:null},o=g.ignoreQueryPrefix?s.replace(/^\?/,""):s;o=o.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var l=g.parameterLimit===1/0?void 0:g.parameterLimit,y=o.split(g.delimiter,g.throwOnLimitExceeded&&typeof l<"u"?l+1:l);if(g.throwOnLimitExceeded&&typeof l<"u"&&y.length>l)throw new RangeError("Parameter limit exceeded. Only "+l+" parameter"+(l===1?"":"s")+" allowed.");var R=-1,_,P=g.charset;if(g.charsetSentinel)for(_=0;_<y.length;++_)y[_].indexOf("utf8=")===0&&(y[_]===c?P="utf-8":y[_]===u&&(P="iso-8859-1"),R=_,_=y.length);for(_=0;_<y.length;++_)if(_!==R){var F=y[_],w=F.indexOf("]="),S=w===-1?F.indexOf("="):w+1,x,I;if(S===-1?(x=g.decoder(F,r.decoder,P,"key"),I=g.strictNullHandling?null:""):(x=g.decoder(F.slice(0,S),r.decoder,P,"key"),x!==null&&(I=e.maybeMap(i(F.slice(S+1),g,n(p[x])?p[x].length:0,F.indexOf("[]=")===-1),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 O=t.call(p,x);O&&(g.duplicates==="combine"||F.indexOf("[]=")>-1)?p[x]=e.combine(p[x],I,g.arrayLimit,g.plainObjects,g.throwOnLimitExceeded):(!O||g.duplicates==="last")&&(p[x]=I)}}return p},d=function(f,s,g,p){var o=0;if(f.length>0&&f[f.length-1]==="[]"){var l=f.slice(0,-1).join("");o=Array.isArray(s)&&s[l]?s[l].length:0}for(var y=p?s:i(s,g,o),R=f.length-1;R>=0;--R){var _,P=f[R];if(P==="[]"&&g.parseArrays)e.isOverflow(y)?_=y:_=g.allowEmptyArrays&&(y===""||g.strictNullHandling&&y===null)?[]:e.combine([],y,g.arrayLimit,g.plainObjects,g.throwOnLimitExceeded);else{_=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,S=parseInt(w,10),x=!isNaN(S)&&P!==w&&String(S)===w&&S>=0&&g.parseArrays;if(!g.parseArrays&&w==="")_={0:y};else if(x&&S<g.arrayLimit)_=[],_[S]=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]=y,e.markOverflow(_,S)):w!=="__proto__"&&(_[w]=y)}}y=_}return y},v=function(s,g){var p=g.allowDots?s.replace(/\.([^.[]+)/g,"[$1]"):s;if(g.depth<=0)return!g.plainObjects&&t.call(Object.prototype,p)&&!g.allowPrototypes?void 0:[p];var o=[],l=p.indexOf("["),y=l>=0?p.slice(0,l):p;if(y){if(!g.plainObjects&&t.call(Object.prototype,y)&&!g.allowPrototypes)return;o[o.length]=y}for(var R=p.length,_=l,P=0;_>=0&&P<g.depth;){for(var F=1,w=_+1,S=-1;w<R&&S<0;
20){var x=p.charCodeAt(w);x===91?F+=1:x===93&&(F-=1,F===0&&(S=w)),w+=1}if(S<0)return o[o.length]="["+p.slice(_)+"]",o;var I=p.slice(_,S+1),O=I.slice(1,-1);if(!g.plainObjects&&t.call(Object.prototype,O)&&!g.allowPrototypes)return;o[o.length]=I,P+=1,_=p.indexOf("[",S+1)}if(_>=0){if(g.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+g.depth+" and strictDepth is true");o[o.length]="["+p.slice(_)+"]"}return o},m=function(s,g,p,o){if(s){var l=v(s,p);if(l)return d(l,g,p,o)}},b=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");if(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,p=typeof s.duplicates>"u"?r.duplicates:s.duplicates;if(p!=="combine"&&p!=="first"&&p!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var o=typeof s.allowDots>"u"?s.decodeDotInKeys===!0?!0:r.allowDots:!!s.allowDots;return{allowDots:o,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:p,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 Ln=function(f,s){var g=b(s);if(f===""||f===null||typeof f>"u")return g.plainObjects?{__proto__:null}:{};for(var p=typeof f=="string"?h(f,g):f,o=g.plainObjects?{__proto__:null}:{},l=Object.keys(p),y=0;y<l.length;++y){var R=l[y],_=m(R,p[R],g,typeof f=="string");o=e.merge(o,_,g)}return g.allowSparse===!0?o:e.compact(o)},Ln}var Hn,ws;function rd(){if(ws)return Hn;ws=1;var e=ed(),t=td(),n=gi();return Hn={formats:n,parse:t,stringify:e},Hn}var nd=rd();const Ps=Qn(nd);var Fs=function(t){t&&(window.document.title=t)},id=(function(){function e(t){var n=this,r=t.windowTitle,a=t.writeDelay,i=a===void 0?400:a,u=t.createURL,c=t.parseURL,h=t.getLocation,d=t.start,v=t.dispose,m=t.push,b=t.cleanUrlOnDispose;si(this,e),H(this,"$$type","ais.browser"),H(this,"windowTitle",void 0),H(this,"writeDelay",void 0),H(this,"_createURL",void 0),H(this,"parseURL",void 0),H(this,"getLocation",void 0),H(this,"writeTimer",void 0),H(this,"_onPopState",void 0),H(this,"inPopState",!1),H(this,"isDisposed",!1),H(this,"latestAcknowledgedHistory",0),H(this,"_start",void 0),H(this,"_dispose",void 0),H(this,"_push",void 0),H(this,"_cleanUrlOnDispose",void 0),this.windowTitle=r,this.writeTimer=void 0,this.writeDelay=i,this._createURL=u,this.parseURL=c,this.getLocation=h,this._start=d,this._dispose=v,this._push=m,this._cleanUrlOnDispose=typeof b>"u"?!0:b,De(function(f){var s=f.window,g=n.windowTitle&&n.windowTitle(n.read());Fs(g),n.latestAcknowledgedHistory=s.history.length})}return oi(e,[{key:"read",value:function(){return this.parseURL({qsModule:Ps,location:this.getLocation()})}},{key:"write",value:function(n){var r=this;De(function(a){var i=a.window,u=r.createURL(n),c=r.windowTitle&&r.windowTitle(n);r.writeTimer&&clearTimeout(r.writeTimer),r.writeTimer=setTimeout(function(){Fs(c),r.shouldWrite(u)&&(r._push?r._push(u):i.history.pushState(n,c||"",u),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())},De(function(a){var i=a.window;i.addEventListener("popstate",r._onPopState)})}},{key:"createURL",value:function(n){var r=this._createURL({qsModule:Ps,routeState:n,location:this.getLocation()});return r}},{key:"dispose",value:function(){var n=this;this._dispose&&this._dispose(),this.isDisposed=!0,De(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 De(function(a){var i=a.window;if(r.isDisposed&&!r._cleanUrlOnDispose)return!1;var u=!(r.isDisposed&&r.latestAcknowledgedHistory!==i.history.length);return!r.inPopState&&u&&n!==i.location.href})}}]),e})();function ad(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.createURL,n=t===void 0?function(s){var g=s.qsModule,p=s.routeState,o=s.location,l=o.protocol,y=o.hostname,R=o.port,_=R===void 0?"":R,P=o.pathname,F=o.hash,w=g.stringify(p),S=_===""?"":":".concat(_);return w?"".concat(l,"//").concat(y).concat(S).concat(P,"?").concat(w).c
20oncat(F):"".concat(l,"//").concat(y).concat(S).concat(P).concat(F)}:t,r=e.parseURL,a=r===void 0?function(s){var g=s.qsModule,p=s.location;return g.parse(p.search.slice(1),{arrayLimit:99})}:r,i=e.writeDelay,u=i===void 0?400:i,c=e.windowTitle,h=e.getLocation,d=h===void 0?function(){return De(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.")}})}:h,v=e.start,m=e.dispose,b=e.push,f=e.cleanUrlOnDispose;return new id({createURL:n,parseURL:a,writeDelay:u,windowTitle:c,getLocation:d,start:v,dispose:m,push:b,cleanUrlOnDispose:f})}function xs(e){e.configure;var t=Fe(e,["configure"]);return t}function sd(){return{$$type:"ais.simple",stateToRoute:function(t){return Object.keys(t).reduce(function(n,r){return T(E({},n),H({},r,xs(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":Ue(a))!=="object"||a===null?n:T(E({},n),H({},r,xs(a)))},{})}}}var od=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.router,r=n===void 0?ad():n,a=t.stateMapping,i=a===void 0?sd():a,u=t.$$internal,c=u===void 0?!1:u;return function(h){var d=h.instantSearchInstance;function v(f){var s=d.mainIndex.getWidgets().length===0?d._initialUiState:d.mainIndex.getWidgetUiState({}),g=Object.keys(f).reduce(function(o,l){return T(E({},o),H({},l,f[l]))},s),p=i.stateToRoute(g);return r.createURL(p)}d._createURL=v;var m=void 0,b=d._initialUiState;return{$$type:"ais.router({router:".concat(r.$$type||"__unknown__",", stateMapping:").concat(i.$$type||"__unknown__","})"),$$internal:c,onStateChange:function(s){var g=s.uiState,p=i.stateToRoute(g);(m===void 0||!li(m,p))&&(r.write(p),m=p)},subscribe:function(){d._initialUiState=E({},b,i.routeToState(r.read())),r.onUpdate(function(s){d.mainIndex.getWidgets().length>0&&d.setUiState(i.routeToState(s))})},started:function(){var s;(s=r.start)===null||s===void 0||s.call(r)},unsubscribe:function(){r.dispose()}}}},ud=0;function cd(e){e.dependsOn==="recommend"&&(e.$$id=ud++)}function ld(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 No(){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 ld(a)}).join(", ");return function(a){return[a,"See documentation: ".concat(r)].filter(Boolean).join(`
21
22`)}}function fd(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 dd(e){return e.filter(function(t,n,r){return r.indexOf(t)===n})}var hd=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=Fe(n,["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"]);return t.setQueryParameters(r)},gd=function(t,n){return n.facets.reduce(function(r,a){return r.addFacet(a)},t)},md=function(t,n){return n.disjunctiveFacets.reduce(function(r,a){return r.addDisjunctiveFacet(a)},t)},vd=function(t,n){return t.setQueryParameters({hierarchicalFacets:n.hierarchicalFacets.reduce(function(r,a){var i=fd(r,function(c){return c.name===a.name});if(i===-1)return r.concat(a);var u=r.slice();return u.splice(i,1,a),u},t.hierarchicalFacets)})},pd=function(t,n){return n.tagRefinements.reduce(function(r,a){return r.addTagRefinement(a)},t)},yd=function(t,n){return t.setQueryParameters({facetsRefinements:E({},t.facetsRefinements,n.facetsRefinements)})},Sd=function(t,n){return t.setQueryParameters({facetsExcludes:E({},t.facetsExcludes,n.facetsExcludes)})},Rd=function(t,n){return t.setQueryParameters({disjunctiveFacetsRefinements:E({},t.disjunctiveFacetsRefinements,n.disjunctiveFacetsRefinements)})},bd=function(t,n){return t.setQueryParameters({numericRefinements:E({},t.numericRefinements,n.numericRefinements)})},_d=function(t,n){return t.setQueryParameters({hierarchicalFacetsRefinements:E({},t.hierarchicalFacetsRefinements,n.hierarchicalFacetsRefinements)})},wd=function(t,n){var r=dd([].concat(t.ruleContexts).concat(n.ruleContexts).filter(
22Boolean));return r.length>0?t.setQueryParameters({ruleContexts:r}):t},Is=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 u=_d(a,i),c=vd(u,i),h=pd(c,i),d=bd(h,i),v=Rd(d,i),m=Sd(v,i),b=yd(m,i),f=md(b,i),s=wd(f,i),g=gd(s,i);return hd(g,i)})};function Es(e){for(var t=e.getParent(),n=[e.getHelper().state];t!==null;)n=[t.getHelper().state].concat(n),t=t.getParent();return n}var xt=No({name:"index-widget"});function Do(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 It(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return e.reduce(function(r,a){return We(a)||!a.getWidgetUiState&&!a.getWidgetState?r:a.getWidgetUiState?a.getWidgetUiState(r,t):a.getWidgetState(r,t)},n)}function Et(e,t){var n=t.initialSearchParameters,r=Fe(t,["initialSearchParameters"]);return e.reduce(function(a,i){return!i.getWidgetSearchParameters||We(i)?a:i.dependsOn==="search"&&i.getWidgetParameters?i.getWidgetParameters(a,r):i.getWidgetSearchParameters(a,r)},n)}function As(e,t){var n=t.initialRecommendParameters,r=Fe(t,["initialRecommendParameters"]);return e.reduce(function(a,i){return!We(i)&&i.dependsOn==="recommend"&&i.getWidgetParameters?i.getWidgetParameters(a,r):a},n)}function Uo(e){var t=e.filter(We);t.length!==0&&t.forEach(function(n){var r=n.getHelper();Do(r,{state:r.state.resetPage(),recommendState:r.recommendState,isPageReset:!0}),Uo(n.getWidgets())})}function qo(e){var t=e.filter(We);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 ko(e){return e.reduce(function(t,n){if(We(n)){if(n._isolated)return t;var r=ko(n.getWidgets());return{hasSearchWidget:t.hasSearchWidget||r.hasSearchWidget,hasRecommendWidget:t.hasRecommendWidget||r.hasRecommendWidget}}return n.dependsOn==="recommend"?T(E({},t),{hasRecommendWidget:!0}):n.dependsOn==="none"?t:T(E({},t),{hasSearchWidget:!0})},{hasSearchWidget:!1,hasRecommendWidget:!1})}function Pd(e){var t=ko(e.mainIndex.getWidgets()),n=t.hasSearchWidget,r=t.hasRecommendWidget;e._hasSearchWidget=n,e._hasRecommendWidget=r}var Fd=function(t){var n;if(t===void 0||t.indexName===void 0&&!t.isolated&&!t.EXPERIMENTAL_isolated)throw new Error(xt("The `indexName` option is required."));var r=t.indexName,a=r===void 0?"":r,i=t.indexId,u=i===void 0?a:i,c=t.isolated,h=c===void 0?(n=t.EXPERIMENTAL_isolated)!==null&&n!==void 0?n:!1:c,d=[],v={},m=null,b=null,f=null,s=null,g=null,p=function(){m&&Pd(m)};return{$$type:"ais.index",$$widgetType:"ais.index",_isolated:h,getIndexName:function(){return a},getIndexId:function(){return u},getHelper:function(){return f},getResults:function(){return s?.lastResults?(s.lastResults._state=f.state,s.lastResults):null},getResultsForWidget:function(l){return l.dependsOn!=="recommend"||We(l)||l.$$id===void 0?this.getResults():f?.lastRecommendResults?f.lastRecommendResults[l.$$id]:null},getPreviousState:function(){return g},getScopedResults:function(){var l=this.getParent(),y;return l?y=l.getWidgets():a.length===0?y=this.getWidgets():y=[this],qo(y)},getParent:function(){return h?null:b},createURL:function(l){return typeof l=="function"?m._createURL(H({},u,l(v))):m._createURL(H({},u,It(d,{searchParameters:l,helper:f})))},scheduleLocalSearch:ft(function(){h&&f?.search()}),getWidgets:function(){return d},addWidgets:function(l){var y=this;if(!Array.isArray(l))throw new Error(xt("The `addWidgets` method expects an array of widgets."));var R=l.reduce(function(_,P){return _.concat(Array.isArray(P)?P:[P])},[]);if(R.some(function(_){return typeof _.init!="function"&&typeof _.render!="function"}))throw new Error(xt("The widget definition expects a `render` and/or an `init` method."));return R.forEach(function(_){_.parent=y,We(_)||cd(_)}),d=d.concat(R),p(),m&&R.length&&(Do(f,{state:Et(d,{uiState:v,initialSearchParameters:f.state}),recommendState:As(d,{uiState:v,initialRecommendParameters:f.recommendState}),_uiState:v}),R.forEach(function(_){if(_.getRenderState){var P=_.getRenderState(m.renderState[y.getIndexId()]||{},ht(m,y,m._initialUiState));
22Qr({renderState:P,instantSearchInstance:m,parent:y})}}),R.forEach(function(_){_.init&&_.init(ht(m,y,m._initialUiState))}),h?this.scheduleLocalSearch():m.scheduleSearch()),this},removeWidgets:function(l){var y=this;if(!Array.isArray(l))throw new Error(xt("The `removeWidgets` method expects an array of widgets."));var R=l.reduce(function(S,x){return S.concat(Array.isArray(x)?x:[x])},[]);if(R.some(function(S){return typeof S.dispose!="function"}))throw new Error(xt("The widget definition expects a `dispose` method."));if(d=d.filter(function(S){return R.indexOf(S)===-1}),R.forEach(function(S){S.parent=void 0}),p(),m&&R.length){var _=R.reduce(function(S,x){var I=x.dispose({helper:f,state:S.cleanedSearchState,recommendState:S.cleanedRecommendState,parent:y});return et(I,se.RecommendParameters)?S.cleanedRecommendState=I:I&&(S.cleanedSearchState=I),S},{cleanedSearchState:f.state,cleanedRecommendState:f.recommendState}),P=_.cleanedSearchState,F=_.cleanedRecommendState,w=m.future.preserveSharedStateOnUnmount?Et(d,{uiState:v,initialSearchParameters:new se.SearchParameters({index:this.getIndexName()})}):Et(d,{uiState:It(d,{searchParameters:P,helper:f}),initialSearchParameters:P});v=It(d,{searchParameters:w,helper:f}),f.setState(w),f.recommendState=F,d.length&&(h?this.scheduleLocalSearch():m.scheduleSearch())}return this},init:function(l){var y=this,R=l.instantSearchInstance,_=l.parent,P=l.uiState,F;if(f===null){m=R,b=_,v=P[u]||{};var w=R.mainHelper,S=Et(d,{uiState:v,initialSearchParameters:new se.SearchParameters({index:a})}),x=As(d,{uiState:v,initialRecommendParameters:new se.RecommendParameters});f=se(w.getClient(),S.index,S),f.recommendState=x,f.search=function(){return h?(R.status="loading",y.render({instantSearchInstance:R}),R.compositionID?f.searchWithComposition():f.searchOnlyWithDerivedHelpers()):R.onStateChange?(R.onStateChange({uiState:R.mainIndex.getWidgetUiState({}),setUiState:function(j){return R.setUiState(j,!1)}}),w):w.search()},f.searchWithoutTriggeringOnStateChange=function(){return w.search()},f.searchForFacetValues=function(N,j,A,W){var D=Is.apply(void 0,[w.state].concat(ce(Es(y)))).setQueryParameters(W);return w.searchForFacetValues(N,j,A,D)};var I=a?f:se({},"__empty_index__",{}),O=h?I:xd(_,w);s=O.derive(function(){return Is.apply(void 0,[w.state].concat(ce(Es(y))))},function(){return y.getHelper().recommendState});var M=(F=R._initialResults)===null||F===void 0?void 0:F[this.getIndexId()];if(M?.results){var $=new se.SearchResults(new se.SearchParameters(M.state),M.results);s.lastResults=$,f.lastResults=$}if(M?.recommendResults){var q=new se.RecommendResults(new se.RecommendParameters({params:M.recommendResults.params}),M.recommendResults.results);s.lastRecommendResults=q,f.lastRecommendResults=q}f.on("change",function(N){var j=N.isPageReset;j&&Uo(d)}),s.on("search",function(){R.scheduleStalledRender()}),s.on("result",function(N){var j=N.results;R.scheduleRender(),f.lastResults=j,g=j?._state}),s.on("recommend:result",function(N){var j=N.recommend;R.scheduleRender(),f.lastRecommendResults=j.results}),d.forEach(function(N){if(N.getRenderState){var j=N.getRenderState(R.renderState[y.getIndexId()]||{},ht(R,y,P));Qr({renderState:j,instantSearchInstance:R,parent:y})}}),d.forEach(function(N){N.init&&N.init(ht(R,y,P))}),f.on("change",function(N){var j=N.state,A=N._uiState;v=It(d,{searchParameters:j,helper:f},A||{}),R.onStateChange||R.onInternalStateChange()}),M&&R.scheduleRender(),p()}},render:function(l){var y=this,R=l.instantSearchInstance;R.status==="error"&&!R.mainHelper.hasPendingRequests()&&g&&f.setState(g);var _=this.getResults()||s?.lastRecommendResults||h&&!a?d:d.filter(function(P){return P.shouldRender});_=_.filter(function(P){return P.shouldRender?P.shouldRender({instantSearchInstance:R}):!0}),_.forEach(function(P){if(P.getRenderState){var F=P.getRenderState(R.renderState[y.getIndexId()]||{},Aa(R,y,P));Qr({renderState:F,instantSearchInstance:R,parent:y})}}),_.forEach(function(P){P.render&&P.render(Aa(R,y,P))})},dispose:function(){var l=this;d.forEach(function(y){y.dispose&&f&&y.dispose({helper:f,state:f.state,recommendState:f.re
22commendState,parent:l})}),m=null,b=null,f?.removeAllListeners(),f=null,s?.detach(),s=null},getWidgetUiState:function(l){return d.filter(We).filter(function(y){return!y._isolated}).reduce(function(y,R){return R.getWidgetUiState(y)},T(E({},l),H({},u,E({},l[u],v))))},getWidgetState:function(l){return this.getWidgetUiState(l)},getWidgetSearchParameters:function(l,y){var R=y.uiState;return Et(d,{uiState:R,initialSearchParameters:l})},shouldRender:function(){return!0},refreshUiState:function(){v=It(d,{searchParameters:this.getHelper().state,helper:this.getHelper()},v)},setIndexUiState:function(l){var y=typeof l=="function"?l(v):l;m.setUiState(function(R){return T(E({},R),H({},u,y))})}}};function xd(e,t){for(;e;){if(e._isolated)return e.getHelper();e=e.getParent()}return t}function Id(e,t){return e.toLocaleString(t)}function Ed(e){var t=e.numberLocale;return{formatNumber:function(r,a){return Id(Number(a(r)),t)},highlight:function(r,a){try{var i=JSON.parse(r);return a(fo(T(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(po(T(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(yo(T(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(So(T(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),u=i.method,c=i.payload;return a(Ro(u,E({objectIDs:[this.objectID]},c)))}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 Bn(e,t){var n=e[t.getIndexId()]||{};t.getHelper().setState(t.getWidgetSearchParameters(t.getHelper().state,{uiState:n})),t.getWidgets().filter(We).forEach(function(r){return Bn(e,r)})}function Ad(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 Mn(e){var t;return!((t=e.compositionFeedsResults)===null||t===void 0)&&t.length?e.compositionFeedsResults:e.results||[]}function Td(e,t){if(t&&!((!("transporter"in e)||e._cacheHydrated)&&(!e._useCache||typeof e.addAlgoliaAgent!="function"))){var n=[Object.keys(t).reduce(function(u,c){var h=t[c],d=h.state,v=h.requestParams,m=Mn(h),b=m&&d?m.map(function(f,s){return E({indexName:d.index||f.index},v?.[s]||f.params?{params:Nn(v?.[s]||Od(f.params))}:{})}):[];return u.concat(b)},[])],r=Object.keys(t).reduce(function(u,c){var h=Mn(t[c]);return h?u.concat(h):u},[]);if("transporter"in e&&!e._cacheHydrated){e._cacheHydrated=!0;var a=e.search.bind(e);e.search=function(u){for(var c=arguments.length,h=new Array(c>1?c-1:0),d=1;d<c;d++)h[d-1]=arguments[d];var v=Array.isArray(u)?u.map(function(m){return T(E({},m),{params:Nn(m.params)})}):Nn(u.requestBody.params);return e.transporter.responsesCache.get({method:"search",args:[v].concat(ce(h))},function(){return a.apply(void 0,[u].concat(ce(h)))})},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=T(E({},e.cache),H({},i,JSON.stringify({results:Object.keys(t).map(function(u){return Mn(t[u])})})))}}}function Od(e){return e.split("&").reduce(function(t,n){var r=ue(n.split("="),2),a=r[0],i=r[1];return t[a]=i?decodeURIComponent(i):"",t},{})}function Nn(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,u=new Array(i>1?i-1:0),c=1;c<i;c++)u[c-1]=arguments[c];var h=0;return a.replace(/%s/g,function(){return encodeURIComponent(u[h++])})};return Object.keys(e).map(function(r){return n("%s=%s",r,t(e[r])?JSON.stringify(e[r]):e[r])}).join("&")}var Ve=No({name:"instantsearch"});function Cd(){return"#"}var jd={preserveSharedStateOnUnmount:!1,persistHierarchicalRootCount:!1},Wd=(function(e){Tl(t,e);function t(n){si(this,t);var r;r=Al(this,t),H(r,"client",void 0),H(r,"indexName",void 0),H(r,"compositionID",void 0),H(r,"insightsClient",void 0),H(r,"onStateChange",null),H(r,"future",void 0),H(r,"helper",void 0),H(r,"mainHelper",void 0),H(r,"mainIndex",void 0),H(r,"started",void 0),H(r,"templatesConfig",void 0),H(r,"render
32State",{}),H(r,"_stalledSearchDelay",void 0),H(r,"_searchStalledTimer",void 0),H(r,"_initialUiState",void 0),H(r,"_initialResults",void 0),H(r,"_manuallyResetScheduleSearch",!1),H(r,"_resetScheduleSearch",void 0),H(r,"_createURL",void 0),H(r,"_searchFunction",void 0),H(r,"_mainHelperSearch",void 0),H(r,"_hasSearchWidget",!1),H(r,"_hasRecommendWidget",!1),H(r,"_insights",void 0),H(r,"_initialOptions",void 0),H(r,"middleware",[]),H(r,"sendEventToInsights",void 0),H(r,"_createdAt",Fo()),H(r,"status","idle"),H(r,"error",void 0),H(r,"scheduleSearch",ft(function(){r.started&&r.mainHelper.search()})),H(r,"scheduleRender",ft(function(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,O;!((O=r.mainHelper)===null||O===void 0)&&O.hasPendingRequests()||(clearTimeout(r._searchStalledTimer),r._searchStalledTimer=null,I&&(r.status="idle",r.error=void 0)),r.mainIndex.render({instantSearchInstance:r}),r.emit("render")})),H(r,"onInternalStateChange",ft(function(){var I=r.mainIndex.getWidgetUiState({});r.middleware.forEach(function(O){var M=O.instance;M.onStateChange({uiState:I})})})),r.setMaxListeners(100);var a=n.indexName,i=a===void 0?"":a,u=n.compositionID,c=n.numberLocale,h=n.initialUiState,d=h===void 0?{}:h,v=n.routing,m=v===void 0?null:v,b=n.insights,f=b===void 0?void 0:b,s=n.searchFunction,g=n.stalledSearchDelay,p=g===void 0?200:g,o=n.searchClient,l=o===void 0?null:o,y=n.insightsClient,R=y===void 0?null:y,_=n.onStateChange,P=_===void 0?null:_,F=n.future,w=F===void 0?E({},jd,n.future||{}):F;if(l===null)throw new Error(Ve("The `searchClient` option is required."));if(typeof l.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 l.addAlgoliaAgent=="function"&&l.addAlgoliaAgent("instantsearch.js (".concat(fi,")")),R&&typeof R!="function")throw new Error(Ve("The `insightsClient` option should be a function."));if(r._initialOptions=n,r.client=l,r.future=w,r.insightsClient=R,r.indexName=i,r.compositionID=u,r.helper=null,r.mainHelper=null,r.mainIndex=Fd({indexName:r.compositionID||r.indexName}),r.onStateChange=P,r.started=!1,r.templatesConfig={helpers:Ed({numberLocale:c}
32),compileOptions:{}},r._stalledSearchDelay=p,r._searchStalledTimer=null,r._createURL=Cd,r._initialUiState=d,r._initialResults=null,r._insights=f,s&&(r._searchFunction=s),r.sendEventToInsights=Ge,m){var S=typeof m=="boolean"?{}:m;S.$$internal=!0,r.use(od(S))}if(f){var x=typeof f=="boolean"?{}:f;x.$$internal=!0,r.use(Ta(x))}return Pf()&&r.use(Ff({$$internal:!0})),r}return oi(t,[{key:"_isSearchStalled",get:function(){return this.status==="stalled"}},{key:"use",value:function(){for(var r=this,a=arguments.length,i=new Array(a),u=0;u<a;u++)i[u]=arguments[u];var c=i.map(function(h){var d=E({$$type:"__unknown__",$$internal:!1,subscribe:Ge,started:Ge,unsubscribe:Ge,onStateChange:Ge},h({instantSearchInstance:r}));return r.middleware.push({creator:h,instance:d}),d});return this.started&&c.forEach(function(h){h.subscribe(),h.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(u){return a.includes(u.creator)}).forEach(function(u){return u.instance.unsubscribe()}),this.middleware=this.middleware.filter(function(u){return!a.includes(u.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(Ve("The `addWidgets` method expects an array of widgets. Please use `addWidget`."));if(this.compositionID&&r.some(function(a){return!Array.isArray(a)&&We(a)&&!a._isolated}))throw new Error(Ve("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(Ve("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(Ve("The `start` method has already been called once."));var a=this.mainHelper||se(this.client,this.indexName,void 0,{persistHierarchicalRootCount:this.future.persistHierarchicalRootCount});if(this.compositionID&&(a.searchForFacetValues=a.searchForCompositionFacetValues.bind(a)),a.search=function(){var c=r._hasSearchWidget||r._hasRecommendWidget;return c&&(r.status="loading"),r.scheduleRender(!c),r._hasSearchWidget&&(r.compositionID?a.searchWithComposition():a.searchOnlyWithDerivedHelpers()),r._hasRecommendWidget&&a.recommend(),a},this._searchFunction){var i={search:function(){return new Promise(Ge)}};this._mainHelperSearch=a.search.bind(a),a.search=function(){var c=r.mainIndex.getHelper(),h=se(i,c.state.index,c.state);return h.once("search",function(d){var v=d.state;c.overrideStateWithoutTriggeringChangeEvent(v),r._mainHelperSearch()}),h.on("change",function(d){var v=d.state;c.setState(v)}),r._searchFunction(h),a}}if(a.on("error",function(c){var h=c.error;if(!et(h,Error)){var d=h;h=Object.keys(d).reduce(function(v,m){return v[m]=d[m],v},new Error(d.message))}h.error=h,r.error=h,r.status="error",r.scheduleRender(!r._hasSearchWidget&&!r._hasRecommendWidget),r.emit("error",h)}),this.mainHelper=a,this.middleware.forEach(function(c){var h=c.instance;h.subscribe()}),this.mainIndex.init({instantSearchInstance:this,parent:null,uiState:this._initialUiState}),this._initialResults){Td(this.client,this._initialResults),Ad(this.mainHelper,this._initialResults);var u=this.scheduleSearch;this.scheduleSearch=ft(Ge),this._manuallyResetScheduleSearch?this._resetScheduleSearch=function(){r.scheduleSearch=u}:ft(function(){r.scheduleSearch=u})()}else this.mainIndex.getWidgets().length>0&&this.scheduleSearch();this.helper=this.mainIndex.getHelper(),this.started=!0,this.middleware.forEach(function(c){var h=c.instance;h.started()}),typeof this._insights>"u"&&a.derivedHelpers[0].once("result",function(){var c=r.mainIndex.getScopedResults().some(function(h){var d=h.results;return d?._automaticInsights});c&&r.use(Ta({$$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(Ve("The `start` method needs to be called before `setUiState`."));this.mainIndex.refreshUiState();var u=typeof r=="function"?r(this.mainIndex.getWidgetUiState({})):r;this.onStateChange&&i?this.onStateChange({uiState:u,setUiState:function(h){Bn(typeof h=="function"?h(u):h,a.mainIndex),a.scheduleSearch(),a.onInternalStateChange()}}):(Bn(u,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(Ve("The `start` method needs to be called before `createURL`."));return this._createURL(r)}},{key:"refresh",value:function(){if(!this.mainHelper)throw new Error(Ve("The `start` method needs to be called before `refresh`."));this.mainHelper.clearCache().search()}}]),t})(vf),$t=function(t,n){return t},He=function(t){return new Wd(t)};He.version=fi;He.createInfiniteHitsSessionStorageCache=$t(gf);He.highlight=$t(fo);He.reverseHighlight=$t(po);He.snippet=$t(yo);He.reverseSnippet=$t(So);He.insights=Ro;He.getInsightsAnonymousUserToken=hf;Object.defineProperty(He,"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/index.js'`)}});Object.defineProperty(He,"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/index.js'`)}});Object.defineProperty(He,"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/index.js'`)}});function $d(e){var t=pt.highlightPostTag,n=pt.highlightPreTag,r=e.split(n),a=r.shift(),i=a?[{value:a,isHighlighted:!1}]:[];return r.forEach(function(u){var c=u.split(t);i.push({value:c[0],isHighlighted:!0}),c[1]!==""&&i.push({value:c[1],isHighlighted:!1})}),i}ge({name:"instantsearch"});var Ld={preserveSharedStateOnUnmount:!1,persistHierarchicalRootCount:!1},Hd="4.28.1",Bo=function(e){return jt(H({mixins:[ae({name:"InstantSearch"})],provide:function(){return{$_ais_instantSearchInstance:this.instantSearchInstance}},watch:{searchClient:function(t){gt(!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(Ld,t)}},created:function(){var t=this.instantSearchInstance.client;typeof t.addAlgoliaAgent=="function"&&(t.addAlgoliaAgent("Vue (".concat(iu,")")),t.addAlgoliaAgent("Vue InstantSearch (".concat(Hd,")")))},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)},Ts=`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`,Md=Bo({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)||(gt("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":Ue(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&&gt(Ts),!1}},appId:{type:String,default:void 0,validator:function(e){return e&&gt(Ts),!1}},middlewares:{type:Array,default:null},future:{type:Object,default:void 0}},data:function(){return{instantSearchInstance:He({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:nt(function(e){var t;return e("div",{class:(t={},H(t,this.suit(),!0),H(t,this.suit("","ssr"),!1),t)},ci(this))})});Bo({name:"AisInstantSearchSsr",inject:{$_ais_ssrInstantSearchInstance:{default:function(){throw new Error("`createServerRootMixin` is required when using SSR.")}}},data:function(){return{instantSearchInstance:this.$_ais_ssrInstantSearchInstance}},render:nt(function(e){var t;return e("div",{class:(t={},H(t,this.suit(),!0),H(t,this.suit("","ssr"),!0),t)},ci(this))})});ae({name:"QueryRuleContext"}),le({connector:io},{$$widgetType:"ais.queryRuleContext"});function Qo(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||Qo(a)},void 0)}var Nd={name:"AisDynamicWidgets",mixins:[le({connector:dc},{$$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:nt(function(e){var t=this,n=new Map;if((ci(this)||[]).forEach(function(a){var i=Qo(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({},Nd,{name:"AisExperimentalDynamicWidgets",mounted:function(){gt("Use AisDynamicWidgets instead of AisExperimentalDynamicWidgets.")}});
51function Dd(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 c=t.getResults();if(!c)return null;if(!c.feeds)return e===""?(c._state=t.getHelper().state,c):null;var h=c.feeds.find(function(d){return d.feedID===e});return h?(h._state=t.getHelper().state,h):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(c){return t.createURL(c)},scheduleLocalSearch:function(){return t.scheduleLocalSearch()},addWidgets:function(c){var h=c.reduce(function(m,b){return m.concat(Array.isArray(b)?b:[b])},[]);if(h.forEach(function(m){m.parent=i}),r=r.concat(h),a){h.forEach(function(m){if(m.getRenderState){var b=m.getRenderState(n.renderState[i.getIndexId()]||{},Ze(n,i,n._initialUiState));
51vt({renderState:b,instantSearchInstance:n,parent:i})}}),h.forEach(function(m){m.init&&m.init(Ze(n,i,n._initialUiState))});var d=t.getHelper(),v=i.getWidgetSearchParameters(d.state,{uiState:{}});v!==d.state&&d.setState(v)}return i},removeWidgets:function(c){var h=c.reduce(function(m,b){return m.concat(Array.isArray(b)?b:[b])},[]),d=t.getHelper();if(!d)return r=r.filter(function(m){return!h.includes(m)}),i;var v=d.state;return h.forEach(function(m){if(m.dispose){var b=m.dispose({helper:d,state:v,recommendState:d.recommendState,parent:i});et(b,se.RecommendParameters)||b&&(v=b)}}),r=r.filter(function(m){return!h.includes(m)}),v!==d.state&&d.setState(v),i},init:function(){a=!0,r.forEach(function(c){if(c.getRenderState){var h=c.getRenderState(n.renderState[i.getIndexId()]||{},Ze(n,i,n._initialUiState));vt({renderState:h,instantSearchInstance:n,parent:i})}}),r.forEach(function(c){c.init&&c.init(Ze(n,i,n._initialUiState))})},render:function(){r.forEach(function(c){if(c.getRenderState){var h=c.getRenderState(n.renderState[i.getIndexId()]||{},Gt(n,i,c));
51vt({renderState:h,instantSearchInstance:n,parent:i})}}),r.forEach(function(c){c.render&&c.render(Gt(n,i,c))})},dispose:function(c){var h,d=t.getHelper(),v=(h=c?.state)!==null&&h!==void 0?h:d?.state;return r.forEach(function(m){if(m.dispose&&d){var b=m.dispose({helper:d,state:v,recommendState:d.recommendState,parent:i});et(b,se.RecommendParameters)||b&&(v=b)}}),r=[],a=!1,v},getWidgetState:function(c){return this.getWidgetUiState(c)},getWidgetUiState:function(c){var h=t.getHelper(),d={searchParameters:h.state,helper:h};return r.reduce(function(v,m){return m.getWidgetUiState?m.getWidgetUiState(v,d):v},c)},getWidgetSearchParameters:function(c,h){var d=h.uiState;return r.reduce(function(v,m){return m.getWidgetSearchParameters?m.getWidgetSearchParameters(v,{uiState:d}):v},c)},refreshUiState:function(){},setIndexUiState:function(){}};return i}var At,Ud={name:"AisFeedProvider",props:{feedContainer:{type:Object,required:!0}},provide:function(){var e=this;return{$_ais_getParentIndex:function(){return e.feedContainer}}},render:nt(function(e){var t=Ct(this,"default");return e("div",{},t?t():[])})};H(At={name:"AisFeeds",mixins:[le({connector:Cl},{$$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()))));this.pendingRemovals.clear(),this.feedContainers.clear(),e.length>0&&this.getParentIndex().removeWidgets(e)}),H(At,"methods",{reconcileContainers:function(e){var t=this,n=this.getParentIndex(),r=new Set(e),a=[];this.feedContainers.forEach(function(u,c){r.has(c)||(a.push([c,u]),t.feedContainers.delete(c))}),a.length>0&&(a.forEach(function(u){var c=ue(u,2),h=c[0],d=c[1];t.pendingRemovals.set(h,d)}),this.removalTimer!==null&&clearTimeout(this.removalTimer),this.removalTimer=setTimeout(function(){var u=Array.from(t.pendingRemovals.values());t.pendingRemovals.clear(),t.removalTimer=null,u.length>0&&n.removeWidgets(u)},0));var i=[];e.forEach(function(u){if(!t.feedContainers.has(u)){var c=t.pendingRemovals.get(u);if(c)return t.pendingRemovals.delete(u),void t.feedContainers.set(u,c);var h=Dd(u,n,t.instantSearchInstance);t.feedContainers.set(u,h),i.push(h)}}),i.length>0&&n.addWidgets(i)}}),H(At,"render",nt(function(e){var t=this;if(!this.state)return e("div",{class:[this.suit()]});var n=this.state.feedIDs||[],r=Ct(this,"default"),a=n.map(function(i){var u=t.feedContainers.get(i);if(!u||!r)return null;var c=r({feedID:i});return e(Ud,{key:i,feedContainer:u,scopedSlots:{default:function(){return c}}},c)});return e("div",{class:[this.suit()]},a)})),H(At,"computed",{widgetParams:function(){return{isolated:this.isolated,transformFeeds:this.transformFeeds}}});le({connector:yl},{$$widgetType:"ais.autocomplete"}),ae({name:"Autocomplete"});B("p",null," This widget doesn't render anything without a filled in default slot. ",-1);B("p",null,"query, function to refine and results are provided.",-1);B("pre",null,"refine: Function",-1);B("summary",null,[B("code",null,"indices"),Ae(":")],-1);function qd(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(r){r(n)}),(e.get("*")||[]).slice().map(function(r){r(t,n)})}}}var Vo="instantSearchPanelEmitter",zo="PANEL_CHANGE_EVENT",kd=function(){var e;return e={props:{emitter:{type:Object,required:!1,default:function(){return qd()}}},provide:function(){return H({},Vo,this.emitter)},data:function(){return{canRefine:!0}},created:function(){var t=this;this.emitter.on(zo,function(n){t.updateCanRefine(n)})}},H(e,"beforeUnmount",function(){this.emitter.all.clear()}),H(e,"methods",{updateCanRefine:function(t){this.canRefine=t}}),e},Oe=function(){var e=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}
51).mapStateToCanRefine,t=e===void 0?function(n){return!!n.canRefine}:e;return{inject:{emitter:{from:Vo,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(zo,i),this.hasAlreadyEmitted=!0)}}}}}};le({connector:gl},{$$widgetType:"ais.breadcrumb"}),Oe(),ae({name:"Breadcrumb"});le({connector:gc},{$$widgetType:"ais.clearRefinements"}),Oe(),ae({name:"ClearRefinements"});ae({name:"CurrentRefinements"}),le({connector:vc},{$$widgetType:"ais.currentRefinements"}),Oe();ae({name:"HierarchicalMenu"}),le({connector:Pc},{$$widgetType:"ais.hierarchicalMenu"}),Oe();var Go=function(e,t,n){if(!n)return Ot(e,t);if(e===Pe)return Ot(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 Ot(e,a,r)},Bd=Nl({createElement:Go,Fragment:Pe}),Qd={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=Vs(this.hit[this.highlightProperty],this.attribute)||[],t=(Array.isArray(e)?e:[e]).map(function(n){return $d(Ou(n.value||"")).map(function(r){var a=r.value;return{value:a===" "?"  ":a,isHighlighted:r.isHighlighted}})});return Go(Bd,{classNames:{root:this.suit(),highlighted:this.suit("highlighted")},highlightedTagName:this.highlightedTagName,nonHighlightedTagName:Pe,parts:t})}},Vd={name:"AisHighlight",mixins:[ae({name:"Highlight"})],components:{AisHighlighter:Qd},props:{hit:{type:Object,required:!0},attribute:{type:String,required:!0},highlightedTagName:{type:String,default:"mark"}}};function zd(e,t,n,r,a,i){var u=Qt("ais-highlighter");return z(),ze(u,{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 Ko={...Vd,render:zd};ae({name:"HitsPerPage"}),le({connector:Lc},{$$widgetType:"ais.hitsPerPage"}),Oe();le({connector:kc},{$$widgetType:"ais.infiniteHits"}),ae({name:"InfiniteHits"});ae({name:"Menu"}),le({connector:Zs},{$$widgetType:"ais.menu"}),Oe();ae({name:"MenuSelect"}),le({connector:Zs},{$$widgetType:"ais.menuSelect"}),Oe();le({connector:zc},{$$widgetType:"ais.numericMenu"}),ae({name:"NumericMenu"}),Oe();var Gd={name:"AisPagination",mixins:[ae({name:"Pagination"}),le({connector:Xc},{$$widgetType:"ais.pagination"}),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)}}},Kd=["href"],Jd=["href"],Yd=["href","aria-label","aria-current","onClick"],Xd=["href"],Zd=["aria-label","href"],eh=["aria-label"];function th(e,t,n,r,a,i){var u;return e.state?(z(),K("div",{key:0,class:X((u={},H(u,e.suit(),!0),H(u,e.suit("","noRefinement"),e.state.nbPages<=1),u))},[Re(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 c,h,d,v;return[B("ul",{class:X(e.suit("list"))},[n.showFirst?(z(),K("li",{key:0,class:X((c={},H(c,e.suit("item"),!0),H(c,e.suit("item","disabled"),e.state.isFirstPage),H(c,e.suit("item","firstPage"),!0),c))},[Re(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?(z(),K("span",{key:1,class:X(e.suit("link")),"aria-label":"First Page"},"‹‹",2)):(z(),K("a",{key:0,class:X(e.suit("link")),"aria-label":"First Page",href:e.state.createURL(0),onClick:t[0]||(t[0]=Ie(function(m){return i.refine(0)},["exact","left","prevent"]))},"‹‹",10,Kd))]})],2)):de("",!0),n.showPrevious?(z(),K("li",{key:1,class:X((h={},H(h,e.suit("item"),!0),H(h,e.suit("item","disabled"),e.state.isFirstPage),H(h,e.suit("item","previousPage"),!0),h))},[Re(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?(z(),K("span",{key:1,class:X(e.suit("link")),"aria-label":"Previous Page"},"‹",2)):(z(),K("a",{key:0,class:X(e.suit("link")),"aria-label":"Previous Page",href:e.state.createURL(e.state.currentRefinement-1),onClick:t[1]||(t[1]=Ie(function(m){return i.refine(e.state.currentRefinement-1)},["exact","left","prevent"]))},"‹",10,Jd))]})],2)):de("",!0),(z(!0),K(Pe,null,dt(e.state.pages,function(m){var b;return z(),K("li",{class:X((b={},H(b,e.suit("item"),!0),H(b,e.suit("item","page"),!0),H(b,e.suit("item","selected"),e.state.currentRefinement===m),b)),key:m},[Re(e.$slots,"item",{page:m,createURL:function(){return e.state.createURL(m)},isFirstPage:e.state.isFirstPage,isLastPage:e.state.isLastPage,refine:function(){return i.refine(m)}},function(){return[B("a",{class:X(e.suit("link")),href:e.state.createURL(m),"aria-label":"Page ".concat(m+1),"aria-current":e.state.currentRefinement===m?"page":void 0,onClick:Ie(function(f){return i.refine(m)},["exact","left","prevent"])},Te(m+1),11,Yd)]})],2)}),128)),n.showNext?(z(),K("li",{key:2,class:X((d={},H(d,e.suit("item"),!0),H(d,e.suit("item","disabled"),e.state.isLastPage),H(d,e.suit("item","nextPage"),!0),d))},[Re(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?(z(),K("span",{key:1,class:X(e.suit("link")),"aria-label":"Next Page"},"›",2)):(z(),K("a",{key:0,class:X(e.suit("link")),"aria-label":"Next Page",href:e.state.createURL(e.state.currentRefinement+1),onClick:t[2]||(t[2]=Ie(function(m){return i.refine(e.state.currentRefinement+1)},["exact","left","prevent"]))}
51,"›",10,Xd))]})],2)):de("",!0),n.showLast?(z(),K("li",{key:3,class:X((v={},H(v,e.suit("item"),!0),H(v,e.suit("item","disabled"),e.state.isLastPage),H(v,e.suit("item","lastPage"),!0),v))},[Re(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?(z(),K("span",{key:1,class:X(e.suit("link")),"aria-label":"Last Page, Page ".concat(e.state.nbPages)}," ›› ",10,eh)):(z(),K("a",{key:0,class:X(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]=Ie(function(m){return i.refine(e.state.nbPages-1)},["exact","left","prevent"]))},"››",10,Zd))]})],2)):de("",!0)],2)]})],2)):de("",!0)}const rh={...Gd,render:th};ae({name:"Panel"}),kd();ae({name:"PoweredBy"});ae({name:"QueryRuleCustomData"}),le({connector:io},{$$widgetType:"ais.queryRuleCustomData"});ae({name:"RangeInput"}),le({connector:el},{$$widgetType:"ais.rangeInput"}),Oe();ae({name:"RatingMenu"}),le({connector:ul},{$$widgetType:"ais.ratingMenu"}),Oe();B("symbol",{id:"ais-RatingMenu-starSymbol",viewBox:"0 0 24 24"},[B("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),B("symbol",{id:"ais-RatingMenu-starEmptySymbol",viewBox:"0 0 24 24"},[B("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);B("use",{"xlink:href":"#ais-RatingMenu-starSymbol"},null,-1);B("use",{"xlink:href":"#ais-RatingMenu-starEmptySymbol"},null,-1);var nh={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")}}},ih=["placeholder","autofocus","value"],ah=["title","aria-label","hidden"],sh=[B("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)],oh=["title","aria-label","hidden"],uh=[B("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)],ch=["hidden"],lh=["aria-hidden"],fh=[Os('<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="indefinite"></animateTransform></path></g></g>',1)];function dh(e,t,n,r,a,i){var u,c;return z(),K("form",{action:"",role:"search",novalidate:"",class:X(e.suit("form")),onSubmit:t[4]||(t[4]=Ie(function(){for(var h=arguments.length,d=new Array(h),v=0;v<h;v++)d[v]=arguments[v];return i.onFormSubmit&&(u=i).onFormSubmit.apply(u,ce(d))},["prevent"])),onReset:t[5]||(t[5]=Ie(function(){for(var h=arguments.length,d=new Array(h),v=0;v<h;v++)d[v]=arguments[v];return i.onFormReset&&(c=i).onFormReset.apply(c,ce(d))},["prevent"]))},[B("input",{type:"search",autocorrect:"off",autocapitalize:"off",autocomplete:"off",spellcheck:"false",maxlength:"512","aria-label":"Search",placeholder:n.placeholder,autofocus:n.autofocus,class:X(e.suit("input")),value:n.value||n.modelValue,onFocus:t[0]||(t[0]=function(h){return e.$emit("focus",h)}),onBlur:t[1]||(t[1]=function(h){return e.$emit("blur",h)}),onInput:t[2]||(t[2]=function(h){return i.onInput(h)}),onCompositionend:t[3]||(t[3]=function(h){return i.onInput(h)}),ref:"input"},null,42,ih),B("button",{type:"submit",title:n.submitTitle,"aria-label":n.submitTitle,class:X(e.suit("submit")),hidden:n.showLoadingIndicator&&n.shouldShowLoadingIndicator},[Re(e.$slots,"submit-icon",{}
51,function(){return[(z(),K("svg",{"aria-hidden":"true",width:"10",height:"10",viewBox:"0 0 40 40",class:X(e.suit("submitIcon"))},sh,2))]})],10,ah),B("button",{type:"reset",title:n.resetTitle,"aria-label":n.resetTitle,class:X(e.suit("reset")),hidden:!n.value&&!n.modelValue||n.showLoadingIndicator&&n.shouldShowLoadingIndicator},[Re(e.$slots,"reset-icon",{},function(){return[(z(),K("svg",{"aria-hidden":"true",height:"10",viewBox:"0 0 20 20",class:X(e.suit("resetIcon")),width:"10"},uh,2))]})],10,oh),n.showLoadingIndicator?(z(),K("span",{key:0,hidden:!n.shouldShowLoadingIndicator,class:X(e.suit("loadingIndicator"))},[Re(e.$slots,"loading-indicator",{},function(){return[(z(),K("svg",{"aria-hidden":!n.shouldShowLoadingIndicator,"aria-label":"Results are loading",width:"16",height:"16",stroke:"#444",viewBox:"0 0 38 38",class:X(e.suit("loadingIcon"))},fh,10,lh))]})],10,ch)):de("",!0)],34)}const Jo={...nh,render:dh};var hh=function(){},gh={name:"AisRefinementList",components:{SearchInput:Jo,AisHighlight:Ko},mixins:[ae({name:"RefinementList"}),le({connector:tl},{$$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||hh},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=""}}},mh=["value","checked","onChange"],vh=["disabled","aria-expanded","aria-label"];function ph(e,t,n,r,a,i){var u,c=Qt("search-input"),h=Qt("ais-highlight");return e.state?(z(),K("div",{key:0,class:X([e.suit(),i.items.length===0&&e.suit("","noRefinement")])},[Re(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,canRefine:e.state.canRefine,sendEvent:e.state.sendEvent},function(){return[n.searchable?(z(),K("div",{key:0,class:X(e.suit("searchBox"))},[je(c,{modelValue:i.searchForFacetValues,"onUpdate:modelValue":t[0]||(t[0]=function(d){return i.searchForFacetValues=d}),"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?Re(e.$slots,"noResults",{key:1,query:i.searchForFacetValues},function(){return[B("div",{class:X(e.suit("noResults"))},"No results.",2)]}):de("",!0),i.items.length>0?(z(),K("ul",{key:2,class:X(e.suit("list"))},[(z(!0),K(Pe,null,dt(i.items,function(d){return z(),K("li",{class:X([e.suit("item"),d.isRefined&&e.suit("item","selected")]),key:d.value},[Re(e.$slots,"item",{item:d,refine:i.refine,createURL:e.state.createURL},function(){return[B("label",{class:X(e.suit("label"))},[B("input",{class:X(e.suit("checkbox")),type:"checkbox",value:d.value,checked:d.isRefined,onChange:function(v){return i.refine(d.value)}},null,42,mh),n.searchable?(z(),K("span",{key:0,class:X(e.suit("labelText"))},[je(h,{attribute:"item",hit:d},null,8,["hit"])],2)):(z(),K("span",{key:1,class:X(e.suit("labelText"))},Te(d.label),3)),B("span",{class:X(e.suit("count"))},Te(d.count),3)],2)]})],2)}),128))],2)):de("",!0),n.showMore?(z(),K("button",{key:3,class:X([e.suit("showMore"),H({},e.suit("showMore","disabled"),!e.state.canToggleShowMore)]),onClick:t[1]||(t[1]=function(){for(var d=arguments.length,v=new Array(d),m=0;m<d;m++)v[m]=arguments[m];return i.toggleShowMore&&(u=i).toggleShowMore.apply(u,ce(v))}),disabled:!e.state.canToggleShowMore,"aria-expanded":e.state.isShowingMore?"true":"false","aria-label":n.showMoreButtonLabel},[Re(e.$slots,"showMoreLabel",{isShowingMore:e.state.isShowingMore},function(){return[Ae(" Show "+Te(e.state.isShowingMore?"less":"more"),1)]})],10,vh)):de("",!0)]})],2)):de("",!0)}const yh={...gh,render:ph};var kt,Sh=(H(kt={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(),u=i?i.state:null;e.state={results:a,state:u,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))}),H(kt,"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)}}}),H(kt,"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})}}),kt);B("p",null," Use this component to have a different layout based on a certain state. ",-1);B("p",null,"Fill in the slot, and get access to the following things:",-1);({...Sh});var Rh={name:"AisSearchBox",mixins:[le({connector:al},{$$widgetType:"ais.searchBox"}),ae({name:"SearchBox"})],components:{SearchInput:Jo},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:$l,isVue3:Ll}},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 bh(e,t,n,r,a,i){var u=Qt("search-input");return e.state?(z(),K("div",{key:0,class:X(e.suit())},[Re(e.$slots,"default",{currentRefinement:i.currentRefinement,isSearchStalled:e.state.isSearchStalled,refine:e.state.refine},function(){return[je(u,{onFocus:t[0]||(t[0]=function(c){return e.$emit("focus",c)}),onBlur:t[1]||(t[1]=function(c){return e.$emit("blur",c)}),onReset:t[2]||(t[2]=function(c){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(c){return i.currentRefinement=c}),ref:"searchInput"},au({default:be(function(){return[a.isVue2?Re(e.$slots,"loading-indicator",{key:0,slot:"loading-indicator"}):de("",!0),a.isVue2?Re(e.$slots,"submit-icon",{key:1,slot:"submit-icon"}):de("",!0),a.isVue2?Re(e.$slots,"reset-icon",{key:2,slot:"reset-icon"}):de("",!0)]}),_:2},[a.isVue3?{name:"loading-indicator",fn:be(function(){return[Re(e.$slots,"loading-indicator")]}),key:"0"}:void 0,a.isVue3?{name:"submit-icon",fn:be(function(){return[Re(e.$slots,"submit-icon")]}),key:"1"}:void 0,a.isVue3?{name:"reset-icon",fn:be(function(){return[Re(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 _h={...Rh,render:bh};ae({name:"Snippet"});ae({name:"SortBy"}),le({connector:sl},{$$widgetType:"ais.sortBy"}),Oe();var Bt,wh=(H(Bt={name:"AisStats",mixins:[le({connector:fl},{$$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)}),H(Bt,"watch",{announcementText:function(e){var t=this;this.isInitialAnnouncement?this.isInitialAnnouncement=!1:(clearTimeout(this.announcementTimer),this.announcementTimer=setTimeout(function(){t.announcement=e},1400))}}),H(Bt,"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{}}}),Bt);function Ph(e,t,n,r,a,i){return e.state?(z(),K("div",{key:0,class:X(e.suit())},[Re(e.$slots,"default",su(e.state,{results:e.state.instantSearchInstance.helper.lastResults}),function(){return[B("span",{class:X(e.suit("text"))},[e.state.areHitsSorted?(z(),K(Pe,{key:0},[Ae(Te(i.sortedResultsSentence),1)],64)):(z(),K(Pe,{key:1},[Ae(Te(i.resultsSentence),1)],64)),Ae(" found in "+Te(e.state.processingTimeMS.toLocaleString())+"ms",1)],2)]}),B("span",{class:X(e.suit("announcement")),role:"status","aria-live":"polite","aria-atomic":"true",style:ou(a.visuallyHiddenStyle)},Te(a.announcement),7)],2)):de("",!0)}const Fh={...wh,render:Ph};ae({name:"ToggleRefinement"}),le({connector:hl},{$$widgetType:"ais.toggleRefinement"}),Oe();le({connector:Fl},{$$widgetType:"ais.voiceSearch"}),ae({name:"VoiceSearch"});Os('<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);B("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"},null,-1);B("line",{x1:"12",y1:"19",x2:"12",y2:"23"},null,-1);B("line",{x1:"8",y1:"23",x2:"16",y2:"23"},null,-1);ae({name:"RelevantSort"}),le({connector:xl},{$$widgetType:"ais.relevantSort"});const xh=()=>uu().$algolia,Ih={class:"pointer-events-none fixed inset-0 overflow-hidden"},Eh={class:"pointer-events-none absolute inset-0 overflow-hidden"},Ah={class:"pointer-events-none fixed inset-x-0 bottom-0 flex"},Th={class:"sticky top-0 z-20 container mb-6 h-[20%] bg-white"},Oh={class:""},Ch=["value"],jh=["onClick"],Wh={class:"bg-white"},$h={class:"container"},Lh={key:0,class:"relative w-5/12 lg:w-2/12"},Hh={class:"pb-3"},Mh=["innerHTML"],Nh=["innerHTML"],Dh={class:"hidden py-3 lg:block"},Uh={key:0},qh={class:"flex flex-wrap items-center gap-2"},kh={key:1},Bh=["innerHTML"],Qh={class:"hidden justify-end lg:flex"},Vh={key:1,class:"py-3 lg:hidden"},zh={class:"flex flex-wrap items-center gap-2"},Gh={class:"mt-3 flex w-full justify-end lg:hidden"},Kh={class:"mt-12 mb-16 flex items-center justify-center"},Jh={class:"flex h-[48px] w-[48px] items-center justify-center rounded-full border border-black bg-black text-white"},Yh="nubika_pro",eg={__name:"WidgetOffcanvasSearch",props:{offcanvasSearchVisible:{type:Boolean,default:!1},handleOffcanvasSearch:Function,seccionPagina:{type:String,default:"home"},location:{type:String,default:"global"},module:{type:String,default:"header"},tipoPagina:{type:String,default:"pagina"}},setup(e){const t=e,n=lt(),r=lt(),a=lt(),{search:i,selectItem:u,selectContent:c}=cu(),h=xh(),d=lt(!1),v=lt(""),m=lt(""),b=()=>{a.value&&a.value.scrollTo({top:0,behavior:"smooth"})};let f=null;function s(o){m.value=o,clearTimeout(f),f=setTimeout(()=>{const l=o.trim();v.value=l,d.value=l!=="",l&&i(l)},500)}const g=(o,l)=>{let y;l.tags&&l.tags.length>0&&l.title&&(y=l.tags[0]==="Curso"?l.tags[0]+" de "+l.title:l.tags[0]+" en "+l.title);const R={autor_contenido:o.author,categoria_contenido:void 0,titulo_contenido:o.post_title,nombre_formacion:y||void 0,id_formacion:l.id_formacion?l.id_formacion:void 0,categoria_formacion:l.categories&&l.categories.length>0?l.categories[0]:void 0,tipo_formacion:l.tags&&l.tags.length>0?l.tags[0]:void 0,modulo:"buscador",link_display:"text",formato_formacion:y?"simple":void 0};c(R),t.handleOffcanvasSearch()},p=o=>{let l;if(o.postType==="producto")if(o.filterType==="Noticias"){let y;o.producto_relacionado&&o.producto_relacionado.tag_producto&&o.producto_relacionado.post_title&&(y=o.producto_relacionado.tag_producto==="Curso"?o.producto_relacionado.tag_producto+" de "+o.producto_relacionado.post_title:o.producto_relacionado.tag_producto+" en "+o.producto_relacionado.post_title),l={autor_contenido:o.author,categoria_contenido:o.categories&&o.categories.length>0?o.categories[0]:"veterinaria",titulo_contenido:o.title,nombre_formacion:y||void 0,id_formacion:o.producto_relacionado&&o.producto_relacionado.id_crm?o.producto_relacionado.id_crm:void 0,categoria_formacion:o.producto_relacionado&&o.producto_relacionado.categoria_producto?o.producto_relacionado.categoria_producto:void 0,tipo_formacion:o.producto_relacionado&&o.producto_relacionado.tag_producto?o.producto_relacionado.tag_producto:void 0,modulo:"buscador",link_display:"text",fecha_publicacion:o.fecha_publicacion,formato_formacion:o.producto_relacionado?"simple":void 0},c(l)}else{let y;o.tags&&o.tags.length>0&&o.title&&(y=o.tags[0]==="Curso"?o.tags[0]+" de "+o.title:o.tags[0]+" en "+o.title),l={nombre_formacion:y||void 0,id_formacion:o.id_formacion?o.id_formacion:void 0,categoria_formacion:o.categories&&o.categories.length>0?o.categories[0]:void 0,tipo_formacion:o.tags&&o.tags.length>0?o.tags[0]:void 0,modulo:"buscador",seccion_pagina:t.seccionPagina,tipo_pagina:t.t
51ipoPagina},u(l)}else{let y;o.producto_relacionado&&o.producto_relacionado.tag_producto&&o.producto_relacionado.post_title&&(y=o.producto_relacionado.tag_producto==="Curso"?o.producto_relacionado.tag_producto+" de "+o.producto_relacionado.post_title:o.producto_relacionado.tag_producto+" en "+o.producto_relacionado.post_title),l={autor_contenido:o.author,categoria_contenido:o.categories&&o.categories.length>0?o.categories[0]:void 0,titulo_contenido:o.title,nombre_formacion:y||void 0,id_formacion:o.producto_relacionado&&o.producto_relacionado.id_crm?o.producto_relacionado.id_crm:void 0,categoria_formacion:o.producto_relacionado&&o.producto_relacionado.categoria_producto?o.producto_relacionado.categoria_producto:void 0,tipo_formacion:o.producto_relacionado&&o.producto_relacionado.tag_producto?o.producto_relacionado.tag_producto:void 0,modulo:"buscador",link_display:"text",formato_formacion:o.producto_relacionado?"simple":void 0},c(l)}t.handleOffcanvasSearch()};return lu(()=>{n.value?.classList.remove("hidden")}),fu(()=>t.offcanvasSearchVisible,async()=>{t.offcanvasSearchVisible&&r.value?.focus()}),(o,l)=>{const y=du,R=gu;return z(),K("div",{ref_key:"offcanvas",ref:n,class:"relative z-50 hidden"},[B("div",{class:X(["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:l[0]||(l[0]=Ie((..._)=>e.handleOffcanvasSearch&&e.handleOffcanvasSearch(..._),["prevent"]))},null,2),B("div",Ih,[B("div",Eh,[B("div",Ah,[B("div",{class:X(["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]"])},[B("div",{class:X(["relative flex h-[85vh] flex-col rounded-b-2xl bg-white pt-8 shadow-xl duration-300 ease-in-out lg:h-[75vh]",e.offcanvasSearchVisible?"opacity-100":"opacity-0"])},[B("a",{href:"#",class:"absolute top-6 right-6 z-40 h-[16px] w-[16px] lg:top-7 lg:right-8 lg:h-[22px] lg:w-[22px]",onClick:l[1]||(l[1]=Ie((..._)=>e.handleOffcanvasSearch&&e.handleOffcanvasSearch(..._),["prevent"]))},[...l[3]||(l[3]=[B("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"},[B("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)])]),B("div",{ref_key:"wrapperSearch",ref:a,class:"h-full overflow-y-scroll"},[je(xe(Md),{indexName:Yh,searchClient:xe(h)},{default:be(()=>[je(xe(Hl),{query:xe(v)},null,8,["query"]),B("div",Th,[je(xe(Fh),null,{default:be(({nbHits:_})=>[B("div",{class:X(["text-center text-sm text-black lg:text-base",!xe(d)&&"opacity-0"])},Te(_)+" resultados encontrados ",3)]),_:1}),B("div",Oh,[je(xe(_h),{class:"relative mt-3 flex w-full items-center lg:mt-0"},{default:be(({currentRefinement:_,refine:P})=>[B("input",{ref_key:"inputSearch",ref:r,type:"text",value:xe(m),placeholder:"¿En qué quieres formarte?",class:"font-display placeholder:text-gray-placeholder w-full border-x-0 border-t-0 border-b border-black pr-6 pl-6 text-lg leading-[50px] text-black focus:border-black focus:ring-0 lg:h-[69px] lg:pl-8 lg:text-2xl lg:leading-[69px]",onInput:l[2]||(l[2]=F=>s(F.target.value))},null,40,Ch),l[5]||(l[5]=B("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"},[B("g",{"clip-path":"url(#clip0_2514_6885)"},[B("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"})]),B("defs",null,[B("clipPath",{id:"clip0_2514_6885"},[B("rect",{width:"23",height:"23",fill:"white",transform:"translate(0 0.5)"})])])],-1)),_!==""?(z(),K("a",{key:0,href:"#",class:"absolute right-0 h-[14px] w-[14px]",onClick:Ie(F=>P(""),["prevent"])},[...l[4]||(l[4]=[B("svg",{class:"h-[14px] w-[14px]",width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[B("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,jh)):de("",!0)]),_:1}
51)]),xe(d)?(z(),ze(xe(yh),{key:0,attribute:"filterType",sortBy:["isRefined","name:asc"]},{default:be(({items:_,refine:P,createURL:F})=>[B("div",{class:X(["mt-4 flex items-center gap-6 overflow-x-auto",_&&_.length>0&&"border-b"])},[(z(!0),K(Pe,null,dt(_,w=>(z(),ze(y,{key:w.value,to:F(w),class:X(["border-b-2 px-2 py-3 text-nowrap text-black",w.isRefined?"border-black font-semibold":"border-transparent font-normal"]),onClick:Ie(S=>P(w.value),["prevent"])},{default:be(()=>[je(xe(Ko),{class:X(["text-lg text-black",w.isRefined?"font-semibold":"font-normal"]),attribute:"item",hit:w},null,8,["class","hit"]),Ae(" ("+Te(w.count.toLocaleString())+") ",1)]),_:2},1032,["to","class","onClick"]))),128))],2)]),_:1})):de("",!0)]),B("div",Wh,[B("div",$h,[xe(d)?(z(),ze(xe(ql),{key:0},{default:be(({items:_})=>[(z(!0),K(Pe,null,dt(_,P=>(z(),K("div",{key:P.objectID,class:"relative mb-5 flex flex-wrap rounded-md border p-3 lg:min-h-[240px] lg:p-6"},[P.postType==="producto"&&!P.is_extension?(z(),K("div",Lh,[je(R,{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),B("div",{class:X(P.postType==="producto"&&!P.is_extension?"w-7/12 lg:w-10/12":"w-full")},[B("div",{class:X(["flex h-full flex-col justify-between lg:pr-8",P.postType==="producto"&&!P.is_extension&&"pl-3 lg:pl-8"])},[B("div",Hh,[P.tags&&P.tags.length>0?(z(),K("div",{key:0,class:"font-display text-lg leading-tight font-semibold text-black lg:text-2xl",innerHTML:P.tags[0]==="Curso"?`${P.tags[0]} de ${P.title}`:`${P.tags[0]} en ${P.title}`},null,8,Mh)):(z(),K("div",{key:1,class:"font-display text-lg leading-tight font-semibold text-black lg:text-2xl",innerHTML:P.title},null,8,Nh)),B("div",Dh,[P.postTerms&&P.postTerms.length>0?(z(),K("div",Uh,[l[6]||(l[6]=B("div",{class:"mb-3 text-sm text-black"}," Descubre los detalles: ",-1)),B("div",qh,[(z(!0),K(Pe,null,dt(P.postTerms,(F,w)=>(z(),ze(y,{key:w,to:F.url,class:"relative z-10 rounded-full border border-black px-2 py-1 text-sm text-black",onClick:S=>g(F,P)},{default:be(()=>[Ae(Te(F.title),1)]),_:2},1032,["to","onClick"]))),128))])])):de("",!0),P.postType==="noticias"||P.is_extension?(z(),K("div",kh,[B("p",{class:"text-sm text-black lg:text-base",innerHTML:P.excerpt},null,8,Bh)])):de("",!0)])]),B("div",Qh,[je(y,{to:P.url,class:"font-display mt-3 flex items-center text-sm font-semibold text-black after:absolute after:top-0 after:right-0 after:bottom-0 after:left-0 lg:mt-0 lg:text-base",onClick:F=>p(P)},{default:be(()=>[P.postType==="producto"&&!P.is_extension?(z(),K(Pe,{key:0},[Ae(" Ver formación ")],64)):(z(),K(Pe,{key:1},[Ae(" Leer ")],64)),l[7]||(l[7]=B("svg",{class:"ml-3",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[B("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"])])],2)],2),P.postTerms&&P.postTerms.length>0?(z(),K("div",Vh,[l[8]||(l[8]=B("div",{class:"mb-3 text-sm"}," Descubre los detalles: ",-1)),B("div",zh,[(z(!0),K(Pe,null,dt(P.postTerms,(F,w)=>(z(),ze(y,{key:w,to:F.url,class:"relative z-10 rounded-full border border-black px-2 py-1 text-sm text-black",onClick:S=>g(F,P)},{default:be(()=>[Ae(Te(F.title),1)]),_:2},1032,["to","onClick"]))),128))])])):de("",!0),B("div",Gh,[je(y,{to:P.url,class:"font-display mt-3 flex items-center text-sm font-semibold text-black after:absolute after:top-0 after:right-0 after:bottom-0 after:left-0 lg:mt-0 lg:text-base",onClick:F=>p(P)},{default:be(()=>[P.postType==="producto"&&!P.is_extension?(z(),K(Pe,{key:0},[Ae(" Ver formación ")],64)):(z(),K(Pe,{key:1},[Ae(" Leer ")],64)),l[9]||(l[9]=B("svg",{class:"ml-3",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[B("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),xe(d)?(z(),ze(xe(rh),{key:1},{default:be(({currentRefinement:_,nbPages:P,isFirstPage:F,isLastPage:w,refine:S,createURL:x})=>[B("div",Kh,[F?de("",!0):(z(),ze(y,{key:0,to:x(_-1),onClick:Ie(()=>{S(_-1),b()},["prevent"])},{default:be(()=>[...l[10]||(l[10]=[B("img",{src:mu,class:"size-5",width:"10",height:"20",alt:"Recurso flecha",loading:"lazy"},null,-1)])]),_:1},8,["to","onClick"])),F?de("",!0):(z(),K(Pe,{key:1}
51,[je(y,{to:x(0),class:"mr-3 ml-8 flex h-[48px] w-[48px] cursor-pointer items-center justify-center rounded-full border border-black text-black",onClick:Ie(()=>{S(0),b()},["prevent"])},{default:be(()=>[...l[11]||(l[11]=[Ae(" 1 ",-1)])]),_:1},8,["to","onClick"]),l[12]||(l[12]=B("div",{class:"mr-3 font-bold text-black"},"...",-1))],64)),B("div",Jh,Te(_+1),1),w?de("",!0):(z(),K(Pe,{key:2},[l[14]||(l[14]=B("div",{class:"ml-3 font-bold text-black"},"...",-1)),je(y,{to:x(P),class:"mr-8 ml-3 flex h-[48px] w-[48px] cursor-pointer items-center justify-center rounded-full border border-black text-black",onClick:Ie(()=>{S(P),b()},["prevent"])},{default:be(()=>[Ae(Te(P),1)]),_:2},1032,["to","onClick"]),w?de("",!0):(z(),ze(y,{key:0,to:x(_+1),onClick:Ie(()=>{S(_+1),b()},["prevent"])},{default:be(()=>[...l[13]||(l[13]=[B("img",{src:vu,class:"size-5",width:"10",height:"20",alt:"Recurso flecha",loading:"lazy"},null,-1)])]),_:1},8,["to","onClick"]))],64))])]),_:1})):de("",!0)])])]),_:1},8,["searchClient"])],512)],2)],2)])])])],512)}}};export{eg as default};

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.