@coveo/headless 3.30.2-pre.c2b3838e9f → 3.30.2-pre.c4f48669ee

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.
@@ -800,7 +800,7 @@ var import_bueno5 = require("@coveo/bueno");
800
800
  var import_toolkit7 = require("@reduxjs/toolkit");
801
801
 
802
802
  // src/utils/version.ts
803
- var VERSION = "3.30.2-pre.c2b3838e9f";
803
+ var VERSION = "3.30.2-pre.c4f48669ee";
804
804
  var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
805
805
 
806
806
  // src/features/configuration/configuration-actions.ts
@@ -1149,7 +1149,7 @@ var import_bueno6 = require("@coveo/bueno");
1149
1149
  var import_toolkit4 = require("@reduxjs/toolkit");
1150
1150
 
1151
1151
  // src/utils/version.ts
1152
- var VERSION = "3.30.2-pre.c2b3838e9f";
1152
+ var VERSION = "3.30.2-pre.c4f48669ee";
1153
1153
  var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
1154
1154
 
1155
1155
  // src/features/configuration/configuration-actions.ts
@@ -1379,7 +1379,7 @@ function isBrowser2() {
1379
1379
  var import_toolkit = require("@reduxjs/toolkit");
1380
1380
 
1381
1381
  // src/utils/version.ts
1382
- var VERSION = "3.30.2-pre.c2b3838e9f";
1382
+ var VERSION = "3.30.2-pre.c4f48669ee";
1383
1383
  var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
1384
1384
 
1385
1385
  // src/api/analytics/analytics-selectors.ts
@@ -1285,7 +1285,7 @@ function isBrowser2() {
1285
1285
  var import_toolkit = require("@reduxjs/toolkit");
1286
1286
 
1287
1287
  // src/utils/version.ts
1288
- var VERSION = "3.30.2-pre.c2b3838e9f";
1288
+ var VERSION = "3.30.2-pre.c4f48669ee";
1289
1289
  var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
1290
1290
 
1291
1291
  // src/api/analytics/analytics-selectors.ts
@@ -881,7 +881,7 @@ var validateObject = (engine, schema, obj, validationMessage, errorMessage) => {
881
881
  };
882
882
 
883
883
  // src/utils/version.ts
884
- var VERSION = "3.30.2-pre.c2b3838e9f";
884
+ var VERSION = "3.30.2-pre.c4f48669ee";
885
885
  var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
886
886
 
887
887
  // src/features/configuration/configuration-actions.ts
@@ -1311,7 +1311,7 @@ function isBrowser2() {
1311
1311
  var import_toolkit = require("@reduxjs/toolkit");
1312
1312
 
1313
1313
  // src/utils/version.ts
1314
- var VERSION = "3.30.2-pre.c2b3838e9f";
1314
+ var VERSION = "3.30.2-pre.c4f48669ee";
1315
1315
  var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
1316
1316
 
1317
1317
  // src/api/analytics/analytics-selectors.ts
@@ -468,7 +468,7 @@ var import_bueno8 = require("@coveo/bueno");
468
468
  var import_toolkit3 = require("@reduxjs/toolkit");
469
469
 
470
470
  // src/utils/version.ts
471
- var VERSION = "3.30.2-pre.c2b3838e9f";
471
+ var VERSION = "3.30.2-pre.c4f48669ee";
472
472
  var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
473
473
 
474
474
  // src/features/configuration/configuration-actions.ts
@@ -467,7 +467,7 @@ var import_bueno8 = require("@coveo/bueno");
467
467
  var import_toolkit3 = require("@reduxjs/toolkit");
468
468
 
469
469
  // src/utils/version.ts
470
- var VERSION = "3.30.2-pre.c2b3838e9f";
470
+ var VERSION = "3.30.2-pre.c4f48669ee";
471
471
  var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
472
472
 
473
473
  // src/features/configuration/configuration-actions.ts
@@ -1311,7 +1311,7 @@ function isBrowser2() {
1311
1311
  var import_toolkit = require("@reduxjs/toolkit");
1312
1312
 
1313
1313
  // src/utils/version.ts
1314
- var VERSION = "3.30.2-pre.c2b3838e9f";
1314
+ var VERSION = "3.30.2-pre.c4f48669ee";
1315
1315
  var COVEO_FRAMEWORK = ["@coveo/atomic", "@coveo/quantic"];
1316
1316
 
1317
1317
  // src/api/analytics/analytics-selectors.ts
@@ -1,2 +1,2 @@
1
- export const VERSION = "3.30.2-pre.c2b3838e9f" || 'Test version';
1
+ export const VERSION = "3.30.2-pre.c4f48669ee" || 'Test version';
2
2
  export const COVEO_FRAMEWORK = ['@coveo/atomic', '@coveo/quantic'];
@@ -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 to(r)}var to=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},_e=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let i in this.definition){let o=this.definition[i].validate(r[i]);o&&n.push(`${i}: ${o}`)}if(n.length)throw Uf(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}},Rt=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&Y(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 Qt(e){return e===void 0}function Vf(e){return e===null}function Y(e){return Qt(e)||Vf(e)}var ye=class{constructor(e={}){se(this,"value");this.value=new Rt(e)}validate(e){let t=this.value.validate(e);return t||(Qf(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function Qf(e){return Qt(e)||Ba(e)}function Ba(e){return typeof e=="boolean"}var Re=class{constructor(e={}){se(this,"value");this.config=e,this.value=new Rt(e)}validate(e){let t=this.value.validate(e);return t||(Bf(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 Bf(e){return Qt(e)||$a(e)}function $a(e){return typeof e=="number"&&!Number.isNaN(e)}var $f=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,W=class{constructor(e={}){se(this,"value");se(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new Rt(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:i,ISODate:o}=this.config,s=this.value.validate(e);if(s)return s;if(Qt(e))return null;if(!Ha(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}`:i&&!i.includes(e)?`value should be one of: ${i.join(", ")}.`:o&&!($f.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 Ha(e){return Object.prototype.toString.call(e)==="[object String]"}var ae=class{constructor(e={}){se(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(Qt(e))return this.config.options.required?"value is required and is currently undefined":null;if(!za(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&Y(e[r]))return`value does not contain ${r}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let i=e[r],o=n.validate(i);o!==null&&(t+=` ${o}`)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function za(e){return e!==void 0&&typeof e=="object"}var Xe=class{constructor(e={}){se(this,"value");this.config=e,this.value=new Rt(this.config)}validate(e){if(!Y(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(Y(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&&Y(n)&&(r=`value is null or undefined: ${e.join(",")}`);let i=this.validatePrimitiveValue(n,this.config.each);i!==null&&(r+=` ${i}`)}),r===""?null:r}return null}validatePrimitiveValue(e,t){return Ba(e)||Ha(e)||$a(e)||za(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function Ga(e){return Array.isArray(e)}var ro=class{constructor(e){se(this,"value");this.config=e,this.value=new Rt(e)}validate(e){let t=this.value.validate(e);return t!==null?t:Qt(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}};g();d();f();p();var ln=e=>e;g();d();f();p();g();d();f();p();g();d();f();p();var Bt=class{constructor(t){se(this,"_basePath");se(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}};g();d();f();p();function no(e){let{url:t,accessToken:r,organizationId:n,authentication:i,...o}=e;return o}var io=e=>{let{response:t}=e;return t.body?Hf(e):zf(t)},Hf=e=>Wf(e)?Yf(e):Gf(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},zf=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Gf(e){return e.body.statusCode!==void 0}function Wf(e){return e.body.exception!==void 0}var Yf=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});g();d();f();p();function Wa(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}g();d();f();p();var oo=(e,t,r,n)=>{let i=new Bt(`${e.url}${n}`);return i.addParam("organizationId",e.organizationId),e.authentication&&i.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:i.href,origin:"searchApiFetch"}};var Ya=(e,t)=>{let r=new Bt(`${e.url}${t}`);return r.addParam("access_token",e.accessToken),r.addParam("organizationId",e.organizationId),r.addParam("uniqueId",e.uniqueId),e.authentication&&r.addParam("authentication",e.authentication),e.q!==void 0&&r.addParam("q",e.q),e.enableNavigation!==void 0&&r.addParam("enableNavigation",`${e.enableNavigation}`),e.requestedOutputSize!==void 0&&r.addParam("requestedOutputSize",`${e.requestedOutputSize}`),r.href},so=async(e,t)=>{let r=await at.call({...oo(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:no(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=Wa(r),i=await r.arrayBuffer(),s=new TextDecoder(n).decode(i);return Kf(s)?{success:s}:{error:io({response:r,body:s})}};function Kf(e){return typeof e=="string"}g();d();f();p();function Jf(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function Xf(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function dn(e,t){if(t&&e.name==="AbortError")return{error:Xf(e)};if(e instanceof wt)return{error:Jf(e)};throw e}g();d();f();p();g();d();f();p();var pn=(e,t,r,n,i={})=>{Zf(e);let o=`${e.url}/rest/organizations/${e.organizationId}/caseassists/${e.caseAssistId}${n}`,s=eg(i),u=s?`${o}?${s}`:o;return{accessToken:e.accessToken,method:t,contentType:r,url:u,origin:"caseAssistApiFetch"}},fn=e=>Object.keys(e).filter(t=>e[t].value!=="").reduce((t,r)=>(t[r]=e[r],t),{}),gn=e=>Object.keys(e).filter(t=>e[t].value!=="").reduce((t,r)=>(t[r]=e[r].value,t),{}),Zf=e=>{if(!e.url)throw new Error("The 'url' attribute must contain a valid platform URL.");if(!e.organizationId)throw new Error("The 'organizationId' attribute must contain a valid organization ID.");if(!e.accessToken)throw new Error("The 'accessToken' attribute must contain a valid platform access token.");if(!e.caseAssistId)throw new Error("The 'caseAssistId' attribute must contain a valid Case Assist configuration ID.")},eg=e=>Object.keys(e).map(t=>`${t}=${encodeURIComponent(e[t])}`).join("&");var Ka=e=>{let t=e.debug?{debug:"1"}:{};return{...pn(e,"POST","application/json","/classify",t),requestParams:tg(e)}},tg=e=>({clientId:e.clientId,locale:e.locale,fields:fn(e.fields)});g();d();f();p();var Ja=e=>{let t={};return e.debug&&(t.debug="1"),e.numberOfResults&&(t.numberOfResults=e.numberOfResults.toString()),{...pn(e,"POST","application/json","/documents/suggest",t),requestParams:rg(e)}},rg=e=>({clientId:e.clientId,locale:e.locale,fields:fn(e.fields),context:e.context,analytics:e.analytics});var mn=class{constructor(t){this.options=t}async getCaseClassifications(t){let r=await at.call({...Ka(t),...this.options});if(r instanceof Error)return dn(r);let n=await r.json();return r.ok?{success:n}:{error:n}}async getDocumentSuggestions(t){let r=await at.call({...Ja(t),...this.options});if(r instanceof Error)return dn(r);let n=await r.json();return r.ok?{success:n}:{error:n}}async html(t){return so(t,this.options)}};g();d();f();p();g();d();f();p();g();d();f();p();function he(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 ng=typeof Symbol=="function"&&Symbol.observable||"@@observable",Xa=ng,ao=()=>Math.random().toString(36).substring(7).split("").join("."),ig={INIT:`@@redux/INIT${ao()}`,REPLACE:`@@redux/REPLACE${ao()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ao()}`},yn=ig;function Qe(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 co(e,t,r){if(typeof e!="function")throw new Error(he(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(he(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(he(1));return r(co)(e,t)}let n=e,i=t,o=new Map,s=o,u=0,c=!1;function a(){s===o&&(s=new Map,o.forEach((k,w)=>{s.set(w,k)}))}function y(){if(c)throw new Error(he(3));return i}function h(k){if(typeof k!="function")throw new Error(he(4));if(c)throw new Error(he(5));let w=!0;a();let P=u++;return s.set(P,k),function(){if(w){if(c)throw new Error(he(6));w=!1,a(),s.delete(P),o=null}}}function S(k){if(!Qe(k))throw new Error(he(7));if(typeof k.type>"u")throw new Error(he(8));if(typeof k.type!="string")throw new Error(he(17));if(c)throw new Error(he(9));try{c=!0,i=n(i,k)}finally{c=!1}return(o=s).forEach(P=>{P()}),k}function m(k){if(typeof k!="function")throw new Error(he(10));n=k,S({type:yn.REPLACE})}function v(){let k=h;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(he(11));function P(){let E=w;E.next&&E.next(y())}return P(),{unsubscribe:k(P)}},[Xa](){return this}}}return S({type:yn.INIT}),{dispatch:S,subscribe:h,getState:y,replaceReducer:m,[Xa]:v}}function og(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:yn.INIT})>"u")throw new Error(he(12));if(typeof r(void 0,{type:yn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(he(13))})}function $t(e){let t=Object.keys(e),r={};for(let s=0;s<t.length;s++){let u=t[s];typeof e[u]=="function"&&(r[u]=e[u])}let n=Object.keys(r),i,o;try{og(r)}catch(s){o=s}return function(u={},c){if(o)throw o;let a=!1,y={};for(let h=0;h<n.length;h++){let S=n[h],m=r[S],v=u[S],x=m(v,c);if(typeof x>"u"){let k=c&&c.type;throw new Error(he(14))}y[S]=x,a=a||x!==v}return a=a||n.length!==Object.keys(u).length,a?y:u}}function Ht(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Za(...e){return t=>(r,n)=>{let i=t(r,n),o=()=>{throw new Error(he(15))},s={getState:i.getState,dispatch:(c,...a)=>o(c,...a)},u=e.map(c=>c(s));return o=Ht(...u)(i.dispatch),{...i,dispatch:o}}}function hn(e){return Qe(e)&&"type"in e&&typeof e.type=="string"}g();d();f();p();var vo=Symbol.for("immer-nothing"),Or=Symbol.for("immer-draftable"),xe=Symbol.for("immer-state");function Se(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Et=Object.getPrototypeOf;function Pe(e){return!!e&&!!e[xe]}function Ee(e){return e?ic(e)||Array.isArray(e)||!!e[Or]||!!e.constructor?.[Or]||zt(e)||Mr(e):!1}var sg=Object.prototype.constructor.toString();function ic(e){if(!e||typeof e!="object")return!1;let t=Et(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===sg}function Ao(e){return Pe(e)||Se(15,e),e[xe].base_}function Fr(e,t){It(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function It(e){let t=e[xe];return t?t.type_:Array.isArray(e)?1:zt(e)?2:Mr(e)?3:0}function Tr(e,t){return It(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function uo(e,t){return It(e)===2?e.get(t):e[t]}function oc(e,t,r){let n=It(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function ag(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function zt(e){return e instanceof Map}function Mr(e){return e instanceof Set}function xt(e){return e.copy_||e.base_}function fo(e,t){if(zt(e))return new Map(e);if(Mr(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=ic(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[xe];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){let s=i[o],u=n[s];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[s]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[s]})}return Object.create(Et(e),n)}else{let n=Et(e);if(n!==null&&r)return{...e};let i=Object.create(n);return Object.assign(i,e)}}function Cn(e,t=!1){return bn(e)||Pe(e)||!Ee(e)||(It(e)>1&&Object.defineProperties(e,{set:{value:Sn},add:{value:Sn},clear:{value:Sn},delete:{value:Sn}}),Object.freeze(e),t&&Object.values(e).forEach(r=>Cn(r,!0))),e}function Sn(){Se(2)}function bn(e){return Object.isFrozen(e)}var go={};function kt(e){let t=go[e];return t||Se(0,e),t}function cg(e,t){go[e]||(go[e]=t)}var Dr;function sc(){return Dr}function ug(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ec(e,t){t&&(kt("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function mo(e){yo(e),e.drafts_.forEach(lg),e.drafts_=null}function yo(e){e===Dr&&(Dr=e.parent_)}function tc(e){return Dr=ug(Dr,e)}function lg(e){let t=e[xe];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function rc(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[xe].modified_&&(mo(t),Se(4)),Ee(e)&&(e=vn(t,e),t.parent_||An(t,e)),t.patches_&&kt("Patches").generateReplacementPatches_(r[xe].base_,e,t.patches_,t.inversePatches_)):e=vn(t,r,[]),mo(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==vo?e:void 0}function vn(e,t,r){if(bn(t))return t;let n=t[xe];if(!n)return Fr(t,(i,o)=>nc(e,n,t,i,o,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return An(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let i=n.copy_,o=i,s=!1;n.type_===3&&(o=new Set(i),i.clear(),s=!0),Fr(o,(u,c)=>nc(e,n,i,u,c,r,s)),An(e,i,!1),r&&e.patches_&&kt("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function nc(e,t,r,n,i,o,s){if(Pe(i)){let u=o&&t&&t.type_!==3&&!Tr(t.assigned_,n)?o.concat(n):void 0,c=vn(e,i,u);if(oc(r,n,c),Pe(c))e.canAutoFreeze_=!1;else return}else s&&r.add(i);if(Ee(i)&&!bn(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;vn(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(zt(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&An(e,i)}}function An(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Cn(t,r)}function dg(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:sc(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},i=n,o=Co;r&&(i=[n],o=qr);let{revoke:s,proxy:u}=Proxy.revocable(i,o);return n.draft_=u,n.revoke_=s,u}var Co={get(e,t){if(t===xe)return e;let r=xt(e);if(!Tr(r,t))return pg(e,r,t);let n=r[t];return e.finalized_||!Ee(n)?n:n===lo(e.base_,t)?(po(e),e.copy_[t]=So(n,e)):n},has(e,t){return t in xt(e)},ownKeys(e){return Reflect.ownKeys(xt(e))},set(e,t,r){let n=ac(xt(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let i=lo(xt(e),t),o=i?.[xe];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(ag(r,i)&&(r!==void 0||Tr(e.base_,t)))return!0;po(e),ho(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return lo(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,po(e),ho(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=xt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Se(11)},getPrototypeOf(e){return Et(e.base_)},setPrototypeOf(){Se(12)}},qr={};Fr(Co,(e,t)=>{qr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});qr.deleteProperty=function(e,t){return qr.set.call(this,e,t,void 0)};qr.set=function(e,t,r){return Co.set.call(this,e[0],t,r,e[0])};function lo(e,t){let r=e[xe];return(r?xt(r):e)[t]}function pg(e,t,r){let n=ac(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function ac(e,t){if(!(t in e))return;let r=Et(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Et(r)}}function ho(e){e.modified_||(e.modified_=!0,e.parent_&&ho(e.parent_))}function po(e){e.copy_||(e.copy_=fo(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var fg=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let o=r;r=t;let s=this;return function(c=o,...a){return s.produce(c,y=>r.call(this,y,...a))}}typeof r!="function"&&Se(6),n!==void 0&&typeof n!="function"&&Se(7);let i;if(Ee(t)){let o=tc(this),s=So(t,void 0),u=!0;try{i=r(s),u=!1}finally{u?mo(o):yo(o)}return ec(o,n),rc(i,o)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===vo&&(i=void 0),this.autoFreeze_&&Cn(i,!0),n){let o=[],s=[];kt("Patches").generateReplacementPatches_(t,i,o,s),n(o,s)}return i}else Se(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(s,...u)=>this.produceWithPatches(s,c=>t(c,...u));let n,i;return[this.produce(t,r,(s,u)=>{n=s,i=u}),n,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Ee(e)||Se(8),Pe(e)&&(e=cc(e));let t=tc(this),r=So(e,void 0);return r[xe].isManual_=!0,yo(t),r}finishDraft(e,t){let r=e&&e[xe];(!r||!r.isManual_)&&Se(9);let{scope_:n}=r;return ec(n,t),rc(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));let n=kt("Patches").applyPatches_;return Pe(e)?n(e,t):this.produce(e,i=>n(i,t))}};function So(e,t){let r=zt(e)?kt("MapSet").proxyMap_(e,t):Mr(e)?kt("MapSet").proxySet_(e,t):dg(e,t);return(t?t.scope_:sc()).drafts_.push(r),r}function cc(e){return Pe(e)||Se(10,e),uc(e)}function uc(e){if(!Ee(e)||bn(e))return e;let t=e[xe],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=fo(e,t.scope_.immer_.useStrictShallowCopy_)}else r=fo(e,!0);return Fr(r,(n,i)=>{oc(r,n,uc(i))}),t&&(t.finalized_=!1),r}function lc(){let t="replace",r="add",n="remove";function i(S,m,v,x){switch(S.type_){case 0:case 2:return s(S,m,v,x);case 1:return o(S,m,v,x);case 3:return u(S,m,v,x)}}function o(S,m,v,x){let{base_:k,assigned_:w}=S,P=S.copy_;P.length<k.length&&([k,P]=[P,k],[v,x]=[x,v]);for(let b=0;b<k.length;b++)if(w[b]&&P[b]!==k[b]){let E=m.concat([b]);v.push({op:t,path:E,value:h(P[b])}),x.push({op:t,path:E,value:h(k[b])})}for(let b=k.length;b<P.length;b++){let E=m.concat([b]);v.push({op:r,path:E,value:h(P[b])})}for(let b=P.length-1;k.length<=b;--b){let E=m.concat([b]);x.push({op:n,path:E})}}function s(S,m,v,x){let{base_:k,copy_:w}=S;Fr(S.assigned_,(P,b)=>{let E=uo(k,P),j=uo(w,P),F=b?Tr(k,P)?t:r:n;if(E===j&&F===t)return;let I=m.concat(P);v.push(F===n?{op:F,path:I}:{op:F,path:I,value:j}),x.push(F===r?{op:n,path:I}:F===n?{op:r,path:I,value:h(E)}:{op:t,path:I,value:h(E)})})}function u(S,m,v,x){let{base_:k,copy_:w}=S,P=0;k.forEach(b=>{if(!w.has(b)){let E=m.concat([P]);v.push({op:n,path:E,value:b}),x.unshift({op:r,path:E,value:b})}P++}),P=0,w.forEach(b=>{if(!k.has(b)){let E=m.concat([P]);v.push({op:r,path:E,value:b}),x.unshift({op:n,path:E,value:b})}P++})}function c(S,m,v,x){v.push({op:t,path:[],value:m===vo?void 0:m}),x.push({op:t,path:[],value:S})}function a(S,m){return m.forEach(v=>{let{path:x,op:k}=v,w=S;for(let j=0;j<x.length-1;j++){let F=It(w),I=x[j];typeof I!="string"&&typeof I!="number"&&(I=""+I),(F===0||F===1)&&(I==="__proto__"||I==="constructor")&&Se(19),typeof w=="function"&&I==="prototype"&&Se(19),w=uo(w,I),typeof w!="object"&&Se(18,x.join("/"))}let P=It(w),b=y(v.value),E=x[x.length-1];switch(k){case t:switch(P){case 2:return w.set(E,b);case 3:Se(16);default:return w[E]=b}case r:switch(P){case 1:return E==="-"?w.push(b):w.splice(E,0,b);case 2:return w.set(E,b);case 3:return w.add(b);default:return w[E]=b}case n:switch(P){case 1:return w.splice(E,1);case 2:return w.delete(E);case 3:return w.delete(v.value);default:return delete w[E]}default:Se(17,k)}}),S}function y(S){if(!Ee(S))return S;if(Array.isArray(S))return S.map(y);if(zt(S))return new Map(Array.from(S.entries()).map(([v,x])=>[v,y(x)]));if(Mr(S))return new Set(Array.from(S).map(y));let m=Object.create(Et(S));for(let v in S)m[v]=y(S[v]);return Tr(S,Or)&&(m[Or]=S[Or]),m}function h(S){return Pe(S)?y(S):S}cg("Patches",{applyPatches_:a,generatePatches_:i,generateReplacementPatches_:c})}var jr=new fg,Ze=jr.produce,wn=jr.produceWithPatches.bind(jr);var bo=jr.applyPatches.bind(jr);g();d();f();p();function gg(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function mg(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function yg(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 dc=e=>Array.isArray(e)?e:[e];function hg(e){let t=Array.isArray(e[0])?e[0]:e;return yg(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Sg(e,t){let r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var kw=Symbol();var Pw=Object.getPrototypeOf({});var vg=class{constructor(e){this.value=e}deref(){return this.value}},Ag=typeof WeakRef<"u"?WeakRef:vg,Cg=0,pc=1;function Rn(){return{s:Cg,v:void 0,o:null,p:null}}function Gt(e,t={}){let r=Rn(),{resultEqualityCheck:n}=t,i,o=0;function s(){let u=r,{length:c}=arguments;for(let h=0,S=c;h<S;h++){let m=arguments[h];if(typeof m=="function"||typeof m=="object"&&m!==null){let v=u.o;v===null&&(u.o=v=new WeakMap);let x=v.get(m);x===void 0?(u=Rn(),v.set(m,u)):u=x}else{let v=u.p;v===null&&(u.p=v=new Map);let x=v.get(m);x===void 0?(u=Rn(),v.set(m,u)):u=x}}let a=u,y;if(u.s===pc)y=u.v;else if(y=e.apply(null,arguments),o++,n){let h=i?.deref?.()??i;h!=null&&n(h,y)&&(y=h,o!==0&&o--),i=typeof y=="object"&&y!==null||typeof y=="function"?new Ag(y):y}return a.s=pc,a.v=y,y}return s.clearCache=()=>{r=Rn(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function fc(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let o=0,s=0,u,c={},a=i.pop();typeof a=="object"&&(c=a,a=i.pop()),gg(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);let y={...r,...c},{memoize:h,memoizeOptions:S=[],argsMemoize:m=Gt,argsMemoizeOptions:v=[],devModeChecks:x={}}=y,k=dc(S),w=dc(v),P=hg(i),b=h(function(){return o++,a.apply(null,arguments)},...k),E=!0,j=m(function(){s++;let I=Sg(P,arguments);return u=b.apply(null,I),u},...w);return Object.assign(j,{resultFunc:a,memoizedResultFunc:b,dependencies:P,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:h,argsMemoize:m})};return Object.assign(n,{withTypes:()=>n}),n}var ce=fc(Gt),bg=Object.assign((e,t=ce)=>{mg(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e),n=r.map(o=>e[o]);return t(n,(...o)=>o.reduce((s,u,c)=>(s[r[c]]=u,s),{}))},{withTypes:()=>bg});g();d();f();p();function gc(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var mc=gc(),yc=gc;var wg=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ht:Ht.apply(null,arguments)},Gw=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Rg=e=>e&&typeof e.match=="function";function Q(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(Le(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>hn(n)&&n.type===e,r}var Cc=class Nr extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Nr.prototype)}static get[Symbol.species](){return Nr}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Nr(...t[0].concat(this)):new Nr(...t.concat(this))}};function hc(e){return Ee(e)?Ze(e,()=>{}):e}function Sc(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function xg(e){return typeof e=="boolean"}var Eg=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{},s=new Cc;return r&&(xg(r)?s.push(mc):s.push(yc(r.extraArgument))),s},_r="RTK_autoBatch",Yt=()=>e=>({payload:e,meta:{[_r]:!0}}),vc=e=>t=>{setTimeout(t,e)},Ig=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),i=!0,o=!1,s=!1,u=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:vc(10):e.type==="callback"?e.queueNotification:vc(e.timeout),a=()=>{s=!1,o&&(o=!1,u.forEach(y=>y()))};return Object.assign({},n,{subscribe(y){let h=()=>i&&y(),S=n.subscribe(h);return u.add(y),()=>{S(),u.delete(y)}},dispatch(y){try{return i=!y?.meta?.[_r],o=!i,o&&(s||(s=!0,c(a))),n.dispatch(y)}finally{i=!0}}})},kg=e=>function(r){let{autoBatch:n=!0}=r??{},i=new Cc(e);return n&&i.push(Ig(typeof n=="object"?n:void 0)),i};function bc(e){let t=Eg(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{},u;if(typeof r=="function")u=r;else if(Qe(r))u=$t(r);else throw new Error(Le(1));let c;typeof n=="function"?c=n(t):c=t();let a=Ht;i&&(a=wg({trace:!1,...typeof i=="object"&&i}));let y=Za(...c),h=kg(y),S=typeof s=="function"?s(h):h(),m=a(...S);return co(u,o,m)}function wc(e){let t={},r=[],n,i={addCase(o,s){let u=typeof o=="string"?o:o.type;if(!u)throw new Error(Le(28));if(u in t)throw new Error(Le(29));return t[u]=s,i},addMatcher(o,s){return r.push({matcher:o,reducer:s}),i},addDefaultCase(o){return n=o,i}};return e(i),[t,r,n]}function Pg(e){return typeof e=="function"}function fe(e,t){let[r,n,i]=wc(t),o;if(Pg(e))o=()=>hc(e());else{let u=hc(e);o=()=>u}function s(u=o(),c){let a=[r[c.type],...n.filter(({matcher:y})=>y(c)).map(({reducer:y})=>y)];return a.filter(y=>!!y).length===0&&(a=[i]),a.reduce((y,h)=>{if(h)if(Pe(y)){let m=h(y,c);return m===void 0?y:m}else{if(Ee(y))return Ze(y,S=>h(S,c));{let S=h(y,c);if(S===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}}return y},u)}return s.getInitialState=o,s}var Rc=(e,t)=>Rg(e)?e.match(t):e(t);function Be(...e){return t=>e.some(r=>Rc(r,t))}function Wt(...e){return t=>e.every(r=>Rc(r,t))}function En(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 Lr(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function In(...e){return e.length===0?t=>En(t,["pending"]):Lr(e)?Be(...e.map(t=>t.pending)):In()(e[0])}function Pt(...e){return e.length===0?t=>En(t,["rejected"]):Lr(e)?Be(...e.map(t=>t.rejected)):Pt()(e[0])}function Ur(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Wt(Pt(...e),t):Lr(e)?Wt(Pt(...e),t):Ur()(e[0])}function et(...e){return e.length===0?t=>En(t,["fulfilled"]):Lr(e)?Be(...e.map(t=>t.fulfilled)):et()(e[0])}function kn(...e){return e.length===0?t=>En(t,["pending","fulfilled","rejected"]):Lr(e)?Be(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):kn()(e[0])}var Og="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Pn=(e=21)=>{let t="",r=e;for(;r--;)t+=Og[Math.random()*64|0];return t},Fg=["name","message","stack","code"],wo=class{constructor(e,t){se(this,"_type");this.payload=e,this.meta=t}},Ac=class{constructor(e,t){se(this,"_type");this.payload=e,this.meta=t}},Tg=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Fg)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},ie=(()=>{function e(t,r,n){let i=Q(t+"/fulfilled",(c,a,y,h)=>({payload:c,meta:{...h||{},arg:y,requestId:a,requestStatus:"fulfilled"}})),o=Q(t+"/pending",(c,a,y)=>({payload:void 0,meta:{...y||{},arg:a,requestId:c,requestStatus:"pending"}})),s=Q(t+"/rejected",(c,a,y,h,S)=>({payload:h,error:(n&&n.serializeError||Tg)(c||"Rejected"),meta:{...S||{},arg:y,requestId:a,rejectedWithValue:!!h,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function u(c){return(a,y,h)=>{let S=n?.idGenerator?n.idGenerator(c):Pn(),m=new l.AbortController,v,x;function k(P){x=P,m.abort()}let w=async function(){let P;try{let E=n?.condition?.(c,{getState:y,extra:h});if(qg(E)&&(E=await E),E===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let j=new Promise((F,I)=>{v=()=>{I({name:"AbortError",message:x||"Aborted"})},m.signal.addEventListener("abort",v)});a(o(S,c,n?.getPendingMeta?.({requestId:S,arg:c},{getState:y,extra:h}))),P=await Promise.race([j,Promise.resolve(r(c,{dispatch:a,getState:y,extra:h,requestId:S,signal:m.signal,abort:k,rejectWithValue:(F,I)=>new wo(F,I),fulfillWithValue:(F,I)=>new Ac(F,I)})).then(F=>{if(F instanceof wo)throw F;return F instanceof Ac?i(F.payload,S,c,F.meta):i(F,S,c)})])}catch(E){P=E instanceof wo?s(null,S,c,E.payload,E.meta):s(E,S,c)}finally{v&&m.signal.removeEventListener("abort",v)}return n&&!n.dispatchConditionRejection&&s.match(P)&&P.meta.condition||a(P),P}();return Object.assign(w,{abort:k,requestId:S,arg:c,unwrap(){return w.then(Dg)}})}}return Object.assign(u,{pending:o,rejected:s,fulfilled:i,settled:Be(s,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Dg(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function qg(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var xc=Symbol.for("rtk-slice-createasyncthunk"),Xw={[xc]:ie};function jg(e,t){return`${e}/${t}`}function Mg({creators:e}={}){let t=e?.asyncThunk?.[xc];return function(n){let{name:i,reducerPath:o=i}=n;if(!i)throw new Error(Le(11));typeof process<"u";let s=(typeof n.reducers=="function"?n.reducers(_g()):n.reducers)||{},u=Object.keys(s),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},a={addCase(P,b){let E=typeof P=="string"?P:P.type;if(!E)throw new Error(Le(12));if(E in c.sliceCaseReducersByType)throw new Error(Le(13));return c.sliceCaseReducersByType[E]=b,a},addMatcher(P,b){return c.sliceMatchers.push({matcher:P,reducer:b}),a},exposeAction(P,b){return c.actionCreators[P]=b,a},exposeCaseReducer(P,b){return c.sliceCaseReducersByName[P]=b,a}};u.forEach(P=>{let b=s[P],E={reducerName:P,type:jg(i,P),createNotation:typeof n.reducers=="function"};Ug(b)?Qg(E,b,a,t):Lg(E,b,a)});function y(){let[P={},b=[],E=void 0]=typeof n.extraReducers=="function"?wc(n.extraReducers):[n.extraReducers],j={...P,...c.sliceCaseReducersByType};return fe(n.initialState,F=>{for(let I in j)F.addCase(I,j[I]);for(let I of c.sliceMatchers)F.addMatcher(I.matcher,I.reducer);for(let I of b)F.addMatcher(I.matcher,I.reducer);E&&F.addDefaultCase(E)})}let h=P=>P,S=new Map,m;function v(P,b){return m||(m=y()),m(P,b)}function x(){return m||(m=y()),m.getInitialState()}function k(P,b=!1){function E(F){let I=F[P];return typeof I>"u"&&b&&(I=x()),I}function j(F=h){let I=Sc(S,b,()=>new WeakMap);return Sc(I,F,()=>{let O={};for(let[T,M]of Object.entries(n.selectors??{}))O[T]=Ng(M,F,x,b);return O})}return{reducerPath:P,getSelectors:j,get selectors(){return j(E)},selectSlice:E}}let w={name:i,reducer:v,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:x,...k(o),injectInto(P,{reducerPath:b,...E}={}){let j=b??o;return P.inject({reducerPath:j,reducer:v},E),{...w,...k(j,!0)}}};return w}}function Ng(e,t,r,n){function i(o,...s){let u=t(o);return typeof u>"u"&&n&&(u=r()),e(u,...s)}return i.unwrapped=e,i}var Ot=Mg();function _g(){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 Lg({type:e,reducerName:t,createNotation:r},n,i){let o,s;if("reducer"in n){if(r&&!Vg(n))throw new Error(Le(17));o=n.reducer,s=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,s?Q(e,s):Q(e))}function Ug(e){return e._reducerDefinitionType==="asyncThunk"}function Vg(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Qg({type:e,reducerName:t},r,n,i){if(!i)throw new Error(Le(18));let{payloadCreator:o,fulfilled:s,pending:u,rejected:c,settled:a,options:y}=r,h=i(e,o,y);n.exposeAction(t,h),s&&n.addCase(h.fulfilled,s),u&&n.addCase(h.pending,u),c&&n.addCase(h.rejected,c),a&&n.addMatcher(h.settled,a),n.exposeCaseReducer(t,{fulfilled:s||xn,pending:u||xn,rejected:c||xn,settled:a||xn})}function xn(){}var Ec="listener",Ic="completed",kc="cancelled",Zw=`task-${kc}`,eR=`task-${Ic}`,tR=`${Ec}-${kc}`,rR=`${Ec}-${Ic}`;var{assign:Pc}=Object;var Ro="listenerMiddleware";var Bg=Pc(Q(`${Ro}/add`),{withTypes:()=>Bg}),nR=Q(`${Ro}/removeAll`),$g=Pc(Q(`${Ro}/remove`),{withTypes:()=>$g});var iR=Symbol.for("rtk-state-proxy-original");function Le(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. `}g();d();f();p();var ee=new W({required:!0,emptyAllowed:!1}),ge=new W({required:!1,emptyAllowed:!1}),Ue=new W({required:!0,emptyAllowed:!0}),mR=new W({required:!1,emptyAllowed:!0}),Oc=new Xe({each:ee,required:!0}),Fc=new W({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Tc=new W({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),yR=new W({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),Hg=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),xo=(e,t)=>{if("required"in t)return{payload:new _e({value:t}).validate({value:e}).value};let i=new ae({options:{required:!0},values:t}).validate(e);if(i)throw new to(i);return{payload:e}},z=(e,t)=>{try{return xo(e,t)}catch(r){return{payload:e,error:Hg(r)}}};var On=(e,t,r,n)=>{let i=`Check the options of ${n}`;return zg(e,t,r,i,"Controller initialization error")},zg=(e,t,r,n,i)=>{try{return t.validate(r,n)}catch(o){throw e.logger.error(o,i),o}};var Fn=Q("caseAssistConfiguration/set",e=>z(e,{caseAssistId:ee,locale:ge,proxyBaseUrl:new W({required:!1,url:!0})}));g();d();f();p();g();d();f();p();var Dc=()=>({caseAssistId:"",locale:"en-US"});var ct=fe(Dc(),e=>{e.addCase(Fn,(t,r)=>{t.caseAssistId=r.payload.caseAssistId,t.locale=r.payload.locale,t.apiBaseUrl=r.payload.proxyBaseUrl})});g();d();f();p();g();d();f();p();g();d();f();p();var qc={q:new W,enableQuerySyntax:new ye,aq:new W,cq:new W,firstResult:new Re({min:0}),numberOfResults:new Re({min:0}),sortCriteria:new W,f:new ae,fExcluded:new ae,cf:new ae,nf:new ae,mnf:new ae,df:new ae,debug:new ye,sf:new ae,tab:new W,af:new ae};var Tn=Q("searchParameters/restore",e=>z(e,qc)),jc=Q("searchParameters/restoreTab",e=>z(e,ee));g();d();f();p();var Mc=Q("debug/enable"),Nc=Q("debug/disable");g();d();f();p();var Dn=()=>!1;var _c=fe(Dn(),e=>{e.addCase(Mc,()=>!0).addCase(Nc,()=>!1).addCase(Tn,(t,r)=>r.payload.debug??t)});g();d();f();p();var qn=Q("searchHub/set",e=>z(e,new W({required:!0,emptyAllowed:!0})));g();d();f();p();g();d();f();p();g();d();f();p();var Kt="3.30.2-pre.c2b3838e9f",Lc=["@coveo/atomic","@coveo/quantic"];var Eo=()=>ge,Uc=()=>ee,Jt=Q("configuration/updateBasicConfiguration",e=>z(e,{accessToken:ge,environment:new W({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ge})),jn=Q("configuration/updateSearchConfiguration",e=>z(e,{proxyBaseUrl:new W({required:!1,url:!0}),pipeline:new W({required:!1,emptyAllowed:!0}),searchHub:ge,timezone:ge,locale:ge,authenticationProviders:new Xe({required:!1,each:ee})})),Gg={enabled:new ye({default:!0}),originContext:Eo(),originLevel2:Eo(),originLevel3:Eo(),proxyBaseUrl:new W({required:!1,url:!0}),runtimeEnvironment:new Rt,anonymous:new ye({default:!1}),deviceId:ge,userDisplayName:ge,documentLocation:ge,trackingId:Tc,analyticsMode:new W({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new ae({options:{required:!1},values:Lc.reduce((e,t)=>(e[t]=Fc,e),{})})},Mn=Q("configuration/updateAnalyticsConfiguration",e=>z(e,Gg)),Nn=Q("configuration/analytics/disable"),_n=Q("configuration/analytics/enable"),Vc=Q("configuration/analytics/originlevel2",e=>z(e,{originLevel2:Uc()})),Qc=Q("configuration/analytics/originlevel3",e=>z(e,{originLevel3:Uc()}));g();d();f();p();var Wg=Q("history/undo"),Yg=Q("history/redo"),$e=Q("history/snapshot"),zx=ie("history/back",async(e,{dispatch:t})=>{t(Wg()),await t(Ln())}),Gx=ie("history/forward",async(e,{dispatch:t})=>{t(Yg()),await t(Ln())}),Ln=ie("history/change",async(e,{getState:t})=>t().history.present);g();d();f();p();var Xt=()=>"default";var Bc=fe(Xt(),e=>{e.addCase(qn,(t,r)=>r.payload).addCase(Ln.fulfilled,(t,r)=>r.payload?.searchHub??t).addCase(jn,(t,r)=>r.payload.searchHub||t)});g();d();f();p();g();d();f();p();g();d();f();p();g();d();f();p();g();d();f();p();g();d();f();p();var $c=/^(?:[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 Kg(e){return typeof e=="string"&&$c.test(e)}var Io=Kg;g();d();f();p();var ve=[];for(let e=0;e<256;++e)ve.push((e+256).toString(16).slice(1));function Hc(e,t=0){return(ve[e[t+0]]+ve[e[t+1]]+ve[e[t+2]]+ve[e[t+3]]+"-"+ve[e[t+4]]+ve[e[t+5]]+"-"+ve[e[t+6]]+ve[e[t+7]]+"-"+ve[e[t+8]]+ve[e[t+9]]+"-"+ve[e[t+10]]+ve[e[t+11]]+ve[e[t+12]]+ve[e[t+13]]+ve[e[t+14]]+ve[e[t+15]]).toLowerCase()}g();d();f();p();var ko,Jg=new Uint8Array(16);function Po(){if(!ko){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ko=crypto.getRandomValues.bind(crypto)}return ko(Jg)}g();d();f();p();g();d();f();p();var Xg=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Oo={randomUUID:Xg};function Zg(e,t,r){if(Oo.randomUUID&&!t&&!e)return Oo.randomUUID();e=e||{};let n=e.random??e.rng?.()??Po();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 i=0;i<16;++i)t[r+i]=n[i];return t}return Hc(n)}var Fo=Zg;g();d();f();p();function zc(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}function em({config:e,environment:t,event:r,listenerManager:n}){let{url:i,token:o,mode:s}=e;s!=="disabled"&&(n.call(r),t.send(i,o,r))}var Gc="visitorId";function tm(e){return{getClientId:()=>{let t=e.get(),r=t.storage,n=r.getItem(Gc),i=n&&Io(n)?n:t.generateUUID();return r.setItem(Gc,i),i}}}var Xc="1.2.7",To=128,Zc=192,Wc=224,Yc=240,rm=248;function nm(e){return(e&rm)===Yc?4:(e&Yc)===Wc?3:(e&Wc)===Zc?2:1}function im(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&To)!=To)break;if(r-=3,(n&Zc)!=To){t-r>=nm(n)*3&&(r=t);break}}return e.substring(0,r)}function om(e){let{trackingId:t}=e;return{trackingId:t}}function sm(e){return(e.source||[]).concat([`relay@${Xc}`])}function eu(e,t,r,n){let{getReferrer:i,getLocation:o,getUserAgent:s}=r,u=om(t),c=n.getClientId();return Object.freeze({type:e,config:u,ts:Date.now(),source:sm(t),clientId:c,userAgent:s(),referrer:Kc(i()),location:Kc(o())})}function Kc(e){return e!==null?im(e,1024):null}function am(e,t,r,n,i){return{...t,meta:eu(e,r,n,i)}}var cm="*";function um(){let e=[];function t({type:c,callback:a}){return e.findIndex(y=>y.type===c&&y.callback===a)}function r(c,a){return c.type==="*"||a===c.type}function n(c){return t(c)<0&&e.push(c),()=>u(c.type,c.callback)}function i(c){e.forEach(a=>{if(r(a,c.meta.type))try{a.callback(c)}catch(y){console.error(y)}})}function o(c){if(c===cm)e.length=0;else for(let a=e.length-1;a>=0;a--)e[a].type===c&&e.splice(a,1)}function s(c){let a=t(c);a>=0&&e.splice(a,1)}function u(c,a){a?s({type:c,callback:a}):o(c)}return{add:n,call:i,remove:u}}function Jc({url:e,token:t,trackingId:r,...n}){return Object.freeze({url:e,token:t,trackingId:r,...!!n.mode&&{mode:n.mode},...!!n.source&&{source:n.source},...!!n.environment&&{environment:n.environment}})}function lm(e){let t=Jc(e);return{get:()=>t,update:r=>{t=Jc({...t,...r})}}}var Do=dm();function dm(){let e="coveo_",t=r=>{let n=r.split(".").slice(-2);return n.length==2?n.join("."):""};return{getItem(r){let n=`${e}${r}=`,i=document.cookie.split(";");for(let o of i){let s=o.replace(/^\s+/,"");if(s.lastIndexOf(n,0)===0)return s.substring(n.length,s.length)}return null},setItem(r,n,i){let o=t(window.location.hostname),s=`;expires=${new Date(new Date().getTime()+i).toUTCString()}`,u=o?`;domain=${o}`:"";document.cookie=`${e}${r}=${n}${s}${u};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function pm(){return{getItem(e){return Do.getItem(e)||localStorage.getItem(e)},removeItem(e){Do.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),Do.setItem(e,t,31556952e3)}}}function fm(){let e=document.referrer;return e===""?null:e}function qo(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(zc().sendMessage({kind:"EVENT_PROTOCOL",event:r,url:e,token:t}),!n)throw new Error("Failed to send the event(s) because the payload size exceeded the maximum allowed size (32 KB). Please contact support if the problem persists.")},getReferrer:()=>fm(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>Fo(),storage:pm()}}function gm(){try{let e="__storage_test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return e instanceof DOMException&&e.name==="QuotaExceededError"&&localStorage&&localStorage.length!==0}}function mm(){return{getItem(){return null},removeItem(){},setItem(){}}}function ym(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:mm()}}function hm(e){let t=e.get().mode!=="disabled",r=e.get().environment,n=ym();return t&&r?{storage:n.storage,...r,runtime:"custom"}:t&&Sm()&&gm()?qo():n}function Sm(){try{return typeof window=="object"}catch{return!1}}function vm(e){return{get:()=>Object.freeze(hm(e))}}function tu(e){let t=lm(e),r=um(),n=vm(t),i=tm(n);return{emit:(o,s)=>{let u=t.get(),c=n.get(),a=am(o,s,u,c,i);return em({config:u,environment:c,event:a,listenerManager:r})},getMeta:o=>eu(o,t.get(),n.get(),i),on:(o,s)=>r.add({type:o,callback:s}),off:(o,s)=>r.remove(o,s),updateConfig:o=>t.update(o),version:Xc}}g();d();f();p();function ru(){return typeof window<"u"&&typeof document<"u"}g();d();f();p();var Zt=ce(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${Kt}`));var Vr=ce(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>Zt(e.configuration.analytics),(e,t)=>t,(e,t,r,{trackingId:n,apiBaseUrl:i,enabled:o},s,u)=>{let c=Cm(u);return tu({mode:o?"emit":"disabled",url:i??un(e,t),token:r,trackingId:n??null,source:s,environment:c})}),Am={generateUUID:()=>"",getLocation:()=>null,getReferrer:()=>null,getUserAgent:()=>null,send:()=>{},storage:{getItem:()=>null,setItem:()=>{},removeItem:()=>{}}},Cm=e=>{if(!e)return;let t=e();return{...ru()?qo():Am,generateUUID:()=>t.clientId,getLocation:()=>t.location,getReferrer:()=>t.referrer,getUserAgent:()=>t.userAgent}};g();d();f();p();g();d();f();p();g();d();f();p();g();d();f();p();g();d();f();p();g();d();f();p();var er=class e{static set(t,r,n){let i,o,s;n&&(o=new Date,o.setTime(o.getTime()+n));let u=window.location.hostname,c=/^(\d{1,3}\.){3}\d{1,3}$/,a=/^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}$/;c.test(u)||a.test(u)||u.indexOf(".")===-1?jo(t,r,o):(s=u.split("."),i=s[s.length-2]+"."+s[s.length-1],jo(t,r,o,i))}static get(t){let r=t+"=",n=document.cookie.split(";");for(let i=0;i<n.length;i++){let o=n[i];if(o=o.replace(/^\s+/,""),o.lastIndexOf(r,0)===0)return o.substring(r.length,o.length)}return null}static erase(t){e.set(t,"",-1)}};function jo(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}g();d();f();p();function bm(){return typeof navigator<"u"}function nu(){try{return typeof localStorage<"u"}catch{return!1}}function iu(){try{return typeof sessionStorage<"u"}catch{return!1}}function ou(){return!!(bm()&&navigator.cookieEnabled)}var su=null;function au(){return su||(nu()?localStorage:ou()?new Mo:iu()?sessionStorage:new No)}var tr=class tr{getItem(t){return er.get(`${tr.prefix}${t}`)}removeItem(t){er.erase(`${tr.prefix}${t}`)}setItem(t,r,n){er.set(`${tr.prefix}${t}`,r,n)}};se(tr,"prefix","coveo_");var Mo=tr;var No=class{getItem(t){return null}removeItem(t){}setItem(t,r){}};var Un="__coveo.analytics.history",wm=20,Rm=1e3*60,xm=75,Ft=class Ft{constructor(t){se(this,"store");this.store=t||au()}static getInstance(t){return Ft.instance||(Ft.instance=new Ft(t)),Ft.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])}async addElementAsync(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=await 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))}async getHistoryAsync(){let t=await this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryWithInternalTime(){try{let t=this.store.getItem(Un);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}async getHistoryWithInternalTimeAsync(){try{let t=await this.store.getItem(Un);return t?JSON.parse(t):[]}catch{return[]}}setHistory(t){try{this.store.setItem(Un,JSON.stringify(t.slice(0,wm)))}catch{}}clear(){try{this.store.removeItem(Un)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,i)=>(i.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,xm)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value===t.value?(t.internalTime||0)-(r.internalTime||0)>Rm:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:i,value:o}=r;return{name:n,time:i,value:o}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:i}=t;return r&&typeof i=="string"&&r.toLowerCase()==="query"&&i.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};se(Ft,"instance",null);var _o=Ft,ut=_o;g();d();f();p();g();d();f();p();g();d();f();p();function tt(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 i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function D(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function u(y){try{a(n.next(y))}catch(h){s(h)}}function c(y){try{a(n.throw(y))}catch(h){s(h)}}function a(y){y.done?o(y.value):i(y.value).then(u,c)}a((n=n.apply(e,t||[])).next())})}var re;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(re||(re={}));function Vo(){return typeof window<"u"}function es(){return typeof navigator<"u"}function rr(){return typeof document<"u"}function Qo(){try{return typeof localStorage<"u"}catch{return!1}}function Em(){try{return typeof sessionStorage<"u"}catch{return!1}}function Cu(){return es()&&navigator.cookieEnabled}var Im=[re.click,re.custom,re.search,re.view],km=(e,t)=>Im.indexOf(e)!==-1?Object.assign({language:rr()?document.documentElement.lang:"unknown",userAgent:es()?navigator.userAgent:"unknown"},t):t,Br=class e{static set(t,r,n){var i,o,s,u;n&&(o=new Date,o.setTime(o.getTime()+n)),u=window.location.hostname,u.indexOf(".")===-1?cu(t,r,o):(s=u.split("."),i=s[s.length-2]+"."+s[s.length-1],cu(t,r,o,i))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){var o=n[i];if(o=o.replace(/^\s+/,""),o.lastIndexOf(r,0)===0)return o.substring(r.length,o.length)}return null}static erase(t){e.set(t,"",-1)}};function cu(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function Pm(){return Qo()?localStorage:Cu()?new $r:Em()?sessionStorage:new ir}var $r=class e{getItem(t){return Br.get(`${e.prefix}${t}`)}removeItem(t){Br.erase(`${e.prefix}${t}`)}setItem(t,r,n){Br.set(`${e.prefix}${t}`,r,n)}};$r.prefix="coveo_";var Bo=class{constructor(){this.cookieStorage=new $r}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)}},ir=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Vn="__coveo.analytics.history",Om=20,Fm=1e3*60,Tm=75,$n=class{constructor(t){this.store=t||Pm()}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 D(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 D(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Vn);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return D(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Vn);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Vn,JSON.stringify(t.slice(0,Om)))}catch{}}clear(){try{this.store.removeItem(Vn)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,i)=>(i.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,Tm)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Fm:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:i,value:o}=r;return{name:n,time:i,value:o}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:i}=t;return r&&typeof i=="string"&&r.toLowerCase()==="query"&&i.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};var Dm=(e,t)=>D(void 0,void 0,void 0,function*(){return e===re.view?(yield qm(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),qm=e=>D(void 0,void 0,void 0,function*(){let t=new $n,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Qn,jm=new Uint8Array(16);function Mm(){if(!Qn&&(Qn=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Qn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qn(jm)}var Nm=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Hn(e){return typeof e=="string"&&Nm.test(e)}var Ae=[];for(let e=0;e<256;++e)Ae.push((e+256).toString(16).slice(1));function bu(e,t=0){return(Ae[e[t+0]]+Ae[e[t+1]]+Ae[e[t+2]]+Ae[e[t+3]]+"-"+Ae[e[t+4]]+Ae[e[t+5]]+"-"+Ae[e[t+6]]+Ae[e[t+7]]+"-"+Ae[e[t+8]]+Ae[e[t+9]]+"-"+Ae[e[t+10]]+Ae[e[t+11]]+Ae[e[t+12]]+Ae[e[t+13]]+Ae[e[t+14]]+Ae[e[t+15]]).toLowerCase()}function _m(e){if(!Hn(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}function Lm(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Um="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Vm="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Qm(e,t,r){function n(i,o,s,u){var c;if(typeof i=="string"&&(i=Lm(i)),typeof o=="string"&&(o=_m(o)),((c=o)===null||c===void 0?void 0:c.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+i.length);if(a.set(o),a.set(i,o.length),a=r(a),a[6]=a[6]&15|t,a[8]=a[8]&63|128,s){u=u||0;for(let y=0;y<16;++y)s[u+y]=a[y];return s}return bu(a)}try{n.name=e}catch{}return n.DNS=Um,n.URL=Vm,n}var Bm=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),uu={randomUUID:Bm};function Tt(e,t,r){if(uu.randomUUID&&!t&&!e)return uu.randomUUID();e=e||{};let n=e.random||(e.rng||Mm)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let i=0;i<16;++i)t[r+i]=n[i];return t}return bu(n)}function $m(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 Lo(e,t){return e<<t|e>>>32-t}function Hm(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let s=unescape(encodeURIComponent(e));e=[];for(let u=0;u<s.length;++u)e.push(s.charCodeAt(u))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,i=Math.ceil(n/16),o=new Array(i);for(let s=0;s<i;++s){let u=new Uint32Array(16);for(let c=0;c<16;++c)u[c]=e[s*64+c*4]<<24|e[s*64+c*4+1]<<16|e[s*64+c*4+2]<<8|e[s*64+c*4+3];o[s]=u}o[i-1][14]=(e.length-1)*8/Math.pow(2,32),o[i-1][14]=Math.floor(o[i-1][14]),o[i-1][15]=(e.length-1)*8&4294967295;for(let s=0;s<i;++s){let u=new Uint32Array(80);for(let m=0;m<16;++m)u[m]=o[s][m];for(let m=16;m<80;++m)u[m]=Lo(u[m-3]^u[m-8]^u[m-14]^u[m-16],1);let c=r[0],a=r[1],y=r[2],h=r[3],S=r[4];for(let m=0;m<80;++m){let v=Math.floor(m/20),x=Lo(c,5)+$m(v,a,y,h)+S+t[v]+u[m]>>>0;S=h,h=y,y=Lo(a,30)>>>0,a=c,c=x}r[0]=r[0]+c>>>0,r[1]=r[1]+a>>>0,r[2]=r[2]+y>>>0,r[3]=r[3]+h>>>0,r[4]=r[4]+S>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var zm=Qm("v5",80,Hm),lu=zm,wu="2.30.45",du=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Qr={pageview:"pageview",event:"event"},zn=class{constructor({client:t,uuidGenerator:r=Tt}){this.client=t,this.uuidGenerator=r}},$o=class extends zn{constructor({client:t,uuidGenerator:r=Tt}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=du(window.location),this.lastReferrer=rr()?document.referrer:"",this.addHooks()}getApi(t){switch(t){case"setAction":return this.setAction;default:return 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:rr()?document.title:"",encoding:rr()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},i={language:navigator.language,userAgent:navigator.userAgent},o={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},o),n),i),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:i,location:o}=this.getNextValues(t,r);this.lastReferrer=i,this.pageViewId=n,this.currentLocation=o,t===Qr.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Qr.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Qr.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Qr.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=i=>i.replace(/^\/?(.*)$/,"/$1");return`${(i=>i.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return du(window.location)}},lt=class e{constructor(t,r){if(!Hn(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(i=>new RegExp(i.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,i]=r;if(n.length!==32||isNaN(parseInt(i)))return null;let o=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return Hn(o)?new e(o,Number.parseInt(i)*1e3):null}};lt.cvo_cid="cvo_cid";lt.expirationTime=120;var Ho=class extends zn{constructor({client:t,uuidGenerator:r=Tt}){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 D(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(lt.cvo_cid,new lt(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Ho.Id="link";var je=Object.keys;function Bn(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Uo=128,Ru=192,pu=224,fu=240;function Gm(e){return(e&248)===fu?4:(e&fu)===pu?3:(e&pu)===Ru?2:1}function Wm(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&Uo)!=Uo)break;if(r-=3,(n&Ru)!=Uo){t-r>=Gm(n)*3&&(r=t);break}}return e.substring(0,r)}var zo={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"},Ym=je(zo).map(e=>zo[e]),Km=[...Ym].join("|"),Jm=new RegExp(`^(${Km}$)`),Xm={svcAction:"svc_action",svcActionData:"svc_action_data"},Zm=e=>je(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=zo[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),ey=e=>Jm.test(e),ty=[ey],gu={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},mu={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ce={action:"pa",list:"pal",listSource:"pls"},Gn={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},ry=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Go={id:"quoteId",affiliation:"quoteAffiliation"},Wo={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},ny={add:Ce,bookmark_add:Ce,bookmark_remove:Ce,click:Ce,checkout:Ce,checkout_option:Ce,detail:Ce,impression:Ce,remove:Ce,refund:Object.assign(Object.assign({},Ce),Gn),purchase:Object.assign(Object.assign({},Ce),Gn),quickview:Ce,quote:Object.assign(Object.assign({},Ce),Go),review:Object.assign(Object.assign({},Ce),Wo)},iy=je(gu).map(e=>gu[e]),oy=je(mu).map(e=>mu[e]),sy=je(Ce).map(e=>Ce[e]),ay=je(Gn).map(e=>Gn[e]),cy=je(Wo).map(e=>Wo[e]),uy=je(Go).map(e=>Go[e]),ly=[...iy,"custom"].join("|"),dy=[...oy,"custom"].join("|"),xu="(pr[0-9]+)",Eu="(il[0-9]+pi[0-9]+)",py=new RegExp(`^${xu}(${ly})$`),fy=new RegExp(`^(${Eu}(${dy}))|(il[0-9]+nm)$`),gy=new RegExp(`^(${sy.join("|")})$`),my=new RegExp(`^(${ay.join("|")})$`),yy=new RegExp(`^${xu}custom$`),hy=new RegExp(`^${Eu}custom$`),Sy=new RegExp(`^(${[...ry,...cy,...uy].join("|")})$`),vy=e=>py.test(e),Ay=e=>fy.test(e),Cy=e=>gy.test(e),by=e=>my.test(e),wy=e=>Sy.test(e),Ry=[Ay,vy,Cy,by,wy],xy=[yy,hy],Ey={anonymizeIp:"aip"},Iy={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},ky={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},Py=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],Oy=Object.assign(Object.assign(Object.assign(Object.assign({},Ey),Iy),ky),Py.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Yo=Object.assign(Object.assign({},Oy),Xm),Fy=e=>{let t=!!e.action&&ny[e.action]||{};return je(e).reduce((r,n)=>{let i=t[n]||Yo[n]||n;return Object.assign(Object.assign({},r),{[i]:e[n]})},{})},Ty=je(Yo).map(e=>Yo[e]),Dy=e=>Ty.indexOf(e)!==-1,qy=e=>e==="custom",jy=e=>[...Ry,...ty,Dy,qy].some(t=>t(e)),My=e=>je(e).reduce((t,r)=>{let n=Ny(r);return n?Object.assign(Object.assign({},t),_y(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Ny=e=>{let t;return[...xy].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},_y=(e,t)=>je(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),Ko=class{constructor(t){this.opts=t}sendEvent(t,r){return D(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:i}=this.opts,o=yield this.getQueryParamsForEventType(t),{url:s,payload:u}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${o}`,r,i),c=this.encodeForEventType(t,u),a=new Blob([c],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(s,a)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return D(this,void 0,void 0,function*(){let i=t,o=r;if(n){let s=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:u,body:c}=s;i=u||t;try{o=JSON.parse(c)}catch(a){console.error("Unable to process the request body as a JSON string",a)}}return{payload:o,url:i}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return D(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,i=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",i?`visitorId=${i}`:"","discardVisitInfo=true"].filter(o=>!!o).join("&")})}isEventTypeLegacy(t){return[re.click,re.custom,re.search,re.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let i=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(i=`access_token=${encodeURIComponent(n)}&${i}`),i}},Jo=class{sendEvent(t,r){return D(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return D(this,void 0,void 0,function*(){return Promise.resolve()})}},yu=A.fetch,Wn=class{constructor(t){this.opts=t}sendEvent(t,r){return D(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:i,preprocessRequest:o}=this.opts,s=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",u={url:`${n}/analytics/${t}${s}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},c=Object.assign(Object.assign({},u),o?yield o(u,"analyticsFetch"):{}),{url:a}=c,y=tt(c,["url"]),h;try{h=yield yu(a,y)}catch(S){console.error("An error has occured when sending the event.",S);return}if(h.ok){let S=yield h.json();return S.visitorId&&i.setCurrentVisitorId(S.visitorId),S}else{try{h.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,h,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return D(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield yu(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[re.click,re.custom,re.search,re.view].indexOf(t)!==-1}getVisitorIdParam(){return D(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"})}},Xo=class{constructor(t,r){Qo()&&Cu()?this.storage=new Bo:Qo()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new ir),this.client=new Wn(t),this.beaconClient=new Ko(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:i,payload:o}of n)this.beaconClient.sendEvent(i,o)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},Zo=class{constructor(t,r){this.storage=r||new ir,this.client=new Wn(t)}getClientDependingOnEventType(t){return this.client}},Yn=class{constructor(){this.storage=new ir,this.client=new Jo}getClientDependingOnEventType(t){return this.client}},Ly="xx",Uy=e=>e?.startsWith(Ly)||!1,Vy=`
27
+ `;return new to(r)}var to=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},_e=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let i in this.definition){let o=this.definition[i].validate(r[i]);o&&n.push(`${i}: ${o}`)}if(n.length)throw Uf(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}},Rt=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&Y(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 Qt(e){return e===void 0}function Vf(e){return e===null}function Y(e){return Qt(e)||Vf(e)}var ye=class{constructor(e={}){se(this,"value");this.value=new Rt(e)}validate(e){let t=this.value.validate(e);return t||(Qf(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function Qf(e){return Qt(e)||Ba(e)}function Ba(e){return typeof e=="boolean"}var Re=class{constructor(e={}){se(this,"value");this.config=e,this.value=new Rt(e)}validate(e){let t=this.value.validate(e);return t||(Bf(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 Bf(e){return Qt(e)||$a(e)}function $a(e){return typeof e=="number"&&!Number.isNaN(e)}var $f=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,W=class{constructor(e={}){se(this,"value");se(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new Rt(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:i,ISODate:o}=this.config,s=this.value.validate(e);if(s)return s;if(Qt(e))return null;if(!Ha(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}`:i&&!i.includes(e)?`value should be one of: ${i.join(", ")}.`:o&&!($f.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 Ha(e){return Object.prototype.toString.call(e)==="[object String]"}var ae=class{constructor(e={}){se(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(Qt(e))return this.config.options.required?"value is required and is currently undefined":null;if(!za(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&Y(e[r]))return`value does not contain ${r}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let i=e[r],o=n.validate(i);o!==null&&(t+=` ${o}`)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function za(e){return e!==void 0&&typeof e=="object"}var Xe=class{constructor(e={}){se(this,"value");this.config=e,this.value=new Rt(this.config)}validate(e){if(!Y(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(Y(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&&Y(n)&&(r=`value is null or undefined: ${e.join(",")}`);let i=this.validatePrimitiveValue(n,this.config.each);i!==null&&(r+=` ${i}`)}),r===""?null:r}return null}validatePrimitiveValue(e,t){return Ba(e)||Ha(e)||$a(e)||za(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function Ga(e){return Array.isArray(e)}var ro=class{constructor(e){se(this,"value");this.config=e,this.value=new Rt(e)}validate(e){let t=this.value.validate(e);return t!==null?t:Qt(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}};g();d();f();p();var ln=e=>e;g();d();f();p();g();d();f();p();g();d();f();p();var Bt=class{constructor(t){se(this,"_basePath");se(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}};g();d();f();p();function no(e){let{url:t,accessToken:r,organizationId:n,authentication:i,...o}=e;return o}var io=e=>{let{response:t}=e;return t.body?Hf(e):zf(t)},Hf=e=>Wf(e)?Yf(e):Gf(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},zf=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Gf(e){return e.body.statusCode!==void 0}function Wf(e){return e.body.exception!==void 0}var Yf=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});g();d();f();p();function Wa(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}g();d();f();p();var oo=(e,t,r,n)=>{let i=new Bt(`${e.url}${n}`);return i.addParam("organizationId",e.organizationId),e.authentication&&i.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:i.href,origin:"searchApiFetch"}};var Ya=(e,t)=>{let r=new Bt(`${e.url}${t}`);return r.addParam("access_token",e.accessToken),r.addParam("organizationId",e.organizationId),r.addParam("uniqueId",e.uniqueId),e.authentication&&r.addParam("authentication",e.authentication),e.q!==void 0&&r.addParam("q",e.q),e.enableNavigation!==void 0&&r.addParam("enableNavigation",`${e.enableNavigation}`),e.requestedOutputSize!==void 0&&r.addParam("requestedOutputSize",`${e.requestedOutputSize}`),r.href},so=async(e,t)=>{let r=await at.call({...oo(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:no(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=Wa(r),i=await r.arrayBuffer(),s=new TextDecoder(n).decode(i);return Kf(s)?{success:s}:{error:io({response:r,body:s})}};function Kf(e){return typeof e=="string"}g();d();f();p();function Jf(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function Xf(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function dn(e,t){if(t&&e.name==="AbortError")return{error:Xf(e)};if(e instanceof wt)return{error:Jf(e)};throw e}g();d();f();p();g();d();f();p();var pn=(e,t,r,n,i={})=>{Zf(e);let o=`${e.url}/rest/organizations/${e.organizationId}/caseassists/${e.caseAssistId}${n}`,s=eg(i),u=s?`${o}?${s}`:o;return{accessToken:e.accessToken,method:t,contentType:r,url:u,origin:"caseAssistApiFetch"}},fn=e=>Object.keys(e).filter(t=>e[t].value!=="").reduce((t,r)=>(t[r]=e[r],t),{}),gn=e=>Object.keys(e).filter(t=>e[t].value!=="").reduce((t,r)=>(t[r]=e[r].value,t),{}),Zf=e=>{if(!e.url)throw new Error("The 'url' attribute must contain a valid platform URL.");if(!e.organizationId)throw new Error("The 'organizationId' attribute must contain a valid organization ID.");if(!e.accessToken)throw new Error("The 'accessToken' attribute must contain a valid platform access token.");if(!e.caseAssistId)throw new Error("The 'caseAssistId' attribute must contain a valid Case Assist configuration ID.")},eg=e=>Object.keys(e).map(t=>`${t}=${encodeURIComponent(e[t])}`).join("&");var Ka=e=>{let t=e.debug?{debug:"1"}:{};return{...pn(e,"POST","application/json","/classify",t),requestParams:tg(e)}},tg=e=>({clientId:e.clientId,locale:e.locale,fields:fn(e.fields)});g();d();f();p();var Ja=e=>{let t={};return e.debug&&(t.debug="1"),e.numberOfResults&&(t.numberOfResults=e.numberOfResults.toString()),{...pn(e,"POST","application/json","/documents/suggest",t),requestParams:rg(e)}},rg=e=>({clientId:e.clientId,locale:e.locale,fields:fn(e.fields),context:e.context,analytics:e.analytics});var mn=class{constructor(t){this.options=t}async getCaseClassifications(t){let r=await at.call({...Ka(t),...this.options});if(r instanceof Error)return dn(r);let n=await r.json();return r.ok?{success:n}:{error:n}}async getDocumentSuggestions(t){let r=await at.call({...Ja(t),...this.options});if(r instanceof Error)return dn(r);let n=await r.json();return r.ok?{success:n}:{error:n}}async html(t){return so(t,this.options)}};g();d();f();p();g();d();f();p();g();d();f();p();function he(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 ng=typeof Symbol=="function"&&Symbol.observable||"@@observable",Xa=ng,ao=()=>Math.random().toString(36).substring(7).split("").join("."),ig={INIT:`@@redux/INIT${ao()}`,REPLACE:`@@redux/REPLACE${ao()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${ao()}`},yn=ig;function Qe(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 co(e,t,r){if(typeof e!="function")throw new Error(he(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(he(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(he(1));return r(co)(e,t)}let n=e,i=t,o=new Map,s=o,u=0,c=!1;function a(){s===o&&(s=new Map,o.forEach((k,w)=>{s.set(w,k)}))}function y(){if(c)throw new Error(he(3));return i}function h(k){if(typeof k!="function")throw new Error(he(4));if(c)throw new Error(he(5));let w=!0;a();let P=u++;return s.set(P,k),function(){if(w){if(c)throw new Error(he(6));w=!1,a(),s.delete(P),o=null}}}function S(k){if(!Qe(k))throw new Error(he(7));if(typeof k.type>"u")throw new Error(he(8));if(typeof k.type!="string")throw new Error(he(17));if(c)throw new Error(he(9));try{c=!0,i=n(i,k)}finally{c=!1}return(o=s).forEach(P=>{P()}),k}function m(k){if(typeof k!="function")throw new Error(he(10));n=k,S({type:yn.REPLACE})}function v(){let k=h;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(he(11));function P(){let E=w;E.next&&E.next(y())}return P(),{unsubscribe:k(P)}},[Xa](){return this}}}return S({type:yn.INIT}),{dispatch:S,subscribe:h,getState:y,replaceReducer:m,[Xa]:v}}function og(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:yn.INIT})>"u")throw new Error(he(12));if(typeof r(void 0,{type:yn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(he(13))})}function $t(e){let t=Object.keys(e),r={};for(let s=0;s<t.length;s++){let u=t[s];typeof e[u]=="function"&&(r[u]=e[u])}let n=Object.keys(r),i,o;try{og(r)}catch(s){o=s}return function(u={},c){if(o)throw o;let a=!1,y={};for(let h=0;h<n.length;h++){let S=n[h],m=r[S],v=u[S],x=m(v,c);if(typeof x>"u"){let k=c&&c.type;throw new Error(he(14))}y[S]=x,a=a||x!==v}return a=a||n.length!==Object.keys(u).length,a?y:u}}function Ht(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Za(...e){return t=>(r,n)=>{let i=t(r,n),o=()=>{throw new Error(he(15))},s={getState:i.getState,dispatch:(c,...a)=>o(c,...a)},u=e.map(c=>c(s));return o=Ht(...u)(i.dispatch),{...i,dispatch:o}}}function hn(e){return Qe(e)&&"type"in e&&typeof e.type=="string"}g();d();f();p();var vo=Symbol.for("immer-nothing"),Or=Symbol.for("immer-draftable"),xe=Symbol.for("immer-state");function Se(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Et=Object.getPrototypeOf;function Pe(e){return!!e&&!!e[xe]}function Ee(e){return e?ic(e)||Array.isArray(e)||!!e[Or]||!!e.constructor?.[Or]||zt(e)||Mr(e):!1}var sg=Object.prototype.constructor.toString();function ic(e){if(!e||typeof e!="object")return!1;let t=Et(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===sg}function Ao(e){return Pe(e)||Se(15,e),e[xe].base_}function Fr(e,t){It(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function It(e){let t=e[xe];return t?t.type_:Array.isArray(e)?1:zt(e)?2:Mr(e)?3:0}function Tr(e,t){return It(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function uo(e,t){return It(e)===2?e.get(t):e[t]}function oc(e,t,r){let n=It(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function ag(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function zt(e){return e instanceof Map}function Mr(e){return e instanceof Set}function xt(e){return e.copy_||e.base_}function fo(e,t){if(zt(e))return new Map(e);if(Mr(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=ic(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[xe];let i=Reflect.ownKeys(n);for(let o=0;o<i.length;o++){let s=i[o],u=n[s];u.writable===!1&&(u.writable=!0,u.configurable=!0),(u.get||u.set)&&(n[s]={configurable:!0,writable:!0,enumerable:u.enumerable,value:e[s]})}return Object.create(Et(e),n)}else{let n=Et(e);if(n!==null&&r)return{...e};let i=Object.create(n);return Object.assign(i,e)}}function Cn(e,t=!1){return bn(e)||Pe(e)||!Ee(e)||(It(e)>1&&Object.defineProperties(e,{set:{value:Sn},add:{value:Sn},clear:{value:Sn},delete:{value:Sn}}),Object.freeze(e),t&&Object.values(e).forEach(r=>Cn(r,!0))),e}function Sn(){Se(2)}function bn(e){return Object.isFrozen(e)}var go={};function kt(e){let t=go[e];return t||Se(0,e),t}function cg(e,t){go[e]||(go[e]=t)}var Dr;function sc(){return Dr}function ug(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function ec(e,t){t&&(kt("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function mo(e){yo(e),e.drafts_.forEach(lg),e.drafts_=null}function yo(e){e===Dr&&(Dr=e.parent_)}function tc(e){return Dr=ug(Dr,e)}function lg(e){let t=e[xe];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function rc(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[xe].modified_&&(mo(t),Se(4)),Ee(e)&&(e=vn(t,e),t.parent_||An(t,e)),t.patches_&&kt("Patches").generateReplacementPatches_(r[xe].base_,e,t.patches_,t.inversePatches_)):e=vn(t,r,[]),mo(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==vo?e:void 0}function vn(e,t,r){if(bn(t))return t;let n=t[xe];if(!n)return Fr(t,(i,o)=>nc(e,n,t,i,o,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return An(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let i=n.copy_,o=i,s=!1;n.type_===3&&(o=new Set(i),i.clear(),s=!0),Fr(o,(u,c)=>nc(e,n,i,u,c,r,s)),An(e,i,!1),r&&e.patches_&&kt("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function nc(e,t,r,n,i,o,s){if(Pe(i)){let u=o&&t&&t.type_!==3&&!Tr(t.assigned_,n)?o.concat(n):void 0,c=vn(e,i,u);if(oc(r,n,c),Pe(c))e.canAutoFreeze_=!1;else return}else s&&r.add(i);if(Ee(i)&&!bn(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;vn(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(zt(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&An(e,i)}}function An(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Cn(t,r)}function dg(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:sc(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},i=n,o=Co;r&&(i=[n],o=qr);let{revoke:s,proxy:u}=Proxy.revocable(i,o);return n.draft_=u,n.revoke_=s,u}var Co={get(e,t){if(t===xe)return e;let r=xt(e);if(!Tr(r,t))return pg(e,r,t);let n=r[t];return e.finalized_||!Ee(n)?n:n===lo(e.base_,t)?(po(e),e.copy_[t]=So(n,e)):n},has(e,t){return t in xt(e)},ownKeys(e){return Reflect.ownKeys(xt(e))},set(e,t,r){let n=ac(xt(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let i=lo(xt(e),t),o=i?.[xe];if(o&&o.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(ag(r,i)&&(r!==void 0||Tr(e.base_,t)))return!0;po(e),ho(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return lo(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,po(e),ho(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=xt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Se(11)},getPrototypeOf(e){return Et(e.base_)},setPrototypeOf(){Se(12)}},qr={};Fr(Co,(e,t)=>{qr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});qr.deleteProperty=function(e,t){return qr.set.call(this,e,t,void 0)};qr.set=function(e,t,r){return Co.set.call(this,e[0],t,r,e[0])};function lo(e,t){let r=e[xe];return(r?xt(r):e)[t]}function pg(e,t,r){let n=ac(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function ac(e,t){if(!(t in e))return;let r=Et(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Et(r)}}function ho(e){e.modified_||(e.modified_=!0,e.parent_&&ho(e.parent_))}function po(e){e.copy_||(e.copy_=fo(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var fg=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let o=r;r=t;let s=this;return function(c=o,...a){return s.produce(c,y=>r.call(this,y,...a))}}typeof r!="function"&&Se(6),n!==void 0&&typeof n!="function"&&Se(7);let i;if(Ee(t)){let o=tc(this),s=So(t,void 0),u=!0;try{i=r(s),u=!1}finally{u?mo(o):yo(o)}return ec(o,n),rc(i,o)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===vo&&(i=void 0),this.autoFreeze_&&Cn(i,!0),n){let o=[],s=[];kt("Patches").generateReplacementPatches_(t,i,o,s),n(o,s)}return i}else Se(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(s,...u)=>this.produceWithPatches(s,c=>t(c,...u));let n,i;return[this.produce(t,r,(s,u)=>{n=s,i=u}),n,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Ee(e)||Se(8),Pe(e)&&(e=cc(e));let t=tc(this),r=So(e,void 0);return r[xe].isManual_=!0,yo(t),r}finishDraft(e,t){let r=e&&e[xe];(!r||!r.isManual_)&&Se(9);let{scope_:n}=r;return ec(n,t),rc(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));let n=kt("Patches").applyPatches_;return Pe(e)?n(e,t):this.produce(e,i=>n(i,t))}};function So(e,t){let r=zt(e)?kt("MapSet").proxyMap_(e,t):Mr(e)?kt("MapSet").proxySet_(e,t):dg(e,t);return(t?t.scope_:sc()).drafts_.push(r),r}function cc(e){return Pe(e)||Se(10,e),uc(e)}function uc(e){if(!Ee(e)||bn(e))return e;let t=e[xe],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=fo(e,t.scope_.immer_.useStrictShallowCopy_)}else r=fo(e,!0);return Fr(r,(n,i)=>{oc(r,n,uc(i))}),t&&(t.finalized_=!1),r}function lc(){let t="replace",r="add",n="remove";function i(S,m,v,x){switch(S.type_){case 0:case 2:return s(S,m,v,x);case 1:return o(S,m,v,x);case 3:return u(S,m,v,x)}}function o(S,m,v,x){let{base_:k,assigned_:w}=S,P=S.copy_;P.length<k.length&&([k,P]=[P,k],[v,x]=[x,v]);for(let b=0;b<k.length;b++)if(w[b]&&P[b]!==k[b]){let E=m.concat([b]);v.push({op:t,path:E,value:h(P[b])}),x.push({op:t,path:E,value:h(k[b])})}for(let b=k.length;b<P.length;b++){let E=m.concat([b]);v.push({op:r,path:E,value:h(P[b])})}for(let b=P.length-1;k.length<=b;--b){let E=m.concat([b]);x.push({op:n,path:E})}}function s(S,m,v,x){let{base_:k,copy_:w}=S;Fr(S.assigned_,(P,b)=>{let E=uo(k,P),j=uo(w,P),F=b?Tr(k,P)?t:r:n;if(E===j&&F===t)return;let I=m.concat(P);v.push(F===n?{op:F,path:I}:{op:F,path:I,value:j}),x.push(F===r?{op:n,path:I}:F===n?{op:r,path:I,value:h(E)}:{op:t,path:I,value:h(E)})})}function u(S,m,v,x){let{base_:k,copy_:w}=S,P=0;k.forEach(b=>{if(!w.has(b)){let E=m.concat([P]);v.push({op:n,path:E,value:b}),x.unshift({op:r,path:E,value:b})}P++}),P=0,w.forEach(b=>{if(!k.has(b)){let E=m.concat([P]);v.push({op:r,path:E,value:b}),x.unshift({op:n,path:E,value:b})}P++})}function c(S,m,v,x){v.push({op:t,path:[],value:m===vo?void 0:m}),x.push({op:t,path:[],value:S})}function a(S,m){return m.forEach(v=>{let{path:x,op:k}=v,w=S;for(let j=0;j<x.length-1;j++){let F=It(w),I=x[j];typeof I!="string"&&typeof I!="number"&&(I=""+I),(F===0||F===1)&&(I==="__proto__"||I==="constructor")&&Se(19),typeof w=="function"&&I==="prototype"&&Se(19),w=uo(w,I),typeof w!="object"&&Se(18,x.join("/"))}let P=It(w),b=y(v.value),E=x[x.length-1];switch(k){case t:switch(P){case 2:return w.set(E,b);case 3:Se(16);default:return w[E]=b}case r:switch(P){case 1:return E==="-"?w.push(b):w.splice(E,0,b);case 2:return w.set(E,b);case 3:return w.add(b);default:return w[E]=b}case n:switch(P){case 1:return w.splice(E,1);case 2:return w.delete(E);case 3:return w.delete(v.value);default:return delete w[E]}default:Se(17,k)}}),S}function y(S){if(!Ee(S))return S;if(Array.isArray(S))return S.map(y);if(zt(S))return new Map(Array.from(S.entries()).map(([v,x])=>[v,y(x)]));if(Mr(S))return new Set(Array.from(S).map(y));let m=Object.create(Et(S));for(let v in S)m[v]=y(S[v]);return Tr(S,Or)&&(m[Or]=S[Or]),m}function h(S){return Pe(S)?y(S):S}cg("Patches",{applyPatches_:a,generatePatches_:i,generateReplacementPatches_:c})}var jr=new fg,Ze=jr.produce,wn=jr.produceWithPatches.bind(jr);var bo=jr.applyPatches.bind(jr);g();d();f();p();function gg(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function mg(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function yg(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 dc=e=>Array.isArray(e)?e:[e];function hg(e){let t=Array.isArray(e[0])?e[0]:e;return yg(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Sg(e,t){let r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var kw=Symbol();var Pw=Object.getPrototypeOf({});var vg=class{constructor(e){this.value=e}deref(){return this.value}},Ag=typeof WeakRef<"u"?WeakRef:vg,Cg=0,pc=1;function Rn(){return{s:Cg,v:void 0,o:null,p:null}}function Gt(e,t={}){let r=Rn(),{resultEqualityCheck:n}=t,i,o=0;function s(){let u=r,{length:c}=arguments;for(let h=0,S=c;h<S;h++){let m=arguments[h];if(typeof m=="function"||typeof m=="object"&&m!==null){let v=u.o;v===null&&(u.o=v=new WeakMap);let x=v.get(m);x===void 0?(u=Rn(),v.set(m,u)):u=x}else{let v=u.p;v===null&&(u.p=v=new Map);let x=v.get(m);x===void 0?(u=Rn(),v.set(m,u)):u=x}}let a=u,y;if(u.s===pc)y=u.v;else if(y=e.apply(null,arguments),o++,n){let h=i?.deref?.()??i;h!=null&&n(h,y)&&(y=h,o!==0&&o--),i=typeof y=="object"&&y!==null||typeof y=="function"?new Ag(y):y}return a.s=pc,a.v=y,y}return s.clearCache=()=>{r=Rn(),s.resetResultsCount()},s.resultsCount=()=>o,s.resetResultsCount=()=>{o=0},s}function fc(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let o=0,s=0,u,c={},a=i.pop();typeof a=="object"&&(c=a,a=i.pop()),gg(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);let y={...r,...c},{memoize:h,memoizeOptions:S=[],argsMemoize:m=Gt,argsMemoizeOptions:v=[],devModeChecks:x={}}=y,k=dc(S),w=dc(v),P=hg(i),b=h(function(){return o++,a.apply(null,arguments)},...k),E=!0,j=m(function(){s++;let I=Sg(P,arguments);return u=b.apply(null,I),u},...w);return Object.assign(j,{resultFunc:a,memoizedResultFunc:b,dependencies:P,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:h,argsMemoize:m})};return Object.assign(n,{withTypes:()=>n}),n}var ce=fc(Gt),bg=Object.assign((e,t=ce)=>{mg(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e),n=r.map(o=>e[o]);return t(n,(...o)=>o.reduce((s,u,c)=>(s[r[c]]=u,s),{}))},{withTypes:()=>bg});g();d();f();p();function gc(e){return({dispatch:r,getState:n})=>i=>o=>typeof o=="function"?o(r,n,e):i(o)}var mc=gc(),yc=gc;var wg=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Ht:Ht.apply(null,arguments)},Gw=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Rg=e=>e&&typeof e.match=="function";function Q(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(Le(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>hn(n)&&n.type===e,r}var Cc=class Nr extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Nr.prototype)}static get[Symbol.species](){return Nr}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Nr(...t[0].concat(this)):new Nr(...t.concat(this))}};function hc(e){return Ee(e)?Ze(e,()=>{}):e}function Sc(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function xg(e){return typeof e=="boolean"}var Eg=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{},s=new Cc;return r&&(xg(r)?s.push(mc):s.push(yc(r.extraArgument))),s},_r="RTK_autoBatch",Yt=()=>e=>({payload:e,meta:{[_r]:!0}}),vc=e=>t=>{setTimeout(t,e)},Ig=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),i=!0,o=!1,s=!1,u=new Set,c=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:vc(10):e.type==="callback"?e.queueNotification:vc(e.timeout),a=()=>{s=!1,o&&(o=!1,u.forEach(y=>y()))};return Object.assign({},n,{subscribe(y){let h=()=>i&&y(),S=n.subscribe(h);return u.add(y),()=>{S(),u.delete(y)}},dispatch(y){try{return i=!y?.meta?.[_r],o=!i,o&&(s||(s=!0,c(a))),n.dispatch(y)}finally{i=!0}}})},kg=e=>function(r){let{autoBatch:n=!0}=r??{},i=new Cc(e);return n&&i.push(Ig(typeof n=="object"?n:void 0)),i};function bc(e){let t=Eg(),{reducer:r=void 0,middleware:n,devTools:i=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{},u;if(typeof r=="function")u=r;else if(Qe(r))u=$t(r);else throw new Error(Le(1));let c;typeof n=="function"?c=n(t):c=t();let a=Ht;i&&(a=wg({trace:!1,...typeof i=="object"&&i}));let y=Za(...c),h=kg(y),S=typeof s=="function"?s(h):h(),m=a(...S);return co(u,o,m)}function wc(e){let t={},r=[],n,i={addCase(o,s){let u=typeof o=="string"?o:o.type;if(!u)throw new Error(Le(28));if(u in t)throw new Error(Le(29));return t[u]=s,i},addMatcher(o,s){return r.push({matcher:o,reducer:s}),i},addDefaultCase(o){return n=o,i}};return e(i),[t,r,n]}function Pg(e){return typeof e=="function"}function fe(e,t){let[r,n,i]=wc(t),o;if(Pg(e))o=()=>hc(e());else{let u=hc(e);o=()=>u}function s(u=o(),c){let a=[r[c.type],...n.filter(({matcher:y})=>y(c)).map(({reducer:y})=>y)];return a.filter(y=>!!y).length===0&&(a=[i]),a.reduce((y,h)=>{if(h)if(Pe(y)){let m=h(y,c);return m===void 0?y:m}else{if(Ee(y))return Ze(y,S=>h(S,c));{let S=h(y,c);if(S===void 0){if(y===null)return y;throw Error("A case reducer on a non-draftable value must not return undefined")}return S}}return y},u)}return s.getInitialState=o,s}var Rc=(e,t)=>Rg(e)?e.match(t):e(t);function Be(...e){return t=>e.some(r=>Rc(r,t))}function Wt(...e){return t=>e.every(r=>Rc(r,t))}function En(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 Lr(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function In(...e){return e.length===0?t=>En(t,["pending"]):Lr(e)?Be(...e.map(t=>t.pending)):In()(e[0])}function Pt(...e){return e.length===0?t=>En(t,["rejected"]):Lr(e)?Be(...e.map(t=>t.rejected)):Pt()(e[0])}function Ur(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Wt(Pt(...e),t):Lr(e)?Wt(Pt(...e),t):Ur()(e[0])}function et(...e){return e.length===0?t=>En(t,["fulfilled"]):Lr(e)?Be(...e.map(t=>t.fulfilled)):et()(e[0])}function kn(...e){return e.length===0?t=>En(t,["pending","fulfilled","rejected"]):Lr(e)?Be(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):kn()(e[0])}var Og="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Pn=(e=21)=>{let t="",r=e;for(;r--;)t+=Og[Math.random()*64|0];return t},Fg=["name","message","stack","code"],wo=class{constructor(e,t){se(this,"_type");this.payload=e,this.meta=t}},Ac=class{constructor(e,t){se(this,"_type");this.payload=e,this.meta=t}},Tg=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Fg)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},ie=(()=>{function e(t,r,n){let i=Q(t+"/fulfilled",(c,a,y,h)=>({payload:c,meta:{...h||{},arg:y,requestId:a,requestStatus:"fulfilled"}})),o=Q(t+"/pending",(c,a,y)=>({payload:void 0,meta:{...y||{},arg:a,requestId:c,requestStatus:"pending"}})),s=Q(t+"/rejected",(c,a,y,h,S)=>({payload:h,error:(n&&n.serializeError||Tg)(c||"Rejected"),meta:{...S||{},arg:y,requestId:a,rejectedWithValue:!!h,requestStatus:"rejected",aborted:c?.name==="AbortError",condition:c?.name==="ConditionError"}}));function u(c){return(a,y,h)=>{let S=n?.idGenerator?n.idGenerator(c):Pn(),m=new l.AbortController,v,x;function k(P){x=P,m.abort()}let w=async function(){let P;try{let E=n?.condition?.(c,{getState:y,extra:h});if(qg(E)&&(E=await E),E===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let j=new Promise((F,I)=>{v=()=>{I({name:"AbortError",message:x||"Aborted"})},m.signal.addEventListener("abort",v)});a(o(S,c,n?.getPendingMeta?.({requestId:S,arg:c},{getState:y,extra:h}))),P=await Promise.race([j,Promise.resolve(r(c,{dispatch:a,getState:y,extra:h,requestId:S,signal:m.signal,abort:k,rejectWithValue:(F,I)=>new wo(F,I),fulfillWithValue:(F,I)=>new Ac(F,I)})).then(F=>{if(F instanceof wo)throw F;return F instanceof Ac?i(F.payload,S,c,F.meta):i(F,S,c)})])}catch(E){P=E instanceof wo?s(null,S,c,E.payload,E.meta):s(E,S,c)}finally{v&&m.signal.removeEventListener("abort",v)}return n&&!n.dispatchConditionRejection&&s.match(P)&&P.meta.condition||a(P),P}();return Object.assign(w,{abort:k,requestId:S,arg:c,unwrap(){return w.then(Dg)}})}}return Object.assign(u,{pending:o,rejected:s,fulfilled:i,settled:Be(s,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Dg(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function qg(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var xc=Symbol.for("rtk-slice-createasyncthunk"),Xw={[xc]:ie};function jg(e,t){return`${e}/${t}`}function Mg({creators:e}={}){let t=e?.asyncThunk?.[xc];return function(n){let{name:i,reducerPath:o=i}=n;if(!i)throw new Error(Le(11));typeof process<"u";let s=(typeof n.reducers=="function"?n.reducers(_g()):n.reducers)||{},u=Object.keys(s),c={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},a={addCase(P,b){let E=typeof P=="string"?P:P.type;if(!E)throw new Error(Le(12));if(E in c.sliceCaseReducersByType)throw new Error(Le(13));return c.sliceCaseReducersByType[E]=b,a},addMatcher(P,b){return c.sliceMatchers.push({matcher:P,reducer:b}),a},exposeAction(P,b){return c.actionCreators[P]=b,a},exposeCaseReducer(P,b){return c.sliceCaseReducersByName[P]=b,a}};u.forEach(P=>{let b=s[P],E={reducerName:P,type:jg(i,P),createNotation:typeof n.reducers=="function"};Ug(b)?Qg(E,b,a,t):Lg(E,b,a)});function y(){let[P={},b=[],E=void 0]=typeof n.extraReducers=="function"?wc(n.extraReducers):[n.extraReducers],j={...P,...c.sliceCaseReducersByType};return fe(n.initialState,F=>{for(let I in j)F.addCase(I,j[I]);for(let I of c.sliceMatchers)F.addMatcher(I.matcher,I.reducer);for(let I of b)F.addMatcher(I.matcher,I.reducer);E&&F.addDefaultCase(E)})}let h=P=>P,S=new Map,m;function v(P,b){return m||(m=y()),m(P,b)}function x(){return m||(m=y()),m.getInitialState()}function k(P,b=!1){function E(F){let I=F[P];return typeof I>"u"&&b&&(I=x()),I}function j(F=h){let I=Sc(S,b,()=>new WeakMap);return Sc(I,F,()=>{let O={};for(let[T,M]of Object.entries(n.selectors??{}))O[T]=Ng(M,F,x,b);return O})}return{reducerPath:P,getSelectors:j,get selectors(){return j(E)},selectSlice:E}}let w={name:i,reducer:v,actions:c.actionCreators,caseReducers:c.sliceCaseReducersByName,getInitialState:x,...k(o),injectInto(P,{reducerPath:b,...E}={}){let j=b??o;return P.inject({reducerPath:j,reducer:v},E),{...w,...k(j,!0)}}};return w}}function Ng(e,t,r,n){function i(o,...s){let u=t(o);return typeof u>"u"&&n&&(u=r()),e(u,...s)}return i.unwrapped=e,i}var Ot=Mg();function _g(){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 Lg({type:e,reducerName:t,createNotation:r},n,i){let o,s;if("reducer"in n){if(r&&!Vg(n))throw new Error(Le(17));o=n.reducer,s=n.prepare}else o=n;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,s?Q(e,s):Q(e))}function Ug(e){return e._reducerDefinitionType==="asyncThunk"}function Vg(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Qg({type:e,reducerName:t},r,n,i){if(!i)throw new Error(Le(18));let{payloadCreator:o,fulfilled:s,pending:u,rejected:c,settled:a,options:y}=r,h=i(e,o,y);n.exposeAction(t,h),s&&n.addCase(h.fulfilled,s),u&&n.addCase(h.pending,u),c&&n.addCase(h.rejected,c),a&&n.addMatcher(h.settled,a),n.exposeCaseReducer(t,{fulfilled:s||xn,pending:u||xn,rejected:c||xn,settled:a||xn})}function xn(){}var Ec="listener",Ic="completed",kc="cancelled",Zw=`task-${kc}`,eR=`task-${Ic}`,tR=`${Ec}-${kc}`,rR=`${Ec}-${Ic}`;var{assign:Pc}=Object;var Ro="listenerMiddleware";var Bg=Pc(Q(`${Ro}/add`),{withTypes:()=>Bg}),nR=Q(`${Ro}/removeAll`),$g=Pc(Q(`${Ro}/remove`),{withTypes:()=>$g});var iR=Symbol.for("rtk-state-proxy-original");function Le(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. `}g();d();f();p();var ee=new W({required:!0,emptyAllowed:!1}),ge=new W({required:!1,emptyAllowed:!1}),Ue=new W({required:!0,emptyAllowed:!0}),mR=new W({required:!1,emptyAllowed:!0}),Oc=new Xe({each:ee,required:!0}),Fc=new W({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Tc=new W({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),yR=new W({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),Hg=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),xo=(e,t)=>{if("required"in t)return{payload:new _e({value:t}).validate({value:e}).value};let i=new ae({options:{required:!0},values:t}).validate(e);if(i)throw new to(i);return{payload:e}},z=(e,t)=>{try{return xo(e,t)}catch(r){return{payload:e,error:Hg(r)}}};var On=(e,t,r,n)=>{let i=`Check the options of ${n}`;return zg(e,t,r,i,"Controller initialization error")},zg=(e,t,r,n,i)=>{try{return t.validate(r,n)}catch(o){throw e.logger.error(o,i),o}};var Fn=Q("caseAssistConfiguration/set",e=>z(e,{caseAssistId:ee,locale:ge,proxyBaseUrl:new W({required:!1,url:!0})}));g();d();f();p();g();d();f();p();var Dc=()=>({caseAssistId:"",locale:"en-US"});var ct=fe(Dc(),e=>{e.addCase(Fn,(t,r)=>{t.caseAssistId=r.payload.caseAssistId,t.locale=r.payload.locale,t.apiBaseUrl=r.payload.proxyBaseUrl})});g();d();f();p();g();d();f();p();g();d();f();p();var qc={q:new W,enableQuerySyntax:new ye,aq:new W,cq:new W,firstResult:new Re({min:0}),numberOfResults:new Re({min:0}),sortCriteria:new W,f:new ae,fExcluded:new ae,cf:new ae,nf:new ae,mnf:new ae,df:new ae,debug:new ye,sf:new ae,tab:new W,af:new ae};var Tn=Q("searchParameters/restore",e=>z(e,qc)),jc=Q("searchParameters/restoreTab",e=>z(e,ee));g();d();f();p();var Mc=Q("debug/enable"),Nc=Q("debug/disable");g();d();f();p();var Dn=()=>!1;var _c=fe(Dn(),e=>{e.addCase(Mc,()=>!0).addCase(Nc,()=>!1).addCase(Tn,(t,r)=>r.payload.debug??t)});g();d();f();p();var qn=Q("searchHub/set",e=>z(e,new W({required:!0,emptyAllowed:!0})));g();d();f();p();g();d();f();p();g();d();f();p();var Kt="3.30.2-pre.c4f48669ee",Lc=["@coveo/atomic","@coveo/quantic"];var Eo=()=>ge,Uc=()=>ee,Jt=Q("configuration/updateBasicConfiguration",e=>z(e,{accessToken:ge,environment:new W({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ge})),jn=Q("configuration/updateSearchConfiguration",e=>z(e,{proxyBaseUrl:new W({required:!1,url:!0}),pipeline:new W({required:!1,emptyAllowed:!0}),searchHub:ge,timezone:ge,locale:ge,authenticationProviders:new Xe({required:!1,each:ee})})),Gg={enabled:new ye({default:!0}),originContext:Eo(),originLevel2:Eo(),originLevel3:Eo(),proxyBaseUrl:new W({required:!1,url:!0}),runtimeEnvironment:new Rt,anonymous:new ye({default:!1}),deviceId:ge,userDisplayName:ge,documentLocation:ge,trackingId:Tc,analyticsMode:new W({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new ae({options:{required:!1},values:Lc.reduce((e,t)=>(e[t]=Fc,e),{})})},Mn=Q("configuration/updateAnalyticsConfiguration",e=>z(e,Gg)),Nn=Q("configuration/analytics/disable"),_n=Q("configuration/analytics/enable"),Vc=Q("configuration/analytics/originlevel2",e=>z(e,{originLevel2:Uc()})),Qc=Q("configuration/analytics/originlevel3",e=>z(e,{originLevel3:Uc()}));g();d();f();p();var Wg=Q("history/undo"),Yg=Q("history/redo"),$e=Q("history/snapshot"),zx=ie("history/back",async(e,{dispatch:t})=>{t(Wg()),await t(Ln())}),Gx=ie("history/forward",async(e,{dispatch:t})=>{t(Yg()),await t(Ln())}),Ln=ie("history/change",async(e,{getState:t})=>t().history.present);g();d();f();p();var Xt=()=>"default";var Bc=fe(Xt(),e=>{e.addCase(qn,(t,r)=>r.payload).addCase(Ln.fulfilled,(t,r)=>r.payload?.searchHub??t).addCase(jn,(t,r)=>r.payload.searchHub||t)});g();d();f();p();g();d();f();p();g();d();f();p();g();d();f();p();g();d();f();p();g();d();f();p();var $c=/^(?:[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 Kg(e){return typeof e=="string"&&$c.test(e)}var Io=Kg;g();d();f();p();var ve=[];for(let e=0;e<256;++e)ve.push((e+256).toString(16).slice(1));function Hc(e,t=0){return(ve[e[t+0]]+ve[e[t+1]]+ve[e[t+2]]+ve[e[t+3]]+"-"+ve[e[t+4]]+ve[e[t+5]]+"-"+ve[e[t+6]]+ve[e[t+7]]+"-"+ve[e[t+8]]+ve[e[t+9]]+"-"+ve[e[t+10]]+ve[e[t+11]]+ve[e[t+12]]+ve[e[t+13]]+ve[e[t+14]]+ve[e[t+15]]).toLowerCase()}g();d();f();p();var ko,Jg=new Uint8Array(16);function Po(){if(!ko){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");ko=crypto.getRandomValues.bind(crypto)}return ko(Jg)}g();d();f();p();g();d();f();p();var Xg=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Oo={randomUUID:Xg};function Zg(e,t,r){if(Oo.randomUUID&&!t&&!e)return Oo.randomUUID();e=e||{};let n=e.random??e.rng?.()??Po();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 i=0;i<16;++i)t[r+i]=n[i];return t}return Hc(n)}var Fo=Zg;g();d();f();p();function zc(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}function em({config:e,environment:t,event:r,listenerManager:n}){let{url:i,token:o,mode:s}=e;s!=="disabled"&&(n.call(r),t.send(i,o,r))}var Gc="visitorId";function tm(e){return{getClientId:()=>{let t=e.get(),r=t.storage,n=r.getItem(Gc),i=n&&Io(n)?n:t.generateUUID();return r.setItem(Gc,i),i}}}var Xc="1.2.7",To=128,Zc=192,Wc=224,Yc=240,rm=248;function nm(e){return(e&rm)===Yc?4:(e&Yc)===Wc?3:(e&Wc)===Zc?2:1}function im(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&To)!=To)break;if(r-=3,(n&Zc)!=To){t-r>=nm(n)*3&&(r=t);break}}return e.substring(0,r)}function om(e){let{trackingId:t}=e;return{trackingId:t}}function sm(e){return(e.source||[]).concat([`relay@${Xc}`])}function eu(e,t,r,n){let{getReferrer:i,getLocation:o,getUserAgent:s}=r,u=om(t),c=n.getClientId();return Object.freeze({type:e,config:u,ts:Date.now(),source:sm(t),clientId:c,userAgent:s(),referrer:Kc(i()),location:Kc(o())})}function Kc(e){return e!==null?im(e,1024):null}function am(e,t,r,n,i){return{...t,meta:eu(e,r,n,i)}}var cm="*";function um(){let e=[];function t({type:c,callback:a}){return e.findIndex(y=>y.type===c&&y.callback===a)}function r(c,a){return c.type==="*"||a===c.type}function n(c){return t(c)<0&&e.push(c),()=>u(c.type,c.callback)}function i(c){e.forEach(a=>{if(r(a,c.meta.type))try{a.callback(c)}catch(y){console.error(y)}})}function o(c){if(c===cm)e.length=0;else for(let a=e.length-1;a>=0;a--)e[a].type===c&&e.splice(a,1)}function s(c){let a=t(c);a>=0&&e.splice(a,1)}function u(c,a){a?s({type:c,callback:a}):o(c)}return{add:n,call:i,remove:u}}function Jc({url:e,token:t,trackingId:r,...n}){return Object.freeze({url:e,token:t,trackingId:r,...!!n.mode&&{mode:n.mode},...!!n.source&&{source:n.source},...!!n.environment&&{environment:n.environment}})}function lm(e){let t=Jc(e);return{get:()=>t,update:r=>{t=Jc({...t,...r})}}}var Do=dm();function dm(){let e="coveo_",t=r=>{let n=r.split(".").slice(-2);return n.length==2?n.join("."):""};return{getItem(r){let n=`${e}${r}=`,i=document.cookie.split(";");for(let o of i){let s=o.replace(/^\s+/,"");if(s.lastIndexOf(n,0)===0)return s.substring(n.length,s.length)}return null},setItem(r,n,i){let o=t(window.location.hostname),s=`;expires=${new Date(new Date().getTime()+i).toUTCString()}`,u=o?`;domain=${o}`:"";document.cookie=`${e}${r}=${n}${s}${u};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function pm(){return{getItem(e){return Do.getItem(e)||localStorage.getItem(e)},removeItem(e){Do.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),Do.setItem(e,t,31556952e3)}}}function fm(){let e=document.referrer;return e===""?null:e}function qo(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(zc().sendMessage({kind:"EVENT_PROTOCOL",event:r,url:e,token:t}),!n)throw new Error("Failed to send the event(s) because the payload size exceeded the maximum allowed size (32 KB). Please contact support if the problem persists.")},getReferrer:()=>fm(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>Fo(),storage:pm()}}function gm(){try{let e="__storage_test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return e instanceof DOMException&&e.name==="QuotaExceededError"&&localStorage&&localStorage.length!==0}}function mm(){return{getItem(){return null},removeItem(){},setItem(){}}}function ym(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:mm()}}function hm(e){let t=e.get().mode!=="disabled",r=e.get().environment,n=ym();return t&&r?{storage:n.storage,...r,runtime:"custom"}:t&&Sm()&&gm()?qo():n}function Sm(){try{return typeof window=="object"}catch{return!1}}function vm(e){return{get:()=>Object.freeze(hm(e))}}function tu(e){let t=lm(e),r=um(),n=vm(t),i=tm(n);return{emit:(o,s)=>{let u=t.get(),c=n.get(),a=am(o,s,u,c,i);return em({config:u,environment:c,event:a,listenerManager:r})},getMeta:o=>eu(o,t.get(),n.get(),i),on:(o,s)=>r.add({type:o,callback:s}),off:(o,s)=>r.remove(o,s),updateConfig:o=>t.update(o),version:Xc}}g();d();f();p();function ru(){return typeof window<"u"&&typeof document<"u"}g();d();f();p();var Zt=ce(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${Kt}`));var Vr=ce(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>Zt(e.configuration.analytics),(e,t)=>t,(e,t,r,{trackingId:n,apiBaseUrl:i,enabled:o},s,u)=>{let c=Cm(u);return tu({mode:o?"emit":"disabled",url:i??un(e,t),token:r,trackingId:n??null,source:s,environment:c})}),Am={generateUUID:()=>"",getLocation:()=>null,getReferrer:()=>null,getUserAgent:()=>null,send:()=>{},storage:{getItem:()=>null,setItem:()=>{},removeItem:()=>{}}},Cm=e=>{if(!e)return;let t=e();return{...ru()?qo():Am,generateUUID:()=>t.clientId,getLocation:()=>t.location,getReferrer:()=>t.referrer,getUserAgent:()=>t.userAgent}};g();d();f();p();g();d();f();p();g();d();f();p();g();d();f();p();g();d();f();p();g();d();f();p();var er=class e{static set(t,r,n){let i,o,s;n&&(o=new Date,o.setTime(o.getTime()+n));let u=window.location.hostname,c=/^(\d{1,3}\.){3}\d{1,3}$/,a=/^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}$/;c.test(u)||a.test(u)||u.indexOf(".")===-1?jo(t,r,o):(s=u.split("."),i=s[s.length-2]+"."+s[s.length-1],jo(t,r,o,i))}static get(t){let r=t+"=",n=document.cookie.split(";");for(let i=0;i<n.length;i++){let o=n[i];if(o=o.replace(/^\s+/,""),o.lastIndexOf(r,0)===0)return o.substring(r.length,o.length)}return null}static erase(t){e.set(t,"",-1)}};function jo(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}g();d();f();p();function bm(){return typeof navigator<"u"}function nu(){try{return typeof localStorage<"u"}catch{return!1}}function iu(){try{return typeof sessionStorage<"u"}catch{return!1}}function ou(){return!!(bm()&&navigator.cookieEnabled)}var su=null;function au(){return su||(nu()?localStorage:ou()?new Mo:iu()?sessionStorage:new No)}var tr=class tr{getItem(t){return er.get(`${tr.prefix}${t}`)}removeItem(t){er.erase(`${tr.prefix}${t}`)}setItem(t,r,n){er.set(`${tr.prefix}${t}`,r,n)}};se(tr,"prefix","coveo_");var Mo=tr;var No=class{getItem(t){return null}removeItem(t){}setItem(t,r){}};var Un="__coveo.analytics.history",wm=20,Rm=1e3*60,xm=75,Ft=class Ft{constructor(t){se(this,"store");this.store=t||au()}static getInstance(t){return Ft.instance||(Ft.instance=new Ft(t)),Ft.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])}async addElementAsync(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=await 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))}async getHistoryAsync(){let t=await this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryWithInternalTime(){try{let t=this.store.getItem(Un);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}async getHistoryWithInternalTimeAsync(){try{let t=await this.store.getItem(Un);return t?JSON.parse(t):[]}catch{return[]}}setHistory(t){try{this.store.setItem(Un,JSON.stringify(t.slice(0,wm)))}catch{}}clear(){try{this.store.removeItem(Un)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,i)=>(i.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,xm)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value===t.value?(t.internalTime||0)-(r.internalTime||0)>Rm:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:i,value:o}=r;return{name:n,time:i,value:o}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:i}=t;return r&&typeof i=="string"&&r.toLowerCase()==="query"&&i.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};se(Ft,"instance",null);var _o=Ft,ut=_o;g();d();f();p();g();d();f();p();g();d();f();p();function tt(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 i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function D(e,t,r,n){function i(o){return o instanceof r?o:new r(function(s){s(o)})}return new(r||(r=Promise))(function(o,s){function u(y){try{a(n.next(y))}catch(h){s(h)}}function c(y){try{a(n.throw(y))}catch(h){s(h)}}function a(y){y.done?o(y.value):i(y.value).then(u,c)}a((n=n.apply(e,t||[])).next())})}var re;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(re||(re={}));function Vo(){return typeof window<"u"}function es(){return typeof navigator<"u"}function rr(){return typeof document<"u"}function Qo(){try{return typeof localStorage<"u"}catch{return!1}}function Em(){try{return typeof sessionStorage<"u"}catch{return!1}}function Cu(){return es()&&navigator.cookieEnabled}var Im=[re.click,re.custom,re.search,re.view],km=(e,t)=>Im.indexOf(e)!==-1?Object.assign({language:rr()?document.documentElement.lang:"unknown",userAgent:es()?navigator.userAgent:"unknown"},t):t,Br=class e{static set(t,r,n){var i,o,s,u;n&&(o=new Date,o.setTime(o.getTime()+n)),u=window.location.hostname,u.indexOf(".")===-1?cu(t,r,o):(s=u.split("."),i=s[s.length-2]+"."+s[s.length-1],cu(t,r,o,i))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){var o=n[i];if(o=o.replace(/^\s+/,""),o.lastIndexOf(r,0)===0)return o.substring(r.length,o.length)}return null}static erase(t){e.set(t,"",-1)}};function cu(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function Pm(){return Qo()?localStorage:Cu()?new $r:Em()?sessionStorage:new ir}var $r=class e{getItem(t){return Br.get(`${e.prefix}${t}`)}removeItem(t){Br.erase(`${e.prefix}${t}`)}setItem(t,r,n){Br.set(`${e.prefix}${t}`,r,n)}};$r.prefix="coveo_";var Bo=class{constructor(){this.cookieStorage=new $r}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)}},ir=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Vn="__coveo.analytics.history",Om=20,Fm=1e3*60,Tm=75,$n=class{constructor(t){this.store=t||Pm()}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 D(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 D(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Vn);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return D(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Vn);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Vn,JSON.stringify(t.slice(0,Om)))}catch{}}clear(){try{this.store.removeItem(Vn)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,i)=>(i.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,Tm)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Fm:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:i,value:o}=r;return{name:n,time:i,value:o}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:i}=t;return r&&typeof i=="string"&&r.toLowerCase()==="query"&&i.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};var Dm=(e,t)=>D(void 0,void 0,void 0,function*(){return e===re.view?(yield qm(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),qm=e=>D(void 0,void 0,void 0,function*(){let t=new $n,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Qn,jm=new Uint8Array(16);function Mm(){if(!Qn&&(Qn=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Qn))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qn(jm)}var Nm=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Hn(e){return typeof e=="string"&&Nm.test(e)}var Ae=[];for(let e=0;e<256;++e)Ae.push((e+256).toString(16).slice(1));function bu(e,t=0){return(Ae[e[t+0]]+Ae[e[t+1]]+Ae[e[t+2]]+Ae[e[t+3]]+"-"+Ae[e[t+4]]+Ae[e[t+5]]+"-"+Ae[e[t+6]]+Ae[e[t+7]]+"-"+Ae[e[t+8]]+Ae[e[t+9]]+"-"+Ae[e[t+10]]+Ae[e[t+11]]+Ae[e[t+12]]+Ae[e[t+13]]+Ae[e[t+14]]+Ae[e[t+15]]).toLowerCase()}function _m(e){if(!Hn(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}function Lm(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Um="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Vm="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Qm(e,t,r){function n(i,o,s,u){var c;if(typeof i=="string"&&(i=Lm(i)),typeof o=="string"&&(o=_m(o)),((c=o)===null||c===void 0?void 0:c.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+i.length);if(a.set(o),a.set(i,o.length),a=r(a),a[6]=a[6]&15|t,a[8]=a[8]&63|128,s){u=u||0;for(let y=0;y<16;++y)s[u+y]=a[y];return s}return bu(a)}try{n.name=e}catch{}return n.DNS=Um,n.URL=Vm,n}var Bm=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),uu={randomUUID:Bm};function Tt(e,t,r){if(uu.randomUUID&&!t&&!e)return uu.randomUUID();e=e||{};let n=e.random||(e.rng||Mm)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let i=0;i<16;++i)t[r+i]=n[i];return t}return bu(n)}function $m(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 Lo(e,t){return e<<t|e>>>32-t}function Hm(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let s=unescape(encodeURIComponent(e));e=[];for(let u=0;u<s.length;++u)e.push(s.charCodeAt(u))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,i=Math.ceil(n/16),o=new Array(i);for(let s=0;s<i;++s){let u=new Uint32Array(16);for(let c=0;c<16;++c)u[c]=e[s*64+c*4]<<24|e[s*64+c*4+1]<<16|e[s*64+c*4+2]<<8|e[s*64+c*4+3];o[s]=u}o[i-1][14]=(e.length-1)*8/Math.pow(2,32),o[i-1][14]=Math.floor(o[i-1][14]),o[i-1][15]=(e.length-1)*8&4294967295;for(let s=0;s<i;++s){let u=new Uint32Array(80);for(let m=0;m<16;++m)u[m]=o[s][m];for(let m=16;m<80;++m)u[m]=Lo(u[m-3]^u[m-8]^u[m-14]^u[m-16],1);let c=r[0],a=r[1],y=r[2],h=r[3],S=r[4];for(let m=0;m<80;++m){let v=Math.floor(m/20),x=Lo(c,5)+$m(v,a,y,h)+S+t[v]+u[m]>>>0;S=h,h=y,y=Lo(a,30)>>>0,a=c,c=x}r[0]=r[0]+c>>>0,r[1]=r[1]+a>>>0,r[2]=r[2]+y>>>0,r[3]=r[3]+h>>>0,r[4]=r[4]+S>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var zm=Qm("v5",80,Hm),lu=zm,wu="2.30.45",du=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Qr={pageview:"pageview",event:"event"},zn=class{constructor({client:t,uuidGenerator:r=Tt}){this.client=t,this.uuidGenerator=r}},$o=class extends zn{constructor({client:t,uuidGenerator:r=Tt}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=du(window.location),this.lastReferrer=rr()?document.referrer:"",this.addHooks()}getApi(t){switch(t){case"setAction":return this.setAction;default:return 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:rr()?document.title:"",encoding:rr()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},i={language:navigator.language,userAgent:navigator.userAgent},o={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},o),n),i),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:i,location:o}=this.getNextValues(t,r);this.lastReferrer=i,this.pageViewId=n,this.currentLocation=o,t===Qr.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Qr.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Qr.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Qr.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=i=>i.replace(/^\/?(.*)$/,"/$1");return`${(i=>i.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return du(window.location)}},lt=class e{constructor(t,r){if(!Hn(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(i=>new RegExp(i.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,i]=r;if(n.length!==32||isNaN(parseInt(i)))return null;let o=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return Hn(o)?new e(o,Number.parseInt(i)*1e3):null}};lt.cvo_cid="cvo_cid";lt.expirationTime=120;var Ho=class extends zn{constructor({client:t,uuidGenerator:r=Tt}){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 D(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(lt.cvo_cid,new lt(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Ho.Id="link";var je=Object.keys;function Bn(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Uo=128,Ru=192,pu=224,fu=240;function Gm(e){return(e&248)===fu?4:(e&fu)===pu?3:(e&pu)===Ru?2:1}function Wm(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&Uo)!=Uo)break;if(r-=3,(n&Ru)!=Uo){t-r>=Gm(n)*3&&(r=t);break}}return e.substring(0,r)}var zo={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"},Ym=je(zo).map(e=>zo[e]),Km=[...Ym].join("|"),Jm=new RegExp(`^(${Km}$)`),Xm={svcAction:"svc_action",svcActionData:"svc_action_data"},Zm=e=>je(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=zo[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),ey=e=>Jm.test(e),ty=[ey],gu={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},mu={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ce={action:"pa",list:"pal",listSource:"pls"},Gn={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},ry=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Go={id:"quoteId",affiliation:"quoteAffiliation"},Wo={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},ny={add:Ce,bookmark_add:Ce,bookmark_remove:Ce,click:Ce,checkout:Ce,checkout_option:Ce,detail:Ce,impression:Ce,remove:Ce,refund:Object.assign(Object.assign({},Ce),Gn),purchase:Object.assign(Object.assign({},Ce),Gn),quickview:Ce,quote:Object.assign(Object.assign({},Ce),Go),review:Object.assign(Object.assign({},Ce),Wo)},iy=je(gu).map(e=>gu[e]),oy=je(mu).map(e=>mu[e]),sy=je(Ce).map(e=>Ce[e]),ay=je(Gn).map(e=>Gn[e]),cy=je(Wo).map(e=>Wo[e]),uy=je(Go).map(e=>Go[e]),ly=[...iy,"custom"].join("|"),dy=[...oy,"custom"].join("|"),xu="(pr[0-9]+)",Eu="(il[0-9]+pi[0-9]+)",py=new RegExp(`^${xu}(${ly})$`),fy=new RegExp(`^(${Eu}(${dy}))|(il[0-9]+nm)$`),gy=new RegExp(`^(${sy.join("|")})$`),my=new RegExp(`^(${ay.join("|")})$`),yy=new RegExp(`^${xu}custom$`),hy=new RegExp(`^${Eu}custom$`),Sy=new RegExp(`^(${[...ry,...cy,...uy].join("|")})$`),vy=e=>py.test(e),Ay=e=>fy.test(e),Cy=e=>gy.test(e),by=e=>my.test(e),wy=e=>Sy.test(e),Ry=[Ay,vy,Cy,by,wy],xy=[yy,hy],Ey={anonymizeIp:"aip"},Iy={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},ky={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},Py=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],Oy=Object.assign(Object.assign(Object.assign(Object.assign({},Ey),Iy),ky),Py.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Yo=Object.assign(Object.assign({},Oy),Xm),Fy=e=>{let t=!!e.action&&ny[e.action]||{};return je(e).reduce((r,n)=>{let i=t[n]||Yo[n]||n;return Object.assign(Object.assign({},r),{[i]:e[n]})},{})},Ty=je(Yo).map(e=>Yo[e]),Dy=e=>Ty.indexOf(e)!==-1,qy=e=>e==="custom",jy=e=>[...Ry,...ty,Dy,qy].some(t=>t(e)),My=e=>je(e).reduce((t,r)=>{let n=Ny(r);return n?Object.assign(Object.assign({},t),_y(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Ny=e=>{let t;return[...xy].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},_y=(e,t)=>je(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),Ko=class{constructor(t){this.opts=t}sendEvent(t,r){return D(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:i}=this.opts,o=yield this.getQueryParamsForEventType(t),{url:s,payload:u}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${o}`,r,i),c=this.encodeForEventType(t,u),a=new Blob([c],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(s,a)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return D(this,void 0,void 0,function*(){let i=t,o=r;if(n){let s=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:u,body:c}=s;i=u||t;try{o=JSON.parse(c)}catch(a){console.error("Unable to process the request body as a JSON string",a)}}return{payload:o,url:i}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return D(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,i=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",i?`visitorId=${i}`:"","discardVisitInfo=true"].filter(o=>!!o).join("&")})}isEventTypeLegacy(t){return[re.click,re.custom,re.search,re.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let i=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(i=`access_token=${encodeURIComponent(n)}&${i}`),i}},Jo=class{sendEvent(t,r){return D(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return D(this,void 0,void 0,function*(){return Promise.resolve()})}},yu=A.fetch,Wn=class{constructor(t){this.opts=t}sendEvent(t,r){return D(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:i,preprocessRequest:o}=this.opts,s=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",u={url:`${n}/analytics/${t}${s}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},c=Object.assign(Object.assign({},u),o?yield o(u,"analyticsFetch"):{}),{url:a}=c,y=tt(c,["url"]),h;try{h=yield yu(a,y)}catch(S){console.error("An error has occured when sending the event.",S);return}if(h.ok){let S=yield h.json();return S.visitorId&&i.setCurrentVisitorId(S.visitorId),S}else{try{h.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,h,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return D(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield yu(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[re.click,re.custom,re.search,re.view].indexOf(t)!==-1}getVisitorIdParam(){return D(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"})}},Xo=class{constructor(t,r){Qo()&&Cu()?this.storage=new Bo:Qo()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new ir),this.client=new Wn(t),this.beaconClient=new Ko(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:i,payload:o}of n)this.beaconClient.sendEvent(i,o)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},Zo=class{constructor(t,r){this.storage=r||new ir,this.client=new Wn(t)}getClientDependingOnEventType(t){return this.client}},Yn=class{constructor(){this.storage=new ir,this.client=new Jo}getClientDependingOnEventType(t){return this.client}},Ly="xx",Uy=e=>e?.startsWith(Ly)||!1,Vy=`
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