PageSourceSearch

https://carnegieindia.org/_next/static/chunks/1ito_q3q0_ylr.js

js carnegieindia.org collected 2026-10-01 08:09:09 UTC 353,321 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,106824,(e,t,r)=>{function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function a(e){return"object"==typeof e&&null!==e}t.exports=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,r,n,o,s,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var u=Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}if(void 0===(r=this._events[e]))return!1;if(i(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;default:o=Array.prototype.slice.call(arguments,1),r.apply(this,o)}else if(a(r))for(o=Array.prototype.slice.call(arguments,1),n=(c=r.slice()).length,s=0;s<n;s++)c[s].apply(this,o);return!0},n.prototype.addListener=function(e,t){var r;if(!i(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,i(t.listener)?t.listener:t),this._events[e]?a(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,a(this._events[e])&&!this._events[e].warned&&(r=void 0===this._maxListeners?n.defaultMaxListeners:this._maxListeners)&&r>0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){if(!i(t))throw TypeError("listener must be a function");var r=!1;function n(){this.removeListener(e,n),r||(r=!0,t.apply(this,arguments))}return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var r,n,o,s;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(o=(r=this._events[e]).length,n=-1,r===t||i(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(r)){for(s=o;s-- >0;)if(r[s]===t||r[s].listener&&r[s].listener===t){n=s;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0==arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0==arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(i(r=this._events[e]))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},673415,(e,t,r)=>{t.exports=function(e){return e&&e.__esModule?e:{default:e}},t.exports.__esModule=!0,t.exports.default=t.exports},713785,(e,t,r)=>{t.exports=function(e,t){this.v=e,this.k=t},t.exports.__esModule=!0,t.exports.default=t.exports},497085,(e,t,r)=>{function n(e,r,i,a){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}t.exports=n=function(e,t,r,i){function a(t,r){n(e,t,function(e){return this._invoke(t,r,e)})}t?o?o(e,t,{value:r,enumerable:!i,configurable:!i,writable:!i}):e[t]=r:(a("next",0),a("throw",1),a("return",2))}
1,t.exports.__esModule=!0,t.exports.default=t.exports,n(e,r,i,a)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},667303,(e,t,r)=>{var n=e.r(497085);function i(){var e,r,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.toStringTag||"@@toStringTag";function c(t,i,a,o){var s=Object.create((i&&i.prototype instanceof l?i:l).prototype);return n(s,"_invoke",function(t,n,i){var a,o,s,c=0,l=i||[],f=!1,h={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,r){return a=t,o=0,s=e,h.n=r,u}};function d(t,n){for(o=t,s=n,r=0;!f&&c&&!i&&r<l.length;r++){var i,a=l[r],d=h.p,p=a[2];t>3?(i=p===n)&&(s=a[(o=a[4])?5:(o=3,3)],a[4]=a[5]=e):a[0]<=d&&((i=t<2&&d<a[1])?(o=0,h.v=n,h.n=a[1]):d<p&&(i=t<3||a[0]>n||n>p)&&(a[4]=t,a[5]=n,h.n=p,o=0))}if(i||t>1)return u;throw f=!0,n}return function(i,l,p){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,p),o=l,s=p;(r=o<2?e:s)||!f;){a||(o?o<3?(o>1&&(h.n=-1),d(o,s)):h.n=s:h.v=s);try{if(c=2,a){if(o||(i="next"),r=a[i]){if(!(r=r.call(a,s)))throw TypeError("iterator result is not an object");if(!r.done)return r;s=r.value,o<2&&(o=0)}else 1===o&&(r=a.return)&&r.call(a),o<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),o=1);a=e}else if((r=(f=h.n<0)?s:t.call(n,h))!==u)break}catch(t){a=e,o=1,s=t}finally{c=1}}return{value:r,done:f}}}(t,a,o),!0),s}var u={};function l(){}function f(){}function h(){}r=Object.getPrototypeOf;var d=h.prototype=l.prototype=Object.create([][o]?r(r([][o]())):(n(r={},o,function(){return this}),r));function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,n(e,s,"GeneratorFunction")),e.prototype=Object.create(d),e}return f.prototype=h,n(d,"constructor",h),n(h,"constructor",f),f.displayName="GeneratorFunction",n(h,s,"GeneratorFunction"),n(d),n(d,s,"Generator"),n(d,o,function(){return this}),n(d,"toString",function(){return"[object Generator]"}),(t.exports=i=function(){return{w:c,m:p}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},880597,(e,t,r)=>{var n=e.r(713785),i=e.r(497085);t.exports=function e(t,r){var a;this.next||(i(e.prototype),i(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),i(this,"_invoke",function(e,i,o){function s(){return new r(function(i,a){!function e(i,a,o,s){try{var c=t[i](a),u=c.value;return u instanceof n?r.resolve(u.v).then(function(t){e("next",t,o,s)},function(t){e("throw",t,o,s)}):r.resolve(u).then(function(e){c.value=e,o(c)},function(t){return e("throw",t,o,s)})}catch(e){s(e)}}(e,o,i,a)})}return a=a?a.then(s,s):s()},!0)},t.exports.__esModule=!0,t.exports.default=t.exports},536384,(e,t,r)=>{var n=e.r(667303),i=e.r(880597);t.exports=function(e,t,r,a,o){return new i(n().w(e,t,r,a),o||Promise)},t.exports.__esModule=!0,t.exports.default=t.exports},816787,(e,t,r)=>{var n=e.r(536384);t.exports=function(e,t,r,i,a){var o=n(e,t,r,i,a);return o.next().then(function(e){return e.done?e.value:o.next()})},t.exports.__esModule=!0,t.exports.default=t.exports},8239,(e,t,r)=>{t.exports=function(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}},t.exports.__esModule=!0,t.exports.default=t.exports},607112,(e,t,r)=>{function n(e){return t.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t.exports.__esModule=!0,t.exports.default=t.exports,n(e)}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},587811,(e,t,r)=>{var n=e.r(607112).default;t.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw TypeError(n(e)+" is not iterable")},t.exports.__esModule=!0,t.exports.default=t.exports},852789,(e,t,r)=>{var n=e.r(713785),i=e.r(667303),a=e.r(816787),o=e.r(536384),s=e.r(880597),c=e.r(8239),u=e.r(587811);function l(){"use strict";var e=i(),r=e.m(l),f=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function h(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))}var d={throw:1,return:2,break:3,continue:3};function p(e){var t,r;return function(n){t||(t={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return r(n.a,d[e],t)},delegateYield:function(e,i,a){return t.resultName=i,r(n.d,u(e),a)},finish:function(e){return r(n.f,e)}},r=function(e,r,i){n.p=t.prev,n.n=t.next;try{return e(r,i)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(t.exports=l=function(){return{wrap:function(t,r,n,i){return e.w(p(t),r,n,i&&i.reverse())},isGeneratorFunction:h,mark:e.m,awrap:function(e,t){return new n(e,t)}
1,AsyncIterator:s,async:function(e,t,r,n,i){return(h(t)?o:a)(p(e),t,r,n,i)},keys:c,values:u}},t.exports.__esModule=!0,t.exports.default=t.exports)()}t.exports=l,t.exports.__esModule=!0,t.exports.default=t.exports},22971,(e,t,r)=>{var n=e.r(852789)();t.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},778335,(e,t,r)=>{function n(e,t,r,n,i,a,o){try{var s=e[a](o),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}t.exports=function(e){return function(){var t=this,r=arguments;return new Promise(function(i,a){var o=e.apply(t,r);function s(e){n(o,i,a,s,c,"next",e)}function c(e){n(o,i,a,s,c,"throw",e)}s(void 0)})}},t.exports.__esModule=!0,t.exports.default=t.exports},503262,(e,t,r)=>{t.exports=function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},257796,(e,t,r)=>{var n=e.r(607112).default;t.exports=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=n(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},t.exports.__esModule=!0,t.exports.default=t.exports},650732,(e,t,r)=>{var n=e.r(607112).default,i=e.r(257796);t.exports=function(e){var t=i(e,"string");return"symbol"==n(t)?t:t+""},t.exports.__esModule=!0,t.exports.default=t.exports},340862,(e,t,r)=>{var n=e.r(650732);function i(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,n(i.key),i)}}t.exports=function(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},t.exports.__esModule=!0,t.exports.default=t.exports},282007,(e,t,r)=>{"use strict";var n=e.r(673415);Object.defineProperty(r,"__esModule",{value:!0}),r.Configuration=void 0;var i=n(e.r(503262));r.Configuration=(0,n(e.r(340862)).default)(function e(){var t,r,n,a,o,s,c,u,l,f,h,d,p,m,g,y,v,b,_,S,O=this,R=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,i.default)(this,e),this.server=R.server||{nodes:[{host:"localhost",port:"8108",path:"",protocol:"http"}]},this.server.cacheSearchResultsForSeconds=null!=(t=this.server.cacheSearchResultsForSeconds)?t:120,this.additionalSearchParameters=null!=(r=R.additionalSearchParameters)?r:{},this.additionalSearchParameters.query_by=null!=(n=null!=(a=this.additionalSearchParameters.queryBy)?a:this.additionalSearchParameters.query_by)?n:"",this.additionalSearchParameters.preset=null!=(o=null!=(s=this.additionalSearchParameters.preset)?s:this.additionalSearchParameters.preset)?o:"",this.additionalSearchParameters.sort_by=null!=(c=null!=(u=this.additionalSearchParameters.sortBy)?u:this.additionalSearchParameters.sort_by)?c:"",this.additionalSearchParameters.highlight_full_fields=null!=(l=null!=(f=this.additionalSearchParameters.highlightFullFields)?f:this.additionalSearchParameters.highlight_full_fields)?l:this.additionalSearchParameters.query_by,this.geoLocationField=null!=(h=R.geoLocationField)?h:"_geoloc",this.facetableFieldsWithSpecialCharacters=null!=(d=R.facetableFieldsWithSpecialCharacters)?d:[],this.collectionSpecificSearchParameters=null!=(p=R.collectionSpecificSearchParameters)?p:{},Object.keys(this.collectionSpecificSearchParameters).forEach(function(e){var t,r,n,i,a,o,s=O.collectionSpecificSearchParameters[e];s.query_by=null!=(t=s.queryBy)?t:s.query_by,s.preset=null!=(r=s.preset)?r:s.preset,s.sort_by=null!=(n=s.sortBy)?n:s.sort_by,s.highlight_full_fields=null!=(i=null!=(a=null!=(o=s.highlightFullFields)?o:s.highlight_full_fields)?a:O.additionalSearchParameters.highlight_full_fields)?i:s.query_by,Object.keys(s).forEach(function(e){return void 0===s[e]?delete s[e]:{}})}),this.renderingContent=R.renderingContent,this.flattenGroupedHits=null==(m=R.flattenGroupedHits)||m,this.facetByOptions=null!=(g=R.facetByOptions)?g:{},this.filterByOptions=null!=(y=R.filterByOptions)?y:{},this.sortByOptions=null!=(v=R.sortByOptions)?v:{},this.collectionSpecificFacetByOptions=null!=(b=R.collectionSpecificFacetByOptions)?b:{},this.collectionSpecificFilterByOptions=null!=(_=R.collectionSpecificFilterByOptions)?_:{},this.collectionSpecificSortByOptions=null!=(S=R.collectionSpecificSortByOptions)?S:{}},[{key:"validate",value:function(){if((this.additionalSearchParameters.queryBy||Object.values(this.collectionSpecificSearchParameters).some(function(e){return e.queryBy}))&&console.warn("[typesense-instantsearch-adapter] Please use snake_cased versions of parameters in additionalSearchParameters instead of camelCased parameters. For example: Use query_by instead of queryBy. camel
1Cased parameters will be deprecated in a future version. We're making this change so that parameter names are identical to the ones sent to Typesense (which are all snake_cased), and to also keep the types for these parameters in sync with the types defined in typesense-js."),0===this.additionalSearchParameters.query_by.length&&0===this.additionalSearchParameters.preset.length&&(0===Object.keys(this.collectionSpecificSearchParameters).length||Object.values(this.collectionSpecificSearchParameters).some(function(e){return 0===(e.query_by||"").length&&0===(e.preset||"").length})))throw Error("[typesense-instantsearch-adapter] Missing parameter: One of additionalSearchParameters.query_by or additionalSearchParameters.preset needs to be set, or all collectionSpecificSearchParameters need to have either .query_by or .preset set.")}}])},538569,(e,t,r)=>{"use strict";t.exports=function(e,t){e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}},326670,(e,t,r)=>{"use strict";var n=e.r(106824);function i(e,t,r){this.main=e,this.fn=t,this.recommendFn=r,this.lastResults=null,this.lastRecommendResults=null}e.r(538569)(i,n),i.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},i.prototype.getModifiedState=function(e){return this.fn(e)},i.prototype.getModifiedRecommendState=function(e){return this.recommendFn(e)},t.exports=i},828434,(e,t,r)=>{"use strict";t.exports={escapeFacetValue:function(e){return"string"!=typeof e?e:String(e).replace(/^-/,"\\-")},unescapeFacetValue:function(e){return"string"!=typeof e?e:e.replace(/^\\-/,"-")}}},317247,(e,t,r)=>{"use strict";function n(e){return"function"==typeof e||Array.isArray(e)||"[object Object]"===Object.prototype.toString.call(e)}t.exports=function(e){n(e)||(e={});for(var t=1,r=arguments.length;t<r;t++){var i=arguments[t];n(i)&&function e(t,r){if(t===r)return t;for(var i in r)if(Object.prototype.hasOwnProperty.call(r,i)&&"__proto__"!==i&&"constructor"!==i){var a=r[i],o=t[i];(void 0===o||void 0!==a)&&(n(o)&&n(a)?t[i]=e(o,a):t[i]="object"==typeof a&&null!==a?e(Array.isArray(a)?[]:{},a):a)}return t}(e,i)}return e}},429108,(e,t,r)=>{"use strict";t.exports=function(e){return e&&Object.keys(e).length>0}},521723,(e,t,r)=>{"use strict";t.exports=function(e,t){if(null===e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}},872850,(e,t,r)=>{"use strict";function n(e){e=e||{},this.params=e.params||[]}n.prototype={constructor:n,addParams:function(e){var t=this.params.slice();return t.push(e),new n({params:t})},removeParams:function(e){return new n({params:this.params.filter(function(t){return t.$$id!==e})})},addFrequentlyBoughtTogether:function(e){return this.addParams(Object.assign({},e,{model:"bought-together"}))},addRelatedProducts:function(e){return this.addParams(Object.assign({},e,{model:"related-products"}))},addTrendingItems:function(e){return this.addParams(Object.assign({},e,{model:"trending-items"}))},addTrendingFacets:function(e){return this.addParams(Object.assign({},e,{model:"trending-facets"}))},addLookingSimilar:function(e){return this.addParams(Object.assign({},e,{model:"looking-similar"}))},_buildQueries:function(e,t){return this.params.filter(function(e){return void 0===t[e.$$id]}).map(function(t){var r=Object.assign({},t,{indexName:e,threshold:t.threshold||0});return delete r.$$id,r})}},t.exports=n},851716,(e,t,r)=>{"use strict";function n(e,t){this._state=e,this._rawResults={};var r=this;e.params.forEach(function(e){var n=e.$$id;r[n]=t[n],r._rawResults[n]=t[n]})}n.prototype={constructor:n},t.exports=n},412496,(e,t,r)=>{"use strict";var n=e.r(317247);function i(e){return Object.keys(e).sort().reduce(function(t,r){return t[r]=e[r],t},{})}var a={_getQueries:function(e,t){var r=[];return r.push({indexName:e,params:a._getHitsSearchParams(t)}),t.getRefinedDisjunctiveFacets().forEach(function(n){r.push({indexName:e,params:a._getDisjunctiveFacetSearchParams(t,n)})}),t.getRefinedHierarchicalFacets().forEach(function(n){var i=t.getHierarchicalFacetByName(n),o=t.getHierarchicalRefinement(n),s=t._getHierarchicalFacetSeparator(i);if(o.length>0&&o[0].split(s).length>1){var c=o[0].split(s).slice(0,-1).reduce(function(e,t,r){return e.concat({attribute:i.attributes[r],value:0===r?t:[e[e.length-1].value,t].join(s)})},[]);
vendor: 2,257 bytes, line 1
1c.forEach(function(n,o){var s=a._getDisjunctiveFacetSearchParams(t,n.attribute,0===o);function u(e){return i.attributes.some(function(t){return t===e.split(":")[0]})}var l=(s.facetFilters||[]).reduce(function(e,t){if(Array.isArray(t)){var r=t.filter(function(e){return!u(e)});r.length>0&&e.push(r)}return"string"!=typeof t||u(t)||e.push(t),e},[]),f=c[o-1];o>0?s.facetFilters=l.concat(f.attribute+":"+f.value):l.length>0?s.facetFilters=l:delete s.facetFilters,r.push({indexName:e,params:s})})}}),r},_getCompositionQueries:function(e){return[{compositionID:e.index,requestBody:{params:a._getCompositionHitsSearchParams(e)}}]},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(a._getHitsHierarchicalFacetsAttributes(e)).sort(),r=a._getFacetFilters(e),o=a._getNumericFilters(e),s=a._getTagFilters(e),c={};return t.length>0&&(c.facets=t.indexOf("*")>-1?["*"]:t),s.length>0&&(c.tagFilters=s),r.length>0&&(c.facetFilters=r),o.length>0&&(c.numericFilters=o),i(n({},e.getQueryParams(),c))},_getCompositionHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets.map(function(t){return e.disjunctiveFacetsRefinements&&e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].length>0?"disjunctive("+t+")":t})).concat(a._getHitsHierarchicalFacetsAttributes(e)).sort(),r=a._getFacetFilters(e),o=a._getNumericFilters(e),s=a._getTagFilters(e),c={};t.length>0&&(c.facets=t.indexOf("*")>-1?["*"]:t),s.length>0&&(c.tagFilters=s),r.length>0&&(c.facetFilters=r),o.length>0&&(c.numericFilters=o);var u=e.getQueryParams();return delete u.highlightPreTag,delete u.highlightPostTag,delete u.index,i(n({},u,c))},_getDisjunctiveFacetSearchParams:function(e,t,r){var o=a._getFacetFilters(e,t,r),s=a._getNumericFilters(e,t),c=a._getTagFilters(e),u={hitsPerPage:0,page:0,analytics:!1,clickAnalytics:!1};c.length>0&&(u.tagFilters=c);var l=e.getHierarchicalFacetByName(t);return l?u.facets=a._getDisjunctiveHierarchicalFacetAttribute(e,l,r):u.facets=t,s.length>0&&(u.numericFilters=s),o.length>0&&(u.facetFilters=o),i(n({},e.getQueryParams(),u))},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var r=[];return Object.keys(e.numericRefinements).forEach(function(n){var i=e.numericRefinements[n]||{};
1Object.keys(i).forEach(function(e){var a=i[e]||[];t!==n&&a.forEach(function(t){if(Array.isArray(t)){var i=t.map(function(t){return n+e+t});r.push(i)}else r.push(n+e+t)})})}),r},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,r){var n=[],i=e.facetsRefinements||{};Object.keys(i).sort().forEach(function(e){(i[e]||[]).slice().sort().forEach(function(t){n.push(e+":"+t)})});var a=e.facetsExcludes||{};Object.keys(a).sort().forEach(function(e){(a[e]||[]).sort().forEach(function(t){n.push(e+":-"+t)})});var o=e.disjunctiveFacetsRefinements||{};Object.keys(o).sort().forEach(function(e){var r=o[e]||[];if(e!==t&&r&&0!==r.length){var i=[];r.slice().sort().forEach(function(t){i.push(e+":"+t)}),n.push(i)}});var s=e.hierarchicalFacetsRefinements||{};return Object.keys(s).sort().forEach(function(i){var a,o,c=(s[i]||[])[0];if(void 0!==c){var u=e.getHierarchicalFacetByName(i),l=e._getHierarchicalFacetSeparator(u),f=e._getHierarchicalRootPath(u);if(t===i){if(-1===c.indexOf(l)||!f&&!0===r||f&&f.split(l).length===c.split(l).length)return;f?(o=f.split(l).length-1,c=f):(o=c.split(l).length-2,c=c.slice(0,c.lastIndexOf(l))),a=u.attributes[o]}else o=c.split(l).length-1,a=u.attributes[o];a&&n.push([a+":"+c])}}),n},_getHitsHierarchicalFacetsAttributes:function(e){return e.hierarchicalFacets.reduce(function(t,r){var n=e.getHierarchicalRefinement(r.name)[0];if(!n)return t.push(r.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(r),a=n.split(i).length,o=r.attributes.slice(0,a+1);return t.concat(o)},[])},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,r){var n=e._getHierarchicalFacetSeparator(t);if(!0===r){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(n).length),[t.attributes[a]]}var o=(e.getHierarchicalRefinement(t.name)[0]||"").split(n).length-1;return t.attributes.slice(0,o+1)},getSearchForFacetQuery:function(e,t,r,o){var s=o.isDisjunctiveFacet(e)?o.clearRefinements(e):o,c={facetQuery:t,facetName:e};return"number"==typeof r&&(c.maxFacetHits=r),i(n({},a._getHitsSearchParams(s),c))}};t.exports=a},565568,(e,t,r)=>{"use strict";t.exports=function(){var e=Array.prototype.slice.call(arguments);return e.reduceRight(function(e,t){return Object.keys(Object(t)).forEach(function(r){void 0!==t[r]&&(void 0!==e[r]&&delete e[r],e[r]=t[r])}),e},{})}},438438,(e,t,r)=>{"use strict";t.exports=function(e,t){if(Array.isArray(e)){for(var r=0;r<e.length;r++)if(t(e[r]))return e[r]}}},293241,(e,t,r)=>{"use strict";t.exports=function(e,t){return e.filter(function(r,n){return t.indexOf(r)>-1&&e.indexOf(r)===n})}},579484,(e,t,r)=>{"use strict";t.exports=function e(t){if("number"==typeof t)return t;if("string"==typeof t)return parseFloat(t);if(Array.isArray(t))return t.map(e);throw Error("The value should be a number, a parsable string or an array of those.")}},238130,(e,t,r)=>{"use strict";t.exports=function(e){return null!==e&&/^[a-zA-Z0-9_-]{1,64}$/.test(e)}},98363,(e,t,r)=>{"use strict";var n=e.r(565568),i=e.r(429108),a=e.r(521723),o={addRefinement:function(e,t,r){if(o.isRefined(e,t,r))return e;var i=""+r,a=e[t]?e[t].concat(i):[i],s={};return s[t]=a,n(s,e)},removeRefinement:function(e,t,r){if(void 0===r)return o.clearRefinement(e,function(e,r){return t===r});var n=""+r;return o.clearRefinement(e,function(e,r){return t===r&&n===e})},toggleRefinement:function(e,t,r){if(void 0===r)throw Error("toggleRefinement should be used with a value");return o.isRefined(e,t,r)?o.removeRefinement(e,t,r):o.addRefinement(e,t,r)},clearRefinement:function(e,t,r){if(void 0===t)return i(e)?{}:e;if("string"==typeof t)return a(e,[t]);if("function"==typeof t){var n=!1,o=Object.keys(e).reduce(function(i,a){var o=e[a]||[],s=o.filter(function(e){return!t(e,a,r)});return s.length!==o.length&&(n=!0),i[a]=s,i},{});return n?o:e}},isRefined:function(e,t,r){var n=!!e[t]&&e[t].length>0;return void 0!==r&&n?-1!==e[t].indexOf(""+r):n}};t.exports=o},761792,(e,t,r)=>{"use strict";var n=e.r(565568),i=e.r(438438),a=e.r(293241),o=e.r(317247),s=e.r(429108),c=e.r(521723),u=e.r(579484),l=e.r(238130),f=e.r(98363);function h(e,t){return Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every(function(e,r){return h(t[r],e)}):e===t}function d(e){var t=e?d._parseNumbers(e):{};void 0===t.userToken||l(t.userToken)||console.warn("[algoliasearch-helper] The `userToken` parameter is invali
1d. This can lead to wrong analytics.\n  - Format: [a-zA-Z0-9_-]{1,64}"),this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{};var r=this;Object.keys(t).forEach(function(e){var n=-1!==d.PARAMETERS.indexOf(e),i=void 0!==t[e];!n&&i&&(r[e]=t[e])})}d.PARAMETERS=Object.keys(new d),d._parseNumbers=function(e){if(e instanceof d)return e;var t={};if(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"].forEach(function(r){var n=e[r];if("string"==typeof n){var i=parseFloat(n);t[r]=isNaN(i)?n:i}}),Array.isArray(e.insideBoundingBox)&&(t.insideBoundingBox=e.insideBoundingBox.map(function(e){return Array.isArray(e)?e.map(function(e){return parseFloat(e)}):e})),e.numericRefinements){var r={};Object.keys(e.numericRefinements).forEach(function(t){var n=e.numericRefinements[t]||{};r[t]={},Object.keys(n).forEach(function(e){var i=n[e].map(function(e){return Array.isArray(e)?e.map(function(e){return"string"==typeof e?parseFloat(e):e}):"string"==typeof e?parseFloat(e):e});r[t][e]=i})}),t.numericRefinements=r}return o(e,t)},d.make=function(e){var t=new d(e);return(e.hierarchicalFacets||[]).forEach(function(e){if(e.rootPath){var r=t.getHierarchicalRefinement(e.name);r.length>0&&0!==r[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),0===(r=t.getHierarchicalRefinement(e.name)).length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}}),t},d.validate=function(e,t){var r=t||{};return e.tagFilters&&r.tagRefinements&&r.tagRefinements.length>0?Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&r.tagFilters?Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&r.numericRefinements&&s(r.numericRefinements)?Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):s(e.numericRefinements)&&r.numericFilters?Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},d.prototype={constructor:d,clearRefinements:function(e){var t={numericRefinements:this._clearNumericRefinements(e),facetsRefinements:f.clearRefinement(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:f.clearRefinement(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:f.clearRefinement(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:f.clearRefinement(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")};return t.numericRefinements===this.numericRefinements&&t.facetsRefinements===this.facetsRefinements&&t.facetsExcludes===this.facetsExcludes&&t.disjunctiveFacetsRefinements===this.disjunctiveFacetsRefinements&&t.hierarchicalFacetsRefinements===this.hierarchicalFacetsRefinements?this:this.setQueryParameters(t)},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,r){var n=u(r);if(this.isNumericRefined(e,t,n))return this;var i=o({},this.numericRefinements);return i[e]=o({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(n)):i[e][t]=[n],this.setQueryParameters({numericRefinements:i})},getConjunctiveRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){return this.isDisjunctiveFacet(e)&&this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){return this.isConjunctiveFacet(e)&&this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,r){return void 0!==r?this.isNumericRefined(e,t,r)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(n,i){return i===e&&n.op===t&&h(n.val,u(r))})}):this:void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(r,n){return n===e&&r.op===t})}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(t,r){return r===e})}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){if(void 0===e)return s(this.numericRefinements)?{}:this.numericRefinements;if("string"==typeof e)return c(this.numericRefinements,[e]);if("function"==typeof e){var t=!1,r=this.numericRefinements,n=Object.keys(r).reduce(function(n,i){var a=r[i],o={};return Object.keys(a=a||{}
vendor: 8,277 bytes, line 1
1).forEach(function(r){var n=a[r]||[],s=[];n.forEach(function(t){e({val:t,op:r},i,"numeric")||s.push(t)}),s.length!==n.length&&(t=!0),o[r]=s}),n[i]=o,n},{});return t?n:this.numericRefinements}},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:f.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:f.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:f.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:this.facets.filter(function(t){return t!==e})}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.filter(function(t){return t!==e})}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.filter(function(t){return t.name!==e})}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:f.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw Error(e+" is not defined in the facets attribute of the helper configuration");return f.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:f.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return f.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:f.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.filter(function(t){return t!==e})};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:f.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:f.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:f.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),i={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+r))?-1===t.indexOf(r)?i[e]=[]:i[e]=[t.slice(0,t.lastIndexOf(r))]:i[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n(i,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw Error(e+" is already refined.");if(!this.isHierarchicalFacet(e))throw Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration.");var r={};return r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:n(r,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))return this;var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:n(t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return this.disjunctiveFacets.indexOf(e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return this.facets.indexOf(e)>-1},isFacetRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){return!!this.isConjunctiveFacet(e)&&f.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){return!!this.isDisjunctiveFacet(e)&&f.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))return!1;var r=this.getHierarchicalRefinement(e);return t?-1!==r.indexOf(t):r.length>0},isNumericRefined:function(e,t,r){if(void 0===r&&void 0===t)return!!this.numericRefinements[e];var n,a=this.numericRefinements[e]&&void 0!==this.numericRefinements[e][t];if(void 0===r||!a)return a;var o=u(r),s=void 0!==(n=this.numericRefinements[e][t],i(n,function(e){return h(e,o)}));return a&&s},isTagRefined:function(e){return -1!==this.tagRefinements.indexOf(e)},getRefinedDisjunctiveFacets:function(){var e=this,t=a(Object.keys(this.numericRefinements).filter(function(t){return Object.keys(e.numericRefinements[t]).length>0}),this.disjunctiveFacets);return Object.keys(this.disjunctiveFacetsRefinements).filter(function(t){return e.disjunctiveFacetsRefinements[t].length>0}).concat(t).concat(this.getRefinedHierarchicalFacets()).sort()},getRefinedHierarchicalFacets:function(){var e=this;return a(this.hierarchicalFacets.map(function(e){return e.name}),Object.keys(this.hierarchicalFacetsRefinements).filter(function(t){return e.hierarchicalFacetsRefinements[t].length>0})).sort()},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return this.disjunctiveFacets.filter(function(t){return -1===e.indexOf(t)})},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","hierarchicalFacets","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={},r=this;
1return Object.keys(this).forEach(function(n){var i=r[n];-1===e.indexOf(n)&&void 0!==i&&(t[n]=i)}),t},setQueryParameter:function(e,t){if(this[e]===t)return this;var r={};return r[e]=t,this.setQueryParameters(r)},setQueryParameters:function(e){if(!e)return this;var t=d.validate(this,e);if(t)throw t;var r=this,n=d._parseNumbers(e),i=Object.keys(this).reduce(function(e,t){return e[t]=r[t],e},{}),a=Object.keys(n).reduce(function(e,t){var r=void 0!==e[t],i=void 0!==n[t];return r&&!i?c(e,[t]):(i&&(e[t]=n[t]),e)},i);return new this.constructor(a)},resetPage:function(){return void 0===this.page?this:this.setPage(0)},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!=typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return i(this.hierarchicalFacets,function(t){return t.name===e})},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))return[];var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var r=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e));return t.split(r).map(function(e){return e.trim()})},toString:function(){return JSON.stringify(this,null,2)}},t.exports=d},278437,(e,t,r)=>{"use strict";t.exports=function(e){return Array.isArray(e)?e.filter(Boolean):[]}},890535,(e,t,r)=>{"use strict";t.exports=function(e,t){if(!Array.isArray(e))return -1;for(var r=0;r<e.length;r++)if(t(e[r]))return r;return -1}},970300,(e,t,r)=>{"use strict";var n=e.r(438438);t.exports=function(e,t){var r=(t||[]).map(function(e){return e.split(":")});return e.reduce(function(e,t){var i=t.split(":"),a=n(r,function(e){return e[0]===i[0]});return i.length>1||!a?(e[0].push(i[0]),e[1].push(i[1])):(e[0].push(a[0]),e[1].push(a[1])),e},[[],[]])}},531145,(e,t,r)=>{"use strict";t.exports=function(){var e=Array.prototype.slice.call(arguments);return e.reduceRight(function(e,t){return Object.keys(Object(t)).forEach(function(r){var n="number"==typeof e[r]?e[r]:0,i=t[r];void 0!==i&&i>=n&&(void 0!==e[r]&&delete e[r],e[r]=i)}),e},{})}},181368,(e,t,r)=>{"use strict";t.exports=function(e,t,r){if(!Array.isArray(e))return[];Array.isArray(r)||(r=[]);var n=e.map(function(e,r){return{criteria:t.map(function(t){return e[t]}),index:r,value:e}});return n.sort(function(e,t){for(var n=-1;++n<e.criteria.length;){var i=function(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=void 0!==t,a=null===t;if(!a&&e>t||n&&i||!r)return 1;if(!n&&e<t||a&&r||!i)return -1}return 0}(e.criteria[n],t.criteria[n]);if(i){if(n>=r.length)return i;if("desc"===r[n])return-i;return i}}return e.index-t.index}),n.map(function(e){return e.value})}},260296,(e,t,r)=>{"use strict";t.exports=function(e){return function(t,r){var n,u,l,f,h,d=e.hierarchicalFacets[r],p=e.hierarchicalFacetsRefinements[d.name]&&e.hierarchicalFacetsRefinements[d.name][0]||"",m=e._getHierarchicalFacetSeparator(d),g=e._getHierarchicalRootPath(d),y=e._getHierarchicalShowParentLevel(d),v=a(e._getHierarchicalFacetSortBy(d)),b=t.every(function(e){return e.exhaustive}),_=(n=v,u=m,l=g,f=y,h=p,function(e,t,r){var a=e;if(r>0){var d=0;for(a=e;d<r;)a=i(a&&Array.isArray(a.data)?a.data:[],function(e){return e.isRefined}),d++}if(a){var p=Object.keys(t.data).map(function(e){return[e,t.data[e]]}).filter(function(e){var t,r,n,i,o,s;return t=e[0],r=a.path||l,n=h,i=u,o=l,s=f,(!o||0===t.indexOf(o)&&o!==t)&&(!o&&-1===t.indexOf(i)||o&&t.split(i).length-o.split(i).length==1||-1===t.indexOf(i)&&-1===n.indexOf(i)||0===n.indexOf(t)||0===t.indexOf(r+i)&&(s||0===t.indexOf(n)))});a.data=o(p.map(function(e){var r,n,i,a,o,l,f=e[0];return r=e[1],n=f,i=u,a=c(h),o=t.exhaustive,{name:(l=n.split(i))[l.length-1].trim(),path:n,escapedValue:s(n),count:r,isRefined:a===n||0===a.indexOf(n+i),exhaustive:o,data:null}}),n[0],n[1])}return e}),S=t;return g&&(S=t.slice(g.split(m).length)),S.reduce(_,{name:e.hierarchicalFacets[r].name,count:null,isRefined:!0,path:null,escapedValue:null,exhaustive:b,data:null})}};var n=e.r(828434),i=e.r(438438),a=e.r(970300),o=e.r(181368),s=n.escapeFacetValue,c=n.unescapeFacetValue},952150,(e,t,r)=>{"use strict";var n=e.r(278437),i=e.r(565568),a=e.r(828434),o=e.r(438438),s=e.r(890535),c=e.r(970300),u=e.r(531145),l=e.r(181368),f=a.escapeFacetValue,h=a.unescapeFacetValue,d=e.r(260296);function p(e){var t={};return e.forEach(function(e,r){t[e]=r}),t}function m(e,t,r){t&&t[r]&&(e.stats=t[r])}function g(e,t,r){var a=t[0]||{};this._rawResults=t;var c=this;
1Object.keys(a).forEach(function(e){c[e]=a[e]});var l=i(r,{persistHierarchicalRootCount:!1});Object.keys(l).forEach(function(e){c[e]=l[e]}),this.processingTimeMS=t.reduce(function(e,t){return void 0===t.processingTimeMS?e:e+t.processingTimeMS},0),this.disjunctiveFacets=[],this.hierarchicalFacets=e.hierarchicalFacets.map(function(){return[]}),this.facets=[];var f=e.getRefinedDisjunctiveFacets(),g=p(e.facets),y=p(e.disjunctiveFacets),v=1,b=a.facets||{};Object.keys(b).forEach(function(t){var r=b[t],n=(l=e.hierarchicalFacets,o(l,function(e){return(e.attributes||[]).indexOf(t)>-1}));if(n){var i=n.attributes.indexOf(t),u=s(e.hierarchicalFacets,function(e){return e.name===n.name});c.hierarchicalFacets[u][i]={attribute:t,data:r,exhaustive:a.exhaustiveFacetsCount}}else{var l,f,h=-1!==e.disjunctiveFacets.indexOf(t),d=-1!==e.facets.indexOf(t);h&&(f=y[t],c.disjunctiveFacets[f]={name:t,data:r,exhaustive:a.exhaustiveFacetsCount},m(c.disjunctiveFacets[f],a.facets_stats,t)),d&&(f=g[t],c.facets[f]={name:t,data:r,exhaustive:a.exhaustiveFacetsCount},m(c.facets[f],a.facets_stats,t))}}),this.hierarchicalFacets=n(this.hierarchicalFacets),f.forEach(function(r){var n=t[v],o=n&&n.facets?n.facets:{},l=e.getHierarchicalFacetByName(r);Object.keys(o).forEach(function(t){var r,f=o[t];if(l){r=s(e.hierarchicalFacets,function(e){return e.name===l.name});var d=s(c.hierarchicalFacets[r],function(e){return e.attribute===t});if(-1===d)return;c.hierarchicalFacets[r][d].data=c.persistHierarchicalRootCount?u(c.hierarchicalFacets[r][d].data,f):i(f,c.hierarchicalFacets[r][d].data)}else{r=y[t];var p=a.facets&&a.facets[t]||{};c.disjunctiveFacets[r]={name:t,data:u(p,f),exhaustive:n.exhaustiveFacetsCount},m(c.disjunctiveFacets[r],n.facets_stats,t),e.disjunctiveFacetsRefinements[t]&&e.disjunctiveFacetsRefinements[t].forEach(function(n){!c.disjunctiveFacets[r].data[n]&&e.disjunctiveFacetsRefinements[t].indexOf(h(n))>-1&&(c.disjunctiveFacets[r].data[n]=0)})}}),v++}),e.getRefinedHierarchicalFacets().forEach(function(r){var n=e.getHierarchicalFacetByName(r),a=e._getHierarchicalFacetSeparator(n),o=e.getHierarchicalRefinement(r);0===o.length||o[0].split(a).length<2||t.slice(v).forEach(function(t){var r=t&&t.facets?t.facets:{};Object.keys(r).forEach(function(t){var u=r[t],l=s(e.hierarchicalFacets,function(e){return e.name===n.name}),f=s(c.hierarchicalFacets[l],function(e){return e.attribute===t});if(-1!==f){var h={};if(o.length>0&&!c.persistHierarchicalRootCount){var d=o[0].split(a)[0];h[d]=c.hierarchicalFacets[l][f].data[d]}c.hierarchicalFacets[l][f].data=i(h,u,c.hierarchicalFacets[l][f].data)}}),v++})}),Object.keys(e.facetsExcludes).forEach(function(t){var r=e.facetsExcludes[t],n=g[t];c.facets[n]={name:t,data:b[t],exhaustive:a.exhaustiveFacetsCount},r.forEach(function(e){c.facets[n]=c.facets[n]||{name:t},c.facets[n].data=c.facets[n].data||{},c.facets[n].data[e]=0})}),this.hierarchicalFacets=this.hierarchicalFacets.map(d(e)),this.facets=n(this.facets),this.disjunctiveFacets=n(this.disjunctiveFacets),this._state=e}function y(e,t){var r=o(e,function(e){return e.name===t});return r&&r.stats}function v(e,t,r,n,i){var a=o(i,function(e){return e.name===r}),s=a&&a.data&&a.data[n]?a.data[n]:0;return{type:t,attributeName:r,name:n,count:s,exhaustive:a&&a.exhaustive||!1}}g.prototype.getFacetByName=function(e){function t(t){return t.name===e}return o(this.facets,t)||o(this.disjunctiveFacets,t)||o(this.hierarchicalFacets,t)},g.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],g.prototype.getFacetValues=function(e,t){var r,n=function(e,t){function r(e){return e.name===t}if(e._state.isConjunctiveFacet(t)){var n=o(e.facets,r);return n?Object.keys(n.data).map(function(r){var i=f(r);return{name:r,escapedValue:i,count:n.data[r],isRefined:e._state.isFacetRefined(t,i),isExcluded:e._state.isExcludeRefined(t,r)}}):[]}if(e._state.isDisjunctiveFacet(t)){var i=o(e.disjunctiveFacets,r);return i?Object.keys(i.data).map(function(r){var n=f(r);return{name:r,escapedValue:n,count:i.data[r],isRefined:e._state.isDisjunctiveFacetRefined(t,n)}}):[]}if(e._state.isHierarchicalFacet(t)){var a=o(e.hierarchicalFacets,r);if(!a)return a;var s=e._state.getHierarchicalFacetByName(t),c=e._state._getHierarchicalFacetSeparator(s),u=h(e._state.getHierarchicalRefinement(t)[0]||"");0===u.indexOf(s.rootPath)&&(u=u.replace(s.rootPath+c,""));var l=u.split(c);return l.unshift(t),function e(t,r,n){t.isRefined=t.name===(r[n]&&r[n].trim()),t.data&&t.data.forEach(function(t){e(t,r,n+1)})}(a,l,0),a}}(this,e);if(n){var a=i(t,{sortBy:g.DEFAULT_SORT,facetOrdering:!(t&&t.sortBy)}),s=this;return r=Array.isArray(n)?[e]:s._state.getHierarchicalFacetByName(n.name).attributes,function e(t,r,n,a){if(a=a||0,Array.isArray(r))return t(r,n[a]);if(!r.data||0===r.data.length)return r;var o=r.data.map(function(r){return e(t,r,n,a+1)});return i({data:t(o,n[a])},r)}(function(e,t){if(a.facetOrdering){var r,n,i,o,u,f,h,d=s.renderingContent&&s.renderingContent.facetOrdering&&s.renderingContent.facetOrdering.values&&s.renderingContent.facetOrdering.values[t];if(d)return i=[],o=[],u=d.hide||[],f=(d.order||[]).reduce(function(e,t,r){return e[t]=r,e},{}),e.forEach(function(e){var t=e.path||e.name,r=u.indexOf(t)>-1;r||void 0===f[t]?r||o.push(e):i[f[t]]=e}),i=i.filter(function(e){return e}),"hidden"===(h=d.sortRemainingBy)?i:(n="alpha"===h?[["path","name"],["asc","asc"]]:[["count"],["desc"]],i.concat(l(o,n[0],n[1])))}if(Array.isArray(a.sortBy)){var p=c(a.sortBy,g.DEFAULT_SORT);return l(e,p[0],p[1])}if("function"==typeof a.sortBy)return r=a.sortBy,e.sort(r);throw Error("options.sortBy is optional but if defined it must be either an array of str
1ing (predicates) or a sorting function")},n,r)}},g.prototype.getFacetStats=function(e){return this._state.isConjunctiveFacet(e)?y(this.facets,e):this._state.isDisjunctiveFacet(e)?y(this.disjunctiveFacets,e):void 0},g.prototype.getRefinements=function(){var e=this._state,t=this,r=[];return Object.keys(e.facetsRefinements).forEach(function(n){e.facetsRefinements[n].forEach(function(i){r.push(v(e,"facet",n,i,t.facets))})}),Object.keys(e.facetsExcludes).forEach(function(n){e.facetsExcludes[n].forEach(function(i){r.push(v(e,"exclude",n,i,t.facets))})}),Object.keys(e.disjunctiveFacetsRefinements).forEach(function(n){e.disjunctiveFacetsRefinements[n].forEach(function(i){r.push(v(e,"disjunctive",n,i,t.disjunctiveFacets))})}),Object.keys(e.hierarchicalFacetsRefinements).forEach(function(n){e.hierarchicalFacetsRefinements[n].forEach(function(i){var a,s,c,u,l,f,h,d,p,m,g;r.push((a=e,s=n,c=i,u=t.hierarchicalFacets,l=a.getHierarchicalFacetByName(s),f=a._getHierarchicalFacetSeparator(l),h=c.split(f),d=o(u,function(e){return e.name===s}),m=(p=h.reduce(function(e,t){var r=e&&o(e.data,function(e){return e.name===t});return void 0!==r?r:e},d))&&p.count||0,g=p&&p.exhaustive||!1,{type:"hierarchical",attributeName:s,name:p&&p.path||"",count:m,exhaustive:g}))})}),Object.keys(e.numericRefinements).forEach(function(t){var n=e.numericRefinements[t];Object.keys(n).forEach(function(e){n[e].forEach(function(n){r.push({type:"numeric",attributeName:t,name:n,numericValue:n,operator:e})})})}),e.tagRefinements.forEach(function(e){r.push({type:"tag",attributeName:"_tags",name:e})}),r},t.exports=g},546277,(e,t,r)=>{t.exports=function(e){return e.reduce(function(e,t){return e.concat(t)},[])}},292041,(e,t,r)=>{"use strict";var n=e.r(438438),i=e.r(546277);t.exports=function(e,t){var r,a,o={};return t.forEach(function(t){t.forEach(function(t,r){e.includes(t.objectID)||(o[t.objectID]?o[t.objectID]={indexSum:o[t.objectID].indexSum+r,count:o[t.objectID].count+1}:o[t.objectID]={indexSum:r,count:1})})}),(r=t.length,a=[],Object.keys(o).forEach(function(e){o[e].count<2&&(o[e].indexSum+=100),a.push({objectID:e,avgOfIndices:o[e].indexSum/r})}),a.sort(function(e,t){return e.avgOfIndices>t.avgOfIndices?1:-1})).reduce(function(e,r){var a=n(i(t),function(e){return e.objectID===r.objectID});return a?e.concat(a):e},[])}},72461,(e,t,r)=>{"use strict";var n=e.r(106824),i=e.r(326670),a=e.r(828434).escapeFacetValue,o=e.r(538569),s=e.r(317247),c=e.r(429108),u=e.r(521723),l=e.r(872850),f=e.r(851716),h=e.r(412496),d=e.r(761792),p=e.r(952150),m=e.r(292041),g=e.r(455699);function y(e,t,r,n){"function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+g+")"),this.setClient(e);var i=r||{};i.index=t,this.state=d.make(i),this.recommendState=new l({params:i.recommendState}),this.lastResults=null,this.lastRecommendResults=null,this._queryId=0,this._recommendQueryId=0,this._lastQueryIdReceived=-1,this._lastRecommendQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0,this._currentNbRecommendQueries=0,this._searchResultsOptions=n,this._recommendCache={}}function v(e){if(e<0)throw Error("Page requested below 0.");return this._change({state:this.state.setPage(e),isPageReset:!1}),this}function b(){return this.state.page}o(y,n),y.prototype.search=function(){return this._search({onlyWithDerivedHelpers:!1}),this},y.prototype.searchOnlyWithDerivedHelpers=function(){return this._search({onlyWithDerivedHelpers:!0}),this},y.prototype.searchWithComposition=function(){return this._runComposition({onlyWithDerivedHelpers:!0}),this},y.prototype.recommend=function(){return this._recommend(),this},y.prototype.getQuery=function(){var e=this.state;return h._getHitsSearchParams(e)},y.prototype.searchOnce=function(e,t){var r=e?this.state.setQueryParameters(e):this.state,n=h._getQueries(r.index,r),i=this;return(this._currentNbQueries++,this.emit("searchOnce",{state:r}),t)?void this.client.search(n).then(function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(null,new p(r,e.results),r)}).catch(function(e){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),t(e,null,r)}):this.client.search(n).then(function(e){return i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),{content:new p(r,e.results),state:r,_originalResponse:e}},function(e){throw i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),e})},y.prototype.findAnswers=function(e){console.warn("[algoliasearch-helper] answers is no longer supported");var t=this.state,r=this.derivedHelpers[0];if(!r)return Promise.resolve([]);var n=r.getModifiedState(t),i=s({attributesForPrediction:e.attributesForPrediction,nbHits:e.nbHits},{params:u(h._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("function"!=typeof this.client.initIndex)throw Error(a);var o=this.client.initIndex(n.index);if("function"!=typeof o.findAnswers)throw Error(a);return o.findAnswers(n.query,e.queryLanguages,i)},y.prototype.searchForFacetValues=function(e,t,r,n){var i,o="function"==typeof this.client.searchForFacetValues&&"function"!=typeof this.client.searchForFacets,s="function"==typeof this.client.initIndex;if(!o&&!s&&"function"!=typeof this.client.search)throw Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues or client.initIndex(index).searchForFacetValues");var c=this.state.setQueryParameters(n||{}),u=c.isDisjunctiveFacet(e),l=h.getSearchForFacetQuery(e,t,r,c);this._currentNbQueries++;var f=this;o?i=this.client.searchForFacetValues([{indexName:c.index,params:l}]):s?i=this.client.initIndex(c.index).searchForFacetValues(l):(delete l.facetName,i=this.client.search([{type:"facet",facet:e,indexName:c.index,params:l}]).then(function(e){return e.results[0]}
1)),this.emit("searchForFacetValues",{state:c,facet:e,query:t});var d=this.lastResults&&this.lastResults.index===c.index&&this.lastResults.renderingContent&&this.lastResults.renderingContent.facetOrdering&&this.lastResults.renderingContent.facetOrdering.values&&this.lastResults.renderingContent.facetOrdering.values[e]&&this.lastResults.renderingContent.facetOrdering.values[e].hide||[];return i.then(function(t){return f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),(t=Array.isArray(t)?t[0]:t).facetHits.forEach(function(r,n){d.indexOf(r.value)>-1?t.facetHits.splice(n,1):(r.escapedValue=a(r.value),r.isRefined=u?c.isDisjunctiveFacetRefined(e,r.escapedValue):c.isFacetRefined(e,r.escapedValue))}),t},function(e){throw f._currentNbQueries--,0===f._currentNbQueries&&f.emit("searchQueueEmpty"),e})},y.prototype.searchForCompositionFacetValues=function(e,t,r,n){if("function"!=typeof this.client.searchForFacetValues)throw Error("search for facet values (searchable) was called, but this client does not have a function client.searchForFacetValues");var i,o=this.state.setQueryParameters(n||{}),s=o.isDisjunctiveFacet(e);this._currentNbQueries++;var c=this;return i=this.client.searchForFacetValues({compositionID:o.index,facetName:e,searchForFacetValuesRequest:{params:{query:t,maxFacetHits:r,searchQuery:h._getCompositionHitsSearchParams(o)}}}),this.emit("searchForFacetValues",{state:o,facet:e,query:t}),i.then(function(t){return c._currentNbQueries--,0===c._currentNbQueries&&c.emit("searchQueueEmpty"),(t=t.results[0]).facetHits.forEach(function(t){t.escapedValue=a(t.value),t.isRefined=s?o.isDisjunctiveFacetRefined(e,t.escapedValue):o.isFacetRefined(e,t.escapedValue)}),t},function(e){throw c._currentNbQueries--,0===c._currentNbQueries&&c.emit("searchQueueEmpty"),e})},y.prototype.setQuery=function(e){return this._change({state:this.state.resetPage().setQuery(e),isPageReset:!0}),this},y.prototype.clearRefinements=function(e){return this._change({state:this.state.resetPage().clearRefinements(e),isPageReset:!0}),this},y.prototype.clearTags=function(){return this._change({state:this.state.resetPage().clearTags(),isPageReset:!0}),this},y.prototype.addDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},y.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},y.prototype.addHierarchicalFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addHierarchicalFacetRefinement(e,t),isPageReset:!0}),this},y.prototype.addNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().addNumericRefinement(e,t,r),isPageReset:!0}),this},y.prototype.addFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().addFacetRefinement(e,t),isPageReset:!0}),this},y.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},y.prototype.addFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().addExcludeRefinement(e,t),isPageReset:!0}),this},y.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},y.prototype.addTag=function(e){return this._change({state:this.state.resetPage().addTagRefinement(e),isPageReset:!0}),this},y.prototype.addFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.addFrequentlyBoughtTogether(e)}),this},y.prototype.addRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.addRelatedProducts(e)}),this},y.prototype.addTrendingItems=function(e){return this._recommendChange({state:this.recommendState.addTrendingItems(e)}),this},y.prototype.addTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.addTrendingFacets(e)}),this},y.prototype.addLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.addLookingSimilar(e)}),this},y.prototype.removeNumericRefinement=function(e,t,r){return this._change({state:this.state.resetPage().removeNumericRefinement(e,t,r),isPageReset:!0}),this},y.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeDisjunctiveFacetRefinement(e,t),isPageReset:!0}),this},y.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},y.prototype.removeHierarchicalFacetRefinement=function(e){return this._change({state:this.state.resetPage().removeHierarchicalFacetRefinement(e),isPageReset:!0}),this},y.prototype.removeFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().removeFacetRefinement(e,t),isPageReset:!0}),this},y.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},y.prototype.removeFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().removeExcludeRefinement(e,t),isPageReset:!0}),this},y.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},y.prototype.removeTag=function(e){return this._change({state:this.state.resetPage().removeTagRefinement(e),isPageReset:!0}),this},y.prototype.removeFrequentlyBoughtTogether=function(e){return this._recommendChange({state:this.recommendState.removeParam
vendor: 4,059 bytes, line 1
1s(e)}),this},y.prototype.removeRelatedProducts=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},y.prototype.removeTrendingItems=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},y.prototype.removeTrendingFacets=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},y.prototype.removeLookingSimilar=function(e){return this._recommendChange({state:this.recommendState.removeParams(e)}),this},y.prototype.toggleFacetExclusion=function(e,t){return this._change({state:this.state.resetPage().toggleExcludeFacetRefinement(e,t),isPageReset:!0}),this},y.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},y.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},y.prototype.toggleFacetRefinement=function(e,t){return this._change({state:this.state.resetPage().toggleFacetRefinement(e,t),isPageReset:!0}),this},y.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},y.prototype.toggleTag=function(e){return this._change({state:this.state.resetPage().toggleTagRefinement(e),isPageReset:!0}),this},y.prototype.nextPage=function(){var e=this.state.page||0;return this.setPage(e+1)},y.prototype.previousPage=function(){var e=this.state.page||0;return this.setPage(e-1)},y.prototype.setCurrentPage=v,y.prototype.setPage=v,y.prototype.setIndex=function(e){return this._change({state:this.state.resetPage().setIndex(e),isPageReset:!0}),this},y.prototype.setQueryParameter=function(e,t){return this._change({state:this.state.resetPage().setQueryParameter(e,t),isPageReset:!0}),this},y.prototype.setState=function(e){return this._change({state:d.make(e),isPageReset:!1}),this},y.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new d(e),this},y.prototype.hasRefinements=function(e){return!!c(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},y.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},y.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},y.prototype.hasTag=function(e){return this.state.isTagRefined(e)},y.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},y.prototype.getIndex=function(){return this.state.index},y.prototype.getCurrentPage=b,y.prototype.getPage=b,y.prototype.getTags=function(){return this.state.tagRefinements},y.prototype.getRefinements=function(e){var t=[];this.state.isConjunctiveFacet(e)?(this.state.getConjunctiveRefinements(e).forEach(function(e){t.push({value:e,type:"conjunctive"})}),this.state.getExcludeRefinements(e).forEach(function(e){t.push({value:e,type:"exclude"})})):this.state.isDisjunctiveFacet(e)&&this.state.getDisjunctiveRefinements(e).forEach(function(e){t.push({value:e,type:"disjunctive"})});var r=this.state.getNumericRefinements(e);return Object.keys(r).forEach(function(e){var n=r[e];t.push({value:n,operator:e,type:"numeric"})}),t},y.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},y.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},y.prototype._search=function(e){var t=this.state,r=[],n=[];e.onlyWithDerivedHelpers||(n=h._getQueries(t.index,t),r.push({state:t,queriesCount:n.length,helper:this}),this.emit("search",{state:t,results:this.lastResults}));var i=this.derivedHelpers.map(function(e){var n=e.getModifiedState(t),i=n.index?h._getQueries(n.index,n):[];return r.push({state:n,queriesCount:i.length,helper:e}),e.emit("search",{state:n,results:e.lastResults}),i}),a=Array.prototype.concat.apply(n,i),o=this._queryId++;if(this._currentNbQueries++,!a.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,r,o));
1try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,r,o)).catch(this._dispatchAlgoliaError.bind(this,o))}catch(e){this.emit("error",{error:e})}},y.prototype._runComposition=function(){var e=this.state,t=[],r=this.derivedHelpers.map(function(r){var n=r.getModifiedState(e),i=h._getCompositionQueries(n);return t.push({state:n,queriesCount:i.length,helper:r}),r.emit("search",{state:n,results:r.lastResults}),i}),n=Array.prototype.concat.apply([],r),i=this._queryId++;if(this._currentNbQueries++,!n.length)return Promise.resolve({results:[]}).then(this._dispatchAlgoliaResponse.bind(this,t,i));if(n.length>1)throw Error("Only one query is allowed when using a composition.");var a=n[0];try{this.client.search(a).then(this._dispatchAlgoliaResponse.bind(this,t,i)).catch(this._dispatchAlgoliaError.bind(this,i))}catch(e){this.emit("error",{error:e})}},y.prototype._recommend=function(){var e=this.state,t=this.recommendState,r=this.getIndex(),n=[{state:t,index:r,helper:this}],i=t.params.map(function(e){return e.$$id});this.emit("fetch",{recommend:{state:t,results:this.lastRecommendResults}});var a=this._recommendCache,o=this.derivedHelpers.map(function(t){var r=t.getModifiedState(e).index;if(!r)return[];var o=t.getModifiedRecommendState(new l);return n.push({state:o,index:r,helper:t}),i=Array.prototype.concat.apply(i,o.params.map(function(e){return e.$$id})),t.emit("fetch",{recommend:{state:o,results:t.lastRecommendResults}}),o._buildQueries(r,a)}),s=Array.prototype.concat.apply(this.recommendState._buildQueries(r,a),o);if(0!==s.length){if(s.length>0&&void 0===this.client.getRecommendations)return void console.warn("Please update algoliasearch/lite to the latest version in order to use recommend widgets.");var c=this._recommendQueryId++;this._currentNbRecommendQueries++;try{this.client.getRecommendations(s).then(this._dispatchRecommendResponse.bind(this,c,n,i)).catch(this._dispatchRecommendError.bind(this,c))}catch(e){this.emit("error",{error:e})}}},y.prototype._dispatchAlgoliaResponse=function(e,t,r){var n=this;if(!(t<this._lastQueryIdReceived)){this._currentNbQueries-=t-this._lastQueryIdReceived,this._lastQueryIdReceived=t,0===this._currentNbQueries&&this.emit("searchQueueEmpty");var i=r.results.slice(),a=Object.keys(r).reduce(function(e,t){return"results"!==t&&(e[t]=r[t]),e},{});Object.keys(a).length<=0&&(a=void 0),e.forEach(function(e){var t=e.state,r=e.queriesCount,o=e.helper,s=i.splice(0,r);t.index?(o.lastResults=new p(t,s,n._searchResultsOptions),void 0!==a&&(o.lastResults._rawContent=a),o.emit("result",{results:o.lastResults,state:t})):o.emit("result",{results:null,state:t})})}},y.prototype._dispatchRecommendResponse=function(e,t,r,n){if(!(e<this._lastRecommendQueryIdReceived)){this._currentNbRecommendQueries-=e-this._lastRecommendQueryIdReceived,this._lastRecommendQueryIdReceived=e,0===this._currentNbRecommendQueries&&this.emit("recommendQueueEmpty");var i=this._recommendCache,a={};r.filter(function(e){return void 0===i[e]}).forEach(function(e,t){a[e]||(a[e]=[]),a[e].push(t)}),Object.keys(a).forEach(function(e){var t=a[e],o=n.results[t[0]];if(1===t.length){i[e]=o;return}i[e]=Object.assign({},o,{hits:m(r,t.map(function(e){return n.results[e].hits}))})});var o={};r.forEach(function(e){o[e]=i[e]}),t.forEach(function(e){var t=e.state,r=e.helper;e.index?(r.lastRecommendResults=new f(t,o),r.emit("recommend:result",{recommend:{results:r.lastRecommendResults,state:t}})):r.emit("recommend:result",{results:null,state:t})})}},y.prototype._dispatchAlgoliaError=function(e,t){e<this._lastQueryIdReceived||(this._currentNbQueries-=e-this._lastQueryIdReceived,this._lastQueryIdReceived=e,this.emit("error",{error:t}),0===this._currentNbQueries&&this.emit("searchQueueEmpty"))},y.prototype._dispatchRecommendError=function(e,t){e<this._lastRecommendQueryIdReceived||(this._currentNbRecommendQueries-=e-this._lastRecommendQueryIdReceived,this._lastRecommendQueryIdReceived=e,this.emit("error",{error:t}),0===this._currentNbRecommendQueries&&this.emit("recommendQueueEmpty"))},y.prototype.containsRefinement=function(e,t,r,n){return e||0!==t.length||0!==r.length||0!==n.length},y.prototype._hasDisjunctiveRefinements=function(e){return this.state.disjunctiveRefinements[e]&&this.state.disjunctiveRefinements[e].length>0},y.prototype._change=function(e){var t=e.state,r=e.isPageReset;
1t!==this.state&&(this.state=t,this.emit("change",{state:this.state,results:this.lastResults,isPageReset:r}))},y.prototype._recommendChange=function(e){var t=e.state;t!==this.recommendState&&(this.recommendState=t,this.emit("recommend:change",{search:{results:this.lastResults,state:this.state},recommend:{results:this.lastRecommendResults,state:this.recommendState}}))},y.prototype.clearCache=function(){return this.client.clearCache&&this.client.clearCache(),this},y.prototype.setClient=function(e){return this.client===e||("function"==typeof e.addAlgoliaAgent&&e.addAlgoliaAgent("JS Helper ("+g+")"),this.client=e),this},y.prototype.getClient=function(){return this.client},y.prototype.derive=function(e,t){var r=new i(this,e,t);return this.derivedHelpers.push(r),r},y.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},y.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},t.exports=y},649463,(e,t,r)=>{"use strict";var n=e.r(72461),i=e.r(872850),a=e.r(851716),o=e.r(761792),s=e.r(952150);function c(e,t,r,i){return new n(e,t,r,i)}c.version=e.r(455699),c.AlgoliaSearchHelper=n,c.SearchParameters=o,c.RecommendParameters=i,c.SearchResults=s,c.RecommendResults=a,t.exports=c},455699,(e,t,r)=>{"use strict";t.exports="3.26.0"},910376,(e,t,r)=>{"use strict";let n,i,a,o;var s,c,u,l,f=e.i(943915),h=e.i(912622);function d(e,t){return function(){return e.apply(t,arguments)}}let{toString:p}=Object.prototype,{getPrototypeOf:m}=Object,{iterator:g,toStringTag:y}=Symbol,v=(n=Object.create(null),e=>{let t=p.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())}),b=e=>(e=e.toLowerCase(),t=>v(t)===e),_=e=>t=>typeof t===e,{isArray:S}=Array,O=_("undefined");function R(e){return null!==e&&!O(e)&&null!==e.constructor&&!O(e.constructor)&&w(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}let P=b("ArrayBuffer"),j=_("string"),w=_("function"),x=_("number"),E=e=>null!==e&&"object"==typeof e,C=e=>{if("object"!==v(e))return!1;let t=m(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(y in e)&&!(g in e)},T=b("Date"),F=b("File"),A=b("Blob"),N=b("FileList"),k=b("URLSearchParams"),[I,D,H,U]=["ReadableStream","Request","Response","Headers"].map(b);function L(e,t,{allOwnKeys:r=!1}={}){let n,i;if(null!=e)if("object"!=typeof e&&(e=[e]),S(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{let i;if(R(e))return;let a=r?Object.getOwnPropertyNames(e):Object.keys(e),o=a.length;for(n=0;n<o;n++)i=a[n],t.call(null,e[i],i,e)}}function M(e,t){let r;if(R(e))return null;t=t.toLowerCase();let n=Object.keys(e),i=n.length;for(;i-- >0;)if(t===(r=n[i]).toLowerCase())return r;return null}let q="u">typeof globalThis?globalThis:"u">typeof self?self:"u">typeof window?window:e.g,W=e=>!O(e)&&e!==q,B=(i="u">typeof Uint8Array&&m(Uint8Array),e=>i&&e instanceof i),Q=b("HTMLFormElement"),$=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),V=b("RegExp"),z=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};L(r,(r,i)=>{let a;!1!==(a=t(r,i,e))&&(n[i]=a||r)}),Object.defineProperties(e,n)},G=b("AsyncFunction"),J=(s="function"==typeof setImmediate,c=w(q.postMessage),s?setImmediate:c?(u=`axios@${Math.random()}`,l=[],q.addEventListener("message",({source:e,data:t})=>{e===q&&t===u&&l.length&&l.shift()()},!1),e=>{l.push(e),q.postMessage(u,"*")}):e=>setTimeout(e)),K="u">typeof queueMicrotask?queueMicrotask.bind(q):void 0!==f.default&&f.default.nextTick||J;var X={isArray:S,isArrayBuffer:P,isBuffer:R,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||w(e.append)&&("formdata"===(t=v(e))||"object"===t&&w(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"u">typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&P(e.buffer)},isString:j,isNumber:x,isBoolean:e=>!0===e||!1===e,isObject:E,isPlainObject:C,isEmptyObject:e=>{if(!E(e)||R(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:I,isRequest:D,isResponse:H,isHeaders:U,isUndefined:O,isDate:T,isFile:F,isBlob:A,isRegExp:V,isFunction:w,isStream:e=>E(e)&&w(e.pipe),isURLSearchParams:k,isTypedArray:B,isFileList:N,forEach:L,merge:function e(){let{caseless:t,skipUndefined:r}=W(this)&&this||{},n={},i=(i,a)=>{let o=t&&M(n,a)||a;C(n[o])&&C(i)?n[o]=e(n[o],i):C(i)?n[o]=e({},i):S(i)?n[o]=i.slice():r&&O(i)||(n[o]=i)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&L(arguments[e],i);return n},extend:(e,t,r,{allOwnKeys:n}={})=>(L(t,(t,n)=>{r&&w(t)?e[n]=d(t,r):e[n]=t},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let i,a,o,s={};if(t=t||{},null==e)return t;do{for(a=(i=Object.getOwnPropertyNames(e)).length;a-- >0;)o=i[a],(!n||n(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=!1!==r&&m(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype)return t},kindOf:v,kindOfTest:b,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return -1!==n&&n===r},toArray:e=>{if(!e)return null;if(S(e))return e;let t=e.length;if(!x(t))return null;let r=Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{let r,n=(e&&e[g]).call(e);for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>
1{let r,n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:Q,hasOwnProperty:$,hasOwnProp:$,reduceDescriptors:z,freezeMethods:e=>{z(e,(t,r)=>{if(w(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;if(w(e[r])){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},toObjectSet:(e,t)=>{let r={};return(S(e)?e:String(e).split(t)).forEach(e=>{r[e]=!0}),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e*=1)?e:t,findKey:M,global:q,isContextDefined:W,isSpecCompliantForm:function(e){return!!(e&&w(e.append)&&"FormData"===e[y]&&e[g])},toJSONObject:e=>{let t=Array(10),r=(e,n)=>{if(E(e)){if(t.indexOf(e)>=0)return;if(R(e))return e;if(!("toJSON"in e)){t[n]=e;let i=S(e)?[]:{};return L(e,(e,t)=>{let a=r(e,n+1);O(a)||(i[t]=a)}),t[n]=void 0,i}}return e};return r(e,0)},isAsyncFn:G,isThenable:e=>e&&(E(e)||w(e))&&w(e.then)&&w(e.catch),setImmediate:J,asap:K,isIterable:e=>null!=e&&w(e[g])};function Y(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}X.inherits(Y,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:X.toJSONObject(this.config),code:this.code,status:this.status}}});let Z=Y.prototype,ee={};function et(e){return X.isPlainObject(e)||X.isArray(e)}function er(e){return X.endsWith(e,"[]")?e.slice(0,-2):e}function en(e,t,r){return e?e.concat(t).map(function(e,t){return e=er(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{ee[e]={value:e}}),Object.defineProperties(Y,ee),Object.defineProperty(Z,"isAxiosError",{value:!0}),Y.from=(e,t,r,n,i,a)=>{let o=Object.create(Z);X.toFlatObject(e,o,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);let s=e&&e.message?e.message:"Error",c=null==t&&e?e.code:t;return Y.call(o,s,c,r,n,i),e&&null==o.cause&&Object.defineProperty(o,"cause",{value:e,configurable:!0}),o.name=e&&e.name||"Error",a&&Object.assign(o,a),o};let ei=X.toFlatObject(X,{},null,function(e){return/^is[A-Z]/.test(e)});function ea(e,t,r){if(!X.isObject(e))throw TypeError("target must be an object");t=t||new FormData;let n=(r=X.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!X.isUndefined(t[e])})).metaTokens,i=r.visitor||u,a=r.dots,o=r.indexes,s=(r.Blob||"u">typeof Blob&&Blob)&&X.isSpecCompliantForm(t);if(!X.isFunction(i))throw TypeError("visitor must be a function");function c(e){if(null===e)return"";if(X.isDate(e))return e.toISOString();if(X.isBoolean(e))return e.toString();if(!s&&X.isBlob(e))throw new Y("Blob is not supported. Use a Buffer instead.");return X.isArrayBuffer(e)||X.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):h.Buffer.from(e):e}function u(e,r,i){let s=e;if(e&&!i&&"object"==typeof e)if(X.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else{var u;if(X.isArray(e)&&(u=e,X.isArray(u)&&!u.some(et))||(X.isFileList(e)||X.endsWith(r,"[]"))&&(s=X.toArray(e)))return r=er(r),s.forEach(function(e,n){X.isUndefined(e)||null===e||t.append(!0===o?en([r],n,a):null===o?r:r+"[]",c(e))}),!1}return!!et(e)||(t.append(en(i,r,a),c(e)),!1)}let l=[],f=Object.assign(ei,{defaultVisitor:u,convertValue:c,isVisitable:et});if(!X.isObject(e))throw TypeError("data must be an object");return!function e(r,n){if(!X.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),X.forEach(r,function(r,a){!0===(!(X.isUndefined(r)||null===r)&&i.call(t,r,X.isString(a)?a.trim():a,n,f))&&e(r,n?n.concat(a):[a]
1)}),l.pop()}}(e),t}function eo(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function es(e,t){this._pairs=[],e&&ea(e,this,t)}let ec=es.prototype;function eu(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function el(e,t,r){let n;if(!t)return e;let i=r&&r.encode||eu;X.isFunction(r)&&(r={serialize:r});let a=r&&r.serialize;if(n=a?a(t,r):X.isURLSearchParams(t)?t.toString():new es(t,r).toString(i)){let t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}ec.append=function(e,t){this._pairs.push([e,t])},ec.toString=function(e){let t=e?function(t){return e.call(this,t,eo)}:eo;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var ef=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){X.forEach(this.handlers,function(t){null!==t&&e(t)})}},eh={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ed="u">typeof URLSearchParams?URLSearchParams:es,ep="u">typeof FormData?FormData:null,em="u">typeof Blob?Blob:null;let eg="u">typeof window&&"u">typeof document,ey="object"==typeof navigator&&navigator||void 0,ev=eg&&(!ey||0>["ReactNative","NativeScript","NS"].indexOf(ey.product)),eb="u">typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,e_=eg&&window.location.href||"http://localhost";var eS={...Object.freeze({__proto__:null,hasBrowserEnv:eg,hasStandardBrowserWebWorkerEnv:eb,hasStandardBrowserEnv:ev,navigator:ey,origin:e_}),isBrowser:!0,classes:{URLSearchParams:ed,FormData:ep,Blob:em},protocols:["http","https","file","blob","url","data"]};function eO(e){if(X.isFormData(e)&&X.isFunction(e.entries)){let t={};return X.forEachEntry(e,(e,r)=>{!function e(t,r,n,i){let a=t[i++];if("__proto__"===a)return!0;let o=Number.isFinite(+a),s=i>=t.length;return(a=!a&&X.isArray(n)?n.length:a,s)?X.hasOwnProp(n,a)?n[a]=[n[a],r]:n[a]=r:(n[a]&&X.isObject(n[a])||(n[a]=[]),e(t,r,n[a],i)&&X.isArray(n[a])&&(n[a]=function(e){let t,r,n={},i=Object.keys(e),a=i.length;for(t=0;t<a;t++)n[r=i[t]]=e[r];return n}(n[a]))),!o}(X.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0]),r,t,0)}),t}return null}let eR={transitional:eh,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let r,n=t.getContentType()||"",i=n.indexOf("application/json")>-1,a=X.isObject(e);if(a&&X.isHTMLForm(e)&&(e=new FormData(e)),X.isFormData(e))return i?JSON.stringify(eO(e)):e;if(X.isArrayBuffer(e)||X.isBuffer(e)||X.isStream(e)||X.isFile(e)||X.isBlob(e)||X.isReadableStream(e))return e;if(X.isArrayBufferView(e))return e.buffer;if(X.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1){var o,s;return(o=e,s=this.formSerializer,ea(o,new eS.classes.URLSearchParams,{visitor:function(e,t,r,n){return eS.isNode&&X.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...s})).toString()}if((r=X.isFileList(e))||n.indexOf("multipart/form-data")>-1){let t=this.env&&this.env.FormData;return ea(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}if(a||i){t.setContentType("application/json",!1);var c=e;if(X.isString(c))try{return(0,JSON.parse)(c),X.trim(c)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(c)}return e}],transformResponse:[function(e){let t=this.transitional||eR.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(X.isResponse(e)||X.isReadableStream(e))return e;if(e&&X.isString(e)&&(r&&!this.responseType||n)){let r=t&&t.silentJSONParsing;try{return JSON.parse(e,this.parseReviver)}catch(e){if(!r&&n){if("SyntaxError"===e.name)throw Y.from(e,Y.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:eS.classes.FormData,Blob:eS.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};
1X.forEach(["delete","get","head","post","put","patch"],e=>{eR.headers[e]={}});let eP=X.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ej=Symbol("internals");function ew(e){return e&&String(e).trim().toLowerCase()}function ex(e){return!1===e||null==e?e:X.isArray(e)?e.map(ex):String(e)}function eE(e,t,r,n,i){if(X.isFunction(n))return n.call(this,t,r);if(i&&(t=r),X.isString(t)){if(X.isString(n))return -1!==t.indexOf(n);if(X.isRegExp(n))return n.test(t)}}class eC{constructor(e){e&&this.set(e)}set(e,t,r){let n=this;function i(e,t,r){let i=ew(t);if(!i)throw Error("header name must be a non-empty string");let a=X.findKey(n,i);a&&void 0!==n[a]&&!0!==r&&(void 0!==r||!1===n[a])||(n[a||t]=ex(e))}let a=(e,t)=>X.forEach(e,(e,r)=>i(e,r,t));if(X.isPlainObject(e)||e instanceof this.constructor)a(e,t);else{let n;if(X.isString(e)&&(e=e.trim())&&(n=e,!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim()))){var o;let r,n,i,s;a((s={},(o=e)&&o.split("\n").forEach(function(e){i=e.indexOf(":"),r=e.substring(0,i).trim().toLowerCase(),n=e.substring(i+1).trim(),!r||s[r]&&eP[r]||("set-cookie"===r?s[r]?s[r].push(n):s[r]=[n]:s[r]=s[r]?s[r]+", "+n:n)}),s),t)}else if(X.isObject(e)&&X.isIterable(e)){let r={},n,i;for(let t of e){if(!X.isArray(t))throw TypeError("Object iterator must return a key-value pair");r[i=t[0]]=(n=r[i])?X.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}a(r,t)}else null!=e&&i(t,e,r)}return this}get(e,t){if(e=ew(e)){let r=X.findKey(this,e);if(r){let e=this[r];if(!t)return e;if(!0===t){let t,r=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
1for(;t=n.exec(e);)r[t[1]]=t[2];return r}if(X.isFunction(t))return t.call(this,e,r);if(X.isRegExp(t))return t.exec(e);throw TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ew(e)){let r=X.findKey(this,e);return!!(r&&void 0!==this[r]&&(!t||eE(this,this[r],r,t)))}return!1}delete(e,t){let r=this,n=!1;function i(e){if(e=ew(e)){let i=X.findKey(r,e);i&&(!t||eE(r,r[i],i,t))&&(delete r[i],n=!0)}}return X.isArray(e)?e.forEach(i):i(e),n}clear(e){let t=Object.keys(this),r=t.length,n=!1;for(;r--;){let i=t[r];(!e||eE(this,this[i],i,e,!0))&&(delete this[i],n=!0)}return n}normalize(e){let t=this,r={};return X.forEach(this,(n,i)=>{let a=X.findKey(r,i);if(a){t[a]=ex(n),delete t[i];return}let o=e?i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r):String(i).trim();o!==i&&delete t[i],t[o]=ex(n),r[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return X.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&X.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){let t=(this[ej]=this[ej]={accessors:{}}).accessors,r=this.prototype;function n(e){let n=ew(e);if(!t[n]){let i;i=X.toCamelCase(" "+e),["get","set","has"].forEach(t=>{Object.defineProperty(r,t+i,{value:function(r,n,i){return this[t].call(this,e,r,n,i)},configurable:!0})}),t[n]=!0}}return X.isArray(e)?e.forEach(n):n(e),this}}function eT(e,t){let r=this||eR,n=t||r,i=eC.from(n.headers),a=n.data;return X.forEach(e,function(e){a=e.call(r,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function eF(e){return!!(e&&e.__CANCEL__)}function eA(e,t,r){Y.call(this,null==e?"canceled":e,Y.ERR_CANCELED,t,r),this.name="CanceledError"}function eN(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Y("Request failed with status code "+r.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}eC.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),X.reduceDescriptors(eC.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),X.freezeMethods(eC),X.inherits(eA,Y,{__CANCEL__:!0});let ek=(e,t,r=3)=>{var n,i,a;let o,s,c,u,l,f,h,d,p,m,g=0,y=(i=250,s=Array(n=n=50),c=Array(n),u=0,l=0,i=void 0!==i?i:1e3,function(e){let t=Date.now(),r=c[l];o||(o=t),s[u]=e,c[u]=t;let a=l,f=0;for(;a!==u;)f+=s[a++],a%=n;if((u=(u+1)%n)===l&&(l=(l+1)%n),t-o<i)return;let h=r&&t-r;return h?Math.round(1e3*f/h):void 0});return a=r=>{let n=r.loaded,i=r.lengthComputable?r.total:void 0,a=n-g,o=y(a);g=n,e({loaded:n,total:i,progress:i?n/i:void 0,bytes:a,rate:o||void 0,estimated:o&&i&&n<=i?(i-n)/o:void 0,event:r,lengthComputable:null!=i,[t?"download":"upload"]:!0})},d=0,p=1e3/r,m=(e,t=Date.now())=>{d=t,f=null,h&&(clearTimeout(h),h=null),a(...e)},[(...e)=>{let t=Date.now(),r=t-d;r>=p?m(e,t):(f=e,h||(h=setTimeout(()=>{h=null,m(f)},p-r)))},()=>f&&m(f)]},eI=(e,t)=>{let r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},eD=e=>(...t)=>X.asap(()=>e(...t));var eH=eS.hasStandardBrowserEnv?(a=new URL(eS.origin),o=eS.navigator&&/(msie|trident)/i.test(eS.navigator.userAgent),e=>(e=new URL(e,eS.origin),a.protocol===e.protocol&&a.host===e.host&&(o||a.port===e.port))):()=>!0,eU=eS.hasStandardBrowserEnv?{write(e,t,r,n,i,a){let o=[e+"="+encodeURIComponent(t)];X.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),X.isString(n)&&o.push("path="+n),X.isString(i)&&o.push("domain="+i),!0===a&&o.push("secure"),document.cookie=o.join("; ")},read(e){let t=document.cookie.match(RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function eL(e,t,r){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||!1==r)?t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e:t}let eM=e=>e instanceof eC?{...e}:e;function eq(e,t){t=t||{};let r={};function n(e,t,r,n){return X.isPlainObject(e)&&X.isPlainObject(t)?X.merge.call({caseless:n},e,t):X.isPlainObject(t)?X.merge({},t):X.isArray(t)?t.slice():t}function i(e,t,r,i){return X.isUndefined(t)?X.isUndefined(e)?void 0:n(void 0,e,r,i):n(e,t,r,i)}function a(e,t){if(!X.isUndefined(t))return n(void 0,t)}function o(e,t){return X.isUndefined(t)?X.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,i,a){return a in t?n(r,i):a in e?n(void 0,r):void 0}let c={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBo
1dyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(e,t,r)=>i(eM(e),eM(t),r,!0)};return X.forEach(Object.keys({...e,...t}),function(n){let a=c[n]||i,o=a(e[n],t[n],n);X.isUndefined(o)&&a!==s||(r[n]=o)}),r}var eW=e=>{let t=eq({},e),{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;if(t.headers=o=eC.from(o),t.url=el(eL(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),X.isFormData(r)){if(eS.hasStandardBrowserEnv||eS.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(X.isFunction(r.getHeaders)){let e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,r])=>{t.includes(e.toLowerCase())&&o.set(e,r)})}}if(eS.hasStandardBrowserEnv&&(n&&X.isFunction(n)&&(n=n(t)),n||!1!==n&&eH(t.url))){let e=i&&a&&eU.read(a);e&&o.set(i,e)}return t},eB="u">typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){var n;let i,a,o,s,c,u,l=eW(e),f=l.data,h=eC.from(l.headers).normalize(),{responseType:d,onUploadProgress:p,onDownloadProgress:m}=l;function g(){s&&s(),c&&c(),l.cancelToken&&l.cancelToken.unsubscribe(i),l.signal&&l.signal.removeEventListener("abort",i)}let y=new XMLHttpRequest;function v(){if(!y)return;let n=eC.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());eN(function(e){t(e),g()},function(e){r(e),g()},{data:d&&"text"!==d&&"json"!==d?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:n,config:e,request:y}),y=null}y.open(l.method.toUpperCase(),l.url,!0),y.timeout=l.timeout,"onloadend"in y?y.onloadend=v:y.onreadystatechange=function(){!y||4!==y.readyState||(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(v)},y.onabort=function(){y&&(r(new Y("Request aborted",Y.ECONNABORTED,e,y)),y=null)},y.onerror=function(t){let n=new Y(t&&t.message?t.message:"Network Error",Y.ERR_NETWORK,e,y);n.event=t||null,r(n),y=null},y.ontimeout=function(){let t=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded",n=l.transitional||eh;l.timeoutErrorMessage&&(t=l.timeoutErrorMessage),r(new Y(t,n.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,y)),y=null},void 0===f&&h.setContentType(null),"setRequestHeader"in y&&X.forEach(h.toJSON(),function(e,t){y.setRequestHeader(t,e)}),X.isUndefined(l.withCredentials)||(y.withCredentials=!!l.withCredentials),d&&"json"!==d&&(y.responseType=l.responseType),m&&([o,c]=ek(m,!0),y.addEventListener("progress",o)),p&&y.upload&&([a,s]=ek(p),y.upload.addEventListener("progress",a),y.upload.addEventListener("loadend",s)),(l.cancelToken||l.signal)&&(i=t=>{y&&(r(!t||t.type?new eA(null,e,y):t),y.abort(),y=null)},l.cancelToken&&l.cancelToken.subscribe(i),l.signal&&(l.signal.aborted?i():l.signal.addEventListener("abort",i)));let b=(n=l.url,(u=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n))&&u[1]||"");b&&-1===eS.protocols.indexOf(b)?r(new Y("Unsupported protocol "+b+":",Y.ERR_BAD_REQUEST,e)):y.send(f||null)})};let eQ=function*(e,t){let r,n=e.byteLength;if(!t||n<t)return void(yield e);let i=0;for(;i<n;)r=i+t,yield e.slice(i,r),i=r},e$=async function*(e,t){for await(let r of eV(e))yield*eQ(r,t)},eV=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);let t=e.getReader();try{for(;;){let{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},ez=(e,t,r,n)=>{let i,a=e$(e,t),o=0,s=e=>{!i&&(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{let{done:t,value:n}=await a.next();if(t){s(),e.close();return}let i=n.byteLength;if(r){let e=o+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw s(e),e}},cancel:e=>(s(e),a.return())},{highWaterMark:2})},{isFunction:eG}=X,eJ=(({Request:e,Response:t})=>({Request:e,Response:t}))(X.global),{ReadableStream:eK,TextEncoder:eX}=X.global,eY=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},eZ=e=>{let t,{fetch:r,Request:n,Response:i}=e=X.merge.call({skipUndefined:!0},eJ,e),a=r?eG(r):"function"==typeof fetch,o=eG(n),s=eG(i);if(!a)return!1;let c=a&&eG(eK),u=a&&("function"==typeof eX?(t=new eX,e=>t.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer())),l=o&&c&&eY(()=>{let e=!1,t=new n(eS.origin,{body:new eK,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),f=s&&c&&eY(()=>X.isReadableStream(new i("").body)),h={stream:f&&(e=>e.body)};
1a&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{h[e]||(h[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new Y(`Response type '${e}' is not supported`,Y.ERR_NOT_SUPPORT,r)})});let d=async e=>{if(null==e)return 0;if(X.isBlob(e))return e.size;if(X.isSpecCompliantForm(e)){let t=new n(eS.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return X.isArrayBufferView(e)||X.isArrayBuffer(e)?e.byteLength:(X.isURLSearchParams(e)&&(e+=""),X.isString(e))?(await u(e)).byteLength:void 0},p=async(e,t)=>{let r=X.toFiniteNumber(e.getContentLength());return null==r?d(t):r};return async e=>{let t,{url:a,method:s,data:c,signal:u,cancelToken:d,timeout:m,onDownloadProgress:g,onUploadProgress:y,responseType:v,headers:b,withCredentials:_="same-origin",fetchOptions:S}=eW(e),O=r||fetch;v=v?(v+"").toLowerCase():"text";let R=((e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof Y?t:new eA(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new Y(`timeout ${t} of ms exceeded`,Y.ETIMEDOUT))},t),o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener("abort",i)}),e=null)};e.forEach(e=>e.addEventListener("abort",i));let{signal:s}=n;return s.unsubscribe=()=>X.asap(o),s}})([u,d&&d.toAbortSignal()],m),P=null,j=R&&R.unsubscribe&&(()=>{R.unsubscribe()});try{if(y&&l&&"get"!==s&&"head"!==s&&0!==(t=await p(b,c))){let e,r=new n(a,{method:"POST",body:c,duplex:"half"});if(X.isFormData(c)&&(e=r.headers.get("content-type"))&&b.setContentType(e),r.body){let[e,n]=eI(t,ek(eD(y)));c=ez(r.body,65536,e,n)}}X.isString(_)||(_=_?"include":"omit");let r=o&&"credentials"in n.prototype,u={...S,signal:R,method:s.toUpperCase(),headers:b.normalize().toJSON(),body:c,duplex:"half",credentials:r?_:void 0};P=o&&new n(a,u);let d=await (o?O(P,S):O(a,u)),m=f&&("stream"===v||"response"===v);if(f&&(g||m&&j)){let e={};["status","statusText","headers"].forEach(t=>{e[t]=d[t]});let t=X.toFiniteNumber(d.headers.get("content-length")),[r,n]=g&&eI(t,ek(eD(g),!0))||[];d=new i(ez(d.body,65536,r,()=>{n&&n(),j&&j()}),e)}v=v||"text";let w=await h[X.findKey(h,v)||"text"](d,e);return!m&&j&&j(),await new Promise((t,r)=>{eN(t,r,{data:w,headers:eC.from(d.headers),status:d.status,statusText:d.statusText,config:e,request:P})})}catch(t){if(j&&j(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Y("Network Error",Y.ERR_NETWORK,e,P),{cause:t.cause||t});throw Y.from(t,t&&t.code,e,P)}}},e0=new Map,e1=e=>{let t=e?e.env:{},{fetch:r,Request:n,Response:i}=t,a=[n,i,r],o=a.length,s,c,u=e0;for(;o--;)s=a[o],void 0===(c=u.get(s))&&u.set(s,c=o?new Map:eZ(t)),u=c;return c};e1();let e2={http:null,xhr:eB,fetch:{get:e1}};X.forEach(e2,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});let e3=e=>`- ${e}`,e8=e=>X.isFunction(e)||null===e||!1===e;var e4=(e,t)=>{let r,n,{length:i}=e=X.isArray(e)?e:[e],a={};for(let o=0;o<i;o++){let i;if(n=r=e[o],!e8(r)&&void 0===(n=e2[(i=String(r)).toLowerCase()]))throw new Y(`Unknown adapter '${i}'`);if(n&&(X.isFunction(n)||(n=n.get(t))))break;a[i||"#"+o]=n}if(!n){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Y("There is no suitable adapter to dispatch the request "+(i?e.length>1?"since :\n"+e.map(e3).join("\n"):" "+e3(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function e6(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new eA(null,e)}function e5(e){return e6(e),e.headers=eC.from(e.headers),e.data=eT.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),e4(e.adapter||eR.adapter,e)(e).then(function(t){return e6(e),t.data=eT.call(e,e.transformResponse,t),t.headers=eC.from(t.headers),t},function(t){return!eF(t)&&(e6(e),t&&t.response&&(t.response.data=eT.call(e,e.transformResponse,t.response),t.response.headers=eC.from(t.response.headers))),Promise.reject(t)})}let e9="1.12.2",e7={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{e7[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});let te={};e7.transitional=function(e,t,r){function n(e,t){return"[Axios v"+e9+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,i,a)=>
1{if(!1===e)throw new Y(n(i," has been removed"+(t?" in "+t:"")),Y.ERR_DEPRECATED);return t&&!te[i]&&(te[i]=!0,console.warn(n(i," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,i,a)}},e7.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var tt=function(e,t,r){if("object"!=typeof e)throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),i=n.length;for(;i-- >0;){let a=n[i],o=t[a];if(o){let t=e[a],r=void 0===t||o(t,a,e);if(!0!==r)throw new Y("option "+a+" must be "+r,Y.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new Y("Unknown option "+a,Y.ERR_BAD_OPTION)}};class tr{constructor(e){this.defaults=e||{},this.interceptors={request:new ef,response:new ef}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){let r,n;"string"==typeof e?(t=t||{}).url=e:t=e||{};let{transitional:i,paramsSerializer:a,headers:o}=t=eq(this.defaults,t);void 0!==i&&tt(i,{silentJSONParsing:e7.transitional(e7.boolean),forcedJSONParsing:e7.transitional(e7.boolean),clarifyTimeoutError:e7.transitional(e7.boolean)},!1),null!=a&&(X.isFunction(a)?t.paramsSerializer={serialize:a}:tt(a,{encode:e7.function,serialize:e7.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),tt(t,{baseUrl:e7.spelling("baseURL"),withXsrfToken:e7.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&X.merge(o.common,o[t.method]);o&&X.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=eC.concat(s,o);let c=[],u=!0;this.interceptors.request.forEach(function(e){("function"!=typeof e.runWhen||!1!==e.runWhen(t))&&(u=u&&e.synchronous,c.unshift(e.fulfilled,e.rejected))});let l=[];this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let f=0;if(!u){let e=[e5.bind(this),void 0];for(e.unshift(...c),e.push(...l),n=e.length,r=Promise.resolve(t);f<n;)r=r.then(e[f++],e[f++]);return r}n=c.length;let h=t;for(;f<n;){let e=c[f++],t=c[f++];try{h=e(h)}catch(e){t.call(this,e);break}}try{r=e5.call(this,h)}catch(e){return Promise.reject(e)}for(f=0,n=l.length;f<n;)r=r.then(l[f++],l[f++]);return r}getUri(e){return el(eL((e=eq(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}X.forEach(["delete","get","head","options"],function(e){tr.prototype[e]=function(t,r){return this.request(eq(r||{},{method:e,url:t,data:(r||{}).data}))}}),X.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,i){return this.request(eq(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}tr.prototype[e]=t(),tr.prototype[e+"Form"]=t(!0)});var tn=class e{constructor(e){let t;if("function"!=typeof e)throw TypeError("executor must be a function.");this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t,n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,i){r.reason||(r.reason=new eA(e,n,i),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};let ti={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,Re
1setContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ti).forEach(([e,t])=>{ti[t]=e});let ta=function e(t){let r=new tr(t),n=d(tr.prototype.request,r);return X.extend(n,tr.prototype,r,{allOwnKeys:!0}),X.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(eq(t,r))},n}(eR);ta.Axios=tr,ta.CanceledError=eA,ta.CancelToken=tn,ta.isCancel=eF,ta.VERSION=e9,ta.toFormData=ea,ta.AxiosError=Y,ta.Cancel=ta.CanceledError,ta.all=function(e){return Promise.all(e)},ta.spread=function(e){return function(t){return e.apply(null,t)}},ta.isAxiosError=function(e){return X.isObject(e)&&!0===e.isAxiosError},ta.mergeConfig=eq,ta.AxiosHeaders=eC,ta.formToJSON=e=>eO(X.isHTMLForm(e)?new FormData(e):e),ta.getAdapter=e4,ta.HttpStatusCode=ti,ta.default=ta,t.exports=ta},978204,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.arrayableParams=void 0,r.arrayableParams={query_by:"query_by",query_by_weights:"query_by_weights",facet_by:"facet_by",group_by:"group_by",include_fields:"include_fields",exclude_fields:"exclude_fields",highlight_fields:"highlight_fields",highlight_full_fields:"highlight_full_fields",pinned_hits:"pinned_hits",hidden_hits:"hidden_hits",infix:"infix",override_tags:"override_tags",num_typos:"num_typos",prefix:"prefix",sort_by:"sort_by"}},291943,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.toErrorWithMessage=r.normalizeArrayableParams=void 0;var n=e.r(824627),i=e.r(978204);function a(e){return Object.keys(i.arrayableParams).filter(function(t){return void 0!==e[t]}).every(function(t){return!Array.isArray(e[t])})}r.normalizeArrayableParams=function(e){var t=n.__assign({},e);if(!Object.keys(i.arrayableParams).filter(function(e){return Array.isArray(t[e])}).map(function(e){return t[e]=t[e].join(","),e}).length&&a(t))return t;if(!a(t))throw Error("Failed to normalize arrayable params: ".concat(JSON.stringify(t)));return t},r.toErrorWithMessage=function(e){if("object"==typeof e&&null!==e&&"message"in e&&"string"==typeof e.message)return e;try{if("string"==typeof e)return Error(e);return Error(JSON.stringify(e))}catch(t){return Error(String(e))}}},549230,(e,t,r)=>{"use strict";var n=e.i(943915);Object.defineProperty(r,"__esModule",{value:!0});var i=e.r(824627),a=i.__importDefault(e.r(910376)),o={},s={},c=e.r(760110),u=i.__importDefault(e.r(290438)),l=e.r(291943),f=void 0!==n.default&&null!=n.default.versions&&null!=n.default.versions.node&&"u"<typeof window;r.default=function(){function e(e){this.configuration=e,this.apiKey=this.configuration.apiKey,this.nodes=null==this.configuration.nodes?this.configuration.nodes:JSON.parse(JSON.stringify(this.configuration.nodes)),this.nearestNode=null==this.configuration.nearestNode?this.configuration.nearestNode:JSON.parse(JSON.stringify(this.configuration.nearestNode)),this.connectionTimeoutSeconds=this.configuration.connectionTimeoutSeconds,this.healthcheckIntervalSeconds=this.configuration.healthcheckIntervalSeconds,this.numRetriesPerRequest=this.configuration.numRetries,this.retryIntervalSeconds=this.configuration.retryIntervalSeconds,this.sendApiKeyAsQueryParam=this.configuration.sendApiKeyAsQueryParam,this.additionalUserHeaders=this.configuration.additionalHeaders,this.logger=this.configuration.logger,this.initializeMetadataForNodes(),this.currentNodeIndex=-1}return e.prototype.get=function(e,t,r){void 0===t&&(t={});var n=void 0===r?{}
1:r,a=n.abortSignal,o=void 0===a?null:a,s=n.responseType,c=void 0===s?void 0:s,u=n.streamConfig,l=void 0===u?void 0:u,f=n.isStreamingRequest;return i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(r){return[2,this.performRequest("get",e,{queryParameters:t,abortSignal:o,responseType:c,streamConfig:l,isStreamingRequest:f})]})})},e.prototype.delete=function(e,t){return void 0===t&&(t={}),i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(r){return[2,this.performRequest("delete",e,{queryParameters:t,isStreamingRequest:!1})]})})},e.prototype.post=function(e,t,r,n,a){void 0===t&&(t={}),void 0===r&&(r={}),void 0===n&&(n={});var o=void 0===a?{}:a,s=o.abortSignal,c=void 0===s?null:s,u=o.responseType,l=void 0===u?void 0:u,f=o.streamConfig,h=void 0===f?void 0:f,d=o.isStreamingRequest;return i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(i){return[2,this.performRequest("post",e,{queryParameters:r,bodyParameters:t,additionalHeaders:n,abortSignal:c,responseType:l,streamConfig:h,isStreamingRequest:d})]})})},e.prototype.put=function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(n){return[2,this.performRequest("put",e,{queryParameters:r,bodyParameters:t,isStreamingRequest:!1})]})})},e.prototype.patch=function(e,t,r){return void 0===t&&(t={}),void 0===r&&(r={}),i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(n){return[2,this.performRequest("patch",e,{queryParameters:r,bodyParameters:t,isStreamingRequest:!1})]})})},e.prototype.getAdapter=function(){if(this.configuration.axiosAdapter)return"function"==typeof this.configuration.axiosAdapter?this.configuration.axiosAdapter:"u">typeof navigator&&"Cloudflare-Workers"===navigator.userAgent?a.default.getAdapter(this.configuration.axiosAdapter).bind(globalThis):a.default.getAdapter(this.configuration.axiosAdapter)},e.prototype.performRequest=function(e,t,r){var n,c,u,l,h=r.queryParameters,d=void 0===h?null:h,p=r.bodyParameters,m=void 0===p?null:p,g=r.additionalHeaders,y=void 0===g?{}:g,v=r.abortSignal,b=void 0===v?null:v,_=r.responseType,S=void 0===_?void 0:_,O=r.skipConnectionTimeout,R=void 0!==O&&O,P=r.enableKeepAlive,j=void 0===P?void 0:P,w=r.streamConfig,x=void 0===w?void 0:w,E=r.isStreamingRequest;return i.__awaiter(this,void 0,void 0,function(){var r,h,p,g,v,_,O;return i.__generator(this,function(P){switch(P.label){case 0:this.configuration.validate(),E&&(this.logger.debug("Request: Performing streaming request to ".concat(t)),!f&&"u">typeof fetch&&(this.logger.debug("Using fetch adapter for browser streaming"),S="stream")),r=Date.now(),p=!1,this.logger.debug("Request #".concat(r,": Performing ").concat(e.toUpperCase()," request: ").concat(t)),g=function(g){var _,O,P,w,C,T;return i.__generator(this,function(F){switch(F.label){case 0:if(_=v.getNextNode(r),v.logger.debug("Request #".concat(r,": Attempting ").concat(e.toUpperCase()," request Try #").concat(g," to Node ").concat(_.index)),b&&b.aborted)return[2,{value:Promise.reject(Error("Request aborted by caller."))}];O=void 0,F.label=1;case 1:return F.trys.push([1,3,5,6]),(P={method:e,url:v.uriFor(t,_),headers:Object.assign({},v.defaultHeaders(),y,v.additionalUserHeaders),maxContentLength:1/0,maxBodyLength:1/0,validateStatus:function(e){return e>0},transformResponse:[function(e,t){var r=e;return void 0!==t&&"string"==typeof e&&t["content-type"]&&t["content-type"].startsWith("application/json")&&(r=JSON.parse(e)),r}]}).adapter=E&&!f?"fetch":v.getAdapter(),!0!==R&&(P.timeout=1e3*v.connectionTimeoutSeconds),d&&0!==Object.keys(d).length&&(P.params=d),v.sendApiKeyAsQueryParam&&(P.params=P.params||{},P.params["x-typesense-api-key"]=v.apiKey),v.configuration.httpAgent?(v.logger.debug("Request #".concat(r,": Using custom httpAgent")),P.httpAgent=v.configuration.httpAgent):!0===j&&(f?(v.logger.debug("Request #".concat(r,": Enabling KeepAlive")),P.httpAgent=new o.Agent({keepAlive:!0})):v.logger.warn("Request #".concat(r,": Cannot use custom httpAgent in a browser environment to enable keepAlive"))),v.configuration.httpsAgent?(v.logger.debug("Request #".concat(r,": Using custom httpsAgent")),P.httpsAgent=v.configuration.httpsAgent):!0===j&&(f?(v.logger.debug("Request #".concat(r,": Enabling keepAlive")),P.httpsAgent=new s.Agent({keepAlive:!0})):v.logger.warn("Request #".concat(r,": Cannot use custom httpAgent in a browser environment to enable keepAlive"))),v.configuration.paramsSerializer&&(v.logger.debug("Request #".concat(r,": Using custom paramsSerializer")),P.paramsSerializer
1=v.configuration.paramsSerializer),m&&("string"==typeof m&&0!==m.length||"object"==typeof m&&0!==Object.keys(m).length)&&(P.data=m),b&&(w=a.default.CancelToken.source(),O=function(){p=!0,w.cancel()},b.addEventListener("abort",O),P.cancelToken=w.token),E?(P.responseType="stream",f||(P.headers=i.__assign(i.__assign({},P.headers),{Accept:"text/event-stream"}))):S&&(P.responseType=S),[4,(0,a.default)(P)];case 2:if((C=F.sent()).status>=1&&C.status<=499&&v.setNodeHealthcheck(_,!0),v.logger.debug("Request #".concat(r,": Request to Node ").concat(_.index," was made. Response Code was ").concat(C.status,".")),C.status>=200&&C.status<300){if(E)return[2,{value:v.handleStreamingResponse(C,x)}];return[2,{value:Promise.resolve(C.data)}]}if(C.status<500)return[2,{value:Promise.reject(v.customErrorForResponse(C,null==(n=C.data)?void 0:n.message,P.data))}];throw v.customErrorForResponse(C,null==(c=C.data)?void 0:c.message,P.data);case 3:if(T=F.sent(),p||v.setNodeHealthcheck(_,!1),h=T,v.logger.warn("Request #".concat(r,": Request to Node ").concat(_.index,' failed due to "').concat(null!=(u=null==T?void 0:T.code)?u:""," ").concat(T.message).concat(null==T.response?"":" - "+JSON.stringify(null==(l=T.response)?void 0:l.data),'"')),p)return[2,{value:Promise.reject(Error("Request aborted by caller."))}];if(E&&v.invokeOnErrorCallback(T,x),!(g<v.numRetriesPerRequest+1))return v.logger.debug("Request #".concat(r,": No retries left. Raising last error")),[2,{value:Promise.reject(h)}];return v.logger.warn("Request #".concat(r,": Sleeping for ").concat(v.retryIntervalSeconds,"s and then retrying request...")),[4,v.timer(v.retryIntervalSeconds)];case 4:return F.sent(),[3,6];case 5:return b&&O&&b.removeEventListener("abort",O),[7];case 6:return[2]}})},v=this,_=1,P.label=1;case 1:if(!(_<=this.numRetriesPerRequest+1))return[3,4];return[5,g(_)];case 2:if("object"==typeof(O=P.sent()))return[2,O.value];P.label=3;case 3:return _++,[3,1];case 4:return this.logger.debug("Request #".concat(r,": No retries left. Raising last error")),[2,Promise.reject(h)]}})})},e.prototype.processStreamingLine=function(e){if(!e.trim()||"data: [DONE]"===e)return null;if(e.startsWith("data: "))return this.processDataLine(e.slice(6).trim());if(e.trim().startsWith("{"))try{var t=JSON.parse(e.trim());if(t&&"object"==typeof t)return t.conversation_id||(t.conversation_id="unknown"),t.message||""===t.message||(t.message=""),t;return{conversation_id:"unknown",message:JSON.stringify(t)}}catch(e){}return{conversation_id:"unknown",message:e.trim()}},e.prototype.processDataLine=function(e){if(!e)return null;if(e.startsWith("{"))try{var t=JSON.parse(e);if(t&&"object"==typeof t)return t.conversation_id||(t.conversation_id="unknown"),t.message||""===t.message||(t.message=""),t;return{conversation_id:"unknown",message:JSON.stringify(t)}}catch(e){}return{conversation_id:"unknown",message:e}},e.prototype.handleStreamingResponse=function(e,t){return i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(r){return(this.logger.debug("Handling streaming response. Env
1ironment: ".concat(f?"Node.js":"Browser")),f&&e.data)?[2,this.handleNodeStreaming(e,t)]:f?(this.logger.debug("Processing non-streaming response"),this.invokeOnCompleteCallback(e.data,t),[2,Promise.resolve(e.data)]):[2,this.handleBrowserStreaming(e,t)]})})},e.prototype.handleNodeStreaming=function(e,t){var r=this;return this.logger.debug("Processing Node.js stream"),new Promise(function(n,i){var a=e.data,o=[],s="";a.on("data",function(e){var n;try{var a=e.toString(),c=(s+=a).split("\n");s=null!=(n=c.pop())?n:"",r.processStreamLines(c,o,t)}catch(e){i(e)}}),a.on("end",function(){if(s.trim().length>0){var i=s.split("\n");r.processStreamLines(i,o,t)}r.finalizeStreamResult(o,n,e,t)}),a.on("error",function(e){r.logger.error("Stream error: ".concat(e)),r.invokeOnErrorCallback(e,t),i(e)})})},e.prototype.handleBrowserStreaming=function(e,t){var r=this;return this.logger.debug("Processing browser stream"),new Promise(function(n,a){return i.__awaiter(r,void 0,void 0,function(){return i.__generator(this,function(r){try{if(e.data&&"function"==typeof e.data.getReader)return[2,this.handleBrowserReadableStream(e.data,n,a,e,t)];if("string"==typeof e.data)return[2,this.handleBrowserStringResponse(e.data,n,e,t)];if("object"==typeof e.data&&null!==e.data)return this.logger.debug("No stream found, but data object is available"),this.invokeOnCompleteCallback(e.data,t),[2,n(e.data)];return this.logger.error("No usable data found in response"),[2,a(Error("No usable data found in response"))]}catch(e){this.logger.error("Error processing streaming response: ".concat(e)),this.invokeOnErrorCallback(e,t),a(e)}return[2]})})})},e.prototype.handleBrowserReadableStream=function(e,t,r,n,a){return i.__awaiter(this,void 0,void 0,function(){var o,s,c,u,l,f,h,d,p,m;return i.__generator(this,function(i){switch(i.label){case 0:this.logger.debug("Found ReadableStream in response.data"),o=e.getReader(),s=[],c="",i.label=1;case 1:i.trys.push([1,5,,6]),i.label=2;case 2:return[4,o.read()];case 3:if(l=(u=i.sent()).done,f=u.value,l)return this.logger.debug("Stream reading complete"),c.trim()&&(h=c.split("\n"),this.processStreamLines(h,s,a)),[3,4];return d=new TextDecoder().decode(f),this.logger.debug("Received chunk: ".concat(d.length," bytes")),c+=d,c=(p=c.split("\n")).pop()||"",this.processStreamLines(p,s,a),[3,2];case 4:return this.finalizeStreamResult(s,t,n,a),[3,6];case 5:return m=i.sent(),this.logger.error("Stream error: ".concat(m)),this.invokeOnErrorCallback(m,a),r(m),[3,6];case 6:return[2]}})})},e.prototype.handleBrowserStringResponse=function(e,t,r,n){this.logger.debug("Processing text response as stream data");var i=[],a=e.split("\n");if(this.processStreamLines(a,i,n),i.length>0){var o=this.combineStreamingChunks(i);this.invokeOnCompleteCallback(o,n),t(o)}else this.logger.debug("No chunks processed, returning original API response"),this.invokeOnCompleteCallback(r.data,n),t(r.data)},e.prototype.processStreamLines=function(e,t,r){for(var n=0;n<e.length;n++){var i=e[n];if(i.trim()&&"data: [DONE]"!==i){var a=this.processStreamingLine(i);null!==a&&(this.invokeOnChunkCallback(a,r),t.push(a))}}},e.prototype.finalizeStreamResult=function(e,t,r,n){if(e.length>0){var i=this.combineStreamingChunks(e);this.logger.debug("Stream processing complete"),this.invokeOnCompleteCallback(i,n),t(i)}else this.logger.debug("No chunks processed, returning original API response"),this.invokeOnCompleteCallback(r.data,n),t(r.data)},e.prototype.combineStreamingChunks=function(e){if(0===e.length)return{};if(1===e.length)return e[0];var t=this.getMessageChunks(e);if(t.length>0)return this.combineMessageChunks(e,t);var r=e[e.length-1];if(!this.isCompleteSearchResponse(r))throw Error("Last chunk is not a complete search response");return r},e.prototype.getMessageChunks=function(e){return e.filter(this.isChunkMessage)},e.prototype.isChunkMessage=function(e){return"object"==typeof e&&null!==e&&"message"in e&&"conversation_id"in e},e.prototype.combineMessageChunks=function(e,t){this.logger.debug("Found ".concat(t.length," message chunks to combine"));var r=e[e.length-1];if(this.isCompleteSearchResponse(r))return r;var n=e.find(this.isCompleteSearchResponse);
1if(!n)throw Error("No metadata chunk found");return n},e.prototype.isCompleteSearchResponse=function(e){return"object"==typeof e&&null!==e&&Object.keys(e).length>0&&("results"in e||"found"in e||"hits"in e||"page"in e||"search_time_ms"in e)},e.prototype.getNextNode=function(e){if(void 0===e&&(e=0),null!=this.nearestNode){if(this.logger.debug("Request #".concat(e,": Nodes Health: Node ").concat(this.nearestNode.index," is ").concat(!0===this.nearestNode.isHealthy?"Healthy":"Unhealthy")),!0===this.nearestNode.isHealthy||this.nodeDueForHealthcheck(this.nearestNode,e))return this.logger.debug("Request #".concat(e,": Updated current node to Node ").concat(this.nearestNode.index)),this.nearestNode;this.logger.debug("Request #".concat(e,": Falling back to individual nodes"))}this.logger.debug("Request #".concat(e,": Nodes Health: ").concat(this.nodes.map(function(e){return"Node ".concat(e.index," is ").concat(!0===e.isHealthy?"Healthy":"Unhealthy")}).join(" || ")));for(var t=this.nodes[0],r=0;r<=this.nodes.length;r++)if(this.currentNodeIndex=(this.currentNodeIndex+1)%this.nodes.length,!0===(t=this.nodes[this.currentNodeIndex]).isHealthy||this.nodeDueForHealthcheck(t,e))return this.logger.debug("Request #".concat(e,": Updated current node to Node ").concat(t.index)),t;return this.logger.debug("Request #".concat(e,": No healthy nodes were found. Returning the next node, Node ").concat(t.index)),t},e.prototype.nodeDueForHealthcheck=function(e,t){void 0===t&&(t=0);var r=Date.now()-e.lastAccessTimestamp>1e3*this.healthcheckIntervalSeconds;return r&&this.logger.debug("Request #".concat(t,": Node ").concat(e.index," has exceeded healtcheckIntervalSeconds of ").concat(this.healthcheckIntervalSeconds,". Adding it back into rotation.")),r},e.prototype.initializeMetadataForNodes=function(){var e=this;null!=this.nearestNode&&(this.nearestNode.index="nearestNode",this.setNodeHealthcheck(this.nearestNode,!0)),this.nodes.forEach(function(t,r){t.index=r,e.setNodeHealthcheck(t,!0)})},e.prototype.setNodeHealthcheck=function(e,t){e.isHealthy=t,e.lastAccessTimestamp=Date.now()},e.prototype.uriFor=function(e,t){return null!=t.url?"".concat(t.url).concat(e):"".concat(t.protocol,"://").concat(t.host,":").concat(t.port).concat(t.path).concat(e)},e.prototype.defaultHeaders=function(){var e={};return this.sendApiKeyAsQueryParam||(e["X-TYPESENSE-API-KEY"]=this.apiKey),e["Content-Type"]="application/json",e},e.prototype.timer=function(e){return i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(t){return[2,new Promise(function(t){return setTimeout(t,1e3*e)})]})})},e.prototype.customErrorForResponse=function(e,t,r){var n="Request failed with HTTP code ".concat(e.status);"string"==typeof t&&""!==t.trim()&&(n+=" | Server said: ".concat(t));new u.default(n,r,e.status);return 400===e.status?new c.RequestMalformed(n,r,e.status):401===e.status?new c.RequestUnauthorized(n,r,e.status):404===e.status?new c.ObjectNotFound(n,r,e.status):409===e.status?new c.ObjectAlreadyExists(n,r,e.status):422===e.status?new c.ObjectUnprocessable(n,r,e.status):e.status>=500&&e.status<=599?new c.ServerError(n,r,e.status):new c.HTTPError(n,r,e.status)},e.prototype.invokeOnChunkCallback=function(e,t){if(null==t?void 0:t.onChunk)try{t.onChunk(e)}catch(e){this.logger.warn("Error in onChunk callback: ".concat(e))}},e.prototype.invokeOnCompleteCallback=function(e,t){if(null==t?void 0:t.onComplete)try{t.onComplete(e)}catch(e){this.logger.warn("Error in onComplete callback: ".concat(e))}},e.prototype.invokeOnErrorCallback=function(e,t){if(null==t?void 0:t.onError){var r=(0,l.toErrorWithMessage)(e);try{t.onError(r)}catch(e){this.logger.warn("Error in onError callback: ".concat(e))}}},e}()},312932,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i="/collections";r.default=function(){function e(e){this.apiCall=e}return e.prototype.create=function(e,t){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(r){return[2,this.apiCall.post(i,e,t)]})})},e.prototype.retrieve=function(e){return void 0===e&&(e={}),n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.get(i,e)]})})},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return i}
1,enumerable:!1,configurable:!0}),e}()},843104,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(){this.responseCache=new Map,this.responsePromiseCache=new Map}return e.prototype.clearCache=function(){this.responseCache=new Map,this.responsePromiseCache=new Map},e.prototype.perform=function(e,t,r,i){return n.__awaiter(this,void 0,void 0,function(){var a,o,s,c,u,l,f,h,d,p,m,g,y,v,b,_,S,O,R,P,j;return n.__generator(this,function(n){switch(n.label){case 0:if(s=void 0===(o=(a=i||{}).cacheResponseForSeconds)?120:o,u=void 0===(c=a.maxSize)?100:c,l=void 0===i||s<=0||u<=0,f=r.path,h=r.queryParams,d=r.body,p=r.headers,m=r.streamConfig,g=r.abortSignal,y=r.responseType,v=r.isStreamingRequest,l)return[2,this.executeRequest(e,t,f,h,d,p,{abortSignal:g,responseType:y,streamConfig:m,isStreamingRequest:v})];if(b=JSON.stringify(r),_=this.responseCache.get(b),S=Date.now(),_){if(S-_.requestTimestamp<1e3*s)return this.responseCache.delete(b),this.responseCache.set(b,_),[2,_.response];this.responseCache.delete(b)}if(O=this.responsePromiseCache.get(b)){if(S-O.requestTimestamp<1e3*s)return this.responsePromiseCache.delete(b),this.responsePromiseCache.set(b,O),[2,O.responsePromise];this.responsePromiseCache.delete(b)}return R=this.executeRequest(e,t,f,h,d,p,{abortSignal:g,responseType:y,streamConfig:m,isStreamingRequest:v}),this.responsePromiseCache.set(b,{requestTimestamp:S,responsePromise:R}),[4,R];case 1:return P=n.sent(),this.responseCache.set(b,{requestTimestamp:S,response:P}),this.responseCache.size>u&&(j=this.responseCache.keys().next().value)&&this.responseCache.delete(j),this.responsePromiseCache.size>u&&(j=this.responsePromiseCache.keys().next().value)&&this.responsePromiseCache.delete(j),[2,P]}})})},e.prototype.executeRequest=function(e,t,r,n,i,a,o){void 0===n&&(n={});var s=e[t];switch(t){case"get":return s.call(e,r,n,{abortSignal:null==o?void 0:o.abortSignal,responseType:null==o?void 0:o.responseType,streamConfig:null==o?void 0:o.streamConfig,isStreamingRequest:null==o?void 0:o.isStreamingRequest});case"delete":return s.call(e,r,n);case"post":return s.call(e,r,i,n,a||{},{abortSignal:null==o?void 0:o.abortSignal,responseType:null==o?void 0:o.responseType,streamConfig:null==o?void 0:o.streamConfig,isStreamingRequest:null==o?void 0:o.isStreamingRequest});case"put":case"patch":return s.call(e,r,i,n);default:throw Error("Unsupported method: ".concat(String(t)))}},e}()},222514,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.SearchOnlyDocuments=void 0;var n=e.r(824627),i=n.__importDefault(e.r(843104)),a=n.__importDefault(e.r(312932)),o=e.r(291943),s="/documents";r.SearchOnlyDocuments=function(){function e(e,t,r){this.collectionName=e,this.apiCall=t,this.configuration=r,this.requestWithCache=new i.default}return e.prototype.clearCache=function(){this.requestWithCache.clearCache()},e.prototype.search=function(e,t){var r=void 0===t?{}:t,i=r.cacheSearchResultsForSeconds,a=void 0===i?this.configuration.cacheSearchResultsForSeconds:i,s=r.abortSignal,c=void 0===s?null:s;return n.__awaiter(this,void 0,void 0,function(){var t,r,i,s,u,l;return n.__generator(this,function(f){return t={},!0===this.configuration.useServerSideSearchCache&&(t.use_cache=!0),i=(r=(0,o.normalizeArrayableParams)(e)).streamConfig,s=n.__rest(r,["streamConfig"]),l=!0===(u=n.__assign(n.__assign({},t),s)).conversation_stream,[2,this.requestWithCache.perform(this.apiCall,"get",{path:this.endpointPath("search"),queryParams:u,streamConfig:i,abortSignal:c,isStreamingRequest:l},{cacheResponseForSeconds:a})]})})},e.prototype.endpointPath=function(e){return"".concat(a.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.collectionName)).concat(s).concat(void 0===e?"":"/"+e)},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return s},enumerable:!1,configurable:!0}),e}()},690916,(e,t,r)=>{"use strict";var n=e.i(943915);Object.defineProperty(r,"__esModule",{value:!0});var i=e.r(824627),a=e.r(760110),o=e.r(222514),s=void 0!==n.default&&null!=n.default.versions&&null!=n.default.versions.node;r.default=function(e){function t(t,r,n){return e.call(this,t,r,n)||this}return i.__extends(t,e),t.prototype.create=function(e,t){return void 0===t&&(t={}),i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(r){if(!e)throw Error("No document provided");return[2,this.apiCall.post(this.endpointPath(),e,t)]})})},t.prototype.upsert=function(e,t){return void 0===t&&(t={}),i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(r){if(!e)throw Error("No document provided");return[2,this.apiCall.post(this.endpointPath(),e,Object.assign({},t,{action:"upsert"}))]})})},t.prototype.update=function(e,t){return void 0===t&&(t={}),i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(r){if(!e)throw Error("No document provided");return null!=t.filter_by?[2,this.apiCall.patch(this.endpointPath(),e,Object.assign({},t))]:[2,this.apiCall.post(this.endpointPath(),e,Object.assign({},t,{action:"update"}))]})})},t.prototype.delete=function(e){return void 0===e&&(e={}),i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(t){return[2,this.apiCall.delete(this.endpointPath(),e)]})})},t.prototype.createMany=function(e,t){return void 0===t&&(t={}),i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(r){return this.configuration.logger.warn("createMany is deprecated and will be removed in a future version. Use import instead, which now takes both an array of documents or a JSONL string of documents"),[2,this.import(e,t)]})})},t.prototype.import=function(e,t){return void 0===t&&(t={}),i.__awaiter(this,void 0,void 0,function(){var r,n,o,c,u;return i.__generator(this,function(l){switch(l.label){case 0:if(r=i.__assign({throwOnFail:!0},t),Array.isArray(e)){if(0===e.length)throw new a.RequestMalformed("No documents provided");try{n=e.map(function(e){return JSON.stringify(e)}).join("\n")}catch(e){if(e instanceof RangeError&&e.message.includes("Too many properties to enumerate"))throw Error("".concat(e,"\n          It looks like you have reached a Node.js limit that restricts the number of keys in an Object: https://stackoverflow.com/questions/9282869/are-there-limits-to-the-number-of-properties-in-a-javascript-object\n\n         Please try reducing the number of keys in your document, or using CURL to import your data.\n          "));throw Error(e)}}else{var f;if(null==(f=n=e)||""===f||0===f.length)throw new a.RequestMalformed("No documents provided")}return[4,this.apiCall.performRequest("post",this.endpointPath("import"),{queryParameters:r,bodyParameters:n,additionalHeaders:{"Content-Type":"text/plain"},skipConnectionTimeout:!0,enableKeepAlive:!!s})];case 1:if(o=l.sent(),!Array.isArray(e))return[2,o];if(!((u=(c=o.split("\n").map(function(e){return JSON.parse(e)})).filter(function(e){return!1===e.success})).length>0)||!r.throwOnFail)return[2,c];throw new a.ImportError("".concat(c.length-u.length," documents imported successfully, ").concat(u.length," documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."),c,{documentsInJSONLFormat:n,options:r,failedItems:u,successCount:c.length-u.length})}})})},t.prototype.importStream=function(e,t){return void 0===t&&(t={}),i.__awaiter(this,void 0,void 0,function(){var r,n,o;return i.__generator(this,function(c){switch(c.label){case 0:return r=i.__assign({throwOnFail:!0},t),[4,this.apiCall.performRequest("post",this.endpointPath("import"),{queryParameters:r,bodyParameters:e,additionalHeaders:{"Content-Type":"text/plain"},skipConnectionTimeout:!0,enableKeepAlive:!!s})];case 1:if(!((o=(n=c.sent().split("\n").map(function(e){return JSON.parse(e)})).filter(function(e){return!1===e.success})).length>0)||!r.throwOnFail)return[2,n];throw new a.ImportError("".concat(n.length-o.length," documents imported successfully, ").concat(o.length," documents failed during import. Use `error.importResults` from the raised exception to get a detailed error reason for each document."),n,{documentsInJSONLFormat:e,options:r,failedItems:o,successCount:n.length-o.length})}})})}
1,t.prototype.export=function(e){return void 0===e&&(e={}),i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(t){return[2,this.apiCall.get(this.endpointPath("export"),e)]})})},t.prototype.exportStream=function(e){return void 0===e&&(e={}),i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(t){return[2,this.apiCall.get(this.endpointPath("export"),e,{responseType:"stream"})]})})},t}(o.SearchOnlyDocuments)},1249,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(312932));r.default=function(){function e(e,t){this.collectionName=e,this.apiCall=t}return e.prototype.upsert=function(e,t){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(r){return[2,this.apiCall.put(this.endpointPath(e),t)]})})},e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.endpointPath=function(t){return"".concat(i.default.RESOURCEPATH,"/").concat(this.collectionName).concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/overrides"},enumerable:!1,configurable:!0}),e}()},391598,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(312932)),a=n.__importDefault(e.r(1249));r.default=function(){function e(e,t,r){this.collectionName=e,this.overrideId=t,this.apiCall=r}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.collectionName)).concat(a.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.overrideId))},e}()},380210,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(312932));r.default=function(){function e(e,t){this.collectionName=e,this.apiCall=t}return e.prototype.upsert=function(e,t){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(r){return[2,this.apiCall.put(this.endpointPath(e),t)]})})},e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.endpointPath=function(t){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.collectionName)).concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/synonyms"},enumerable:!1,configurable:!0}),e}()},194058,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(312932)),a=n.__importDefault(e.r(380210));r.default=function(){function e(e,t,r){this.collectionName=e,this.synonymId=t,this.apiCall=r}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.collectionName)).concat(a.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.synonymId))},e}()},111087,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Document=void 0;var n=e.r(824627),i=n.__importDefault(e.r(312932)),a=n.__importDefault(e.r(690916));r.Document=function(){function e(e,t,r){this.collectionName=e,this.documentId=t,this.apiCall=r}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.delete=function(e){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.delete(this.endpointPath(),e)]})})},e.prototype.update=function(e,t){return void 0===t&&(t={}),n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(r){return[2,this.apiCall.patch(this.endpointPath(),e,t)]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.collectionName)).concat(a.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.documentId))},e}()},936304,(e,t,r)=>{"use strict";
1Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(312932)),a=n.__importDefault(e.r(690916)),o=e.r(760110),s=n.__importDefault(e.r(1249)),c=n.__importDefault(e.r(391598)),u=n.__importDefault(e.r(380210)),l=n.__importDefault(e.r(194058)),f=e.r(111087);r.default=function(){function e(e,t,r){this.name=e,this.apiCall=t,this.configuration=r,this.individualDocuments={},this.individualOverrides={},this.individualSynonyms={},this.name=e,this.apiCall=t,this.configuration=r,this._documents=new a.default(this.name,this.apiCall,this.configuration),this._overrides=new s.default(this.name,this.apiCall),this._synonyms=new u.default(this.name,this.apiCall)}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.update=function(e){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.patch(this.endpointPath(),e)]})})},e.prototype.delete=function(e){return void 0===e&&(e={}),n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.delete(this.endpointPath(),e)]})})},e.prototype.exists=function(){return n.__awaiter(this,void 0,void 0,function(){var e;return n.__generator(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.retrieve()];case 1:return t.sent(),[2,!0];case 2:if((e=t.sent())instanceof o.ObjectNotFound)return[2,!1];throw e;case 3:return[2]}})})},e.prototype.documents=function(e){return e?(void 0===this.individualDocuments[e]&&(this.individualDocuments[e]=new f.Document(this.name,e,this.apiCall)),this.individualDocuments[e]):this._documents},e.prototype.overrides=function(e){return void 0===e?this._overrides:(void 0===this.individualOverrides[e]&&(this.individualOverrides[e]=new c.default(this.name,e,this.apiCall)),this.individualOverrides[e])},e.prototype.synonyms=function(e){return void 0===e?this._synonyms:(void 0===this.individualSynonyms[e]&&(this.individualSynonyms[e]=new l.default(this.name,e,this.apiCall)),this.individualSynonyms[e])},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.name))},e}()},738875,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i="/aliases";r.default=function(){function e(e){this.apiCall=e}return e.prototype.upsert=function(e,t){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(r){return[2,this.apiCall.put(this.endpointPath(e),t)]})})},e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(i)]})})},e.prototype.endpointPath=function(t){return"".concat(e.RESOURCEPATH,"/").concat(encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return i},enumerable:!1,configurable:!0}),e}()},623120,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(738875));r.default=function(){function e(e,t){this.name=e,this.apiCall=t}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.name))},e}()},744556,(e,t,r)=>{"use strict";var n=e.i(912622);Object.defineProperty(r,"__esModule",{value:!0});var i=e.r(824627),a={},o=e.r(291943),s="/keys";r.default=function(){function e(e){this.apiCall=e,this.apiCall=e}return e.prototype.create=function(t){return i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(r){return[2,this.apiCall.post(e.RESOURCEPATH,t)]})})},e.prototype.retrieve=function(){return i.__awaiter(this,void 0,void 0,function(){return i.__generator(this,function(e){return[2,this.apiCall.get(s)]})})},e.prototype.generateScopedSearchKey=function(e,t){var r=JSON.stringify((0,o.normalizeArrayableParams)(t)),i=n.Buffer.from((0,a.createHmac)("sha256",e).update(r).digest("base64")),s=e.substr(0,4),c="".concat(i).c
1oncat(s).concat(r);return n.Buffer.from(c).toString("base64")},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return s},enumerable:!1,configurable:!0}),e}()},239363,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(744556));r.default=function(){function e(e,t){this.id=e,this.apiCall=t}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.id))},e}()},137780,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(e){this.apiCall=e}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get("/debug")]})})},e}()},219450,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(e){this.apiCall=e}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get("/metrics.json")]})})},e}()},400937,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(e){this.apiCall=e}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get("/stats.json")]})})},e}()},367773,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(e){this.apiCall=e}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get("/health")]})})},e}()},947403,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(e){this.apiCall=e}return e.prototype.perform=function(e,t){return void 0===t&&(t={}),n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(r){return[2,this.apiCall.post("".concat("/operations","/").concat(e),{},t)]})})},e}()},149551,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(843104)),a=e.r(291943);r.default=function(){function e(e,t,r){void 0===r&&(r=!1),this.apiCall=e,this.configuration=t,this.useTextContentType=r,this.requestWithCache=new i.default}return e.prototype.clearCache=function(){this.requestWithCache.clearCache()},e.prototype.perform=function(e,t,r){return n.__awaiter(this,void 0,void 0,function(){var i,o,s,c,u;return n.__generator(this,function(l){return i=t?n.__assign({},t):{},!0===this.configuration.useServerSideSearchCache&&(i.use_cache=!0),o={union:e.union,searches:e.searches.map(a.normalizeArrayableParams)},s=i.streamConfig,c=n.__rest(i,["streamConfig"]),u=(0,a.normalizeArrayableParams)(c),[2,this.requestWithCache.perform(this.apiCall,"post",{path:"/multi_search",body:o,queryParams:u,headers:this.useTextContentType?{"content-type":"text/plain"}:{}
1,streamConfig:s,abortSignal:null==r?void 0:r.abortSignal,isStreamingRequest:this.isStreamingRequest(i)},(null==r?void 0:r.cacheSearchResultsForSeconds)!==void 0?{cacheResponseForSeconds:r.cacheSearchResultsForSeconds}:void 0)]})})},e.prototype.isStreamingRequest=function(e){return void 0!==e.streamConfig},e}()},141156,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=e.r(291943);r.default=function(){function e(e){this.apiCall=e}return e.prototype.upsert=function(e,t){return n.__awaiter(this,void 0,void 0,function(){var r,a;return n.__generator(this,function(n){return"object"==typeof t.value&&"searches"in t.value?(r=t.value.searches.map(function(e){return(0,i.normalizeArrayableParams)(e)}),[2,this.apiCall.put(this.endpointPath(e),{value:{searches:r}})]):(a=(0,i.normalizeArrayableParams)(t.value),[2,this.apiCall.put(this.endpointPath(e),{value:a})])})})},e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.endpointPath=function(t){return"".concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/presets"},enumerable:!1,configurable:!0}),e}()},686269,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(141156));r.default=function(){function e(e,t){this.presetId=e,this.apiCall=t}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.presetId))},e}()},189241,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(e){this.apiCall=e,this.apiCall=e}return e.prototype.upsert=function(e,t){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(r){return[2,this.apiCall.put(this.endpointPath(e),t)]})})},e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.endpointPath=function(t){return"".concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/analytics/rules"},enumerable:!1,configurable:!0}),e}()},919920,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(189241));r.default=function(){function e(e,t){this.name=e,this.apiCall=t}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.name))},e}()},557626,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(e){this.apiCall=e,this.apiCall=e}return e.prototype.create=function(e){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.post(this.endpointPath(),e)]})})},e.prototype.endpointPath=function(t){return"".concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/analytics/events"},enumerable:!1,configurable:!0}),e}()},857612,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(189241)),a=n.__importDefault(e.r(919920)),o=n.__importDefault(e.r(557626));r.default=function(){function e(e){this.apiCall=e,this.individualAnalyticsRules={},this.apiCall=e,this._analyticsRules=new i.default(this.apiCall),this._analyticsEvents=new o.default(this.apiCall)}return e.prototype.rules=function(e){return void 0===e?this._analyticsRules:(void 0===this.individualAnalyticsRules[e]&&(this.individualAnalyticsRules[e]=new a.default(e,this.apiCall)),this.individualAnalyticsRules[e])},e.prototype.events=function(){return this._analyticsEvents},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/analytics"}
1,enumerable:!1,configurable:!0}),e}()},749838,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(e){this.apiCall=e}return e.prototype.upsert=function(e,t){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(r){return[2,this.apiCall.put(this.endpointPath(e),t)]})})},e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.endpointPath=function(t){return"".concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/stopwords"},enumerable:!1,configurable:!0}),e}()},721466,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(749838));r.default=function(){function e(e,t){this.stopwordId=e,this.apiCall=t}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.stopwordId))},e}()},752519,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(e){this.apiCall=e,this.apiCall=e}return e.prototype.create=function(e){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.post(this.endpointPath(),e)]})})},e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.endpointPath=function(t){return"".concat(e.RESOURCEPATH).concat(void 0===t?"":"/"+encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/conversations/models"},enumerable:!1,configurable:!0}),e}()},633099,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(752519));r.default=function(){function e(e,t){this.id=e,this.apiCall=t}return e.prototype.update=function(e){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.put(this.endpointPath(),e)]})})},e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.id))},e}()},583646,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(752519)),a=n.__importDefault(e.r(633099)),o="/conversations";r.default=function(){function e(e){this.apiCall=e,this.individualConversationModels={},this.apiCall=e,this._conversationsModels=new i.default(this.apiCall)}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(o)]})})},e.prototype.models=function(e){return void 0===e?this._conversationsModels:(void 0===this.individualConversationModels[e]&&(this.individualConversationModels[e]=new a.default(e,this.apiCall)),this.individualConversationModels[e])},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return o},enumerable:!1,configurable:!0}),e}()},961984,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(583646));r.default=function(){function e(e,t){this.id=e,this.apiCall=t}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.update=function(e){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.put(this.endpointPath(),e)]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.id
1))},e}()},689382,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(e){this.apiCall=e,this.apiCall=e}return e.prototype.upsert=function(e,t){return n.__awaiter(this,void 0,void 0,function(){var r,i;return n.__generator(this,function(n){switch(n.label){case 0:return r=Array.isArray(t)?t.map(function(e){return JSON.stringify(e)}).join("\n"):t,[4,this.apiCall.performRequest("post",this.endpointPath("import"),{queryParameters:{id:e},bodyParameters:r,additionalHeaders:{"Content-Type":"text/plain"},skipConnectionTimeout:!0})];case 1:return i=n.sent(),[2,Array.isArray(t)?i.split("\n").map(function(e){return JSON.parse(e)}):i]}})})},e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.endpointPath=function(t){return void 0===t?"".concat(e.RESOURCEPATH):"".concat(e.RESOURCEPATH,"/").concat(encodeURIComponent(t))},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/stemming/dictionaries"},enumerable:!1,configurable:!0}),e}()},50478,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(689382));r.default=function(){function e(e,t){this.id=e,this.apiCall=t}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.id))},e}()},757924,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(689382)),a=n.__importDefault(e.r(50478));r.default=function(){function e(e){this.apiCall=e,this.individualStemmingDictionaries={},this.apiCall=e,this._stemmingDictionaries=new i.default(this.apiCall)}return e.prototype.dictionaries=function(e){return void 0===e?this._stemmingDictionaries:(void 0===this.individualStemmingDictionaries[e]&&(this.individualStemmingDictionaries[e]=new a.default(e,this.apiCall)),this.individualStemmingDictionaries[e])},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/stemming"},enumerable:!1,configurable:!0}),e}()},245879,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(){function e(e){this.apiCall=e}return e.prototype.create=function(e){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.post(this.endpointPath(),e)]})})},e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.endpointPath=function(){return e.RESOURCEPATH},Object.defineProperty(e,"RESOURCEPATH",{get:function(){return"/nl_search_models"},enumerable:!1,configurable:!0}),e}()},930080,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(245879));r.default=function(){function e(e,t){this.id=e,this.apiCall=t}return e.prototype.retrieve=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.get(this.endpointPath())]})})},e.prototype.update=function(e){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(t){return[2,this.apiCall.put(this.endpointPath(),e)]})})},e.prototype.delete=function(){return n.__awaiter(this,void 0,void 0,function(){return n.__generator(this,function(e){return[2,this.apiCall.delete(this.endpointPath())]})})},e.prototype.endpointPath=function(){return"".concat(i.default.RESOURCEPATH,"/").concat(encodeURIComponent(this.id))},e}()},703750,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(124605)),a=n.__importDefault(e.r(549230)),o=n.__importDefault(e.r(312932)),s=n.__importDefault(e.r(936304)),c=n.__importDefault(e.r(738875)),u=n.__importDefault(e.r(623120)),l=n.__importDefault(e.r(744556)),f=n.__importDefault(e.r(239363)),h=n.__importDefault(e.r(137780)),d=n.__importDefault(e.r(219450)),p=n.__importDefault(e.r(400937)),m=n.__importDefault(e.r(367773)),g=n.__importDefault(e.r(947403)),y=n.__importDefault(e.r(149551)),v=n.__importDefault(e.r(141156)),b=n.__importDefault(e.r(686269)),_=n.__importDefault(e.r(857612)),S=n.__importDefault(e.r(749838)),O=n.__importDefault(e.r(721466)),R=n.__importDefault(e.r(583646)),P=n.__importDefault(e.r(961984)),j=n.__importDefault(e.r(757924)),w=n.__importDefault(e.r(245879)),x=n.__importDefault(e.r(930080));r.default=function(){function e(e){var t;e.sendApiKeyAsQueryParam=null!=(t=e.sendApiKeyAsQueryParam)&&t,this.configuration=new i.default(e),this.apiCall=new a.default(this.configuration),this.debug=new h.default(this.apiCall),this.metrics=new d.default(this.apiCall),this.stats=new p.default(this.apiCall),this.health=new m.default(this.apiCall),this.operations=new g.default(this.apiCall),this.multiSearch=new y.default(this.apiCall,this.configuration),this._collections=new o.default(this.apiCall),this.individualCollections={},this._aliases=new c.default(this.apiCall),this.individualAliases={},this._keys=new l.default(this.apiCall),this.individualKeys={},this._presets=new v.default(this.apiCall),this.individualPresets={},this._stopwords=new S.default(this.apiCall),this.individualStopwords={},this.analytics=new _.default(this.apiCall),this.stemming=new j.default(this.apiCall),this._conversations=new R.default(this.apiCall),this.individualConversations={},this._nlSearchModels=new w.default(this.apiCall),this.individualNLSearchModels={}}return e.prototype.collections=function(e){return void 0===e?this._collections:(void 0===this.individualCollections[e]&&(this.individualCollections[e]=new s.default(e,this.apiCall,this.configuration)),this.individualCollections[e])},e.prototype.aliases=function(e){return void 0===e?this._aliases:(void 0===this.individualAliases[e]&&(this.individualAliases[e]=new u.default(e,this.apiCall)),this.individualAliases[e])},e.prototype.keys=function(e){return void 0===e?this._keys:(void 0===this.individualKeys[e]&&(this.individualKeys[e]=new f.default(e,this.apiCall)),this.individualKeys[e])},e.prototype.presets=function(e){return void 0===e?this._presets:(void 0===this.individualPresets[e]&&(this.individualPresets[e]=new b.default(e,this.apiCall)),this.individualPresets[e])},e.prototype.stopwords=function(e){return void 0===e?this._stopwords:(void 0===this.individualStopwords[e]&&(this.individualStopwords[e]=new O.default(e,this.apiCall)),this.individualStopwords[e])},e.prototype.conversations=function(e){return void 0===e?this._conversations:(void 0===this.individualConversations[e]&&(this.individualConversations[e]=new P.default(e,this.apiCall)),this.individualConversations[e])},e.prototype.nlSearchModels=function(e){return void 0===e?this._nlSearchModels:(void 0===this.individualNLSearchModels[e]&&(this.individualNLSearchModels[e]=new x.default(e,this.apiCall)),this.individualNLSearchModels[e])},e}()},558966,(e,t,r)=>{"use strict";
1Object.defineProperty(r,"__esModule",{value:!0}),r.SearchOnlyCollection=void 0;var n=e.r(222514);r.SearchOnlyCollection=function(){function e(e,t,r){this.name=e,this.apiCall=t,this.configuration=r,this._documents=new n.SearchOnlyDocuments(this.name,this.apiCall,this.configuration)}return e.prototype.documents=function(){return this._documents},e}()},172549,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importDefault(e.r(124605)),a=n.__importDefault(e.r(549230)),o=n.__importDefault(e.r(149551)),s=e.r(558966);r.default=function(){function e(e){var t;e.sendApiKeyAsQueryParam=null==(t=e.sendApiKeyAsQueryParam)||t,!0===e.sendApiKeyAsQueryParam&&(e.apiKey||"").length>2e3&&(console.warn("[typesense] API Key is longer than 2000 characters which is over the allowed limit, so disabling sending it as a query parameter."),e.sendApiKeyAsQueryParam=!1),this.configuration=new i.default(e),this.apiCall=new a.default(this.configuration),this.multiSearch=new o.default(this.apiCall,this.configuration,!0),this.individualCollections={}}return e.prototype.clearCache=function(){this.multiSearch.clearCache(),Object.entries(this.individualCollections).forEach(function(e){e[0],e[1].documents().clearCache()})},e.prototype.collections=function(e){if(e)return void 0===this.individualCollections[e]&&(this.individualCollections[e]=new s.SearchOnlyCollection(e,this.apiCall,this.configuration)),this.individualCollections[e];throw Error("Typesense.SearchClient only supports search operations, so the collectionName that needs to be searched must be specified. Use Typesense.Client if you need to access the collection object.")},e}()},874318,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.Errors=r.SearchClient=r.Client=void 0;var n=e.r(824627),i=n.__importDefault(e.r(703750));r.Client=i.default;var a=n.__importDefault(e.r(172549));r.SearchClient=a.default;var o=n.__importStar(e.r(760110));r.Errors=o,r.default={Client:i.default,SearchClient:a.default,Errors:o}},270909,(e,t,r)=>{t.exports=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r},t.exports.__esModule=!0,t.exports.default=t.exports},719197,(e,t,r)=>{var n=e.r(270909);t.exports=function(e,t){if(null==e)return{};var r,i,a=n(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a},t.exports.__esModule=!0,t.exports.default=t.exports},342215,(e,t,r)=>{t.exports=function(e){if(Array.isArray(e))return e},t.exports.__esModule=!0,t.exports.default=t.exports},629424,(e,t,r)=>{t.exports=function(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}},t.exports.__esModule=!0,t.exports.default=t.exports},583833,(e,t,r)=>{t.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n},t.exports.__esModule=!0,t.exports.default=t.exports},545753,(e,t,r)=>{var n=e.r(583833);t.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},t.exports.__esModule=!0,t.exports.default=t.exports},699071,(e,t,r)=>{t.exports=function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},405798,(e,t,r)=>{var n=e.r(342215),i=e.r(629424),a=e.r(545753),o=e.r(699071);t.exports=function(e,t){return n(e)||i(e,t)||a(e,t)||o()}
1,t.exports.__esModule=!0,t.exports.default=t.exports},979979,(e,t,r)=>{"use strict";var n,i=e.r(673415);Object.defineProperty(r,"__esModule",{value:!0}),r.SearchRequestAdapter=void 0;var a=i(e.r(22971)),o=i(e.r(719197)),s=i(e.r(778335)),c=i(e.r(405798)),u=i(e.r(503262)),l=i(e.r(340862)),f=["q","conversation","conversation_id","conversation_model_id"];r.SearchRequestAdapter=(0,l.default)(function e(t,r,n){(0,u.default)(this,e),this.instantsearchRequests=t,this.typesenseClient=r,this.configuration=n,this.additionalSearchParameters=n.additionalSearchParameters,this.collectionSpecificSearchParameters=n.collectionSpecificSearchParameters},[{key:"_shouldUseExactMatchForField",value:function(e,t){var r,n;return(null==(r=this.configuration.collectionSpecificFilterByOptions)||null==(r=r[t])||null==(r=r[e])?void 0:r.exactMatch)!==!1&&(null==(n=this.configuration.filterByOptions)||null==(n=n[e])?void 0:n.exactMatch)!==!1}},{key:"_adaptFacetFilters",value:function(e,t){var r=this,n="";return e?n=e.map(function(e){if(Array.isArray(e)){var n={};e.forEach(function(e){var t=r._parseFacetFilter(e),i=t.fieldName,a=t.fieldValue;n[i]=n[i]||[],n[i].push(a)}),Object.keys(n).length>1&&console.error("[Typesense-Instantsearch-Adapter] Typesense does not support cross-field ORs at the moment. The adapter could not OR values between these fields: ".concat(Object.keys(n).join(",")));var i=Object.keys(n)[0],a=n[i].reduce(function(e,t){return t.startsWith("-")&&!r._isNumber(t)?e[0].push(t.substring(1)):e[1].push(t),e},[[],[]]),o=(0,c.default)(a,2),s=o[0],u=o[1],l=[];if(u.length>0){var f=r._shouldUseExactMatchForField(i,t)?":=":":";l.push("".concat(i).concat(f,"[").concat(u.map(function(e){return r._escapeFacetValue(e)}).join(","),"]"))}if(s.length>0){var h=r._shouldUseExactMatchForField(i,t)?":!=":":!";l.push("".concat(i).concat(h,"[").concat(s.map(function(e){return r._escapeFacetValue(e)}).join(","),"]"))}return l.filter(function(e){return e}).join(" && ")}var d,p=r._parseFacetFilter(e),m=p.fieldName,g=p.fieldValue;if(g.startsWith("-")&&!r._isNumber(g)){var y=r._shouldUseExactMatchForField(m,t)?":!=":":!";d="".concat(m).concat(y,"[").concat(r._escapeFacetValue(g.substring(1)),"]")}else{var v=r._shouldUseExactMatchForField(m,t)?":=":":";d="".concat(m).concat(v,"[").concat(r._escapeFacetValue(g),"]")}return d}).join(" && "):n}},{key:"_parseFacetFilter",value:function(e){if((null==(t=this.configuration.facetableFieldsWithSpecialCharacters)?void 0:t.length)>0){var t,r,n,i,a,o=this.configuration.facetableFieldsWithSpecialCharacters.flat().map(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});if(r=new RegExp("^(".concat(o.join("|"),"):(.*)$")),null!=(n=e.match(r)))return{fieldName:i="".concat(n[1]),fieldValue:a="".concat(n[2])}}return r=this.constructor.DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX,null==(n=e.match(r))?console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a facet filter `".concat(e,"` with the Regex `").concat(r,"`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter.")):(i="".concat(n[1]).concat(n[2]),a="".concat(n[3])),{fieldName:i,fieldValue:a}}},{key:"_escapeFacetValue",value:function(e){return"boolean"==typeof e||"true"===e||"false"===e||this._isNumber(e)?e:"`".concat(e,"`")}},{key:"_isNumber",value:function(e){return Number.isInteger(e%1)||!!(e%1)}},{key:"_adaptNumericFilters",value:function(e){var t=this,r="";if(!e)return r;var n={};e.forEach(function(e){var r=t._parseNumericFilter(e),i=r.fieldName,a=r.operator,o=r.fieldValue;n[i]=n[i]||{},n[i][a]=o});var i=[];return Object.keys(n).forEach(function(e){null!=n[e]["<="]&&null!=n[e][">="]?i.push("".concat(e,":=[").concat(n[e][">="],"..").concat(n[e]["<="],"]")):null!=n[e]["<="]?i.push("".concat(e,":<=").concat(n[e]["<="])):null!=n[e][">="]?i.push("".concat(e,":>=").concat(n[e][">="])):null!=n[e]["="]?i.push("".concat(e,":=").concat(n[e]["="])):console.warn("[Typesense-Instantsearch-Adapter] Unsupported operator found ".concat(JSON.stringify(n[e])))}),r=i.join(" && ")}},{key:"_parseNumericFilter",value:function(e){if((null==(t=this.configuration.facetableFieldsWithSpecialCharacters)?void 0:t.length)>0){var t,r,n,i,a,o,s=this.configuration.facetableFieldsWithSpecialCharacters.map(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")});if(r=new RegExp("^(".concat(s.join("|"),")(<=|>=|>|<|=)(.*)$")),null!=(n=e.match(r))){var u=n,l=(0,c.default)(u,4);return i=l[1],{fieldName:i,operator:a=l[2],fieldValue:o=l[3]}}}if(r=this.constructor.DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX,null==(n=e.match(r)))console.error("[Typesense-Instantsearch-Adapter] Parsing failed for a numeric filter `".concat(e,"` with the Regex `").concat(r,"`. If you have field names with special characters, be sure to add them to a parameter called `facetableFieldsWithSpecialCharacters` when instantiating the adapter."));else{var f=n,h=(0,c.default)(f,4);i=h[1],a=h[2],o=h[3]}return{fieldName:i,operator:a,fieldValue:o}}},{key:"_adaptGeoFilter",value:function(e){var t,r,n,i,a=e.insideBoundingBox,o=e.aroundRadius,s=e.aroundLatLng,u=e.insidePolygon;if(a){if(Array.isArray(a)){var l=a.flat(),f=(0,c.default)(l,4);t=f[0],r=f[1],n=f[2],i=f[3]}else{var h=a.split(","),d=(0,c.default)(h,4);t=d[0],r=d[1],n=d[2],i=d[3]}return"".concat(this.configuration.geoLocationField,":(").concat(t,", ").concat(r,", ").concat(t,", ").concat(i,", ").concat(n,", ").concat(i,", ").concat(n,", ").concat(r,")")}if(s||o){if(!o||"all"===o)throw Error("[Typesense-Instantsearch-Adapter] In Typesense, geo-filtering around a lat/lng also requires a numerical radius. So the `aroundRadius` parameter is required when `aroundLatLng` is used. If you intend to just geo-sort around a lat/long, you want to use the sortBy InstantSearch widget (or a virtual sortBy custom widget).");var p="".concat(parseFloat(o)/1e3," km");return"".concat(this.configuration.geoLocationField,":(").concat(s,", ").concat(p,")")}if(u){var m=u;return Array.isArray(u)&&(m=u.flat().join(",")),"".concat(this.configuration.geoLocationField,":(").concat(m,")")}}},{key:"_adaptFilters",value:function(e,t){var r=[];return e.filters&&r.push(e.filters),r.push(this._adaptFacetFilters(e.facetFilters,t)),r.push(this._adaptNumericFilters(e.numericFilters)),r.push(this._adaptGeoFilter(e)),r.filter(function(e){return e&&""!==e}).join(" && ")}},{key:"_adaptIndexName",value:function(e){return e.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[1]}},{key:"_adaptSortBy",value:function(e){return e.match(this.constructor.INDEX_NAME_MATCHING_REGEX)[3]}},{key:"_adaptFacetBy",value:function(e,t){var r=this;return[e].flat().map(function(e){var n;return null!=(n=r.configuration.collectionSpecificFacetByOptions)&&null!=(n=n[t])&&n[e]?"".concat(e).concat(r.configuration.collectionSpecificFacetByOptions[t][e]):r.configuration.facetByOptions[e]?"".concat(e).concat(r.configuration.facetByOptions[e]):e}).join(",")}},{key:"_adaptRulesContextsToOverrideTags",value:function(e){return e.join(",")}},{key:"_buildSearchParameters",value:function(e){for(var t,r,n=e.params,i=e.indexName,a=this._adaptIndexName(i),o={},s=0,u=Object.entries(this.additionalSearchParameters);s<u.length;s++){var l=(0,c.default)(u[s],2),f=l[0],h=l[1];o[this._camelToSnakeCase(f)]=h}if(this.collectionSpecificSearchParameters[a])for(var d=0,p=Object.entries(this.collectionSpecificSearchParameters[a]);d<p.length;d++){var m=(0,c.default)(p[d],2),g=m[0],y=m[1];o[this._camelToSnakeCase(g)]=y}var v=Object.assign({},o),b=this._adaptSortBy(i);Object.assign(v,{collection:a,q:""===n.query||void 0===n.query?"*":n.query,facet_by:o.facet_by||this._adaptFacetBy(n.facets,a),filter_by:this._adaptFilters(n,a)||o.filter_by,sort_by:b||o.sort_by,max_facet_values:n.maxValuesPerFacet,page:(n.page||0)+1}),null!=n.hitsPerPage&&(v.per_page=n.hitsPerPage),n.facetQuery&&(v.facet_query="".concat(n.facetName,":").concat(n.facetQuery),v.per_page=0),n.ruleContexts&&n.ruleContexts.length>0&&(v.override_tags=this._adaptRulesContextsToOverrideTags(n.ruleContexts)),n.typesenseVectorQuery&&(v.vector_query=n.typesenseVectorQuery);var _=(null==(t=this.configuration.collectionSpecificSortByOptions)||null==(t=t[a])?void 0:t[v.sort_by])||
1(null==(r=this.configuration.sortByOptions)?void 0:r[v.sort_by]);return(null==_?void 0:_.enable_overrides)!=null&&(v.enable_overrides=_.enable_overrides),Object.fromEntries(Object.entries(v).filter(function(e){var t=(0,c.default)(e,2),r=(t[0],t[1]);return null!=r&&""!==r}))}},{key:"_camelToSnakeCase",value:function(e){return e.split(/(?=[A-Z])/).join("_").toLowerCase()}},{key:"request",value:(n=(0,s.default)(a.default.mark(function e(){var t,r,n,i,s,c,u,l=this;return a.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.instantsearchRequests.map(function(e){return l._buildSearchParameters(e)}),r={},((null==(c=t[0])?void 0:c.conversation)===!0||(null==(u=t[0])?void 0:u.conversation)==="true")&&(i=(n=t[0]).q,s=n.conversation,r={q:i,conversation:s,conversation_id:n.conversation_id,conversation_model_id:n.conversation_model_id},t=t.map(function(e){return e.q,e.conversation,e.conversation_id,e.conversation_model_id,(0,o.default)(e,f)})),e.abrupt("return",this.typesenseClient.multiSearch.perform({searches:t},r));case 4:case"end":return e.stop()}},e,this)})),function(){return n.apply(this,arguments)})}],[{key:"INDEX_NAME_MATCHING_REGEX",get:function(){return RegExp("^(.+?)(?=(/sort/(.*))|$)")}},{key:"DEFAULT_FACET_FILTER_STRING_MATCHING_REGEX",get:function(){return RegExp("(.*)((?!:).):(?!:)(.*)")}},{key:"DEFAULT_NUMERIC_FILTER_STRING_MATCHING_REGEX",get:function(){return RegExp("(.*?)(<=|>=|>|<|=)(.*)")}}])},384574,(e,t,r)=>{var n=e.r(583833);t.exports=function(e){if(Array.isArray(e))return n(e)},t.exports.__esModule=!0,t.exports.default=t.exports},192658,(e,t,r)=>{t.exports=function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},t.exports.__esModule=!0,t.exports.default=t.exports},704390,(e,t,r)=>{t.exports=function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},t.exports.__esModule=!0,t.exports.default=t.exports},267499,(e,t,r)=>{var n=e.r(384574),i=e.r(192658),a=e.r(545753),o=e.r(704390);t.exports=function(e){return n(e)||i(e)||a(e)||o()},t.exports.__esModule=!0,t.exports.default=t.exports},247622,(e,t,r)=>{var n=e.r(650732);t.exports=function(e,t,r){return(t=n(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},t.exports.__esModule=!0,t.exports.default=t.exports},50101,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.utils=void 0,r.utils={_adaptHighlightTag:function(e,t,r){return e.replace(RegExp("<mark>","g"),t||"<mark>").replace(RegExp("</mark>","g"),r||"</mark>")},_adaptNumberOfPages:function(){var e=this.typesenseResponse.found/this.typesenseResponse.request_params.per_page;return Number.isFinite(e)?Math.ceil(e):1}}},579659,(e,t,r)=>{"use strict";var n=e.r(673415);Object.defineProperty(r,"__esModule",{value:!0}),r.SearchResponseAdapter=void 0;var i=n(e.r(607112)),a=n(e.r(405798)),o=n(e.r(267499)),s=n(e.r(247622)),c=n(e.r(503262)),u=n(e.r(340862)),l=e.r(50101);function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach(function(t){(0,s.default)(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}Object.assign((r.SearchResponseAdapter=(0,u.default)(function e(t,r,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};(0,c.default)(this,e),this.typesenseResponse=t,this.instantsearchRequest=r,this.configuration=n,this.allTypesenseResults=i,this.fullTypesenseResponse=a},[{key:"_adaptGroupedHits",value:function(e){var t=this,r=[];return r=e.map(function(e){var r=t._adaptHits(e.hits);return r.forEach(function(t){t.group_key=t._group_key=e.group_key,e.found&&(t._group_found=e.found)}),r}),r=this.configuration.flattenGroupedHits?r.flat():r.map(function(e){return h(h({},e[0]),{},{_grouped_hits:e})})}},{key:"_adaptHits",value:function(e){var t=this;return e.map(function(e){var r=h({},e.document);r.objectID=e.document.id,r._snippetResult=t._adaptHighlightResult(e,"snippet"),r._highlightResult=t._adaptHighlightResult(e,"value"),r._rawTypesenseHit=e,t.fullTypesenseResponse.conversation&&(r._rawTypesenseConversation=t.fullTypesenseResponse.conversation),["text_match","geo_distance_meters","curated","text_match_info","hybrid_search_info","vector_distance"].forEach(function(t){Object.keys(e).includes(t)&&!Object.keys(r).includes(t)&&(r[t]=e[t])});var n=r[t.configuration.geoLocationField];return n&&(r._geoloc={lat:n[0],lng:n[1]}),r})}},{key:"_adaptHighlightResult",value:function(e,t){var r={};return null!=e.highlight&&this.isHighlightPost0240RCN32Format(e.highlight)?this.adaptHighlightObject(e,r,t):this.adaptHighlightsArray(e,r,t),r}},{key:"isHighlightPost0240RCN32Format",value:function(e){return null==e.full&&null==e.snippet}},{key:"adaptHighlightsArray",value:function(e,t,r){var n=this;Object.assign.apply(Object,[t].concat((0,o.default)(Object.entries(e.document).map(function(e){var t=(0,a.default)(e,2),r=t[0],n=t[1];return(0,s.default)({},r,{value:n,matchLevel:"none",matchedWords:[]})}
1)))),e.highlights.forEach(function(e){t[e.field]={value:e[r]||e["".concat(r,"s")],matchLevel:"full",matchedWords:e.matched_tokens},e.indices&&(t[e.field].matchedIndices=e.indices)}),Object.entries(t).forEach(function(o){var s=(0,a.default)(o,2),c=s[0],u=s[1],l=u.value,f=u.matchLevel,h=u.matchedWords,d=u.matchedIndices;null==l?t[c]=n._adaptHighlightNullValue():Array.isArray(l)?(t[c]=[],e.document[c].forEach(function(e,a){d&&d.includes(a)?t[c].push({value:n._adaptHighlightTag("".concat(l[d.indexOf(a)]),n.instantsearchRequest.params.highlightPreTag,n.instantsearchRequest.params.highlightPostTag),matchLevel:f,matchedWords:h[a]}):"object"===(0,i.default)(e)?t[c].push(n._adaptHighlightInObjectValue(e,{},r)):t[c].push({value:"".concat(e),matchLevel:"none",matchedWords:[]})})):"object"===(0,i.default)(l)?t[c]=n._adaptHighlightInObjectValue(l,{},r):t[c].value=n._adaptHighlightTag("".concat(l),n.instantsearchRequest.params.highlightPreTag,n.instantsearchRequest.params.highlightPostTag)})}},{key:"adaptHighlightObject",value:function(e,t,r){Object.assign(t,this._adaptHighlightInObjectValue(e.document,e.highlight,r))}},{key:"_adaptHighlightInObjectValue",value:function(e,t,r){var n=this;return Object.assign.apply(Object,[{}].concat((0,o.default)(Object.entries(e).map(function(e){var o,c,u,l=(0,a.default)(e,2),f=l[0],h=l[1];return o=null==h?n._adaptHighlightNullValue():Array.isArray(h)?n._adaptHighlightInArrayValue(h,null!=(c=null==t?void 0:t[f])?c:[],r):"object"===(0,i.default)(h)?n._adaptHighlightInObjectValue(h,null!=(u=null==t?void 0:t[f])?u:{},r):n._adaptHighlightInPrimitiveValue(h,null==t?void 0:t[f],r),(0,s.default)({},f,o)}))))}},{key:"_adaptHighlightInArrayValue",value:function(e,t,r){var n=this;return e.map(function(e,a){var o,s;return null==e?n._adaptHighlightNullValue():Array.isArray(e)?n._adaptHighlightInArrayValue(e,null!=(o=null==t?void 0:t[a])?o:[],r):"object"===(0,i.default)(e)?n._adaptHighlightInObjectValue(e,null!=(s=null==t?void 0:t[a])?s:{},r):n._adaptHighlightInPrimitiveValue(e,null==t?void 0:t[a],r)})}},{key:"_adaptHighlightInPrimitiveValue",value:function(e,t,r){var n,i;return null==t?{value:this._adaptHighlightTag("".concat(e),this.instantsearchRequest.params.highlightPreTag,this.instantsearchRequest.params.highlightPostTag),matchLevel:"none",matchedWords:[]}:{value:this._adaptHighlightTag("".concat(null!=(n=null!=(i=t[r])?i:t.highlight)?n:t.snippet),this.instantsearchRequest.params.highlightPreTag,this.instantsearchRequest.params.highlightPostTag),matchLevel:(t.matched_tokens||[]).length>0?"full":"none",matchedWords:t.matched_tokens||[]}}},{key:"_adaptHighlightNullValue",value:function(){return{value:"",matchLevel:"none",matchedWords:[]}}},{key:"_adaptFacets",value:function(e){var t={};return e.forEach(function(e){Object.assign(t,(0,s.default)({},e.field_name,Object.assign.apply(Object,[{}].concat((0,o.default)(e.counts.map(function(e){return(0,s.default)({},e.value,e.count)}))))))}),t}},{key:"_adaptFacetStats",value:function(e){var t={};return e.forEach(function(e){Object.keys(e.stats).length>0&&Object.assign(t,(0,s.default)({},e.field_name,e.stats))}),t}},{key:"_adaptRenderingContent",value:function(e){var t,r=Object.assign({},this.configuration.renderingContent);return(null==(t=r.facetOrdering)||null==(t=t.facets)?void 0:t.order)==null&&(r.facetOrdering=r.facetOrdering||{},r.facetOrdering.facets=r.facetOrdering.facets||{},r.facetOrdering.facets.order=(0,o.default)(new Set(e.map(function(e){return e.field_name}).concat(this.allTypesenseResults.map(function(e){return e.facet_counts||[]}).flat().map(function(e){return e.field_name}).filter(function(e){return e}))))),r}},{key:"_adaptUserData",value:function(e){return e?Array.isArray(e)?e:[e]:[]}},{key:"adapt",value:function(){var e=this._adaptRenderingContent(this.typesenseResponse.facet_counts||[]),t=h({hits:this.typesenseResponse.grouped_hits?this._adaptGroupedHits(this.typesenseResponse.grouped_hits):this._adaptHits(this.typesenseResponse.hits),nbHits:this.typesenseResponse.found,page:this.typesenseResponse.page-1,nbPages:this._adaptNumberOfPages(),hitsPerPage:this.typesenseResponse.request_params.per_page,facets:this._adaptFacets(this.typesenseResponse.facet_counts||[]),facets_stats:this._adaptFacetStats(this.typesenseResponse.facet_counts||{}),query:this.typesenseResponse.request_params.q,processingTimeMS:this.typesenseResponse.search_time_ms},Object.keys(e).length>0?{renderingContent:e}:null);return this.typesenseResponse.metadata&&(t.appliedRules=["typesense-override"],t.userData=this._adaptUserData(this.typesenseResponse.metadata)),this.fullTypesenseResponse.conversation&&0===t.hits.length&&(t.hits=[{_rawTypesenseConversation:this.fullTypesenseResponse.conversation}]),t}}])).prototype,l.utils)},76307,(e,t,r)=>{"use strict";var n=e.r(673415);
1Object.defineProperty(r,"__esModule",{value:!0}),r.FacetSearchResponseAdapter=void 0;var i=n(e.r(503262)),a=n(e.r(340862)),o=e.r(50101);Object.assign((r.FacetSearchResponseAdapter=(0,a.default)(function e(t,r){(0,i.default)(this,e),this.typesenseResponse=t,this.instantsearchRequest=r},[{key:"_adaptFacetHits",value:function(e){var t=this;return e.find(function(e){return e.field_name===t.instantsearchRequest.params.facetName}).counts.map(function(e){return{value:e.value,highlighted:t._adaptHighlightTag(e.highlighted,t.instantsearchRequest.params.highlightPreTag,t.instantsearchRequest.params.highlightPostTag),count:e.count}})}},{key:"adapt",value:function(){return{facetHits:this._adaptFacetHits(this.typesenseResponse.facet_counts),exhaustiveFacetsCount:!0,processingTimeMS:this.typesenseResponse.search_time_ms}}}])).prototype,o.utils)},309021,(e,t,r)=>{"use strict";var n,i,a,o=e.r(673415);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var s=o(e.r(22971)),c=o(e.r(778335)),u=o(e.r(503262)),l=o(e.r(340862)),f=e.r(282007),h=e.r(874318),d=e.r(979979),p=e.r(579659),m=e.r(76307);r.default=(0,l.default)(function e(t){var r=this;(0,u.default)(this,e),this.updateConfiguration(t),this.searchClient={clearCache:function(){return r.clearCache()},search:function(e){return r.searchTypesenseAndAdapt(e)},searchForFacetValues:function(e){return r.searchTypesenseForFacetValuesAndAdapt(e)}}},[{key:"searchTypesenseAndAdapt",value:(n=(0,c.default)(s.default.mark(function e(t){var r,n,i=this;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._adaptAndPerformTypesenseRequest(t);case 3:return n=(r=e.sent).results.map(function(e,n){return i._validateTypesenseResult(e),new p.SearchResponseAdapter(e,t[n],i.configuration,r.results,r).adapt()}),e.abrupt("return",{results:n});case 8:throw e.prev=8,e.t0=e.catch(0),console.error(e.t0),e.t0;case 12:case"end":return e.stop()}},e,this,[[0,8]])})),function(e){return n.apply(this,arguments)})},{key:"searchTypesenseForFacetValuesAndAdapt",value:(i=(0,c.default)(s.default.mark(function e(t){var r,n=this;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,this._adaptAndPerformTypesenseRequest(t);case 3:return r=e.sent.results.map(function(e,r){return n._validateTypesenseResult(e),new m.FacetSearchResponseAdapter(e,t[r],n.configuration).adapt()}),e.abrupt("return",r);case 8:throw e.prev=8,e.t0=e.catch(0),console.error(e.t0),e.t0;case 12:case"end":return e.stop()}},e,this,[[0,8]])})),function(e){return i.apply(this,arguments)})},{key:"_adaptAndPerformTypesenseRequest",value:(a=(0,c.default)(s.default.mark(function e(t){var r,n;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=new d.SearchRequestAdapter(t,this.typesenseClient,this.configuration),e.next=3,r.request();case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}},e,this)})),function(e){return a.apply(this,arguments)})},{key:"clearCache",value:function(){return this.typesenseClient=new h.SearchClient(this.configuration.server),this.searchClient}},{key:"updateConfiguration",value:function(e){return this.configuration=new f.Configuration(e),this.configuration.validate(),this.typesenseClient=new h.SearchClient(this.configuration.server),!0}},{key:"_validateTypesenseResult",value:function(e){if(e.error)throw Error("".concat(e.code," - ").concat(e.error));if(!e.hits&&!e.grouped_hits)throw Error("Did not find any hits. ".concat(e.code," - ").concat(e.error))}}])},254834,400274,412763,e=>{"use strict";var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},r=/[&<>"']/g,n=RegExp(r.source);function i(e){return e&&n.test(e)?e.replace(r,function(e){return t[e]}):e}var a={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},o=/&(amp|quot|lt|gt|#39);/g,s=RegExp(o.source);e.s(["escape",0,i,"unescape",0,function(e){return e&&s.test(e)?e.replace(o,function(e){return a[e]}):e}],400274);var c=e.i(483363);function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(){return(l=Object.assign.bind()).apply(this,arguments)}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?f(Object(r),!0).forEach(function(t){d(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function d(e,t,r){var n;return(n=function(e,t){if("object"!=u(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=u(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==u(n)?n:String(n))in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var p={highlightPreTag:"__ais-highlight__",highlightPostTag:"__/ais-highlight__"},m={highlightPreTag:"<mark>",highlightPostTag:"</mark>"};function g(e){return i(e).replace(RegExp(p.highlightPreTag,"g"),m.highlightPreTag).replace(RegExp(p.highlightPostTag,"g"),m.highlightPostTag)}function y(e){return(0,c.isPlainObject)(e)&&"string"!=typeof e.value?Object.keys(e).reduce(function(t,r){return h(h({},t),{},d({},r,y(e[r])))},{}):Array.isArray(e)?e.map(y):h(h({},e),{},{value:g(e.value)})}e.s(["TAG_PLACEHOLDER",0,p,"TAG_REPLACEMENT",0,m,"escapeFacets",0,function(e){return e.map(function(e){return h(h({},e),{},{highlighted:g(e.highlighted)})})},"escapeHits",0,function(e){return void 0===e.__escaped&&((e=e.map(function(e){var t=l({},(function(e){if(null==e)throw TypeError("Cannot destructure "+e)}(e),e));return t._highlightResult&&(t._highlightResult=y(t._highlightResult)),t._snippetResult&&(t._snippetResult=y(t._snippetResult)),t})).__escaped=!0),e}],254834),e.s(["serializePayload",0,function(e){return btoa(encodeURIComponent(JSON.stringify(e)))}],412763)},853483,e=>{"use strict";e.s(["find",0,function(e,t){for(var r,n=0;n<e.length;n++)if(t(r=e[n],n,e))return r}])},105524,(e,t,r)=>{!function(n,i){"use strict";if("function"==typeof define&&define.amd){let n;void 0!==(n=i(e.r,r,t))&&e.v(n)}else t.exports?t.exports=i():n.log=i()}(e.e,function(){"use strict";var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"],i={},a=null;function o(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(t){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function c(){for(var r=this.getLevel(),i=0;i<n.length;i++){var a=n[i];this[a]=i<r?e:this.methodFactory(a,r,this.name)}if(this.log=this.debug,typeof console===t&&r<this.levels.SILENT)return"No console available for logging"}function u(e){return function(){typeof console!==t&&(c.call(this),this[e].apply(this,arguments))}}function l(n,i,a){var c;return"debug"===(c=n)&&(c="log"),typeof console!==t&&("trace"===c&&r?s:void 0!==console[c]?o(console,c):void 0!==console.log?o(console,"log"):e)||u.apply(this,arguments)}function f(e,r){var o,s,u,f=this,h="loglevel";function d(){var e;if(typeof window!==t&&h){try{e=window.localStorage[h]}catch(e){}if(typeof e===t)try{var r=window.document.cookie,n=encodeURIComponent(h),i=r.indexOf(n+"=");-1!==i&&(e=/^([^;]+)/.exec(r.slice(i+n.length+1))[1])}catch(e){}return void 0===f.levels[e]&&(e=void 0),e}}function p(e){var t=e;if("string"==typeof t&&void 0!==f.levels[t.toUpperCase()]&&(t=f.levels[t.toUpperCase()]),"number"==typeof t&&t>=0&&t<=f.levels.SILENT)return t;throw TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?h+=":"+e:"symbol"==typeof e&&(h=void 0),f.name=e,f.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},f.methodFactory=r||l,f.getLevel=function(){return null!=u?u:null!=s?s:o},f.setLevel=function(e,r){return u=p(e),!1!==r&&function(e){var r=(n[e]||"silent").toUpperCase();if(typeof window!==t&&h){try{window.localStorage[h]=r;return}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"="+r+";"}catch(e){}}}
1(u),c.call(f)},f.setDefaultLevel=function(e){s=p(e),d()||f.setLevel(e,!1)},f.resetLevel=function(){if(u=null,typeof window!==t&&h){try{window.localStorage.removeItem(h)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}c.call(f)},f.enableAll=function(e){f.setLevel(f.levels.TRACE,e)},f.disableAll=function(e){f.setLevel(f.levels.SILENT,e)},f.rebuild=function(){if(a!==f&&(o=p(a.getLevel())),c.call(f),a===f)for(var e in i)i[e].rebuild()},o=p(a?a.getLevel():"WARN");var m=d();null!=m&&(u=p(m)),c.call(f)}(a=new f).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw TypeError("You must supply a name when creating a logger.");var t=i[e];return t||(t=i[e]=new f(e,a.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return a.noConflict=function(){return typeof window!==t&&window.log===a&&(window.log=h),a},a.getLoggers=function(){return i},a.default=a,a})},290438,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(e){function t(t,r,n){var i=this.constructor,a=e.call(this,t)||this;return a.name=i.name,a.httpBody=r,a.httpStatus=n,Object.setPrototypeOf(a,i.prototype),a}return n.__extends(t,e),t}(Error)},721941,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t}(n.__importDefault(e.r(290438)).default)},352117,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t}(n.__importDefault(e.r(290438)).default)},463473,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t}(n.__importDefault(e.r(290438)).default)},270544,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t}(n.__importDefault(e.r(290438)).default)},305190,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t}(n.__importDefault(e.r(290438)).default)},882083,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t}(n.__importDefault(e.r(290438)).default)},765489,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t}(n.__importDefault(e.r(290438)).default)},99175,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n.__extends(t,e),t}(n.__importDefault(e.r(290438)).default)},595122,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627);r.default=function(e){function t(t,r,n){var i=e.call(this,t)||this;return i.importResults=r,i.payload=n,i}return n.__extends(t,e),t}(n.__importDefault(e.r(290438)).default)},760110,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ImportError=r.TypesenseError=r.ServerError=r.RequestUnauthorized=r.RequestMalformed=r.ObjectUnprocessable=r.ObjectNotFound=r.ObjectAlreadyExists=r.MissingConfigurationError=r.HTTPError=void 0;var n=e.r(824627);r.HTTPError=n.__importDefault(e.r(721941)).default,r.MissingConfigurationError=n.__importDefault(e.r(352117)).default,r.ObjectAlreadyExists=n.__importDefault(e.r(463473)).default,r.ObjectNotFound=n.__importDefault(e.r(270544)).default,r.ObjectUnprocessable=n.__importDefault(e.r(305190)).default,r.RequestMalformed=n.__importDefault(e.r(882083)).default,r.RequestUnauthorized=n.__importDefault(e.r(765489)).default,r.ServerError=n.__importDefault(e.r(99175)).default,r.ImportError=n.__importDefault(e.r(595122)).default,r.TypesenseError=n.__importDefault(e.r(290438)).default},124605,(e,t,r)=>{"use strict";
1Object.defineProperty(r,"__esModule",{value:!0});var n=e.r(824627),i=n.__importStar(e.r(105524)),a=e.r(760110);r.default=function(){function e(e){var t=this;this.nodes=e.nodes||[],this.nodes=this.nodes.map(function(e){return t.setDefaultPathInNode(e)}).map(function(e){return t.setDefaultPortInNode(e)}).map(function(e){return n.__assign({},e)}),null==e.randomizeNodes&&(e.randomizeNodes=!0),!0===e.randomizeNodes&&this.shuffleArray(this.nodes),this.nearestNode=e.nearestNode,this.nearestNode=this.setDefaultPathInNode(this.nearestNode),this.nearestNode=this.setDefaultPortInNode(this.nearestNode),this.connectionTimeoutSeconds=e.connectionTimeoutSeconds||e.timeoutSeconds||5,this.healthcheckIntervalSeconds=e.healthcheckIntervalSeconds||60,this.numRetries=(void 0!==e.numRetries&&e.numRetries>=0?e.numRetries:this.nodes.length+ +(null!=this.nearestNode))||3,this.retryIntervalSeconds=e.retryIntervalSeconds||.1,this.apiKey=e.apiKey,this.sendApiKeyAsQueryParam=e.sendApiKeyAsQueryParam,this.cacheSearchResultsForSeconds=e.cacheSearchResultsForSeconds||0,this.useServerSideSearchCache=e.useServerSideSearchCache||!1,this.axiosAdapter=e.axiosAdapter,this.logger=e.logger||i,this.logLevel=e.logLevel||"warn",this.logger.setLevel(this.logLevel),this.additionalHeaders=e.additionalHeaders,this.httpAgent=e.httpAgent,this.httpsAgent=e.httpsAgent,this.paramsSerializer=e.paramsSerializer,this.showDeprecationWarnings(e),this.validate()}return e.prototype.validate=function(){if(null==this.nodes||0===this.nodes.length||this.validateNodes())throw new a.MissingConfigurationError("Ensure that nodes[].protocol, nodes[].host and nodes[].port are set");if(null!=this.nearestNode&&this.isNodeMissingAnyParameters(this.nearestNode))throw new a.MissingConfigurationError("Ensure that nearestNodes.protocol, nearestNodes.host and nearestNodes.port are set");if(null==this.apiKey)throw new a.MissingConfigurationError("Ensure that apiKey is set");return!0},e.prototype.validateNodes=function(){var e=this;return this.nodes.some(function(t){return e.isNodeMissingAnyParameters(t)})},e.prototype.isNodeMissingAnyParameters=function(e){return!["protocol","host","port","path"].every(function(t){return e.hasOwnProperty(t)})&&null==e.url},e.prototype.setDefaultPathInNode=function(e){return null==e||e.hasOwnProperty("path")||(e.path=""),e},e.prototype.setDefaultPortInNode=function(e){if(null!=e&&!e.hasOwnProperty("port")&&e.hasOwnProperty("protocol"))switch(e.protocol){case"https":e.port=443;break;case"http":e.port=80}return e},e.prototype.showDeprecationWarnings=function(e){e.timeoutSeconds&&this.logger.warn("Deprecation warning: timeoutSeconds is now renamed to connectionTimeoutSeconds"),e.masterNode&&this.logger.warn("Deprecation warning: masterNode is now consolidated to nodes, starting with Typesense Server v0.12"),e.readReplicaNodes&&this.logger.warn("Deprecation warning: readReplicaNodes is now consolidated to nodes, starting with Typesense Server v0.12")},e.prototype.shuffleArray=function(e){for(var t,r=e.length-1;r>0;r--){var n=Math.floor(Math.random()*(r+1));t=[e[n],e[r]],e[r]=t[0],e[n]=t[1]}},e}()},186040,(e,t,r)=>{"use strict";var n=String.prototype.replace,i=/%20/g,a="RFC3986";t.exports={default:a,formatters:{RFC1738:function(e){return n.call(e,i,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:a}},251060,(e,t,r)=>{"use strict";var n=e.r(186040),i=Object.prototype.hasOwnProperty,a=Array.isArray,o=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(a(r)){for(var n=[],i=0;i<r.length;++i)void 0!==r[i]&&n.push(r[i]);t.obj[t.prop]=n}}},c=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r};t.exports={arrayToObject:c,assign:function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var i=t[n],a=i.obj[i.prop],o=Object.keys(a),c=0;c<o.length;++c){var u=o[c],l=a[u];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:a,prop:u}),r.push(l))}return s(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");
1if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,i,a){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===r)return escape(s).replace(/%u[0-9a-f]{4}/gi,function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"});for(var c="",u=0;u<s.length;++u){var l=s.charCodeAt(u);if(45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||a===n.RFC1738&&(40===l||41===l)){c+=s.charAt(u);continue}if(l<128){c+=o[l];continue}if(l<2048){c+=o[192|l>>6]+o[128|63&l];continue}if(l<55296||l>=57344){c+=o[224|l>>12]+o[128|l>>6&63]+o[128|63&l];continue}u+=1,c+=o[240|(l=65536+((1023&l)<<10|1023&s.charCodeAt(u)))>>18]+o[128|l>>12&63]+o[128|l>>6&63]+o[128|63&l]}return c},isBuffer:function(e){return!!e&&"object"==typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(a(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(a(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!i.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var o=t;return(a(t)&&!a(r)&&(o=c(t,n)),a(t)&&a(r))?(r.forEach(function(r,a){if(i.call(t,a)){var o=t[a];o&&"object"==typeof o&&r&&"object"==typeof r?t[a]=e(o,r,n):t.push(r)}else t[a]=r}),t):Object.keys(r).reduce(function(t,a){var o=r[a];return i.call(t,a)?t[a]=e(t[a],o,n):t[a]=o,t},o)}}},998189,(e,t,r)=>{"use strict";var n=e.r(251060),i=e.r(186040),a=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,c=String.prototype.split,u=Array.prototype.push,l=function(e,t){u.apply(e,s(t)?t:[t])},f=Date.prototype.toISOString,h=i.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,format:h,formatter:i.formatters[h],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},p=function e(t,r,i,a,o,u,f,h,p,m,g,y,v,b){var _,S,O=t;if("function"==typeof f?O=f(r,O):O instanceof Date?O=m(O):"comma"===i&&s(O)&&(O=n.maybeMap(O,function(e){return e instanceof Date?m(e):e})),null===O){if(a)return u&&!v?u(r,d.encoder,b,"key",g):r;O=""}if("string"==typeof(_=O)||"number"==typeof _||"boolean"==typeof _||"symbol"==typeof _||"bigint"==typeof _||n.isBuffer(O)){if(u){var R=v?r:u(r,d.encoder,b,"key",g);if("comma"===i&&v){for(var P=c.call(String(O),","),j="",w=0;w<P.length;++w)j+=(0===w?"":",")+y(u(P[w],d.encoder,b,"value",g));return[y(R)+"="+j]}return[y(R)+"="+y(u(O,d.encoder,b,"value",g))]}return[y(r)+"="+y(String(O))]}var x=[];if(void 0===O)return x;if("comma"===i&&s(O))S=[{value:O.length>0?O.join(",")||null:void 0}];else if(s(f))S=f;else{var E=Object.keys(O);S=h?E.sort(h):E}for(var C=0;C<S.length;++C){var T=S[C],F="object"==typeof T&&void 0!==T.value?T.value:O[T];o&&null===F||l(x,e(F,s(O)?"function"==typeof i?i(r,T):r:r+(p?"."+T:"["+T+"]"),i,a,o,u,f,h,p,m,g,y,v,b))}return x},m=function(e){if(!e)return d;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw TypeError("Encoder has to be a function.");var t=e.charset||d.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=i.default;if(void 0!==e.format){if(!a.call(i.formatters,e.format))throw TypeError("Unknown format option provided.");r=e.format}var n=i.formatters[r],o=d.filter;return("function"==typeof e.filter||s(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:d.addQueryPrefix,allowDots:void 0===e.allowDots?d.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:d.charsetSentinel,delimiter:void 0===e.delimiter?d.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:d.encode,encoder:"function"==typeof e.encoder?e.encoder:d.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:d.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:d.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:d.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:d.strictNullHandling}};t.exports=function(e,t){var r,n,i=e,a=m(t);"function"==typeof a.filter?i=(0,a.filter)("",i):s(a.filter)&&(r=a.filter);var c=[];if("object"!=typeof i||null===i)return"";n=t&&t.arrayFormat in o?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var u=o[n];r||(r=Object.keys(i)),a.sort&&r.sort(a.sort);for(var f=0;f<r.length;++f){var h=r[f];a.skipNulls&&null===i[h]||l(c,p(i[h],h,u,a.strictNullHandling,a.skipNulls,a.encode?a.encoder:null,a.filter,a.sort,a.allowDots,a.serializeDate,a.format,a.formatter,a.encodeValuesOnly,a.charset))}var d=c.join(a.delimiter),g=!0===a.addQueryPrefix?"?":"";return a.charsetSentinel&&("iso-8859-1"===a.charset?g+="utf8=%26%2310003%3B&":g+="utf8=%E2%9C%93&"),d.length>0?g+d:""}},797162,(e,t,r)=>{"use strict";var n=e.r(251060),i=Object.prototype.hasOwnProperty,a=Array.isArray,o={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:n.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t){var r={},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,u=t.parameterLimit===1/0?void 0:t.parameterLimit,l=c.split(t.delimiter,u),f=-1,h=t.charset;if(t.charsetSentinel)for(d=0;d<l.length;++d)0===l[d].indexOf("utf8=")&&("utf8=%E2%9C%93"===l[d]?h="utf-8":"utf8=%26%2310003%3B"===l[d]&&
1(h="iso-8859-1"),f=d,d=l.length);for(d=0;d<l.length;++d)if(d!==f){var d,p,m,g=l[d],y=g.indexOf("]="),v=-1===y?g.indexOf("="):y+1;-1===v?(p=t.decoder(g,o.decoder,h,"key"),m=t.strictNullHandling?null:""):(p=t.decoder(g.slice(0,v),o.decoder,h,"key"),m=n.maybeMap(s(g.slice(v+1),t),function(e){return t.decoder(e,o.decoder,h,"value")})),m&&t.interpretNumericEntities&&"iso-8859-1"===h&&(m=m.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})),g.indexOf("[]=")>-1&&(m=a(m)?[m]:m),i.call(r,p)?r[p]=n.combine(r[p],m):r[p]=m}return r},u=function(e,t,r,n){for(var i=n?t:s(t,r),a=e.length-1;a>=0;--a){var o,c=e[a];if("[]"===c&&r.parseArrays)o=[].concat(i);else{o=r.plainObjects?Object.create(null):{};var u="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,l=parseInt(u,10);r.parseArrays||""!==u?!isNaN(l)&&c!==u&&String(l)===u&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(o=[])[l]=i:"__proto__"!==u&&(o[u]=i):o={0:i}}i=o}return i},l=function(e,t,r,n){if(e){var a=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(a),c=s?a.slice(0,s.index):a,l=[];if(c){if(!r.plainObjects&&i.call(Object.prototype,c)&&!r.allowPrototypes)return;l.push(c)}for(var f=0;r.depth>0&&null!==(s=o.exec(a))&&f<r.depth;){if(f+=1,!r.plainObjects&&i.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;l.push(s[1])}return s&&l.push("["+a.slice(s.index)+"]"),u(l,t,r,n)}},f=function(e){if(!e)return o;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?o.charset:e.charset;return{allowDots:void 0===e.allowDots?o.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:o.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:o.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:o.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:o.comma,decoder:"function"==typeof e.decoder?e.decoder:o.decoder,delimiter:"string"==typeof e.delimiter||n.isRegExp(e.delimiter)?e.delimiter:o.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:o.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:o.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:o.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:o.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:o.strictNullHandling}};t.exports=function(e,t){var r=f(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var i="string"==typeof e?c(e,r):e,a=r.plainObjects?Object.create(null):{},o=Object.keys(i),s=0;s<o.length;++s){var u=o[s],h=l(u,i[u],r,"string"==typeof e);a=n.merge(a,h,r)}return n.compact(a)}},537539,(e,t,r)=>{"use strict";var n=e.r(998189),i=e.r(797162);t.exports={formats:e.r(186040),parse:i,stringify:n}},948259,318296,e=>{"use strict";var t=e.i(649463),r=e.i(620297),n=e.i(483363),i=e.i(883167),a=e.i(379359);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function c(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach(function(t){u(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function u(e,t,r){var n;return(n=function(e,t){if("object"!=o(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=o(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==o(n)?n:String(n))in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var l=(0,r.createDocumentationMessageGenerator)({name:"configure",connector:!0});function f(e,t){return e.setQueryParameters(Object.keys(t.searchParameters).reduce(function(e,t){return c(c({},e),{},u({},t,void 0))},{}))}let h=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.noop,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:a.noop;
1return function(a){if(!a||!(0,n.isPlainObject)(a.searchParameters))throw Error(l("The `searchParameters` option expects an object."));var o={};return{$$type:"ais.configure",init:function(t){var r=t.instantSearchInstance;e(c(c({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!0)},render:function(t){var r=t.instantSearchInstance;e(c(c({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!1)},dispose:function(e){var t=e.state;return r(),f(t,a)},getRenderState:function(e,r){var n,a=this.getWidgetRenderState(r);return c(c({},e),{},{configure:c(c({},a),{},{widgetParams:c(c({},a.widgetParams),{},{searchParameters:(0,i.mergeSearchParameters)(new t.default.SearchParameters(null==(n=e.configure)?void 0:n.widgetParams.searchParameters),new t.default.SearchParameters(a.widgetParams.searchParameters)).getQueryParams()})})})},getWidgetRenderState:function(e){var r=e.helper;return o.refine||(o.refine=function(e){var n=f(r.state,a),o=(0,i.mergeSearchParameters)(n,new t.default.SearchParameters(e));a.searchParameters=e,r.setState(o).search()}),{refine:o.refine,widgetParams:a}},getWidgetSearchParameters:function(e,r){var n=r.uiState;return(0,i.mergeSearchParameters)(e,new t.default.SearchParameters(c(c({},n.configure),a.searchParameters)))},getWidgetUiState:function(e){return c(c({},e),{},{configure:c(c({},e.configure),a.searchParameters)})}}}};var d=e.i(398040),p=e.i(41706);function m(e){var r,n,i;return new t.default.SearchResults(e,[{query:null!=(r=e.query)?r:"",page:null!=(n=e.page)?n:0,hitsPerPage:null!=(i=e.hitsPerPage)?i:20,hits:[],nbHits:0,nbPages:0,params:"",exhaustiveNbHits:!0,exhaustiveFacetsCount:!0,processingTimeMS:0,index:e.index}],{__isArtificial:!0})}function g(e){return(g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=g(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=g(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==g(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var b=e.i(1533);function _(e,t){if(!e)throw Error("Invariant failed")}var S=e.i(183060);function O(){var e=(0,d.useContext)(S.InstantSearchContext);return _(null!==e,"Hooks must be used inside the <InstantSearch> component.\n\nThey are not compatible with the `[email protected]` and `react-instantsearch-dom` packages, so make sure to use the <InstantSearch> component from `[email protected]`."),e}var R=e.i(38380),P=e.i(929361);function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function w(e){var t,r=function(e){if(Array.isArray(e))return e}(t=(0,d.useState)(function(){return e}))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,a,o=[],s=!0,c=!1;try{i=(t=t.call(e)).next,!1;for(;!(s=(r=i.call(t)).done)&&(o.push(r.value),2!==o.length);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return j(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return j(e,2)}}
1(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),n=r[0],i=r[1];return(0,p.dequal)(n,e)||i(e),n}var x=d.use,E="u">typeof window?d.useLayoutEffect:d.useEffect,C=e.i(524388);function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var F=["skipSuspense"],A=["instantSearchInstance","widgetParams"],N=["widgetParams"];function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?I(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=T(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=T(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==T(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function H(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function U(e){var t,r,n,i,a,o,s,c,u,l,f,h,g,y,S,j,T,I,U,L=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},M=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},q=M.skipSuspense,W=H(M,F),B=(0,R.useInstantSearchServerContext)(),Q=(0,P.useInstantSearchSSRContext)(),$=O(),V=(_(null!==(t=(0,d.useContext)(b.IndexContext)),"The <Index> component must be used within <InstantSearch>."),t),z=w(L),G=w(W),J=(0,d.useRef)(!0),K=(0,d.useRef)(null),X=(0,d.useRef)($.status),Y=(0,d.useMemo)(function(){return D(D({},e(function(e,t){if(t){J.current=!0;return}if(J.current){var r=e.instantSearchInstance,n=(e.widgetParams,H(e,A));(0,p.dequal)(n,K.current,function(e,t){return(null==e?void 0:e.constructor)===Function&&(null==t?void 0:t.constructor)===Function})&&r.status===X.current||(et(n),K.current=n,X.current=r.status)}},function(){J.current=!1})(z)),G)},[e,z,G]),Z=function(e){if(Array.isArray(e))return e}(r=(0,d.useState)(function(){if(Y.getWidgetRenderState){var e,t,r,n,i=V.getHelper(),a=V.getWidgetUiState({})[V.getIndexId()];i.state=(null==(n=Y.getWidgetSearchParameters)?void 0:n.call(Y,i.state,{uiState:a}))||i.state;var o=(e=V.getHelper(),t=V.getResults()||m(e.state),r=V.getScopedResults().map(function(e){var r=e.indexId===V.getIndexId()?t:m(e.helper.state);return v(v({},e),{},{results:e.results||r})}),{results:t,scopedResults:r,recommendResults:e.lastRecommendResults}),s=o.results,c=o.scopedResults,u=o.recommendResults,l=Y.getWidgetRenderState({helper:i,parent:V,instantSearchInstance:$,results:"recommend"===Y.dependsOn&&u&&Q?u[Q.recommendIdx.current++]:s,scopedResults:c,state:i.state,renderState:$.renderState,templatesConfig:$.templatesConfig,createURL:V.createURL,searchMetadata:{isSearchStalled:"stalled"===$.status},status:$.status,error:$.error});return l.widgetParams,H(l,N)}return{}}))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,a,o=[],s=!0,c=!1;try{i=(t=t.call(e)).next,!1;for(;!(s=(r=i.call(t)).done)&&(o.push(r.value),2!==o.length);s=!0);}catch(e){c=!0,n=e}
1finally{try{if(!s&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(r)||function(e){if(e){if("string"==typeof e)return k(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return k(e,2)}}(r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),ee=Z[0],et=Z[1];return s=(n={widget:Y,parentIndex:V,props:z,shouldSsr:!!B,skipSuspense:void 0!==q&&q}).widget,c=n.parentIndex,u=n.props,l=n.shouldSsr,f=n.skipSuspense,g=(h=(0,C.useRSCContext)()).waitForResultsRef,y=h.countRef,h.ignoreMultipleHooksWarning,S=(0,d.useRef)(u),(0,d.useEffect)(function(){S.current=u},[u]),j=(0,d.useRef)(s),(0,d.useEffect)(function(){j.current=s},[s]),T=(0,d.useRef)(null),I=l&&!c.getWidgets().includes(s),E(function(){var e=j.current;return T.current?(clearTimeout(T.current),(0,p.dequal)(u,S.current)||(c.removeWidgets([e]),c.addWidgets([s]))):l||c.addWidgets([s]),function(){T.current=setTimeout(function(){U._schedule(function(){U._preventWidgetCleanup||c.removeWidgets([e])})})}},[c,s,l,U=O(),u]),(I||(null==g||null==(i=g.current)?void 0:i.status)==="pending")&&c.addWidgets([s]),null!=g&&g.current&&!f&&(x(g.current),"ais.dynamicWidgets"!==s.$$type&&null!=(o=U.helper)&&o.lastResults&&x(g.current)),(null==g||null==(a=g.current)?void 0:a.status)==="fulfilled"&&(y.current+=1),ee}function L(e){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}e.s(["useConnector",0,U],318296),e.s(["Configure",0,function(e){return U(h,{searchParameters:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?M(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=L(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=L(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==L(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},e)},{$$widgetType:"ais.configure"}),null}],948259)},369893,527136,268889,813054,883658,e=>{"use strict";var t=e.i(254834);function r(e,t){if(void 0===e||"function"!=typeof e)throw Error("The render function is not valid (received type ".concat(Object.prototype.toString.call(e).slice(8,-1),").\n\n").concat(t))}e.s(["checkRendering",0,r],527136);var n=e.i(620297);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach(function(t){var n,a,o;n=e,a=t,o=r[t],(a=function(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:String(t)}(a))in n?Object.defineProperty(n,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[a]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEac
1h(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function u(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=s(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=s(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==s(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var l=e.i(412763);function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?f(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=p(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=p(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==p(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):f(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function p(e){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e){var t,r=e.helper,n=e.widgetType,i=(e.methodName,e.args),a=e.instantSearchInstance;if(1===i.length&&"object"===p(i[0]))return[i[0]];var o=function(e){if(Array.isArray(e))return e}(t=i[0].split(":"))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,a,o=[],s=!0,c=!1;try{i=(t=t.call(e)).next,!1;for(;!(s=(r=i.call(t)).done)&&(o.push(r.value),2!==o.length);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(t)||function(e){if(e){if("string"==typeof e)return d(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return d(e,2)}}(t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),s=o[0],c=o[1],u=i[1],l=i[2],f=i[3]||{};if(!u||("click"===s||"conversion"===s)&&!l)return[];var m=Array.isArray(u)?u:[u];if(0===m.length)return[];var g=m[0].__queryID,y=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20,r=[],n=0;n<Math.ceil(e.length/t);n++)r.push(e.slice(n*t,(n+1)*t));return r}(m),v=y.map(function(e){return e.map(function(e){return e.objectID})}),b=y.map(function(e){return e.map(function(e){return e.__position})});return"view"===s?"idle"!==a.status?[]:y.map(function(e,t){var i;return{insightsMethod:"viewedObjectIDs",widgetType:n,eventType:s,payload:h({eventName:l||"Hits Viewed",index:(null==(i=r.lastResults)?void 0:i.index)||r.state.index,objectIDs:v[t]},f),hits:e,eventModifier:c}}):"click"===s?y.map(function(e,t){var i;return{insightsMethod:"clickedObjectIDsAfterSearch",widgetType:n,eventType:s,payload:h({eventName:l||"Hit Clicked",index:(null==(i=r.lastResults)?void 0:i.index)||r.state.index,queryID:g,objectIDs:v[t],positions:b[t]},f),hits:e,eventModifier:c}}):"conversion"===s?y.map(function(e,t){var i;return{insightsMethod:"convertedObjectIDsAfterSearch",widgetType:n,eventType:s,payload:h({eventName:l||"Hit Converted",index:(null==(i=r.lastResults)?void 0:i.index)||r.state.index,queryID:g,objectIDs:v[t]},f),hits:e,eventModifier:c}}):[]}var g=e.i(379359);function y(e){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?v(Object(r),!0).forEach(function(t){_(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function _(e,t,r){var n;return(n=function(e,t){if("object"!=y(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=y(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==y(n)?n:String(n))in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var S=(0,n.createDocumentationMessageGenerator)({name:"hits",connector:!0});let O=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.noop;return r(e,S()),function(r){var i,a,s=r||{},c=s.escapeHTML,f=void 0===c||c,h=s.transformItems,d=void 0===h?function(e){return e}:h;return{$$type:"ais.hits",init:function(t){e(b(b({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){var r=this.getWidgetRenderState(t);e(b(b({},r),{},{instantSearchInstance:t.instantSearchInstance}),!1),r.sendEvent("view:internal",r.items)},getRenderState:function(e,t){return b(b({},e),{},{hits:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var n,s,c,h,p,g,y,v,b,_,S,O,R,P,j,w,x,E,C=e.results,T=e.helper,F=e.instantSearchInstance;if(i||(s=(n={instantSearchInstance:F,helper:T,widgetType:this.$$type}).instantSearchInstance,c=n.helper,h=n.widgetType,p={},g=void 0,i=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];m({widgetType:h,helper:c,methodName:"sendEvent",args:t,instantSearchInstance:s}).forEach(function(e){"click"===e.eventType&&"internal"===e.eventModifier&&p[e.eventType]||(p[e.eventType]=!0,s.sendEventToInsights(e))}),clearTimeout(g),g=setTimeout(function(){p={}},0)}),a||(v=(y={helper:T,widgetType:this.$$type,instantSearchInstance:F}).helper,b=y.widgetType,_=y.instantSearchInstance,a=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=m({widgetType:b,helper:v,methodName:"bindEvent",args:t,instantSearchInstance:_});return n.length?"data-insights-event=".concat((0,l.serializePayload)(n)):""}),!C)return{hits:[],items:[],results:void 0,banner:void 0,sendEvent:i,bindEvent:a,widgetParams:r};f&&C.hits.length>0&&(C.hits=(0,t.escapeHits)(C.hits));var A=d((S=C.hits,O=C.page,R=C.hitsPerPage,P=S.map(function(e,t){return o(o({},e),{},{__position:R*O+t+1})}),(j=C.queryID)?P.map(function(e){return u(u({},e),{},{__queryID:j})}):P),{results:C}),N=null==(w=C.renderingContent)||null==(x=w.widgets)||null==(E=x.banners)?void 0:E[0];return{hits:A,items:A,results:C,banner:N,sendEvent:i,bindEvent:a,widgetParams:r}},dispose:function(e){var r=e.state;return(n(),f)?r.setQueryParameters(Object.keys(t.TAG_PLACEHOLDER).reduce(function(e,t){return b(b({},e),{},_({},t,void 0))},{})):r},getWidgetSearchParameters:function(e,r){return f?e.setQueryParameters(t.TAG_PLACEHOLDER):e}}}};var R=e.i(318296);function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function j(e){var t,r=e.start,n=void 0===r?0:r,i=e.end,a=e.step,o=void 0===a?1:a,s=0===o?1:o;return((function(e){if(Array.isArray(e))return P(e)})(t=Array(Math.round((i-n)/s)))||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e){if(e){if("string"==typeof e)return P(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return P(e,void 0)}}(t)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(e,t){return n+t*s})}function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.s(["useHits",0,function(e,t){return(0,R.useConnector)(O,e,t)}],369893);function x(e,t,r){return(t=E(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E(e){var t=function(e,t){if("object"!=w(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=w(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==w(t)?t:String(t)}var C=function(){var e;function t(e){if(!(this instanceof t))throw TypeError("Cannot call a class as a function");x(this,"currentPage",void 0),x(this,"total",void 0),x(this,"padding",void 0),this.currentPage=e.currentPage,this.total=e.total,this.padding=e.padding}return e=[{key:"pages",value:function(){var e=this.total,t=this.currentPage,r=this.padding;if(0===e)return[0];var n=this.nbPagesDisplayed(r,e);if(n===e)return j({end:e});var i=this.calculatePaddingLeft(t,r,e,n),a=n-i;return j({start:t-i,end:t+a})}},{key:"nbPagesDisplayed",value:function(e,t){return Math.min(2*e+1,t)}},{key:"calculatePaddingLeft",value:function(e,t,r,n){return e<=t?e:e>=r-t?n-(r-e):t}},{key:"isLastPage",value:function(){return this.currentPage>=this.total-1}},{key:"isFirstPage",value:function(){return this.currentPage<=0}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,E(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}();function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function F(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?F(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=T(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=T(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==T(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var N=(0,n.createDocumentationMessageGenerator)({name:"pagination",connector:!0});let k=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g.noop;return r(e,N()),function(r){var n=r||{},i=n.totalPages,a=n.padding,o=new C({currentPage:0,total:0,padding:void 0===a?3:a}),s={};return{$$type:"ais.pagination",init:function(t){var r=t.instantSearchInstance;e(A(A({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!0)},render:function(t){var r=t.instantSearchInstance;e(A(A({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!1)},dispose:function(e){var r=e.state;return t(),r.setQueryParameter("page",void 0)},getWidgetUiState:function(e,t){var r=t.searchParameters.page||0;return r?A(A({},e),{},{page:r+1}):e},getWidgetSearchParameters:function(e,t){var r=t.uiState,n=r.page?r.page-1:0;return e.setQueryParameter("page",n)},getWidgetRenderState:function(e){var t,n=e.results,a=e.helper,c=e.state,u=e.createURL;s.refine||(s.refine=function(e){a.setPage(e),a.search()}),s.createURL||(s.createURL=function(e){return u(function(t){return A(A({},t),{},{page:e+1})})});var l=c.page||0,f=(t=(n||{nbPages:0}).nbPages,void 0!==i?Math.min(i,t):t);return o.currentPage=l,o.total=f,{createURL:s.createURL,refine:s.refine,canRefine:f>1,currentRefinement:l,nbHits:(null==n?void 0:n.nbHits)||0,nbPages:f,pages:n?o.pages():[],isFirstPage:o.isFirstPage(),isLastPage:o.isLastPage(),widgetParams:r}},getRenderState:function(e,t){return A(A({},e),{},{pagination:this.getWidgetRenderState(t)})}}}};e.s(["usePagination",0,function(e,t){return(0,R.useConnector)(k,e,t)}],268889);var I=e.i(226132),D=e.i(565319);let H=({className:e,...t})=>(0,I.jsx)("nav",{...t,"aria-label":"pagination",className:(0,D.cn)("flex justify-center self-stretch",e),role:"navigation"});var U=e.i(398040);let L=(0,U.forwardRef)(({className:e,...t},r)=>(0,I.jsx)("ul",{...t,className:(0,D.cn)("flex flex-row items-center",e),ref:r})),M=({className:e,...t})=>(0,I.jsxs)("span",{...t,"aria-hidden":!0,className:(0,D.cn)("size-12 p-4 text-offNoir/40",e),children:[(0,I.jsx)("span",{children:"…"}),(0,I.jsx)("span",{className:"sr-only",children:"More pages"})]}),q=(0,U.forwardRef)(({className:e,...t},r)=>(0,I.jsx)("li",{...t,className:e,ref:r})),W=({children:e,className:t,isActive:r,...n})=>(0,I.jsx)("a",{...n,"aria-current":r?"page":void 0,className:(0,D.cn)("flex size-12 items-center justify-center rounded-[0.4rem] p-4 text-label text-offNoir/40","transition-all duration-200 hover:bg-noir/[0.02] hover:text-offNoirHover",r&&"bg-noir/[0.03] text-offNoir",t),children:e});var B=e.i(637531);let Q=({className:e,t,...r})=>(0,I.jsxs)("a",{...r,"aria-label":"Go to next page",className:(0,D.cn)("group flex items-center gap-[0.6rem]",e),role:"button",children:[(0,I.jsx)("span",{className:"text-label uppercase text-blue/70 underline decoration-teal underline-offset-[0.25em] transition-colors duration-200 group-hover:text-tealHover group-hover:decoration-tealHover",children:t?t("next"):"Next"}),(0,I.jsx)(B.Icon,{className:"size-[1.3rem] shrink-0 text-teal group-hover:text-tealHover rtl:rotate-180",name:"ArrowForwardCircled"})]}),$=({className:e,t,...r})=>(0,I.jsxs)("a",{...r,"aria-label":"Go to previous page",className:(0,D.cn)("group flex items-center gap-[0.6rem]",e),role:"button",children:[(0,I.jsx)(B.Icon,{className:"size-[1.3rem] shrink-0 text-teal group-hover:text-tealHover rtl:rotate-180",name:"ArrowBackwardCircled"}),(0,I.jsx)("span",{className:"text-label uppercase text-blue/70 underline decoration-teal underline-offset-[0.25em] transition-colors duration-200 group-hover:text-tealHover group-hover:decoration-tealHover",children:t?t("previous"):"Prev"})]});e.s(["generatePagination",0,function({currentPage:e,maxVisiblePages:t=5,nextButtonProps:r={},onNextClick:n,onPageClick:i,onPreviousClick:a,onScrollToTop:o,previousButtonProps:s={},t:c,totalPages:u}){if(u<=1)return null;let l=[],f=e+1;if(u>t){let e=Math.max(f-1,1),t=Math.min(f+1,u),r=e>2,n=t<u-2;l.push((0,I.jsx)(q,{children:(0,I.jsx)(W,{href:"#",isActive:1===f,onClick:e=>{e.preventDefault(),i(0),o?.()},children:"1"})},1)),r&&l.push((0,I.jsx)(q,{children:(0,I.jsx)(M,{})},"left-ellipsis"));for(let r=e;r<=t;r++)1!==r&&r!==u&&l.push((0,I.jsx)(q,{children:(0,I.jsx)(W,{href:"#",isActive:r===f,onClick:e=>{e.preventDefault(),i(r-1),o?.()},children:r})},r));n&&l.push((0,I.jsx)(q,{children:(0,I.jsx)(M,{})},"right-ellipsis")),u>1&&l.push((0,I.jsx)(q,{children:(0,I.jsx)(W,{href:"#",isActive:u===f,onClick:e=>{e.preventDefault(),i(u-1),o?.()},children:u})},u))}else for(let e=1;e<=u;e++)l.push((0,I.jsx)(q,{children:(0,I.jsx)(W,{href:"#",isActive:e===f,onClick:t=>{t.preventDefault(),i(e-1),o?.()},children:e})},e));let h=e===u-1;return(0,I.jsx)(H,{children:(0,I.jsxs)(L,{children:[0!==e&&(0,I.jsx)(q,{children:(0,I.jsx)($,{className:(0,D.cn)("mr-[2.4rem] flex items-center gap-[0.8rem] font-medium text-tealActive transition-colors hover:text-tealActive/80",s.className),href:"#",onClick:e=>{e.preventDefault(),a(),o?.()},t:c,tabIndex:s.tabIndex??0})}),l,!h&&(0,I.jsx)(q,{children:(0,I.jsx)(Q,{className:(0,D.cn)("ml-[2.4rem] flex items-center gap-[0.8rem] font-medium text-tealActive transition-colors hover:text-tealActive/80",r.className),href:"#",onClick:e=>{e.preventDefault(),n(),o?.()},t:c,tabIndex:r.tabIndex??0})})]})})}],813054),e.s([],883658)},1533,183060,379359,620297,883167,483363,41706,38380,929361,524388,e=>{"use strict";var t=e.i(398040),r=(0,t.createContext)(null);e.s(["IndexContext",0,r],1533);var n=(0,t.createContext)(null);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.s(["InstantSearchContext",0,n],183060),e.s(["noop",0,function(){}],379359),e.s(["createDocumentationMessageGenerator",0,function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];var n=t.map(function(e){var t;return["https://www.algolia.com/doc/api-reference/widgets/",e.name,"/js/",void 0!==(t=e.connector)&&t?"#connector":""].join("")}).join(", ");return function(e){return[e,"See documentation: ".concat(n)].filter(
1Boolean).join("\n\n")}}],620297);var a=["facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements","ruleContexts"];function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach(function(t){var n,a,o;n=e,a=t,o=r[t],(a=function(e){var t=function(e,t){if("object"!=i(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=i(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==i(t)?t:String(t)}(a))in n?Object.defineProperty(n,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[a]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var c=function(e,t){t.facets,t.disjunctiveFacets,t.facetsRefinements,t.facetsExcludes,t.disjunctiveFacetsRefinements,t.numericRefinements,t.tagRefinements,t.hierarchicalFacets,t.hierarchicalFacetsRefinements,t.ruleContexts;var r=function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(t,a);return e.setQueryParameters(r)},u=function(e,t){var r=[].concat(e.ruleContexts).concat(t.ruleContexts).filter(Boolean).filter(function(e,t,r){return r.indexOf(e)===t});return r.length>0?e.setQueryParameters({ruleContexts:r}):e};function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e.s(["mergeSearchParameters",0,function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce(function(e,t){var r,n,i,a,o,l,f,h;return c((h=u((r=e.setQueryParameters({hierarchicalFacetsRefinements:s(s({},e.hierarchicalFacetsRefinements),t.hierarchicalFacetsRefinements)}),n=r.setQueryParameters({hierarchicalFacets:t.hierarchicalFacets.reduce(function(e,t){var r=function(e,t){if(!Array.isArray(e))return -1;for(var r=0;r<e.length;r++)if(t(e[r]))return r;return -1}(e,function(e){return e.name===t.name});if(-1===r)return e.concat(t);var n=e.slice();return n.splice(r,1,t),n},r.hierarchicalFacets)}),i=t.tagRefinements.reduce(function(e,t){return e.addTagRefinement(t)},n),a=i.setQueryParameters({numericRefinements:s(s({},i.numericRefinements),t.numericRefinements)}),o=a.setQueryParameters({disjunctiveFacetsRefinements:s(s({},a.disjunctiveFacetsRefinements),t.disjunctiveFacetsRefinements)}),l=o.setQueryParameters({facetsExcludes:s(s({},o.facetsExcludes),t.facetsExcludes)}),f=l.setQueryParameters({facetsRefinements:s(s({},l.facetsRefinements),t.facetsRefinements)}),t.disjunctiveFacets.reduce(function(e,t){return e.addDisjunctiveFacet(t)},f)),t),t.facets.reduce(function(e,t){return e.addFacet(t)},h)),t)})}],883167),e.s(["isPlainObject",0,function(e){if("object"!==l(e)||null===e||"[object Object]"!==(null===e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)))return!1;if(null===Object.getPrototypeOf(e))return!0;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}],483363);var h=Object.prototype.hasOwnProperty;e.s(["dequal",0,function e(t,r,n){var i,a;if(null!=n&&n(t,r)||t===r)return!0;
1if(t&&r&&(i=t.constructor)===r.constructor){if(i===Date)return t.getTime()===r.getTime();if(i===RegExp)return t.toString()===r.toString();if(i===Array){if((a=t.length)===r.length)for(;a--&&e(t[a],r[a],n););return -1===a}if(!i||"object"===f(t)){for(i in a=0,t)if(h.call(t,i)&&++a&&!h.call(r,i)||!(i in r)||!e(t[i],r[i],n))return!1;return Object.keys(r).length===a}}return t!=t&&r!=r}],41706);var d=(0,t.createContext)(null);e.s(["useInstantSearchServerContext",0,function(){return(0,t.useContext)(d)}],38380);var p=(0,t.createContext)(null);e.s(["useInstantSearchSSRContext",0,function(){return(0,t.useContext)(p)}],929361);var m=(0,t.createContext)({countRef:{current:0},waitForResultsRef:null,ignoreMultipleHooksWarning:!1});e.s(["useRSCContext",0,function(){return(0,t.useContext)(m)}],524388)},212380,(e,t,r)=>{"use strict";var n=e.r(398040),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=n.useState,o=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var l="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=a({inst:{value:r,getSnapshot:t}}),i=n[0].inst,l=n[1];return s(function(){i.value=r,i.getSnapshot=t,u(i)&&l({inst:i})},[e,r,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(r),r};r.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:l},260449,(e,t,r)=>{"use strict";e.i(943915),t.exports=e.r(212380)},389403,e=>{"use strict";var t=e.i(226132),r=e.i(398040),n=e.i(1533),i=e.i(183060),a=e.i(943915),o=e.i(106824),s=e.i(649463);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var u=e.i(379359);function l(e){if(e.appId&&e.apiKey)return[e.appId,e.apiKey];if(!e.transporter)return[e.applicationID,e.apiKey];var t=e.transporter,r=t.headers||t.baseHeaders,n=t.queryParameters||t.baseQueryParameters,i="x-algolia-application-id",a="x-algolia-api-key";return[r[i]||n[i],r[a]||n[a]]}var f=e.i(853483);function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{fallback:function(){}},r=t.fallback;return"u"<typeof window?r():e({window:window})}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function m(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=d(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=d(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==d(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(e,t)||y(e,t)||function(){throw TypeError("Invalid attempt to de
1structure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){if(e){if("string"==typeof e)return v(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return v(e,t)}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var b="2.17.2",_="https://cdn.jsdelivr.net/npm/search-insights@".concat(b,"/dist/search-insights.min.js");function S(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.insightsClient,r=e.insightsInitParams,n=e.onEvent,i=e.$$internal,a=void 0!==i&&i,o=e.$$automatic,s=void 0!==o&&o,d=t;t||null===t||h(function(e){var t=e.window,r=t.AlgoliaAnalyticsObject||"aa";"string"==typeof r&&(d=t[r]),d||(t.AlgoliaAnalyticsObject=r,t[r]||(t[r]=function(){t[r].queue||(t[r].queue=[]);for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];t[r].queue.push(n)},t[r].version=b,t[r].shouldAddScript=!0),d=t[r])});var p=d||u.noop;return function(e){var t,i,o=e.instantSearchInstance,h=o.middleware.filter(function(e){return"ais.insights"===e.instance.$$type&&e.instance.$$internal}).map(function(e){return e.creator});o.unuse.apply(o,function(e){if(Array.isArray(e))return v(e)}(h)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(h)||y(h)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());var d=g(l(o.client),2),b=d[0],S=d[1],P=void 0,j=void 0,w=void 0,x=p.queue;if(Array.isArray(x)){var E=["setUserToken","init"].map(function(e){var t=(0,f.find)(x.slice().reverse(),function(t){return g(t,1)[0]===e})||[];return g(t,2)[1]}),C=g(E,2);j=C[0],P=C[1]}return p("getUserToken",null,function(e,t){w=R(t)}),(r||!O(p))&&p("init",m({appId:b,apiKey:S,partial:!0},r)),{$$type:"ais.insights",$$internal:a,$$automatic:s,onStateChange:function(){},subscribe:function(){if(p.shouldAddScript){var e="[insights middleware]: could not load search-insights.js. Please load it manually following https://alg.li/insights-init";try{var t=document.createElement("script");t.async=!0,t.src=_,t.onerror=function(){o.emit("error",Error(e))},document.body.appendChild(t),p.shouldAddScript=!1}catch(t){p.shouldAddScript=!1,o.emit("error",Error(e))}}},started:function(){p("addAlgoliaAgent","insights-middleware"),i=o.mainHelper;var e,u,h,d,y,v,b,_,S,x,E,C,T,F=p.queue;if(Array.isArray(F)){var A=["setUserToken","init"].map(function(e){var t=(0,f.find)(F.slice().reverse(),function(t){return g(t,1)[0]===e})||[];return g(t,2)[1]}),N=g(A,2);j=N[0],P=N[1]}d=(null==(u=(e=o)._initialResults)||null==(h=u[e.indexName])?void 0:h.state)||{},y=e.mainHelper.state,t={userToken:d.userToken||y.userToken,clickAnalytics:d.clickAnalytics||y.clickAnalytics},s||i.overrideStateWithoutTriggeringChangeEvent(m(m({},i.state),{},{clickAnalytics:!0})),a||o.scheduleSearch();var k=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=R(e);if(r){var n=i.state.userToken;t?a():setTimeout(a,0)}function a(){i.overrideStateWithoutTriggeringChangeEvent(m(m({},i.state),{},{userToken:r})),n&&n!==e&&o.scheduleSearch()}};function I(e){k(e,!0),p("setUserToken",e)}var D=void 0,H=function(){if(("u"<typeof document?"undefined":c(document))==="object"&&"string"==typeof document.cookie)for(var e="".concat("_ALGOLIA","="),t=document.cookie.split(";"),r=0;r<t.length;r++){for(var n=t[r];" "===n.charAt(0);)n=n.substring(1);if(0===n.indexOf(e))return n.substring(e.length,n.length)}}();D=H||"anonymous-".concat("xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}));var U=t.userToken;null!=r&&r.userToken&&(x=r.userToken),x?I(x):U?I(U):w?I(w):j?I(j):D&&(I(D),(null!=r&&r.useCookie||null!=(E=P)&&E.useCookie)&&(v=D,b=(null==r?void 0:r.cookieDuration)||(null==(C=P)?void 0:C.cookieDuration),(_=new Date).setTime(_.getTime()+(b||15552e6)),S="expires=".concat(_.toUTCString()),document.cookie="_ALGOLIA=".concat(v,";").concat(S,";path=/"))),p("onUserTokenChange",function(e){return k(e,!0)},{immediate:!0});var L=p;O(p)&&(L=function(e,t){var r=g(l(o.client),2);return p(e,t,{headers:{"X-Algolia-Application-Id":r[0],"X-Algolia-API-Key":r[1]}})});var M=new Set;o.mainHelper.derivedHelpers[0].on("result",function(e){var t=e.results;t&&(!t.queryID||t.queryID!==T)&&(T=t.queryID,M.clear())}),o.sendEventToInsights=function(e){if(n)n(e,L);else if(e.insightsMethod){if("viewedObjectIDs"===e.insightsMethod){var t=e.payload,r=t.objectIDs.filter(function(e){return!M.has(e)});if(0===r.length)return;r.forEach(function(e){return M.add(e)}),t.objectIDs=r}e.payload.algoliaSource=["instantsearch"],s&&e.payload.algoliaSource.pu
1sh("instantsearch-automatic"),"internal"===e.eventModifier&&e.payload.algoliaSource.push("instantsearch-internal"),L(e.insightsMethod,e.payload)}}},unsubscribe:function(){p("onUserTokenChange",void 0),o.sendEventToInsights=u.noop,i&&t&&(i.overrideStateWithoutTriggeringChangeEvent(m(m({},i.state),t)),o.scheduleSearch())}}}}function O(e){var t=g((e.version||"").split(".").map(Number),2),r=t[0],n=t[1];return r>=3||2===r&&n>=6||1===r&&n>=10}function R(e){if(e)return"number"==typeof e?e.toString():e}function P(e,t,r){var n=t.getHelper();return{uiState:r,helper:n,parent:t,instantSearchInstance:e,state:n.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,scopedResults:[],searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}function j(e,t,r){var n=t.getResultsForWidget(r),i=t.getHelper();return{helper:i,parent:t,instantSearchInstance:e,results:n,scopedResults:t.getScopedResults(),state:n&&"_state"in n?n._state:i.state,renderState:e.renderState,templatesConfig:e.templatesConfig,createURL:t.createURL,searchMetadata:{isSearchStalled:"stalled"===e.status},status:e.status,error:e.error}}var w=e.i(537539);function x(e){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function E(e,t,r){return(t=C(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function C(e){var t=function(e,t){if("object"!=x(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=x(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==x(t)?t:String(t)}var T=function(e){e&&(window.document.title=e)},F=function(){var e;function t(e){var r=this,n=e.windowTitle,i=e.writeDelay,a=e.createURL,o=e.parseURL,s=e.getLocation,c=e.start,u=e.dispose,l=e.push,f=e.cleanUrlOnDispose;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");E(this,"$$type","ais.browser"),E(this,"windowTitle",void 0),E(this,"writeDelay",void 0),E(this,"_createURL",void 0),E(this,"parseURL",void 0),E(this,"getLocation",void 0),E(this,"writeTimer",void 0),E(this,"_onPopState",void 0),E(this,"inPopState",!1),E(this,"isDisposed",!1),E(this,"latestAcknowledgedHistory",0),E(this,"_start",void 0),E(this,"_dispose",void 0),E(this,"_push",void 0),E(this,"_cleanUrlOnDispose",void 0),this.windowTitle=n,this.writeTimer=void 0,this.writeDelay=void 0===i?400:i,this._createURL=a,this.parseURL=o,this.getLocation=s,this._start=c,this._dispose=u,this._push=l,this._cleanUrlOnDispose=void 0===f||f,h(function(e){var t=e.window;T(r.windowTitle&&r.windowTitle(r.read())),r.latestAcknowledgedHistory=t.history.length})}return e=[{key:"read",value:function(){return this.parseURL({qsModule:w.default,location:this.getLocation()})}},{key:"write",value:function(e){var t=this;h(function(r){var n=r.window,i=t.createURL(e),a=t.windowTitle&&t.windowTitle(e);t.writeTimer&&clearTimeout(t.writeTimer),t.writeTimer=setTimeout(function(){T(a),t.shouldWrite(i)&&(t._push?t._push(i):n.history.pushState(e,a||"",i),t.latestAcknowledgedHistory=n.history.length),t.inPopState=!1,t.writeTimer=void 0},t.writeDelay)})}},{key:"onUpdate",value:function(e){var t=this;this._start&&this._start(function(){e(t.read())}),this._onPopState=function(){t.writeTimer&&(clearTimeout(t.writeTimer),t.writeTimer=void 0),t.inPopState=!0,e(t.read())},h(function(e){e.window.addEventListener("popstate",t._onPopState)})}},{key:"createURL",value:function(e){return this._createURL({qsModule:w.default,routeState:e,location:this.getLocation()})}},{key:"dispose",value:function(){var e=this;this._dispose&&this._dispose(),this.isDisposed=!0,h(function(t){var r=t.window;e._onPopState&&r.removeEventListener("popstate",e._onPopState)}),this.writeTimer&&clearTimeout(this.writeTimer),this._cleanUrlOnDispose&&this.write({})}},{key:"start",value:function(){this.isDisposed=!1}},{key:"shouldWrite",value:function(e){var t=this;return h(function(r){var n=r.window;if(t.isDisposed&&!t._cleanUrlOnDispose)return!1;var i=!(t.isDisposed&&t.latestAcknowledgedHistory!==n.history.length);return!t.inPopState&&i&&e!==n.location.href})}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,C(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}();function A(e){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var N=["configure"];function k(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?k(Object(r),!0).forEach(function(t){D(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function D(e,t,r){var n;return(n=function(e,t){if("object"!=A(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=A(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==A(n)?n:String(n))in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function H(e){return e.configure,function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,N)}function U(e){return e!==Object(e)}function L(e){return(L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function M(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?M(Object(r),!0).forEach(function(t){W(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):M(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function W(e,t,r){var n;return(n=function(e,t){if("object"!=L(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=L(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==L(n)?n:String(n))in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var B=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.router,r=void 0===t?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.createURL,r=void 0===t?function(e){var t=e.qsModule,r=e.routeState,n=e.location,i=n.protocol,a=n.hostname,o=n.port,s=void 0===o?"":o,c=n.pathname,u=n.hash,l=t.stringify(r),f=""===s?"":":".concat(s);return l?"".concat(i,"//").concat(a).concat(f).concat(c,"?").concat(l).concat(u):"".concat(i,"//").concat(a).concat(f).concat(c).concat(u)}:t,n=e.parseURL,i=void 0===n?function(e){var t=e.qsModule,r=e.location;return t.parse(r.search.slice(1),{arrayLimit:99})}:n,a=e.writeDelay,o=e.windowTitle,s=e.getLocation;return new F({createURL:r,parseURL:i,writeDelay:void 0===a?400:a,windowTitle:o,getLocation:void 0===s?function(){return h(function(e){return e.window.location},{fallback:function(){throw Error("You need to provide `getLocation` to the `history` router in environments where `window` does not exist.")}})}:s,start:e.start,dispose:e.dispose,push:e.push,cleanUrlOnDispose:e.cleanUrlOnDispose})}():t,n=e.stateMapping,i=void 0===n?{$$type:"ais.simple",stateToRoute:function(e){return Object.keys(e).reduce(function(t,r){return I(I({},t),{},D({},r,H(e[r])))},{})},routeToState:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce(function(t,r){return I(I({},t),{},D({},r,H(e[r])))},{})}}:n,a=e.$$internal,o=void 0!==a&&a;return function(e){var t=e.instantSearchInstance;t._createURL=function(e){var n=0===t.mainIndex.getWidgets().length?t._initialUiState:t.mainIndex.getWidgetUiState({}),a=Object.keys(e).reduce(function(t,r){return q(q({},t),{},W({},r,e[r]))},n),o=i.stateToRoute(a);return r.createURL(o)};var n=void 0,a=t._initialUiState;return{$$type:"ais.router({router:".concat(r.$$type||"__unknown__",", stateMapping:").concat(i.$$type||"__unknown__","})"),$$internal:o,onStateChange:function(e){var t=e.uiState,a=i.stateToRoute(t);(void 0===n||!function e(t,r){if(t===r)return!0;
1if(U(t)||U(r)||"function"==typeof t||"function"==typeof r)return t===r;if(Object.keys(t).length!==Object.keys(r).length)return!1;for(var n=0,i=Object.keys(t);n<i.length;n++){var a=i[n];if(!(a in r)||!e(t[a],r[a]))return!1}return!0}(n,a))&&(r.write(a),n=a)},subscribe:function(){t._initialUiState=q(q({},a),i.routeToState(r.read())),r.onUpdate(function(e){t.mainIndex.getWidgets().length>0&&t.setUiState(i.routeToState(e))})},started:function(){var e;null==(e=r.start)||e.call(r)},unsubscribe:function(){r.dispose()}}}},Q=e.i(620297),$=e.i(883167);function V(e){return"ais.index"===e.$$type}var z=0;function G(e){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var J=["initialSearchParameters"],K=["initialRecommendParameters"];function X(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?X(Object(r),!0).forEach(function(t){Z(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):X(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function Z(e,t,r){var n;return(n=function(e,t){if("object"!=G(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=G(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==G(n)?n:String(n))in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ee(e){return function(e){if(Array.isArray(e))return et(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e){if(e){if("string"==typeof e)return et(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return et(e,void 0)}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function et(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function er(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var en=(0,Q.createDocumentationMessageGenerator)({name:"index-widget"});function ei(e,t){var r=t.state,n=t.recommendState,i=t.isPageReset,a=t._uiState;r!==e.state&&(e.state=r,e.emit("change",{state:e.state,results:e.lastResults,isPageReset:i,_uiState:a})),n!==e.recommendState&&(e.recommendState=n)}function ea(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return e.reduce(function(e,r){return!V(r)&&(r.getWidgetUiState||r.getWidgetState)?r.getWidgetUiState?r.getWidgetUiState(e,t):r.getWidgetState(e,t):e},r)}function eo(e,t){var r=t.initialSearchParameters,n=er(t,J);return e.reduce(function(e,t){return!t.getWidgetSearchParameters||V(t)?e:"search"===t.dependsOn&&t.getWidgetParameters?t.getWidgetParameters(e,n):t.getWidgetSearchParameters(e,n)},r)}function es(e,t){var r=t.initialRecommendParameters,n=er(t,K);return e.reduce(function(e,t){return!V(t)&&"recommend"===t.dependsOn&&t.getWidgetParameters?t.getWidgetParameters(e,n):e},r)}let ec=function(e){if(void 0===e||void 0===e.indexName&&!e.EXPERIMENTAL_isolated)throw Error(en("The `indexName` option is required."));var t=e.indexName,r=void 0===t?"":t,n=e.indexId,i=void 0===n?r:n,a=e.EXPERIMENTAL_isolated,o=void 0!==a&&a,c=[],u={},l=null,f=null,h=null,d=null,p=null,m=!1,g=!1;return{$$type:"ais.index",$$widgetType:"ais.index",_isolated:o,getIndexName:function(){return r},getIndexId:function(){return i},getHelper:function(){return h},getResults:function(){var e;return null!=(e=d)&&e.lastResults?(d.lastResults._state=h.state,d.lastResults):null},getResultsForWidget:function(e){var t;return"recommend"!==e.dependsOn||V(e)||void 0===e.$$id?this.getResults():null!=(t=h)&&t.lastRecommendResults?h.lastRecommendResults[e.$$id]:null},getPreviousState:function(){return p},getScopedResults:function(){var e=this.getParent();return function e(t){return t.filter(V).reduce(function(t,r){return t.concat.apply(t,[{indexId:r.getIndexId(),results:r.getResults(),helper:r.getHelper()}].concat(ee(e(r.getWidgets()))))},[])}(e?e.getWidgets():0===r.length?this.getWidgets():[this])},getParent:function(){return o?null:f},createURL:function(e){return"function"==typeof e?l._createURL(Z({},i,e(u))):l._createURL(Z({},i,ea(c,{searchParameters:e,helper:h})))},getWidgets:function(){return c},addWidgets:function(e){var t,r=this;if(!Array.isArray(e))throw Error(en("The `addWidgets` method expects an array of widgets."));var n=e.reduce(function(e,t){return e.concat(Array.isArray(t)?t:[t])},[]);if(n.some(function(e){return"function"!=typeof e.init&&"function"!=typeof e.render}))throw Error(en("The widget definition expects a `render` and/or an `init` method."));
1return n.forEach(function(e){!V(e)&&(l&&"recommend"===e.dependsOn?l._hasRecommendWidget=!0:l?l._hasSearchWidget=!0:"recommend"===e.dependsOn?m=!0:g=!0,"recommend"===e.dependsOn&&(e.$$id=z++))}),c=c.concat(n),l&&n.length&&(ei(h,{state:eo(c,{uiState:u,initialSearchParameters:h.state}),recommendState:es(c,{uiState:u,initialRecommendParameters:h.recommendState}),_uiState:u}),n.forEach(function(e){e.getRenderState&&eu({renderState:e.getRenderState(l.renderState[r.getIndexId()]||{},P(l,r,l._initialUiState)),instantSearchInstance:l,parent:r})}),n.forEach(function(e){e.init&&e.init(P(l,r,l._initialUiState))}),o?null==(t=h)||t.search():l.scheduleSearch()),this},removeWidgets:function(e){var t=this;if(!Array.isArray(e))throw Error(en("The `removeWidgets` method expects an array of widgets."));var r=e.reduce(function(e,t){return e.concat(Array.isArray(t)?t:[t])},[]);if(r.some(function(e){return"function"!=typeof e.dispose}))throw Error(en("The widget definition expects a `dispose` method."));if((c=c.filter(function(e){return -1===r.indexOf(e)})).forEach(function(e){V(e)||(l&&"recommend"===e.dependsOn?l._hasRecommendWidget=!0:l?l._hasSearchWidget=!0:"recommend"===e.dependsOn?m=!0:g=!0)}),l&&r.length){var n,i=r.reduce(function(e,r){var n=r.dispose({helper:h,state:e.cleanedSearchState,recommendState:e.cleanedRecommendState,parent:t});return n instanceof s.default.RecommendParameters?e.cleanedRecommendState=n:n&&(e.cleanedSearchState=n),e},{cleanedSearchState:h.state,cleanedRecommendState:h.recommendState}),a=i.cleanedSearchState,f=i.cleanedRecommendState,d=l.future.preserveSharedStateOnUnmount?eo(c,{uiState:u,initialSearchParameters:new s.default.SearchParameters({index:this.getIndexName()})}):eo(c,{uiState:ea(c,{searchParameters:a,helper:h}),initialSearchParameters:a});u=ea(c,{searchParameters:d,helper:h}),h.setState(d),h.recommendState=f,c.length&&(o?null==(n=h)||n.search():l.scheduleSearch())}return this},init:function(e){var t,n=this,a=e.instantSearchInstance,y=e.parent,v=e.uiState;if(null===h){l=a,f=y,u=v[i]||{};var b=a.mainHelper,_=eo(c,{uiState:u,initialSearchParameters:new s.default.SearchParameters({index:r})}),S=es(c,{uiState:u,initialRecommendParameters:new s.default.RecommendParameters});(h=(0,s.default)(b.getClient(),_.index,_)).recommendState=S,h.search=function(){return o?(a.status="loading",n.render({instantSearchInstance:a}),a.compositionID?h.searchWithComposition():h.searchOnlyWithDerivedHelpers()):a.onStateChange?(a.onStateChange({uiState:a.mainIndex.getWidgetUiState({}),setUiState:function(e){return a.setUiState(e,!1)}}),b):b.search()},h.searchWithoutTriggeringOnStateChange=function(){return b.search()},h.searchForFacetValues=function(e,t,r,n){var i=h.state.setQueryParameters(n);return b.searchForFacetValues(e,t,r,i)};var O=r?h:(0,s.default)({},"__empty_index__",{});d=(o?O:function(e,t){for(;e;){if(e._isolated)return e.getHelper();e=e.getParent()}return t}(y,b)).derive(function(){return $.mergeSearchParameters.apply(void 0,[b.state].concat(ee(function(e){for(var t=e.getParent(),r=[e.getHelper().state];null!==t;)r=[t.getHelper().state].concat(r),t=t.getParent();return r}(n))))},function(){return n.getHelper().recommendState});var R=null==(t=a._initialResults)?void 0:t[this.getIndexId()];if(null!=R&&R.results){var j=new s.default.SearchResults(new s.default.SearchParameters(R.state),R.results);d.lastResults=j,h.lastResults=j}if(null!=R&&R.recommendResults){var w=new s.default.RecommendResults(new s.default.RecommendParameters({params:R.recommendResults.params}),R.recommendResults.results);d.lastRecommendResults=w,h.lastRecommendResults=w}h.on("change",function(e){e.isPageReset&&function e(t){var r=t.filter(V);0!==r.length&&r.forEach(function(t){var r=t.getHelper();ei(r,{state:r.state.resetPage(),recommendState:r.recommendState,isPageReset:!0}),e(t.getWidgets())})}(c)}),d.on("search",function(){a.scheduleStalledRender()}),d.on("result",function(e){var t=e.results;a.scheduleRender(),h.lastResults=t,p=null==t?void 0:t._state}),d.on("recommend:result",function(e){var t=e.recommend;a.scheduleRender(),h.lastRecommendResults=t.results}
1),c.forEach(function(e){e.getRenderState&&eu({renderState:e.getRenderState(a.renderState[n.getIndexId()]||{},P(a,n,v)),instantSearchInstance:a,parent:n})}),c.forEach(function(e){e.init&&e.init(P(a,n,v))}),h.on("change",function(e){var t=e.state,r=e._uiState;u=ea(c,{searchParameters:t,helper:h},r||{}),a.onStateChange||a.onInternalStateChange()}),R&&a.scheduleRender(),m&&(a._hasRecommendWidget=!0),g&&(a._hasSearchWidget=!0)}},render:function(e){var t,n=this,i=e.instantSearchInstance;"error"===i.status&&!i.mainHelper.hasPendingRequests()&&p&&h.setState(p);var a=this.getResults()||null!=(t=d)&&t.lastRecommendResults||o&&!r?c:c.filter(V);(a=a.filter(function(e){return!e.shouldRender||e.shouldRender({instantSearchInstance:i})})).forEach(function(e){e.getRenderState&&eu({renderState:e.getRenderState(i.renderState[n.getIndexId()]||{},j(i,n,e)),instantSearchInstance:i,parent:n})}),a.forEach(function(e){e.render&&e.render(j(i,n,e))})},dispose:function(){var e,t,r=this;c.forEach(function(e){e.dispose&&h&&e.dispose({helper:h,state:h.state,recommendState:h.recommendState,parent:r})}),l=null,f=null,null==(e=h)||e.removeAllListeners(),h=null,null==(t=d)||t.detach(),d=null},getWidgetUiState:function(e){return c.filter(V).filter(function(e){return!e._isolated}).reduce(function(e,t){return t.getWidgetUiState(e)},Y(Y({},e),{},Z({},i,Y(Y({},e[i]),u))))},getWidgetState:function(e){return this.getWidgetUiState(e)},getWidgetSearchParameters:function(e,t){var r=t.uiState;return eo(c,{uiState:r,initialSearchParameters:e})},refreshUiState:function(){u=ea(c,{searchParameters:this.getHelper().state,helper:this.getHelper()},u)},setIndexUiState:function(e){var t="function"==typeof e?e(u):e;l.setUiState(function(e){return Y(Y({},e),{},Z({},i,t))})}}};function eu(e){var t=e.renderState,r=e.instantSearchInstance,n=e.parent,i=n?n.getIndexId():r.mainIndex.getIndexId();r.renderState=Y(Y({},r.renderState),{},Z({},i,Y(Y({},r.renderState[i]),t)))}var el=function(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.descendantName,n=t.modifierName;return"".concat("ais","-").concat(e).concat(r?"-".concat(r):"").concat(n?"--".concat(n):"")}};function ef(e,t){return(Array.isArray(t)?t:t.split(".")).reduce(function(e,t){return e&&e[t]},e)}var eh=e.i(254834),ed=el("Highlight");function ep(e){var t=eh.TAG_REPLACEMENT.highlightPostTag,r=eh.TAG_REPLACEMENT.highlightPreTag,n=e.split(r),i=n.shift(),a=i?[{value:i,isHighlighted:!1}]:[];return n.forEach(function(e){var r=e.split(t);a.push({value:r[0],isHighlighted:!0}),""!==r[1]&&a.push({value:r[1],isHighlighted:!1})}),a}var em=e.i(400274),eg=new RegExp(/\w/i);function ey(e){return(ey="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ev(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eb(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ev(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=ey(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ey(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ey(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ev(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function e_(e){return e.some(function(e){return e.isHighlighted})?e.map(function(t,r){var n,i,a,o,s;return eb(eb({},t),{},{isHighlighted:(a=e[r],o=(null==(n=e[r+1])?void 0:n.isHighlighted)||!0,s=(null==(i=e[r-1])?void 0:i.isHighlighted)||!0,eg.test((0,em.unescape)(a.value))||s!==o?!a.isHighlighted:!s)})}):e.map(function(e){return eb(eb({},e),{},{isHighlighted:!1})})}function eS(e){var t=eh.TAG_REPLACEMENT.highlightPreTag,r=eh.TAG_REPLACEMENT.highlightPostTag;return e.map(function(e){return e.isHighlighted?t+e.value+r:e.value}).join("")}var eO=el("ReverseHighlight"),eR=el("Snippet"),eP=el("ReverseSnippet"),ej=e.i(412763);function ew(e){return(ew="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ex(e){return(ex="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eE(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eC(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?eE(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=ex(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ex(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ex(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eE(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var eT=Promise.resolve();function eF(e){var t=null,r=!1,n=function(){for(var n=arguments.length,i=Array(n),a=0;a<n;a++)i[a]=arguments[a];null===t&&(t=eT.then(function(){if(t=null,r){r=!1;return}e.apply(void 0,i)}))};return n.wait=function(){if(null===t)throw Error("The deferred function should be called before calling `wait()`");return t},n.cancel=function(){null!==t&&(r=!0)},n}function eA(e){return(eA="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eN(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ek(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eN(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=eA(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=eA(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==eA(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eN(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function eI(e){return(eI="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eD(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function eH(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eU(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eH(Object(r),!0).forEach(function(t){eL(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eH(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function eL(e,t,r){var n;return(n=function(e,t){if("object"!=eI(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=eI(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==eI(n)?n:String(n))in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eM(e){var t=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var i=0;return e.replace(/%s/g,function(){return encodeURIComponent(r[i++])})};return Object.keys(e).map(function(r){var n;return t("%s=%s",r,(n=e[r],"[object Object]"===Object.prototype.toString.call(n)||"[object Array]"===Object.prototype.toString.call(n))?JSON.stringify(e[r]):e[r])}).join("&")}function eq(e,t){var r=e[t.getIndexId()]||{};
1t.getHelper().setState(t.getWidgetSearchParameters(t.getHelper().state,{uiState:r})),t.getWidgets().filter(V).forEach(function(t){return eq(e,t)})}function eW(e){return(eW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eB(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function eQ(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eB(Object(r),!0).forEach(function(t){eG(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eB(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function e$(e,t){return(e$=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function eV(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ez(e){return(ez=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function eG(e,t,r){return(t=eJ(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eJ(e){var t=function(e,t){if("object"!=eW(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=eW(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==eW(t)?t:String(t)}var eK=(0,Q.createDocumentationMessageGenerator)({name:"instantsearch"});function eX(){return"#"}var eY={preserveSharedStateOnUnmount:!1,persistHierarchicalRootCount:!1},eZ=function(e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");i.prototype=Object.create(e&&e.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),Object.defineProperty(i,"prototype",{writable:!1}),e&&e$(i,e);var t,r,n=(t=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,r=ez(i);return e=t?Reflect.construct(r,arguments,ez(this).constructor):r.apply(this,arguments),function(e,t){if(t&&("object"===eW(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");return eV(e)}(this,e)});function i(e){if(!(this instanceof i))throw TypeError("Cannot call a class as a function");eG(eV(t=n.call(this)),"client",void 0),eG(eV(t),"indexName",void 0),eG(eV(t),"compositionID",void 0),eG(eV(t),"insightsClient",void 0),eG(eV(t),"onStateChange",null),eG(eV(t),"future",void 0),eG(eV(t),"helper",void 0),eG(eV(t),"mainHelper",void 0),eG(eV(t),"mainIndex",void 0),eG(eV(t),"started",void 0),eG(eV(t),"templatesConfig",void 0),eG(eV(t),"renderState",{}),eG(eV(t),"_stalledSearchDelay",void 0),eG(eV(t),"_searchStalledTimer",void 0),eG(eV(t),"_initialUiState",void 0),eG(eV(t),"_initialResults",void 0),eG(eV(t),"_manuallyResetScheduleSearch",!1),eG(eV(t),"_resetScheduleSearch",void 0),eG(eV(t),"_createURL",void 0),eG(eV(t),"_searchFunction",void 0),eG(eV(t),"_mainHelperSearch",void 0),eG(eV(t),"_hasSearchWidget",!1),eG(eV(t),"_hasRecommendWidget",!1),eG(eV(t),"_insights",void 0),eG(eV(t),"middleware",[]),eG(eV(t),"sendEventToInsights",void 0),eG(eV(t),"status","idle"),eG(eV(t),"error",void 0),eG(eV(t),"scheduleSearch",eF(function(){t.started&&t.mainHelper.search()})),eG(eV(t),"scheduleRender",eF(function(){var e,r=!(arguments.length>0)||void 0===arguments[0]||arguments[0];!(null!=(e=t.mainHelper)&&e.hasPendingRequests())&&(clearTimeout(t._searchStalledTimer),t._searchStalledTimer=null,r&&(t.status="idle",t.error=void 0)),t.mainIndex.render({instantSearchInstance:eV(t)}),t.emit("render")})),eG(eV(t),"onInternalStateChange",eF(function(){var e=t.mainIndex.getWidgetUiState({});t.middleware.forEach(function(t){t.instance.onStateChange({uiState:e})})})),t.setMaxListeners(100);var t,r=e.indexName,a=e.compositionID,o=e.numberLocale,s=e.initialUiState,c=e.routing,l=void 0===c?null:c,f=e.insights,d=void 0===f?void 0:f,p=e.searchFunction,m=e.stalledSearchDelay,g=e.searchClient,y=void 0===g?null:g,v=e.insightsClient,b=void 0===v?null:v,_=e.onStateChange,O=e.future,R=void 0===O?eQ(eQ({},eY),e.future||{}):O;if(null===y)throw Error(eK("The `searchClient` option is required."));if("function"!=typeof y.search)throw Error("The `searchClient` must implement a `search` method.\n\nSee: https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/backend-instantsearch/js/");if("function"==typeof y.addAlgoliaAgent&&y.addAlgoliaAgent("instantsearch.js (".concat("4.80.0",")")),b&&"function"!=typeof b)throw Error(eK("The `insightsClient` option should be a function."));if(t.client=y,t.future=R,t.insightsClient=b,t.indexName=void 0===r?"":r,t.compositionID=a,t.helper=null,t.mainHelper=null,t.mainIndex=ec({indexName:t.compositionID||t.indexName}),t.onStateChange=void 0===_?null:_,t.started=!1,t.templatesConfig={helpers:{formatNumber:function(e,t){var r;
1return r=Number(t(e)),r.toLocaleString(o)},highlight:function(e,t){try{var r,n,i,a,o,s,c,u,l,f=JSON.parse(e);return t((n=(r=eC(eC({},f),{},{hit:this})).attribute,i=r.highlightedTagName,a=void 0===i?"mark":i,o=r.hit,s=r.cssClasses,c=void 0===s?{}:s,u=(ef(o._highlightResult,n)||{}).value,l=ed({descendantName:"highlighted"})+(c.highlighted?" ".concat(c.highlighted):""),(void 0===u?"":u).replace(RegExp(eh.TAG_REPLACEMENT.highlightPreTag,"g"),"<".concat(a,' class="').concat(l,'">')).replace(RegExp(eh.TAG_REPLACEMENT.highlightPostTag,"g"),"</".concat(a,">"))))}catch(e){throw Error('\nThe highlight helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}},reverseHighlight:function(e,t){try{var r,n,i,a,o,s,c,u,l,f=JSON.parse(e);return t((n=(r=eC(eC({},f),{},{hit:this})).attribute,i=r.highlightedTagName,a=void 0===i?"mark":i,o=r.hit,s=r.cssClasses,c=void 0===s?{}:s,u=(ef(o._highlightResult,n)||{}).value,l=eO({descendantName:"highlighted"})+(c.highlighted?" ".concat(c.highlighted):""),eS(e_(ep(void 0===u?"":u))).replace(RegExp(eh.TAG_REPLACEMENT.highlightPreTag,"g"),"<".concat(a,' class="').concat(l,'">')).replace(RegExp(eh.TAG_REPLACEMENT.highlightPostTag,"g"),"</".concat(a,">"))))}catch(e){throw Error('\n  The reverseHighlight helper expects a JSON object of the format:\n  { "attribute": "name", "highlightedTagName": "mark" }')}},snippet:function(e,t){try{var r,n,i,a,o,s,c,u,l,f=JSON.parse(e);return t((n=(r=eC(eC({},f),{},{hit:this})).attribute,i=r.highlightedTagName,a=void 0===i?"mark":i,o=r.hit,s=r.cssClasses,c=void 0===s?{}:s,u=(ef(o._snippetResult,n)||{}).value,l=eR({descendantName:"highlighted"})+(c.highlighted?" ".concat(c.highlighted):""),(void 0===u?"":u).replace(RegExp(eh.TAG_REPLACEMENT.highlightPreTag,"g"),"<".concat(a,' class="').concat(l,'">')).replace(RegExp(eh.TAG_REPLACEMENT.highlightPostTag,"g"),"</".concat(a,">"))))}catch(e){throw Error('\nThe snippet helper expects a JSON object of the format:\n{ "attribute": "name", "highlightedTagName": "mark" }')}},reverseSnippet:function(e,t){try{var r,n,i,a,o,s,c,u,l,f=JSON.parse(e);return t((n=(r=eC(eC({},f),{},{hit:this})).attribute,i=r.highlightedTagName,a=void 0===i?"mark":i,o=r.hit,s=r.cssClasses,c=void 0===s?{}:s,u=(ef(o._snippetResult,n)||{}).value,l=eP({descendantName:"highlighted"})+(c.highlighted?" ".concat(c.highlighted):""),eS(e_(ep(void 0===u?"":u))).replace(RegExp(eh.TAG_REPLACEMENT.highlightPreTag,"g"),"<".concat(a,' class="').concat(l,'">')).replace(RegExp(eh.TAG_REPLACEMENT.highlightPostTag,"g"),"</".concat(a,">"))))}catch(e){throw Error('\n  The reverseSnippet helper expects a JSON object of the format:\n  { "attribute": "name", "highlightedTagName": "mark" }')}},insights:function(e,t){try{var r,n=JSON.parse(e),i=n.method,a=n.payload;return t((r=eC({objectIDs:[this.objectID]},a),function(e){var t,r=e.method,n=e.payload;if("object"!==ew(n))throw Error("The insights helper expects the payload to be an object.");try{t=(0,ej.serializePayload)(n)}catch(e){throw Error("Could not JSON serialize the payload object.")}return'data-insights-method="'.concat(r,'" data-insights-payload="').concat(t,'"')}({method:i,payload:r})))}catch(e){throw Error('\nThe insights helper expects a JSON object of the format:\n{ "method": "method-name", "payload": { "eventName": "name of the event" } }')}}},compileOptions:{}},t._stalledSearchDelay=void 0===m?200:m,t._searchStalledTimer=null,t._createURL=eX,t._initialUiState=void 0===s?{}:s,t._initialResults=null,t._insights=d,p&&(t._searchFunction=p),t.sendEventToInsights=u.noop,l){var j="boolean"==typeof l?{}:l;j.$$internal=!0,t.use(B(j))}if(d){var w="boolean"==typeof d?{}:d;w.$$internal=!0,t.use(S(w))}return h(function(e){var t,r;return(null==(t=e.window.navigator)||null==(r=t.userAgent)?void 0:r.indexOf("Algolia Crawler"))>-1},{fallback:function(){return!1}})&&t.use(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.$$internal,r=void 0!==t&&t;return function(e){var t=e.instantSearchInstance,n={widgets:[]},i=document.createElement("meta"),a=document.querySelector("head");return i.name="instantsearch:widgets",{$$type:"ais.metadata",$$internal:r,onStateChange:function(){},subscribe:function(){setTimeout(function(){var e=t.client;n.ua=e.transporter&&e.transporter.userAgent?e.transporter.userAgent.value:e._ua,function e(t,r,n){var i=P(r,r.mainIndex,r._initialUiState);t.forEach(function(t){var a={};
1if(t.getWidgetRenderState){var o=t.getWidgetRenderState(i);o&&o.widgetParams&&(a=o.widgetParams)}var s=Object.keys(a).filter(function(e){return void 0!==a[e]});n.widgets.push({type:t.$$type,widgetType:t.$$widgetType,params:s}),"ais.index"===t.$$type&&e(t.getWidgets(),r,n)})}(t.mainIndex.getWidgets(),t,n),t.middleware.forEach(function(e){return n.widgets.push({middleware:!0,type:e.instance.$$type,internal:e.instance.$$internal})}),i.content=JSON.stringify(n),a.appendChild(i)},0)},started:function(){},unsubscribe:function(){i.remove()}}}}({$$internal:!0})),t}return r=[{key:"_isSearchStalled",get:function(){return"stalled"===this.status}},{key:"use",value:function(){for(var e=this,t=arguments.length,r=Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r.map(function(t){var r=eQ({$$type:"__unknown__",$$internal:!1,subscribe:u.noop,started:u.noop,unsubscribe:u.noop,onStateChange:u.noop},t({instantSearchInstance:e}));return e.middleware.push({creator:t,instance:r}),r});return this.started&&i.forEach(function(e){e.subscribe(),e.started()}),this}},{key:"unuse",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.middleware.filter(function(e){return t.includes(e.creator)}).forEach(function(e){return e.instance.unsubscribe()}),this.middleware=this.middleware.filter(function(e){return!t.includes(e.creator)}),this}},{key:"EXPERIMENTAL_use",value:function(){return this.use.apply(this,arguments)}},{key:"addWidget",value:function(e){return this.addWidgets([e])}},{key:"addWidgets",value:function(e){if(!Array.isArray(e))throw Error(eK("The `addWidgets` method expects an array of widgets. Please use `addWidget`."));if(this.compositionID&&e.some(function(e){return!Array.isArray(e)&&V(e)&&!e._isolated}))throw Error(eK("The `index` widget cannot be used with a composition-based InstantSearch implementation."));return this.mainIndex.addWidgets(e),this}},{key:"removeWidget",value:function(e){return this.removeWidgets([e])}},{key:"removeWidgets",value:function(e){if(!Array.isArray(e))throw Error(eK("The `removeWidgets` method expects an array of widgets. Please use `removeWidget`."));return this.mainIndex.removeWidgets(e),this}},{key:"start",value:function(){var e=this;if(this.started)throw Error(eK("The `start` method has already been called once."));var t=this.mainHelper||(0,s.default)(this.client,this.indexName,void 0,{persistHierarchicalRootCount:this.future.persistHierarchicalRootCount});if(this.compositionID&&(t.searchForFacetValues=t.searchForCompositionFacetValues.bind(t)),t.search=function(){return e.status="loading",e.scheduleRender(!1),e._hasSearchWidget&&(e.compositionID?t.searchWithComposition():t.searchOnlyWithDerivedHelpers()),e._hasRecommendWidget&&t.recommend(),t},this._searchFunction){var r={search:function(){return new Promise(u.noop)}};this._mainHelperSearch=t.search.bind(t),t.search=function(){var n=e.mainIndex.getHelper(),i=(0,s.default)(r,n.state.index,n.state);return i.once("search",function(t){var r=t.state;n.overrideStateWithoutTriggeringChangeEvent(r),e._mainHelperSearch()}),i.on("change",function(e){var t=e.state;n.setState(t)}),e._searchFunction(i),t}}if(t.on("error",function(t){var r=t.error;if(!(r instanceof Error)){var n=r;r=Object.keys(n).reduce(function(e,t){return e[t]=n[t],e},Error(n.message))}r.error=r,e.error=r,e.status="error",e.scheduleRender(!1),e.emit("error",r)}),this.mainHelper=t,this.middleware.forEach(function(e){e.instance.subscribe()}),this.mainIndex.init({instantSearchInstance:this,parent:null,uiState:this._initialUiState}),this._initialResults){!function(e,t){if(t&&("transporter"in e&&!e._cacheHydrated||e._useCache&&"function"==typeof e.addAlgoliaAgent)){var r=[Object.keys(t).reduce(function(e,r){var n=t[r],i=n.state,a=n.requestParams,o=n.results,s=o&&i?o.map(function(e,t){return eU({indexName:i.index||e.index},null!=a&&a[t]||e.params?{params:eM((null==a?void 0:a[t])||e.params.split("&").reduce(function(e,t){var r,n=function(e){if(Array.isArray(e))return e}(r=t.split("="))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,a,o=[],s=!0,c=!1;try{i=(t=t.call(e)).next,!1;for(;!(s=(r=i.call(t)).done)&&(o.push(r.value),2!==o.length);s=!0);}catch(e){c=!0,n=e}
1finally{try{if(!s&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(r)||function(e){if(e){if("string"==typeof e)return eD(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return eD(e,2)}}(r)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=n[0],a=n[1];return e[i]=a?decodeURIComponent(a):"",e},{}))}:{})}):[];return e.concat(s)},[])],n=Object.keys(t).reduce(function(e,r){var n=t[r].results;return n?e.concat(n):e},[]);if("transporter"in e&&!e._cacheHydrated){e._cacheHydrated=!0;var i=e.search.bind(e);e.search=function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];var o=Array.isArray(t)?t.map(function(e){return eU(eU({},e),{},{params:eM(e.params)})}):eM(t.requestBody.params);return e.transporter.responsesCache.get({method:"search",args:[o].concat(n)},function(){return i.apply(void 0,[t].concat(n))})},e.transporter.responsesCache.set({method:"search",args:r},{results:n})}if(!("transporter"in e)){var a="/1/indexes/*/queries_body_".concat(JSON.stringify({requests:r}));e.cache=eU(eU({},e.cache),{},eL({},a,JSON.stringify({results:Object.keys(t).map(function(e){return t[e].results})})))}}}(this.client,this._initialResults),this.mainHelper._recommendCache=Object.keys(n=this._initialResults).reduce(function(e,t){var r=n[t];return r.recommendResults?ek(ek({},e),r.recommendResults.results):e},{});var n,i=this.scheduleSearch;this.scheduleSearch=eF(u.noop),this._manuallyResetScheduleSearch?this._resetScheduleSearch=function(){e.scheduleSearch=i}:eF(function(){e.scheduleSearch=i})()}else this.mainIndex.getWidgets().length>0&&this.scheduleSearch();this.helper=this.mainIndex.getHelper(),this.started=!0,this.middleware.forEach(function(e){e.instance.started()}),void 0===this._insights&&t.derivedHelpers[0].once("result",function(){e.mainIndex.getScopedResults().some(function(e){var t=e.results;return null==t?void 0:t._automaticInsights})&&e.use(S({$$internal:!0,$$automatic:!0}))})}},{key:"dispose",value:function(){var e;this.scheduleSearch.cancel(),this.scheduleRender.cancel(),clearTimeout(this._searchStalledTimer),this.removeWidgets(this.mainIndex.getWidgets()),this.mainIndex.dispose(),this.started=!1,this.removeAllListeners(),null==(e=this.mainHelper)||e.removeAllListeners(),this.mainHelper=null,this.helper=null,this.middleware.forEach(function(e){e.instance.unsubscribe()})}},{key:"scheduleStalledRender",value:function(){var e=this;this._searchStalledTimer||(this._searchStalledTimer=setTimeout(function(){e.status="stalled",e.scheduleRender()},this._stalledSearchDelay))}},{key:"setUiState",value:function(e){var t=this,r=!(arguments.length>1)||void 0===arguments[1]||arguments[1];if(!this.mainHelper)throw Error(eK("The `start` method needs to be called before `setUiState`."));this.mainIndex.refreshUiState();var n="function"==typeof e?e(this.mainIndex.getWidgetUiState({})):e;this.onStateChange&&r?this.onStateChange({uiState:n,setUiState:function(e){eq("function"==typeof e?e(n):e,t.mainIndex),t.scheduleSearch(),t.onInternalStateChange()}}):(eq(n,this.mainIndex),this.scheduleSearch(),this.onInternalStateChange())}},{key:"getUiState",value:function(){return this.started&&this.mainIndex.refreshUiState(),this.mainIndex.getWidgetUiState({})}},{key:"createURL",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.started)throw Error(eK("The `start` method needs to be called before `createURL`."));return this._createURL(e)}},{key:"refresh",value:function(){if(!this.mainHelper)throw Error(eK("The `start` method needs to be called before `refresh`."));this.mainHelper.clearCache().search()}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,eJ(n.key),n)}}(i.prototype,r),Object.defineProperty(i,"prototype",{writable:!1}),i}(o.default),e0=e.i(260449);let e1="7.16.3";var e2=e.i(41706);function e3(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var e8=e.i(38380),e4=e.i(929361),e6=e.i(524388);function e5(e){return(e5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function e9(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function e7(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?e9(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=e5(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=e5(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==e5(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):e9(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var te=["react (".concat(r.version,")"),"react-instantsearch (".concat(e1,")"),"react-instantsearch-core (".concat(e1,")")],tt="react-instantsearch-server (".concat(e1,")");function tr(e,t){"function"==typeof e.addAlgoliaAgent&&t.filter(Boolean).forEach(function(t){e.addAlgoliaAgent(t)})}var tn=["children"];function ti(e){var t=e.children,o=function(e){var t=(function(e){if(Array.isArray(e))return e}(d=(0,r.useReducer)(function(e){return e+1},0))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,a,o=[],s=!0,c=!1;try{i=(t=t.call(e)).next,!1;for(;!(s=(r=i.call(t)).done)&&(o.push(r.value),2!==o.length);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(d)||function(e){if(e){if("string"==typeof e)return e3(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return e3(e,2)}}(d)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1],n=(0,e8.useInstantSearchServerContext)(),i=(0,e4.useInstantSearchSSRContext)(),o=(0,e6.useRSCContext)().waitForResultsRef,s=null==i?void 0:i.initialResults,c=(0,r.useRef)(e),u=n||s||o,l=(0,r.useRef)(null);if(null!=i&&i.ssrSearchRef&&(l=i.ssrSearchRef),null===l.current){var f,h,d,p,m=new eZ(e);m._schedule=function(e){m._schedule.queue.push(e),clearTimeout(m._schedule.timer),m._schedule.timer=setTimeout(function(){m._schedule.queue.forEach(function(e){e()}),m._schedule.queue=[]},0)},m._schedule.queue=[],u&&(m._initialResults=s||{},m._manuallyResetScheduleSearch=!0),tr(e.searchClient,[].concat(te,[n&&tt,(p="u">typeof window&&(null==(f=window.next)?void 0:f.version)||(void 0!==a.default?null==(h=a.default.env)?void 0:h.NEXT_RUNTIME:void 0))?"next.js (".concat(p,")"):null])),u&&m.start(),n&&n.notifyServer({search:m}),e.routing,l.current=m}var g,y=l.current,v=c.current;v.indexName!==e.indexName&&(y.helper.setIndex(e.indexName||"").search(),c.current=e),v.searchClient!==e.searchClient&&(tr(e.searchClient,[].concat(te,[n&&tt])),y.mainHelper.setClient(e.searchClient).search(),c.current=e),v.onStateChange!==e.onStateChange&&(y.onStateChange=e.onStateChange,c.current=e),v.searchFunction!==e.searchFunction&&(y._searchFunction=e.searchFunction,c.current=e),v.stalledSearchDelay!==e.stalledSearchDelay&&(y._stalledSearchDelay=null!=(g=e.stalledSearchDelay)?g:200,c.current=e),(0,e2.dequal)(v.future,e.future)||(y.future=e7(e7({},eY),e.future),c.current=e);var b=(0,r.useRef)(null);return(0,e0.useSyncExternalStore)((0,r.useCallback)(function(){var e=l.current;return null===b.current?e.started||(e.start(),t()):(clearTimeout(b.current),e._preventWidgetCleanup=!1),function(){null!=i&&i.ssrSearchRef||(clearTimeout(e._schedule.timer),b.current=setTimeout(function(){e.dispose()}),e._preventWidgetCleanup=!0)}},[t,i]),function(){return l.current},function(){return l.current})}(function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,tn));return o.started?r.default.createElement(i.InstantSearchContext.Provider,{value:o},r.default.createElement(n.IndexContext.Provider,{value:o.mainIndex},t,r.default.createElement(ta,{search:o}))):null}function ta(e){var t=e.search;return(0,r.useEffect)(function(){t._resetScheduleSearch&&t._resetScheduleSearch()},[t]),null}var to=e.i(309021),ts=e.i(510901),tc=e.i(832356),tu=e.i(282875);let tl=(0,ts.createEnv)({emptyStringAsUndefined:!0,experimental__runtimeEnv:{NEXT_PUBLIC_TYPESENSE_API_KEY:"QEjXNZ4UyqmmNcL0PFQNphVvw482gb3J",NEXT_PUBLIC_TYPESENSE_HOST:"search.carnegieendowment.org",NEXT_PUBLIC_TYPESENSE_PORT:"443",NEXT_PUBLIC_TYPESENSE_PROTOCOL:"https"},server:{TYPESENSE_ADMIN_API_KEY:tc.z.string()},shared:{NEXT_PUBLIC_TYPESENSE_API_KEY:tc.z.string(),NEXT_PUBLIC_TYPESENSE_HOST:tc.z.string(),NEXT_PUBLIC_TYPESENSE_PORT:tc.z.coerce.number().default(443),NEXT_PUBLIC_TYPESENSE_PROTOCOL:tc.z.enum
1(["http","https"]).default("https")},skipValidation:tu.skipValidation});e.s(["SearchProvider",0,({queryBy:e="*",sortBy:n="_text_match:desc,contentSummary.publishedAt:desc",...i})=>{let a=(0,r.useMemo)(()=>new to.default({additionalSearchParameters:{query_by:e,sort_by:n},server:{apiKey:tl.NEXT_PUBLIC_TYPESENSE_API_KEY,nodes:[{host:tl.NEXT_PUBLIC_TYPESENSE_HOST,port:tl.NEXT_PUBLIC_TYPESENSE_PORT,protocol:tl.NEXT_PUBLIC_TYPESENSE_PROTOCOL}]}}),[e,n]).searchClient;return(0,t.jsx)(ti,{...i,future:{preserveSharedStateOnUnmount:!0},searchClient:a})}],389403)},383363,865117,15795,742073,929190,91161,e=>{"use strict";var t=e.i(226132);e.i(814647);var r=e.i(592421);e.i(263483);var n=e.i(825447),i=e.i(574755),a=e.i(853483);function o(e,t,r,n){var i,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],s={type:t,attribute:r,name:n,escapedValue:"number"==typeof n&&n<0||"string"==typeof n?String(n).replace(/^-/,"\\-"):n},c=(0,a.find)(o,function(e){return e.name===r});if("hierarchical"===t){for(var u=e.getHierarchicalFacetByName(r),l=n.split(u.separator),f=function(e){var t;c=c&&c.data&&(0,a.find)(Object.keys(c.data).map((t=c.data,function(e){return t[e]})),function(t){return t.name===l[e]})},h=0;void 0!==c&&h<l.length;++h)f(h);i=c&&c.count}else i=c&&c.data&&c.data[s.name];return void 0!==i&&(s.count=i),c&&void 0!==c.exhaustive&&(s.exhaustive=c.exhaustive),s}var s=e.i(527136),c=e.i(620297),u=e.i(379359);function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=l(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=l(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==l(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var p=(0,c.createDocumentationMessageGenerator)({name:"current-refinements",connector:!0});function m(e){var t=e.results,r=e.helper,n=e.indexId,i=e.includedAttributes,a=e.excludedAttributes,s=-1!==(i||[]).indexOf("query")||-1===(a||[]).indexOf("query"),c=i?function(e){return -1!==i.indexOf(e.attribute)}:function(e){return -1===a.indexOf(e.attribute)},u=(function(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=e||{},i=[],a=t.facetsRefinements,s=void 0===a?{}:a,c=t.facetsExcludes,u=void 0===c?{}:c,l=t.disjunctiveFacetsRefinements,f=void 0===l?{}:l,h=t.hierarchicalFacetsRefinements,d=void 0===h?{}:h,p=t.numericRefinements,m=void 0===p?{}:p,g=t.tagRefinements;return Object.keys(s).forEach(function(e){s[e].forEach(function(r){i.push(o(t,"facet",e,r,n.facets))})}),Object.keys(u).forEach(function(e){u[e].forEach(function(t){i.push({type:"exclude",attribute:e,name:t,exclude:!0})})}),Object.keys(f).forEach(function(e){f[e].forEach(function(r){i.push(o(t,"disjunctive",e,"string"==typeof r?r.replace(/^\\-/,"-"):r,n.disjunctiveFacets))})}),Object.keys(d).forEach(function(e){d[e].forEach(function(r){i.push(o(t,"hierarchical",e,r,n.hierarchicalFacets))})}),Object.keys(m).forEach(function(e){var t=m[e];Object.keys(t).forEach(function(r){var n=t[r];(Array.isArray(n)?n:[n]).forEach(function(t){i.push({type:"numeric",attribute:e,name:"".concat(t),numericValue:t,operator:r})})})}),(void 0===g?[]:g).forEach(function(e){i.push({type:"tag",attribute:"_tags",name:e})}),r&&t.query&&t.query.trim()&&i.push({attribute:"query",type:"query",name:t.query,query:t.query}),i})(t,r.state,s).map(v).filter(c);return u.reduce(function(e,t){var i;return[].concat(function(e){if(Array.isArray(e))return f(e)}(i=e.filter(function(e){return e.attribute!==t.attribute}))||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e){if(e){if("string"==typeof e)return f(e,void 0);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return f(e,void 0)}}(i)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[{indexName:r.state.index,indexId:n,attribute:t.attribute,label:t.attribute,refinements:u.filter(function(e){return e.attribute===t.attribute}).sort(function(e,t){return"numeric"===e.type?e.value-t.value:0}),refine:function(e){return y(r,e)}}])},[])}function g(e,t){switch(e=e.resetPage(),t.type){case"facet":return e.removeFacetRefinement(t.attribute,String(t.value));case"disjunctive":return e.removeDisjunctiveFacetRefinement(t.attribute,String(t.value));case"hierarchical":return e.removeHierarchicalFacetRefinement(t.attribute);case"exclude":return e.removeExcludeRefinement(t.attribute,String(t.value));case"numeric":return e.removeNumericRefinement(t.attribute,t.operator,String(t.value));case"tag":return e.removeTagRefinement(String(t.value));case"query":return e.setQueryParameter("query","");default:return e}}function y(e,t){e.setState(g(e.state,t)).search()}
1function v(e){var t,r="numeric"===(t=e).type?Number(t.name):"escapedValue"in t?t.escapedValue:t.name,n=e.operator?"".concat(function(e){switch(e){case">=":return"≥";case"<=":return"≤";default:return e}}(e.operator)," ").concat(e.name):e.name,i={attribute:e.attribute,type:e.type,value:r,label:n};return void 0!==e.operator&&(i.operator=e.operator),void 0!==e.count&&(i.count=e.count),void 0!==e.exhaustive&&(i.exhaustive=e.exhaustive),i}let b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.noop;return(0,s.checkRendering)(e,p()),function(r){if((r||{}).includedAttributes&&(r||{}).excludedAttributes)throw Error(p("The options `includedAttributes` and `excludedAttributes` cannot be used together."));var n=r||{},i=n.includedAttributes,a=n.excludedAttributes,o=void 0===a?["query"]:a,s=n.transformItems,c=void 0===s?function(e){return e}:s;return{$$type:"ais.currentRefinements",init:function(t){var r=t.instantSearchInstance;e(d(d({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!0)},render:function(t){var r=t.instantSearchInstance;e(d(d({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!1)},dispose:function(){t()},getRenderState:function(e,t){return d(d({},e),{},{currentRefinements:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.results,n=e.scopedResults,a=e.createURL,s=e.helper,u=t?n.reduce(function(e,r){return e.concat(c(m({results:r.results,helper:r.helper,indexId:r.indexId,includedAttributes:i,excludedAttributes:o}),{results:t}))},[]):c(m({results:null,helper:s,indexId:s.state.index,includedAttributes:i,excludedAttributes:o}),{results:t});return{items:u,canRefine:u.length>0,refine:function(e){return y(s,e)},createURL:function(e){return a(g(s.state,e))},widgetParams:r}}}}};var _=e.i(318296);function S(e,t){return(0,_.useConnector)(b,e,t)}var O=e.i(637531);e.i(700602);var R=e.i(914889);let P=({label:e,onRemove:r,type:n})=>(0,t.jsxs)(R.Badge,{ariaLabel:`Remove ${e} filter`,className:"flex cursor-pointer items-center gap-[0.8rem] px-[1.2rem] py-[0.8rem]",onClick:r,theme:"outline",children:[(0,t.jsx)("span",{children:e}),(0,t.jsx)(O.Icon,{className:"size-4",name:"LucideX"})]},`${n}-${e}`),j=e=>{let{items:r}=S(e),n=(0,i.useTranslations)("ContentTypes"),a=r.flatMap(e=>{let{attribute:r,refine:i,refinements:a}=e;return a.map(e=>{let a="contentSummary.type"===r||"contentSummary.typeSimplified"===r?n(e.value):e.label;return(0,t.jsx)(P,{label:a,onRemove:()=>{i(e)},type:"contentType"},`${r}-${e.value.toString()}`)})});return 0===a.length?null:(0,t.jsx)("div",{className:"absolute start-0 top-full mt-[1rem] flex flex-wrap gap-[0.8rem]",children:a})};var w=e.i(398040),x=e.i(36193),E=e.i(254834);function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function A(e){var t=e.instantSearchInstance,r=e.helper,n=e.attribute,i=e.widgetType;return function(){for(var e,a,o=arguments.length,s=Array(o),c=0;c<o;c++)s[c]=arguments[c];var u=s[1],l=s[2],f=s[3],h=function(e){if(Array.isArray(e))return e}(e=s[0].split(":"))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,a,o=[],s=!0,c=!1;try{i=(t=t.call(e)).next,!1;for(;!(s=(r=i.call(t)).done)&&(o.push(r.value),2!==o.length);s=!0);}catch(e){c=!0,n=e}finally{try{if(!s&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return F(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return F(e,2)}}
1(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),d=h[0],p=h[1],m="string"==typeof n?n:n(u);1===s.length&&"object"===T(s[0])?t.sendEventToInsights(s[0]):"click"===d&&s.length>=2&&s.length<=4&&((r.state.isHierarchicalFacet(m)?r.state.isHierarchicalFacetRefined(m,u):r.state.isConjunctiveFacet(m)?r.state.isFacetRefined(m,u):r.state.isDisjunctiveFacetRefined(m,u))||t.sendEventToInsights({insightsMethod:"clickedFilters",widgetType:i,eventType:d,eventModifier:p,payload:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=T(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=T(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==T(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({eventName:void 0===l?"Filter Applied":l,index:(null==(a=r.lastResults)?void 0:a.index)||r.state.index,filters:["".concat(m,":").concat(u)]},void 0===f?{}:f),attribute:m}))}}function N(e){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var k=["name","escapedValue"],I=["escapedValue","value"];function D(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function H(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?D(Object(r),!0).forEach(function(t){U(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function U(e,t,r){var n;return(n=function(e,t){if("object"!=N(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=N(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==N(n)?n:String(n))in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function L(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}var M=(0,c.createDocumentationMessageGenerator)({name:"refinement-list",connector:!0}),q=["isRefined","count:desc","name:asc"];let W=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.noop;return(0,s.checkRendering)(e,M()),function(r){var n,i,a,o=r||{},s=o.attribute,c=o.operator,u=void 0===c?"or":c,l=o.limit,f=void 0===l?10:l,h=o.showMore,d=void 0!==h&&h,p=o.showMoreLimit,m=void 0===p?20:p,g=o.sortBy,y=void 0===g?q:g,v=o.escapeFacetValues,b=void 0===v||v,_=o.transformItems,S=void 0===_?function(e){return e}:_;if(!s)throw Error(M("The `attribute` option is required."));if(!/^(and|or)$/.test(u))throw Error(M('The `operator` must one of: `"and"`, `"or"` (got "'.concat(u,'").')));if(!0===d&&m<=f)throw Error(M("`showMoreLimit` should be greater than `limit`."));var O=function(e){var t=e.name,r=e.escapedValue;return H(H({},L(e,k)),{},{value:r,label:t,highlighted:t})},R=[],P=!0,j=!1,w=function(){};function x(){w()}var C=function(){return function(){}};return{$$type:"ais.refinementList",init:function(t){e(H(H({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!0)},render:function(t){e(H(H({},this.getWidgetRenderState(t)),{},{instantSearchInstance:t.instantSearchInstance}),!1)},getRenderState:function(e,t){return H(H({},e),{},{refinementList:H(H({},e.refinementList),{},U({},s,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(t){var o=this,c=t.results,u=t.state,l=t.createURL,h=t.instantSearchInstance,p=t.helper,g=[],v=[];
1if(a&&i&&C||(a=A({instantSearchInstance:h,helper:p,attribute:s,widgetType:this.$$type}),i=function(e){a("click:internal",e),p.toggleFacetRefinement(s,e).search()},_=this,C=function(t){return function(r){var i=t.instantSearchInstance,a=t.results;if(""===r&&R)e(H(H({},_.getWidgetRenderState(H(H({},t),{},{results:n}))),{},{instantSearchInstance:i}),!1);else{var o={highlightPreTag:b?E.TAG_PLACEHOLDER.highlightPreTag:E.TAG_REPLACEMENT.highlightPreTag,highlightPostTag:b?E.TAG_PLACEHOLDER.highlightPostTag:E.TAG_REPLACEMENT.highlightPostTag};p.searchForFacetValues(s,r,Math.min(j?m:f,100),o).then(function(r){var o=S((b?(0,E.escapeFacets)(r.facetHits):r.facetHits).map(function(e){var t=e.escapedValue,r=e.value;return H(H({},L(e,I)),{},{value:t,label:r})}),{results:a});e(H(H({},_.getWidgetRenderState(H(H({},t),{},{results:n}))),{},{items:o,canToggleShowMore:!1,canRefine:!0,isFromSearch:!0,instantSearchInstance:i}),!1)})}}}),c){var _,T,F=c.getFacetValues(s,{sortBy:y,facetOrdering:y===q});g=S((v=F&&Array.isArray(F)?F:[]).slice(0,j?m:f).map(O),{results:c});var N=u.maxValuesPerFacet,k=j?m:f;P=N>k?v.length<=k:v.length<k,n=c,R=g,t.results&&(T=this,w=function(){j=!j,T.render(t)})}var D=C&&C(t),U=j&&R.length>f,M=d&&!P;return{createURL:function(e){return l(function(t){return o.getWidgetUiState(t,{searchParameters:u.resetPage().toggleFacetRefinement(s,e),helper:p})})},items:g,refine:i,searchForItems:D,isFromSearch:!1,canRefine:g.length>0,widgetParams:r,isShowingMore:j,canToggleShowMore:U||M,toggleShowMore:x,sendEvent:a,hasExhaustiveItems:P}},dispose:function(e){var r=e.state;t();var n=r.setQueryParameter("maxValuesPerFacet",void 0);return"and"===u?n.removeFacet(s):n.removeDisjunctiveFacet(s)},getWidgetUiState:function(e,t){var r,n,i=t.searchParameters,a="or"===u?i.getDisjunctiveRefinements(s):i.getConjunctiveRefinements(s);return r=H(H({},e),{},{refinementList:H(H({},e.refinementList),{},U({},s,a))}),n=s,r.refinementList&&(r.refinementList[n]&&0!==r.refinementList[n].length||delete r.refinementList[n],0===Object.keys(r.refinementList).length&&delete r.refinementList),r},getWidgetSearchParameters:function(e,t){var r=t.uiState,n="or"===u;if(e.isHierarchicalFacet(s)||n&&e.isConjunctiveFacet(s)||!n&&e.isDisjunctiveFacet(s))return e;var i=r.refinementList&&r.refinementList[s],a=n?e.addDisjunctiveFacet(s).removeDisjunctiveFacetRefinement(s):e.addFacet(s).removeFacetRefinement(s),o=Math.max(a.maxValuesPerFacet||0,d?m:f),c=a.setQueryParameter("maxValuesPerFacet",o);if(!i){var l=n?"disjunctiveFacetsRefinements":"facetsRefinements";return c.setQueryParameters(U({},l,H(H({},c[l]),{},U({},s,[]))))}return i.reduce(function(e,t){return n?e.addDisjunctiveFacetRefinement(s,t):e.addFacetRefinement(s,t)},c)}}}};function B(e,t){return(0,_.useConnector)(W,e,t)}var Q=e.i(565319),$=e.i(369893);let V=({label:e,...r})=>{let[n,i]=(0,w.useState)(!1),{canRefine:a,items:o,refine:s}=B({...r,operator:"or"}),{items:c}=S({includedAttributes:[r.attribute]}),{items:u}=(0,$.useHits)(),l=c.find(e=>e.attribute===r.attribute),f=l?.refinements.length??0,h=f>0,d=(0,w.useMemo)(()=>{let e=new Map,t=new Set;for(let e of u)if(e.syndications?.regions)for(let r of e.syndications.regions)t.add(r);for(let r of o){let n=[...t].find(e=>e.title===r.label);if(n&&"country"===n.type&&n.regions&&n.regions.length>0)for(let t of n.regions){let i=t.title;e.has(i)||e.set(i,{children:[],count:0,isRefined:!1,parentTitle:t.title,parentValue:t.title});let a=e.get(i);a&&(a.children.push({count:r.count,isRefined:r.isRefined,title:n.title,value:r.value}),a.count+=r.count,r.isRefined&&(a.isRefined=!0))}else{let t=r.label;e.has(t)||e.set(t,{children:[],count:r.count,isRefined:r.isRefined,parentTitle:r.label,parentValue:r.value})}}return[...e.values()].sort((e,t)=>e.parentTitle.localeCompare(t.parentTitle))},[o,u]),p=e=>{s(e),i(!1)};return(0,t.jsxs)(x.Root,{onOpenChange:i,children:[(0,t.jsx)(x.Trigger,{asChild:!0,children:(0,t.jsxs)("button",{"aria-label":`Select ${e}`,className:(0,Q.cn)("flex items-center space-x-[0.3rem] rounded py-[1.8rem] text-body focus:outline-none focus-visible:ring-2 focus-visible:ring-tealActive",h?"font-medium text-blueDark":"text-blueDark/[0.66]"),children:[(0,t.jsx)("span",{children:e}),h&&(0,t.jsxs)("span",{className:"ml-[0.3rem] font-medium text-tealActive",children:[" ","(",f,")"]}),!h&&(0,t.jsxs)("span",{className:"opacity-40",children:[" (",d.length,")"]}),(0,t.jsx)(O.Icon,{className:(0,Q.cn)("size-6 shrink-0 text-offNoir/50 transition-transform duration-300",n&&"rotate-180 duration-300"),name:"ChevronDown"})]})}),(0,t.jsx)(x.Portal,{children:(0,t.jsx)(x.Content,{className:"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-32 overflow-y-auto overflow-x-hidden border-[0.05rem] border-divider bg-blanc text-body shadow-[0_0.4rem_1.5rem_#0000001a] data-[state=closed]:animate-scaleOut data-[state=open]:animate-scaleIn",children:d.length>0&&d.map((e,r)=>{let{children:n,count:o,isRefined:c,parentTitle:u,parentValue:l}=e;return 0===n.length?(0,t.jsxs)(x.Item,{className:(0,Q.cn)("flex w-full cursor-pointer items-center justify-between gap-[0.8rem] px-[2.4rem] py-[1.6rem] text-start outline-none transition-colors duration-300 hover:bg-gray-100 focus:bg-gray-100",r>0&&"border-t border-divider",c&&"bg-gray-50"),disabled:!a,onClick:()=>{p(l)},children:[(0,t.jsx)("span",{className:(0,Q.cn)(c&&"font-medium text-tealActive"),children:u}),c&&(0,t.jsx)(O.Icon,{className:"size-6 shrink-0 text-tealActive",name:"Check"})]},l):(0,t.jsxs)(x.Sub,{children:[(0,t.jsxs)(x.SubTrigger,{className:(0,Q.cn)("flex w-full cursor-pointer items-center justify-between gap-[0.8rem] px-[2.4rem] py-[1.6rem] text-start outline-none transition-colors duration-300 hover:bg-gray-100 focus:bg-gray-100 data-[state=open]:bg-gray-100",r>0&&"border-t border-divider",c&&"bg-gray-50"),children:[(0,t.jsx)("span",{className:(0,Q.cn)(c&&"font-medium text-tealActive"),children:u}),(0,t.jsxs)("div",{className:"flex items-center gap-[0.4rem]",children:[c&&(0,t.jsx)(O.Icon,{className:"size-6 shrink-0 text-tealActive",name:"Check"}),(0,t.jsx)(O.Icon,{className:"size-4 shrink-0 text-offNoir/50",name:"ArrowRight"})]})]}),(0,t.jsx)(x.Portal,{children:(0,t.jsxs)(x.SubContent,{className:"z-50 min-w-32 overflow-hidden border-[0.05rem] border-divider bg-blanc text-body shadow-[0_0.4rem_1.5rem_#0000001a] data-[state=closed]:animate-scaleOut data-[state=open]:animate-scaleIn",sideOffset:2,children:[(0,t.jsxs)(x.Item,{className:(0,Q.cn)("flex w-full cursor-pointer items-center justify-between gap-[0.8rem] px-[2.4rem] py-[1.6rem] text-start outline-none transition-colors duration-300 hover:bg-gray-100 focus:bg-gray-100","border-b border-divider font-medium"),onClick:()=>{p(l)},children:[(0,t.jsxs)("span",{children:["All ",u]}
1),(0,t.jsxs)("span",{className:"text-offNoir/60",children:["(",o,")"]})]}),n.map(e=>(0,t.jsxs)(x.Item,{className:(0,Q.cn)("flex w-full cursor-pointer items-center justify-between gap-[0.8rem] px-[2.4rem] py-[1.6rem] text-start outline-none transition-colors duration-300 hover:bg-gray-100 focus:bg-gray-100",e.isRefined&&"bg-gray-50"),disabled:!a,onClick:()=>{s(e.value),i(!1)},children:[(0,t.jsx)("span",{className:(0,Q.cn)(e.isRefined&&"font-medium text-tealActive"),children:e.title}),(0,t.jsxs)("div",{className:"flex items-center gap-[0.4rem]",children:[e.isRefined&&(0,t.jsx)(O.Icon,{className:"size-6 shrink-0 text-tealActive",name:"Check"}),(0,t.jsxs)("span",{className:(0,Q.cn)("text-offNoir/60",e.isRefined&&"text-tealActive"),children:["(",e.count,")"]})]})]},e.value))]})})]},l)})})})]})},z=({isHierarchical:e,label:r,...n})=>{let[a,o]=(0,w.useState)(!1),s=(0,i.useTranslations)("ContentTypes"),{canRefine:c,canToggleShowMore:u,items:l,refine:f,toggleShowMore:h}=B({...n,operator:"or"}),{items:d}=S({includedAttributes:[n.attribute]});if(e&&"regions.title"===n.attribute)return(0,t.jsx)(V,{label:r,...n});let p=d.find(e=>e.attribute===n.attribute),m=p?.refinements.length??0,g=m>0,y="contentSummary.type"===n.attribute||"contentSummary.typeSimplified"===n.attribute?l.map(e=>({count:e.count,formattedLabel:s(e.value),isActive:e.isRefined,originalItems:[e]})):l.map(e=>({count:e.count,formattedLabel:e.label,isActive:e.isRefined,originalItems:[e]}));return(0,t.jsxs)(x.Root,{onOpenChange:o,children:[(0,t.jsx)(x.Trigger,{asChild:!0,children:(0,t.jsxs)("button",{"aria-label":`Select ${r}`,className:(0,Q.cn)("flex items-center space-x-[0.3rem] rounded py-[1.8rem] text-body focus:outline-none focus-visible:ring-2 focus-visible:ring-tealActive",g?"font-medium text-blueDark":"text-blueDark/[0.66]"),children:[(0,t.jsx)("span",{children:r}),g&&(0,t.jsxs)("span",{className:"ml-[0.3rem] font-medium text-tealActive",children:[" ","(",m,")"]}),!g&&(0,t.jsxs)("span",{className:"opacity-40",children:[" (",y.length,")"]}),(0,t.jsx)(O.Icon,{className:(0,Q.cn)("size-6 shrink-0 text-offNoir/50 transition-transform duration-300",a&&"rotate-180 duration-300"),name:"ChevronDown"})]})}),(0,t.jsx)(x.Portal,{children:(0,t.jsxs)(x.Content,{className:"z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-32 overflow-y-auto overflow-x-hidden border-[0.05rem] border-divider bg-blanc text-body shadow-[0_0.4rem_1.5rem_#0000001a] data-[state=closed]:animate-scaleOut data-[state=open]:animate-scaleIn",children:[y.length>0&&y.map((e,r)=>{let{formattedLabel:n,isActive:i,originalItems:a}=e;return(0,t.jsxs)(x.Item,{className:(0,Q.cn)("flex w-full cursor-pointer items-center justify-between gap-[0.8rem] px-[2.4rem] py-[1.6rem] text-start outline-none transition-colors duration-300 hover:bg-gray-100 focus:bg-gray-100",r>0&&"border-t border-divider",i&&"bg-gray-50"),disabled:!c,onClick:()=>{for(let e of a)f(e.value);o(!1)},children:[(0,t.jsx)("span",{className:(0,Q.cn)(i&&"font-medium text-tealActive"),children:n}),i&&(0,t.jsx)(O.Icon,{className:"size-6 shrink-0 text-tealActive",name:"Check"})]},n)}),u&&(0,t.jsx)(x.Item,{onClick:()=>{h()},children:"Show more!"})]})})]})};e.s(["ContentFilters",0,({attributeMap:e,enabledFilters:i,t:a})=>{let{centerSlug:o}=(0,r.useCenterSlug)(),s={contentType:"contentSummary.typeSimplified",experts:`expertsByCenter.${o}`,regions:"regions.title",topics:"topics.title",years:"year"},c=e??s,u=[{component:(0,t.jsx)(z,{attribute:c.topics??s.topics,label:a("topics"),limit:250,sortBy:["name:asc"]}),condition:i.topics,key:"topics"},{component:(0,t.jsx)(z,{attribute:c.experts??s.experts,label:a("experts"),limit:500,sortBy:["name:asc"]}),condition:i.experts,key:"experts"},{component:(0,t.jsx)(z,{attribute:c.regions??s.regions,isHierarchical:!0,label:a("regions"),limit:250,sortBy:["name:asc"]}),condition:i.regions,key:"regions"},{component:(0,t.jsx)(z,{attribute:c.years??s.years,label:a("years"),limit:250,sortBy:["name:desc"]}),condition:i.years,key:"years"},{component:(0,t.jsx)(z,{attribute:c.contentType??s.contentType,label:a("type"),limit:250,sortBy:["name:asc"]}),condition:i.contentType,key:"contentType"}].filter(e=>e.condition);return(0,t.jsxs)("div",{className:"relative flex flex-wrap gap-[1.6rem]",children:[u.map((e,r)=>(0,t.jsxs)("div",{className:"flex items-center gap-[1.6rem]",children:[e.component,r<u.length-1&&(0,t.jsx)(n.Separator,{orientation:"vertical"})]},e.key)),(0,t.jsx)(j,{})]})}],865117),e.s([],383363);var G=["name","escapedValue","path"];function J(e){return(J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function K(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],c=!0,u=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){u=!0,i=e}
1finally{try{if(!c&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return X(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return X(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function Z(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(r),!0).forEach(function(t){ee(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function ee(e,t,r){var n;return(n=function(e,t){if("object"!=J(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=J(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"),(t="symbol"==J(n)?n:String(n))in e)?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var et=(0,c.createDocumentationMessageGenerator)({name:"menu",connector:!0}),er=["isRefined","name:asc"];let en=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.noop;return(0,s.checkRendering)(e,et()),function(r){var n,i,a,o=r||{},s=o.attribute,c=o.limit,u=void 0===c?10:c,l=o.showMore,f=void 0!==l&&l,h=o.showMoreLimit,d=void 0===h?20:h,p=o.sortBy,m=void 0===p?er:p,g=o.transformItems,y=void 0===g?function(e){return e}:g;if(!s)throw Error(et("The `attribute` option is required."));if(!0===f&&d<=u)throw Error(et("The `showMoreLimit` option must be greater than `limit`."));var v=!1,b=function(){};function _(){b()}return{$$type:"ais.menu",init:function(t){var r=t.instantSearchInstance;e(Z(Z({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!0)},render:function(t){var r=t.instantSearchInstance;e(Z(Z({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!1)},dispose:function(e){var r=e.state;return t(),r.removeHierarchicalFacet(s).setQueryParameter("maxValuesPerFacet",void 0)},getRenderState:function(e,t){return Z(Z({},e),{},{menu:Z(Z({},e.menu),{},ee({},s,this.getWidgetRenderState(t)))})},getWidgetRenderState:function(e){var t,o=this,c=e.results,l=e.createURL,h=e.instantSearchInstance,p=e.helper,g=[],S=!1;if(n||(n=A({instantSearchInstance:h,helper:p,attribute:s,widgetType:this.$$type})),i||(i=function(e){return l(function(t){return o.getWidgetUiState(t,{searchParameters:p.state.resetPage().toggleFacetRefinement(s,e),helper:p})})}),a||(a=function(e){var t=K(p.getHierarchicalFacetBreadcrumb(s),1)[0];n("click:internal",e||t),p.toggleFacetRefinement(s,e||t).search()}),e.results&&(t=this,b=function(){v=!v,t.render(e)}),c){var O=c.getFacetValues(s,{sortBy:m,facetOrdering:m===er}),R=O&&!Array.isArray(O)&&O.data?O.data:[];S=f&&(v||R.length>(v?d:u)),g=y(R.slice(0,v?d:u).map(function(e){var t=e.name,r=e.escapedValue;return Z(Z({},(e.path,function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,G))),{},{label:t,value:r})}),{results:c})}return{items:g,createURL:i,refine:a,sendEvent:n,canRefine:g.length>0,widgetParams:r,isShowingMore:v,toggleShowMore:_,canToggleShowMore:S}},getWidgetUiState:function(e,t){var r,n,i=K(t.searchParameters.getHierarchicalFacetBreadcrumb(s),1
1)[0];return r=Z(Z({},e),{},{menu:Z(Z({},e.menu),{},ee({},s,i))}),n=s,r.menu&&(void 0===r.menu[n]&&delete r.menu[n],0===Object.keys(r.menu).length&&delete r.menu),r},getWidgetSearchParameters:function(e,t){var r=t.uiState,n=r.menu&&r.menu[s];if(e.isConjunctiveFacet(s)||e.isDisjunctiveFacet(s))return e;var i=e.removeHierarchicalFacet(s).addHierarchicalFacet({name:s,attributes:[s]}),a=Math.max(i.maxValuesPerFacet||0,f?d:u),o=i.setQueryParameter("maxValuesPerFacet",a);return n?o.addHierarchicalFacetRefinement(s,n):o.setQueryParameters({hierarchicalFacetsRefinements:Z(Z({},o.hierarchicalFacetsRefinements),{},ee({},s,[]))})}}}},ei=Array.from({length:26}).map((e,t)=>String.fromCodePoint(t+65));function ea(e){return(ea="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function es(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eo(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=function(e){var t=function(e,t){if("object"!=ea(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=ea(n))return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==ea(t)?t:String(t)}(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eo(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}e.s(["NameFilter",0,({attribute:e="contributors.initial"})=>{var r;let{items:n,refine:i}=(r={attribute:e,limit:26},(0,_.useConnector)(en,r,void 0)),a=n.find(e=>e.isRefined),o=a?.value,s=(e,t)=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),t?i(t):o&&i(o))},c=e=>{e?i(e):o&&i(o)};return(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-center gap-1 py-4 opacity-70",children:[(0,t.jsx)("button",{"aria-label":"Show all",className:(0,Q.cn)("flex h-[3.2rem] min-w-[2.8rem] items-center justify-center gap-2 rounded-[0.4rem] border px-[0.35rem] py-[0.15rem] text-center text-blueDark transition-all hover:border-tealDark md:px-2 md:py-1",o?"border-transparent":"border-noir text-[2.4rem] font-bold"),onClick:()=>{c(null)},onKeyDown:e=>{s(e,null)},tabIndex:0,children:"All"}),ei.map(e=>{let r=n.find(t=>t.value===e),i=o===e,a=r&&r.count>0;return(0,t.jsx)("button",{"aria-label":`Filter by letter ${e}`,className:(0,Q.cn)("flex h-[3.2rem] min-w-[2.8rem] items-center justify-center gap-2 rounded-[0.4rem] border px-[0.35rem] py-[0.15rem] text-center text-body text-blueDark transition-all hover:border-tealDark md:px-2 md:py-1",i?"border-noir text-[2.4rem] font-bold":"border-transparent",!a&&"cursor-not-allowed opacity-30 hover:border-transparent"),disabled:!a,onClick:()=>{c(e)},onKeyDown:t=>{s(t,e)},tabIndex:0,children:e},e)})]})}],15795),e.s([],742073);var ec=(0,c.createDocumentationMessageGenerator)({name:"search-box",connector:!0}),eu=function(e,t){return t(e)};let el=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.noop;return(0,s.checkRendering)(e,ec()),function(r){var n,i,a=(r||{}).queryHook,o=void 0===a?eu:a;return{$$type:"ais.searchBox",init:function(t){var r=t.instantSearchInstance;e(es(es({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!0)},render:function(t){var r=t.instantSearchInstance;e(es(es({},this.getWidgetRenderState(t)),{},{instantSearchInstance:r}),!1)},dispose:function(e){var r=e.state;return t(),r.setQueryParameter("query",void 0)},getRenderState:function(e,t){return es(es({},e),{},{searchBox:this.getWidgetRenderState(t)})},getWidgetRenderState:function(e){var t=e.helper,a=e.instantSearchInstance,s=e.state;return n||(n=function(e){o(e,function(e){return t.setQuery(e).search()})},i=function(){t.setQuery("").search()}),{query:s.query||"",refine:n,clear:i,widgetParams:r,isSearchStalled:"stalled"===a.status}},getWidgetUiState:function(e,t){var r=t.searchParameters.query||"";return""===r||e&&e.query===r?e:es(es({},e),{},{query:r})},getWidgetSearchParameters:function(e,t){var r=t.uiState;return e.setQueryParameter("query",r.query||"")}}}};e.s(["SearchBox",0,({placeholder:e,...r})=>{let{clear:n,query:i,refine:a}=(0,_.useConnector)(el,r,void 0);return(0,t.jsxs)("div",{className:"relative flex flex-1",children:[(0,t.jsx)(O.Icon,{"aria-hidden":"true","aria-label":"Search icon",className:"absolute start-[1.6rem] top-1/2 size-[1.8rem] shrink-0 -translate-y-1/2 text-offNoir/30",name:"Search"}),(0,t.jsx)("input",{"aria-label":"Search",className:"w-full rounded-[2px] bg-grey pb-[1.4rem] pe-[
11.6rem] ps-[5rem] pt-[1.6rem] font-serif text-headlineH5Display placeholder:text-greyXDark",onChange:e=>{a(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&e.preventDefault()},placeholder:e,role:"searchbox",type:"text",value:i}),i&&(0,t.jsx)("button",{"aria-label":"Clear search",className:(0,Q.cn)("absolute end-[1.6rem] top-1/2 -translate-y-1/2"),onClick:()=>{n()},type:"button",children:(0,t.jsx)(O.Icon,{className:"size-[2.5rem] shrink-0",name:"LucideX"})})]})}],929190),e.s([],91161)},814942,e=>{"use strict";var t=e.i(226132),r=e.i(398040),n=e.i(920509),i=e.i(574755),a=e.i(948259),o=e.i(369893),s=e.i(268889),c=e.i(520234);e.i(161148);var u=e.i(877957),l=e.i(565319);e.i(170734);var f=e.i(737709);e.i(383363);var h=e.i(865117);e.i(742073);var d=e.i(15795);e.i(91161);var p=e.i(929190);e.i(894538);var m=e.i(962890);e.i(883658);var g=e.i(813054);e.i(814647);var y=e.i(592421);e.i(133990);var v=e.i(112708);let b=({allResultsFeatured:e=!1,asGrid:n=!1,grayscale:a=!1,hasFeaturedResults:o=!1,hideResultCount:s=!1,results:c,showResultDescription:u=!1,totalResults:f})=>{let h=(0,i.useTranslations)("Search"),d=(0,i.useFormatter)(),{centerSlug:p}=(0,y.useCenterSlug)(),{featuredResult:m,remainingResults:g,rowResults:b}=(0,r.useMemo)(()=>{if(n||!o||0===c.length)return{featuredResult:null,remainingResults:c,rowResults:[]};let[e,...t]=c,r=t.slice(0,3);return{featuredResult:e,remainingResults:t.slice(3),rowResults:r}},[n,c,o]),S=(0,r.useMemo)(()=>{if(!m)return null;let{id:t,...r}=_(m,u,e,d,p);return[t,{...r,contentSummary:{...r.contentSummary,isFeatured:!0},grayscale:a}]},[m,u,e,d,p,a]);return(0,t.jsx)("div",{className:(0,l.cn)("mx-auto w-full px-[2.4rem] tablet:px-[6rem]",n&&"px-0 tablet:px-0"),children:(0,t.jsxs)("div",{className:"flex flex-col gap-[2.4rem] pt-[5rem]",children:[!s&&(0,t.jsx)("span",{className:"font-mono text-labelSmall uppercase opacity-70",children:h("resultCount",{count:f})}),(0,t.jsxs)("div",{className:(0,l.cn)("flex flex-col gap-[4.8rem]",n&&f>2&&"desktop:grid desktop:grid-cols-3 desktop:gap-[2.4rem]"),children:[S&&(0,r.createElement)(v.ContentCard,{...S[1],key:S[0]}),b.length>0&&(0,t.jsx)("div",{className:"grid grid-cols-1 gap-[2.4rem] desktop:grid-cols-3",children:b.map(({id:t,...n})=>(0,r.createElement)(v.ContentCard,{..._(n,u,e,d,p),grayscale:a,key:t}))}),g.map(({id:t,...i})=>(0,r.createElement)(v.ContentCard,{..._(i,u,e,d,p),className:(0,l.cn)(n&&"p-0"),grayscale:a,key:t}))]})]})})};function _(e,t,r=!1,i,a){let o=[],s=(0,c.match)(e.contentSummary.event).with({eventDate:c.P.string,eventTime:c.P.string,isFutureEvent:c.P.boolean},({eventDate:e,eventTime:t})=>{let r=n.DateTime.fromISO(e).isValid?n.DateTime.fromISO(e):n.DateTime.fromFormat(e,"MMMM d, yyyy");return{eventDate:e,eventTime:t,isFutureEvent:r.isValid&&r.diffNow().toMillis()>0}}).otherwise(e=>e);e.contentSummary.publishedAt&&!e.contentSummary.event&&o.push(i.dateTime(e.contentSummary.publishedAt,{dateStyle:"long"}));let u=!e.blog&&"global"!==a&&e.centers?.some(({slug:e})=>e===a)?`/${a}`:"",l=(0,c.match)(e.contentSummary).with({href:c.P.string.includes("://")},()=>!0).otherwise(()=>!1),f=e.contentSummary.href.startsWith(u)||l?e.contentSummary.href:`${u}${e.contentSummary.href}`;return{...e,contentSummary:{...e.contentSummary,additionalInfo:o,descriptionRichText:t?e.contentSummary.descriptionRichText:void 0,event:s,href:f,isFeatured:r}}}e.s(["ContentList",0,({allResultsFeatured:e=!1,asGrid:y=!1,className:v,enabledFilters:_,grayscale:S=!1,hasFeaturedResults:O=!1,hasSearch:R=!1,hideEmptyResultsTitle:P=!1,hideFutureEvents:j=!1,hideResultCount:w=!1,limit:x=25,nameFilter:E=!1,pageLanguage:C,searchPlaceholder:T="",showResultDescription:F=!1,title:A=""})=>{let[N,k]=(0,r.useState)(!0),I=(0,r.useRef)(null),D=(0,i.useTranslations)("Search"),{currentRefinement:H,nbHits:U,nbPages:L,refine:M}=(0,s.usePagination)(),{items:q}=(0,o.useHits)(),W=(0,r.useMemo)(()=>(0,c.match)(j).with(!1,()=>q).with(!0,()=>q.filter(e=>(0,c.match)(e.contentSummary.event).with(c.P.nullish,()=>!0).with({eventDate:c.P.string},({eventDate:e})=>{let t=n.DateTime.fromISO(e).isValid?n.DateTime.fromISO(e):n.DateTime.fromFormat(e,"MMMM d, yyyy");return!(t.isValid&&t.diffNow().toMillis()>0)}).otherwise(()=>!0))).exhaustive(),[q,j]),B=(0,g.generatePagination)({currentPage:H,onNextClick:()=>{M(H+1)},onPageClick:M,onPreviousClick:()=>{M(H-1)},onScrollToTop:()=>{I.current?.scrollIntoView({behavior:"smooth",block:"start"})},t:D,totalPages:L}),Q=_.contentType||_.experts||_.regions||_.topics||_.years;return(0,t.jsxs)(m.Section,{className:(0,l.cn)("gap-[1.6rem]",v),ref:I,children:[(0,t.jsx)(a.Configure,{hitsPerPage:x}),A&&!P&&(0,t.jsx)("div",{className:"bg-greyLight max-tablet:hidden",children:(0,t.jsx)(f.Constrainer,{className:"pt-[9.6rem]",children:(0,t.jsx)("h2",{className:"py-[1.6rem] font-serif text-headlineH3Dis
1play",children:A})})}),(0,t.jsx)(f.Constrainer,{children:(0,t.jsxs)("div",{className:"flex flex-col gap-[5rem] pb-[5rem]",children:[(R||E||Q)&&(0,t.jsx)("div",{className:"flex flex-col gap-[1.6rem]",children:(0,t.jsxs)("div",{className:"mx-auto flex w-full flex-col gap-[2.4rem]",children:[R&&(0,t.jsxs)("div",{className:"flex w-full items-center gap-[2.8rem]",children:[(0,t.jsx)(p.SearchBox,{placeholder:T}),(0,t.jsx)(u.Button,{className:"max-w-fit",iconName:"Filters",onClick:()=>{k(e=>!e)},variant:"secondary",children:(0,t.jsx)("span",{className:"hidden tablet:inline-block",children:D("filters")})})]}),E&&"en"===C&&(0,t.jsx)("div",{className:"flex items-center justify-center gap-4",children:(0,t.jsx)(d.NameFilter,{})}),N&&(0,t.jsx)(h.ContentFilters,{enabledFilters:_,t:D})]})}),(0,t.jsx)(b,{allResultsFeatured:e,asGrid:y,grayscale:S,hasFeaturedResults:O,hideResultCount:w,results:W,showResultDescription:F,totalResults:j?U-(q.length-W.length):U}),B]})})]})}],814942)},287401,e=>{"use strict";var t=e.i(226132),r=e.i(948259);e.i(365461);var n=e.i(333991);let i=["article","book","commentary","conference","edition","event","feature","inTheMedia","legacyinthemedia","other","paper","podcast","podcastEpisode","post","posts","pressrelease","questionAnswer","report","research","testimony","video","videos"];e.s(["ContentTypeFilter",0,({contentTypes:e=i,extendFilters:a=[],filterByCenter:o=!0,...s})=>{let{id:c}=(0,n.useCenter)(),u=[e.length>0&&e.length!==i.length?`(${e.map(e=>`contentSummary.type:${e}`).join(" || ")})`:null,...a,o&&c?`centers.id:${c}`:null].filter(Boolean).join(" && ");return(0,t.jsx)(r.Configure,{...s,filters:u})}])},263483,825447,e=>{"use strict";var t=e.i(226132),r=e.i(398040);let n=(0,e.i(868085).tv)({base:"self-stretch bg-divider",defaultVariants:{orientation:"horizontal"},variants:{orientation:{horizontal:"h-px",vertical:"w-px"}}}),i=(0,r.forwardRef)(({className:e,decorative:r=!1,orientation:i,...a},o)=>(0,t.jsx)("div",{className:n({className:e,orientation:i}),ref:o,...r?{role:"none"}:{"aria-orientation":"vertical"===i?i:void 0,role:"separator"},...a}));i.displayName="Separator",e.s(["Separator",0,i],825447),e.s([],263483)}]);

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.