@coveo/quantic 3.43.5 → 3.43.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -24,7 +24,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
24
24
  `)}
25
25
 
26
26
  ${t}
27
- `;return new ai(r)}var ai=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},gt=class{constructor(e){ie(this,"definition");this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let o in this.definition){let i=this.definition[o].validate(r[o]);i&&n.push(`${o}: ${i}`)}if(n.length)throw wA(n,t);return r}get default(){let e={};for(let t in this.definition){let r=this.definition[t].default;r!==void 0&&(e[t]=r)}return e}},De=class{constructor(e={}){ie(this,"baseConfig");this.baseConfig=e}validate(e){return this.baseConfig.required&&se(e)?"value is required.":null}get default(){return this.baseConfig.default instanceof Function?this.baseConfig.default():this.baseConfig.default}get required(){return this.baseConfig.required===!0}};function Je(e){return e===void 0}function AA(e){return e===null}function se(e){return Je(e)||AA(e)}var fe=class{constructor(e={}){ie(this,"value");this.value=new De(e)}validate(e){let t=this.value.validate(e);return t||(xA(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function xA(e){return Je(e)||Wf(e)}function Wf(e){return typeof e=="boolean"}var oe=class{constructor(e={}){ie(this,"config");ie(this,"value");this.config=e,this.value=new De(e)}validate(e){let t=this.value.validate(e);return t||(CA(e)?e<this.config.min?`minimum value of ${this.config.min} not respected.`:e>this.config.max?`maximum value of ${this.config.max} not respected.`:null:"value is not a number.")}get default(){return this.value.default}get required(){return this.value.required}};function CA(e){return Je(e)||Kf(e)}function Kf(e){return typeof e=="number"&&!Number.isNaN(e)}var EA=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,z=class{constructor(e={}){ie(this,"value");ie(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new De(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:o,ISODate:i}=this.config,a=this.value.validate(e);if(a)return a;if(Je(e))return null;if(!Ia(e))return"value is not a string.";if(!t&&!e.length)return"value is an empty string.";if(r)try{new URL(e)}catch{return"value is not a valid URL."}return n&&!n.test(e)?`value did not match provided regex ${n}`:o&&!o.includes(e)?`value should be one of: ${o.join(", ")}.`:i&&!(EA.test(e)&&new Date(e).toString()!=="Invalid Date")?"value is not a valid ISO8601 date string":null}get default(){return this.value.default}get required(){return this.value.required}};function Ia(e){return Object.prototype.toString.call(e)==="[object String]"}var ne=class{constructor(e={}){ie(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(Je(e))return this.config.options.required?"value is required and is currently undefined":null;if(!Yf(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&se(e[r]))return`value does not contain ${r}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let o=e[r],i=n.validate(o);i!==null&&(t+=` ${i}`)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function Yf(e){return e!==void 0&&typeof e=="object"}var ve=class{constructor(e={}){ie(this,"config");ie(this,"value");this.config=e,this.value=new De(this.config)}validate(e){if(!se(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(se(e))return null;if(this.config.max!==void 0&&e.length>this.config.max)return`value contains more than ${this.config.max}`;if(this.config.min!==void 0&&e.length<this.config.min)return`value contains less than ${this.config.min}`;if(this.config.each!==void 0){let r="";return e.forEach(n=>{this.config.each.required&&se(n)&&(r=`value is null or undefined: ${e.join(",")}`);let o=this.validatePrimitiveValue(n,this.config.each);o!==null&&(r+=` ${o}`)}),r===""?null:r}return null}validatePrimitiveValue(e,t){return Wf(e)||Ia(e)||Kf(e)||Yf(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function Xf(e){return Array.isArray(e)}var Cl=class{constructor(e){ie(this,"config");ie(this,"value");this.config=e,this.value=new De(e)}validate(e){let t=this.value.validate(e);return t!==null?t:Je(e)||Object.values(this.config.enum).find(n=>n===e)?null:"value is not in enum."}get default(){return this.value.default}get required(){return this.value.required}};m();d();f();p();function Zf(e){return Array.isArray(e)}function Ta(e){return e.trim()===""}var RA=new Set(["1",1,"yes",!0]);function El(){if(typeof navigator>"u"||typeof window>"u")return!1;let e=navigator,t=window;return[e.globalPrivacyControl,e.doNotTrack,e.msDoNotTrack,t.doNotTrack].some(r=>RA.has(r))}function Jf(e){let t={};for(let[r,n]of e)t[r]=n;return t}function si(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function _a(e,t,r={}){let n;return(...o)=>{let i=r.isImmediate&&!n;if(clearTimeout(n),n=setTimeout(()=>{n=void 0,r.isImmediate||e.apply(void 0,o)},t),i)return e.apply(void 0,o)}}function IA(e){if(Ta(e.openingDelimiter)||Ta(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(se(e.content)||Ta(e.content))return e.content;if(e.highlights.length===0)return Hn(e.content);let t=e.content.length,r="",n=0;for(let o=0;o<e.highlights.length;o++){let i=e.highlights[o],a=i.offset,s=a+i.length;if(s>t)break;r+=Hn(e.content.slice(n,a)),r+=e.openingDelimiter,r+=Hn(e.content.slice(a,s)),r+=e.closingDelimiter,n=s}return n!==t&&(r+=Hn(e.content.slice(n))),r}function TA(e,t){return e=Hn(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,i)=>n?Rl(n,t.notMatchDelimiters):o?Rl(o,t.exactMatchDelimiters):i?Rl(i,t.correctionDelimiters):r)}function Rl(e,t){return t?t.open+e+t.close:e}function Hn(e){let t={"&":"&amp;","<":"&lt;",">":"&gt;","\"":"&quot;","'":"&#x27;","`":"&#x60;"},r=`(?:${Object.keys(t).join("|")})`,n=RegExp(r),o=RegExp(r,"g");return n.test(e)?e.replace(o,i=>t[i]):e}m();d();f();p();var dm=qt(sm(),1);m();d();f();p();var $t=new Error("Failed to load reducers."),zn=class extends Error{constructor(){super(),this.name="UnauthorizedTokenError",this.message="The token being used to perform the request is unauthorized. It may be expired or invalid."}},Jr=class extends Error{constructor(r,n){super();ie(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};m();d();f();p();function cm(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function um(e){return typeof e!="object"||!e?!1:Object.values(e).every(ex)}function ex(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function lm(e){return e===429}var jt=class e{static call(t){return _asyncToGenerator(function*(){let r=tx(t),{logger:n}=t,o=yield e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:i,...a}=o,s=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(){let c=yield A(i,a);if(lm(c.status))throw c;return c});return function s(){return _ref.apply(this,arguments)}}();try{let c=yield(0,dm.backOff)(s,{startingDelay:100,timeMultiple:2,maxDelay:800,numOfAttempts:4,jitter:"full",retry:function(){var _ref2=_asyncToGenerator(function*(u){let g=u&&lm(u.status);return g&&(n.info("Platform retrying request"),yield new Promise(v=>setTimeout(v,1e3))),g});return function retry(_x2){return _ref2.apply(this,arguments)}}()});switch(c.status){case 419:case 401:throw n.info("Platform renewing token"),new zn;case 404:throw new Jr(i,c.status);default:return n.info({response:c,requestInfo:o},"Platform response"),c}}catch(c){return c.message==="Failed to fetch"?new Jr(i):c}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:a}=r,{signal:s,...c}=t,u=si(c);try{let g=yield o(t,n,a);return{...t,...g}}catch(g){i.error(g,"Platform request preprocessing failed. Returning default request options.")}return u})()}};function Rt(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function Wn(e,t,r="prod"){return e??Rt(t,r)}function wr(e,t="prod"){return`${Rt(e,t)}/rest/search/v2`}function Oa(e,t="prod"){return`${Rt(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function tx(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:a}=e,s=e.method==="POST"||e.method==="PUT",c=rx(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...(s&&{body:c}),signal:a}}function rx(e,t){return t==="application/x-www-form-urlencoded"?um(e)?cm(e):"":JSON.stringify(e)}m();d();f();p();m();d();f();p();var Pa=e=>e;m();d();f();p();m();d();f();p();function Na(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function Qt(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:Na(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:Na(),extendedResults:{},searchAction:void 0}}m();d();f();p();function Ar(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...i}=e;return i}var xr=e=>{let{response:t}=e;return t.body?nx(e):ox(t)},nx=e=>ax(e)?sx(e):ix(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},ox=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function ix(e){return e.body.statusCode!==void 0}function ax(e){return e.body.exception!==void 0}var sx=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});m();d();f();p();var Cr=class{constructor(){ie(this,"currentAbortController",null)}enqueue(t,r){var _this=this;return _asyncToGenerator(function*(){let n=_this.currentAbortController;_this.currentAbortController=new l.AbortController;let o=_this.currentAbortController;n&&(r.warnOnAbort&&r.logger.warn("Cancelling current pending search query"),n.abort());try{return yield t(o?.signal??null)}finally{_this.currentAbortController===o&&(_this.currentAbortController=null)}})()}};m();d();f();p();m();d();f();p();var li=class{constructor(t){ie(this,"_basePath");ie(this,"_params",{});this._basePath=t}addParam(t,r){this._params={...this.params,[t]:r}}get basePath(){return this._basePath}get params(){return this._params}get hasParams(){return Object.entries(this._params).length}get href(){return this.hasParams?`${this.basePath}?${Object.entries(this.params).map(([t,r])=>`${t}=${encodeURIComponent(r)}`).join("&")}`:this.basePath}};m();d();f();p();function pm(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}m();d();f();p();var ir=(e,t,r,n)=>{let o=new li(`${e.url}${n}`);return o.addParam("organizationId",e.organizationId),e.authentication&&o.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:o.href,origin:"searchApiFetch"}};var fm=/*#__PURE__*/function(){var _ref3=_asyncToGenerator(function*(e,t){let r=yield jt.call({...ir(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:Ar(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=pm(r),o=yield r.arrayBuffer(),a=new TextDecoder(n).decode(o);return cx(a)?{success:a}:{error:xr({response:r,body:a})}});return function fm(_x3,_x4){return _ref3.apply(this,arguments)}}();function cx(e){return typeof e=="string"}m();d();f();p();function ux(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function lx(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Fa(e,t){if(t&&e.name==="AbortError")return{error:lx(e)};if(e instanceof Jr)return{error:ux(e)};throw e}var Da=class{constructor(t){ie(this,"options",t);ie(this,"apiCallsQueues",{unknown:new Cr,mainSearch:new Cr,facetValues:new Cr,foldingCollection:new Cr,instantResults:new Cr})}plan(t){var _this2=this;return _asyncToGenerator(function*(){let r=yield jt.call({...ir(t,"POST","application/json","/plan"),requestParams:Ar(t),requestMetadata:{method:"plan"},..._this2.options});if(r instanceof Error)return Fa(r);let n=yield r.json();return px(n)?{success:n}:{error:xr({response:r,body:n})}})()}querySuggest(t){var _this3=this;return _asyncToGenerator(function*(){let r=yield jt.call({...ir(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:Ar(t),..._this3.options});if(r instanceof Error)return Fa(r);let n=yield r.json(),o={response:r,body:n};return dx(n)?{success:(yield _this3.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:xr(o)}})()}search(t,r){var _this4=this;return _asyncToGenerator(function*(){let n=r?.origin??"unknown",o=yield _this4.apiCallsQueues[n].enqueue(s=>jt.call({...ir(t,"POST","application/json",""),requestParams:Ar(t),requestMetadata:{method:"search",origin:r?.origin},..._this4.options,signal:s??void 0}),{logger:_this4.options.logger,warnOnAbort:!r?.disableAbortWarning});if(o instanceof Error)return Fa(o,r?.disableAbortWarning);let i=yield o.json(),a={response:o,body:i};return mm(i)?(a.body=gm(i),{success:(yield _this4.options.postprocessSearchResponseMiddleware(a)).body}):{error:xr(a)}})()}facetSearch(t){var _this5=this;return _asyncToGenerator(function*(){let r=yield jt.call({...ir(t,"POST","application/json","/facet"),requestParams:Ar(t),requestMetadata:{method:"facetSearch"},..._this5.options});if(r instanceof Error)throw r;let n=yield r.json(),o={response:r,body:n};return(yield _this5.options.postprocessFacetSearchResponseMiddleware(o)).body})()}recommendations(t){var _this6=this;return _asyncToGenerator(function*(){let r=yield jt.call({...ir(t,"POST","application/json",""),requestParams:Ar(t),requestMetadata:{method:"recommendations"},..._this6.options});if(r instanceof Error)throw r;let n=yield r.json();if(mm(n)){let o={response:r,body:n};return o.body=gm(n),{success:(yield _this6.options.postprocessSearchResponseMiddleware(o)).body}}return{error:xr({response:r,body:n})}})()}html(t){var _this7=this;return _asyncToGenerator(function*(){return fm(t,{..._this7.options})})()}fieldDescriptions(t){var _this8=this;return _asyncToGenerator(function*(){let r=yield jt.call({...ir(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},..._this8.options});if(r instanceof Error)throw r;let n=yield r.json();return fx(n)?{success:n}:{error:xr({response:r,body:n})}})()}},Ma=e=>e.success!==void 0,ht=e=>e.error!==void 0;function mm(e){return e.results!==void 0}function gm(e){let t=Na();return se(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}function dx(e){return e.completions!==void 0}function px(e){return e.preprocessingOutput!==void 0}function fx(e){return e.fields!==void 0}m();d();f();p();var hm=e=>e,ym=e=>e,vm=e=>e;m();d();f();p();m();d();f();p();m();d();f();p();function et(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var mx=typeof Symbol=="function"&&Symbol.observable||"@@observable",Sm=mx,Ml=()=>Math.random().toString(36).substring(7).split("").join("."),gx={INIT:`@@redux/INIT${Ml()}`,REPLACE:`@@redux/REPLACE${Ml()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ml()}`},qa=gx;function Ht(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function ql(e,t,r){if(typeof e!="function")throw new Error(et(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(et(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(et(1));return r(ql)(e,t)}let n=e,o=t,i=new Map,a=i,s=0,c=!1;function u(){a===i&&(a=new Map,i.forEach((C,R)=>{a.set(R,C)}))}function g(){if(c)throw new Error(et(3));return o}function v(C){if(typeof C!="function")throw new Error(et(4));if(c)throw new Error(et(5));let R=!0;u();let T=s++;return a.set(T,C),function(){if(R){if(c)throw new Error(et(6));R=!1,u(),a.delete(T),i=null}}}function E(C){if(!Ht(C))throw new Error(et(7));if(typeof C.type>"u")throw new Error(et(8));if(typeof C.type!="string")throw new Error(et(17));if(c)throw new Error(et(9));try{c=!0,o=n(o,C)}finally{c=!1}return(i=a).forEach(T=>{T()}),C}function y(C){if(typeof C!="function")throw new Error(et(10));n=C,E({type:qa.REPLACE})}function h(){let C=v;return{subscribe(R){if(typeof R!="object"||R===null)throw new Error(et(11));function T(){let k=R;k.next&&k.next(g())}return T(),{unsubscribe:C(T)}},[Sm](){return this}}}return E({type:qa.INIT}),{dispatch:E,subscribe:v,getState:g,replaceReducer:y,[Sm]:h}}function hx(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:qa.INIT})>"u")throw new Error(et(12));if(typeof r(void 0,{type:qa.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(et(13))})}function Kn(e){let t=Object.keys(e),r={};for(let a=0;a<t.length;a++){let s=t[a];typeof e[s]=="function"&&(r[s]=e[s])}let n=Object.keys(r),o,i;try{hx(r)}catch(a){i=a}return function(s={},c){if(i)throw i;let u=!1,g={};for(let v=0;v<n.length;v++){let E=n[v],y=r[E],h=s[E],S=y(h,c);if(typeof S>"u"){let C=c&&c.type;throw new Error(et(14))}g[E]=S,u=u||S!==h}return u=u||n.length!==Object.keys(s).length,u?g:s}}function di(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function bm(...e){return t=>(r,n)=>{let o=t(r,n),i=()=>{throw new Error(et(15))},a={getState:o.getState,dispatch:(c,...u)=>i(c,...u)},s=e.map(c=>c(a));return i=di(...s)(o.dispatch),{...o,dispatch:i}}}function pi(e){return Ht(e)&&"type"in e&&typeof e.type=="string"}m();d();f();p();var Hl=Symbol.for("immer-nothing"),fi=Symbol.for("immer-draftable"),We=Symbol.for("immer-state");function tt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var At=Object,tn=At.getPrototypeOf,mi="constructor",Si="prototype",Ul="configurable",Va="enumerable",La="writable",gi="value",ft=e=>!!e&&!!e[We];function ut(e){return e?Tm(e)||wi(e)||!!e[fi]||!!e[mi]?.[fi]||Ai(e)||xi(e):!1}var yx=At[Si][mi].toString(),wm=new WeakMap;function Tm(e){if(!e||!Xn(e))return!1;let t=tn(e);if(t===null||t===At[Si])return!0;let r=At.hasOwnProperty.call(t,mi)&&t[mi];if(r===Object)return!0;if(!en(r))return!1;let n=wm.get(r);return n===void 0&&(n=Function.toString.call(r),wm.set(r,n)),n===yx}function _m(e){return ft(e)||tt(15,e),e[We].base_}function bi(e,t,r=!0){rn(e)===0?(r?Reflect.ownKeys(e):At.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((n,o)=>t(o,n,e))}function rn(e){let t=e[We];return t?t.type_:wi(e)?1:Ai(e)?2:xi(e)?3:0}var Yn=(e,t,r=rn(e))=>r===2?e.has(t):At[Si].hasOwnProperty.call(e,t),ar=(e,t,r=rn(e))=>r===2?e.get(t):e[t],Ba=(e,t,r,n=rn(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function vx(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var wi=Array.isArray,Ai=e=>e instanceof Map,xi=e=>e instanceof Set,Xn=e=>typeof e=="object",en=e=>typeof e=="function",jl=e=>typeof e=="boolean";function Sx(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var bx=e=>Xn(e)?e?.[We]:null,sr=e=>e.copy_||e.base_;var zl=e=>e.modified_?e.copy_:e.base_;function Vl(e,t){if(Ai(e))return new Map(e);if(xi(e))return new Set(e);if(wi(e))return Array[Si].slice.call(e);let r=Tm(e);if(t===!0||t==="class_only"&&!r){let n=At.getOwnPropertyDescriptors(e);delete n[We];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let a=o[i],s=n[a];s[La]===!1&&(s[La]=!0,s[Ul]=!0),(s.get||s.set)&&(n[a]={[Ul]:!0,[La]:!0,[Va]:s[Va],[gi]:e[a]})}return At.create(tn(e),n)}else{let n=tn(e);if(n!==null&&r)return{...e};let o=At.create(n);return At.assign(o,e)}}function Wl(e,t=!1){return Wa(e)||ft(e)||!ut(e)||(rn(e)>1&&At.defineProperties(e,{set:ja,add:ja,clear:ja,delete:ja}),At.freeze(e),t&&bi(e,(r,n)=>{Wl(n,!0)},!1)),e}function wx(){tt(2)}var ja={[gi]:wx};function Wa(e){return e===null||!Xn(e)?!0:At.isFrozen(e)}var Ga="MapSet",$a="Patches",Am="ArrayMethods",Qa={};function nn(e){let t=Qa[e];return t||tt(0,e),t}var xm=e=>!!Qa[e];function Ax(e,t){Qa[e]||(Qa[e]=t)}var hi,km=()=>hi,xx=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:xm(Ga)?nn(Ga):void 0,arrayMethodsPlugin_:xm(Am)?nn(Am):void 0});function Cm(e,t){t&&(e.patchPlugin_=nn($a),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Bl(e){Gl(e),e.drafts_.forEach(Cx),e.drafts_=null}function Gl(e){e===hi&&(hi=e.parent_)}var Em=e=>hi=xx(hi,e);function Cx(e){let t=e[We];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Rm(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[We].modified_&&(Bl(t),tt(4)),ut(e)&&(e=Im(t,e));let{patchPlugin_:o}=t;o&&o.generateReplacementPatches_(r[We].base_,e,t)}else e=Im(t,r);return Ex(t,e,!0),Bl(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Hl?e:void 0}function Im(e,t){if(Wa(t))return t;let r=t[We];if(!r)return Ha(t,e.handledSet_,e);if(!Ka(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);Nm(r,e)}return r.copy_}function Ex(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Wl(t,r)}function Om(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Ka=(e,t)=>e.scope_===t,Rx=[];function Pm(e,t,r,n){let o=sr(e),i=e.type_;if(n!==void 0&&ar(o,n,i)===t){Ba(o,n,r,i);return}if(!e.draftLocations_){let s=e.draftLocations_=new Map;bi(o,(c,u)=>{if(ft(u)){let g=s.get(u)||[];g.push(c),s.set(u,g)}})}let a=e.draftLocations_.get(t)??Rx;for(let s of a)Ba(o,s,r,i)}function Ix(e,t,r){e.callbacks_.push(function(o){let i=t;if(!i||!Ka(i,o))return;o.mapSetPlugin_?.fixSetContents(i);let a=zl(i);Pm(e,i.draft_??i,a,r),Nm(i,o)})}function Nm(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let o=n.getPath(e);o&&n.generatePatches_(e,o,t)}Om(e)}}function Tx(e,t,r){let{scope_:n}=e;if(ft(r)){let o=r[We];Ka(o,n)&&o.callbacks_.push(function(){Ua(e);let a=zl(o);Pm(e,r,a,t)})}else ut(r)&&e.callbacks_.push(function(){let i=sr(e);e.type_===3?i.has(r)&&Ha(r,n.handledSet_,n):ar(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Ha(ar(e.copy_,t,e.type_),n.handledSet_,n)})}function Ha(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||ft(e)||t.has(e)||!ut(e)||Wa(e)||(t.add(e),bi(e,(n,o)=>{if(ft(o)){let i=o[We];if(Ka(i,r)){let a=zl(i);Ba(e,n,a,e.type_),Om(i)}}else ut(o)&&Ha(o,t,r)})),e}function _x(e,t){let r=wi(e),n={type_:r?1:0,scope_:t?t.scope_:km(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},o=n,i=za;r&&(o=[n],i=yi);let{revoke:a,proxy:s}=Proxy.revocable(o,i);return n.draft_=s,n.revoke_=a,[s,n]}var za={get(e,t){if(t===We)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let o=sr(e);if(!Yn(o,t,e.type_))return Ox(e,o,t);let i=o[t];if(e.finalized_||!ut(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&Sx(t))return i;if(i===Ll(e.base_,t)||kx(e,t,i)){Ua(e);let a=e.type_===1?+t:t,s=Ql(e.scope_,i,e,a);return e.copy_[a]=s}return i},has(e,t){return t in sr(e)},ownKeys(e){return Reflect.ownKeys(sr(e))},set(e,t,r){let n=Fm(sr(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=Ll(sr(e),t),i=o?.[We];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(vx(r,o)&&(r!==void 0||Yn(e.base_,t,e.type_)))return!0;Ua(e),$l(e)}return e.copy_[t]===r&&(r!==void 0||Yn(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),Tx(e,t,r)),!0},deleteProperty(e,t){return Ua(e),Ll(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),$l(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=sr(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[La]:!0,[Ul]:e.type_!==1||t!=="length",[Va]:n[Va],[gi]:r[t]}},defineProperty(){tt(11)},getPrototypeOf(e){return tn(e.base_)},setPrototypeOf(){tt(12)}},yi={};for(let e in za){let t=za[e];yi[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}yi.deleteProperty=function(e,t){return yi.set.call(this,e,t,void 0)};yi.set=function(e,t,r){return za.set.call(this,e[0],t,r,e[0])};function Ll(e,t){let r=e[We];return(r?sr(r):e)[t]}function kx(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!ut(r)||r[We]?!1:e.baseRefs_.has(r)}function Ox(e,t,r){let n=Fm(t,r);return n?gi in n?n[gi]:n.get?.call(e.draft_):void 0}function Fm(e,t){if(!(t in e))return;let r=tn(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=tn(r)}}function $l(e){e.modified_||(e.modified_=!0,e.parent_&&$l(e.parent_))}function Ua(e){e.copy_||(e.assigned_=new Map,e.copy_=Vl(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Px=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(en(t)&&!en(r)){let i=r;r=t;let a=this;return function(c=i,...u){return a.produce(c,g=>r.call(this,g,...u))}}en(r)||tt(6),n!==void 0&&!en(n)&&tt(7);let o;if(ut(t)){let i=Em(this),a=Ql(i,t,void 0),s=!0;try{o=r(a),s=!1}finally{s?Bl(i):Gl(i)}return Cm(i,n),Rm(o,i)}else if(!t||!Xn(t)){if(o=r(t),o===void 0&&(o=t),o===Hl&&(o=void 0),this.autoFreeze_&&Wl(o,!0),n){let i=[],a=[];nn($a).generateReplacementPatches_(t,o,{patches_:i,inversePatches_:a}),n(i,a)}return o}else tt(1,t)},this.produceWithPatches=(t,r)=>{if(en(t))return(a,...s)=>this.produceWithPatches(a,c=>t(c,...s));let n,o;return[this.produce(t,r,(a,s)=>{n=a,o=s}),n,o]},jl(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),jl(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),jl(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ut(e)||tt(8),ft(e)&&(e=Ya(e));let t=Em(this),r=Ql(t,e,void 0);return r[We].isManual_=!0,Gl(t),r}finishDraft(e,t){let r=e&&e[We];(!r||!r.isManual_)&&tt(9);let{scope_:n}=r;return Cm(n,t),Rm(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=nn($a).applyPatches_;return ft(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Ql(e,t,r,n){let[o,i]=Ai(t)?nn(Ga).proxyMap_(t,r):xi(t)?nn(Ga).proxySet_(t,r):_x(t,r);return(r?.scope_??km()).drafts_.push(o),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?Ix(r,i,n):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:u}=c;i.modified_&&u&&u.generatePatches_(i,[],c)}),o}function Ya(e){return ft(e)||tt(10,e),Dm(e)}function Dm(e){if(!ut(e)||Wa(e))return e;let t=e[We],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Vl(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Vl(e,!0);return bi(r,(o,i)=>{Ba(r,o,Dm(i))},n),t&&(t.finalized_=!1),r}function Mm(){function t(h,S=[]){if(h.key_!==void 0){let C=h.parent_.copy_??h.parent_.base_,R=bx(ar(C,h.key_)),T=ar(C,h.key_);if(T===void 0||T!==h.draft_&&T!==h.base_&&T!==h.copy_||R!=null&&R.base_!==h.base_)return null;let I=h.parent_.type_===3,k;if(I){let _=h.parent_;k=Array.from(_.drafts_.keys()).indexOf(h.key_)}else k=h.key_;if(!(I&&C.size>k||Yn(C,k)))return null;S.push(k)}if(h.parent_)return t(h.parent_,S);S.reverse();try{r(h.copy_,S)}catch{return null}return S}function r(h,S){let C=h;for(let R=0;R<S.length-1;R++){let T=S[R];if(C=ar(C,T),!Xn(C)||C===null)throw new Error(`Cannot resolve path at '${S.join("/")}'`)}return C}let n="replace",o="add",i="remove";function a(h,S,C){if(h.scope_.processedForPatches_.has(h))return;h.scope_.processedForPatches_.add(h);let{patches_:R,inversePatches_:T}=C;switch(h.type_){case 0:case 2:return c(h,S,R,T);case 1:return s(h,S,R,T);case 3:return u(h,S,R,T)}}function s(h,S,C,R){let{base_:T,assigned_:I}=h,k=h.copy_;k.length<T.length&&([T,k]=[k,T],[C,R]=[R,C]);let _=h.allIndicesReassigned_===!0;for(let D=0;D<T.length;D++){let G=k[D],L=T[D];if((_||I?.get(D.toString()))&&G!==L){let V=G?.[We];if(V&&V.modified_)continue;let q=S.concat([D]);C.push({op:n,path:q,value:y(G)}),R.push({op:n,path:q,value:y(L)})}}for(let D=T.length;D<k.length;D++){let G=S.concat([D]);C.push({op:o,path:G,value:y(k[D])})}for(let D=k.length-1;T.length<=D;--D){let G=S.concat([D]);R.push({op:i,path:G})}}function c(h,S,C,R){let{base_:T,copy_:I,type_:k}=h;bi(h.assigned_,(_,D)=>{let G=ar(T,_,k),L=ar(I,_,k),j=D?Yn(T,_)?n:o:i;if(G===L&&j===n)return;let V=S.concat(_);C.push(j===i?{op:j,path:V}:{op:j,path:V,value:y(L)}),R.push(j===o?{op:i,path:V}:j===i?{op:o,path:V,value:y(G)}:{op:n,path:V,value:y(G)})})}function u(h,S,C,R){let{base_:T,copy_:I}=h,k=0;T.forEach(_=>{if(!I.has(_)){let D=S.concat([k]);C.push({op:i,path:D,value:_}),R.unshift({op:o,path:D,value:_})}k++}),k=0,I.forEach(_=>{if(!T.has(_)){let D=S.concat([k]);C.push({op:o,path:D,value:_}),R.unshift({op:i,path:D,value:_})}k++})}function g(h,S,C){let{patches_:R,inversePatches_:T}=C;R.push({op:n,path:[],value:S===Hl?void 0:S}),T.push({op:n,path:[],value:h})}function v(h,S){return S.forEach(C=>{let{path:R,op:T}=C,I=h;for(let G=0;G<R.length-1;G++){let L=rn(I),j=R[G];typeof j!="string"&&typeof j!="number"&&(j=""+j),(L===0||L===1)&&(j==="__proto__"||j===mi)&&tt(19),en(I)&&j===Si&&tt(19),I=ar(I,j),(I===null||!Xn(I))&&tt(18,R.join("/"))}let k=rn(I),_=E(C.value),D=R[R.length-1];switch(T){case n:switch(k){case 2:return I.set(D,_);case 3:tt(16);default:return I[D]=_}case o:switch(k){case 1:return D==="-"?I.push(_):I.splice(D,0,_);case 2:return I.set(D,_);case 3:return I.add(_);default:return I[D]=_}case i:switch(k){case 1:return I.splice(D,1);case 2:return I.delete(D);case 3:return I.delete(C.value);default:return delete I[D]}default:tt(17,T)}}),h}function E(h){if(!ut(h))return h;if(wi(h))return h.map(E);if(Ai(h))return new Map(Array.from(h.entries()).map(([C,R])=>[C,E(R)]));if(xi(h))return new Set(Array.from(h).map(E));let S=Object.create(tn(h));for(let C in h)S[C]=E(h[C]);return Yn(h,fi)&&(S[fi]=h[fi]),S}function y(h){return ft(h)?E(h):h}Ax($a,{applyPatches_:v,generatePatches_:a,generateReplacementPatches_:g,getPath:t})}var vi=new Px,on=vi.produce,Kl=vi.produceWithPatches.bind(vi);var Yl=vi.applyPatches.bind(vi);m();d();f();p();function Nx(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Fx(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var qm=e=>Array.isArray(e)?e:[e];function Dx(e){let t=Array.isArray(e[0])?e[0]:e;return Fx(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Mx(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var qx=class{constructor(e){this.value=e}deref(){return this.value}},jx=()=>typeof WeakRef>"u"?qx:WeakRef,Lm=jx(),Lx=0,jm=1;function Xa(){return{s:Lx,v:void 0,o:null,p:null}}function Ux(e){return e instanceof Lm?e.deref():e}function Ci(e,t={}){let r=Xa(),{resultEqualityCheck:n}=t,o,i=0;function a(){let s=r,{length:c}=arguments;for(let v=0,E=c;v<E;v++){let y=arguments[v];if(typeof y=="function"||typeof y=="object"&&y!==null){let h=s.o;h===null&&(s.o=h=new WeakMap);let S=h.get(y);S===void 0?(s=Xa(),h.set(y,s)):s=S}else{let h=s.p;h===null&&(s.p=h=new Map);let S=h.get(y);S===void 0?(s=Xa(),h.set(y,s)):s=S}}let u=s,g;if(s.s===jm)g=s.v;else if(g=e.apply(null,arguments),i++,n){let v=Ux(o);v!=null&&n(v,g)&&(g=v,i!==0&&i--),o=typeof g=="object"&&g!==null||typeof g=="function"?new Lm(g):g}return u.s=jm,u.v=g,g}return a.clearCache=()=>{r=Xa(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function Vx(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let i=0,a=0,s,c={},u=o.pop();typeof u=="object"&&(c=u,u=o.pop()),Nx(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);let g={...r,...c},{memoize:v,memoizeOptions:E=[],argsMemoize:y=Ci,argsMemoizeOptions:h=[]}=g,S=qm(E),C=qm(h),R=Dx(o),T=v(function(){return i++,u.apply(null,arguments)},...S),I=!0,k=y(function(){a++;let D=Mx(R,arguments);return s=T.apply(null,D),s},...C);return Object.assign(k,{resultFunc:u,memoizedResultFunc:T,dependencies:R,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:v,argsMemoize:y})};return Object.assign(n,{withTypes:()=>n}),n}var $e=Vx(Ci);m();d();f();p();function Um(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var Vm=Um(),Bm=Um;var Bx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?di:di.apply(null,arguments)},gq=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Gx=e=>e&&typeof e.match=="function";function O(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(mt(0));return{type:e,payload:o.payload,...("meta"in o&&{meta:o.meta}),...("error"in o&&{error:o.error})}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>pi(n)&&n.type===e,r}var Ym=class Ei extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ei.prototype)}static get[Symbol.species](){return Ei}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ei(...t[0].concat(this)):new Ei(...t.concat(this))}};function Gm(e){return ut(e)?on(e,()=>{}):e}function Za(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function $x(e){return typeof e=="boolean"}var Qx=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},a=new Ym;return r&&($x(r)?a.push(Vm):a.push(Bm(r.extraArgument))),a},Ri="RTK_autoBatch",eo=()=>e=>({payload:e,meta:{[Ri]:!0}}),$m=e=>t=>{setTimeout(t,e)},Hx=(e,t)=>r=>{let n=!1,o=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(a),r())},i=e(o),a=setTimeout(o,t)},zx=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,i=!1,a=!1,s=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Hx(window.requestAnimationFrame,100):$m(10):e.type==="callback"?e.queueNotification:$m(e.timeout),u=()=>{a=!1,i&&(i=!1,s.forEach(g=>g()))};return Object.assign({},n,{subscribe(g){let v=()=>o&&g(),E=n.subscribe(v);return s.add(g),()=>{E(),s.delete(g)}},dispatch(g){try{return o=!g?.meta?.[Ri],i=!o,i&&(a||(a=!0,c(u))),n.dispatch(g)}finally{o=!0}}})},Wx=e=>function(r){let{autoBatch:n=!0}=r??{},o=new Ym(e);return n&&o.push(zx(typeof n=="object"?n:void 0)),o};function Xm(e){let t=Qx(),{reducer:r=void 0,middleware:n,devTools:o=!0,duplicateMiddlewareCheck:i=!0,preloadedState:a=void 0,enhancers:s=void 0}=e||{},c;if(typeof r=="function")c=r;else if(Ht(r))c=Kn(r);else throw new Error(mt(1));let u;typeof n=="function"?u=n(t):u=t();let g=di;o&&(g=Bx({trace:!1,...(typeof o=="object"&&o)}));let v=bm(...u),E=Wx(v),y=typeof s=="function"?s(E):E(),h=g(...y);return ql(c,a,h)}function Zm(e){let t={},r=[],n,o={addCase(i,a){let s=typeof i=="string"?i:i.type;if(!s)throw new Error(mt(28));if(s in t)throw new Error(mt(29));return t[s]=a,o},addAsyncThunk(i,a){return a.pending&&(t[i.pending.type]=a.pending),a.rejected&&(t[i.rejected.type]=a.rejected),a.fulfilled&&(t[i.fulfilled.type]=a.fulfilled),a.settled&&r.push({matcher:i.settled,reducer:a.settled}),o},addMatcher(i,a){return r.push({matcher:i,reducer:a}),o},addDefaultCase(i){return n=i,o}};return e(o),[t,r,n]}function Kx(e){return typeof e=="function"}function Be(e,t){let[r,n,o]=Zm(t),i;if(Kx(e))i=()=>Gm(e());else{let s=Gm(e);i=()=>s}function a(s=i(),c){let u=[r[c.type],...n.filter(({matcher:g})=>g(c)).map(({reducer:g})=>g)];return u.filter(g=>!!g).length===0&&(u=[o]),u.reduce((g,v)=>{if(v)if(ft(g)){let y=v(g,c);return y===void 0?g:y}else{if(ut(g))return on(g,E=>v(E,c));{let E=v(g,c);if(E===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return E}}return g},s)}return a.getInitialState=i,a}var Jm=(e,t)=>Gx(e)?e.match(t):e(t);function zt(...e){return t=>e.some(r=>Jm(r,t))}function Jn(...e){return t=>e.every(r=>Jm(r,t))}function rs(e,t){if(!e||!e.meta)return!1;let r=typeof e.meta.requestId=="string",n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function Ii(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function ns(...e){return e.length===0?t=>rs(t,["pending"]):Ii(e)?zt(...e.map(t=>t.pending)):ns()(e[0])}function sn(...e){return e.length===0?t=>rs(t,["rejected"]):Ii(e)?zt(...e.map(t=>t.rejected)):sn()(e[0])}function Ti(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Jn(sn(...e),t):Ii(e)?Jn(sn(...e),t):Ti()(e[0])}function cr(...e){return e.length===0?t=>rs(t,["fulfilled"]):Ii(e)?zt(...e.map(t=>t.fulfilled)):cr()(e[0])}function os(...e){return e.length===0?t=>rs(t,["pending","fulfilled","rejected"]):Ii(e)?zt(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):os()(e[0])}var Yx="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",_i=(e=21)=>{let t="",r=e;for(;r--;)t+=Yx[Math.random()*64|0];return t},Xx=["name","message","stack","code"],Xl=class{constructor(e,t){ie(this,"payload");ie(this,"meta");ie(this,"_type");this.payload=e,this.meta=t}},Qm=class{constructor(e,t){ie(this,"payload");ie(this,"meta");ie(this,"_type");this.payload=e,this.meta=t}},Zx=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Xx)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Hm="External signal was aborted",Ie=(()=>{function e(t,r,n){let o=O(t+"/fulfilled",(c,u,g,v)=>({payload:c,meta:{...(v||{}),arg:g,requestId:u,requestStatus:"fulfilled"}})),i=O(t+"/pending",(c,u,g)=>({payload:void 0,meta:{...(g||{}),arg:u,requestId:c,requestStatus:"pending"}})),a=O(t+"/rejected",(c,u,g,v,E)=>({payload:v,error:(n&&n.serializeError||Zx)(c||"Rejected"),meta:{...(E||{}),arg:g,requestId:u,rejectedWithValue:!!v,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function s(c,{signal:u}={}){return(g,v,E)=>{let y=n?.idGenerator?n.idGenerator(c):_i(),h=new l.AbortController,S,C;function R(I){C=I,h.abort()}u&&(u.aborted?R(Hm):u.addEventListener("abort",()=>R(Hm),{once:!0}));let T=_asyncToGenerator(function*(){let I;try{let _=n?.condition?.(c,{getState:v,extra:E});if(eC(_)&&(_=yield _),_===!1||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let D=new Promise((G,L)=>{S=()=>{L({name:"AbortError",message:C||"Aborted"})},h.signal.addEventListener("abort",S,{once:!0})});g(i(y,c,n?.getPendingMeta?.({requestId:y,arg:c},{getState:v,extra:E}))),I=yield Promise.race([D,Promise.resolve(r(c,{dispatch:g,getState:v,extra:E,requestId:y,signal:h.signal,abort:R,rejectWithValue:(G,L)=>new Xl(G,L),fulfillWithValue:(G,L)=>new Qm(G,L)})).then(G=>{if(G instanceof Xl)throw G;return G instanceof Qm?o(G.payload,y,c,G.meta):o(G,y,c)})])}catch(_){I=_ instanceof Xl?a(null,y,c,_.payload,_.meta):a(_,y,c)}finally{S&&h.signal.removeEventListener("abort",S)}return n&&!n.dispatchConditionRejection&&a.match(I)&&I.meta.condition||g(I),I})();return Object.assign(T,{abort:R,requestId:y,arg:c,unwrap(){return T.then(Jx)}})}}return Object.assign(s,{pending:i,rejected:a,fulfilled:o,settled:zt(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Jx(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function eC(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var eg=Symbol.for("rtk-slice-createasyncthunk"),yq={[eg]:Ie};function tC(e,t){return`${e}/${t}`}function rC({creators:e}={}){let t=e?.asyncThunk?.[eg];return function(n){let{name:o,reducerPath:i=o}=n;if(!o)throw new Error(mt(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(oC()):n.reducers)||{},s=Object.keys(a),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(I,k){let _=typeof I=="string"?I:I.type;if(!_)throw new Error(mt(12));if(_ in c.sliceCaseReducersByType)throw new Error(mt(13));return c.sliceCaseReducersByType[_]=k,u},addMatcher(I,k){return c.sliceMatchers.push({matcher:I,reducer:k}),u},exposeAction(I,k){return c.actionCreators[I]=k,u},exposeCaseReducer(I,k){return c.sliceCaseReducersByName[I]=k,u}};s.forEach(I=>{let k=a[I],_={reducerName:I,type:tC(o,I),createNotation:typeof n.reducers=="function"};aC(k)?cC(_,k,u,t):iC(_,k,u)});function g(){let[I={},k=[],_=void 0]=typeof n.extraReducers=="function"?Zm(n.extraReducers):[n.extraReducers],D={...I,...c.sliceCaseReducersByType};return Be(n.initialState,G=>{for(let L in D)G.addCase(L,D[L]);for(let L of c.sliceMatchers)G.addMatcher(L.matcher,L.reducer);for(let L of k)G.addMatcher(L.matcher,L.reducer);_&&G.addDefaultCase(_)})}let v=I=>I,E=new Map,y=new WeakMap,h;function S(I,k){return h||(h=g()),h(I,k)}function C(){return h||(h=g()),h.getInitialState()}function R(I,k=!1){function _(G){let L=G[I];return typeof L>"u"&&k&&(L=Za(y,_,C)),L}function D(G=v){let L=Za(E,k,()=>new WeakMap);return Za(L,G,()=>{let j={};for(let[V,q]of Object.entries(n.selectors??{}))j[V]=nC(q,G,()=>Za(y,G,C),k);return j})}return{reducerPath:I,getSelectors:D,get selectors(){return D(_)},selectSlice:_}}let T={name:o,reducer:S,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:C,...R(i),injectInto(I,{reducerPath:k,..._}={}){let D=k??i;return I.inject({reducerPath:D,reducer:S},_),{...T,...R(D,!0)}}};return T}}function nC(e,t,r,n){function o(i,...a){let s=t(i);return typeof s>"u"&&n&&(s=r()),e(s,...a)}return o.unwrapped=e,o}var cn=rC();function oC(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function iC({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!sC(n))throw new Error(mt(17));i=n.reducer,a=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?O(e,a):O(e))}function aC(e){return e._reducerDefinitionType==="asyncThunk"}function sC(e){return e._reducerDefinitionType==="reducerWithPrepare"}function cC({type:e,reducerName:t},r,n,o){if(!o)throw new Error(mt(18));let{payloadCreator:i,fulfilled:a,pending:s,rejected:c,settled:u,options:g}=r,v=o(e,i,g);n.exposeAction(t,v),a&&n.addCase(v.fulfilled,a),s&&n.addCase(v.pending,s),c&&n.addCase(v.rejected,c),u&&n.addMatcher(v.settled,u),n.exposeCaseReducer(t,{fulfilled:a||Ja,pending:s||Ja,rejected:c||Ja,settled:u||Ja})}function Ja(){}var uC="task",tg="listener",rg="completed",ed="cancelled",lC=`task-${ed}`,dC=`task-${rg}`,Zl=`${tg}-${ed}`,pC=`${tg}-${rg}`,is=class{constructor(e){ie(this,"code");ie(this,"name","TaskAbortError");ie(this,"message");this.code=e,this.message=`${uC} ${ed} (reason: ${e})`}},td=(e,t)=>{if(typeof e!="function")throw new TypeError(mt(32))},es=()=>{},ng=(e,t=es)=>(e.catch(t),e),og=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),an=e=>{if(e.aborted)throw new is(e.reason)};function ig(e,t){let r=es;return new Promise((n,o)=>{let i=()=>o(new is(e.reason));if(e.aborted){i();return}r=og(e,i),t.finally(()=>r()).then(n,o)}).finally(()=>{r=es})}var fC=/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,t){try{return yield Promise.resolve(),{status:"ok",value:yield e()}}catch(r){return{status:r instanceof is?"cancelled":"rejected",error:r}}finally{t?.()}});return function fC(_x5,_x6){return _ref5.apply(this,arguments)}}(),ts=e=>t=>ng(ig(e,t).then(r=>(an(e),r))),ag=e=>{let t=ts(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Zn}=Object,zm={},as="listenerMiddleware",mC=(e,t)=>{let r=n=>og(e,()=>n.abort(e.reason));return(n,o)=>{td(n,"taskExecutor");let i=new l.AbortController;r(i);let a=fC(/*#__PURE__*/_asyncToGenerator(function*(){an(e),an(i.signal);let s=yield n({pause:ts(i.signal),delay:ag(i.signal),signal:i.signal});return an(i.signal),s}),()=>i.abort(dC));return o?.autoJoin&&t.push(a.catch(es)),{result:ts(e)(a),cancel(){i.abort(lC)}}}},gC=(e,t)=>{let r=/*#__PURE__*/function(){var _ref7=_asyncToGenerator(function*(n,o){an(t);let i=()=>{},s=[new Promise((c,u)=>{let g=e({predicate:n,effect:(v,E)=>{E.unsubscribe(),c([v,E.getState(),E.getOriginalState()])}});i=()=>{g(),u()}})];o!=null&&s.push(new Promise(c=>setTimeout(c,o,null)));try{let c=yield ig(t,Promise.race(s));return an(t),c}finally{i()}});return function r(_x7,_x8){return _ref7.apply(this,arguments)}}();return(n,o)=>ng(r(n,o))},sg=e=>{let{type:t,actionCreator:r,matcher:n,predicate:o,effect:i}=e;if(t)o=O(t).match;else if(r)t=r.type,o=r.match;else if(n)o=n;else if(!o)throw new Error(mt(21));return td(i,"options.listener"),{predicate:o,type:t,effect:i}},cg=Zn(e=>{let{type:t,predicate:r,effect:n}=sg(e);return{id:_i(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(mt(22))}}},{withTypes:()=>cg}),Wm=(e,t)=>{let{type:r,effect:n,predicate:o}=sg(t);return Array.from(e.values()).find(i=>(typeof r=="string"?i.type===r:i.predicate===o)&&i.effect===n)},Jl=e=>{e.pending.forEach(t=>{t.abort(Zl)})},hC=(e,t)=>()=>{for(let r of t.keys())Jl(r);e.clear()},Km=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},ug=Zn(O(`${as}/add`),{withTypes:()=>ug}),yC=O(`${as}/removeAll`),lg=Zn(O(`${as}/remove`),{withTypes:()=>lg}),vC=(...e)=>{console.error(`${as}/error`,...e)},dg=(e={})=>{let t=new Map,r=new Map,n=y=>{let h=r.get(y)??0;r.set(y,h+1)},o=y=>{let h=r.get(y)??1;h===1?r.delete(y):r.set(y,h-1)},{extra:i,onError:a=vC}=e;td(a,"onError");let s=y=>(y.unsubscribe=()=>t.delete(y.id),t.set(y.id,y),h=>{y.unsubscribe(),h?.cancelActive&&Jl(y)}),c=y=>{let h=Wm(t,y)??cg(y);return s(h)};Zn(c,{withTypes:()=>c});let u=y=>{let h=Wm(t,y);return h&&(h.unsubscribe(),y.cancelActive&&Jl(h)),!!h};Zn(u,{withTypes:()=>u});let g=/*#__PURE__*/function(){var _ref8=_asyncToGenerator(function*(y,h,S,C){let R=new l.AbortController,T=gC(c,R.signal),I=[];try{y.pending.add(R),n(y),yield Promise.resolve(y.effect(h,Zn({},S,{getOriginalState:C,condition:(k,_)=>T(k,_).then(Boolean),take:T,delay:ag(R.signal),pause:ts(R.signal),extra:i,signal:R.signal,fork:mC(R.signal,I),unsubscribe:y.unsubscribe,subscribe:()=>{t.set(y.id,y)},cancelActiveListeners:()=>{y.pending.forEach((k,_,D)=>{k!==R&&(k.abort(Zl),D.delete(k))})},cancel:()=>{R.abort(Zl),y.pending.delete(R)},throwIfCancelled:()=>{an(R.signal)}})))}catch(k){k instanceof is||Km(a,k,{raisedBy:"effect"})}finally{yield Promise.all(I),R.abort(pC),o(y),y.pending.delete(R)}});return function g(_x9,_x0,_x1,_x10){return _ref8.apply(this,arguments)}}(),v=hC(t,r);return{middleware:y=>h=>S=>{if(!pi(S))return h(S);if(ug.match(S))return c(S.payload);if(yC.match(S)){v();return}if(lg.match(S))return u(S.payload);let C=y.getState(),R=()=>{if(C===zm)throw new Error(mt(23));return C},T;try{if(T=h(S),t.size>0){let I=y.getState(),k=Array.from(t.values());for(let _ of k){let D=!1;try{D=_.predicate(S,I,C)}catch(G){D=!1,Km(a,G,{raisedBy:"predicate"})}D&&g(_,S,y,R)}}}finally{C=zm}return T},startListening:c,stopListening:u,clearListeners:v}};function mt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}m();d();f();p();var Y=new z({required:!0,emptyAllowed:!1}),rt=new z({required:!1,emptyAllowed:!1}),nt=new z({required:!0,emptyAllowed:!0}),_q=new z({required:!1,emptyAllowed:!0}),ss=new ve({each:Y,required:!0}),pg=new z({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),fg=new z({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),kq=new z({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),ur=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),It=(e,t)=>{if("required"in t)return{payload:new gt({value:t}).validate({value:e}).value};let o=new ne({options:{required:!0},values:t}).validate(e);if(o)throw new ai(o);return{payload:e}},B=(e,t)=>{try{return It(e,t)}catch(r){return{payload:e,error:ur(r)}}},mg=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return hg(e,t,r,o,"Controller initialization error")},gg=(e,t,r,n)=>{let o=`Check the options of ${n}`;return hg(e,t,r,o,"Controller initialization error")},hg=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(i){throw e.logger.error(i,o),i}};m();d();f();p();var to="3.55.0",yg=["@coveo/atomic","@coveo/quantic"];var rd=()=>rt,vg=()=>Y,Er=O("configuration/updateBasicConfiguration",e=>B(e,{accessToken:rt,environment:new z({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:rt})),Wt=O("configuration/updateSearchConfiguration",e=>B(e,{proxyBaseUrl:new z({required:!1,url:!0}),pipeline:new z({required:!1,emptyAllowed:!0}),searchHub:rt,timezone:rt,locale:rt,authenticationProviders:new ve({required:!1,each:Y})})),SC={enabled:new fe({default:!0}),originContext:rd(),originLevel2:rd(),originLevel3:rd(),proxyBaseUrl:new z({required:!1,url:!0}),runtimeEnvironment:new De,anonymous:new fe({default:!1}),deviceId:rt,userDisplayName:rt,documentLocation:rt,trackingId:fg,analyticsMode:new z({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new ne({options:{required:!1},values:yg.reduce((e,t)=>(e[t]=pg,e),{})})},ro=O("configuration/updateAnalyticsConfiguration",e=>B(e,SC)),no=O("configuration/analytics/disable"),oo=O("configuration/analytics/enable"),cs=O("configuration/analytics/originlevel2",e=>B(e,{originLevel2:vg()})),us=O("configuration/analytics/originlevel3",e=>B(e,{originLevel3:vg()})),Sg=O("knowledge/setAgentId",e=>B(e,new z({required:!0})));m();d();f();p();m();d();f();p();m();d();f();p();var bg={q:new z,enableQuerySyntax:new fe,aq:new z,cq:new z,firstResult:new oe({min:0}),numberOfResults:new oe({min:0}),sortCriteria:new z,f:new ne,fExcluded:new ne,cf:new ne,nf:new ne,mnf:new ne,df:new ne,debug:new fe,sf:new ne,tab:new z,af:new ne};var Rr=O("searchParameters/restore",e=>B(e,bg)),wg=O("searchParameters/restoreTab",e=>B(e,Y));m();d();f();p();var ls=O("debug/enable"),ds=O("debug/disable");m();d();f();p();var ps=()=>!1;var fs=Be(ps(),e=>{e.addCase(ls,()=>!0).addCase(ds,()=>!1).addCase(Rr,(t,r)=>r.payload.debug??t)});m();d();f();p();var io=O("pipeline/set",e=>B(e,new z({required:!0,emptyAllowed:!0})));m();d();f();p();m();d();f();p();var bC=O("history/undo"),wC=O("history/redo"),Kt=O("history/snapshot"),Lj=Ie("history/back",/*#__PURE__*/function(){var _ref9=_asyncToGenerator(function*(e,{dispatch:t}){t(bC()),yield t(yt())});return function(_x11,_x12){return _ref9.apply(this,arguments)}}()),Uj=Ie("history/forward",/*#__PURE__*/function(){var _ref0=_asyncToGenerator(function*(e,{dispatch:t}){t(wC()),yield t(yt())});return function(_x13,_x14){return _ref0.apply(this,arguments)}}()),yt=Ie("history/change",/*#__PURE__*/function(){var _ref1=_asyncToGenerator(function*(e,{getState:t}){return t().history.present});return function(_x15,_x16){return _ref1.apply(this,arguments)}}());m();d();f();p();var Ir=()=>"";var ao=Be(Ir(),e=>{e.addCase(io,(t,r)=>r.payload).addCase(yt.fulfilled,(t,r)=>r.payload?.pipeline??t).addCase(Wt,(t,r)=>r.payload.pipeline||t)});m();d();f();p();m();d();f();p();var ms=O("app/setError");m();d();f();p();m();d();f();p();m();d();f();p();m();d();f();p();var so=class e{static set(t,r,n){let o,i,a;n&&(i=new Date,i.setTime(i.getTime()+n));let s=window.location.hostname,c=/^(\d{1,3}\.){3}\d{1,3}$/,u=/^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}$/;c.test(s)||u.test(s)||s.indexOf(".")===-1?nd(t,r,i):(a=s.split("."),o=a[a.length-2]+"."+a[a.length-1],nd(t,r,i,o))}static get(t){let r=t+"=",n=document.cookie.split(";");for(let o=0;o<n.length;o++){let i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function nd(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"+(window.location.protocol==="https:"?";Secure":"")}m();d();f();p();function AC(){return typeof navigator<"u"}function Ag(){try{return typeof localStorage<"u"}catch{return!1}}function xg(){try{return typeof sessionStorage<"u"}catch{return!1}}function Cg(){return!!(AC()&&navigator.cookieEnabled)}var Eg=null;function Rg(){return Eg||(Ag()?localStorage:Cg()?new od:xg()?sessionStorage:new id)}var co=class co{getItem(t){return so.get(`${co.prefix}${t}`)}removeItem(t){so.erase(`${co.prefix}${t}`)}setItem(t,r,n){so.set(`${co.prefix}${t}`,r,n)}};ie(co,"prefix","coveo_");var od=co;var id=class{getItem(t){return null}removeItem(t){}setItem(t,r){}};var gs="__coveo.analytics.history",xC=20,CC=1e3*60,EC=75,un=class un{constructor(t){ie(this,"store");this.store=t||Rg()}static getInstance(t){return un.instance||(un.instance=new un(t)),un.instance}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!==null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){var _this9=this;return _asyncToGenerator(function*(){t.internalTime=new Date().getTime(),t=_this9.cropQueryElement(_this9.stripEmptyQuery(t));let r=yield _this9.getHistoryWithInternalTimeAsync();r!==null?_this9.isValidEntry(t)&&_this9.setHistory([t].concat(r)):_this9.setHistory([t])})()}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){var _this0=this;return _asyncToGenerator(function*(){let t=yield _this0.getHistoryWithInternalTimeAsync();return _this0.stripEmptyQueries(_this0.stripInternalTime(t))})()}getHistoryWithInternalTime(){try{let t=this.store.getItem(gs);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){var _this1=this;return _asyncToGenerator(function*(){try{let t=yield _this1.store.getItem(gs);return t?JSON.parse(t):[]}catch{return[]}})()}setHistory(t){try{this.store.setItem(gs,JSON.stringify(t.slice(0,xC)))}catch{}}clear(){try{this.store.removeItem(gs)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,EC)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value===t.value?(t.internalTime||0)-(r.internalTime||0)>CC:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};ie(un,"instance",null);var ad=un,Tt=ad;m();d();f();p();m();d();f();p();var uo=$e(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${to}`));m();d();f();p();m();d();f();p();function lr(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function U(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(g){try{u(n.next(g))}catch(v){a(v)}}function c(g){try{u(n.throw(g))}catch(v){a(v)}}function u(g){g.done?i(g.value):o(g.value).then(s,c)}u((n=n.apply(e,t||[])).next())})}var Ae;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(Ae||(Ae={}));function ud(){return typeof window<"u"}function Ad(){return typeof navigator<"u"}function lo(){return typeof document<"u"}function ld(){try{return typeof localStorage<"u"}catch{return!1}}function RC(){try{return typeof sessionStorage<"u"}catch{return!1}}function Lg(){return Ad()&&navigator.cookieEnabled}var IC=[Ae.click,Ae.custom,Ae.search,Ae.view],TC=(e,t)=>IC.indexOf(e)!==-1?Object.assign({language:lo()?document.documentElement.lang:"unknown",userAgent:Ad()?navigator.userAgent:"unknown"},t):t,Oi=class e{static set(t,r,n){var o,i,a,s;n&&(i=new Date,i.setTime(i.getTime()+n)),s=window.location.hostname,s.indexOf(".")===-1?Ig(t,r,i):(a=s.split("."),o=a[a.length-2]+"."+a[a.length-1],Ig(t,r,i,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function Ig(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"+(window.location.protocol==="https:"?";Secure":"")}function _C(){return ld()?localStorage:Lg()?new Pi:RC()?sessionStorage:new fo}var Pi=class e{getItem(t){return Oi.get(`${e.prefix}${t}`)}removeItem(t){Oi.erase(`${e.prefix}${t}`)}setItem(t,r,n){Oi.set(`${e.prefix}${t}`,r,n)}};Pi.prefix="coveo_";var dd=class{constructor(){this.cookieStorage=new Pi}getItem(t){return localStorage.getItem(t)||this.cookieStorage.getItem(t)}removeItem(t){this.cookieStorage.removeItem(t),localStorage.removeItem(t)}setItem(t,r){localStorage.setItem(t,r),this.cookieStorage.setItem(t,r,31556926e3)}},fo=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},hs="__coveo.analytics.history",kC=20,OC=1e3*60,PC=75,vs=class{constructor(t){this.store=t||_C()}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){return U(this,void 0,void 0,function*(){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=yield this.getHistoryWithInternalTimeAsync();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])})}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){return U(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(hs);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return U(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(hs);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(hs,JSON.stringify(t.slice(0,kC)))}catch{}}clear(){try{this.store.removeItem(hs)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,PC)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>OC:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};var NC=(e,t)=>U(void 0,void 0,void 0,function*(){return e===Ae.view?(yield FC(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),FC=e=>U(void 0,void 0,void 0,function*(){let t=new vs,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),DC=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function Ss(e){return typeof e=="string"&&DC.test(e)}function Tg(e){if(!Ss(e))throw TypeError("Invalid UUID");let t;return Uint8Array.of((t=parseInt(e.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,t&255,(t=parseInt(e.slice(9,13),16))>>>8,t&255,(t=parseInt(e.slice(14,18),16))>>>8,t&255,(t=parseInt(e.slice(19,23),16))>>>8,t&255,(t=parseInt(e.slice(24,36),16))/1099511627776&255,t/4294967296&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255)}var ot=[];for(let e=0;e<256;++e)ot.push((e+256).toString(16).slice(1));function Ug(e,t=0){return(ot[e[t+0]]+ot[e[t+1]]+ot[e[t+2]]+ot[e[t+3]]+"-"+ot[e[t+4]]+ot[e[t+5]]+"-"+ot[e[t+6]]+ot[e[t+7]]+"-"+ot[e[t+8]]+ot[e[t+9]]+"-"+ot[e[t+10]]+ot[e[t+11]]+ot[e[t+12]]+ot[e[t+13]]+ot[e[t+14]]+ot[e[t+15]]).toLowerCase()}var MC=new Uint8Array(16);function qC(){return crypto.getRandomValues(MC)}function jC(e){e=unescape(encodeURIComponent(e));let t=new Uint8Array(e.length);for(let r=0;r<e.length;++r)t[r]=e.charCodeAt(r);return t}var LC="6ba7b810-9dad-11d1-80b4-00c04fd430c8",UC="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function VC(e,t,r,n,o,i){let a=typeof r=="string"?jC(r):r,s=typeof n=="string"?Tg(n):n;if(typeof n=="string"&&(n=Tg(n)),n?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+a.length);return c.set(s),c.set(a,s.length),c=t(c),c[6]=c[6]&15|e,c[8]=c[8]&63|128,Ug(c)}function ln(e,t,r){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():BC(e,t,r)}function BC(e,t,r){e=e||{};let n=e.random??e.rng?.()??qC();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let o=0;o<16;++o)t[r+o]=n[o];return t}return Ug(n)}function GC(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}function sd(e,t){return e<<t|e>>>32-t}function $C(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520],n=new Uint8Array(e.length+1);n.set(e),n[e.length]=128,e=n;let o=e.length/4+2,i=Math.ceil(o/16),a=new Array(i);for(let s=0;s<i;++s){let c=new Uint32Array(16);for(let u=0;u<16;++u)c[u]=e[s*64+u*4]<<24|e[s*64+u*4+1]<<16|e[s*64+u*4+2]<<8|e[s*64+u*4+3];a[s]=c}a[i-1][14]=(e.length-1)*8/2**32,a[i-1][14]=Math.floor(a[i-1][14]),a[i-1][15]=(e.length-1)*8&4294967295;for(let s=0;s<i;++s){let c=new Uint32Array(80);for(let h=0;h<16;++h)c[h]=a[s][h];for(let h=16;h<80;++h)c[h]=sd(c[h-3]^c[h-8]^c[h-14]^c[h-16],1);let u=r[0],g=r[1],v=r[2],E=r[3],y=r[4];for(let h=0;h<80;++h){let S=Math.floor(h/20),C=sd(u,5)+GC(S,g,v,E)+y+t[S]+c[h]>>>0;y=E,E=v,v=sd(g,30)>>>0,g=u,u=C}r[0]=r[0]+u>>>0,r[1]=r[1]+g>>>0,r[2]=r[2]+v>>>0,r[3]=r[3]+E>>>0,r[4]=r[4]+y>>>0}return Uint8Array.of(r[0]>>24,r[0]>>16,r[0]>>8,r[0],r[1]>>24,r[1]>>16,r[1]>>8,r[1],r[2]>>24,r[2]>>16,r[2]>>8,r[2],r[3]>>24,r[3]>>16,r[3]>>8,r[3],r[4]>>24,r[4]>>16,r[4]>>8,r[4])}function bs(e,t,r,n){return VC(80,$C,e,t)}bs.DNS=LC;bs.URL=UC;var Vg="2.32.0",_g=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,ki={pageview:"pageview",event:"event"},ws=class{constructor({client:t,uuidGenerator:r=ln}){this.client=t,this.uuidGenerator=r}},pd=class extends ws{constructor({client:t,uuidGenerator:r=ln}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=_g(window.location),this.lastReferrer=lo()?document.referrer:"",this.addHooks()}getApi(t){return t==="setAction"?this.setAction:null}setAction(t,r){this.action=t,this.actionData=r}clearData(){this.clearPluginData(),this.action=void 0,this.actionData={}}getLocationInformation(t,r){return Object.assign({hitType:t},this.getNextValues(t,r))}updateLocationInformation(t,r){this.updateLocationForNextPageView(t,r)}getDefaultContextInformation(t){let r={title:lo()?document.title:"",encoding:lo()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},i={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},i),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:i}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=i,t===ki.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===ki.pageview?this.nextPageViewId:this.pageViewId,referrer:t===ki.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===ki.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=o=>o.replace(/^\/?(.*)$/,"/$1");return`${(o=>o.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return _g(window.location)}},Tr=class e{constructor(t,r){if(!Ss(t))throw Error("Not a valid uuid");this.clientId=t,this.creationDate=Math.floor(r/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime}validate(t,r){return!this.expired&&this.matchReferrer(t,r)}matchReferrer(t,r){try{let n=new URL(t);return r.some(o=>new RegExp(o.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[n,o]=r;if(n.length!==32||isNaN(parseInt(o)))return null;let i=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return Ss(i)?new e(i,Number.parseInt(o)*1e3):null}};Tr.cvo_cid="cvo_cid";Tr.expirationTime=120;var fd=class extends ws{constructor({client:t,uuidGenerator:r=ln}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return U(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),n=yield this.client.getCurrentVisitorId();return r.searchParams.set(Tr.cvo_cid,new Tr(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};fd.Id="link";var kt=Object.keys;function ys(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var cd=128,Bg=192,kg=224,Og=240;function QC(e){return(e&248)===Og?4:(e&Og)===kg?3:(e&kg)===Bg?2:1}function HC(e,t){if(t<0||e.length<=t)return e;let r=e.indexOf("%",t-2);for(r<0||r>t?r=t:t=r;r>2&&e.charAt(r-3)=="%";){let n=Number.parseInt(e.substring(r-2,r),16);if((n&cd)!=cd)break;if(r-=3,(n&Bg)!=cd){t-r>=QC(n)*3&&(r=t);break}}return e.substring(0,r)}var md={id:"svc_ticket_id",subject:"svc_ticket_subject",description:"svc_ticket_description",category:"svc_ticket_category",productId:"svc_ticket_product_id",custom:"svc_ticket_custom"},zC=kt(md).map(e=>md[e]),WC=[...zC].join("|"),KC=new RegExp(`^(${WC}$)`),YC={svcAction:"svc_action",svcActionData:"svc_action_data"},XC=e=>kt(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=md[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),ZC=e=>KC.test(e),JC=[ZC],Pg={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Ng={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},lt={action:"pa",list:"pal",listSource:"pls"},As={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},eE=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],gd={id:"quoteId",affiliation:"quoteAffiliation"},hd={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},tE={add:lt,bookmark_add:lt,bookmark_remove:lt,click:lt,checkout:lt,checkout_option:lt,detail:lt,impression:lt,remove:lt,refund:Object.assign(Object.assign({},lt),As),purchase:Object.assign(Object.assign({},lt),As),quickview:lt,quote:Object.assign(Object.assign({},lt),gd),review:Object.assign(Object.assign({},lt),hd)},rE=kt(Pg).map(e=>Pg[e]),nE=kt(Ng).map(e=>Ng[e]),oE=kt(lt).map(e=>lt[e]),iE=kt(As).map(e=>As[e]),aE=kt(hd).map(e=>hd[e]),sE=kt(gd).map(e=>gd[e]),cE=[...rE,"custom"].join("|"),uE=[...nE,"custom"].join("|"),Gg="(pr[0-9]+)",$g="(il[0-9]+pi[0-9]+)",lE=new RegExp(`^${Gg}(${cE})$`),dE=new RegExp(`^(${$g}(${uE}))|(il[0-9]+nm)$`),pE=new RegExp(`^(${oE.join("|")})$`),fE=new RegExp(`^(${iE.join("|")})$`),mE=new RegExp(`^${Gg}custom$`),gE=new RegExp(`^${$g}custom$`),hE=new RegExp(`^(${[...eE,...aE,...sE].join("|")})$`),yE=e=>lE.test(e),vE=e=>dE.test(e),SE=e=>pE.test(e),bE=e=>fE.test(e),wE=e=>hE.test(e),AE=[vE,yE,SE,bE,wE],xE=[mE,gE],CE={anonymizeIp:"aip"},EE={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},RE={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},IE=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],TE=Object.assign(Object.assign(Object.assign(Object.assign({},CE),EE),RE),IE.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),yd=Object.assign(Object.assign({},TE),YC),_E=e=>{let t=!!e.action&&tE[e.action]||{};return kt(e).reduce((r,n)=>{let o=t[n]||yd[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},kE=kt(yd).map(e=>yd[e]),OE=e=>kE.indexOf(e)!==-1,PE=e=>e==="custom",NE=e=>[...AE,...JC,OE,PE].some(t=>t(e)),FE=e=>kt(e).reduce((t,r)=>{let n=DE(r);return n?Object.assign(Object.assign({},t),ME(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),DE=e=>{let t;return[...xE].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},ME=(e,t)=>kt(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),vd=class{constructor(t){this.opts=t}sendEvent(t,r){return U(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error("navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like \"sendbeacon-polyfill\".");let{baseUrl:n,preprocessRequest:o}=this.opts,i=yield this.getQueryParamsForEventType(t),{url:a,payload:s}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${i}`,r,o),c=this.encodeForEventType(t,s),u=new Blob([c],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(a,u)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return U(this,void 0,void 0,function*(){let o=t,i=r;if(n){let a=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:s,body:c}=a;o=s||t;try{i=JSON.parse(c)}catch(u){console.error("Unable to process the request body as a JSON string",u)}}return{payload:i,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return U(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,o=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",o?`visitorId=${o}`:"","discardVisitInfo=true"].filter(i=>!!i).join("&")})}isEventTypeLegacy(t){return[Ae.click,Ae.custom,Ae.search,Ae.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let o=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(o=`access_token=${encodeURIComponent(n)}&${o}`),o}},Sd=class{sendEvent(t,r){return U(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return U(this,void 0,void 0,function*(){return Promise.resolve()})}},Fg=b.fetch,xs=class{constructor(t){this.opts=t}sendEvent(t,r){return U(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:i}=this.opts,a=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",s={url:`${n}/analytics/${t}${a}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},c=Object.assign(Object.assign({},s),i?yield i(s,"analyticsFetch"):{}),{url:u}=c,g=lr(c,["url"]),v;try{v=yield Fg(u,g)}catch(E){console.error("An error has occurred when sending the event.",E);return}if(v.ok){let E=yield v.json();return E.visitorId&&o.setCurrentVisitorId(E.visitorId),E}else{try{v.json()}catch{}throw console.error(`An error has occurred when sending the "${t}" event.`,v,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return U(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Fg(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[Ae.click,Ae.custom,Ae.search,Ae.view].indexOf(t)!==-1}getVisitorIdParam(){return U(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},bd=class{constructor(t,r){ld()&&Lg()?this.storage=new dd:ld()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new fo),this.client=new xs(t),this.beaconClient=new vd(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:i}of n)this.beaconClient.sendEvent(o,i)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},wd=class{constructor(t,r){this.storage=r||new fo,this.client=new xs(t)}getClientDependingOnEventType(t){return this.client}},Cs=class{constructor(){this.storage=new fo,this.client=new Sd}getClientDependingOnEventType(t){return this.client}},qE="xx",jE=e=>e?.startsWith(qE)||!1,LE=`
27
+ `;return new ai(r)}var ai=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},gt=class{constructor(e){ie(this,"definition");this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let o in this.definition){let i=this.definition[o].validate(r[o]);i&&n.push(`${o}: ${i}`)}if(n.length)throw wA(n,t);return r}get default(){let e={};for(let t in this.definition){let r=this.definition[t].default;r!==void 0&&(e[t]=r)}return e}},De=class{constructor(e={}){ie(this,"baseConfig");this.baseConfig=e}validate(e){return this.baseConfig.required&&se(e)?"value is required.":null}get default(){return this.baseConfig.default instanceof Function?this.baseConfig.default():this.baseConfig.default}get required(){return this.baseConfig.required===!0}};function Je(e){return e===void 0}function AA(e){return e===null}function se(e){return Je(e)||AA(e)}var fe=class{constructor(e={}){ie(this,"value");this.value=new De(e)}validate(e){let t=this.value.validate(e);return t||(xA(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function xA(e){return Je(e)||Wf(e)}function Wf(e){return typeof e=="boolean"}var oe=class{constructor(e={}){ie(this,"config");ie(this,"value");this.config=e,this.value=new De(e)}validate(e){let t=this.value.validate(e);return t||(CA(e)?e<this.config.min?`minimum value of ${this.config.min} not respected.`:e>this.config.max?`maximum value of ${this.config.max} not respected.`:null:"value is not a number.")}get default(){return this.value.default}get required(){return this.value.required}};function CA(e){return Je(e)||Kf(e)}function Kf(e){return typeof e=="number"&&!Number.isNaN(e)}var EA=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,z=class{constructor(e={}){ie(this,"value");ie(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new De(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:o,ISODate:i}=this.config,a=this.value.validate(e);if(a)return a;if(Je(e))return null;if(!Ia(e))return"value is not a string.";if(!t&&!e.length)return"value is an empty string.";if(r)try{new URL(e)}catch{return"value is not a valid URL."}return n&&!n.test(e)?`value did not match provided regex ${n}`:o&&!o.includes(e)?`value should be one of: ${o.join(", ")}.`:i&&!(EA.test(e)&&new Date(e).toString()!=="Invalid Date")?"value is not a valid ISO8601 date string":null}get default(){return this.value.default}get required(){return this.value.required}};function Ia(e){return Object.prototype.toString.call(e)==="[object String]"}var ne=class{constructor(e={}){ie(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(Je(e))return this.config.options.required?"value is required and is currently undefined":null;if(!Yf(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&se(e[r]))return`value does not contain ${r}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let o=e[r],i=n.validate(o);i!==null&&(t+=` ${i}`)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function Yf(e){return e!==void 0&&typeof e=="object"}var ve=class{constructor(e={}){ie(this,"config");ie(this,"value");this.config=e,this.value=new De(this.config)}validate(e){if(!se(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(se(e))return null;if(this.config.max!==void 0&&e.length>this.config.max)return`value contains more than ${this.config.max}`;if(this.config.min!==void 0&&e.length<this.config.min)return`value contains less than ${this.config.min}`;if(this.config.each!==void 0){let r="";return e.forEach(n=>{this.config.each.required&&se(n)&&(r=`value is null or undefined: ${e.join(",")}`);let o=this.validatePrimitiveValue(n,this.config.each);o!==null&&(r+=` ${o}`)}),r===""?null:r}return null}validatePrimitiveValue(e,t){return Wf(e)||Ia(e)||Kf(e)||Yf(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function Xf(e){return Array.isArray(e)}var Cl=class{constructor(e){ie(this,"config");ie(this,"value");this.config=e,this.value=new De(e)}validate(e){let t=this.value.validate(e);return t!==null?t:Je(e)||Object.values(this.config.enum).find(n=>n===e)?null:"value is not in enum."}get default(){return this.value.default}get required(){return this.value.required}};m();d();f();p();function Zf(e){return Array.isArray(e)}function Ta(e){return e.trim()===""}var RA=new Set(["1",1,"yes",!0]);function El(){if(typeof navigator>"u"||typeof window>"u")return!1;let e=navigator,t=window;return[e.globalPrivacyControl,e.doNotTrack,e.msDoNotTrack,t.doNotTrack].some(r=>RA.has(r))}function Jf(e){let t={};for(let[r,n]of e)t[r]=n;return t}function si(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function _a(e,t,r={}){let n;return(...o)=>{let i=r.isImmediate&&!n;if(clearTimeout(n),n=setTimeout(()=>{n=void 0,r.isImmediate||e.apply(void 0,o)},t),i)return e.apply(void 0,o)}}function IA(e){if(Ta(e.openingDelimiter)||Ta(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(se(e.content)||Ta(e.content))return e.content;if(e.highlights.length===0)return Hn(e.content);let t=e.content.length,r="",n=0;for(let o=0;o<e.highlights.length;o++){let i=e.highlights[o],a=i.offset,s=a+i.length;if(s>t)break;r+=Hn(e.content.slice(n,a)),r+=e.openingDelimiter,r+=Hn(e.content.slice(a,s)),r+=e.closingDelimiter,n=s}return n!==t&&(r+=Hn(e.content.slice(n))),r}function TA(e,t){return e=Hn(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,i)=>n?Rl(n,t.notMatchDelimiters):o?Rl(o,t.exactMatchDelimiters):i?Rl(i,t.correctionDelimiters):r)}function Rl(e,t){return t?t.open+e+t.close:e}function Hn(e){let t={"&":"&amp;","<":"&lt;",">":"&gt;","\"":"&quot;","'":"&#x27;","`":"&#x60;"},r=`(?:${Object.keys(t).join("|")})`,n=RegExp(r),o=RegExp(r,"g");return n.test(e)?e.replace(o,i=>t[i]):e}m();d();f();p();var dm=qt(sm(),1);m();d();f();p();var $t=new Error("Failed to load reducers."),zn=class extends Error{constructor(){super(),this.name="UnauthorizedTokenError",this.message="The token being used to perform the request is unauthorized. It may be expired or invalid."}},Jr=class extends Error{constructor(r,n){super();ie(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};m();d();f();p();function cm(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function um(e){return typeof e!="object"||!e?!1:Object.values(e).every(ex)}function ex(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function lm(e){return e===429}var jt=class e{static call(t){return _asyncToGenerator(function*(){let r=tx(t),{logger:n}=t,o=yield e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:i,...a}=o,s=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(){let c=yield A(i,a);if(lm(c.status))throw c;return c});return function s(){return _ref.apply(this,arguments)}}();try{let c=yield(0,dm.backOff)(s,{startingDelay:100,timeMultiple:2,maxDelay:800,numOfAttempts:4,jitter:"full",retry:function(){var _ref2=_asyncToGenerator(function*(u){let g=u&&lm(u.status);return g&&(n.info("Platform retrying request"),yield new Promise(v=>setTimeout(v,1e3))),g});return function retry(_x2){return _ref2.apply(this,arguments)}}()});switch(c.status){case 419:case 401:throw n.info("Platform renewing token"),new zn;case 404:throw new Jr(i,c.status);default:return n.info({response:c,requestInfo:o},"Platform response"),c}}catch(c){return c.message==="Failed to fetch"?new Jr(i):c}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:a}=r,{signal:s,...c}=t,u=si(c);try{let g=yield o(t,n,a);return{...t,...g}}catch(g){i.error(g,"Platform request preprocessing failed. Returning default request options.")}return u})()}};function Rt(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function Wn(e,t,r="prod"){return e??Rt(t,r)}function wr(e,t="prod"){return`${Rt(e,t)}/rest/search/v2`}function Oa(e,t="prod"){return`${Rt(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function tx(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:a}=e,s=e.method==="POST"||e.method==="PUT",c=rx(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...(s&&{body:c}),signal:a}}function rx(e,t){return t==="application/x-www-form-urlencoded"?um(e)?cm(e):"":JSON.stringify(e)}m();d();f();p();m();d();f();p();var Pa=e=>e;m();d();f();p();m();d();f();p();function Na(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function Qt(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:Na(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:Na(),extendedResults:{},searchAction:void 0}}m();d();f();p();function Ar(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...i}=e;return i}var xr=e=>{let{response:t}=e;return t.body?nx(e):ox(t)},nx=e=>ax(e)?sx(e):ix(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},ox=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function ix(e){return e.body.statusCode!==void 0}function ax(e){return e.body.exception!==void 0}var sx=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});m();d();f();p();var Cr=class{constructor(){ie(this,"currentAbortController",null)}enqueue(t,r){var _this=this;return _asyncToGenerator(function*(){let n=_this.currentAbortController;_this.currentAbortController=new l.AbortController;let o=_this.currentAbortController;n&&(r.warnOnAbort&&r.logger.warn("Cancelling current pending search query"),n.abort());try{return yield t(o?.signal??null)}finally{_this.currentAbortController===o&&(_this.currentAbortController=null)}})()}};m();d();f();p();m();d();f();p();var li=class{constructor(t){ie(this,"_basePath");ie(this,"_params",{});this._basePath=t}addParam(t,r){this._params={...this.params,[t]:r}}get basePath(){return this._basePath}get params(){return this._params}get hasParams(){return Object.entries(this._params).length}get href(){return this.hasParams?`${this.basePath}?${Object.entries(this.params).map(([t,r])=>`${t}=${encodeURIComponent(r)}`).join("&")}`:this.basePath}};m();d();f();p();function pm(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}m();d();f();p();var ir=(e,t,r,n)=>{let o=new li(`${e.url}${n}`);return o.addParam("organizationId",e.organizationId),e.authentication&&o.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:o.href,origin:"searchApiFetch"}};var fm=/*#__PURE__*/function(){var _ref3=_asyncToGenerator(function*(e,t){let r=yield jt.call({...ir(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:Ar(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=pm(r),o=yield r.arrayBuffer(),a=new TextDecoder(n).decode(o);return cx(a)?{success:a}:{error:xr({response:r,body:a})}});return function fm(_x3,_x4){return _ref3.apply(this,arguments)}}();function cx(e){return typeof e=="string"}m();d();f();p();function ux(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function lx(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Fa(e,t){if(t&&e.name==="AbortError")return{error:lx(e)};if(e instanceof Jr)return{error:ux(e)};throw e}var Da=class{constructor(t){ie(this,"options",t);ie(this,"apiCallsQueues",{unknown:new Cr,mainSearch:new Cr,facetValues:new Cr,foldingCollection:new Cr,instantResults:new Cr})}plan(t){var _this2=this;return _asyncToGenerator(function*(){let r=yield jt.call({...ir(t,"POST","application/json","/plan"),requestParams:Ar(t),requestMetadata:{method:"plan"},..._this2.options});if(r instanceof Error)return Fa(r);let n=yield r.json();return px(n)?{success:n}:{error:xr({response:r,body:n})}})()}querySuggest(t){var _this3=this;return _asyncToGenerator(function*(){let r=yield jt.call({...ir(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:Ar(t),..._this3.options});if(r instanceof Error)return Fa(r);let n=yield r.json(),o={response:r,body:n};return dx(n)?{success:(yield _this3.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:xr(o)}})()}search(t,r){var _this4=this;return _asyncToGenerator(function*(){let n=r?.origin??"unknown",o=yield _this4.apiCallsQueues[n].enqueue(s=>jt.call({...ir(t,"POST","application/json",""),requestParams:Ar(t),requestMetadata:{method:"search",origin:r?.origin},..._this4.options,signal:s??void 0}),{logger:_this4.options.logger,warnOnAbort:!r?.disableAbortWarning});if(o instanceof Error)return Fa(o,r?.disableAbortWarning);let i=yield o.json(),a={response:o,body:i};return mm(i)?(a.body=gm(i),{success:(yield _this4.options.postprocessSearchResponseMiddleware(a)).body}):{error:xr(a)}})()}facetSearch(t){var _this5=this;return _asyncToGenerator(function*(){let r=yield jt.call({...ir(t,"POST","application/json","/facet"),requestParams:Ar(t),requestMetadata:{method:"facetSearch"},..._this5.options});if(r instanceof Error)throw r;let n=yield r.json(),o={response:r,body:n};return(yield _this5.options.postprocessFacetSearchResponseMiddleware(o)).body})()}recommendations(t){var _this6=this;return _asyncToGenerator(function*(){let r=yield jt.call({...ir(t,"POST","application/json",""),requestParams:Ar(t),requestMetadata:{method:"recommendations"},..._this6.options});if(r instanceof Error)throw r;let n=yield r.json();if(mm(n)){let o={response:r,body:n};return o.body=gm(n),{success:(yield _this6.options.postprocessSearchResponseMiddleware(o)).body}}return{error:xr({response:r,body:n})}})()}html(t){var _this7=this;return _asyncToGenerator(function*(){return fm(t,{..._this7.options})})()}fieldDescriptions(t){var _this8=this;return _asyncToGenerator(function*(){let r=yield jt.call({...ir(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},..._this8.options});if(r instanceof Error)throw r;let n=yield r.json();return fx(n)?{success:n}:{error:xr({response:r,body:n})}})()}},Ma=e=>e.success!==void 0,ht=e=>e.error!==void 0;function mm(e){return e.results!==void 0}function gm(e){let t=Na();return se(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}function dx(e){return e.completions!==void 0}function px(e){return e.preprocessingOutput!==void 0}function fx(e){return e.fields!==void 0}m();d();f();p();var hm=e=>e,ym=e=>e,vm=e=>e;m();d();f();p();m();d();f();p();m();d();f();p();function et(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var mx=typeof Symbol=="function"&&Symbol.observable||"@@observable",Sm=mx,Ml=()=>Math.random().toString(36).substring(7).split("").join("."),gx={INIT:`@@redux/INIT${Ml()}`,REPLACE:`@@redux/REPLACE${Ml()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ml()}`},qa=gx;function Ht(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function ql(e,t,r){if(typeof e!="function")throw new Error(et(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(et(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(et(1));return r(ql)(e,t)}let n=e,o=t,i=new Map,a=i,s=0,c=!1;function u(){a===i&&(a=new Map,i.forEach((C,R)=>{a.set(R,C)}))}function g(){if(c)throw new Error(et(3));return o}function v(C){if(typeof C!="function")throw new Error(et(4));if(c)throw new Error(et(5));let R=!0;u();let T=s++;return a.set(T,C),function(){if(R){if(c)throw new Error(et(6));R=!1,u(),a.delete(T),i=null}}}function E(C){if(!Ht(C))throw new Error(et(7));if(typeof C.type>"u")throw new Error(et(8));if(typeof C.type!="string")throw new Error(et(17));if(c)throw new Error(et(9));try{c=!0,o=n(o,C)}finally{c=!1}return(i=a).forEach(T=>{T()}),C}function y(C){if(typeof C!="function")throw new Error(et(10));n=C,E({type:qa.REPLACE})}function h(){let C=v;return{subscribe(R){if(typeof R!="object"||R===null)throw new Error(et(11));function T(){let k=R;k.next&&k.next(g())}return T(),{unsubscribe:C(T)}},[Sm](){return this}}}return E({type:qa.INIT}),{dispatch:E,subscribe:v,getState:g,replaceReducer:y,[Sm]:h}}function hx(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:qa.INIT})>"u")throw new Error(et(12));if(typeof r(void 0,{type:qa.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(et(13))})}function Kn(e){let t=Object.keys(e),r={};for(let a=0;a<t.length;a++){let s=t[a];typeof e[s]=="function"&&(r[s]=e[s])}let n=Object.keys(r),o,i;try{hx(r)}catch(a){i=a}return function(s={},c){if(i)throw i;let u=!1,g={};for(let v=0;v<n.length;v++){let E=n[v],y=r[E],h=s[E],S=y(h,c);if(typeof S>"u"){let C=c&&c.type;throw new Error(et(14))}g[E]=S,u=u||S!==h}return u=u||n.length!==Object.keys(s).length,u?g:s}}function di(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function bm(...e){return t=>(r,n)=>{let o=t(r,n),i=()=>{throw new Error(et(15))},a={getState:o.getState,dispatch:(c,...u)=>i(c,...u)},s=e.map(c=>c(a));return i=di(...s)(o.dispatch),{...o,dispatch:i}}}function pi(e){return Ht(e)&&"type"in e&&typeof e.type=="string"}m();d();f();p();var Hl=Symbol.for("immer-nothing"),fi=Symbol.for("immer-draftable"),We=Symbol.for("immer-state");function tt(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var At=Object,tn=At.getPrototypeOf,mi="constructor",Si="prototype",Ul="configurable",Va="enumerable",La="writable",gi="value",ft=e=>!!e&&!!e[We];function ut(e){return e?Tm(e)||wi(e)||!!e[fi]||!!e[mi]?.[fi]||Ai(e)||xi(e):!1}var yx=At[Si][mi].toString(),wm=new WeakMap;function Tm(e){if(!e||!Xn(e))return!1;let t=tn(e);if(t===null||t===At[Si])return!0;let r=At.hasOwnProperty.call(t,mi)&&t[mi];if(r===Object)return!0;if(!en(r))return!1;let n=wm.get(r);return n===void 0&&(n=Function.toString.call(r),wm.set(r,n)),n===yx}function _m(e){return ft(e)||tt(15,e),e[We].base_}function bi(e,t,r=!0){rn(e)===0?(r?Reflect.ownKeys(e):At.keys(e)).forEach(o=>{t(o,e[o],e)}):e.forEach((n,o)=>t(o,n,e))}function rn(e){let t=e[We];return t?t.type_:wi(e)?1:Ai(e)?2:xi(e)?3:0}var Yn=(e,t,r=rn(e))=>r===2?e.has(t):At[Si].hasOwnProperty.call(e,t),ar=(e,t,r=rn(e))=>r===2?e.get(t):e[t],Ba=(e,t,r,n=rn(e))=>{n===2?e.set(t,r):n===3?e.add(r):e[t]=r};function vx(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var wi=Array.isArray,Ai=e=>e instanceof Map,xi=e=>e instanceof Set,Xn=e=>typeof e=="object",en=e=>typeof e=="function",jl=e=>typeof e=="boolean";function Sx(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var bx=e=>Xn(e)?e?.[We]:null,sr=e=>e.copy_||e.base_;var zl=e=>e.modified_?e.copy_:e.base_;function Vl(e,t){if(Ai(e))return new Map(e);if(xi(e))return new Set(e);if(wi(e))return Array[Si].slice.call(e);let r=Tm(e);if(t===!0||t==="class_only"&&!r){let n=At.getOwnPropertyDescriptors(e);delete n[We];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let a=o[i],s=n[a];s[La]===!1&&(s[La]=!0,s[Ul]=!0),(s.get||s.set)&&(n[a]={[Ul]:!0,[La]:!0,[Va]:s[Va],[gi]:e[a]})}return At.create(tn(e),n)}else{let n=tn(e);if(n!==null&&r)return{...e};let o=At.create(n);return At.assign(o,e)}}function Wl(e,t=!1){return Wa(e)||ft(e)||!ut(e)||(rn(e)>1&&At.defineProperties(e,{set:ja,add:ja,clear:ja,delete:ja}),At.freeze(e),t&&bi(e,(r,n)=>{Wl(n,!0)},!1)),e}function wx(){tt(2)}var ja={[gi]:wx};function Wa(e){return e===null||!Xn(e)?!0:At.isFrozen(e)}var Ga="MapSet",$a="Patches",Am="ArrayMethods",Qa={};function nn(e){let t=Qa[e];return t||tt(0,e),t}var xm=e=>!!Qa[e];function Ax(e,t){Qa[e]||(Qa[e]=t)}var hi,km=()=>hi,xx=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:xm(Ga)?nn(Ga):void 0,arrayMethodsPlugin_:xm(Am)?nn(Am):void 0});function Cm(e,t){t&&(e.patchPlugin_=nn($a),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Bl(e){Gl(e),e.drafts_.forEach(Cx),e.drafts_=null}function Gl(e){e===hi&&(hi=e.parent_)}var Em=e=>hi=xx(hi,e);function Cx(e){let t=e[We];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Rm(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[We].modified_&&(Bl(t),tt(4)),ut(e)&&(e=Im(t,e));let{patchPlugin_:o}=t;o&&o.generateReplacementPatches_(r[We].base_,e,t)}else e=Im(t,r);return Ex(t,e,!0),Bl(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Hl?e:void 0}function Im(e,t){if(Wa(t))return t;let r=t[We];if(!r)return Ha(t,e.handledSet_,e);if(!Ka(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:n}=r;if(n)for(;n.length>0;)n.pop()(e);Nm(r,e)}return r.copy_}function Ex(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Wl(t,r)}function Om(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var Ka=(e,t)=>e.scope_===t,Rx=[];function Pm(e,t,r,n){let o=sr(e),i=e.type_;if(n!==void 0&&ar(o,n,i)===t){Ba(o,n,r,i);return}if(!e.draftLocations_){let s=e.draftLocations_=new Map;bi(o,(c,u)=>{if(ft(u)){let g=s.get(u)||[];g.push(c),s.set(u,g)}})}let a=e.draftLocations_.get(t)??Rx;for(let s of a)Ba(o,s,r,i)}function Ix(e,t,r){e.callbacks_.push(function(o){let i=t;if(!i||!Ka(i,o))return;o.mapSetPlugin_?.fixSetContents(i);let a=zl(i);Pm(e,i.draft_??i,a,r),Nm(i,o)})}function Nm(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:n}=t;if(n){let o=n.getPath(e);o&&n.generatePatches_(e,o,t)}Om(e)}}function Tx(e,t,r){let{scope_:n}=e;if(ft(r)){let o=r[We];Ka(o,n)&&o.callbacks_.push(function(){Ua(e);let a=zl(o);Pm(e,r,a,t)})}else ut(r)&&e.callbacks_.push(function(){let i=sr(e);e.type_===3?i.has(r)&&Ha(r,n.handledSet_,n):ar(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&Ha(ar(e.copy_,t,e.type_),n.handledSet_,n)})}function Ha(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||ft(e)||t.has(e)||!ut(e)||Wa(e)||(t.add(e),bi(e,(n,o)=>{if(ft(o)){let i=o[We];if(Ka(i,r)){let a=zl(i);Ba(e,n,a,e.type_),Om(i)}}else ut(o)&&Ha(o,t,r)})),e}function _x(e,t){let r=wi(e),n={type_:r?1:0,scope_:t?t.scope_:km(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},o=n,i=za;r&&(o=[n],i=yi);let{revoke:a,proxy:s}=Proxy.revocable(o,i);return n.draft_=s,n.revoke_=a,[s,n]}var za={get(e,t){if(t===We)return e;let r=e.scope_.arrayMethodsPlugin_,n=e.type_===1&&typeof t=="string";if(n&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let o=sr(e);if(!Yn(o,t,e.type_))return Ox(e,o,t);let i=o[t];if(e.finalized_||!ut(i)||n&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&Sx(t))return i;if(i===Ll(e.base_,t)||kx(e,t,i)){Ua(e);let a=e.type_===1?+t:t,s=Ql(e.scope_,i,e,a);return e.copy_[a]=s}return i},has(e,t){return t in sr(e)},ownKeys(e){return Reflect.ownKeys(sr(e))},set(e,t,r){let n=Fm(sr(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=Ll(sr(e),t),i=o?.[We];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(vx(r,o)&&(r!==void 0||Yn(e.base_,t,e.type_)))return!0;Ua(e),$l(e)}return e.copy_[t]===r&&(r!==void 0||Yn(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),Tx(e,t,r)),!0},deleteProperty(e,t){return Ua(e),Ll(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),$l(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=sr(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{[La]:!0,[Ul]:e.type_!==1||t!=="length",[Va]:n[Va],[gi]:r[t]}},defineProperty(){tt(11)},getPrototypeOf(e){return tn(e.base_)},setPrototypeOf(){tt(12)}},yi={};for(let e in za){let t=za[e];yi[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}yi.deleteProperty=function(e,t){return yi.set.call(this,e,t,void 0)};yi.set=function(e,t,r){return za.set.call(this,e[0],t,r,e[0])};function Ll(e,t){let r=e[We];return(r?sr(r):e)[t]}function kx(e,t,r){return e.type_!==1||!e.allIndicesReassigned_||e.assigned_?.get(t)||!ut(r)||r[We]?!1:e.baseRefs_.has(r)}function Ox(e,t,r){let n=Fm(t,r);return n?gi in n?n[gi]:n.get?.call(e.draft_):void 0}function Fm(e,t){if(!(t in e))return;let r=tn(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=tn(r)}}function $l(e){e.modified_||(e.modified_=!0,e.parent_&&$l(e.parent_))}function Ua(e){e.copy_||(e.assigned_=new Map,e.copy_=Vl(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Px=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,n)=>{if(en(t)&&!en(r)){let i=r;r=t;let a=this;return function(c=i,...u){return a.produce(c,g=>r.call(this,g,...u))}}en(r)||tt(6),n!==void 0&&!en(n)&&tt(7);let o;if(ut(t)){let i=Em(this),a=Ql(i,t,void 0),s=!0;try{o=r(a),s=!1}finally{s?Bl(i):Gl(i)}return Cm(i,n),Rm(o,i)}else if(!t||!Xn(t)){if(o=r(t),o===void 0&&(o=t),o===Hl&&(o=void 0),this.autoFreeze_&&Wl(o,!0),n){let i=[],a=[];nn($a).generateReplacementPatches_(t,o,{patches_:i,inversePatches_:a}),n(i,a)}return o}else tt(1,t)},this.produceWithPatches=(t,r)=>{if(en(t))return(a,...s)=>this.produceWithPatches(a,c=>t(c,...s));let n,o;return[this.produce(t,r,(a,s)=>{n=a,o=s}),n,o]},jl(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),jl(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),jl(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){ut(e)||tt(8),ft(e)&&(e=Ya(e));let t=Em(this),r=Ql(t,e,void 0);return r[We].isManual_=!0,Gl(t),r}finishDraft(e,t){let r=e&&e[We];(!r||!r.isManual_)&&tt(9);let{scope_:n}=r;return Cm(n,t),Rm(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=nn($a).applyPatches_;return ft(e)?n(e,t):this.produce(e,o=>n(o,t))}};function Ql(e,t,r,n){let[o,i]=Ai(t)?nn(Ga).proxyMap_(t,r):xi(t)?nn(Ga).proxySet_(t,r):_x(t,r);return(r?.scope_??km()).drafts_.push(o),i.callbacks_=r?.callbacks_??[],i.key_=n,r&&n!==void 0?Ix(r,i,n):i.callbacks_.push(function(c){c.mapSetPlugin_?.fixSetContents(i);let{patchPlugin_:u}=c;i.modified_&&u&&u.generatePatches_(i,[],c)}),o}function Ya(e){return ft(e)||tt(10,e),Dm(e)}function Dm(e){if(!ut(e)||Wa(e))return e;let t=e[We],r,n=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Vl(e,t.scope_.immer_.useStrictShallowCopy_),n=t.scope_.immer_.shouldUseStrictIteration()}else r=Vl(e,!0);return bi(r,(o,i)=>{Ba(r,o,Dm(i))},n),t&&(t.finalized_=!1),r}function Mm(){function t(h,S=[]){if(h.key_!==void 0){let C=h.parent_.copy_??h.parent_.base_,R=bx(ar(C,h.key_)),T=ar(C,h.key_);if(T===void 0||T!==h.draft_&&T!==h.base_&&T!==h.copy_||R!=null&&R.base_!==h.base_)return null;let I=h.parent_.type_===3,k;if(I){let _=h.parent_;k=Array.from(_.drafts_.keys()).indexOf(h.key_)}else k=h.key_;if(!(I&&C.size>k||Yn(C,k)))return null;S.push(k)}if(h.parent_)return t(h.parent_,S);S.reverse();try{r(h.copy_,S)}catch{return null}return S}function r(h,S){let C=h;for(let R=0;R<S.length-1;R++){let T=S[R];if(C=ar(C,T),!Xn(C)||C===null)throw new Error(`Cannot resolve path at '${S.join("/")}'`)}return C}let n="replace",o="add",i="remove";function a(h,S,C){if(h.scope_.processedForPatches_.has(h))return;h.scope_.processedForPatches_.add(h);let{patches_:R,inversePatches_:T}=C;switch(h.type_){case 0:case 2:return c(h,S,R,T);case 1:return s(h,S,R,T);case 3:return u(h,S,R,T)}}function s(h,S,C,R){let{base_:T,assigned_:I}=h,k=h.copy_;k.length<T.length&&([T,k]=[k,T],[C,R]=[R,C]);let _=h.allIndicesReassigned_===!0;for(let D=0;D<T.length;D++){let G=k[D],L=T[D];if((_||I?.get(D.toString()))&&G!==L){let V=G?.[We];if(V&&V.modified_)continue;let q=S.concat([D]);C.push({op:n,path:q,value:y(G)}),R.push({op:n,path:q,value:y(L)})}}for(let D=T.length;D<k.length;D++){let G=S.concat([D]);C.push({op:o,path:G,value:y(k[D])})}for(let D=k.length-1;T.length<=D;--D){let G=S.concat([D]);R.push({op:i,path:G})}}function c(h,S,C,R){let{base_:T,copy_:I,type_:k}=h;bi(h.assigned_,(_,D)=>{let G=ar(T,_,k),L=ar(I,_,k),j=D?Yn(T,_)?n:o:i;if(G===L&&j===n)return;let V=S.concat(_);C.push(j===i?{op:j,path:V}:{op:j,path:V,value:y(L)}),R.push(j===o?{op:i,path:V}:j===i?{op:o,path:V,value:y(G)}:{op:n,path:V,value:y(G)})})}function u(h,S,C,R){let{base_:T,copy_:I}=h,k=0;T.forEach(_=>{if(!I.has(_)){let D=S.concat([k]);C.push({op:i,path:D,value:_}),R.unshift({op:o,path:D,value:_})}k++}),k=0,I.forEach(_=>{if(!T.has(_)){let D=S.concat([k]);C.push({op:o,path:D,value:_}),R.unshift({op:i,path:D,value:_})}k++})}function g(h,S,C){let{patches_:R,inversePatches_:T}=C;R.push({op:n,path:[],value:S===Hl?void 0:S}),T.push({op:n,path:[],value:h})}function v(h,S){return S.forEach(C=>{let{path:R,op:T}=C,I=h;for(let G=0;G<R.length-1;G++){let L=rn(I),j=R[G];typeof j!="string"&&typeof j!="number"&&(j=""+j),(L===0||L===1)&&(j==="__proto__"||j===mi)&&tt(19),en(I)&&j===Si&&tt(19),I=ar(I,j),(I===null||!Xn(I))&&tt(18,R.join("/"))}let k=rn(I),_=E(C.value),D=R[R.length-1];switch(T){case n:switch(k){case 2:return I.set(D,_);case 3:tt(16);default:return I[D]=_}case o:switch(k){case 1:return D==="-"?I.push(_):I.splice(D,0,_);case 2:return I.set(D,_);case 3:return I.add(_);default:return I[D]=_}case i:switch(k){case 1:return I.splice(D,1);case 2:return I.delete(D);case 3:return I.delete(C.value);default:return delete I[D]}default:tt(17,T)}}),h}function E(h){if(!ut(h))return h;if(wi(h))return h.map(E);if(Ai(h))return new Map(Array.from(h.entries()).map(([C,R])=>[C,E(R)]));if(xi(h))return new Set(Array.from(h).map(E));let S=Object.create(tn(h));for(let C in h)S[C]=E(h[C]);return Yn(h,fi)&&(S[fi]=h[fi]),S}function y(h){return ft(h)?E(h):h}Ax($a,{applyPatches_:v,generatePatches_:a,generateReplacementPatches_:g,getPath:t})}var vi=new Px,on=vi.produce,Kl=vi.produceWithPatches.bind(vi);var Yl=vi.applyPatches.bind(vi);m();d();f();p();function Nx(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Fx(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var qm=e=>Array.isArray(e)?e:[e];function Dx(e){let t=Array.isArray(e[0])?e[0]:e;return Fx(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Mx(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var qx=class{constructor(e){this.value=e}deref(){return this.value}},jx=()=>typeof WeakRef>"u"?qx:WeakRef,Lm=jx(),Lx=0,jm=1;function Xa(){return{s:Lx,v:void 0,o:null,p:null}}function Ux(e){return e instanceof Lm?e.deref():e}function Ci(e,t={}){let r=Xa(),{resultEqualityCheck:n}=t,o,i=0;function a(){let s=r,{length:c}=arguments;for(let v=0,E=c;v<E;v++){let y=arguments[v];if(typeof y=="function"||typeof y=="object"&&y!==null){let h=s.o;h===null&&(s.o=h=new WeakMap);let S=h.get(y);S===void 0?(s=Xa(),h.set(y,s)):s=S}else{let h=s.p;h===null&&(s.p=h=new Map);let S=h.get(y);S===void 0?(s=Xa(),h.set(y,s)):s=S}}let u=s,g;if(s.s===jm)g=s.v;else if(g=e.apply(null,arguments),i++,n){let v=Ux(o);v!=null&&n(v,g)&&(g=v,i!==0&&i--),o=typeof g=="object"&&g!==null||typeof g=="function"?new Lm(g):g}return u.s=jm,u.v=g,g}return a.clearCache=()=>{r=Xa(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function Vx(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let i=0,a=0,s,c={},u=o.pop();typeof u=="object"&&(c=u,u=o.pop()),Nx(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);let g={...r,...c},{memoize:v,memoizeOptions:E=[],argsMemoize:y=Ci,argsMemoizeOptions:h=[]}=g,S=qm(E),C=qm(h),R=Dx(o),T=v(function(){return i++,u.apply(null,arguments)},...S),I=!0,k=y(function(){a++;let D=Mx(R,arguments);return s=T.apply(null,D),s},...C);return Object.assign(k,{resultFunc:u,memoizedResultFunc:T,dependencies:R,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:v,argsMemoize:y})};return Object.assign(n,{withTypes:()=>n}),n}var $e=Vx(Ci);m();d();f();p();function Um(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var Vm=Um(),Bm=Um;var Bx=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?di:di.apply(null,arguments)},gq=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Gx=e=>e&&typeof e.match=="function";function O(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(mt(0));return{type:e,payload:o.payload,...("meta"in o&&{meta:o.meta}),...("error"in o&&{error:o.error})}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>pi(n)&&n.type===e,r}var Ym=class Ei extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ei.prototype)}static get[Symbol.species](){return Ei}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ei(...t[0].concat(this)):new Ei(...t.concat(this))}};function Gm(e){return ut(e)?on(e,()=>{}):e}function Za(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function $x(e){return typeof e=="boolean"}var Qx=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},a=new Ym;return r&&($x(r)?a.push(Vm):a.push(Bm(r.extraArgument))),a},Ri="RTK_autoBatch",eo=()=>e=>({payload:e,meta:{[Ri]:!0}}),$m=e=>t=>{setTimeout(t,e)},Hx=(e,t)=>r=>{let n=!1,o=()=>{n||(n=!0,cancelAnimationFrame(i),clearTimeout(a),r())},i=e(o),a=setTimeout(o,t)},zx=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,i=!1,a=!1,s=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?Hx(window.requestAnimationFrame,100):$m(10):e.type==="callback"?e.queueNotification:$m(e.timeout),u=()=>{a=!1,i&&(i=!1,s.forEach(g=>g()))};return Object.assign({},n,{subscribe(g){let v=()=>o&&g(),E=n.subscribe(v);return s.add(g),()=>{E(),s.delete(g)}},dispatch(g){try{return o=!g?.meta?.[Ri],i=!o,i&&(a||(a=!0,c(u))),n.dispatch(g)}finally{o=!0}}})},Wx=e=>function(r){let{autoBatch:n=!0}=r??{},o=new Ym(e);return n&&o.push(zx(typeof n=="object"?n:void 0)),o};function Xm(e){let t=Qx(),{reducer:r=void 0,middleware:n,devTools:o=!0,duplicateMiddlewareCheck:i=!0,preloadedState:a=void 0,enhancers:s=void 0}=e||{},c;if(typeof r=="function")c=r;else if(Ht(r))c=Kn(r);else throw new Error(mt(1));let u;typeof n=="function"?u=n(t):u=t();let g=di;o&&(g=Bx({trace:!1,...(typeof o=="object"&&o)}));let v=bm(...u),E=Wx(v),y=typeof s=="function"?s(E):E(),h=g(...y);return ql(c,a,h)}function Zm(e){let t={},r=[],n,o={addCase(i,a){let s=typeof i=="string"?i:i.type;if(!s)throw new Error(mt(28));if(s in t)throw new Error(mt(29));return t[s]=a,o},addAsyncThunk(i,a){return a.pending&&(t[i.pending.type]=a.pending),a.rejected&&(t[i.rejected.type]=a.rejected),a.fulfilled&&(t[i.fulfilled.type]=a.fulfilled),a.settled&&r.push({matcher:i.settled,reducer:a.settled}),o},addMatcher(i,a){return r.push({matcher:i,reducer:a}),o},addDefaultCase(i){return n=i,o}};return e(o),[t,r,n]}function Kx(e){return typeof e=="function"}function Be(e,t){let[r,n,o]=Zm(t),i;if(Kx(e))i=()=>Gm(e());else{let s=Gm(e);i=()=>s}function a(s=i(),c){let u=[r[c.type],...n.filter(({matcher:g})=>g(c)).map(({reducer:g})=>g)];return u.filter(g=>!!g).length===0&&(u=[o]),u.reduce((g,v)=>{if(v)if(ft(g)){let y=v(g,c);return y===void 0?g:y}else{if(ut(g))return on(g,E=>v(E,c));{let E=v(g,c);if(E===void 0){if(g===null)return g;throw Error("A case reducer on a non-draftable value must not return undefined")}return E}}return g},s)}return a.getInitialState=i,a}var Jm=(e,t)=>Gx(e)?e.match(t):e(t);function zt(...e){return t=>e.some(r=>Jm(r,t))}function Jn(...e){return t=>e.every(r=>Jm(r,t))}function rs(e,t){if(!e||!e.meta)return!1;let r=typeof e.meta.requestId=="string",n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function Ii(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function ns(...e){return e.length===0?t=>rs(t,["pending"]):Ii(e)?zt(...e.map(t=>t.pending)):ns()(e[0])}function sn(...e){return e.length===0?t=>rs(t,["rejected"]):Ii(e)?zt(...e.map(t=>t.rejected)):sn()(e[0])}function Ti(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Jn(sn(...e),t):Ii(e)?Jn(sn(...e),t):Ti()(e[0])}function cr(...e){return e.length===0?t=>rs(t,["fulfilled"]):Ii(e)?zt(...e.map(t=>t.fulfilled)):cr()(e[0])}function os(...e){return e.length===0?t=>rs(t,["pending","fulfilled","rejected"]):Ii(e)?zt(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):os()(e[0])}var Yx="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",_i=(e=21)=>{let t="",r=e;for(;r--;)t+=Yx[Math.random()*64|0];return t},Xx=["name","message","stack","code"],Xl=class{constructor(e,t){ie(this,"payload");ie(this,"meta");ie(this,"_type");this.payload=e,this.meta=t}},Qm=class{constructor(e,t){ie(this,"payload");ie(this,"meta");ie(this,"_type");this.payload=e,this.meta=t}},Zx=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Xx)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},Hm="External signal was aborted",Ie=(()=>{function e(t,r,n){let o=O(t+"/fulfilled",(c,u,g,v)=>({payload:c,meta:{...(v||{}),arg:g,requestId:u,requestStatus:"fulfilled"}})),i=O(t+"/pending",(c,u,g)=>({payload:void 0,meta:{...(g||{}),arg:u,requestId:c,requestStatus:"pending"}})),a=O(t+"/rejected",(c,u,g,v,E)=>({payload:v,error:(n&&n.serializeError||Zx)(c||"Rejected"),meta:{...(E||{}),arg:g,requestId:u,rejectedWithValue:!!v,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function s(c,{signal:u}={}){return(g,v,E)=>{let y=n?.idGenerator?n.idGenerator(c):_i(),h=new l.AbortController,S,C;function R(I){C=I,h.abort()}u&&(u.aborted?R(Hm):u.addEventListener("abort",()=>R(Hm),{once:!0}));let T=_asyncToGenerator(function*(){let I;try{let _=n?.condition?.(c,{getState:v,extra:E});if(eC(_)&&(_=yield _),_===!1||h.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let D=new Promise((G,L)=>{S=()=>{L({name:"AbortError",message:C||"Aborted"})},h.signal.addEventListener("abort",S,{once:!0})});g(i(y,c,n?.getPendingMeta?.({requestId:y,arg:c},{getState:v,extra:E}))),I=yield Promise.race([D,Promise.resolve(r(c,{dispatch:g,getState:v,extra:E,requestId:y,signal:h.signal,abort:R,rejectWithValue:(G,L)=>new Xl(G,L),fulfillWithValue:(G,L)=>new Qm(G,L)})).then(G=>{if(G instanceof Xl)throw G;return G instanceof Qm?o(G.payload,y,c,G.meta):o(G,y,c)})])}catch(_){I=_ instanceof Xl?a(null,y,c,_.payload,_.meta):a(_,y,c)}finally{S&&h.signal.removeEventListener("abort",S)}return n&&!n.dispatchConditionRejection&&a.match(I)&&I.meta.condition||g(I),I})();return Object.assign(T,{abort:R,requestId:y,arg:c,unwrap(){return T.then(Jx)}})}}return Object.assign(s,{pending:i,rejected:a,fulfilled:o,settled:zt(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Jx(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function eC(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var eg=Symbol.for("rtk-slice-createasyncthunk"),yq={[eg]:Ie};function tC(e,t){return`${e}/${t}`}function rC({creators:e}={}){let t=e?.asyncThunk?.[eg];return function(n){let{name:o,reducerPath:i=o}=n;if(!o)throw new Error(mt(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(oC()):n.reducers)||{},s=Object.keys(a),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(I,k){let _=typeof I=="string"?I:I.type;if(!_)throw new Error(mt(12));if(_ in c.sliceCaseReducersByType)throw new Error(mt(13));return c.sliceCaseReducersByType[_]=k,u},addMatcher(I,k){return c.sliceMatchers.push({matcher:I,reducer:k}),u},exposeAction(I,k){return c.actionCreators[I]=k,u},exposeCaseReducer(I,k){return c.sliceCaseReducersByName[I]=k,u}};s.forEach(I=>{let k=a[I],_={reducerName:I,type:tC(o,I),createNotation:typeof n.reducers=="function"};aC(k)?cC(_,k,u,t):iC(_,k,u)});function g(){let[I={},k=[],_=void 0]=typeof n.extraReducers=="function"?Zm(n.extraReducers):[n.extraReducers],D={...I,...c.sliceCaseReducersByType};return Be(n.initialState,G=>{for(let L in D)G.addCase(L,D[L]);for(let L of c.sliceMatchers)G.addMatcher(L.matcher,L.reducer);for(let L of k)G.addMatcher(L.matcher,L.reducer);_&&G.addDefaultCase(_)})}let v=I=>I,E=new Map,y=new WeakMap,h;function S(I,k){return h||(h=g()),h(I,k)}function C(){return h||(h=g()),h.getInitialState()}function R(I,k=!1){function _(G){let L=G[I];return typeof L>"u"&&k&&(L=Za(y,_,C)),L}function D(G=v){let L=Za(E,k,()=>new WeakMap);return Za(L,G,()=>{let j={};for(let[V,q]of Object.entries(n.selectors??{}))j[V]=nC(q,G,()=>Za(y,G,C),k);return j})}return{reducerPath:I,getSelectors:D,get selectors(){return D(_)},selectSlice:_}}let T={name:o,reducer:S,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:C,...R(i),injectInto(I,{reducerPath:k,..._}={}){let D=k??i;return I.inject({reducerPath:D,reducer:S},_),{...T,...R(D,!0)}}};return T}}function nC(e,t,r,n){function o(i,...a){let s=t(i);return typeof s>"u"&&n&&(s=r()),e(s,...a)}return o.unwrapped=e,o}var cn=rC();function oC(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function iC({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!sC(n))throw new Error(mt(17));i=n.reducer,a=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?O(e,a):O(e))}function aC(e){return e._reducerDefinitionType==="asyncThunk"}function sC(e){return e._reducerDefinitionType==="reducerWithPrepare"}function cC({type:e,reducerName:t},r,n,o){if(!o)throw new Error(mt(18));let{payloadCreator:i,fulfilled:a,pending:s,rejected:c,settled:u,options:g}=r,v=o(e,i,g);n.exposeAction(t,v),a&&n.addCase(v.fulfilled,a),s&&n.addCase(v.pending,s),c&&n.addCase(v.rejected,c),u&&n.addMatcher(v.settled,u),n.exposeCaseReducer(t,{fulfilled:a||Ja,pending:s||Ja,rejected:c||Ja,settled:u||Ja})}function Ja(){}var uC="task",tg="listener",rg="completed",ed="cancelled",lC=`task-${ed}`,dC=`task-${rg}`,Zl=`${tg}-${ed}`,pC=`${tg}-${rg}`,is=class{constructor(e){ie(this,"code");ie(this,"name","TaskAbortError");ie(this,"message");this.code=e,this.message=`${uC} ${ed} (reason: ${e})`}},td=(e,t)=>{if(typeof e!="function")throw new TypeError(mt(32))},es=()=>{},ng=(e,t=es)=>(e.catch(t),e),og=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),an=e=>{if(e.aborted)throw new is(e.reason)};function ig(e,t){let r=es;return new Promise((n,o)=>{let i=()=>o(new is(e.reason));if(e.aborted){i();return}r=og(e,i),t.finally(()=>r()).then(n,o)}).finally(()=>{r=es})}var fC=/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,t){try{return yield Promise.resolve(),{status:"ok",value:yield e()}}catch(r){return{status:r instanceof is?"cancelled":"rejected",error:r}}finally{t?.()}});return function fC(_x5,_x6){return _ref5.apply(this,arguments)}}(),ts=e=>t=>ng(ig(e,t).then(r=>(an(e),r))),ag=e=>{let t=ts(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:Zn}=Object,zm={},as="listenerMiddleware",mC=(e,t)=>{let r=n=>og(e,()=>n.abort(e.reason));return(n,o)=>{td(n,"taskExecutor");let i=new l.AbortController;r(i);let a=fC(/*#__PURE__*/_asyncToGenerator(function*(){an(e),an(i.signal);let s=yield n({pause:ts(i.signal),delay:ag(i.signal),signal:i.signal});return an(i.signal),s}),()=>i.abort(dC));return o?.autoJoin&&t.push(a.catch(es)),{result:ts(e)(a),cancel(){i.abort(lC)}}}},gC=(e,t)=>{let r=/*#__PURE__*/function(){var _ref7=_asyncToGenerator(function*(n,o){an(t);let i=()=>{},s=[new Promise((c,u)=>{let g=e({predicate:n,effect:(v,E)=>{E.unsubscribe(),c([v,E.getState(),E.getOriginalState()])}});i=()=>{g(),u()}})];o!=null&&s.push(new Promise(c=>setTimeout(c,o,null)));try{let c=yield ig(t,Promise.race(s));return an(t),c}finally{i()}});return function r(_x7,_x8){return _ref7.apply(this,arguments)}}();return(n,o)=>ng(r(n,o))},sg=e=>{let{type:t,actionCreator:r,matcher:n,predicate:o,effect:i}=e;if(t)o=O(t).match;else if(r)t=r.type,o=r.match;else if(n)o=n;else if(!o)throw new Error(mt(21));return td(i,"options.listener"),{predicate:o,type:t,effect:i}},cg=Zn(e=>{let{type:t,predicate:r,effect:n}=sg(e);return{id:_i(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(mt(22))}}},{withTypes:()=>cg}),Wm=(e,t)=>{let{type:r,effect:n,predicate:o}=sg(t);return Array.from(e.values()).find(i=>(typeof r=="string"?i.type===r:i.predicate===o)&&i.effect===n)},Jl=e=>{e.pending.forEach(t=>{t.abort(Zl)})},hC=(e,t)=>()=>{for(let r of t.keys())Jl(r);e.clear()},Km=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},ug=Zn(O(`${as}/add`),{withTypes:()=>ug}),yC=O(`${as}/removeAll`),lg=Zn(O(`${as}/remove`),{withTypes:()=>lg}),vC=(...e)=>{console.error(`${as}/error`,...e)},dg=(e={})=>{let t=new Map,r=new Map,n=y=>{let h=r.get(y)??0;r.set(y,h+1)},o=y=>{let h=r.get(y)??1;h===1?r.delete(y):r.set(y,h-1)},{extra:i,onError:a=vC}=e;td(a,"onError");let s=y=>(y.unsubscribe=()=>t.delete(y.id),t.set(y.id,y),h=>{y.unsubscribe(),h?.cancelActive&&Jl(y)}),c=y=>{let h=Wm(t,y)??cg(y);return s(h)};Zn(c,{withTypes:()=>c});let u=y=>{let h=Wm(t,y);return h&&(h.unsubscribe(),y.cancelActive&&Jl(h)),!!h};Zn(u,{withTypes:()=>u});let g=/*#__PURE__*/function(){var _ref8=_asyncToGenerator(function*(y,h,S,C){let R=new l.AbortController,T=gC(c,R.signal),I=[];try{y.pending.add(R),n(y),yield Promise.resolve(y.effect(h,Zn({},S,{getOriginalState:C,condition:(k,_)=>T(k,_).then(Boolean),take:T,delay:ag(R.signal),pause:ts(R.signal),extra:i,signal:R.signal,fork:mC(R.signal,I),unsubscribe:y.unsubscribe,subscribe:()=>{t.set(y.id,y)},cancelActiveListeners:()=>{y.pending.forEach((k,_,D)=>{k!==R&&(k.abort(Zl),D.delete(k))})},cancel:()=>{R.abort(Zl),y.pending.delete(R)},throwIfCancelled:()=>{an(R.signal)}})))}catch(k){k instanceof is||Km(a,k,{raisedBy:"effect"})}finally{yield Promise.all(I),R.abort(pC),o(y),y.pending.delete(R)}});return function g(_x9,_x0,_x1,_x10){return _ref8.apply(this,arguments)}}(),v=hC(t,r);return{middleware:y=>h=>S=>{if(!pi(S))return h(S);if(ug.match(S))return c(S.payload);if(yC.match(S)){v();return}if(lg.match(S))return u(S.payload);let C=y.getState(),R=()=>{if(C===zm)throw new Error(mt(23));return C},T;try{if(T=h(S),t.size>0){let I=y.getState(),k=Array.from(t.values());for(let _ of k){let D=!1;try{D=_.predicate(S,I,C)}catch(G){D=!1,Km(a,G,{raisedBy:"predicate"})}D&&g(_,S,y,R)}}}finally{C=zm}return T},startListening:c,stopListening:u,clearListeners:v}};function mt(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}m();d();f();p();var Y=new z({required:!0,emptyAllowed:!1}),rt=new z({required:!1,emptyAllowed:!1}),nt=new z({required:!0,emptyAllowed:!0}),_q=new z({required:!1,emptyAllowed:!0}),ss=new ve({each:Y,required:!0}),pg=new z({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),fg=new z({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),kq=new z({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),ur=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),It=(e,t)=>{if("required"in t)return{payload:new gt({value:t}).validate({value:e}).value};let o=new ne({options:{required:!0},values:t}).validate(e);if(o)throw new ai(o);return{payload:e}},B=(e,t)=>{try{return It(e,t)}catch(r){return{payload:e,error:ur(r)}}},mg=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return hg(e,t,r,o,"Controller initialization error")},gg=(e,t,r,n)=>{let o=`Check the options of ${n}`;return hg(e,t,r,o,"Controller initialization error")},hg=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(i){throw e.logger.error(i,o),i}};m();d();f();p();var to="3.55.1",yg=["@coveo/atomic","@coveo/quantic"];var rd=()=>rt,vg=()=>Y,Er=O("configuration/updateBasicConfiguration",e=>B(e,{accessToken:rt,environment:new z({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:rt})),Wt=O("configuration/updateSearchConfiguration",e=>B(e,{proxyBaseUrl:new z({required:!1,url:!0}),pipeline:new z({required:!1,emptyAllowed:!0}),searchHub:rt,timezone:rt,locale:rt,authenticationProviders:new ve({required:!1,each:Y})})),SC={enabled:new fe({default:!0}),originContext:rd(),originLevel2:rd(),originLevel3:rd(),proxyBaseUrl:new z({required:!1,url:!0}),runtimeEnvironment:new De,anonymous:new fe({default:!1}),deviceId:rt,userDisplayName:rt,documentLocation:rt,trackingId:fg,analyticsMode:new z({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new ne({options:{required:!1},values:yg.reduce((e,t)=>(e[t]=pg,e),{})})},ro=O("configuration/updateAnalyticsConfiguration",e=>B(e,SC)),no=O("configuration/analytics/disable"),oo=O("configuration/analytics/enable"),cs=O("configuration/analytics/originlevel2",e=>B(e,{originLevel2:vg()})),us=O("configuration/analytics/originlevel3",e=>B(e,{originLevel3:vg()})),Sg=O("knowledge/setAgentId",e=>B(e,new z({required:!0})));m();d();f();p();m();d();f();p();m();d();f();p();var bg={q:new z,enableQuerySyntax:new fe,aq:new z,cq:new z,firstResult:new oe({min:0}),numberOfResults:new oe({min:0}),sortCriteria:new z,f:new ne,fExcluded:new ne,cf:new ne,nf:new ne,mnf:new ne,df:new ne,debug:new fe,sf:new ne,tab:new z,af:new ne};var Rr=O("searchParameters/restore",e=>B(e,bg)),wg=O("searchParameters/restoreTab",e=>B(e,Y));m();d();f();p();var ls=O("debug/enable"),ds=O("debug/disable");m();d();f();p();var ps=()=>!1;var fs=Be(ps(),e=>{e.addCase(ls,()=>!0).addCase(ds,()=>!1).addCase(Rr,(t,r)=>r.payload.debug??t)});m();d();f();p();var io=O("pipeline/set",e=>B(e,new z({required:!0,emptyAllowed:!0})));m();d();f();p();m();d();f();p();var bC=O("history/undo"),wC=O("history/redo"),Kt=O("history/snapshot"),Lj=Ie("history/back",/*#__PURE__*/function(){var _ref9=_asyncToGenerator(function*(e,{dispatch:t}){t(bC()),yield t(yt())});return function(_x11,_x12){return _ref9.apply(this,arguments)}}()),Uj=Ie("history/forward",/*#__PURE__*/function(){var _ref0=_asyncToGenerator(function*(e,{dispatch:t}){t(wC()),yield t(yt())});return function(_x13,_x14){return _ref0.apply(this,arguments)}}()),yt=Ie("history/change",/*#__PURE__*/function(){var _ref1=_asyncToGenerator(function*(e,{getState:t}){return t().history.present});return function(_x15,_x16){return _ref1.apply(this,arguments)}}());m();d();f();p();var Ir=()=>"";var ao=Be(Ir(),e=>{e.addCase(io,(t,r)=>r.payload).addCase(yt.fulfilled,(t,r)=>r.payload?.pipeline??t).addCase(Wt,(t,r)=>r.payload.pipeline||t)});m();d();f();p();m();d();f();p();var ms=O("app/setError");m();d();f();p();m();d();f();p();m();d();f();p();m();d();f();p();var so=class e{static set(t,r,n){let o,i,a;n&&(i=new Date,i.setTime(i.getTime()+n));let s=window.location.hostname,c=/^(\d{1,3}\.){3}\d{1,3}$/,u=/^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}$/;c.test(s)||u.test(s)||s.indexOf(".")===-1?nd(t,r,i):(a=s.split("."),o=a[a.length-2]+"."+a[a.length-1],nd(t,r,i,o))}static get(t){let r=t+"=",n=document.cookie.split(";");for(let o=0;o<n.length;o++){let i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function nd(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"+(window.location.protocol==="https:"?";Secure":"")}m();d();f();p();function AC(){return typeof navigator<"u"}function Ag(){try{return typeof localStorage<"u"}catch{return!1}}function xg(){try{return typeof sessionStorage<"u"}catch{return!1}}function Cg(){return!!(AC()&&navigator.cookieEnabled)}var Eg=null;function Rg(){return Eg||(Ag()?localStorage:Cg()?new od:xg()?sessionStorage:new id)}var co=class co{getItem(t){return so.get(`${co.prefix}${t}`)}removeItem(t){so.erase(`${co.prefix}${t}`)}setItem(t,r,n){so.set(`${co.prefix}${t}`,r,n)}};ie(co,"prefix","coveo_");var od=co;var id=class{getItem(t){return null}removeItem(t){}setItem(t,r){}};var gs="__coveo.analytics.history",xC=20,CC=1e3*60,EC=75,un=class un{constructor(t){ie(this,"store");this.store=t||Rg()}static getInstance(t){return un.instance||(un.instance=new un(t)),un.instance}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!==null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){var _this9=this;return _asyncToGenerator(function*(){t.internalTime=new Date().getTime(),t=_this9.cropQueryElement(_this9.stripEmptyQuery(t));let r=yield _this9.getHistoryWithInternalTimeAsync();r!==null?_this9.isValidEntry(t)&&_this9.setHistory([t].concat(r)):_this9.setHistory([t])})()}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){var _this0=this;return _asyncToGenerator(function*(){let t=yield _this0.getHistoryWithInternalTimeAsync();return _this0.stripEmptyQueries(_this0.stripInternalTime(t))})()}getHistoryWithInternalTime(){try{let t=this.store.getItem(gs);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){var _this1=this;return _asyncToGenerator(function*(){try{let t=yield _this1.store.getItem(gs);return t?JSON.parse(t):[]}catch{return[]}})()}setHistory(t){try{this.store.setItem(gs,JSON.stringify(t.slice(0,xC)))}catch{}}clear(){try{this.store.removeItem(gs)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,EC)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value===t.value?(t.internalTime||0)-(r.internalTime||0)>CC:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};ie(un,"instance",null);var ad=un,Tt=ad;m();d();f();p();m();d();f();p();var uo=$e(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${to}`));m();d();f();p();m();d();f();p();function lr(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function U(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(g){try{u(n.next(g))}catch(v){a(v)}}function c(g){try{u(n.throw(g))}catch(v){a(v)}}function u(g){g.done?i(g.value):o(g.value).then(s,c)}u((n=n.apply(e,t||[])).next())})}var Ae;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(Ae||(Ae={}));function ud(){return typeof window<"u"}function Ad(){return typeof navigator<"u"}function lo(){return typeof document<"u"}function ld(){try{return typeof localStorage<"u"}catch{return!1}}function RC(){try{return typeof sessionStorage<"u"}catch{return!1}}function Lg(){return Ad()&&navigator.cookieEnabled}var IC=[Ae.click,Ae.custom,Ae.search,Ae.view],TC=(e,t)=>IC.indexOf(e)!==-1?Object.assign({language:lo()?document.documentElement.lang:"unknown",userAgent:Ad()?navigator.userAgent:"unknown"},t):t,Oi=class e{static set(t,r,n){var o,i,a,s;n&&(i=new Date,i.setTime(i.getTime()+n)),s=window.location.hostname,s.indexOf(".")===-1?Ig(t,r,i):(a=s.split("."),o=a[a.length-2]+"."+a[a.length-1],Ig(t,r,i,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function Ig(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"+(window.location.protocol==="https:"?";Secure":"")}function _C(){return ld()?localStorage:Lg()?new Pi:RC()?sessionStorage:new fo}var Pi=class e{getItem(t){return Oi.get(`${e.prefix}${t}`)}removeItem(t){Oi.erase(`${e.prefix}${t}`)}setItem(t,r,n){Oi.set(`${e.prefix}${t}`,r,n)}};Pi.prefix="coveo_";var dd=class{constructor(){this.cookieStorage=new Pi}getItem(t){return localStorage.getItem(t)||this.cookieStorage.getItem(t)}removeItem(t){this.cookieStorage.removeItem(t),localStorage.removeItem(t)}setItem(t,r){localStorage.setItem(t,r),this.cookieStorage.setItem(t,r,31556926e3)}},fo=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},hs="__coveo.analytics.history",kC=20,OC=1e3*60,PC=75,vs=class{constructor(t){this.store=t||_C()}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){return U(this,void 0,void 0,function*(){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=yield this.getHistoryWithInternalTimeAsync();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])})}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){return U(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(hs);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return U(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(hs);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(hs,JSON.stringify(t.slice(0,kC)))}catch{}}clear(){try{this.store.removeItem(hs)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,PC)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>OC:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};var NC=(e,t)=>U(void 0,void 0,void 0,function*(){return e===Ae.view?(yield FC(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),FC=e=>U(void 0,void 0,void 0,function*(){let t=new vs,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),DC=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function Ss(e){return typeof e=="string"&&DC.test(e)}function Tg(e){if(!Ss(e))throw TypeError("Invalid UUID");let t;return Uint8Array.of((t=parseInt(e.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,t&255,(t=parseInt(e.slice(9,13),16))>>>8,t&255,(t=parseInt(e.slice(14,18),16))>>>8,t&255,(t=parseInt(e.slice(19,23),16))>>>8,t&255,(t=parseInt(e.slice(24,36),16))/1099511627776&255,t/4294967296&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255)}var ot=[];for(let e=0;e<256;++e)ot.push((e+256).toString(16).slice(1));function Ug(e,t=0){return(ot[e[t+0]]+ot[e[t+1]]+ot[e[t+2]]+ot[e[t+3]]+"-"+ot[e[t+4]]+ot[e[t+5]]+"-"+ot[e[t+6]]+ot[e[t+7]]+"-"+ot[e[t+8]]+ot[e[t+9]]+"-"+ot[e[t+10]]+ot[e[t+11]]+ot[e[t+12]]+ot[e[t+13]]+ot[e[t+14]]+ot[e[t+15]]).toLowerCase()}var MC=new Uint8Array(16);function qC(){return crypto.getRandomValues(MC)}function jC(e){e=unescape(encodeURIComponent(e));let t=new Uint8Array(e.length);for(let r=0;r<e.length;++r)t[r]=e.charCodeAt(r);return t}var LC="6ba7b810-9dad-11d1-80b4-00c04fd430c8",UC="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function VC(e,t,r,n,o,i){let a=typeof r=="string"?jC(r):r,s=typeof n=="string"?Tg(n):n;if(typeof n=="string"&&(n=Tg(n)),n?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let c=new Uint8Array(16+a.length);return c.set(s),c.set(a,s.length),c=t(c),c[6]=c[6]&15|e,c[8]=c[8]&63|128,Ug(c)}function ln(e,t,r){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():BC(e,t,r)}function BC(e,t,r){e=e||{};let n=e.random??e.rng?.()??qC();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let o=0;o<16;++o)t[r+o]=n[o];return t}return Ug(n)}function GC(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}function sd(e,t){return e<<t|e>>>32-t}function $C(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520],n=new Uint8Array(e.length+1);n.set(e),n[e.length]=128,e=n;let o=e.length/4+2,i=Math.ceil(o/16),a=new Array(i);for(let s=0;s<i;++s){let c=new Uint32Array(16);for(let u=0;u<16;++u)c[u]=e[s*64+u*4]<<24|e[s*64+u*4+1]<<16|e[s*64+u*4+2]<<8|e[s*64+u*4+3];a[s]=c}a[i-1][14]=(e.length-1)*8/2**32,a[i-1][14]=Math.floor(a[i-1][14]),a[i-1][15]=(e.length-1)*8&4294967295;for(let s=0;s<i;++s){let c=new Uint32Array(80);for(let h=0;h<16;++h)c[h]=a[s][h];for(let h=16;h<80;++h)c[h]=sd(c[h-3]^c[h-8]^c[h-14]^c[h-16],1);let u=r[0],g=r[1],v=r[2],E=r[3],y=r[4];for(let h=0;h<80;++h){let S=Math.floor(h/20),C=sd(u,5)+GC(S,g,v,E)+y+t[S]+c[h]>>>0;y=E,E=v,v=sd(g,30)>>>0,g=u,u=C}r[0]=r[0]+u>>>0,r[1]=r[1]+g>>>0,r[2]=r[2]+v>>>0,r[3]=r[3]+E>>>0,r[4]=r[4]+y>>>0}return Uint8Array.of(r[0]>>24,r[0]>>16,r[0]>>8,r[0],r[1]>>24,r[1]>>16,r[1]>>8,r[1],r[2]>>24,r[2]>>16,r[2]>>8,r[2],r[3]>>24,r[3]>>16,r[3]>>8,r[3],r[4]>>24,r[4]>>16,r[4]>>8,r[4])}function bs(e,t,r,n){return VC(80,$C,e,t)}bs.DNS=LC;bs.URL=UC;var Vg="2.33.0",_g=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,ki={pageview:"pageview",event:"event"},ws=class{constructor({client:t,uuidGenerator:r=ln}){this.client=t,this.uuidGenerator=r}},pd=class extends ws{constructor({client:t,uuidGenerator:r=ln}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=_g(window.location),this.lastReferrer=lo()?document.referrer:"",this.addHooks()}getApi(t){return t==="setAction"?this.setAction:null}setAction(t,r){this.action=t,this.actionData=r}clearData(){this.clearPluginData(),this.action=void 0,this.actionData={}}getLocationInformation(t,r){return Object.assign({hitType:t},this.getNextValues(t,r))}updateLocationInformation(t,r){this.updateLocationForNextPageView(t,r)}getDefaultContextInformation(t){let r={title:lo()?document.title:"",encoding:lo()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},i={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},i),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:i}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=i,t===ki.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===ki.pageview?this.nextPageViewId:this.pageViewId,referrer:t===ki.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===ki.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=o=>o.replace(/^\/?(.*)$/,"/$1");return`${(o=>o.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return _g(window.location)}},Tr=class e{constructor(t,r){if(!Ss(t))throw Error("Not a valid uuid");this.clientId=t,this.creationDate=Math.floor(r/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime}validate(t,r){return!this.expired&&this.matchReferrer(t,r)}matchReferrer(t,r){try{let n=new URL(t);return r.some(o=>new RegExp(o.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[n,o]=r;if(n.length!==32||isNaN(parseInt(o)))return null;let i=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return Ss(i)?new e(i,Number.parseInt(o)*1e3):null}};Tr.cvo_cid="cvo_cid";Tr.expirationTime=120;var fd=class extends ws{constructor({client:t,uuidGenerator:r=ln}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return U(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),n=yield this.client.getCurrentVisitorId();return r.searchParams.set(Tr.cvo_cid,new Tr(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};fd.Id="link";var kt=Object.keys;function ys(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var cd=128,Bg=192,kg=224,Og=240;function QC(e){return(e&248)===Og?4:(e&Og)===kg?3:(e&kg)===Bg?2:1}function HC(e,t){if(t<0||e.length<=t)return e;let r=e.indexOf("%",t-2);for(r<0||r>t?r=t:t=r;r>2&&e.charAt(r-3)=="%";){let n=Number.parseInt(e.substring(r-2,r),16);if((n&cd)!=cd)break;if(r-=3,(n&Bg)!=cd){t-r>=QC(n)*3&&(r=t);break}}return e.substring(0,r)}var md={id:"svc_ticket_id",subject:"svc_ticket_subject",description:"svc_ticket_description",category:"svc_ticket_category",productId:"svc_ticket_product_id",custom:"svc_ticket_custom"},zC=kt(md).map(e=>md[e]),WC=[...zC].join("|"),KC=new RegExp(`^(${WC}$)`),YC={svcAction:"svc_action",svcActionData:"svc_action_data"},XC=e=>kt(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=md[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),ZC=e=>KC.test(e),JC=[ZC],Pg={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Ng={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},lt={action:"pa",list:"pal",listSource:"pls"},As={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},eE=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],gd={id:"quoteId",affiliation:"quoteAffiliation"},hd={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},tE={add:lt,bookmark_add:lt,bookmark_remove:lt,click:lt,checkout:lt,checkout_option:lt,detail:lt,impression:lt,remove:lt,refund:Object.assign(Object.assign({},lt),As),purchase:Object.assign(Object.assign({},lt),As),quickview:lt,quote:Object.assign(Object.assign({},lt),gd),review:Object.assign(Object.assign({},lt),hd)},rE=kt(Pg).map(e=>Pg[e]),nE=kt(Ng).map(e=>Ng[e]),oE=kt(lt).map(e=>lt[e]),iE=kt(As).map(e=>As[e]),aE=kt(hd).map(e=>hd[e]),sE=kt(gd).map(e=>gd[e]),cE=[...rE,"custom"].join("|"),uE=[...nE,"custom"].join("|"),Gg="(pr[0-9]+)",$g="(il[0-9]+pi[0-9]+)",lE=new RegExp(`^${Gg}(${cE})$`),dE=new RegExp(`^(${$g}(${uE}))|(il[0-9]+nm)$`),pE=new RegExp(`^(${oE.join("|")})$`),fE=new RegExp(`^(${iE.join("|")})$`),mE=new RegExp(`^${Gg}custom$`),gE=new RegExp(`^${$g}custom$`),hE=new RegExp(`^(${[...eE,...aE,...sE].join("|")})$`),yE=e=>lE.test(e),vE=e=>dE.test(e),SE=e=>pE.test(e),bE=e=>fE.test(e),wE=e=>hE.test(e),AE=[vE,yE,SE,bE,wE],xE=[mE,gE],CE={anonymizeIp:"aip"},EE={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},RE={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},IE=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],TE=Object.assign(Object.assign(Object.assign(Object.assign({},CE),EE),RE),IE.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),yd=Object.assign(Object.assign({},TE),YC),_E=e=>{let t=!!e.action&&tE[e.action]||{};return kt(e).reduce((r,n)=>{let o=t[n]||yd[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},kE=kt(yd).map(e=>yd[e]),OE=e=>kE.indexOf(e)!==-1,PE=e=>e==="custom",NE=e=>[...AE,...JC,OE,PE].some(t=>t(e)),FE=e=>kt(e).reduce((t,r)=>{let n=DE(r);return n?Object.assign(Object.assign({},t),ME(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),DE=e=>{let t;return[...xE].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},ME=(e,t)=>kt(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),vd=class{constructor(t){this.opts=t}sendEvent(t,r){return U(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error("navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like \"sendbeacon-polyfill\".");let{baseUrl:n,preprocessRequest:o}=this.opts,i=yield this.getQueryParamsForEventType(t),{url:a,payload:s}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${i}`,r,o),c=this.encodeForEventType(t,s),u=new Blob([c],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(a,u)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return U(this,void 0,void 0,function*(){let o=t,i=r;if(n){let a=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:s,body:c}=a;o=s||t;try{i=JSON.parse(c)}catch(u){console.error("Unable to process the request body as a JSON string",u)}}return{payload:i,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return U(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,o=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",o?`visitorId=${o}`:"","discardVisitInfo=true"].filter(i=>!!i).join("&")})}isEventTypeLegacy(t){return[Ae.click,Ae.custom,Ae.search,Ae.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let o=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(o=`access_token=${encodeURIComponent(n)}&${o}`),o}},Sd=class{sendEvent(t,r){return U(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return U(this,void 0,void 0,function*(){return Promise.resolve()})}},Fg=b.fetch,xs=class{constructor(t){this.opts=t}sendEvent(t,r){return U(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:i}=this.opts,a=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",s={url:`${n}/analytics/${t}${a}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},c=Object.assign(Object.assign({},s),i?yield i(s,"analyticsFetch"):{}),{url:u}=c,g=lr(c,["url"]),v;try{v=yield Fg(u,g)}catch(E){console.error("An error has occurred when sending the event.",E);return}if(v.ok){let E=yield v.json();return E.visitorId&&o.setCurrentVisitorId(E.visitorId),E}else{try{v.json()}catch{}throw console.error(`An error has occurred when sending the "${t}" event.`,v,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return U(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Fg(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[Ae.click,Ae.custom,Ae.search,Ae.view].indexOf(t)!==-1}getVisitorIdParam(){return U(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},bd=class{constructor(t,r){ld()&&Lg()?this.storage=new dd:ld()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new fo),this.client=new xs(t),this.beaconClient=new vd(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:i}of n)this.beaconClient.sendEvent(o,i)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},wd=class{constructor(t,r){this.storage=r||new fo,this.client=new xs(t)}getClientDependingOnEventType(t){return this.client}},Cs=class{constructor(){this.storage=new fo,this.client=new Sd}getClientDependingOnEventType(t){return this.client}},qE="xx",jE=e=>e?.startsWith(qE)||!1,LE=`
28
28
  We've detected you're using React Native but have not provided the corresponding runtime,
29
29
  for an optimal experience please use the "coveo.analytics/react-native" subpackage.
30
30
  Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native
@@ -72,4 +72,4 @@ fast-json-patch/module/duplex.mjs:
72
72
  *)
73
73
  */if(__exports!=exports)module.exports=exports;return module.exports});
74
74
 
75
- window.coveoQuanticVersion = '3.43.5';
75
+ window.coveoQuanticVersion = '3.43.6';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coveo/quantic",
3
- "version": "3.43.5",
3
+ "version": "3.43.6",
4
4
  "description": "A Salesforce Lightning Web Component (LWC) library for building modern UIs interfacing with the Coveo platform",
5
5
  "author": "coveo.com",
6
6
  "homepage": "https://coveo.com",
@@ -14,8 +14,8 @@
14
14
  "dompurify": "3.4.13",
15
15
  "marked": "12.0.2",
16
16
  "@coveo/bueno": "1.1.9",
17
- "@coveo/headless": "3.55.0",
18
- "coveo.analytics": "2.32.0"
17
+ "@coveo/headless": "3.55.1",
18
+ "coveo.analytics": "2.33.0"
19
19
  },
20
20
  "engines": {
21
21
  "node": "^20.9.0 || ^22.11.0 || ^24.11.0"