1import{g as fr,d as Ps,f as Un,e as Fs,k as A,S as It,C as hr,M as er,R as ue,c as Ie,a as Es,v as Is,h as xs,b as Ts}from"./chunks/kicker.js";var Cs="ais",dr=function(e){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=r.descendantName,i=r.modifierName,a=n?"-".concat(n):"",s=i?"--".concat(i):"";return"".concat(Cs,"-").concat(e).concat(a).concat(s)}};function As(t){if(Array.isArray(t))return t}function Ns(t,e){var r=t==null?null:typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var n=[],i=!0,a=!1,s,o;try{for(r=r.call(t);!(i=(s=r.next()).done)&&(n.push(s.value),!(e&&n.length===e));i=!0);}catch(c){a=!0,o=c}finally{try{!i&&r.return!=null&&r.return()}finally{if(a)throw o}}return n}}function Os(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 2In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ln(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Vi(t,e){if(t){if(typeof t=="string")return ln(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ln(t,e)}}function se(t,e){return As(t)||Ns(t,e)||Vi(t,e)||Os()}function $s(t){if(Array.isArray(t))return ln(t)}function js(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Hs(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 3In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ge(t){return $s(t)||js(t)||Vi(t)||Hs()}function T(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function tr(){return tr=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},tr.apply(this,arguments)}function Ki(t){if(t==null)throw new TypeError("Cannot destructure "+t);return t}function P(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){T(t,i,r[i])})}return t}function Ls(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);r.push.apply(r,n)}return r}function E(t,e){return e=e!=null?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Ls(Object(e)).forEac
3h(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}function je(t){"@swc/helpers - typeof";return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t}var ye={highlightPreTag:"<mark>",highlightPostTag:"</mark>"},Ms=Promise.resolve();function et(t){var e=null,r=!1,n=function(){for(var a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];e===null&&(e=Ms.then(function(){if(e=null,r){r=!1;return}t.apply(void 0,ge(s))}))};return n.wait=function(){if(e===null)throw new Error("The deferred function should be called before calling `wait()`");return e},n.cancel=function(){e!==null&&(r=!0)},n}function Nt(t,e){return e!=null&&typeof Symbol!="undefined"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function mr(t,e){var r=Array.isArray(e)?e:e.split(".");return r.reduce(function(n,i){return n&&n[i]},t)}function Ds(t,e){if(t==null)return{};var r={},n=Object.getOwnPropertyNames(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i]);return r}function K(t,e){if(t==null)return{};var r={},n,i,a;if(typeof Reflect!="undefined"&&Reflect.ownKeys){for(n=Reflect.ownKeys(t),a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i]);return r}if(r=Ds(t,e),Object.getOwnPropertySymbols)for(n=Object.getOwnPropertySymbols(t),a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(r[i]=t[i]);return r}var Ws=dr("Highlight");function zi(t){var e=t.attribute,r=t.highlightedTagName,n=r===void 0?"mark":r,i=t.hit,a=t.cssClasses,s=a===void 0?{}:a,o=mr(i._highlightResult,e),c=o||{},u=c.value,l=u===void 0?"":u,d=Ws({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):"");return l.replace(new RegExp(ye.highlightPreTag,"g"),"<".concat(n,' class="').concat(d,'">')).replace(new RegExp(ye.highlightPostTag,"g"),"</".concat(n,">"))}function Gi(t){var e=ye.highlightPreTag,r=ye.highlightPostTag;return t.map(function(n){return n.isHighlighted?e+n.value+r:n.value}).join("")}function Ji(t){var e=ye.highlightPostTag,r=ye.highlightPreTag,n=t.split(r),i=n.shift(),a=i?[{value:i,isHighlighted:!1}]:[];return n.forEach(function(s){var o=s.split(e);a.push({value:o[0],isHighlighted:!0}),o[1]!==""&&a.push({value:o[1],isHighlighted:!1})}),a}var Us={"&":"&","<":"<",">":">",""":'"',"'":"'"},Yi=/&(amp|quot|lt|gt|#39);/g,ks=RegExp(Yi.source);function Bs(t){return t&&ks.test(t)?t.replace(Yi,function(e){return Us[e]}):t}var Qs=new RegExp(/\w/i);function qs(t,e){var r,n,i,a,s=t[e],o=(r=(i=t[e+1])===null||i===void 0?void 0:i.isHighlighted)!==null&&r!==void 0?r:!0,c=(n=(a=t[e-1])===null||a===void 0?void 0:a.isHighlighted)!==null&&n!==void 0?n:!0;return!Qs.test(Bs(s.value))&&c===o?c:s.isHighlighted}function Zi(t){return t.some(function(e){return e.isHighlighted})?t.map(function(e,r){return E(P({},e),{isHighlighted:!qs(t,r)})}):t.map(function(e){return E(P({},e),{isHighlighted:!1})})}var Vs=dr("ReverseHighlight");function Xi(t){var e=t.attribute,r=t.highlightedTagName,n=r===void 0?"mark":r,i=t.hit,a=t.cssClasses,s=a===void 0?{}:a,o=mr(i._highlightResult,e),c=o||{},u=c.value,l=u===void 0?"":u,d=Vs({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):""),h=Gi(Zi(Ji(l)));return h.replace(new RegExp(ye.highlightPreTag,"g"),"<".concat(n,' class="').concat(d,'">')).replace(new RegExp(ye.highlightPostTag,"g"),"</".concat(n,">"))}var Ks=dr("Snippet");function ea(t){var e=t.attribute,r=t.highlightedTagName,n=r===void 0?"mark":r,i=t.hit,a=t.cssClasses,s=a===void 0?{}:a,o=mr(i._snippetResult,e),c=o||{},u=c.value,l=u===void 0?"":u,d=Ks({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):"");return l.replace(new RegExp(ye.highlightPreTag,"g"),"<".concat(n,' class="').concat(d,'">')).replace(new RegExp(ye.highlightPostTag,"g"),"</".concat(n,">"))}var zs=dr("ReverseSnippet");function ta(t){var e=t.attribute,r=t.highlightedTagName,n=r===void 0?"mark":r,i=t.hit,a=t.cssClasses,s=a===void 0?{}:a,o=mr(i._snippetResult,e),c=o||{}
3,u=c.value,l=u===void 0?"":u,d=zs({descendantName:"highlighted"})+(s.highlighted?" ".concat(s.highlighted):""),h=Gi(Zi(Ji(l)));return h.replace(new RegExp(ye.highlightPreTag,"g"),"<".concat(n,' class="').concat(d,'">')).replace(new RegExp(ye.highlightPostTag,"g"),"</".concat(n,">"))}function Gs(t){return btoa(encodeURIComponent(JSON.stringify(t)))}function Js(t){var e=t.method,r=t.payload;if((typeof r=="undefined"?"undefined":je(r))!=="object")throw new Error("The insights helper expects the payload to be an object.");var n;try{n=Gs(r)}catch(i){throw new Error("Could not JSON serialize the payload object.")}return'data-insights-method="'.concat(e,'" data-insights-payload="').concat(n,'"')}function ra(t,e){return Js({method:t,payload:e})}var Ys="_ALGOLIA";function Zs(t){if(!((typeof document=="undefined"?"undefined":je(document))!=="object"||typeof document.cookie!="string"))for(var e="".concat(t,"="),r=document.cookie.split(";"),n=0;n<r.length;n++){for(var i=r[n];i.charAt(0)===" ";)i=i.substring(1);if(i.indexOf(e)===0)return i.substring(e.length,i.length)}}function na(){return Zs(Ys)}function Xs(){return na()}function kn(t){return t!==Object(t)}function _n(t,e){if(t===e)return!0;if(kn(t)||kn(e)||typeof t=="function"||typeof e=="function")return t===e;if(Object.keys(t).length!==Object.keys(e).length)return!1;var r=!0,n=!1,i=void 0;try{for(var a=Object.keys(t)[Symbol.iterator](),s;!(r=(s=a.next()).done);r=!0){var o=s.value;if(!(o in e)||!_n(t[o],e[o]))return!1}}catch(c){n=!0,i=c}finally{try{!r&&a.return!=null&&a.return()}finally{if(n)throw i}}return!0}function Fe(t){var e=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{fallback:function(){}}).fallback;return typeof window=="undefined"?e():t({window})}function Bn(t){var e=t||{};e.page;var r=K(e,["page"]);return r}function eo(){var t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}).key,e=["ais.infiniteHits",t].filter(Boolean).join(":");return{read:function(n){var i=n.state,a=Fe(function(o){var c=o.window;return c.sessionStorage});if(!a)return null;try{var s=JSON.parse(a.getItem(e));return s&&_n(s.state,Bn(i))?s.hits:null}catch(o){if(Nt(o,SyntaxError))try{a.removeItem(e)}catch(c){}return null}},write:function(n){var i=n.state,a=n.hits,s=Fe(function(o){var c=o.window;return c.sessionStorage});if(s)try{s.setItem(e,JSON.stringify({state:Bn(i),hits:a}))}catch(o){}}}}function rr(t){return rr=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},rr(t)}function ia(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ia=function(){return!!t})()}function to(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ro(t,e){return e&&(je(e)==="object"||typeof e=="function")?e:to(t)}function Ot(t,e,r){return e=rr(e),ro(t,ia()?Reflect.construct(e,r||[],rr(t).constructor):e.apply(t,r))}function ze(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function no(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ge(t,e,r){return e&&no(t.prototype,e),t}function fn(t,e){return fn=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},fn(t,e)}function $t(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&fn(t,e)}function ce(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}var Pn=ce;ce.prototype._events=void 0;ce.prototype._maxListeners=void 0;ce.defaultMaxListeners=10;ce.prototype.setMaxListeners=function(t){if(!io(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this};ce.prototype.emit=function(t){var e,r,n,i,a,s;if(this._events||(this._events={}),t==="error"&&(!this._events.error||xt(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var o=new Error('Uncaught, unspecified "error" event. ('+e+")");throw o.context=e,o}if(r=this._events[t],aa(r))return!1;if(Oe(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;
3default:i=Array.prototype.slice.call(arguments,1),r.apply(this,i)}else if(xt(r))for(i=Array.prototype.slice.call(arguments,1),s=r.slice(),n=s.length,a=0;a<n;a++)s[a].apply(this,i);return!0};ce.prototype.addListener=function(t,e){var r;if(!Oe(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,Oe(e.listener)?e.listener:e),this._events[t]?xt(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,xt(this._events[t])&&!this._events[t].warned&&(aa(this._maxListeners)?r=ce.defaultMaxListeners:r=this._maxListeners,r&&r>0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),typeof console.trace=="function"&&console.trace())),this};ce.prototype.on=ce.prototype.addListener;ce.prototype.once=function(t,e){if(!Oe(e))throw TypeError("listener must be a function");var r=!1;function n(){this.removeListener(t,n),r||(r=!0,e.apply(this,arguments))}return n.listener=e,this.on(t,n),this};ce.prototype.removeListener=function(t,e){var r,n,i,a;if(!Oe(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(r=this._events[t],i=r.length,n=-1,r===e||Oe(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(xt(r)){for(a=i;a-- >0;
3)if(r[a]===e||r[a].listener&&r[a].listener===e){n=a;break}if(n<0)return this;r.length===1?(r.length=0,delete this._events[t]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this};ce.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[t]&&delete this._events[t],this;if(arguments.length===0){for(e in this._events)e!=="removeListener"&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[t],Oe(r))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this};ce.prototype.listeners=function(t){var e;return!this._events||!this._events[t]?e=[]:Oe(this._events[t])?e=[this._events[t]]:e=this._events[t].slice(),e};ce.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(Oe(e))return 1;if(e)return e.length}return 0};ce.listenerCount=function(t,e){return t.listenerCount(e)};function Oe(t){return typeof t=="function"}function io(t){return typeof t=="number"}function xt(t){return typeof t=="object"&&t!==null}function aa(t){return t===void 0}const ao=fr(Pn);function so(t,e){t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}var sa=so,oo=Pn,co=sa;function jt(t,e,r){this.main=t,this.fn=e,this.recommendFn=r,this.lastResults=null,this.lastRecommendResults=null}co(jt,oo);jt.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)};jt.prototype.getModifiedState=function(t){return this.fn(t)};jt.prototype.getModifiedRecommendState=function(t){return this.recommendFn(t)};var uo=jt;function lo(t){return typeof t!="string"?t:String(t).replace(/^-/,"\\-")}function fo(t){return typeof t!="string"?t:t.replace(/^\\-/,"-")}var Fn={escapeFacetValue:lo,unescapeFacetValue:fo};function ho(t){return typeof t=="object"&&t!==null?En(Array.isArray(t)?[]:{},t):t}function nr(t){return typeof t=="function"||Array.isArray(t)||Object.prototype.toString.call(t)==="[object Object]"}function En(t,e){if(t===e)return t;for(var r in e)if(!(!Object.prototype.hasOwnProperty.call(e,r)||r==="__proto__"||r==="constructor")){var n=e[r],i=t[r];typeof i!="undefined"&&typeof n=="undefined"||(nr(i)&&nr(n)?t[r]=En(i,n):t[r]=ho(n))}return t}function mo(t){nr(t)||(t={});for(var e=1,r=arguments.length;e<r;e++){var n=arguments[e];nr(n)&&En(t,n)}return t}var In=mo;function go(t){return t&&Object.keys(t).length>0}var xn=go;function po(t,e){if(t===null)return{};var r={},n=Object.keys(t),i,a;for(a=0;a<n.length;a++)i=n[a],!(e.indexOf(i)>=0)&&(r[i]=t[i]);return r}var Tn=po;function yt(t){t=t||{},this.params=t.params||[]}yt.prototype={constructor:yt,addParams:function(t){var e=this.params.slice();return e.push(t),new yt({params:e})},removeParams:function(t){return new yt({params:this.params.filter(function(e){return e.$$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,e){return this.params.filter(function(r){return e[r.$$id]===void 0}).map(function(r){var n=Object.assign({},r,{indexName:t,threshold:r.threshold||0});return delete n.$$id,n})}};var oa=yt;function hn(t,e){this._state=t,this._rawResults={};var r=this;t.params.forEach(function(n){var i=n.$$id;r[i]=e[i],r._rawResults[i]=e[i]})}hn.prototype={constructor:hn};var ca=hn,kt=In;function Bt(t){return Object.keys(t).sort().reduce(function(e,r){return e[r]=t[r],e},{})}var te={_getQueries:function(e,r){var n=[];return n.push({indexName:e,params:te._getHitsSearchParams(r)}
vendor: 2,757 bytes, line 3
3),r.getRefinedDisjunctiveFacets().forEach(function(i){n.push({indexName:e,params:te._getDisjunctiveFacetSearchParams(r,i)})}),r.getRefinedHierarchicalFacets().forEach(function(i){var a=r.getHierarchicalFacetByName(i),s=r.getHierarchicalRefinement(i),o=r._getHierarchicalFacetSeparator(a);if(s.length>0&&s[0].split(o).length>1){var c=s[0].split(o).slice(0,-1).reduce(function(l,d,h){return l.concat({attribute:a.attributes[h],value:h===0?d:[l[l.length-1].value,d].join(o)})},[]);c.forEach(function(u,l){var d=te._getDisjunctiveFacetSearchParams(r,u.attribute,l===0);function h(g){return a.attributes.some(function(v){return v===g.split(":")[0]})}var f=(d.facetFilters||[]).reduce(function(g,v){if(Array.isArray(v)){var p=v.filter(function(S){return!h(S)});p.length>0&&g.push(p)}return typeof v=="string"&&!h(v)&&g.push(v),g},[]),m=c[l-1];l>0?d.facetFilters=f.concat(m.attribute+":"+m.value):f.length>0?d.facetFilters=f:delete d.facetFilters,n.push({indexName:e,params:d})})}}),n},_getCompositionQueries:function(e){return[{compositionID:e.index,requestBody:{params:te._getCompositionHitsSearchParams(e)}}]},_getHitsSearchParams:function(t){var e=t.facets.concat(t.disjunctiveFacets).concat(te._getHitsHierarchicalFacetsAttributes(t)).sort(),r=te._getFacetFilters(t),n=te._getNumericFilters(t),i=te._getTagFilters(t),a={};return e.length>0&&(a.facets=e.indexOf("*")>-1?["*"]:e),i.length>0&&(a.tagFilters=i),r.length>0&&(a.facetFilters=r),n.length>0&&(a.numericFilters=n),Bt(kt({},t.getQueryParams(),a))},_getCompositionHitsSearchParams:function(t){var e=t.facets.concat(t.disjunctiveFacets.map(function(o){return t.disjunctiveFacetsRefinements&&t.disjunctiveFacetsRefinements[o]&&t.disjunctiveFacetsRefinements[o].length>0?"disjunctive("+o+")":o})).concat(te._getHitsHierarchicalFacetsAttributes(t)).sort(),r=te._getFacetFilters(t),n=te._getNumericFilters(t),i=te._getTagFilters(t),a={};e.length>0&&(a.facets=e.indexOf("*")>-1?["*"]:e),i.length>0&&(a.tagFilters=i),r.length>0&&(a.facetFilters=r),n.length>0&&(a.numericFilters=n);var s=t.getQueryParams();return delete s.highlightPreTag,delete s.highlightPostTag,delete s.index,Bt(kt({},s,a))},_getDisjunctiveFacetSearchParams:function(t,e,r){var n=te._getFacetFilters(t,e,r),i=te._getNumericFilters(t,e),a=te._getTagFilters(t),s={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};a.length>0&&(s.tagFilters=a);var o=t.getHierarchicalFacetByName(e);return o?s.facets=te._getDisjunctiveHierarchicalFacetAttribute(t,o,r):s.facets=e,i.length>0&&(s.numericFilters=i),n.length>0&&(s.facetFilters=n),Bt(kt({},t.getQueryParams(),s))},_getNumericFilters:function(t,e){if(t.numericFilters)return t.numericFilters;var r=[];return Object.keys(t.numericRefinements).forEach(function(n){var i=t.numericRefinements[n]||{};
3Object.keys(i).forEach(function(a){var s=i[a]||[];e!==n&&s.forEach(function(o){if(Array.isArray(o)){var c=o.map(function(u){return n+a+u});r.push(c)}else r.push(n+a+o)})})}),r},_getTagFilters:function(t){return t.tagFilters?t.tagFilters:t.tagRefinements.join(",")},_getFacetFilters:function(t,e,r){var n=[],i=t.facetsRefinements||{};Object.keys(i).sort().forEach(function(c){var u=i[c]||[];u.slice().sort().forEach(function(l){n.push(c+":"+l)})});var a=t.facetsExcludes||{};Object.keys(a).sort().forEach(function(c){var u=a[c]||[];u.sort().forEach(function(l){n.push(c+":-"+l)})});var s=t.disjunctiveFacetsRefinements||{};Object.keys(s).sort().forEach(function(c){var u=s[c]||[];if(!(c===e||!u||u.length===0)){var l=[];u.slice().sort().forEach(function(d){l.push(c+":"+d)}),n.push(l)}});var o=t.hierarchicalFacetsRefinements||{};return Object.keys(o).sort().forEach(function(c){var u=o[c]||[],l=u[0];if(l!==void 0){var d=t.getHierarchicalFacetByName(c),h=t._getHierarchicalFacetSeparator(d),f=t._getHierarchicalRootPath(d),m,g;if(e===c){if(l.indexOf(h)===-1||!f&&r===!0||f&&f.split(h).length===l.split(h).length)return;f?(g=f.split(h).length-1,l=f):(g=l.split(h).length-2,l=l.slice(0,l.lastIndexOf(h))),m=d.attributes[g]}else g=l.split(h).length-1,m=d.attributes[g];m&&n.push([m+":"+l])}}),n},_getHitsHierarchicalFacetsAttributes:function(t){var e=[];return t.hierarchicalFacets.reduce(function(n,i){var a=t.getHierarchicalRefinement(i.name)[0];if(!a)return n.push(i.attributes[0]),n;var s=t._getHierarchicalFacetSeparator(i),o=a.split(s).length,c=i.attributes.slice(0,o+1);return n.concat(c)},e)},_getDisjunctiveHierarchicalFacetAttribute:function(t,e,r){var n=t._getHierarchicalFacetSeparator(e);if(r===!0){var i=t._getHierarchicalRootPath(e),a=0;return i&&(a=i.split(n).length),[e.attributes[a]]}var s=t.getHierarchicalRefinement(e.name)[0]||"",o=s.split(n).length-1;return e.attributes.slice(0,o+1)},getSearchForFacetQuery:function(t,e,r,n){var i=n.isDisjunctiveFacet(t)?n.clearRefinements(t):n,a={facetQuery:e,facetName:t};return typeof r=="number"&&(a.maxFacetHits=r),Bt(kt({},te._getHitsSearchParams(i),a))}},vo=te,Cn=function(){var e=Array.prototype.slice.call(arguments);return e.reduceRight(function(r,n){return Object.keys(Object(n)).forEach(function(i){n[i]!==void 0&&(r[i]!==void 0&&delete r[i],r[i]=n[i])}),r},{})},Ht=function(e,r){if(Array.isArray(e)){for(var n=0;n<e.length;n++)if(r(e[n]))return e[n]}};function yo(t,e){return t.filter(function(r,n){return e.indexOf(r)>-1&&t.indexOf(r)===n})}var Ro=yo;function ua(t){if(typeof t=="number")return t;if(typeof t=="string")return parseFloat(t);if(Array.isArray(t))return t.map(ua);throw new Error("The value should be a number, a parsable string or an array of those.")}var So=ua,bo=function(e){return e===null?!1:/^[a-zA-Z0-9_-]{1,64}$/.test(e)},wo=Cn,_o=xn,Po=Tn,Be={addRefinement:function(e,r,n){if(Be.isRefined(e,r,n))return e;var i=""+n,a=e[r]?e[r].concat(i):[i],s={};return s[r]=a,wo(s,e)},removeRefinement:function(e,r,n){if(n===void 0)return Be.clearRefinement(e,function(a,s){return r===s});var i=""+n;return Be.clearRefinement(e,function(a,s){return r===s&&i===a})},toggleRefinement:function(e,r,n){if(n===void 0)throw new Error("toggleRefinement should be used with a value");return Be.isRefined(e,r,n)?Be.removeRefinement(e,r,n):Be.addRefinement(e,r,n)},clearRefinement:function(e,r,n){if(r===void 0)return _o(e)?{}:e;if(typeof r=="string")return Po(e,[r]);if(typeof r=="function"){var i=!1,a=Object.keys(e).reduce(function(s,o){var c=e[o]||[],u=c.filter(function(l){return!r(l,o,n)});return u.length!==c.length&&(i=!0),s[o]=u,s},{});return i?a:e}},isRefined:function(e,r,n){var i=!!e[r]&&e[r].length>0;if(n===void 0||!i)return i;var a=""+n;return e[r].indexOf(a)!==-1}},Fo=Be,Er=Cn,la=Ht,Qn=Ro,dn=In,mn=xn,qn=Tn,Ir=So,Eo=bo,J=Fo;function An(t,e){return Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every(function(r,n){return An(e[n],r)}):t===e}function Io(t,e){return la(t,function(r){return An(r,e)})}function fe(t){var e=t?fe._parseNumbers(t):{};e.userToken!==void 0&&!Eo(e.userToken)&&console.warn("[algoliasearch-helper] The `userToken` parameter is invali
3d. This can lead to wrong analytics.\n - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=e.facets||[],this.disjunctiveFacets=e.disjunctiveFacets||[],this.hierarchicalFacets=e.hierarchicalFacets||[],this.facetsRefinements=e.facetsRefinements||{},this.facetsExcludes=e.facetsExcludes||{},this.disjunctiveFacetsRefinements=e.disjunctiveFacetsRefinements||{},this.numericRefinements=e.numericRefinements||{},this.tagRefinements=e.tagRefinements||[],this.hierarchicalFacetsRefinements=e.hierarchicalFacetsRefinements||{};var r=this;Object.keys(e).forEach(function(n){var i=fe.PARAMETERS.indexOf(n)!==-1,a=e[n]!==void 0;!i&&a&&(r[n]=e[n])})}fe.PARAMETERS=Object.keys(new fe);function xr(t){var e=parseFloat(t);return isFinite(e)?e:null}fe._parseNumbers=function(t){if(t instanceof fe)return t;var e={},r=["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"];if(r.forEach(function(i){var a=t[i];if(typeof a=="string"){var s=parseFloat(a);isNaN(s)?e[i]=a:isFinite(s)?e[i]=s:e[i]=null}else typeof a=="number"&&!isFinite(a)&&(e[i]=null)}),Array.isArray(t.insideBoundingBox)&&(e.insideBoundingBox=t.insideBoundingBox.map(function(i){return Array.isArray(i)?i.map(function(a){return typeof a=="string"?xr(a):typeof a=="number"&&!isFinite(a)?null:a}):i})),t.numericRefinements){var n={};Object.keys(t.numericRefinements).forEach(function(i){var a=t.numericRefinements[i]||{};n[i]={},Object.keys(a).forEach(function(s){var o=a[s],c=o.map(function(u){return Array.isArray(u)?u.map(function(l){return typeof l=="string"?xr(l):typeof l=="number"&&!isFinite(l)?null:l}):typeof u=="string"?xr(u):typeof u=="number"&&!isFinite(u)?null:u});n[i][s]=c})}),e.numericRefinements=n}return dn(t,e)};fe.make=function(e){var r=new fe(e),n=e.hierarchicalFacets||[];return n.forEach(function(i){if(i.rootPath){var a=r.getHierarchicalRefinement(i.name);a.length>0&&a[0].indexOf(i.rootPath)!==0&&(r=r.clearRefinements(i.name)),a=r.getHierarchicalRefinement(i.name),a.length===0&&(r=r.toggleHierarchicalFacetRefinement(i.name,i.rootPath))}}),r};fe.validate=function(t,e){var r=e||{};return t.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):t.tagRefinements.length>0&&r.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):t.numericFilters&&r.numericRefinements&&mn(r.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):mn(t.numericRefinements)&&r.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null};fe.prototype={constructor:fe,clearRefinements:function(e){var r={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:J.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:J.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:J.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:J.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return r.numericRefinements===this.numericRefinements&&r.facetsRefinements===this.facetsRefinements&&r.facetsExcludes===this.facetsExcludes&&r.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&r.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(r)},clearTags:function(){return this.tagFilters===void 0&&this.tagRefinements.length===0?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(t,e,r){var n=Ir(r);if(this.isNumericRefined(t,e,n))return this;var i=dn({},this.numericRefinements);return i[t]=dn({},i[t]),i[t][e]?(i[t][e]=i[t][e].slice(),i[t][e].push(n)):i[t][e]=[n],this.setQueryParameters({numericRefinements:i})},getConjunctiveRefinements:function(t){return this.isConjunctiveFacet(t)?this.facetsRefinements[t]||[]:[]},getDisjunctiveRefinements:function(t){return this.isDisjunctiveFacet(t)?this.disjunctiveFacetsRefinements[t]||[]:[]},getHierarchicalRefinement:function(t){return this.hierarchicalFacetsRefinements[t]||[]},getExcludeRefinements:function(t){return this.isConjunctiveFacet(t)?this.facetsExcludes[t]||[]:[]},removeNumericRefinement:function(t,e,r){var n=r;return n!==void 0?this.isNumericRefined(t,e,n)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(i,a){return a===t&&i.op===e&&An(i.val,Ir(n))})}):this:e!==void 0?this.isNumericRefined(t,e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(i,a){return a===t&&i.op===e})}):this:this.isNumericRefined(t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(i,a){return a===t})}):this},getNumericRefinements:function(t){return this.numericRefinements[t]||{}},getNumericRefinement:function(t,e){return this.numericRefinements[t]&&this.numericRefinements[t][e]},_clearNumericRefinements:function(e){if(e===void 0)return mn(this.numericRefinements)?{}:this.numericRefinements;if(typeof e=="string")return qn(this.numericRefinements,[e]);if(typeof e=="function"){var r=!1,n=this.numericRefinements,i=Object.keys(n).reduce(function(a,s){var o=n[s],c={};return o=o||{}
3,Object.keys(o).forEach(function(u){var l=o[u]||[],d=[];l.forEach(function(h){var f=e({val:h,op:u},s,"numeric");f||d.push(h)}),d.length!==l.length&&(r=!0),c[u]=d}),a[s]=c,a},{});return r?i:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,r){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return J.isRefined(this.facetsRefinements,e,r)?this:this.setQueryParameters({facetsRefinements:J.addRefinement(this.facetsRefinements,e,r)})},addExcludeRefinement:function(e,r){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return J.isRefined(this.facetsExcludes,e,r)?this:this.setQueryParameters({facetsExcludes:J.addRefinement(this.facetsExcludes,e,r)})},addDisjunctiveFacetRefinement:function(e,r){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return J.isRefined(this.disjunctiveFacetsRefinements,e,r)?this:this.setQueryParameters({disjunctiveFacetsRefinements:J.addRefinement(this.disjunctiveFacetsRefinements,e,r)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var r={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(r)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter(function(r){return r!==e})}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter(function(r){return r!==e})}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter(function(r){return r.name!==e})}):this},removeFacetRefinement:function(e,r){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return J.isRefined(this.facetsRefinements,e,r)?this.setQueryParameters({facetsRefinements:J.removeRefinement(this.facetsRefinements,e,r)}):this},removeExcludeRefinement:function(e,r){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return J.isRefined(this.facetsExcludes,e,r)?this.setQueryParameters({facetsExcludes:J.removeRefinement(this.facetsExcludes,e,r)}):this},removeDisjunctiveFacetRefinement:function(e,r){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return J.isRefined(this.disjunctiveFacetsRefinements,e,r)?this.setQueryParameters({disjunctiveFacetsRefinements:J.removeRefinement(this.disjunctiveFacetsRefinements,e,r)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var r={tagRefinements:this.tagRefinements.filter(function(n){return n!==e})};return this.setQueryParameters(r)},toggleRefinement:function(e,r){return this.toggleFacetRefinement(e,r)},toggleFacetRefinement:function(e,r){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,r);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,r);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,r);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,r){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:J.toggleRefinement(this.facetsRefinements,e,r)})},toggleExcludeFacetRefinement:function(e,r){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:J.toggleRefinement(this.facetsExcludes,e,r)})},toggleDisjunctiveFacetRefinement:function(e,r){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:J.toggleRefinement(this.disjunctiveFacetsRefinements,e,r)})},toggleHierarchicalFacetRefinement:function(e,r){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var n=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),i={},a=this.hierarchicalFacetsRefinements[e]!==void 0&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===r||this.hierarchicalFacetsRefinements[e][0].indexOf(r+n)===0);return a?r.indexOf(n)===-1?i[e]=[]:i[e]=[r.slice(0,r.lastIndexOf(n))]:i[e]=[r],this.setQueryParameters({hierarchicalFacetsRefinements:Er(i,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(t,e){if(this.isHierarchicalFacetRefined(t))throw new Error(t+" is already refined.");if(!this.isHierarchicalFacet(t))throw new Error(t+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[t]=[e],this.setQueryParameters({hierarchicalFacetsRefinements:Er(r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(t){if(!this.isHierarchicalFacetRefined(t))return this;var e={};return e[t]=[],this.setQueryParameters({hierarchicalFacetsRefinements:Er(e,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(t){return this.disjunctiveFacets.indexOf(t)>-1},isHierarchicalFacet:function(t){return this.getHierarchicalFacetByName(t)!==void 0},isConjunctiveFacet:function(t){return this.facets.indexOf(t)>-1},isFacetRefined:function(e,r){return this.isConjunctiveFacet(e)?J.isRefined(this.facetsRefinements,e,r):!1},isExcludeRefined:function(e,r){return this.isConjunctiveFacet(e)?J.isRefined(this.facetsExcludes,e,r):!1},isDisjunctiveFacetRefined:function(e,r){return this.isDisjunctiveFacet(e)?J.isRefined(this.disjunctiveFacetsRefinements,e,r):!1},isHierarchicalFacetRefined:function(e,r){if(!this.isHierarchicalFacet(e))return!1;var n=this.getHierarchicalRefinement(e);return r?n.indexOf(r)!==-1:n.length>0},isNumericRefined:function(e,r,n){if(n===void 0&&r===void 0)return!!this.numericRefinements[e];var i=this.numericRefinements[e]&&this.numericRefinements[e][r]!==void 0;if(n===void 0||!i)return i;var a=Ir(n),s=Io(this.numericRefinements[e][r],a)!==void 0;return i&&s},isTagRefined:function(e){return this.tagRefinements.indexOf(e)!==-1},getRefinedDisjunctiveFacets:function(){var e=this,r=Qn(Object.keys(this.numericRefinements).filter(function(n){return Object.keys(e.numericRefinements[n]).length>0}),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter(function(n){return e.disjunctiveFacetsRefinements[n].length>0}).concat(r).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return Qn(this.hierarchicalFacets.map(function(r){return r.name}),Object.keys(this.hierarchicalFacetsRefinements).filter(function(r){return e.hierarchicalFacetsRefinements[r].length>0})).sort()},getUnrefinedDisjunctiveFacets:function(){var t=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter(function(e){return t.indexOf(e)===-1})},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,r={},n=this;
3return Object.keys(this).forEach(function(i){var a=n[i];e.indexOf(i)===-1&&a!==void 0&&(r[i]=a)}),r},setQueryParameter:function(e,r){if(this[e]===r)return this;var n={};return n[e]=r,this.setQueryParameters(n)},setQueryParameters:function(e){if(!e)return this;var r=fe.validate(this,e);if(r)throw r;var n=this,i=fe._parseNumbers(e),a=Object.keys(this).reduce(function(o,c){return o[c]=n[c],o},{}),s=Object.keys(i).reduce(function(o,c){var u=o[c]!==void 0,l=i[c]!==void 0;return u&&!l?qn(o,[c]):(l&&(o[c]=i[c]),o)},a);return new this.constructor(s)},resetPage:function(){return this.page===void 0?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(t){return t.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(t){return t.separator||" > "},_getHierarchicalRootPath:function(t){return t.rootPath||null},_getHierarchicalShowParentLevel:function(t){return typeof t.showParentLevel=="boolean"?t.showParentLevel:!0},getHierarchicalFacetByName:function(t){return la(this.hierarchicalFacets,function(e){return e.name===t})},getHierarchicalFacetBreadcrumb:function(t){if(!this.isHierarchicalFacet(t))return[];var e=this.getHierarchicalRefinement(t)[0];if(!e)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(t)),n=e.split(r);return n.map(function(i){return i.trim()})},toString:function(){return JSON.stringify(this,null,2)}};var fa=fe,xo=function(e){return Array.isArray(e)?e.filter(Boolean):[]},To=function(e,r){if(!Array.isArray(e))return-1;for(var n=0;n<e.length;n++)if(r(e[n]))return n;return-1},Co=Ht,ha=function(e,r){var n=(r||[]).map(function(i){return i.split(":")});return e.reduce(function(a,s){var o=s.split(":"),c=Co(n,function(u){return u[0]===o[0]});return o.length>1||!c?(a[0].push(o[0]),a[1].push(o[1]),a):(a[0].push(c[0]),a[1].push(c[1]),a)},[[],[]])};function Ao(){var t=Array.prototype.slice.call(arguments);return t.reduceRight(function(e,r){return Object.keys(Object(r)).forEach(function(n){var i=typeof e[n]=="number"?e[n]:0,a=r[n];a!==void 0&&a>=i&&(e[n]!==void 0&&delete e[n],e[n]=a)}),e},{})}var No=Ao;function Oo(t,e){if(t!==e){var r=t!==void 0,n=t===null,i=e!==void 0,a=e===null;if(!a&&t>e||n&&i||!r)return 1;if(!n&&t<e||a&&r||!i)return-1}return 0}function $o(t,e,r){if(!Array.isArray(t))return[];Array.isArray(r)||(r=[]);var n=t.map(function(i,a){return{criteria:e.map(function(s){return i[s]}),index:a,value:i}});return n.sort(function(a,s){for(var o=-1;++o<a.criteria.length;){var c=Oo(a.criteria[o],s.criteria[o]);if(c)return o>=r.length?c:r[o]==="desc"?-c:c}return a.index-s.index}),n.map(function(i){return i.value})}var da=$o,jo=Uo,ma=Fn,Ho=Ht,Lo=ha,Mo=da,Do=ma.escapeFacetValue,Wo=ma.unescapeFacetValue;function Uo(t){return function(r,n){var i=t.hierarchicalFacets[n],a=t.hierarchicalFacetsRefinements[i.name]&&t.hierarchicalFacetsRefinements[i.name][0]||"",s=t._getHierarchicalFacetSeparator(i),o=t._getHierarchicalRootPath(i),c=t._getHierarchicalShowParentLevel(i),u=Lo(t._getHierarchicalFacetSortBy(i)),l=r.every(function(f){return f.exhaustive}),d=ko(u,s,o,c,a),h=r;return o&&(h=r.slice(o.split(s).length)),h.reduce(d,{name:t.hierarchicalFacets[n].name,count:null,isRefined:!0,path:null,escapedValue:null,exhaustive:l,data:null})}}function ko(t,e,r,n,i){return function(s,o,c){var u=s;if(c>0){var l=0;for(u=s;l<c;){var d=u&&Array.isArray(u.data)?u.data:[];u=Ho(d,function(f){return f.isRefined}),l++}}if(u){var h=Object.keys(o.data).map(function(f){return[f,o.data[f]]}).filter(function(f){var m=f[0];return Bo(m,u.path||r,i,e,r,n)});u.data=Mo(h.map(function(f){var m=f[0],g=f[1];return Qo(g,m,e,Wo(i),o.exhaustive)}),t[0],t[1])}return s}}function Bo(t,e,r,n,i,a){return i&&(t.indexOf(i)!==0||i===t)?!1:!i&&t.indexOf(n)===-1||i&&t.split(n).length-i.split(n).length===1||t.indexOf(n)===-1&&r.indexOf(n)===-1||r.indexOf(t)===0||t.indexOf(e+n)===0&&(a||t.indexOf(r)===0)}function Qo(t,e,r,n,i){var a=e.split(r);return{name:a[a.length-1].trim(),path:e,escapedValue:Do(e),count:t,isRefined:n===e||n.indexOf(e+r)===0,exhaustive:i,data:null}}var Tr=xo,bt=Cn,ga=Fn,Se=Ht,ft=To,qo=ha,Vn=No,pa=da,Kn=ga.escapeFacetValue,va=ga.unescapeFacetValue,Vo=jo;function zn(t){var e={};return t.forEach(function(r,n){e[r]=n}),e}function Cr(t,e,r){e&&e[r]&&(t.stats=e[r])}function Ko(t,e){return Se(t,function(n){var i=n.attributes||[];return i.indexOf(e)>-1})}function De(t,e,r){var n=e[0]||{};this._rawResults=e;var i=this;
vendor: 4,302 bytes, line 3
3Object.keys(n).forEach(function(d){i[d]=n[d]});var a=bt(r,{persistHierarchicalRootCount:!1});Object.keys(a).forEach(function(d){i[d]=a[d]}),this.processingTimeMS=e.reduce(function(d,h){return h.processingTimeMS===void 0?d:d+h.processingTimeMS},0),this.disjunctiveFacets=[],this.hierarchicalFacets=t.hierarchicalFacets.map(function(){return[]}),this.facets=[];var s=t.getRefinedDisjunctiveFacets(),o=zn(t.facets),c=zn(t.disjunctiveFacets),u=1,l=n.facets||{};Object.keys(l).forEach(function(d){var h=l[d],f=Ko(t.hierarchicalFacets,d);if(f){var m=f.attributes.indexOf(d),g=ft(t.hierarchicalFacets,function(y){return y.name===f.name});i.hierarchicalFacets[g][m]={attribute:d,data:h,exhaustive:n.exhaustiveFacetsCount}}else{var v=t.disjunctiveFacets.indexOf(d)!==-1,p=t.facets.indexOf(d)!==-1,S;v&&(S=c[d],i.disjunctiveFacets[S]={name:d,data:h,exhaustive:n.exhaustiveFacetsCount},Cr(i.disjunctiveFacets[S],n.facets_stats,d)),p&&(S=o[d],i.facets[S]={name:d,data:h,exhaustive:n.exhaustiveFacetsCount},Cr(i.facets[S],n.facets_stats,d))}}),this.hierarchicalFacets=Tr(this.hierarchicalFacets),s.forEach(function(d){var h=e[u],f=h&&h.facets?h.facets:{},m=t.getHierarchicalFacetByName(d);Object.keys(f).forEach(function(g){var v=f[g],p;if(m){p=ft(t.hierarchicalFacets,function(w){return w.name===m.name});var S=ft(i.hierarchicalFacets[p],function(w){return w.attribute===g});if(S===-1)return;i.hierarchicalFacets[p][S].data=i.persistHierarchicalRootCount?Vn(i.hierarchicalFacets[p][S].data,v):bt(v,i.hierarchicalFacets[p][S].data)}else{p=c[g];var y=n.facets&&n.facets[g]||{};i.disjunctiveFacets[p]={name:g,data:Vn(y,v),exhaustive:h.exhaustiveFacetsCount},Cr(i.disjunctiveFacets[p],h.facets_stats,g),t.disjunctiveFacetsRefinements[g]&&t.disjunctiveFacetsRefinements[g].forEach(function(w){!i.disjunctiveFacets[p].data[w]&&t.disjunctiveFacetsRefinements[g].indexOf(va(w))>-1&&(i.disjunctiveFacets[p].data[w]=0)})}}),u++}),t.getRefinedHierarchicalFacets().forEach(function(d){var h=t.getHierarchicalFacetByName(d),f=t._getHierarchicalFacetSeparator(h),m=t.getHierarchicalRefinement(d);m.length===0||m[0].split(f).length<2||e.slice(u).forEach(function(g){var v=g&&g.facets?g.facets:{};Object.keys(v).forEach(function(p){var S=v[p],y=ft(t.hierarchicalFacets,function(O){return O.name===h.name}),w=ft(i.hierarchicalFacets[y],function(O){return O.attribute===p});if(w!==-1){var _={};if(m.length>0&&!i.persistHierarchicalRootCount){var I=m[0].split(f)[0];_[I]=i.hierarchicalFacets[y][w].data[I]}i.hierarchicalFacets[y][w].data=bt(_,S,i.hierarchicalFacets[y][w].data)}}),u++})}),Object.keys(t.facetsExcludes).forEach(function(d){var h=t.facetsExcludes[d],f=o[d];i.facets[f]={name:d,data:l[d],exhaustive:n.exhaustiveFacetsCount},h.forEach(function(m){i.facets[f]=i.facets[f]||{name:d},i.facets[f].data=i.facets[f].data||{},i.facets[f].data[m]=0})}),this.hierarchicalFacets=this.hierarchicalFacets.map(Vo(t)),this.facets=Tr(this.facets),this.disjunctiveFacets=Tr(this.disjunctiveFacets),this._state=t}De.prototype.getFacetByName=function(t){function e(r){return r.name===t}return Se(this.facets,e)||Se(this.disjunctiveFacets,e)||Se(this.hierarchicalFacets,e)};function zo(t,e){function r(l){return l.name===e}if(t._state.isConjunctiveFacet(e)){var n=Se(t.facets,r);return n?Object.keys(n.data).map(function(l){var d=Kn(l);return{name:l,escapedValue:d,count:n.data[l],isRefined:t._state.isFacetRefined(e,d),isExcluded:t._state.isExcludeRefined(e,l)}}):[]}else if(t._state.isDisjunctiveFacet(e)){var i=Se(t.disjunctiveFacets,r);return i?Object.keys(i.data).map(function(l){var d=Kn(l);return{name:l,escapedValue:d,count:i.data[l],isRefined:t._state.isDisjunctiveFacetRefined(e,d)}}):[]}else if(t._state.isHierarchicalFacet(e)){var a=Se(t.hierarchicalFacets,r);if(!a)return a;var s=t._state.getHierarchicalFacetByName(e),o=t._state._getHierarchicalFacetSeparator(s),c=va(t._state.getHierarchicalRefinement(e)[0]||"");c.indexOf(s.rootPath)===0&&(c=c.replace(s.rootPath+o,""));var u=c.split(o);return u.unshift(e),ya(a,u,0),a}}function ya(t,e,r){t.isRefined=t.name===(e[r]&&e[r].trim()),t.data&&t.data.forEach(function(n){ya(n,e,r+1)})}function Ra(t,e,r,n){if(n=n||0,Array.isArray(e))return t(e,r[n]);if(!e.data||e.data.length===0)return e;var i=e.data.map(function(o){return Ra(t,o,r,n+1)}),a=t(i,r[n]),s=bt({data:a},e);return s}
3De.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"];function Go(t,e){return e.sort(t)}function Jo(t,e){var r=[],n=[],i=e.hide||[],a=e.order||[],s=a.reduce(function(u,l,d){return u[l]=d,u},{});t.forEach(function(u){var l=u.path||u.name,d=i.indexOf(l)>-1;!d&&s[l]!==void 0?r[s[l]]=u:d||n.push(u)}),r=r.filter(function(u){return u});var o=e.sortRemainingBy,c;return o==="hidden"?r:(o==="alpha"?c=[["path","name"],["asc","asc"]]:c=[["count"],["desc"]],r.concat(pa(n,c[0],c[1])))}function Yo(t,e){return t.renderingContent&&t.renderingContent.facetOrdering&&t.renderingContent.facetOrdering.values&&t.renderingContent.facetOrdering.values[e]}De.prototype.getFacetValues=function(t,e){var r=zo(this,t);if(r){var n=bt(e,{sortBy:De.DEFAULT_SORT,facetOrdering:!(e&&e.sortBy)}),i=this,a;if(Array.isArray(r))a=[t];else{var s=i._state.getHierarchicalFacetByName(r.name);a=s.attributes}return Ra(function(o,c){var u=Yo(i,c);if(n.facetOrdering&&u)return Jo(o,u);if(Array.isArray(n.sortBy)){var l=qo(n.sortBy,De.DEFAULT_SORT),d=pa(o,l[0],l[1]),h=u&&u.hide?u.hide:[];if(h.length>0){var f=[];return d.forEach(function(m){var g=m.path||m.name;h.indexOf(g)===-1&&f.push(m)}),f}return d}else if(typeof n.sortBy=="function")return Go(n.sortBy,o);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")},r,a)}};De.prototype.getFacetStats=function(t){if(this._state.isConjunctiveFacet(t))return Gn(this.facets,t);if(this._state.isDisjunctiveFacet(t))return Gn(this.disjunctiveFacets,t)};function Gn(t,e){var r=Se(t,function(n){return n.name===e});return r&&r.stats}De.prototype.getRefinements=function(){var t=this._state,e=this,r=[];return Object.keys(t.facetsRefinements).forEach(function(n){t.facetsRefinements[n].forEac
3h(function(i){r.push(Ar(t,"facet",n,i,e.facets))})}),Object.keys(t.facetsExcludes).forEach(function(n){t.facetsExcludes[n].forEach(function(i){r.push(Ar(t,"exclude",n,i,e.facets))})}),Object.keys(t.disjunctiveFacetsRefinements).forEach(function(n){t.disjunctiveFacetsRefinements[n].forEach(function(i){r.push(Ar(t,"disjunctive",n,i,e.disjunctiveFacets))})}),Object.keys(t.hierarchicalFacetsRefinements).forEach(function(n){t.hierarchicalFacetsRefinements[n].forEach(function(i){r.push(Zo(t,n,i,e.hierarchicalFacets))})}),Object.keys(t.numericRefinements).forEach(function(n){var i=t.numericRefinements[n];Object.keys(i).forEach(function(a){i[a].forEach(function(s){r.push({type:"numeric",attributeName:n,name:s,numericValue:s,operator:a})})})}),t.tagRefinements.forEach(function(n){r.push({type:"tag",attributeName:"_tags",name:n})}),r};function Ar(t,e,r,n,i){var a=Se(i,function(c){return c.name===r}),s=a&&a.data&&a.data[n]?a.data[n]:0,o=a&&a.exhaustive||!1;return{type:e,attributeName:r,name:n,count:s,exhaustive:o}}function Zo(t,e,r,n){var i=t.getHierarchicalFacetByName(e),a=t._getHierarchicalFacetSeparator(i),s=r.split(a),o=Se(n,function(h){return h.name===e}),c=s.reduce(function(h,f){var m=h&&Se(h.data,function(g){return g.name===f});return m!==void 0?m:h},o),u=c&&c.count||0,l=c&&c.exhaustive||!1,d=c&&c.path||"";return{type:"hierarchical",attributeName:e,name:d,count:u,exhaustive:l}}var Sa=De,Xo=function(e){return e.reduce(function(r,n){return r.concat(n)},[])},ec=Ht,tc=Xo;function rc(t,e){var r=[];return Object.keys(t).forEach(function(n){t[n].count<2&&(t[n].indexSum+=100),r.push({objectID:n,avgOfIndices:t[n].indexSum/e})}),r.sort(function(n,i){return n.avgOfIndices>i.avgOfIndices?1:-1})}function nc(t,e){var r={};e.forEach(function(a){a.forEach(function(s,o){t.includes(s.objectID)||(r[s.objectID]?r[s.objectID]={indexSum:r[s.objectID].indexSum+o,count:r[s.objectID].count+1}:r[s.objectID]={indexSum:o,count:1})})});var n=rc(r,e.length),i=n.reduce(function(a,s){var o=ec(tc(e),function(c){return c.objectID===s.objectID});return o?a.concat(o):a},[]);return i}var ic=nc,ba="3.29.1",ac=Pn,sc=uo,wa=Fn.escapeFacetValue,oc=sa,cc=In,uc=xn,lc=Tn,_a=oa,fc=ca,We=vo,Nn=fa,wt=Sa,hc=ic,Pa=ba;function C(t,e,r,n){typeof t.addAlgoliaAgent=="function"&&t.addAlgoliaAgent("JS Helper ("+Pa+")"),this.setClient(t);var i=r||{};i.index=e,this.state=Nn.make(i),this.recommendState=new _a({params:i.recommendState}),this.lastResults=null,this.lastRecommendResults=null,this._queryId=0,this._recommendQueryId=0,this._lastQueryIdReceived=-1,this._lastRecommendQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0,this._currentNbRecommendQueries=0,this._searchResultsOptions=n,this._recommendCache={}}oc(C,ac);C.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this};C.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this};C.prototype.searchWithComposition=function(){return this._runComposition({onlyWithDerivedHelpers:!0}),this};C.prototype.recommend=function(){return this._recommend(),this};C.prototype.getQuery=function(){var t=this.state;return We._getHitsSearchParams(t)};C.prototype.searchOnce=function(t,e){var r=t?this.state.setQueryParameters(t):this.state,n=We._getQueries(r.index,r),i=this;if(this._currentNbQueries++,this.emit("searchOnce",{state:r}),e){this.client.search(n).then(function(a){i._currentNbQueries--,i._currentNbQueries===0&&i.emit("searchQueueEmpty"),e(null,new wt(r,a.results),r)}).catch(function(a){i._currentNbQueries--,i._currentNbQueries===0&&i.emit("searchQueueEmpty"),e(a,null,r)});return}return this.client.search(n).then(function(a){return i._currentNbQueries--,i._currentNbQueries===0&&i.emit("searchQueueEmpty"),{content:new wt(r,a.results),state:r,_originalResponse:a}},function(a){throw i._currentNbQueries--,i._currentNbQueries===0&&i.emit("searchQueueEmpty"),a})};C.prototype.findAnswers=function(t){console.warn("[algoliasearch-helper] answers is no longer supported");var e=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(e),i=cc({attributesForPrediction:t.attributesForPrediction,nbHits:t.nbHits},{params:lc(We._getHitsSearchParams(n),["attributesToSnippet","hitsPerPage","restrictSearchableAttributes","snippetEllipsisText"])}),a="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(a);var s=this.client.initIndex(n.index);if(typeof s.findAnswers!="function")throw new Error(a);return s.findAnswers(n.query,t.queryLanguages,i)};C.prototype.searchForFacetValues=function(t,e,r,n){var i=typeof this.client.searchForFacetValues=="function"&&typeof this.client.searchForFacets!="function",a=typeof this.client.initIndex=="function";if(!i&&!a&&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 s=this.state.setQueryParameters(n||{}),o=s.isDisjunctiveFacet(t),c=We.getSearchForFacetQuery(t,e,r,s);this._currentNbQueries++;var u=this,l;i?l=this.client.searchForFacetValues([{indexName:s.index,params:c}]):a?l=this.client.initIndex(s.index).searchForFacetValues(c):(delete c.facetName,l=this.client.search([{type:"facet",facet:t,indexName:s.index,params:c}]).then(function(f){return f.results[0]}
3)),this.emit("searchForFacetValues",{state:s,facet:t,query:e});var d=this.lastResults&&this.lastResults.index===s.index&&this.lastResults.renderingContent&&this.lastResults.renderingContent.facetOrdering&&this.lastResults.renderingContent.facetOrdering.values&&this.lastResults.renderingContent.facetOrdering.values[t]&&this.lastResults.renderingContent.facetOrdering.values[t].hide||[];return l.then(function(f){return u._currentNbQueries--,u._currentNbQueries===0&&u.emit("searchQueueEmpty"),f=Array.isArray(f)?f[0]:f,f.facetHits=f.facetHits.reduce(function(m,g){return d.indexOf(g.value)>-1||(g.escapedValue=wa(g.value),g.isRefined=o?s.isDisjunctiveFacetRefined(t,g.escapedValue):s.isFacetRefined(t,g.escapedValue),m.push(g)),m},[]),f},function(h){throw u._currentNbQueries--,u._currentNbQueries===0&&u.emit("searchQueueEmpty"),h})};C.prototype.searchForCompositionFacetValues=function(t,e,r,n){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 i=this.state.setQueryParameters(n||{}),a=i.isDisjunctiveFacet(t);this._currentNbQueries++;var s=this,o;return o=this.client.searchForFacetValues({compositionID:i.index,facetName:t,searchForFacetValuesRequest:{params:{query:e,maxFacetHits:r,searchQuery:We._getCompositionHitsSearchParams(i)}}}),this.emit("searchForFacetValues",{state:i,facet:t,query:e}),o.then(function(u){return s._currentNbQueries--,s._currentNbQueries===0&&s.emit("searchQueueEmpty"),u=u.results[0],u.facetHits.forEach(function(l){l.escapedValue=wa(l.value),l.isRefined=a?i.isDisjunctiveFacetRefined(t,l.escapedValue):i.isFacetRefined(t,l.escapedValue)}),u},function(c){throw s._currentNbQueries--,s._currentNbQueries===0&&s.emit("searchQueueEmpty"),c})};C.prototype.setQuery=function(t){return this._change({state:this.state.resetPage().setQuery(t),isPageReset:!0}),this};C.prototype.clearRefinements=function(t){return this._change({state:this.state.resetPage().clearRefinements(t),isPageReset:!0}),this};C.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this};C.prototype.addDisjunctiveFacetRefinement=function(t,e){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(t,e),isPageReset:!0}),this};C.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)};C.prototype.addHierarchicalFacetRefinement=function(t,e){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(t,e),isPageReset:!0}),this};C.prototype.addNumericRefinement=function(t,e,r){return this._change({state:this.state.resetPage().addNumericRefinement(t,e,r),isPageReset:!0}),this};C.prototype.addFacetRefinement=function(t,e){return this._change({state:this.state.resetPage().addFacetRefinement(t,e),isPageReset:!0}),this};C.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)};C.prototype.addFacetExclusion=function(t,e){return this._change({state:this.state.resetPage().addExcludeRefinement(t,e),isPageReset:!0}),this};C.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)};C.prototype.addTag=function(t){return this._change({state:this.state.resetPage().addTagRefinement(t),isPageReset:!0}),this};C.prototype.addFrequentlyBoughtTogether=function(t){return this._recommendChange({state:this.recommendState.addFrequentlyBoughtTogether(t)}),this};C.prototype.addRelatedProducts=function(t){return this._recommendChange({state:this.recommendState.addRelatedProducts(t)}),this};C.prototype.addTrendingItems=function(t){return this._recommendChange({state:this.recommendState.addTrendingItems(t)}),this};C.prototype.addTrendingFacets=function(t){return this._recommendChange({state:this.recommendState.addTrendingFacets(t)}),this};C.prototype.addLookingSimilar=function(t){return this._recommendChange({state:this.recommendState.addLookingSimilar(t)}),this};C.prototype.removeNumericRefinement=function(t,e,r){return this._change({state:this.state.resetPage().removeNumericRefinement(t,e,r),isPageReset:!0}),this};C.prototype.removeDisjunctiveFacetRefinement=function(t,e){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(t,e),isPageReset:!0}),this};C.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)};C.prototype.removeHierarchicalFacetRefinement=function(t){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(t),isPageReset:!0}),this};C.prototype.removeFacetRefinement=function(t,e){return this._change({state:this.state.resetPage().removeFacetRefinement(t,e),isPageReset:!0}),this};C.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)};C.prototype.removeFacetExclusion=function(t,e){return this._change({state:this.state.resetPage().removeExcludeRefinement(t,e),isPageReset:!0}),this};C.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)};C.prototype.removeTag=function(t){return this._change({state:this.state.resetPage().removeTagRefinement(t),isPageReset:!0}),this};C.prototype.removeFrequentlyBoughtTogether=function(t){return this._recommendChange({state:this.recommendState.removeParam
3s(t)}),this};C.prototype.removeRelatedProducts=function(t){return this._recommendChange({state:this.recommendState.removeParams(t)}),this};C.prototype.removeTrendingItems=function(t){return this._recommendChange({state:this.recommendState.removeParams(t)}),this};C.prototype.removeTrendingFacets=function(t){return this._recommendChange({state:this.recommendState.removeParams(t)}),this};C.prototype.removeLookingSimilar=function(t){return this._recommendChange({state:this.recommendState.removeParams(t)}),this};C.prototype.toggleFacetExclusion=function(t,e){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(t,e),isPageReset:!0}),this};C.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)};C.prototype.toggleRefinement=function(t,e){return this.toggleFacetRefinement(t,e)};C.prototype.toggleFacetRefinement=function(t,e){return this._change({state:this.state.resetPage().toggleFacetRefinement(t,e),isPageReset:!0}),this};C.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)};C.prototype.toggleTag=function(t){return this._change({state:this.state.resetPage().toggleTagRefinement(t),isPageReset:!0}),this};C.prototype.nextPage=function(){var t=this.state.page||0;return this.setPage(t+1)};C.prototype.previousPage=function(){var t=this.state.page||0;return this.setPage(t-1)};function Fa(t){if(t<0)throw new Error("Page requested below 0.");return this._change({state:this.state.setPage(t),isPageReset:!1}),this}C.prototype.setCurrentPage=Fa;C.prototype.setPage=Fa;C.prototype.setIndex=function(t){return this._change({state:this.state.resetPage().setIndex(t),isPageReset:!0}),this};C.prototype.setQueryParameter=function(t,e){return this._change({state:this.state.resetPage().setQueryParameter(t,e),isPageReset:!0}),this};C.prototype.setState=function(t){return this._change({state:Nn.make(t),isPageReset:!1}),this};C.prototype.overrideStateWithoutTriggeringChangeEvent=function(t){return this.state=new Nn(t),this};C.prototype.hasRefinements=function(t){return uc(this.state.getNumericRefinements(t))?!0:this.state.isConjunctiveFacet(t)?this.state.isFacetRefined(t):this.state.isDisjunctiveFacet(t)?this.state.isDisjunctiveFacetRefined(t):this.state.isHierarchicalFacet(t)?this.state.isHierarchicalFacetRefined(t):!1};C.prototype.isExcluded=function(t,e){return this.state.isExcludeRefined(t,e)};C.prototype.isDisjunctiveRefined=function(t,e){return this.state.isDisjunctiveFacetRefined(t,e)};C.prototype.hasTag=function(t){return this.state.isTagRefined(t)};C.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)};C.prototype.getIndex=function(){return this.state.index};function Ea(){return this.state.page}C.prototype.getCurrentPage=Ea;C.prototype.getPage=Ea;C.prototype.getTags=function(){return this.state.tagRefinements};C.prototype.getRefinements=function(t){var e=[];if(this.state.isConjunctiveFacet(t)){var r=this.state.getConjunctiveRefinements(t);r.forEach(function(s){e.push({value:s,type:"conjunctive"})});var n=this.state.getExcludeRefinements(t);n.forEach(function(s){e.push({value:s,type:"exclude"})})}else if(this.state.isDisjunctiveFacet(t)){var i=this.state.getDisjunctiveRefinements(t);i.forEach(function(s){e.push({value:s,type:"disjunctive"})})}var a=this.state.getNumericRefinements(t);return Object.keys(a).forEach(function(s){var o=a[s];e.push({value:o,operator:s,type:"numeric"})}),e};C.prototype.getNumericRefinement=function(t,e){return this.state.getNumericRefinement(t,e)};C.prototype.getHierarchicalFacetBreadcrumb=function(t){return this.state.getHierarchicalFacetBreadcrumb(t)};C.prototype._search=function(t){var e=this.state,r=[],n=[];t.onlyWithDerivedHelpers||(n=We._getQueries(e.index,e),r.push({state:e,queriesCount:n.length,helper:this}),this.emit("search",{state:e,results:this.lastResults}));var i=this.derivedHelpers.map(function(o){var c=o.getModifiedState(e),u=c.index?We._getQueries(c.index,c):[];return r.push({state:c,queriesCount:u.length,helper:o}),o.emit("search",{state:c,results:o.lastResults}),u}),a=Array.prototype.concat.apply(n,i),s=this._queryId++;if(this._currentNbQueries++,!a.length)return Promise.resolve({results:[]}
3).then(this._dispatchAlgoliaResponse.bind(this,r,s));try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,r,s)).catch(this._dispatchAlgoliaError.bind(this,s))}catch(o){this.emit("error",{error:o})}};C.prototype._runComposition=function(){var t=this.state,e=[],r=[],n=this.derivedHelpers.map(function(o){var c=o.getModifiedState(t),u=We._getCompositionQueries(c);return e.push({state:c,helper:o}),o.emit("search",{state:c,results:o.lastResults}),u}),i=Array.prototype.concat.apply(r,n),a=this._queryId++;if(this._currentNbQueries++,!i.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,e,a));if(i.length>1)throw new Error("Only one query is allowed when using a composition.");var s=i[0];try{this.client.search(s).then(this._dispatchAlgoliaResponse.bind(this,e,a)).catch(this._dispatchAlgoliaError.bind(this,a))}catch(o){this.emit("error",{error:o})}};C.prototype._recommend=function(){var t=this.state,e=this.recommendState,r=this.getIndex(),n=[{state:e,index:r,helper:this}],i=e.params.map(function(u){return u.$$id});this.emit("fetch",{recommend:{state:e,results:this.lastRecommendResults}});var a=this._recommendCache,s=this.derivedHelpers.map(function(u){var l=u.getModifiedState(t).index;if(!l)return[];var d=u.getModifiedRecommendState(new _a);return n.push({state:d,index:l,helper:u}),i=Array.prototype.concat.apply(i,d.params.map(function(h){return h.$$id})),u.emit("fetch",{recommend:{state:d,results:u.lastRecommendResults}}),d._buildQueries(l,a)}),o=Array.prototype.concat.apply(this.recommendState._buildQueries(r,a),s);if(o.length!==0){if(o.length>0&&typeof this.client.getRecommendations=="undefined"){console.warn("Please update algoliasearch/lite to the latest version in order to use recommend widgets.");return}var c=this._recommendQueryId++;this._currentNbRecommendQueries++;try{this.client.getRecommendations(o).then(this._dispatchRecommendResponse.bind(this,c,n,i)).catch(this._dispatchRecommendError.bind(this,c))}catch(u){this.emit("error",{error:u})}}};C.prototype._dispatchAlgoliaResponse=function(t,e,r){var n=this;if(!(e<this._lastQueryIdReceived)){this._currentNbQueries-=e-this._lastQueryIdReceived,this._lastQueryIdReceived=e,this._currentNbQueries===0&&this.emit("searchQueueEmpty");var i=r.results.slice(),a=Object.keys(r).reduce(function(s,o){return o!=="results"&&(s[o]=r[o]),s},{});Object.keys(a).length<=0&&(a=void 0),t.forEach(function(s){var o=s.state,c=s.queriesCount,u=s.helper,l=c!==void 0?i.splice(0,c):i;if(!o.index){u.emit("result",{results:null,state:o});return}if(l.length>0&&l[0].feedID){var d=l.map(function(h){var f=new wt(o,[h],n._searchResultsOptions);return a!==void 0&&(f._rawContent=a),f});u.lastResults=new wt(o,[l[0]],n._searchResultsOptions),u.lastResults.feeds=d,a!==void 0&&(u.lastResults._rawContent=a)}else u.lastResults=new wt(o,l,n._searchResultsOptions),a!==void 0&&(u.lastResults._rawContent=a);u.emit("result",{results:u.lastResults,state:o})})}};C.prototype._dispatchRecommendResponse=function(t,e,r,n){if(!(t<this._lastRecommendQueryIdReceived)){this._currentNbRecommendQueries-=t-this._lastRecommendQueryIdReceived,this._lastRecommendQueryIdReceived=t,this._currentNbRecommendQueries===0&&this.emit("recommendQueueEmpty");var i=this._recommendCache,a={};r.filter(function(o){return i[o]===void 0}).forEach(function(o,c){a[o]||(a[o]=[]),a[o].push(c)}),Object.keys(a).forEach(function(o){var c=a[o],u=n.results[c[0]];if(c.length===1){i[o]=u;return}i[o]=Object.assign({},u,{hits:hc(r,c.map(function(l){return n.results[l].hits}))})});var s={};r.forEach(function(o){s[o]=i[o]}),e.forEach(function(o){var c=o.state,u=o.helper;if(!o.index){u.emit("recommend:result",{results:null,state:c});return}u.lastRecommendResults=new fc(c,s),u.emit("recommend:result",{recommend:{results:u.lastRecommendResults,state:c}})})}};C.prototype._dispatchAlgoliaError=function(t,e){t<this._lastQueryIdReceived||(this._currentNbQueries-=t-this._lastQueryIdReceived,this._lastQueryIdReceived=t,this.emit("error",{error:e}),this._currentNbQueries===0&&this.emit("searchQueueEmpty"))};C.prototype._dispatchRecommendError=function(t,e){t<this._lastRecommendQueryId
3Received||(this._currentNbRecommendQueries-=t-this._lastRecommendQueryIdReceived,this._lastRecommendQueryIdReceived=t,this.emit("error",{error:e}),this._currentNbRecommendQueries===0&&this.emit("recommendQueueEmpty"))};C.prototype.containsRefinement=function(t,e,r,n){return t||e.length!==0||r.length!==0||n.length!==0};C.prototype._hasDisjunctiveRefinements=function(t){return this.state.disjunctiveRefinements[t]&&this.state.disjunctiveRefinements[t].length>0};C.prototype._change=function(t){var e=t.state,r=t.isPageReset;e!==this.state&&(this.state=e,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))};C.prototype._recommendChange=function(t){var e=t.state;e!==this.recommendState&&(this.recommendState=e,this.emit("recommend:change",{search:{results:this.lastResults,state:this.state},recommend:{results:this.lastRecommendResults,state:this.recommendState}}))};C.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this};C.prototype.setClient=function(t){return this.client===t?this:(typeof t.addAlgoliaAgent=="function"&&t.addAlgoliaAgent("JS Helper ("+Pa+")"),this.client=t,this)};C.prototype.getClient=function(){return this.client};C.prototype.derive=function(t,e){var r=new sc(this,t,e);return this.derivedHelpers.push(r),r};C.prototype.detachDerivedHelper=function(t){var e=this.derivedHelpers.indexOf(t);if(e===-1)throw new Error("Derived helper already detached");this.derivedHelpers.splice(e,1)};C.prototype.hasPendingRequests=function(){return this._currentNbQueries>0};var dc=C,Ia=dc,mc=oa,gc=ca,pc=fa,vc=Sa;function Je(t,e,r,n){return new Ia(t,e,r,n)}Je.version=ba;Je.AlgoliaSearchHelper=Ia;Je.SearchParameters=pc;Je.RecommendParameters=mc;Je.SearchResults=vc;Je.RecommendResults=gc;var yc=Je;const ae=fr(yc);function Ae(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r]}function Jn(t,e){for(var r,n=0;n<t.length;n++)if(r=t[n],e(r,n,t))return r}function Yn(t){if(t.appId&&t.apiKey)return[t.appId,t.apiKey];if(t.transporter){var e=t.transporter,r=e.headers||e.baseHeaders,n=e.queryParameters||e.baseQueryParameters,i="x-algolia-application-id",a="x-algolia-api-key",s=r[i]||n[i],o=r[a]||n[a];return[s,o]}else return[t.applicationID,t.apiKey]}function Rc(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=Math.random()*16|0,r=t==="x"?e:e&3|8;return r.toString(16)})}var xa="2.17.2",Sc="https://cdn.jsdelivr.net/npm/search-insights@".concat(xa,"/dist/search-insights.min.js");function Zn(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.insightsClient,r=t.insightsInitParams,n=t.onEvent,i=t.$$internal,a=i===void 0?!1:i,s=t.$$automatic,o=s===void 0?!1:s,c=e;!e&&e!==null&&Fe(function(l){var d=l.window,h=d.AlgoliaAnalyticsObject||"aa";typeof h=="string"&&(c=d[h]),c||(d.AlgoliaAnalyticsObject=h,d[h]||(d[h]=function(){for(var f=arguments.length,m=new Array(f),g=0;g<f;g++)m[g]=arguments[g];d[h].queue||(d[h].queue=[]),d[h].queue.push(m)},d[h].version=xa,d[h].shouldAddScript=!0),c=d[h])});var u=c||Ae;return function(l){var d=l.instantSearchInstance,h,f=d.middleware.filter(function(b){return b.instance.$$type==="ais.insights"&&b.instance.$$internal}).map(function(b){return b.creator});(h=d).unuse.apply(h,ge(f));var m=se(Yn(d.client),2),g=m[0],v=m[1],p=void 0,S=void 0,y=void 0,w=u.queue;if(Array.isArray(w)){var _;_=se(["setUserToken","init"].map(function(b){var R=se(Jn(w.slice().reverse(),function(N){var L=se(N,1),H=L[0];return H===b})||[],2),F=R[1];return F}),2),S=_[0],p=_[1]}u("getUserToken",null,function(b,R){y=ei(R)}),(r||!Xn(u))&&u("init",P({appId:g,apiKey:v,partial:!0},r));var I,O;return{$$type:"ais.insights",$$internal:a,$$automatic:o,onStateChange:function(){},subscribe:function(){if(u.shouldAddScript){var R="[insights middleware]: could not load search-insights.js. Please load it manually following https://alg.li/insights-init";try{var F=document.createElement("script");F.async=!0,F.src=Sc,F.onerror=function(){d.emit("error",new Error(R))},document.body.appendChild(F),u.shouldAddScript=!1}catch(N){u.shouldAddScript=!1,d.emit("error",new Error(R))}}},started:function(){u("addAlgoliaAgent","insights-middleware"),O=d.mainHelper;var R=u.queue;if(Array.isArray(R)){var F;F=se(["setUserToken","init"].map(function($){var q=se(Jn(R.slice().reverse(),function(V){var Y=se(V,1),Z=Y[0];return Z===$})||[],2),z=q[1];return z}),2),S=F[0],p=F[1]}I=bc(d),o||O.overrideStateWithoutTriggeringChangeEvent(E(P({},O.state),{clickAnalytics:!0})),a||d.scheduleSearch();var N=function(q){var z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,V=ei(q);if(!V)return;var Y=O.state.userToken;function Z(){O.overrideStateWithoutTriggeringChangeEvent(E(P({},O.state),{userToken:V})),Y&&Y!==q&&d.scheduleSearch()}z?Z():setTimeout(Z,0)};function L($){N($,!0),u("setUserToken",$)}var H=void 0,Q=na();if(Q)H=Q;else{var M="anonymous-".concat(Rc());H=M}var k,U=I.userToken;r!=null&&r.userToken&&(k=r.userToken),k?L(k):U?L(U):y?L(y):S?L(S):H&&(L(H),(r!=null&&r.useCookie||p!=null&&p.useCookie)&&wc(H,(r==null?void 0:r.cookieDuration)||(p==null?void 0:p.cookieDuration))),u("onUserTokenChange",function($){return N($,!0)},{immediate:!0});var j=u;Xn(u)&&(j=function(q,z){var V=se(Yn(d.client),2),Y=V[0],Z=V[1],he={headers:{"X-Algolia-Application-Id":Y,"X-Algolia-API-Key":Z}};return u(q,z,he)});var D=new Set,W;d.mainHelper.derivedHelpers[0].on("result",function($){var q=$.results;q&&(!q.queryID||q.queryID!==W)&&(W=q.queryID,D.clear())}),d.sendEventToInsights=function($){if(n)n($,j);else if($.insightsMethod){if($.insightsMethod==="viewedObjectIDs"){var q=$.payload,z=q.objectIDs.filter(function(V){return!D.has(V)});if(z.length===0)return;z.forEach(function(V){return D.add(V)}),q.objectIDs=z}$.payload.algoliaSource=["instantsearch"],o&&$.payload.algoliaSource.pu
3sh("instantsearch-automatic"),$.eventModifier==="internal"&&$.payload.algoliaSource.push("instantsearch-internal"),j($.insightsMethod,$.payload)}}},unsubscribe:function(){u("onUserTokenChange",void 0),d.sendEventToInsights=Ae,O&&I&&(O.overrideStateWithoutTriggeringChangeEvent(P({},O.state,I)),d.scheduleSearch())}}}}function bc(t){var e,r,n=((r=t._initialResults)===null||r===void 0||(e=r[t.indexName])===null||e===void 0?void 0:e.state)||{},i=t.mainHelper.state;return{userToken:n.userToken||i.userToken,clickAnalytics:n.clickAnalytics||i.clickAnalytics}}function wc(t,e){var r=2592e6,n=new Date;n.setTime(n.getTime()+(e||r*6));var i="expires=".concat(n.toUTCString());document.cookie="_ALGOLIA=".concat(t,";").concat(i,";path=/")}function Xn(t){var e=se((t.version||"").split(".").map(Number),2),r=e[0],n=e[1],i=r>=3,a=r===2&&n>=6,s=r===1&&n>=10;return i||a||s}function ei(t){if(t)return typeof t=="number"?t.toString():t}var _c=["ais.index","ais.feedContainer"];function ve(t){return _c.includes(t.$$type)}function Pc(t){var e=t;return e.transporter&&e.transporter.userAgent?e.transporter.userAgent.value:e._ua}function Rt(t,e,r){var n=e.getHelper();return{uiState:r,helper:n,parent:e,instantSearchInstance:t,state:n.state,renderState:t.renderState,templatesConfig:t.templatesConfig,createURL:e.createURL,scopedResults:[],searchMetadata:{isSearchStalled:t.status==="stalled"},status:t.status,error:t.error}}function ti(t,e,r){var n=e.getResultsForWidget(r),i=e.getHelper();return{helper:i,parent:e,instantSearchInstance:t,results:n,scopedResults:e.getScopedResults(),state:n&&"_state"in n?n._state:i.state,renderState:t.renderState,templatesConfig:t.templatesConfig,createURL:e.createURL,searchMetadata:{isSearchStalled:t.status==="stalled"},status:t.status,error:t.error}}function Nr(t){var e=t.renderState,r=t.instantSearchInstance,n=t.parent,i=n?n.getIndexId():r.mainIndex.getIndexId();r.renderState=E(P({},r.renderState),T({},i,P({},r.renderState[i],e)))}function Ta(t,e,r){var n=Rt(e,e.mainIndex,e._initialUiState);t.forEach(function(i){var a={};if(i.getWidgetRenderState){var s=i.getWidgetRenderState(n);s&&s.widgetParams&&(a=s.widgetParams)}var o=Object.keys(a).filter(function(c){return a[c]!==void 0});r.widgets.push({type:i.$$type,widgetType:i.$$widgetType,params:o}),ve(i)&&Ta(i.getWidgets(),e,r)})}function Fc(){return Fe(function(t){var e=t.window,r,n;return((n=e.navigator)===null||n===void 0||(r=n.userAgent)===null||r===void 0?void 0:r.indexOf("Algolia Crawler"))>-1},{fallback:function(){return!1}})}function Ec(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.$$internal,r=e===void 0?!1:e;return function(n){var i=n.instantSearchInstance,a={widgets:[]},s=document.createElement("meta"),o=document.querySelector("head");return s.name="instantsearch:widgets",{$$type:"ais.metadata",$$internal:r,onStateChange:function(){},subscribe:function(){setTimeout(function(){a.ua=Pc(i.client),Ta(i.mainIndex.getWidgets(),i,a),i.middleware.forEach(function(u){return a.widgets.push({middleware:!0,type:u.instance.$$type,internal:u.instance.$$internal})}),s.content=JSON.stringify(a),o.appendChild(s)},0)},started:function(){},unsubscribe:function(){s.remove()}}}}var ut=TypeError;const Ic={},xc=Object.freeze(Object.defineProperty({__proto__:null,default:Ic},Symbol.toStringTag,{value:"Module"})),Tc=Ps(xc);var On=typeof Map=="function"&&Map.prototype,Or=Object.getOwnPropertyDescriptor&&On?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ir=On&&Or&&typeof Or.get=="function"?Or.get:null,ri=On&&Map.prototype.forEach,$n=typeof Set=="function"&&Set.prototype,$r=Object.getOwnPropertyDescriptor&&$n?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ar=$n&&$r&&typeof $r.get=="function"?$r.get:null,ni=$n&&Set.prototype.forEach,Cc=typeof WeakMap=="function"&&WeakMap.prototype,_t=Cc?WeakMap.prototype.has:null,Ac=typeof WeakSet=="function"&&WeakSet.prototype,Pt=Ac?WeakSet.prototype.has:null,Nc=typeof WeakRef=="function"&&WeakRef.prototype,ii=Nc?WeakRef.prototype.deref:null,Oc=Boolean.prototype.valueOf,$c=Object.prototype.toString,jc=Function.prototype.toString,Hc=String.prototype.match,jn=String.prototype.slice,Me=String.prototype.replace,Lc=String.prototype.toUpperCase,ai=String.prototype.toLowerCase,Ca=RegExp.prototype.test,si=Array.prototype.concat,Pe=Array.prototype.join,Mc=Array.prototype.slice,oi=Math.floor,gn=typeof BigInt=="function"?BigInt.prototype.valueOf:null,jr=Object.getOwnPropertySymbols,pn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,it=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Ft=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===it||!0)?Symbol.toStringTag:null,Aa=Object.prototype.propertyIsEnumerable,ci=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function ui(t,e){if(t===1/0||t===-1/0||t!==t||t&&t>-1e3&&t<1e3||Ca.call(/e/,e))return e;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof t=="number"){var n=t<0?-oi(-t):oi(t);if(n!==t){var i=String(n),a=jn.call(e,i.length+1);return Me.call(i,r,"$&_")+"."+Me.call(Me.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Me.call(e,r,"$&_")}var vn=Tc,li=vn.custom,fi=$a(li)?li:null,Na={__proto__:null,double:'"',single:"'"},Dc={__proto__:null,double:/(["\\])/g,single:/(['\\])/g},gr=function t(e,r,n,i){var a=r||{};if(Ne(a,"quoteStyle")&&!Ne(Na,a.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Ne(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var s=Ne(a,"customInspect")?a.customInspect:!0;if(typeof s!="boolean"&&s!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
vendor: 10,876 bytes, lines 3-6
3if(Ne(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Ne(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var o=a.numericSeparator;if(typeof e=="undefined")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Ha(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var c=String(e);return o?ui(e,c):c}if(typeof e=="bigint"){var u=String(e)+"n";return o?ui(e,u):u}var l=typeof a.depth=="undefined"?5:a.depth;if(typeof n=="undefined"&&(n=0),n>=l&&l>0&&typeof e=="object")return yn(e)?"[Array]":"[Object]";var d=nu(a,n);if(typeof i=="undefined")i=[];else if(ja(i,e)>=0)return"[Circular]";function h(H,Q,M){if(Q&&(i=Mc.call(i),i.push(Q)),M){var k={depth:a.depth};return Ne(a,"quoteStyle")&&(k.quoteStyle=a.quoteStyle),t(H,k,n+1,i)}return t(H,a,n+1,i)}if(typeof e=="function"&&!hi(e)){var f=zc(e),m=Qt(e,h);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(m.length>0?" { "+Pe.call(m,", ")+" }":"")}if($a(e)){var g=it?Me.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):pn.call(e);return typeof e=="object"&&!it?ht(g):g}if(eu(e)){for(var v="<"+ai.call(String(e.nodeName)),p=e.attributes||[],S=0;S<p.length;S++)v+=" "+p[S].name+"="+Oa(Wc(p[S].value),"double",a);return v+=">",e.childNodes&&e.childNodes.length&&(v+="..."),v+="</"+ai.call(String(e.nodeName))+">",v}if(yn(e)){if(e.length===0)return"[]";var y=Qt(e,h);return d&&!ru(y)?"["+Rn(y,d)+"]":"[ "+Pe.call(y,", ")+" ]"}if(kc(e)){var w=Qt(e,h);return!("cause"in Error.prototype)&&"cause"in e&&!Aa.call(e,"cause")?"{ ["+String(e)+"] "+Pe.call(si.call("[cause]: "+h(e.cause),w),", ")+" }":w.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Pe.call(w,", ")+" }"}if(typeof e=="object"&&s){if(fi&&typeof e[fi]=="function"&&vn)return vn(e,{depth:l-n});if(s!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Gc(e)){var _=[];return ri&&ri.call(e,function(H,Q){_.push(h(Q,e,!0)+" => "+h(H,e))}),di("Map",ir.call(e),_,d)}if(Zc(e)){var I=[];return ni&&ni.call(e,function(H){I.push(h(H,e))}),di("Set",ar.call(e),I,d)}if(Jc(e))return Hr("WeakMap");if(Xc(e))return Hr("WeakSet");if(Yc(e))return Hr("WeakRef");if(Qc(e))return ht(h(Number(e)));if(Vc(e))return ht(h(gn.call(e)));if(qc(e))return ht(Oc.call(e));if(Bc(e))return ht(h(String(e)));if(typeof window!="undefined"&&e===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&e===globalThis||typeof Un!="undefined"&&e===Un)return"{ [object globalThis] }";if(!Uc(e)&&!hi(e)){var O=Qt(e,h),b=ci?ci(e)===Object.prototype:e instanceof Object||e.constructor===Object,R=e instanceof Object?"":"null prototype",F=!b&&Ft&&Object(e)===e&&Ft in e?jn.call(Ue(e),8,-1):R?"Object":"",N=b||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",L=N+(F||R?"["+Pe.call(si.call([],F||[],R||[]),": ")+"] ":"");return O.length===0?L+"{}":d?L+"{"+Rn(O,d)+"}":L+"{ "+Pe.call(O,", ")+" }"}return String(e)};function Oa(t,e,r){var n=r.quoteStyle||e,i=Na[n];return i+t+i}function Wc(t){return Me.call(String(t),/"/g,""")}function Ye(t){return!Ft||!(typeof t=="object"&&(Ft in t||typeof t[Ft]!="undefined"))}function yn(t){return Ue(t)==="[object Array]"&&Ye(t)}function Uc(t){return Ue(t)==="[object Date]"&&Ye(t)}function hi(t){return Ue(t)==="[object RegExp]"&&Ye(t)}function kc(t){return Ue(t)==="[object Error]"&&Ye(t)}function Bc(t){return Ue(t)==="[object String]"&&Ye(t)}function Qc(t){return Ue(t)==="[object Number]"&&Ye(t)}function qc(t){return Ue(t)==="[object Boolean]"&&Ye(t)}function $a(t){if(it)return t&&typeof t=="object"&&t instanceof Symbol;if(typeof t=="symbol")return!0;if(!t||typeof t!="object"||!pn)return!1;try{return pn.call(t),!0}catch(e){}return!1}function Vc(t){if(!t||typeof t!="object"||!gn)return!1;try{return gn.call(t),!0}catch(e){}return!1}var Kc=Object.prototype.hasOwnProperty||function(t){return t in this};function Ne(t,e){return Kc.call(t,e)}function Ue(t){return $c.call(t)}function zc(t){if(t.name)return t.name;var e=Hc.call(jc.call(t),/^function\s*([\w$]+)/);return e?e[1]:null}function ja(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}function Gc(t){if(!ir||!t||typeof t!="object")return!1;try{ir.call(t);try{ar.call(t)}catch(e){return!0}return t instanceof Map}catch(e){}return!1}function Jc(t){if(!_t||!t||typeof t!="object")return!1;try{_t.call(t,_t);try{Pt.call(t,Pt)}catch(e){return!0}return t instanceof WeakMap}catch(e){}return!1}function Yc(t){if(!ii||!t||typeof t!="object")return!1;try{return ii.call(t),!0}catch(e){}return!1}function Zc(t){if(!ar||!t||typeof t!="object")return!1;try{ar.call(t);try{ir.call(t)}catch(e){return!0}return t instanceof Set}catch(e){}return!1}function Xc(t){if(!Pt||!t||typeof t!="object")return!1;try{Pt.call(t,Pt);try{_t.call(t,_t)}catch(e){return!0}return t instanceof WeakSet}catch(e){}return!1}function eu(t){return!t||typeof t!="object"?!1:typeof HTMLElement!="undefined"&&t instanceof HTMLElement?!0:typeof t.nodeName=="string"&&typeof t.getAttribute=="function"}function Ha(t,e){if(t.length>e.maxStringLength){var r=t.length-e.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Ha(jn.call(t,0,e.maxStringLength),e)+n}var i=Dc[e.quoteStyle||"single"];i.lastIndex=0;var a=Me.call(Me.call(t,i,"\\$1"),/[\x00-\x1f]/g,tu);return Oa(a,"single",e)}function tu(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+Lc.call(e.toString(16))}function ht(t){return"Object("+t+")"}function Hr(t){return t+" { ? }"}function di(t,e,r,n){var i=n?Rn(r,n):Pe.call(r,", ");return t+" ("+e+") {"+i+"}"}function ru(t){for(var e=0;e<t.length;e++)if(ja(t[e],` 4`)>=0)return!1;return!0}function nu(t,e){var r;if(t.indent===" ")r=" ";else if(typeof t.indent=="number"&&t.indent>0)r=Pe.call(Array(t.indent+1)," ");else return null;return{base:r,prev:Pe.call(Array(e+1),r)}}function Rn(t,e){if(t.length===0)return"";var r=` 5`+e.prev+e.base;return r+Pe.call(t,","+r)+` 6`+e.prev}function Qt(t,e){var r=yn(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=Ne(t,i)?e(t[i],t):""}var a=typeof jr=="function"?jr(t):[],s;if(it){s={};for(var o=0;o<a.length;o++)s["$"+a[o]]=a[o]}for(var c in t)Ne(t,c)&&(r&&String(Number(c))===c&&c<t.length||it&&s["$"+c]instanceof Symbol||(Ca.call(/[^\w$]/,c)?n.push(e(c,t)+": "+e(t[c],t)):n.push(c+": "+e(t[c],t))));if(typeof jr=="function")for(var u=0;u<a.length;u++)Aa.call(t,a[u])&&n.push("["+e(a[u])+"]: "+e(t[a[u]],t));return n}var iu=gr,au=ut,pr=function(t,e,r){for(var n=t,i;(i=n.next)!=null;n=i)if(i.key===e)return n.next=i.next,r||(i.next=t.next,t.next=i),i},su=function(t,e){if(t){var r=pr(t,e);return r&&r.value}},ou=function(t,e,r){var n=pr(t,e);n?n.value=r:t.next={key:e,next:t.next,value:r}},cu=function(t,e){return t?!!pr(t,e):!1},uu=function(t,e){if(t)return pr(t,e,!0)},lu=function(){var e,r={assert:function(n){if(!r.has(n))throw new au("Side channel does not contain "+iu(n))},delete:function(n){var i=uu(e,n);return i&&e&&!e.next&&(e=void 0),!!i},get:function(n){return su(e,n)},has:function(n){return cu(e,n)},set:function(n,i){e||(e={next:void 0}),ou(e,n,i)}};return r},La=Object,fu=Error,hu=EvalError,du=RangeError,mu=ReferenceError,gu=SyntaxError,pu=URIError,vu=Math.abs,yu=Math.floor,Ru=Math.max,Su=Math.min,bu=Math.pow,wu=Math.round,_u=Number.isNaN||function(e){return e!==e},Pu=_u,Fu=function(e){return Pu(e)||e===0?e:e<0?-1:1},Eu=Object.getOwnPropertyDescriptor,Gt=Eu;if(Gt)try{Gt([],"length")}catch(t){Gt=null}var Ma=Gt,Jt=Object.defineProperty||!1;if(Jt)try{Jt({},"a",{value:1})}catch(t){Jt=!1}var Da=Jt,Lr,mi;function Iu(){return mi||(mi=1,Lr=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[r]=i;for(var a in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,r);if(o.value!==i||o.enumerable!==!0)return!1}return!0}),Lr}var Mr,gi;function xu(){if(gi)return Mr;gi=1;var t=typeof Symbol!="undefined"&&Symbol,e=Iu();return Mr=function(){return typeof t!="function"||typeof Symbol!="function"||typeof t("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},Mr}var Dr,pi;function Wa(){return pi||(pi=1,Dr=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null),Dr}var Wr,vi;function Ua(){if(vi)return Wr;vi=1;var t=La;return Wr=t.getPrototypeOf||null,Wr}var Ur,yi;function Tu(){if(yi)return Ur;yi=1;var t="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,r=Math.max,n="[object Function]",i=function(c,u){for(var l=[],d=0;d<c.length;d+=1)l[d]=c[d];for(var h=0;h<u.length;h+=1)l[h+c.length]=u[h];return l},a=function(c,u){for(var l=[],d=u,h=0;d<c.length;d+=1,h+=1)l[h]=c[d];return l},s=function(o,c){for(var u="",l=0;l<o.length;l+=1)u+=o[l],l+1<o.length&&(u+=c);return u};return Ur=function(c){var u=this;if(typeof u!="function"||e.apply(u)!==n)throw new TypeError(t+u);for(var l=a(arguments,1),d,h=function(){if(this instanceof d){var p=u.apply(this,i(l,arguments));return Object(p)===p?p:this}return u.apply(c,i(l,arguments))},f=r(0,u.length-l.length),m=[],g=0;g<f;g++)m[g]="$"+g;if(d=Function("binder","return function ("+s(m,",")+"){ return binder.apply(this,arguments); }")(h),u.prototype){var v=function(){};v.prototype=u.prototype,d.prototype=new v,v.prototype=null}return d},Ur}var kr,Ri;function vr(){if(Ri)return kr;Ri=1;var t=Tu();return kr=Function.prototype.bind||t,kr}var Br,Si;function Hn(){return Si||(Si=1,Br=Function.prototype.call),Br}var Qr,bi;function ka(){return bi||(bi=1,Qr=Function.prototype.apply),Qr}var Cu=typeof Reflect!="undefined"&&Reflect&&Reflect.apply,Au=vr(),Nu=ka(),Ou=Hn(),$u=Cu,ju=$u||Au.call(Ou,Nu),Hu=vr(),Lu=ut,Mu=Hn(),Du=ju,Ba=function(e){if(e.length<1||typeof e[0]!="function")throw new Lu("a function is required");return Du(Hu,Mu,e)},qr,wi;function Wu(){if(wi)return qr;wi=1;var t=Ba,e=Ma,r;try{r=[].__proto__===Array.prototype}catch(s){if(!s||typeof s!="object"||!("code"in s)||s.code!=="ERR_PROTO_ACCESS")throw s}var n=!!r&&e&&e(Object.prototype,"__proto__"),i=Object,a=i.getPrototypeOf;return qr=n&&typeof n.get=="function"?t([n.get]):typeof a=="function"?function(o){return a(o==null?o:i(o))}:!1,qr}var Vr,_i;
6function Uu(){if(_i)return Vr;_i=1;var t=Wa(),e=Ua(),r=Wu();return Vr=t?function(i){return t(i)}:e?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return e(i)}:r?function(i){return r(i)}:null,Vr}var Kr,Pi;function ku(){if(Pi)return Kr;Pi=1;var t=Function.prototype.call,e=Object.prototype.hasOwnProperty,r=vr();return Kr=r.call(t,e),Kr}var B,Bu=La,Qu=fu,qu=hu,Vu=du,Ku=mu,at=gu,nt=ut,zu=pu,Gu=vu,Ju=yu,Yu=Ru,Zu=Su,Xu=bu,el=wu,tl=Fu,Qa=Function,zr=function(t){try{return Qa('"use strict"; return ('+t+").constructor;")()}catch(e){}},Tt=Ma,rl=Da,Gr=function(){throw new nt},nl=Tt?function(){try{return arguments.callee,Gr}catch(t){try{return Tt(arguments,"callee").get}catch(e){return Gr}}}():Gr,Ze=xu()(),re=Uu(),il=Ua(),al=Wa(),qa=ka(),Lt=Hn(),tt={},sl=typeof Uint8Array=="undefined"||!re?B:re(Uint8Array),Ke={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?B:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?B:ArrayBuffer,"%ArrayIteratorPrototype%":Ze&&re?re([][Symbol.iterator]()):B,"%AsyncFromSyncIteratorPrototype%":B,"%AsyncFunction%":tt,"%AsyncGenerator%":tt,"%AsyncGeneratorFunction%":tt,"%AsyncIteratorPrototype%":tt,"%Atomics%":typeof Atomics=="undefined"?B:Atomics,"%BigInt%":typeof BigInt=="undefined"?B:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?B:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?B:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?B:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Qu,"%eval%":eval,"%EvalError%":qu,"%Float16Array%":typeof Float16Array=="undefined"?B:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?B:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?B:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?B:FinalizationRegistry,"%Function%":Qa,"%GeneratorFunction%":tt,"%Int8Array%":typeof Int8Array=="undefined"?B:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?B:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?B:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%
6IteratorPrototype%":Ze&&re?re(re([][Symbol.iterator]())):B,"%JSON%":typeof JSON=="object"?JSON:B,"%Map%":typeof Map=="undefined"?B:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Ze||!re?B:re(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Bu,"%Object.getOwnPropertyDescriptor%":Tt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?B:Promise,"%Proxy%":typeof Proxy=="undefined"?B:Proxy,"%RangeError%":Vu,"%ReferenceError%":Ku,"%Reflect%":typeof Reflect=="undefined"?B:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?B:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Ze||!re?B:re(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?B:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ze&&re?re(""[Symbol.iterator]()):B,"%Symbol%":Ze?Symbol:B,"%SyntaxError%":at,"%ThrowTypeError%":nl,"%TypedArray%":sl,"%TypeError%":nt,"%Uint8Array%":typeof Uint8Array=="undefined"?B:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?B:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?B:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?B:Uint32Array,"%URIError%":zu,"%WeakMap%":typeof WeakMap=="undefined"?B:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?B:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?B:WeakSet,"%Function.prototype.call%":Lt,"%Function.prototype.apply%":qa,"%Object.defineProperty%":rl,"%Object.getPrototypeOf%":il,"%Math.abs%":Gu,"%Math.floor%":Ju,"%Math.max%":Yu,"%Math.min%":Zu,"%Math.pow%":Xu,"%Math.round%":el,"%Math.sign%":tl,"%Reflect.getPrototypeOf%":al};if(re)try{null.error}catch(t){var ol=re(re(t));Ke["%Error.prototype%"]=ol}var cl=function t(e){var r;if(e==="%AsyncFunction%")r=zr("async function () {}");else if(e==="%GeneratorFunction%")r=zr("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=zr("async function* () {}");else if(e==="%AsyncGenerator%"){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var i=t("%AsyncGenerator%");i&&re&&(r=re(i.prototype))}return Ke[e]=r,r},Fi={__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"]},Mt=vr(),sr=ku(),ul=Mt.call(Lt,Array.prototype.concat),ll=Mt.call(qa,Array.prototype.splice),Ei=Mt.call(Lt,String.prototype.replace),or=Mt.call(Lt,String.prototype.slice),fl=Mt.call(Lt,RegExp.prototype.exec),hl=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,dl=/\\(\\)?/g,ml=function(e){var r=or(e,0,1
vendor: 2,232 bytes, line 6
6),n=or(e,-1);if(r==="%"&&n!=="%")throw new at("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new at("invalid intrinsic syntax, expected opening `%`");var i=[];return Ei(e,hl,function(a,s,o,c){i[i.length]=o?Ei(c,dl,"$1"):s||a}),i},gl=function(e,r){var n=e,i;if(sr(Fi,n)&&(i=Fi[n],n="%"+i[0]+"%"),sr(Ke,n)){var a=Ke[n];if(a===tt&&(a=cl(n)),typeof a=="undefined"&&!r)throw new nt("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:i,name:n,value:a}}throw new at("intrinsic "+e+" does not exist!")},Ln=function(e,r){if(typeof e!="string"||e.length===0)throw new nt("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new nt('"allowMissing" argument must be a boolean');if(fl(/^%?[^%]*%?$/,e)===null)throw new at("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ml(e),i=n.length>0?n[0]:"",a=gl("%"+i+"%",r),s=a.name,o=a.value,c=!1,u=a.alias;u&&(i=u[0],ll(n,ul([0,1],u)));for(var l=1,d=!0;l<n.length;l+=1){var h=n[l],f=or(h,0,1),m=or(h,-1);if((f==='"'||f==="'"||f==="`"||m==='"'||m==="'"||m==="`")&&f!==m)throw new at("property names with quotes must have matching quotes");if((h==="constructor"||!d)&&(c=!0),i+="."+h,s="%"+i+"%",sr(Ke,s))o=Ke[s];else if(o!=null){if(!(h in o)){if(!r)throw new nt("base intrinsic for "+e+" exists, but the property is not available.");return}if(Tt&&l+1>=n.length){var g=Tt(o,h);d=!!g,d&&"get"in g&&!("originalValue"in g.get)?o=g.get:o=o[h]}else d=sr(o,h),o=o[h];d&&!c&&(Ke[s]=o)}}return o},Va=Ln,Ka=Ba,pl=Ka([Va("%String.prototype.indexOf%")]),za=function(e,r){var n=Va(e,!!r);return typeof n=="function"&&pl(e,".prototype.")>-1?Ka([n]):n},vl=Ln,Dt=za,yl=gr,Rl=ut,Ii=vl("%Map%",!0),Sl=Dt("Map.prototype.get",!0),bl=Dt("Map.prototype.set",!0),wl=Dt("Map.prototype.has",!0),_l=Dt("Map.prototype.delete",!0),Pl=Dt("Map.prototype.size",!0),Ga=!!Ii&&function(){var e,r={assert:function(n){if(!r.has(n))throw new Rl("Side channel does not contain "+yl(n))},delete:function(n){if(e){var i=_l(e,n);return Pl(e)===0&&(e=void 0),i}return!1},get:function(n){if(e)return Sl(e,n)},has:function(n){return e?wl(e,n):!1},set:function(n,i){e||(e=new Ii),bl(e,n,i)}};return r}
6,Fl=Ln,yr=za,El=gr,qt=Ga,Il=ut,Xe=Fl("%WeakMap%",!0),xl=yr("WeakMap.prototype.get",!0),Tl=yr("WeakMap.prototype.set",!0),Cl=yr("WeakMap.prototype.has",!0),Al=yr("WeakMap.prototype.delete",!0),Nl=Xe?function(){var e,r,n={assert:function(i){if(!n.has(i))throw new Il("Side channel does not contain "+El(i))},delete:function(i){if(Xe&&i&&(typeof i=="object"||typeof i=="function")){if(e)return Al(e,i)}else if(qt&&r)return r.delete(i);return!1},get:function(i){return Xe&&i&&(typeof i=="object"||typeof i=="function")&&e?xl(e,i):r&&r.get(i)},has:function(i){return Xe&&i&&(typeof i=="object"||typeof i=="function")&&e?Cl(e,i):!!r&&r.has(i)},set:function(i,a){Xe&&i&&(typeof i=="object"||typeof i=="function")?(e||(e=new Xe),Tl(e,i,a)):qt&&(r||(r=qt()),r.set(i,a))}};return n}:qt,Ol=ut,$l=gr,jl=lu,Hl=Ga,Ll=Nl,Ml=Ll||Hl||jl,Ja=function(){var e,r={assert:function(n){if(!r.has(n)){var i=n&&Object(n)===n?"the given object key":$l(n);throw new Ol("Side channel does not contain "+i)}},delete:function(n){return!!e&&e.delete(n)},get:function(n){return e&&e.get(n)},has:function(n){return!!e&&e.has(n)},set:function(n,i){e||(e=Ml()),e.set(n,i)}};return r},Dl=String.prototype.replace,Wl=/%20/g,Jr={RFC1738:"RFC1738",RFC3986:"RFC3986"},Mn={default:Jr.RFC3986,formatters:{RFC1738:function(t){return Dl.call(t,Wl,"+")},RFC3986:function(t){return String(t)}},RFC1738:Jr.RFC1738,RFC3986:Jr.RFC3986},Ul=Mn,Ya=Ja,xi=Da,Yr=Object.prototype.hasOwnProperty,Qe=Array.isArray,Rr=Ya(),qe=function(e,r){return Rr.set(e,r),e},Ve=function(e){return Rr.has(e)},St=function(e){return Rr.get(e)},Sn=function(e,r){Rr.set(e,r)},we=function(){for(var t=[],e=0;e<256;++e)t[t.length]="%"+((e<16?"0":"")+e.toString(16)).toUpperCase();return t}(),kl=function(e){for(;e.length>1;){var r=e.pop(),n=r.obj[r.prop];if(Qe(n)){for(var i=[],a=0;a<n.length;++a)typeof n[a]!="undefined"&&(i[i.length]=n[a]);r.obj[r.prop]=i}}},rt=function(e,r){for(var n=r&&r.plainObjects?{__proto__:null}:{},i=0;i<e.length;++i)typeof e[i]!="undefined"&&(n[i]=e[i]);return n},bn=function(e,r,n){r==="__proto__"&&xi?xi(e,r,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[r]=n},Bl=function t(e,r,n){if(!r)return e;if(typeof r!="object"&&typeof r!="function"){if(Qe(e)){var i=e.length;if(n&&typeof n.arrayLimit=="number"&&i>=n.arrayLimit){if(n.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+n.arrayLimit+" element"+(n.arrayLimit===1?"":"s")+" allowed in an array.");return qe(rt(e.concat(r),n),i)}e[i]=r}else if(e&&typeof e=="object")if(Ve(e)){var a=St(e)+1;e[a]=r,Sn(e,a)}else{if(n&&n.strictMerge)return[e,r];(n&&(n.plainObjects||n.allowPrototypes)||!Yr.call(Object.prototype,r))&&(e[r]=!0)}else return[e,r];return e}if(!e||typeof e!="object"){if(Ve(r)){for(var s=Object.keys(r),o=n&&n.plainObjects?{__proto__:null,0:e}:{0:e},c=0;c<s.length;c++){var u=parseInt(s[c],10);o[u+1]=r[s[c]]}return qe(o,St(r)+1)}var l=[e].concat(r);if(n&&typeof n.arrayLimit=="number"&&l.length>n.arrayLimit){if(n.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+n.arrayLimit+" element"+(n.arrayLimit===1?"":"s")+" allowed in an array.");return qe(rt(l,n),l.length-1)}return l}var d=e;if(Qe(e)&&!Qe(r)&&(d=rt(e,n)),Qe(e)&&Qe(r)){if(r.forEach(function(h,f){if(Yr.call(e,f)){var m=e[f];m&&typeof m=="object"&&h&&typeof h=="object"?e[f]=t(m,h,n):e[e.length]=h}else e[f]=h}),n&&typeof n.arrayLimit=="number"&&e.length>n.arrayLimit){if(n.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+n.arrayLimit+" element"+(n.arrayLimit===1?"":"s")+" allowed in an array.");return qe(rt(e,n),e.length-1)}return e}return Object.keys(r).reduce(function(h,f){var m=r[f];if(Yr.call(h,f)?bn(h,f,t(h[f],m,n)):bn(h,f,m),Ve(r)&&!Ve(h)&&qe(h,St(r)),Ve(h)){var g=parseInt(f,10);String(g)===f&&g>=0&&g>St(h)&&Sn(h,g)}return h},d)},Ql=function(e,r){return Object.keys(r).reduce(function(n,i){return bn(n,i,r[i]),n},e)},ql=function(t,e,r){var n=t.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(i){return n}},Vt=1024,Vl=function(e,r,n,i,a){if(e.length===0)return e;var s=e;if(typeof e=="symbol"?s=Symbol.prototype.toString.call(e):typeof e!="string"&&(s=String(e)),n==="iso-8859-1")return escape(s).replace(/%u[0-9a-f]{4}/gi,function(m){return"%26%23"+parseInt(m.slice(2),16)+"%3B"});for(var o="",c=0;c<s.length;c+=Vt){var u=s.length>=Vt?s.slice(c,c+Vt):s;if(c+Vt<s.length){var l=u.charCodeAt(u.length-1);l>=55296&&l<=56319&&(u=u.slice(0,-1),c-=1)}for(var d=[],h=0;h<u.length;++h){var f=u.charCodeAt(h);if(f===45||f===46||f===95||f===126||f>=48&&f<=57||f>=65&&f<=90||f>=97&&f<=122||a===Ul.RFC1738&&(f===40||f===41)){d[d.length]=u.charAt(h);continue}if(f<128){d[d.length]=we[f];continue}if(f<2048){d[d.length]=we[192|f>>6]+we[128|f&63];continue}if(f<55296||f>=57344){d[d.length]=we[224|f>>12]+we[128|f>>6&63]+we[128|f&63];continue}h+=1,f=65536+((f&1023)<<10|u.charCodeAt(h)&1023),d[d.length]=we[240|f>>18]+we[128|f>>12&63]+we[128|f>>6&63]+we[128|f&63]}o+=d.join("")}return o},Kl=function(e){for(var r=[{obj:{o:e},prop:"o"}],n=Ya(),i=0;i<r.length;++i)for(var a=r[i],s=a.obj[a.prop],o=Object.keys(s),c=0;c<o.length;++c){var u=o[c],l=s[u];typeof l=="object"&&l!==null&&!n.has(l)&&(r[r.length]={obj:s,prop:u},n.set(l,!0))}return kl(r),e},zl=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},Gl=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},Jl=function(e,r,n,i,a){if(Ve(e)){if(a)throw new RangeError("Array limit exceeded. Only "+n+" element"+(n===1?"":"s")+" allowed in an array.");var s=St(e)+1;return e[s]=r,Sn(e,s),e}var o=[].concat(e,r);if(o.length>n){if(a)throw new RangeError("Array limit exceeded. Only "+n+" element"+(n===1?"":"s")+" allowed in an array.");return qe(rt(o,{plainObjects:i}),o.length-1)}return o},Yl=function(e,r){if(Qe(e)){for(var n=[],i=0;i<e.length;i+=1)n[n.length]=r(e[i]);return n}return r(e)},Za={arrayToObject:rt,assign:Ql,combine:Jl,compact:Kl,decode:ql,encode:Vl,isBuffer:Gl,isOverflow:Ve,isRegExp:zl,markOverflow:qe,maybeMap:Yl,merge:Bl},Xa=Ja,Yt=Za,Et=Mn,Zl=Object.prototype.hasOwnProperty,es={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,r){return e+"["+r+"]"},repeat:function(e){return e}},_e=Array.isArray,Xl=Array.prototype.push,ts=function(t,e){Xl.apply(t,_e(e)?e:[e])},ef=Date.prototype.toISOString,Ti=Et.default,X={addQueryPrefix:!1,allowDots:!1,allowEmptyArrays:!1,arrayFormat:"indices",charset
vendor: 11,736 bytes, line 6
6:"utf-8",charsetSentinel:!1,commaRoundTrip:!1,delimiter:"&",encode:!0,encodeDotInKeys:!1,encoder:Yt.encode,encodeValuesOnly:!1,filter:void 0,format:Ti,formatter:Et.formatters[Ti],indices:!1,serializeDate:function(e){return ef.call(e)},skipNulls:!1,strictNullHandling:!1},tf=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},Zr={},rf=function t(e,r,n,i,a,s,o,c,u,l,d,h,f,m,g,v,p,S){for(var y=e,w=S,_=0,I=!1;(w=w.get(Zr))!==void 0&&!I;){var O=w.get(e);if(_+=1,typeof O!="undefined"){if(O===_)throw new RangeError("Cyclic object value");I=!0}typeof w.get(Zr)=="undefined"&&(_=0)}if(typeof l=="function"?y=l(r,y):y instanceof Date?y=f(y):n==="comma"&&_e(y)&&(y=Yt.maybeMap(y,function(W){return W instanceof Date?f(W):W})),y===null){if(s)return g(u&&!v?u(r,X.encoder,p,"key",m):r);y=""}if(tf(y)||Yt.isBuffer(y)){if(u){var b=v?r:u(r,X.encoder,p,"key",m);return[g(b)+"="+g(u(y,X.encoder,p,"value",m))]}return[g(r)+"="+g(String(y))]}var R=[];if(typeof y=="undefined")return R;var F;if(n==="comma"&&_e(y))v&&u&&(y=Yt.maybeMap(y,function(W){return W==null?W:u(W)})),F=[{value:y.length>0?y.join(",")||null:void 0}];else if(_e(l))F=l;else{var N=Object.keys(y);F=d?N.sort(d):N}var L=c?String(r).replace(/\./g,"%2E"):String(r),H=i&&_e(y)&&y.length===1?L+"[]":L;if(a&&_e(y)&&y.length===0)return H+"[]";for(var Q=0;Q<F.length;++Q){var M=F[Q],k=typeof M=="object"&&M&&typeof M.value!="undefined"?M.value:y[M];if(!(o&&k===null)){var U=h&&c?String(M).replace(/\./g,"%2E"):String(M),j=_e(y)?typeof n=="function"?n(H,U):H:H+(h?"."+U:"["+U+"]");S.set(e,_);var D=Xa();D.set(Zr,S),ts(R,t(k,j,n,i,a,s,o,c,n==="comma"&&v&&_e(y)?null:u,l,d,h,f,m,g,v,p,D))}}return R},nf=function(e){if(!e)return X;if(typeof e.allowEmptyArrays!="undefined"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.encodeDotInKeys!="undefined"&&typeof e.encodeDotInKeys!="boolean")throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");if(e.encoder!==null&&typeof e.encoder!="undefined"&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=e.charset||X.charset;if(typeof e.charset!="undefined"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=Et.default;if(typeof e.format!="undefined"){if(!Zl.call(Et.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var i=Et.formatters[n],a=X.filter;(typeof e.filter=="function"||_e(e.filter))&&(a=e.filter);var s;if(e.arrayFormat in es?s=e.arrayFormat:"indices"in e?s=e.indices?"indices":"repeat":s=X.arrayFormat,"commaRoundTrip"in e&&typeof e.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var o=typeof e.allowDots=="undefined"?e.encodeDotInKeys===!0?!0:X.allowDots:!!e.allowDots;return{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:X.addQueryPrefix,allowDots:o,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:X.allowEmptyArrays,arrayFormat:s,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:X.charsetSentinel,commaRoundTrip:!!e.commaRoundTrip,delimiter:typeof e.delimiter=="undefined"?X.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:X.encode,encodeDotInKeys:typeof e.encodeDotInKeys=="boolean"?e.encodeDotInKeys:X.encodeDotInKeys,encoder:typeof e.encoder=="function"?e.encoder:X.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:X.encodeValuesOnly,filter:a,format:n,formatter:i,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:X.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:X.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:X.strictNullHandling}},af=function(t,e){var r=t,n=nf(e),i,a;typeof n.filter=="function"?(a=n.filter,r=a("",r)):_e(n.filter)&&(a=n.filter,i=a);var s=[];if(typeof r!="object"||r===null)return"";var o=es[n.arrayFormat],c=o==="comma"&&n.commaRoundTrip;i||(i=Object.keys(r)),n.sort&&i.sort(n.sort);for(var u=Xa(),l=0;l<i.length;++l){var d=i[l];if(!(typeof d=="undefined"||d===null)){var h=r[d];n.skipNulls&&h===null||ts(s,rf(h,d,o,c,n.allowEmptyArrays,n.strictNullHandling,n.skipNulls,n.encodeDotInKeys,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,u))}}var f=s.join(n.delimiter),m=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?m+="utf8=%26%2310003%3B"+n.delimiter:m+="utf8=%E2%9C%93"+n.delimiter),f.length>0?m+f:""},Ee=Za,Zt=Object.prototype.hasOwnProperty,Xr=Array.isArray,G={allowDots:!1,allowEmptyArrays:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decodeDotInKeys:!1,decoder:Ee.decode,delimiter:"&",depth:5,duplicates:"combine",ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictDepth:!1,strictMerge:!0,strictNullHandling:!1,throwOnLimitExceeded:!1},sf=function(t){return t.replace(/&#(\d+);/g,function(e,r){return String.fromCharCode(parseInt(r,10))})},rs=function(t,e,r,n){if(t&&typeof t=="string"&&e.comma&&t.indexOf(",")>-1){if(n&&e.throwOnLimitExceeded)for(var i=0,a=t.indexOf(",");a>-1;){if(i+=1,i>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(e.arrayLimit===1?"":"s")+" allowed in an array.");a=t.indexOf(",",a+1)}return t.split(",")}if(e.throwOnLimitExceeded&&r>=e.arrayLimit)throw new RangeError("Array limit exceeded. Only "+e.arrayLimit+" element"+(e.arrayLimit===1?"":"s")+" allowed in an array.");return t},of="utf8=%26%2310003%3B",cf="utf8=%E2%9C%93",uf=function(e,r){var n={__proto__:null},i=r.ignoreQueryPrefix?e.replace(/^\?/,""):e;i=i.replace(/%5B/gi,"[").replace(/%5D/gi,"]");var a=r.parameterLimit===1/0?void 0:r.parameterLimit,s=i.split(r.delimiter,r.throwOnLimitExceeded&&typeof a!="undefined"?a+1:a);if(r.throwOnLimitExceeded&&typeof a!="undefined"&&s.length>a)throw new RangeError("Parameter limit exceeded. Only "+a+" parameter"+(a===1?"":"s")+" allowed.");var o=-1,c,u=r.charset;if(r.charsetSentinel)for(c=0;c<s.length;++c)s[c].indexOf("utf8=")===0&&(s[c]===cf?u="utf-8":s[c]===of&&(u="iso-8859-1"),o=c,c=s.length);for(c=0;c<s.length;++c)if(c!==o){var l=s[c],d=l.indexOf("]="),h=d===-1?l.indexOf("="):d+1,f,m;if(h===-1?(f=r.decoder(l,G.decoder,u,"key"),m=r.strictNullHandling?null:""):(f=r.decoder(l.slice(0,h),G.decoder,u,"key"),f!==null&&(m=Ee.maybeMap(rs(l.slice(h+1),r,Xr(n[f])?n[f].length:0,l.indexOf("[]=")===-1),function(v){return r.decoder(v,G.decoder,u,"value")}))),m&&r.interpretNumericEntities&&u==="iso-8859-1"&&(m=sf(String(m))),l.indexOf("[]=")>-1&&(m=Xr(m)?[m]:m),r.comma&&Xr(m)&&m.length>r.arrayLimit&&(m=Ee.combine([],m,r.arrayLimit,r.plainObjects,r.throwOnLimitExceeded)),f!==null){var g=Zt.call(n,f);g&&(r.duplicates==="combine"||l.indexOf("[]=")>-1)?n[f]=Ee.combine(n[f],m,r.arrayLimit,r.plainObjects,r.throwOnLimitExceeded):(!g||r.duplicates==="last")&&(n[f]=m)}}return n},lf=function(t,e,r,n){var i=0;if(t.length>0&&t[t.length-1]==="[]"){var a=t.slice(0,-1).join("");i=Array.isArray(e)&&e[a]?e[a].length:0}for(var s=n?e:rs(e,r,i),o=t.length-1;o>=0;--o){var c,u=t[o];if(u==="[]"&&r.parseArrays)Ee.isOverflow(s)?c=s:c=r.allowEmptyArrays&&(s===""||r.strictNullHandling&&s===null)?[]:Ee.combine([],s,r.arrayLimit,r.plainObjects,r.throwOnLimitExceeded);else{c=r.plainObjects?{__proto__:null}:{};var l=u.charAt(0)==="["&&u.charAt(u.length-1)==="]"?u.slice(1,-1):u,d=r.decodeDotInKeys?l.replace(/%2E/g,"."):l,h=parseInt(d,10),f=!isNaN(h)&&u!==d&&String(h)===d&&h>=0&&r.parseArrays;if(!r.parseArrays&&d==="")c={0:s};else if(f&&h<r.arrayLimit)c=[],c[h]=s;else{if(f&&r.throwOnLimitExceeded)throw new RangeError("Array limit exceeded. Only "+r.arrayLimit+" element"+(r.arrayLimit===1?"":"s")+" allowed in an array.");f?(c[h]=s,Ee.markOverflow(c,h)):d!=="__proto__"&&(c[d]=s)}}s=c}return s},ff=function(e,r){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e;if(r.depth<=0)return!r.plainObjects&&Zt.call(Object.prototype,n)&&!r.allowPrototypes?void 0:[n];var i=[],a=n.indexOf("["),s=a>=0?n.slice(0,a):n;if(s){if(!r.plainObjects&&Zt.call(Object.prototype,s)&&!r.allowPrototypes)return;i[i.length]=s}for(var o=n.length,c=a,u=0;c>=0&&u<r.depth;){for(var l=1,d=c+1,h=-1;d<o&&h<0;){var f=n.charCodeAt(d);f===91?l+=1:f===93&&(l-=1,l===0&&(h=d)),d+=1}if(h<0)return i[i.length]="["+n.slice(c)+"]",i;var m=n.slice(c,h+1),g=m.slice(1,-1);if(!r.plainObjects&&Zt.call(Object.prototype,g)&&!r.allowPrototypes)return;i[i.length]=m,u+=1,c=n.indexOf("[",h+1)}if(c>=0){if(r.strictDepth===!0)throw new RangeError("Input depth exceeded depth option of "+r.depth+" and strictDepth is true");i[i.length]="["+n.slice(c)+"]"}return i},hf=function(e,r,n,i){if(e){var a=ff(e,n);if(a)return lf(a,r,n,i)}},df=function(e){if(!e)return G;if(typeof e.allowEmptyArrays!="undefined"&&typeof e.allowEmptyArrays!="boolean")throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");if(typeof e.decodeDotInKeys!="undefined"&&typeof e.decodeDotInKeys!="boolean")throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");if(e.decoder!==null&&typeof e.decoder!="undefined"&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset!="undefined"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");if(typeof e.throwOnLimitExceeded!="undefined"&&typeof e.throwOnLimitExceeded!="boolean")throw new TypeError("`throwOnLimitExceeded` option must be a boolean");var r=typeof e.charset=="undefined"?G.charset:e.charset,n=typeof e.duplicates=="undefined"?G.duplicates:e.duplicates;if(n!=="combine"&&n!=="first"&&n!=="last")throw new TypeError("The duplicates option must be either combine, first, or last");var i=typeof e.allowDots=="undefined"?e.decodeDotInKeys===!0?!0:G.allowDots:!!e.allowDots;return{allowDots:i,allowEmptyArrays:typeof e.allowEmptyArrays=="boolean"?!!e.allowEmptyArrays:G.allowEmptyArrays,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:G.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:G.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:G.arrayLimit,charset:r,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:G.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:G.comma,decodeDotInKeys:typeof e.decodeDotInKeys=="boolean"?e.decodeDotInKeys:G.decodeDotInKeys,decoder:typeof e.decoder=="function"?e.decoder:G.decoder,delimiter:typeof e.delimiter=="string"||Ee.isRegExp(e.delimiter)?e.delimiter:G.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:G.depth,duplicates:n,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:G.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:G.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:G.plainObjects,strictDepth:typeof e.strictDepth=="boolean"?!!e.strictDepth:G.strictDepth,strictMerge:typeof e.strictMerge=="boolean"?!!e.strictMerge:G.strictMerge,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:G.strictNullHandling,throwOnLimitExceeded:typeof e.throwOnLimitExceeded=="boolean"?e.throwOnLimitExceeded:!1}},mf=function(t,e){var r=df(e);
6if(t===""||t===null||typeof t=="undefined")return r.plainObjects?{__proto__:null}:{};for(var n=typeof t=="string"?uf(t,r):t,i=r.plainObjects?{__proto__:null}:{},a=Object.keys(n),s=0;s<a.length;++s){var o=a[s],c=hf(o,n[o],r,typeof t=="string");i=Ee.merge(i,c,r)}return r.allowSparse===!0?i:Ee.compact(i)},gf=af,pf=mf,vf=Mn,yf={formats:vf,parse:pf,stringify:gf};const Ci=fr(yf);var Ai=function(e){e&&(window.document.title=e)},Rf=function(){function t(e){var r=this,n=e.windowTitle,i=e.writeDelay,a=i===void 0?400:i,s=e.createURL,o=e.parseURL,c=e.getLocation,u=e.start,l=e.dispose,d=e.push,h=e.cleanUrlOnDispose;ze(this,t),T(this,"$$type","ais.browser"),T(this,"windowTitle",void 0),T(this,"writeDelay",void 0),T(this,"_createURL",void 0),T(this,"parseURL",void 0),T(this,"getLocation",void 0),T(this,"writeTimer",void 0),T(this,"_onPopState",void 0),T(this,"inPopState",!1),T(this,"isDisposed",!1),T(this,"latestAcknowledgedHistory",0),T(this,"_start",void 0),T(this,"_dispose",void 0),T(this,"_push",void 0),T(this,"_cleanUrlOnDispose",void 0),this.windowTitle=n,this.writeTimer=void 0,this.writeDelay=a,this._createURL=s,this.parseURL=o,this.getLocation=c,this._start=u,this._dispose=l,this._push=d,this._cleanUrlOnDispose=typeof h=="undefined"?!0:h,Fe(function(f){var m=f.window,g=r.windowTitle&&r.windowTitle(r.read());Ai(g),r.latestAcknowledgedHistory=m.history.length})}return Ge(t,[{key:"read",value:function(){return this.parseURL({qsModule:Ci,location:this.getLocation()})}},{key:"write",value:function(r){var n=this;Fe(function(i){var a=i.window,s=n.createURL(r),o=n.windowTitle&&n.windowTitle(r);n.writeTimer&&clearTimeout(n.writeTimer),n.writeTimer=setTimeout(function(){Ai(o),n.shouldWrite(s)&&(n._push?n._push(s):a.history.pushState(r,o||"",s),n.latestAcknowledgedHistory=a.history.length),n.inPopState=!1,n.writeTimer=void 0},n.writeDelay)})}},{key:"onUpdate",value:function(r){var n=this;this._start&&this._start(function(){r(n.read())}),this._onPopState=function(){n.writeTimer&&(clearTimeout(n.writeTimer),n.writeTimer=void 0),n.inPopState=!0,r(n.read())},Fe(function(i){var a=i.window;a.addEventListener("popstate",n._onPopState)})}},{key:"createURL",value:function(r){var n=this._createURL({qsModule:Ci,routeState:r,location:this.getLocation()});return n}},{key:"dispose",value:function(){var r=this;this._dispose&&this._dispose(),this.isDisposed=!0,Fe(function(n){var i=n.window;r._onPopState&&i.removeEventListener("popstate",r._onPopState)}),this.writeTimer&&clearTimeout(this.writeTimer),this._cleanUrlOnDispose&&this.write({})}},{key:"start",value:function(){this.isDisposed=!1}},{key:"shouldWrite",value:function(r){var n=this;return Fe(function(i){var a=i.window;if(n.isDisposed&&!n._cleanUrlOnDispose)return!1;var s=!(n.isDisposed&&n.latestAcknowledgedHistory!==a.history.length);return!n.inPopState&&s&&r!==a.location.href})}}]),t}();function Sf(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=t.createURL,r=e===void 0?function(m){var g=m.qsModule,v=m.routeState,p=m.location,S=p.protocol,y=p.hostname,w=p.port,_=w===void 0?"":w,I=p.pathname,O=p.hash,b=g.stringify(v),R=_===""?"":":".concat(_);return b?"".concat(S,"//").concat(y).concat(R).concat(I,"?").concat(b).concat(O):"".concat(S,"//").concat(y).concat(R).concat(I
6).concat(O)}:e,n=t.parseURL,i=n===void 0?function(m){var g=m.qsModule,v=m.location;return g.parse(v.search.slice(1),{arrayLimit:99})}:n,a=t.writeDelay,s=a===void 0?400:a,o=t.windowTitle,c=t.getLocation,u=c===void 0?function(){return Fe(function(m){var g=m.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.")}})}:c,l=t.start,d=t.dispose,h=t.push,f=t.cleanUrlOnDispose;return new Rf({createURL:r,parseURL:i,writeDelay:s,windowTitle:o,getLocation:u,start:l,dispose:d,push:h,cleanUrlOnDispose:f})}function Ni(t){t.configure;var e=K(t,["configure"]);return e}function bf(){return{$$type:"ais.simple",stateToRoute:function(e){return Object.keys(e).reduce(function(r,n){return E(P({},r),T({},n,Ni(e[n])))},{})},routeToState:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(r,n){var i=e[n];return(typeof i=="undefined"?"undefined":je(i))!=="object"||i===null?r:E(P({},r),T({},n,Ni(i)))},{})}}}var wf=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.router,n=r===void 0?Sf():r,i=e.stateMapping,a=i===void 0?bf():i,s=e.$$internal,o=s===void 0?!1:s;return function(c){var u=c.instantSearchInstance;function l(f){var m=u.mainIndex.getWidgets().length===0?u._initialUiState:u.mainIndex.getWidgetUiState({}),g=Object.keys(f).reduce(function(p,S){return E(P({},p),T({},S,f[S]))},m),v=a.stateToRoute(g);return n.createURL(v)}u._createURL=l;var d=void 0,h=u._initialUiState;return{$$type:"ais.router({router:".concat(n.$$type||"__unknown__",", stateMapping:").concat(a.$$type||"__unknown__","})"),$$internal:o,onStateChange:function(m){var g=m.uiState,v=a.stateToRoute(g);(d===void 0||!_n(d,v))&&(n.write(v),d=v)},subscribe:function(){u._initialUiState=P({},h,a.routeToState(n.read())),n.onUpdate(function(m){u.mainIndex.getWidgets().length>0&&u.setUiState(a.routeToState(m))})},started:function(){var m;(m=n.start)===null||m===void 0||m.call(n)},unsubscribe:function(){n.dispose()}}}},_f=0;function Pf(t){t.dependsOn==="recommend"&&(t.$$id=_f++)}function Ff(t){var e=t.name,r=t.connector,n=r===void 0?!1:r;return["https://www.algolia.com/doc/api-reference/widgets/",e,"/js/",n?"#connector":""].join("")}function ns(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=e.map(function(i){return Ff(i)}).join(", ");return function(i){return[i,"See documentation: ".concat(n)].filter(Boolean).join(` 7 8`)}}function Ef(t,e){if(!Array.isArray(t))return-1;for(var r=0;r<t.length;r++)if(e(t[r]))return r;return-1}function If(t){return t.filter(function(e,r,n){return n.indexOf(e)===r})}var xf=function(e,r){r.facets,r.disjunctiveFacets,r.facetsRefinements,r.facetsExcludes,r.disjunctiveFacetsRefinements,r.numericRefinements,r.tagRefinements,r.hierarchicalFacets,r.hierarchicalFacetsRefinements,r.ruleContexts;var n=K(r,["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"]);return e.setQueryParameters(n)},Tf=function(e,r){return r.facets.reduce(function(n,i){return n.addFacet(i)},e)},Cf=function(e,r){return r.disjunctiveFacets.reduce(function(n,i){return n.addDisjunctiveFacet(i)},e)},Af=function(e,r){return e.setQueryParameters({hierarchicalFacets:r.hierarchicalFacets.reduce(function(n,i){var a=Ef(n,function(o){return o.name===i.name});if(a===-1)return n.concat(i);var s=n.slice();return s.splice(a,1,i),s},e.hierarchicalFacets)})},Nf=function(e,r){return r.tagRefinements.reduce(function(n,i){return n.addTagRefinement(i)},e)},Of=function(e,r){return e.setQueryParameters({facetsRefinements:P({},e.facetsRefinements,r.facetsRefinements)})},$f=function(e,r){return e.setQueryParameters({facetsExcludes:P({},e.facetsExcludes,r.facetsExcludes)})},jf=function(e,r){return e.setQueryParameters({disjunctiveFacetsRefinements:P({},e.disjunctiveFacetsRefinements,r.disjunctiveFacetsRefinements)})},Hf=function(e,r){return e.setQueryParameters({numericRefinements:P({},e.numericRefinements,r.numericRefinements)})},Lf=function(e,r){return e.setQueryParameters({hierarchicalFacetsRefinements:P({},e.hierarchicalFacetsRefinements,r.hierarchicalFacetsRefinements)})},Mf=function(e,r){var n=If([].concat(e.ruleContexts).concat(r.ruleContexts).filter(
8Boolean));return n.length>0?e.setQueryParameters({ruleContexts:n}):e},Oi=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.reduce(function(i,a){var s=Lf(i,a),o=Af(s,a),c=Nf(o,a),u=Hf(c,a),l=jf(u,a),d=$f(l,a),h=Of(d,a),f=Cf(h,a),m=Mf(f,a),g=Tf(m,a);return xf(g,a)})};function $i(t){for(var e=t.getParent(),r=[t.getHelper().state];e!==null;)r=[e.getHelper().state].concat(r),e=e.getParent();return r}var dt=ns({name:"index-widget"});function is(t,e){var r=e.state,n=e.recommendState,i=e.isPageReset,a=e._uiState;r!==t.state&&(t.state=r,t.emit("change",{state:t.state,results:t.lastResults,isPageReset:i,_uiState:a})),n!==t.recommendState&&(t.recommendState=n)}function mt(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t.reduce(function(n,i){return ve(i)||!i.getWidgetUiState&&!i.getWidgetState?n:i.getWidgetUiState?i.getWidgetUiState(n,e):i.getWidgetState(n,e)},r)}function gt(t,e){var r=e.initialSearchParameters,n=K(e,["initialSearchParameters"]);return t.reduce(function(i,a){return!a.getWidgetSearchParameters||ve(a)?i:a.dependsOn==="search"&&a.getWidgetParameters?a.getWidgetParameters(i,n):a.getWidgetSearchParameters(i,n)},r)}function ji(t,e){var r=e.initialRecommendParameters,n=K(e,["initialRecommendParameters"]);return t.reduce(function(i,a){return!ve(a)&&a.dependsOn==="recommend"&&a.getWidgetParameters?a.getWidgetParameters(i,n):i},r)}function as(t){var e=t.filter(ve);e.length!==0&&e.forEach(function(r){var n=r.getHelper();is(n,{state:n.state.resetPage(),recommendState:n.recommendState,isPageReset:!0}),as(r.getWidgets())})}function ss(t){var e=t.filter(ve);return e.reduce(function(r,n){var i;return(i=r).concat.apply(i,[{indexId:n.getIndexId(),results:n.getResults(),helper:n.getHelper()}].concat(ge(ss(n.getWidgets()))))},[])}var Df=function(e){if(e===void 0||e.indexName===void 0&&!e.EXPERIMENTAL_isolated)throw new Error(dt("The `indexName` option is required."));var r=e.indexName,n=r===void 0?"":r,i=e.indexId,a=i===void 0?n:i,s=e.EXPERIMENTAL_isolated,o=s===void 0?!1:s,c=[],u={},l=null,d=null,h=null,f=null,m=null,g=!1,v=!1;return{$$type:"ais.index",$$widgetType:"ais.index",_isolated:o,getIndexName:function(){return n},getIndexId:function(){return a},getHelper:function(){return h},getResults:function(){return f!=null&&f.lastResults?(f.lastResults._state=h.state,f.lastResults):null},getResultsForWidget:function(S){return S.dependsOn!=="recommend"||ve(S)||S.$$id===void 0?this.getResults():h!=null&&h.lastRecommendResults?h.lastRecommendResults[S.$$id]:null},getPreviousState:function(){return m},getScopedResults:function(){var S=this.getParent(),y;return S?y=S.getWidgets():n.length===0?y=this.getWidgets():y=[this],ss(y)},getParent:function(){return o?null:d},createURL:function(S){return typeof S=="function"?l._createURL(T({},a,S(u))):l._createURL(T({},a,mt(c,{searchParameters:S,helper:h})))},scheduleLocalSearch:et(function(){o&&(h==null||h.search())}),getWidgets:function(){return c},addWidgets:function(S){var y=this;if(!Array.isArray(S))throw new Error(dt("The `addWidgets` method expects an array of widgets."));var w=S.reduce(function(_,I){return _.concat(Array.isArray(I)?I:[I])},[]);if(w.some(function(_){return typeof _.init!="function"&&typeof _.render!="function"}))throw new Error(dt("The widget definition expects a `render` and/or an `init` method."));return w.forEach(function(_){_.parent=y,!ve(_)&&(l&&_.dependsOn==="recommend"?l._hasRecommendWidget=!0:l?l._hasSearchWidget=!0:_.dependsOn==="recommend"?g=!0:v=!0,Pf(_))}),c=c.concat(w),l&&w.length&&(is(h,{state:gt(c,{uiState:u,initialSearchParameters:h.state}),recommendState:ji(c,{uiState:u,initialRecommendParameters:h.recommendState}),_uiState:u}),w.forEach(function(_){if(_.getRenderState){var I=_.getRenderState(l.renderState[y.getIndexId()]||{},Rt(l,y,l._initialUiState));Nr({renderState:I,instantSearchInstance:l,parent:y})}}
8),w.forEach(function(_){_.init&&_.init(Rt(l,y,l._initialUiState))}),o?this.scheduleLocalSearch():l.scheduleSearch()),this},removeWidgets:function(S){var y=this;if(!Array.isArray(S))throw new Error(dt("The `removeWidgets` method expects an array of widgets."));var w=S.reduce(function(R,F){return R.concat(Array.isArray(F)?F:[F])},[]);if(w.some(function(R){return typeof R.dispose!="function"}))throw new Error(dt("The widget definition expects a `dispose` method."));if(c=c.filter(function(R){return w.indexOf(R)===-1}),c.forEach(function(R){R.parent=void 0,!ve(R)&&(l&&R.dependsOn==="recommend"?l._hasRecommendWidget=!0:l?l._hasSearchWidget=!0:R.dependsOn==="recommend"?g=!0:v=!0)}),l&&w.length){var _=w.reduce(function(R,F){var N=F.dispose({helper:h,state:R.cleanedSearchState,recommendState:R.cleanedRecommendState,parent:y});return Nt(N,ae.RecommendParameters)?R.cleanedRecommendState=N:N&&(R.cleanedSearchState=N),R},{cleanedSearchState:h.state,cleanedRecommendState:h.recommendState}),I=_.cleanedSearchState,O=_.cleanedRecommendState,b=l.future.preserveSharedStateOnUnmount?gt(c,{uiState:u,initialSearchParameters:new ae.SearchParameters({index:this.getIndexName()})}):gt(c,{uiState:mt(c,{searchParameters:I,helper:h}),initialSearchParameters:I});u=mt(c,{searchParameters:b,helper:h}),h.setState(b),h.recommendState=O,c.length&&(o?this.scheduleLocalSearch():l.scheduleSearch())}return this},init:function(S){var y=this,w=S.instantSearchInstance,_=S.parent,I=S.uiState,O;if(h===null){l=w,d=_,u=I[a]||{};var b=w.mainHelper,R=gt(c,{uiState:u,initialSearchParameters:new ae.SearchParameters({index:n})}),F=ji(c,{uiState:u,initialRecommendParameters:new ae.RecommendParameters});h=ae(b.getClient(),R.index,R),h.recommendState=F,h.search=function(){return o?(w.status="loading",y.render({instantSearchInstance:w}),w.compositionID?h.searchWithComposition():h.searchOnlyWithDerivedHelpers()):w.onStateChange?(w.onStateChange({uiState:w.mainIndex.getWidgetUiState({}),setUiState:function(U){return w.setUiState(U,!1)}}),b):b.search()},h.searchWithoutTriggeringOnStateChange=function(){return b.search()},h.searchForFacetValues=function(k,U,j,D){var W=Oi.apply(void 0,[b.state].concat(ge($i(y)))).setQueryParameters(D);return b.searchForFacetValues(k,U,j,W)};var N=n?h:ae({},"__empty_index__",{}),L=o?N:Wf(_,b);f=L.derive(function(){return Oi.apply(void 0,[b.state].concat(ge($i(y))))},function(){return y.getHelper().recommendState});var H=(O=w._initialResults)===null||O===void 0?void 0:O[this.getIndexId()];if(H!=null&&H.results){var Q=new ae.SearchResults(new ae.SearchParameters(H.state),H.results);f.lastResults=Q,h.lastResults=Q}if(H!=null&&H.recommendResults){var M=new ae.RecommendResults(new ae.RecommendParameters({params:H.recommendResults.params}),H.recommendResults.results);f.lastRecommendResults=M,h.lastRecommendResults=M}h.on("change",function(k){var U=k.isPageReset;U&&as(c)}),f.on("search",function(){w.scheduleStalledRender()}),f.on("result",function(k){var U=k.results;w.scheduleRender(),h.lastResults=U,m=U==null?void 0:U._state}),f.on("recommend:result",function(k){var U=k.recommend;w.scheduleRender(),h.lastRecommendResults=U.results}),c.forEach(function(k){if(k.getRenderState){var U=k.getRenderState(w.renderState[y.getIndexId()]||{},Rt(w,y,I));Nr({renderState:U,instantSearchInstance:w,parent:y})}}),c.forEach(function(k){k.init&&k.init(Rt(w,y,I))}),h.on("change",function(k){var U=k.state,j=k._uiState;u=mt(c,{searchParameters:U,helper:h},j||{}),w.onStateChange||w.onInternalStateChange()}),H&&w.scheduleRender(),g&&(w._hasRecommendWidget=!0),v&&(w._hasSearchWidget=!0)}},render:function(S){var y=this,w=S.instantSearchInstance;w.status==="error"&&!w.mainHelper.hasPendingRequests()&&m&&h.setState(m);var _=this.getResults()||f!=null&&f.lastRecommendResults||o&&!n?c:c.filter(function(I){return I.shouldRender});_=_.filter(function(I){return I.shouldRender?I.shouldRender({instantSearchInstance:w}):!0}),_.forEach(function(I){if(I.getRenderState){var O=I.getRenderState(w.renderState[y.getIndexId()]||{},ti(w,y,I));Nr({renderState:O,instantSearchInstance:w,parent:y})}}),_.forEach(function(I){I.render&&I.render(ti(w,y,I))})},dispose:function(){var S=this;
8c.forEach(function(y){y.dispose&&h&&y.dispose({helper:h,state:h.state,recommendState:h.recommendState,parent:S})}),l=null,d=null,h==null||h.removeAllListeners(),h=null,f==null||f.detach(),f=null},getWidgetUiState:function(S){return c.filter(ve).filter(function(y){return!y._isolated}).reduce(function(y,w){return w.getWidgetUiState(y)},E(P({},S),T({},a,P({},S[a],u))))},getWidgetState:function(S){return this.getWidgetUiState(S)},getWidgetSearchParameters:function(S,y){var w=y.uiState;return gt(c,{uiState:w,initialSearchParameters:S})},shouldRender:function(){return!0},refreshUiState:function(){u=mt(c,{searchParameters:this.getHelper().state,helper:this.getHelper()},u)},setIndexUiState:function(S){var y=typeof S=="function"?S(u):S;l.setUiState(function(w){return E(P({},w),T({},a,y))})}}};function Wf(t,e){for(;t;){if(t._isolated)return t.getHelper();t=t.getParent()}return e}function Uf(t,e){return t.toLocaleString(e)}function kf(t){var e=t.numberLocale;return{formatNumber:function(n,i){return Uf(Number(i(n)),e)},highlight:function(n,i){try{var a=JSON.parse(n);return i(zi(E(P({},a),{hit:this})))}catch(s){throw new Error(` 9The highlight helper expects a JSON object of the format: 10{ "attribute": "name", "highlightedTagName": "mark" }`)}},reverseHighlight:function(n,i){try{var a=JSON.parse(n);return i(Xi(E(P({},a),{hit:this})))}catch(s){throw new Error(` 11 The reverseHighlight helper expects a JSON object of the format: 12 { "attribute": "name", "highlightedTagName": "mark" }`)}},snippet:function(n,i){try{var a=JSON.parse(n);return i(ea(E(P({},a),{hit:this})))}catch(s){throw new Error(` 13The snippet helper expects a JSON object of the format: 14{ "attribute": "name", "highlightedTagName": "mark" }`)}},reverseSnippet:function(n,i){try{var a=JSON.parse(n);return i(ta(E(P({},a),{hit:this})))}catch(s){throw new Error(` 15 The reverseSnippet helper expects a JSON object of the format: 16 { "attribute": "name", "highlightedTagName": "mark" }`)}},insights:function(n,i){try{var a=JSON.parse(n),s=a.method,o=a.payload;return i(ra(s,P({objectIDs:[this.objectID]},o)))}catch(c){throw new Error(` 17The insights helper expects a JSON object of the format: 18{ "method": "method-name", "payload": { "eventName": "name of the event" } }`)}}}}function wn(t,e){var r=t[e.getIndexId()]||{};e.getHelper().setState(e.getWidgetSearchParameters(e.getHelper().state,{uiState:r})),e.getWidgets().filter(ve).forEach(function(n){return wn(t,n)})}function Bf(t,e){var r=Object.keys(e).reduce(function(n,i){var a=e[i];return a.recommendResults?P({},n,a.recommendResults.results):n},{});t._recommendCache=r}function en(t){var e;return!((e=t.compositionFeedsResults)===null||e===void 0)&&e.length?t.compositionFeedsResults:t.results||[]}function Qf(t,e){if(e&&!((!("transporter"in t)||t._cacheHydrated)&&(!t._useCache||typeof t.addAlgoliaAgent!="function"))){var r=[Object.keys(e).reduce(function(s,o){var c=e[o],u=c.state,l=c.requestParams,d=en(c),h=d&&u?d.map(function(f,m){return P({indexName:u.index||f.index},l!=null&&l[m]||f.params?{params:tn((l==null?void 0:l[m])||qf(f.params))}:{})}):[];return s.concat(h)},[])],n=Object.keys(e).reduce(function(s,o){var c=en(e[o]);return c?s.concat(c):s},[]);if("transporter"in t&&!t._cacheHydrated){t._cacheHydrated=!0;var i=t.search.bind(t);t.search=function(s){for(var o=arguments.length,c=new Array(o>1?o-1:0),u=1;u<o;u++)c[u-1]=arguments[u];var l=Array.isArray(s)?s.map(function(d){return E(P({},d),{params:tn(d.params)})}):tn(s.requestBody.params);return t.transporter.responsesCache.get({method:"search",args:[l].concat(ge(c))},function(){return i.apply(void 0,[s].concat(ge(c)))})},t.transporter.responsesCache.set({method:"search",args:r},{results:n})}if(!("transporter"in t)){var a="/1/indexes/*/queries_body_".concat(JSON.stringify({requests:r}));t.cache=E(P({},t.cache),T({},a,JSON.stringify({results:Object.keys(e).map(function(s){return en(e[s])})})))}}}function qf(t){return t.split("&").reduce(function(e,r){var n=se(r.split("="),2),i=n[0],a=n[1];return e[i]=a?decodeURIComponent(a):"",e},{})}function tn(t){var e=function(i){return Object.prototype.toString.call(i)==="[object Object]"||Object.prototype.toString.call(i)==="[object Array]"},r=function(i){for(var a=arguments.length,s=new Array(a>1?a-1:0),o=1;o<a;o++)s[o-1]=arguments[o];var c=0;return i.replace(/%s/g,function(){return encodeURIComponent(s[c++])})};return Object.keys(t).map(function(n){return r("%s=%s",n,e(t[n])?JSON.stringify(t[n]):t[n])}).join("&")}var os="4.104.0",xe=ns({name:"instantsearch"});function Vf(){return"#"}var Kf={preserveSharedStateOnUnmount:!1,persistHierarchicalRootCount:!1},zf=function(t){$t(e,t);function e(r){ze(this,e);var n;n=Ot(this,e),T(n,"client",void 0),T(n,"indexName",void 0),T(n,"compositionID",void 0),T(n,"insightsClient",void 0),T(n,"onStateChange",null),T(n,"future",void 0),T(n,"helper",void 0),T(n,"mainHelper",void 0),T(n,"mainIndex",void 0),T(n,"started",void 0),T(n,"templatesConfig",void 0),T(n,"renderState",{}),T(n,"_stalledSearchDelay",void 0),T(n,"_searchStalledTimer",void 0),T(n,"_initialUiState",void 0),T(n,"_initialResults",void 0),T(n,"_manuallyResetScheduleSearch",!1),T(n,"_resetScheduleSearch",void 0),T(n,"_createURL",void 0),T(n,"_searchFunction",void 0),T(n,"_mainHelperSearch",void 0),T(n,"_hasSearchWidget",!1),T(n,"_hasRecommendWidget",!1),T(n,"_insights",void 0),T(n,"middleware",[]),T(n,"sendEventToInsights",void 0),T(n,"status","idle"),T(n,"error",void 0),T(n,"scheduleSearch",et(function(){n.started&&n.mainHelper.search()})),T(n,"scheduleRender",et(function(){var N=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,L;!((L=n.mainHelper)===null||L===void 0)&&L.hasPendingRequests()||(clearTimeout(n._searchStalledTimer),n._searchStalledTimer=null,N&&(n.status="idle",n.error=void 0)),n.mainIndex.render({instantSearchInstance:n}),n.emit("render")})),T(n,"onInternalStateChange",et(function(){var N=n.mainIndex.getWidgetUiState({});n.middleware.forEach(function(L){var H=L.instance;H.onStateChange({uiState:N})})})),n.setMaxListeners(100);var i=r.indexName,a=i===void 0?"":i,s=r.compositionID,o=r.numberLocale,c=r.initialUiState,u=c===void 0?{}
18:c,l=r.routing,d=l===void 0?null:l,h=r.insights,f=h===void 0?void 0:h,m=r.searchFunction,g=r.stalledSearchDelay,v=g===void 0?200:g,p=r.searchClient,S=p===void 0?null:p,y=r.insightsClient,w=y===void 0?null:y,_=r.onStateChange,I=_===void 0?null:_,O=r.future,b=O===void 0?P({},Kf,r.future||{}):O;if(S===null)throw new Error(xe("The `searchClient` option is required."));if(typeof S.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 S.addAlgoliaAgent=="function"&&S.addAlgoliaAgent("instantsearch.js (".concat(os,")")),w&&typeof w!="function")throw new Error(xe("The `insightsClient` option should be a function."));if(n.client=S,n.future=b,n.insightsClient=w,n.indexName=a,n.compositionID=s,n.helper=null,n.mainHelper=null,n.mainIndex=Df({indexName:n.compositionID||n.indexName}),n.onStateChange=I,n.started=!1,n.templatesConfig={helpers:kf({numberLocale:o}),compileOptions:{}},n._stalledSearchDelay=v,n._searchStalledTimer=null,n._createURL=Vf,n._initialUiState=u,n._initialResults=null,n._insights=f,m&&(n._searchFunction=m),n.sendEventToInsights=Ae,d){var R=typeof d=="boolean"?{}:d;R.$$internal=!0,n.use(wf(R))}if(f){var F=typeof f=="boolean"?{}:f;F.$$internal=!0,n.use(Zn(F))}return Fc()&&n.use(Ec({$$internal:!0})),n}return Ge(e,[{key:"_isSearchStalled",get:function(){return this.status==="stalled"}},{key:"use",value:function(){for(var n=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=a.map(function(c){var u=P({$$type:"__unknown__",$$internal:!1,subscribe:Ae,started:Ae,unsubscribe:Ae,onStateChange:Ae},c({instantSearchInstance:n}));return n.middleware.push({creator:c,instance:u}),u});return this.started&&o.forEach(function(c){c.subscribe(),c.started()}),this}},{key:"unuse",value:function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return this.middleware.filter(function(s){return i.includes(s.creator)}).forEach(function(s){return s.instance.unsubscribe()}),this.middleware=this.middleware.filter(function(s){return!i.includes(s.creator)}),this}},{key:"EXPERIMENTAL_use",value:function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return this.use.apply(this,ge(i))}},{key:"addWidget",value:function(n){return this.addWidgets([n])}},{key:"addWidgets",value:function(n){if(!Array.isArray(n))throw new Error(xe("The `addWidgets` method expects an array of widgets. Please use `addWidget`."));if(this.compositionID&&n.some(function(i){return!Array.isArray(i)&&ve(i)&&!i._isolated}))throw new Error(xe("The `index` widget cannot be used with a composition-based InstantSearch implementation."));return this.mainIndex.addWidgets(n),this}},{key:"removeWidget",value:function(n){return this.removeWidgets([n])}},{key:"removeWidgets",value:function(n){if(!Array.isArray(n))throw new Error(xe("The `removeWidgets` method expects an array of widgets. Please use `removeWidget`."));return this.mainIndex.removeWidgets(n),this}},{key:"start",value:function(){var n=this;if(this.started)throw new Error(xe("The `start` method has already been called once."));var i=this.mainHelper||ae(this.client,this.indexName,void 0,{persistHierarchicalRootCount:this.future.persistHierarchicalRootCount});if(this.compositionID&&(i.searchForFacetValues=i.searchForCompositionFacetValues.bind(i)),i.search=function(){return n.status="loading",n.scheduleRender(!1),n._hasSearchWidget&&(n.compositionID?i.searchWithComposition():i.searchOnlyWithDerivedHelpers()),n._hasRecommendWidget&&i.recommend(),i},this._searchFunction){var a={search:function(){return new Promise(Ae)}};this._mainHelperSearch=i.search.bind(i),i.search=function(){var o=n.mainIndex.getHelper(),c=ae(a,o.state.index,o.state);return c.once("search",function(u){var l=u.state;o.overrideStateWithoutTriggeringChangeEvent(l),n._mainHelperSearch()}),c.on("change",function(u){var l=u.state;o.setState(l)}),n._searchFunction(c),i}}if(i.on("error",function(o){var c=o.error;if(!Nt(c,Error)){var u=c;c=Object.keys(u).reduce(function(l,d){return l[d]=u[d],l},new Error(u.message))}c.error=c,n.error=c,n.status="error",n.scheduleRender(!1),n.emit("error",c)}),this.mainHelper=i,this.middleware.forEach(function(o){var c=o.instance;c.subscribe()}),this.mainIndex.init({instantSearchInstance:this,parent:null,uiState:this._initialUiState}),this._initialResults){Qf(this.client,this._initialResults),Bf(this.mainHelper,this._initialResults);var s=this.scheduleSearch;this.scheduleSearch=et(Ae),this._manuallyResetScheduleSearch?this._resetScheduleSearch=function(){n.scheduleSearch=s}:et(function(){n.scheduleSearch=s}
18)()}else this.mainIndex.getWidgets().length>0&&this.scheduleSearch();this.helper=this.mainIndex.getHelper(),this.started=!0,this.middleware.forEach(function(o){var c=o.instance;c.started()}),typeof this._insights=="undefined"&&i.derivedHelpers[0].once("result",function(){var o=n.mainIndex.getScopedResults().some(function(c){var u=c.results;return u==null?void 0:u._automaticInsights});o&&n.use(Zn({$$internal:!0,$$automatic:!0}))})}},{key:"dispose",value:function(){var n;this.scheduleSearch.cancel(),this.scheduleRender.cancel(),clearTimeout(this._searchStalledTimer),this.removeWidgets(this.mainIndex.getWidgets()),this.mainIndex.dispose(),this.started=!1,this.removeAllListeners(),(n=this.mainHelper)===null||n===void 0||n.removeAllListeners(),this.mainHelper=null,this.helper=null,this.middleware.forEach(function(i){var a=i.instance;a.unsubscribe()})}},{key:"scheduleStalledRender",value:function(){var n=this;this._searchStalledTimer||(this._searchStalledTimer=setTimeout(function(){n.status="stalled",n.scheduleRender()},this._stalledSearchDelay))}},{key:"setUiState",value:function(n){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(!this.mainHelper)throw new Error(xe("The `start` method needs to be called before `setUiState`."));this.mainIndex.refreshUiState();var s=typeof n=="function"?n(this.mainIndex.getWidgetUiState({})):n;this.onStateChange&&a?this.onStateChange({uiState:s,setUiState:function(c){wn(typeof c=="function"?c(s):c,i.mainIndex),i.scheduleSearch(),i.onInternalStateChange()}}):(wn(s,this.mainIndex),this.scheduleSearch(),this.onInternalStateChange())}},{key:"getUiState",value:function(){return this.started&&this.mainIndex.refreshUiState(),this.mainIndex.getWidgetUiState({})}},{key:"createURL",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.started)throw new Error(xe("The `start` method needs to be called before `createURL`."));return this._createURL(n)}},{key:"refresh",value:function(){if(!this.mainHelper)throw new Error(xe("The `start` method needs to be called before `refresh`."));this.mainHelper.clearCache().search()}}]),e}(ao),Wt=function(e,r){return e},Re=function(e){return new zf(e)};Re.version=os;Re.createInfiniteHitsSessionStorageCache=Wt(eo);Re.highlight=Wt(zi);Re.reverseHighlight=Wt(Xi);Re.snippet=Wt(ea);Re.reverseSnippet=Wt(ta);Re.insights=ra;Re.getInsightsAnonymousUserToken=Xs;Object.defineProperty(Re,"widgets",{get:function(){throw new ReferenceError(`"instantsearch.widgets" are not available from the ES build. 19 20To import the widgets: 21 22import { searchBox } from 'instantsearch.js/es/widgets/index.js'`)}});Object.defineProperty(Re,"connectors",{get:function(){throw new ReferenceError(`"instantsearch.connectors" are not available from the ES build. 23 24To import the connectors: 25 26import { connectSearchBox } from 'instantsearch.js/es/connectors/index.js'`)}});Object.defineProperty(Re,"templates",{get:function(){throw new ReferenceError(`"instantsearch.templates" are not available from the ES build. 27 28To import the templates: 29 30import { carousel } from 'instantsearch.js/es/templates/index.js'`)}});function x(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return e.reduce(function(n,i){return Array.isArray(i)?n.concat(i):n.concat([i])},[]).filter(Boolean).join(" ")}function Gf(t){var e=t.createElement;return function(n){var i=n.classNames,a=n.children,s=n.highlightedTagName,o=n.isHighlighted,c=n.nonHighlightedTagName,u=o?s:c;return e(u,{className:o?i.highlighted:i.nonHighlighted},a)}}function Jf(t){var e=t.createElement,r=t.Fragment,n=Gf({createElement:e});return function(a){var s=a.parts,o=a.highlightedTagName,c=o===void 0?"mark":o,u=a.nonHighlightedTagName,l=u===void 0?"span":u,d=a.separator,h=d===void 0?", ":d,f=a.className,m=a.classNames,g=m===void 0?{}:m,v=K(a,["parts","highlightedTagName","nonHighlightedTagName","separator","className","classNames"]);return e("span",E(P({},v),{className:x(g.root,f)}),s.map(function(p,S){var y=S===s.length-1;return e(r,{key:S},p.map(function(w,_){return e(n,{key:_,classNames:g,highlightedTagName:c,nonHighlightedTagName:l,isHighlighted:w.isHighlighted},w.value)}),!y&&e("span",{className:g.separator},h))}))}}function Yf(t){var e=t.createElement;return function(n){var i=n.classNames,a=n.banner;return a.image.urls[0].url?e("aside",{className:x("ais-Hits-banner",i.bannerRoot)},a.link?e("a",{className:x("ais-Hits-banner-link",i.bannerLink),href:a.link.url,target:a.link.target},e("img",{className:x("ais-Hits-banner-image",i.bannerImage),src:a.image.urls[0].url,alt:a.image.title})):e("img",{className:x("ais-Hits-banner-image",i.bannerImage),src:a.image.urls[0].url,alt:a.image.title})):null}}function Zf(t){var e=t.createElement,r=Yf({createElement:e});return function(i){var a=i.classNames,s=a===void 0?{}:a,o=i.hits,c=i.itemComponent,u=i.sendEvent,l=i.emptyComponent,d=i.banner,h=i.bannerComponent,f=K(i,["classNames","hits","itemComponent","sendEvent","emptyComponent","banner","bannerComponent"]);return e("div",E(P({},f),{className:x("ais-Hits",s.root,o.length===0&&x("ais-Hits--empty",s.emptyRoot),f.className)}),d&&(h?e(h,{className:x("ais-Hits-banner",s.bannerRoot),banner:d}):e(r,{classNames:s,banner:d})),o.length===0&&l?e(l,null):e("ol",{className:x("ais-Hits-list",s.list)},o.map(function(m,g){return e(c,{key:m.objectID,hit:m,index:g,className:x("ais-Hits-item",s.item),onClick:function(){u("click:internal",m,"Hit Clicked")},onAuxClick:function(){u("click:internal",m,"Hit Clicked")}})})))}}function Hi(t){return t!==Object(t)}function cr(t,e){if(t===e)return!0;
30if(Hi(t)||Hi(e)||typeof t=="function"||typeof e=="function")return t===e;if(Object.keys(t).length!==Object.keys(e).length)return!1;var r=!0,n=!1,i=void 0;try{for(var a=Object.keys(t)[Symbol.iterator](),s;!(r=(s=a.next()).done);r=!0){var o=s.value;if(!(o in e)||!cr(t[o],e[o]))return!1}}catch(c){n=!0,i=c}finally{try{!r&&a.return!=null&&a.return()}finally{if(n)throw i}}return!0}var cs={};(function(t){(function(e){var r=/\S/,n=/\"/g,i=/\n/g,a=/\r/g,s=/\\/g,o=/\u2028/,c=/\u2029/;e.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},e.scan=function(R,F){var N=R.length,L=0,H=1,Q=2,M=L,k=null,U=null,j="",D=[],W=!1,$=0,q=0,z="{{",V="}}";function Y(){j.length>0&&(D.push({tag:"_t",text:new String(j)}),j="")}function Z(){for(var ee=!0,le=q;le<D.length;le++)if(ee=e.tags[D[le].tag]<e.tags._v||D[le].tag=="_t"&&D[le].text.match(r)===null,!ee)return!1;return ee}function he(ee,le){if(Y(),ee&&Z())for(var de=q,Le;de<D.length;de++)D[de].text&&((Le=D[de+1])&&Le.tag==">"&&(Le.indent=D[de].text.toString()),D.splice(de,1));else le||D.push({tag:` 31`});W=!1,q=D.length}function be(ee,le){var de="="+V,Le=ee.indexOf(de,le),lt=l(ee.substring(ee.indexOf("=",le)+1,Le)).split(" ");return z=lt[0],V=lt[lt.length-1],Le+de.length-1}for(F&&(F=F.split(" "),z=F[0],V=F[1]),$=0;$<N;$++)M==L?d(z,R,$)?(--$,Y(),M=H):R.charAt($)==` 32`?he(W):j+=R.charAt($):M==H?($+=z.length-1,U=e.tags[R.charAt($+1)],k=U?R.charAt($+1):"_v",k=="="?($=be(R,$),M=L):(U&&$++,M=Q),W=$):d(V,R,$)?(D.push({tag:k,n:l(j),otag:z,ctag:V,i:k=="/"?W-z.length:$+V.length}),j="",$+=V.length-1,M=L,k=="{"&&(V=="}}"?$++:u(D[D.length-1]))):j+=R.charAt($);return he(W,!0),D};function u(b){b.n.substr(b.n.length-1)==="}"&&(b.n=b.n.substring(0,b.n.length-1))}function l(b){return b.trim?b.trim():b.replace(/^\s*|\s*$/g,"")}function d(b,R,F){if(R.charAt(F)!=b.charAt(0))return!1;for(var N=1,L=b.length;N<L;N++)if(R.charAt(F+N)!=b.charAt(N))return!1;return!0}var h={_t:!0,"\n":!0,$:!0,"/":!0};function f(b,R,F,N){var L=[],H=null,Q=null,M=null;for(Q=F[F.length-1];b.length>0;){if(M=b.shift(),Q&&Q.tag=="<"&&!(M.tag in h))throw new Error("Illegal content in < super tag.");if(e.tags[M.tag]<=e.tags.$||m(M,N))F.push(M),M.nodes=f(b,M.tag,F,N);else if(M.tag=="/"){if(F.length===0)throw new Error("Closing tag without opener: /"+M.n);if(H=F.pop(),M.n!=H.n&&!g(M.n,H.n,N))throw new Error("Nesting error: "+H.n+" vs. "+M.n);return H.end=M.i,L}else M.tag==` 33`&&(M.last=b.length==0||b[0].tag==` 34`);L.push(M)}if(F.length>0)throw new Error("missing closing tag: "+F.pop().n);return L}function m(b,R){for(var F=0,N=R.length;F<N;F++)if(R[F].o==b.n)return b.tag="#",!0}function g(b,R,F){for(var N=0,L=F.length;N<L;N++)if(F[N].c==b&&F[N].o==R)return!0}function v(b){var R=[];for(var F in b)R.push('"'+y(F)+'": function(c,p,t,i) {'+b[F]+"}");return"{ "+R.join(",")+" }"}function p(b){var R=[];for(var F in b.partials)R.push('"'+y(F)+'":{name:"'+y(b.partials[F].name)+'", '+p(b.partials[F])+"}");return"partials: {"+R.join(",")+"}, subs: "+v(b.subs)}e.stringify=function(b,R,F){return"{code: function (c,p,i) { "+e.wrapMain(b.code)+" },"+p(b)+"}"};var S=0;e.generate=function(b,R,F){S=0;var N={code:"",subs:{},partials:{}};return e.walk(b,N),F.asString?this.stringify(N,R,F):this.makeTemplate(N,R,F)},e.wrapMain=function(b){return'var t=this;t.b(i=i||"");'+b+"return t.fl();"},e.template=e.Template,e.makeTemplate=function(b,R,F){var N=this.makePartials(b);return N.code=new Function("c","p","i",this.wrapMain(b.code)),new this.template(N,R,this,F)},e.makePartials=function(b){var R,F={subs:{},partials:b.partials,name:b.name};for(R in F.partials)F.partials[R]=this.makePartials(F.partials[R]);for(R in b.subs)F.subs[R]=new Function("c","p","t","i",b.subs[R]);return F};function y(b){return b.replace(s,"\\\\").replace(n,'\\"').replace(i,"\\n").replace(a,"\\r").replace(o,"\\u2028").replace(c,"\\u2029")}function w(b){return~b.indexOf(".")?"d":"f"}function _(b,R){var F="<"+(R.prefix||""),N=F+b.n+S++;return R.partials[N]={name:b.n,partials:{}},R.code+='t.b(t.rp("'+y(N)+'",c,p,"'+(b.indent||"")+'"));',N}e.codegen={"#":function(b,R){R.code+="if(t.s(t."+w(b.n)+'("'+y(b.n)+'",c,p,1),c,p,0,'+b.i+","+b.end+',"'+b.otag+" "+b.ctag+'")){t.rs(c,p,function(c,p,t){',e.walk(b.nodes,R),R.code+="});c.pop();}"},"^":function(b,R){R.code+="if(!t.s(t."+w(b.n)+'("'+y(b.n)+'",c,p,1),c,p,1,0,0,"")){',e.walk(b.nodes,R),R.code+="};"},">":_,"<":function(b,R){var F={partials:{}
34,code:"",subs:{},inPartial:!0};e.walk(b.nodes,F);var N=R.partials[_(b,R)];N.subs=F.subs,N.partials=F.partials},$:function(b,R){var F={subs:{},code:"",partials:R.partials,prefix:b.n};e.walk(b.nodes,F),R.subs[b.n]=F.code,R.inPartial||(R.code+='t.sub("'+y(b.n)+'",c,p,i);')},"\n":function(b,R){R.code+=O('"\\n"'+(b.last?"":" + i"))},_v:function(b,R){R.code+="t.b(t.v(t."+w(b.n)+'("'+y(b.n)+'",c,p,0)));'},_t:function(b,R){R.code+=O('"'+y(b.text)+'"')},"{":I,"&":I};function I(b,R){R.code+="t.b(t.t(t."+w(b.n)+'("'+y(b.n)+'",c,p,0)));'}function O(b){return"t.b("+b+");"}e.walk=function(b,R){for(var F,N=0,L=b.length;N<L;N++)F=e.codegen[b[N].tag],F&&F(b[N],R);return R},e.parse=function(b,R,F){return F=F||{},f(b,"",[],F.sectionTags||[])},e.cache={},e.cacheKey=function(b,R){return[b,!!R.asString,!!R.disableLambda,R.delimiters,!!R.modelGet].join("||")},e.compile=function(b,R){R=R||{};var F=e.cacheKey(b,R),N=this.cache[F];if(N){var L=N.partials;for(var H in L)delete L[H].instance;return N}return N=this.generate(this.parse(this.scan(b,R.delimiters),b,R),b,R),this.cache[F]=N}})(t)})(cs);var us={};(function(t){(function(e){e.Template=function(f,m,g,v){f=f||{},this.r=f.code||this.r,this.c=g,this.options=v||{},this.text=m||"",this.partials=f.partials||{},this.subs=f.subs||{},this.buf=""},e.Template.prototype={r:function(f,m,g){return""},v:d,t:l,render:function(m,g,v){return this.ri([m],g||{},v)},ri:function(f,m,g){return this.r(f,m,g)},ep:function(f,m){var g=this.partials[f],v=m[g.name];if(g.instance&&g.base==v)return g.instance;if(typeof v=="string"){if(!this.c)throw new Error("No compiler available.");v=this.c.compile(v,this.options)}if(!v)return null;if(this.partials[f].base=v,g.subs){m.stackText||(m.stackText={});for(key in g.subs)m.stackText[key]||(m.stackText[key]=this.activeSub!==void 0&&m.stackText[this.activeSub]?m.stackText[this.activeSub]:this.text);v=n(v,g.subs,g.partials,this.stackSubs,this.stackPartials,m.stackText)}return this.partials[f].instance=v,v},rp:function(f,m,g,v){var p=this.ep(f,g);return p?p.ri(m,g,v):""},rs:function(f,m,g){var v=f[f.length-1];if(!h(v)){g(f,m,this);return}for(var p=0;p<v.length;p++)f.push(v[p]),g(f,m,this),f.pop()},s:function(f,m,g,v,p,S,y){var w;return h(f)&&f.length===0?!1:(typeof f=="function"&&(f=this.ms(f,m,g,v,p,S,y)),w=!!f,!v&&w&&m&&m.push(typeof f=="object"?f:m[m.length-1]),w)},d:function(f,m,g,v){var p,S=f.split("."),y=this.f(S[0],m,g,v),w=this.options.modelGet,_=null;if(f==="."&&h(m[m.length-2]))y=m[m.length-1];else for(var I=1;I<S.length;I++)p=r(S[I],y,w),p!==void 0?(_=y,y=p):y="";return v&&!y?!1:(!v&&typeof y=="function"&&(m.push(_),y=this.mv(y,m,g),m.pop()),y)},f:function(f,m,g,v){for(var p=!1,S=null,y=!1,w=this.options.modelGet,_=m.length-1;_>=0;_--)if(S=m[_],p=r(f,S,w),p!==void 0){y=!0;break}return y?(!v&&typeof p=="function"&&(p=this.mv(p,m,g)),p):v?!1:""},ls:function(f,m,g,v,p){var S=this.options.delimiters;return this.options.delimiters=p,this.b(this.ct(l(f.call(m,v)),m,g)),this.options.delimiters=S,!1},ct:function(f,m,g){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(f,this.options).render(m,g)},b:function(f){this.buf+=f},fl:function(){var f=this.buf;return this.buf="",f},ms:function(f,m,g,v,p,S,y){var w,_=m[m.length-1],I=f.call(_);return typeof I=="function"?v?!0:(w=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(I,_,g,w.substring(p,S),y)):I},mv:function(f,m,g){var v=m[m.length-1],p=f.call(v);return typeof p=="function"?this.ct(l(p.call(v)),v,g):p},sub:function(f,m,g,v){var p=this.subs[f];p&&(this.activeSub=f,p(m,g,this,v),this.activeSub=!1)}};function r(f,m,g){var v;return m&&typeof m=="object"&&(m[f]!==void 0?v=m[f]:g&&m.get&&typeof m.get=="function"&&(v=m.get(f))),v}function n(f,m,g,v,p,S){function y(){}y.prototype=f;function w(){}w.prototype=f.subs;var _,I=new y;I.subs=new w,I.subsText={},I.buf="",v=v||{},I.stackSubs=v,I.subsText=S;for(_ in m)v[_]||(v[_]=m[_]);for(_ in v)I.subs[_]=v[_];p=p||{},I.stackPartials=p;for(_ in g)p[_]||(p[_]=g[_]);for(_ in p)I.partials[_]=p[_];return I}var i=/&/g,a=/</g,s=/>/g,o=/\'/g,c=/\"/g,u=/[&<>\"\']/;function l(f){return String(f==null?"":f)}function d(f){return f=l(f),u.test(f)?f.replace(i,"&").replace(a,"<").replace(s,">").replace(o,"'").replace(c,"""):f}var h=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"}})(t)})(us);var ur=cs;ur.Template=us.Template;ur.template=ur.Template;var Xf=ur;const ls=fr(Xf);var eh=Fs.bind(A),Sr=Jf({createElement:A,Fragment:It});function th(t){var e=t.classNames,r=e===void 0?{}:e,n=K(t,["classNames"]);return A(Sr,P({classNames:{root:x("ais-Highlight",r.root),highlighted:x("ais-Highlight-highlighted",r.highlighted),nonHighlighted:x("ais-Highlight-nonHighlighted",r.nonHighlighted),separator:x("ais-Highlight-separator",r.separator)}},n))}function br(t,e){var r=Array.isArray(e)?e:e.split(".");return r.reduce(function(n,i){return n&&n[i]},t)}var rh={"&":"&","<":"<",">":">",'"':""","'":"'"},fs=/[&<>"']/g,nh=RegExp(fs.source);function ih(t){return t&&nh.test(t)?t.replace(fs,function(e){return rh[e]}):t}var ah={"&":"&","<":"<",">":">",""":'"',"'":"'"},hs=/&(amp|quot|lt|gt|#39);/g,sh=RegExp(hs.source);function wr(t){return t&&sh.test(t)?t.replace(hs,function(e){return ah[e]}):t}
34function oh(t){return t===null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}function ch(t){return(typeof t=="undefined"?"undefined":je(t))==="object"&&t!==null}function ds(t){if(!ch(t)||oh(t)!=="[object Object]")return!1;if(Object.getPrototypeOf(t)===null)return!0;for(var e=t;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}var st={highlightPreTag:"__ais-highlight__",highlightPostTag:"__/ais-highlight__"},ot={highlightPreTag:"<mark>",highlightPostTag:"</mark>"};function ms(t){return ih(t).replace(new RegExp(st.highlightPreTag,"g"),ot.highlightPreTag).replace(new RegExp(st.highlightPostTag,"g"),ot.highlightPostTag)}function lr(t){return ds(t)&&typeof t.value!="string"?Object.keys(t).reduce(function(e,r){return E(P({},e),T({},r,lr(t[r])))},{}):Array.isArray(t)?t.map(lr):E(P({},t),{value:ms(t.value)})}function uh(t){return t.__escaped===void 0&&(t=t.map(function(e){Ki(e);var r=tr({},e);return r._highlightResult&&(r._highlightResult=lr(r._highlightResult)),r._snippetResult&&(r._snippetResult=lr(r._snippetResult)),r}),t.__escaped=!0),t}function lh(t){return t.map(function(e){return E(P({},e),{highlighted:ms(e.highlighted)})})}function _r(t){var e=ot.highlightPostTag,r=ot.highlightPreTag,n=t.split(r),i=n.shift(),a=i?[{value:i,isHighlighted:!1}]:[];return n.forEach(function(s){var o=s.split(e);a.push({value:o[0],isHighlighted:!0}),o[1]!==""&&a.push({value:o[1],isHighlighted:!1})}),a}function Pr(t){return Array.isArray(t)?t:[t]}function fh(t){var e=t.hit,r=t.attribute,n=t.cssClasses,i=K(t,["hit","attribute","cssClasses"]),a=br(e._highlightResult,r)||[],s=Pr(a),o=s.map(function(c){var u=c.value;return _r(wr(u||""))});return A(th,E(P({},i),{parts:o,classNames:n}))}function hh(t){var e=t.classNames,r=e===void 0?{}:e,n=K(t,["classNames"]);return A(Sr,P({classNames:{root:x("ais-ReverseHighlight",r.root),highlighted:x("ais-ReverseHighlight-highlighted",r.highlighted),nonHighlighted:x("ais-ReverseHighlight-nonHighlighted",r.nonHighlighted),separator:x("ais-ReverseHighlight-separator",r.separator)}},n))}function dh(t){var e=t.hit,r=t.attribute,n=t.cssClasses,i=K(t,["hit","attribute","cssClasses"]),a=br(e._highlightResult,r)||[],s=Pr(a),o=s.map(function(c){var u=c.value;return _r(wr(u||"")).map(function(l){var d=l.isHighlighted,h=K(l,["isHighlighted"]);return E(P({},h),{isHighlighted:!d})})});return A(hh,E(P({},i),{parts:o,classNames:n}))}function mh(t){var e=t.classNames,r=e===void 0?{}:e,n=K(t,["classNames"]);return A(Sr,P({classNames:{root:x("ais-Snippet",r.root),highlighted:x("ais-Snippet-highlighted",r.highlighted),nonHighlighted:x("ais-Snippet-nonHighlighted",r.nonHighlighted),separator:x("ais-Snippet-separator",r.separator)}},n))}function gh(t){var e=t.hit,r=t.attribute,n=t.cssClasses,i=K(t,["hit","attribute","cssClasses"]),a=br(e._snippetResult,r)||[],s=Pr(a),o=s.map(function(c){var u=c.value;return _r(wr(u||""))});return A(mh,E(P({},i),{parts:o,classNames:n}))}function ph(t){var e=t.classNames,r=e===void 0?{}:e,n=K(t,["classNames"]);return A(Sr,P({classNames:{root:x("ais-ReverseSnippet",r.root),highlighted:x("ais-ReverseSnippet-highlighted",r.highlighted),nonHighlighted:x("ais-ReverseSnippet-nonHighlighted",r.nonHighlighted),separator:x("ais-ReverseSnippet-separator",r.separator)}},n))}function vh(t){var e=t.hit,r=t.attribute,n=t.cssClasses,i=K(t,["hit","attribute","cssClasses"]),a=br(e._snippetResult,r)||[],s=Pr(a),o=s.map(function(c){var u=c.value;return _r(wr(u||"")).map(function(l){var d=l.isHighlighted,h=K(l,["isHighlighted"]);return E(P({},h),{isHighlighted:!d})})});return A(ph,E(P({},i),{parts:o,classNames:n}))}function yh(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;return Object.keys(t).reduce(function(n,i){return E(P({},n),T({},i,function(){var a=this;return function(s){var o=function(u){return ls.compile(u,e).render(a)};return t[i].call(r,s,o)}}))},{})}function Rh(t){var e=t.templates,r=t.templateKey,n=t.compileOptions,i=t.helpers,a=t.data,s=t.bindEvent,o=t.sendEvent,c=e[r];if(typeof c!="string"&&typeof c!="function")throw new Error("Template must be 'string' or 'function', was '".concat(typeof c=="undefined"?"undefined":je(c),"' (key: ").concat(r,")"));if(typeof c=="function"){var u=s||{};return u.html=eh,u.sendEvent=o,u.components={Highlight:fh,ReverseHighlight:dh,Snippet:gh,ReverseSnippet:vh},c(a,u)}var l=yh(i,n,a);
34return ls.compile(c,n).render(E(P({},a),{helpers:l})).replace(/[ \n\r\t\f\xA0]+/g,function(d){return d.replace(/(^|\xA0+)[^\xA0]+/g,"$1 ")}).trim()}var Sh=function(t){$t(e,t);function e(){ze(this,e);var r;return r=Ot(this,e,arguments),T(r,"ref",er()),T(r,"nodes",[]),r}return Ge(e,[{key:"componentDidMount",value:function(){var n=new DocumentFragment,i=document.createElement("div");i.innerHTML=this.props.content,this.nodes=ge(i.childNodes),this.nodes.forEach(function(a){return n.appendChild(a)}),this.ref.current.replaceWith(n)}},{key:"componentWillUnmount",value:function(){this.nodes.forEach(function(n){if(Nt(n,Element)){n.outerHTML="";return}n.nodeValue=""}),this.nodes[0]&&this.nodes[0].nodeValue&&(this.nodes[0].nodeValue="")}},{key:"render",value:function(){return A("div",{ref:this.ref})}}]),e}(hr),bh={data:{},rootTagName:"div",useCustomCompileOptions:{},templates:{},templatesConfig:{}},ie=function(t){$t(e,t);function e(){return ze(this,e),Ot(this,e,arguments)}return Ge(e,[{key:"shouldComponentUpdate",value:function(n){return!cr(this.props.data,n.data)||this.props.templateKey!==n.templateKey||!cr(this.props.rootProps,n.rootProps)}},{key:"render",value:function(){var n=this.props.rootTagName==="fragment"?It:this.props.rootTagName,i=this.props.useCustomCompileOptions[this.props.templateKey],a=i?this.props.templatesConfig.compileOptions:{},s=Rh({templates:this.props.templates,templateKey:this.props.templateKey,compileOptions:a,helpers:this.props.templatesConfig.helpers,data:this.props.data,bindEvent:this.props.bindEvent,sendEvent:this.props.sendEvent});return s===null?null:(typeof s=="undefined"?"undefined":je(s))==="object"?A(n,this.props.rootProps,s):n===It?A(Sh,{content:s,key:Math.random()}):A(n,E(P({},this.props.rootProps),{dangerouslySetInnerHTML:{__html:s}}))}}]),e}(hr);T(ie,"defaultProps",bh);function wh(t){var e=t.name,r=t.connector,n=r===void 0?!1:r;return["https://www.algolia.com/doc/api-reference/widgets/",e,"/js/",n?"#connector":""].join("")}function ne(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=e.map(function(i){return wh(i)}).join(", ");return function(i){return[i,"See documentation: ".concat(n)].filter(Boolean).join(` 35 36`)}}function _h(t){return Object.prototype.toString.call(t).slice(8,-1)}function ke(t,e){if(t===void 0||typeof t!="function")throw new Error("The render function is not valid (received type ".concat(_h(t),`). 37 38`).concat(e))}function Ph(t,e,r){return t.map(function(n,i){return E(P({},n),{__position:r*e+i+1})})}function Fh(t,e){return e?t.map(function(r){return E(P({},r),{__queryID:e})}):t}function oe(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r]}var Eh="ais",He=function(e){return function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=r.descendantName,i=r.modifierName,a=n?"-".concat(n):"",s=i?"--".concat(i):"";return"".concat(Eh,"-").concat(e).concat(a).concat(s)}};function Ih(t){return Nt(t,HTMLElement)||!!t&&t.nodeType>0}function $e(t){var e=typeof t=="string",r=e?document.querySelector(t):t;if(!Ih(r)){var n="Container must be `string` or `HTMLElement`.";throw e&&(n+=" Unable to find ".concat(t)),new Error(n)}return r}function Fr(t){return t.filter(function(e,r,n){return n.indexOf(e)===r})}function xh(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=Fr(ge(Object.keys(t||{})).concat(ge(Object.keys(e))));return r.reduce(function(n,i){var a=t?t[i]:void 0,s=e[i],o=s!==void 0&&s!==a;return n.templates[i]=o?s:a,n.useCustomCompileOptions[i]=o,n},{templates:{},useCustomCompileOptions:{}})}function ct(t){var e=t.defaultTemplates,r=t.templates,n=t.templatesConfig,i=xh(e,r);return P({templatesConfig:n},i)}function Th(t,e){if(!Array.isArray(t))return-1;for(var r=0;r<t.length;r++)if(e(t[r]))return r;return-1}var Ch=function(e,r){r.facets,r.disjunctiveFacets,r.facetsRefinements,r.facetsExcludes,r.disjunctiveFacetsRefinements,r.numericRefinements,r.tagRefinements,r.hierarchicalFacets,r.hierarchicalFacetsRefinements,r.ruleContexts;var n=K(r,["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"]);return e.setQueryParameters(n)},Ah=function(e,r){return r.facets.reduce(function(n,i){return n.addFacet(i)},e)},Nh=function(e,r){return r.disjunctiveFacets.reduce(function(n,i){return n.addDisjunctiveFacet(i)},e)},Oh=function(e,r){return e.setQueryParameters({hierarchicalFacets:r.hierarchicalFacets.reduce(function(n,i){var a=Th(n,function(o){return o.name===i.name});if(a===-1)return n.concat(i);var s=n.slice();return s.splice(a,1,i),s},e.hierarchicalFacets)})},$h=function(e,r){return r.tagRefinements.reduce(function(n,i){return n.addTagRefinement(i)},e)},jh=function(e,r){return e.setQueryParameters({facetsRefinements:P({},e.facetsRefinements,r.facetsRefinements)})},Hh=function(e,r){return e.setQueryParameters({facetsExcludes:P({},e.facetsExcludes,r.facetsExcludes)})},Lh=function(e,r){return e.setQueryParameters({disjunctiveFacetsRefinements:P({},e.disjunctiveFacetsRefinements,r.disjunctiveFacetsRefinements)})},Mh=function(e,r){return e.setQueryParameters({numericRefinements:P({},e.numericRefinements,r.numericRefinements)})},Dh=function(e,r){return e.setQueryParameters({hierarchicalFacetsRefinements:P({},e.hierarchicalFacetsRefinements,r.hierarchicalFacetsRefinements)})},Wh=function(e,r){var n=Fr([].concat(e.ruleContexts).concat(r.ruleContexts).filter(
38Boolean));return n.length>0?e.setQueryParameters({ruleContexts:n}):e},Xt=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return r.reduce(function(i,a){var s=Dh(i,a),o=Oh(s,a),c=$h(o,a),u=Mh(c,a),l=Lh(u,a),d=Hh(l,a),h=jh(d,a),f=Nh(h,a),m=Wh(f,a),g=Ah(m,a);return Ch(g,a)})},Uh=ne({name:"configure",connector:!0});function Li(t,e){return t.setQueryParameters(Object.keys(e.searchParameters).reduce(function(r,n){return E(P({},r),T({},n,void 0))},{}))}var kh=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:oe,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oe;return function(n){if(!n||!ds(n.searchParameters))throw new Error(Uh("The `searchParameters` option expects an object."));var i={};function a(s){return function(o){var c=Li(s.state,n),u=Xt(c,new ae.SearchParameters(o));n.searchParameters=o,s.setState(u).search()}}return{$$type:"ais.configure",init:function(o){var c=o.instantSearchInstance;e(E(P({},this.getWidgetRenderState(o)),{instantSearchInstance:c}),!0)},render:function(o){var c=o.instantSearchInstance;e(E(P({},this.getWidgetRenderState(o)),{instantSearchInstance:c}),!1)},dispose:function(o){var c=o.state;return r(),Li(c,n)},getRenderState:function(o,c){var u,l=this.getWidgetRenderState(c);return E(P({},o),{configure:E(P({},l),{widgetParams:E(P({},l.widgetParams),{searchParameters:Xt(new ae.SearchParameters((u=o.configure)===null||u===void 0?void 0:u.widgetParams.searchParameters),new ae.SearchParameters(l.widgetParams.searchParameters)).getQueryParams()})})})},getWidgetRenderState:function(o){var c=o.helper;return i.refine||(i.refine=a(c)),{refine:i.refine,widgetParams:n}},getWidgetSearchParameters:function(o,c){var u=c.uiState;return Xt(o,new ae.SearchParameters(P({},u.configure,n.searchParameters)))},getWidgetUiState:function(o){return E(P({},o),{configure:P({},o.configure,n.searchParameters)})}}}},Bh=function(e){var r=kh(oe);return E(P({},r({searchParameters:e})),{$$widgetType:"ais.configure"})};function Qh(t){return btoa(encodeURIComponent(JSON.stringify(t)))}function gs(t){return JSON.parse(decodeURIComponent(atob(t)))}function qh(t){for(var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:20,r=[],n=0;n<Math.ceil(t.length/e);n++)r.push(t.slice(n*e,(n+1)*e));return r}function ps(t){var e=t.helper,r=t.widgetType;t.methodName;var n=t.args,i=t.instantSearchInstance;if(n.length===1&&je(n[0])==="object")return[n[0]];var a=se(n[0].split(":"),2),s=a[0],o=a[1],c=n[1],u=n[2],l=n[3]||{};if(!c)return[];if((s==="click"||s==="conversion")&&!u)return[];var d=Array.isArray(c)?c:[c];if(d.length===0)return[];var h=d[0].__queryID,f=qh(d),m=f.map(function(v){return v.map(function(p){return p.objectID})}),g=f.map(function(v){return v.map(function(p){return p.__position})});return s==="view"?i.status!=="idle"?[]:f.map(function(v,p){var S;return{insightsMethod:"viewedObjectIDs",widgetType:r,eventType:s,payload:P({eventName:u||"Hits Viewed",index:((S=e.lastResults)===null||S===void 0?void 0:S.index)||e.state.index,objectIDs:m[p]},l),hits:v,eventModifier:o}}):s==="click"?f.map(function(v,p){var S;return{insightsMethod:"clickedObjectIDsAfterSearch",widgetType:r,eventType:s,payload:P({eventName:u||"Hit Clicked",index:((S=e.lastResults)===null||S===void 0?void 0:S.index)||e.state.index,queryID:h,objectIDs:m[p],positions:g[p]},l),hits:v,eventModifier:o}}):s==="conversion"?f.map(function(v,p){var S;return{insightsMethod:"convertedObjectIDsAfterSearch",widgetType:r,eventType:s,payload:P({eventName:u||"Hit Converted",index:((S=e.lastResults)===null||S===void 0?void 0:S.index)||e.state.index,queryID:h,objectIDs:m[p]},l),hits:v,eventModifier:o}}):[]}function Vh(t){var e=t.instantSearchInstance,r=t.helper,n=t.widgetType,i={},a=void 0,s=function(){for(var c=arguments.length,u=new Array(c),l=0;l<c;l++)u[l]=arguments[l];var d=ps({widgetType:n,helper:r,methodName:"sendEvent",args:u,instantSearchInstance:e});d.forEach(function(h){h.eventType==="click"&&h.eventModifier==="internal"&&i[h.eventType]||(i[h.eventType]=!0,e.sendEventToInsights(h))}),clearTimeout(a),a=setTimeout(function(){i={}},0)};return s}function Kh(t){var e=t.helper,r=t.widgetType,n=t.instantSearchInstance,i=function(){for(var s=arguments.length,o=new Array(s),c=0;c<s;c++)o[c]=arguments[c];var u=ps({widgetType:r,helper:e,methodName:"bindEvent",args:o,instantSearchInstance:n});return u.length?"data-insights-event=".concat(Qh(u)):""};return i}var zh=ne({name:"search-box",connector:!0}),Gh=function(e,r){return r(e)},Jh=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oe;return ke(e,zh()),function(n){var i=n||{},a=i.queryHook,s=a===void 0?Gh:a,o,c;return{$$type:"ais.searchBox",init:function(l){var d=l.instantSearchInstance;e(E(P({},this.getWidgetRenderState(l)),{instantSearchInstance:d}),!0)},render:function(l){var d=l.instantSearchInstance;e(E(P({},this.getWidgetRenderState(l)),{instantSearchInstance:d}),!1)},dispose:function(l){var d=l.state;return r(),d.setQueryParameter("query",void 0)},getRenderState:function(l,d){return E(P({},l),{searchBox:this.getWidgetRenderState(d)})},getWidgetRenderState:function(l){var d=l.helper,h=l.instantSearchInstance,f=l.state;return o||(o=function(g){s(g,function(v){return d.setQuery(v).search()})},c=function(){d.setQuery("").search()}),{query:f.query||"",refine:o,clear:c,widgetParams:n,isSearchStalled:h.status==="stalled"}},getWidgetUiState:function(l,d){var h=d.searchParameters,f=h.query||"";return f===""||l&&l.query===f?l:E(P({},l),{query:f})},getWidgetSearchParameters:function(l,d){var h=d.uiState;return l.setQueryParameter("query",h.query||"")}}}};function Yh(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.message,n=e.referer,i,a;if(!t)return!1;(a=t.setOpen)===null||a===void 0||a.call(t,!0);var s=(i=r==null?void 0:r.trim())!==null&&i!==void 0?i:"";if(!s){var o;return(o=t.focusInput)===null||o===void 0||o.call(t),!1}return vs(t)||!t.sendMessage?!1:(t.sendMessage({text:s},n?{headers:{"x-algolia-referer":n}}:void 0),!0)}function vs(t){return(t==null?void 0:t.status)==="submitted"||(t==null?void 0:t.status)==="streaming"}function Ct(t,e){for(var r,n=0;n<t.length;n++)if(r=t[n],e(r,n,t))return r}function ys(t){var e=t.button===1;return e||t.altKey||t.ctrlKey||t.metaKey||t.shiftKey}
38var Zh=function(e){var r=e.hasRefinements,n=e.refine,i=e.cssClasses,a=e.templateProps;return A("div",{className:i.root},A(ie,E(P({},a),{templateKey:"resetLabel",rootTagName:"button",rootProps:{className:x(i.button,!r&&i.disabledButton),onClick:n,disabled:!r},data:{hasRefinements:r}})))};function Xh(t){return typeof t=="string"?t.replace(/^\\-/,"-"):t}function ed(t){return typeof t=="number"&&t<0||typeof t=="string"?String(t).replace(/^-/,"\\-"):t}function rn(t,e,r,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],a={type:e,attribute:r,name:n,escapedValue:ed(n)},s=Ct(i,function(f){return f.name===r}),o;if(e==="hierarchical"){for(var c=function(f){s=s&&s.data&&Ct(Object.keys(s.data).map(d(s.data)),function(m){return m.name===l[f]})},u=t.getHierarchicalFacetByName(r),l=n.split(u.separator),d=function(m){return function(g){return m[g]}},h=0;s!==void 0&&h<l.length;++h)c(h);o=s&&s.count}else o=s&&s.data&&s.data[a.name];return o!==void 0&&(a.count=o),s&&s.exhaustive!==void 0&&(a.exhaustive=s.exhaustive),a}function td(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=t||{},i=[],a=e.facetsRefinements,s=a===void 0?{}:a,o=e.facetsExcludes,c=o===void 0?{}:o,u=e.disjunctiveFacetsRefinements,l=u===void 0?{}:u,d=e.hierarchicalFacetsRefinements,h=d===void 0?{}:d,f=e.numericRefinements,m=f===void 0?{}:f,g=e.tagRefinements,v=g===void 0?[]:g;return Object.keys(s).forEach(function(p){var S=s[p];S.forEach(function(y){i.push(rn(e,"facet",p,y,n.facets))})}),Object.keys(c).forEach(function(p){var S=c[p];S.forEach(function(y){i.push({type:"exclude",attribute:p,name:y,exclude:!0})})}),Object.keys(l).forEach(function(p){var S=l[p];S.forEach(function(y){i.push(rn(e,"disjunctive",p,Xh(y),n.disjunctiveFacets))})}),Object.keys(h).forEach(function(p){var S=h[p];S.forEach(function(y){i.push(rn(e,"hierarchical",p,y,n.hierarchicalFacets))})}),Object.keys(m).forEach(function(p){var S=m[p];Object.keys(S).forEach(function(y){var w=y,_=S[w],I=Array.isArray(_)?_:[_];I.forEach(function(O){i.push({type:"numeric",attribute:p,name:"".concat(O),numericValue:O,operator:w})})})}),v.forEach(function(p){i.push({type:"tag",attribute:"_tags",name:p})}),r&&e.query&&e.query.trim()&&i.push({attribute:"query",type:"query",name:e.query,query:e.query}),i}function Mi(t){var e=t.helper,r=t.attributesToClear,n=r===void 0?[]:r,i=e.state.setPage(0);return i=n.reduce(function(a,s){return i.isNumericRefined(s)?a.removeNumericRefinement(s):i.isHierarchicalFacet(s)?a.removeHierarchicalFacetRefinement(s):i.isDisjunctiveFacet(s)?a.removeDisjunctiveFacetRefinement(s):i.isConjunctiveFacet(s)?a.removeFacetRefinement(s):a},i),n.indexOf("query")!==-1&&(i=i.setQuery("")),i}var Di=ne({name:"clear-refinements",connector:!0}),rd=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oe;return ke(e,Di()),function(n){var i=n||{},a=i.includedAttributes,s=a===void 0?[]:a,o=i.excludedAttributes,c=o===void 0?["query"]:o,u=i.transformItems,l=u===void 0?function(m){return m}:u;if(n&&n.includedAttributes&&n.excludedAttributes)throw new Error(Di("The options `includedAttributes` and `excludedAttributes` cannot be used together."));var d={refine:oe,createURL:function(){return""},attributesToClear:[]},h=function(){return d.refine()},f=function(){return d.createURL()};return{$$type:"ais.clearRefinements",init:function(g){var v=g.instantSearchInstance;e(E(P({},this.getWidgetRenderState(g)),{instantSearchInstance:v}),!0)},render:function(g){var v=g.instantSearchInstance;e(E(P({},this.getWidgetRenderState(g)),{instantSearchInstance:v}),!1)},dispose:function(){r()},getRenderState:function(g,v){return E(P({},g),{clearRefinements:this.getWidgetRenderState(v)})},getWidgetRenderState:function(g){var v=g.createURL,p=g.scopedResults,S=g.results;d.attributesToClear=p.reduce(function(w,_){return w.concat(nd({scopedResult:_,includedAttributes:s,excludedAttributes:c,transformItems:l,results:S}))},[]),d.refine=function(){d.attributesToClear.forEach(function(w){var _=w.helper,I=w.items;_.setState(Mi({helper:_,attributesToClear:I})).search()})},d.createURL=function(){return v(Xt.apply(void 0,ge(d.attributesToClear.map(function(w){var _=w.helper,I=w.items;return Mi({helper:_,attributesToClear:I})}))))};var y=d.attributesToClear.some(function(w){return w.items.length>0});return{canRefine:y,hasRefinements:y,refine:h,createURL:f,widgetParams:n}}}}};
38function nd(t){var e=t.scopedResult,r=t.includedAttributes,n=t.excludedAttributes,i=t.transformItems,a=t.results,s=r.indexOf("query")!==-1||n.indexOf("query")===-1;return{helper:e.helper,items:i(Fr(td(e.results,e.helper.state,s).map(function(o){return o.attribute}).filter(function(o){return r.length===0||r.indexOf(o)!==-1}).filter(function(o){return o==="query"&&s||n.indexOf(o)===-1})),{results:a})}}var id={resetLabel:function(){return"Clear refinements"}},ad=ne({name:"clear-refinements"}),nn=He("ClearRefinements"),sd=function(e){var r=e.containerNode,n=e.cssClasses,i=e.renderState,a=e.templates;return function(s,o){var c=s.refine,u=s.canRefine,l=s.instantSearchInstance;if(o){i.templateProps=ct({defaultTemplates:id,templatesConfig:l.templatesConfig,templates:a});return}ue(A(Zh,{refine:c,cssClasses:n,hasRefinements:u,templateProps:i.templateProps}),r)}},od=function(e){var r=e||{},n=r.container,i=r.templates,a=i===void 0?{}:i,s=r.includedAttributes,o=r.excludedAttributes,c=r.transformItems,u=r.cssClasses,l=u===void 0?{}:u;if(!n)throw new Error(ad("The `container` option is required."));var d=$e(n),h={root:x(nn(),l.root),button:x(nn({descendantName:"button"}),l.button),disabledButton:x(nn({descendantName:"button",modifierName:"disabled"}),l.disabledButton)}
38,f=sd({containerNode:d,cssClasses:h,renderState:{},templates:a}),m=rd(f,function(){return ue(null,d)});return E(P({},m({includedAttributes:s,excludedAttributes:o,transformItems:c})),{$$widgetType:"ais.clearRefinements"})},cd={query:"",showSubmit:!0,showReset:!0,showLoadingIndicator:!0,autofocus:!1,searchAsYouType:!0,ignoreCompositionEvents:!1,isSearchStalled:!1,disabled:!1,ariaLabel:"Search",onChange:oe,onSubmit:oe,onReset:oe,refine:oe,inputProps:{}},Dn=function(t){$t(e,t);function e(){ze(this,e);var r;return r=Ot(this,e,arguments),T(r,"state",{query:r.props.query,focused:!1}),T(r,"input",er()),T(r,"onInput",function(n){var i,a;(i=(a=r.props.inputProps).onInput)===null||i===void 0||i.call(a,n);var s=r.props,o=s.searchAsYouType,c=s.refine,u=s.onChange,l=n.target.value;r.props.ignoreCompositionEvents&&n.isComposing||(o&&c(l),r.setState({query:l}),u(n))}),T(r,"onSubmit",function(n){var i=r.props,a=i.searchAsYouType,s=i.refine,o=i.onSubmit;return n.preventDefault(),n.stopPropagation(),r.input.current&&r.input.current.blur(),a||s(r.state.query),o(n),!1}),T(r,"onReset",function(n){var i=r.props,a=i.refine,s=i.onReset,o="";r.input.current&&r.input.current.focus(),a(o),r.setState({query:o}),s(n)}),T(r,"onBlur",function(n){var i,a;(i=(a=r.props.inputProps).onBlur)===null||i===void 0||i.call(a,n),r.setState({focused:!1})}),T(r,"onFocus",function(n){var i,a;(i=(a=r.props.inputProps).onFocus)===null||i===void 0||i.call(a,n),r.setState({focused:!0})}),T(r,"onAiModeClick",function(n){var i,a;n.preventDefault(),(i=(a=r.props).onAiModeClick)===null||i===void 0||i.call(a,r.state.query)}),r}return Ge(e,[{key:"resetInput",value:function(){this.setState({query:""})}},{key:"componentWillReceiveProps",value:function(n){!this.state.focused&&n.query!==this.state.query&&this.setState({query:n.query})}},{key:"render",value:function(){var n=this.props,i=n.cssClasses,a=n.placeholder,s=n.autofocus,o=n.showSubmit,c=n.showReset,u=n.showLoadingIndicator,l=n.templates,d=n.isSearchStalled,h=n.ariaLabel,f=n.inputProps,m=n.onAiModeClick,g=n.aiModeButtonDisabled;return A("div",{className:i.root},A("form",{action:"",role:"search",className:i.form,noValidate:!0,onSubmit:this.onSubmit,onReset:this.onReset},A("input",E(P({},f),{ref:this.input,value:this.state.query,disabled:this.props.disabled,className:i.input,type:"search",placeholder:a,autoFocus:s,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:"false",maxLength:512,onInput:this.onInput,oncompositionend:this.onInput,onBlur:this.onBlur,onFocus:this.onFocus,"aria-label":h})),A(ie,{templateKey:"submit",rootTagName:"button",rootProps:{className:i.submit,type:"submit",title:"Submit the search query",hidden:!o},templates:l,data:{cssClasses:i}}),A(ie,{templateKey:"reset",rootTagName:"button",rootProps:{className:i.reset,type:"reset",title:"Clear the search query",hidden:!(c&&this.state.query.trim()&&!d)},templates:l,data:{cssClasses:i}}),u&&A(ie,{templateKey:"loadingIndicator",rootTagName:"span",rootProps:{className:i.loadingIndicator,hidden:!d},templates:l,data:{cssClasses:i}}),m&&A(ie,{templateKey:"aiMode",rootTagName:"button",rootProps:{className:i.aiModeButton,type:"button",title:"AI Mode",disabled:g,onClick:this.onAiModeClick},templates:l,data:{cssClasses:i}})))}}]),e}(hr);T(Dn,"defaultProps",cd);function ud(t){var e=t.className,r=t.handleClick,n=t.facetValueToRefine,i=t.isRefined,a=t.templateProps,s=t.templateKey,o=t.templateData,c=t.subItems;return A("li",{className:e,onClick:function(l){r({facetValueToRefine:n,isRef
38ined:i,originalEvent:l})}},A(ie,E(P({},a),{templateKey:s,data:o})),c)}var ld={cssClasses:{},depth:0};function Wi(t){return t.data!==void 0}var Rs=function(t){$t(e,t);function e(){ze(this,e);var r;return r=Ot(this,e,arguments),T(r,"listRef",er()),T(r,"searchBox",er()),T(r,"lastRefinedValue",void 0),T(r,"_generateFacetItem",function(n){var i;if(Wi(n)&&Array.isArray(n.data)&&n.data.length>0){var a=r.props.cssClasses;a.root;var s=K(a,["root"]);i=A(e,E(P({},r.props),{cssClasses:s,depth:r.props.depth+1,facetValues:n.data,showMore:!1,className:r.props.cssClasses.childList}))}var o=r.props.createURL(n.value),c=E(P({},n),{url:o,attribute:r.props.attribute,cssClasses:r.props.cssClasses,isFromSearch:r.props.isFromSearch}),u=n.value;n.isRefined!==void 0&&(u+="/".concat(n.isRefined)),n.count!==void 0&&(u+="/".concat(n.count));var l=x(r.props.cssClasses.item,n.isRefined&&r.props.cssClasses.selectedItem,!n.count&&r.props.cssClasses.disabledItem,!!(Wi(n)&&Array.isArray(n.data)&&n.data.length>0)&&r.props.cssClasses.parentItem);return A(ud,{templateKey:"item",key:u,facetValueToRefine:n.value,handleClick:r.handleItemClick,isRefined:n.isRefined,className:l,subItems:i,templateData:c,templateProps:r.props.templateProps})}),T(r,"handleItemClick",function(n){var i=n.facetValueToRefine,a=n.isRefined,s=n.originalEvent;if(!ys(s)){var o=s.target;if(!(o===null||o.parentNode===null)&&!(a&&o.parentNode.querySelector('input[type="radio"]:checked'))){if(o.tagName==="INPUT"){r.refine(i);return}for(;o!==s.currentTarget;){if(o.tagName==="LABEL"&&(o.querySelector('input[type="checkbox"]')||o.querySelector('input[type="radio"]')))return;o.tagName==="A"&&o.href&&s.preventDefault(),o=o.parentNode}s.stopPropagation(),r.refine(i)}}}),r}return Ge(e,[{key:"shouldComponentUpdate",value:function(n){var i=!cr(this.props.facetValues,n.facetValues);return i}},{key:"refine",value:function(n){this.lastRefinedValue=n,this.props.toggleRefinement(n)}},{key:"componentWillReceiveProps",value:function(n){this.searchBox.current&&!n.isFromSearch&&this.searchBox.current.resetInput()}},{key:"componentDidUpdate",value:function(){for(var n,i=((n=this.listRef.current)===null||n===void 0?void 0:n.getElementsByTagName("input"))||[],a=0;a<i.length;a++)if(i[a].value===this.lastRefinedValue){i[a].focus();break}this.lastRefinedValue=void 0}},{key:"refineFirstValue",value:function(){if(this.props.searchableSelectOnSubmit!==!1){var n=this.props.facetValues&&this.props.facetValues[0];if(n){var i=n.value;this.props.toggleRefinement(i)}}}},{key:"render",value:function(){var n=this,i=x(this.props.cssClasses.showMore,!(this.props.showMore===!0&&this.props.canToggleShowMore)&&this.props.cssClasses.disabledShowMore),a=this.props.showMore===!0&&A(ie,E(P({},this.props.templateProps),{templateKey:"showMoreText",rootTagName:"button",rootProps:{className:i,disabled:!this.props.canToggleShowMore,onClick:this.props.toggleShowMore},data:{isShowingMore:this.props.isShowingMore}})),s=this.props.searchIsAlwaysActive!==!0&&!(this.props.isFromSearch||!this.props.hasExhaustiveItems),o=this.props.searchFacetValues&&A("div",{className:this.props.cssClasses.searchBox},A(Dn,{ref:this.searchBox,placeholder:this.props.searchPlaceholder,disabled:s,cssClasses:this.props.cssClasses.searchable,templates:this.props.searchBoxTemplateProps.templates,onChange:function(h){return n.props.searchFacetValues(h.target.value)},onReset:function(){return n.props.searchFacetValues("")},onSubmit:function(){return n.refineFirstValue()},searchAsYouType:!1,ariaLabel:"Search for filters"})),c=this.props.facetValues&&this.props.facetValues.length>0&&A("ul",{ref:this.listRef,className:this.props.cssClasses.list},this.props.facetValues.map(this._generateFacetItem,this)),u=this.props.searchFacetValues&&this.props.isFromSearch&&(!this.props.facetValues||this.props.facetValues.length===0)&&A(ie,E(P({},this.props.templateProps),{templateKey:"searchableNoResults",rootProps:{className:this.props.cssClasses.noResults}})),l=x(this.props.cssClasses.root,(!this.props.facetValues||this.props.facetValues.length===0)&&this.props.cssClasses.noRefinementRoot,this.props.className);return A("div",{className:l},this.props.children,o,c,u,a)}}]),e}(hr);T(Rs,"defaultProps",ld);function fd(t,e,r){return t.state.isHierarchicalFacet(e)?t.state.isHierarchicalFacetRefined(e,r):t.state.isConjunctiveFacet(e)?t.state.isFacetRefined(e,r):t.state.isDisjunctiveFacetRefined(e,r)}function Ss(t){var e=t.instantSearchInstance,r=t.helper,n=t.attribute,i=t.widgetType,a=function(){for(var o=arguments.length,c=new Array(o),u=0;u<o;u++)c[u]=arguments[u];var l=se(c,4),d=l[1],h=l[2],f=h===void 0?"Filter Applied":h,m=l[3],g=m===void 0?{}:m,v=se(c[0].split(":"),2),p=v[0],S=v[1],y=typeof n=="string"?n:n(d);if(c.length===1&&je(c[0])==="object")e.sendEventToInsights(c[0]);else if(p==="click"&&c.length>=2&&c.length<=4&&!fd(r,y,d)){var w;e.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:i,eventType:p,eventModifier:S,payload:P({eventName:f,index:((w=r.lastResults)===null||w===void 0?void 0:w.index)||r.state.index,filters:["".concat(y,":").concat(d)]},g),attribute:y})}};return a}
38function At(t,e){return t.toLocaleString(e)}var hd=ne({name:"hits",connector:!0}),dd=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oe;return ke(e,hd()),function(n){var i=n||{},a=i.escapeHTML,s=a===void 0?!0:a,o=i.transformItems,c=o===void 0?function(d){return d}:o,u,l;return{$$type:"ais.hits",init:function(h){e(E(P({},this.getWidgetRenderState(h)),{instantSearchInstance:h.instantSearchInstance}),!0)},render:function(h){var f=this.getWidgetRenderState(h);e(E(P({},f),{instantSearchInstance:h.instantSearchInstance}),!1),f.sendEvent("view:internal",f.items)},getRenderState:function(h,f){return E(P({},h),{hits:this.getWidgetRenderState(f)})},getWidgetRenderState:function(h){var f=h.results,m=h.helper,g=h.instantSearchInstance,v,p,S;if(u||(u=Vh({instantSearchInstance:g,helper:m,widgetType:this.$$type})),l||(l=Kh({helper:m,widgetType:this.$$type,instantSearchInstance:g})),!f)return{hits:[],items:[],results:void 0,banner:void 0,sendEvent:u,bindEvent:l,widgetParams:n};s&&f.hits.length>0&&(f.hits=uh(f.hits));var y=Ph(f.hits,f.page,f.hitsPerPage),w=Fh(y,f.queryID),_=c(w,{results:f}),I=(S=f.renderingContent)===null||S===void 0||(p=S.widgets)===null||p===void 0||(v=p.banners)===null||v===void 0?void 0:v[0];return{hits:_,items:_,results:f,banner:I,sendEvent:u,bindEvent:l,widgetParams:n}},dispose:function(h){var f=h.state;return r(),s?f.setQueryParameters(Object.keys(st).reduce(function(m,g){return E(P({},m),T({},g,void 0))},{})):f},getWidgetSearchParameters:function(h,f){return s?h.setQueryParameters(st):h}}}};function md(t){var e=t.getAttribute("data-insights-method"),r=t.getAttribute("data-insights-payload");if(typeof r!="string")throw new Error("The insights helper expects `data-insights-payload` to be a base64-encoded JSON string.");try{var n=gs(r);return{method:e,payload:n}}catch(i){throw new Error("The insights helper was unable to parse `data-insights-payload`.")}}var gd=function(e){var r=e.insights,n=e.sendEvent;return function(i){var a=Ui(i.target,i.currentTarget,function(d){return d.hasAttribute("data-insights-event")});if(a){var s=pd(a);s.forEach(function(d){return n(d)})}var o=Ui(i.target,i.currentTarget,function(d){return d.hasAttribute("data-insights-method")&&d.hasAttribute("data-insights-payload")});if(o){var c=md(o),u=c.method,l=c.payload;r(u,l)}}};function Ui(t,e,r){for(var n=t;n&&!r(n);){if(n===e)return null;n=n.parentElement}return n}function pd(t){var e=t.getAttribute("data-insights-event");
38if(typeof e!="string")throw new Error("The insights middleware expects `data-insights-event` to be a base64-encoded JSON string.");try{return gs(e)}catch(r){throw new Error("The insights middleware was unable to parse `data-insights-event`.")}}function vd(t,e){return t==null?t:Object.keys(t).reduce(function(r,n){if(e.indexOf(n)>=0)return r;var i=n;return r[i]=t[i],r},{})}var yd={empty:function(){return"No results"},item:function(e){return A(It,null,JSON.stringify(vd(e,["__hitIndex"]),null,2))}},Rd=function(e,r){return r.map(function(n){var i=Ct(e,function(a){return a.objectID===n});if(typeof i=="undefined")throw new Error('Could not find objectID "'.concat(n,'" passed to `clickedObjectIDsAfterSearch` in the returned hits. This is necessary to infer the absolute position and the query ID.'));return i})},Sd=function(e){var r=Fr(e.map(function(i){return i.__queryID}));if(r.length>1)throw new Error("Insights currently allows a single `queryID`. The `objectIDs` provided map to multiple `queryID`s.");var n=r[0];if(typeof n!="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 n},bd=function(e){return e.map(function(r){return r.__position})},wd=function(e){var r=e.method,n=e.results,i=e.hits,a=e.objectIDs,s=n.index,o=Rd(i,a),c=Sd(o);switch(r){case"clickedObjectIDsAfterSearch":{var u=bd(o);return{index:s,queryID:c,objectIDs:a,positions:u}}case"convertedObjectIDsAfterSearch":return{index:s,queryID:c,objectIDs:a};default:throw new Error('Unsupported method passed to insights: "'.concat(r,'".'))}},_d=function(e,r,n){return function(i){for(var a=arguments.length,s=new Array(a>1?a-1:0),o=1;o<a;o++)s[o-1]=arguments[o];var c=se(s,1),u=c[0];if(!e){var l=ne({name:"instantsearch"});throw new Error(l("The `insightsClient` option has not been provided to `instantsearch`."))}if(!Array.isArray(u.objectIDs))throw new TypeError("Expected `objectIDs` to be an array.");var d=wd({method:i,results:r,hits:n,objectIDs:u.objectIDs});e(i,P({},d,u))}};function Pd(t){return function(e,r){return t(function(n,i){var a=n.results,s=n.hits,o=n.instantSearchInstance;if(a&&s&&o){var c=_d(o.insightsClient,a,s);return e(E(P({},n),{insights:c}),i)}return e(n,i)},r)}}var Fd=ne({name:"hits"}),Ed=Zf({createElement:A}),Id=function(e){var r=e.renderState,n=e.cssClasses,i=e.containerNode,a=e.templates;return function(s,o){var c=s.items,u=s.results,l=s.instantSearchInstance,d=s.insights,h=s.bindEvent,f=s.sendEvent,m=s.banner;if(o){r.templateProps=ct({defaultTemplates:yd,templatesConfig:l.templatesConfig,templates:a});return}var g=gd({insights:d,sendEvent:f}),v=function(w){Ki(w);var _=tr({},w);return A(ie,E(P({},r.templateProps),{rootProps:_,templateKey:"empty",data:u,rootTagName:"fragment"}))},p=function(w){var _=w.hit,I=w.index,O=K(w,["hit","index"]);return A(ie,E(P({},r.templateProps),{templateKey:"item",rootTagName:"li",rootProps:E(P({},O),{onClick:function(R){g(R),O.onClick()},onAuxClick:function(R){g(R),O.onAuxClick()}}),data:E(P({},_),{get __hitIndex(){return I}}),bindEvent:h,sendEvent:f}))},S=function(w){return A(ie,E(P({},r.templateProps),{templateKey:"banner",data:w,rootTagName:"fragment"}))};ue(A(Ed,{hits:c,itemComponent:p,sendEvent:f,classNames:n,emptyComponent:v,banner:m,bannerComponent:a.banner?S:void 0}),i)}},xd=function(e){var r=e||{},n=r.container,i=r.escapeHTML,a=r.transformItems,s=r.templates,o=s===void 0?{}:s,c=r.cssClasses,u=c===void 0?{}:c;if(!n)throw new Error(Fd("The `container` option is required."));var l=$e(n),d=Id({containerNode:l,cssClasses:u,renderState:{},templates:o}),h=Pd(dd)(d,function(){return ue(null,l)});return E(P({},h({escapeHTML:i,transformItems:a})),{$$widgetType:"ais.hits"})};function Td(t){var e=t.currentValue,r=t.options,n=t.cssClasses,i=t.setValue,a=t.ariaLabel;return A("select",{className:x(n.select),onChange:function(o){return i(o.target.value)},value:"".concat(e),"aria-label":a},r.map(function(s){return A("option",{className:x(n.option),key:s.label+s.value,value:"".concat(s.value)},s.label)}))}var an=ne({name:"menu",connector:!0}),ki=["isRefined","name:asc"],Cd=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oe;return ke(e,an()),function(n){var i=n||{},a=i.attribute,s=i.limit,o=s===void 0?10:s,c=i.showMore,u=c===void 0?!1:c,l=i.showMoreLimit,d=l===void 0?20:l,h=i.sortBy,f=h===void 0?ki:h,m=i.transformItems,g=m===void 0?function(b){return b}:m;if(!a)throw new Error(an("The `attribute` option is required."));if(u===!0&&d<=o)throw new Error(an("The `showMoreLimit` option must be greater than `limit`."));var v,p,S,y=!1,w=function(){};function _(b,R){return function(){y=!y,R.render(b)}}function I(){w()}function O(){return y?d:o}return{$$type:"ais.menu",init:function(R){var F=R.instantSearchInstance;e(E(P({},this.getWidgetRenderState(R)),{instantSearchInstance:F}),!0)},render:function(R){var F=R.instantSearchInstance;e(E(P({},this.getWidgetRenderState(R)),{instantSearchInstance:F}),!1)},dispose:function(R){var F=R.state;return r(),F.removeHierarchicalFacet(a).setQueryParameter("maxValuesPerFacet",void 0)},getRenderState:function(R,F){return E(P({},R),{menu:E(P({},R.menu),T({},a,this.getWidgetRenderState(F)))})},getWidgetRenderState:function(R){var F=this,N=R.results,L=R.createURL,H=R.instantSearchInstance,Q=R.helper,M=[],k=!1;if(v||(v=Ss({instantSearchInstance:H,helper:Q,attribute:a,widgetType:this.$$type})),p||(p=function(W){return L(function($){return F.getWidgetUiState($,{searchParameters:Q.state.resetPage().toggleFacetRefinement(a,W),helper:Q})})}),S||(S=function(W){var $=se(Q.getHierarchicalFacetBreadcrumb(a),1),q=$[0];v("click:internal",W||q),Q.toggleFacetRefinement(a,W||q).search()}),R.results&&(w=_(R,this)),N){var U=N.getFacetValues(a,{sortBy:f,facetOrdering:f===ki}),j=U&&!Array.isArray(U)&&U.data?U.data:[];k=u&&(y||j.length>
38O()),M=g(j.slice(0,O()).map(function(D){var W=D.name,$=D.escapedValue;D.path;var q=K(D,["name","escapedValue","path"]);return E(P({},q),{label:W,value:$})}),{results:N})}return{items:M,createURL:p,refine:S,sendEvent:v,canRefine:M.length>0,widgetParams:n,isShowingMore:y,toggleShowMore:I,canToggleShowMore:k}},getWidgetUiState:function(R,F){var N=F.searchParameters,L=se(N.getHierarchicalFacetBreadcrumb(a),1),H=L[0];return Ad(E(P({},R),{menu:E(P({},R.menu),T({},a,H))}),a)},getWidgetSearchParameters:function(R,F){var N=F.uiState,L=N.menu&&N.menu[a];if(R.isConjunctiveFacet(a)||R.isDisjunctiveFacet(a))return R;var H=R.removeHierarchicalFacet(a).addHierarchicalFacet({name:a,attributes:[a]}),Q=H.maxValuesPerFacet||0,M=Math.max(Q,u?d:o),k=H.setQueryParameter("maxValuesPerFacet",M);return L?k.addHierarchicalFacetRefinement(a,L):k.setQueryParameters({hierarchicalFacetsRefinements:E(P({},k.hierarchicalFacetsRefinements),T({},a,[]))})}}}};function Ad(t,e){return t.menu&&(t.menu[e]===void 0&&delete t.menu[e],Object.keys(t.menu).length===0&&delete t.menu),t}function Nd(t){var e=t.cssClasses,r=t.templateProps,n=t.items,i=t.refine,a=Ct(n,function(o){return o.isRefined})||{value:""},s=a.value;return A("div",{className:x(e.root,n.length===0&&e.noRefinementRoot)},A("select",{className:e.select,value:s,onChange:function(c){i(c.target.value)}},A(ie,E(P({},r),{templateKey:"defaultOption",rootTagName:"option",rootProps:{value:"",className:e.option}})),n.map(function(o){return A(ie,E(P({},r),{templateKey:"item",rootTagName:"option",rootProps:{value:o.value,className:e.option},key:o.value,data:o}))})))}var Od={item:function(e){var r=e.label,n=e.count;return"".concat(r," (").concat(At(n),")")},defaultOption:function(){return"See all"}},$d=ne({name:"menu-select"}),Kt=He("MenuSelect"),jd=function(e){var r=e.containerNode,n=e.cssClasses,i=e.renderState,a=e.templates;return function(s,o){var c=s.refine,u=s.items,l=s.instantSearchInstance;if(o){i.templateProps=ct({defaultTemplates:Od,templatesConfig:l.templatesConfig,templates:a});return}ue(A(Nd,{cssClasses:n,items:u,refine:c,templateProps:i.templateProps}),r)}},Hd=function(e){var r=e||{},n=r.container,i=r.attribute,a=r.sortBy,s=a===void 0?["name:asc"]:a,o=r.limit,c=o===void 0?10:o,u=r.cssClasses,l=u===void 0?{}:u,d=r.templates,h=d===void 0?{}:d,f=r.transformItems;if(!n)throw new Error($d("The `container` option is required."));var m=$e(n),g={root:x(Kt(),l.root),noRefinementRoot:x(Kt({modifierName:"noRefinement"}),l.noRefinementRoot),select:x(Kt({descendantName:"select"}),l.select),option:x(Kt({descendantName:"option"}
38),l.option)},v=jd({containerNode:m,cssClasses:g,renderState:{},templates:h}),p=Cd(v,function(){return ue(null,m)});return E(P({},p({attribute:i,limit:c,sortBy:s,transformItems:f})),{$$widgetType:"ais.menuSelect"})};function Ld(t){function e(r){return function(n){ys(n)||(n.preventDefault(),t.setCurrentPage(r))}}return A("div",{className:x(t.cssClasses.root,t.nbPages<=1&&t.cssClasses.noRefinementRoot)},A("ul",{className:t.cssClasses.list},t.showFirst&&A(pt,{ariaLabel:"First Page",className:t.cssClasses.firstPageItem,isDisabled:t.isFirstPage,templates:t.templates,templateKey:"first",pageNumber:0,createURL:t.createURL,cssClasses:t.cssClasses,createClickHandler:e}),t.showPrevious&&A(pt,{ariaLabel:"Previous Page",className:t.cssClasses.previousPageItem,isDisabled:t.isFirstPage,templates:t.templates,templateKey:"previous",pageNumber:t.currentPage-1,createURL:t.createURL,cssClasses:t.cssClasses,createClickHandler:e}),t.pages.map(function(r){return A(pt,{key:r,ariaLabel:"Page ".concat(r+1),className:t.cssClasses.pageItem,isSelected:r===t.currentPage,templates:t.templates,templateKey:"page",pageNumber:r,createURL:t.createURL,cssClasses:t.cssClasses,createClickHandler:e})}),t.showNext&&A(pt,{ariaLabel:"Next Page",className:t.cssClasses.nextPageItem,isDisabled:t.isLastPage,templates:t.templates,templateKey:"next",pageNumber:t.currentPage+1,createURL:t.createURL,cssClasses:t.cssClasses,createClickHandler:e}),t.showLast&&A(pt,{ariaLabel:"Last Page, Page ".concat(t.nbPages),className:t.cssClasses.lastPageItem,isDisabled:t.isLastPage,templates:t.templates,templateKey:"last",pageNumber:t.nbPages-1,createURL:t.createURL,cssClasses:t.cssClasses,createClickHandler:e})))}function pt(t){var e=t.templates,r=t.templateKey,n=t.ariaLabel,i=t.pageNumber,a=t.className,s=t.isDisabled,o=s===void 0?!1:s,c=t.isSelected,u=c===void 0?!1:c,l=t.cssClasses,d=t.createURL,h=t.createClickHandler;return A("li",{className:x(l.item,o&&l.disabledItem,a,u&&l.selectedItem)},o?A(ie,{rootTagName:"span",rootProps:{className:l.link,"aria-label":n},templateKey:r,templates:e,data:{page:i+1}}):A(ie,{rootTagName:"a",rootProps:{className:l.link,"aria-label":n,href:d(i),onClick:h(i)},templateKey:r,templates:e,data:{page:i+1}}))}function Bi(t){var e=t.start,r=e===void 0?0:e,n=t.end,i=t.step,a=i===void 0?1:i,s=a===0?1:a,o=Math.round((n-r)/s);return ge(Array(o)).map(function(c,u){return r+u*s})}var Md=function(){function t(e){ze(this,t),T(this,"currentPage",void 0),T(this,"total",void 0),T(this,"padding",void 0),this.currentPage=e.currentPage,this.total=e.total,this.padding=e.padding}return Ge(t,[{key:"pages",value:function(){var r=this,n=r.total,i=r.currentPage,a=r.padding;if(n===0)return[0];var s=this.nbPagesDisplayed(a,n);if(s===n)return Bi({end:n});var o=this.calculatePaddingLeft(i,a,n,s),c=s-o,u=i-o,l=i+c;return Bi({start:u,end:l})}},{key:"nbPagesDisplayed",value:function(r,n){return Math.min(2*r+1,n)}},{key:"calculatePaddingLeft",value:function(r,n,i,a){return r<=n?r:r>=i-n?a-(i-r):n}},{key:"isLastPage",value:function(){return this.currentPage>=this.total-1}},{key:"isFirstPage",value:function(){return this.currentPage<=0}}]),t}(),Dd=ne({name:"pagination",connector:!0}),Wd=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oe;return ke(e,Dd()),function(n){var i=n||{},a=i.totalPages,s=i.padding,o=s===void 0?3:s,c=new Md({currentPage:0,total:0,padding:o}),u={};function l(d){var h=d.nbPages;return a!==void 0?Math.min(a,h):h}return{$$type:"ais.pagination",init:function(h){var f=h.instantSearchInstance;e(E(P({},this.getWidgetRenderState(h)),{instantSearchInstance:f}),!0)},render:function(h){var f=h.instantSearchInstance;e(E(P({},this.getWidgetRenderState(h)),{instantSearchInstance:f}),!1)},dispose:function(h){var f=h.state;return r(),f.setQueryParameter("page",void 0)},getWidgetUiState:function(h,f){var m=f.searchParameters,g=m.page||0;return g?E(P({},h),{page:g+1}):h},getWidgetSearchParameters:function(h,f){var m=f.uiState,g=m.page?m.page-1:0;return h.setQueryParameter("page",g)},getWidgetRenderState:function(h){var f=h.results,m=h.helper,g=h.state,v=h.createURL;u.refine||(u.refine=function(y){m.setPage(y),m.search()}),u.createURL||(u.createURL=function(y){return v(function(w){return E(P({},w),{page:y+1})})});var p=g.page||0,S=l(f||{nbPages:0});return c.currentPage=p,c.total=S,{createURL:u.createURL,refine:u.refine,canRefine:S>1,currentRefinement:p,nbHits:(f==null?void 0:f.nbHits)||0,nbPages:S,pages:f?c.pages():[],isFirstPage:c.isFirstPage(),isLastPage:c.isLastPage(),widgetParams:n}},getRenderState:function(h,f){return E(P({},h),{pagination:this.getWidgetRenderState(f)})}}}}
38,pe=He("Pagination"),Ud=ne({name:"pagination"}),kd={previous:function(){return"â¹"},next:function(){return"âº"},page:function(e){var r=e.page;return"".concat(r)},first:function(){return"«"},last:function(){return"»"}},Bd=function(e){var r=e.containerNode,n=e.cssClasses,i=e.templates,a=e.showFirst,s=e.showLast,o=e.showPrevious,c=e.showNext,u=e.scrollToNode;return function(l,d){var h=l.createURL,f=l.currentRefinement,m=l.nbPages,g=l.pages,v=l.isFirstPage,p=l.isLastPage,S=l.refine;if(!d){var y=function(_){S(_),u!==!1&&u.scrollIntoView()};ue(A(Ld,{createURL:h,cssClasses:n,currentPage:f,templates:i,nbPages:m,pages:g,isFirstPage:v,isLastPage:p,setCurrentPage:y,showFirst:a,showLast:s,showPrevious:o,showNext:c}),r)}}},Qd=function(e){var r=e||{},n=r.container,i=r.templates,a=i===void 0?{}:i,s=r.cssClasses,o=s===void 0?{}:s,c=r.totalPages,u=r.padding,l=r.showFirst,d=l===void 0?!0:l,h=r.showLast,f=h===void 0?!0:h,m=r.showPrevious,g=m===void 0?!0:m,v=r.showNext,p=v===void 0?!0:v,S=r.scrollTo,y=S===void 0?"body":S;if(!n)throw new Error(Ud("The `container` option is required."));var w=$e(n),_=y===!0?"body":y,I=_!==!1?$e(_):!1,O={root:x(pe(),o.root),noRefinementRoot:x(pe({modifierName:"noRefinement"}),o.noRefinementRoot),list:x(pe({descendantName:"list"}),o.list),item:x(pe({descendantName:"item"}),o.item),firstPageItem:x(pe({descendantName:"item",modifierName:"firstPage"}),o.firstPageItem),lastPageItem:x(pe({descendantName:"item",modifierName:"lastPage"}),o.lastPageItem),previousPageItem:x(pe({descendantName:"item",modifierName:"previousPage"}),o.previousPageItem),nextPageItem:x(pe({descendantName:"item",modifierName:"nextPage"}),o.nextPageItem),pageItem:x(pe({descendantName:"item",modifierName:"page"}),o.pageItem),selectedItem:x(pe({descendantName:"item",modifierName:"selected"}),o.selectedItem),disabledItem:x(pe({descendantName:"item",modifierName:"disabled"}),o.disabledItem),link:x(pe({descendantName:"link"}),o.link)},b=P({},kd,a),R=Bd({containerNode:w,cssClasses:O,templates:b,showFirst:d,showLast:f,showPrevious:g,showNext:p,scrollToNode:I}),F=Wd(R,function(){return ue(null,w)});return E(P({},F({totalPages:c,padding:u})),{$$widgetType:"ais.pagination"})},zt=ne({name:"refinement-list",connector:!0}),Qi=["isRefined","count:desc","name:asc"],qd=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oe;return ke(e,zt()),function(n){var i=n||{},a=i.attribute,s=i.operator,o=s===void 0?"or":s,c=i.limit,u=c===void 0?10:c,l=i.showMore,d=l===void 0?!1:l,h=i.showMoreLimit,f=h===void 0?20:h,m=i.sortBy,g=m===void 0?Qi:m,v=i.escapeFacetValues,p=v===void 0?!0:v,S=i.transformItems,y=S===void 0?function(U){return U}:S;if(!a)throw new Error(zt("The `attribute` option is required."));if(!/^(and|or)$/.test(o))throw new Error(zt('The `operator` must one of: `"and"`, `"or"` (got "'.concat(o,'").')));if(d===!0&&f<=u)throw new Error(zt("`showMoreLimit` should be greater than `limit`."));var w=function(j){var D=j.name,W=j.escapedValue,$=K(j,["name","escapedValue"]);return E(P({},$),{value:W,label:D,highlighted:D})},_,I=[],O=!0,b,R,F=!1,N=function(){};function L(){N()}function H(U,j){return function(){F=!F,j.render(U)}}function Q(){return F?f:u}var M=function(){return function(){}},k=function(j,D){return function(W){return function($){var q=W.instantSearchInstance,z=W.results;if($===""&&I)e(E(P({},D.getWidgetRenderState(E(P({},W),{results:_}))),{instantSearchInstance:q}),!1);else{var V={highlightPreTag:p?st.highlightPreTag:ot.highlightPreTag,highlightPostTag:p?st.highlightPostTag:ot.highlightPostTag};j.searchForFacetValues(a,$,Math.min(Q(),100),V).then(function(Y){var Z=p?lh(Y.facetHits):Y.facetHits,he=y(Z.map(function(be){var ee=be.escapedValue,le=be.value,de=K(be,["escapedValue","value"]);return E(P({},de),{value:ee,label:le})}),{results:z});e(E(P({},D.getWidgetRenderState(E(P({},W),{results:_}))),{items:he,canToggleShowMore:!1,canRefine:!0,isFromSearch:!0,instantSearchInstance:q}),!1)})}}}};return{$$type:"ais.refinementList",init:function(j){e(E(P({},this.getWidgetRenderState(j)),{instantSearchInstance:j.instantSearchInstance}),!0)},render:function(j){e(E(P({},this.getWidgetRenderState(j)),{instantSearchInstance:j.instantSearchInstance}),!1)},getRenderState:function(j,D){return E(P({},j),{refinementList:E(P({},j.refinementList),T({},a,this.getWidgetRenderState(D)))})},getWidgetRenderState:function(j){var D=this,W=j.results,$=j.state,q=j.createURL,z=j.instantSearchInstance,V=j.helper,Y=[],Z=[];if((!R||!b||!M)&&(R=Ss({instantSearchInstance:z,helper:V,attribute:a,widgetType:this.$$type}),b=function(Ut){R("click:internal",Ut),V.toggleFacetRefinement(a,Ut).search()},M=k(V,this)),W){var he=W.getFacetValues(a,{sortBy:g,facetOrdering:g===Qi}
38);Z=he&&Array.isArray(he)?he:[],Y=y(Z.slice(0,Q()).map(w),{results:W});var be=$.maxValuesPerFacet,ee=Q();O=be>ee?Z.length<=ee:Z.length<ee,_=W,I=Y,j.results&&(N=H(j,this))}var le=M&&M(j),de=F&&I.length>u,Le=d&&!O,lt=de||Le;return{createURL:function(Ut){return q(function(_s){return D.getWidgetUiState(_s,{searchParameters:$.resetPage().toggleFacetRefinement(a,Ut),helper:V})})},items:Y,refine:b,searchForItems:le,isFromSearch:!1,canRefine:Y.length>0,widgetParams:n,isShowingMore:F,canToggleShowMore:lt,toggleShowMore:L,sendEvent:R,hasExhaustiveItems:O}},dispose:function(j){var D=j.state;r();var W=D.setQueryParameter("maxValuesPerFacet",void 0);return o==="and"?W.removeFacet(a):W.removeDisjunctiveFacet(a)},getWidgetUiState:function(j,D){var W=D.searchParameters,$=o==="or"?W.getDisjunctiveRefinements(a):W.getConjunctiveRefinements(a);return Vd(E(P({},j),{refinementList:E(P({},j.refinementList),T({},a,$))}),a)},getWidgetSearchParameters:function(j,D){var W=D.uiState,$=o==="or";if(j.isHierarchicalFacet(a)||$&&j.isConjunctiveFacet(a)||!$&&j.isDisjunctiveFacet(a))return j;var q=W.refinementList&&W.refinementList[a],z=$?j.addDisjunctiveFacet(a).removeDisjunctiveFacetRefinement(a):j.addFacet(a).removeFacetRefinement(a),V=z.maxValuesPerFacet||0,Y=Math.max(V,d?f:u),Z=z.setQueryParameter("maxValuesPerFacet",Y);if(!q){var he=$?"disjunctiveFacetsRefinements":"facetsRefinements";return Z.setQueryParameters(T({},he,E(P({},Z[he]),T({},a,[]))))}return q.reduce(function(be,ee){return $?be.addDisjunctiveFacetRefinement(a,ee):be.addFacetRefinement(a,ee)},Z)}}}};function Vd(t,e){return t.refinementList&&((!t.refinementList[e]||t.refinementList[e].length===0)&&delete t.refinementList[e],Object.keys(t.refinementList).length===0&&delete t.refinementList),t}var bs={aiMode:function(e){var r=e.cssClasses;return A(It,null,A("svg",{className:r.aiModeIcon,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 20 20",width:"16",height:"16","aria-hidden":"true"},A("path",{fill:"currentColor","fill-rule":"evenodd",d:"M10 1.875c.27 0 .51.173.594.43l1.593 4.844a1.043 1.043 0 0 0 .664.664l4.844 1.593a.625.625 0 0 1 0 1.188l-4.844 1.593a1.043 1.043 0 0 0-.664.664l-1.593 4.844a.625.625 0 0 1-1.188 0l-1.593-4.844a1.042 1.042 0 0 0-.664-.664l-4.844-1.593a.625.625 0 0 1 0-1.188l4.844-1.593a1.042 1.042 0 0 0 .664-.664l1.593-4.844a.625.625 0 0 1 .594-.43ZM9 7.539A2.292 2.292 0 0 1 7.54 9L4.5 10l3.04 1A2.292 2.292 0 0 1 9 12.46l1 3.04 1-3.04A2.293 2.293 0 0 1 12.46 11l3.04-1-3.04-1A2.292 2.292 0 0 1 11 7.54L10 4.5 9 7.54ZM4.167 1.875c.345 0 .625.28.625.625v3.333a.625.625 0 0 1-1.25 0V2.5c0-.345.28-.625.625-.625ZM15.833 13.542c.345 0 .625.28.625.625V17.5a.625.625 0 1 1-1.25 0v-3.333c0-.345.28-.625.625-.625Z","clip-rule":"evenodd"}),A("path",{fill:"currentColor","fill-rule":"evenodd",d:"M1.875 4.167c0-.346.28-.625.625-.625h3.333a.625.625 0 1 1 0 1.25H2.5a.625.625 0 0 1-.625-.625ZM13.542 15.833c0-.345.28-.625.625-.625H17.5a.625.625 0 0 1 0 1.25h-3.333a.625.625 0 0 1-.625-.625Z","clip-rule":"evenodd"})),A("span",{className:r.aiModeLabel},"AI Mode"))},reset:function(e){var r=e.cssClasses;return A("svg",{className:r.resetIcon,viewBox:"0 0 20 20",width:"10",height:"10","aria-hidden":"true"},A("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"}))},submit:function(e){var r=e.cssClasses;return A("svg",{className:r.submitIcon,width:"10",height:"10",viewBox:"0 0 40 40","aria-hidden":"true"},A("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"}))},loadingIndicator:function(e){var r=e.cssClasses;return A("svg",{"aria-label":"Results are loading",className:r.loadingIcon,width:"16",height:"16",viewBox:"0 0 38 38",stroke:"#444","aria-hidden":"true"},A("g",{fill:"none","fill-rule":"evenodd"},A("g",{transform:"translate(1 1)","stroke-width":"2"},A("circle",{"stroke-opacity":".5",cx:"18",cy:"18",r:"18"}),A("path",{d:"M36 18c0-9.94-8.06-18-18-18"},A("animateTransform",{attributeName:"transform",type:"rotate",from:"0 18 18",to:"360 18 18",dur:"1s",repeatCount:"indef
38inite"})))))}},Kd={item:function(e){var r=e.cssClasses,n=e.count,i=e.value,a=e.highlighted,s=e.isRefined,o=e.isFromSearch;return A("label",{className:x(r.label)},A("input",{type:"checkbox",className:x(r.checkbox),value:i,defaultChecked:s}),A("span",{className:x(r.labelText),dangerouslySetInnerHTML:o?{__html:a}:void 0},!o&&a),A("span",{className:x(r.count)},At(n)))},showMoreText:function(e){var r=e.isShowingMore;return r?"Show less":"Show more"},searchableNoResults:function(){return"No results"}},zd=ne({name:"refinement-list"}),me=He("RefinementList"),Te=He("SearchBox"),Gd=function(e){var r=e.containerNode,n=e.cssClasses,i=e.templates,a=e.searchBoxTemplates,s=e.renderState,o=e.showMore,c=e.searchable,u=e.searchablePlaceholder,l=e.searchableIsAlwaysActive,d=e.searchableSelectOnSubmit;return function(h,f){var m=h.refine,g=h.items,v=h.createURL,p=h.searchForItems,S=h.isFromSearch,y=h.instantSearchInstance,w=h.toggleShowMore,_=h.isShowingMore,I=h.hasExhaustiveItems,O=h.canToggleShowMore;if(f){s.templateProps=ct({defaultTemplates:Kd,templatesConfig:y.templatesConfig,templates:i}),s.searchBoxTemplateProps=ct({defaultTemplates:bs,templatesConfig:y.templatesConfig,templates:a});return}ue(A(Rs,{createURL:v,cssClasses:n,facetValues:g,templateProps:s.templateProps,searchBoxTemplateProps:s.searchBoxTemplateProps,toggleRefinement:m,searchFacetValues:c?p:void 0,searchPlaceholder:u,searchIsAlwaysActive:l,isFromSearch:S,showMore:o&&!S&&g.length>0,toggleShowMore:w,isShowingMore:_,hasExhaustiveItems:I,canToggleShowMore:O,searchableSelectOnSubmit:d}),r)}},Jd=function(e){var r=e||{},n=r.container,i=r.attribute,a=r.operator,s=r.sortBy,o=r.limit,c=r.showMore,u=r.showMoreLimit,l=r.searchable,d=l===void 0?!1:l,h=r.searchablePlaceholder,f=h===void 0?"Search...":h,m=r.searchableEscapeFacetValues,g=m===void 0?!0:m,v=r.searchableIsAlwaysActive,p=v===void 0?!0:v,S=r.searchableSelectOnSubmit,y=S===void 0?!0:S,w=r.cssClasses,_=w===void 0?{}:w,I=r.templates,O=I===void 0?{}:I,b=r.transformItems;if(!n)throw new Error(zd("The `container` option is required."));var R=d?!!g:!1,F=$e(n),N={root:x(me(),_.root),noRefinementRoot:x(me({modifierName:"noRefinement"}),_.noRefinementRoot),list:x(me({descendantName:"list"}),_.list),item:x(me({descendantName:"item"}),_.item),selectedItem:x(me({descendantName:"item",modifierName:"selected"}),_.selectedItem),searchBox:x(me({descendantName:"searchBox"}),_.searchBox),label:x(me({descendantName:"label"}),_.label),checkbox:x(me({descendantName:"checkbox"}),_.checkbox),labelText:x(me({descendantName:"labelText"}),_.labelText),count:x(me({descendantName:"count"}),_.count),noResults:x(me({descendantName:"noResults"}),_.noResults),showMore:x(me({descendantName:"showMore"}),_.showMore),disabledShowMore:x(me({descendantName:"showMore",modifierName:"disabled"}),_.disabledShowMore),searchable:{root:x(Te(),_.searchableRoot),form:x(Te({descendantName:"form"}),_.searchableForm),input:x(Te({descendantName:"input"}),_.searchableInput),submit:x(Te({descendantName:"submit"}),_.searchableSubmit),submitIcon:x(Te({descendantName:"submitIcon"}),_.searchableSubmitIcon),reset:x(Te({descendantName:"reset"}),_.searchableReset),resetIcon:x(Te({descendantName:"resetIcon"}),_.searchableResetIcon),loadingIndicator:x(Te({descendantName:"loadingIndicator"}),_.searchableLoadingIndicator),loadingIcon:x(Te({descendantName:"loadingIcon"}),_.searchableLoadingIcon)}},L=Gd({containerNode:F,cssClasses:N,templates:O,searchBoxTemplates:{submit:O.searchableSubmit,reset:O.searchableReset,loadingIndicator:O.searchableLoadingIndicator},renderState:{},searchable:d,searchablePlaceholder:f,searchableIsAlwaysActive:p,searchableSelectOnSubmit:y,showMore:c}),H=qd(L,function(){return ue(null,F)});return E(P({},H({attribute:i,operator:a,limit:o,showMore:c,showMoreLimit:u,sortBy:s,escapeFacetValues:R,transformItems:b})),{$$widgetType:"ais.refinementList"})},Yd=ne({name:"search-box"}),Ce=He("SearchBox"),sn=He("AiModeButton"),Zd=function(e){var r=e.containerNode,n=e.cssClasses,i=e.placeholder,a=e.templates,s=e.autofocus,o=e.searchAsYouType,c=e.ignoreCompositionEvents,u=e.showReset,l=e.showSubmit,d=e.showLoadingIndicator,h=e.aiMode;return function(f){var m=f.refine,g=f.query,v=f.isSearchStalled,p=f.instantSearchInstance,S=function(){var I,O=p.mainIndex.getIndexId();return(I=p.renderState[O])===null||I===void 0?void 0:I.chat},y=h?function(_){Yh(S(),{message:_,referer:"ai-mode"})&&m("")}:void 0,w=h?vs(S()):void 0;ue(A(Dn,{query:g,placeholder:i,autofocus:s,refine:m,searchAsYouType:o,ignoreCompositionEvents:c,templates:a,showSubmit:l,showReset:u,showLoadingIndicator:d,isSearchStalled:v,cssClasse
38s:n,onAiModeClick:y,aiModeButtonDisabled:w}),r)}},Xd=function(e){var r=e||{},n=r.container,i=r.placeholder,a=i===void 0?"":i,s=r.cssClasses,o=s===void 0?{}:s,c=r.autofocus,u=c===void 0?!1:c,l=r.searchAsYouType,d=l===void 0?!0:l,h=r.ignoreCompositionEvents,f=h===void 0?!1:h,m=r.showReset,g=m===void 0?!0:m,v=r.showSubmit,p=v===void 0?!0:v,S=r.showLoadingIndicator,y=S===void 0?!0:S,w=r.queryHook,_=r.templates,I=_===void 0?{}:_,O=r.aiMode;if(!n)throw new Error(Yd("The `container` option is required."));var b=$e(n),R={root:x(Ce(),o.root),form:x(Ce({descendantName:"form"}),o.form),input:x(Ce({descendantName:"input"}),o.input),submit:x(Ce({descendantName:"submit"}),o.submit),submitIcon:x(Ce({descendantName:"submitIcon"}),o.submitIcon),reset:x(Ce({descendantName:"reset"}),o.reset),resetIcon:x(Ce({descendantName:"resetIcon"}),o.resetIcon),loadingIndicator:x(Ce({descendantName:"loadingIndicator"}),o.loadingIndicator),loadingIcon:x(Ce({descendantName:"loadingIcon"}),o.loadingIcon),aiModeButton:x(sn(),o.aiModeButton),aiModeIcon:x(sn({descendantName:"icon"}),o.aiModeIcon),aiModeLabel:x(sn({descendantName:"label"}),o.aiModeLabel)},F=P({},bs,I),N=Zd({containerNode:b,cssClasses:R,placeholder:a,templates:F,autofocus:u,searchAsYouType:d,ignoreCompositionEvents:f,showReset:g,showSubmit:p,showLoadingIndicator:y,aiMode:O}),L=Jh(N,function(){ue(null,b)});return P(E(P({},L({queryHook:w})),{$$widgetType:"ais.searchBox"}),O?{opensChat:!0}:{})},vt=ne({name:"sort-by",connector:!0});function Wn(t){return"strategy"in t&&t.strategy!==void 0}function on(t){return Wn(t)?t.strategy:t.value}function cn(t,e){if(!e)return!1;var r=t[e];return r!==void 0&&Wn(r)}var em=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oe;ke(e,vt());var n={};return function(i){var a=i||{},s=a.items,o=a.transformItems,c=o===void 0?function(l){return l}:o;if(!Array.isArray(s))throw new Error(vt("The `items` option expects an array of objects."));var u={};return s.forEach(function(l,d){var h="value"in l&&l.value!==void 0,f="strategy"in l&&l.strategy!==void 0;if(h&&f)throw new Error(vt("Item at index ".concat(d,' cannot have both "value" and "strategy" properties.')));if(!h&&!f)throw new Error(vt("Item at index ".concat(d,' must have either a "value" or "strategy" property.')));var m=on(l);u[m]=l}),n.itemsLookup=u,{$$type:"ais.sortBy",init:function(d){var h=d.instantSearchInstance,f=s.some(function(v){return"strategy"in v&&v.strategy});if(f&&!h.compositionID)throw new Error(vt('Sorting strategies can only be used in composition mode. Please provide a "compositionID" to your InstantSearch instance.'));var m=this.getWidgetRenderState(d),g=m.currentRefinement;Ct(s,function(v){return on(v)===g}),e(E(P({},m),{instantSearchInstance:h}),!0)},render:function(d){var h=d.instantSearchInstance;e(E(P({},this.getWidgetRenderState(d)),{instantSearchInstance:h}),!1)},dispose:function(d){var h=d.state;return r(),n.isUsingComposition&&h.sortBy&&(h=h.setQueryParameter("sortBy",void 0)),n.initialValue&&h.index!==n.initialValue?h.setIndex(n.initialValue):h},getRenderState:function(d,h){return E(P({},d),{sortBy:this.getWidgetRenderState(h)})},getWidgetRenderState:function(d){var h=d.results,f=d.helper,m=d.state,g=d.parent,v=d.instantSearchInstance;!n.initialValue&&g&&(n.initialValue=g.getIndexName()),n.refine||(n.isUsingComposition=!!(v!=null&&v.compositionID),n.refine=function(_){var I=n.itemsLookup[_];I&&Wn(I)?f.setQueryParameter("sortBy",I.strategy).search():f.setQueryParameter("sortBy",void 0).setIndex(_).search()});var p=c(s,{results:h}),S=p.map(function(_){return{label:_.label,value:on(_)}}),y=n.isUsingComposition&&cn(n.itemsLookup,m.sortBy)?m.sortBy:m.index,w=h?h.nbHits===0:!0;return{currentRefinement:y,options:S,refine:n.refine,hasNoResults:w,canRefine:!w&&s.length>0,widgetParams:i}},getWidgetUiState:function(d,h){var f=h.searchParameters,m=n.isUsingComposition&&cn(n.itemsLookup,f.sortBy)?f.sortBy:f.index;return E(P({},d),{sortBy:m!==n.initialValue?m:void 0})},getWidgetSearchParameters:function(d,h){var f=h.uiState,m=!f.sortBy||Object.prototype.hasOwnProperty.call(n.itemsLookup,f.sortBy),g=(m?f.sortBy:void 0)||n.initialValue||d.index;if(cn(n.itemsLookup,g)){var v=n.itemsLookup[g];return d.setQueryParameter("sortBy",v.strategy)}return d.setQueryParameter("index",g)}}}},tm=ne({name:"sort-by"}),un=He("SortBy"),rm=function(e){var r=e.containerNode,n=e.cssClasse
38s;return function(i,a){var s=i.currentRefinement,o=i.options,c=i.refine;a||ue(A("div",{className:n.root},A(Td,{cssClasses:n,currentValue:s,options:o,setValue:c,ariaLabel:"Sort results by"})),r)}},nm=function(e){var r=e||{},n=r.container,i=r.items,a=r.cssClasses,s=a===void 0?{}:a,o=r.transformItems;if(!n)throw new Error(tm("The `container` option is required."));var c=$e(n),u={root:x(un(),s.root),select:x(un({descendantName:"select"}),s.select),option:x(un({descendantName:"option"}),s.option)},l=rm({containerNode:c,cssClasses:u}),d=em(l,function(){return ue(null,c)});return E(P({},d({container:c,items:i,transformItems:o})),{$$widgetType:"ais.sortBy"})},im=function(e){var r=e.nbHits,n=e.nbSortedHits,i=e.cssClasses,a=e.templateProps,s=K(e,["nbHits","nbSortedHits","cssClasses","templateProps"]);return A("div",{className:x(i.root)},A(ie,E(P({},a),{templateKey:"text",rootTagName:"span",rootProps:{className:i.text},data:P({hasManySortedResults:n&&n>1,hasNoSortedResults:n===0,hasOneSortedResults:n===1,hasManyResults:r>1,hasNoResults:r===0,hasOneResult:r===1,nbHits:r,nbSortedHits:n,cssClasses:i},s)})))},am=ne({name:"stats",connector:!0}),sm=function(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:oe;return ke(e,am()),function(n){return{$$type:"ais.stats",init:function(a){var s=a.instantSearchInstance;e(E(P({},this.getWidgetRenderState(a)),{instantSearchInstance:s}),!0)},render:function(a){var s=a.instantSearchInstance;e(E(P({},this.getWidgetRenderState(a)),{instantSearchInstance:s}),!1)},dispose:function(){r()},getRenderState:function(a,s){return E(P({},a),{stats:this.getWidgetRenderState(s)})},getWidgetRenderState:function(a){var s=a.results,o=a.state;return s?{hitsPerPage:s.hitsPerPage,nbHits:s.nbHits,nbSortedHits:s.nbSortedHits,areHitsSorted:typeof s.appliedRelevancyStrictness!="undefined"&&s.appliedRelevancyStrictness>0&&s.nbSortedHits!==s.nbHits,nbPages:s.nbPages,page:s.page,processingTimeMS:s.processingTimeMS,query:s.query,widgetParams:n}:{hitsPerPage:o.hitsPerPage,nbHits:0,nbSortedHits:void 0,areHitsSorted:!1,nbPages:0,page:o.page||0,processingTimeMS:-1,query:o.query||"",widgetParams:n}}}}},om=ne({name:"stats"}),qi=He("Stats"),cm={text:function(e){return"".concat(e.areHitsSorted?um(e):lm(e)," found in ").concat(e.processingTimeMS,"ms")}};function um(t){var e=t.nbHits,r=t.hasNoSortedResults,n=t.hasOneSortedResults,i=t.hasManySortedResults,a=t.nbSortedHits,s="sorted out of ".concat(At(e));return r?"No relevant results ".concat(s):n?"1 relevant result ".concat(s):i?"".concat(At(a||0)," relevant results ").concat(s):""}function lm(t){var e=t.nbHits,r=t.hasNoResults,n=t.hasOneResult,i=t.hasManyResults;return r?"No results":n?"1 result":i?"".concat(At(e)," results"):""}var fm=function(e){var r=e.renderState,n=e.cssClasses,i=e.containerNode,a=e.templates;return function(s,o){var c=s.hitsPerPage,u=s.nbHits,l=s.nbSortedHits,d=s.areHitsSorted,h=s.nbPages,f=s.page,m=s.processingTimeMS,g=s.query,v=s.instantSearchInstance;if(o){r.templateProps=ct({defaultTemplates:cm,templatesConfig:v.templatesConfig,templates:a});return}
38ue(A(im,{cssClasses:n,hitsPerPage:c,nbHits:u,nbSortedHits:l,areHitsSorted:d,nbPages:h,page:f,processingTimeMS:m,query:g,templateProps:r.templateProps}),i)}},hm=function(e){var r=e||{},n=r.container,i=r.cssClasses,a=i===void 0?{}:i,s=r.templates,o=s===void 0?{}:s;if(!n)throw new Error(om("The `container` option is required."));var c=$e(n),u={root:x(qi(),a.root),text:x(qi({descendantName:"text"}),a.text)},l=fm({containerNode:c,cssClasses:u,templates:o,renderState:{}}),d=sm(l,function(){return ue(null,c)});return E(P({},d({})),{$$widgetType:"ais.stats"})};function dm(){return new URLSearchParams(window.location.search).get("keywords")||""}function mm(){const t=document.querySelector(".search-page__filters-toggle"),e=document.getElementById("search-filters");!t||!e||t.addEventListener("click",()=>{const r=e.classList.toggle("is-open");t.setAttribute("aria-expanded",r?"true":"false")})}function gm(){if(!document.getElementById("search-page-container")||!Ie.applicationId)return;const e=Es(Ie.applicationId,Ie.searchApiKey);let r=!0;const n=Re({indexName:Ie.indexName,searchClient:e,searchFunction(a){if(r){const s=dm();s&&a.setQuery(s),a.search(),r=!1;return}a.search()}}),i=[Bh({attributesToSnippet:["content:65"],hitsPerPage:20,filters:'status:"publish"'}),Xd({container:"#searchbox",searchAsYouType:!1,showReset:!1,showSubmit:!0,placeholder:Ie.placeholder}),Jd({container:"#content-type-tabs",attribute:"content_type",limit:20,sortBy:["name:asc"],cssClasses:{list:"content-type-tabs__list",item:"content-type-tabs__item",selectedItem:"content-type-tabs__item--selected",label:"content-type-tabs__link",labelText:"content-type-tabs__label",checkbox:"content-type-tabs__checkbox",count:"content-type-tabs__count"},transformItems(a){return a.map(s=>{const o=xs(s.value);return{...s,label:o,highlighted:o}})}}),xd({container:"#searchpageresults",cssClasses:{list:"search-cards",item:"search-cards__item"},templates:{item(a,{html:s,components:o}){return s` 39 <article class="search-card"> 40 <h3 class="search-card__title"> 41 <a href="${a.relative_url}" rel="bookmark"> 42 ${o.Highlight({hit:a,attribute:"title"})} 43 </a> 44 </h3> 45 <div class="search-card__meta">${Ts(a,s)}</div> 46 <p class="search-card__excerpt"> 47 ${o.Snippet({hit:a,attribute:"content"})} 48 </p> 49 </article> 50 `}}}),nm({container:"#sort-by",items:[{label:Ie.sortLabel,value:Ie.indexName}]}),od({container:"#clear-refinements",cssClasses:{button:"search-page__reset-button"},templates:{resetLabel:Ie.resetLabel}}),Qd({container:"#searchpagination",showFirst:!0,showLast:!0,scrollTo:!0,templates:{first:"First",previous:"Previous",next:"Next",last:"Last"}}),hm({container:"#search_results_stats",templates:{text:` 51 {{#hasNoResults}}No results{{/hasNoResults}} 52 {{#hasOneResult}}<span class="num">1</span> result{{/hasOneResult}} 53 {{#hasManyResults}}<span class="num">{{#helpers.formatNumber}}{{nbHits}}{{/helpers.formatNumber}}</span> results{{/hasManyResults}} 54 `}})];Is().forEach(a=>{document.getElementById(`facet-${a.attribute}`)&&i.push(Hd({container:`#facet-${a.attribute}`,attribute:a.attribute,limit:50,templates:{defaultOption:Ie.allLabel,item:"{{label}} ({{count}})"}}))}),n.addWidgets(i),n.start(),n.on("render",()=>{const a=n.helper.lastResults,s=a&&a.nbHits===0;["search_page_results_section","search_page_no_results_section"].forEach(o=>{const c=document.getElementById(o);c&&c.classList.toggle("no-results",!!s)})}),mm()}gm(); 55//# sourceMappingURL=search.js.map
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.