@coveo/quantic 3.30.3 → 3.30.4-pre.003bd2b1f2

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.
Files changed (27) hide show
  1. package/force-app/main/default/staticresources/coveoheadless/case-assist/headless.js +10 -8
  2. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/commerce/types/engine.d.ts +2 -0
  3. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/engine.d.ts +2 -0
  4. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr/common/types/utilities.d.ts +3 -0
  5. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-commerce-next.index.d.ts +1 -1
  6. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/engine/commerce-engine.ssr.d.ts +1 -1
  7. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/factories/build-factory.d.ts +1 -1
  8. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/factories/hydrated-state-factory.d.ts +1 -1
  9. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/factories/recommendation-static-state-factory.d.ts +4 -7
  10. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/factories/static-state-factory.d.ts +1 -2
  11. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/types/build.d.ts +2 -2
  12. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/types/controller-definitions.d.ts +2 -2
  13. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/types/engine.d.ts +2 -2
  14. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/types/fetch-static-state.d.ts +2 -2
  15. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/commerce/types/hydrate-static-state.d.ts +2 -2
  16. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/common/augment-preprocess-request.d.ts +2 -2
  17. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/common/types/utilities.d.ts +0 -5
  18. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/types/build.d.ts +3 -4
  19. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/types/fetch-static-state.d.ts +1 -2
  20. package/force-app/main/default/staticresources/coveoheadless/definitions/ssr-next/search/types/hydrate-static-state.d.ts +1 -2
  21. package/force-app/main/default/staticresources/coveoheadless/definitions/test/mock-navigator-context.d.ts +2 -0
  22. package/force-app/main/default/staticresources/coveoheadless/headless.js +12 -10
  23. package/force-app/main/default/staticresources/coveoheadless/insight/headless.js +11 -9
  24. package/force-app/main/default/staticresources/coveoheadless/recommendation/headless.js +9 -7
  25. package/package.json +2 -10
  26. package/scripts/npm/check-sfdx-project.js +1 -1
  27. package/scripts/npm/setup-quantic.js +2 -2
@@ -14,21 +14,21 @@ function asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value}catch(n){
14
14
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
15
  * See the License for the specific language governing permissions and
16
16
  * limitations under the License.
17
- */(function(g,f){if(typeof exports=="object"&&typeof module<"u"){module.exports=f(require)}else if("function"==typeof define&&define.amd){define("CoveoHeadlessRecommendation",["crypto"],function(_d_0){var d={"crypto":_d_0},r=function(m){if(m in d)return d[m];if(typeof require=="function")return require(m);throw new Error("Cannot find module '"+m+"'")};return f(r)})}else{var gN={"crypto":"crypto"},gReq=function(r){var mod=r in gN?g[gN[r]]:g[r];return mod};g["CoveoHeadlessRecommendation"]=f(gReq)}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:this,function(require){var exports={};var __exports=exports;var module={exports};"use strict";var Rf=Object.create;var Br=Object.defineProperty;var Ef=Object.getOwnPropertyDescriptor;var If=Object.getOwnPropertyNames;var Pf=Object.getPrototypeOf,kf=Object.prototype.hasOwnProperty;var Ff=(e,t,r)=>t in e?Br(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var $r=(e,t)=>()=>(e&&(t=e(e=0)),t);var Se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ks=(e,t)=>{for(var r in t)Br(e,r,{get:t[r],enumerable:!0})},Ys=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of If(t))!kf.call(e,o)&&o!==r&&Br(e,o,{get:()=>t[o],enumerable:!(n=Ef(t,o))||n.enumerable});return e};var Be=(e,t,r)=>(r=e!=null?Rf(Pf(e)):{},Ys(t||!e||!e.__esModule?Br(r,"default",{value:e,enumerable:!0}):r,e)),Of=e=>Ys(Br({},"__esModule",{value:!0}),e);var pe=(e,t,r)=>Ff(e,typeof t!="symbol"?t+"":t,r);var b,c=$r(()=>{"use strict";b=typeof globalThis<"u"?globalThis:window});function Dn(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Dn=function(t){return typeof t}:Dn=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dn(e)}function qf(){"navigator"in this||(this.navigator={}),typeof this.navigator.sendBeacon!="function"&&(this.navigator.sendBeacon=jf.bind(this))}function jf(e,t){var r=this.event&&this.event.type,n=r==="unload"||r==="beforeunload",o="XMLHttpRequest"in this?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");o.open("POST",e,!n),o.withCredentials=!0,o.setRequestHeader("Accept","*/*"),Tf(t)?(o.setRequestHeader("Content-Type","text/plain;charset=UTF-8"),o.responseType="text"):Df(t)&&t.type&&o.setRequestHeader("Content-Type",t.type);try{o.send(t)}catch{return!1}return!0}var Tf,Df,u=$r(()=>{"use strict";Tf=function(t){return typeof t=="string"},Df=function(t){return t instanceof Blob};qf.call((typeof window>"u"?"undefined":Dn(window))==="object"?window:{})});var ji=Se(Hr=>{"use strict";d();c();l();u();Object.defineProperty(Hr,"__esModule",{value:!0});function Js(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Mf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Nf(e,t,r){return t=Jt(t),Vf(e,tc()?Reflect.construct(t,r||[],Jt(e).constructor):t.apply(e,r))}function Ti(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xs(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Bf(n.key),n)}}function Di(e,t,r){return t&&Xs(e.prototype,t),r&&Xs(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zs(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=$f(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
18
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,a=!0,m=!1;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return a=f.done,f},e:function(f){m=!0,i=f},f:function(){try{a||r.return==null||r.return()}finally{if(m)throw i}}}}function Fi(){return Fi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=Lf(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Fi.apply(null,arguments)}function Jt(e){return Jt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Jt(e)}function _f(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Oi(e,t)}function tc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tc=function(){return!!e})()}function Vf(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Mf(e)}function Oi(e,t){return Oi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Oi(e,t)}function Lf(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=Jt(e))!==null;);return e}function Uf(e,t,r,n){var o=Fi(Jt(1&n?e.prototype:e),t,r);return 2&n&&typeof o=="function"?function(i){return o.apply(r,i)}:o}function Qf(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Bf(e){var t=Qf(e,"string");return typeof t=="symbol"?t:t+""}function $f(e,t){if(e){if(typeof e=="string")return Js(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Js(e,t):void 0}}(function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}})(typeof self<"u"?self:global);function Hf(e){var t;try{t=new Event("abort")}catch{typeof document<"u"?document.createEvent?(t=document.createEvent("Event"),t.initEvent("abort",!1,!1)):(t=document.createEventObject(),t.type="abort"):t={type:"abort",bubbles:!1,cancelable:!1}}return t.reason=e,t}function zf(e){if(e===void 0)if(typeof document>"u")e=new Error("This operation was aborted"),e.name="AbortError";else try{e=new DOMException("signal is aborted without reason"),Object.defineProperty(e,"name",{value:"AbortError"})}catch{e=new Error("This operation was aborted"),e.name="AbortError"}return e}var ec=function(){function e(){Ti(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return Di(e,[{key:"addEventListener",value:function(r,n,o){r in this.listeners||(this.listeners[r]=[]),this.listeners[r].push({callback:n,options:o})}},{key:"removeEventListener",value:function(r,n){if(r in this.listeners){for(var o=this.listeners[r],i=0,a=o.length;i<a;i++)if(o[i].callback===n){o.splice(i,1);return}}}},{key:"dispatchEvent",value:function(r){var n=this;if(r.type in this.listeners){for(var o=this.listeners[r.type],i=o.slice(),a=function(){var y=i[m];try{y.callback.call(n,r)}catch(h){Promise.resolve().then(function(){throw h})}y.options&&y.options.once&&n.removeEventListener(r.type,y.callback)},m=0,f=i.length;m<f;m++)a();return!r.defaultPrevented}}}])}(),qi=function(e){function t(){var r;return Ti(this,t),r=Nf(this,t),r.listeners||ec.call(r),Object.defineProperty(r,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(r,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(r,"reason",{value:void 0,writable:!0,configurable:!0}),r}return _f(t,e),Di(t,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(n){n.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,n)),Uf(t,"dispatchEvent",this,3)([n])}},{key:"throwIfAborted",value:function(){var n=this.aborted,o=this.reason,i=o===void 0?"Aborted":o;if(n)throw i}}],[{key:"timeout",value:function(n){var o=new qn;return setTimeout(function(){return o.abort(new DOMException("This signal is timeout in ".concat(n,"ms"),"TimeoutError"))},n),o.signal}},{key:"any",value:function(n){var o=new qn;function i(){o.abort(this.reason),a()}function a(){var y=Zs(n),h;try{for(y.s();!(h=y.n()).done;){var S=h.value;S.removeEventListener("abort",i)}}catch(g){y.e(g)}finally{y.f()}}var m=Zs(n),f;try{for(m.s();!(f=m.n()).done;){var p=f.value;if(p.aborted){o.abort(p.reason);break}else p.addEventListener("abort",i)}}catch(y){m.e(y)}finally{m.f()}return o.signal}}])}(ec),qn=function(){function e(){Ti(this,e),Object.defineProperty(this,"signal",{value:new qi,writable:!0,configurable:!0})}return Di(e,[{key:"abort",value:function(r){var n=zf(r),o=Hf(n);this.signal.reason=n,this.signal.dispatchEvent(o)}},{key:"toString",value:function(){return"[object AbortController]"}}])}();typeof Symbol<"u"&&Symbol.toStringTag&&(qn.prototype[Symbol.toStringTag]="AbortController",qi.prototype[Symbol.toStringTag]="AbortSignal");function Gf(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof e.Request=="function"&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}function Wf(e){typeof e=="function"&&(e={fetch:e});var t=e,r=t.fetch,n=t.Request,o=n===void 0?r.Request:n,i=t.AbortController,a=t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,m=a===void 0?!1:a;if(!Gf({fetch:r,Request:o,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:m}))return{fetch:r,Request:f};var f=o;(f&&!f.prototype.hasOwnProperty("signal")||m)&&(f=function(S,g){var v;g&&g.signal&&(v=g.signal,delete g.signal);var R=new o(S,g);return v&&Object.defineProperty(R,"signal",{writable:!1,enumerable:!1,configurable:!0,value:v}),R},f.prototype=o.prototype);var p=r,y=function(S,g){var v=f&&f.prototype.isPrototypeOf(S)?S.signal:g?g.signal:void 0;if(v){var R;try{R=new DOMException("Aborted","AbortError")}catch{R=new Error("Aborted"),R.name="AbortError"}if(v.aborted)return Promise.reject(R);var P=new Promise(function(w,F){v.addEventListener("abort",function(){return F(R)},{once:!0})});return g&&g.signal&&delete g.signal,Promise.race([P,p(S,g)])}return p(S,g)};return{fetch:y,Request:f}}Hr.AbortController=qn;Hr.AbortSignal=qi;Hr.abortableFetch=Wf});var rc,s,A,l=$r(()=>{"use strict";rc=Be(ji(),1),s=Be(ji(),1),{fetch:A}=(0,rc.abortableFetch)({fetch})});function zr(e){if(om.test(e)||e.trim()==="")throw new TypeError("Invalid character in header field name");return e.trim().toLowerCase()}function Mi(e){return e.replace(im,"")}function Gr(e){if(typeof e!="string"||e.length===0)return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>127||!am(r))return!1}return!0}function am(e){return![127,32,"(",")","<",">","@",",",";",":","\\","\"","/","[","]","?","=","{","}"].includes(e)}function oc(e){if(typeof e!="string"||e.trim()!==e)return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r===0||r===10||r===13)return!1}return!0}var Kf,uc,Yf,lc,Jf,Xf,Zf,em,tm,rm,nm,om,nc,im,Xt,Ni,ic,ac,sc,cc,C,pc=$r(()=>{"use strict";d();c();l();u();Kf=Object.create,uc=Object.defineProperty,Yf=Object.getOwnPropertyDescriptor,lc=Object.getOwnPropertyNames,Jf=Object.getPrototypeOf,Xf=Object.prototype.hasOwnProperty,Zf=(e,t)=>function(){return t||(0,e[lc(e)[0]])((t={exports:{}}).exports,t),t.exports},em=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of lc(t))!Xf.call(e,o)&&o!==r&&uc(e,o,{get:()=>t[o],enumerable:!(n=Yf(t,o))||n.enumerable});return e},tm=(e,t,r)=>(r=e!=null?Kf(Jf(e)):{},em(t||!e||!e.__esModule?uc(r,"default",{value:e,enumerable:!0}):r,e)),rm=Zf({"node_modules/set-cookie-parser/lib/set-cookie.js"(e,t){"use strict";var r={decodeValues:!0,map:!1,silent:!1};function n(f){return typeof f=="string"&&!!f.trim()}function o(f,p){var y=f.split(";").filter(n),h=y.shift(),S=i(h),g=S.name,v=S.value;p=p?Object.assign({},r,p):r;try{v=p.decodeValues?decodeURIComponent(v):v}catch(P){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+v+"'. Set options.decodeValues to false to disable this feature.",P)}var R={name:g,value:v};return y.forEach(function(P){var w=P.split("="),F=w.shift().trimLeft().toLowerCase(),x=w.join("=");F==="expires"?R.expires=new Date(x):F==="max-age"?R.maxAge=parseInt(x,10):F==="secure"?R.secure=!0:F==="httponly"?R.httpOnly=!0:F==="samesite"?R.sameSite=x:R[F]=x}),R}function i(f){var p="",y="",h=f.split("=");return h.length>1?(p=h.shift(),y=h.join("=")):y=f,{name:p,value:y}}function a(f,p){if(p=p?Object.assign({},r,p):r,!f)return p.map?{}:[];if(f.headers)if(typeof f.headers.getSetCookie=="function")f=f.headers.getSetCookie();else if(f.headers["set-cookie"])f=f.headers["set-cookie"];else{var y=f.headers[Object.keys(f.headers).find(function(S){return S.toLowerCase()==="set-cookie"})];!y&&f.headers.cookie&&!p.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),f=y}if(Array.isArray(f)||(f=[f]),p=p?Object.assign({},r,p):r,p.map){var h={};return f.filter(n).reduce(function(S,g){var v=o(g,p);return S[v.name]=v,S},h)}else return f.filter(n).map(function(S){return o(S,p)})}function m(f){if(Array.isArray(f))return f;if(typeof f!="string")return[];var p=[],y=0,h,S,g,v,R;function P(){for(;y<f.length&&/\s/.test(f.charAt(y));)y+=1;return y<f.length}function w(){return S=f.charAt(y),S!=="="&&S!==";"&&S!==","}for(;y<f.length;){for(h=y,R=!1;P();)if(S=f.charAt(y),S===","){for(g=y,y+=1,P(),v=y;y<f.length&&w();)y+=1;y<f.length&&f.charAt(y)==="="?(R=!0,y=v,p.push(f.substring(h,g)),h=y):y=g+1}else y+=1;(!R||y>=f.length)&&p.push(f.substring(h,f.length))}return p}t.exports=a,t.exports.parse=a,t.exports.parseString=o,t.exports.splitCookiesString=m}}),nm=tm(rm()),om=/[^a-z0-9\-#$%&'*+.^_`|~]/i;nc=[`
19
- `,"\r","\t"," "],im=new RegExp(`(^[${nc.join("")}]|$[${nc.join("")}])`,"g");Xt=Symbol("normalizedHeaders"),Ni=Symbol("rawHeaderNames"),ic=", ",C=class dc{constructor(t){this[ac]={},this[sc]=new Map,this[cc]="Headers",["Headers","HeadersPolyfill"].includes(t?.constructor.name)||t instanceof dc||typeof b.Headers<"u"&&t instanceof b.Headers?t.forEach((n,o)=>{this.append(o,n)},this):Array.isArray(t)?t.forEach(([r,n])=>{this.append(r,Array.isArray(n)?n.join(ic):n)}):t&&Object.getOwnPropertyNames(t).forEach(r=>{let n=t[r];this.append(r,Array.isArray(n)?n.join(ic):n)})}[(ac=Xt,sc=Ni,cc=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}*keys(){for(let[t]of this.entries())yield t}*values(){for(let[,t]of this.entries())yield t}*entries(){let t=Object.keys(this[Xt]).sort((r,n)=>r.localeCompare(n));for(let r of t)if(r==="set-cookie")for(let n of this.getSetCookie())yield[r,n];else yield[r,this.get(r)]}has(t){if(!Gr(t))throw new TypeError(`Invalid header name "${t}"`);return this[Xt].hasOwnProperty(zr(t))}get(t){if(!Gr(t))throw TypeError(`Invalid header name "${t}"`);return this[Xt][zr(t)]??null}set(t,r){if(!Gr(t)||!oc(r))return;let n=zr(t),o=Mi(r);this[Xt][n]=Mi(o),this[Ni].set(n,t)}append(t,r){if(!Gr(t)||!oc(r))return;let n=zr(t),o=Mi(r),i=this.has(n)?`${this.get(n)}, ${o}`:o;this.set(t,i)}delete(t){if(!Gr(t)||!this.has(t))return;let r=zr(t);delete this[Xt][r],this[Ni].delete(r)}forEach(t,r){for(let[n,o]of this.entries())t.call(r,o,n,this)}getSetCookie(){let t=this.get("set-cookie");return t===null?[]:t===""?[""]:(0,nm.splitCookiesString)(t)}}});var d=$r(()=>{"use strict";pc()});var bc=Se(Yr=>{"use strict";d();c();l();u();var _n=Yr&&Yr.__assign||function(){return _n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},_n.apply(this,arguments)};Object.defineProperty(Yr,"__esModule",{value:!0});var gm={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function ym(e){var t=_n(_n({},gm),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Yr.getSanitizedOptions=ym});var Ac=Se(Ui=>{"use strict";d();c();l();u();Object.defineProperty(Ui,"__esModule",{value:!0});function hm(e){var t=Math.random()*e;return Math.round(t)}Ui.fullJitter=hm});var Cc=Se(Qi=>{"use strict";d();c();l();u();Object.defineProperty(Qi,"__esModule",{value:!0});function Sm(e){return e}Qi.noJitter=Sm});var wc=Se(Bi=>{"use strict";d();c();l();u();Object.defineProperty(Bi,"__esModule",{value:!0});var vm=Ac(),bm=Cc();function Am(e){switch(e.jitter){case"full":return vm.fullJitter;case"none":default:return bm.noJitter}}Bi.JitterFactory=Am});var Hi=Se($i=>{"use strict";d();c();l();u();Object.defineProperty($i,"__esModule",{value:!0});var Cm=wc(),wm=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(r){return setTimeout(r,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=Cm.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,r=this.options.timeMultiple,n=this.numOfDelayedAttempts,o=t*Math.pow(r,n);return Math.min(o,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();$i.Delay=wm});var xc=Se(tt=>{"use strict";d();c();l();u();var xm=tt&&tt.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Rm=tt&&tt.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function m(y){try{p(n.next(y))}catch(h){a(h)}}function f(y){try{p(n.throw(y))}catch(h){a(h)}}function p(y){y.done?i(y.value):o(y.value).then(m,f)}p((n=n.apply(e,t||[])).next())})},Em=tt&&tt.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function m(p){return function(y){return f([p,y])}}function f(p){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=p[0]&2?o.return:p[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,p[1])).done)return i;switch(o=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,o=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){r.label=p[1];break}if(p[0]===6&&r.label<i[1]){r.label=i[1],i=p;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(p);break}i[2]&&r.ops.pop(),r.trys.pop();continue}p=t.call(e,r)}catch(y){p=[6,y],o=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}};Object.defineProperty(tt,"__esModule",{value:!0});var Im=Hi(),Pm=function(e){xm(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return Rm(this,void 0,void 0,function(){return Em(this,function(r){return[2,this.isFirstAttempt?!0:e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(Im.Delay);tt.SkipFirstDelay=Pm});var Rc=Se(Jr=>{"use strict";d();c();l();u();var km=Jr&&Jr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Jr,"__esModule",{value:!0});var Fm=Hi(),Om=function(e){km(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Fm.Delay);Jr.AlwaysDelay=Om});var Ec=Se(zi=>{"use strict";d();c();l();u();Object.defineProperty(zi,"__esModule",{value:!0});var Tm=xc(),Dm=Rc();function qm(e,t){var r=jm(e);return r.setAttemptNumber(t),r}zi.DelayFactory=qm;function jm(e){return e.delayFirstAttempt?new Dm.AlwaysDelay(e):new Tm.SkipFirstDelay(e)}});var Ic=Se(qt=>{"use strict";d();c();l();u();var Gi=qt&&qt.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function m(y){try{p(n.next(y))}catch(h){a(h)}}function f(y){try{p(n.throw(y))}catch(h){a(h)}}function p(y){y.done?i(y.value):o(y.value).then(m,f)}p((n=n.apply(e,t||[])).next())})},Wi=qt&&qt.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function m(p){return function(y){return f([p,y])}}function f(p){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=p[0]&2?o.return:p[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,p[1])).done)return i;switch(o=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,o=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){r.label=p[1];break}if(p[0]===6&&r.label<i[1]){r.label=i[1],i=p;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(p);break}i[2]&&r.ops.pop(),r.trys.pop();continue}p=t.call(e,r)}catch(y){p=[6,y],o=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}};Object.defineProperty(qt,"__esModule",{value:!0});var Mm=bc(),Nm=Ec();function _m(e,t){return t===void 0&&(t={}),Gi(this,void 0,void 0,function(){var r,n;return Wi(this,function(o){switch(o.label){case 0:return r=Mm.getSanitizedOptions(t),n=new Vm(e,r),[4,n.execute()];case 1:return[2,o.sent()]}})})}qt.backOff=_m;var Vm=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return Gi(this,void 0,void 0,function(){var t,r;return Wi(this,function(n){switch(n.label){case 0:if(this.attemptLimitReached)return[3,7];n.label=1;case 1:return n.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return n.sent(),[4,this.request()];case 3:return[2,n.sent()];case 4:return t=n.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(r=n.sent(),!r||this.attemptLimitReached)throw t;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(e.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),e.prototype.applyDelay=function(){return Gi(this,void 0,void 0,function(){var t;return Wi(this,function(r){switch(r.label){case 0:return t=Nm.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var zo=Se((os,is)=>{"use strict";d();c();l();u();(function(e,t){typeof os=="object"&&typeof is<"u"?is.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof b<"u"?b:e||self).dayjs=t()})(os,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",a="hour",m="day",f="week",p="month",y="quarter",h="year",S="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,P={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(U){var V=["th","st","nd","rd"],_=U%100;return"["+U+(V[(_-20)%10]||V[_]||V[0])+"]"}},w=function(U,V,_){var B=String(U);return!B||B.length>=V?U:""+Array(V+1-B.length).join(_)+U},F={s:w,z:function(U){var V=-U.utcOffset(),_=Math.abs(V),B=Math.floor(_/60),L=_%60;return(V<=0?"+":"-")+w(B,2,"0")+":"+w(L,2,"0")},m:function U(V,_){if(V.date()<_.date())return-U(_,V);var B=12*(_.year()-V.year())+(_.month()-V.month()),L=V.clone().add(B,p),z=_-L<0,G=V.clone().add(B+(z?-1:1),p);return+(-(B+(_-L)/(z?L-G:G-L))||0)},a:function(U){return U<0?Math.ceil(U)||0:Math.floor(U)},p:function(U){return{M:p,y:h,w:f,d:m,D:S,h:a,m:i,s:o,ms:n,Q:y}[U]||String(U||"").toLowerCase().replace(/s$/,"")},u:function(U){return U===void 0}},x="en",E={};E[x]=P;var M="$isDayjsObject",O=function(U){return U instanceof N||!(!U||!U[M])},I=function U(V,_,B){var L;if(!V)return x;if(typeof V=="string"){var z=V.toLowerCase();E[z]&&(L=z),_&&(E[z]=_,L=z);var G=V.split("-");if(!L&&G.length>1)return U(G[0])}else{var Y=V.name;E[Y]=V,L=Y}return!B&&L&&(x=L),L||!B&&x},k=function(U,V){if(O(U))return U.clone();var _=typeof V=="object"?V:{};return _.date=U,_.args=arguments,new N(_)},D=F;D.l=I,D.i=O,D.w=function(U,V){return k(U,{locale:V.$L,utc:V.$u,x:V.$x,$offset:V.$offset})};var N=function(){function U(_){this.$L=I(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[M]=!0}var V=U.prototype;return V.parse=function(_){this.$d=function(B){var L=B.date,z=B.utc;if(L===null)return new Date(NaN);if(D.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var G=L.match(v);if(G){var Y=G[2]-1||0,te=(G[7]||"0").substring(0,3);return z?new Date(Date.UTC(G[1],Y,G[3]||1,G[4]||0,G[5]||0,G[6]||0,te)):new Date(G[1],Y,G[3]||1,G[4]||0,G[5]||0,G[6]||0,te)}}return new Date(L)}(_),this.init()},V.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},V.$utils=function(){return D},V.isValid=function(){return this.$d.toString()!==g},V.isSame=function(_,B){var L=k(_);return this.startOf(B)<=L&&L<=this.endOf(B)},V.isAfter=function(_,B){return k(_)<this.startOf(B)},V.isBefore=function(_,B){return this.endOf(B)<k(_)},V.$g=function(_,B,L){return D.u(_)?this[B]:this.set(L,_)},V.unix=function(){return Math.floor(this.valueOf()/1e3)},V.valueOf=function(){return this.$d.getTime()},V.startOf=function(_,B){var L=this,z=!!D.u(B)||B,G=D.p(_),Y=function(ue,me){var he=D.w(L.$u?Date.UTC(L.$y,me,ue):new Date(L.$y,me,ue),L);return z?he:he.endOf(m)},te=function(ue,me){return D.w(L.toDate()[ue].apply(L.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(me)),L)},ce=this.$W,ee=this.$M,re=this.$D,Z="set"+(this.$u?"UTC":"");switch(G){case h:return z?Y(1,0):Y(31,11);case p:return z?Y(1,ee):Y(0,ee+1);case f:var oe=this.$locale().weekStart||0,ye=(ce<oe?ce+7:ce)-oe;return Y(z?re-ye:re+(6-ye),ee);case m:case S:return te(Z+"Hours",0);case a:return te(Z+"Minutes",1);case i:return te(Z+"Seconds",2);case o:return te(Z+"Milliseconds",3);default:return this.clone()}},V.endOf=function(_){return this.startOf(_,!1)},V.$set=function(_,B){var L,z=D.p(_),G="set"+(this.$u?"UTC":""),Y=(L={},L[m]=G+"Date",L[S]=G+"Date",L[p]=G+"Month",L[h]=G+"FullYear",L[a]=G+"Hours",L[i]=G+"Minutes",L[o]=G+"Seconds",L[n]=G+"Milliseconds",L)[z],te=z===m?this.$D+(B-this.$W):B;if(z===p||z===h){var ce=this.clone().set(S,1);ce.$d[Y](te),ce.init(),this.$d=ce.set(S,Math.min(this.$D,ce.daysInMonth())).$d}else Y&&this.$d[Y](te);return this.init(),this},V.set=function(_,B){return this.clone().$set(_,B)},V.get=function(_){return this[D.p(_)]()},V.add=function(_,B){var L,z=this;_=Number(_);var G=D.p(B),Y=function(ee){var re=k(z);return D.w(re.date(re.date()+Math.round(ee*_)),z)};if(G===p)return this.set(p,this.$M+_);if(G===h)return this.set(h,this.$y+_);if(G===m)return Y(1);if(G===f)return Y(7);var te=(L={},L[i]=t,L[a]=r,L[o]=e,L)[G]||1,ce=this.$d.getTime()+_*te;return D.w(ce,this)},V.subtract=function(_,B){return this.add(-1*_,B)},V.format=function(_){var B=this,L=this.$locale();if(!this.isValid())return L.invalidDate||g;var z=_||"YYYY-MM-DDTHH:mm:ssZ",G=D.z(this),Y=this.$H,te=this.$m,ce=this.$M,ee=L.weekdays,re=L.months,Z=L.meridiem,oe=function(me,he,ke,_e){return me&&(me[he]||me(B,z))||ke[he].slice(0,_e)},ye=function(me){return D.s(Y%12||12,me,"0")},ue=Z||function(me,he,ke){var _e=me<12?"AM":"PM";return ke?_e.toLowerCase():_e};return z.replace(R,function(me,he){return he||function(ke){switch(ke){case"YY":return String(B.$y).slice(-2);case"YYYY":return D.s(B.$y,4,"0");case"M":return ce+1;case"MM":return D.s(ce+1,2,"0");case"MMM":return oe(L.monthsShort,ce,re,3);case"MMMM":return oe(re,ce);case"D":return B.$D;case"DD":return D.s(B.$D,2,"0");case"d":return String(B.$W);case"dd":return oe(L.weekdaysMin,B.$W,ee,2);case"ddd":return oe(L.weekdaysShort,B.$W,ee,3);case"dddd":return ee[B.$W];case"H":return String(Y);case"HH":return D.s(Y,2,"0");case"h":return ye(1);case"hh":return ye(2);case"a":return ue(Y,te,!0);case"A":return ue(Y,te,!1);case"m":return String(te);case"mm":return D.s(te,2,"0");case"s":return String(B.$s);case"ss":return D.s(B.$s,2,"0");case"SSS":return D.s(B.$ms,3,"0");case"Z":return G}return null}(me)||G.replace(":","")})},V.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},V.diff=function(_,B,L){var z,G=this,Y=D.p(B),te=k(_),ce=(te.utcOffset()-this.utcOffset())*t,ee=this-te,re=function(){return D.m(G,te)};switch(Y){case h:z=re()/12;break;case p:z=re();break;case y:z=re()/3;break;case f:z=(ee-ce)/6048e5;break;case m:z=(ee-ce)/864e5;break;case a:z=ee/r;break;case i:z=ee/t;break;case o:z=ee/e;break;default:z=ee}return L?z:D.a(z)},V.daysInMonth=function(){return this.endOf(p).$D},V.$locale=function(){return E[this.$L]},V.locale=function(_,B){if(!_)return this.$L;var L=this.clone(),z=I(_,B,!0);return z&&(L.$L=z),L},V.clone=function(){return D.w(this.$d,this)},V.toDate=function(){return new Date(this.valueOf())},V.toJSON=function(){return this.isValid()?this.toISOString():null},V.toISOString=function(){return this.$d.toISOString()},V.toString=function(){return this.$d.toUTCString()},U}(),$=N.prototype;return k.prototype=$,[["$ms",n],["$s",o],["$m",i],["$H",a],["$W",m],["$M",p],["$y",h],["$D",S]].forEach(function(U){$[U[1]]=function(V){return this.$g(V,U[0],U[1])}}),k.extend=function(U,V){return U.$i||(U(V,N,k),U.$i=!0),k},k.locale=I,k.isDayjs=O,k.unix=function(U){return k(1e3*U)},k.en=E[x],k.Ls=E,k.p={},k})});var td=Se((as,ss)=>{"use strict";d();c();l();u();(function(e,t){typeof as=="object"&&typeof ss<"u"?ss.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof b<"u"?b:e||self).dayjs_plugin_quarterOfYear=t()})(as,function(){"use strict";var e="month",t="quarter";return function(r,n){var o=n.prototype;o.quarter=function(m){return this.$utils().u(m)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(m-1))};var i=o.add;o.add=function(m,f){return m=Number(m),this.$utils().p(f)===t?this.add(3*m,e):i.bind(this)(m,f)};var a=o.startOf;o.startOf=function(m,f){var p=this.$utils(),y=!!p.u(f)||f;if(p.p(m)===t){var h=this.quarter()-1;return y?this.month(3*h).startOf(e).startOf("day"):this.month(3*h+2).endOf(e).endOf("day")}return a.bind(this)(m,f)}}})});var rd=Se((cs,us)=>{"use strict";d();c();l();u();(function(e,t){typeof cs=="object"&&typeof us<"u"?us.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof b<"u"?b:e||self).dayjs_plugin_customParseFormat=t()})(cs,function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,n=/\d\d/,o=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,a={},m=function(v){return(v=+v)+(v>68?1900:2e3)},f=function(v){return function(R){this[v]=+R}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(R){if(!R||R==="Z")return 0;var P=R.match(/([+-]|\d\d)/g),w=60*P[1]+(+P[2]||0);return w===0?0:P[0]==="+"?-w:w}(v)}],y=function(v){var R=a[v];return R&&(R.indexOf?R:R.s.concat(R.f))},h=function(v,R){var P,w=a.meridiem;if(w){for(var F=1;F<=24;F+=1)if(v.indexOf(w(F,0,R))>-1){P=F>12;break}}else P=v===(R?"pm":"PM");return P},S={A:[i,function(v){this.afternoon=h(v,!1)}],a:[i,function(v){this.afternoon=h(v,!0)}],Q:[r,function(v){this.month=3*(v-1)+1}],S:[r,function(v){this.milliseconds=100*+v}],SS:[n,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[o,f("seconds")],ss:[o,f("seconds")],m:[o,f("minutes")],mm:[o,f("minutes")],H:[o,f("hours")],h:[o,f("hours")],HH:[o,f("hours")],hh:[o,f("hours")],D:[o,f("day")],DD:[n,f("day")],Do:[i,function(v){var R=a.ordinal,P=v.match(/\d+/);if(this.day=P[0],R)for(var w=1;w<=31;w+=1)R(w).replace(/\[|\]/g,"")===v&&(this.day=w)}],w:[o,f("week")],ww:[n,f("week")],M:[o,f("month")],MM:[n,f("month")],MMM:[i,function(v){var R=y("months"),P=(y("monthsShort")||R.map(function(w){return w.slice(0,3)})).indexOf(v)+1;if(P<1)throw new Error;this.month=P%12||P}],MMMM:[i,function(v){var R=y("months").indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],Y:[/[+-]?\d+/,f("year")],YY:[n,function(v){this.year=m(v)}],YYYY:[/\d{4}/,f("year")],Z:p,ZZ:p};function g(v){var R,P;R=v,P=a&&a.formats;for(var w=(v=R.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(k,D,N){var $=N&&N.toUpperCase();return D||P[N]||e[N]||P[$].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(U,V,_){return V||_.slice(1)})})).match(t),F=w.length,x=0;x<F;x+=1){var E=w[x],M=S[E],O=M&&M[0],I=M&&M[1];w[x]=I?{regex:O,parser:I}:E.replace(/^\[|\]$/g,"")}return function(k){for(var D={},N=0,$=0;N<F;N+=1){var U=w[N];if(typeof U=="string")$+=U.length;else{var V=U.regex,_=U.parser,B=k.slice($),L=V.exec(B)[0];_.call(D,L),k=k.replace(L,"")}}return function(z){var G=z.afternoon;if(G!==void 0){var Y=z.hours;G?Y<12&&(z.hours+=12):Y===12&&(z.hours=0),delete z.afternoon}}(D),D}}return function(v,R,P){P.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(m=v.parseTwoDigitYear);var w=R.prototype,F=w.parse;w.parse=function(x){var E=x.date,M=x.utc,O=x.args;this.$u=M;var I=O[1];if(typeof I=="string"){var k=O[2]===!0,D=O[3]===!0,N=k||D,$=O[2];D&&($=O[2]),a=this.$locale(),!k&&$&&(a=P.Ls[$]),this.$d=function(B,L,z,G){try{if(["x","X"].indexOf(L)>-1)return new Date((L==="X"?1e3:1)*B);var Y=g(L)(B),te=Y.year,ce=Y.month,ee=Y.day,re=Y.hours,Z=Y.minutes,oe=Y.seconds,ye=Y.milliseconds,ue=Y.zone,me=Y.week,he=new Date,ke=ee||(te||ce?1:he.getDate()),_e=te||he.getFullYear(),dt=0;te&&!ce||(dt=ce>0?ce-1:he.getMonth());var Kt,Yt=re||0,Qr=Z||0,Pi=oe||0,ki=ye||0;return ue?new Date(Date.UTC(_e,dt,ke,Yt,Qr,Pi,ki+60*ue.offset*1e3)):z?new Date(Date.UTC(_e,dt,ke,Yt,Qr,Pi,ki)):(Kt=new Date(_e,dt,ke,Yt,Qr,Pi,ki),me&&(Kt=G(Kt).week(me).toDate()),Kt)}catch{return new Date("")}}(E,I,M,P),this.init(),$&&$!==!0&&(this.$L=this.locale($).$L),N&&E!=this.format(I)&&(this.$d=new Date("")),a={}}else if(I instanceof Array)for(var U=I.length,V=1;V<=U;V+=1){O[1]=I[V-1];var _=P.apply(this,O);if(_.isValid()){this.$d=_.$d,this.$L=_.$L,this.init();break}V===U&&(this.$d=new Date(""))}else F.call(this,x)}}})});var Kd=Se((Es,Is)=>{"use strict";d();c();l();u();(function(e,t){typeof Es=="object"&&typeof Is<"u"?Is.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof b<"u"?b:e||self).dayjs_plugin_timezone=t()})(Es,function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,n,o){var i,a=function(y,h,S){S===void 0&&(S={});var g=new Date(y),v=function(R,P){P===void 0&&(P={});var w=P.timeZoneName||"short",F=R+"|"+w,x=t[F];return x||(x=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:R,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:w}),t[F]=x),x}(h,S);return v.formatToParts(g)},m=function(y,h){for(var S=a(y,h),g=[],v=0;v<S.length;v+=1){var R=S[v],P=R.type,w=R.value,F=e[P];F>=0&&(g[F]=parseInt(w,10))}var x=g[3],E=x===24?0:x,M=g[0]+"-"+g[1]+"-"+g[2]+" "+E+":"+g[4]+":"+g[5]+":000",O=+y;return(o.utc(M).valueOf()-(O-=O%1e3))/6e4},f=n.prototype;f.tz=function(y,h){y===void 0&&(y=i);var S,g=this.utcOffset(),v=this.toDate(),R=v.toLocaleString("en-US",{timeZone:y}),P=Math.round((v-new Date(R))/1e3/60),w=15*-Math.round(v.getTimezoneOffset()/15)-P;if(!Number(w))S=this.utcOffset(0,h);else if(S=o(R,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(w,!0),h){var F=S.utcOffset();S=S.add(g-F,"minute")}return S.$x.$timezone=y,S},f.offsetName=function(y){var h=this.$x.$timezone||o.tz.guess(),S=a(this.valueOf(),h,{timeZoneName:y}).find(function(g){return g.type.toLowerCase()==="timezonename"});return S&&S.value};var p=f.startOf;f.startOf=function(y,h){if(!this.$x||!this.$x.$timezone)return p.call(this,y,h);var S=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return p.call(S,y,h).tz(this.$x.$timezone,!0)},o.tz=function(y,h,S){var g=S&&h,v=S||h||i,R=m(+o(),v);if(typeof y!="string")return o(y).tz(v);var P=function(E,M,O){var I=E-60*M*1e3,k=m(I,O);if(M===k)return[I,M];var D=m(I-=60*(k-M)*1e3,O);return k===D?[I,k]:[E-60*Math.min(k,D)*1e3,Math.max(k,D)]}(o.utc(y,g).valueOf(),R,v),w=P[0],F=P[1],x=o(w).utcOffset(F);return x.$x.$timezone=v,x},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(y){i=y}}})});var Yd=Se((Ps,ks)=>{"use strict";d();c();l();u();(function(e,t){typeof Ps=="object"&&typeof ks<"u"?ks.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof b<"u"?b:e||self).dayjs_plugin_utc=t()})(Ps,function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,i){var a=o.prototype;i.utc=function(g){var v={date:g,utc:!0,args:arguments};return new o(v)},a.utc=function(g){var v=i(this.toDate(),{locale:this.$L,utc:!0});return g?v.add(this.utcOffset(),e):v},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var m=a.parse;a.parse=function(g){g.utc&&(this.$u=!0),this.$utils().u(g.$offset)||(this.$offset=g.$offset),m.call(this,g)};var f=a.init;a.init=function(){if(this.$u){var g=this.$d;this.$y=g.getUTCFullYear(),this.$M=g.getUTCMonth(),this.$D=g.getUTCDate(),this.$W=g.getUTCDay(),this.$H=g.getUTCHours(),this.$m=g.getUTCMinutes(),this.$s=g.getUTCSeconds(),this.$ms=g.getUTCMilliseconds()}else f.call(this)};var p=a.utcOffset;a.utcOffset=function(g,v){var R=this.$utils().u;if(R(g))return this.$u?0:R(this.$offset)?p.call(this):this.$offset;if(typeof g=="string"&&(g=function(x){x===void 0&&(x="");var E=x.match(t);if(!E)return null;var M=(""+E[0]).match(r)||["-",0,0],O=M[0],I=60*+M[1]+ +M[2];return I===0?0:O==="+"?I:-I}(g),g===null))return this;var P=Math.abs(g)<=16?60*g:g,w=this;if(v)return w.$offset=P,w.$u=g===0,w;if(g!==0){var F=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(w=this.local().add(P+F,e)).$offset=P,w.$x.$localOffset=F}else w=this.utc();return w};var y=a.format;a.format=function(g){var v=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return y.call(this,v)},a.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var h=a.toDate;a.toDate=function(g){return g==="s"&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var S=a.diff;a.diff=function(g,v,R){if(g&&this.$u===g.$u)return S.call(this,g,v,R);var P=this.local(),w=i(g).local();return S.call(P,w,v,R)}}})});var dp=Se((_L,lp)=>{"use strict";d();c();l();u();function tb(e){try{return JSON.stringify(e)}catch{return"\"[Circular]\""}}lp.exports=rb;function rb(e,t,r){var n=r&&r.stringify||tb,o=1;if(typeof e=="object"&&e!==null){var i=t.length+o;if(i===1)return e;var a=new Array(i);a[0]=n(e);for(var m=1;m<i;m++)a[m]=n(t[m]);return a.join(" ")}if(typeof e!="string")return e;var f=t.length;if(f===0)return e;for(var p="",y=1-o,h=-1,S=e&&e.length||0,g=0;g<S;){if(e.charCodeAt(g)===37&&g+1<S){switch(h=h>-1?h:0,e.charCodeAt(g+1)){case 100:case 102:if(y>=f||t[y]==null)break;h<g&&(p+=e.slice(h,g)),p+=Number(t[y]),h=g+2,g++;break;case 105:if(y>=f||t[y]==null)break;h<g&&(p+=e.slice(h,g)),p+=Math.floor(Number(t[y])),h=g+2,g++;break;case 79:case 111:case 106:if(y>=f||t[y]===void 0)break;h<g&&(p+=e.slice(h,g));var v=typeof t[y];if(v==="string"){p+="'"+t[y]+"'",h=g+2,g++;break}if(v==="function"){p+=t[y].name||"<anonymous>",h=g+2,g++;break}p+=n(t[y]),h=g+2,g++;break;case 115:if(y>=f)break;h<g&&(p+=e.slice(h,g)),p+=String(t[y]),h=g+2,g++;break;case 37:h<g&&(p+=e.slice(h,g)),p+="%",h=g+2,g++,y--;break}++y}++g}return h===-1?e:(h<S&&(p+=e.slice(h)),p)}});var hp=Se((BL,ei)=>{"use strict";d();c();l();u();var pp=dp();ei.exports=lt;var In=hb().console||{},nb={mapHttpRequest:Zo,mapHttpResponse:Zo,wrapRequestSerializer:Ts,wrapResponseSerializer:Ts,wrapErrorSerializer:Ts,req:Zo,res:Zo,err:mp,errWithCause:mp};function Et(e,t){return e==="silent"?1/0:t.levels.values[e]}var js=Symbol("pino.logFuncs"),Ds=Symbol("pino.hierarchy"),ob={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function fp(e,t){let r={logger:t,parent:e[Ds]};t[Ds]=r}function ib(e,t,r){let n={};t.forEach(o=>{n[o]=r[o]?r[o]:In[o]||In[ob[o]||"log"]||qr}),e[js]=n}function ab(e,t){return Array.isArray(e)?e.filter(function(n){return n!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function lt(e){e=e||{},e.browser=e.browser||{};let t=e.browser.transmit;if(t&&typeof t.send!="function")throw Error("pino: transmit option must have a send function");let r=e.browser.write||In;e.browser.write&&(e.browser.asObject=!0);let n=e.serializers||{},o=ab(e.browser.serialize,n),i=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(i=!1);let a=Object.keys(e.customLevels||{}),m=["error","fatal","warn","info","debug","trace"].concat(a);typeof r=="function"&&m.forEach(function(R){r[R]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let f=e.level||"info",p=Object.create(r);p.log||(p.log=qr),ib(p,m,r),fp({},p),Object.defineProperty(p,"levelVal",{get:h}),Object.defineProperty(p,"level",{get:S,set:g});let y={transmit:t,serialize:o,asObject:e.browser.asObject,asObjectBindingsOnly:e.browser.asObjectBindingsOnly,formatters:e.browser.formatters,levels:m,timestamp:mb(e),messageKey:e.messageKey||"msg",onChild:e.onChild||qr};p.levels=sb(e),p.level=f,p.isLevelEnabled=function(R){return this.levels.values[R]?this.levels.values[R]>=this.levels.values[this.level]:!1},p.setMaxListeners=p.getMaxListeners=p.emit=p.addListener=p.on=p.prependListener=p.once=p.prependOnceListener=p.removeListener=p.removeAllListeners=p.listeners=p.listenerCount=p.eventNames=p.write=p.flush=qr,p.serializers=n,p._serialize=o,p._stdErrSerialize=i,p.child=function(...R){return v.call(this,y,...R)},t&&(p._logEvent=qs());function h(){return Et(this.level,this)}function S(){return this._level}function g(R){if(R!=="silent"&&!this.levels.values[R])throw Error("unknown level "+R);this._level=R,Ht(this,y,p,"error"),Ht(this,y,p,"fatal"),Ht(this,y,p,"warn"),Ht(this,y,p,"info"),Ht(this,y,p,"debug"),Ht(this,y,p,"trace"),a.forEach(P=>{Ht(this,y,p,P)})}function v(R,P,w){if(!P)throw new Error("missing bindings for child Pino");w=w||{},o&&P.serializers&&(w.serializers=P.serializers);let F=w.serializers;if(o&&F){var x=Object.assign({},n,F),E=e.browser.serialize===!0?Object.keys(x):o;delete P.serializers,Ms([P],E,x,this._stdErrSerialize)}function M(I){this._childLevel=(I._childLevel|0)+1,this.bindings=P,x&&(this.serializers=x,this._serialize=E),t&&(this._logEvent=qs([].concat(I._logEvent.bindings,P)))}M.prototype=this;let O=new M(this);return fp(this,O),O.child=function(...I){return v.call(this,R,...I)},O.level=w.level||this.level,R.onChild(O),O}return p}function sb(e){let t=e.customLevels||{},r=Object.assign({},lt.levels.values,t),n=Object.assign({},lt.levels.labels,cb(t));return{values:r,labels:n}}function cb(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}lt.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};lt.stdSerializers=nb;lt.stdTimeFunctions=Object.assign({},{nullTime:gp,epochTime:yp,unixTime:gb,isoTime:yb});function ub(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[Ds];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function Ht(e,t,r,n){if(Object.defineProperty(e,n,{value:Et(e.level,r)>Et(n,r)?qr:r[js][n],writable:!0,enumerable:!0,configurable:!0}),e[n]===qr){if(!t.transmit)return;let i=t.transmit.level||e.level,a=Et(i,r);if(Et(n,r)<a)return}e[n]=db(e,t,r,n);let o=ub(e);o.length!==0&&(e[n]=lb(o,e[n]))}function lb(e,t){return function(){return t.apply(this,[...e,...arguments])}}function db(e,t,r,n){return function(o){return function(){let a=t.timestamp(),m=new Array(arguments.length),f=Object.getPrototypeOf&&Object.getPrototypeOf(this)===In?In:this;for(var p=0;p<m.length;p++)m[p]=arguments[p];var y=!1;if(t.serialize&&(Ms(m,this._serialize,this.serializers,this._stdErrSerialize),y=!0),t.asObject||t.formatters?o.call(f,...pb(this,n,m,a,t)):o.apply(f,m),t.transmit){let h=t.transmit.level||e._level,S=Et(h,r),g=Et(n,r);if(g<S)return;fb(this,{ts:a,methodLevel:n,methodValue:g,transmitLevel:h,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:Et(e._level,r)},m,y)}}}(e[js][n])}function pb(e,t,r,n,o){let{level:i,log:a=h=>h}=o.formatters||{},m=r.slice(),f=m[0],p={},y=(e._childLevel|0)+1;if(y<1&&(y=1),n&&(p.time=n),i){let h=i(t,e.levels.values[t]);Object.assign(p,h)}else p.level=e.levels.values[t];if(o.asObjectBindingsOnly){if(f!==null&&typeof f=="object")for(;y--&&typeof m[0]=="object";)Object.assign(p,m.shift());return[a(p),...m]}else{if(f!==null&&typeof f=="object"){for(;y--&&typeof m[0]=="object";)Object.assign(p,m.shift());f=m.length?pp(m.shift(),m):void 0}else typeof f=="string"&&(f=pp(m.shift(),m));return f!==void 0&&(p[o.messageKey]=f),[a(p)]}}function Ms(e,t,r,n){for(let o in e)if(n&&e[o]instanceof Error)e[o]=lt.stdSerializers.err(e[o]);else if(typeof e[o]=="object"&&!Array.isArray(e[o])&&t)for(let i in e[o])t.indexOf(i)>-1&&i in r&&(e[o][i]=r[i](e[o][i]))}function fb(e,t,r,n=!1){let o=t.send,i=t.ts,a=t.methodLevel,m=t.methodValue,f=t.val,p=e._logEvent.bindings;n||Ms(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter(function(y){return p.indexOf(y)===-1}),e._logEvent.level.label=a,e._logEvent.level.value=m,o(a,e._logEvent,f),e._logEvent=qs(p)}function qs(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function mp(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)t[r]===void 0&&(t[r]=e[r]);return t}function mb(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?gp:yp}function Zo(){return{}}function Ts(e){return e}function qr(){}function gp(){return!1}function yp(){return Date.now()}function gb(){return Math.round(Date.now()/1e3)}function yb(){return new Date(Date.now()).toISOString()}function hb(){function e(t){return typeof t<"u"&&t}try{return typeof b<"u"?b:(Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),b)}catch{return e(self)||e(window)||e(this)||{}}}ei.exports.default=lt;ei.exports.pino=lt});var kA={};Ks(kA,{DefaultFieldsToInclude:()=>Ws,EcommerceDefaultFieldsToInclude:()=>Af,HighlightUtils:()=>Li,MinimumFieldsToInclude:()=>Ei,ResultTemplatesHelpers:()=>Ad,buildContext:()=>Ip,buildController:()=>It,buildDictionaryFieldContext:()=>Pp,buildInteractiveResult:()=>hf,buildRecommendationEngine:()=>xp,buildRecommendationList:()=>gf,buildResultTemplatesManager:()=>xf,getAnalyticsNextApiBaseUrl:()=>Vn,getOrganizationEndpoint:()=>Pe,getSampleRecommendationEngineConfiguration:()=>Ns,loadAdvancedSearchQueryActions:()=>mA,loadClickAnalyticsActions:()=>RA,loadConfigurationActions:()=>gA,loadContextActions:()=>hA,loadDebugActions:()=>SA,loadDictionaryFieldContextActions:()=>vA,loadFieldActions:()=>CA,loadPaginationActions:()=>Gs,loadPipelineActions:()=>wA,loadRecommendationActions:()=>xA,loadSearchConfigurationActions:()=>yA,loadSearchHubActions:()=>PA});module.exports=Of(kA);d();c();l();u();var Li={};Ks(Li,{escapeHtml:()=>Zt,getHighlightedSuggestion:()=>mm,highlightString:()=>fm});d();c();l();u();d();c();l();u();function sm(e,t){let r=`
17
+ */(function(g,f){if(typeof exports=="object"&&typeof module<"u"){module.exports=f(require)}else if("function"==typeof define&&define.amd){define("CoveoHeadlessRecommendation",["crypto"],function(_d_0){var d={"crypto":_d_0},r=function(m){if(m in d)return d[m];if(typeof require=="function")return require(m);throw new Error("Cannot find module '"+m+"'")};return f(r)})}else{var gN={"crypto":"crypto"},gReq=function(r){var mod=r in gN?g[gN[r]]:g[r];return mod};g["CoveoHeadlessRecommendation"]=f(gReq)}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:this,function(require){var exports={};var __exports=exports;var module={exports};"use strict";var If=Object.create;var Br=Object.defineProperty;var Pf=Object.getOwnPropertyDescriptor;var kf=Object.getOwnPropertyNames;var Ff=Object.getPrototypeOf,Of=Object.prototype.hasOwnProperty;var Tf=(e,t,r)=>t in e?Br(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var $r=(e,t)=>()=>(e&&(t=e(e=0)),t);var Se=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ks=(e,t)=>{for(var r in t)Br(e,r,{get:t[r],enumerable:!0})},Ys=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of kf(t))!Of.call(e,o)&&o!==r&&Br(e,o,{get:()=>t[o],enumerable:!(n=Pf(t,o))||n.enumerable});return e};var Be=(e,t,r)=>(r=e!=null?If(Ff(e)):{},Ys(t||!e||!e.__esModule?Br(r,"default",{value:e,enumerable:!0}):r,e)),Df=e=>Ys(Br({},"__esModule",{value:!0}),e);var pe=(e,t,r)=>Tf(e,typeof t!="symbol"?t+"":t,r);var b,c=$r(()=>{"use strict";b=typeof globalThis<"u"?globalThis:window});function Dn(e){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Dn=function(t){return typeof t}:Dn=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dn(e)}function Mf(){"navigator"in this||(this.navigator={}),typeof this.navigator.sendBeacon!="function"&&(this.navigator.sendBeacon=Nf.bind(this))}function Nf(e,t){var r=this.event&&this.event.type,n=r==="unload"||r==="beforeunload",o="XMLHttpRequest"in this?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");o.open("POST",e,!n),o.withCredentials=!0,o.setRequestHeader("Accept","*/*"),qf(t)?(o.setRequestHeader("Content-Type","text/plain;charset=UTF-8"),o.responseType="text"):jf(t)&&t.type&&o.setRequestHeader("Content-Type",t.type);try{o.send(t)}catch{return!1}return!0}var qf,jf,u=$r(()=>{"use strict";qf=function(t){return typeof t=="string"},jf=function(t){return t instanceof Blob};Mf.call((typeof window>"u"?"undefined":Dn(window))==="object"?window:{})});var Mi=Se(Hr=>{"use strict";d();c();l();u();Object.defineProperty(Hr,"__esModule",{value:!0});function Js(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function _f(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vf(e,t,r){return t=Jt(t),Uf(e,tc()?Reflect.construct(t,r||[],Jt(e).constructor):t.apply(e,r))}function Di(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xs(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Hf(n.key),n)}}function qi(e,t,r){return t&&Xs(e.prototype,t),r&&Xs(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function Zs(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=zf(e))||t&&e&&typeof e.length=="number"){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(f){throw f},f:o}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
18
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,a=!0,m=!1;return{s:function(){r=r.call(e)},n:function(){var f=r.next();return a=f.done,f},e:function(f){m=!0,i=f},f:function(){try{a||r.return==null||r.return()}finally{if(m)throw i}}}}function Oi(){return Oi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=Qf(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},Oi.apply(null,arguments)}function Jt(e){return Jt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Jt(e)}function Lf(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ti(e,t)}function tc(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(tc=function(){return!!e})()}function Uf(e,t){if(t&&(typeof t=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _f(e)}function Ti(e,t){return Ti=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},Ti(e,t)}function Qf(e,t){for(;!{}.hasOwnProperty.call(e,t)&&(e=Jt(e))!==null;);return e}function Bf(e,t,r,n){var o=Oi(Jt(1&n?e.prototype:e),t,r);return 2&n&&typeof o=="function"?function(i){return o.apply(r,i)}:o}function $f(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hf(e){var t=$f(e,"string");return typeof t=="symbol"?t:t+""}function zf(e,t){if(e){if(typeof e=="string")return Js(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Js(e,t):void 0}}(function(e){return{NativeAbortSignal:e.AbortSignal,NativeAbortController:e.AbortController}})(typeof self<"u"?self:global);function Gf(e){var t;try{t=new Event("abort")}catch{typeof document<"u"?document.createEvent?(t=document.createEvent("Event"),t.initEvent("abort",!1,!1)):(t=document.createEventObject(),t.type="abort"):t={type:"abort",bubbles:!1,cancelable:!1}}return t.reason=e,t}function Wf(e){if(e===void 0)if(typeof document>"u")e=new Error("This operation was aborted"),e.name="AbortError";else try{e=new DOMException("signal is aborted without reason"),Object.defineProperty(e,"name",{value:"AbortError"})}catch{e=new Error("This operation was aborted"),e.name="AbortError"}return e}var ec=function(){function e(){Di(this,e),Object.defineProperty(this,"listeners",{value:{},writable:!0,configurable:!0})}return qi(e,[{key:"addEventListener",value:function(r,n,o){r in this.listeners||(this.listeners[r]=[]),this.listeners[r].push({callback:n,options:o})}},{key:"removeEventListener",value:function(r,n){if(r in this.listeners){for(var o=this.listeners[r],i=0,a=o.length;i<a;i++)if(o[i].callback===n){o.splice(i,1);return}}}},{key:"dispatchEvent",value:function(r){var n=this;if(r.type in this.listeners){for(var o=this.listeners[r.type],i=o.slice(),a=function(){var y=i[m];try{y.callback.call(n,r)}catch(h){Promise.resolve().then(function(){throw h})}y.options&&y.options.once&&n.removeEventListener(r.type,y.callback)},m=0,f=i.length;m<f;m++)a();return!r.defaultPrevented}}}])}(),ji=function(e){function t(){var r;return Di(this,t),r=Vf(this,t),r.listeners||ec.call(r),Object.defineProperty(r,"aborted",{value:!1,writable:!0,configurable:!0}),Object.defineProperty(r,"onabort",{value:null,writable:!0,configurable:!0}),Object.defineProperty(r,"reason",{value:void 0,writable:!0,configurable:!0}),r}return Lf(t,e),qi(t,[{key:"toString",value:function(){return"[object AbortSignal]"}},{key:"dispatchEvent",value:function(n){n.type==="abort"&&(this.aborted=!0,typeof this.onabort=="function"&&this.onabort.call(this,n)),Bf(t,"dispatchEvent",this,3)([n])}},{key:"throwIfAborted",value:function(){var n=this.aborted,o=this.reason,i=o===void 0?"Aborted":o;if(n)throw i}}],[{key:"timeout",value:function(n){var o=new qn;return setTimeout(function(){return o.abort(new DOMException("This signal is timeout in ".concat(n,"ms"),"TimeoutError"))},n),o.signal}},{key:"any",value:function(n){var o=new qn;function i(){o.abort(this.reason),a()}function a(){var y=Zs(n),h;try{for(y.s();!(h=y.n()).done;){var S=h.value;S.removeEventListener("abort",i)}}catch(g){y.e(g)}finally{y.f()}}var m=Zs(n),f;try{for(m.s();!(f=m.n()).done;){var p=f.value;if(p.aborted){o.abort(p.reason);break}else p.addEventListener("abort",i)}}catch(y){m.e(y)}finally{m.f()}return o.signal}}])}(ec),qn=function(){function e(){Di(this,e),Object.defineProperty(this,"signal",{value:new ji,writable:!0,configurable:!0})}return qi(e,[{key:"abort",value:function(r){var n=Wf(r),o=Gf(n);this.signal.reason=n,this.signal.dispatchEvent(o)}},{key:"toString",value:function(){return"[object AbortController]"}}])}();typeof Symbol<"u"&&Symbol.toStringTag&&(qn.prototype[Symbol.toStringTag]="AbortController",ji.prototype[Symbol.toStringTag]="AbortSignal");function Kf(e){return e.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL?(console.log("__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL=true is set, will force install polyfill"),!0):typeof e.Request=="function"&&!e.Request.prototype.hasOwnProperty("signal")||!e.AbortController}function Yf(e){typeof e=="function"&&(e={fetch:e});var t=e,r=t.fetch,n=t.Request,o=n===void 0?r.Request:n,i=t.AbortController,a=t.__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL,m=a===void 0?!1:a;if(!Kf({fetch:r,Request:o,AbortController:i,__FORCE_INSTALL_ABORTCONTROLLER_POLYFILL:m}))return{fetch:r,Request:f};var f=o;(f&&!f.prototype.hasOwnProperty("signal")||m)&&(f=function(S,g){var v;g&&g.signal&&(v=g.signal,delete g.signal);var R=new o(S,g);return v&&Object.defineProperty(R,"signal",{writable:!1,enumerable:!1,configurable:!0,value:v}),R},f.prototype=o.prototype);var p=r,y=function(S,g){var v=f&&f.prototype.isPrototypeOf(S)?S.signal:g?g.signal:void 0;if(v){var R;try{R=new DOMException("Aborted","AbortError")}catch{R=new Error("Aborted"),R.name="AbortError"}if(v.aborted)return Promise.reject(R);var P=new Promise(function(w,F){v.addEventListener("abort",function(){return F(R)},{once:!0})});return g&&g.signal&&delete g.signal,Promise.race([P,p(S,g)])}return p(S,g)};return{fetch:y,Request:f}}Hr.AbortController=qn;Hr.AbortSignal=ji;Hr.abortableFetch=Yf});var rc,s,A,l=$r(()=>{"use strict";rc=Be(Mi(),1),s=Be(Mi(),1),{fetch:A}=(0,rc.abortableFetch)({fetch})});function zr(e){if(am.test(e)||e.trim()==="")throw new TypeError("Invalid character in header field name");return e.trim().toLowerCase()}function Ni(e){return e.replace(sm,"")}function Gr(e){if(typeof e!="string"||e.length===0)return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r>127||!cm(r))return!1}return!0}function cm(e){return![127,32,"(",")","<",">","@",",",";",":","\\","\"","/","[","]","?","=","{","}"].includes(e)}function oc(e){if(typeof e!="string"||e.trim()!==e)return!1;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);if(r===0||r===10||r===13)return!1}return!0}var Jf,uc,Xf,lc,Zf,em,tm,rm,nm,om,im,am,nc,sm,Xt,_i,ic,ac,sc,cc,C,pc=$r(()=>{"use strict";d();c();l();u();Jf=Object.create,uc=Object.defineProperty,Xf=Object.getOwnPropertyDescriptor,lc=Object.getOwnPropertyNames,Zf=Object.getPrototypeOf,em=Object.prototype.hasOwnProperty,tm=(e,t)=>function(){return t||(0,e[lc(e)[0]])((t={exports:{}}).exports,t),t.exports},rm=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of lc(t))!em.call(e,o)&&o!==r&&uc(e,o,{get:()=>t[o],enumerable:!(n=Xf(t,o))||n.enumerable});return e},nm=(e,t,r)=>(r=e!=null?Jf(Zf(e)):{},rm(t||!e||!e.__esModule?uc(r,"default",{value:e,enumerable:!0}):r,e)),om=tm({"node_modules/set-cookie-parser/lib/set-cookie.js"(e,t){"use strict";var r={decodeValues:!0,map:!1,silent:!1};function n(f){return typeof f=="string"&&!!f.trim()}function o(f,p){var y=f.split(";").filter(n),h=y.shift(),S=i(h),g=S.name,v=S.value;p=p?Object.assign({},r,p):r;try{v=p.decodeValues?decodeURIComponent(v):v}catch(P){console.error("set-cookie-parser encountered an error while decoding a cookie with value '"+v+"'. Set options.decodeValues to false to disable this feature.",P)}var R={name:g,value:v};return y.forEach(function(P){var w=P.split("="),F=w.shift().trimLeft().toLowerCase(),x=w.join("=");F==="expires"?R.expires=new Date(x):F==="max-age"?R.maxAge=parseInt(x,10):F==="secure"?R.secure=!0:F==="httponly"?R.httpOnly=!0:F==="samesite"?R.sameSite=x:R[F]=x}),R}function i(f){var p="",y="",h=f.split("=");return h.length>1?(p=h.shift(),y=h.join("=")):y=f,{name:p,value:y}}function a(f,p){if(p=p?Object.assign({},r,p):r,!f)return p.map?{}:[];if(f.headers)if(typeof f.headers.getSetCookie=="function")f=f.headers.getSetCookie();else if(f.headers["set-cookie"])f=f.headers["set-cookie"];else{var y=f.headers[Object.keys(f.headers).find(function(S){return S.toLowerCase()==="set-cookie"})];!y&&f.headers.cookie&&!p.silent&&console.warn("Warning: set-cookie-parser appears to have been called on a request object. It is designed to parse Set-Cookie headers from responses, not Cookie headers from requests. Set the option {silent: true} to suppress this warning."),f=y}if(Array.isArray(f)||(f=[f]),p=p?Object.assign({},r,p):r,p.map){var h={};return f.filter(n).reduce(function(S,g){var v=o(g,p);return S[v.name]=v,S},h)}else return f.filter(n).map(function(S){return o(S,p)})}function m(f){if(Array.isArray(f))return f;if(typeof f!="string")return[];var p=[],y=0,h,S,g,v,R;function P(){for(;y<f.length&&/\s/.test(f.charAt(y));)y+=1;return y<f.length}function w(){return S=f.charAt(y),S!=="="&&S!==";"&&S!==","}for(;y<f.length;){for(h=y,R=!1;P();)if(S=f.charAt(y),S===","){for(g=y,y+=1,P(),v=y;y<f.length&&w();)y+=1;y<f.length&&f.charAt(y)==="="?(R=!0,y=v,p.push(f.substring(h,g)),h=y):y=g+1}else y+=1;(!R||y>=f.length)&&p.push(f.substring(h,f.length))}return p}t.exports=a,t.exports.parse=a,t.exports.parseString=o,t.exports.splitCookiesString=m}}),im=nm(om()),am=/[^a-z0-9\-#$%&'*+.^_`|~]/i;nc=[`
19
+ `,"\r","\t"," "],sm=new RegExp(`(^[${nc.join("")}]|$[${nc.join("")}])`,"g");Xt=Symbol("normalizedHeaders"),_i=Symbol("rawHeaderNames"),ic=", ",C=class dc{constructor(t){this[ac]={},this[sc]=new Map,this[cc]="Headers",["Headers","HeadersPolyfill"].includes(t?.constructor.name)||t instanceof dc||typeof b.Headers<"u"&&t instanceof b.Headers?t.forEach((n,o)=>{this.append(o,n)},this):Array.isArray(t)?t.forEach(([r,n])=>{this.append(r,Array.isArray(n)?n.join(ic):n)}):t&&Object.getOwnPropertyNames(t).forEach(r=>{let n=t[r];this.append(r,Array.isArray(n)?n.join(ic):n)})}[(ac=Xt,sc=_i,cc=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}*keys(){for(let[t]of this.entries())yield t}*values(){for(let[,t]of this.entries())yield t}*entries(){let t=Object.keys(this[Xt]).sort((r,n)=>r.localeCompare(n));for(let r of t)if(r==="set-cookie")for(let n of this.getSetCookie())yield[r,n];else yield[r,this.get(r)]}has(t){if(!Gr(t))throw new TypeError(`Invalid header name "${t}"`);return this[Xt].hasOwnProperty(zr(t))}get(t){if(!Gr(t))throw TypeError(`Invalid header name "${t}"`);return this[Xt][zr(t)]??null}set(t,r){if(!Gr(t)||!oc(r))return;let n=zr(t),o=Ni(r);this[Xt][n]=Ni(o),this[_i].set(n,t)}append(t,r){if(!Gr(t)||!oc(r))return;let n=zr(t),o=Ni(r),i=this.has(n)?`${this.get(n)}, ${o}`:o;this.set(t,i)}delete(t){if(!Gr(t)||!this.has(t))return;let r=zr(t);delete this[Xt][r],this[_i].delete(r)}forEach(t,r){for(let[n,o]of this.entries())t.call(r,o,n,this)}getSetCookie(){let t=this.get("set-cookie");return t===null?[]:t===""?[""]:(0,im.splitCookiesString)(t)}}});var d=$r(()=>{"use strict";pc()});var bc=Se(Yr=>{"use strict";d();c();l();u();var _n=Yr&&Yr.__assign||function(){return _n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},_n.apply(this,arguments)};Object.defineProperty(Yr,"__esModule",{value:!0});var hm={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function Sm(e){var t=_n(_n({},hm),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Yr.getSanitizedOptions=Sm});var Ac=Se(Qi=>{"use strict";d();c();l();u();Object.defineProperty(Qi,"__esModule",{value:!0});function vm(e){var t=Math.random()*e;return Math.round(t)}Qi.fullJitter=vm});var Cc=Se(Bi=>{"use strict";d();c();l();u();Object.defineProperty(Bi,"__esModule",{value:!0});function bm(e){return e}Bi.noJitter=bm});var wc=Se($i=>{"use strict";d();c();l();u();Object.defineProperty($i,"__esModule",{value:!0});var Am=Ac(),Cm=Cc();function wm(e){switch(e.jitter){case"full":return Am.fullJitter;case"none":default:return Cm.noJitter}}$i.JitterFactory=wm});var zi=Se(Hi=>{"use strict";d();c();l();u();Object.defineProperty(Hi,"__esModule",{value:!0});var xm=wc(),Rm=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(r){return setTimeout(r,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=xm.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,r=this.options.timeMultiple,n=this.numOfDelayedAttempts,o=t*Math.pow(r,n);return Math.min(o,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();Hi.Delay=Rm});var xc=Se(tt=>{"use strict";d();c();l();u();var Em=tt&&tt.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Im=tt&&tt.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function m(y){try{p(n.next(y))}catch(h){a(h)}}function f(y){try{p(n.throw(y))}catch(h){a(h)}}function p(y){y.done?i(y.value):o(y.value).then(m,f)}p((n=n.apply(e,t||[])).next())})},Pm=tt&&tt.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function m(p){return function(y){return f([p,y])}}function f(p){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=p[0]&2?o.return:p[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,p[1])).done)return i;switch(o=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,o=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){r.label=p[1];break}if(p[0]===6&&r.label<i[1]){r.label=i[1],i=p;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(p);break}i[2]&&r.ops.pop(),r.trys.pop();continue}p=t.call(e,r)}catch(y){p=[6,y],o=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}};Object.defineProperty(tt,"__esModule",{value:!0});var km=zi(),Fm=function(e){Em(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return Im(this,void 0,void 0,function(){return Pm(this,function(r){return[2,this.isFirstAttempt?!0:e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(km.Delay);tt.SkipFirstDelay=Fm});var Rc=Se(Jr=>{"use strict";d();c();l();u();var Om=Jr&&Jr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Jr,"__esModule",{value:!0});var Tm=zi(),Dm=function(e){Om(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Tm.Delay);Jr.AlwaysDelay=Dm});var Ec=Se(Gi=>{"use strict";d();c();l();u();Object.defineProperty(Gi,"__esModule",{value:!0});var qm=xc(),jm=Rc();function Mm(e,t){var r=Nm(e);return r.setAttemptNumber(t),r}Gi.DelayFactory=Mm;function Nm(e){return e.delayFirstAttempt?new jm.AlwaysDelay(e):new qm.SkipFirstDelay(e)}});var Ic=Se(qt=>{"use strict";d();c();l();u();var Wi=qt&&qt.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function m(y){try{p(n.next(y))}catch(h){a(h)}}function f(y){try{p(n.throw(y))}catch(h){a(h)}}function p(y){y.done?i(y.value):o(y.value).then(m,f)}p((n=n.apply(e,t||[])).next())})},Ki=qt&&qt.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:m(0),throw:m(1),return:m(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function m(p){return function(y){return f([p,y])}}function f(p){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=p[0]&2?o.return:p[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,p[1])).done)return i;switch(o=0,i&&(p=[p[0]&2,i.value]),p[0]){case 0:case 1:i=p;break;case 4:return r.label++,{value:p[1],done:!1};case 5:r.label++,o=p[1],p=[0];continue;case 7:p=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(p[0]===6||p[0]===2)){r=0;continue}if(p[0]===3&&(!i||p[1]>i[0]&&p[1]<i[3])){r.label=p[1];break}if(p[0]===6&&r.label<i[1]){r.label=i[1],i=p;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(p);break}i[2]&&r.ops.pop(),r.trys.pop();continue}p=t.call(e,r)}catch(y){p=[6,y],o=0}finally{n=i=0}if(p[0]&5)throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}};Object.defineProperty(qt,"__esModule",{value:!0});var _m=bc(),Vm=Ec();function Lm(e,t){return t===void 0&&(t={}),Wi(this,void 0,void 0,function(){var r,n;return Ki(this,function(o){switch(o.label){case 0:return r=_m.getSanitizedOptions(t),n=new Um(e,r),[4,n.execute()];case 1:return[2,o.sent()]}})})}qt.backOff=Lm;var Um=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return Wi(this,void 0,void 0,function(){var t,r;return Ki(this,function(n){switch(n.label){case 0:if(this.attemptLimitReached)return[3,7];n.label=1;case 1:return n.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return n.sent(),[4,this.request()];case 3:return[2,n.sent()];case 4:return t=n.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(r=n.sent(),!r||this.attemptLimitReached)throw t;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(e.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),e.prototype.applyDelay=function(){return Wi(this,void 0,void 0,function(){var t;return Ki(this,function(r){switch(r.label){case 0:return t=Vm.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var Bo=Se((ns,os)=>{"use strict";d();c();l();u();(function(e,t){typeof ns=="object"&&typeof os<"u"?os.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof b<"u"?b:e||self).dayjs=t()})(ns,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",a="hour",m="day",f="week",p="month",y="quarter",h="year",S="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,R=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,P={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(U){var V=["th","st","nd","rd"],_=U%100;return"["+U+(V[(_-20)%10]||V[_]||V[0])+"]"}},w=function(U,V,_){var B=String(U);return!B||B.length>=V?U:""+Array(V+1-B.length).join(_)+U},F={s:w,z:function(U){var V=-U.utcOffset(),_=Math.abs(V),B=Math.floor(_/60),L=_%60;return(V<=0?"+":"-")+w(B,2,"0")+":"+w(L,2,"0")},m:function U(V,_){if(V.date()<_.date())return-U(_,V);var B=12*(_.year()-V.year())+(_.month()-V.month()),L=V.clone().add(B,p),z=_-L<0,G=V.clone().add(B+(z?-1:1),p);return+(-(B+(_-L)/(z?L-G:G-L))||0)},a:function(U){return U<0?Math.ceil(U)||0:Math.floor(U)},p:function(U){return{M:p,y:h,w:f,d:m,D:S,h:a,m:i,s:o,ms:n,Q:y}[U]||String(U||"").toLowerCase().replace(/s$/,"")},u:function(U){return U===void 0}},x="en",E={};E[x]=P;var M="$isDayjsObject",O=function(U){return U instanceof N||!(!U||!U[M])},I=function U(V,_,B){var L;if(!V)return x;if(typeof V=="string"){var z=V.toLowerCase();E[z]&&(L=z),_&&(E[z]=_,L=z);var G=V.split("-");if(!L&&G.length>1)return U(G[0])}else{var Y=V.name;E[Y]=V,L=Y}return!B&&L&&(x=L),L||!B&&x},k=function(U,V){if(O(U))return U.clone();var _=typeof V=="object"?V:{};return _.date=U,_.args=arguments,new N(_)},D=F;D.l=I,D.i=O,D.w=function(U,V){return k(U,{locale:V.$L,utc:V.$u,x:V.$x,$offset:V.$offset})};var N=function(){function U(_){this.$L=I(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[M]=!0}var V=U.prototype;return V.parse=function(_){this.$d=function(B){var L=B.date,z=B.utc;if(L===null)return new Date(NaN);if(D.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var G=L.match(v);if(G){var Y=G[2]-1||0,te=(G[7]||"0").substring(0,3);return z?new Date(Date.UTC(G[1],Y,G[3]||1,G[4]||0,G[5]||0,G[6]||0,te)):new Date(G[1],Y,G[3]||1,G[4]||0,G[5]||0,G[6]||0,te)}}return new Date(L)}(_),this.init()},V.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},V.$utils=function(){return D},V.isValid=function(){return this.$d.toString()!==g},V.isSame=function(_,B){var L=k(_);return this.startOf(B)<=L&&L<=this.endOf(B)},V.isAfter=function(_,B){return k(_)<this.startOf(B)},V.isBefore=function(_,B){return this.endOf(B)<k(_)},V.$g=function(_,B,L){return D.u(_)?this[B]:this.set(L,_)},V.unix=function(){return Math.floor(this.valueOf()/1e3)},V.valueOf=function(){return this.$d.getTime()},V.startOf=function(_,B){var L=this,z=!!D.u(B)||B,G=D.p(_),Y=function(ue,me){var he=D.w(L.$u?Date.UTC(L.$y,me,ue):new Date(L.$y,me,ue),L);return z?he:he.endOf(m)},te=function(ue,me){return D.w(L.toDate()[ue].apply(L.toDate("s"),(z?[0,0,0,0]:[23,59,59,999]).slice(me)),L)},ce=this.$W,ee=this.$M,re=this.$D,Z="set"+(this.$u?"UTC":"");switch(G){case h:return z?Y(1,0):Y(31,11);case p:return z?Y(1,ee):Y(0,ee+1);case f:var oe=this.$locale().weekStart||0,ye=(ce<oe?ce+7:ce)-oe;return Y(z?re-ye:re+(6-ye),ee);case m:case S:return te(Z+"Hours",0);case a:return te(Z+"Minutes",1);case i:return te(Z+"Seconds",2);case o:return te(Z+"Milliseconds",3);default:return this.clone()}},V.endOf=function(_){return this.startOf(_,!1)},V.$set=function(_,B){var L,z=D.p(_),G="set"+(this.$u?"UTC":""),Y=(L={},L[m]=G+"Date",L[S]=G+"Date",L[p]=G+"Month",L[h]=G+"FullYear",L[a]=G+"Hours",L[i]=G+"Minutes",L[o]=G+"Seconds",L[n]=G+"Milliseconds",L)[z],te=z===m?this.$D+(B-this.$W):B;if(z===p||z===h){var ce=this.clone().set(S,1);ce.$d[Y](te),ce.init(),this.$d=ce.set(S,Math.min(this.$D,ce.daysInMonth())).$d}else Y&&this.$d[Y](te);return this.init(),this},V.set=function(_,B){return this.clone().$set(_,B)},V.get=function(_){return this[D.p(_)]()},V.add=function(_,B){var L,z=this;_=Number(_);var G=D.p(B),Y=function(ee){var re=k(z);return D.w(re.date(re.date()+Math.round(ee*_)),z)};if(G===p)return this.set(p,this.$M+_);if(G===h)return this.set(h,this.$y+_);if(G===m)return Y(1);if(G===f)return Y(7);var te=(L={},L[i]=t,L[a]=r,L[o]=e,L)[G]||1,ce=this.$d.getTime()+_*te;return D.w(ce,this)},V.subtract=function(_,B){return this.add(-1*_,B)},V.format=function(_){var B=this,L=this.$locale();if(!this.isValid())return L.invalidDate||g;var z=_||"YYYY-MM-DDTHH:mm:ssZ",G=D.z(this),Y=this.$H,te=this.$m,ce=this.$M,ee=L.weekdays,re=L.months,Z=L.meridiem,oe=function(me,he,ke,_e){return me&&(me[he]||me(B,z))||ke[he].slice(0,_e)},ye=function(me){return D.s(Y%12||12,me,"0")},ue=Z||function(me,he,ke){var _e=me<12?"AM":"PM";return ke?_e.toLowerCase():_e};return z.replace(R,function(me,he){return he||function(ke){switch(ke){case"YY":return String(B.$y).slice(-2);case"YYYY":return D.s(B.$y,4,"0");case"M":return ce+1;case"MM":return D.s(ce+1,2,"0");case"MMM":return oe(L.monthsShort,ce,re,3);case"MMMM":return oe(re,ce);case"D":return B.$D;case"DD":return D.s(B.$D,2,"0");case"d":return String(B.$W);case"dd":return oe(L.weekdaysMin,B.$W,ee,2);case"ddd":return oe(L.weekdaysShort,B.$W,ee,3);case"dddd":return ee[B.$W];case"H":return String(Y);case"HH":return D.s(Y,2,"0");case"h":return ye(1);case"hh":return ye(2);case"a":return ue(Y,te,!0);case"A":return ue(Y,te,!1);case"m":return String(te);case"mm":return D.s(te,2,"0");case"s":return String(B.$s);case"ss":return D.s(B.$s,2,"0");case"SSS":return D.s(B.$ms,3,"0");case"Z":return G}return null}(me)||G.replace(":","")})},V.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},V.diff=function(_,B,L){var z,G=this,Y=D.p(B),te=k(_),ce=(te.utcOffset()-this.utcOffset())*t,ee=this-te,re=function(){return D.m(G,te)};switch(Y){case h:z=re()/12;break;case p:z=re();break;case y:z=re()/3;break;case f:z=(ee-ce)/6048e5;break;case m:z=(ee-ce)/864e5;break;case a:z=ee/r;break;case i:z=ee/t;break;case o:z=ee/e;break;default:z=ee}return L?z:D.a(z)},V.daysInMonth=function(){return this.endOf(p).$D},V.$locale=function(){return E[this.$L]},V.locale=function(_,B){if(!_)return this.$L;var L=this.clone(),z=I(_,B,!0);return z&&(L.$L=z),L},V.clone=function(){return D.w(this.$d,this)},V.toDate=function(){return new Date(this.valueOf())},V.toJSON=function(){return this.isValid()?this.toISOString():null},V.toISOString=function(){return this.$d.toISOString()},V.toString=function(){return this.$d.toUTCString()},U}(),$=N.prototype;return k.prototype=$,[["$ms",n],["$s",o],["$m",i],["$H",a],["$W",m],["$M",p],["$y",h],["$D",S]].forEach(function(U){$[U[1]]=function(V){return this.$g(V,U[0],U[1])}}),k.extend=function(U,V){return U.$i||(U(V,N,k),U.$i=!0),k},k.locale=I,k.isDayjs=O,k.unix=function(U){return k(1e3*U)},k.en=E[x],k.Ls=E,k.p={},k})});var Yl=Se((is,as)=>{"use strict";d();c();l();u();(function(e,t){typeof is=="object"&&typeof as<"u"?as.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof b<"u"?b:e||self).dayjs_plugin_quarterOfYear=t()})(is,function(){"use strict";var e="month",t="quarter";return function(r,n){var o=n.prototype;o.quarter=function(m){return this.$utils().u(m)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(m-1))};var i=o.add;o.add=function(m,f){return m=Number(m),this.$utils().p(f)===t?this.add(3*m,e):i.bind(this)(m,f)};var a=o.startOf;o.startOf=function(m,f){var p=this.$utils(),y=!!p.u(f)||f;if(p.p(m)===t){var h=this.quarter()-1;return y?this.month(3*h).startOf(e).startOf("day"):this.month(3*h+2).endOf(e).endOf("day")}return a.bind(this)(m,f)}}})});var Jl=Se((ss,cs)=>{"use strict";d();c();l();u();(function(e,t){typeof ss=="object"&&typeof cs<"u"?cs.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof b<"u"?b:e||self).dayjs_plugin_customParseFormat=t()})(ss,function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,n=/\d\d/,o=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,a={},m=function(v){return(v=+v)+(v>68?1900:2e3)},f=function(v){return function(R){this[v]=+R}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(R){if(!R||R==="Z")return 0;var P=R.match(/([+-]|\d\d)/g),w=60*P[1]+(+P[2]||0);return w===0?0:P[0]==="+"?-w:w}(v)}],y=function(v){var R=a[v];return R&&(R.indexOf?R:R.s.concat(R.f))},h=function(v,R){var P,w=a.meridiem;if(w){for(var F=1;F<=24;F+=1)if(v.indexOf(w(F,0,R))>-1){P=F>12;break}}else P=v===(R?"pm":"PM");return P},S={A:[i,function(v){this.afternoon=h(v,!1)}],a:[i,function(v){this.afternoon=h(v,!0)}],Q:[r,function(v){this.month=3*(v-1)+1}],S:[r,function(v){this.milliseconds=100*+v}],SS:[n,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[o,f("seconds")],ss:[o,f("seconds")],m:[o,f("minutes")],mm:[o,f("minutes")],H:[o,f("hours")],h:[o,f("hours")],HH:[o,f("hours")],hh:[o,f("hours")],D:[o,f("day")],DD:[n,f("day")],Do:[i,function(v){var R=a.ordinal,P=v.match(/\d+/);if(this.day=P[0],R)for(var w=1;w<=31;w+=1)R(w).replace(/\[|\]/g,"")===v&&(this.day=w)}],w:[o,f("week")],ww:[n,f("week")],M:[o,f("month")],MM:[n,f("month")],MMM:[i,function(v){var R=y("months"),P=(y("monthsShort")||R.map(function(w){return w.slice(0,3)})).indexOf(v)+1;if(P<1)throw new Error;this.month=P%12||P}],MMMM:[i,function(v){var R=y("months").indexOf(v)+1;if(R<1)throw new Error;this.month=R%12||R}],Y:[/[+-]?\d+/,f("year")],YY:[n,function(v){this.year=m(v)}],YYYY:[/\d{4}/,f("year")],Z:p,ZZ:p};function g(v){var R,P;R=v,P=a&&a.formats;for(var w=(v=R.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(k,D,N){var $=N&&N.toUpperCase();return D||P[N]||e[N]||P[$].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(U,V,_){return V||_.slice(1)})})).match(t),F=w.length,x=0;x<F;x+=1){var E=w[x],M=S[E],O=M&&M[0],I=M&&M[1];w[x]=I?{regex:O,parser:I}:E.replace(/^\[|\]$/g,"")}return function(k){for(var D={},N=0,$=0;N<F;N+=1){var U=w[N];if(typeof U=="string")$+=U.length;else{var V=U.regex,_=U.parser,B=k.slice($),L=V.exec(B)[0];_.call(D,L),k=k.replace(L,"")}}return function(z){var G=z.afternoon;if(G!==void 0){var Y=z.hours;G?Y<12&&(z.hours+=12):Y===12&&(z.hours=0),delete z.afternoon}}(D),D}}return function(v,R,P){P.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(m=v.parseTwoDigitYear);var w=R.prototype,F=w.parse;w.parse=function(x){var E=x.date,M=x.utc,O=x.args;this.$u=M;var I=O[1];if(typeof I=="string"){var k=O[2]===!0,D=O[3]===!0,N=k||D,$=O[2];D&&($=O[2]),a=this.$locale(),!k&&$&&(a=P.Ls[$]),this.$d=function(B,L,z,G){try{if(["x","X"].indexOf(L)>-1)return new Date((L==="X"?1e3:1)*B);var Y=g(L)(B),te=Y.year,ce=Y.month,ee=Y.day,re=Y.hours,Z=Y.minutes,oe=Y.seconds,ye=Y.milliseconds,ue=Y.zone,me=Y.week,he=new Date,ke=ee||(te||ce?1:he.getDate()),_e=te||he.getFullYear(),dt=0;te&&!ce||(dt=ce>0?ce-1:he.getMonth());var Kt,Yt=re||0,Qr=Z||0,ki=oe||0,Fi=ye||0;return ue?new Date(Date.UTC(_e,dt,ke,Yt,Qr,ki,Fi+60*ue.offset*1e3)):z?new Date(Date.UTC(_e,dt,ke,Yt,Qr,ki,Fi)):(Kt=new Date(_e,dt,ke,Yt,Qr,ki,Fi),me&&(Kt=G(Kt).week(me).toDate()),Kt)}catch{return new Date("")}}(E,I,M,P),this.init(),$&&$!==!0&&(this.$L=this.locale($).$L),N&&E!=this.format(I)&&(this.$d=new Date("")),a={}}else if(I instanceof Array)for(var U=I.length,V=1;V<=U;V+=1){O[1]=I[V-1];var _=P.apply(this,O);if(_.isValid()){this.$d=_.$d,this.$L=_.$L,this.init();break}V===U&&(this.$d=new Date(""))}else F.call(this,x)}}})});var Jd=Se((Es,Is)=>{"use strict";d();c();l();u();(function(e,t){typeof Es=="object"&&typeof Is<"u"?Is.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof b<"u"?b:e||self).dayjs_plugin_timezone=t()})(Es,function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,n,o){var i,a=function(y,h,S){S===void 0&&(S={});var g=new Date(y),v=function(R,P){P===void 0&&(P={});var w=P.timeZoneName||"short",F=R+"|"+w,x=t[F];return x||(x=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:R,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:w}),t[F]=x),x}(h,S);return v.formatToParts(g)},m=function(y,h){for(var S=a(y,h),g=[],v=0;v<S.length;v+=1){var R=S[v],P=R.type,w=R.value,F=e[P];F>=0&&(g[F]=parseInt(w,10))}var x=g[3],E=x===24?0:x,M=g[0]+"-"+g[1]+"-"+g[2]+" "+E+":"+g[4]+":"+g[5]+":000",O=+y;return(o.utc(M).valueOf()-(O-=O%1e3))/6e4},f=n.prototype;f.tz=function(y,h){y===void 0&&(y=i);var S,g=this.utcOffset(),v=this.toDate(),R=v.toLocaleString("en-US",{timeZone:y}),P=Math.round((v-new Date(R))/1e3/60),w=15*-Math.round(v.getTimezoneOffset()/15)-P;if(!Number(w))S=this.utcOffset(0,h);else if(S=o(R,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(w,!0),h){var F=S.utcOffset();S=S.add(g-F,"minute")}return S.$x.$timezone=y,S},f.offsetName=function(y){var h=this.$x.$timezone||o.tz.guess(),S=a(this.valueOf(),h,{timeZoneName:y}).find(function(g){return g.type.toLowerCase()==="timezonename"});return S&&S.value};var p=f.startOf;f.startOf=function(y,h){if(!this.$x||!this.$x.$timezone)return p.call(this,y,h);var S=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return p.call(S,y,h).tz(this.$x.$timezone,!0)},o.tz=function(y,h,S){var g=S&&h,v=S||h||i,R=m(+o(),v);if(typeof y!="string")return o(y).tz(v);var P=function(E,M,O){var I=E-60*M*1e3,k=m(I,O);if(M===k)return[I,M];var D=m(I-=60*(k-M)*1e3,O);return k===D?[I,k]:[E-60*Math.min(k,D)*1e3,Math.max(k,D)]}(o.utc(y,g).valueOf(),R,v),w=P[0],F=P[1],x=o(w).utcOffset(F);return x.$x.$timezone=v,x},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(y){i=y}}})});var Xd=Se((Ps,ks)=>{"use strict";d();c();l();u();(function(e,t){typeof Ps=="object"&&typeof ks<"u"?ks.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof b<"u"?b:e||self).dayjs_plugin_utc=t()})(Ps,function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,i){var a=o.prototype;i.utc=function(g){var v={date:g,utc:!0,args:arguments};return new o(v)},a.utc=function(g){var v=i(this.toDate(),{locale:this.$L,utc:!0});return g?v.add(this.utcOffset(),e):v},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var m=a.parse;a.parse=function(g){g.utc&&(this.$u=!0),this.$utils().u(g.$offset)||(this.$offset=g.$offset),m.call(this,g)};var f=a.init;a.init=function(){if(this.$u){var g=this.$d;this.$y=g.getUTCFullYear(),this.$M=g.getUTCMonth(),this.$D=g.getUTCDate(),this.$W=g.getUTCDay(),this.$H=g.getUTCHours(),this.$m=g.getUTCMinutes(),this.$s=g.getUTCSeconds(),this.$ms=g.getUTCMilliseconds()}else f.call(this)};var p=a.utcOffset;a.utcOffset=function(g,v){var R=this.$utils().u;if(R(g))return this.$u?0:R(this.$offset)?p.call(this):this.$offset;if(typeof g=="string"&&(g=function(x){x===void 0&&(x="");var E=x.match(t);if(!E)return null;var M=(""+E[0]).match(r)||["-",0,0],O=M[0],I=60*+M[1]+ +M[2];return I===0?0:O==="+"?I:-I}(g),g===null))return this;var P=Math.abs(g)<=16?60*g:g,w=this;if(v)return w.$offset=P,w.$u=g===0,w;if(g!==0){var F=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(w=this.local().add(P+F,e)).$offset=P,w.$x.$localOffset=F}else w=this.utc();return w};var y=a.format;a.format=function(g){var v=g||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return y.call(this,v)},a.valueOf=function(){var g=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*g},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var h=a.toDate;a.toDate=function(g){return g==="s"&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var S=a.diff;a.diff=function(g,v,R){if(g&&this.$u===g.$u)return S.call(this,g,v,R);var P=this.local(),w=i(g).local();return S.call(P,w,v,R)}}})});var fp=Se((LL,pp)=>{"use strict";d();c();l();u();function rb(e){try{return JSON.stringify(e)}catch{return"\"[Circular]\""}}pp.exports=nb;function nb(e,t,r){var n=r&&r.stringify||rb,o=1;if(typeof e=="object"&&e!==null){var i=t.length+o;if(i===1)return e;var a=new Array(i);a[0]=n(e);for(var m=1;m<i;m++)a[m]=n(t[m]);return a.join(" ")}if(typeof e!="string")return e;var f=t.length;if(f===0)return e;for(var p="",y=1-o,h=-1,S=e&&e.length||0,g=0;g<S;){if(e.charCodeAt(g)===37&&g+1<S){switch(h=h>-1?h:0,e.charCodeAt(g+1)){case 100:case 102:if(y>=f||t[y]==null)break;h<g&&(p+=e.slice(h,g)),p+=Number(t[y]),h=g+2,g++;break;case 105:if(y>=f||t[y]==null)break;h<g&&(p+=e.slice(h,g)),p+=Math.floor(Number(t[y])),h=g+2,g++;break;case 79:case 111:case 106:if(y>=f||t[y]===void 0)break;h<g&&(p+=e.slice(h,g));var v=typeof t[y];if(v==="string"){p+="'"+t[y]+"'",h=g+2,g++;break}if(v==="function"){p+=t[y].name||"<anonymous>",h=g+2,g++;break}p+=n(t[y]),h=g+2,g++;break;case 115:if(y>=f)break;h<g&&(p+=e.slice(h,g)),p+=String(t[y]),h=g+2,g++;break;case 37:h<g&&(p+=e.slice(h,g)),p+="%",h=g+2,g++,y--;break}++y}++g}return h===-1?e:(h<S&&(p+=e.slice(h)),p)}});var vp=Se((HL,ti)=>{"use strict";d();c();l();u();var mp=fp();ti.exports=lt;var In=Sb().console||{},ob={mapHttpRequest:ei,mapHttpResponse:ei,wrapRequestSerializer:Ts,wrapResponseSerializer:Ts,wrapErrorSerializer:Ts,req:ei,res:ei,err:yp,errWithCause:yp};function Et(e,t){return e==="silent"?1/0:t.levels.values[e]}var js=Symbol("pino.logFuncs"),Ds=Symbol("pino.hierarchy"),ib={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function gp(e,t){let r={logger:t,parent:e[Ds]};t[Ds]=r}function ab(e,t,r){let n={};t.forEach(o=>{n[o]=r[o]?r[o]:In[o]||In[ib[o]||"log"]||qr}),e[js]=n}function sb(e,t){return Array.isArray(e)?e.filter(function(n){return n!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function lt(e){e=e||{},e.browser=e.browser||{};let t=e.browser.transmit;if(t&&typeof t.send!="function")throw Error("pino: transmit option must have a send function");let r=e.browser.write||In;e.browser.write&&(e.browser.asObject=!0);let n=e.serializers||{},o=sb(e.browser.serialize,n),i=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(i=!1);let a=Object.keys(e.customLevels||{}),m=["error","fatal","warn","info","debug","trace"].concat(a);typeof r=="function"&&m.forEach(function(R){r[R]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let f=e.level||"info",p=Object.create(r);p.log||(p.log=qr),ab(p,m,r),gp({},p),Object.defineProperty(p,"levelVal",{get:h}),Object.defineProperty(p,"level",{get:S,set:g});let y={transmit:t,serialize:o,asObject:e.browser.asObject,asObjectBindingsOnly:e.browser.asObjectBindingsOnly,formatters:e.browser.formatters,levels:m,timestamp:gb(e),messageKey:e.messageKey||"msg",onChild:e.onChild||qr};p.levels=cb(e),p.level=f,p.isLevelEnabled=function(R){return this.levels.values[R]?this.levels.values[R]>=this.levels.values[this.level]:!1},p.setMaxListeners=p.getMaxListeners=p.emit=p.addListener=p.on=p.prependListener=p.once=p.prependOnceListener=p.removeListener=p.removeAllListeners=p.listeners=p.listenerCount=p.eventNames=p.write=p.flush=qr,p.serializers=n,p._serialize=o,p._stdErrSerialize=i,p.child=function(...R){return v.call(this,y,...R)},t&&(p._logEvent=qs());function h(){return Et(this.level,this)}function S(){return this._level}function g(R){if(R!=="silent"&&!this.levels.values[R])throw Error("unknown level "+R);this._level=R,Ht(this,y,p,"error"),Ht(this,y,p,"fatal"),Ht(this,y,p,"warn"),Ht(this,y,p,"info"),Ht(this,y,p,"debug"),Ht(this,y,p,"trace"),a.forEach(P=>{Ht(this,y,p,P)})}function v(R,P,w){if(!P)throw new Error("missing bindings for child Pino");w=w||{},o&&P.serializers&&(w.serializers=P.serializers);let F=w.serializers;if(o&&F){var x=Object.assign({},n,F),E=e.browser.serialize===!0?Object.keys(x):o;delete P.serializers,Ms([P],E,x,this._stdErrSerialize)}function M(I){this._childLevel=(I._childLevel|0)+1,this.bindings=P,x&&(this.serializers=x,this._serialize=E),t&&(this._logEvent=qs([].concat(I._logEvent.bindings,P)))}M.prototype=this;let O=new M(this);return gp(this,O),O.child=function(...I){return v.call(this,R,...I)},O.level=w.level||this.level,R.onChild(O),O}return p}function cb(e){let t=e.customLevels||{},r=Object.assign({},lt.levels.values,t),n=Object.assign({},lt.levels.labels,ub(t));return{values:r,labels:n}}function ub(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}lt.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}};lt.stdSerializers=ob;lt.stdTimeFunctions=Object.assign({},{nullTime:hp,epochTime:Sp,unixTime:yb,isoTime:hb});function lb(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[Ds];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function Ht(e,t,r,n){if(Object.defineProperty(e,n,{value:Et(e.level,r)>Et(n,r)?qr:r[js][n],writable:!0,enumerable:!0,configurable:!0}),e[n]===qr){if(!t.transmit)return;let i=t.transmit.level||e.level,a=Et(i,r);if(Et(n,r)<a)return}e[n]=pb(e,t,r,n);let o=lb(e);o.length!==0&&(e[n]=db(o,e[n]))}function db(e,t){return function(){return t.apply(this,[...e,...arguments])}}function pb(e,t,r,n){return function(o){return function(){let a=t.timestamp(),m=new Array(arguments.length),f=Object.getPrototypeOf&&Object.getPrototypeOf(this)===In?In:this;for(var p=0;p<m.length;p++)m[p]=arguments[p];var y=!1;if(t.serialize&&(Ms(m,this._serialize,this.serializers,this._stdErrSerialize),y=!0),t.asObject||t.formatters?o.call(f,...fb(this,n,m,a,t)):o.apply(f,m),t.transmit){let h=t.transmit.level||e._level,S=Et(h,r),g=Et(n,r);if(g<S)return;mb(this,{ts:a,methodLevel:n,methodValue:g,transmitLevel:h,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:Et(e._level,r)},m,y)}}}(e[js][n])}function fb(e,t,r,n,o){let{level:i,log:a=h=>h}=o.formatters||{},m=r.slice(),f=m[0],p={},y=(e._childLevel|0)+1;if(y<1&&(y=1),n&&(p.time=n),i){let h=i(t,e.levels.values[t]);Object.assign(p,h)}else p.level=e.levels.values[t];if(o.asObjectBindingsOnly){if(f!==null&&typeof f=="object")for(;y--&&typeof m[0]=="object";)Object.assign(p,m.shift());return[a(p),...m]}else{if(f!==null&&typeof f=="object"){for(;y--&&typeof m[0]=="object";)Object.assign(p,m.shift());f=m.length?mp(m.shift(),m):void 0}else typeof f=="string"&&(f=mp(m.shift(),m));return f!==void 0&&(p[o.messageKey]=f),[a(p)]}}function Ms(e,t,r,n){for(let o in e)if(n&&e[o]instanceof Error)e[o]=lt.stdSerializers.err(e[o]);else if(typeof e[o]=="object"&&!Array.isArray(e[o])&&t)for(let i in e[o])t.indexOf(i)>-1&&i in r&&(e[o][i]=r[i](e[o][i]))}function mb(e,t,r,n=!1){let o=t.send,i=t.ts,a=t.methodLevel,m=t.methodValue,f=t.val,p=e._logEvent.bindings;n||Ms(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter(function(y){return p.indexOf(y)===-1}),e._logEvent.level.label=a,e._logEvent.level.value=m,o(a,e._logEvent,f),e._logEvent=qs(p)}function qs(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function yp(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)t[r]===void 0&&(t[r]=e[r]);return t}function gb(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?hp:Sp}function ei(){return{}}function Ts(e){return e}function qr(){}function hp(){return!1}function Sp(){return Date.now()}function yb(){return Math.round(Date.now()/1e3)}function hb(){return new Date(Date.now()).toISOString()}function Sb(){function e(t){return typeof t<"u"&&t}try{return typeof b<"u"?b:(Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),b)}catch{return e(self)||e(window)||e(this)||{}}}ti.exports.default=lt;ti.exports.pino=lt});var FA={};Ks(FA,{DefaultFieldsToInclude:()=>Ws,EcommerceDefaultFieldsToInclude:()=>wf,HighlightUtils:()=>Ui,MinimumFieldsToInclude:()=>Ii,ResultTemplatesHelpers:()=>yd,buildContext:()=>kp,buildController:()=>It,buildDictionaryFieldContext:()=>Fp,buildInteractiveResult:()=>vf,buildRecommendationEngine:()=>Ep,buildRecommendationList:()=>hf,buildResultTemplatesManager:()=>Ef,getAnalyticsNextApiBaseUrl:()=>Vn,getOrganizationEndpoint:()=>Pe,getSampleRecommendationEngineConfiguration:()=>Ns,loadAdvancedSearchQueryActions:()=>gA,loadClickAnalyticsActions:()=>EA,loadConfigurationActions:()=>yA,loadContextActions:()=>SA,loadDebugActions:()=>vA,loadDictionaryFieldContextActions:()=>bA,loadFieldActions:()=>wA,loadPaginationActions:()=>Gs,loadPipelineActions:()=>xA,loadRecommendationActions:()=>RA,loadSearchConfigurationActions:()=>hA,loadSearchHubActions:()=>kA});module.exports=Df(FA);d();c();l();u();var Ui={};Ks(Ui,{escapeHtml:()=>Zt,getHighlightedSuggestion:()=>ym,highlightString:()=>gm});d();c();l();u();d();c();l();u();function um(e,t){let r=`
20
20
  The following properties are invalid:
21
21
 
22
22
  ${e.join(`
23
23
  `)}
24
24
 
25
25
  ${t}
26
- `;return new Wr(r)}var Wr=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},Fe=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let o in this.definition){let i=this.definition[o].validate(r[o]);i&&n.push(`${o}: ${i}`)}if(n.length)throw sm(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}},fe=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&X(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 ve(e){return e===void 0}function cm(e){return e===null}function X(e){return ve(e)||cm(e)}var ne=class{constructor(e={}){pe(this,"value");this.value=new fe(e)}validate(e){let t=this.value.validate(e);return t||(um(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function um(e){return ve(e)||fc(e)}function fc(e){return typeof e=="boolean"}var J=class{constructor(e={}){pe(this,"value");this.config=e,this.value=new fe(e)}validate(e){let t=this.value.validate(e);return t||(lm(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 lm(e){return ve(e)||mc(e)}function mc(e){return typeof e=="number"&&!Number.isNaN(e)}var dm=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,H=class{constructor(e={}){pe(this,"value");pe(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new fe(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:o,ISODate:i}=this.config,a=this.value.validate(e);if(a)return a;if(ve(e))return null;if(!jn(e))return"value is not a string.";if(!t&&!e.length)return"value is an empty string.";if(r)try{new URL(e)}catch{return"value is not a valid URL."}return n&&!n.test(e)?`value did not match provided regex ${n}`:o&&!o.includes(e)?`value should be one of: ${o.join(", ")}.`:i&&!(dm.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 jn(e){return Object.prototype.toString.call(e)==="[object String]"}var K=class{constructor(e={}){pe(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(ve(e))return this.config.options.required?"value is required and is currently undefined":null;if(!gc(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&X(e[r]))return`value does not contain ${r}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let o=e[r],i=n.validate(o);i!==null&&(t+=` ${i}`)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function gc(e){return e!==void 0&&typeof e=="object"}var ie=class{constructor(e={}){pe(this,"value");this.config=e,this.value=new fe(this.config)}validate(e){if(!X(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(X(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&&X(n)&&(r=`value is null or undefined: ${e.join(",")}`);let o=this.validatePrimitiveValue(n,this.config.each);o!==null&&(r+=` ${o}`)}),r===""?null:r}return null}validatePrimitiveValue(e,t){return fc(e)||jn(e)||mc(e)||gc(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function yc(e){return Array.isArray(e)}var _i=class{constructor(e){pe(this,"value");this.config=e,this.value=new fe(e)}validate(e){let t=this.value.validate(e);return t!==null?t:ve(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}};d();c();l();u();function hc(e){return Array.isArray(e)}function Mn(e){return e.trim()===""}var pm=new Set(["1",1,"yes",!0]);function Sc(){if(typeof navigator>"u"||typeof window>"u")return!1;let e=navigator,t=window;return[e.globalPrivacyControl,e.doNotTrack,e.msDoNotTrack,t.doNotTrack].some(r=>pm.has(r))}function vc(e){let t={};for(let[r,n]of e)t[r]=n;return t}function Kr(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Nn(e,t,r={}){let n;return(...o)=>{let i=r.isImmediate&&!n;if(clearTimeout(n),n=setTimeout(()=>{n=void 0,r.isImmediate||e.apply(void 0,o)},t),i)return e.apply(void 0,o)}}function fm(e){if(Mn(e.openingDelimiter)||Mn(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(X(e.content)||Mn(e.content))return e.content;if(e.highlights.length===0)return Zt(e.content);let t=e.content.length,r="",n=0;for(let o=0;o<e.highlights.length;o++){let i=e.highlights[o],a=i.offset,m=a+i.length;if(m>t)break;r+=Zt(e.content.slice(n,a)),r+=e.openingDelimiter,r+=Zt(e.content.slice(a,m)),r+=e.closingDelimiter,n=m}return n!==t&&(r+=Zt(e.content.slice(n))),r}function mm(e,t){return e=Zt(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,i)=>n?Vi(n,t.notMatchDelimiters):o?Vi(o,t.exactMatchDelimiters):i?Vi(i,t.correctionDelimiters):r)}function Vi(e,t){return t?t.open+e+t.close:e}function Zt(e){let t={"&":"&amp;","<":"&lt;",">":"&gt;","\"":"&quot;","'":"&#x27;","`":"&#x60;"},r=`(?:${Object.keys(t).join("|")})`,n=RegExp(r),o=RegExp(r,"g");return n.test(e)?e.replace(o,i=>t[i]):e}d();c();l();u();var Oc=Be(Ic(),1);d();c();l();u();var Ge=new Error("Failed to load reducers."),er=class extends Error{constructor(){super(),this.name="UnauthorizedTokenError",this.message="The token being used to perform the request is unauthorized. It may be expired or invalid."}},jt=class extends Error{constructor(r,n){super();pe(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};d();c();l();u();function Pc(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function kc(e){return typeof e!="object"||!e?!1:Object.values(e).every(Lm)}function Lm(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Fc(e){return e===429}var $e=class e{static call(t){return _asyncToGenerator(function*(){let r=Um(t),{logger:n}=t,o=yield e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:i,...a}=o,m=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(){let f=yield A(i,a);if(Fc(f.status))throw f;return f});return function m(){return _ref.apply(this,arguments)}}();try{let f=yield(0,Oc.backOff)(m,{retry:p=>{let y=p&&Fc(p.status);return y&&n.info("Platform retrying request"),y}});switch(f.status){case 419:case 401:throw n.info("Platform renewing token"),new er;case 404:throw new jt(i,f.status);default:return n.info({response:f,requestInfo:o},"Platform response"),f}}catch(f){return f.message==="Failed to fetch"?new jt(i):f}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:a}=r,{signal:m,...f}=t,p=Kr(f);try{let y=yield o(t,n,a);return{...t,...y}}catch(y){i.error(y,"Platform request preprocessing failed. Returning default request options.")}return p})()}};function Pe(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function pt(e,t="prod"){return`${Pe(e,t)}/rest/search/v2`}function Vn(e,t="prod"){return`${Pe(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function Um(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:a}=e,m=e.method==="POST"||e.method==="PUT",f=Qm(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...(m&&{body:f}),signal:a}}function Qm(e,t){return t==="application/x-www-form-urlencoded"?kc(e)?Pc(e):"":JSON.stringify(e)}d();c();l();u();d();c();l();u();var Ln=e=>e;d();c();l();u();d();c();l();u();function Un(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function We(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:Un(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:Un(),extendedResults:{},searchAction:void 0}}d();c();l();u();function ft(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...i}=e;return i}var mt=e=>{let{response:t}=e;return t.body?Bm(e):$m(t)},Bm=e=>zm(e)?Gm(e):Hm(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},$m=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Hm(e){return e.body.statusCode!==void 0}function zm(e){return e.body.exception!==void 0}var Gm=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});d();c();l();u();var gt=class{constructor(){pe(this,"currentAbortController",null)}enqueue(t,r){var _this=this;return _asyncToGenerator(function*(){let n=_this.currentAbortController;_this.currentAbortController=new s.AbortController;let o=_this.currentAbortController;n&&(r.warnOnAbort&&r.logger.warn("Cancelling current pending search query"),n.abort());try{return yield t(o?.signal??null)}finally{_this.currentAbortController===o&&(_this.currentAbortController=null)}})()}};d();c();l();u();d();c();l();u();var Xr=class{constructor(t){pe(this,"_basePath");pe(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}};d();c();l();u();function Tc(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}d();c();l();u();var rt=(e,t,r,n)=>{let o=new Xr(`${e.url}${n}`);return o.addParam("organizationId",e.organizationId),e.authentication&&o.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:o.href,origin:"searchApiFetch"}};var Dc=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(function*(e,t){let r=yield $e.call({...rt(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:ft(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=Tc(r),o=yield r.arrayBuffer(),a=new TextDecoder(n).decode(o);return Wm(a)?{success:a}:{error:mt({response:r,body:a})}});return function Dc(_x,_x2){return _ref2.apply(this,arguments)}}();function Wm(e){return typeof e=="string"}d();c();l();u();function Km(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function Ym(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Qn(e,t){if(t&&e.name==="AbortError")return{error:Ym(e)};if(e instanceof jt)return{error:Km(e)};throw e}var Bn=class{constructor(t){this.options=t;pe(this,"apiCallsQueues",{unknown:new gt,mainSearch:new gt,facetValues:new gt,foldingCollection:new gt,instantResults:new gt})}plan(t){var _this2=this;return _asyncToGenerator(function*(){let r=yield $e.call({...rt(t,"POST","application/json","/plan"),requestParams:ft(t),requestMetadata:{method:"plan"},..._this2.options});if(r instanceof Error)return Qn(r);let n=yield r.json();return Xm(n)?{success:n}:{error:mt({response:r,body:n})}})()}querySuggest(t){var _this3=this;return _asyncToGenerator(function*(){let r=yield $e.call({...rt(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:ft(t),..._this3.options});if(r instanceof Error)return Qn(r);let n=yield r.json(),o={response:r,body:n};return Jm(n)?{success:(yield _this3.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:mt(o)}})()}search(t,r){var _this4=this;return _asyncToGenerator(function*(){let n=r?.origin??"unknown",o=yield _this4.apiCallsQueues[n].enqueue(m=>$e.call({...rt(t,"POST","application/json",""),requestParams:ft(t),requestMetadata:{method:"search",origin:r?.origin},..._this4.options,signal:m??void 0}),{logger:_this4.options.logger,warnOnAbort:!r?.disableAbortWarning});if(o instanceof Error)return Qn(o,r?.disableAbortWarning);let i=yield o.json(),a={response:o,body:i};return qc(i)?(a.body=jc(i),{success:(yield _this4.options.postprocessSearchResponseMiddleware(a)).body}):{error:mt(a)}})()}facetSearch(t){var _this5=this;return _asyncToGenerator(function*(){let r=yield $e.call({...rt(t,"POST","application/json","/facet"),requestParams:ft(t),requestMetadata:{method:"facetSearch"},..._this5.options});if(r instanceof Error)throw r;let n=yield r.json(),o={response:r,body:n};return(yield _this5.options.postprocessFacetSearchResponseMiddleware(o)).body})()}recommendations(t){var _this6=this;return _asyncToGenerator(function*(){let r=yield $e.call({...rt(t,"POST","application/json",""),requestParams:ft(t),requestMetadata:{method:"recommendations"},..._this6.options});if(r instanceof Error)throw r;let n=yield r.json();if(qc(n)){let o={response:r,body:n};return o.body=jc(n),{success:(yield _this6.options.postprocessSearchResponseMiddleware(o)).body}}return{error:mt({response:r,body:n})}})()}html(t){var _this7=this;return _asyncToGenerator(function*(){return Dc(t,{..._this7.options})})()}fieldDescriptions(t){var _this8=this;return _asyncToGenerator(function*(){let r=yield $e.call({...rt(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},..._this8.options});if(r instanceof Error)throw r;let n=yield r.json();return Zm(n)?{success:n}:{error:mt({response:r,body:n})}})()}},$n=e=>e.success!==void 0,Oe=e=>e.error!==void 0;function qc(e){return e.results!==void 0}function jc(e){let t=Un();return X(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}function Jm(e){return e.completions!==void 0}function Xm(e){return e.preprocessingOutput!==void 0}function Zm(e){return e.fields!==void 0}d();c();l();u();var Mc=e=>e,Nc=e=>e,_c=e=>e;d();c();l();u();d();c();l();u();d();c();l();u();function be(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 eg=typeof Symbol=="function"&&Symbol.observable||"@@observable",Vc=eg,Ki=()=>Math.random().toString(36).substring(7).split("").join("."),tg={INIT:`@@redux/INIT${Ki()}`,REPLACE:`@@redux/REPLACE${Ki()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ki()}`},Hn=tg;function Ke(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 Yi(e,t,r){if(typeof e!="function")throw new Error(be(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(be(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(be(1));return r(Yi)(e,t)}let n=e,o=t,i=new Map,a=i,m=0,f=!1;function p(){a===i&&(a=new Map,i.forEach((P,w)=>{a.set(w,P)}))}function y(){if(f)throw new Error(be(3));return o}function h(P){if(typeof P!="function")throw new Error(be(4));if(f)throw new Error(be(5));let w=!0;p();let F=m++;return a.set(F,P),function(){if(w){if(f)throw new Error(be(6));w=!1,p(),a.delete(F),i=null}}}function S(P){if(!Ke(P))throw new Error(be(7));if(typeof P.type>"u")throw new Error(be(8));if(typeof P.type!="string")throw new Error(be(17));if(f)throw new Error(be(9));try{f=!0,o=n(o,P)}finally{f=!1}return(i=a).forEach(F=>{F()}),P}function g(P){if(typeof P!="function")throw new Error(be(10));n=P,S({type:Hn.REPLACE})}function v(){let P=h;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(be(11));function F(){let E=w;E.next&&E.next(y())}return F(),{unsubscribe:P(F)}},[Vc](){return this}}}return S({type:Hn.INIT}),{dispatch:S,subscribe:h,getState:y,replaceReducer:g,[Vc]:v}}function rg(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Hn.INIT})>"u")throw new Error(be(12));if(typeof r(void 0,{type:Hn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(be(13))})}function tr(e){let t=Object.keys(e),r={};for(let a=0;a<t.length;a++){let m=t[a];typeof e[m]=="function"&&(r[m]=e[m])}let n=Object.keys(r),o,i;try{rg(r)}catch(a){i=a}return function(m={},f){if(i)throw i;let p=!1,y={};for(let h=0;h<n.length;h++){let S=n[h],g=r[S],v=m[S],R=g(v,f);if(typeof R>"u"){let P=f&&f.type;throw new Error(be(14))}y[S]=R,p=p||R!==v}return p=p||n.length!==Object.keys(m).length,p?y:m}}function rr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Lc(...e){return t=>(r,n)=>{let o=t(r,n),i=()=>{throw new Error(be(15))},a={getState:o.getState,dispatch:(f,...p)=>i(f,...p)},m=e.map(f=>f(a));return i=rr(...m)(o.dispatch),{...o,dispatch:i}}}function zn(e){return Ke(e)&&"type"in e&&typeof e.type=="string"}d();c();l();u();var aa=Symbol.for("immer-nothing"),Zr=Symbol.for("immer-draftable"),Te=Symbol.for("immer-state");function Ae(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Nt=Object.getPrototypeOf;function Me(e){return!!e&&!!e[Te]}function De(e){return e?Hc(e)||Array.isArray(e)||!!e[Zr]||!!e.constructor?.[Zr]||nr(e)||an(e):!1}var ng=Object.prototype.constructor.toString();function Hc(e){if(!e||typeof e!="object")return!1;let t=Nt(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)===ng}function sa(e){return Me(e)||Ae(15,e),e[Te].base_}function en(e,t){_t(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function _t(e){let t=e[Te];return t?t.type_:Array.isArray(e)?1:nr(e)?2:an(e)?3:0}function tn(e,t){return _t(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Ji(e,t){return _t(e)===2?e.get(t):e[t]}function zc(e,t,r){let n=_t(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function og(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function nr(e){return e instanceof Map}function an(e){return e instanceof Set}function Mt(e){return e.copy_||e.base_}function ea(e,t){if(nr(e))return new Map(e);if(an(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Hc(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[Te];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let a=o[i],m=n[a];m.writable===!1&&(m.writable=!0,m.configurable=!0),(m.get||m.set)&&(n[a]={configurable:!0,writable:!0,enumerable:m.enumerable,value:e[a]})}return Object.create(Nt(e),n)}else{let n=Nt(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function Yn(e,t=!1){return Jn(e)||Me(e)||!De(e)||(_t(e)>1&&Object.defineProperties(e,{set:{value:Gn},add:{value:Gn},clear:{value:Gn},delete:{value:Gn}}),Object.freeze(e),t&&Object.values(e).forEach(r=>Yn(r,!0))),e}function Gn(){Ae(2)}function Jn(e){return Object.isFrozen(e)}var ta={};function Vt(e){let t=ta[e];return t||Ae(0,e),t}function ig(e,t){ta[e]||(ta[e]=t)}var rn;function Gc(){return rn}function ag(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Uc(e,t){t&&(Vt("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ra(e){na(e),e.drafts_.forEach(sg),e.drafts_=null}function na(e){e===rn&&(rn=e.parent_)}function Qc(e){return rn=ag(rn,e)}function sg(e){let t=e[Te];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Bc(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Te].modified_&&(ra(t),Ae(4)),De(e)&&(e=Wn(t,e),t.parent_||Kn(t,e)),t.patches_&&Vt("Patches").generateReplacementPatches_(r[Te].base_,e,t.patches_,t.inversePatches_)):e=Wn(t,r,[]),ra(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==aa?e:void 0}function Wn(e,t,r){if(Jn(t))return t;let n=t[Te];if(!n)return en(t,(o,i)=>$c(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return Kn(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,i=o,a=!1;n.type_===3&&(i=new Set(o),o.clear(),a=!0),en(i,(m,f)=>$c(e,n,o,m,f,r,a)),Kn(e,o,!1),r&&e.patches_&&Vt("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function $c(e,t,r,n,o,i,a){if(Me(o)){let m=i&&t&&t.type_!==3&&!tn(t.assigned_,n)?i.concat(n):void 0,f=Wn(e,o,m);if(zc(r,n,f),Me(f))e.canAutoFreeze_=!1;else return}else a&&r.add(o);if(De(o)&&!Jn(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Wn(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(nr(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Kn(e,o)}}function Kn(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Yn(t,r)}function cg(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Gc(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,i=ca;r&&(o=[n],i=nn);let{revoke:a,proxy:m}=Proxy.revocable(o,i);return n.draft_=m,n.revoke_=a,m}var ca={get(e,t){if(t===Te)return e;let r=Mt(e);if(!tn(r,t))return ug(e,r,t);let n=r[t];return e.finalized_||!De(n)?n:n===Xi(e.base_,t)?(Zi(e),e.copy_[t]=ia(n,e)):n},has(e,t){return t in Mt(e)},ownKeys(e){return Reflect.ownKeys(Mt(e))},set(e,t,r){let n=Wc(Mt(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=Xi(Mt(e),t),i=o?.[Te];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(og(r,o)&&(r!==void 0||tn(e.base_,t)))return!0;Zi(e),oa(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 Xi(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Zi(e),oa(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Mt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Ae(11)},getPrototypeOf(e){return Nt(e.base_)},setPrototypeOf(){Ae(12)}},nn={};en(ca,(e,t)=>{nn[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});nn.deleteProperty=function(e,t){return nn.set.call(this,e,t,void 0)};nn.set=function(e,t,r){return ca.set.call(this,e[0],t,r,e[0])};function Xi(e,t){let r=e[Te];return(r?Mt(r):e)[t]}function ug(e,t,r){let n=Wc(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function Wc(e,t){if(!(t in e))return;let r=Nt(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Nt(r)}}function oa(e){e.modified_||(e.modified_=!0,e.parent_&&oa(e.parent_))}function Zi(e){e.copy_||(e.copy_=ea(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var lg=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let i=r;r=t;let a=this;return function(f=i,...p){return a.produce(f,y=>r.call(this,y,...p))}}typeof r!="function"&&Ae(6),n!==void 0&&typeof n!="function"&&Ae(7);let o;if(De(t)){let i=Qc(this),a=ia(t,void 0),m=!0;try{o=r(a),m=!1}finally{m?ra(i):na(i)}return Uc(i,n),Bc(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===aa&&(o=void 0),this.autoFreeze_&&Yn(o,!0),n){let i=[],a=[];Vt("Patches").generateReplacementPatches_(t,o,i,a),n(i,a)}return o}else Ae(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...m)=>this.produceWithPatches(a,f=>t(f,...m));let n,o;return[this.produce(t,r,(a,m)=>{n=a,o=m}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){De(e)||Ae(8),Me(e)&&(e=Kc(e));let t=Qc(this),r=ia(e,void 0);return r[Te].isManual_=!0,na(t),r}finishDraft(e,t){let r=e&&e[Te];(!r||!r.isManual_)&&Ae(9);let{scope_:n}=r;return Uc(n,t),Bc(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 o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=Vt("Patches").applyPatches_;return Me(e)?n(e,t):this.produce(e,o=>n(o,t))}};function ia(e,t){let r=nr(e)?Vt("MapSet").proxyMap_(e,t):an(e)?Vt("MapSet").proxySet_(e,t):cg(e,t);return(t?t.scope_:Gc()).drafts_.push(r),r}function Kc(e){return Me(e)||Ae(10,e),Yc(e)}function Yc(e){if(!De(e)||Jn(e))return e;let t=e[Te],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=ea(e,t.scope_.immer_.useStrictShallowCopy_)}else r=ea(e,!0);return en(r,(n,o)=>{zc(r,n,Yc(o))}),t&&(t.finalized_=!1),r}function Jc(){let t="replace",r="add",n="remove";function o(S,g,v,R){switch(S.type_){case 0:case 2:return a(S,g,v,R);case 1:return i(S,g,v,R);case 3:return m(S,g,v,R)}}function i(S,g,v,R){let{base_:P,assigned_:w}=S,F=S.copy_;F.length<P.length&&([P,F]=[F,P],[v,R]=[R,v]);for(let x=0;x<P.length;x++)if(w[x]&&F[x]!==P[x]){let E=g.concat([x]);v.push({op:t,path:E,value:h(F[x])}),R.push({op:t,path:E,value:h(P[x])})}for(let x=P.length;x<F.length;x++){let E=g.concat([x]);v.push({op:r,path:E,value:h(F[x])})}for(let x=F.length-1;P.length<=x;--x){let E=g.concat([x]);R.push({op:n,path:E})}}function a(S,g,v,R){let{base_:P,copy_:w}=S;en(S.assigned_,(F,x)=>{let E=Ji(P,F),M=Ji(w,F),O=x?tn(P,F)?t:r:n;if(E===M&&O===t)return;let I=g.concat(F);v.push(O===n?{op:O,path:I}:{op:O,path:I,value:M}),R.push(O===r?{op:n,path:I}:O===n?{op:r,path:I,value:h(E)}:{op:t,path:I,value:h(E)})})}function m(S,g,v,R){let{base_:P,copy_:w}=S,F=0;P.forEach(x=>{if(!w.has(x)){let E=g.concat([F]);v.push({op:n,path:E,value:x}),R.unshift({op:r,path:E,value:x})}F++}),F=0,w.forEach(x=>{if(!P.has(x)){let E=g.concat([F]);v.push({op:r,path:E,value:x}),R.unshift({op:n,path:E,value:x})}F++})}function f(S,g,v,R){v.push({op:t,path:[],value:g===aa?void 0:g}),R.push({op:t,path:[],value:S})}function p(S,g){return g.forEach(v=>{let{path:R,op:P}=v,w=S;for(let M=0;M<R.length-1;M++){let O=_t(w),I=R[M];typeof I!="string"&&typeof I!="number"&&(I=""+I),(O===0||O===1)&&(I==="__proto__"||I==="constructor")&&Ae(19),typeof w=="function"&&I==="prototype"&&Ae(19),w=Ji(w,I),typeof w!="object"&&Ae(18,R.join("/"))}let F=_t(w),x=y(v.value),E=R[R.length-1];switch(P){case t:switch(F){case 2:return w.set(E,x);case 3:Ae(16);default:return w[E]=x}case r:switch(F){case 1:return E==="-"?w.push(x):w.splice(E,0,x);case 2:return w.set(E,x);case 3:return w.add(x);default:return w[E]=x}case n:switch(F){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:Ae(17,P)}}),S}function y(S){if(!De(S))return S;if(Array.isArray(S))return S.map(y);if(nr(S))return new Map(Array.from(S.entries()).map(([v,R])=>[v,y(R)]));if(an(S))return new Set(Array.from(S).map(y));let g=Object.create(Nt(S));for(let v in S)g[v]=y(S[v]);return tn(S,Zr)&&(g[Zr]=S[Zr]),g}function h(S){return Me(S)?y(S):S}ig("Patches",{applyPatches_:p,generatePatches_:o,generateReplacementPatches_:f})}var on=new lg,nt=on.produce,Xn=on.produceWithPatches.bind(on);var ua=on.applyPatches.bind(on);d();c();l();u();function dg(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function pg(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function fg(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 Xc=e=>Array.isArray(e)?e:[e];function mg(e){let t=Array.isArray(e[0])?e[0]:e;return fg(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function gg(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var oR=Symbol();var iR=Object.getPrototypeOf({});var yg=class{constructor(e){this.value=e}deref(){return this.value}},hg=typeof WeakRef<"u"?WeakRef:yg,Sg=0,Zc=1;function Zn(){return{s:Sg,v:void 0,o:null,p:null}}function or(e,t={}){let r=Zn(),{resultEqualityCheck:n}=t,o,i=0;function a(){let m=r,{length:f}=arguments;for(let h=0,S=f;h<S;h++){let g=arguments[h];if(typeof g=="function"||typeof g=="object"&&g!==null){let v=m.o;v===null&&(m.o=v=new WeakMap);let R=v.get(g);R===void 0?(m=Zn(),v.set(g,m)):m=R}else{let v=m.p;v===null&&(m.p=v=new Map);let R=v.get(g);R===void 0?(m=Zn(),v.set(g,m)):m=R}}let p=m,y;if(m.s===Zc)y=m.v;else if(y=e.apply(null,arguments),i++,n){let h=o?.deref?.()??o;h!=null&&n(h,y)&&(y=h,i!==0&&i--),o=typeof y=="object"&&y!==null||typeof y=="function"?new hg(y):y}return p.s=Zc,p.v=y,y}return a.clearCache=()=>{r=Zn(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function eu(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let i=0,a=0,m,f={},p=o.pop();typeof p=="object"&&(f=p,p=o.pop()),dg(p,`createSelector expects an output function after the inputs, but received: [${typeof p}]`);let y={...r,...f},{memoize:h,memoizeOptions:S=[],argsMemoize:g=or,argsMemoizeOptions:v=[],devModeChecks:R={}}=y,P=Xc(S),w=Xc(v),F=mg(o),x=h(function(){return i++,p.apply(null,arguments)},...P),E=!0,M=g(function(){a++;let I=gg(F,arguments);return m=x.apply(null,I),m},...w);return Object.assign(M,{resultFunc:p,memoizedResultFunc:x,dependencies:F,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>m,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:h,argsMemoize:g})};return Object.assign(n,{withTypes:()=>n}),n}var se=eu(or),vg=Object.assign((e,t=se)=>{pg(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(i=>e[i]);return t(n,(...i)=>i.reduce((a,m,f)=>(a[r[f]]=m,a),{}))},{withTypes:()=>vg});d();c();l();u();function tu(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var ru=tu(),nu=tu;var bg=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?rr:rr.apply(null,arguments)},wR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},Ag=e=>e&&typeof e.match=="function";function T(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(He(0));return{type:e,payload:o.payload,...("meta"in o&&{meta:o.meta}),...("error"in o&&{error:o.error})}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>zn(n)&&n.type===e,r}var cu=class sn extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,sn.prototype)}static get[Symbol.species](){return sn}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new sn(...t[0].concat(this)):new sn(...t.concat(this))}};function ou(e){return De(e)?nt(e,()=>{}):e}function iu(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Cg(e){return typeof e=="boolean"}var wg=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},a=new cu;return r&&(Cg(r)?a.push(ru):a.push(nu(r.extraArgument))),a},cn="RTK_autoBatch",ar=()=>e=>({payload:e,meta:{[cn]:!0}}),au=e=>t=>{setTimeout(t,e)},xg=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,i=!1,a=!1,m=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:au(10):e.type==="callback"?e.queueNotification:au(e.timeout),p=()=>{a=!1,i&&(i=!1,m.forEach(y=>y()))};return Object.assign({},n,{subscribe(y){let h=()=>o&&y(),S=n.subscribe(h);return m.add(y),()=>{S(),m.delete(y)}},dispatch(y){try{return o=!y?.meta?.[cn],i=!o,i&&(a||(a=!0,f(p))),n.dispatch(y)}finally{o=!0}}})},Rg=e=>function(r){let{autoBatch:n=!0}=r??{},o=new cu(e);return n&&o.push(xg(typeof n=="object"?n:void 0)),o};function uu(e){let t=wg(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:i=void 0,enhancers:a=void 0}=e||{},m;if(typeof r=="function")m=r;else if(Ke(r))m=tr(r);else throw new Error(He(1));let f;typeof n=="function"?f=n(t):f=t();let p=rr;o&&(p=bg({trace:!1,...(typeof o=="object"&&o)}));let y=Lc(...f),h=Rg(y),S=typeof a=="function"?a(h):h(),g=p(...S);return Yi(m,i,g)}function lu(e){let t={},r=[],n,o={addCase(i,a){let m=typeof i=="string"?i:i.type;if(!m)throw new Error(He(28));if(m in t)throw new Error(He(29));return t[m]=a,o},addMatcher(i,a){return r.push({matcher:i,reducer:a}),o},addDefaultCase(i){return n=i,o}};return e(o),[t,r,n]}function Eg(e){return typeof e=="function"}function ge(e,t){let[r,n,o]=lu(t),i;if(Eg(e))i=()=>ou(e());else{let m=ou(e);i=()=>m}function a(m=i(),f){let p=[r[f.type],...n.filter(({matcher:y})=>y(f)).map(({reducer:y})=>y)];return p.filter(y=>!!y).length===0&&(p=[o]),p.reduce((y,h)=>{if(h)if(Me(y)){let g=h(y,f);return g===void 0?y:g}else{if(De(y))return nt(y,S=>h(S,f));{let S=h(y,f);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},m)}return a.getInitialState=i,a}var du=(e,t)=>Ag(e)?e.match(t):e(t);function Ye(...e){return t=>e.some(r=>du(r,t))}function ir(...e){return t=>e.every(r=>du(r,t))}function to(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 un(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function ro(...e){return e.length===0?t=>to(t,["pending"]):un(e)?Ye(...e.map(t=>t.pending)):ro()(e[0])}function Lt(...e){return e.length===0?t=>to(t,["rejected"]):un(e)?Ye(...e.map(t=>t.rejected)):Lt()(e[0])}function ln(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?ir(Lt(...e),t):un(e)?ir(Lt(...e),t):ln()(e[0])}function ot(...e){return e.length===0?t=>to(t,["fulfilled"]):un(e)?Ye(...e.map(t=>t.fulfilled)):ot()(e[0])}function no(...e){return e.length===0?t=>to(t,["pending","fulfilled","rejected"]):un(e)?Ye(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):no()(e[0])}var Ig="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",oo=(e=21)=>{let t="",r=e;for(;r--;)t+=Ig[Math.random()*64|0];return t},Pg=["name","message","stack","code"],la=class{constructor(e,t){pe(this,"_type");this.payload=e,this.meta=t}},su=class{constructor(e,t){pe(this,"_type");this.payload=e,this.meta=t}},kg=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Pg)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},le=(()=>{function e(t,r,n){let o=T(t+"/fulfilled",(f,p,y,h)=>({payload:f,meta:{...(h||{}),arg:y,requestId:p,requestStatus:"fulfilled"}})),i=T(t+"/pending",(f,p,y)=>({payload:void 0,meta:{...(y||{}),arg:p,requestId:f,requestStatus:"pending"}})),a=T(t+"/rejected",(f,p,y,h,S)=>({payload:h,error:(n&&n.serializeError||kg)(f||"Rejected"),meta:{...(S||{}),arg:y,requestId:p,rejectedWithValue:!!h,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function m(f){return(p,y,h)=>{let S=n?.idGenerator?n.idGenerator(f):oo(),g=new s.AbortController,v,R;function P(F){R=F,g.abort()}let w=_asyncToGenerator(function*(){let F;try{let E=n?.condition?.(f,{getState:y,extra:h});if(Og(E)&&(E=yield E),E===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let M=new Promise((O,I)=>{v=()=>{I({name:"AbortError",message:R||"Aborted"})},g.signal.addEventListener("abort",v)});p(i(S,f,n?.getPendingMeta?.({requestId:S,arg:f},{getState:y,extra:h}))),F=yield Promise.race([M,Promise.resolve(r(f,{dispatch:p,getState:y,extra:h,requestId:S,signal:g.signal,abort:P,rejectWithValue:(O,I)=>new la(O,I),fulfillWithValue:(O,I)=>new su(O,I)})).then(O=>{if(O instanceof la)throw O;return O instanceof su?o(O.payload,S,f,O.meta):o(O,S,f)})])}catch(E){F=E instanceof la?a(null,S,f,E.payload,E.meta):a(E,S,f)}finally{v&&g.signal.removeEventListener("abort",v)}return n&&!n.dispatchConditionRejection&&a.match(F)&&F.meta.condition||p(F),F})();return Object.assign(w,{abort:P,requestId:S,arg:f,unwrap(){return w.then(Fg)}})}}return Object.assign(m,{pending:i,rejected:a,fulfilled:o,settled:Ye(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Fg(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Og(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var pu=Symbol.for("rtk-slice-createasyncthunk"),PR={[pu]:le};function Tg(e,t){return`${e}/${t}`}function Dg({creators:e}={}){let t=e?.asyncThunk?.[pu];return function(n){let{name:o,reducerPath:i=o}=n;if(!o)throw new Error(He(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(jg()):n.reducers)||{},m=Object.keys(a),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(F,x){let E=typeof F=="string"?F:F.type;if(!E)throw new Error(He(12));if(E in f.sliceCaseReducersByType)throw new Error(He(13));return f.sliceCaseReducersByType[E]=x,p},addMatcher(F,x){return f.sliceMatchers.push({matcher:F,reducer:x}),p},exposeAction(F,x){return f.actionCreators[F]=x,p},exposeCaseReducer(F,x){return f.sliceCaseReducersByName[F]=x,p}};m.forEach(F=>{let x=a[F],E={reducerName:F,type:Tg(o,F),createNotation:typeof n.reducers=="function"};Ng(x)?Vg(E,x,p,t):Mg(E,x,p)});function y(){let[F={},x=[],E=void 0]=typeof n.extraReducers=="function"?lu(n.extraReducers):[n.extraReducers],M={...F,...f.sliceCaseReducersByType};return ge(n.initialState,O=>{for(let I in M)O.addCase(I,M[I]);for(let I of f.sliceMatchers)O.addMatcher(I.matcher,I.reducer);for(let I of x)O.addMatcher(I.matcher,I.reducer);E&&O.addDefaultCase(E)})}let h=F=>F,S=new Map,g;function v(F,x){return g||(g=y()),g(F,x)}function R(){return g||(g=y()),g.getInitialState()}function P(F,x=!1){function E(O){let I=O[F];return typeof I>"u"&&x&&(I=R()),I}function M(O=h){let I=iu(S,x,()=>new WeakMap);return iu(I,O,()=>{let k={};for(let[D,N]of Object.entries(n.selectors??{}))k[D]=qg(N,O,R,x);return k})}return{reducerPath:F,getSelectors:M,get selectors(){return M(E)},selectSlice:E}}let w={name:o,reducer:v,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:R,...P(i),injectInto(F,{reducerPath:x,...E}={}){let M=x??i;return F.inject({reducerPath:M,reducer:v},E),{...w,...P(M,!0)}}};return w}}function qg(e,t,r,n){function o(i,...a){let m=t(i);return typeof m>"u"&&n&&(m=r()),e(m,...a)}return o.unwrapped=e,o}var Ut=Dg();function jg(){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 Mg({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!_g(n))throw new Error(He(17));i=n.reducer,a=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?T(e,a):T(e))}function Ng(e){return e._reducerDefinitionType==="asyncThunk"}function _g(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Vg({type:e,reducerName:t},r,n,o){if(!o)throw new Error(He(18));let{payloadCreator:i,fulfilled:a,pending:m,rejected:f,settled:p,options:y}=r,h=o(e,i,y);n.exposeAction(t,h),a&&n.addCase(h.fulfilled,a),m&&n.addCase(h.pending,m),f&&n.addCase(h.rejected,f),p&&n.addMatcher(h.settled,p),n.exposeCaseReducer(t,{fulfilled:a||eo,pending:m||eo,rejected:f||eo,settled:p||eo})}function eo(){}var fu="listener",mu="completed",gu="cancelled",kR=`task-${gu}`,FR=`task-${mu}`,OR=`${fu}-${gu}`,TR=`${fu}-${mu}`;var{assign:yu}=Object;var da="listenerMiddleware";var Lg=yu(T(`${da}/add`),{withTypes:()=>Lg}),DR=T(`${da}/removeAll`),Ug=yu(T(`${da}/remove`),{withTypes:()=>Ug});var qR=Symbol.for("rtk-state-proxy-original");function He(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. `}d();c();l();u();var W=new H({required:!0,emptyAllowed:!1}),Ce=new H({required:!1,emptyAllowed:!1}),we=new H({required:!0,emptyAllowed:!0}),HR=new H({required:!1,emptyAllowed:!0}),io=new ie({each:W,required:!0}),hu=new H({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Su=new H({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),zR=new H({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),it=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Ve=(e,t)=>{if("required"in t)return{payload:new Fe({value:t}).validate({value:e}).value};let o=new K({options:{required:!0},values:t}).validate(e);if(o)throw new Wr(o);return{payload:e}},Q=(e,t)=>{try{return Ve(e,t)}catch(r){return{payload:e,error:it(r)}}},vu=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return Au(e,t,r,o,"Controller initialization error")},bu=(e,t,r,n)=>{let o=`Check the options of ${n}`;return Au(e,t,r,o,"Controller initialization error")},Au=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(i){throw e.logger.error(i,o),i}};d();c();l();u();var sr="3.31.0",Cu=["@coveo/atomic","@coveo/quantic"];var pa=()=>Ce,wu=()=>W,yt=T("configuration/updateBasicConfiguration",e=>Q(e,{accessToken:Ce,environment:new H({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:Ce})),Je=T("configuration/updateSearchConfiguration",e=>Q(e,{proxyBaseUrl:new H({required:!1,url:!0}),pipeline:new H({required:!1,emptyAllowed:!0}),searchHub:Ce,timezone:Ce,locale:Ce,authenticationProviders:new ie({required:!1,each:W})})),Qg={enabled:new ne({default:!0}),originContext:pa(),originLevel2:pa(),originLevel3:pa(),proxyBaseUrl:new H({required:!1,url:!0}),runtimeEnvironment:new fe,anonymous:new ne({default:!1}),deviceId:Ce,userDisplayName:Ce,documentLocation:Ce,trackingId:Su,analyticsMode:new H({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new K({options:{required:!1},values:Cu.reduce((e,t)=>(e[t]=hu,e),{})})},cr=T("configuration/updateAnalyticsConfiguration",e=>Q(e,Qg)),ur=T("configuration/analytics/disable"),lr=T("configuration/analytics/enable"),ao=T("configuration/analytics/originlevel2",e=>Q(e,{originLevel2:wu()})),so=T("configuration/analytics/originlevel3",e=>Q(e,{originLevel3:wu()}));d();c();l();u();d();c();l();u();d();c();l();u();var xu={q:new H,enableQuerySyntax:new ne,aq:new H,cq:new H,firstResult:new J({min:0}),numberOfResults:new J({min:0}),sortCriteria:new H,f:new K,fExcluded:new K,cf:new K,nf:new K,mnf:new K,df:new K,debug:new ne,sf:new K,tab:new H,af:new K};var ht=T("searchParameters/restore",e=>Q(e,xu)),Ru=T("searchParameters/restoreTab",e=>Q(e,W));d();c();l();u();var co=T("debug/enable"),uo=T("debug/disable");d();c();l();u();var lo=()=>!1;var po=ge(lo(),e=>{e.addCase(co,()=>!0).addCase(uo,()=>!1).addCase(ht,(t,r)=>r.payload.debug??t)});d();c();l();u();var dr=T("pipeline/set",e=>Q(e,new H({required:!0,emptyAllowed:!0})));d();c();l();u();d();c();l();u();var Bg=T("history/undo"),$g=T("history/redo"),Xe=T("history/snapshot"),tI=le("history/back",/*#__PURE__*/function(){var _ref4=_asyncToGenerator(function*(e,{dispatch:t}){t(Bg()),yield t(qe())});return function(_x3,_x4){return _ref4.apply(this,arguments)}}()),rI=le("history/forward",/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,{dispatch:t}){t($g()),yield t(qe())});return function(_x5,_x6){return _ref5.apply(this,arguments)}}()),qe=le("history/change",/*#__PURE__*/function(){var _ref6=_asyncToGenerator(function*(e,{getState:t}){return t().history.present});return function(_x7,_x8){return _ref6.apply(this,arguments)}}());d();c();l();u();var pr=()=>"";var fr=ge(pr(),e=>{e.addCase(dr,(t,r)=>r.payload).addCase(qe.fulfilled,(t,r)=>r.payload?.pipeline??t).addCase(Je,(t,r)=>r.payload.pipeline||t)});d();c();l();u();d();c();l();u();var fo=T("app/setError");d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();var mr=class e{static set(t,r,n){let o,i,a;n&&(i=new Date,i.setTime(i.getTime()+n));let m=window.location.hostname,f=/^(\d{1,3}\.){3}\d{1,3}$/,p=/^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}$/;f.test(m)||p.test(m)||m.indexOf(".")===-1?fa(t,r,i):(a=m.split("."),o=a[a.length-2]+"."+a[a.length-1],fa(t,r,i,o))}static get(t){let r=t+"=",n=document.cookie.split(";");for(let o=0;o<n.length;o++){let i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function fa(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}d();c();l();u();function Hg(){return typeof navigator<"u"}function Eu(){try{return typeof localStorage<"u"}catch{return!1}}function Iu(){try{return typeof sessionStorage<"u"}catch{return!1}}function Pu(){return!!(Hg()&&navigator.cookieEnabled)}var ku=null;function Fu(){return ku||(Eu()?localStorage:Pu()?new ma:Iu()?sessionStorage:new ga)}var gr=class gr{getItem(t){return mr.get(`${gr.prefix}${t}`)}removeItem(t){mr.erase(`${gr.prefix}${t}`)}setItem(t,r,n){mr.set(`${gr.prefix}${t}`,r,n)}};pe(gr,"prefix","coveo_");var ma=gr;var ga=class{getItem(t){return null}removeItem(t){}setItem(t,r){}};var mo="__coveo.analytics.history",zg=20,Gg=1e3*60,Wg=75,Qt=class Qt{constructor(t){pe(this,"store");this.store=t||Fu()}static getInstance(t){return Qt.instance||(Qt.instance=new Qt(t)),Qt.instance}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!==null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){var _this9=this;return _asyncToGenerator(function*(){t.internalTime=new Date().getTime(),t=_this9.cropQueryElement(_this9.stripEmptyQuery(t));let r=yield _this9.getHistoryWithInternalTimeAsync();r!==null?_this9.isValidEntry(t)&&_this9.setHistory([t].concat(r)):_this9.setHistory([t])})()}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){var _this0=this;return _asyncToGenerator(function*(){let t=yield _this0.getHistoryWithInternalTimeAsync();return _this0.stripEmptyQueries(_this0.stripInternalTime(t))})()}getHistoryWithInternalTime(){try{let t=this.store.getItem(mo);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){var _this1=this;return _asyncToGenerator(function*(){try{let t=yield _this1.store.getItem(mo);return t?JSON.parse(t):[]}catch{return[]}})()}setHistory(t){try{this.store.setItem(mo,JSON.stringify(t.slice(0,zg)))}catch{}}clear(){try{this.store.removeItem(mo)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,Wg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value===t.value?(t.internalTime||0)-(r.internalTime||0)>Gg:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};pe(Qt,"instance",null);var ya=Qt,Le=ya;d();c();l();u();d();c();l();u();var yr=se(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${sr}`));d();c();l();u();d();c();l();u();function at(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function q(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function m(y){try{p(n.next(y))}catch(h){a(h)}}function f(y){try{p(n.throw(y))}catch(h){a(h)}}function p(y){y.done?i(y.value):o(y.value).then(m,f)}p((n=n.apply(e,t||[])).next())})}var ae;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ae||(ae={}));function va(){return typeof window<"u"}function Ta(){return typeof navigator<"u"}function hr(){return typeof document<"u"}function ba(){try{return typeof localStorage<"u"}catch{return!1}}function Kg(){try{return typeof sessionStorage<"u"}catch{return!1}}function $u(){return Ta()&&navigator.cookieEnabled}var Yg=[ae.click,ae.custom,ae.search,ae.view],Jg=(e,t)=>Yg.indexOf(e)!==-1?Object.assign({language:hr()?document.documentElement.lang:"unknown",userAgent:Ta()?navigator.userAgent:"unknown"},t):t,pn=class e{static set(t,r,n){var o,i,a,m;n&&(i=new Date,i.setTime(i.getTime()+n)),m=window.location.hostname,m.indexOf(".")===-1?Ou(t,r,i):(a=m.split("."),o=a[a.length-2]+"."+a[a.length-1],Ou(t,r,i,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function Ou(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function Xg(){return ba()?localStorage:$u()?new fn:Kg()?sessionStorage:new vr}var fn=class e{getItem(t){return pn.get(`${e.prefix}${t}`)}removeItem(t){pn.erase(`${e.prefix}${t}`)}setItem(t,r,n){pn.set(`${e.prefix}${t}`,r,n)}};fn.prefix="coveo_";var Aa=class{constructor(){this.cookieStorage=new fn}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)}},vr=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},go="__coveo.analytics.history",Zg=20,ey=1e3*60,ty=75,So=class{constructor(t){this.store=t||Xg()}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 q(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 q(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(go);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return q(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(go);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(go,JSON.stringify(t.slice(0,Zg)))}catch{}}clear(){try{this.store.removeItem(go)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,ty)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>ey:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};var ry=(e,t)=>q(void 0,void 0,void 0,function*(){return e===ae.view?(yield ny(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),ny=e=>q(void 0,void 0,void 0,function*(){let t=new So,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),yo,oy=new Uint8Array(16);function iy(){if(!yo&&(yo=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!yo))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return yo(oy)}var ay=/^(?:[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 vo(e){return typeof e=="string"&&ay.test(e)}var xe=[];for(let e=0;e<256;++e)xe.push((e+256).toString(16).slice(1));function Hu(e,t=0){return(xe[e[t+0]]+xe[e[t+1]]+xe[e[t+2]]+xe[e[t+3]]+"-"+xe[e[t+4]]+xe[e[t+5]]+"-"+xe[e[t+6]]+xe[e[t+7]]+"-"+xe[e[t+8]]+xe[e[t+9]]+"-"+xe[e[t+10]]+xe[e[t+11]]+xe[e[t+12]]+xe[e[t+13]]+xe[e[t+14]]+xe[e[t+15]]).toLowerCase()}function sy(e){if(!vo(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 cy(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var uy="6ba7b810-9dad-11d1-80b4-00c04fd430c8",ly="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function dy(e,t,r){function n(o,i,a,m){var f;if(typeof o=="string"&&(o=cy(o)),typeof i=="string"&&(i=sy(i)),((f=i)===null||f===void 0?void 0:f.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let p=new Uint8Array(16+o.length);if(p.set(i),p.set(o,i.length),p=r(p),p[6]=p[6]&15|t,p[8]=p[8]&63|128,a){m=m||0;for(let y=0;y<16;++y)a[m+y]=p[y];return a}return Hu(p)}try{n.name=e}catch{}return n.DNS=uy,n.URL=ly,n}var py=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Tu={randomUUID:py};function Bt(e,t,r){if(Tu.randomUUID&&!t&&!e)return Tu.randomUUID();e=e||{};let n=e.random||(e.rng||iy)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return Hu(n)}function fy(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 ha(e,t){return e<<t|e>>>32-t}function my(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let a=unescape(encodeURIComponent(e));e=[];for(let m=0;m<a.length;++m)e.push(a.charCodeAt(m))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),i=new Array(o);for(let a=0;a<o;++a){let m=new Uint32Array(16);for(let f=0;f<16;++f)m[f]=e[a*64+f*4]<<24|e[a*64+f*4+1]<<16|e[a*64+f*4+2]<<8|e[a*64+f*4+3];i[a]=m}i[o-1][14]=(e.length-1)*8/Math.pow(2,32),i[o-1][14]=Math.floor(i[o-1][14]),i[o-1][15]=(e.length-1)*8&4294967295;for(let a=0;a<o;++a){let m=new Uint32Array(80);for(let g=0;g<16;++g)m[g]=i[a][g];for(let g=16;g<80;++g)m[g]=ha(m[g-3]^m[g-8]^m[g-14]^m[g-16],1);let f=r[0],p=r[1],y=r[2],h=r[3],S=r[4];for(let g=0;g<80;++g){let v=Math.floor(g/20),R=ha(f,5)+fy(v,p,y,h)+S+t[v]+m[g]>>>0;S=h,h=y,y=ha(p,30)>>>0,p=f,f=R}r[0]=r[0]+f>>>0,r[1]=r[1]+p>>>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 gy=dy("v5",80,my),Du=gy,zu="2.30.45",qu=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,dn={pageview:"pageview",event:"event"},bo=class{constructor({client:t,uuidGenerator:r=Bt}){this.client=t,this.uuidGenerator=r}},Ca=class extends bo{constructor({client:t,uuidGenerator:r=Bt}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=qu(window.location),this.lastReferrer=hr()?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:hr()?document.title:"",encoding:hr()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},i={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},i),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:i}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=i,t===dn.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===dn.pageview?this.nextPageViewId:this.pageViewId,referrer:t===dn.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===dn.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=o=>o.replace(/^\/?(.*)$/,"/$1");return`${(o=>o.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return qu(window.location)}},St=class e{constructor(t,r){if(!vo(t))throw Error("Not a valid uuid");this.clientId=t,this.creationDate=Math.floor(r/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime}validate(t,r){return!this.expired&&this.matchReferrer(t,r)}matchReferrer(t,r){try{let n=new URL(t);return r.some(o=>new RegExp(o.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[n,o]=r;if(n.length!==32||isNaN(parseInt(o)))return null;let i=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return vo(i)?new e(i,Number.parseInt(o)*1e3):null}};St.cvo_cid="cvo_cid";St.expirationTime=120;var wa=class extends bo{constructor({client:t,uuidGenerator:r=Bt}){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 q(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(St.cvo_cid,new St(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};wa.Id="link";var Qe=Object.keys;function ho(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Sa=128,Gu=192,ju=224,Mu=240;function yy(e){return(e&248)===Mu?4:(e&Mu)===ju?3:(e&ju)===Gu?2:1}function hy(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&Sa)!=Sa)break;if(r-=3,(n&Gu)!=Sa){t-r>=yy(n)*3&&(r=t);break}}return e.substring(0,r)}var xa={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"},Sy=Qe(xa).map(e=>xa[e]),vy=[...Sy].join("|"),by=new RegExp(`^(${vy}$)`),Ay={svcAction:"svc_action",svcActionData:"svc_action_data"},Cy=e=>Qe(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=xa[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),wy=e=>by.test(e),xy=[wy],Nu={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},_u={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ee={action:"pa",list:"pal",listSource:"pls"},Ao={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"],Ra={id:"quoteId",affiliation:"quoteAffiliation"},Ea={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Ey={add:Ee,bookmark_add:Ee,bookmark_remove:Ee,click:Ee,checkout:Ee,checkout_option:Ee,detail:Ee,impression:Ee,remove:Ee,refund:Object.assign(Object.assign({},Ee),Ao),purchase:Object.assign(Object.assign({},Ee),Ao),quickview:Ee,quote:Object.assign(Object.assign({},Ee),Ra),review:Object.assign(Object.assign({},Ee),Ea)},Iy=Qe(Nu).map(e=>Nu[e]),Py=Qe(_u).map(e=>_u[e]),ky=Qe(Ee).map(e=>Ee[e]),Fy=Qe(Ao).map(e=>Ao[e]),Oy=Qe(Ea).map(e=>Ea[e]),Ty=Qe(Ra).map(e=>Ra[e]),Dy=[...Iy,"custom"].join("|"),qy=[...Py,"custom"].join("|"),Wu="(pr[0-9]+)",Ku="(il[0-9]+pi[0-9]+)",jy=new RegExp(`^${Wu}(${Dy})$`),My=new RegExp(`^(${Ku}(${qy}))|(il[0-9]+nm)$`),Ny=new RegExp(`^(${ky.join("|")})$`),_y=new RegExp(`^(${Fy.join("|")})$`),Vy=new RegExp(`^${Wu}custom$`),Ly=new RegExp(`^${Ku}custom$`),Uy=new RegExp(`^(${[...Ry,...Oy,...Ty].join("|")})$`),Qy=e=>jy.test(e),By=e=>My.test(e),$y=e=>Ny.test(e),Hy=e=>_y.test(e),zy=e=>Uy.test(e),Gy=[By,Qy,$y,Hy,zy],Wy=[Vy,Ly],Ky={anonymizeIp:"aip"},Yy={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Jy={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},Xy=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],Zy=Object.assign(Object.assign(Object.assign(Object.assign({},Ky),Yy),Jy),Xy.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Ia=Object.assign(Object.assign({},Zy),Ay),eh=e=>{let t=!!e.action&&Ey[e.action]||{};return Qe(e).reduce((r,n)=>{let o=t[n]||Ia[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},th=Qe(Ia).map(e=>Ia[e]),rh=e=>th.indexOf(e)!==-1,nh=e=>e==="custom",oh=e=>[...Gy,...xy,rh,nh].some(t=>t(e)),ih=e=>Qe(e).reduce((t,r)=>{let n=ah(r);return n?Object.assign(Object.assign({},t),sh(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),ah=e=>{let t;return[...Wy].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},sh=(e,t)=>Qe(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),Pa=class{constructor(t){this.opts=t}sendEvent(t,r){return q(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error("navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like \"sendbeacon-polyfill\".");let{baseUrl:n,preprocessRequest:o}=this.opts,i=yield this.getQueryParamsForEventType(t),{url:a,payload:m}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${i}`,r,o),f=this.encodeForEventType(t,m),p=new Blob([f],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(a,p)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return q(this,void 0,void 0,function*(){let o=t,i=r;if(n){let a=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:m,body:f}=a;o=m||t;try{i=JSON.parse(f)}catch(p){console.error("Unable to process the request body as a JSON string",p)}}return{payload:i,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return q(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,o=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",o?`visitorId=${o}`:"","discardVisitInfo=true"].filter(i=>!!i).join("&")})}isEventTypeLegacy(t){return[ae.click,ae.custom,ae.search,ae.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let o=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(o=`access_token=${encodeURIComponent(n)}&${o}`),o}},ka=class{sendEvent(t,r){return q(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return q(this,void 0,void 0,function*(){return Promise.resolve()})}},Vu=b.fetch,Co=class{constructor(t){this.opts=t}sendEvent(t,r){return q(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:i}=this.opts,a=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",m={url:`${n}/analytics/${t}${a}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},f=Object.assign(Object.assign({},m),i?yield i(m,"analyticsFetch"):{}),{url:p}=f,y=at(f,["url"]),h;try{h=yield Vu(p,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&&o.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 q(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Vu(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ae.click,ae.custom,ae.search,ae.view].indexOf(t)!==-1}getVisitorIdParam(){return q(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"})}},Fa=class{constructor(t,r){ba()&&$u()?this.storage=new Aa:ba()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new vr),this.client=new Co(t),this.beaconClient=new Pa(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:i}of n)this.beaconClient.sendEvent(o,i)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},Oa=class{constructor(t,r){this.storage=r||new vr,this.client=new Co(t)}getClientDependingOnEventType(t){return this.client}},wo=class{constructor(){this.storage=new vr,this.client=new ka}getClientDependingOnEventType(t){return this.client}},ch="xx",uh=e=>e?.startsWith(ch)||!1,lh=`
26
+ `;return new Wr(r)}var Wr=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},Fe=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},n=[];for(let o in this.definition){let i=this.definition[o].validate(r[o]);i&&n.push(`${o}: ${i}`)}if(n.length)throw um(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}},fe=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&X(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 ve(e){return e===void 0}function lm(e){return e===null}function X(e){return ve(e)||lm(e)}var ne=class{constructor(e={}){pe(this,"value");this.value=new fe(e)}validate(e){let t=this.value.validate(e);return t||(dm(e)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function dm(e){return ve(e)||fc(e)}function fc(e){return typeof e=="boolean"}var J=class{constructor(e={}){pe(this,"value");this.config=e,this.value=new fe(e)}validate(e){let t=this.value.validate(e);return t||(pm(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 pm(e){return ve(e)||mc(e)}function mc(e){return typeof e=="number"&&!Number.isNaN(e)}var fm=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,H=class{constructor(e={}){pe(this,"value");pe(this,"config");this.config={emptyAllowed:!0,url:!1,...e},this.value=new fe(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:o,ISODate:i}=this.config,a=this.value.validate(e);if(a)return a;if(ve(e))return null;if(!jn(e))return"value is not a string.";if(!t&&!e.length)return"value is an empty string.";if(r)try{new URL(e)}catch{return"value is not a valid URL."}return n&&!n.test(e)?`value did not match provided regex ${n}`:o&&!o.includes(e)?`value should be one of: ${o.join(", ")}.`:i&&!(fm.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 jn(e){return Object.prototype.toString.call(e)==="[object String]"}var K=class{constructor(e={}){pe(this,"config");this.config={options:{required:!1},values:{},...e}}validate(e){if(ve(e))return this.config.options.required?"value is required and is currently undefined":null;if(!gc(e))return"value is not an object";for(let[r,n]of Object.entries(this.config.values))if(n.required&&X(e[r]))return`value does not contain ${r}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let o=e[r],i=n.validate(o);i!==null&&(t+=` ${i}`)}return t===""?null:t}get default(){}get required(){return!!this.config.options.required}};function gc(e){return e!==void 0&&typeof e=="object"}var ie=class{constructor(e={}){pe(this,"value");this.config=e,this.value=new fe(this.config)}validate(e){if(!X(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(t!==null)return t;if(X(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&&X(n)&&(r=`value is null or undefined: ${e.join(",")}`);let o=this.validatePrimitiveValue(n,this.config.each);o!==null&&(r+=` ${o}`)}),r===""?null:r}return null}validatePrimitiveValue(e,t){return fc(e)||jn(e)||mc(e)||gc(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function yc(e){return Array.isArray(e)}var Vi=class{constructor(e){pe(this,"value");this.config=e,this.value=new fe(e)}validate(e){let t=this.value.validate(e);return t!==null?t:ve(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}};d();c();l();u();function hc(e){return Array.isArray(e)}function Mn(e){return e.trim()===""}var mm=new Set(["1",1,"yes",!0]);function Sc(){if(typeof navigator>"u"||typeof window>"u")return!1;let e=navigator,t=window;return[e.globalPrivacyControl,e.doNotTrack,e.msDoNotTrack,t.doNotTrack].some(r=>mm.has(r))}function vc(e){let t={};for(let[r,n]of e)t[r]=n;return t}function Kr(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function Nn(e,t,r={}){let n;return(...o)=>{let i=r.isImmediate&&!n;if(clearTimeout(n),n=setTimeout(()=>{n=void 0,r.isImmediate||e.apply(void 0,o)},t),i)return e.apply(void 0,o)}}function gm(e){if(Mn(e.openingDelimiter)||Mn(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(X(e.content)||Mn(e.content))return e.content;if(e.highlights.length===0)return Zt(e.content);let t=e.content.length,r="",n=0;for(let o=0;o<e.highlights.length;o++){let i=e.highlights[o],a=i.offset,m=a+i.length;if(m>t)break;r+=Zt(e.content.slice(n,a)),r+=e.openingDelimiter,r+=Zt(e.content.slice(a,m)),r+=e.closingDelimiter,n=m}return n!==t&&(r+=Zt(e.content.slice(n))),r}function ym(e,t){return e=Zt(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,i)=>n?Li(n,t.notMatchDelimiters):o?Li(o,t.exactMatchDelimiters):i?Li(i,t.correctionDelimiters):r)}function Li(e,t){return t?t.open+e+t.close:e}function Zt(e){let t={"&":"&amp;","<":"&lt;",">":"&gt;","\"":"&quot;","'":"&#x27;","`":"&#x60;"},r=`(?:${Object.keys(t).join("|")})`,n=RegExp(r),o=RegExp(r,"g");return n.test(e)?e.replace(o,i=>t[i]):e}d();c();l();u();var Oc=Be(Ic(),1);d();c();l();u();var Ge=new Error("Failed to load reducers."),er=class extends Error{constructor(){super(),this.name="UnauthorizedTokenError",this.message="The token being used to perform the request is unauthorized. It may be expired or invalid."}},jt=class extends Error{constructor(r,n){super();pe(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};d();c();l();u();function Pc(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function kc(e){return typeof e!="object"||!e?!1:Object.values(e).every(Qm)}function Qm(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Fc(e){return e===429}var $e=class e{static call(t){return _asyncToGenerator(function*(){let r=Bm(t),{logger:n}=t,o=yield e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:i,...a}=o,m=/*#__PURE__*/function(){var _ref=_asyncToGenerator(function*(){let f=yield A(i,a);if(Fc(f.status))throw f;return f});return function m(){return _ref.apply(this,arguments)}}();try{let f=yield(0,Oc.backOff)(m,{retry:p=>{let y=p&&Fc(p.status);return y&&n.info("Platform retrying request"),y}});switch(f.status){case 419:case 401:throw n.info("Platform renewing token"),new er;case 404:throw new jt(i,f.status);default:return n.info({response:f,requestInfo:o},"Platform response"),f}}catch(f){return f.message==="Failed to fetch"?new jt(i):f}})()}static preprocessRequest(t,r){return _asyncToGenerator(function*(){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:a}=r,{signal:m,...f}=t,p=Kr(f);try{let y=yield o(t,n,a);return{...t,...y}}catch(y){i.error(y,"Platform request preprocessing failed. Returning default request options.")}return p})()}};function Pe(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function pt(e,t="prod"){return`${Pe(e,t)}/rest/search/v2`}function Vn(e,t="prod"){return`${Pe(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function Bm(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:a}=e,m=e.method==="POST"||e.method==="PUT",f=$m(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...(m&&{body:f}),signal:a}}function $m(e,t){return t==="application/x-www-form-urlencoded"?kc(e)?Pc(e):"":JSON.stringify(e)}d();c();l();u();d();c();l();u();var Ln=e=>e;d();c();l();u();d();c();l();u();function Un(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function We(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:Un(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:Un(),extendedResults:{},searchAction:void 0}}d();c();l();u();function ft(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...i}=e;return i}var mt=e=>{let{response:t}=e;return t.body?Hm(e):zm(t)},Hm=e=>Wm(e)?Km(e):Gm(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},zm=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Gm(e){return e.body.statusCode!==void 0}function Wm(e){return e.body.exception!==void 0}var Km=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});d();c();l();u();var gt=class{constructor(){pe(this,"currentAbortController",null)}enqueue(t,r){var _this=this;return _asyncToGenerator(function*(){let n=_this.currentAbortController;_this.currentAbortController=new s.AbortController;let o=_this.currentAbortController;n&&(r.warnOnAbort&&r.logger.warn("Cancelling current pending search query"),n.abort());try{return yield t(o?.signal??null)}finally{_this.currentAbortController===o&&(_this.currentAbortController=null)}})()}};d();c();l();u();d();c();l();u();var Xr=class{constructor(t){pe(this,"_basePath");pe(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}};d();c();l();u();function Tc(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}d();c();l();u();var rt=(e,t,r,n)=>{let o=new Xr(`${e.url}${n}`);return o.addParam("organizationId",e.organizationId),e.authentication&&o.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:o.href,origin:"searchApiFetch"}};var Dc=/*#__PURE__*/function(){var _ref2=_asyncToGenerator(function*(e,t){let r=yield $e.call({...rt(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:ft(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=Tc(r),o=yield r.arrayBuffer(),a=new TextDecoder(n).decode(o);return Ym(a)?{success:a}:{error:mt({response:r,body:a})}});return function Dc(_x,_x2){return _ref2.apply(this,arguments)}}();function Ym(e){return typeof e=="string"}d();c();l();u();function Jm(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function Xm(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Qn(e,t){if(t&&e.name==="AbortError")return{error:Xm(e)};if(e instanceof jt)return{error:Jm(e)};throw e}var Bn=class{constructor(t){this.options=t;pe(this,"apiCallsQueues",{unknown:new gt,mainSearch:new gt,facetValues:new gt,foldingCollection:new gt,instantResults:new gt})}plan(t){var _this2=this;return _asyncToGenerator(function*(){let r=yield $e.call({...rt(t,"POST","application/json","/plan"),requestParams:ft(t),requestMetadata:{method:"plan"},..._this2.options});if(r instanceof Error)return Qn(r);let n=yield r.json();return eg(n)?{success:n}:{error:mt({response:r,body:n})}})()}querySuggest(t){var _this3=this;return _asyncToGenerator(function*(){let r=yield $e.call({...rt(t,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:ft(t),..._this3.options});if(r instanceof Error)return Qn(r);let n=yield r.json(),o={response:r,body:n};return Zm(n)?{success:(yield _this3.options.postprocessQuerySuggestResponseMiddleware(o)).body}:{error:mt(o)}})()}search(t,r){var _this4=this;return _asyncToGenerator(function*(){let n=r?.origin??"unknown",o=yield _this4.apiCallsQueues[n].enqueue(m=>$e.call({...rt(t,"POST","application/json",""),requestParams:ft(t),requestMetadata:{method:"search",origin:r?.origin},..._this4.options,signal:m??void 0}),{logger:_this4.options.logger,warnOnAbort:!r?.disableAbortWarning});if(o instanceof Error)return Qn(o,r?.disableAbortWarning);let i=yield o.json(),a={response:o,body:i};return qc(i)?(a.body=jc(i),{success:(yield _this4.options.postprocessSearchResponseMiddleware(a)).body}):{error:mt(a)}})()}facetSearch(t){var _this5=this;return _asyncToGenerator(function*(){let r=yield $e.call({...rt(t,"POST","application/json","/facet"),requestParams:ft(t),requestMetadata:{method:"facetSearch"},..._this5.options});if(r instanceof Error)throw r;let n=yield r.json(),o={response:r,body:n};return(yield _this5.options.postprocessFacetSearchResponseMiddleware(o)).body})()}recommendations(t){var _this6=this;return _asyncToGenerator(function*(){let r=yield $e.call({...rt(t,"POST","application/json",""),requestParams:ft(t),requestMetadata:{method:"recommendations"},..._this6.options});if(r instanceof Error)throw r;let n=yield r.json();if(qc(n)){let o={response:r,body:n};return o.body=jc(n),{success:(yield _this6.options.postprocessSearchResponseMiddleware(o)).body}}return{error:mt({response:r,body:n})}})()}html(t){var _this7=this;return _asyncToGenerator(function*(){return Dc(t,{..._this7.options})})()}fieldDescriptions(t){var _this8=this;return _asyncToGenerator(function*(){let r=yield $e.call({...rt(t,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},..._this8.options});if(r instanceof Error)throw r;let n=yield r.json();return tg(n)?{success:n}:{error:mt({response:r,body:n})}})()}},$n=e=>e.success!==void 0,Oe=e=>e.error!==void 0;function qc(e){return e.results!==void 0}function jc(e){let t=Un();return X(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}function Zm(e){return e.completions!==void 0}function eg(e){return e.preprocessingOutput!==void 0}function tg(e){return e.fields!==void 0}d();c();l();u();var Mc=e=>e,Nc=e=>e,_c=e=>e;d();c();l();u();d();c();l();u();d();c();l();u();function be(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 rg=typeof Symbol=="function"&&Symbol.observable||"@@observable",Vc=rg,Yi=()=>Math.random().toString(36).substring(7).split("").join("."),ng={INIT:`@@redux/INIT${Yi()}`,REPLACE:`@@redux/REPLACE${Yi()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Yi()}`},Hn=ng;function Ke(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 Ji(e,t,r){if(typeof e!="function")throw new Error(be(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(be(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(be(1));return r(Ji)(e,t)}let n=e,o=t,i=new Map,a=i,m=0,f=!1;function p(){a===i&&(a=new Map,i.forEach((P,w)=>{a.set(w,P)}))}function y(){if(f)throw new Error(be(3));return o}function h(P){if(typeof P!="function")throw new Error(be(4));if(f)throw new Error(be(5));let w=!0;p();let F=m++;return a.set(F,P),function(){if(w){if(f)throw new Error(be(6));w=!1,p(),a.delete(F),i=null}}}function S(P){if(!Ke(P))throw new Error(be(7));if(typeof P.type>"u")throw new Error(be(8));if(typeof P.type!="string")throw new Error(be(17));if(f)throw new Error(be(9));try{f=!0,o=n(o,P)}finally{f=!1}return(i=a).forEach(F=>{F()}),P}function g(P){if(typeof P!="function")throw new Error(be(10));n=P,S({type:Hn.REPLACE})}function v(){let P=h;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(be(11));function F(){let E=w;E.next&&E.next(y())}return F(),{unsubscribe:P(F)}},[Vc](){return this}}}return S({type:Hn.INIT}),{dispatch:S,subscribe:h,getState:y,replaceReducer:g,[Vc]:v}}function og(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Hn.INIT})>"u")throw new Error(be(12));if(typeof r(void 0,{type:Hn.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(be(13))})}function tr(e){let t=Object.keys(e),r={};for(let a=0;a<t.length;a++){let m=t[a];typeof e[m]=="function"&&(r[m]=e[m])}let n=Object.keys(r),o,i;try{og(r)}catch(a){i=a}return function(m={},f){if(i)throw i;let p=!1,y={};for(let h=0;h<n.length;h++){let S=n[h],g=r[S],v=m[S],R=g(v,f);if(typeof R>"u"){let P=f&&f.type;throw new Error(be(14))}y[S]=R,p=p||R!==v}return p=p||n.length!==Object.keys(m).length,p?y:m}}function rr(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function Lc(...e){return t=>(r,n)=>{let o=t(r,n),i=()=>{throw new Error(be(15))},a={getState:o.getState,dispatch:(f,...p)=>i(f,...p)},m=e.map(f=>f(a));return i=rr(...m)(o.dispatch),{...o,dispatch:i}}}function zn(e){return Ke(e)&&"type"in e&&typeof e.type=="string"}d();c();l();u();var sa=Symbol.for("immer-nothing"),Zr=Symbol.for("immer-draftable"),Te=Symbol.for("immer-state");function Ae(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Nt=Object.getPrototypeOf;function Me(e){return!!e&&!!e[Te]}function De(e){return e?Hc(e)||Array.isArray(e)||!!e[Zr]||!!e.constructor?.[Zr]||nr(e)||an(e):!1}var ig=Object.prototype.constructor.toString();function Hc(e){if(!e||typeof e!="object")return!1;let t=Nt(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)===ig}function ca(e){return Me(e)||Ae(15,e),e[Te].base_}function en(e,t){_t(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function _t(e){let t=e[Te];return t?t.type_:Array.isArray(e)?1:nr(e)?2:an(e)?3:0}function tn(e,t){return _t(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Xi(e,t){return _t(e)===2?e.get(t):e[t]}function zc(e,t,r){let n=_t(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 nr(e){return e instanceof Map}function an(e){return e instanceof Set}function Mt(e){return e.copy_||e.base_}function ta(e,t){if(nr(e))return new Map(e);if(an(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Hc(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[Te];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let a=o[i],m=n[a];m.writable===!1&&(m.writable=!0,m.configurable=!0),(m.get||m.set)&&(n[a]={configurable:!0,writable:!0,enumerable:m.enumerable,value:e[a]})}return Object.create(Nt(e),n)}else{let n=Nt(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function Yn(e,t=!1){return Jn(e)||Me(e)||!De(e)||(_t(e)>1&&Object.defineProperties(e,{set:{value:Gn},add:{value:Gn},clear:{value:Gn},delete:{value:Gn}}),Object.freeze(e),t&&Object.values(e).forEach(r=>Yn(r,!0))),e}function Gn(){Ae(2)}function Jn(e){return Object.isFrozen(e)}var ra={};function Vt(e){let t=ra[e];return t||Ae(0,e),t}function sg(e,t){ra[e]||(ra[e]=t)}var rn;function Gc(){return rn}function cg(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Uc(e,t){t&&(Vt("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function na(e){oa(e),e.drafts_.forEach(ug),e.drafts_=null}function oa(e){e===rn&&(rn=e.parent_)}function Qc(e){return rn=cg(rn,e)}function ug(e){let t=e[Te];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Bc(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Te].modified_&&(na(t),Ae(4)),De(e)&&(e=Wn(t,e),t.parent_||Kn(t,e)),t.patches_&&Vt("Patches").generateReplacementPatches_(r[Te].base_,e,t.patches_,t.inversePatches_)):e=Wn(t,r,[]),na(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==sa?e:void 0}function Wn(e,t,r){if(Jn(t))return t;let n=t[Te];if(!n)return en(t,(o,i)=>$c(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return Kn(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,i=o,a=!1;n.type_===3&&(i=new Set(o),o.clear(),a=!0),en(i,(m,f)=>$c(e,n,o,m,f,r,a)),Kn(e,o,!1),r&&e.patches_&&Vt("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function $c(e,t,r,n,o,i,a){if(Me(o)){let m=i&&t&&t.type_!==3&&!tn(t.assigned_,n)?i.concat(n):void 0,f=Wn(e,o,m);if(zc(r,n,f),Me(f))e.canAutoFreeze_=!1;else return}else a&&r.add(o);if(De(o)&&!Jn(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Wn(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(nr(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&Kn(e,o)}}function Kn(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Yn(t,r)}function lg(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Gc(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,i=ua;r&&(o=[n],i=nn);let{revoke:a,proxy:m}=Proxy.revocable(o,i);return n.draft_=m,n.revoke_=a,m}var ua={get(e,t){if(t===Te)return e;let r=Mt(e);if(!tn(r,t))return dg(e,r,t);let n=r[t];return e.finalized_||!De(n)?n:n===Zi(e.base_,t)?(ea(e),e.copy_[t]=aa(n,e)):n},has(e,t){return t in Mt(e)},ownKeys(e){return Reflect.ownKeys(Mt(e))},set(e,t,r){let n=Wc(Mt(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=Zi(Mt(e),t),i=o?.[Te];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(ag(r,o)&&(r!==void 0||tn(e.base_,t)))return!0;ea(e),ia(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 Zi(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,ea(e),ia(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Mt(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Ae(11)},getPrototypeOf(e){return Nt(e.base_)},setPrototypeOf(){Ae(12)}},nn={};en(ua,(e,t)=>{nn[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});nn.deleteProperty=function(e,t){return nn.set.call(this,e,t,void 0)};nn.set=function(e,t,r){return ua.set.call(this,e[0],t,r,e[0])};function Zi(e,t){let r=e[Te];return(r?Mt(r):e)[t]}function dg(e,t,r){let n=Wc(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function Wc(e,t){if(!(t in e))return;let r=Nt(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Nt(r)}}function ia(e){e.modified_||(e.modified_=!0,e.parent_&&ia(e.parent_))}function ea(e){e.copy_||(e.copy_=ta(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var pg=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let i=r;r=t;let a=this;return function(f=i,...p){return a.produce(f,y=>r.call(this,y,...p))}}typeof r!="function"&&Ae(6),n!==void 0&&typeof n!="function"&&Ae(7);let o;if(De(t)){let i=Qc(this),a=aa(t,void 0),m=!0;try{o=r(a),m=!1}finally{m?na(i):oa(i)}return Uc(i,n),Bc(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===sa&&(o=void 0),this.autoFreeze_&&Yn(o,!0),n){let i=[],a=[];Vt("Patches").generateReplacementPatches_(t,o,i,a),n(i,a)}return o}else Ae(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...m)=>this.produceWithPatches(a,f=>t(f,...m));let n,o;return[this.produce(t,r,(a,m)=>{n=a,o=m}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){De(e)||Ae(8),Me(e)&&(e=Kc(e));let t=Qc(this),r=aa(e,void 0);return r[Te].isManual_=!0,oa(t),r}finishDraft(e,t){let r=e&&e[Te];(!r||!r.isManual_)&&Ae(9);let{scope_:n}=r;return Uc(n,t),Bc(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 o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=Vt("Patches").applyPatches_;return Me(e)?n(e,t):this.produce(e,o=>n(o,t))}};function aa(e,t){let r=nr(e)?Vt("MapSet").proxyMap_(e,t):an(e)?Vt("MapSet").proxySet_(e,t):lg(e,t);return(t?t.scope_:Gc()).drafts_.push(r),r}function Kc(e){return Me(e)||Ae(10,e),Yc(e)}function Yc(e){if(!De(e)||Jn(e))return e;let t=e[Te],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=ta(e,t.scope_.immer_.useStrictShallowCopy_)}else r=ta(e,!0);return en(r,(n,o)=>{zc(r,n,Yc(o))}),t&&(t.finalized_=!1),r}function Jc(){let t="replace",r="add",n="remove";function o(S,g,v,R){switch(S.type_){case 0:case 2:return a(S,g,v,R);case 1:return i(S,g,v,R);case 3:return m(S,g,v,R)}}function i(S,g,v,R){let{base_:P,assigned_:w}=S,F=S.copy_;F.length<P.length&&([P,F]=[F,P],[v,R]=[R,v]);for(let x=0;x<P.length;x++)if(w[x]&&F[x]!==P[x]){let E=g.concat([x]);v.push({op:t,path:E,value:h(F[x])}),R.push({op:t,path:E,value:h(P[x])})}for(let x=P.length;x<F.length;x++){let E=g.concat([x]);v.push({op:r,path:E,value:h(F[x])})}for(let x=F.length-1;P.length<=x;--x){let E=g.concat([x]);R.push({op:n,path:E})}}function a(S,g,v,R){let{base_:P,copy_:w}=S;en(S.assigned_,(F,x)=>{let E=Xi(P,F),M=Xi(w,F),O=x?tn(P,F)?t:r:n;if(E===M&&O===t)return;let I=g.concat(F);v.push(O===n?{op:O,path:I}:{op:O,path:I,value:M}),R.push(O===r?{op:n,path:I}:O===n?{op:r,path:I,value:h(E)}:{op:t,path:I,value:h(E)})})}function m(S,g,v,R){let{base_:P,copy_:w}=S,F=0;P.forEach(x=>{if(!w.has(x)){let E=g.concat([F]);v.push({op:n,path:E,value:x}),R.unshift({op:r,path:E,value:x})}F++}),F=0,w.forEach(x=>{if(!P.has(x)){let E=g.concat([F]);v.push({op:r,path:E,value:x}),R.unshift({op:n,path:E,value:x})}F++})}function f(S,g,v,R){v.push({op:t,path:[],value:g===sa?void 0:g}),R.push({op:t,path:[],value:S})}function p(S,g){return g.forEach(v=>{let{path:R,op:P}=v,w=S;for(let M=0;M<R.length-1;M++){let O=_t(w),I=R[M];typeof I!="string"&&typeof I!="number"&&(I=""+I),(O===0||O===1)&&(I==="__proto__"||I==="constructor")&&Ae(19),typeof w=="function"&&I==="prototype"&&Ae(19),w=Xi(w,I),typeof w!="object"&&Ae(18,R.join("/"))}let F=_t(w),x=y(v.value),E=R[R.length-1];switch(P){case t:switch(F){case 2:return w.set(E,x);case 3:Ae(16);default:return w[E]=x}case r:switch(F){case 1:return E==="-"?w.push(x):w.splice(E,0,x);case 2:return w.set(E,x);case 3:return w.add(x);default:return w[E]=x}case n:switch(F){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:Ae(17,P)}}),S}function y(S){if(!De(S))return S;if(Array.isArray(S))return S.map(y);if(nr(S))return new Map(Array.from(S.entries()).map(([v,R])=>[v,y(R)]));if(an(S))return new Set(Array.from(S).map(y));let g=Object.create(Nt(S));for(let v in S)g[v]=y(S[v]);return tn(S,Zr)&&(g[Zr]=S[Zr]),g}function h(S){return Me(S)?y(S):S}sg("Patches",{applyPatches_:p,generatePatches_:o,generateReplacementPatches_:f})}var on=new pg,nt=on.produce,Xn=on.produceWithPatches.bind(on);var la=on.applyPatches.bind(on);d();c();l();u();function fg(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 gg(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 Xc=e=>Array.isArray(e)?e:[e];function yg(e){let t=Array.isArray(e[0])?e[0]:e;return gg(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function hg(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var iR=Symbol();var aR=Object.getPrototypeOf({});var Sg=class{constructor(e){this.value=e}deref(){return this.value}},vg=typeof WeakRef<"u"?WeakRef:Sg,bg=0,Zc=1;function Zn(){return{s:bg,v:void 0,o:null,p:null}}function or(e,t={}){let r=Zn(),{resultEqualityCheck:n}=t,o,i=0;function a(){let m=r,{length:f}=arguments;for(let h=0,S=f;h<S;h++){let g=arguments[h];if(typeof g=="function"||typeof g=="object"&&g!==null){let v=m.o;v===null&&(m.o=v=new WeakMap);let R=v.get(g);R===void 0?(m=Zn(),v.set(g,m)):m=R}else{let v=m.p;v===null&&(m.p=v=new Map);let R=v.get(g);R===void 0?(m=Zn(),v.set(g,m)):m=R}}let p=m,y;if(m.s===Zc)y=m.v;else if(y=e.apply(null,arguments),i++,n){let h=o?.deref?.()??o;h!=null&&n(h,y)&&(y=h,i!==0&&i--),o=typeof y=="object"&&y!==null||typeof y=="function"?new vg(y):y}return p.s=Zc,p.v=y,y}return a.clearCache=()=>{r=Zn(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function eu(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let i=0,a=0,m,f={},p=o.pop();typeof p=="object"&&(f=p,p=o.pop()),fg(p,`createSelector expects an output function after the inputs, but received: [${typeof p}]`);let y={...r,...f},{memoize:h,memoizeOptions:S=[],argsMemoize:g=or,argsMemoizeOptions:v=[],devModeChecks:R={}}=y,P=Xc(S),w=Xc(v),F=yg(o),x=h(function(){return i++,p.apply(null,arguments)},...P),E=!0,M=g(function(){a++;let I=hg(F,arguments);return m=x.apply(null,I),m},...w);return Object.assign(M,{resultFunc:p,memoizedResultFunc:x,dependencies:F,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>m,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:h,argsMemoize:g})};return Object.assign(n,{withTypes:()=>n}),n}var se=eu(or),Ag=Object.assign((e,t=se)=>{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(i=>e[i]);return t(n,(...i)=>i.reduce((a,m,f)=>(a[r[f]]=m,a),{}))},{withTypes:()=>Ag});d();c();l();u();function tu(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var ru=tu(),nu=tu;var Cg=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?rr:rr.apply(null,arguments)},xR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},wg=e=>e&&typeof e.match=="function";function T(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(He(0));return{type:e,payload:o.payload,...("meta"in o&&{meta:o.meta}),...("error"in o&&{error:o.error})}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>zn(n)&&n.type===e,r}var cu=class sn extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,sn.prototype)}static get[Symbol.species](){return sn}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new sn(...t[0].concat(this)):new sn(...t.concat(this))}};function ou(e){return De(e)?nt(e,()=>{}):e}function iu(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 Rg=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},a=new cu;return r&&(xg(r)?a.push(ru):a.push(nu(r.extraArgument))),a},cn="RTK_autoBatch",ar=()=>e=>({payload:e,meta:{[cn]:!0}}),au=e=>t=>{setTimeout(t,e)},Eg=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,i=!1,a=!1,m=new Set,f=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:au(10):e.type==="callback"?e.queueNotification:au(e.timeout),p=()=>{a=!1,i&&(i=!1,m.forEach(y=>y()))};return Object.assign({},n,{subscribe(y){let h=()=>o&&y(),S=n.subscribe(h);return m.add(y),()=>{S(),m.delete(y)}},dispatch(y){try{return o=!y?.meta?.[cn],i=!o,i&&(a||(a=!0,f(p))),n.dispatch(y)}finally{o=!0}}})},Ig=e=>function(r){let{autoBatch:n=!0}=r??{},o=new cu(e);return n&&o.push(Eg(typeof n=="object"?n:void 0)),o};function uu(e){let t=Rg(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:i=void 0,enhancers:a=void 0}=e||{},m;if(typeof r=="function")m=r;else if(Ke(r))m=tr(r);else throw new Error(He(1));let f;typeof n=="function"?f=n(t):f=t();let p=rr;o&&(p=Cg({trace:!1,...(typeof o=="object"&&o)}));let y=Lc(...f),h=Ig(y),S=typeof a=="function"?a(h):h(),g=p(...S);return Ji(m,i,g)}function lu(e){let t={},r=[],n,o={addCase(i,a){let m=typeof i=="string"?i:i.type;if(!m)throw new Error(He(28));if(m in t)throw new Error(He(29));return t[m]=a,o},addMatcher(i,a){return r.push({matcher:i,reducer:a}),o},addDefaultCase(i){return n=i,o}};return e(o),[t,r,n]}function Pg(e){return typeof e=="function"}function ge(e,t){let[r,n,o]=lu(t),i;if(Pg(e))i=()=>ou(e());else{let m=ou(e);i=()=>m}function a(m=i(),f){let p=[r[f.type],...n.filter(({matcher:y})=>y(f)).map(({reducer:y})=>y)];return p.filter(y=>!!y).length===0&&(p=[o]),p.reduce((y,h)=>{if(h)if(Me(y)){let g=h(y,f);return g===void 0?y:g}else{if(De(y))return nt(y,S=>h(S,f));{let S=h(y,f);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},m)}return a.getInitialState=i,a}var du=(e,t)=>wg(e)?e.match(t):e(t);function Ye(...e){return t=>e.some(r=>du(r,t))}function ir(...e){return t=>e.every(r=>du(r,t))}function to(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 un(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function ro(...e){return e.length===0?t=>to(t,["pending"]):un(e)?Ye(...e.map(t=>t.pending)):ro()(e[0])}function Lt(...e){return e.length===0?t=>to(t,["rejected"]):un(e)?Ye(...e.map(t=>t.rejected)):Lt()(e[0])}function ln(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?ir(Lt(...e),t):un(e)?ir(Lt(...e),t):ln()(e[0])}function ot(...e){return e.length===0?t=>to(t,["fulfilled"]):un(e)?Ye(...e.map(t=>t.fulfilled)):ot()(e[0])}function no(...e){return e.length===0?t=>to(t,["pending","fulfilled","rejected"]):un(e)?Ye(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):no()(e[0])}var kg="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",oo=(e=21)=>{let t="",r=e;for(;r--;)t+=kg[Math.random()*64|0];return t},Fg=["name","message","stack","code"],da=class{constructor(e,t){pe(this,"_type");this.payload=e,this.meta=t}},su=class{constructor(e,t){pe(this,"_type");this.payload=e,this.meta=t}},Og=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)}},le=(()=>{function e(t,r,n){let o=T(t+"/fulfilled",(f,p,y,h)=>({payload:f,meta:{...(h||{}),arg:y,requestId:p,requestStatus:"fulfilled"}})),i=T(t+"/pending",(f,p,y)=>({payload:void 0,meta:{...(y||{}),arg:p,requestId:f,requestStatus:"pending"}})),a=T(t+"/rejected",(f,p,y,h,S)=>({payload:h,error:(n&&n.serializeError||Og)(f||"Rejected"),meta:{...(S||{}),arg:y,requestId:p,rejectedWithValue:!!h,requestStatus:"rejected",aborted:f?.name==="AbortError",condition:f?.name==="ConditionError"}}));function m(f){return(p,y,h)=>{let S=n?.idGenerator?n.idGenerator(f):oo(),g=new s.AbortController,v,R;function P(F){R=F,g.abort()}let w=_asyncToGenerator(function*(){let F;try{let E=n?.condition?.(f,{getState:y,extra:h});if(Dg(E)&&(E=yield E),E===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let M=new Promise((O,I)=>{v=()=>{I({name:"AbortError",message:R||"Aborted"})},g.signal.addEventListener("abort",v)});p(i(S,f,n?.getPendingMeta?.({requestId:S,arg:f},{getState:y,extra:h}))),F=yield Promise.race([M,Promise.resolve(r(f,{dispatch:p,getState:y,extra:h,requestId:S,signal:g.signal,abort:P,rejectWithValue:(O,I)=>new da(O,I),fulfillWithValue:(O,I)=>new su(O,I)})).then(O=>{if(O instanceof da)throw O;return O instanceof su?o(O.payload,S,f,O.meta):o(O,S,f)})])}catch(E){F=E instanceof da?a(null,S,f,E.payload,E.meta):a(E,S,f)}finally{v&&g.signal.removeEventListener("abort",v)}return n&&!n.dispatchConditionRejection&&a.match(F)&&F.meta.condition||p(F),F})();return Object.assign(w,{abort:P,requestId:S,arg:f,unwrap(){return w.then(Tg)}})}}return Object.assign(m,{pending:i,rejected:a,fulfilled:o,settled:Ye(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Tg(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Dg(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var pu=Symbol.for("rtk-slice-createasyncthunk"),kR={[pu]:le};function qg(e,t){return`${e}/${t}`}function jg({creators:e}={}){let t=e?.asyncThunk?.[pu];return function(n){let{name:o,reducerPath:i=o}=n;if(!o)throw new Error(He(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(Ng()):n.reducers)||{},m=Object.keys(a),f={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},p={addCase(F,x){let E=typeof F=="string"?F:F.type;if(!E)throw new Error(He(12));if(E in f.sliceCaseReducersByType)throw new Error(He(13));return f.sliceCaseReducersByType[E]=x,p},addMatcher(F,x){return f.sliceMatchers.push({matcher:F,reducer:x}),p},exposeAction(F,x){return f.actionCreators[F]=x,p},exposeCaseReducer(F,x){return f.sliceCaseReducersByName[F]=x,p}};m.forEach(F=>{let x=a[F],E={reducerName:F,type:qg(o,F),createNotation:typeof n.reducers=="function"};Vg(x)?Ug(E,x,p,t):_g(E,x,p)});function y(){let[F={},x=[],E=void 0]=typeof n.extraReducers=="function"?lu(n.extraReducers):[n.extraReducers],M={...F,...f.sliceCaseReducersByType};return ge(n.initialState,O=>{for(let I in M)O.addCase(I,M[I]);for(let I of f.sliceMatchers)O.addMatcher(I.matcher,I.reducer);for(let I of x)O.addMatcher(I.matcher,I.reducer);E&&O.addDefaultCase(E)})}let h=F=>F,S=new Map,g;function v(F,x){return g||(g=y()),g(F,x)}function R(){return g||(g=y()),g.getInitialState()}function P(F,x=!1){function E(O){let I=O[F];return typeof I>"u"&&x&&(I=R()),I}function M(O=h){let I=iu(S,x,()=>new WeakMap);return iu(I,O,()=>{let k={};for(let[D,N]of Object.entries(n.selectors??{}))k[D]=Mg(N,O,R,x);return k})}return{reducerPath:F,getSelectors:M,get selectors(){return M(E)},selectSlice:E}}let w={name:o,reducer:v,actions:f.actionCreators,caseReducers:f.sliceCaseReducersByName,getInitialState:R,...P(i),injectInto(F,{reducerPath:x,...E}={}){let M=x??i;return F.inject({reducerPath:M,reducer:v},E),{...w,...P(M,!0)}}};return w}}function Mg(e,t,r,n){function o(i,...a){let m=t(i);return typeof m>"u"&&n&&(m=r()),e(m,...a)}return o.unwrapped=e,o}var Ut=jg();function Ng(){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 _g({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!Lg(n))throw new Error(He(17));i=n.reducer,a=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?T(e,a):T(e))}function Vg(e){return e._reducerDefinitionType==="asyncThunk"}function Lg(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Ug({type:e,reducerName:t},r,n,o){if(!o)throw new Error(He(18));let{payloadCreator:i,fulfilled:a,pending:m,rejected:f,settled:p,options:y}=r,h=o(e,i,y);n.exposeAction(t,h),a&&n.addCase(h.fulfilled,a),m&&n.addCase(h.pending,m),f&&n.addCase(h.rejected,f),p&&n.addMatcher(h.settled,p),n.exposeCaseReducer(t,{fulfilled:a||eo,pending:m||eo,rejected:f||eo,settled:p||eo})}function eo(){}var fu="listener",mu="completed",gu="cancelled",FR=`task-${gu}`,OR=`task-${mu}`,TR=`${fu}-${gu}`,DR=`${fu}-${mu}`;var{assign:yu}=Object;var pa="listenerMiddleware";var Qg=yu(T(`${pa}/add`),{withTypes:()=>Qg}),qR=T(`${pa}/removeAll`),Bg=yu(T(`${pa}/remove`),{withTypes:()=>Bg});var jR=Symbol.for("rtk-state-proxy-original");function He(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. `}d();c();l();u();var W=new H({required:!0,emptyAllowed:!1}),Ce=new H({required:!1,emptyAllowed:!1}),we=new H({required:!0,emptyAllowed:!0}),zR=new H({required:!1,emptyAllowed:!0}),io=new ie({each:W,required:!0}),hu=new H({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Su=new H({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),GR=new H({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),it=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Ve=(e,t)=>{if("required"in t)return{payload:new Fe({value:t}).validate({value:e}).value};let o=new K({options:{required:!0},values:t}).validate(e);if(o)throw new Wr(o);return{payload:e}},Q=(e,t)=>{try{return Ve(e,t)}catch(r){return{payload:e,error:it(r)}}},vu=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return Au(e,t,r,o,"Controller initialization error")},bu=(e,t,r,n)=>{let o=`Check the options of ${n}`;return Au(e,t,r,o,"Controller initialization error")},Au=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(i){throw e.logger.error(i,o),i}};d();c();l();u();var sr="3.31.1-pre.003bd2b1f2",Cu=["@coveo/atomic","@coveo/quantic"];var fa=()=>Ce,wu=()=>W,yt=T("configuration/updateBasicConfiguration",e=>Q(e,{accessToken:Ce,environment:new H({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:Ce})),Je=T("configuration/updateSearchConfiguration",e=>Q(e,{proxyBaseUrl:new H({required:!1,url:!0}),pipeline:new H({required:!1,emptyAllowed:!0}),searchHub:Ce,timezone:Ce,locale:Ce,authenticationProviders:new ie({required:!1,each:W})})),$g={enabled:new ne({default:!0}),originContext:fa(),originLevel2:fa(),originLevel3:fa(),proxyBaseUrl:new H({required:!1,url:!0}),runtimeEnvironment:new fe,anonymous:new ne({default:!1}),deviceId:Ce,userDisplayName:Ce,documentLocation:Ce,trackingId:Su,analyticsMode:new H({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new K({options:{required:!1},values:Cu.reduce((e,t)=>(e[t]=hu,e),{})})},cr=T("configuration/updateAnalyticsConfiguration",e=>Q(e,$g)),ur=T("configuration/analytics/disable"),lr=T("configuration/analytics/enable"),ao=T("configuration/analytics/originlevel2",e=>Q(e,{originLevel2:wu()})),so=T("configuration/analytics/originlevel3",e=>Q(e,{originLevel3:wu()}));d();c();l();u();d();c();l();u();d();c();l();u();var xu={q:new H,enableQuerySyntax:new ne,aq:new H,cq:new H,firstResult:new J({min:0}),numberOfResults:new J({min:0}),sortCriteria:new H,f:new K,fExcluded:new K,cf:new K,nf:new K,mnf:new K,df:new K,debug:new ne,sf:new K,tab:new H,af:new K};var ht=T("searchParameters/restore",e=>Q(e,xu)),Ru=T("searchParameters/restoreTab",e=>Q(e,W));d();c();l();u();var co=T("debug/enable"),uo=T("debug/disable");d();c();l();u();var lo=()=>!1;var po=ge(lo(),e=>{e.addCase(co,()=>!0).addCase(uo,()=>!1).addCase(ht,(t,r)=>r.payload.debug??t)});d();c();l();u();var dr=T("pipeline/set",e=>Q(e,new H({required:!0,emptyAllowed:!0})));d();c();l();u();d();c();l();u();var Hg=T("history/undo"),zg=T("history/redo"),Xe=T("history/snapshot"),rI=le("history/back",/*#__PURE__*/function(){var _ref4=_asyncToGenerator(function*(e,{dispatch:t}){t(Hg()),yield t(qe())});return function(_x3,_x4){return _ref4.apply(this,arguments)}}()),nI=le("history/forward",/*#__PURE__*/function(){var _ref5=_asyncToGenerator(function*(e,{dispatch:t}){t(zg()),yield t(qe())});return function(_x5,_x6){return _ref5.apply(this,arguments)}}()),qe=le("history/change",/*#__PURE__*/function(){var _ref6=_asyncToGenerator(function*(e,{getState:t}){return t().history.present});return function(_x7,_x8){return _ref6.apply(this,arguments)}}());d();c();l();u();var pr=()=>"";var fr=ge(pr(),e=>{e.addCase(dr,(t,r)=>r.payload).addCase(qe.fulfilled,(t,r)=>r.payload?.pipeline??t).addCase(Je,(t,r)=>r.payload.pipeline||t)});d();c();l();u();d();c();l();u();var fo=T("app/setError");d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();var mr=class e{static set(t,r,n){let o,i,a;n&&(i=new Date,i.setTime(i.getTime()+n));let m=window.location.hostname,f=/^(\d{1,3}\.){3}\d{1,3}$/,p=/^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}$/;f.test(m)||p.test(m)||m.indexOf(".")===-1?ma(t,r,i):(a=m.split("."),o=a[a.length-2]+"."+a[a.length-1],ma(t,r,i,o))}static get(t){let r=t+"=",n=document.cookie.split(";");for(let o=0;o<n.length;o++){let i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function ma(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}d();c();l();u();function Gg(){return typeof navigator<"u"}function Eu(){try{return typeof localStorage<"u"}catch{return!1}}function Iu(){try{return typeof sessionStorage<"u"}catch{return!1}}function Pu(){return!!(Gg()&&navigator.cookieEnabled)}var ku=null;function Fu(){return ku||(Eu()?localStorage:Pu()?new ga:Iu()?sessionStorage:new ya)}var gr=class gr{getItem(t){return mr.get(`${gr.prefix}${t}`)}removeItem(t){mr.erase(`${gr.prefix}${t}`)}setItem(t,r,n){mr.set(`${gr.prefix}${t}`,r,n)}};pe(gr,"prefix","coveo_");var ga=gr;var ya=class{getItem(t){return null}removeItem(t){}setItem(t,r){}};var mo="__coveo.analytics.history",Wg=20,Kg=1e3*60,Yg=75,Qt=class Qt{constructor(t){pe(this,"store");this.store=t||Fu()}static getInstance(t){return Qt.instance||(Qt.instance=new Qt(t)),Qt.instance}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!==null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){var _this9=this;return _asyncToGenerator(function*(){t.internalTime=new Date().getTime(),t=_this9.cropQueryElement(_this9.stripEmptyQuery(t));let r=yield _this9.getHistoryWithInternalTimeAsync();r!==null?_this9.isValidEntry(t)&&_this9.setHistory([t].concat(r)):_this9.setHistory([t])})()}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){var _this0=this;return _asyncToGenerator(function*(){let t=yield _this0.getHistoryWithInternalTimeAsync();return _this0.stripEmptyQueries(_this0.stripInternalTime(t))})()}getHistoryWithInternalTime(){try{let t=this.store.getItem(mo);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){var _this1=this;return _asyncToGenerator(function*(){try{let t=yield _this1.store.getItem(mo);return t?JSON.parse(t):[]}catch{return[]}})()}setHistory(t){try{this.store.setItem(mo,JSON.stringify(t.slice(0,Wg)))}catch{}}clear(){try{this.store.removeItem(mo)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,Yg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value===t.value?(t.internalTime||0)-(r.internalTime||0)>Kg:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};pe(Qt,"instance",null);var ha=Qt,Le=ha;d();c();l();u();d();c();l();u();var yr=se(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${sr}`));d();c();l();u();d();c();l();u();function at(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function q(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function m(y){try{p(n.next(y))}catch(h){a(h)}}function f(y){try{p(n.throw(y))}catch(h){a(h)}}function p(y){y.done?i(y.value):o(y.value).then(m,f)}p((n=n.apply(e,t||[])).next())})}var ae;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ae||(ae={}));function ba(){return typeof window<"u"}function Da(){return typeof navigator<"u"}function hr(){return typeof document<"u"}function Aa(){try{return typeof localStorage<"u"}catch{return!1}}function Jg(){try{return typeof sessionStorage<"u"}catch{return!1}}function $u(){return Da()&&navigator.cookieEnabled}var Xg=[ae.click,ae.custom,ae.search,ae.view],Zg=(e,t)=>Xg.indexOf(e)!==-1?Object.assign({language:hr()?document.documentElement.lang:"unknown",userAgent:Da()?navigator.userAgent:"unknown"},t):t,pn=class e{static set(t,r,n){var o,i,a,m;n&&(i=new Date,i.setTime(i.getTime()+n)),m=window.location.hostname,m.indexOf(".")===-1?Ou(t,r,i):(a=m.split("."),o=a[a.length-2]+"."+a[a.length-1],Ou(t,r,i,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function Ou(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function ey(){return Aa()?localStorage:$u()?new fn:Jg()?sessionStorage:new vr}var fn=class e{getItem(t){return pn.get(`${e.prefix}${t}`)}removeItem(t){pn.erase(`${e.prefix}${t}`)}setItem(t,r,n){pn.set(`${e.prefix}${t}`,r,n)}};fn.prefix="coveo_";var Ca=class{constructor(){this.cookieStorage=new fn}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)}},vr=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},go="__coveo.analytics.history",ty=20,ry=1e3*60,ny=75,So=class{constructor(t){this.store=t||ey()}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 q(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 q(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(go);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return q(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(go);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(go,JSON.stringify(t.slice(0,ty)))}catch{}}clear(){try{this.store.removeItem(go)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,ny)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>ry:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}};var oy=(e,t)=>q(void 0,void 0,void 0,function*(){return e===ae.view?(yield iy(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),iy=e=>q(void 0,void 0,void 0,function*(){let t=new So,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),yo,ay=new Uint8Array(16);function sy(){if(!yo&&(yo=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!yo))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return yo(ay)}var cy=/^(?:[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 vo(e){return typeof e=="string"&&cy.test(e)}var xe=[];for(let e=0;e<256;++e)xe.push((e+256).toString(16).slice(1));function Hu(e,t=0){return(xe[e[t+0]]+xe[e[t+1]]+xe[e[t+2]]+xe[e[t+3]]+"-"+xe[e[t+4]]+xe[e[t+5]]+"-"+xe[e[t+6]]+xe[e[t+7]]+"-"+xe[e[t+8]]+xe[e[t+9]]+"-"+xe[e[t+10]]+xe[e[t+11]]+xe[e[t+12]]+xe[e[t+13]]+xe[e[t+14]]+xe[e[t+15]]).toLowerCase()}function uy(e){if(!vo(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 ly(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var dy="6ba7b810-9dad-11d1-80b4-00c04fd430c8",py="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function fy(e,t,r){function n(o,i,a,m){var f;if(typeof o=="string"&&(o=ly(o)),typeof i=="string"&&(i=uy(i)),((f=i)===null||f===void 0?void 0:f.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let p=new Uint8Array(16+o.length);if(p.set(i),p.set(o,i.length),p=r(p),p[6]=p[6]&15|t,p[8]=p[8]&63|128,a){m=m||0;for(let y=0;y<16;++y)a[m+y]=p[y];return a}return Hu(p)}try{n.name=e}catch{}return n.DNS=dy,n.URL=py,n}var my=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Tu={randomUUID:my};function Bt(e,t,r){if(Tu.randomUUID&&!t&&!e)return Tu.randomUUID();e=e||{};let n=e.random||(e.rng||sy)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return Hu(n)}function gy(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 Sa(e,t){return e<<t|e>>>32-t}function yy(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let a=unescape(encodeURIComponent(e));e=[];for(let m=0;m<a.length;++m)e.push(a.charCodeAt(m))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),i=new Array(o);for(let a=0;a<o;++a){let m=new Uint32Array(16);for(let f=0;f<16;++f)m[f]=e[a*64+f*4]<<24|e[a*64+f*4+1]<<16|e[a*64+f*4+2]<<8|e[a*64+f*4+3];i[a]=m}i[o-1][14]=(e.length-1)*8/Math.pow(2,32),i[o-1][14]=Math.floor(i[o-1][14]),i[o-1][15]=(e.length-1)*8&4294967295;for(let a=0;a<o;++a){let m=new Uint32Array(80);for(let g=0;g<16;++g)m[g]=i[a][g];for(let g=16;g<80;++g)m[g]=Sa(m[g-3]^m[g-8]^m[g-14]^m[g-16],1);let f=r[0],p=r[1],y=r[2],h=r[3],S=r[4];for(let g=0;g<80;++g){let v=Math.floor(g/20),R=Sa(f,5)+gy(v,p,y,h)+S+t[v]+m[g]>>>0;S=h,h=y,y=Sa(p,30)>>>0,p=f,f=R}r[0]=r[0]+f>>>0,r[1]=r[1]+p>>>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 hy=fy("v5",80,yy),Du=hy,zu="2.30.45",qu=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,dn={pageview:"pageview",event:"event"},bo=class{constructor({client:t,uuidGenerator:r=Bt}){this.client=t,this.uuidGenerator=r}},wa=class extends bo{constructor({client:t,uuidGenerator:r=Bt}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=qu(window.location),this.lastReferrer=hr()?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:hr()?document.title:"",encoding:hr()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},i={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},i),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:i}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=i,t===dn.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===dn.pageview?this.nextPageViewId:this.pageViewId,referrer:t===dn.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===dn.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=o=>o.replace(/^\/?(.*)$/,"/$1");return`${(o=>o.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return qu(window.location)}},St=class e{constructor(t,r){if(!vo(t))throw Error("Not a valid uuid");this.clientId=t,this.creationDate=Math.floor(r/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime}validate(t,r){return!this.expired&&this.matchReferrer(t,r)}matchReferrer(t,r){try{let n=new URL(t);return r.some(o=>new RegExp(o.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[n,o]=r;if(n.length!==32||isNaN(parseInt(o)))return null;let i=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return vo(i)?new e(i,Number.parseInt(o)*1e3):null}};St.cvo_cid="cvo_cid";St.expirationTime=120;var xa=class extends bo{constructor({client:t,uuidGenerator:r=Bt}){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 q(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(St.cvo_cid,new St(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};xa.Id="link";var Qe=Object.keys;function ho(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var va=128,Gu=192,ju=224,Mu=240;function Sy(e){return(e&248)===Mu?4:(e&Mu)===ju?3:(e&ju)===Gu?2:1}function vy(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&va)!=va)break;if(r-=3,(n&Gu)!=va){t-r>=Sy(n)*3&&(r=t);break}}return e.substring(0,r)}var Ra={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"},by=Qe(Ra).map(e=>Ra[e]),Ay=[...by].join("|"),Cy=new RegExp(`^(${Ay}$)`),wy={svcAction:"svc_action",svcActionData:"svc_action_data"},xy=e=>Qe(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=Ra[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),Ry=e=>Cy.test(e),Ey=[Ry],Nu={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},_u={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ee={action:"pa",list:"pal",listSource:"pls"},Ao={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},Iy=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Ea={id:"quoteId",affiliation:"quoteAffiliation"},Ia={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Py={add:Ee,bookmark_add:Ee,bookmark_remove:Ee,click:Ee,checkout:Ee,checkout_option:Ee,detail:Ee,impression:Ee,remove:Ee,refund:Object.assign(Object.assign({},Ee),Ao),purchase:Object.assign(Object.assign({},Ee),Ao),quickview:Ee,quote:Object.assign(Object.assign({},Ee),Ea),review:Object.assign(Object.assign({},Ee),Ia)},ky=Qe(Nu).map(e=>Nu[e]),Fy=Qe(_u).map(e=>_u[e]),Oy=Qe(Ee).map(e=>Ee[e]),Ty=Qe(Ao).map(e=>Ao[e]),Dy=Qe(Ia).map(e=>Ia[e]),qy=Qe(Ea).map(e=>Ea[e]),jy=[...ky,"custom"].join("|"),My=[...Fy,"custom"].join("|"),Wu="(pr[0-9]+)",Ku="(il[0-9]+pi[0-9]+)",Ny=new RegExp(`^${Wu}(${jy})$`),_y=new RegExp(`^(${Ku}(${My}))|(il[0-9]+nm)$`),Vy=new RegExp(`^(${Oy.join("|")})$`),Ly=new RegExp(`^(${Ty.join("|")})$`),Uy=new RegExp(`^${Wu}custom$`),Qy=new RegExp(`^${Ku}custom$`),By=new RegExp(`^(${[...Iy,...Dy,...qy].join("|")})$`),$y=e=>Ny.test(e),Hy=e=>_y.test(e),zy=e=>Vy.test(e),Gy=e=>Ly.test(e),Wy=e=>By.test(e),Ky=[Hy,$y,zy,Gy,Wy],Yy=[Uy,Qy],Jy={anonymizeIp:"aip"},Xy={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Zy={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},eh=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],th=Object.assign(Object.assign(Object.assign(Object.assign({},Jy),Xy),Zy),eh.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Pa=Object.assign(Object.assign({},th),wy),rh=e=>{let t=!!e.action&&Py[e.action]||{};return Qe(e).reduce((r,n)=>{let o=t[n]||Pa[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},nh=Qe(Pa).map(e=>Pa[e]),oh=e=>nh.indexOf(e)!==-1,ih=e=>e==="custom",ah=e=>[...Ky,...Ey,oh,ih].some(t=>t(e)),sh=e=>Qe(e).reduce((t,r)=>{let n=ch(r);return n?Object.assign(Object.assign({},t),uh(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),ch=e=>{let t;return[...Yy].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},uh=(e,t)=>Qe(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),ka=class{constructor(t){this.opts=t}sendEvent(t,r){return q(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error("navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like \"sendbeacon-polyfill\".");let{baseUrl:n,preprocessRequest:o}=this.opts,i=yield this.getQueryParamsForEventType(t),{url:a,payload:m}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${i}`,r,o),f=this.encodeForEventType(t,m),p=new Blob([f],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(a,p)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return q(this,void 0,void 0,function*(){let o=t,i=r;if(n){let a=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:m,body:f}=a;o=m||t;try{i=JSON.parse(f)}catch(p){console.error("Unable to process the request body as a JSON string",p)}}return{payload:i,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return q(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,o=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",o?`visitorId=${o}`:"","discardVisitInfo=true"].filter(i=>!!i).join("&")})}isEventTypeLegacy(t){return[ae.click,ae.custom,ae.search,ae.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let o=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(o=`access_token=${encodeURIComponent(n)}&${o}`),o}},Fa=class{sendEvent(t,r){return q(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return q(this,void 0,void 0,function*(){return Promise.resolve()})}},Vu=b.fetch,Co=class{constructor(t){this.opts=t}sendEvent(t,r){return q(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:i}=this.opts,a=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",m={url:`${n}/analytics/${t}${a}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},f=Object.assign(Object.assign({},m),i?yield i(m,"analyticsFetch"):{}),{url:p}=f,y=at(f,["url"]),h;try{h=yield Vu(p,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&&o.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 q(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Vu(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ae.click,ae.custom,ae.search,ae.view].indexOf(t)!==-1}getVisitorIdParam(){return q(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"})}},Oa=class{constructor(t,r){Aa()&&$u()?this.storage=new Ca:Aa()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new vr),this.client=new Co(t),this.beaconClient=new ka(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:i}of n)this.beaconClient.sendEvent(o,i)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},Ta=class{constructor(t,r){this.storage=r||new vr,this.client=new Co(t)}getClientDependingOnEventType(t){return this.client}},wo=class{constructor(){this.storage=new vr,this.client=new Fa}getClientDependingOnEventType(t){return this.client}},lh="xx",dh=e=>e?.startsWith(lh)||!1,ph=`
27
27
  We've detected you're using React Native but have not provided the corresponding runtime,
28
28
  for an optimal experience please use the "coveo.analytics/react-native" subpackage.
29
29
  Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native
30
- `;function dh(){return typeof navigator<"u"&&navigator.product=="ReactNative"}var ph=["1",1,"yes",!0];function xo(){let e=[];return va()&&e.push(window.doNotTrack),Ta()&&e.push(navigator.doNotTrack,navigator.msDoNotTrack,navigator.globalPrivacyControl),e.some(t=>ph.indexOf(t)!==-1)}var Yu="v15",Ju={default:"https://analytics.cloud.coveo.com/rest/ua",production:"https://analytics.cloud.coveo.com/rest/ua",hipaa:"https://analyticshipaa.cloud.coveo.com/rest/ua"};function fh(e=Ju.default,t=Yu,r=!1){if(e=e.replace(/\/$/,""),r)return`${e}/${t}`;let n=e.endsWith("/rest")||e.endsWith("/rest/ua");return`${e}${n?"":"/rest"}/${t}`}var mh="38824e1f-37f5-42d3-8372-a4b8fa9df946",Ze=class{get defaultOptions(){return{endpoint:Ju.default,isCustomEndpoint:!1,token:"",version:Yu,beforeSendHooks:[],afterSendHooks:[]}}get version(){return zu}constructor(t){if(this.acceptedLinkReferrers=[],!t)throw new Error("You have to pass options to this constructor");this.options=Object.assign(Object.assign({},this.defaultOptions),t),this.visitorId="",this.bufferedRequests=[],this.beforeSendHooks=[ry,Jg].concat(this.options.beforeSendHooks),this.afterSendHooks=this.options.afterSendHooks,this.eventTypeMapping={};let r={baseUrl:this.baseUrl,token:this.options.token,visitorIdProvider:this,preprocessRequest:this.options.preprocessRequest};xo()?this.runtime=new wo:this.runtime=this.options.runtimeEnvironment||this.initRuntime(r),this.addEventTypeMapping(ae.view,{newEventType:ae.view,addClientIdParameter:!0}),this.addEventTypeMapping(ae.click,{newEventType:ae.click,addClientIdParameter:!0}),this.addEventTypeMapping(ae.custom,{newEventType:ae.custom,addClientIdParameter:!0}),this.addEventTypeMapping(ae.search,{newEventType:ae.search,addClientIdParameter:!0})}initRuntime(t){return va()&&hr()?new Fa(t,()=>{let r=[...this.bufferedRequests];return this.bufferedRequests=[],r}):(dh()&&console.warn(lh),new Oa(t))}get storage(){return this.runtime.storage}determineVisitorId(){return q(this,void 0,void 0,function*(){try{return va()&&this.extractClientIdFromLink(window.location.href)||(yield this.storage.getItem("visitorId"))||Bt()}catch(t){return console.log("Could not get visitor ID from the current runtime environment storage. Using a random ID instead.",t),Bt()}})}getCurrentVisitorId(){return q(this,void 0,void 0,function*(){if(!this.visitorId){let t=yield this.determineVisitorId();yield this.setCurrentVisitorId(t)}return this.visitorId})}setCurrentVisitorId(t){return q(this,void 0,void 0,function*(){this.visitorId=t,yield this.storage.setItem("visitorId",t)})}setClientId(t,r){return q(this,void 0,void 0,function*(){if(vo(t))this.setCurrentVisitorId(t.toLowerCase());else{if(!r)throw Error("Cannot generate uuid client id without a specific namespace string.");this.setCurrentVisitorId(Du(t,Du(r,mh)))}})}getParameters(t,...r){return q(this,void 0,void 0,function*(){return yield this.resolveParameters(t,...r)})}getPayload(t,...r){return q(this,void 0,void 0,function*(){let n=yield this.resolveParameters(t,...r);return yield this.resolvePayloadForParameters(t,n)})}get currentVisitorId(){return typeof(this.visitorId||this.storage.getItem("visitorId"))!="string"&&this.setCurrentVisitorId(Bt()),this.visitorId}set currentVisitorId(t){this.visitorId=t,this.storage.setItem("visitorId",t)}extractClientIdFromLink(t){if(xo())return null;try{let r=new URL(t).searchParams.get(St.cvo_cid);if(r==null)return null;let n=St.fromString(r);return!n||!hr()||!n.validate(document.referrer,this.acceptedLinkReferrers)?null:n.clientId}catch{}return null}resolveParameters(t,...r){return q(this,void 0,void 0,function*(){let{variableLengthArgumentsNames:n=[],addVisitorIdParameter:o=!1,usesMeasurementProtocol:i=!1,addClientIdParameter:a=!1}=this.eventTypeMapping[t]||{};return yield[g=>n.length>0?this.parseVariableArgumentsPayload(n,g):g[0],g=>q(this,void 0,void 0,function*(){return Object.assign(Object.assign({},g),{visitorId:o?yield this.getCurrentVisitorId():""})}),g=>q(this,void 0,void 0,function*(){return a?Object.assign(Object.assign({},g),{clientId:yield this.getCurrentVisitorId()}):g}),g=>i?this.ensureAnonymousUserWhenUsingApiKey(g):g,g=>this.beforeSendHooks.reduce((v,R)=>q(this,void 0,void 0,function*(){let P=yield v;return yield R(t,P)}),g)].reduce((g,v)=>q(this,void 0,void 0,function*(){let R=yield g;return yield v(R)}),Promise.resolve(r))})}resolvePayloadForParameters(t,r){return q(this,void 0,void 0,function*(){let{usesMeasurementProtocol:n=!1}=this.eventTypeMapping[t]||{};return yield[h=>this.setTrackingIdIfTrackingIdNotPresent(h),h=>this.removeEmptyPayloadValues(h,t),h=>this.validateParams(h,t),h=>n?eh(h):h,h=>n?this.removeUnknownParameters(h):h,h=>n?this.processCustomParameters(h):this.mapCustomParametersToCustomData(h)].reduce((h,S)=>q(this,void 0,void 0,function*(){let g=yield h;return yield S(g)}),Promise.resolve(r))})}makeEvent(t,...r){return q(this,void 0,void 0,function*(){let{newEventType:n=t}=this.eventTypeMapping[t]||{},o=yield this.resolveParameters(t,...r),i=yield this.resolvePayloadForParameters(t,o);return{eventType:n,payload:i,log:a=>q(this,void 0,void 0,function*(){return this.bufferedRequests.push({eventType:n,payload:Object.assign(Object.assign({},i),a)}),yield Promise.all(this.afterSendHooks.map(m=>m(t,Object.assign(Object.assign({},o),a)))),yield this.deferExecution(),yield this.sendFromBuffer()})}})}sendEvent(t,...r){return q(this,void 0,void 0,function*(){return(yield this.makeEvent(t,...r)).log({})})}deferExecution(){return new Promise(t=>setTimeout(t,0))}sendFromBuffer(){return q(this,void 0,void 0,function*(){let t=this.bufferedRequests.shift();if(t){let{eventType:r,payload:n}=t;return this.runtime.getClientDependingOnEventType(r).sendEvent(r,n)}})}clear(){this.storage.removeItem("visitorId"),new So().clear()}deleteHttpOnlyVisitorId(){this.runtime.client.deleteHttpCookieVisitorId()}makeSearchEvent(t){return q(this,void 0,void 0,function*(){return this.makeEvent(ae.search,t)})}sendSearchEvent(t){var{searchQueryUid:r}=t,n=at(t,["searchQueryUid"]);return q(this,void 0,void 0,function*(){return(yield this.makeSearchEvent(n)).log({searchQueryUid:r})})}makeClickEvent(t){return q(this,void 0,void 0,function*(){return this.makeEvent(ae.click,t)})}sendClickEvent(t){var{searchQueryUid:r}=t,n=at(t,["searchQueryUid"]);return q(this,void 0,void 0,function*(){return(yield this.makeClickEvent(n)).log({searchQueryUid:r})})}makeCustomEvent(t){return q(this,void 0,void 0,function*(){return this.makeEvent(ae.custom,t)})}sendCustomEvent(t){var{lastSearchQueryUid:r}=t,n=at(t,["lastSearchQueryUid"]);return q(this,void 0,void 0,function*(){return(yield this.makeCustomEvent(n)).log({lastSearchQueryUid:r})})}makeViewEvent(t){return q(this,void 0,void 0,function*(){return this.makeEvent(ae.view,t)})}sendViewEvent(t){return q(this,void 0,void 0,function*(){return(yield this.makeViewEvent(t)).log({})})}getVisit(){return q(this,void 0,void 0,function*(){let r=yield(yield A(`${this.baseUrl}/analytics/visit`)).json();return this.visitorId=r.visitorId,r})}getHealth(){return q(this,void 0,void 0,function*(){return yield(yield A(`${this.baseUrl}/analytics/monitoring/health`)).json()})}registerBeforeSendEventHook(t){this.beforeSendHooks.push(t)}registerAfterSendEventHook(t){this.afterSendHooks.push(t)}addEventTypeMapping(t,r){this.eventTypeMapping[t]=r}setAcceptedLinkReferrers(t){if(Array.isArray(t)&&t.every(r=>typeof r=="string"))this.acceptedLinkReferrers=t;else throw Error("Parameter should be an array of domain strings")}parseVariableArgumentsPayload(t,r){let n={};for(let o=0,i=r.length;o<i;o++){let a=r[o];if(typeof a=="string")n[t[o]]=a;else if(typeof a=="object")return Object.assign(Object.assign({},n),a)}return n}isKeyAllowedEmpty(t,r){return({[ae.search]:["queryText"]}[t]||[]).indexOf(r)!==-1}removeEmptyPayloadValues(t,r){let n=o=>typeof o<"u"&&o!==null&&o!=="";return Object.keys(t).filter(o=>this.isKeyAllowedEmpty(r,o)||n(t[o])).reduce((o,i)=>Object.assign(Object.assign({},o),{[i]:t[i]}),{})}removeUnknownParameters(t){return Object.keys(t).filter(n=>{if(oh(n))return!0;console.log(n,"is not processed by coveoua")}).reduce((n,o)=>Object.assign(Object.assign({},n),{[o]:t[o]}),{})}processCustomParameters(t){let{custom:r}=t,n=at(t,["custom"]),o={};r&&ho(r)&&(o=this.lowercaseKeys(r));let i=ih(n);return Object.assign(Object.assign({},o),i)}mapCustomParametersToCustomData(t){let{custom:r}=t,n=at(t,["custom"]);if(r&&ho(r)){let o=this.lowercaseKeys(r);return Object.assign(Object.assign({},n),{customData:Object.assign(Object.assign({},o),t.customData)})}else return t}lowercaseKeys(t){let r=Object.keys(t),n={};return r.forEach(o=>{n[o.toLowerCase()]=t[o]}),n}validateParams(t,r){let{anonymizeIp:n}=t,o=at(t,["anonymizeIp"]);return n!==void 0&&["0","false","undefined","null","{}","[]",""].indexOf(`${n}`.toLowerCase())==-1&&(o.anonymizeIp=1),(r==ae.view||r==ae.click||r==ae.search||r==ae.custom)&&(o.originLevel3=this.limit(o.originLevel3,1024)),r==ae.view&&(o.location=this.limit(o.location,1024)),(r=="pageview"||r=="event")&&(o.referrer=this.limit(o.referrer,2048),o.location=this.limit(o.location,2048),o.page=this.limit(o.page,2048)),o}ensureAnonymousUserWhenUsingApiKey(t){let{userId:r}=t,n=at(t,["userId"]);return uh(this.options.token)&&!r?(n.userId="anonymous",n):t}setTrackingIdIfTrackingIdNotPresent(t){let{trackingId:r}=t,n=at(t,["trackingId"]);return r?t:(n.hasOwnProperty("custom")&&ho(n.custom)&&(n.custom.hasOwnProperty("context_website")||n.custom.hasOwnProperty("siteName"))&&(n.trackingId=n.custom.context_website||n.custom.siteName),n.hasOwnProperty("customData")&&ho(n.customData)&&(n.customData.hasOwnProperty("context_website")||n.customData.hasOwnProperty("siteName"))&&(n.trackingId=n.customData.context_website||n.customData.siteName),n)}limit(t,r){return typeof t=="string"?hy(t,r):t}get baseUrl(){return fh(this.options.endpoint,this.options.version,this.options.isCustomEndpoint)}},st;(function(e){e.contextChanged="contextChanged",e.expandToFullUI="expandToFullUI",e.openUserActions="openUserActions",e.showPrecedingSessions="showPrecedingSessions",e.showFollowingSessions="showFollowingSessions",e.clickViewedDocument="clickViewedDocument",e.clickPageView="clickPageView",e.createArticle="createArticle"})(st||(st={}));var j;(function(e){e.interfaceLoad="interfaceLoad",e.interfaceChange="interfaceChange",e.didyoumeanAutomatic="didyoumeanAutomatic",e.didyoumeanClick="didyoumeanClick",e.resultsSort="resultsSort",e.searchboxSubmit="searchboxSubmit",e.searchboxClear="searchboxClear",e.searchboxAsYouType="searchboxAsYouType",e.breadcrumbFacet="breadcrumbFacet",e.breadcrumbResetAll="breadcrumbResetAll",e.documentQuickview="documentQuickview",e.documentOpen="documentOpen",e.omniboxAnalytics="omniboxAnalytics",e.omniboxFromLink="omniboxFromLink",e.searchFromLink="searchFromLink",e.triggerNotify="notify",e.triggerExecute="execute",e.triggerQuery="query",e.undoTriggerQuery="undoQuery",e.triggerRedirect="redirect",e.pagerResize="pagerResize",e.pagerNumber="pagerNumber",e.pagerNext="pagerNext",e.pagerPrevious="pagerPrevious",e.pagerScrolling="pagerScrolling",e.staticFilterClearAll="staticFilterClearAll",e.staticFilterSelect="staticFilterSelect",e.staticFilterDeselect="staticFilterDeselect",e.facetClearAll="facetClearAll",e.facetSearch="facetSearch",e.facetSelect="facetSelect",e.facetSelectAll="facetSelectAll",e.facetDeselect="facetDeselect",e.facetExclude="facetExclude",e.facetUnexclude="facetUnexclude",e.facetUpdateSort="facetUpdateSort",e.facetShowMore="showMoreFacetResults",e.facetShowLess="showLessFacetResults",e.queryError="query",e.queryErrorBack="errorBack",e.queryErrorClear="errorClearQuery",e.queryErrorRetry="errorRetry",e.recommendation="recommendation",e.recommendationInterfaceLoad="recommendationInterfaceLoad",e.recommendationOpen="recommendationOpen",e.likeSmartSnippet="likeSmartSnippet",e.dislikeSmartSnippet="dislikeSmartSnippet",e.expandSmartSnippet="expandSmartSnippet",e.collapseSmartSnippet="collapseSmartSnippet",e.openSmartSnippetFeedbackModal="openSmartSnippetFeedbackModal",e.closeSmartSnippetFeedbackModal="closeSmartSnippetFeedbackModal",e.sendSmartSnippetReason="sendSmartSnippetReason",e.expandSmartSnippetSuggestion="expandSmartSnippetSuggestion",e.collapseSmartSnippetSuggestion="collapseSmartSnippetSuggestion",e.showMoreSmartSnippetSuggestion="showMoreSmartSnippetSuggestion",e.showLessSmartSnippetSuggestion="showLessSmartSnippetSuggestion",e.openSmartSnippetSource="openSmartSnippetSource",e.openSmartSnippetSuggestionSource="openSmartSnippetSuggestionSource",e.openSmartSnippetInlineLink="openSmartSnippetInlineLink",e.openSmartSnippetSuggestionInlineLink="openSmartSnippetSuggestionInlineLink",e.recentQueryClick="recentQueriesClick",e.clearRecentQueries="clearRecentQueries",e.recentResultClick="recentResultClick",e.clearRecentResults="clearRecentResults",e.noResultsBack="noResultsBack",e.showMoreFoldedResults="showMoreFoldedResults",e.showLessFoldedResults="showLessFoldedResults",e.copyToClipboard="copyToClipboard",e.caseSendEmail="Case.SendEmail",e.feedItemTextPost="FeedItem.TextPost",e.caseAttach="caseAttach",e.caseDetach="caseDetach",e.retryGeneratedAnswer="retryGeneratedAnswer",e.likeGeneratedAnswer="likeGeneratedAnswer",e.dislikeGeneratedAnswer="dislikeGeneratedAnswer",e.openGeneratedAnswerSource="openGeneratedAnswerSource",e.generatedAnswerStreamEnd="generatedAnswerStreamEnd",e.generatedAnswerSourceHover="generatedAnswerSourceHover",e.generatedAnswerCopyToClipboard="generatedAnswerCopyToClipboard",e.generatedAnswerHideAnswers="generatedAnswerHideAnswers",e.generatedAnswerShowAnswers="generatedAnswerShowAnswers",e.generatedAnswerExpand="generatedAnswerExpand",e.generatedAnswerCollapse="generatedAnswerCollapse",e.generatedAnswerFeedbackSubmit="generatedAnswerFeedbackSubmit",e.rephraseGeneratedAnswer="rephraseGeneratedAnswer",e.generatedAnswerFeedbackSubmitV2="generatedAnswerFeedbackSubmitV2",e.generatedAnswerCitationClick="generatedAnswerCitationClick"})(j||(j={}));var Lu={[j.triggerNotify]:"queryPipelineTriggers",[j.triggerExecute]:"queryPipelineTriggers",[j.triggerQuery]:"queryPipelineTriggers",[j.triggerRedirect]:"queryPipelineTriggers",[j.queryError]:"errors",[j.queryErrorBack]:"errors",[j.queryErrorClear]:"errors",[j.queryErrorRetry]:"errors",[j.pagerNext]:"getMoreResults",[j.pagerPrevious]:"getMoreResults",[j.pagerNumber]:"getMoreResults",[j.pagerResize]:"getMoreResults",[j.pagerScrolling]:"getMoreResults",[j.facetSearch]:"facet",[j.facetShowLess]:"facet",[j.facetShowMore]:"facet",[j.recommendation]:"recommendation",[j.likeSmartSnippet]:"smartSnippet",[j.dislikeSmartSnippet]:"smartSnippet",[j.expandSmartSnippet]:"smartSnippet",[j.collapseSmartSnippet]:"smartSnippet",[j.openSmartSnippetFeedbackModal]:"smartSnippet",[j.closeSmartSnippetFeedbackModal]:"smartSnippet",[j.sendSmartSnippetReason]:"smartSnippet",[j.expandSmartSnippetSuggestion]:"smartSnippetSuggestions",[j.collapseSmartSnippetSuggestion]:"smartSnippetSuggestions",[j.showMoreSmartSnippetSuggestion]:"smartSnippetSuggestions",[j.showLessSmartSnippetSuggestion]:"smartSnippetSuggestions",[j.clearRecentQueries]:"recentQueries",[j.recentResultClick]:"recentlyClickedDocuments",[j.clearRecentResults]:"recentlyClickedDocuments",[j.showLessFoldedResults]:"folding",[j.caseDetach]:"case",[j.likeGeneratedAnswer]:"generatedAnswer",[j.dislikeGeneratedAnswer]:"generatedAnswer",[j.openGeneratedAnswerSource]:"generatedAnswer",[j.generatedAnswerStreamEnd]:"generatedAnswer",[j.generatedAnswerSourceHover]:"generatedAnswer",[j.generatedAnswerCopyToClipboard]:"generatedAnswer",[j.generatedAnswerHideAnswers]:"generatedAnswer",[j.generatedAnswerShowAnswers]:"generatedAnswer",[j.generatedAnswerExpand]:"generatedAnswer",[j.generatedAnswerCollapse]:"generatedAnswer",[j.generatedAnswerFeedbackSubmit]:"generatedAnswer",[j.generatedAnswerFeedbackSubmitV2]:"generatedAnswer",[st.expandToFullUI]:"interface",[st.openUserActions]:"User Actions",[st.showPrecedingSessions]:"User Actions",[st.showFollowingSessions]:"User Actions",[st.clickViewedDocument]:"User Actions",[st.clickPageView]:"User Actions",[st.createArticle]:"createArticle"},br=class{constructor(){this.runtime=new wo,this.currentVisitorId=""}getPayload(){return Promise.resolve()}getParameters(){return Promise.resolve()}makeEvent(t){return Promise.resolve({eventType:t,payload:null,log:()=>Promise.resolve()})}sendEvent(){return Promise.resolve()}makeSearchEvent(){return this.makeEvent(ae.search)}sendSearchEvent(){return Promise.resolve()}makeClickEvent(){return this.makeEvent(ae.click)}sendClickEvent(){return Promise.resolve()}makeCustomEvent(){return this.makeEvent(ae.custom)}sendCustomEvent(){return Promise.resolve()}makeViewEvent(){return this.makeEvent(ae.view)}sendViewEvent(){return Promise.resolve()}getVisit(){return Promise.resolve({id:"",visitorId:""})}getHealth(){return Promise.resolve({status:""})}registerBeforeSendEventHook(){}registerAfterSendEventHook(){}addEventTypeMapping(){}get version(){return zu}};function gh(e){let t="";return e.filter(r=>{let n=r!==t;return t=r,n})}function yh(e){return e.map(t=>t.replace(/;/g,""))}function Xu(e){let r=e.join(";");return r.length<=256?r:Xu(e.slice(1))}var Uu=e=>{let t=yh(e),r=gh(t);return Xu(r)};function Qu(e){let t=typeof e.partialQueries=="string"?e.partialQueries:Uu(e.partialQueries),r=typeof e.suggestions=="string"?e.suggestions:Uu(e.suggestions);return Object.assign(Object.assign({},e),{partialQueries:t,suggestions:r})}var Ro=class{constructor(t,r){this.opts=t,this.provider=r;let n=t.enableAnalytics===!1||xo();this.coveoAnalyticsClient=n?new br:new Ze(t)}disable(){this.coveoAnalyticsClient=new br}enable(){this.coveoAnalyticsClient=new Ze(this.opts)}makeInterfaceLoad(){return this.makeSearchEvent(j.interfaceLoad)}logInterfaceLoad(){return q(this,void 0,void 0,function*(){return(yield this.makeInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendationInterfaceLoad(){return this.makeSearchEvent(j.recommendationInterfaceLoad)}logRecommendationInterfaceLoad(){return q(this,void 0,void 0,function*(){return(yield this.makeRecommendationInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendation(){return this.makeCustomEvent(j.recommendation)}logRecommendation(){return q(this,void 0,void 0,function*(){return(yield this.makeRecommendation()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendationOpen(t,r){return this.makeClickEvent(j.recommendationOpen,t,r)}logRecommendationOpen(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeRecommendationOpen(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterClearAll(t){return this.makeSearchEvent(j.staticFilterClearAll,t)}logStaticFilterClearAll(t){return q(this,void 0,void 0,function*(){return(yield this.makeStaticFilterClearAll(t)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterSelect(t){return this.makeSearchEvent(j.staticFilterSelect,t)}logStaticFilterSelect(t){return q(this,void 0,void 0,function*(){return(yield this.makeStaticFilterSelect(t)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterDeselect(t){return this.makeSearchEvent(j.staticFilterDeselect,t)}logStaticFilterDeselect(t){return q(this,void 0,void 0,function*(){return(yield this.makeStaticFilterDeselect(t)).log({searchUID:this.provider.getSearchUID()})})}makeFetchMoreResults(){return this.makeCustomEvent(j.pagerScrolling,{type:"getMoreResults"})}logFetchMoreResults(){return q(this,void 0,void 0,function*(){return(yield this.makeFetchMoreResults()).log({searchUID:this.provider.getSearchUID()})})}makeInterfaceChange(t){return this.makeSearchEvent(j.interfaceChange,t)}logInterfaceChange(t){return q(this,void 0,void 0,function*(){return(yield this.makeInterfaceChange(t)).log({searchUID:this.provider.getSearchUID()})})}makeDidYouMeanAutomatic(){return this.makeSearchEvent(j.didyoumeanAutomatic)}logDidYouMeanAutomatic(){return q(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanAutomatic()).log({searchUID:this.provider.getSearchUID()})})}makeDidYouMeanClick(){return this.makeSearchEvent(j.didyoumeanClick)}logDidYouMeanClick(){return q(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanClick()).log({searchUID:this.provider.getSearchUID()})})}makeResultsSort(t){return this.makeSearchEvent(j.resultsSort,t)}logResultsSort(t){return q(this,void 0,void 0,function*(){return(yield this.makeResultsSort(t)).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxSubmit(){return this.makeSearchEvent(j.searchboxSubmit)}logSearchboxSubmit(){return q(this,void 0,void 0,function*(){return(yield this.makeSearchboxSubmit()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxClear(){return this.makeSearchEvent(j.searchboxClear)}logSearchboxClear(){return q(this,void 0,void 0,function*(){return(yield this.makeSearchboxClear()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxAsYouType(){return this.makeSearchEvent(j.searchboxAsYouType)}logSearchboxAsYouType(){return q(this,void 0,void 0,function*(){return(yield this.makeSearchboxAsYouType()).log({searchUID:this.provider.getSearchUID()})})}makeBreadcrumbFacet(t){return this.makeSearchEvent(j.breadcrumbFacet,t)}logBreadcrumbFacet(t){return q(this,void 0,void 0,function*(){return(yield this.makeBreadcrumbFacet(t)).log({searchUID:this.provider.getSearchUID()})})}makeBreadcrumbResetAll(){return this.makeSearchEvent(j.breadcrumbResetAll)}logBreadcrumbResetAll(){return q(this,void 0,void 0,function*(){return(yield this.makeBreadcrumbResetAll()).log({searchUID:this.provider.getSearchUID()})})}makeDocumentQuickview(t,r){return this.makeClickEvent(j.documentQuickview,t,r)}logDocumentQuickview(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeDocumentQuickview(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeDocumentOpen(t,r){return this.makeClickEvent(j.documentOpen,t,r)}logDocumentOpen(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeDocumentOpen(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOmniboxAnalytics(t){return this.makeSearchEvent(j.omniboxAnalytics,Qu(t))}logOmniboxAnalytics(t){return q(this,void 0,void 0,function*(){return(yield this.makeOmniboxAnalytics(t)).log({searchUID:this.provider.getSearchUID()})})}makeOmniboxFromLink(t){return this.makeSearchEvent(j.omniboxFromLink,Qu(t))}logOmniboxFromLink(t){return q(this,void 0,void 0,function*(){return(yield this.makeOmniboxFromLink(t)).log({searchUID:this.provider.getSearchUID()})})}makeSearchFromLink(){return this.makeSearchEvent(j.searchFromLink)}logSearchFromLink(){return q(this,void 0,void 0,function*(){return(yield this.makeSearchFromLink()).log({searchUID:this.provider.getSearchUID()})})}makeTriggerNotify(t){return this.makeCustomEvent(j.triggerNotify,t)}logTriggerNotify(t){return q(this,void 0,void 0,function*(){return(yield this.makeTriggerNotify(t)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerExecute(t){return this.makeCustomEvent(j.triggerExecute,t)}logTriggerExecute(t){return q(this,void 0,void 0,function*(){return(yield this.makeTriggerExecute(t)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerQuery(){return this.makeCustomEvent(j.triggerQuery,{query:this.provider.getSearchEventRequestPayload().queryText},"queryPipelineTriggers")}logTriggerQuery(){return q(this,void 0,void 0,function*(){return(yield this.makeTriggerQuery()).log({searchUID:this.provider.getSearchUID()})})}makeUndoTriggerQuery(t){return this.makeSearchEvent(j.undoTriggerQuery,t)}logUndoTriggerQuery(t){return q(this,void 0,void 0,function*(){return(yield this.makeUndoTriggerQuery(t)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerRedirect(t){return this.makeCustomEvent(j.triggerRedirect,Object.assign(Object.assign({},t),{query:this.provider.getSearchEventRequestPayload().queryText}))}logTriggerRedirect(t){return q(this,void 0,void 0,function*(){return(yield this.makeTriggerRedirect(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerResize(t){return this.makeCustomEvent(j.pagerResize,t)}logPagerResize(t){return q(this,void 0,void 0,function*(){return(yield this.makePagerResize(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerNumber(t){return this.makeCustomEvent(j.pagerNumber,t)}logPagerNumber(t){return q(this,void 0,void 0,function*(){return(yield this.makePagerNumber(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerNext(t){return this.makeCustomEvent(j.pagerNext,t)}logPagerNext(t){return q(this,void 0,void 0,function*(){return(yield this.makePagerNext(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerPrevious(t){return this.makeCustomEvent(j.pagerPrevious,t)}logPagerPrevious(t){return q(this,void 0,void 0,function*(){return(yield this.makePagerPrevious(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerScrolling(){return this.makeCustomEvent(j.pagerScrolling)}logPagerScrolling(){return q(this,void 0,void 0,function*(){return(yield this.makePagerScrolling()).log({searchUID:this.provider.getSearchUID()})})}makeFacetClearAll(t){return this.makeSearchEvent(j.facetClearAll,t)}logFacetClearAll(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetClearAll(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSearch(t){return this.makeSearchEvent(j.facetSearch,t)}logFacetSearch(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetSearch(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSelect(t){return this.makeSearchEvent(j.facetSelect,t)}logFacetSelect(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetSelect(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetDeselect(t){return this.makeSearchEvent(j.facetDeselect,t)}logFacetDeselect(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetDeselect(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetExclude(t){return this.makeSearchEvent(j.facetExclude,t)}logFacetExclude(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetExclude(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetUnexclude(t){return this.makeSearchEvent(j.facetUnexclude,t)}logFacetUnexclude(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetUnexclude(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSelectAll(t){return this.makeSearchEvent(j.facetSelectAll,t)}logFacetSelectAll(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetSelectAll(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetUpdateSort(t){return this.makeSearchEvent(j.facetUpdateSort,t)}logFacetUpdateSort(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetUpdateSort(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetShowMore(t){return this.makeCustomEvent(j.facetShowMore,t)}logFacetShowMore(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetShowMore(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetShowLess(t){return this.makeCustomEvent(j.facetShowLess,t)}logFacetShowLess(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetShowLess(t)).log({searchUID:this.provider.getSearchUID()})})}makeQueryError(t){return this.makeCustomEvent(j.queryError,t)}logQueryError(t){return q(this,void 0,void 0,function*(){return(yield this.makeQueryError(t)).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorBack(){return q(this,void 0,void 0,function*(){let t=yield this.makeCustomEvent(j.queryErrorBack);return{description:t.description,log:()=>q(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(j.queryErrorBack)})}})}logQueryErrorBack(){return q(this,void 0,void 0,function*(){return(yield this.makeQueryErrorBack()).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorRetry(){return q(this,void 0,void 0,function*(){let t=yield this.makeCustomEvent(j.queryErrorRetry);return{description:t.description,log:()=>q(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(j.queryErrorRetry)})}})}logQueryErrorRetry(){return q(this,void 0,void 0,function*(){return(yield this.makeQueryErrorRetry()).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorClear(){return q(this,void 0,void 0,function*(){let t=yield this.makeCustomEvent(j.queryErrorClear);return{description:t.description,log:()=>q(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(j.queryErrorClear)})}})}logQueryErrorClear(){return q(this,void 0,void 0,function*(){return(yield this.makeQueryErrorClear()).log({searchUID:this.provider.getSearchUID()})})}makeLikeSmartSnippet(){return this.makeCustomEvent(j.likeSmartSnippet)}logLikeSmartSnippet(){return q(this,void 0,void 0,function*(){return(yield this.makeLikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeDislikeSmartSnippet(){return this.makeCustomEvent(j.dislikeSmartSnippet)}logDislikeSmartSnippet(){return q(this,void 0,void 0,function*(){return(yield this.makeDislikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeExpandSmartSnippet(){return this.makeCustomEvent(j.expandSmartSnippet)}logExpandSmartSnippet(){return q(this,void 0,void 0,function*(){return(yield this.makeExpandSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeCollapseSmartSnippet(){return this.makeCustomEvent(j.collapseSmartSnippet)}logCollapseSmartSnippet(){return q(this,void 0,void 0,function*(){return(yield this.makeCollapseSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetFeedbackModal(){return this.makeCustomEvent(j.openSmartSnippetFeedbackModal)}logOpenSmartSnippetFeedbackModal(){return q(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetFeedbackModal()).log({searchUID:this.provider.getSearchUID()})})}makeCloseSmartSnippetFeedbackModal(){return this.makeCustomEvent(j.closeSmartSnippetFeedbackModal)}logCloseSmartSnippetFeedbackModal(){return q(this,void 0,void 0,function*(){return(yield this.makeCloseSmartSnippetFeedbackModal()).log({searchUID:this.provider.getSearchUID()})})}makeSmartSnippetFeedbackReason(t,r){return this.makeCustomEvent(j.sendSmartSnippetReason,{reason:t,details:r})}logSmartSnippetFeedbackReason(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeSmartSnippetFeedbackReason(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeExpandSmartSnippetSuggestion(t){return this.makeCustomEvent(j.expandSmartSnippetSuggestion,"documentId"in t?t:{documentId:t})}logExpandSmartSnippetSuggestion(t){return q(this,void 0,void 0,function*(){return(yield this.makeExpandSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeCollapseSmartSnippetSuggestion(t){return this.makeCustomEvent(j.collapseSmartSnippetSuggestion,"documentId"in t?t:{documentId:t})}logCollapseSmartSnippetSuggestion(t){return q(this,void 0,void 0,function*(){return(yield this.makeCollapseSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeShowMoreSmartSnippetSuggestion(t){return this.makeCustomEvent(j.showMoreSmartSnippetSuggestion,t)}logShowMoreSmartSnippetSuggestion(t){return q(this,void 0,void 0,function*(){return(yield this.makeShowMoreSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeShowLessSmartSnippetSuggestion(t){return this.makeCustomEvent(j.showLessSmartSnippetSuggestion,t)}logShowLessSmartSnippetSuggestion(t){return q(this,void 0,void 0,function*(){return(yield this.makeShowLessSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSource(t,r){return this.makeClickEvent(j.openSmartSnippetSource,t,r)}logOpenSmartSnippetSource(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSource(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSuggestionSource(t,r){return this.makeClickEvent(j.openSmartSnippetSuggestionSource,t,{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}makeCopyToClipboard(t,r){return this.makeClickEvent(j.copyToClipboard,t,r)}logCopyToClipboard(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeCopyToClipboard(t,r)).log({searchUID:this.provider.getSearchUID()})})}logOpenSmartSnippetSuggestionSource(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSuggestionSource(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetInlineLink(t,r){return this.makeClickEvent(j.openSmartSnippetInlineLink,t,{contentIDKey:r.contentIDKey,contentIDValue:r.contentIDValue},r)}logOpenSmartSnippetInlineLink(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetInlineLink(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSuggestionInlineLink(t,r){return this.makeClickEvent(j.openSmartSnippetSuggestionInlineLink,t,{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}logOpenSmartSnippetSuggestionInlineLink(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSuggestionInlineLink(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeRecentQueryClick(){return this.makeSearchEvent(j.recentQueryClick)}logRecentQueryClick(){return q(this,void 0,void 0,function*(){return(yield this.makeRecentQueryClick()).log({searchUID:this.provider.getSearchUID()})})}makeClearRecentQueries(){return this.makeCustomEvent(j.clearRecentQueries)}logClearRecentQueries(){return q(this,void 0,void 0,function*(){return(yield this.makeClearRecentQueries()).log({searchUID:this.provider.getSearchUID()})})}makeRecentResultClick(t,r){return this.makeCustomEvent(j.recentResultClick,{info:t,identifier:r})}logRecentResultClick(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeRecentResultClick(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeClearRecentResults(){return this.makeCustomEvent(j.clearRecentResults)}logClearRecentResults(){return q(this,void 0,void 0,function*(){return(yield this.makeClearRecentResults()).log({searchUID:this.provider.getSearchUID()})})}makeNoResultsBack(){return this.makeSearchEvent(j.noResultsBack)}logNoResultsBack(){return q(this,void 0,void 0,function*(){return(yield this.makeNoResultsBack()).log({searchUID:this.provider.getSearchUID()})})}makeShowMoreFoldedResults(t,r){return this.makeClickEvent(j.showMoreFoldedResults,t,r)}logShowMoreFoldedResults(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeShowMoreFoldedResults(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeShowLessFoldedResults(){return this.makeCustomEvent(j.showLessFoldedResults)}logShowLessFoldedResults(){return q(this,void 0,void 0,function*(){return(yield this.makeShowLessFoldedResults()).log({searchUID:this.provider.getSearchUID()})})}makeEventDescription(t,r){var n;return{actionCause:r,customData:(n=t.payload)===null||n===void 0?void 0:n.customData}}makeCustomEvent(t,r,n=Lu[t]){return q(this,void 0,void 0,function*(){this.coveoAnalyticsClient.getParameters;let o=Object.assign(Object.assign({},this.provider.getBaseMetadata()),r),i=Object.assign(Object.assign({},yield this.getBaseEventRequest(o)),{eventType:n,eventValue:t}),a=yield this.coveoAnalyticsClient.makeCustomEvent(i);return{description:this.makeEventDescription(a,t),log:({searchUID:m})=>a.log({lastSearchQueryUid:m})}})}logCustomEvent(t,r,n=Lu[t]){return q(this,void 0,void 0,function*(){return(yield this.makeCustomEvent(t,r,n)).log({searchUID:this.provider.getSearchUID()})})}makeCustomEventWithType(t,r,n){return q(this,void 0,void 0,function*(){let o=Object.assign(Object.assign({},this.provider.getBaseMetadata()),n),i=Object.assign(Object.assign({},yield this.getBaseEventRequest(o)),{eventType:r,eventValue:t}),a=yield this.coveoAnalyticsClient.makeCustomEvent(i);return{description:this.makeEventDescription(a,t),log:({searchUID:m})=>a.log({lastSearchQueryUid:m})}})}logCustomEventWithType(t,r,n){return q(this,void 0,void 0,function*(){return(yield this.makeCustomEventWithType(t,r,n)).log({searchUID:this.provider.getSearchUID()})})}logSearchEvent(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeSearchEvent(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeSearchEvent(t,r){return q(this,void 0,void 0,function*(){let n=yield this.getBaseSearchEventRequest(t,r),o=yield this.coveoAnalyticsClient.makeSearchEvent(n);return{description:this.makeEventDescription(o,t),log:({searchUID:i})=>o.log({searchQueryUid:i})}})}makeClickEvent(t,r,n,o){return q(this,void 0,void 0,function*(){let i=Object.assign(Object.assign(Object.assign({},r),yield this.getBaseEventRequest(Object.assign(Object.assign({},n),o))),{queryPipeline:this.provider.getPipeline(),actionCause:t}),a=yield this.coveoAnalyticsClient.makeClickEvent(i);return{description:this.makeEventDescription(a,t),log:({searchUID:m})=>a.log({searchQueryUid:m})}})}logClickEvent(t,r,n,o){return q(this,void 0,void 0,function*(){return(yield this.makeClickEvent(t,r,n,o)).log({searchUID:this.provider.getSearchUID()})})}getBaseSearchEventRequest(t,r){var n,o;return q(this,void 0,void 0,function*(){return Object.assign(Object.assign(Object.assign({},yield this.getBaseEventRequest(Object.assign(Object.assign({},r),(o=(n=this.provider).getGeneratedAnswerMetadata)===null||o===void 0?void 0:o.call(n)))),this.provider.getSearchEventRequestPayload()),{queryPipeline:this.provider.getPipeline(),actionCause:t})})}getBaseEventRequest(t){return q(this,void 0,void 0,function*(){let r=Object.assign(Object.assign({},this.provider.getBaseMetadata()),t);return Object.assign(Object.assign(Object.assign({},this.getOrigins()),this.getSplitTestRun()),{customData:r,language:this.provider.getLanguage(),facetState:this.provider.getFacetState?this.provider.getFacetState():[],anonymous:this.provider.getIsAnonymous(),clientId:yield this.getClientId()})})}getOrigins(){var t,r;return{originContext:(r=(t=this.provider).getOriginContext)===null||r===void 0?void 0:r.call(t),originLevel1:this.provider.getOriginLevel1(),originLevel2:this.provider.getOriginLevel2(),originLevel3:this.provider.getOriginLevel3()}}getClientId(){return this.coveoAnalyticsClient instanceof Ze?this.coveoAnalyticsClient.getCurrentVisitorId():void 0}getSplitTestRun(){let t=this.provider.getSplitTestRunName?this.provider.getSplitTestRunName():"",r=this.provider.getSplitTestRunVersion?this.provider.getSplitTestRunVersion():"";return Object.assign(Object.assign({},t&&{splitTestRunName:t}),r&&{splitTestRunVersion:r})}makeLikeGeneratedAnswer(t){return this.makeCustomEvent(j.likeGeneratedAnswer,t)}logLikeGeneratedAnswer(t){return q(this,void 0,void 0,function*(){return(yield this.makeLikeGeneratedAnswer(t)).log({searchUID:this.provider.getSearchUID()})})}makeDislikeGeneratedAnswer(t){return this.makeCustomEvent(j.dislikeGeneratedAnswer,t)}logDislikeGeneratedAnswer(t){return q(this,void 0,void 0,function*(){return(yield this.makeDislikeGeneratedAnswer(t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenGeneratedAnswerSource(t){return this.makeCustomEvent(j.openGeneratedAnswerSource,t)}logOpenGeneratedAnswerSource(t){return q(this,void 0,void 0,function*(){return(yield this.makeOpenGeneratedAnswerSource(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCitationClick(t,r){return this.makeClickEvent(j.generatedAnswerCitationClick,Object.assign(Object.assign({},t),{documentPosition:1}),{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}logGeneratedAnswerCitationClick(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCitationClick(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerSourceHover(t){return this.makeCustomEvent(j.generatedAnswerSourceHover,t)}logGeneratedAnswerSourceHover(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerSourceHover(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCopyToClipboard(t){return this.makeCustomEvent(j.generatedAnswerCopyToClipboard,t)}logGeneratedAnswerCopyToClipboard(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCopyToClipboard(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerHideAnswers(t){return this.makeCustomEvent(j.generatedAnswerHideAnswers,t)}logGeneratedAnswerHideAnswers(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerHideAnswers(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerShowAnswers(t){return this.makeCustomEvent(j.generatedAnswerShowAnswers,t)}logGeneratedAnswerShowAnswers(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerShowAnswers(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerExpand(t){return this.makeCustomEvent(j.generatedAnswerExpand,t)}logGeneratedAnswerExpand(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerExpand(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCollapse(t){return this.makeCustomEvent(j.generatedAnswerCollapse,t)}logGeneratedAnswerCollapse(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCollapse(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerFeedbackSubmit(t){return this.makeCustomEvent(j.generatedAnswerFeedbackSubmit,t)}logGeneratedAnswerFeedbackSubmit(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerFeedbackSubmit(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerFeedbackSubmitV2(t){return this.makeCustomEvent(j.generatedAnswerFeedbackSubmitV2,t)}logGeneratedAnswerFeedbackSubmitV2(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerFeedbackSubmitV2(t)).log({searchUID:this.provider.getSearchUID()})})}makeRephraseGeneratedAnswer(t){return this.makeSearchEvent(j.rephraseGeneratedAnswer,t)}logRephraseGeneratedAnswer(t){return q(this,void 0,void 0,function*(){return(yield this.makeRephraseGeneratedAnswer(t)).log({searchUID:this.provider.getSearchUID()})})}makeRetryGeneratedAnswer(){return this.makeSearchEvent(j.retryGeneratedAnswer)}logRetryGeneratedAnswer(){return q(this,void 0,void 0,function*(){return(yield this.makeRetryGeneratedAnswer()).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerStreamEnd(t){return this.makeCustomEvent(j.generatedAnswerStreamEnd,t)}logGeneratedAnswerStreamEnd(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerStreamEnd(t)).log({searchUID:this.provider.getSearchUID()})})}},Eo=Object.assign({},dn),Bu=Object.keys(Eo).map(e=>Eo[e]),Sr=class extends Ca{constructor({client:t,uuidGenerator:r=Bt}){super({client:t,uuidGenerator:r}),this.ticket={}}getApi(t){let r=super.getApi(t);if(r!==null)return r;switch(t){case"setTicket":return this.setTicket;default:return null}}addHooks(){this.addHooksForEvent(),this.addHooksForPageView(),this.addHooksForSVCEvents()}setTicket(t){this.ticket=t}clearPluginData(){this.ticket={}}addHooksForSVCEvents(){this.client.registerBeforeSendEventHook((t,...[r])=>Bu.indexOf(t)!==-1?this.addSVCDataToPayload(t,r):r),this.client.registerAfterSendEventHook((t,...[r])=>(Bu.indexOf(t)!==-1&&this.updateLocationInformation(t,r),r))}addHooksForPageView(){this.client.addEventTypeMapping(Eo.pageview,{newEventType:ae.collect,variableLengthArgumentsNames:["page"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})}addHooksForEvent(){this.client.addEventTypeMapping(Eo.event,{newEventType:ae.collect,variableLengthArgumentsNames:["eventCategory","eventAction","eventLabel","eventValue"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})}addSVCDataToPayload(t,r){var n;let o=Object.assign(Object.assign(Object.assign(Object.assign({},this.getLocationInformation(t,r)),this.getDefaultContextInformation(t)),this.action?{svcAction:this.action}:{}),Object.keys((n=this.actionData)!==null&&n!==void 0?n:{}).length>0?{svcActionData:this.actionData}:{}),i=this.getTicketPayload();return this.clearData(),Object.assign(Object.assign(Object.assign({},i),o),r)}getTicketPayload(){return Cy(this.ticket)}};Sr.Id="svc";var Io;(function(e){e.click="click",e.flowStart="flowStart"})(Io||(Io={}));var Ue;(function(e){e.enterInterface="ticket_create_start",e.fieldUpdate="ticket_field_update",e.fieldSuggestionClick="ticket_classification_click",e.documentSuggestionClick="documentSuggestionClick",e.documentSuggestionQuickview="documentSuggestionQuickview",e.suggestionRate="suggestion_rate",e.nextCaseStep="ticket_next_stage",e.caseCancelled="ticket_cancel",e.caseSolved="ticket_cancel",e.caseCreated="ticket_create"})(Ue||(Ue={}));var Po;(function(e){e.quit="Quit",e.solved="Solved"})(Po||(Po={}));var ko=class{constructor(t,r){var n;this.options=t,this.provider=r;let o=((n=t.enableAnalytics)!==null&&n!==void 0?n:!0)&&!xo();this.coveoAnalyticsClient=o?new Ze(t):new br,this.svc=new Sr({client:this.coveoAnalyticsClient})}disable(){this.coveoAnalyticsClient=new br,this.svc=new Sr({client:this.coveoAnalyticsClient})}enable(){this.coveoAnalyticsClient=new Ze(this.options),this.svc=new Sr({client:this.coveoAnalyticsClient})}logEnterInterface(t){return this.svc.setAction(Ue.enterInterface),this.svc.setTicket(t.ticket),this.sendFlowStartEvent()}logUpdateCaseField(t){return this.svc.setAction(Ue.fieldUpdate,{fieldName:t.fieldName}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logSelectFieldSuggestion(t){return this.svc.setAction(Ue.fieldSuggestionClick,t.suggestion),this.svc.setTicket(t.ticket),this.sendClickEvent()}logSelectDocumentSuggestion(t){return this.logClickEvent(Ue.documentSuggestionClick,t.suggestion.suggestion,{contentIDKey:"permanentId",contentIDValue:t.suggestion.permanentId})}logQuickviewDocumentSuggestion(t){return this.logClickEvent(Ue.documentSuggestionQuickview,t.suggestion.suggestion,{contentIDKey:"permanentId",contentIDValue:t.suggestion.permanentId})}logRateDocumentSuggestion(t){return this.svc.setAction(Ue.suggestionRate,Object.assign({rate:t.rating},t.suggestion)),this.svc.setTicket(t.ticket),this.sendClickEvent()}logMoveToNextCaseStep(t){return this.svc.setAction(Ue.nextCaseStep,{stage:t?.stage}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseCancelled(t){return this.svc.setAction(Ue.caseCancelled,{reason:Po.quit}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseSolved(t){return this.svc.setAction(Ue.caseSolved,{reason:Po.solved}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseCreated(t){return this.svc.setAction(Ue.caseCreated),this.svc.setTicket(t.ticket),this.sendClickEvent()}sendFlowStartEvent(){return this.coveoAnalyticsClient.sendEvent("event","svc",Io.flowStart,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)}sendClickEvent(){return this.coveoAnalyticsClient.sendEvent("event","svc",Io.click,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)}getBaseEventRequest(t){var r,n;return q(this,void 0,void 0,function*(){let o=Object.assign({},t);return Object.assign(Object.assign({},this.getOrigins()),{customData:o,language:(r=this.provider)===null||r===void 0?void 0:r.getLanguage(),anonymous:(n=this.provider)===null||n===void 0?void 0:n.getIsAnonymous(),clientId:yield this.getClientId()})})}getClientId(){return this.coveoAnalyticsClient instanceof Ze?this.coveoAnalyticsClient.getCurrentVisitorId():void 0}getOrigins(){var t,r,n,o,i;return{originContext:(r=(t=this.provider)===null||t===void 0?void 0:t.getOriginContext)===null||r===void 0?void 0:r.call(t),originLevel1:(n=this.provider)===null||n===void 0?void 0:n.getOriginLevel1(),originLevel2:(o=this.provider)===null||o===void 0?void 0:o.getOriginLevel2(),originLevel3:(i=this.provider)===null||i===void 0?void 0:i.getOriginLevel3()}}logClickEvent(t,r,n,o){var i,a;return q(this,void 0,void 0,function*(){let m=Object.assign(Object.assign(Object.assign({},r),yield this.getBaseEventRequest(Object.assign(Object.assign({},n),o))),{searchQueryUid:(a=(i=this.provider)===null||i===void 0?void 0:i.getSearchUID())!==null&&a!==void 0?a:"",actionCause:t});return this.coveoAnalyticsClient.sendClickEvent(m)})}};var Zu=e=>new Ze(e).getCurrentVisitorId(),mn=(e,t)=>typeof t=="function"?(...r)=>{let n=Kr(r[0]);try{return t.apply(t,r)}catch(o){return e.error(o,"Error in analytics preprocessRequest. Returning original request."),n}}:void 0,gn=(e,t)=>(...r)=>{let n=Kr(r[1]);try{return t.apply(t,r)}catch(o){return e.error(o,"Error in analytics hook. Returning original request."),n}};d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();function Fo(){return{desiredCount:5,numberOfValues:8,set:{}}}d();c();l();u();d();c();l();u();d();c();l();u();function el(e){let{activeValue:t,ancestryMap:r}=hh(e);return t?Sh(t,r):[]}function hh(e){let t=[...e],r=new Map;for(;t.length>0;){let n=t.shift();if(n.state==="selected")return{activeValue:n,ancestryMap:r};if(r)for(let o of n.children)r.set(o,n);t.unshift(...n.children)}return{}}function Sh(e,t){let r=[];if(!e)return[];let n=e;do r.unshift(n),n=t.get(n);while(n);return r}var vh=(e,t)=>e.categoryFacetSet[t]?.request;var ja=(e,t)=>{let r=vh(e,t);return el(r?.currentValues??[])};d();c();l();u();function Oo(){return{}}d();c();l();u();function To(){return{}}d();c();l();u();function Do(){return{}}d();c();l();u();function qo(){return{}}function Ma(e){return{facetSet:e.facetSet??qo(),categoryFacetSet:e.categoryFacetSet??Oo(),dateFacetSet:e.dateFacetSet??To(),numericFacetSet:e.numericFacetSet??Do(),automaticFacetSet:e.automaticFacetSet??Fo()}}var Na=e=>{let t=[];return Ch(e).forEach((r,n)=>{let o=Fh(e,r.facetId),i=Ph(r,n+1);if(Ah(r)){if(!!!ja(e,r.facetId).length)return;t.push({...i,...Eh(e,r.facetId),facetType:o,state:"selected"});return}r.currentValues.forEach((a,m)=>{if(a.state==="idle")return;let f=tl(a,m+1,o),p=bh(r)?rl(a):xh(a);t.push({...i,...f,...p})})}),wh(e).forEach((r,n)=>{let o=Ih(r,n+1);r.values.forEach((i,a)=>{if(i.state==="idle")return;let m=tl(i,a+1,"specific"),f=rl(i);t.push({...o,...m,...f})})}),t},bh=e=>e.type==="specific",Ah=e=>e.type==="hierarchical",Ch=e=>[...Object.values(e.facetSet),...Object.values(e.categoryFacetSet),...Object.values(e.dateFacetSet),...Object.values(e.numericFacetSet)].map(t=>t.request),wh=e=>[...Object.values(e.automaticFacetSet.set)].map(t=>t.response),tl=(e,t,r)=>({state:e.state,valuePosition:t,facetType:r}),xh=e=>({displayValue:`${e.start}..${e.end}`,value:`${e.start}..${e.end}`,start:e.start,end:e.end,endInclusive:e.endInclusive}),rl=e=>({displayValue:e.value,value:e.value}),Rh=(e,t)=>ja(e,t).map(n=>n.value).join(";"),Eh=(e,t)=>{let n=Rh(e,t);return{value:n,valuePosition:1,displayValue:n}},Ih=(e,t)=>({title:nl(e.field,e.field),field:e.field,id:e.field,facetPosition:t}),Ph=(e,t)=>({title:nl(e.field,e.facetId),field:e.field,id:e.facetId,facetPosition:t}),nl=(e,t)=>`${e}_${t}`,kh=(e,t)=>e.facetSet[t]?.request||e.categoryFacetSet[t]?.request||e.dateFacetSet[t]?.request||e.numericFacetSet[t]?.request||e.automaticFacetSet.set[t]?.response,Fh=(e,t)=>{let r=kh(e,t);return r?r.type:"specific"};d();c();l();u();var Ar=e=>{if(Oh(e)){let t=Object.values(e.answer.queries).pop()?.data;return typeof t=="object"&&t!==null&&"answerId"in t?t.answerId:void 0}if(Th(e))return e.search?.response?.extendedResults?.generativeQuestionAnsweringId},Oh=e=>"answer"in e&&"generatedAnswer"in e&&!X(e.generatedAnswer?.answerConfigurationId),Th=e=>"search"in e&&e.search!==void 0&&typeof e.search=="object",ol=e=>e.generatedAnswer?.fieldsToIncludeInCitations,Dh=se(e=>e.generatedAnswer?.citations,(e,t)=>t,(e,t)=>e?.find(r=>r.id===t));d();c();l();u();var Ne=()=>({q:"",enableQuerySyntax:!1});d();c();l();u();d();c();l();u();var il=(r=>(r.Ascending="ascending",r.Descending="descending",r))(il||{}),al=(i=>(i.Relevancy="relevancy",i.QRE="qre",i.Date="date",i.Field="field",i.NoSort="nosort",i))(al||{}),_a=e=>{if(yc(e))return e.map(t=>_a(t)).join(",");switch(e.by){case"relevancy":case"qre":case"nosort":return e.by;case"date":return`date ${e.order}`;case"field":return`@${e.field} ${e.order}`;default:return""}},sl=()=>({by:"relevancy"});var _k=new K({values:{by:new _i({enum:al,required:!0}),order:new _i({enum:il}),field:new H}});function jo(){return _a(sl())}d();c();l();u();d();c();l();u();var Cr=()=>"default";var qh=e=>{let t=e.configuration.search.locale.split("-")[0];return!t||t.length!==2?"en":t},ct=class{constructor(t){this.getState=t;pe(this,"state");this.state=t()}getLanguage(){return qh(this.state)}getBaseMetadata(){let{context:t,configuration:r}=this.state,n=t?.contextValues||{},o={};for(let[i,a]of Object.entries(n)){let m=`context_${i}`;o[m]=a}return r.analytics.analyticsMode==="legacy"&&(o.coveoHeadlessVersion=sr),o}getOriginContext(){return this.state.configuration.analytics.originContext}getOriginLevel1(){return this.state.searchHub||Cr()}getOriginLevel2(){return this.state.configuration.analytics.originLevel2}getOriginLevel3(){return this.state.configuration.analytics.originLevel3}getIsAnonymous(){return this.state.configuration.analytics.anonymous}};var yn=class yn extends ct{constructor(){super(...arguments);pe(this,"getFacetRequest",r=>this.state.facetSet?.[r]?.request||this.state.categoryFacetSet?.[r]?.request||this.state.dateFacetSet?.[r]?.request||this.state.numericFacetSet?.[r]?.request||this.state.automaticFacetSet?.set[r]?.response)}getFacetState(){return Na(Ma(this.getState()))}getPipeline(){return this.state.pipeline||this.state.search?.response.pipeline||yn.fallbackPipelineName}getSearchEventRequestPayload(){return{queryText:this.queryText,responseTime:this.responseTime,results:this.resultURIs,numberOfResults:this.numberOfResults}}getSearchUID(){let r=this.getState();return r.search?.searchResponseId||r.search?.response.searchUid||We().response.searchUid}getSplitTestRunName(){return this.state.search?.response.splitTestRun}getSplitTestRunVersion(){let r=!!this.getSplitTestRunName(),n=this.state.search?.response.pipeline||this.state.pipeline||yn.fallbackPipelineName;return r?n:void 0}getBaseMetadata(){let r=this.getState(),n=super.getBaseMetadata(),o=Ar(r);return o&&(n.generativeQuestionAnsweringId=o),n}getFacetMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:i,facetValue:n,facetTitle:`${i}_${r}`}}getFacetClearAllMetadata(r){let o=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:o,facetTitle:`${o}_${r}`}}getFacetUpdateSortMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:i,criteria:n,facetTitle:`${i}_${r}`}}getRangeBreadcrumbFacetMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:i,facetRangeEnd:n.end,facetRangeEndInclusive:n.endInclusive,facetRangeStart:n.start,facetTitle:`${i}_${r}`}}getResultSortMetadata(){return{...this.getBaseMetadata(),resultsSortBy:this.state.sortCriteria??jo()}}getStaticFilterToggleMetadata(r,n){return{...this.getBaseMetadata(),staticFilterId:r,staticFilterValue:n}}getStaticFilterClearAllMetadata(r){return{...this.getBaseMetadata(),staticFilterId:r}}getUndoTriggerQueryMetadata(r){return{...this.getBaseMetadata(),undoneQuery:r}}getCategoryBreadcrumbFacetMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),categoryFacetId:r,categoryFacetField:i,categoryFacetPath:n,categoryFacetTitle:`${i}_${r}`}}getOmniboxAnalyticsMetadata(r,n){let o=this.state.querySuggest?.[r],i=o.completions.map(p=>p.expression),a=o.partialQueries.length-1,m=o.partialQueries[a]||"",f=o.responseId;return{...this.getBaseMetadata(),suggestionRanking:i.indexOf(n),partialQuery:m,partialQueries:o.partialQueries.length>0?o.partialQueries:"",suggestions:i.length>0?i:"",querySuggestResponseId:f}}getInterfaceChangeMetadata(){return{...this.getBaseMetadata(),interfaceChangeTo:this.state.configuration.analytics.originLevel2}}getOmniboxFromLinkMetadata(r){return{...this.getBaseMetadata(),...r}}getGeneratedAnswerMetadata(){let r=this.getState(),n={};return r.generatedAnswer?.isVisible!==void 0&&(n.showGeneratedAnswer=r.generatedAnswer.isVisible),n}get resultURIs(){return this.results?.map(r=>({documentUri:r.uri,documentUriHash:r.raw.urihash}))}get results(){return this.state.search?.response.results}get queryText(){return this.state.query?.q||Ne().q}get responseTime(){return this.state.search?.duration||We().duration}get numberOfResults(){return this.state.search?.response.totalCountFiltered||We().response.totalCountFiltered}};pe(yn,"fallbackPipelineName","default");var vt=yn,cl=({logger:e,getState:t,analyticsClientMiddleware:r=(i,a)=>a,preprocessRequest:n,provider:o})=>{let i=t(),a=i.configuration.accessToken,m=i.configuration.analytics.apiBaseUrl??Pe(i.configuration.organizationId,i.configuration.environment,"analytics"),f=i.configuration.analytics.runtimeEnvironment,p=i.configuration.analytics.enabled,y=new Ro({token:a,endpoint:m,runtimeEnvironment:f,preprocessRequest:mn(e,n),beforeSendHooks:[gn(e,r),(h,S)=>(e.info({...S,type:h,endpoint:m,token:a},"Analytics request"),S)]},o);return p||y.disable(),y},Va=()=>{let t=Le.getInstance().getHistory().reverse().find(r=>r.name==="PageView"&&r.value);return t?t.value:""};var Mo=/*#__PURE__*/function(){var _ref7=_asyncToGenerator(function*(e,t){let r=e.analyticsMode==="next";return{analytics:{clientId:yield Zu(e),clientTimestamp:new Date().toISOString(),documentReferrer:e.originLevel3,originContext:e.originContext,...(t&&{actionCause:t.actionCause,customData:t.customData}),...(t&&!r&&{customData:t.customData}),...(e.userDisplayName&&{userDisplayName:e.userDisplayName}),...(e.documentLocation&&{documentLocation:e.documentLocation}),...(e.deviceId&&{deviceId:e.deviceId}),...(Va()&&{pageId:Va()}),...(r&&e.trackingId&&{trackingId:e.trackingId}),capture:r,...(r&&{source:yr(e)})}}});return function Mo(_x9,_x0){return _ref7.apply(this,arguments)}}();d();c();l();u();d();c();l();u();d();c();l();u();var wr=()=>({duration:0,error:null,isLoading:!1,id:"Recommendation",recommendations:[],searchUid:"",splitTestRun:"",pipeline:""});var hn=class extends ct{getPipeline(){return this.state.pipeline||this.state.recommendation?.pipeline||"default"}getSearchEventRequestPayload(){return{queryText:Ne().q,responseTime:this.responseTime,results:this.mapResultsToAnalyticsDocument(),numberOfResults:this.numberOfResults}}getSearchUID(){return this.getState().recommendation?.searchUid||wr().searchUid}getSplitTestRunName(){return this.state.recommendation?.splitTestRun}getSplitTestRunVersion(){let t=!!this.getSplitTestRunName(),r=this.state.recommendation?.pipeline||this.state.pipeline||"default";return t?r:void 0}get responseTime(){return this.state.recommendation?.duration||wr().duration}mapResultsToAnalyticsDocument(){return this.state.recommendation?.recommendations.map(t=>({documentUri:t.uri,documentUriHash:t.raw.urihash}))}get numberOfResults(){return this.state.recommendation?.recommendations.length||wr().recommendations.length}};d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();var ul=/^(?:[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 jh(e){return typeof e=="string"&&ul.test(e)}var La=jh;d();c();l();u();var Re=[];for(let e=0;e<256;++e)Re.push((e+256).toString(16).slice(1));function ll(e,t=0){return(Re[e[t+0]]+Re[e[t+1]]+Re[e[t+2]]+Re[e[t+3]]+"-"+Re[e[t+4]]+Re[e[t+5]]+"-"+Re[e[t+6]]+Re[e[t+7]]+"-"+Re[e[t+8]]+Re[e[t+9]]+"-"+Re[e[t+10]]+Re[e[t+11]]+Re[e[t+12]]+Re[e[t+13]]+Re[e[t+14]]+Re[e[t+15]]).toLowerCase()}d();c();l();u();var Ua,Mh=new Uint8Array(16);function Qa(){if(!Ua){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Ua=crypto.getRandomValues.bind(crypto)}return Ua(Mh)}d();c();l();u();d();c();l();u();var Nh=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ba={randomUUID:Nh};function _h(e,t,r){if(Ba.randomUUID&&!t&&!e)return Ba.randomUUID();e=e||{};let n=e.random??e.rng?.()??Qa();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let o=0;o<16;++o)t[r+o]=n[o];return t}return ll(n)}var $a=_h;d();c();l();u();function dl(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}function Vh({config:e,environment:t,event:r,listenerManager:n}){let{url:o,token:i,mode:a}=e;a!=="disabled"&&(n.call(r),t.send(o,i,r))}var pl="visitorId";function Lh(e){return{getClientId:()=>{let t=e.get(),r=t.storage,n=r.getItem(pl),o=n&&La(n)?n:t.generateUUID();return r.setItem(pl,o),o}}}var hl="1.2.7",Ha=128,Sl=192,fl=224,ml=240,Uh=248;function Qh(e){return(e&Uh)===ml?4:(e&ml)===fl?3:(e&fl)===Sl?2:1}function Bh(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&Ha)!=Ha)break;if(r-=3,(n&Sl)!=Ha){t-r>=Qh(n)*3&&(r=t);break}}return e.substring(0,r)}function $h(e){let{trackingId:t}=e;return{trackingId:t}}function Hh(e){return(e.source||[]).concat([`relay@${hl}`])}function vl(e,t,r,n){let{getReferrer:o,getLocation:i,getUserAgent:a}=r,m=$h(t),f=n.getClientId();return Object.freeze({type:e,config:m,ts:Date.now(),source:Hh(t),clientId:f,userAgent:a(),referrer:gl(o()),location:gl(i())})}function gl(e){return e!==null?Bh(e,1024):null}function zh(e,t,r,n,o){return{...t,meta:vl(e,r,n,o)}}var Gh="*";function Wh(){let e=[];function t({type:f,callback:p}){return e.findIndex(y=>y.type===f&&y.callback===p)}function r(f,p){return f.type==="*"||p===f.type}function n(f){return t(f)<0&&e.push(f),()=>m(f.type,f.callback)}function o(f){e.forEach(p=>{if(r(p,f.meta.type))try{p.callback(f)}catch(y){console.error(y)}})}function i(f){if(f===Gh)e.length=0;else for(let p=e.length-1;p>=0;p--)e[p].type===f&&e.splice(p,1)}function a(f){let p=t(f);p>=0&&e.splice(p,1)}function m(f,p){p?a({type:f,callback:p}):i(f)}return{add:n,call:o,remove:m}}function yl({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 Kh(e){let t=yl(e);return{get:()=>t,update:r=>{t=yl({...t,...r})}}}var za=Yh();function Yh(){let e="coveo_",t=r=>{let n=r.split(".").slice(-2);return n.length==2?n.join("."):""};return{getItem(r){let n=`${e}${r}=`,o=document.cookie.split(";");for(let i of o){let a=i.replace(/^\s+/,"");if(a.lastIndexOf(n,0)===0)return a.substring(n.length,a.length)}return null},setItem(r,n,o){let i=t(window.location.hostname),a=`;expires=${new Date(new Date().getTime()+o).toUTCString()}`,m=i?`;domain=${i}`:"";document.cookie=`${e}${r}=${n}${a}${m};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function Jh(){return{getItem(e){return za.getItem(e)||localStorage.getItem(e)},removeItem(e){za.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),za.setItem(e,t,31556952e3)}}}function Xh(){let e=document.referrer;return e===""?null:e}function Ga(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(dl().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:()=>Xh(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>$a(),storage:Jh()}}function Zh(){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 eS(){return{getItem(){return null},removeItem(){},setItem(){}}}function tS(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:eS()}}function rS(e){let t=e.get().mode!=="disabled",r=e.get().environment,n=tS();return t&&r?{storage:n.storage,...r,runtime:"custom"}:t&&nS()&&Zh()?Ga():n}function nS(){try{return typeof window=="object"}catch{return!1}}function oS(e){return{get:()=>Object.freeze(rS(e))}}function bl(e){let t=Kh(e),r=Wh(),n=oS(t),o=Lh(n);return{emit:(i,a)=>{let m=t.get(),f=n.get(),p=zh(i,a,m,f,o);return Vh({config:m,environment:f,event:p,listenerManager:r})},getMeta:i=>vl(i,t.get(),n.get(),o),on:(i,a)=>r.add({type:i,callback:a}),off:(i,a)=>r.remove(i,a),updateConfig:i=>t.update(i),version:hl}}d();c();l();u();function Al(){return typeof window<"u"&&typeof document<"u"}var Sn=se(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>yr(e.configuration.analytics),(e,t)=>t,(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:i},a,m)=>{let f=aS(m);return bl({mode:i?"emit":"disabled",url:o??Vn(e,t),token:r,trackingId:n??null,source:a,environment:f})}),iS={generateUUID:()=>"",getLocation:()=>null,getReferrer:()=>null,getUserAgent:()=>null,send:()=>{},storage:{getItem:()=>null,setItem:()=>{},removeItem:()=>{}}},aS=e=>{if(!e)return;let t=e();return{...(Al()?Ga():iS),generateUUID:()=>t.clientId,getLocation:()=>t.location,getReferrer:()=>t.referrer,getUserAgent:()=>t.userAgent}};d();c();l();u();var vn=class extends ct{getSearchUID(){return this.state.documentSuggestion?.status.lastResponseId??""}},Cl=({logger:e,getState:t,analyticsClientMiddleware:r=(i,a)=>a,preprocessRequest:n,provider:o=new vn(t)})=>{let i=t(),a=i.configuration.accessToken,m=i.configuration.analytics.apiBaseUrl??Pe(i.configuration.organizationId,i.configuration.environment,"analytics"),f=i.configuration.analytics.runtimeEnvironment,p=i.configuration.analytics.enabled,y=new ko({enableAnalytics:p,token:a,endpoint:m,runtimeEnvironment:f,preprocessRequest:mn(e,n),beforeSendHooks:[gn(e,r),(h,S)=>(e.info({...S,type:h,endpoint:m,token:a},"Analytics request"),S)]},o);return p||y.disable(),y};d();c();l();u();d();c();l();u();function wl(e,t){return{...new vt(t).getBaseMetadata(),actionCause:e,type:e}}function sS(e){return Object.assign(e,{instantlyCallable:!0})}function cS(e,t){let r=i=>sS(le(e,i)),n=r(/*#__PURE__*/function(){var _ref8=_asyncToGenerator(function*(i,{getState:a,extra:m}){let{analyticsClientMiddleware:f,preprocessRequest:p,logger:y}=m;return yield(yield t({getState:a,analyticsClientMiddleware:f,preprocessRequest:p,logger:y})).log({state:a(),extra:m})});return function(_x1,_x10){return _ref8.apply(this,arguments)}}());return Object.assign(n,{prepare:function(){var _ref9=_asyncToGenerator(function*({getState:i,analyticsClientMiddleware:a,preprocessRequest:m,logger:f}){let{description:p,log:y}=yield t({getState:i,analyticsClientMiddleware:a,preprocessRequest:m,logger:f});return{description:p,action:r(/*#__PURE__*/function(){var _ref0=_asyncToGenerator(function*(h,{getState:S,extra:g}){return yield y({state:S(),extra:g})});return function(_x12,_x13){return _ref0.apply(this,arguments)}}())}});return function prepare(_x11){return _ref9.apply(this,arguments)}}()}),n}var xl=(e,t,r)=>{function n(...o){let i=o.length===1?{...o[0],__legacy__getBuilder:t(o[0].__legacy__getBuilder),analyticsConfigurator:e,providerClass:r}:{prefix:o[0],__legacy__getBuilder:t(o[1]),__legacy__provider:o[2],analyticsConfigurator:e,providerClass:r};return dS(i)}return n},uS=e=>e.configuration.analytics.analyticsMode==="legacy",lS=e=>e.configuration.analytics.analyticsMode==="next",dS=({prefix:e,__legacy__getBuilder:t,__legacy__provider:r,analyticsPayloadBuilder:n,analyticsType:o,analyticsConfigurator:i,providerClass:a})=>(r??(r=m=>new a(m)),cS(e,/*#__PURE__*/function(){var _ref1=_asyncToGenerator(function*({getState:m,analyticsClientMiddleware:f,preprocessRequest:p,logger:y}){let h=[],S={log:function(){var _ref10=_asyncToGenerator(function*({state:w}){for(let F of h)yield F(w)});return function log(_x15){return _ref10.apply(this,arguments)}}()},g=m(),v=i({getState:m,logger:y,analyticsClientMiddleware:f,preprocessRequest:p,provider:r(m)}),R=yield t(v,m());S.description=R?.description,h.push(/*#__PURE__*/function(){var _ref11=_asyncToGenerator(function*(w){uS(w)&&(yield pS(R,r,w,y,v.coveoAnalyticsClient))});return function(_x16){return _ref11.apply(this,arguments)}}());let{emit:P}=Sn(g);return h.push(/*#__PURE__*/function(){var _ref12=_asyncToGenerator(function*(w){if(lS(w)&&o&&n){let F=n(w);yield vS(P,o,F)}});return function(_x17){return _ref12.apply(this,arguments)}}()),S});return function(_x14){return _ref1.apply(this,arguments)}}()));function pS(_x18,_x19,_x20,_x21,_x22){return _pS.apply(this,arguments)}function _pS(){_pS=_asyncToGenerator(function*(e,t,r,n,o){t(()=>r);let i=yield e?.log({searchUID:t(()=>r).getSearchUID()});n.info({client:o,response:i},"Analytics response")});return _pS.apply(this,arguments)}var fS=e=>r=>(n,o)=>Promise.resolve({description:{actionCause:e},log:function(){var _ref13=_asyncToGenerator(function*(i){r(n,o)});return function log(_x23){return _ref13.apply(this,arguments)}}()}),je=xl(e=>cl({...e,provider:e.provider||new vt(e.getState)}),e=>e,vt),WT=xl(Cl,fS("caseAssist"),vn);var Wa=(e,t)=>{let r=t.recommendation?.recommendations.findIndex(({uniqueId:n})=>e.uniqueId===n)||0;return mS(e,r,t)};function mS(e,t,r){let n=e.raw.collection;return{collectionName:typeof n=="string"?n:"default",documentAuthor:hS(e),documentPosition:t+1,documentTitle:e.title,documentUri:e.uri,documentUriHash:e.raw.urihash,documentUrl:e.clickUri,rankingModifier:e.rankingModifier||"",sourceName:SS(e),queryPipeline:r.pipeline||pr()}}var No=e=>(e.raw.permanentid||console.warn("Missing field permanentid on result. This might cause many issues with your Coveo deployment. See https://docs.coveo.com/en/1913 and https://docs.coveo.com/en/1640 for more information.",e),{contentIDKey:"permanentid",contentIDValue:e.raw.permanentid||""}),Rl={urihash:new H,sourcetype:new H,permanentid:new H},El={uniqueId:W,raw:new K({values:Rl}),title:W,uri:W,clickUri:W,rankingModifier:new H({required:!1,emptyAllowed:!0})};function gS(e){return Object.assign({},...Object.keys(Rl).map(t=>({[t]:e[t]})))}function yS(e){return Object.assign({},...Object.keys(El).map(t=>({[t]:e[t]})),{raw:gS(e.raw)})}function hS(e){let t=e.raw.author;return X(t)?"unknown":Array.isArray(t)?t.join(";"):`${t}`}function SS(e){let t=e.raw.source;return X(t)?"unknown":t}var Ka=e=>new Fe(El).validate(yS(e));function vS(_x24,_x25,_x26){return _vS.apply(this,arguments)}function _vS(){_vS=_asyncToGenerator(function*(e,t,r){yield e(t,r)});return _vS.apply(this,arguments)}d();c();l();u();var Il=()=>je("analytics/recommendation/update",e=>e.makeRecommendationInterfaceLoad(),e=>new hn(e)),Pl=()=>({actionCause:"recommendationInterfaceLoad"}),Vo=e=>je({prefix:"analytics/recommendation/open",__legacy__getBuilder:(t,r)=>(Ka(e),t.makeRecommendationOpen(Wa(e,r),No(e))),__legacy__provider:t=>new hn(t),analyticsType:"itemClick",analyticsPayloadBuilder:t=>{let r=Wa(e,t),n=No(e);return{responseId:e.searchUid??"",position:r.documentPosition,itemMetadata:{uniqueFieldName:n.contentIDKey,uniqueFieldValue:n.contentIDValue,title:r.documentTitle,author:r.documentAuthor,url:r.documentUrl}}}});var xr=T("recommendation/set",e=>Q(e,{id:W})),bt=le("recommendation/get",/*#__PURE__*/function(){var _ref14=_asyncToGenerator(function*(e,{getState:t,rejectWithValue:r,extra:{apiClient:n}}){let o=t(),i=Date.now(),a=yield bS(o),m=yield n.recommendations(a),f=Date.now()-i;return Oe(m)?r(m.error):{recommendations:m.success.results,analyticsAction:Il(),duration:f,searchUid:m.success.searchUid,splitTestRun:m.success.splitTestRun,pipeline:m.success.pipeline}});return function(_x27,_x28){return _ref14.apply(this,arguments)}}()),bS=/*#__PURE__*/function(){var _ref15=_asyncToGenerator(function*(e){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??pt(e.configuration.organizationId,e.configuration.environment),recommendation:e.recommendation.id,tab:e.configuration.analytics.originLevel2,referrer:e.configuration.analytics.originLevel3,timezone:e.configuration.search.timezone,locale:e.configuration.search.locale,actionsHistory:e.configuration.analytics.enabled?Le.getInstance().getHistory():[],...(e.advancedSearchQueries&&{aq:e.advancedSearchQueries.aq,cq:e.advancedSearchQueries.cq}),...(e.pipeline&&{pipeline:e.pipeline}),...(e.searchHub&&{searchHub:e.searchHub}),...(e.context&&{context:e.context.contextValues}),...(e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues}),...(e.fields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.configuration.analytics.enabled&&(yield AS(e,Pl()))),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")}),...(e.pagination&&{numberOfResults:e.pagination.numberOfResults})}});return function bS(_x29){return _ref15.apply(this,arguments)}}(),AS=/*#__PURE__*/function(){var _ref16=_asyncToGenerator(function*(e,t){let r=e.configuration.analytics.analyticsMode==="legacy"?void 0:{actionCause:t.actionCause,type:t.actionCause};return yield Mo(e.configuration.analytics,r)});return function AS(_x30,_x31){return _ref16.apply(this,arguments)}}();var Rr=ge(wr(),e=>{e.addCase(xr,(t,r)=>{t.id=r.payload.id}).addCase(bt.rejected,(t,r)=>{t.error=r.payload?r.payload:null,t.isLoading=!1}).addCase(bt.fulfilled,(t,r)=>{t.error=null,t.recommendations=r.payload.recommendations.map(n=>({...n,searchUid:r.payload.searchUid})),t.duration=r.payload.duration,t.isLoading=!1,t.searchUid=r.payload.searchUid,t.splitTestRun=r.payload.splitTestRun,t.pipeline=r.payload.pipeline}).addCase(bt.pending,t=>{t.isLoading=!0}).addCase(fo,(t,r)=>{t.error=r.payload,t.isLoading=!1})});d();c();l();u();var Er=T("searchHub/set",e=>Q(e,new H({required:!0,emptyAllowed:!0})));d();c();l();u();var Ir=ge(Cr(),e=>{e.addCase(Er,(t,r)=>r.payload).addCase(qe.fulfilled,(t,r)=>r.payload?.searchHub??t).addCase(Je,(t,r)=>r.payload.searchHub||t)});d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();function kl(e){return{status:e,isUninitialized:e==="uninitialized",isLoading:e==="pending",isSuccess:e==="fulfilled",isError:e==="rejected"}}var Fl=Ke;function Ql(e,t){if(e===t||!(Fl(e)&&Fl(t)||Array.isArray(e)&&Array.isArray(t)))return t;let r=Object.keys(t),n=Object.keys(e),o=r.length===n.length,i=Array.isArray(t)?[]:{};for(let a of r)i[a]=Ql(e[a],t[a]),o&&(o=e[a]===i[a]);return o?e:i}function Pr(e){let t=0;for(let r in e)t++;return t}var Ol=e=>[].concat(...e);function CS(e){return new RegExp("(^|:)//").test(e)}function wS(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function Qo(e){return e!=null}function xS(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var RS=e=>e.replace(/\/$/,""),ES=e=>e.replace(/^\//,"");function IS(e,t){if(!e)return t;if(!t)return e;if(CS(t))return t;let r=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=RS(e),t=ES(t),`${e}${r}${t}`}function PS(e,t,r){return e.has(t)?e.get(t):e.set(t,r).get(t)}var Tl=(...e)=>A(...e),kS=e=>e.status>=200&&e.status<=299,FS=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function Dl(e){if(!Ke(e))return e;let t={...e};for(let[r,n]of Object.entries(t))n===void 0&&delete t[r];return t}function Bl({baseUrl:e,prepareHeaders:t=h=>h,fetchFn:r=Tl,paramsSerializer:n,isJsonContentType:o=FS,jsonContentType:i="application/json",jsonReplacer:a,timeout:m,responseHandler:f,validateStatus:p,...y}={}){return typeof A>"u"&&r===Tl&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),(/*#__PURE__*/function(){var _ref17=_asyncToGenerator(function*(S,g,v){let{getState:R,extra:P,endpoint:w,forced:F,type:x}=g,E,{url:M,headers:O=new C(y.headers),params:I=void 0,responseHandler:k=f??"json",validateStatus:D=p??kS,timeout:N=m,...$}=typeof S=="string"?{url:S}:S,U,V=g.signal;N&&(U=new s.AbortController,g.signal.addEventListener("abort",U.abort),V=U.signal);let _={...y,signal:V,...$};O=new C(Dl(O)),_.headers=(yield t(O,{getState:R,arg:S,extra:P,endpoint:w,forced:F,type:x,extraOptions:v}))||O;let B=Z=>typeof Z=="object"&&(Ke(Z)||Array.isArray(Z)||typeof Z.toJSON=="function");if(!_.headers.has("content-type")&&B(_.body)&&_.headers.set("content-type",i),B(_.body)&&o(_.headers)&&(_.body=JSON.stringify(_.body,a)),I){let Z=~M.indexOf("?")?"&":"?",oe=n?n(I):new URLSearchParams(Dl(I));M+=Z+oe}M=IS(e,M);let L=new Request(M,_);E={request:new Request(M,_)};let G,Y=!1,te=U&&setTimeout(()=>{Y=!0,U.abort()},N);try{G=yield r(L)}catch(Z){return{error:{status:Y?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(Z)},meta:E}}finally{te&&clearTimeout(te),U?.signal.removeEventListener("abort",U.abort)}let ce=G.clone();E.response=ce;let ee,re="";try{let Z;if(yield Promise.all([h(G,k).then(oe=>ee=oe,oe=>Z=oe),ce.text().then(oe=>re=oe,()=>{})]),Z)throw Z}catch(Z){return{error:{status:"PARSING_ERROR",originalStatus:G.status,data:re,error:String(Z)},meta:E}}return D(G,ee)?{data:ee,meta:E}:{error:{status:G.status,data:ee},meta:E}});return function(_x32,_x33,_x34){return _ref17.apply(this,arguments)}}());function h(_x35,_x36){return _h2.apply(this,arguments)}function _h2(){_h2=_asyncToGenerator(function*(S,g){if(typeof g=="function")return g(S);if(g==="content-type"&&(g=o(S.headers)?"json":"text"),g==="json"){let v=yield S.text();return v.length?JSON.parse(v):null}return S.text()});return _h2.apply(this,arguments)}}var kr=class{constructor(e,t=void 0){this.value=e,this.meta=t}};function OS(){return _OS.apply(this,arguments)}function _OS(){_OS=_asyncToGenerator(function*(e=0,t=5){let r=Math.min(e,t),n=~~((Math.random()+.4)*(300<<r));yield new Promise(o=>setTimeout(i=>o(i),n))});return _OS.apply(this,arguments)}function TS(e,t){throw Object.assign(new kr({error:e,meta:t}),{throwImmediately:!0})}var ql={},DS=(e,t)=>(/*#__PURE__*/function(){var _ref18=_asyncToGenerator(function*(r,n,o){let i=[5,(t||ql).maxRetries,(o||ql).maxRetries].filter(y=>y!==void 0),[a]=i.slice(-1),f={maxRetries:a,backoff:OS,retryCondition:(y,h,{attempt:S})=>S<=a,...t,...o},p=0;for(;;)try{let y=yield e(r,n,o);if(y.error)throw new kr(y);return y}catch(y){if(p++,y.throwImmediately){if(y instanceof kr)return y.value;throw y}if(y instanceof kr&&!f.retryCondition(y.value.error,r,{attempt:p,baseQueryApi:n,extraOptions:o}))return y.value;yield f.backoff(p,f.maxRetries)}});return function(_x37,_x38,_x39){return _ref18.apply(this,arguments)}}()),$l=Object.assign(DS,{fail:TS}),Za=T("__rtkq/focused"),Hl=T("__rtkq/unfocused"),es=T("__rtkq/online"),zl=T("__rtkq/offline");function ts(e){return e.type==="query"}function qS(e){return e.type==="mutation"}function rs(e){return e.type==="infinitequery"}function ns(e,t,r,n,o,i){return jS(e)?e(t,r,n,o).filter(Qo).map(Ya).map(i):Array.isArray(e)?e.map(Ya).map(i):[]}function jS(e){return typeof e=="function"}function Ya(e){return typeof e=="string"?{type:e}:e}function MS(e,t){return e.catch(t)}var Cn=Symbol("forceQueryFn"),Ja=e=>typeof e[Cn]=="function";function NS({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:r,mutationThunk:n,api:o,context:i}){let a=new Map,m=new Map,{unsubscribeQueryResult:f,removeMutationResult:p,updateSubscriptionOptions:y}=o.internalActions;return{buildInitiateQuery:w,buildInitiateInfiniteQuery:F,buildInitiateMutation:x,getRunningQueryThunk:h,getRunningMutationThunk:S,getRunningQueriesThunk:g,getRunningMutationsThunk:v};function h(E,M){return O=>{let I=i.endpointDefinitions[E],k=e({queryArgs:M,endpointDefinition:I,endpointName:E});return a.get(O)?.[k]}}function S(E,M){return O=>m.get(O)?.[M]}function g(){return E=>Object.values(a.get(E)||{}).filter(Qo)}function v(){return E=>Object.values(m.get(E)||{}).filter(Qo)}function R(E){}function P(E,M){let O=(I,{subscribe:k=!0,forceRefetch:D,subscriptionOptions:N,[Cn]:$,...U}={})=>(V,_)=>{let B=e({queryArgs:I,endpointDefinition:M,endpointName:E}),L,z={...U,type:"query",subscribe:k,forceRefetch:D,subscriptionOptions:N,endpointName:E,originalArgs:I,queryCacheKey:B,[Cn]:$};if(ts(M))L=t(z);else{let{direction:ue,initialPageParam:me}=U;L=r({...z,direction:ue,initialPageParam:me})}let G=o.endpoints[E].select(I),Y=V(L),te=G(_());let{requestId:ce,abort:ee}=Y,re=te.requestId!==ce,Z=a.get(V)?.[B],oe=()=>G(_()),ye=Object.assign($?Y.then(oe):re&&!Z?Promise.resolve(te):Promise.all([Z,Y]).then(oe),{arg:I,requestId:ce,subscriptionOptions:N,queryCacheKey:B,abort:ee,unwrap(){return _asyncToGenerator(function*(){let ue=yield ye;if(ue.isError)throw ue.error;return ue.data})()},refetch:()=>V(O(I,{subscribe:!1,forceRefetch:!0})),unsubscribe(){k&&V(f({queryCacheKey:B,requestId:ce}))},updateSubscriptionOptions(ue){ye.subscriptionOptions=ue,V(y({endpointName:E,requestId:ce,queryCacheKey:B,options:ue}))}});if(!Z&&!re&&!$){let ue=PS(a,V,{});ue[B]=ye,ye.then(()=>{delete ue[B],Pr(ue)||a.delete(V)})}return ye};return O}function w(E,M){return P(E,M)}function F(E,M){return P(E,M)}function x(E){return(M,{track:O=!0,fixedCacheKey:I}={})=>(k,D)=>{let N=n({type:"mutation",endpointName:E,originalArgs:M,track:O,fixedCacheKey:I}),$=k(N);let{requestId:U,abort:V,unwrap:_}=$,B=MS($.unwrap().then(Y=>({data:Y})),Y=>({error:Y})),L=()=>{k(p({requestId:U,fixedCacheKey:I}))},z=Object.assign(B,{arg:$.arg,requestId:U,abort:V,unwrap:_,reset:L}),G=m.get(k)||{};return m.set(k,G),G[U]=z,z.then(()=>{delete G[U],Pr(G)||m.delete(k)}),I&&(G[I]=z,z.then(()=>{G[I]===z&&(delete G[I],Pr(G)||m.delete(k))})),z}}}function _S(e){return e}var Lo=(e={})=>({...e,[cn]:!0});function VS({reducerPath:e,baseQuery:t,context:{endpointDefinitions:r},serializeQueryArgs:n,api:o,assertTagType:i,selectors:a}){let m=(k,D,N,$)=>(U,V)=>{let _=r[k],B=n({queryArgs:D,endpointDefinition:_,endpointName:k});if(U(o.internalActions.queryResultPatched({queryCacheKey:B,patches:N})),!$)return;let L=o.endpoints[k].select(D)(V()),z=ns(_.providesTags,L.data,void 0,D,{},i);U(o.internalActions.updateProvidedBy({queryCacheKey:B,providedTags:z}))};function f(k,D,N=0){let $=[D,...k];return N&&$.length>N?$.slice(0,-1):$}function p(k,D,N=0){let $=[...k,D];return N&&$.length>N?$.slice(1):$}let y=(k,D,N,$=!0)=>(U,V)=>{let B=o.endpoints[k].select(D)(V()),L={patches:[],inversePatches:[],undo:()=>U(o.util.patchQueryData(k,D,L.inversePatches,$))};if(B.status==="uninitialized")return L;let z;if("data"in B)if(De(B.data)){let[G,Y,te]=Xn(B.data,N);L.patches.push(...Y),L.inversePatches.push(...te),z=G}else z=N(B.data),L.patches.push({op:"replace",path:[],value:z}),L.inversePatches.push({op:"replace",path:[],value:B.data});return L.patches.length===0||U(o.util.patchQueryData(k,D,L.patches,$)),L},h=(k,D,N)=>$=>$(o.endpoints[k].initiate(D,{subscribe:!1,forceRefetch:!0,[Cn]:()=>({data:N})})),S=(k,D)=>k.query&&k[D]?k[D]:_S,g=/*#__PURE__*/function(){var _ref19=_asyncToGenerator(function*(k,{signal:D,abort:N,rejectWithValue:$,fulfillWithValue:U,dispatch:V,getState:_,extra:B}){let L=r[k.endpointName];try{let z=S(L,"transformResponse"),G={signal:D,abort:N,dispatch:V,getState:_,extra:B,endpoint:k.endpointName,type:k.type,forced:k.type==="query"?v(k,_()):void 0,queryCacheKey:k.type==="query"?k.queryCacheKey:void 0},Y=k.type==="query"?k[Cn]:void 0,te,ce=/*#__PURE__*/function(){var _ref20=_asyncToGenerator(function*(re,Z,oe,ye){if(Z==null&&re.pages.length)return Promise.resolve({data:re});let ue={queryArg:k.originalArgs,pageParam:Z},me=yield ee(ue),he=ye?f:p;return{data:{pages:he(re.pages,me.data,oe),pageParams:he(re.pageParams,Z,oe)}}});return function ce(_x42,_x43,_x44,_x45){return _ref20.apply(this,arguments)}}();function ee(_x46){return _ee.apply(this,arguments)}function _ee(){_ee=_asyncToGenerator(function*(re){let Z,{extraOptions:oe}=L;if(Y?Z=Y():L.query?Z=yield t(L.query(re),G,oe):Z=yield L.queryFn(re,G,oe,ue=>t(ue,G,oe)),typeof process<"u",Z.error)throw new kr(Z.error,Z.meta);let ye=yield z(Z.data,Z.meta,re);return{...Z,data:ye}});return _ee.apply(this,arguments)}if(k.type==="query"&&"infiniteQueryOptions"in L){let{infiniteQueryOptions:re}=L,{maxPages:Z=1/0}=re,oe,ye={pages:[],pageParams:[]},ue=a.selectQueryEntry(_(),k.queryCacheKey)?.data,he=v(k,_())&&!k.direction||!ue?ye:ue;if("direction"in k&&k.direction&&he.pages.length){let ke=k.direction==="backward",dt=(ke?Gl:Xa)(re,he);oe=yield ce(he,dt,Z,ke)}else{let{initialPageParam:ke=re.initialPageParam}=k,_e=ue?.pageParams??[],dt=_e[0]??ke,Kt=_e.length;oe=yield ce(he,dt,Z),Y&&(oe={data:oe.data.pages[0]});for(let Yt=1;Yt<Kt;Yt++){let Qr=Xa(re,oe.data);oe=yield ce(oe.data,Qr,Z)}}te=oe}else te=yield ee(k.originalArgs);return U(te.data,Lo({fulfilledTimeStamp:Date.now(),baseQueryMeta:te.meta}))}catch(z){let G=z;if(G instanceof kr){let Y=S(L,"transformErrorResponse");try{return $(yield Y(G.value,G.meta,k.originalArgs),Lo({baseQueryMeta:G.meta}))}catch(te){G=te}}throw typeof process<"u",console.error(G),G}});return function g(_x40,_x41){return _ref19.apply(this,arguments)}}();function v(k,D){let N=a.selectQueryEntry(D,k.queryCacheKey),$=a.selectConfig(D).refetchOnMountOrArgChange,U=N?.fulfilledTimeStamp,V=k.forceRefetch??(k.subscribe&&$);return V?V===!0||(Number(new Date)-Number(U))/1e3>=V:!1}let R=()=>le(`${e}/executeQuery`,g,{getPendingMeta({arg:D}){let N=r[D.endpointName];return Lo({startedTimeStamp:Date.now(),...(rs(N)?{direction:D.direction}:{})})},condition(D,{getState:N}){let $=N(),U=a.selectQueryEntry($,D.queryCacheKey),V=U?.fulfilledTimeStamp,_=D.originalArgs,B=U?.originalArgs,L=r[D.endpointName],z=D.direction;return Ja(D)?!0:U?.status==="pending"?!1:v(D,$)||ts(L)&&L?.forceRefetch?.({currentArg:_,previousArg:B,endpointState:U,state:$})?!0:!(V&&!z)},dispatchConditionRejection:!0}),P=R(),w=R(),F=le(`${e}/executeMutation`,g,{getPendingMeta(){return Lo({startedTimeStamp:Date.now()})}}),x=k=>"force"in k,E=k=>"ifOlderThan"in k,M=(k,D,N)=>($,U)=>{let V=x(N)&&N.force,_=E(N)&&N.ifOlderThan,B=(z=!0)=>{let G={forceRefetch:z,isPrefetch:!0};return o.endpoints[k].initiate(D,G)},L=o.endpoints[k].select(D)(U());if(V)$(B());else if(_){let z=L?.fulfilledTimeStamp;if(!z){$(B());return}(Number(new Date)-Number(new Date(z)))/1e3>=_&&$(B())}else $(B(!1))};function O(k){return D=>D?.meta?.arg?.endpointName===k}function I(k,D){return{matchPending:ir(ro(k),O(D)),matchFulfilled:ir(ot(k),O(D)),matchRejected:ir(Lt(k),O(D))}}return{queryThunk:P,mutationThunk:F,infiniteQueryThunk:w,prefetch:M,updateQueryData:y,upsertQueryData:h,patchQueryData:m,buildMatchThunkActions:I}}function Xa(e,{pages:t,pageParams:r}){let n=t.length-1;return e.getNextPageParam(t[n],t,r[n],r)}function Gl(e,{pages:t,pageParams:r}){return e.getPreviousPageParam?.(t[0],t,r[0],r)}function Wl(e,t,r,n){return ns(r[e.meta.arg.endpointName][t],ot(e)?e.payload:void 0,ln(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,n)}function Uo(e,t,r){let n=e[t];n&&r(n)}function wn(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function jl(e,t,r){let n=e[wn(t)];n&&r(n)}var bn={};function LS({reducerPath:e,queryThunk:t,mutationThunk:r,serializeQueryArgs:n,context:{endpointDefinitions:o,apiUid:i,extractRehydrationInfo:a,hasRehydrationInfo:m},assertTagType:f,config:p}){let y=T(`${e}/resetApiState`);function h(O,I,k,D){var N;O[N=I.queryCacheKey]??(O[N]={status:"uninitialized",endpointName:I.endpointName}),Uo(O,I.queryCacheKey,$=>{$.status="pending",$.requestId=k&&$.requestId?$.requestId:D.requestId,I.originalArgs!==void 0&&($.originalArgs=I.originalArgs),$.startedTimeStamp=D.startedTimeStamp;let U=o[D.arg.endpointName];rs(U)&&"direction"in I&&($.direction=I.direction)})}function S(O,I,k,D){Uo(O,I.arg.queryCacheKey,N=>{if(N.requestId!==I.requestId&&!D)return;let{merge:$}=o[I.arg.endpointName];if(N.status="fulfilled",$){if(N.data!==void 0){let{fulfilledTimeStamp:U,arg:V,baseQueryMeta:_,requestId:B}=I,L=nt(N.data,z=>$(z,k,{arg:V.originalArgs,baseQueryMeta:_,fulfilledTimeStamp:U,requestId:B}));N.data=L}else N.data=k;}else N.data=o[I.arg.endpointName].structuralSharing??!0?Ql(Me(N.data)?sa(N.data):N.data,k):k;delete N.error,N.fulfilledTimeStamp=I.fulfilledTimeStamp})}let g=Ut({name:`${e}/queries`,initialState:bn,reducers:{removeQueryResult:{reducer(O,{payload:{queryCacheKey:I}}){delete O[I]},prepare:ar()},cacheEntriesUpserted:{reducer(O,I){for(let k of I.payload){let{queryDescription:D,value:N}=k;h(O,D,!0,{arg:D,requestId:I.meta.requestId,startedTimeStamp:I.meta.timestamp}),S(O,{arg:D,requestId:I.meta.requestId,fulfilledTimeStamp:I.meta.timestamp,baseQueryMeta:{}},N,!0)}},prepare:O=>({payload:O.map(D=>{let{endpointName:N,arg:$,value:U}=D,V=o[N];return{queryDescription:{type:"query",endpointName:N,originalArgs:D.arg,queryCacheKey:n({queryArgs:$,endpointDefinition:V,endpointName:N})},value:U}}),meta:{[cn]:!0,requestId:oo(),timestamp:Date.now()}})},queryResultPatched:{reducer(O,{payload:{queryCacheKey:I,patches:k}}){Uo(O,I,D=>{D.data=ua(D.data,k.concat())})},prepare:ar()}},extraReducers(O){O.addCase(t.pending,(I,{meta:k,meta:{arg:D}})=>{let N=Ja(D);h(I,D,N,k)}).addCase(t.fulfilled,(I,{meta:k,payload:D})=>{let N=Ja(k.arg);S(I,k,D,N)}).addCase(t.rejected,(I,{meta:{condition:k,arg:D,requestId:N},error:$,payload:U})=>{Uo(I,D.queryCacheKey,V=>{if(!k){if(V.requestId!==N)return;V.status="rejected",V.error=U??$}})}).addMatcher(m,(I,k)=>{let{queries:D}=a(k);for(let[N,$]of Object.entries(D))($?.status==="fulfilled"||$?.status==="rejected")&&(I[N]=$)})}}),v=Ut({name:`${e}/mutations`,initialState:bn,reducers:{removeMutationResult:{reducer(O,{payload:I}){let k=wn(I);k in O&&delete O[k]},prepare:ar()}},extraReducers(O){O.addCase(r.pending,(I,{meta:k,meta:{requestId:D,arg:N,startedTimeStamp:$}})=>{N.track&&(I[wn(k)]={requestId:D,status:"pending",endpointName:N.endpointName,startedTimeStamp:$})}).addCase(r.fulfilled,(I,{payload:k,meta:D})=>{D.arg.track&&jl(I,D,N=>{N.requestId===D.requestId&&(N.status="fulfilled",N.data=k,N.fulfilledTimeStamp=D.fulfilledTimeStamp)})}).addCase(r.rejected,(I,{payload:k,error:D,meta:N})=>{N.arg.track&&jl(I,N,$=>{$.requestId===N.requestId&&($.status="rejected",$.error=k??D)})}).addMatcher(m,(I,k)=>{let{mutations:D}=a(k);for(let[N,$]of Object.entries(D))($?.status==="fulfilled"||$?.status==="rejected")&&N!==$?.requestId&&(I[N]=$)})}}),R=Ut({name:`${e}/invalidation`,initialState:bn,reducers:{updateProvidedBy:{reducer(O,I){var N,$;let{queryCacheKey:k,providedTags:D}=I.payload;for(let U of Object.values(O))for(let V of Object.values(U)){let _=V.indexOf(k);_!==-1&&V.splice(_,1)}for(let{type:U,id:V}of D){let _=(N=O[U]??(O[U]={}))[$=V||"__internal_without_id"]??(N[$]=[]);_.includes(k)||_.push(k)}},prepare:ar()}},extraReducers(O){O.addCase(g.actions.removeQueryResult,(I,{payload:{queryCacheKey:k}})=>{for(let D of Object.values(I))for(let N of Object.values(D)){let $=N.indexOf(k);$!==-1&&N.splice($,1)}}).addMatcher(m,(I,k)=>{var N,$;let{provided:D}=a(k);for(let[U,V]of Object.entries(D))for(let[_,B]of Object.entries(V)){let L=(N=I[U]??(I[U]={}))[$=_||"__internal_without_id"]??(N[$]=[]);for(let z of B)L.includes(z)||L.push(z)}}).addMatcher(Ye(ot(t),ln(t)),(I,k)=>{let D=Wl(k,"providesTags",o,f),{queryCacheKey:N}=k.meta.arg;R.caseReducers.updateProvidedBy(I,R.actions.updateProvidedBy({queryCacheKey:N,providedTags:D}))})}}),P=Ut({name:`${e}/subscriptions`,initialState:bn,reducers:{updateSubscriptionOptions(O,I){},unsubscribeQueryResult(O,I){},internal_getRTKQSubscriptions(){}}}),w=Ut({name:`${e}/internalSubscriptions`,initialState:bn,reducers:{subscriptionsUpdated:{reducer(O,I){return ua(O,I.payload)},prepare:ar()}}}),F=Ut({name:`${e}/config`,initialState:{online:xS(),focused:wS(),middlewareRegistered:!1,...p},reducers:{middlewareRegistered(O,{payload:I}){O.middlewareRegistered=O.middlewareRegistered==="conflict"||i!==I?"conflict":!0}},extraReducers:O=>{O.addCase(es,I=>{I.online=!0}).addCase(zl,I=>{I.online=!1}).addCase(Za,I=>{I.focused=!0}).addCase(Hl,I=>{I.focused=!1}).addMatcher(m,I=>({...I}))}}),x=tr({queries:g.reducer,mutations:v.reducer,provided:R.reducer,subscriptions:w.reducer,config:F.reducer}),E=(O,I)=>x(y.match(I)?void 0:O,I),M={...F.actions,...g.actions,...P.actions,...w.actions,...v.actions,...R.actions,resetApiState:y};return{reducer:E,actions:M}}var An=Symbol.for("RTKQ/skipToken"),Kl={status:"uninitialized"},Ml=nt(Kl,()=>{}),Nl=nt(Kl,()=>{});function US({serializeQueryArgs:e,reducerPath:t,createSelector:r}){let n=x=>Ml,o=x=>Nl;return{buildQuerySelector:S,buildInfiniteQuerySelector:g,buildMutationSelector:v,selectInvalidatedBy:R,selectCachedArgsForQuery:P,selectApiState:a,selectQueries:m,selectMutations:p,selectQueryEntry:f,selectConfig:y};function i(x){return{...x,...kl(x.status)}}function a(x){return x[t]}function m(x){return a(x)?.queries}function f(x,E){return m(x)?.[E]}function p(x){return a(x)?.mutations}function y(x){return a(x)?.config}function h(x,E,M){return O=>{if(O===An)return r(n,M);let I=e({queryArgs:O,endpointDefinition:E,endpointName:x});return r(D=>f(D,I)??Ml,M)}}function S(x,E){return h(x,E,i)}function g(x,E){let{infiniteQueryOptions:M}=E;function O(I){let k={...I,...kl(I.status)},{isLoading:D,isError:N,direction:$}=k,U=$==="forward",V=$==="backward";return{...k,hasNextPage:w(M,k.data),hasPreviousPage:F(M,k.data),isFetchingNextPage:D&&U,isFetchingPreviousPage:D&&V,isFetchNextPageError:N&&U,isFetchPreviousPageError:N&&V}}return h(x,E,O)}function v(){return x=>{let E;return typeof x=="object"?E=wn(x)??An:E=x,r(E===An?o:I=>a(I)?.mutations?.[E]??Nl,i)}}function R(x,E){let M=x[t],O=new Set;for(let I of E.filter(Qo).map(Ya)){let k=M.provided[I.type];if(!k)continue;let D=(I.id!==void 0?k[I.id]:Ol(Object.values(k)))??[];for(let N of D)O.add(N)}return Ol(Array.from(O.values()).map(I=>{let k=M.queries[I];return k?[{queryCacheKey:I,endpointName:k.endpointName,originalArgs:k.originalArgs}]:[]}))}function P(x,E){return Object.values(m(x)).filter(M=>M?.endpointName===E&&M.status!=="uninitialized").map(M=>M.originalArgs)}function w(x,E){return E?Xa(x,E)!=null:!1}function F(x,E){return!E||!x.getPreviousPageParam?!1:Gl(x,E)!=null}}var _l=WeakMap?new WeakMap:void 0,Vl=({endpointName:e,queryArgs:t})=>{let r="",n=_l?.get(t);if(typeof n=="string")r=n;else{let o=JSON.stringify(t,(i,a)=>(a=typeof a=="bigint"?{$bigint:a.toString()}:a,a=Ke(a)?Object.keys(a).sort().reduce((m,f)=>(m[f]=a[f],m),{}):a,a));Ke(t)&&_l?.set(t,o),r=o}return`${e}(${r})`};function QS(...e){return function(r){let n=or(p=>r.extractRehydrationInfo?.(p,{reducerPath:r.reducerPath??"api"})),o={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...r,extractRehydrationInfo:n,serializeQueryArgs(p){let y=Vl;if("serializeQueryArgs"in p.endpointDefinition){let h=p.endpointDefinition.serializeQueryArgs;y=S=>{let g=h(S);return typeof g=="string"?g:Vl({...S,queryArgs:g})}}else r.serializeQueryArgs&&(y=r.serializeQueryArgs);return y(p)},tagTypes:[...(r.tagTypes||[])]},i={endpointDefinitions:{},batch(p){p()},apiUid:oo(),extractRehydrationInfo:n,hasRehydrationInfo:or(p=>n(p)!=null)},a={injectEndpoints:f,enhanceEndpoints({addTagTypes:p,endpoints:y}){if(p)for(let h of p)o.tagTypes.includes(h)||o.tagTypes.push(h);if(y)for(let[h,S]of Object.entries(y))typeof S=="function"?S(i.endpointDefinitions[h]):Object.assign(i.endpointDefinitions[h]||{},S);return a}},m=e.map(p=>p.init(a,o,i));function f(p){let y=p.endpoints({query:h=>({...h,type:"query"}),mutation:h=>({...h,type:"mutation"}),infiniteQuery:h=>({...h,type:"infinitequery"})});for(let[h,S]of Object.entries(y)){if(p.overrideExisting!==!0&&h in i.endpointDefinitions){if(p.overrideExisting==="throw")throw new Error(He(39));typeof process<"u";continue}typeof process<"u",i.endpointDefinitions[h]=S;for(let g of m)g.injectEndpoint(h,S)}return a}return a.injectEndpoints({endpoints:r.endpoints})}}function ut(e,...t){return Object.assign(e,...t)}var BS=({api:e,queryThunk:t,internalState:r})=>{let n=`${e.reducerPath}/subscriptions`,o=null,i=null,{updateSubscriptionOptions:a,unsubscribeQueryResult:m}=e.internalActions,f=(g,v)=>{var P,w;if(a.match(v)){let{queryCacheKey:F,requestId:x,options:E}=v.payload;return g?.[F]?.[x]&&(g[F][x]=E),!0}if(m.match(v)){let{queryCacheKey:F,requestId:x}=v.payload;return g[F]&&delete g[F][x],!0}if(e.internalActions.removeQueryResult.match(v))return delete g[v.payload.queryCacheKey],!0;if(t.pending.match(v)){let{meta:{arg:F,requestId:x}}=v,E=g[P=F.queryCacheKey]??(g[P]={});return E[`${x}_running`]={},F.subscribe&&(E[x]=F.subscriptionOptions??E[x]??{}),!0}let R=!1;if(t.fulfilled.match(v)||t.rejected.match(v)){let F=g[v.meta.arg.queryCacheKey]||{},x=`${v.meta.requestId}_running`;R||(R=!!F[x]),delete F[x]}if(t.rejected.match(v)){let{meta:{condition:F,arg:x,requestId:E}}=v;if(F&&x.subscribe){let M=g[w=x.queryCacheKey]??(g[w]={});M[E]=x.subscriptionOptions??M[E]??{},R=!0}}return R},p=()=>r.currentSubscriptions,S={getSubscriptions:p,getSubscriptionCount:g=>{let R=p()[g]??{};return Pr(R)},isRequestSubscribed:(g,v)=>!!p()?.[g]?.[v]};return(g,v)=>{if(o||(o=JSON.parse(JSON.stringify(r.currentSubscriptions))),e.util.resetApiState.match(g))return o=r.currentSubscriptions={},i=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(g))return[!1,S];let R=f(r.currentSubscriptions,g),P=!0;if(R){i||(i=setTimeout(()=>{let x=JSON.parse(JSON.stringify(r.currentSubscriptions)),[,E]=Xn(o,()=>x);v.next(e.internalActions.subscriptionsUpdated(E)),o=x,i=null},500));let w=typeof g.type=="string"&&!!g.type.startsWith(n),F=t.rejected.match(g)&&g.meta.condition&&!!g.meta.arg.subscribe;P=!w&&!F}return[P,!1]}};function $S(e){for(let t in e)return!1;return!0}var HS=2147483647/1e3-1,zS=({reducerPath:e,api:t,queryThunk:r,context:n,internalState:o,selectors:{selectQueryEntry:i,selectConfig:a}})=>{let{removeQueryResult:m,unsubscribeQueryResult:f,cacheEntriesUpserted:p}=t.internalActions,y=Ye(f.match,r.fulfilled,r.rejected,p.match);function h(P){let w=o.currentSubscriptions[P];return!!w&&!$S(w)}let S={},g=(P,w,F)=>{let x=w.getState(),E=a(x);if(y(P)){let M;if(p.match(P))M=P.payload.map(O=>O.queryDescription.queryCacheKey);else{let{queryCacheKey:O}=f.match(P)?P.payload:P.meta.arg;M=[O]}v(M,w,E)}if(t.util.resetApiState.match(P))for(let[M,O]of Object.entries(S))O&&clearTimeout(O),delete S[M];if(n.hasRehydrationInfo(P)){let{queries:M}=n.extractRehydrationInfo(P);v(Object.keys(M),w,E)}};function v(P,w,F){let x=w.getState();for(let E of P){let M=i(x,E);R(E,M?.endpointName,w,F)}}function R(P,w,F,x){let M=n.endpointDefinitions[w]?.keepUnusedDataFor??x.keepUnusedDataFor;if(M===1/0)return;let O=Math.max(0,Math.min(M,HS));if(!h(P)){let I=S[P];I&&clearTimeout(I),S[P]=setTimeout(()=>{h(P)||F.dispatch(m({queryCacheKey:P})),delete S[P]},O*1e3)}}return g},Ll=new Error("Promise never resolved before cacheEntryRemoved."),GS=({api:e,reducerPath:t,context:r,queryThunk:n,mutationThunk:o,internalState:i,selectors:{selectQueryEntry:a,selectApiState:m}})=>{let f=no(n),p=no(o),y=ot(n,o),h={};function S(w,F,x){let E=h[w];E?.valueResolved&&(E.valueResolved({data:F,meta:x}),delete E.valueResolved)}function g(w){let F=h[w];F&&(delete h[w],F.cacheEntryRemoved())}let v=(w,F,x)=>{let E=R(w);function M(O,I,k,D){let N=a(x,I),$=a(F.getState(),I);!N&&$&&P(O,D,I,F,k)}if(n.pending.match(w))M(w.meta.arg.endpointName,E,w.meta.requestId,w.meta.arg.originalArgs);else if(e.internalActions.cacheEntriesUpserted.match(w))for(let{queryDescription:O,value:I}of w.payload){let{endpointName:k,originalArgs:D,queryCacheKey:N}=O;M(k,N,w.meta.requestId,D),S(N,I,{})}else if(o.pending.match(w))F.getState()[t].mutations[E]&&P(w.meta.arg.endpointName,w.meta.arg.originalArgs,E,F,w.meta.requestId);else if(y(w))S(E,w.payload,w.meta.baseQueryMeta);else if(e.internalActions.removeQueryResult.match(w)||e.internalActions.removeMutationResult.match(w))g(E);else if(e.util.resetApiState.match(w))for(let O of Object.keys(h))g(O)};function R(w){return f(w)?w.meta.arg.queryCacheKey:p(w)?w.meta.arg.fixedCacheKey??w.meta.requestId:e.internalActions.removeQueryResult.match(w)?w.payload.queryCacheKey:e.internalActions.removeMutationResult.match(w)?wn(w.payload):""}function P(w,F,x,E,M){let O=r.endpointDefinitions[w],I=O?.onCacheEntryAdded;if(!I)return;let k={},D=new Promise(B=>{k.cacheEntryRemoved=B}),N=Promise.race([new Promise(B=>{k.valueResolved=B}),D.then(()=>{throw Ll})]);N.catch(()=>{}),h[x]=k;let $=e.endpoints[w].select(O.type==="query"?F:x),U=E.dispatch((B,L,z)=>z),V={...E,getCacheEntry:()=>$(E.getState()),requestId:M,extra:U,updateCachedData:O.type==="query"?B=>E.dispatch(e.util.updateQueryData(w,F,B)):void 0,cacheDataLoaded:N,cacheEntryRemoved:D},_=I(F,V);Promise.resolve(_).catch(B=>{if(B!==Ll)throw B})}return v},WS=({api:e,context:{apiUid:t},reducerPath:r})=>(n,o)=>{e.util.resetApiState.match(n)&&o.dispatch(e.internalActions.middlewareRegistered(t)),typeof process<"u"},KS=({reducerPath:e,context:t,context:{endpointDefinitions:r},mutationThunk:n,queryThunk:o,api:i,assertTagType:a,refetchQuery:m,internalState:f})=>{let{removeQueryResult:p}=i.internalActions,y=Ye(ot(n),ln(n)),h=Ye(ot(n,o),Lt(n,o)),S=[],g=(P,w)=>{y(P)?R(Wl(P,"invalidatesTags",r,a),w):h(P)?R([],w):i.util.invalidateTags.match(P)&&R(ns(P.payload,void 0,void 0,void 0,void 0,a),w)};function v(P){let{queries:w,mutations:F}=P;for(let x of[w,F])for(let E in x)if(x[E]?.status==="pending")return!0;return!1}function R(P,w){let F=w.getState(),x=F[e];if(S.push(...P),x.config.invalidationBehavior==="delayed"&&v(x))return;let E=S;if(S=[],E.length===0)return;let M=i.util.selectInvalidatedBy(F,E);t.batch(()=>{let O=Array.from(M.values());for(let{queryCacheKey:I}of O){let k=x.queries[I],D=f.currentSubscriptions[I]??{};k&&(Pr(D)===0?w.dispatch(p({queryCacheKey:I})):k.status!=="uninitialized"&&w.dispatch(m(k)))}})}return g},YS=({reducerPath:e,queryThunk:t,api:r,refetchQuery:n,internalState:o})=>{let i={},a=(g,v)=>{(r.internalActions.updateSubscriptionOptions.match(g)||r.internalActions.unsubscribeQueryResult.match(g))&&p(g.payload,v),(t.pending.match(g)||t.rejected.match(g)&&g.meta.condition)&&p(g.meta.arg,v),(t.fulfilled.match(g)||t.rejected.match(g)&&!g.meta.condition)&&f(g.meta.arg,v),r.util.resetApiState.match(g)&&h()};function m(g,v){let P=v.getState()[e].queries[g],w=o.currentSubscriptions[g];if(!(!P||P.status==="uninitialized"))return w}function f({queryCacheKey:g},v){let R=v.getState()[e],P=R.queries[g],w=o.currentSubscriptions[g];if(!P||P.status==="uninitialized")return;let{lowestPollingInterval:F,skipPollingIfUnfocused:x}=S(w);if(!Number.isFinite(F))return;let E=i[g];E?.timeout&&(clearTimeout(E.timeout),E.timeout=void 0);let M=Date.now()+F;i[g]={nextPollTimestamp:M,pollingInterval:F,timeout:setTimeout(()=>{(R.config.focused||!x)&&v.dispatch(n(P)),f({queryCacheKey:g},v)},F)}}function p({queryCacheKey:g},v){let P=v.getState()[e].queries[g],w=o.currentSubscriptions[g];if(!P||P.status==="uninitialized")return;let{lowestPollingInterval:F}=S(w);if(!Number.isFinite(F)){y(g);return}let x=i[g],E=Date.now()+F;(!x||E<x.nextPollTimestamp)&&f({queryCacheKey:g},v)}function y(g){let v=i[g];v?.timeout&&clearTimeout(v.timeout),delete i[g]}function h(){for(let g of Object.keys(i))y(g)}function S(g={}){let v=!1,R=Number.POSITIVE_INFINITY;for(let P in g)g[P].pollingInterval&&(R=Math.min(g[P].pollingInterval,R),v=g[P].skipPollingIfUnfocused||v);return{lowestPollingInterval:R,skipPollingIfUnfocused:v}}return a},JS=({api:e,context:t,queryThunk:r,mutationThunk:n})=>{let o=ro(r,n),i=Lt(r,n),a=ot(r,n),m={};return(p,y)=>{if(o(p)){let{requestId:h,arg:{endpointName:S,originalArgs:g}}=p.meta,v=t.endpointDefinitions[S],R=v?.onQueryStarted;if(R){let P={},w=new Promise((M,O)=>{P.resolve=M,P.reject=O});w.catch(()=>{}),m[h]=P;let F=e.endpoints[S].select(v.type==="query"?g:h),x=y.dispatch((M,O,I)=>I),E={...y,getCacheEntry:()=>F(y.getState()),requestId:h,extra:x,updateCachedData:v.type==="query"?M=>y.dispatch(e.util.updateQueryData(S,g,M)):void 0,queryFulfilled:w};R(g,E)}}else if(a(p)){let{requestId:h,baseQueryMeta:S}=p.meta;m[h]?.resolve({data:p.payload,meta:S}),delete m[h]}else if(i(p)){let{requestId:h,rejectedWithValue:S,baseQueryMeta:g}=p.meta;m[h]?.reject({error:p.payload??p.error,isUnhandledError:!S,meta:g}),delete m[h]}}},XS=({reducerPath:e,context:t,api:r,refetchQuery:n,internalState:o})=>{let{removeQueryResult:i}=r.internalActions,a=(f,p)=>{Za.match(f)&&m(p,"refetchOnFocus"),es.match(f)&&m(p,"refetchOnReconnect")};function m(f,p){let y=f.getState()[e],h=y.queries,S=o.currentSubscriptions;t.batch(()=>{for(let g of Object.keys(S)){let v=h[g],R=S[g];if(!R||!v)continue;(Object.values(R).some(w=>w[p]===!0)||Object.values(R).every(w=>w[p]===void 0)&&y.config[p])&&(Pr(R)===0?f.dispatch(i({queryCacheKey:g})):v.status!=="uninitialized"&&f.dispatch(n(v)))}})}return a};function ZS(e){let{reducerPath:t,queryThunk:r,api:n,context:o}=e,{apiUid:i}=o,a={invalidateTags:T(`${t}/invalidateTags`)},m=h=>h.type.startsWith(`${t}/`),f=[WS,zS,KS,YS,GS,JS];return{middleware:h=>{let S=!1,v={...e,internalState:{currentSubscriptions:{}},refetchQuery:y,isThisApiSliceAction:m},R=f.map(F=>F(v)),P=BS(v),w=XS(v);return F=>x=>{if(!zn(x))return F(x);S||(S=!0,h.dispatch(n.internalActions.middlewareRegistered(i)));let E={...h,next:F},M=h.getState(),[O,I]=P(x,E,M),k;if(O?k=F(x):k=I,h.getState()[t]&&(w(x,E,M),m(x)||o.hasRehydrationInfo(x)))for(let D of R)D(x,E,M);return k}},actions:a};function y(h){return e.api.endpoints[h.endpointName].initiate(h.originalArgs,{subscribe:!1,forceRefetch:!0})}}var Ul=Symbol(),ev=({createSelector:e=se}={})=>({name:Ul,init(t,{baseQuery:r,tagTypes:n,reducerPath:o,serializeQueryArgs:i,keepUnusedDataFor:a,refetchOnMountOrArgChange:m,refetchOnFocus:f,refetchOnReconnect:p,invalidationBehavior:y},h){Jc();let S=ee=>(typeof process<"u",ee);Object.assign(t,{reducerPath:o,endpoints:{},internalActions:{onOnline:es,onOffline:zl,onFocus:Za,onFocusLost:Hl},util:{}});let g=US({serializeQueryArgs:i,reducerPath:o,createSelector:e}),{selectInvalidatedBy:v,selectCachedArgsForQuery:R,buildQuerySelector:P,buildInfiniteQuerySelector:w,buildMutationSelector:F}=g;ut(t.util,{selectInvalidatedBy:v,selectCachedArgsForQuery:R});let{queryThunk:x,infiniteQueryThunk:E,mutationThunk:M,patchQueryData:O,updateQueryData:I,upsertQueryData:k,prefetch:D,buildMatchThunkActions:N}=VS({baseQuery:r,reducerPath:o,context:h,api:t,serializeQueryArgs:i,assertTagType:S,selectors:g}),{reducer:$,actions:U}=LS({context:h,queryThunk:x,infiniteQueryThunk:E,mutationThunk:M,serializeQueryArgs:i,reducerPath:o,assertTagType:S,config:{refetchOnFocus:f,refetchOnReconnect:p,refetchOnMountOrArgChange:m,keepUnusedDataFor:a,reducerPath:o,invalidationBehavior:y}});ut(t.util,{patchQueryData:O,updateQueryData:I,upsertQueryData:k,prefetch:D,resetApiState:U.resetApiState,upsertQueryEntries:U.cacheEntriesUpserted}),ut(t.internalActions,U);let{middleware:V,actions:_}=ZS({reducerPath:o,context:h,queryThunk:x,mutationThunk:M,infiniteQueryThunk:E,api:t,assertTagType:S,selectors:g});ut(t.util,_),ut(t,{reducer:$,middleware:V});let{buildInitiateQuery:B,buildInitiateInfiniteQuery:L,buildInitiateMutation:z,getRunningMutationThunk:G,getRunningMutationsThunk:Y,getRunningQueriesThunk:te,getRunningQueryThunk:ce}=NS({queryThunk:x,mutationThunk:M,infiniteQueryThunk:E,api:t,serializeQueryArgs:i,context:h});return ut(t.util,{getRunningMutationThunk:G,getRunningMutationsThunk:Y,getRunningQueryThunk:ce,getRunningQueriesThunk:te}),{name:Ul,injectEndpoint(ee,re){var ye;let oe=(ye=t.endpoints)[ee]??(ye[ee]={});ts(re)&&ut(oe,{name:ee,select:P(ee,re),initiate:B(ee,re)},N(x,ee)),qS(re)&&ut(oe,{name:ee,select:F(),initiate:z(ee)},N(M,ee)),rs(re)&&ut(oe,{name:ee,select:w(ee,re),initiate:L(ee,re)},N(x,ee))}}}}),Yl=QS(ev());d();c();l();u();var Bo=se(e=>e.query,e=>e),Jl=se(e=>e.query?.enableQuerySyntax,e=>e);var w0=se(e=>Bo(e)?.q,e=>e.search.requestId,e=>e.generatedAnswer.cannotAnswer,e=>e.configuration.analytics.analyticsMode,e=>e.search.searchAction?.actionCause,(e,t,r,n,o)=>({q:e,requestId:t,cannotAnswer:r,analyticsMode:n,actionCause:o})),tv=se(e=>e.generatedAnswer?.answerApiQueryParams,e=>e??An);d();c();l();u();d();c();l();u();var $o=e=>je({prefix:"analytics/generatedAnswer/streamEnd",__legacy__getBuilder:(t,r)=>{let n=Ar(r),o=e?!r.generatedAnswer?.answer||!r.generatedAnswer?.answer.length:void 0;return n?t.makeGeneratedAnswerStreamEnd({generativeQuestionAnsweringId:n,answerGenerated:e,answerTextIsEmpty:o}):null},analyticsType:"Rga.AnswerReceived",analyticsPayloadBuilder:t=>({answerId:Ar(t)??"",answerGenerated:e??!1})});d();c();l();u();d();c();l();u();var Xl=se(e=>e.advancedSearchQueries,e=>{if(!e)return{};let{aq:t,cq:r,dq:n,lq:o}=e;return{...(t&&{aq:t}),...(r&&{cq:r}),...(n&&{dq:n}),...(o&&{lq:o})}});d();c();l();u();var Ho=(e,t,r)=>({analytics:{clientId:t.clientId,clientTimestamp:new Date().toISOString(),documentReferrer:t.referrer,documentLocation:t.location,originContext:e.originContext,...(r&&{actionCause:r.actionCause}),...(r&&{customData:r.customData}),...(e.userDisplayName&&{userDisplayName:e.userDisplayName}),...(e.deviceId&&{deviceId:e.deviceId}),...(e.trackingId&&{trackingId:e.trackingId}),capture:t.capture??t.clientId!=="",source:yr(e)}});d();c();l();u();var Zl=se(e=>e.context,e=>e);d();c();l();u();var ed=se(e=>e.pipeline,e=>e);d();c();l();u();d();c();l();u();var xn=Be(zo(),1),ad=Be(td(),1);d();c();l();u();var Go=Be(zo(),1),nd=Be(rd(),1);Go.default.extend(nd.default);var od="YYYY/MM/DD@HH:mm:ss",rv="1401-01-01";function Fr(e,t){let r=(0,Go.default)(e,t);return!r.isValid()&&!t?(0,Go.default)(e,od):r}function Wo(e){return e.format(od)}function id(e,t){let r=Fr(e,t);if(!r.isValid()){let n=". Please provide a date format string in the configuration options. See https://day.js.org/docs/en/parse/string-format for more information.",o=` with the format "${t}"`;throw new Error(`Could not parse the provided date "${e}"${t?o:n}`)}ls(r)}function ls(e){if(e.isBefore(rv))throw new Error(`Date is before year 1401, which is unsupported by the API: ${e}`)}xn.default.extend(ad.default);var sd=["past","now","next"],cd=["minute","hour","day","week","month","quarter","year"],nv=e=>{let t=e==="now";return{amount:new J({required:!t,min:1}),unit:new H({required:!t,constrainTo:cd}),period:new H({required:!0,constrainTo:sd})}};function ds(e){if(typeof e=="string"&&!At(e))throw new Error(`The value "${e}" is not respecting the relative date format "period-amount-unit"`);let t=typeof e=="string"?fd(e):e;new Fe(nv(t.period)).validate(t);let r=ld(t),n=JSON.stringify(t);if(!r.isValid())throw new Error(`Date is invalid: ${n}`);ls(r)}function ud(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":case"next":return`${t}-${r}-${n}`;case"now":return t}}function ld(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":return(0,xn.default)().subtract(r,n);case"next":return(0,xn.default)().add(r,n);case"now":return(0,xn.default)()}}function Rn(e){return Wo(ld(fd(e)))}function dd(e){return e.toLocaleLowerCase().split("-")}function At(e){let[t,r,n]=dd(e);if(t==="now")return!0;if(!sd.includes(t)||!cd.includes(n))return!1;let o=parseInt(r);return!(Number.isNaN(o)||o<=0)}function pd(e){return!!e&&typeof e=="object"&&"period"in e}function fd(e){let[t,r,n]=dd(e);return t==="now"?{period:"now"}:{period:t,amount:r?parseInt(r):void 0,unit:n||void 0}}d();c();l();u();function md(e){return e.type==="dateRange"}function gd(e){return`start${e}`}function yd(e){return`end${e}`}var ps=()=>({dateFacetValueMap:{}});function ov(e,t,r){let n=e.start,o=e.end;return At(n)&&(n=Rn(n),r.dateFacetValueMap[t][gd(n)]=e.start),At(o)&&(o=Rn(o),r.dateFacetValueMap[t][yd(o)]=e.end),{...e,start:n,end:o}}function fs(e,t){if(md(e)){let{facetId:r,currentValues:n}=e;return t.dateFacetValueMap[r]={},{...e,currentValues:n.map(o=>ov(o,r,t))}}return e}function Ct(e){let t=ps();return{request:{...e,facets:e.facets?.map(n=>fs(n,t))},mappings:t}}function iv(e,t,r){return{...e,start:r.dateFacetValueMap[t][gd(e.start)]||e.start,end:r.dateFacetValueMap[t][yd(e.end)]||e.end}}function av(e,t){return e.facetId in t.dateFacetValueMap}function sv(e,t){return av(e,t)?{...e,values:e.values.map(r=>iv(r,e.facetId,t))}:e}function Ko(e,t){return"success"in e?{success:{...e.success,facets:e.success.facets?.map(n=>sv(n,t))}}:e}d();c();l();u();d();c();l();u();d();c();l();u();function wt(e){return Object.values(e).map(t=>t.request)}function ms(e,t){let r={};e.forEach(i=>{r[i.facetId]=i});let n=[];t.forEach(i=>{i in r&&(n.push(r[i]),delete r[i])});let o=Object.values(r);return[...n,...o]}function hd(e){return wt(e).map(t=>{let n=t.currentValues.some(({state:o})=>o!=="idle");return t.generateAutomaticRanges&&!n?{...t,currentValues:[]}:t})}var gs={alphanumericDescending:{type:"alphanumeric",order:"descending"},alphanumericNaturalDescending:{type:"alphanumericNatural",order:"descending"}};function cv(e){return wt(e).map(t=>{let r=gs[t.sortCriteria];return r?{...t,sortCriteria:r}:t})}function uv(e){return[...cv(e.facetSet??{}),...hd(e.numericFacetSet??{}),...hd(e.dateFacetSet??{}),...wt(e.categoryFacetSet??{})]}function lv(e){return uv(e).filter(({facetId:t})=>e.facetOptions?.facets[t]?.enabled??!0)}function Yo(e){return ms(lv(e),e.facetOrder??[])}d();c();l();u();d();c();l();u();var xt=/*#__PURE__*/function(){var _ref21=_asyncToGenerator(function*(e,t){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??pt(e.configuration.organizationId,e.configuration.environment),locale:e.configuration.search.locale,debug:e.debug,tab:e.configuration.analytics.originLevel2,referrer:e.configuration.analytics.originLevel3,timezone:e.configuration.search.timezone,...(e.configuration.analytics.enabled&&{actionsHistory:Le.getInstance().getHistory()}),...(e.advancedSearchQueries?.aq&&{aq:e.advancedSearchQueries.aq}),...(e.advancedSearchQueries?.cq&&{cq:e.advancedSearchQueries.cq}),...(e.advancedSearchQueries?.lq&&{lq:e.advancedSearchQueries.lq}),...(e.advancedSearchQueries?.dq&&{dq:e.advancedSearchQueries.dq}),...(e.context&&{context:e.context.contextValues}),...(e.fields&&!e.fields.fetchAllFields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues}),...(e.pipeline&&{pipeline:e.pipeline}),...(e.query&&{q:e.query.q,enableQuerySyntax:e.query.enableQuerySyntax}),...(e.searchHub&&{searchHub:e.searchHub}),...(e.sortCriteria&&{sortCriteria:e.sortCriteria}),...(e.configuration.analytics.enabled&&(yield Mo(e.configuration.analytics,t))),...(e.excerptLength&&!X(e.excerptLength.length)&&{excerptLength:e.excerptLength.length}),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")})}});return function xt(_x47,_x48){return _ref21.apply(this,arguments)}}();d();c();l();u();var Or=(e,t,r)=>({accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??pt(e.configuration.organizationId,e.configuration.environment),locale:e.configuration.search.locale,debug:e.debug,tab:e.configuration.analytics.originLevel2,referrer:t.referrer,timezone:e.configuration.search.timezone,...(e.advancedSearchQueries?.aq&&{aq:e.advancedSearchQueries.aq}),...(e.advancedSearchQueries?.cq&&{cq:e.advancedSearchQueries.cq}),...(e.advancedSearchQueries?.lq&&{lq:e.advancedSearchQueries.lq}),...(e.advancedSearchQueries?.dq&&{dq:e.advancedSearchQueries.dq}),...(e.context&&{context:e.context.contextValues}),...(e.fields&&!e.fields.fetchAllFields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues}),...(e.pipeline&&{pipeline:e.pipeline}),...(e.query&&{q:e.query.q,enableQuerySyntax:e.query.enableQuerySyntax}),...(e.searchHub&&{searchHub:e.searchHub}),...(e.sortCriteria&&{sortCriteria:e.sortCriteria}),...(e.configuration.analytics.enabled&&Ho(e.configuration.analytics,t,r)),...(e.excerptLength&&!X(e.excerptLength.length)&&{excerptLength:e.excerptLength.length}),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")})});d();c();l();u();var Sd=se(e=>e.staticFilterSet,e=>Object.values(e||{}).map(r=>{let n=r.values.filter(i=>i.state==="selected"&&!!i.expression.trim()),o=n.map(i=>i.expression).join(" OR ");return n.length>1?`(${o})`:o}));var Rt=/*#__PURE__*/function(){var _ref22=_asyncToGenerator(function*(e,t,r){let n=hs(e),o=dv(e),i=pv(e),a=e.configuration.analytics.analyticsMode==="legacy"?yield xt(e,r):Or(e,t,r);return Ct({...a,...(e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="next",options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="legacy"}),...(n&&{cq:n}),...(o.length&&{facets:o}),...(e.pagination&&{numberOfResults:ys(e),firstResult:e.pagination.firstResult}),...(e.facetOptions&&{facetOptions:{freezeFacetOrder:e.facetOptions.freezeFacetOrder}}),...(e.folding?.enabled&&{filterField:e.folding.fields.collection,childField:e.folding.fields.parent,parentField:e.folding.fields.child,filterFieldRange:e.folding.filterFieldRange}),...(e.automaticFacetSet&&{generateAutomaticFacets:{desiredCount:e.automaticFacetSet.desiredCount,numberOfValues:e.automaticFacetSet.numberOfValues,currentFacets:i}}),...(e.generatedAnswer&&{pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:e.generatedAnswer.fieldsToIncludeInCitations}}})})});return function Rt(_x49,_x50,_x51){return _ref22.apply(this,arguments)}}();function ys(e){return e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0}function dv(e){return ms(mv(e),e.facetOrder??[])}function pv(e){let t=e.automaticFacetSet?.set;return t?Object.values(t).map(r=>r.response).map(fv).filter(r=>r.currentValues.length>0):void 0}function fv(e){let{field:t,label:r,values:n}=e,o=n.filter(i=>i.state==="selected");return{field:t,label:r,currentValues:o}}function mv(e){return gv(e).filter(({facetId:t})=>e.facetOptions?.facets[t]?.enabled??!0)}function gv(e){return[...yv(e.facetSet??{}),...vd(e.numericFacetSet??{}),...vd(e.dateFacetSet??{}),...wt(e.categoryFacetSet??{})]}function yv(e){return wt(e).map(t=>{let r=gs[t.sortCriteria];return r?{...t,sortCriteria:r}:t})}function vd(e){return wt(e).map(t=>{let r=t.currentValues,n=r.some(({state:i})=>i!=="idle"),o=r.some(i=>i.previousState);return t.generateAutomaticRanges&&!n&&!o?{...t,currentValues:[]}:t})}function hs(e){let t=e.advancedSearchQueries?.cq.trim()||"",n=Object.values(e.tabSet||{}).find(i=>i.isActive)?.expression.trim()||"",o=Sd(e);return[t,n,...o].filter(i=>!!i).join(" AND ")}d();c();l();u();d();c();l();u();var En=(e,t)=>{let r=e;return X(r[t])?X(e.raw[t])?null:e.raw[t]:r[t]},hv=e=>t=>e.every(r=>!X(En(t,r))),Sv=e=>t=>e.every(r=>X(En(t,r))),vv=(e,t)=>r=>{let n=bd(e,r);return t.some(o=>n.some(i=>`${i}`.toLowerCase()===o.toLowerCase()))},bv=(e,t)=>r=>{let n=bd(e,r);return t.every(o=>n.every(i=>`${i}`.toLowerCase()!==o.toLowerCase()))},bd=(e,t)=>{let r=En(t,e);return hc(r)?r:[r]},Ad={getResultProperty:En,fieldsMustBeDefined:hv,fieldsMustNotBeDefined:Sv,fieldMustMatch:vv,fieldMustNotMatch:bv};var Cd=se(e=>e.search,e=>e?.searchAction?.actionCause||"");d();c();l();u();var wd=se(e=>e.searchHub,e=>e);d();c();l();u();var Ss=se(e=>e,e=>{if(!e)return"";for(let t in e)if(e[t].isActive)return e[t].id;return""}),uM=se(e=>e,e=>{let t=Ss(e);return t&&e?e[t].expression:""});d();c();l();u();var xd=se(e=>e.configuration.search.locale,e=>e),Rd=se(e=>e.configuration.search.timezone,e=>e);d();c();l();u();var Ed=e=>{if(!(!e.dictionaryFieldContext||!Object.keys(e.dictionaryFieldContext.contextValues).length))return e.dictionaryFieldContext.contextValues};d();c();l();u();var Id=se(e=>e.excerptLength?.length,e=>e);d();c();l();u();var Pd=e=>{let{freezeFacetOrder:t}=e.facetOptions??{};return t!==void 0?{freezeFacetOrder:t}:void 0};d();c();l();u();var kd=e=>{if(e.folding)return{filterField:e.folding.fields.collection,childField:e.folding.fields.parent,parentField:e.folding.fields.child,filterFieldRange:e.folding.filterFieldRange}};d();c();l();u();var Fd=se(e=>e.sortCriteria,e=>e);var Od=/*#__PURE__*/function(){var _ref23=_asyncToGenerator(function*(e){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:Pe(e.configuration.organizationId,e.configuration.environment),streamId:e.search.extendedResults?.generativeQuestionAnsweringId}});return function Od(_x52){return _ref23.apply(this,arguments)}}(),Td=(e,t)=>{let r=Bo(e)?.q,{aq:n,cq:o,dq:i,lq:a}=wv(e),m=Zl(e),f=Ho(e.configuration.analytics,t,{actionCause:Cd(e)}),p=wd(e),y=ed(e),h=ol(e)??[],S=Av(e),g=Ss(e.tabSet)||"default",v=xd(e),R=Rd(e),P=t.referrer||"",w=Pd(e),F=Fd(e),x=Cv(e),E=Id(e),M=kd(e),O=Ed(e);return{q:r,...(n&&{aq:n}),...(o&&{cq:o}),...(i&&{dq:i}),...(a&&{lq:a}),...(e.query&&{enableQuerySyntax:Jl(e)}),...(m?.contextValues&&{context:m.contextValues}),pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:h}},...(p?.length&&{searchHub:p}),...(y?.length&&{pipeline:y}),...(Object.keys(S).length&&{facets:S}),...(e.fields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="next",options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="legacy"}),...(e.pagination&&{numberOfResults:ys(e),firstResult:e.pagination.firstResult}),tab:g,locale:v,timezone:R,...(e.debug!==void 0&&{debug:e.debug}),referrer:P,...x,...(M&&M),...(E&&{excerptLength:E}),...(O&&{dictionaryFieldContext:O}),sortCriteria:F,...(w&&{facetOptions:w}),...f}},Av=e=>Yo(e)?.map(t=>fs(t,ps())).sort((t,r)=>t.facetId>r.facetId?1:r.facetId>t.facetId?-1:0),Cv=e=>({actionsHistory:e.configuration.analytics.enabled?Le.getInstance().getHistory():[]}),wv=e=>{let t=Xl(e),r=hs(e);return{...t,...(r&&{cq:r})}};d();c();l();u();var Dd=["text/plain","text/markdown"];var Tr=new H({required:!0}),jd=new H,Dr=new ne({required:!0}),xv={id:Tr,title:Tr,uri:Tr,permanentid:Tr,clickUri:jd},Md=new H({required:!0,constrainTo:Dd}),ON=T("generatedAnswer/setIsVisible",e=>Q(e,Dr)),TN=T("generatedAnswer/setIsEnabled",e=>Q(e,Dr)),bs=T("generatedAnswer/updateMessage",e=>Q(e,{textDelta:Tr})),As=T("generatedAnswer/updateCitations",e=>Q(e,{citations:new ie({required:!0,each:new K({values:xv})})})),Rv=T("generatedAnswer/updateError",e=>Q(e,{message:jd,code:new J({min:0})})),Ev=T("generatedAnswer/resetAnswer"),DN=T("generatedAnswer/like"),qN=T("generatedAnswer/dislike"),jN=T("generatedAnswer/feedbackModal/open"),MN=T("generatedAnswer/expand"),NN=T("generatedAnswer/collapse"),_N=T("generatedAnswer/setId",e=>Q(e,{id:new H({required:!0})})),VN=T("generatedAnswer/feedbackModal/close"),LN=T("generatedAnswer/sendFeedback"),vs=T("generatedAnswer/setIsLoading",e=>Q(e,Dr)),qd=T("generatedAnswer/setIsStreaming",e=>Q(e,Dr)),Cs=T("generatedAnswer/setAnswerContentFormat",e=>Q(e,Md)),UN=T("generatedAnswer/updateResponseFormat",e=>Q(e,{contentFormat:new ie({each:Md,default:["text/plain"]})})),QN=T("knowledge/updateAnswerConfigurationId",e=>Q(e,Tr)),BN=T("generatedAnswer/registerFieldsToIncludeInCitations",e=>Q(e,io)),Iv=T("generatedAnswer/setIsAnswerGenerated",e=>Q(e,Dr)),ws=T("generatedAnswer/setCannotAnswer",e=>Q(e,Dr)),Pv=T("generatedAnswer/setAnswerApiQueryParams",e=>Q(e,new K({}))),$N=le("generatedAnswer/streamAnswer",/*#__PURE__*/function(){var _ref24=_asyncToGenerator(function*(e,t){let r=t.getState(),{dispatch:n,extra:o,getState:i}=t,{search:a}=i(),{queryExecuted:m}=a,{setAbortControllerRef:f}=e,p=yield Od(r),y=(g,v)=>{switch(g){case"genqa.headerMessageType":{let R=JSON.parse(v);n(Cs(R.contentFormat));break}case"genqa.messageType":n(bs(JSON.parse(v)));break;case"genqa.citationsType":n(As(JSON.parse(v)));break;case"genqa.endOfStreamType":{let R=JSON.parse(v).answerGenerated,P=m.length!==0&&!R;n(ws(P)),n(qd(!1)),n(Iv(R)),n($o(R));break}default:r.debug&&o.logger.warn(`Unknown payloadType: "${g}"`)}};n(vs(!0));let h=g=>g.streamId===t.getState().search.extendedResults.generativeQuestionAnsweringId,S=o.streamingClient?.streamGeneratedAnswer(p,{write:g=>{h(p)&&(n(vs(!1)),g.payload&&g.payloadType&&y(g.payloadType,g.payload))},abort:g=>{h(p)&&n(Rv(g))},close:()=>{h(p)&&n(qd(!1))},resetAnswer:()=>{h(p)&&n(Ev())}});S?f(S):n(vs(!1))});return function(_x53,_x54){return _ref24.apply(this,arguments)}}()),HN=le("generatedAnswer/generateAnswer",/*#__PURE__*/function(){var _ref25=_asyncToGenerator(function*(e,{getState:t,dispatch:r,extra:{navigatorContext:n,logger:o}}){let i=t();if(i.generatedAnswer.answerConfigurationId){let a=Td(i,n);r(Pv(a)),yield r(Nd(a))}else o.warn("[WARNING] Missing answerConfigurationId in engine configuration. The generateAnswer action requires an answer configuration ID to use CRGA with the Answer API.")});return function(_x55,_x56){return _ref25.apply(this,arguments)}}());d();c();l();u();d();c();l();u();function Vd(_x57,_x58){return _Vd.apply(this,arguments)}function _Vd(){_Vd=_asyncToGenerator(function*(e,t){let r=e.getReader(),n;for(;!(n=yield r.read()).done;)t(n.value)});return _Vd.apply(this,arguments)}function Ld(e){let t,r,n,o=!1;return function(a){t===void 0?(t=a,r=0,n=-1):t=Fv(t,a);let m=t.length,f=0;for(;r<m;){o&&(t[r]===10&&(f=++r),o=!1);let p=-1;for(;r<m&&p===-1;++r)switch(t[r]){case 58:n===-1&&(n=r-f);break;case 13:o=!0,p=r;break;case 10:p=r;break}if(p===-1)break;e(t.subarray(f,p),n),f=r,n=-1}f===m?t=void 0:f!==0&&(t=t.subarray(f),r-=f)}}function Ud(e,t,r){let n=_d(),o=new TextDecoder;return function(a,m){if(a.length===0)r?.(n),n=_d();else if(m>0){let f=o.decode(a.subarray(0,m)),p=m+(a[m+1]===32?2:1),y=o.decode(a.subarray(p));switch(f){case"data":n.data=n.data?`${n.data}
31
- ${y}`:y;break;case"event":n.event=y;break;case"id":e(n.id=y);break;case"retry":kv(y,n,t);break}}}}function kv(e,t,r){let n=parseInt(e,10);Number.isNaN(n)||r(t.retry=n)}function Fv(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function _d(){return{data:"",event:"",id:"",retry:void 0}}var xs="text/event-stream",Ov=1e3,Qd="last-event-id";function Bd(){return typeof window<"u"}function $d(e,{signal:t,headers:r,onopen:n,onmessage:o,onclose:i,onerror:a,openWhenHidden:m,fetch:f,...p}){return new Promise((y,h)=>{let S={...r};S.accept||(S.accept=xs);let g;function v(){g?.abort(),document.hidden||E()}!m&&Bd()&&document.addEventListener("visibilitychange",v);let R=Ov,P;function w(){Bd()&&document.removeEventListener("visibilitychange",v),clearTimeout(P),g?.abort()}t?.addEventListener("abort",()=>{w(),y()});let F=f??A,x=n??Tv;function E(){return _E.apply(this,arguments)}function _E(){_E=_asyncToGenerator(function*(){g=s.AbortController?new s.AbortController:null;try{let M=yield F(e,{...p,headers:S,signal:g?.signal});yield x(M),yield Vd(M.body,Ld(Ud(O=>{O?S[Qd]=O:delete S[Qd]},O=>{R=O},o))),i?.(),w(),y()}catch(M){if(!g?.signal?.aborted)try{let O=a?.(M)??R;clearTimeout(P),P=setTimeout(E,O)}catch(O){w(),h(O)}}});return _E.apply(this,arguments)}E()})}function Tv(e){let t=e.headers.get("content-type");if(!t?.startsWith(xs))throw new Error(`Expected content-type to be ${xs}, Actual: ${t}`)}d();c();l();u();var Dv=/*#__PURE__*/function(){var _ref26=_asyncToGenerator(function*(e,t,r){let n=t.getState(),{accessToken:o,environment:i,organizationId:a}=n.configuration,m=n.generatedAnswer.answerConfigurationId,f={...e,headers:{...(e?.headers||{}),Authorization:`Bearer ${o}`}};try{let p=Pe(a,i);return{data:Bl({baseUrl:`${p}/rest/organizations/${a}/answer/v1/configs/${m}`,fetchFn:function(){var _ref27=_asyncToGenerator(function*(h){if(h instanceof String)throw new Error("The provided 'request' must be a Request object.");let S=h.url,g={};return["method","headers","mode","credentials","cache","redirect","referrer","referrerPolicy","integrity","keepalive","signal"].forEach(v=>{g[v]=h[v]}),g.duplex="half",g.body=yield h.text(),A(S,g)});return function fetchFn(_x62){return _ref27.apply(this,arguments)}}()})(f,{...t,signal:null},r)}}catch(p){return{error:p}}});return function Dv(_x59,_x60,_x61){return _ref26.apply(this,arguments)}}(),Hd=Yl({reducerPath:"answer",baseQuery:$l(Dv,{maxRetries:3}),endpoints:()=>({})});var qv=(e,t)=>{let{contentFormat:r}=t;e.contentFormat=r,e.isStreaming=!0,e.isLoading=!1},jv=(e,t)=>{e.answer===void 0?e.answer=t.textDelta:typeof t.textDelta=="string"&&(e.answer=e.answer.concat(t.textDelta))},Mv=(e,t)=>{e.citations=t.citations},Nv=(e,t)=>{e.generated=t.answerGenerated,e.isStreaming=!1},_v=(e,t)=>{e.error={message:t.errorMessage,code:t.code},e.isStreaming=!1,e.isLoading=!1,console.error(`${t.errorMessage} - code ${t.code}`)},Vv=(e,t,r)=>{let n=JSON.parse(e.data);n.finishReason==="ERROR"&&n.errorMessage&&_v(t,n);let o=n.payload.length?JSON.parse(n.payload):{};switch(n.payloadType){case"genqa.headerMessageType":o.contentFormat&&(qv(t,o),r(Cs(o.contentFormat)));break;case"genqa.messageType":o.textDelta&&(jv(t,o),r(bs({textDelta:o.textDelta})));break;case"genqa.citationsType":o.citations&&(Mv(t,o),r(As({citations:o.citations})));break;case"genqa.endOfStreamType":Nv(t,o),r($o(o.answerGenerated??!1));break}},Rs=Hd.injectEndpoints({overrideExisting:!0,endpoints:e=>({getAnswer:e.query({queryFn:()=>({data:{contentFormat:void 0,answer:void 0,citations:void 0,error:void 0,generated:!1,isStreaming:!0,isLoading:!0}}),serializeQueryArgs:({endpointName:t,queryArgs:r})=>{let{analytics:n,...o}=r;return`${t}(${JSON.stringify(o)})`},onCacheEntryAdded(_x63,_x64){return _asyncToGenerator(function*(t,{getState:r,cacheDataLoaded:n,updateCachedData:o,dispatch:i}){yield n;let{configuration:a,generatedAnswer:m,insightConfiguration:f}=r(),{organizationId:p,environment:y,accessToken:h}=a,S=Pe(p,y),g=`${S}/rest/organizations/${p}/insight/v1/configs/${f?.insightId}/answer/${m.answerConfigurationId}/generate`,v=`${S}/rest/organizations/${p}/answer/v1/configs/${m.answerConfigurationId}/generate`;yield $d(f?g:v,{method:"POST",body:JSON.stringify(t),headers:{Authorization:`Bearer ${h}`,Accept:"application/json","Content-Type":"application/json","Accept-Encoding":"*"},fetch:A,onopen:function(){var _ref28=_asyncToGenerator(function*(R){let P=R.headers.get("x-answer-id");P&&o(w=>{w.answerId=P})});return function onopen(_x65){return _ref28.apply(this,arguments)}}(),onmessage:R=>{o(P=>{Vv(R,P,i)})},onerror:R=>{throw R},onclose:()=>{o(R=>{i(ws(!R.generated))})}})}).apply(this,arguments)}})})}),Nd=e=>Rs.endpoints.getAnswer.initiate(e);d();c();l();u();var zd=ge(sr,e=>e);d();c();l();u();function Lv(e){let t=e.payload?.analyticsAction;return Gd(e)&&!X(t)}function Gd(e){return"type"in e}var Wd=e=>t=>r=>{let n;Lv(r)&&(n=r.payload.analyticsAction,delete r.payload.analyticsAction);let o=t(r);return Gd(r)&&(r.type==="search/executeSearch/fullfilled"&&n===void 0&&console.error("No analytics action associated with search:",r),r.type==="recommendation/get/fullfilled"&&n===void 0&&console.error("No analytics action associated with recommendation:",r),r.type==="productRecommendations/get/fullfilled"&&n===void 0&&console.error("No analytics action associated with product recommendation:",r)),n!==void 0&&e.dispatch(n),o};d();c();l();u();d();c();l();u();d();c();l();u();var Q_=T("tab/register",e=>{let t=new K({values:{id:W,expression:we}});return Q(e,t)}),Jo=T("tab/updateActiveTab",e=>Q(e,W));d();c();l();u();var Xo=Be(zo(),1),Jd=Be(Kd(),1),Xd=Be(Yd(),1);Xo.default.extend(Xd.default);Xo.default.extend(Jd.default);var Zd=()=>({organizationId:"",accessToken:"",search:{locale:"en-US",timezone:Xo.default.tz.guess(),authenticationProviders:[]},analytics:{enabled:!0,originContext:"Search",originLevel2:"default",originLevel3:"default",anonymous:!1,deviceId:"",userDisplayName:"",documentLocation:"",analyticsMode:"next",source:{}},knowledge:{answerConfigurationId:""},environment:"prod"});d();c();l();u();var Uv=/(^|; )Coveo-Pendragon=([^;]*)/;function Fs(){return typeof window>"u"?!1:Uv.exec(document.cookie)?.pop()||null}var ep=ge(Zd(),e=>e.addCase(yt,(t,r)=>{Qv(t,r.payload)}).addCase(Je,(t,r)=>{Bv(t,r.payload)}).addCase(cr,(t,r)=>{$v(t,r.payload)}).addCase(ur,t=>{t.analytics.enabled=!1}).addCase(lr,t=>{t.analytics.enabled=!0}).addCase(ao,(t,r)=>{t.analytics.originLevel2=r.payload.originLevel2}).addCase(so,(t,r)=>{t.analytics.originLevel3=r.payload.originLevel3}).addCase(Jo,(t,r)=>{t.analytics.originLevel2=r.payload}).addCase(Ru,(t,r)=>{t.analytics.originLevel2=r.payload}).addCase(ht,(t,r)=>{X(r.payload.tab)||(t.analytics.originLevel2=r.payload.tab)}));function Qv(e,t){X(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",X(t.organizationId)||(e.organizationId=t.organizationId)}function Bv(e,t){X(t.proxyBaseUrl)||(e.search.apiBaseUrl=t.proxyBaseUrl),X(t.locale)||(e.search.locale=t.locale),X(t.timezone)||(e.search.timezone=t.timezone),X(t.authenticationProviders)||(e.search.authenticationProviders=t.authenticationProviders)}function $v(e,t){X(t.enabled)||(e.analytics.enabled=t.enabled),X(t.originContext)||(e.analytics.originContext=t.originContext),X(t.originLevel2)||(e.analytics.originLevel2=t.originLevel2),X(t.originLevel3)||(e.analytics.originLevel3=t.originLevel3),X(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),X(t.trackingId)||(e.analytics.trackingId=t.trackingId),X(t.analyticsMode)||(e.analytics.analyticsMode=t.analyticsMode),X(t.source)||(e.analytics.source=t.source);try{let r=Fs();r&&(e.analytics.analyticsMode="next",e.analytics.trackingId=r)}catch{}X(t.runtimeEnvironment)||(e.analytics.runtimeEnvironment=t.runtimeEnvironment),X(t.anonymous)||(e.analytics.anonymous=t.anonymous),X(t.deviceId)||(e.analytics.deviceId=t.deviceId),X(t.userDisplayName)||(e.analytics.userDisplayName=t.userDisplayName),X(t.documentLocation)||(e.analytics.documentLocation=t.documentLocation)}var ze=ep;d();c();l();u();function Hv(e){return e.instantlyCallable}var tp=()=>e=>t=>e(Hv(t)?t():t);d();c();l();u();var rp=e=>()=>t=>r=>{let n=r;if(!n.error)return t(r);let o=n.error,i=[n.payload?.errorCode,n.payload?.message].filter(Boolean).join(" - ");if(n.payload?.ignored||e.error(i||o.stack||o.message||o.name||"Error",`Action dispatch error ${n.type}`,r),n.error.name!=="SchemaValidationError")return t(r)},np=e=>t=>r=>n=>(e.debug({action:n,nextState:t.getState()},`Action dispatched: ${n.type}`),r(n));d();c();l();u();var Os=(e,t)=>{let{referrer:r,userAgent:n,location:o,clientId:i}=e.getMeta("");return{...(t?t():{}),referrer:r,userAgent:n,location:o,clientId:i}};d();c();l();u();function op(e,t){let r={...e},n,o=i=>(a,m)=>{let f=i(a,m);return n?n(f,m):f};return{get combinedReducer(){let i=vc(Object.entries(t).filter(([a])=>!(a in r)).map(([a,m])=>[a,()=>m]));return o(tr({...i,...r}))},containsAll(i){return Object.keys(i).every(m=>m in r)},add(i){Object.keys(i).filter(a=>!(a in r)).forEach(a=>{r[a]=i[a]})},addCrossReducer(i){n=i}}}d();c();l();u();d();c();l();u();function zv(e){if(!e||!Gv(e))return null;try{let r=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=atob(r),o=decodeURIComponent(n.split("").map(i=>`%${`00${i.charCodeAt(0).toString(16)}`.slice(-2)}`).join(""));return JSON.parse(o)}catch{return null}}function ip(e,t=60){if(!e)return!1;let r=zv(e);if(!r||typeof r.exp!="number")return!1;let n=Math.floor(Date.now()/1e3);return r.exp<=n+t}function Gv(e){return e?/^[A-Za-z0-9_-]{2,}(?:\.[A-Za-z0-9_-]{2,}){2}$/.test(e):!1}function sp(e,t){let r=0,n=null,o=Nn(()=>{r=0},500),i=/*#__PURE__*/function(){var _ref29=_asyncToGenerator(function*(f,p=!1){let y=!n;y&&t&&(n=_asyncToGenerator(function*(){return p&&Kv(t),yield t()})().finally(()=>{n=null}));let h=yield n;return y&&h&&f.dispatch(yt({accessToken:h})),h});return function i(_x66){return _ref29.apply(this,arguments)}}(),a=/*#__PURE__*/function(){var _ref31=_asyncToGenerator(function*(f){let p=f.getState(),y=Yv(p);if(!(!y||!ip(y))){e.debug("Access token is expired or about to expire, attempting renewal.");try{(yield i(f))?e.debug("Access token was renewed."):e.warn("Access token renewal returned an empty token. Please check the #renewAccessToken function.")}catch(h){e.warn(h,"Access token renewal failed. A retry will occur if necessary.")}}});return function a(_x67){return _ref31.apply(this,arguments)}}(),m=/*#__PURE__*/function(){var _ref32=_asyncToGenerator(function*(f,p,y){if(r>=5)return e.warn("Attempted to renew the token but was not successful. Please check the #renewAccessToken function."),ap(f,p.error),p;r++,o(),yield i(f,!0),f.dispatch(y)});return function m(_x68,_x69,_x70){return _ref32.apply(this,arguments)}}();return f=>p=>(/*#__PURE__*/function(){var _ref33=_asyncToGenerator(function*(y){let h=typeof y=="function",S=typeof t=="function";if(!h)return p(y);S&&(yield a(f));let g=yield p(y);return Wv(g)?S?yield m(f,g,y):(e.warn("Unable to renew the expired token because a renew function was not provided. Please specify the #renewAccessToken option when initializing the engine."),ap(f,g.error),g):g});return function(_x71){return _ref33.apply(this,arguments)}}())}function Wv(e){return typeof e=="object"&&e!==null&&"error"in e&&e.error?.name===new er().name}function ap(e,t){e.dispatch(fo({status:401,statusCode:401,message:t.message,type:t.name}))}function Kv(_x72){return _Kv.apply(this,arguments)}function _Kv(){_Kv=_asyncToGenerator(function*(e){try{return yield e()}catch{return""}});return _Kv.apply(this,arguments)}function Yv(e){return e.configuration.accessToken}d();c();l();u();function cp({reducer:e,preloadedState:t,middlewares:r=[],thunkExtraArguments:n,name:o}){return uu({reducer:e,preloadedState:t,devTools:{stateSanitizer:i=>i.history?{...i,history:"<<OMIT>>"}:i,name:o,shouldHotReload:!1},middleware:i=>i({thunk:{extraArgument:n}}).prepend(...r).concat(np(n.logger))})}function Jv(e,t){let{analytics:r}=e,{analyticsClientMiddleware:n,...o}=r??{},i={...o,...(r?.proxyBaseUrl&&{apiBaseUrl:r.proxyBaseUrl,nexApiBaseUrl:r.proxyBaseUrl})};return i.analyticsMode!=="next"&&Sc()?(t.info("Analytics disabled since doNotTrack is active."),{...i,enabled:!1}):i}function up(e,t){let r={...e.reducers,configuration:ze,version:zd},n=Xv({...e,reducers:r},t,ze),{accessToken:o,environment:i,organizationId:a}=e.configuration;n.dispatch(yt({accessToken:o,environment:i,organizationId:a}));let m=Jv(e.configuration,n.logger);return m&&n.dispatch(cr(m)),n}function Xv(e,t,r){let{reducers:n,navigatorContextProvider:o}=e,i=op({...n,configurationReducer:r},e.preloadedState??{});e.crossReducer&&i.addCrossReducer(e.crossReducer);let a=t.logger,m={...t,get relay(){return Sn(p.state,o)},get navigatorContext(){return Os(this.relay,o)}},f=Zv(e,m,i),p={addReducers(y){i.containsAll(y)||(i.add(y),f.replaceReducer(i.combinedReducer))},dispatch:f.dispatch,subscribe:f.subscribe,enableAnalytics(){f.dispatch(lr())},disableAnalytics(){f.dispatch(ur())},get state(){return f.getState()},get relay(){return Sn(this.state,o)},get navigatorContext(){return Os(this.relay,o)},logger:a,store:f};return p}function Zv(e,t,r){let{preloadedState:n,configuration:o}=e,i=o.name||"coveo-headless",a=eb(e,t.logger);return cp({preloadedState:n,reducer:r.combinedReducer,middlewares:a,thunkExtraArguments:t,name:i})}function eb(e,t){let{renewAccessToken:r}=e.configuration,n=sp(t,r);return[tp,n,rp(t),Wd].concat(Rs.middleware,e.middlewares||[])}d();c();l();u();var Sp=Be(hp(),1);function vp(e){return(0,Sp.pino)({name:"@coveo/headless",level:e?.level||"warn",formatters:{log:e?.logFormatter}})}d();c();l();u();function bp(e,t){let r=Sb(e),n=Ve,o=vb(e);return{analyticsClientMiddleware:r,validatePayload:n,preprocessRequest:o,logger:t}}function Sb(e){let{analytics:t}=e,r=(n,o)=>o;return t?.analyticsClientMiddleware||r}function vb(e){return e.preprocessRequest||Ln}d();c();l();u();d();c();l();u();var Ap={organizationId:W,accessToken:W,name:new H({required:!1,emptyAllowed:!1}),analytics:new K({options:{required:!1},values:{enabled:new ne({required:!1}),originContext:new H({required:!1}),originLevel2:new H({required:!1}),originLevel3:new H({required:!1}),analyticsMode:new H({constrainTo:["legacy","next"],required:!1,default:"next"}),proxyBaseUrl:new H({required:!1,url:!0}),trackingId:new H({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/})}}),environment:new H({required:!1,default:"prod",constrainTo:["prod","hipaa","stg","dev"]})};function Cp(){return{organizationId:"searchuisamples",accessToken:"xx564559b1-0045-48e1-953c-3addd1ee4457"}}var wp=new Fe({...Ap,pipeline:new H({required:!1,emptyAllowed:!0}),searchHub:Ce,locale:Ce,timezone:Ce});function Ns(){return{...Cp(),searchHub:"default"}}var bb={debug:po,pipeline:fr,searchHub:Ir,recommendation:Rr};function xp(e){let t=vp(e.loggerOptions);Ab(e.configuration,t);let r=Cb(e.configuration,t),n={...bp(e.configuration,t),apiClient:r},o={...e,reducers:bb},i=up(o,n),{pipeline:a,searchHub:m,timezone:f,locale:p,proxyBaseUrl:y}=e.configuration;return i.dispatch(Je({timezone:f,locale:p,proxyBaseUrl:y})),X(a)||i.dispatch(dr(a)),X(m)||i.dispatch(Er(m)),{...i,get state(){return i.state}}}function Ab(e,t){try{wp.validate(e)}catch(r){throw t.error(r,"Recommendation engine configuration error"),r}}function Cb(e,t){return new Bn({logger:t,preprocessRequest:e.preprocessRequest||Ln,postprocessSearchResponseMiddleware:e.preprocessSearchResponseMiddleware||Mc,postprocessFacetSearchResponseMiddleware:Nc,postprocessQuerySuggestResponseMiddleware:_c})}d();c();l();u();d();c();l();u();d();c();l();u();var wb=new ie({each:W,required:!0}),Rp=(e,t)=>(Q(e,W),jn(t)?Q(t,W):Q(t,wb),{payload:{contextKey:e,contextValue:t}}),zt=T("context/set",e=>{for(let[t,r]of Object.entries(e))Rp(t,r);return{payload:e}}),Gt=T("context/add",e=>Rp(e.contextKey,e.contextValue)),Wt=T("context/remove",e=>Q(e,W));d();c();l();u();d();c();l();u();function ti(){return{contextValues:{}}}var ri=ge(ti(),e=>{e.addCase(zt,(t,r)=>{t.contextValues=r.payload}).addCase(Gt,(t,r)=>{t.contextValues[r.payload.contextKey]=r.payload.contextValue}).addCase(Wt,(t,r)=>{delete t.contextValues[r.payload]}).addCase(qe.fulfilled,(t,r)=>{r.payload&&(t.contextValues=r.payload.context.contextValues)})});d();c();l();u();function It(e){let t,r=new Map,n=()=>r.size===0,o=i=>{try{let a=JSON.stringify(i),m=t!==a;return t=a,m}catch(a){return console.warn("Could not detect if state has changed, check the controller \"get state method\"",a),!0}};return{subscribe(i){i();let a=Symbol(),m;return n()&&(t=JSON.stringify(this.state),m=e.subscribe(()=>{o(this.state)&&r.forEach(f=>f())})),r.set(a,i),()=>{r.delete(a),n()&&m?.()}},get state(){return{}}}}d();c();l();u();var xb=["caseId","caseNumber"],Rb={caseId:"caseContext",caseNumber:"caseContext"},Pn=class extends Error{constructor(t){super(`The key "${t}" is reserved for internal use. Use ${Rb[t]} to set this value.}`)}};function _s(e){return xb.includes(e)}var Eb=new Fe({values:new K({options:{required:!1}})});function Ep(e,t={}){if(!kb(e))throw Ge;let r=It(e),{dispatch:n}=e,o=()=>e.state,i=vu(e,Eb,t.initialState,"buildContext");return i.values&&n(zt(i.values)),{...r,get state(){return{values:o().context.contextValues}},set(a){n(zt(a))},...(o().configuration.analytics.analyticsMode==="legacy"?Ib(n):Pb(n))}}var Ib=e=>({add(t,r){e(Gt({contextKey:t,contextValue:r}))},remove(t){e(Wt(t))}}),Pb=e=>({add(t,r){if(_s(t))throw new Pn(t);e(Gt({contextKey:t,contextValue:r}))},remove(t){if(_s(t))throw new Pn(t);e(Wt(t))}});function kb(e){return e.addReducers({context:ri}),!0}function Ip(e,t){return Ep(e,t)}d();c();l();u();d();c();l();u();var jr=T("dictionaryFieldContext/set",e=>{let t=new K({options:{required:!0}}),r=Q(e,t).error;if(r)return{payload:e,error:r};let n=Object.values(e),o=new ie({each:we}),i=Q(n,o).error;return i?{payload:e,error:i}:{payload:e}}),Mr=T("dictionaryFieldContext/add",e=>{let t=new K({options:{required:!0},values:{field:we,key:we}});return Q(e,t)}),Nr=T("dictionaryFieldContext/remove",e=>Q(e,we));d();c();l();u();d();c();l();u();function ni(){return{contextValues:{}}}var oi=ge(ni(),e=>{e.addCase(jr,(t,r)=>{t.contextValues=r.payload}).addCase(Mr,(t,r)=>{let{field:n,key:o}=r.payload;t.contextValues[n]=o}).addCase(Nr,(t,r)=>{delete t.contextValues[r.payload]}).addCase(qe.fulfilled,(t,r)=>{r.payload&&(t.contextValues=r.payload.dictionaryFieldContext.contextValues)})});function Pp(e){if(!Fb(e))throw Ge;let t=It(e),{dispatch:r}=e,n=()=>e.state;return{...t,get state(){return{values:n().dictionaryFieldContext.contextValues}},set(o){r(jr(o))},add(o,i){r(Mr({field:o,key:i}))},remove(o){r(Nr(o))}}}function Fb(e){return e.addReducers({dictionaryFieldContext:oi}),!0}d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();var ii=T("breadcrumb/deselectAll"),kp=T("breadcrumb/deselectAllNonBreadcrumbs");d();c();l();u();d();c();l();u();var kn={value:W,numberOfResults:new J({min:0}),state:W};d();c();l();u();var de=W;var qb=new J({min:1,default:8,required:!1}),jb=new J({min:1,max:20,default:5,required:!1}),Mb={desiredCount:jb,numberOfValues:qb},V1=T("automaticFacet/setOptions",e=>Q(e,Mb)),L1=T("automaticFacet/deselectAll",e=>Q(e,de)),Nb=W,Fp=T("automaticFacet/toggleSelectValue",e=>Q(e,{field:Nb,selection:new K({values:kn})}));d();c();l();u();d();c();l();u();var _b={state:new fe({required:!0}),numberOfResults:new J({required:!0,min:0}),value:new H({required:!0,emptyAllowed:!0}),path:new ie({required:!0,each:W}),moreValuesAvailable:new ne({required:!1})};function Vs(e){e.children.forEach(t=>{Vs(t)}),Ve({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},_b)}var _r={facetId:de,field:W,tabs:new K({options:{required:!1},values:{included:new ie({each:new H}),excluded:new ie({each:new H})}}),activeTab:new H({required:!1}),delimitingCharacter:new H({required:!1,emptyAllowed:!0}),filterFacetCount:new ne({required:!1}),injectionDepth:new J({required:!1,min:0}),numberOfValues:new J({required:!1,min:1}),sortCriteria:new fe({required:!1}),basePath:new ie({required:!1,each:W}),filterByBasePath:new ne({required:!1})};var oB=T("categoryFacet/register",e=>Q(e,_r)),Op=T("categoryFacet/toggleSelectValue",e=>{try{return Ve(e.facetId,W),Vs(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:it(t)}}}),Tp=T("categoryFacet/deselectAll",e=>Q(e,_r.facetId)),iB=T("categoryFacet/updateNumberOfValues",e=>Q(e,{facetId:_r.facetId,numberOfValues:_r.numberOfValues})),aB=T("categoryFacet/updateSortCriterion",e=>Q(e,{facetId:_r.facetId,criterion:new fe})),sB=T("categoryFacet/updateBasePath",e=>Q(e,{facetId:_r.facetId,basePath:new ie({each:W})}));d();c();l();u();d();c();l();u();var Fn={facetId:de,captions:new K({options:{required:!1}}),numberOfValues:new J({required:!1,min:1}),query:new H({required:!1,emptyAllowed:!0})};var Vb={path:new ie({required:!0,each:W}),displayValue:we,rawValue:we,count:new J({required:!0,min:0})},Dp=T("categoryFacet/selectSearchResult",e=>Q(e,{facetId:de,value:new K({values:Vb})})),RB=T("categoryFacetSearch/register",e=>Q(e,Fn));d();c();l();u();var qp={facetId:de,value:new K({values:{displayValue:we,rawValue:we,count:new J({required:!0,min:0})}})},MB=T("facetSearch/register",e=>Q(e,Fn)),NB=T("facetSearch/update",e=>Q(e,Fn)),jp=T("facetSearch/toggleSelectValue",e=>Q(e,qp)),Mp=T("facetSearch/toggleExcludeValue",e=>Q(e,qp));d();c();l();u();d();c();l();u();var $B=new H({regex:/^[a-zA-Z0-9-_]+$/}),HB=new H({required:!0}),zB=new ie({each:new H}),GB=new H,WB=new ne,KB=new ne,YB=new J({min:0}),Lb=new J({min:1}),JB=new ne({required:!0}),Ub=new K,Qb=new H,Bb={captions:Ub,numberOfValues:Lb,query:Qb},XB=new K({values:Bb}),Np=new K({options:{required:!1},values:{type:new H({constrainTo:["simple"],emptyAllowed:!1,required:!0}),values:new ie({required:!0,max:25,each:new H({emptyAllowed:!1,required:!0})})}}),ZB=new ne,_p=new ie({min:1,max:25,required:!1,each:new H({emptyAllowed:!1,required:!0})});var $b={facetId:de,field:new H({required:!0,emptyAllowed:!0}),tabs:new K({options:{required:!1},values:{included:new ie({each:new H}),excluded:new ie({each:new H})}}),activeTab:new H({required:!1}),filterFacetCount:new ne({required:!1}),injectionDepth:new J({required:!1,min:0}),numberOfValues:new J({required:!1,min:1}),sortCriteria:new fe({required:!1}),resultsMustMatch:new fe({required:!1}),allowedValues:Np,customSort:_p},d$=T("facet/register",e=>Q(e,$b)),Vp=T("facet/toggleSelectValue",e=>Q(e,{facetId:de,selection:new K({values:kn})})),Lp=T("facet/toggleExcludeValue",e=>Q(e,{facetId:de,selection:new K({values:kn})})),ai=T("facet/deselectAll",e=>Q(e,de)),p$=T("facet/updateSortCriterion",e=>Q(e,{facetId:de,criterion:new fe({required:!0})})),f$=T("facet/updateNumberOfValues",e=>Q(e,{facetId:de,numberOfValues:new J({required:!0,min:1})})),m$=T("facet/updateIsFieldExpanded",e=>Q(e,{facetId:de,isFieldExpanded:new ne({required:!0})})),g$=T("facet/updateFreezeCurrentValues",e=>Q(e,{facetId:de,freezeCurrentValues:new ne({required:!0})}));d();c();l();u();d();c();l();u();function Qp(e){let t=Up(e.start,e),r=Up(e.end,e),n=e.endInclusive??!1,o=e.state??"idle";return{start:t,end:r,endInclusive:n,state:o}}function Up(e,t){let{dateFormat:r}=t;return pd(e)?(ds(e),ud(e)):typeof e=="string"&&At(e)?(ds(e),e):(id(e,r),Wo(Fr(e,r)))}d();c();l();u();var Bp=T("rangeFacet/updateSortCriterion",e=>Q(e,{facetId:de,criterion:new fe({required:!0})}));d();c();l();u();var si={state:W,start:new J({required:!0}),end:new J({required:!0}),endInclusive:new ne({required:!0}),numberOfResults:new J({required:!0,min:0})},ci={start:W,end:W,endInclusive:new ne({required:!0}),state:W,numberOfResults:new J({required:!0,min:0})};var Hb={start:W,end:W,endInclusive:new ne({required:!0}),state:W},zb={facetId:de,field:W,tabs:new K({options:{required:!1},values:{included:new ie({each:new H}),excluded:new ie({each:new H})}}),activeTab:new H({required:!1}),currentValues:new ie({required:!1,each:new K({values:Hb})}),generateAutomaticRanges:new ne({required:!0}),filterFacetCount:new ne({required:!1}),injectionDepth:new J({required:!1,min:0}),numberOfValues:new J({required:!1,min:1}),sortCriteria:new fe({required:!1}),rangeAlgorithm:new fe({required:!1})};function $p(e){return At(e)?Rn(e):e}function Hp(e){e.currentValues&&e.currentValues.forEach(t=>{let{start:r,end:n}=Qp(t);if(Fr($p(r)).isAfter(Fr($p(n))))throw new Error(`The start value is greater than the end value for the date range ${t.start} to ${t.end}`)})}var tH=T("dateFacet/register",e=>{try{return Ve(e,zb),Hp(e),{payload:e,error:null}}catch(t){return{payload:e,error:it(t)}}}),zp=T("dateFacet/toggleSelectValue",e=>Q(e,{facetId:de,selection:new K({values:ci})})),Gp=T("dateFacet/toggleExcludeValue",e=>Q(e,{facetId:de,selection:new K({values:ci})})),Wp=T("dateFacet/updateFacetValues",e=>{try{return Ve(e,{facetId:de,values:new ie({each:new K({values:ci})})}),Hp({currentValues:e.values}),{payload:e,error:null}}catch(t){return{payload:e,error:it(t)}}});d();c();l();u();var Gb={state:W,start:new J({required:!0}),end:new J({required:!0}),endInclusive:new ne({required:!0})},Wb={facetId:de,field:W,tabs:new K({options:{required:!1},values:{included:new ie({each:new H}),excluded:new ie({each:new H})}}),activeTab:new H({required:!1}),currentValues:new ie({required:!1,each:new K({values:Gb})}),generateAutomaticRanges:new ne({required:!0}),filterFacetCount:new ne({required:!1}),injectionDepth:new J({required:!1,min:0}),numberOfValues:new J({required:!1,min:1}),sortCriteria:new fe({required:!1}),rangeAlgorithm:new fe({required:!1})};function Kp(e){e.currentValues&&e.currentValues.forEach(({start:t,end:r})=>{if(t>r)throw new Error(`The start value is greater than the end value for the numeric range ${t} to ${r}`)})}var mH=T("numericFacet/register",e=>{try{return Q(e,Wb),Kp(e),{payload:e,error:null}}catch(t){return{payload:e,error:it(t)}}}),Yp=T("numericFacet/toggleSelectValue",e=>Q(e,{facetId:de,selection:new K({values:si})})),Jp=T("numericFacet/toggleExcludeValue",e=>Q(e,{facetId:de,selection:new K({values:si})})),Xp=T("numericFacet/updateFacetValues",e=>{try{return Ve(e,{facetId:de,values:new ie({each:new K({values:si})})}),Kp({currentValues:e.values}),{payload:e,error:null}}catch(t){return{payload:e,error:it(t)}}});d();c();l();u();d();c();l();u();var Zp=T("facet/updateFacetAutoSelection",e=>Q(e,{allow:new ne({required:!0})}));d();c();l();u();d();c();l();u();var ui=class extends vt{constructor(r){super(r);this.getState=r}get activeInstantResultQuery(){let r=this.getState().instantResults;for(let n in r)for(let o in r[n].cache)if(r[n].cache[o].isActive)return r[n].q;return null}get activeInstantResultCache(){let r=this.getState().instantResults;for(let n in r)for(let o in r[n].cache)if(r[n].cache[o].isActive)return r[n].cache[o];return null}get results(){return this.activeInstantResultCache?.results}get queryText(){return this.activeInstantResultQuery??Ne().q}get responseTime(){return this.activeInstantResultCache?.duration??We().duration}get numberOfResults(){return this.activeInstantResultCache?.totalCountFiltered??We().response.totalCountFiltered}getSearchUID(){return this.activeInstantResultCache?.searchUid||super.getSearchUID()}};var ef=()=>je("analytics/instantResult/searchboxAsYouType",e=>e.makeSearchboxAsYouType(),e=>new ui(e)),tf=()=>({actionCause:"searchboxAsYouType"});d();c();l();u();var Ls={id:W},Kb={...Ls,q:we},GH=T("instantResults/register",e=>Q(e,Ls)),li=T("instantResults/updateQuery",e=>Q(e,Kb)),WH=T("instantResults/clearExpired",e=>Q(e,Ls));d();c();l();u();var di=new J({required:!0,min:0}),pi=T("pagination/registerNumberOfResults",e=>Q(e,di)),fi=T("pagination/updateNumberOfResults",e=>Q(e,di)),mi=T("pagination/registerPage",e=>Q(e,di)),Vr=T("pagination/updatePage",e=>Q(e,di)),gi=T("pagination/nextPage"),yi=T("pagination/previousPage");d();c();l();u();var Lr=T("query/updateQuery",e=>Q(e,{q:new H,enableQuerySyntax:new ne}));d();c();l();u();d();c();l();u();d();c();l();u();var Pt=()=>({cq:"",cqWasSet:!1,aq:"",aqWasSet:!1,lq:"",lqWasSet:!1,dq:"",dqWasSet:!1,defaultFilters:{cq:"",aq:"",lq:"",dq:""}});var Us=()=>je("search/logFetchMoreResults",e=>e.makeFetchMoreResults()),kt=e=>je("search/queryError",(t,r)=>t.makeQueryError({query:r.query?.q||Ne().q,aq:r.advancedSearchQueries?.aq||Pt().aq,cq:r.advancedSearchQueries?.cq||Pt().cq,dq:r.advancedSearchQueries?.dq||Pt().dq,errorType:e.type,errorMessage:e.message}));d();c();l();u();d();c();l();u();var Tz=T("didYouMean/enable"),Dz=T("didYouMean/disable"),qz=T("didYouMean/automaticCorrections/disable"),jz=T("didYouMean/automaticCorrections/enable"),hi=T("didYouMean/correction",e=>Q(e,W)),Mz=T("didYouMean/automaticCorrections/mode",e=>Q(e,new H({constrainTo:["next","legacy"],emptyAllowed:!1,required:!0})));d();c();l();u();var Qs=()=>je("analytics/didyoumean/automatic",e=>e.makeDidYouMeanAutomatic());var rf=()=>({actionCause:"didYouMeanAutomatic"});d();c();l();u();d();c();l();u();function nf(){return{freezeFacetOrder:!1,facets:{}}}d();c();l();u();function of(){return[]}d();c();l();u();function On(){return{firstResult:0,defaultNumberOfResults:10,numberOfResults:10,totalCountFiltered:0}}d();c();l();u();function af(){return{}}d();c();l();u();function sf(){return{}}d();c();l();u();function cf(){return{}}function et(e){return{context:e.context||ti(),dictionaryFieldContext:e.dictionaryFieldContext||ni(),facetSet:e.facetSet||qo(),numericFacetSet:e.numericFacetSet||Do(),dateFacetSet:e.dateFacetSet||To(),categoryFacetSet:e.categoryFacetSet||Oo(),automaticFacetSet:e.automaticFacetSet??Fo(),pagination:e.pagination||On(),query:e.query||Ne(),tabSet:e.tabSet||cf(),advancedSearchQueries:e.advancedSearchQueries||Pt(),staticFilterSet:e.staticFilterSet||sf(),querySet:e.querySet||af(),sortCriteria:e.sortCriteria||jo(),pipeline:e.pipeline||pr(),searchHub:e.searchHub||Cr(),facetOptions:e.facetOptions||nf(),facetOrder:e.facetOrder??of(),debug:e.debug??lo()}}d();c();l();u();var X2=new K({values:{undoneQuery:we},options:{required:!0}}),uf=()=>je("analytics/trigger/query",(e,t)=>t.triggers?.queryModification.newQuery?e.makeTriggerQuery():null);d();c();l();u();var Si=T("trigger/query/ignore",e=>Q(e,new H({emptyAllowed:!0,required:!0}))),vi=T("trigger/query/modification",e=>Q(e,new K({values:{originalQuery:Ce,modification:Ce}})));d();c();l();u();var Ft=/*#__PURE__*/function(){var _ref34=_asyncToGenerator(function*(e,t){let r=Xb(e),n=Yo(e),o=Yb(e),i=yield xt(e,t),a=()=>e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0;return Ct({...i,...(e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="next",options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="legacy"}),...(r&&{cq:r}),...(n.length&&{facets:n}),...(e.pagination&&{numberOfResults:a(),firstResult:e.pagination.firstResult}),...(e.facetOptions&&{facetOptions:{freezeFacetOrder:e.facetOptions.freezeFacetOrder}}),...(e.folding?.enabled&&{filterField:e.folding.fields.collection,childField:e.folding.fields.parent,parentField:e.folding.fields.child,filterFieldRange:e.folding.filterFieldRange}),...(e.automaticFacetSet&&{generateAutomaticFacets:{desiredCount:e.automaticFacetSet.desiredCount,numberOfValues:e.automaticFacetSet.numberOfValues,currentFacets:o}}),...(e.generatedAnswer&&{pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:e.generatedAnswer.fieldsToIncludeInCitations}}})})});return function Ft(_x73,_x74){return _ref34.apply(this,arguments)}}();function Yb(e){let t=e.automaticFacetSet?.set;return t?Object.values(t).map(r=>r.response).map(Jb).filter(r=>r.currentValues.length>0):void 0}function Jb(e){let{field:t,label:r,values:n}=e,o=n.filter(i=>i.state==="selected");return{field:t,label:r,currentValues:o}}function Xb(e){let t=e.advancedSearchQueries?.cq.trim()||"",n=Object.values(e.tabSet||{}).find(i=>i.isActive)?.expression.trim()||"",o=Zb(e);return[t,n,...o].filter(i=>!!i).join(" AND ")}function Zb(e){return Object.values(e.staticFilterSet||{}).map(r=>{let n=r.values.filter(i=>i.state==="selected"&&!!i.expression.trim()),o=n.map(i=>i.expression).join(" OR ");return n.length>1?`(${o})`:o})}var Ot=class{constructor(t,r=n=>{this.dispatch(Lr({q:n}))}){this.config=t;this.onUpdateQueryForCorrection=r}fetchFromAPI(_x75,_x76){var _this10=this;return _asyncToGenerator(function*({mappings:t,request:r},n){let o=Date.now(),i=Ko(yield _this10.extra.apiClient.search(r,n),t),a=Date.now()-o,m=_this10.getState().query?.q||"";return{response:i,duration:a,queryExecuted:m,requestExecuted:r}}).apply(this,arguments)}process(t){var _this11=this;return _asyncToGenerator(function*(){return _this11.processQueryErrorOrContinue(t)??(yield _this11.processQueryCorrectionsOrContinue(t))??(yield _this11.processQueryTriggersOrContinue(t))??_this11.processSuccessResponse(t)})()}processQueryErrorOrContinue(t){return Oe(t.response)?(this.dispatch(kt(t.response.error)),this.rejectWithValue(t.response.error)):null}processQueryCorrectionsOrContinue(t){var _this12=this;return _asyncToGenerator(function*(){let r=_this12.getState(),n=_this12.getSuccessResponse(t);if(!n||!r.didYouMean)return null;let{enableDidYouMean:o,automaticallyCorrectQuery:i}=r.didYouMean,{results:a,queryCorrections:m,queryCorrection:f}=n;if(!o||!i)return null;let p=a.length===0&&m&&m.length!==0,y=!X(f)&&!X(f.correctedQuery);if(!p&&!y)return null;let S=p?yield _this12.processLegacyDidYouMeanAutoCorrection(t):_this12.processModernDidYouMeanAutoCorrection(t);return _this12.dispatch(Xe(et(_this12.getState()))),S})()}processLegacyDidYouMeanAutoCorrection(t){var _this13=this;return _asyncToGenerator(function*(){let r=_this13.getCurrentQuery(),n=_this13.getSuccessResponse(t);if(!n.queryCorrections)return null;let{correctedQuery:o}=n.queryCorrections[0],i=yield _this13.automaticallyRetryQueryWithCorrection(o);return Oe(i.response)?(_this13.dispatch(kt(i.response.error)),_this13.rejectWithValue(i.response.error)):(_this13.logOriginalAnalyticsQueryBeforeAutoCorrection(t),_this13.dispatch(Xe(et(_this13.getState()))),{...i,response:{...i.response.success,queryCorrections:n.queryCorrections},automaticallyCorrected:!0,originalQuery:r,analyticsAction:Qs()})})()}processModernDidYouMeanAutoCorrection(t){let r=this.getSuccessResponse(t),{correctedQuery:n,originalQuery:o}=r.queryCorrection;return this.onUpdateQueryForCorrection(n),{...t,response:{...r},queryExecuted:n,automaticallyCorrected:!0,originalQuery:o,analyticsAction:Qs()}}logOriginalAnalyticsQueryBeforeAutoCorrection(t){let r=this.getState(),n=this.getSuccessResponse(t);this.analyticsAction?.()(this.dispatch,()=>this.getStateAfterResponse(t.queryExecuted,t.duration,r,n),this.extra)}processQueryTriggersOrContinue(t){var _this14=this;return _asyncToGenerator(function*(){let r=_this14.getSuccessResponse(t);if(!r)return null;let n=r.triggers.find(m=>m.type==="query")?.content||"";if(!n)return null;if(_this14.getState().triggers?.queryModification.queryToIgnore===n)return _this14.dispatch(Si("")),null;_this14.analyticsAction&&(yield _this14.dispatch(_this14.analyticsAction));let i=_this14.getCurrentQuery(),a=yield _this14.automaticallyRetryQueryWithTriggerModification(n);return Oe(a.response)?(_this14.dispatch(kt(a.response.error)),_this14.rejectWithValue(a.response.error)):(_this14.dispatch(Xe(et(_this14.getState()))),{...a,response:{...a.response.success},automaticallyCorrected:!1,originalQuery:i,analyticsAction:uf()})})()}getStateAfterResponse(t,r,n,o){return{...n,query:{q:t,enableQuerySyntax:n.query?.enableQuerySyntax??Ne().enableQuerySyntax},search:{...We(),duration:r,response:o,results:o.results}}}processSuccessResponse(t){return this.dispatch(Xe(et(this.getState()))),{...t,response:this.getSuccessResponse(t),automaticallyCorrected:!1,originalQuery:this.getCurrentQuery(),analyticsAction:this.analyticsAction}}getSuccessResponse(t){return $n(t.response)?t.response.success:null}automaticallyRetryQueryWithCorrection(t){var _this15=this;return _asyncToGenerator(function*(){_this15.onUpdateQueryForCorrection(t);let r=yield _this15.fetchFromAPI(yield Ft(_this15.getState()),{origin:"mainSearch"});return _this15.dispatch(hi(t)),r})()}automaticallyRetryQueryWithTriggerModification(t){var _this16=this;return _asyncToGenerator(function*(){return _this16.dispatch(vi({newQuery:t,originalQuery:_this16.getCurrentQuery()})),_this16.onUpdateQueryForCorrection(t),yield _this16.fetchFromAPI(yield Ft(_this16.getState()),{origin:"mainSearch"})})()}getCurrentQuery(){let t=this.getState();return t.query?.q!==void 0?t.query.q:""}get extra(){return this.config.extra}getState(){return this.config.getState()}get dispatch(){return this.config.dispatch}get analyticsAction(){return this.config.analyticsAction}get rejectWithValue(){return this.config.rejectWithValue}};var JG=le("search/executeSearch",/*#__PURE__*/function(){var _ref35=_asyncToGenerator(function*(e,t){let r=t.getState();return yield bi(r,t,e)});return function(_x77,_x78){return _ref35.apply(this,arguments)}}()),XG=le("search/fetchPage",/*#__PURE__*/function(){var _ref36=_asyncToGenerator(function*(e,t){let r=t.getState();return yield $s(r,t,e)});return function(_x79,_x80){return _ref36.apply(this,arguments)}}()),ZG=le("search/fetchMoreResults",/*#__PURE__*/function(){var _ref37=_asyncToGenerator(function*(e,t){let r=t.getState();return yield Hs(t,r)});return function(_x81,_x82){return _ref37.apply(this,arguments)}}()),eW=le("search/fetchFacetValues",/*#__PURE__*/function(){var _ref38=_asyncToGenerator(function*(e,t){let r=t.getState();return yield nA(t,e,r)});return function(_x83,_x84){return _ref38.apply(this,arguments)}}()),tW=le("search/fetchInstantResults",/*#__PURE__*/function(){var _ref39=_asyncToGenerator(function*(e,t){return Bs(e,t)});return function(_x85,_x86){return _ref39.apply(this,arguments)}}()),eA=/*#__PURE__*/function(){var _ref40=_asyncToGenerator(function*(e,t){let r=yield Ft(e,t);return r.request={...r.request,firstResult:(e.pagination?.firstResult??0)+(e.search?.results.length??0)},r});return function eA(_x87,_x88){return _ref40.apply(this,arguments)}}(),tA=/*#__PURE__*/function(){var _ref41=_asyncToGenerator(function*(e,t,r){let n=yield xt(e);return Ct({...n,...(e.didYouMean&&{enableDidYouMean:e.didYouMean.enableDidYouMean}),numberOfResults:r,q:t})});return function tA(_x89,_x90,_x91){return _ref41.apply(this,arguments)}}(),rA=/*#__PURE__*/function(){var _ref42=_asyncToGenerator(function*(e,t){let r=yield Ft(e,t);return r.request.numberOfResults=0,r});return function rA(_x92,_x93){return _ref42.apply(this,arguments)}}(),lf=e=>{e.configuration.analytics.enabled&&Le.getInstance().addElement({name:"Query",...(e.query?.q&&{value:e.query.q}),time:JSON.stringify(new Date)})};function Bs(_x94,_x95){return _Bs.apply(this,arguments)}function _Bs(){_Bs=_asyncToGenerator(function*(e,t){Q(e,{id:W,q:W,maxResultsPerQuery:new J({required:!0,min:1}),cacheTimeout:new J});let{q:r,maxResultsPerQuery:n}=e,o=t.getState(),i=new Ot({...t,analyticsAction:ef()},p=>{t.dispatch(li({q:p,id:e.id}))}),a=yield tA(o,r,n),m=yield i.fetchFromAPI(a,{origin:"instantResults",disableAbortWarning:!0}),f=yield i.process(m);return"response"in f?{results:f.response.results,searchUid:f.response.searchUid,analyticsAction:f.analyticsAction,totalCountFiltered:f.response.totalCountFiltered,duration:f.duration}:f});return _Bs.apply(this,arguments)}function $s(_x96,_x97,_x98){return _$s.apply(this,arguments)}function _$s(){_$s=_asyncToGenerator(function*(e,t,r){lf(e);let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=t.extra,{description:a}=yield r.prepare({getState:()=>t.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i}),m=new Ot({...t,analyticsAction:r}),f=yield Ft(e,a),p=yield m.fetchFromAPI(f,{origin:"mainSearch"});return yield m.process(p)});return _$s.apply(this,arguments)}function Hs(_x99,_x100){return _Hs.apply(this,arguments)}function _Hs(){_Hs=_asyncToGenerator(function*(e,t){let{analyticsClientMiddleware:r,preprocessRequest:n,logger:o}=e.extra,{description:i}=yield Us().prepare({getState:()=>e.getState(),analyticsClientMiddleware:r,preprocessRequest:n,logger:o}),a=new Ot({...e,analyticsAction:Us()}),m=yield eA(t,i),f=yield a.fetchFromAPI(m,{origin:"mainSearch"});return yield a.process(f)});return _Hs.apply(this,arguments)}function nA(_x101,_x102,_x103){return _nA.apply(this,arguments)}function _nA(){_nA=_asyncToGenerator(function*(e,t,r){let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=e.extra,{description:a}=yield t.prepare({getState:()=>e.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i}),m=new Ot({...e,analyticsAction:t}),f=yield rA(r,a),p=yield m.fetchFromAPI(f,{origin:"facetValues"});return yield m.process(p)});return _nA.apply(this,arguments)}function bi(_x104,_x105,_x106){return _bi.apply(this,arguments)}function _bi(){_bi=_asyncToGenerator(function*(e,t,r){lf(e);let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=t.extra,{description:a}=yield r.prepare({getState:()=>t.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i}),m=yield Ft(e,a),f=new Ot({...t,analyticsAction:r}),p=yield f.fetchFromAPI(m,{origin:"mainSearch"});return yield f.process(p)});return _bi.apply(this,arguments)}d();c();l();u();var Tt=class{constructor(t,r=n=>{this.dispatch(Lr({q:n}))}){this.config=t;this.onUpdateQueryForCorrection=r}fetchFromAPI(_x107,_x108){var _this17=this;return _asyncToGenerator(function*({mappings:t,request:r},n){let o=Date.now(),i=Ko(yield _this17.extra.apiClient.search(r,n),t),a=Date.now()-o,m=_this17.getState().query?.q||"";return{response:i,duration:a,queryExecuted:m,requestExecuted:r}}).apply(this,arguments)}process(t){var _this18=this;return _asyncToGenerator(function*(){return _this18.processQueryErrorOrContinue(t)??(yield _this18.processQueryCorrectionsOrContinue(t))??(yield _this18.processQueryTriggersOrContinue(t))??_this18.processSuccessResponse(t)})()}processQueryErrorOrContinue(t){return Oe(t.response)?(this.dispatch(kt(t.response.error)),this.rejectWithValue(t.response.error)):null}processQueryCorrectionsOrContinue(t){var _this19=this;return _asyncToGenerator(function*(){let r=_this19.getState(),n=_this19.getSuccessResponse(t);if(!n||!r.didYouMean)return null;let{enableDidYouMean:o,automaticallyCorrectQuery:i}=r.didYouMean,{results:a,queryCorrections:m,queryCorrection:f}=n;if(!o||!i)return null;let p=a.length===0&&m&&m.length!==0,y=!X(f)&&!X(f.correctedQuery);if(!p&&!y)return null;let S=p?yield _this19.processLegacyDidYouMeanAutoCorrection(t):_this19.processModernDidYouMeanAutoCorrection(t);return _this19.dispatch(Xe(et(_this19.getState()))),S})()}processLegacyDidYouMeanAutoCorrection(t){var _this20=this;return _asyncToGenerator(function*(){let r=_this20.getCurrentQuery(),n=_this20.getSuccessResponse(t);if(!n.queryCorrections)return null;let{correctedQuery:o}=n.queryCorrections[0],i=yield _this20.automaticallyRetryQueryWithCorrection(o);return Oe(i.response)?(_this20.dispatch(kt(i.response.error)),_this20.rejectWithValue(i.response.error)):(_this20.dispatch(Xe(et(_this20.getState()))),{...i,response:{...i.response.success,queryCorrections:n.queryCorrections},automaticallyCorrected:!0,originalQuery:r})})()}processModernDidYouMeanAutoCorrection(t){let r=this.getSuccessResponse(t),{correctedQuery:n,originalQuery:o}=r.queryCorrection;return this.onUpdateQueryForCorrection(n),{...t,response:{...r},queryExecuted:n,automaticallyCorrected:!0,originalQuery:o}}processQueryTriggersOrContinue(t){var _this21=this;return _asyncToGenerator(function*(){let r=_this21.getSuccessResponse(t);if(!r)return null;let n=r.triggers.find(m=>m.type==="query")?.content||"";if(!n)return null;if(_this21.getState().triggers?.queryModification.queryToIgnore===n)return _this21.dispatch(Si("")),null;let i=_this21.getCurrentQuery(),a=yield _this21.automaticallyRetryQueryWithTriggerModification(n);return Oe(a.response)?(_this21.dispatch(kt(a.response.error)),_this21.rejectWithValue(a.response.error)):(_this21.dispatch(Xe(et(_this21.getState()))),{...a,response:{...a.response.success},automaticallyCorrected:!1,originalQuery:i})})()}processSuccessResponse(t){return this.dispatch(Xe(et(this.getState()))),{...t,response:this.getSuccessResponse(t),automaticallyCorrected:!1,originalQuery:this.getCurrentQuery()}}getSuccessResponse(t){return $n(t.response)?t.response.success:null}automaticallyRetryQueryWithCorrection(t){var _this22=this;return _asyncToGenerator(function*(){_this22.onUpdateQueryForCorrection(t);let r=_this22.getState(),{actionCause:n}=rf(),o=yield _this22.fetchFromAPI(yield Rt(r,_this22.extra.navigatorContext,{actionCause:n}),{origin:"mainSearch"});return _this22.dispatch(hi(t)),o})()}automaticallyRetryQueryWithTriggerModification(t){var _this23=this;return _asyncToGenerator(function*(){return _this23.dispatch(vi({newQuery:t,originalQuery:_this23.getCurrentQuery()})),_this23.onUpdateQueryForCorrection(t),yield _this23.fetchFromAPI(yield Rt(_this23.getState(),_this23.extra.navigatorContext),{origin:"mainSearch"})})()}getCurrentQuery(){let t=this.getState();return t.query?.q!==void 0?t.query.q:""}get extra(){return this.config.extra}getState(){return this.config.getState()}get dispatch(){return this.config.dispatch}get rejectWithValue(){return this.config.rejectWithValue}};var LW=le("search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;Q(e,{q:new H,enableQuerySyntax:new ne,clearFilters:new ne}),e.clearFilters&&(r(ii()),r(kp())),r(Zp({allow:!0})),r(Lr({q:e.q,enableQuerySyntax:e.enableQuerySyntax})),r(Vr(1))}),UW=T("search/updateSearchAction"),df=le("search/executeSearch",/*#__PURE__*/function(){var _ref43=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return bi(r,t,e.legacy);pf(r);let n=e.next?ff(e.next):void 0,o=yield Rt(r,t.extra.navigatorContext,n),i=new Tt({...t,analyticsAction:n??{}}),a=yield i.fetchFromAPI(o,{origin:"mainSearch"});return yield i.process(a)});return function(_x109,_x110){return _ref43.apply(this,arguments)}}()),QW=le("search/fetchPage",/*#__PURE__*/function(){var _ref44=_asyncToGenerator(function*(e,t){let r=t.getState();if(pf(r),r.configuration.analytics.analyticsMode==="legacy"||!e.next)return $s(r,t,e.legacy);let n=new Tt({...t,analyticsAction:e.next}),o=yield Rt(r,t.extra.navigatorContext,e.next),i=yield n.fetchFromAPI(o,{origin:"mainSearch"});return yield n.process(i)});return function(_x111,_x112){return _ref44.apply(this,arguments)}}()),BW=le("search/fetchMoreResults",/*#__PURE__*/function(){var _ref45=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Hs(t,r);let n=wl("browseResults",t.getState),o=new Tt({...t,analyticsAction:n}),i=yield oA(r,t.extra.navigatorContext,n),a=yield o.fetchFromAPI(i,{origin:"mainSearch"});return yield o.process(a)});return function(_x113,_x114){return _ref45.apply(this,arguments)}}()),$W=le("search/fetchFacetValues",/*#__PURE__*/function(){var _ref46=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return bi(r,t,e.legacy);let n=new Tt({...t,analyticsAction:{}}),o=yield aA(r,t.extra.navigatorContext),i=yield n.fetchFromAPI(o,{origin:"facetValues"});return yield n.process(i)});return function(_x115,_x116){return _ref46.apply(this,arguments)}}()),HW=le("search/fetchInstantResults",/*#__PURE__*/function(){var _ref47=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Bs(e,t);Q(e,{id:W,q:W,maxResultsPerQuery:new J({required:!0,min:1}),cacheTimeout:new J});let{q:n,maxResultsPerQuery:o}=e,i=ff(tf()),a=yield iA(r,t.extra.navigatorContext,n,o,i),m=new Tt({...t,analyticsAction:i},y=>{t.dispatch(li({q:y,id:e.id}))}),f=yield m.fetchFromAPI(a,{origin:"instantResults",disableAbortWarning:!0}),p=yield m.process(f);return"response"in p?{results:p.response.results,searchUid:p.response.searchUid,totalCountFiltered:p.response.totalCountFiltered,duration:p.duration}:p});return function(_x117,_x118){return _ref47.apply(this,arguments)}}()),oA=/*#__PURE__*/function(){var _ref48=_asyncToGenerator(function*(e,t,r){let n=yield Rt(e,t,r);return n.request={...n.request,firstResult:(e.pagination?.firstResult??0)+(e.search?.results.length??0)},n});return function oA(_x119,_x120,_x121){return _ref48.apply(this,arguments)}}(),iA=/*#__PURE__*/function(){var _ref49=_asyncToGenerator(function*(e,t,r,n,o){let i=Or(e,t,o);return Ct({...i,...(e.didYouMean&&{enableDidYouMean:e.didYouMean.enableDidYouMean}),numberOfResults:n,q:r})});return function iA(_x122,_x123,_x124,_x125,_x126){return _ref49.apply(this,arguments)}}(),aA=/*#__PURE__*/function(){var _ref50=_asyncToGenerator(function*(e,t,r){let n=yield Rt(e,t,r);return n.request.numberOfResults=0,n});return function aA(_x127,_x128,_x129){return _ref50.apply(this,arguments)}}(),pf=e=>{e.configuration.analytics.enabled&&Le.getInstance().addElement({name:"Query",...(e.query?.q&&{value:e.query.q}),time:JSON.stringify(new Date)})},ff=e=>({actionCause:e.actionCause,type:e.actionCause});var mf=ge(On(),e=>{e.addCase(pi,(t,r)=>{let n=zs(t),o=r.payload;t.defaultNumberOfResults=t.numberOfResults=o,t.firstResult=Tn(n,o)}).addCase(fi,(t,r)=>{t.numberOfResults=r.payload,t.firstResult=0}).addCase(Jo,t=>{t.firstResult=0}).addCase(mi,(t,r)=>{let n=r.payload;t.firstResult=Tn(n,t.numberOfResults)}).addCase(Vr,(t,r)=>{let n=r.payload;t.firstResult=Tn(n,t.numberOfResults)}).addCase(yi,t=>{let r=zs(t),n=Math.max(r-1,1);t.firstResult=Tn(n,t.numberOfResults)}).addCase(gi,t=>{let r=zs(t),n=cA(t),o=Math.min(r+1,n);t.firstResult=Tn(o,t.numberOfResults)}).addCase(qe.fulfilled,(t,r)=>{r.payload&&(t.numberOfResults=r.payload.pagination.numberOfResults,t.firstResult=r.payload.pagination.firstResult)}).addCase(ht,(t,r)=>{t.firstResult=r.payload.firstResult??t.firstResult,t.numberOfResults=r.payload.numberOfResults??t.defaultNumberOfResults}).addCase(df.fulfilled,(t,r)=>{let{response:n}=r.payload;t.totalCountFiltered=n.totalCountFiltered}).addCase(ai,t=>{Ie(t)}).addCase(Gp,t=>{Ie(t)}).addCase(Lp,t=>{Ie(t)}).addCase(Jp,t=>{Ie(t)}).addCase(Mp,t=>{Ie(t)}).addCase(Vp,t=>{Ie(t)}).addCase(Tp,t=>{Ie(t)}).addCase(Op,t=>{Ie(t)}).addCase(Dp,t=>{Ie(t)}).addCase(zp,t=>{Ie(t)}).addCase(Yp,t=>{Ie(t)}).addCase(ii,t=>{Ie(t)}).addCase(Wp,t=>{Ie(t)}).addCase(Xp,t=>{Ie(t)}).addCase(jp,t=>{Ie(t)}).addCase(Fp,t=>{Ie(t)})});function Ie(e){e.firstResult=On().firstResult}function zs(e){let{firstResult:t,numberOfResults:r}=e;return uA(t,r)}function cA(e){let{totalCountFiltered:t,numberOfResults:r}=e;return lA(t,r)}function Tn(e,t){return(e-1)*t}function uA(e,t){return Math.round(e/t)+1}function lA(e,t){let r=Math.min(e,5e3);return Math.ceil(r/t)}function Gs(e){return e.addReducers({pagination:mf}),{nextPage:gi,previousPage:yi,registerNumberOfResults:pi,registerPage:mi,updateNumberOfResults:fi,updatePage:Vr}}var dA=new Fe({id:new H({emptyAllowed:!0,required:!1,default:""}),numberOfRecommendations:new J({min:0})});function gf(e,t={}){if(!pA(e))throw Ge;let r=It(e),{dispatch:n}=e,o=()=>e.state,i=bu(e,dA,t.options,"buildRecommendationList");return i.id!==""&&n(xr({id:i.id})),i.numberOfRecommendations&&n(Gs(e).updateNumberOfResults(i.numberOfRecommendations)),{...r,refresh(){n(bt())},get state(){let a=o();return{recommendations:a.recommendation.recommendations,error:a.recommendation.error,isLoading:a.recommendation.isLoading,searchResponseId:a.recommendation.searchUid}}}}function pA(e){return e.addReducers({recommendation:Rr,configuration:ze}),!0}d();c();l();u();d();c();l();u();function yf(e,t,r){if(!fA(e))throw Ge;let n=1e3,o={selectionDelay:n,debounceWait:n,...t.options},i;return{select:Nn(r,o.debounceWait,{isImmediate:!0}),beginDelayedSelect(){i=setTimeout(r,o.selectionDelay)},cancelPendingSelect(){i&&clearTimeout(i)}}}function fA(e){return e.addReducers({configuration:ze}),!0}function hf(e,t){let r=!1,n=()=>{r||(r=!0,e.dispatch(Vo(t.options.result)))};return yf(e,t,()=>{n()})}d();c();l();u();d();c();l();u();d();c();l();u();var Dt=()=>new H({required:!1,emptyAllowed:!0}),Ai=T("advancedSearchQueries/update",e=>Q(e,{aq:Dt(),cq:Dt(),lq:Dt(),dq:Dt()})),Ci=T("advancedSearchQueries/register",e=>Q(e,{aq:Dt(),cq:Dt(),lq:Dt(),dq:Dt()}));var Sf=ge(Pt(),e=>{e.addCase(Ai,(t,r)=>{let{aq:n,cq:o,lq:i,dq:a}=r.payload;ve(n)||(t.aq=n,t.aqWasSet=!0),ve(o)||(t.cq=o,t.cqWasSet=!0),ve(i)||(t.lq=i,t.lqWasSet=!0),ve(a)||(t.dq=a,t.dqWasSet=!0)}).addCase(Ci,(t,r)=>{let{aq:n,cq:o,lq:i,dq:a}=r.payload;ve(n)||(t.defaultFilters.aq=n,t.aqWasSet||(t.aq=n)),ve(o)||(t.defaultFilters.cq=o,t.cqWasSet||(t.cq=o)),ve(i)||(t.defaultFilters.lq=i,t.lqWasSet||(t.lq=i)),ve(a)||(t.defaultFilters.dq=a,t.dqWasSet||(t.dq=a))}).addCase(qe.fulfilled,(t,r)=>r.payload?.advancedSearchQueries??t).addCase(ht,(t,r)=>{let{aq:n,cq:o}=r.payload;ve(n)||(t.aq=n,t.aqWasSet=!0),ve(o)||(t.cq=o,t.cqWasSet=!0)})});function mA(e){return e.addReducers({advancedSearchQueries:Sf}),{updateAdvancedSearchQueries:Ai,registerAdvancedSearchQueries:Ci}}d();c();l();u();function gA(e){return e.addReducers({configuration:ze}),{disableAnalytics:ur,enableAnalytics:lr,setOriginLevel2:ao,setOriginLevel3:so,updateAnalyticsConfiguration:cr,updateBasicConfiguration:yt}}d();c();l();u();function yA(e){return e.addReducers({configuration:ze,pipeline:fr,searchHub:Ir}),{updateSearchConfiguration:Je}}d();c();l();u();function hA(e){return e.addReducers({context:ri}),{addContext:Gt,removeContext:Wt,setContext:zt}}d();c();l();u();function SA(e){return e.addReducers({debug:po}),{disableDebug:uo,enableDebug:co}}d();c();l();u();function vA(e){return e.addReducers({dictionaryFieldContext:oi}),{addContext:Mr,removeContext:Nr,setContext:jr}}d();c();l();u();d();c();l();u();d();c();l();u();var bA={collectionField:new H({emptyAllowed:!1,required:!1}),parentField:new H({emptyAllowed:!1,required:!1}),childField:new H({emptyAllowed:!1,required:!1}),numberOfFoldedResults:new J({min:0,required:!1})},vf=T("folding/register",e=>Q(e,bA)),mY=le("folding/loadCollection",/*#__PURE__*/function(){var _ref51=_asyncToGenerator(function*(e,{getState:t,rejectWithValue:r,extra:{apiClient:n,navigatorContext:o}}){let i=t(),a=i.configuration.analytics.analyticsMode==="legacy"?yield xt(i):Or(i,o),m=yield n.search({...a,q:AA(i),enableQuerySyntax:!0,cq:`@${i.folding.fields.collection}="${e}"`,filterField:i.folding.fields.collection,childField:i.folding.fields.parent,parentField:i.folding.fields.child,filterFieldRange:100},{origin:"foldingCollection"});return Oe(m)?r(m.error):{collectionId:e,results:m.success.results,searchUid:m.success.searchUid,rootResult:i.folding.collections[e].result}});return function(_x130,_x131){return _ref51.apply(this,arguments)}}());function AA(e){return e.query.q===""?"":e.query.enableQuerySyntax?`${e.query.q} OR @uri`:`( <@- ${e.query.q} -@> ) OR @uri`}d();c();l();u();var bf=()=>({enabled:!1,fields:{collection:"foldingcollection",parent:"foldingparent",child:"foldingchild"},filterFieldRange:2,collections:{}});d();c();l();u();var Ur=T("fields/registerFieldsToInclude",e=>Q(e,io)),wi=T("fields/fetchall/enable"),xi=T("fields/fetchall/disable"),Ri=le("fields/fetchDescription",/*#__PURE__*/function(){var _ref52=_asyncToGenerator(function*(e,{extra:t,getState:r,rejectWithValue:n}){let o=r(),{accessToken:i,environment:a,organizationId:m}=o.configuration,{apiBaseUrl:f}=o.configuration.search,p=yield t.apiClient.fieldDescriptions({accessToken:i,organizationId:m,url:f??pt(m,a)});return Oe(p)?n(p.error):p.success.fields});return function(_x132,_x133){return _ref52.apply(this,arguments)}}());d();c();l();u();var Ei=["author","language","urihash","objecttype","collection","source","permanentid"],Ws=[...Ei,"date","filetype","parents"],Af=[...Ws,"ec_price","ec_name","ec_description","ec_brand","ec_category","ec_item_group_id","ec_shortdesc","ec_thumbnails","ec_images","ec_promo_price","ec_in_stock","ec_rating"],Cf=()=>({fieldsToInclude:Ei,fetchAllFields:!1,fieldsDescription:[]});var Ii=ge(Cf(),e=>e.addCase(Ur,(t,r)=>{t.fieldsToInclude=[...new Set(t.fieldsToInclude.concat(r.payload))]}).addCase(wi,t=>{t.fetchAllFields=!0}).addCase(xi,t=>{t.fetchAllFields=!1}).addCase(Ri.fulfilled,(t,{payload:r})=>{t.fieldsDescription=r}).addCase(vf,(t,{payload:r})=>{let n=bf().fields;t.fieldsToInclude.push(r.collectionField??n.collection,r.parentField??n.parent,r.childField??n.child)}));function CA(e){return e.addReducers({fields:Ii}),{registerFieldsToInclude:Ur,enableFetchAllFields:wi,disableFetchAllFields:xi,fetchFieldsDescription:Ri}}d();c();l();u();function wA(e){return e.addReducers({pipeline:fr}),{setPipeline:dr}}d();c();l();u();function xA(e){return e.addReducers({recommendation:Rr}),{getRecommendations:bt,setRecommendationId:xr}}d();c();l();u();function RA(e){return e.addReducers({}),{logRecommendationOpen:Vo}}d();c();l();u();d();c();l();u();var EA=new Fe({content:new fe({required:!0}),conditions:new fe({required:!0}),priority:new J({required:!1,default:0,min:0}),fields:new ie({required:!1,each:W})});function wf(){let e=[],t=r=>{let n=EA.validate(r);if(!r.conditions.every(i=>i instanceof Function))throw new Wr("Each template condition should be a function that takes a Result or Product as an argument and returns a boolean");return n};return{registerTemplates(...r){r.forEach(n=>{let o={...t(n),fields:n.fields||[]};e.push(o)}),e.sort((n,o)=>o.priority-n.priority)},selectTemplate(r){let n=e.find(o=>o.conditions.every(i=>i(r)));return n?n.content:null},selectLinkTemplate(r){let n=e.find(o=>o.conditions.every(i=>i(r)));return n?n.linkContent:null}}}function xf(e){if(!IA(e))throw Ge;let{registerTemplates:t,selectTemplate:r,selectLinkTemplate:n}=wf();return{registerTemplates:(...o)=>{t(...o);let i=[];o.forEach(a=>{a.fields&&i.push(...a.fields)}),e.dispatch(Ur(i))},selectTemplate:r,selectLinkTemplate:n}}function IA(e){return e.addReducers({fields:Ii}),!0}d();c();l();u();function PA(e){return e.addReducers({searchHub:Ir}),{setSearchHub:Er}}/**
30
+ `;function fh(){return typeof navigator<"u"&&navigator.product=="ReactNative"}var mh=["1",1,"yes",!0];function xo(){let e=[];return ba()&&e.push(window.doNotTrack),Da()&&e.push(navigator.doNotTrack,navigator.msDoNotTrack,navigator.globalPrivacyControl),e.some(t=>mh.indexOf(t)!==-1)}var Yu="v15",Ju={default:"https://analytics.cloud.coveo.com/rest/ua",production:"https://analytics.cloud.coveo.com/rest/ua",hipaa:"https://analyticshipaa.cloud.coveo.com/rest/ua"};function gh(e=Ju.default,t=Yu,r=!1){if(e=e.replace(/\/$/,""),r)return`${e}/${t}`;let n=e.endsWith("/rest")||e.endsWith("/rest/ua");return`${e}${n?"":"/rest"}/${t}`}var yh="38824e1f-37f5-42d3-8372-a4b8fa9df946",Ze=class{get defaultOptions(){return{endpoint:Ju.default,isCustomEndpoint:!1,token:"",version:Yu,beforeSendHooks:[],afterSendHooks:[]}}get version(){return zu}constructor(t){if(this.acceptedLinkReferrers=[],!t)throw new Error("You have to pass options to this constructor");this.options=Object.assign(Object.assign({},this.defaultOptions),t),this.visitorId="",this.bufferedRequests=[],this.beforeSendHooks=[oy,Zg].concat(this.options.beforeSendHooks),this.afterSendHooks=this.options.afterSendHooks,this.eventTypeMapping={};let r={baseUrl:this.baseUrl,token:this.options.token,visitorIdProvider:this,preprocessRequest:this.options.preprocessRequest};xo()?this.runtime=new wo:this.runtime=this.options.runtimeEnvironment||this.initRuntime(r),this.addEventTypeMapping(ae.view,{newEventType:ae.view,addClientIdParameter:!0}),this.addEventTypeMapping(ae.click,{newEventType:ae.click,addClientIdParameter:!0}),this.addEventTypeMapping(ae.custom,{newEventType:ae.custom,addClientIdParameter:!0}),this.addEventTypeMapping(ae.search,{newEventType:ae.search,addClientIdParameter:!0})}initRuntime(t){return ba()&&hr()?new Oa(t,()=>{let r=[...this.bufferedRequests];return this.bufferedRequests=[],r}):(fh()&&console.warn(ph),new Ta(t))}get storage(){return this.runtime.storage}determineVisitorId(){return q(this,void 0,void 0,function*(){try{return ba()&&this.extractClientIdFromLink(window.location.href)||(yield this.storage.getItem("visitorId"))||Bt()}catch(t){return console.log("Could not get visitor ID from the current runtime environment storage. Using a random ID instead.",t),Bt()}})}getCurrentVisitorId(){return q(this,void 0,void 0,function*(){if(!this.visitorId){let t=yield this.determineVisitorId();yield this.setCurrentVisitorId(t)}return this.visitorId})}setCurrentVisitorId(t){return q(this,void 0,void 0,function*(){this.visitorId=t,yield this.storage.setItem("visitorId",t)})}setClientId(t,r){return q(this,void 0,void 0,function*(){if(vo(t))this.setCurrentVisitorId(t.toLowerCase());else{if(!r)throw Error("Cannot generate uuid client id without a specific namespace string.");this.setCurrentVisitorId(Du(t,Du(r,yh)))}})}getParameters(t,...r){return q(this,void 0,void 0,function*(){return yield this.resolveParameters(t,...r)})}getPayload(t,...r){return q(this,void 0,void 0,function*(){let n=yield this.resolveParameters(t,...r);return yield this.resolvePayloadForParameters(t,n)})}get currentVisitorId(){return typeof(this.visitorId||this.storage.getItem("visitorId"))!="string"&&this.setCurrentVisitorId(Bt()),this.visitorId}set currentVisitorId(t){this.visitorId=t,this.storage.setItem("visitorId",t)}extractClientIdFromLink(t){if(xo())return null;try{let r=new URL(t).searchParams.get(St.cvo_cid);if(r==null)return null;let n=St.fromString(r);return!n||!hr()||!n.validate(document.referrer,this.acceptedLinkReferrers)?null:n.clientId}catch{}return null}resolveParameters(t,...r){return q(this,void 0,void 0,function*(){let{variableLengthArgumentsNames:n=[],addVisitorIdParameter:o=!1,usesMeasurementProtocol:i=!1,addClientIdParameter:a=!1}=this.eventTypeMapping[t]||{};return yield[g=>n.length>0?this.parseVariableArgumentsPayload(n,g):g[0],g=>q(this,void 0,void 0,function*(){return Object.assign(Object.assign({},g),{visitorId:o?yield this.getCurrentVisitorId():""})}),g=>q(this,void 0,void 0,function*(){return a?Object.assign(Object.assign({},g),{clientId:yield this.getCurrentVisitorId()}):g}),g=>i?this.ensureAnonymousUserWhenUsingApiKey(g):g,g=>this.beforeSendHooks.reduce((v,R)=>q(this,void 0,void 0,function*(){let P=yield v;return yield R(t,P)}),g)].reduce((g,v)=>q(this,void 0,void 0,function*(){let R=yield g;return yield v(R)}),Promise.resolve(r))})}resolvePayloadForParameters(t,r){return q(this,void 0,void 0,function*(){let{usesMeasurementProtocol:n=!1}=this.eventTypeMapping[t]||{};return yield[h=>this.setTrackingIdIfTrackingIdNotPresent(h),h=>this.removeEmptyPayloadValues(h,t),h=>this.validateParams(h,t),h=>n?rh(h):h,h=>n?this.removeUnknownParameters(h):h,h=>n?this.processCustomParameters(h):this.mapCustomParametersToCustomData(h)].reduce((h,S)=>q(this,void 0,void 0,function*(){let g=yield h;return yield S(g)}),Promise.resolve(r))})}makeEvent(t,...r){return q(this,void 0,void 0,function*(){let{newEventType:n=t}=this.eventTypeMapping[t]||{},o=yield this.resolveParameters(t,...r),i=yield this.resolvePayloadForParameters(t,o);return{eventType:n,payload:i,log:a=>q(this,void 0,void 0,function*(){return this.bufferedRequests.push({eventType:n,payload:Object.assign(Object.assign({},i),a)}),yield Promise.all(this.afterSendHooks.map(m=>m(t,Object.assign(Object.assign({},o),a)))),yield this.deferExecution(),yield this.sendFromBuffer()})}})}sendEvent(t,...r){return q(this,void 0,void 0,function*(){return(yield this.makeEvent(t,...r)).log({})})}deferExecution(){return new Promise(t=>setTimeout(t,0))}sendFromBuffer(){return q(this,void 0,void 0,function*(){let t=this.bufferedRequests.shift();if(t){let{eventType:r,payload:n}=t;return this.runtime.getClientDependingOnEventType(r).sendEvent(r,n)}})}clear(){this.storage.removeItem("visitorId"),new So().clear()}deleteHttpOnlyVisitorId(){this.runtime.client.deleteHttpCookieVisitorId()}makeSearchEvent(t){return q(this,void 0,void 0,function*(){return this.makeEvent(ae.search,t)})}sendSearchEvent(t){var{searchQueryUid:r}=t,n=at(t,["searchQueryUid"]);return q(this,void 0,void 0,function*(){return(yield this.makeSearchEvent(n)).log({searchQueryUid:r})})}makeClickEvent(t){return q(this,void 0,void 0,function*(){return this.makeEvent(ae.click,t)})}sendClickEvent(t){var{searchQueryUid:r}=t,n=at(t,["searchQueryUid"]);return q(this,void 0,void 0,function*(){return(yield this.makeClickEvent(n)).log({searchQueryUid:r})})}makeCustomEvent(t){return q(this,void 0,void 0,function*(){return this.makeEvent(ae.custom,t)})}sendCustomEvent(t){var{lastSearchQueryUid:r}=t,n=at(t,["lastSearchQueryUid"]);return q(this,void 0,void 0,function*(){return(yield this.makeCustomEvent(n)).log({lastSearchQueryUid:r})})}makeViewEvent(t){return q(this,void 0,void 0,function*(){return this.makeEvent(ae.view,t)})}sendViewEvent(t){return q(this,void 0,void 0,function*(){return(yield this.makeViewEvent(t)).log({})})}getVisit(){return q(this,void 0,void 0,function*(){let r=yield(yield A(`${this.baseUrl}/analytics/visit`)).json();return this.visitorId=r.visitorId,r})}getHealth(){return q(this,void 0,void 0,function*(){return yield(yield A(`${this.baseUrl}/analytics/monitoring/health`)).json()})}registerBeforeSendEventHook(t){this.beforeSendHooks.push(t)}registerAfterSendEventHook(t){this.afterSendHooks.push(t)}addEventTypeMapping(t,r){this.eventTypeMapping[t]=r}setAcceptedLinkReferrers(t){if(Array.isArray(t)&&t.every(r=>typeof r=="string"))this.acceptedLinkReferrers=t;else throw Error("Parameter should be an array of domain strings")}parseVariableArgumentsPayload(t,r){let n={};for(let o=0,i=r.length;o<i;o++){let a=r[o];if(typeof a=="string")n[t[o]]=a;else if(typeof a=="object")return Object.assign(Object.assign({},n),a)}return n}isKeyAllowedEmpty(t,r){return({[ae.search]:["queryText"]}[t]||[]).indexOf(r)!==-1}removeEmptyPayloadValues(t,r){let n=o=>typeof o<"u"&&o!==null&&o!=="";return Object.keys(t).filter(o=>this.isKeyAllowedEmpty(r,o)||n(t[o])).reduce((o,i)=>Object.assign(Object.assign({},o),{[i]:t[i]}),{})}removeUnknownParameters(t){return Object.keys(t).filter(n=>{if(ah(n))return!0;console.log(n,"is not processed by coveoua")}).reduce((n,o)=>Object.assign(Object.assign({},n),{[o]:t[o]}),{})}processCustomParameters(t){let{custom:r}=t,n=at(t,["custom"]),o={};r&&ho(r)&&(o=this.lowercaseKeys(r));let i=sh(n);return Object.assign(Object.assign({},o),i)}mapCustomParametersToCustomData(t){let{custom:r}=t,n=at(t,["custom"]);if(r&&ho(r)){let o=this.lowercaseKeys(r);return Object.assign(Object.assign({},n),{customData:Object.assign(Object.assign({},o),t.customData)})}else return t}lowercaseKeys(t){let r=Object.keys(t),n={};return r.forEach(o=>{n[o.toLowerCase()]=t[o]}),n}validateParams(t,r){let{anonymizeIp:n}=t,o=at(t,["anonymizeIp"]);return n!==void 0&&["0","false","undefined","null","{}","[]",""].indexOf(`${n}`.toLowerCase())==-1&&(o.anonymizeIp=1),(r==ae.view||r==ae.click||r==ae.search||r==ae.custom)&&(o.originLevel3=this.limit(o.originLevel3,1024)),r==ae.view&&(o.location=this.limit(o.location,1024)),(r=="pageview"||r=="event")&&(o.referrer=this.limit(o.referrer,2048),o.location=this.limit(o.location,2048),o.page=this.limit(o.page,2048)),o}ensureAnonymousUserWhenUsingApiKey(t){let{userId:r}=t,n=at(t,["userId"]);return dh(this.options.token)&&!r?(n.userId="anonymous",n):t}setTrackingIdIfTrackingIdNotPresent(t){let{trackingId:r}=t,n=at(t,["trackingId"]);return r?t:(n.hasOwnProperty("custom")&&ho(n.custom)&&(n.custom.hasOwnProperty("context_website")||n.custom.hasOwnProperty("siteName"))&&(n.trackingId=n.custom.context_website||n.custom.siteName),n.hasOwnProperty("customData")&&ho(n.customData)&&(n.customData.hasOwnProperty("context_website")||n.customData.hasOwnProperty("siteName"))&&(n.trackingId=n.customData.context_website||n.customData.siteName),n)}limit(t,r){return typeof t=="string"?vy(t,r):t}get baseUrl(){return gh(this.options.endpoint,this.options.version,this.options.isCustomEndpoint)}},st;(function(e){e.contextChanged="contextChanged",e.expandToFullUI="expandToFullUI",e.openUserActions="openUserActions",e.showPrecedingSessions="showPrecedingSessions",e.showFollowingSessions="showFollowingSessions",e.clickViewedDocument="clickViewedDocument",e.clickPageView="clickPageView",e.createArticle="createArticle"})(st||(st={}));var j;(function(e){e.interfaceLoad="interfaceLoad",e.interfaceChange="interfaceChange",e.didyoumeanAutomatic="didyoumeanAutomatic",e.didyoumeanClick="didyoumeanClick",e.resultsSort="resultsSort",e.searchboxSubmit="searchboxSubmit",e.searchboxClear="searchboxClear",e.searchboxAsYouType="searchboxAsYouType",e.breadcrumbFacet="breadcrumbFacet",e.breadcrumbResetAll="breadcrumbResetAll",e.documentQuickview="documentQuickview",e.documentOpen="documentOpen",e.omniboxAnalytics="omniboxAnalytics",e.omniboxFromLink="omniboxFromLink",e.searchFromLink="searchFromLink",e.triggerNotify="notify",e.triggerExecute="execute",e.triggerQuery="query",e.undoTriggerQuery="undoQuery",e.triggerRedirect="redirect",e.pagerResize="pagerResize",e.pagerNumber="pagerNumber",e.pagerNext="pagerNext",e.pagerPrevious="pagerPrevious",e.pagerScrolling="pagerScrolling",e.staticFilterClearAll="staticFilterClearAll",e.staticFilterSelect="staticFilterSelect",e.staticFilterDeselect="staticFilterDeselect",e.facetClearAll="facetClearAll",e.facetSearch="facetSearch",e.facetSelect="facetSelect",e.facetSelectAll="facetSelectAll",e.facetDeselect="facetDeselect",e.facetExclude="facetExclude",e.facetUnexclude="facetUnexclude",e.facetUpdateSort="facetUpdateSort",e.facetShowMore="showMoreFacetResults",e.facetShowLess="showLessFacetResults",e.queryError="query",e.queryErrorBack="errorBack",e.queryErrorClear="errorClearQuery",e.queryErrorRetry="errorRetry",e.recommendation="recommendation",e.recommendationInterfaceLoad="recommendationInterfaceLoad",e.recommendationOpen="recommendationOpen",e.likeSmartSnippet="likeSmartSnippet",e.dislikeSmartSnippet="dislikeSmartSnippet",e.expandSmartSnippet="expandSmartSnippet",e.collapseSmartSnippet="collapseSmartSnippet",e.openSmartSnippetFeedbackModal="openSmartSnippetFeedbackModal",e.closeSmartSnippetFeedbackModal="closeSmartSnippetFeedbackModal",e.sendSmartSnippetReason="sendSmartSnippetReason",e.expandSmartSnippetSuggestion="expandSmartSnippetSuggestion",e.collapseSmartSnippetSuggestion="collapseSmartSnippetSuggestion",e.showMoreSmartSnippetSuggestion="showMoreSmartSnippetSuggestion",e.showLessSmartSnippetSuggestion="showLessSmartSnippetSuggestion",e.openSmartSnippetSource="openSmartSnippetSource",e.openSmartSnippetSuggestionSource="openSmartSnippetSuggestionSource",e.openSmartSnippetInlineLink="openSmartSnippetInlineLink",e.openSmartSnippetSuggestionInlineLink="openSmartSnippetSuggestionInlineLink",e.recentQueryClick="recentQueriesClick",e.clearRecentQueries="clearRecentQueries",e.recentResultClick="recentResultClick",e.clearRecentResults="clearRecentResults",e.noResultsBack="noResultsBack",e.showMoreFoldedResults="showMoreFoldedResults",e.showLessFoldedResults="showLessFoldedResults",e.copyToClipboard="copyToClipboard",e.caseSendEmail="Case.SendEmail",e.feedItemTextPost="FeedItem.TextPost",e.caseAttach="caseAttach",e.caseDetach="caseDetach",e.retryGeneratedAnswer="retryGeneratedAnswer",e.likeGeneratedAnswer="likeGeneratedAnswer",e.dislikeGeneratedAnswer="dislikeGeneratedAnswer",e.openGeneratedAnswerSource="openGeneratedAnswerSource",e.generatedAnswerStreamEnd="generatedAnswerStreamEnd",e.generatedAnswerSourceHover="generatedAnswerSourceHover",e.generatedAnswerCopyToClipboard="generatedAnswerCopyToClipboard",e.generatedAnswerHideAnswers="generatedAnswerHideAnswers",e.generatedAnswerShowAnswers="generatedAnswerShowAnswers",e.generatedAnswerExpand="generatedAnswerExpand",e.generatedAnswerCollapse="generatedAnswerCollapse",e.generatedAnswerFeedbackSubmit="generatedAnswerFeedbackSubmit",e.rephraseGeneratedAnswer="rephraseGeneratedAnswer",e.generatedAnswerFeedbackSubmitV2="generatedAnswerFeedbackSubmitV2",e.generatedAnswerCitationClick="generatedAnswerCitationClick"})(j||(j={}));var Lu={[j.triggerNotify]:"queryPipelineTriggers",[j.triggerExecute]:"queryPipelineTriggers",[j.triggerQuery]:"queryPipelineTriggers",[j.triggerRedirect]:"queryPipelineTriggers",[j.queryError]:"errors",[j.queryErrorBack]:"errors",[j.queryErrorClear]:"errors",[j.queryErrorRetry]:"errors",[j.pagerNext]:"getMoreResults",[j.pagerPrevious]:"getMoreResults",[j.pagerNumber]:"getMoreResults",[j.pagerResize]:"getMoreResults",[j.pagerScrolling]:"getMoreResults",[j.facetSearch]:"facet",[j.facetShowLess]:"facet",[j.facetShowMore]:"facet",[j.recommendation]:"recommendation",[j.likeSmartSnippet]:"smartSnippet",[j.dislikeSmartSnippet]:"smartSnippet",[j.expandSmartSnippet]:"smartSnippet",[j.collapseSmartSnippet]:"smartSnippet",[j.openSmartSnippetFeedbackModal]:"smartSnippet",[j.closeSmartSnippetFeedbackModal]:"smartSnippet",[j.sendSmartSnippetReason]:"smartSnippet",[j.expandSmartSnippetSuggestion]:"smartSnippetSuggestions",[j.collapseSmartSnippetSuggestion]:"smartSnippetSuggestions",[j.showMoreSmartSnippetSuggestion]:"smartSnippetSuggestions",[j.showLessSmartSnippetSuggestion]:"smartSnippetSuggestions",[j.clearRecentQueries]:"recentQueries",[j.recentResultClick]:"recentlyClickedDocuments",[j.clearRecentResults]:"recentlyClickedDocuments",[j.showLessFoldedResults]:"folding",[j.caseDetach]:"case",[j.likeGeneratedAnswer]:"generatedAnswer",[j.dislikeGeneratedAnswer]:"generatedAnswer",[j.openGeneratedAnswerSource]:"generatedAnswer",[j.generatedAnswerStreamEnd]:"generatedAnswer",[j.generatedAnswerSourceHover]:"generatedAnswer",[j.generatedAnswerCopyToClipboard]:"generatedAnswer",[j.generatedAnswerHideAnswers]:"generatedAnswer",[j.generatedAnswerShowAnswers]:"generatedAnswer",[j.generatedAnswerExpand]:"generatedAnswer",[j.generatedAnswerCollapse]:"generatedAnswer",[j.generatedAnswerFeedbackSubmit]:"generatedAnswer",[j.generatedAnswerFeedbackSubmitV2]:"generatedAnswer",[st.expandToFullUI]:"interface",[st.openUserActions]:"User Actions",[st.showPrecedingSessions]:"User Actions",[st.showFollowingSessions]:"User Actions",[st.clickViewedDocument]:"User Actions",[st.clickPageView]:"User Actions",[st.createArticle]:"createArticle"},br=class{constructor(){this.runtime=new wo,this.currentVisitorId=""}getPayload(){return Promise.resolve()}getParameters(){return Promise.resolve()}makeEvent(t){return Promise.resolve({eventType:t,payload:null,log:()=>Promise.resolve()})}sendEvent(){return Promise.resolve()}makeSearchEvent(){return this.makeEvent(ae.search)}sendSearchEvent(){return Promise.resolve()}makeClickEvent(){return this.makeEvent(ae.click)}sendClickEvent(){return Promise.resolve()}makeCustomEvent(){return this.makeEvent(ae.custom)}sendCustomEvent(){return Promise.resolve()}makeViewEvent(){return this.makeEvent(ae.view)}sendViewEvent(){return Promise.resolve()}getVisit(){return Promise.resolve({id:"",visitorId:""})}getHealth(){return Promise.resolve({status:""})}registerBeforeSendEventHook(){}registerAfterSendEventHook(){}addEventTypeMapping(){}get version(){return zu}};function hh(e){let t="";return e.filter(r=>{let n=r!==t;return t=r,n})}function Sh(e){return e.map(t=>t.replace(/;/g,""))}function Xu(e){let r=e.join(";");return r.length<=256?r:Xu(e.slice(1))}var Uu=e=>{let t=Sh(e),r=hh(t);return Xu(r)};function Qu(e){let t=typeof e.partialQueries=="string"?e.partialQueries:Uu(e.partialQueries),r=typeof e.suggestions=="string"?e.suggestions:Uu(e.suggestions);return Object.assign(Object.assign({},e),{partialQueries:t,suggestions:r})}var Ro=class{constructor(t,r){this.opts=t,this.provider=r;let n=t.enableAnalytics===!1||xo();this.coveoAnalyticsClient=n?new br:new Ze(t)}disable(){this.coveoAnalyticsClient=new br}enable(){this.coveoAnalyticsClient=new Ze(this.opts)}makeInterfaceLoad(){return this.makeSearchEvent(j.interfaceLoad)}logInterfaceLoad(){return q(this,void 0,void 0,function*(){return(yield this.makeInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendationInterfaceLoad(){return this.makeSearchEvent(j.recommendationInterfaceLoad)}logRecommendationInterfaceLoad(){return q(this,void 0,void 0,function*(){return(yield this.makeRecommendationInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendation(){return this.makeCustomEvent(j.recommendation)}logRecommendation(){return q(this,void 0,void 0,function*(){return(yield this.makeRecommendation()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendationOpen(t,r){return this.makeClickEvent(j.recommendationOpen,t,r)}logRecommendationOpen(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeRecommendationOpen(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterClearAll(t){return this.makeSearchEvent(j.staticFilterClearAll,t)}logStaticFilterClearAll(t){return q(this,void 0,void 0,function*(){return(yield this.makeStaticFilterClearAll(t)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterSelect(t){return this.makeSearchEvent(j.staticFilterSelect,t)}logStaticFilterSelect(t){return q(this,void 0,void 0,function*(){return(yield this.makeStaticFilterSelect(t)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterDeselect(t){return this.makeSearchEvent(j.staticFilterDeselect,t)}logStaticFilterDeselect(t){return q(this,void 0,void 0,function*(){return(yield this.makeStaticFilterDeselect(t)).log({searchUID:this.provider.getSearchUID()})})}makeFetchMoreResults(){return this.makeCustomEvent(j.pagerScrolling,{type:"getMoreResults"})}logFetchMoreResults(){return q(this,void 0,void 0,function*(){return(yield this.makeFetchMoreResults()).log({searchUID:this.provider.getSearchUID()})})}makeInterfaceChange(t){return this.makeSearchEvent(j.interfaceChange,t)}logInterfaceChange(t){return q(this,void 0,void 0,function*(){return(yield this.makeInterfaceChange(t)).log({searchUID:this.provider.getSearchUID()})})}makeDidYouMeanAutomatic(){return this.makeSearchEvent(j.didyoumeanAutomatic)}logDidYouMeanAutomatic(){return q(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanAutomatic()).log({searchUID:this.provider.getSearchUID()})})}makeDidYouMeanClick(){return this.makeSearchEvent(j.didyoumeanClick)}logDidYouMeanClick(){return q(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanClick()).log({searchUID:this.provider.getSearchUID()})})}makeResultsSort(t){return this.makeSearchEvent(j.resultsSort,t)}logResultsSort(t){return q(this,void 0,void 0,function*(){return(yield this.makeResultsSort(t)).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxSubmit(){return this.makeSearchEvent(j.searchboxSubmit)}logSearchboxSubmit(){return q(this,void 0,void 0,function*(){return(yield this.makeSearchboxSubmit()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxClear(){return this.makeSearchEvent(j.searchboxClear)}logSearchboxClear(){return q(this,void 0,void 0,function*(){return(yield this.makeSearchboxClear()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxAsYouType(){return this.makeSearchEvent(j.searchboxAsYouType)}logSearchboxAsYouType(){return q(this,void 0,void 0,function*(){return(yield this.makeSearchboxAsYouType()).log({searchUID:this.provider.getSearchUID()})})}makeBreadcrumbFacet(t){return this.makeSearchEvent(j.breadcrumbFacet,t)}logBreadcrumbFacet(t){return q(this,void 0,void 0,function*(){return(yield this.makeBreadcrumbFacet(t)).log({searchUID:this.provider.getSearchUID()})})}makeBreadcrumbResetAll(){return this.makeSearchEvent(j.breadcrumbResetAll)}logBreadcrumbResetAll(){return q(this,void 0,void 0,function*(){return(yield this.makeBreadcrumbResetAll()).log({searchUID:this.provider.getSearchUID()})})}makeDocumentQuickview(t,r){return this.makeClickEvent(j.documentQuickview,t,r)}logDocumentQuickview(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeDocumentQuickview(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeDocumentOpen(t,r){return this.makeClickEvent(j.documentOpen,t,r)}logDocumentOpen(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeDocumentOpen(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOmniboxAnalytics(t){return this.makeSearchEvent(j.omniboxAnalytics,Qu(t))}logOmniboxAnalytics(t){return q(this,void 0,void 0,function*(){return(yield this.makeOmniboxAnalytics(t)).log({searchUID:this.provider.getSearchUID()})})}makeOmniboxFromLink(t){return this.makeSearchEvent(j.omniboxFromLink,Qu(t))}logOmniboxFromLink(t){return q(this,void 0,void 0,function*(){return(yield this.makeOmniboxFromLink(t)).log({searchUID:this.provider.getSearchUID()})})}makeSearchFromLink(){return this.makeSearchEvent(j.searchFromLink)}logSearchFromLink(){return q(this,void 0,void 0,function*(){return(yield this.makeSearchFromLink()).log({searchUID:this.provider.getSearchUID()})})}makeTriggerNotify(t){return this.makeCustomEvent(j.triggerNotify,t)}logTriggerNotify(t){return q(this,void 0,void 0,function*(){return(yield this.makeTriggerNotify(t)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerExecute(t){return this.makeCustomEvent(j.triggerExecute,t)}logTriggerExecute(t){return q(this,void 0,void 0,function*(){return(yield this.makeTriggerExecute(t)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerQuery(){return this.makeCustomEvent(j.triggerQuery,{query:this.provider.getSearchEventRequestPayload().queryText},"queryPipelineTriggers")}logTriggerQuery(){return q(this,void 0,void 0,function*(){return(yield this.makeTriggerQuery()).log({searchUID:this.provider.getSearchUID()})})}makeUndoTriggerQuery(t){return this.makeSearchEvent(j.undoTriggerQuery,t)}logUndoTriggerQuery(t){return q(this,void 0,void 0,function*(){return(yield this.makeUndoTriggerQuery(t)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerRedirect(t){return this.makeCustomEvent(j.triggerRedirect,Object.assign(Object.assign({},t),{query:this.provider.getSearchEventRequestPayload().queryText}))}logTriggerRedirect(t){return q(this,void 0,void 0,function*(){return(yield this.makeTriggerRedirect(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerResize(t){return this.makeCustomEvent(j.pagerResize,t)}logPagerResize(t){return q(this,void 0,void 0,function*(){return(yield this.makePagerResize(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerNumber(t){return this.makeCustomEvent(j.pagerNumber,t)}logPagerNumber(t){return q(this,void 0,void 0,function*(){return(yield this.makePagerNumber(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerNext(t){return this.makeCustomEvent(j.pagerNext,t)}logPagerNext(t){return q(this,void 0,void 0,function*(){return(yield this.makePagerNext(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerPrevious(t){return this.makeCustomEvent(j.pagerPrevious,t)}logPagerPrevious(t){return q(this,void 0,void 0,function*(){return(yield this.makePagerPrevious(t)).log({searchUID:this.provider.getSearchUID()})})}makePagerScrolling(){return this.makeCustomEvent(j.pagerScrolling)}logPagerScrolling(){return q(this,void 0,void 0,function*(){return(yield this.makePagerScrolling()).log({searchUID:this.provider.getSearchUID()})})}makeFacetClearAll(t){return this.makeSearchEvent(j.facetClearAll,t)}logFacetClearAll(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetClearAll(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSearch(t){return this.makeSearchEvent(j.facetSearch,t)}logFacetSearch(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetSearch(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSelect(t){return this.makeSearchEvent(j.facetSelect,t)}logFacetSelect(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetSelect(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetDeselect(t){return this.makeSearchEvent(j.facetDeselect,t)}logFacetDeselect(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetDeselect(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetExclude(t){return this.makeSearchEvent(j.facetExclude,t)}logFacetExclude(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetExclude(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetUnexclude(t){return this.makeSearchEvent(j.facetUnexclude,t)}logFacetUnexclude(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetUnexclude(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSelectAll(t){return this.makeSearchEvent(j.facetSelectAll,t)}logFacetSelectAll(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetSelectAll(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetUpdateSort(t){return this.makeSearchEvent(j.facetUpdateSort,t)}logFacetUpdateSort(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetUpdateSort(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetShowMore(t){return this.makeCustomEvent(j.facetShowMore,t)}logFacetShowMore(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetShowMore(t)).log({searchUID:this.provider.getSearchUID()})})}makeFacetShowLess(t){return this.makeCustomEvent(j.facetShowLess,t)}logFacetShowLess(t){return q(this,void 0,void 0,function*(){return(yield this.makeFacetShowLess(t)).log({searchUID:this.provider.getSearchUID()})})}makeQueryError(t){return this.makeCustomEvent(j.queryError,t)}logQueryError(t){return q(this,void 0,void 0,function*(){return(yield this.makeQueryError(t)).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorBack(){return q(this,void 0,void 0,function*(){let t=yield this.makeCustomEvent(j.queryErrorBack);return{description:t.description,log:()=>q(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(j.queryErrorBack)})}})}logQueryErrorBack(){return q(this,void 0,void 0,function*(){return(yield this.makeQueryErrorBack()).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorRetry(){return q(this,void 0,void 0,function*(){let t=yield this.makeCustomEvent(j.queryErrorRetry);return{description:t.description,log:()=>q(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(j.queryErrorRetry)})}})}logQueryErrorRetry(){return q(this,void 0,void 0,function*(){return(yield this.makeQueryErrorRetry()).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorClear(){return q(this,void 0,void 0,function*(){let t=yield this.makeCustomEvent(j.queryErrorClear);return{description:t.description,log:()=>q(this,void 0,void 0,function*(){return yield t.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(j.queryErrorClear)})}})}logQueryErrorClear(){return q(this,void 0,void 0,function*(){return(yield this.makeQueryErrorClear()).log({searchUID:this.provider.getSearchUID()})})}makeLikeSmartSnippet(){return this.makeCustomEvent(j.likeSmartSnippet)}logLikeSmartSnippet(){return q(this,void 0,void 0,function*(){return(yield this.makeLikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeDislikeSmartSnippet(){return this.makeCustomEvent(j.dislikeSmartSnippet)}logDislikeSmartSnippet(){return q(this,void 0,void 0,function*(){return(yield this.makeDislikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeExpandSmartSnippet(){return this.makeCustomEvent(j.expandSmartSnippet)}logExpandSmartSnippet(){return q(this,void 0,void 0,function*(){return(yield this.makeExpandSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeCollapseSmartSnippet(){return this.makeCustomEvent(j.collapseSmartSnippet)}logCollapseSmartSnippet(){return q(this,void 0,void 0,function*(){return(yield this.makeCollapseSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetFeedbackModal(){return this.makeCustomEvent(j.openSmartSnippetFeedbackModal)}logOpenSmartSnippetFeedbackModal(){return q(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetFeedbackModal()).log({searchUID:this.provider.getSearchUID()})})}makeCloseSmartSnippetFeedbackModal(){return this.makeCustomEvent(j.closeSmartSnippetFeedbackModal)}logCloseSmartSnippetFeedbackModal(){return q(this,void 0,void 0,function*(){return(yield this.makeCloseSmartSnippetFeedbackModal()).log({searchUID:this.provider.getSearchUID()})})}makeSmartSnippetFeedbackReason(t,r){return this.makeCustomEvent(j.sendSmartSnippetReason,{reason:t,details:r})}logSmartSnippetFeedbackReason(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeSmartSnippetFeedbackReason(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeExpandSmartSnippetSuggestion(t){return this.makeCustomEvent(j.expandSmartSnippetSuggestion,"documentId"in t?t:{documentId:t})}logExpandSmartSnippetSuggestion(t){return q(this,void 0,void 0,function*(){return(yield this.makeExpandSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeCollapseSmartSnippetSuggestion(t){return this.makeCustomEvent(j.collapseSmartSnippetSuggestion,"documentId"in t?t:{documentId:t})}logCollapseSmartSnippetSuggestion(t){return q(this,void 0,void 0,function*(){return(yield this.makeCollapseSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeShowMoreSmartSnippetSuggestion(t){return this.makeCustomEvent(j.showMoreSmartSnippetSuggestion,t)}logShowMoreSmartSnippetSuggestion(t){return q(this,void 0,void 0,function*(){return(yield this.makeShowMoreSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeShowLessSmartSnippetSuggestion(t){return this.makeCustomEvent(j.showLessSmartSnippetSuggestion,t)}logShowLessSmartSnippetSuggestion(t){return q(this,void 0,void 0,function*(){return(yield this.makeShowLessSmartSnippetSuggestion(t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSource(t,r){return this.makeClickEvent(j.openSmartSnippetSource,t,r)}logOpenSmartSnippetSource(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSource(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSuggestionSource(t,r){return this.makeClickEvent(j.openSmartSnippetSuggestionSource,t,{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}makeCopyToClipboard(t,r){return this.makeClickEvent(j.copyToClipboard,t,r)}logCopyToClipboard(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeCopyToClipboard(t,r)).log({searchUID:this.provider.getSearchUID()})})}logOpenSmartSnippetSuggestionSource(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSuggestionSource(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetInlineLink(t,r){return this.makeClickEvent(j.openSmartSnippetInlineLink,t,{contentIDKey:r.contentIDKey,contentIDValue:r.contentIDValue},r)}logOpenSmartSnippetInlineLink(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetInlineLink(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSuggestionInlineLink(t,r){return this.makeClickEvent(j.openSmartSnippetSuggestionInlineLink,t,{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}logOpenSmartSnippetSuggestionInlineLink(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSuggestionInlineLink(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeRecentQueryClick(){return this.makeSearchEvent(j.recentQueryClick)}logRecentQueryClick(){return q(this,void 0,void 0,function*(){return(yield this.makeRecentQueryClick()).log({searchUID:this.provider.getSearchUID()})})}makeClearRecentQueries(){return this.makeCustomEvent(j.clearRecentQueries)}logClearRecentQueries(){return q(this,void 0,void 0,function*(){return(yield this.makeClearRecentQueries()).log({searchUID:this.provider.getSearchUID()})})}makeRecentResultClick(t,r){return this.makeCustomEvent(j.recentResultClick,{info:t,identifier:r})}logRecentResultClick(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeRecentResultClick(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeClearRecentResults(){return this.makeCustomEvent(j.clearRecentResults)}logClearRecentResults(){return q(this,void 0,void 0,function*(){return(yield this.makeClearRecentResults()).log({searchUID:this.provider.getSearchUID()})})}makeNoResultsBack(){return this.makeSearchEvent(j.noResultsBack)}logNoResultsBack(){return q(this,void 0,void 0,function*(){return(yield this.makeNoResultsBack()).log({searchUID:this.provider.getSearchUID()})})}makeShowMoreFoldedResults(t,r){return this.makeClickEvent(j.showMoreFoldedResults,t,r)}logShowMoreFoldedResults(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeShowMoreFoldedResults(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeShowLessFoldedResults(){return this.makeCustomEvent(j.showLessFoldedResults)}logShowLessFoldedResults(){return q(this,void 0,void 0,function*(){return(yield this.makeShowLessFoldedResults()).log({searchUID:this.provider.getSearchUID()})})}makeEventDescription(t,r){var n;return{actionCause:r,customData:(n=t.payload)===null||n===void 0?void 0:n.customData}}makeCustomEvent(t,r,n=Lu[t]){return q(this,void 0,void 0,function*(){this.coveoAnalyticsClient.getParameters;let o=Object.assign(Object.assign({},this.provider.getBaseMetadata()),r),i=Object.assign(Object.assign({},yield this.getBaseEventRequest(o)),{eventType:n,eventValue:t}),a=yield this.coveoAnalyticsClient.makeCustomEvent(i);return{description:this.makeEventDescription(a,t),log:({searchUID:m})=>a.log({lastSearchQueryUid:m})}})}logCustomEvent(t,r,n=Lu[t]){return q(this,void 0,void 0,function*(){return(yield this.makeCustomEvent(t,r,n)).log({searchUID:this.provider.getSearchUID()})})}makeCustomEventWithType(t,r,n){return q(this,void 0,void 0,function*(){let o=Object.assign(Object.assign({},this.provider.getBaseMetadata()),n),i=Object.assign(Object.assign({},yield this.getBaseEventRequest(o)),{eventType:r,eventValue:t}),a=yield this.coveoAnalyticsClient.makeCustomEvent(i);return{description:this.makeEventDescription(a,t),log:({searchUID:m})=>a.log({lastSearchQueryUid:m})}})}logCustomEventWithType(t,r,n){return q(this,void 0,void 0,function*(){return(yield this.makeCustomEventWithType(t,r,n)).log({searchUID:this.provider.getSearchUID()})})}logSearchEvent(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeSearchEvent(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeSearchEvent(t,r){return q(this,void 0,void 0,function*(){let n=yield this.getBaseSearchEventRequest(t,r),o=yield this.coveoAnalyticsClient.makeSearchEvent(n);return{description:this.makeEventDescription(o,t),log:({searchUID:i})=>o.log({searchQueryUid:i})}})}makeClickEvent(t,r,n,o){return q(this,void 0,void 0,function*(){let i=Object.assign(Object.assign(Object.assign({},r),yield this.getBaseEventRequest(Object.assign(Object.assign({},n),o))),{queryPipeline:this.provider.getPipeline(),actionCause:t}),a=yield this.coveoAnalyticsClient.makeClickEvent(i);return{description:this.makeEventDescription(a,t),log:({searchUID:m})=>a.log({searchQueryUid:m})}})}logClickEvent(t,r,n,o){return q(this,void 0,void 0,function*(){return(yield this.makeClickEvent(t,r,n,o)).log({searchUID:this.provider.getSearchUID()})})}getBaseSearchEventRequest(t,r){var n,o;return q(this,void 0,void 0,function*(){return Object.assign(Object.assign(Object.assign({},yield this.getBaseEventRequest(Object.assign(Object.assign({},r),(o=(n=this.provider).getGeneratedAnswerMetadata)===null||o===void 0?void 0:o.call(n)))),this.provider.getSearchEventRequestPayload()),{queryPipeline:this.provider.getPipeline(),actionCause:t})})}getBaseEventRequest(t){return q(this,void 0,void 0,function*(){let r=Object.assign(Object.assign({},this.provider.getBaseMetadata()),t);return Object.assign(Object.assign(Object.assign({},this.getOrigins()),this.getSplitTestRun()),{customData:r,language:this.provider.getLanguage(),facetState:this.provider.getFacetState?this.provider.getFacetState():[],anonymous:this.provider.getIsAnonymous(),clientId:yield this.getClientId()})})}getOrigins(){var t,r;return{originContext:(r=(t=this.provider).getOriginContext)===null||r===void 0?void 0:r.call(t),originLevel1:this.provider.getOriginLevel1(),originLevel2:this.provider.getOriginLevel2(),originLevel3:this.provider.getOriginLevel3()}}getClientId(){return this.coveoAnalyticsClient instanceof Ze?this.coveoAnalyticsClient.getCurrentVisitorId():void 0}getSplitTestRun(){let t=this.provider.getSplitTestRunName?this.provider.getSplitTestRunName():"",r=this.provider.getSplitTestRunVersion?this.provider.getSplitTestRunVersion():"";return Object.assign(Object.assign({},t&&{splitTestRunName:t}),r&&{splitTestRunVersion:r})}makeLikeGeneratedAnswer(t){return this.makeCustomEvent(j.likeGeneratedAnswer,t)}logLikeGeneratedAnswer(t){return q(this,void 0,void 0,function*(){return(yield this.makeLikeGeneratedAnswer(t)).log({searchUID:this.provider.getSearchUID()})})}makeDislikeGeneratedAnswer(t){return this.makeCustomEvent(j.dislikeGeneratedAnswer,t)}logDislikeGeneratedAnswer(t){return q(this,void 0,void 0,function*(){return(yield this.makeDislikeGeneratedAnswer(t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenGeneratedAnswerSource(t){return this.makeCustomEvent(j.openGeneratedAnswerSource,t)}logOpenGeneratedAnswerSource(t){return q(this,void 0,void 0,function*(){return(yield this.makeOpenGeneratedAnswerSource(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCitationClick(t,r){return this.makeClickEvent(j.generatedAnswerCitationClick,Object.assign(Object.assign({},t),{documentPosition:1}),{contentIDKey:r.documentId.contentIdKey,contentIDValue:r.documentId.contentIdValue},r)}logGeneratedAnswerCitationClick(t,r){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCitationClick(t,r)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerSourceHover(t){return this.makeCustomEvent(j.generatedAnswerSourceHover,t)}logGeneratedAnswerSourceHover(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerSourceHover(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCopyToClipboard(t){return this.makeCustomEvent(j.generatedAnswerCopyToClipboard,t)}logGeneratedAnswerCopyToClipboard(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCopyToClipboard(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerHideAnswers(t){return this.makeCustomEvent(j.generatedAnswerHideAnswers,t)}logGeneratedAnswerHideAnswers(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerHideAnswers(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerShowAnswers(t){return this.makeCustomEvent(j.generatedAnswerShowAnswers,t)}logGeneratedAnswerShowAnswers(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerShowAnswers(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerExpand(t){return this.makeCustomEvent(j.generatedAnswerExpand,t)}logGeneratedAnswerExpand(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerExpand(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCollapse(t){return this.makeCustomEvent(j.generatedAnswerCollapse,t)}logGeneratedAnswerCollapse(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCollapse(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerFeedbackSubmit(t){return this.makeCustomEvent(j.generatedAnswerFeedbackSubmit,t)}logGeneratedAnswerFeedbackSubmit(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerFeedbackSubmit(t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerFeedbackSubmitV2(t){return this.makeCustomEvent(j.generatedAnswerFeedbackSubmitV2,t)}logGeneratedAnswerFeedbackSubmitV2(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerFeedbackSubmitV2(t)).log({searchUID:this.provider.getSearchUID()})})}makeRephraseGeneratedAnswer(t){return this.makeSearchEvent(j.rephraseGeneratedAnswer,t)}logRephraseGeneratedAnswer(t){return q(this,void 0,void 0,function*(){return(yield this.makeRephraseGeneratedAnswer(t)).log({searchUID:this.provider.getSearchUID()})})}makeRetryGeneratedAnswer(){return this.makeSearchEvent(j.retryGeneratedAnswer)}logRetryGeneratedAnswer(){return q(this,void 0,void 0,function*(){return(yield this.makeRetryGeneratedAnswer()).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerStreamEnd(t){return this.makeCustomEvent(j.generatedAnswerStreamEnd,t)}logGeneratedAnswerStreamEnd(t){return q(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerStreamEnd(t)).log({searchUID:this.provider.getSearchUID()})})}},Eo=Object.assign({},dn),Bu=Object.keys(Eo).map(e=>Eo[e]),Sr=class extends wa{constructor({client:t,uuidGenerator:r=Bt}){super({client:t,uuidGenerator:r}),this.ticket={}}getApi(t){let r=super.getApi(t);if(r!==null)return r;switch(t){case"setTicket":return this.setTicket;default:return null}}addHooks(){this.addHooksForEvent(),this.addHooksForPageView(),this.addHooksForSVCEvents()}setTicket(t){this.ticket=t}clearPluginData(){this.ticket={}}addHooksForSVCEvents(){this.client.registerBeforeSendEventHook((t,...[r])=>Bu.indexOf(t)!==-1?this.addSVCDataToPayload(t,r):r),this.client.registerAfterSendEventHook((t,...[r])=>(Bu.indexOf(t)!==-1&&this.updateLocationInformation(t,r),r))}addHooksForPageView(){this.client.addEventTypeMapping(Eo.pageview,{newEventType:ae.collect,variableLengthArgumentsNames:["page"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})}addHooksForEvent(){this.client.addEventTypeMapping(Eo.event,{newEventType:ae.collect,variableLengthArgumentsNames:["eventCategory","eventAction","eventLabel","eventValue"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})}addSVCDataToPayload(t,r){var n;let o=Object.assign(Object.assign(Object.assign(Object.assign({},this.getLocationInformation(t,r)),this.getDefaultContextInformation(t)),this.action?{svcAction:this.action}:{}),Object.keys((n=this.actionData)!==null&&n!==void 0?n:{}).length>0?{svcActionData:this.actionData}:{}),i=this.getTicketPayload();return this.clearData(),Object.assign(Object.assign(Object.assign({},i),o),r)}getTicketPayload(){return xy(this.ticket)}};Sr.Id="svc";var Io;(function(e){e.click="click",e.flowStart="flowStart"})(Io||(Io={}));var Ue;(function(e){e.enterInterface="ticket_create_start",e.fieldUpdate="ticket_field_update",e.fieldSuggestionClick="ticket_classification_click",e.documentSuggestionClick="documentSuggestionClick",e.documentSuggestionQuickview="documentSuggestionQuickview",e.suggestionRate="suggestion_rate",e.nextCaseStep="ticket_next_stage",e.caseCancelled="ticket_cancel",e.caseSolved="ticket_cancel",e.caseCreated="ticket_create"})(Ue||(Ue={}));var Po;(function(e){e.quit="Quit",e.solved="Solved"})(Po||(Po={}));var ko=class{constructor(t,r){var n;this.options=t,this.provider=r;let o=((n=t.enableAnalytics)!==null&&n!==void 0?n:!0)&&!xo();this.coveoAnalyticsClient=o?new Ze(t):new br,this.svc=new Sr({client:this.coveoAnalyticsClient})}disable(){this.coveoAnalyticsClient=new br,this.svc=new Sr({client:this.coveoAnalyticsClient})}enable(){this.coveoAnalyticsClient=new Ze(this.options),this.svc=new Sr({client:this.coveoAnalyticsClient})}logEnterInterface(t){return this.svc.setAction(Ue.enterInterface),this.svc.setTicket(t.ticket),this.sendFlowStartEvent()}logUpdateCaseField(t){return this.svc.setAction(Ue.fieldUpdate,{fieldName:t.fieldName}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logSelectFieldSuggestion(t){return this.svc.setAction(Ue.fieldSuggestionClick,t.suggestion),this.svc.setTicket(t.ticket),this.sendClickEvent()}logSelectDocumentSuggestion(t){return this.logClickEvent(Ue.documentSuggestionClick,t.suggestion.suggestion,{contentIDKey:"permanentId",contentIDValue:t.suggestion.permanentId})}logQuickviewDocumentSuggestion(t){return this.logClickEvent(Ue.documentSuggestionQuickview,t.suggestion.suggestion,{contentIDKey:"permanentId",contentIDValue:t.suggestion.permanentId})}logRateDocumentSuggestion(t){return this.svc.setAction(Ue.suggestionRate,Object.assign({rate:t.rating},t.suggestion)),this.svc.setTicket(t.ticket),this.sendClickEvent()}logMoveToNextCaseStep(t){return this.svc.setAction(Ue.nextCaseStep,{stage:t?.stage}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseCancelled(t){return this.svc.setAction(Ue.caseCancelled,{reason:Po.quit}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseSolved(t){return this.svc.setAction(Ue.caseSolved,{reason:Po.solved}),this.svc.setTicket(t.ticket),this.sendClickEvent()}logCaseCreated(t){return this.svc.setAction(Ue.caseCreated),this.svc.setTicket(t.ticket),this.sendClickEvent()}sendFlowStartEvent(){return this.coveoAnalyticsClient.sendEvent("event","svc",Io.flowStart,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)}sendClickEvent(){return this.coveoAnalyticsClient.sendEvent("event","svc",Io.click,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)}getBaseEventRequest(t){var r,n;return q(this,void 0,void 0,function*(){let o=Object.assign({},t);return Object.assign(Object.assign({},this.getOrigins()),{customData:o,language:(r=this.provider)===null||r===void 0?void 0:r.getLanguage(),anonymous:(n=this.provider)===null||n===void 0?void 0:n.getIsAnonymous(),clientId:yield this.getClientId()})})}getClientId(){return this.coveoAnalyticsClient instanceof Ze?this.coveoAnalyticsClient.getCurrentVisitorId():void 0}getOrigins(){var t,r,n,o,i;return{originContext:(r=(t=this.provider)===null||t===void 0?void 0:t.getOriginContext)===null||r===void 0?void 0:r.call(t),originLevel1:(n=this.provider)===null||n===void 0?void 0:n.getOriginLevel1(),originLevel2:(o=this.provider)===null||o===void 0?void 0:o.getOriginLevel2(),originLevel3:(i=this.provider)===null||i===void 0?void 0:i.getOriginLevel3()}}logClickEvent(t,r,n,o){var i,a;return q(this,void 0,void 0,function*(){let m=Object.assign(Object.assign(Object.assign({},r),yield this.getBaseEventRequest(Object.assign(Object.assign({},n),o))),{searchQueryUid:(a=(i=this.provider)===null||i===void 0?void 0:i.getSearchUID())!==null&&a!==void 0?a:"",actionCause:t});return this.coveoAnalyticsClient.sendClickEvent(m)})}};var Zu=e=>new Ze(e).getCurrentVisitorId(),mn=(e,t)=>typeof t=="function"?(...r)=>{let n=Kr(r[0]);try{return t.apply(t,r)}catch(o){return e.error(o,"Error in analytics preprocessRequest. Returning original request."),n}}:void 0,gn=(e,t)=>(...r)=>{let n=Kr(r[1]);try{return t.apply(t,r)}catch(o){return e.error(o,"Error in analytics hook. Returning original request."),n}};d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();function Fo(){return{desiredCount:5,numberOfValues:8,set:{}}}d();c();l();u();d();c();l();u();d();c();l();u();function el(e){let{activeValue:t,ancestryMap:r}=vh(e);return t?bh(t,r):[]}function vh(e){let t=[...e],r=new Map;for(;t.length>0;){let n=t.shift();if(n.state==="selected")return{activeValue:n,ancestryMap:r};if(r)for(let o of n.children)r.set(o,n);t.unshift(...n.children)}return{}}function bh(e,t){let r=[];if(!e)return[];let n=e;do r.unshift(n),n=t.get(n);while(n);return r}var Ah=(e,t)=>e.categoryFacetSet[t]?.request;var Ma=(e,t)=>{let r=Ah(e,t);return el(r?.currentValues??[])};d();c();l();u();function Oo(){return{}}d();c();l();u();function To(){return{}}d();c();l();u();function Do(){return{}}d();c();l();u();function qo(){return{}}function Na(e){return{facetSet:e.facetSet??qo(),categoryFacetSet:e.categoryFacetSet??Oo(),dateFacetSet:e.dateFacetSet??To(),numericFacetSet:e.numericFacetSet??Do(),automaticFacetSet:e.automaticFacetSet??Fo()}}var _a=e=>{let t=[];return xh(e).forEach((r,n)=>{let o=Th(e,r.facetId),i=Fh(r,n+1);if(wh(r)){if(!!!Ma(e,r.facetId).length)return;t.push({...i,...Ph(e,r.facetId),facetType:o,state:"selected"});return}r.currentValues.forEach((a,m)=>{if(a.state==="idle")return;let f=tl(a,m+1,o),p=Ch(r)?rl(a):Eh(a);t.push({...i,...f,...p})})}),Rh(e).forEach((r,n)=>{let o=kh(r,n+1);r.values.forEach((i,a)=>{if(i.state==="idle")return;let m=tl(i,a+1,"specific"),f=rl(i);t.push({...o,...m,...f})})}),t},Ch=e=>e.type==="specific",wh=e=>e.type==="hierarchical",xh=e=>[...Object.values(e.facetSet),...Object.values(e.categoryFacetSet),...Object.values(e.dateFacetSet),...Object.values(e.numericFacetSet)].map(t=>t.request),Rh=e=>[...Object.values(e.automaticFacetSet.set)].map(t=>t.response),tl=(e,t,r)=>({state:e.state,valuePosition:t,facetType:r}),Eh=e=>({displayValue:`${e.start}..${e.end}`,value:`${e.start}..${e.end}`,start:e.start,end:e.end,endInclusive:e.endInclusive}),rl=e=>({displayValue:e.value,value:e.value}),Ih=(e,t)=>Ma(e,t).map(n=>n.value).join(";"),Ph=(e,t)=>{let n=Ih(e,t);return{value:n,valuePosition:1,displayValue:n}},kh=(e,t)=>({title:nl(e.field,e.field),field:e.field,id:e.field,facetPosition:t}),Fh=(e,t)=>({title:nl(e.field,e.facetId),field:e.field,id:e.facetId,facetPosition:t}),nl=(e,t)=>`${e}_${t}`,Oh=(e,t)=>e.facetSet[t]?.request||e.categoryFacetSet[t]?.request||e.dateFacetSet[t]?.request||e.numericFacetSet[t]?.request||e.automaticFacetSet.set[t]?.response,Th=(e,t)=>{let r=Oh(e,t);return r?r.type:"specific"};d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();function ol(e){return{status:e,isUninitialized:e==="uninitialized",isLoading:e==="pending",isSuccess:e==="fulfilled",isError:e==="rejected"}}var il=Ke;function hl(e,t){if(e===t||!(il(e)&&il(t)||Array.isArray(e)&&Array.isArray(t)))return t;let r=Object.keys(t),n=Object.keys(e),o=r.length===n.length,i=Array.isArray(t)?[]:{};for(let a of r)i[a]=hl(e[a],t[a]),o&&(o=e[a]===i[a]);return o?e:i}function Ar(e){let t=0;for(let r in e)t++;return t}var al=e=>[].concat(...e);function Dh(e){return new RegExp("(^|:)//").test(e)}function qh(){return typeof document>"u"?!0:document.visibilityState!=="hidden"}function No(e){return e!=null}function jh(){return typeof navigator>"u"||navigator.onLine===void 0?!0:navigator.onLine}var Mh=e=>e.replace(/\/$/,""),Nh=e=>e.replace(/^\//,"");function _h(e,t){if(!e)return t;if(!t)return e;if(Dh(t))return t;let r=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=Mh(e),t=Nh(t),`${e}${r}${t}`}function Vh(e,t,r){return e.has(t)?e.get(t):e.set(t,r).get(t)}var sl=(...e)=>A(...e),Lh=e=>e.status>=200&&e.status<=299,Uh=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function cl(e){if(!Ke(e))return e;let t={...e};for(let[r,n]of Object.entries(t))n===void 0&&delete t[r];return t}function Sl({baseUrl:e,prepareHeaders:t=h=>h,fetchFn:r=sl,paramsSerializer:n,isJsonContentType:o=Uh,jsonContentType:i="application/json",jsonReplacer:a,timeout:m,responseHandler:f,validateStatus:p,...y}={}){return typeof A>"u"&&r===sl&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),(/*#__PURE__*/function(){var _ref7=_asyncToGenerator(function*(S,g,v){let{getState:R,extra:P,endpoint:w,forced:F,type:x}=g,E,{url:M,headers:O=new C(y.headers),params:I=void 0,responseHandler:k=f??"json",validateStatus:D=p??Lh,timeout:N=m,...$}=typeof S=="string"?{url:S}:S,U,V=g.signal;N&&(U=new s.AbortController,g.signal.addEventListener("abort",U.abort),V=U.signal);let _={...y,signal:V,...$};O=new C(cl(O)),_.headers=(yield t(O,{getState:R,arg:S,extra:P,endpoint:w,forced:F,type:x,extraOptions:v}))||O;let B=Z=>typeof Z=="object"&&(Ke(Z)||Array.isArray(Z)||typeof Z.toJSON=="function");if(!_.headers.has("content-type")&&B(_.body)&&_.headers.set("content-type",i),B(_.body)&&o(_.headers)&&(_.body=JSON.stringify(_.body,a)),I){let Z=~M.indexOf("?")?"&":"?",oe=n?n(I):new URLSearchParams(cl(I));M+=Z+oe}M=_h(e,M);let L=new Request(M,_);E={request:new Request(M,_)};let G,Y=!1,te=U&&setTimeout(()=>{Y=!0,U.abort()},N);try{G=yield r(L)}catch(Z){return{error:{status:Y?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(Z)},meta:E}}finally{te&&clearTimeout(te),U?.signal.removeEventListener("abort",U.abort)}let ce=G.clone();E.response=ce;let ee,re="";try{let Z;if(yield Promise.all([h(G,k).then(oe=>ee=oe,oe=>Z=oe),ce.text().then(oe=>re=oe,()=>{})]),Z)throw Z}catch(Z){return{error:{status:"PARSING_ERROR",originalStatus:G.status,data:re,error:String(Z)},meta:E}}return D(G,ee)?{data:ee,meta:E}:{error:{status:G.status,data:ee},meta:E}});return function(_x9,_x0,_x1){return _ref7.apply(this,arguments)}}());function h(_x10,_x11){return _h2.apply(this,arguments)}function _h2(){_h2=_asyncToGenerator(function*(S,g){if(typeof g=="function")return g(S);if(g==="content-type"&&(g=o(S.headers)?"json":"text"),g==="json"){let v=yield S.text();return v.length?JSON.parse(v):null}return S.text()});return _h2.apply(this,arguments)}}var Cr=class{constructor(e,t=void 0){this.value=e,this.meta=t}};function Qh(){return _Qh.apply(this,arguments)}function _Qh(){_Qh=_asyncToGenerator(function*(e=0,t=5){let r=Math.min(e,t),n=~~((Math.random()+.4)*(300<<r));yield new Promise(o=>setTimeout(i=>o(i),n))});return _Qh.apply(this,arguments)}function Bh(e,t){throw Object.assign(new Cr({error:e,meta:t}),{throwImmediately:!0})}var ul={},$h=(e,t)=>(/*#__PURE__*/function(){var _ref8=_asyncToGenerator(function*(r,n,o){let i=[5,(t||ul).maxRetries,(o||ul).maxRetries].filter(y=>y!==void 0),[a]=i.slice(-1),f={maxRetries:a,backoff:Qh,retryCondition:(y,h,{attempt:S})=>S<=a,...t,...o},p=0;for(;;)try{let y=yield e(r,n,o);if(y.error)throw new Cr(y);return y}catch(y){if(p++,y.throwImmediately){if(y instanceof Cr)return y.value;throw y}if(y instanceof Cr&&!f.retryCondition(y.value.error,r,{attempt:p,baseQueryApi:n,extraOptions:o}))return y.value;yield f.backoff(p,f.maxRetries)}});return function(_x12,_x13,_x14){return _ref8.apply(this,arguments)}}()),vl=Object.assign($h,{fail:Bh}),Qa=T("__rtkq/focused"),bl=T("__rtkq/unfocused"),Ba=T("__rtkq/online"),Al=T("__rtkq/offline");function $a(e){return e.type==="query"}function Hh(e){return e.type==="mutation"}function Ha(e){return e.type==="infinitequery"}function za(e,t,r,n,o,i){return zh(e)?e(t,r,n,o).filter(No).map(Va).map(i):Array.isArray(e)?e.map(Va).map(i):[]}function zh(e){return typeof e=="function"}function Va(e){return typeof e=="string"?{type:e}:e}function Gh(e,t){return e.catch(t)}var Sn=Symbol("forceQueryFn"),La=e=>typeof e[Sn]=="function";function Wh({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:r,mutationThunk:n,api:o,context:i}){let a=new Map,m=new Map,{unsubscribeQueryResult:f,removeMutationResult:p,updateSubscriptionOptions:y}=o.internalActions;return{buildInitiateQuery:w,buildInitiateInfiniteQuery:F,buildInitiateMutation:x,getRunningQueryThunk:h,getRunningMutationThunk:S,getRunningQueriesThunk:g,getRunningMutationsThunk:v};function h(E,M){return O=>{let I=i.endpointDefinitions[E],k=e({queryArgs:M,endpointDefinition:I,endpointName:E});return a.get(O)?.[k]}}function S(E,M){return O=>m.get(O)?.[M]}function g(){return E=>Object.values(a.get(E)||{}).filter(No)}function v(){return E=>Object.values(m.get(E)||{}).filter(No)}function R(E){}function P(E,M){let O=(I,{subscribe:k=!0,forceRefetch:D,subscriptionOptions:N,[Sn]:$,...U}={})=>(V,_)=>{let B=e({queryArgs:I,endpointDefinition:M,endpointName:E}),L,z={...U,type:"query",subscribe:k,forceRefetch:D,subscriptionOptions:N,endpointName:E,originalArgs:I,queryCacheKey:B,[Sn]:$};if($a(M))L=t(z);else{let{direction:ue,initialPageParam:me}=U;L=r({...z,direction:ue,initialPageParam:me})}let G=o.endpoints[E].select(I),Y=V(L),te=G(_());let{requestId:ce,abort:ee}=Y,re=te.requestId!==ce,Z=a.get(V)?.[B],oe=()=>G(_()),ye=Object.assign($?Y.then(oe):re&&!Z?Promise.resolve(te):Promise.all([Z,Y]).then(oe),{arg:I,requestId:ce,subscriptionOptions:N,queryCacheKey:B,abort:ee,unwrap(){return _asyncToGenerator(function*(){let ue=yield ye;if(ue.isError)throw ue.error;return ue.data})()},refetch:()=>V(O(I,{subscribe:!1,forceRefetch:!0})),unsubscribe(){k&&V(f({queryCacheKey:B,requestId:ce}))},updateSubscriptionOptions(ue){ye.subscriptionOptions=ue,V(y({endpointName:E,requestId:ce,queryCacheKey:B,options:ue}))}});if(!Z&&!re&&!$){let ue=Vh(a,V,{});ue[B]=ye,ye.then(()=>{delete ue[B],Ar(ue)||a.delete(V)})}return ye};return O}function w(E,M){return P(E,M)}function F(E,M){return P(E,M)}function x(E){return(M,{track:O=!0,fixedCacheKey:I}={})=>(k,D)=>{let N=n({type:"mutation",endpointName:E,originalArgs:M,track:O,fixedCacheKey:I}),$=k(N);let{requestId:U,abort:V,unwrap:_}=$,B=Gh($.unwrap().then(Y=>({data:Y})),Y=>({error:Y})),L=()=>{k(p({requestId:U,fixedCacheKey:I}))},z=Object.assign(B,{arg:$.arg,requestId:U,abort:V,unwrap:_,reset:L}),G=m.get(k)||{};return m.set(k,G),G[U]=z,z.then(()=>{delete G[U],Ar(G)||m.delete(k)}),I&&(G[I]=z,z.then(()=>{G[I]===z&&(delete G[I],Ar(G)||m.delete(k))})),z}}}function Kh(e){return e}var jo=(e={})=>({...e,[cn]:!0});function Yh({reducerPath:e,baseQuery:t,context:{endpointDefinitions:r},serializeQueryArgs:n,api:o,assertTagType:i,selectors:a}){let m=(k,D,N,$)=>(U,V)=>{let _=r[k],B=n({queryArgs:D,endpointDefinition:_,endpointName:k});if(U(o.internalActions.queryResultPatched({queryCacheKey:B,patches:N})),!$)return;let L=o.endpoints[k].select(D)(V()),z=za(_.providesTags,L.data,void 0,D,{},i);U(o.internalActions.updateProvidedBy({queryCacheKey:B,providedTags:z}))};function f(k,D,N=0){let $=[D,...k];return N&&$.length>N?$.slice(0,-1):$}function p(k,D,N=0){let $=[...k,D];return N&&$.length>N?$.slice(1):$}let y=(k,D,N,$=!0)=>(U,V)=>{let B=o.endpoints[k].select(D)(V()),L={patches:[],inversePatches:[],undo:()=>U(o.util.patchQueryData(k,D,L.inversePatches,$))};if(B.status==="uninitialized")return L;let z;if("data"in B)if(De(B.data)){let[G,Y,te]=Xn(B.data,N);L.patches.push(...Y),L.inversePatches.push(...te),z=G}else z=N(B.data),L.patches.push({op:"replace",path:[],value:z}),L.inversePatches.push({op:"replace",path:[],value:B.data});return L.patches.length===0||U(o.util.patchQueryData(k,D,L.patches,$)),L},h=(k,D,N)=>$=>$(o.endpoints[k].initiate(D,{subscribe:!1,forceRefetch:!0,[Sn]:()=>({data:N})})),S=(k,D)=>k.query&&k[D]?k[D]:Kh,g=/*#__PURE__*/function(){var _ref9=_asyncToGenerator(function*(k,{signal:D,abort:N,rejectWithValue:$,fulfillWithValue:U,dispatch:V,getState:_,extra:B}){let L=r[k.endpointName];try{let z=S(L,"transformResponse"),G={signal:D,abort:N,dispatch:V,getState:_,extra:B,endpoint:k.endpointName,type:k.type,forced:k.type==="query"?v(k,_()):void 0,queryCacheKey:k.type==="query"?k.queryCacheKey:void 0},Y=k.type==="query"?k[Sn]:void 0,te,ce=/*#__PURE__*/function(){var _ref0=_asyncToGenerator(function*(re,Z,oe,ye){if(Z==null&&re.pages.length)return Promise.resolve({data:re});let ue={queryArg:k.originalArgs,pageParam:Z},me=yield ee(ue),he=ye?f:p;return{data:{pages:he(re.pages,me.data,oe),pageParams:he(re.pageParams,Z,oe)}}});return function ce(_x17,_x18,_x19,_x20){return _ref0.apply(this,arguments)}}();function ee(_x21){return _ee.apply(this,arguments)}function _ee(){_ee=_asyncToGenerator(function*(re){let Z,{extraOptions:oe}=L;if(Y?Z=Y():L.query?Z=yield t(L.query(re),G,oe):Z=yield L.queryFn(re,G,oe,ue=>t(ue,G,oe)),typeof process<"u",Z.error)throw new Cr(Z.error,Z.meta);let ye=yield z(Z.data,Z.meta,re);return{...Z,data:ye}});return _ee.apply(this,arguments)}if(k.type==="query"&&"infiniteQueryOptions"in L){let{infiniteQueryOptions:re}=L,{maxPages:Z=1/0}=re,oe,ye={pages:[],pageParams:[]},ue=a.selectQueryEntry(_(),k.queryCacheKey)?.data,he=v(k,_())&&!k.direction||!ue?ye:ue;if("direction"in k&&k.direction&&he.pages.length){let ke=k.direction==="backward",dt=(ke?Cl:Ua)(re,he);oe=yield ce(he,dt,Z,ke)}else{let{initialPageParam:ke=re.initialPageParam}=k,_e=ue?.pageParams??[],dt=_e[0]??ke,Kt=_e.length;oe=yield ce(he,dt,Z),Y&&(oe={data:oe.data.pages[0]});for(let Yt=1;Yt<Kt;Yt++){let Qr=Ua(re,oe.data);oe=yield ce(oe.data,Qr,Z)}}te=oe}else te=yield ee(k.originalArgs);return U(te.data,jo({fulfilledTimeStamp:Date.now(),baseQueryMeta:te.meta}))}catch(z){let G=z;if(G instanceof Cr){let Y=S(L,"transformErrorResponse");try{return $(yield Y(G.value,G.meta,k.originalArgs),jo({baseQueryMeta:G.meta}))}catch(te){G=te}}throw typeof process<"u",console.error(G),G}});return function g(_x15,_x16){return _ref9.apply(this,arguments)}}();function v(k,D){let N=a.selectQueryEntry(D,k.queryCacheKey),$=a.selectConfig(D).refetchOnMountOrArgChange,U=N?.fulfilledTimeStamp,V=k.forceRefetch??(k.subscribe&&$);return V?V===!0||(Number(new Date)-Number(U))/1e3>=V:!1}let R=()=>le(`${e}/executeQuery`,g,{getPendingMeta({arg:D}){let N=r[D.endpointName];return jo({startedTimeStamp:Date.now(),...(Ha(N)?{direction:D.direction}:{})})},condition(D,{getState:N}){let $=N(),U=a.selectQueryEntry($,D.queryCacheKey),V=U?.fulfilledTimeStamp,_=D.originalArgs,B=U?.originalArgs,L=r[D.endpointName],z=D.direction;return La(D)?!0:U?.status==="pending"?!1:v(D,$)||$a(L)&&L?.forceRefetch?.({currentArg:_,previousArg:B,endpointState:U,state:$})?!0:!(V&&!z)},dispatchConditionRejection:!0}),P=R(),w=R(),F=le(`${e}/executeMutation`,g,{getPendingMeta(){return jo({startedTimeStamp:Date.now()})}}),x=k=>"force"in k,E=k=>"ifOlderThan"in k,M=(k,D,N)=>($,U)=>{let V=x(N)&&N.force,_=E(N)&&N.ifOlderThan,B=(z=!0)=>{let G={forceRefetch:z,isPrefetch:!0};return o.endpoints[k].initiate(D,G)},L=o.endpoints[k].select(D)(U());if(V)$(B());else if(_){let z=L?.fulfilledTimeStamp;if(!z){$(B());return}(Number(new Date)-Number(new Date(z)))/1e3>=_&&$(B())}else $(B(!1))};function O(k){return D=>D?.meta?.arg?.endpointName===k}function I(k,D){return{matchPending:ir(ro(k),O(D)),matchFulfilled:ir(ot(k),O(D)),matchRejected:ir(Lt(k),O(D))}}return{queryThunk:P,mutationThunk:F,infiniteQueryThunk:w,prefetch:M,updateQueryData:y,upsertQueryData:h,patchQueryData:m,buildMatchThunkActions:I}}function Ua(e,{pages:t,pageParams:r}){let n=t.length-1;return e.getNextPageParam(t[n],t,r[n],r)}function Cl(e,{pages:t,pageParams:r}){return e.getPreviousPageParam?.(t[0],t,r[0],r)}function wl(e,t,r,n){return za(r[e.meta.arg.endpointName][t],ot(e)?e.payload:void 0,ln(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,n)}function Mo(e,t,r){let n=e[t];n&&r(n)}function vn(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function ll(e,t,r){let n=e[vn(t)];n&&r(n)}var yn={};function Jh({reducerPath:e,queryThunk:t,mutationThunk:r,serializeQueryArgs:n,context:{endpointDefinitions:o,apiUid:i,extractRehydrationInfo:a,hasRehydrationInfo:m},assertTagType:f,config:p}){let y=T(`${e}/resetApiState`);function h(O,I,k,D){var N;O[N=I.queryCacheKey]??(O[N]={status:"uninitialized",endpointName:I.endpointName}),Mo(O,I.queryCacheKey,$=>{$.status="pending",$.requestId=k&&$.requestId?$.requestId:D.requestId,I.originalArgs!==void 0&&($.originalArgs=I.originalArgs),$.startedTimeStamp=D.startedTimeStamp;let U=o[D.arg.endpointName];Ha(U)&&"direction"in I&&($.direction=I.direction)})}function S(O,I,k,D){Mo(O,I.arg.queryCacheKey,N=>{if(N.requestId!==I.requestId&&!D)return;let{merge:$}=o[I.arg.endpointName];if(N.status="fulfilled",$){if(N.data!==void 0){let{fulfilledTimeStamp:U,arg:V,baseQueryMeta:_,requestId:B}=I,L=nt(N.data,z=>$(z,k,{arg:V.originalArgs,baseQueryMeta:_,fulfilledTimeStamp:U,requestId:B}));N.data=L}else N.data=k;}else N.data=o[I.arg.endpointName].structuralSharing??!0?hl(Me(N.data)?ca(N.data):N.data,k):k;delete N.error,N.fulfilledTimeStamp=I.fulfilledTimeStamp})}let g=Ut({name:`${e}/queries`,initialState:yn,reducers:{removeQueryResult:{reducer(O,{payload:{queryCacheKey:I}}){delete O[I]},prepare:ar()},cacheEntriesUpserted:{reducer(O,I){for(let k of I.payload){let{queryDescription:D,value:N}=k;h(O,D,!0,{arg:D,requestId:I.meta.requestId,startedTimeStamp:I.meta.timestamp}),S(O,{arg:D,requestId:I.meta.requestId,fulfilledTimeStamp:I.meta.timestamp,baseQueryMeta:{}},N,!0)}},prepare:O=>({payload:O.map(D=>{let{endpointName:N,arg:$,value:U}=D,V=o[N];return{queryDescription:{type:"query",endpointName:N,originalArgs:D.arg,queryCacheKey:n({queryArgs:$,endpointDefinition:V,endpointName:N})},value:U}}),meta:{[cn]:!0,requestId:oo(),timestamp:Date.now()}})},queryResultPatched:{reducer(O,{payload:{queryCacheKey:I,patches:k}}){Mo(O,I,D=>{D.data=la(D.data,k.concat())})},prepare:ar()}},extraReducers(O){O.addCase(t.pending,(I,{meta:k,meta:{arg:D}})=>{let N=La(D);h(I,D,N,k)}).addCase(t.fulfilled,(I,{meta:k,payload:D})=>{let N=La(k.arg);S(I,k,D,N)}).addCase(t.rejected,(I,{meta:{condition:k,arg:D,requestId:N},error:$,payload:U})=>{Mo(I,D.queryCacheKey,V=>{if(!k){if(V.requestId!==N)return;V.status="rejected",V.error=U??$}})}).addMatcher(m,(I,k)=>{let{queries:D}=a(k);for(let[N,$]of Object.entries(D))($?.status==="fulfilled"||$?.status==="rejected")&&(I[N]=$)})}}),v=Ut({name:`${e}/mutations`,initialState:yn,reducers:{removeMutationResult:{reducer(O,{payload:I}){let k=vn(I);k in O&&delete O[k]},prepare:ar()}},extraReducers(O){O.addCase(r.pending,(I,{meta:k,meta:{requestId:D,arg:N,startedTimeStamp:$}})=>{N.track&&(I[vn(k)]={requestId:D,status:"pending",endpointName:N.endpointName,startedTimeStamp:$})}).addCase(r.fulfilled,(I,{payload:k,meta:D})=>{D.arg.track&&ll(I,D,N=>{N.requestId===D.requestId&&(N.status="fulfilled",N.data=k,N.fulfilledTimeStamp=D.fulfilledTimeStamp)})}).addCase(r.rejected,(I,{payload:k,error:D,meta:N})=>{N.arg.track&&ll(I,N,$=>{$.requestId===N.requestId&&($.status="rejected",$.error=k??D)})}).addMatcher(m,(I,k)=>{let{mutations:D}=a(k);for(let[N,$]of Object.entries(D))($?.status==="fulfilled"||$?.status==="rejected")&&N!==$?.requestId&&(I[N]=$)})}}),R=Ut({name:`${e}/invalidation`,initialState:yn,reducers:{updateProvidedBy:{reducer(O,I){var N,$;let{queryCacheKey:k,providedTags:D}=I.payload;for(let U of Object.values(O))for(let V of Object.values(U)){let _=V.indexOf(k);_!==-1&&V.splice(_,1)}for(let{type:U,id:V}of D){let _=(N=O[U]??(O[U]={}))[$=V||"__internal_without_id"]??(N[$]=[]);_.includes(k)||_.push(k)}},prepare:ar()}},extraReducers(O){O.addCase(g.actions.removeQueryResult,(I,{payload:{queryCacheKey:k}})=>{for(let D of Object.values(I))for(let N of Object.values(D)){let $=N.indexOf(k);$!==-1&&N.splice($,1)}}).addMatcher(m,(I,k)=>{var N,$;let{provided:D}=a(k);for(let[U,V]of Object.entries(D))for(let[_,B]of Object.entries(V)){let L=(N=I[U]??(I[U]={}))[$=_||"__internal_without_id"]??(N[$]=[]);for(let z of B)L.includes(z)||L.push(z)}}).addMatcher(Ye(ot(t),ln(t)),(I,k)=>{let D=wl(k,"providesTags",o,f),{queryCacheKey:N}=k.meta.arg;R.caseReducers.updateProvidedBy(I,R.actions.updateProvidedBy({queryCacheKey:N,providedTags:D}))})}}),P=Ut({name:`${e}/subscriptions`,initialState:yn,reducers:{updateSubscriptionOptions(O,I){},unsubscribeQueryResult(O,I){},internal_getRTKQSubscriptions(){}}}),w=Ut({name:`${e}/internalSubscriptions`,initialState:yn,reducers:{subscriptionsUpdated:{reducer(O,I){return la(O,I.payload)},prepare:ar()}}}),F=Ut({name:`${e}/config`,initialState:{online:jh(),focused:qh(),middlewareRegistered:!1,...p},reducers:{middlewareRegistered(O,{payload:I}){O.middlewareRegistered=O.middlewareRegistered==="conflict"||i!==I?"conflict":!0}},extraReducers:O=>{O.addCase(Ba,I=>{I.online=!0}).addCase(Al,I=>{I.online=!1}).addCase(Qa,I=>{I.focused=!0}).addCase(bl,I=>{I.focused=!1}).addMatcher(m,I=>({...I}))}}),x=tr({queries:g.reducer,mutations:v.reducer,provided:R.reducer,subscriptions:w.reducer,config:F.reducer}),E=(O,I)=>x(y.match(I)?void 0:O,I),M={...F.actions,...g.actions,...P.actions,...w.actions,...v.actions,...R.actions,resetApiState:y};return{reducer:E,actions:M}}var hn=Symbol.for("RTKQ/skipToken"),xl={status:"uninitialized"},dl=nt(xl,()=>{}),pl=nt(xl,()=>{});function Xh({serializeQueryArgs:e,reducerPath:t,createSelector:r}){let n=x=>dl,o=x=>pl;return{buildQuerySelector:S,buildInfiniteQuerySelector:g,buildMutationSelector:v,selectInvalidatedBy:R,selectCachedArgsForQuery:P,selectApiState:a,selectQueries:m,selectMutations:p,selectQueryEntry:f,selectConfig:y};function i(x){return{...x,...ol(x.status)}}function a(x){return x[t]}function m(x){return a(x)?.queries}function f(x,E){return m(x)?.[E]}function p(x){return a(x)?.mutations}function y(x){return a(x)?.config}function h(x,E,M){return O=>{if(O===hn)return r(n,M);let I=e({queryArgs:O,endpointDefinition:E,endpointName:x});return r(D=>f(D,I)??dl,M)}}function S(x,E){return h(x,E,i)}function g(x,E){let{infiniteQueryOptions:M}=E;function O(I){let k={...I,...ol(I.status)},{isLoading:D,isError:N,direction:$}=k,U=$==="forward",V=$==="backward";return{...k,hasNextPage:w(M,k.data),hasPreviousPage:F(M,k.data),isFetchingNextPage:D&&U,isFetchingPreviousPage:D&&V,isFetchNextPageError:N&&U,isFetchPreviousPageError:N&&V}}return h(x,E,O)}function v(){return x=>{let E;return typeof x=="object"?E=vn(x)??hn:E=x,r(E===hn?o:I=>a(I)?.mutations?.[E]??pl,i)}}function R(x,E){let M=x[t],O=new Set;for(let I of E.filter(No).map(Va)){let k=M.provided[I.type];if(!k)continue;let D=(I.id!==void 0?k[I.id]:al(Object.values(k)))??[];for(let N of D)O.add(N)}return al(Array.from(O.values()).map(I=>{let k=M.queries[I];return k?[{queryCacheKey:I,endpointName:k.endpointName,originalArgs:k.originalArgs}]:[]}))}function P(x,E){return Object.values(m(x)).filter(M=>M?.endpointName===E&&M.status!=="uninitialized").map(M=>M.originalArgs)}function w(x,E){return E?Ua(x,E)!=null:!1}function F(x,E){return!E||!x.getPreviousPageParam?!1:Cl(x,E)!=null}}var fl=WeakMap?new WeakMap:void 0,ml=({endpointName:e,queryArgs:t})=>{let r="",n=fl?.get(t);if(typeof n=="string")r=n;else{let o=JSON.stringify(t,(i,a)=>(a=typeof a=="bigint"?{$bigint:a.toString()}:a,a=Ke(a)?Object.keys(a).sort().reduce((m,f)=>(m[f]=a[f],m),{}):a,a));Ke(t)&&fl?.set(t,o),r=o}return`${e}(${r})`};function Zh(...e){return function(r){let n=or(p=>r.extractRehydrationInfo?.(p,{reducerPath:r.reducerPath??"api"})),o={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...r,extractRehydrationInfo:n,serializeQueryArgs(p){let y=ml;if("serializeQueryArgs"in p.endpointDefinition){let h=p.endpointDefinition.serializeQueryArgs;y=S=>{let g=h(S);return typeof g=="string"?g:ml({...S,queryArgs:g})}}else r.serializeQueryArgs&&(y=r.serializeQueryArgs);return y(p)},tagTypes:[...(r.tagTypes||[])]},i={endpointDefinitions:{},batch(p){p()},apiUid:oo(),extractRehydrationInfo:n,hasRehydrationInfo:or(p=>n(p)!=null)},a={injectEndpoints:f,enhanceEndpoints({addTagTypes:p,endpoints:y}){if(p)for(let h of p)o.tagTypes.includes(h)||o.tagTypes.push(h);if(y)for(let[h,S]of Object.entries(y))typeof S=="function"?S(i.endpointDefinitions[h]):Object.assign(i.endpointDefinitions[h]||{},S);return a}},m=e.map(p=>p.init(a,o,i));function f(p){let y=p.endpoints({query:h=>({...h,type:"query"}),mutation:h=>({...h,type:"mutation"}),infiniteQuery:h=>({...h,type:"infinitequery"})});for(let[h,S]of Object.entries(y)){if(p.overrideExisting!==!0&&h in i.endpointDefinitions){if(p.overrideExisting==="throw")throw new Error(He(39));typeof process<"u";continue}typeof process<"u",i.endpointDefinitions[h]=S;for(let g of m)g.injectEndpoint(h,S)}return a}return a.injectEndpoints({endpoints:r.endpoints})}}function ct(e,...t){return Object.assign(e,...t)}var eS=({api:e,queryThunk:t,internalState:r})=>{let n=`${e.reducerPath}/subscriptions`,o=null,i=null,{updateSubscriptionOptions:a,unsubscribeQueryResult:m}=e.internalActions,f=(g,v)=>{var P,w;if(a.match(v)){let{queryCacheKey:F,requestId:x,options:E}=v.payload;return g?.[F]?.[x]&&(g[F][x]=E),!0}if(m.match(v)){let{queryCacheKey:F,requestId:x}=v.payload;return g[F]&&delete g[F][x],!0}if(e.internalActions.removeQueryResult.match(v))return delete g[v.payload.queryCacheKey],!0;if(t.pending.match(v)){let{meta:{arg:F,requestId:x}}=v,E=g[P=F.queryCacheKey]??(g[P]={});return E[`${x}_running`]={},F.subscribe&&(E[x]=F.subscriptionOptions??E[x]??{}),!0}let R=!1;if(t.fulfilled.match(v)||t.rejected.match(v)){let F=g[v.meta.arg.queryCacheKey]||{},x=`${v.meta.requestId}_running`;R||(R=!!F[x]),delete F[x]}if(t.rejected.match(v)){let{meta:{condition:F,arg:x,requestId:E}}=v;if(F&&x.subscribe){let M=g[w=x.queryCacheKey]??(g[w]={});M[E]=x.subscriptionOptions??M[E]??{},R=!0}}return R},p=()=>r.currentSubscriptions,S={getSubscriptions:p,getSubscriptionCount:g=>{let R=p()[g]??{};return Ar(R)},isRequestSubscribed:(g,v)=>!!p()?.[g]?.[v]};return(g,v)=>{if(o||(o=JSON.parse(JSON.stringify(r.currentSubscriptions))),e.util.resetApiState.match(g))return o=r.currentSubscriptions={},i=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(g))return[!1,S];let R=f(r.currentSubscriptions,g),P=!0;if(R){i||(i=setTimeout(()=>{let x=JSON.parse(JSON.stringify(r.currentSubscriptions)),[,E]=Xn(o,()=>x);v.next(e.internalActions.subscriptionsUpdated(E)),o=x,i=null},500));let w=typeof g.type=="string"&&!!g.type.startsWith(n),F=t.rejected.match(g)&&g.meta.condition&&!!g.meta.arg.subscribe;P=!w&&!F}return[P,!1]}};function tS(e){for(let t in e)return!1;return!0}var rS=2147483647/1e3-1,nS=({reducerPath:e,api:t,queryThunk:r,context:n,internalState:o,selectors:{selectQueryEntry:i,selectConfig:a}})=>{let{removeQueryResult:m,unsubscribeQueryResult:f,cacheEntriesUpserted:p}=t.internalActions,y=Ye(f.match,r.fulfilled,r.rejected,p.match);function h(P){let w=o.currentSubscriptions[P];return!!w&&!tS(w)}let S={},g=(P,w,F)=>{let x=w.getState(),E=a(x);if(y(P)){let M;if(p.match(P))M=P.payload.map(O=>O.queryDescription.queryCacheKey);else{let{queryCacheKey:O}=f.match(P)?P.payload:P.meta.arg;M=[O]}v(M,w,E)}if(t.util.resetApiState.match(P))for(let[M,O]of Object.entries(S))O&&clearTimeout(O),delete S[M];if(n.hasRehydrationInfo(P)){let{queries:M}=n.extractRehydrationInfo(P);v(Object.keys(M),w,E)}};function v(P,w,F){let x=w.getState();for(let E of P){let M=i(x,E);R(E,M?.endpointName,w,F)}}function R(P,w,F,x){let M=n.endpointDefinitions[w]?.keepUnusedDataFor??x.keepUnusedDataFor;if(M===1/0)return;let O=Math.max(0,Math.min(M,rS));if(!h(P)){let I=S[P];I&&clearTimeout(I),S[P]=setTimeout(()=>{h(P)||F.dispatch(m({queryCacheKey:P})),delete S[P]},O*1e3)}}return g},gl=new Error("Promise never resolved before cacheEntryRemoved."),oS=({api:e,reducerPath:t,context:r,queryThunk:n,mutationThunk:o,internalState:i,selectors:{selectQueryEntry:a,selectApiState:m}})=>{let f=no(n),p=no(o),y=ot(n,o),h={};function S(w,F,x){let E=h[w];E?.valueResolved&&(E.valueResolved({data:F,meta:x}),delete E.valueResolved)}function g(w){let F=h[w];F&&(delete h[w],F.cacheEntryRemoved())}let v=(w,F,x)=>{let E=R(w);function M(O,I,k,D){let N=a(x,I),$=a(F.getState(),I);!N&&$&&P(O,D,I,F,k)}if(n.pending.match(w))M(w.meta.arg.endpointName,E,w.meta.requestId,w.meta.arg.originalArgs);else if(e.internalActions.cacheEntriesUpserted.match(w))for(let{queryDescription:O,value:I}of w.payload){let{endpointName:k,originalArgs:D,queryCacheKey:N}=O;M(k,N,w.meta.requestId,D),S(N,I,{})}else if(o.pending.match(w))F.getState()[t].mutations[E]&&P(w.meta.arg.endpointName,w.meta.arg.originalArgs,E,F,w.meta.requestId);else if(y(w))S(E,w.payload,w.meta.baseQueryMeta);else if(e.internalActions.removeQueryResult.match(w)||e.internalActions.removeMutationResult.match(w))g(E);else if(e.util.resetApiState.match(w))for(let O of Object.keys(h))g(O)};function R(w){return f(w)?w.meta.arg.queryCacheKey:p(w)?w.meta.arg.fixedCacheKey??w.meta.requestId:e.internalActions.removeQueryResult.match(w)?w.payload.queryCacheKey:e.internalActions.removeMutationResult.match(w)?vn(w.payload):""}function P(w,F,x,E,M){let O=r.endpointDefinitions[w],I=O?.onCacheEntryAdded;if(!I)return;let k={},D=new Promise(B=>{k.cacheEntryRemoved=B}),N=Promise.race([new Promise(B=>{k.valueResolved=B}),D.then(()=>{throw gl})]);N.catch(()=>{}),h[x]=k;let $=e.endpoints[w].select(O.type==="query"?F:x),U=E.dispatch((B,L,z)=>z),V={...E,getCacheEntry:()=>$(E.getState()),requestId:M,extra:U,updateCachedData:O.type==="query"?B=>E.dispatch(e.util.updateQueryData(w,F,B)):void 0,cacheDataLoaded:N,cacheEntryRemoved:D},_=I(F,V);Promise.resolve(_).catch(B=>{if(B!==gl)throw B})}return v},iS=({api:e,context:{apiUid:t},reducerPath:r})=>(n,o)=>{e.util.resetApiState.match(n)&&o.dispatch(e.internalActions.middlewareRegistered(t)),typeof process<"u"},aS=({reducerPath:e,context:t,context:{endpointDefinitions:r},mutationThunk:n,queryThunk:o,api:i,assertTagType:a,refetchQuery:m,internalState:f})=>{let{removeQueryResult:p}=i.internalActions,y=Ye(ot(n),ln(n)),h=Ye(ot(n,o),Lt(n,o)),S=[],g=(P,w)=>{y(P)?R(wl(P,"invalidatesTags",r,a),w):h(P)?R([],w):i.util.invalidateTags.match(P)&&R(za(P.payload,void 0,void 0,void 0,void 0,a),w)};function v(P){let{queries:w,mutations:F}=P;for(let x of[w,F])for(let E in x)if(x[E]?.status==="pending")return!0;return!1}function R(P,w){let F=w.getState(),x=F[e];if(S.push(...P),x.config.invalidationBehavior==="delayed"&&v(x))return;let E=S;if(S=[],E.length===0)return;let M=i.util.selectInvalidatedBy(F,E);t.batch(()=>{let O=Array.from(M.values());for(let{queryCacheKey:I}of O){let k=x.queries[I],D=f.currentSubscriptions[I]??{};k&&(Ar(D)===0?w.dispatch(p({queryCacheKey:I})):k.status!=="uninitialized"&&w.dispatch(m(k)))}})}return g},sS=({reducerPath:e,queryThunk:t,api:r,refetchQuery:n,internalState:o})=>{let i={},a=(g,v)=>{(r.internalActions.updateSubscriptionOptions.match(g)||r.internalActions.unsubscribeQueryResult.match(g))&&p(g.payload,v),(t.pending.match(g)||t.rejected.match(g)&&g.meta.condition)&&p(g.meta.arg,v),(t.fulfilled.match(g)||t.rejected.match(g)&&!g.meta.condition)&&f(g.meta.arg,v),r.util.resetApiState.match(g)&&h()};function m(g,v){let P=v.getState()[e].queries[g],w=o.currentSubscriptions[g];if(!(!P||P.status==="uninitialized"))return w}function f({queryCacheKey:g},v){let R=v.getState()[e],P=R.queries[g],w=o.currentSubscriptions[g];if(!P||P.status==="uninitialized")return;let{lowestPollingInterval:F,skipPollingIfUnfocused:x}=S(w);if(!Number.isFinite(F))return;let E=i[g];E?.timeout&&(clearTimeout(E.timeout),E.timeout=void 0);let M=Date.now()+F;i[g]={nextPollTimestamp:M,pollingInterval:F,timeout:setTimeout(()=>{(R.config.focused||!x)&&v.dispatch(n(P)),f({queryCacheKey:g},v)},F)}}function p({queryCacheKey:g},v){let P=v.getState()[e].queries[g],w=o.currentSubscriptions[g];if(!P||P.status==="uninitialized")return;let{lowestPollingInterval:F}=S(w);if(!Number.isFinite(F)){y(g);return}let x=i[g],E=Date.now()+F;(!x||E<x.nextPollTimestamp)&&f({queryCacheKey:g},v)}function y(g){let v=i[g];v?.timeout&&clearTimeout(v.timeout),delete i[g]}function h(){for(let g of Object.keys(i))y(g)}function S(g={}){let v=!1,R=Number.POSITIVE_INFINITY;for(let P in g)g[P].pollingInterval&&(R=Math.min(g[P].pollingInterval,R),v=g[P].skipPollingIfUnfocused||v);return{lowestPollingInterval:R,skipPollingIfUnfocused:v}}return a},cS=({api:e,context:t,queryThunk:r,mutationThunk:n})=>{let o=ro(r,n),i=Lt(r,n),a=ot(r,n),m={};return(p,y)=>{if(o(p)){let{requestId:h,arg:{endpointName:S,originalArgs:g}}=p.meta,v=t.endpointDefinitions[S],R=v?.onQueryStarted;if(R){let P={},w=new Promise((M,O)=>{P.resolve=M,P.reject=O});w.catch(()=>{}),m[h]=P;let F=e.endpoints[S].select(v.type==="query"?g:h),x=y.dispatch((M,O,I)=>I),E={...y,getCacheEntry:()=>F(y.getState()),requestId:h,extra:x,updateCachedData:v.type==="query"?M=>y.dispatch(e.util.updateQueryData(S,g,M)):void 0,queryFulfilled:w};R(g,E)}}else if(a(p)){let{requestId:h,baseQueryMeta:S}=p.meta;m[h]?.resolve({data:p.payload,meta:S}),delete m[h]}else if(i(p)){let{requestId:h,rejectedWithValue:S,baseQueryMeta:g}=p.meta;m[h]?.reject({error:p.payload??p.error,isUnhandledError:!S,meta:g}),delete m[h]}}},uS=({reducerPath:e,context:t,api:r,refetchQuery:n,internalState:o})=>{let{removeQueryResult:i}=r.internalActions,a=(f,p)=>{Qa.match(f)&&m(p,"refetchOnFocus"),Ba.match(f)&&m(p,"refetchOnReconnect")};function m(f,p){let y=f.getState()[e],h=y.queries,S=o.currentSubscriptions;t.batch(()=>{for(let g of Object.keys(S)){let v=h[g],R=S[g];if(!R||!v)continue;(Object.values(R).some(w=>w[p]===!0)||Object.values(R).every(w=>w[p]===void 0)&&y.config[p])&&(Ar(R)===0?f.dispatch(i({queryCacheKey:g})):v.status!=="uninitialized"&&f.dispatch(n(v)))}})}return a};function lS(e){let{reducerPath:t,queryThunk:r,api:n,context:o}=e,{apiUid:i}=o,a={invalidateTags:T(`${t}/invalidateTags`)},m=h=>h.type.startsWith(`${t}/`),f=[iS,nS,aS,sS,oS,cS];return{middleware:h=>{let S=!1,v={...e,internalState:{currentSubscriptions:{}},refetchQuery:y,isThisApiSliceAction:m},R=f.map(F=>F(v)),P=eS(v),w=uS(v);return F=>x=>{if(!zn(x))return F(x);S||(S=!0,h.dispatch(n.internalActions.middlewareRegistered(i)));let E={...h,next:F},M=h.getState(),[O,I]=P(x,E,M),k;if(O?k=F(x):k=I,h.getState()[t]&&(w(x,E,M),m(x)||o.hasRehydrationInfo(x)))for(let D of R)D(x,E,M);return k}},actions:a};function y(h){return e.api.endpoints[h.endpointName].initiate(h.originalArgs,{subscribe:!1,forceRefetch:!0})}}var yl=Symbol(),dS=({createSelector:e=se}={})=>({name:yl,init(t,{baseQuery:r,tagTypes:n,reducerPath:o,serializeQueryArgs:i,keepUnusedDataFor:a,refetchOnMountOrArgChange:m,refetchOnFocus:f,refetchOnReconnect:p,invalidationBehavior:y},h){Jc();let S=ee=>(typeof process<"u",ee);Object.assign(t,{reducerPath:o,endpoints:{},internalActions:{onOnline:Ba,onOffline:Al,onFocus:Qa,onFocusLost:bl},util:{}});let g=Xh({serializeQueryArgs:i,reducerPath:o,createSelector:e}),{selectInvalidatedBy:v,selectCachedArgsForQuery:R,buildQuerySelector:P,buildInfiniteQuerySelector:w,buildMutationSelector:F}=g;ct(t.util,{selectInvalidatedBy:v,selectCachedArgsForQuery:R});let{queryThunk:x,infiniteQueryThunk:E,mutationThunk:M,patchQueryData:O,updateQueryData:I,upsertQueryData:k,prefetch:D,buildMatchThunkActions:N}=Yh({baseQuery:r,reducerPath:o,context:h,api:t,serializeQueryArgs:i,assertTagType:S,selectors:g}),{reducer:$,actions:U}=Jh({context:h,queryThunk:x,infiniteQueryThunk:E,mutationThunk:M,serializeQueryArgs:i,reducerPath:o,assertTagType:S,config:{refetchOnFocus:f,refetchOnReconnect:p,refetchOnMountOrArgChange:m,keepUnusedDataFor:a,reducerPath:o,invalidationBehavior:y}});ct(t.util,{patchQueryData:O,updateQueryData:I,upsertQueryData:k,prefetch:D,resetApiState:U.resetApiState,upsertQueryEntries:U.cacheEntriesUpserted}),ct(t.internalActions,U);let{middleware:V,actions:_}=lS({reducerPath:o,context:h,queryThunk:x,mutationThunk:M,infiniteQueryThunk:E,api:t,assertTagType:S,selectors:g});ct(t.util,_),ct(t,{reducer:$,middleware:V});let{buildInitiateQuery:B,buildInitiateInfiniteQuery:L,buildInitiateMutation:z,getRunningMutationThunk:G,getRunningMutationsThunk:Y,getRunningQueriesThunk:te,getRunningQueryThunk:ce}=Wh({queryThunk:x,mutationThunk:M,infiniteQueryThunk:E,api:t,serializeQueryArgs:i,context:h});return ct(t.util,{getRunningMutationThunk:G,getRunningMutationsThunk:Y,getRunningQueryThunk:ce,getRunningQueriesThunk:te}),{name:yl,injectEndpoint(ee,re){var ye;let oe=(ye=t.endpoints)[ee]??(ye[ee]={});$a(re)&&ct(oe,{name:ee,select:P(ee,re),initiate:B(ee,re)},N(x,ee)),Hh(re)&&ct(oe,{name:ee,select:F(),initiate:z(ee)},N(M,ee)),Ha(re)&&ct(oe,{name:ee,select:w(ee,re),initiate:L(ee,re)},N(x,ee))}}}}),Rl=Zh(dS());d();c();l();u();var _o=se(e=>e.query,e=>e),El=se(e=>e.query?.enableQuerySyntax,e=>e);var Jk=se(e=>_o(e)?.q,e=>e.search.requestId,e=>e.generatedAnswer.cannotAnswer,e=>e.configuration.analytics.analyticsMode,e=>e.search.searchAction?.actionCause,(e,t,r,n,o)=>({q:e,requestId:t,cannotAnswer:r,analyticsMode:n,actionCause:o})),Il=se(e=>e.generatedAnswer?.answerApiQueryParams,e=>e??hn);d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();var Pl=/^(?:[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 pS(e){return typeof e=="string"&&Pl.test(e)}var Ga=pS;d();c();l();u();var Re=[];for(let e=0;e<256;++e)Re.push((e+256).toString(16).slice(1));function kl(e,t=0){return(Re[e[t+0]]+Re[e[t+1]]+Re[e[t+2]]+Re[e[t+3]]+"-"+Re[e[t+4]]+Re[e[t+5]]+"-"+Re[e[t+6]]+Re[e[t+7]]+"-"+Re[e[t+8]]+Re[e[t+9]]+"-"+Re[e[t+10]]+Re[e[t+11]]+Re[e[t+12]]+Re[e[t+13]]+Re[e[t+14]]+Re[e[t+15]]).toLowerCase()}d();c();l();u();var Wa,fS=new Uint8Array(16);function Ka(){if(!Wa){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Wa=crypto.getRandomValues.bind(crypto)}return Wa(fS)}d();c();l();u();d();c();l();u();var mS=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ya={randomUUID:mS};function gS(e,t,r){if(Ya.randomUUID&&!t&&!e)return Ya.randomUUID();e=e||{};let n=e.random??e.rng?.()??Ka();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){if(r=r||0,r<0||r+16>t.length)throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`);for(let o=0;o<16;++o)t[r+o]=n[o];return t}return kl(n)}var Ja=gS;d();c();l();u();function Fl(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}function yS({config:e,environment:t,event:r,listenerManager:n}){let{url:o,token:i,mode:a}=e;a!=="disabled"&&(n.call(r),t.send(o,i,r))}var Ol="visitorId";function hS(e){return{getClientId:()=>{let t=e.get(),r=t.storage,n=r.getItem(Ol),o=n&&Ga(n)?n:t.generateUUID();return r.setItem(Ol,o),o}}}var Ml="1.2.7",Xa=128,Nl=192,Tl=224,Dl=240,SS=248;function vS(e){return(e&SS)===Dl?4:(e&Dl)===Tl?3:(e&Tl)===Nl?2:1}function bS(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&Xa)!=Xa)break;if(r-=3,(n&Nl)!=Xa){t-r>=vS(n)*3&&(r=t);break}}return e.substring(0,r)}function AS(e){let{trackingId:t}=e;return{trackingId:t}}function CS(e){return(e.source||[]).concat([`relay@${Ml}`])}function _l(e,t,r,n){let{getReferrer:o,getLocation:i,getUserAgent:a}=r,m=AS(t),f=n.getClientId();return Object.freeze({type:e,config:m,ts:Date.now(),source:CS(t),clientId:f,userAgent:a(),referrer:ql(o()),location:ql(i())})}function ql(e){return e!==null?bS(e,1024):null}function wS(e,t,r,n,o){return{...t,meta:_l(e,r,n,o)}}var xS="*";function RS(){let e=[];function t({type:f,callback:p}){return e.findIndex(y=>y.type===f&&y.callback===p)}function r(f,p){return f.type==="*"||p===f.type}function n(f){return t(f)<0&&e.push(f),()=>m(f.type,f.callback)}function o(f){e.forEach(p=>{if(r(p,f.meta.type))try{p.callback(f)}catch(y){console.error(y)}})}function i(f){if(f===xS)e.length=0;else for(let p=e.length-1;p>=0;p--)e[p].type===f&&e.splice(p,1)}function a(f){let p=t(f);p>=0&&e.splice(p,1)}function m(f,p){p?a({type:f,callback:p}):i(f)}return{add:n,call:o,remove:m}}function jl({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 ES(e){let t=jl(e);return{get:()=>t,update:r=>{t=jl({...t,...r})}}}var Za=IS();function IS(){let e="coveo_",t=r=>{let n=r.split(".").slice(-2);return n.length==2?n.join("."):""};return{getItem(r){let n=`${e}${r}=`,o=document.cookie.split(";");for(let i of o){let a=i.replace(/^\s+/,"");if(a.lastIndexOf(n,0)===0)return a.substring(n.length,a.length)}return null},setItem(r,n,o){let i=t(window.location.hostname),a=`;expires=${new Date(new Date().getTime()+o).toUTCString()}`,m=i?`;domain=${i}`:"";document.cookie=`${e}${r}=${n}${a}${m};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function PS(){return{getItem(e){return Za.getItem(e)||localStorage.getItem(e)},removeItem(e){Za.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),Za.setItem(e,t,31556952e3)}}}function kS(){let e=document.referrer;return e===""?null:e}function es(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(Fl().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:()=>kS(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>Ja(),storage:PS()}}function FS(){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 OS(){return{getItem(){return null},removeItem(){},setItem(){}}}function TS(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:OS()}}function DS(e){let t=e.get().mode!=="disabled",r=e.get().environment,n=TS();return t&&r?{storage:n.storage,...r,runtime:"custom"}:t&&qS()&&FS()?es():n}function qS(){try{return typeof window=="object"}catch{return!1}}function jS(e){return{get:()=>Object.freeze(DS(e))}}function Vl(e){let t=ES(e),r=RS(),n=jS(t),o=hS(n);return{emit:(i,a)=>{let m=t.get(),f=n.get(),p=wS(i,a,m,f,o);return yS({config:m,environment:f,event:p,listenerManager:r})},getMeta:i=>_l(i,t.get(),n.get(),o),on:(i,a)=>r.add({type:i,callback:a}),off:(i,a)=>r.remove(i,a),updateConfig:i=>t.update(i),version:Ml}}d();c();l();u();function Ll(){return typeof window<"u"&&typeof document<"u"}var bn=se(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>yr(e.configuration.analytics),(e,t)=>t,(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:i},a,m)=>{let f=NS(m);return Vl({mode:i?"emit":"disabled",url:o??Vn(e,t),token:r,trackingId:n??null,source:a,environment:f})}),MS={generateUUID:()=>"",getLocation:()=>null,getReferrer:()=>null,getUserAgent:()=>null,send:()=>{},storage:{getItem:()=>null,setItem:()=>{},removeItem:()=>{}}},NS=e=>{if(!e)return;let t=e();return{...(Ll()?es():MS),generateUUID:()=>t.clientId,getLocation:()=>t.location,getReferrer:()=>t.referrer,getUserAgent:()=>t.userAgent}};d();c();l();u();d();c();l();u();d();c();l();u();var wr=()=>"default";var _S=e=>{let t=e.configuration.search.locale.split("-")[0];return!t||t.length!==2?"en":t},ut=class{constructor(t){this.getState=t;pe(this,"state");this.state=t()}getLanguage(){return _S(this.state)}getBaseMetadata(){let{context:t,configuration:r}=this.state,n=t?.contextValues||{},o={};for(let[i,a]of Object.entries(n)){let m=`context_${i}`;o[m]=a}return r.analytics.analyticsMode==="legacy"&&(o.coveoHeadlessVersion=sr),o}getOriginContext(){return this.state.configuration.analytics.originContext}getOriginLevel1(){return this.state.searchHub||wr()}getOriginLevel2(){return this.state.configuration.analytics.originLevel2}getOriginLevel3(){return this.state.configuration.analytics.originLevel3}getIsAnonymous(){return this.state.configuration.analytics.anonymous}};var An=class extends ut{getSearchUID(){return this.state.documentSuggestion?.status.lastResponseId??""}},Ul=({logger:e,getState:t,analyticsClientMiddleware:r=(i,a)=>a,preprocessRequest:n,provider:o=new An(t)})=>{let i=t(),a=i.configuration.accessToken,m=i.configuration.analytics.apiBaseUrl??Pe(i.configuration.organizationId,i.configuration.environment,"analytics"),f=i.configuration.analytics.runtimeEnvironment,p=i.configuration.analytics.enabled,y=new ko({enableAnalytics:p,token:a,endpoint:m,runtimeEnvironment:f,preprocessRequest:mn(e,n),beforeSendHooks:[gn(e,r),(h,S)=>(e.info({...S,type:h,endpoint:m,token:a},"Analytics request"),S)]},o);return p||y.disable(),y};d();c();l();u();d();c();l();u();var Ne=()=>({q:"",enableQuerySyntax:!1});d();c();l();u();function Ql(e,t){return{...new vt(t).getBaseMetadata(),actionCause:e,type:e}}function VS(e){return Object.assign(e,{instantlyCallable:!0})}function LS(e,t){let r=i=>VS(le(e,i)),n=r(/*#__PURE__*/function(){var _ref1=_asyncToGenerator(function*(i,{getState:a,extra:m}){let{analyticsClientMiddleware:f,preprocessRequest:p,logger:y}=m;return yield(yield t({getState:a,analyticsClientMiddleware:f,preprocessRequest:p,logger:y})).log({state:a(),extra:m})});return function(_x22,_x23){return _ref1.apply(this,arguments)}}());return Object.assign(n,{prepare:function(){var _ref10=_asyncToGenerator(function*({getState:i,analyticsClientMiddleware:a,preprocessRequest:m,logger:f}){let{description:p,log:y}=yield t({getState:i,analyticsClientMiddleware:a,preprocessRequest:m,logger:f});return{description:p,action:r(/*#__PURE__*/function(){var _ref11=_asyncToGenerator(function*(h,{getState:S,extra:g}){return yield y({state:S(),extra:g})});return function(_x25,_x26){return _ref11.apply(this,arguments)}}())}});return function prepare(_x24){return _ref10.apply(this,arguments)}}()}),n}var Bl=(e,t,r)=>{function n(...o){let i=o.length===1?{...o[0],__legacy__getBuilder:t(o[0].__legacy__getBuilder),analyticsConfigurator:e,providerClass:r}:{prefix:o[0],__legacy__getBuilder:t(o[1]),__legacy__provider:o[2],analyticsConfigurator:e,providerClass:r};return BS(i)}return n},US=e=>e.configuration.analytics.analyticsMode==="legacy",QS=e=>e.configuration.analytics.analyticsMode==="next",BS=({prefix:e,__legacy__getBuilder:t,__legacy__provider:r,analyticsPayloadBuilder:n,analyticsType:o,analyticsConfigurator:i,providerClass:a})=>(r??(r=m=>new a(m)),LS(e,/*#__PURE__*/function(){var _ref12=_asyncToGenerator(function*({getState:m,analyticsClientMiddleware:f,preprocessRequest:p,logger:y}){let h=[],S={log:function(){var _ref13=_asyncToGenerator(function*({state:w}){for(let F of h)yield F(w)});return function log(_x28){return _ref13.apply(this,arguments)}}()},g=m(),v=i({getState:m,logger:y,analyticsClientMiddleware:f,preprocessRequest:p,provider:r(m)}),R=yield t(v,m());S.description=R?.description,h.push(/*#__PURE__*/function(){var _ref14=_asyncToGenerator(function*(w){US(w)&&(yield $S(R,r,w,y,v.coveoAnalyticsClient))});return function(_x29){return _ref14.apply(this,arguments)}}());let{emit:P}=bn(g);return h.push(/*#__PURE__*/function(){var _ref15=_asyncToGenerator(function*(w){if(QS(w)&&o&&n){let F=n(w);yield JS(P,o,F)}});return function(_x30){return _ref15.apply(this,arguments)}}()),S});return function(_x27){return _ref12.apply(this,arguments)}}()));function $S(_x31,_x32,_x33,_x34,_x35){return _$S.apply(this,arguments)}function _$S(){_$S=_asyncToGenerator(function*(e,t,r,n,o){t(()=>r);let i=yield e?.log({searchUID:t(()=>r).getSearchUID()});n.info({client:o,response:i},"Analytics response")});return _$S.apply(this,arguments)}var HS=e=>r=>(n,o)=>Promise.resolve({description:{actionCause:e},log:function(){var _ref16=_asyncToGenerator(function*(i){r(n,o)});return function log(_x36){return _ref16.apply(this,arguments)}}()}),je=Bl(e=>zl({...e,provider:e.provider||new vt(e.getState)}),e=>e,vt),wT=Bl(Ul,HS("caseAssist"),An);var ts=(e,t)=>{let r=t.recommendation?.recommendations.findIndex(({uniqueId:n})=>e.uniqueId===n)||0;return zS(e,r,t)};function zS(e,t,r){let n=e.raw.collection;return{collectionName:typeof n=="string"?n:"default",documentAuthor:KS(e),documentPosition:t+1,documentTitle:e.title,documentUri:e.uri,documentUriHash:e.raw.urihash,documentUrl:e.clickUri,rankingModifier:e.rankingModifier||"",sourceName:YS(e),queryPipeline:r.pipeline||pr()}}var Vo=e=>(e.raw.permanentid||console.warn("Missing field permanentid on result. This might cause many issues with your Coveo deployment. See https://docs.coveo.com/en/1913 and https://docs.coveo.com/en/1640 for more information.",e),{contentIDKey:"permanentid",contentIDValue:e.raw.permanentid||""}),$l={urihash:new H,sourcetype:new H,permanentid:new H},Hl={uniqueId:W,raw:new K({values:$l}),title:W,uri:W,clickUri:W,rankingModifier:new H({required:!1,emptyAllowed:!0})};function GS(e){return Object.assign({},...Object.keys($l).map(t=>({[t]:e[t]})))}function WS(e){return Object.assign({},...Object.keys(Hl).map(t=>({[t]:e[t]})),{raw:GS(e.raw)})}function KS(e){let t=e.raw.author;return X(t)?"unknown":Array.isArray(t)?t.join(";"):`${t}`}function YS(e){let t=e.raw.source;return X(t)?"unknown":t}var rs=e=>new Fe(Hl).validate(WS(e));function JS(_x37,_x38,_x39){return _JS.apply(this,arguments)}function _JS(){_JS=_asyncToGenerator(function*(e,t,r){yield e(t,r)});return _JS.apply(this,arguments)}d();c();l();u();var Uo=e=>je({prefix:"analytics/generatedAnswer/streamEnd",__legacy__getBuilder:(t,r)=>{let n=xr(r),o=e?!r.generatedAnswer?.answer||!r.generatedAnswer?.answer.length:void 0;return n?t.makeGeneratedAnswerStreamEnd({generativeQuestionAnsweringId:n,answerGenerated:e,answerTextIsEmpty:o}):null},analyticsType:"Rga.AnswerReceived",analyticsPayloadBuilder:t=>({answerId:xr(t)??"",answerGenerated:e??!1})});d();c();l();u();d();c();l();u();var Gl=se(e=>e.advancedSearchQueries,e=>{if(!e)return{};let{aq:t,cq:r,dq:n,lq:o}=e;return{...(t&&{aq:t}),...(r&&{cq:r}),...(n&&{dq:n}),...(o&&{lq:o})}});d();c();l();u();var Qo=(e,t,r)=>({analytics:{clientId:t.clientId,clientTimestamp:new Date().toISOString(),documentReferrer:t.referrer,documentLocation:t.location,originContext:e.originContext,...(r&&{actionCause:r.actionCause}),...(r&&{customData:r.customData}),...(e.userDisplayName&&{userDisplayName:e.userDisplayName}),...(e.deviceId&&{deviceId:e.deviceId}),...(e.trackingId&&{trackingId:e.trackingId}),capture:t.capture??t.clientId!=="",source:yr(e)}});d();c();l();u();var Wl=se(e=>e.context,e=>e);d();c();l();u();var Kl=se(e=>e.pipeline,e=>e);d();c();l();u();d();c();l();u();var Cn=Be(Bo(),1),td=Be(Yl(),1);d();c();l();u();var $o=Be(Bo(),1),Xl=Be(Jl(),1);$o.default.extend(Xl.default);var Zl="YYYY/MM/DD@HH:mm:ss",ZS="1401-01-01";function Rr(e,t){let r=(0,$o.default)(e,t);return!r.isValid()&&!t?(0,$o.default)(e,Zl):r}function Ho(e){return e.format(Zl)}function ed(e,t){let r=Rr(e,t);if(!r.isValid()){let n=". Please provide a date format string in the configuration options. See https://day.js.org/docs/en/parse/string-format for more information.",o=` with the format "${t}"`;throw new Error(`Could not parse the provided date "${e}"${t?o:n}`)}us(r)}function us(e){if(e.isBefore(ZS))throw new Error(`Date is before year 1401, which is unsupported by the API: ${e}`)}Cn.default.extend(td.default);var rd=["past","now","next"],nd=["minute","hour","day","week","month","quarter","year"],ev=e=>{let t=e==="now";return{amount:new J({required:!t,min:1}),unit:new H({required:!t,constrainTo:nd}),period:new H({required:!0,constrainTo:rd})}};function ls(e){if(typeof e=="string"&&!bt(e))throw new Error(`The value "${e}" is not respecting the relative date format "period-amount-unit"`);let t=typeof e=="string"?cd(e):e;new Fe(ev(t.period)).validate(t);let r=id(t),n=JSON.stringify(t);if(!r.isValid())throw new Error(`Date is invalid: ${n}`);us(r)}function od(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":case"next":return`${t}-${r}-${n}`;case"now":return t}}function id(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":return(0,Cn.default)().subtract(r,n);case"next":return(0,Cn.default)().add(r,n);case"now":return(0,Cn.default)()}}function wn(e){return Ho(id(cd(e)))}function ad(e){return e.toLocaleLowerCase().split("-")}function bt(e){let[t,r,n]=ad(e);if(t==="now")return!0;if(!rd.includes(t)||!nd.includes(n))return!1;let o=parseInt(r);return!(Number.isNaN(o)||o<=0)}function sd(e){return!!e&&typeof e=="object"&&"period"in e}function cd(e){let[t,r,n]=ad(e);return t==="now"?{period:"now"}:{period:t,amount:r?parseInt(r):void 0,unit:n||void 0}}d();c();l();u();function ud(e){return e.type==="dateRange"}function ld(e){return`start${e}`}function dd(e){return`end${e}`}var ds=()=>({dateFacetValueMap:{}});function tv(e,t,r){let n=e.start,o=e.end;return bt(n)&&(n=wn(n),r.dateFacetValueMap[t][ld(n)]=e.start),bt(o)&&(o=wn(o),r.dateFacetValueMap[t][dd(o)]=e.end),{...e,start:n,end:o}}function ps(e,t){if(ud(e)){let{facetId:r,currentValues:n}=e;return t.dateFacetValueMap[r]={},{...e,currentValues:n.map(o=>tv(o,r,t))}}return e}function At(e){let t=ds();return{request:{...e,facets:e.facets?.map(n=>ps(n,t))},mappings:t}}function rv(e,t,r){return{...e,start:r.dateFacetValueMap[t][ld(e.start)]||e.start,end:r.dateFacetValueMap[t][dd(e.end)]||e.end}}function nv(e,t){return e.facetId in t.dateFacetValueMap}function ov(e,t){return nv(e,t)?{...e,values:e.values.map(r=>rv(r,e.facetId,t))}:e}function zo(e,t){return"success"in e?{success:{...e.success,facets:e.success.facets?.map(n=>ov(n,t))}}:e}d();c();l();u();d();c();l();u();d();c();l();u();function Ct(e){return Object.values(e).map(t=>t.request)}function fs(e,t){let r={};e.forEach(i=>{r[i.facetId]=i});let n=[];t.forEach(i=>{i in r&&(n.push(r[i]),delete r[i])});let o=Object.values(r);return[...n,...o]}function pd(e){return Ct(e).map(t=>{let n=t.currentValues.some(({state:o})=>o!=="idle");return t.generateAutomaticRanges&&!n?{...t,currentValues:[]}:t})}var ms={alphanumericDescending:{type:"alphanumeric",order:"descending"},alphanumericNaturalDescending:{type:"alphanumericNatural",order:"descending"}};function iv(e){return Ct(e).map(t=>{let r=ms[t.sortCriteria];return r?{...t,sortCriteria:r}:t})}function av(e){return[...iv(e.facetSet??{}),...pd(e.numericFacetSet??{}),...pd(e.dateFacetSet??{}),...Ct(e.categoryFacetSet??{})]}function sv(e){return av(e).filter(({facetId:t})=>e.facetOptions?.facets[t]?.enabled??!0)}function Go(e){return fs(sv(e),e.facetOrder??[])}d();c();l();u();d();c();l();u();var wt=/*#__PURE__*/function(){var _ref17=_asyncToGenerator(function*(e,t){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??pt(e.configuration.organizationId,e.configuration.environment),locale:e.configuration.search.locale,debug:e.debug,tab:e.configuration.analytics.originLevel2,referrer:e.configuration.analytics.originLevel3,timezone:e.configuration.search.timezone,...(e.configuration.analytics.enabled&&{actionsHistory:Le.getInstance().getHistory()}),...(e.advancedSearchQueries?.aq&&{aq:e.advancedSearchQueries.aq}),...(e.advancedSearchQueries?.cq&&{cq:e.advancedSearchQueries.cq}),...(e.advancedSearchQueries?.lq&&{lq:e.advancedSearchQueries.lq}),...(e.advancedSearchQueries?.dq&&{dq:e.advancedSearchQueries.dq}),...(e.context&&{context:e.context.contextValues}),...(e.fields&&!e.fields.fetchAllFields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues}),...(e.pipeline&&{pipeline:e.pipeline}),...(e.query&&{q:e.query.q,enableQuerySyntax:e.query.enableQuerySyntax}),...(e.searchHub&&{searchHub:e.searchHub}),...(e.sortCriteria&&{sortCriteria:e.sortCriteria}),...(e.configuration.analytics.enabled&&(yield Wo(e.configuration.analytics,t))),...(e.excerptLength&&!X(e.excerptLength.length)&&{excerptLength:e.excerptLength.length}),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")})}});return function wt(_x40,_x41){return _ref17.apply(this,arguments)}}();d();c();l();u();var Er=(e,t,r)=>({accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??pt(e.configuration.organizationId,e.configuration.environment),locale:e.configuration.search.locale,debug:e.debug,tab:e.configuration.analytics.originLevel2,referrer:t.referrer,timezone:e.configuration.search.timezone,...(e.advancedSearchQueries?.aq&&{aq:e.advancedSearchQueries.aq}),...(e.advancedSearchQueries?.cq&&{cq:e.advancedSearchQueries.cq}),...(e.advancedSearchQueries?.lq&&{lq:e.advancedSearchQueries.lq}),...(e.advancedSearchQueries?.dq&&{dq:e.advancedSearchQueries.dq}),...(e.context&&{context:e.context.contextValues}),...(e.fields&&!e.fields.fetchAllFields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues}),...(e.pipeline&&{pipeline:e.pipeline}),...(e.query&&{q:e.query.q,enableQuerySyntax:e.query.enableQuerySyntax}),...(e.searchHub&&{searchHub:e.searchHub}),...(e.sortCriteria&&{sortCriteria:e.sortCriteria}),...(e.configuration.analytics.enabled&&Qo(e.configuration.analytics,t,r)),...(e.excerptLength&&!X(e.excerptLength.length)&&{excerptLength:e.excerptLength.length}),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")})});d();c();l();u();var fd=se(e=>e.staticFilterSet,e=>Object.values(e||{}).map(r=>{let n=r.values.filter(i=>i.state==="selected"&&!!i.expression.trim()),o=n.map(i=>i.expression).join(" OR ");return n.length>1?`(${o})`:o}));var xt=/*#__PURE__*/function(){var _ref18=_asyncToGenerator(function*(e,t,r){let n=ys(e),o=cv(e),i=uv(e),a=e.configuration.analytics.analyticsMode==="legacy"?yield wt(e,r):Er(e,t,r);return At({...a,...(e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="next",options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="legacy"}),...(n&&{cq:n}),...(o.length&&{facets:o}),...(e.pagination&&{numberOfResults:gs(e),firstResult:e.pagination.firstResult}),...(e.facetOptions&&{facetOptions:{freezeFacetOrder:e.facetOptions.freezeFacetOrder}}),...(e.folding?.enabled&&{filterField:e.folding.fields.collection,childField:e.folding.fields.parent,parentField:e.folding.fields.child,filterFieldRange:e.folding.filterFieldRange}),...(e.automaticFacetSet&&{generateAutomaticFacets:{desiredCount:e.automaticFacetSet.desiredCount,numberOfValues:e.automaticFacetSet.numberOfValues,currentFacets:i}}),...(e.generatedAnswer&&{pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:e.generatedAnswer.fieldsToIncludeInCitations}}})})});return function xt(_x42,_x43,_x44){return _ref18.apply(this,arguments)}}();function gs(e){return e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0}function cv(e){return fs(dv(e),e.facetOrder??[])}function uv(e){let t=e.automaticFacetSet?.set;return t?Object.values(t).map(r=>r.response).map(lv).filter(r=>r.currentValues.length>0):void 0}function lv(e){let{field:t,label:r,values:n}=e,o=n.filter(i=>i.state==="selected");return{field:t,label:r,currentValues:o}}function dv(e){return pv(e).filter(({facetId:t})=>e.facetOptions?.facets[t]?.enabled??!0)}function pv(e){return[...fv(e.facetSet??{}),...md(e.numericFacetSet??{}),...md(e.dateFacetSet??{}),...Ct(e.categoryFacetSet??{})]}function fv(e){return Ct(e).map(t=>{let r=ms[t.sortCriteria];return r?{...t,sortCriteria:r}:t})}function md(e){return Ct(e).map(t=>{let r=t.currentValues,n=r.some(({state:i})=>i!=="idle"),o=r.some(i=>i.previousState);return t.generateAutomaticRanges&&!n&&!o?{...t,currentValues:[]}:t})}function ys(e){let t=e.advancedSearchQueries?.cq.trim()||"",n=Object.values(e.tabSet||{}).find(i=>i.isActive)?.expression.trim()||"",o=fd(e);return[t,n,...o].filter(i=>!!i).join(" AND ")}d();c();l();u();d();c();l();u();var xn=(e,t)=>{let r=e;return X(r[t])?X(e.raw[t])?null:e.raw[t]:r[t]},mv=e=>t=>e.every(r=>!X(xn(t,r))),gv=e=>t=>e.every(r=>X(xn(t,r))),yv=(e,t)=>r=>{let n=gd(e,r);return t.some(o=>n.some(i=>`${i}`.toLowerCase()===o.toLowerCase()))},hv=(e,t)=>r=>{let n=gd(e,r);return t.every(o=>n.every(i=>`${i}`.toLowerCase()!==o.toLowerCase()))},gd=(e,t)=>{let r=xn(t,e);return hc(r)?r:[r]},yd={getResultProperty:xn,fieldsMustBeDefined:mv,fieldsMustNotBeDefined:gv,fieldMustMatch:yv,fieldMustNotMatch:hv};var hd=se(e=>e.search,e=>e?.searchAction?.actionCause||"");d();c();l();u();var Sd=se(e=>e.searchHub,e=>e);d();c();l();u();var hs=se(e=>e,e=>{if(!e)return"";for(let t in e)if(e[t].isActive)return e[t].id;return""}),mq=se(e=>e,e=>{let t=hs(e);return t&&e?e[t].expression:""});d();c();l();u();var vd=se(e=>e.configuration.search.locale,e=>e),bd=se(e=>e.configuration.search.timezone,e=>e);d();c();l();u();var Ad=e=>{if(!(!e.dictionaryFieldContext||!Object.keys(e.dictionaryFieldContext.contextValues).length))return e.dictionaryFieldContext.contextValues};d();c();l();u();var Cd=se(e=>e.excerptLength?.length,e=>e);d();c();l();u();var wd=e=>{let{freezeFacetOrder:t}=e.facetOptions??{};return t!==void 0?{freezeFacetOrder:t}:void 0};d();c();l();u();var xd=e=>{if(e.folding)return{filterField:e.folding.fields.collection,childField:e.folding.fields.parent,parentField:e.folding.fields.child,filterFieldRange:e.folding.filterFieldRange}};d();c();l();u();var Rd=se(e=>e.sortCriteria,e=>e);var Ed=/*#__PURE__*/function(){var _ref19=_asyncToGenerator(function*(e){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:Pe(e.configuration.organizationId,e.configuration.environment),streamId:e.search.extendedResults?.generativeQuestionAnsweringId}});return function Ed(_x45){return _ref19.apply(this,arguments)}}(),Id=(e,t)=>{let r=_o(e)?.q,{aq:n,cq:o,dq:i,lq:a}=bv(e),m=Wl(e),f=Qo(e.configuration.analytics,t,{actionCause:hd(e)}),p=Sd(e),y=Kl(e),h=Pd(e)??[],S=Sv(e),g=hs(e.tabSet)||"default",v=vd(e),R=bd(e),P=t.referrer||"",w=wd(e),F=Rd(e),x=vv(e),E=Cd(e),M=xd(e),O=Ad(e);return{q:r,...(n&&{aq:n}),...(o&&{cq:o}),...(i&&{dq:i}),...(a&&{lq:a}),...(e.query&&{enableQuerySyntax:El(e)}),...(m?.contextValues&&{context:m.contextValues}),pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:h}},...(p?.length&&{searchHub:p}),...(y?.length&&{pipeline:y}),...(Object.keys(S).length&&{facets:S}),...(e.fields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="next",options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="legacy"}),...(e.pagination&&{numberOfResults:gs(e),firstResult:e.pagination.firstResult}),tab:g,locale:v,timezone:R,...(e.debug!==void 0&&{debug:e.debug}),referrer:P,...x,...(M&&M),...(E&&{excerptLength:E}),...(O&&{dictionaryFieldContext:O}),sortCriteria:F,...(w&&{facetOptions:w}),...f}},Sv=e=>Go(e)?.map(t=>ps(t,ds())).sort((t,r)=>t.facetId>r.facetId?1:r.facetId>t.facetId?-1:0),vv=e=>({actionsHistory:e.configuration.analytics.enabled?Le.getInstance().getHistory():[]}),bv=e=>{let t=Gl(e),r=ys(e);return{...t,...(r&&{cq:r})}};d();c();l();u();var kd=["text/plain","text/markdown"];var Ir=new H({required:!0}),Od=new H,Pr=new ne({required:!0}),Av={id:Ir,title:Ir,uri:Ir,permanentid:Ir,clickUri:Od},Td=new H({required:!0,constrainTo:kd}),Mj=T("generatedAnswer/setIsVisible",e=>Q(e,Pr)),Nj=T("generatedAnswer/setIsEnabled",e=>Q(e,Pr)),vs=T("generatedAnswer/updateMessage",e=>Q(e,{textDelta:Ir})),bs=T("generatedAnswer/updateCitations",e=>Q(e,{citations:new ie({required:!0,each:new K({values:Av})})})),Cv=T("generatedAnswer/updateError",e=>Q(e,{message:Od,code:new J({min:0})})),wv=T("generatedAnswer/resetAnswer"),_j=T("generatedAnswer/like"),Vj=T("generatedAnswer/dislike"),Lj=T("generatedAnswer/feedbackModal/open"),Uj=T("generatedAnswer/expand"),Qj=T("generatedAnswer/collapse"),Bj=T("generatedAnswer/setId",e=>Q(e,{id:new H({required:!0})})),$j=T("generatedAnswer/feedbackModal/close"),Hj=T("generatedAnswer/sendFeedback"),Ss=T("generatedAnswer/setIsLoading",e=>Q(e,Pr)),Fd=T("generatedAnswer/setIsStreaming",e=>Q(e,Pr)),As=T("generatedAnswer/setAnswerContentFormat",e=>Q(e,Td)),zj=T("generatedAnswer/updateResponseFormat",e=>Q(e,{contentFormat:new ie({each:Td,default:["text/plain"]})})),Gj=T("knowledge/updateAnswerConfigurationId",e=>Q(e,Ir)),Wj=T("generatedAnswer/registerFieldsToIncludeInCitations",e=>Q(e,io)),xv=T("generatedAnswer/setIsAnswerGenerated",e=>Q(e,Pr)),Cs=T("generatedAnswer/setCannotAnswer",e=>Q(e,Pr)),Rv=T("generatedAnswer/setAnswerApiQueryParams",e=>Q(e,new K({}))),Kj=le("generatedAnswer/streamAnswer",/*#__PURE__*/function(){var _ref20=_asyncToGenerator(function*(e,t){let r=t.getState(),{dispatch:n,extra:o,getState:i}=t,{search:a}=i(),{queryExecuted:m}=a,{setAbortControllerRef:f}=e,p=yield Ed(r),y=(g,v)=>{switch(g){case"genqa.headerMessageType":{let R=JSON.parse(v);n(As(R.contentFormat));break}case"genqa.messageType":n(vs(JSON.parse(v)));break;case"genqa.citationsType":n(bs(JSON.parse(v)));break;case"genqa.endOfStreamType":{let R=JSON.parse(v).answerGenerated,P=m.length!==0&&!R;n(Cs(P)),n(Fd(!1)),n(xv(R)),n(Uo(R));break}default:r.debug&&o.logger.warn(`Unknown payloadType: "${g}"`)}};n(Ss(!0));let h=g=>g.streamId===t.getState().search.extendedResults.generativeQuestionAnsweringId,S=o.streamingClient?.streamGeneratedAnswer(p,{write:g=>{h(p)&&(n(Ss(!1)),g.payload&&g.payloadType&&y(g.payloadType,g.payload))},abort:g=>{h(p)&&n(Cv(g))},close:()=>{h(p)&&n(Fd(!1))},resetAnswer:()=>{h(p)&&n(wv())}});S?f(S):n(Ss(!1))});return function(_x46,_x47){return _ref20.apply(this,arguments)}}()),Yj=le("generatedAnswer/generateAnswer",/*#__PURE__*/function(){var _ref21=_asyncToGenerator(function*(e,{getState:t,dispatch:r,extra:{navigatorContext:n,logger:o}}){let i=t();if(i.generatedAnswer.answerConfigurationId){let a=Id(i,n);r(Rv(a)),yield r(Dd(a))}else o.warn("[WARNING] Missing answerConfigurationId in engine configuration. The generateAnswer action requires an answer configuration ID to use CRGA with the Answer API.")});return function(_x48,_x49){return _ref21.apply(this,arguments)}}());d();c();l();u();d();c();l();u();function jd(_x50,_x51){return _jd.apply(this,arguments)}function _jd(){_jd=_asyncToGenerator(function*(e,t){let r=e.getReader(),n;for(;!(n=yield r.read()).done;)t(n.value)});return _jd.apply(this,arguments)}function Md(e){let t,r,n,o=!1;return function(a){t===void 0?(t=a,r=0,n=-1):t=Iv(t,a);let m=t.length,f=0;for(;r<m;){o&&(t[r]===10&&(f=++r),o=!1);let p=-1;for(;r<m&&p===-1;++r)switch(t[r]){case 58:n===-1&&(n=r-f);break;case 13:o=!0,p=r;break;case 10:p=r;break}if(p===-1)break;e(t.subarray(f,p),n),f=r,n=-1}f===m?t=void 0:f!==0&&(t=t.subarray(f),r-=f)}}function Nd(e,t,r){let n=qd(),o=new TextDecoder;return function(a,m){if(a.length===0)r?.(n),n=qd();else if(m>0){let f=o.decode(a.subarray(0,m)),p=m+(a[m+1]===32?2:1),y=o.decode(a.subarray(p));switch(f){case"data":n.data=n.data?`${n.data}
31
+ ${y}`:y;break;case"event":n.event=y;break;case"id":e(n.id=y);break;case"retry":Ev(y,n,t);break}}}}function Ev(e,t,r){let n=parseInt(e,10);Number.isNaN(n)||r(t.retry=n)}function Iv(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function qd(){return{data:"",event:"",id:"",retry:void 0}}var ws="text/event-stream",Pv=1e3,_d="last-event-id";function Vd(){return typeof window<"u"}function Ld(e,{signal:t,headers:r,onopen:n,onmessage:o,onclose:i,onerror:a,openWhenHidden:m,fetch:f,...p}){return new Promise((y,h)=>{let S={...r};S.accept||(S.accept=ws);let g;function v(){g?.abort(),document.hidden||E()}!m&&Vd()&&document.addEventListener("visibilitychange",v);let R=Pv,P;function w(){Vd()&&document.removeEventListener("visibilitychange",v),clearTimeout(P),g?.abort()}t?.addEventListener("abort",()=>{w(),y()});let F=f??A,x=n??kv;function E(){return _E.apply(this,arguments)}function _E(){_E=_asyncToGenerator(function*(){g=s.AbortController?new s.AbortController:null;try{let M=yield F(e,{...p,headers:S,signal:g?.signal});yield x(M),yield jd(M.body,Md(Nd(O=>{O?S[_d]=O:delete S[_d]},O=>{R=O},o))),i?.(),w(),y()}catch(M){if(!g?.signal?.aborted)try{let O=a?.(M)??R;clearTimeout(P),P=setTimeout(E,O)}catch(O){w(),h(O)}}});return _E.apply(this,arguments)}E()})}function kv(e){let t=e.headers.get("content-type");if(!t?.startsWith(ws))throw new Error(`Expected content-type to be ${ws}, Actual: ${t}`)}d();c();l();u();var Fv=/*#__PURE__*/function(){var _ref22=_asyncToGenerator(function*(e,t,r){let n=t.getState(),{accessToken:o,environment:i,organizationId:a}=n.configuration,m=n.generatedAnswer.answerConfigurationId,f={...e,headers:{...(e?.headers||{}),Authorization:`Bearer ${o}`}};try{let p=Pe(a,i);return{data:Sl({baseUrl:`${p}/rest/organizations/${a}/answer/v1/configs/${m}`,fetchFn:function(){var _ref23=_asyncToGenerator(function*(h){if(h instanceof String)throw new Error("The provided 'request' must be a Request object.");let S=h.url,g={};return["method","headers","mode","credentials","cache","redirect","referrer","referrerPolicy","integrity","keepalive","signal"].forEach(v=>{g[v]=h[v]}),g.duplex="half",g.body=yield h.text(),A(S,g)});return function fetchFn(_x55){return _ref23.apply(this,arguments)}}()})(f,{...t,signal:null},r)}}catch(p){return{error:p}}});return function Fv(_x52,_x53,_x54){return _ref22.apply(this,arguments)}}(),Ud=Rl({reducerPath:"answer",baseQuery:vl(Fv,{maxRetries:3}),endpoints:()=>({})});var Ov=(e,t)=>{let{contentFormat:r}=t;e.contentFormat=r,e.isStreaming=!0,e.isLoading=!1},Tv=(e,t)=>{e.answer===void 0?e.answer=t.textDelta:typeof t.textDelta=="string"&&(e.answer=e.answer.concat(t.textDelta))},Dv=(e,t)=>{e.citations=t.citations},qv=(e,t)=>{e.generated=t.answerGenerated,e.isStreaming=!1},jv=(e,t)=>{e.error={message:t.errorMessage,code:t.code},e.isStreaming=!1,e.isLoading=!1,console.error(`${t.errorMessage} - code ${t.code}`)},Mv=(e,t,r)=>{let n=JSON.parse(e.data);n.finishReason==="ERROR"&&n.errorMessage&&jv(t,n);let o=n.payload.length?JSON.parse(n.payload):{};switch(n.payloadType){case"genqa.headerMessageType":o.contentFormat&&(Ov(t,o),r(As(o.contentFormat)));break;case"genqa.messageType":o.textDelta&&(Tv(t,o),r(vs({textDelta:o.textDelta})));break;case"genqa.citationsType":o.citations&&(Dv(t,o),r(bs({citations:o.citations})));break;case"genqa.endOfStreamType":qv(t,o),r(Uo(o.answerGenerated??!1));break}},Ko=Ud.injectEndpoints({overrideExisting:!0,endpoints:e=>({getAnswer:e.query({queryFn:()=>({data:{contentFormat:void 0,answer:void 0,citations:void 0,error:void 0,generated:!1,isStreaming:!0,isLoading:!0}}),serializeQueryArgs:({endpointName:t,queryArgs:r})=>{let{analytics:n,...o}=r;return`${t}(${JSON.stringify(o)})`},onCacheEntryAdded(_x56,_x57){return _asyncToGenerator(function*(t,{getState:r,cacheDataLoaded:n,updateCachedData:o,dispatch:i}){yield n;let{configuration:a,generatedAnswer:m,insightConfiguration:f}=r(),{organizationId:p,environment:y,accessToken:h}=a,S=Pe(p,y),g=`${S}/rest/organizations/${p}/insight/v1/configs/${f?.insightId}/answer/${m.answerConfigurationId}/generate`,v=`${S}/rest/organizations/${p}/answer/v1/configs/${m.answerConfigurationId}/generate`;yield Ld(f?g:v,{method:"POST",body:JSON.stringify(t),headers:{Authorization:`Bearer ${h}`,Accept:"application/json","Content-Type":"application/json","Accept-Encoding":"*"},fetch:A,onopen:function(){var _ref24=_asyncToGenerator(function*(R){let P=R.headers.get("x-answer-id");P&&o(w=>{w.answerId=P})});return function onopen(_x58){return _ref24.apply(this,arguments)}}(),onmessage:R=>{o(P=>{Mv(R,P,i)})},onerror:R=>{throw R},onclose:()=>{o(R=>{i(Cs(!R.generated))})}})}).apply(this,arguments)}})})}),Dd=e=>Ko.endpoints.getAnswer.initiate(e),Qd=e=>{let t=Il(e);return Ko.endpoints.getAnswer.select(t)(e)};var xr=e=>{if(Nv(e))return Qd(e).data?.answerId;if(_v(e))return e.search?.response?.extendedResults?.generativeQuestionAnsweringId},Nv=e=>"answer"in e&&"generatedAnswer"in e&&!X(e.generatedAnswer?.answerConfigurationId),_v=e=>"search"in e&&e.search!==void 0&&typeof e.search=="object",Pd=e=>e.generatedAnswer?.fieldsToIncludeInCitations,XS=se(e=>e.generatedAnswer?.citations,(e,t)=>t,(e,t)=>e?.find(r=>r.id===t));d();c();l();u();d();c();l();u();var Bd=(r=>(r.Ascending="ascending",r.Descending="descending",r))(Bd||{}),$d=(i=>(i.Relevancy="relevancy",i.QRE="qre",i.Date="date",i.Field="field",i.NoSort="nosort",i))($d||{}),xs=e=>{if(yc(e))return e.map(t=>xs(t)).join(",");switch(e.by){case"relevancy":case"qre":case"nosort":return e.by;case"date":return`date ${e.order}`;case"field":return`@${e.field} ${e.order}`;default:return""}},Hd=()=>({by:"relevancy"});var LM=new K({values:{by:new Vi({enum:$d,required:!0}),order:new Vi({enum:Bd}),field:new H}});function Yo(){return xs(Hd())}var Rn=class Rn extends ut{constructor(){super(...arguments);pe(this,"getFacetRequest",r=>this.state.facetSet?.[r]?.request||this.state.categoryFacetSet?.[r]?.request||this.state.dateFacetSet?.[r]?.request||this.state.numericFacetSet?.[r]?.request||this.state.automaticFacetSet?.set[r]?.response)}getFacetState(){return _a(Na(this.getState()))}getPipeline(){return this.state.pipeline||this.state.search?.response.pipeline||Rn.fallbackPipelineName}getSearchEventRequestPayload(){return{queryText:this.queryText,responseTime:this.responseTime,results:this.resultURIs,numberOfResults:this.numberOfResults}}getSearchUID(){let r=this.getState();return r.search?.searchResponseId||r.search?.response.searchUid||We().response.searchUid}getSplitTestRunName(){return this.state.search?.response.splitTestRun}getSplitTestRunVersion(){let r=!!this.getSplitTestRunName(),n=this.state.search?.response.pipeline||this.state.pipeline||Rn.fallbackPipelineName;return r?n:void 0}getBaseMetadata(){let r=this.getState(),n=super.getBaseMetadata(),o=xr(r);return o&&(n.generativeQuestionAnsweringId=o),n}getFacetMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:i,facetValue:n,facetTitle:`${i}_${r}`}}getFacetClearAllMetadata(r){let o=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:o,facetTitle:`${o}_${r}`}}getFacetUpdateSortMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:i,criteria:n,facetTitle:`${i}_${r}`}}getRangeBreadcrumbFacetMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),facetId:r,facetField:i,facetRangeEnd:n.end,facetRangeEndInclusive:n.endInclusive,facetRangeStart:n.start,facetTitle:`${i}_${r}`}}getResultSortMetadata(){return{...this.getBaseMetadata(),resultsSortBy:this.state.sortCriteria??Yo()}}getStaticFilterToggleMetadata(r,n){return{...this.getBaseMetadata(),staticFilterId:r,staticFilterValue:n}}getStaticFilterClearAllMetadata(r){return{...this.getBaseMetadata(),staticFilterId:r}}getUndoTriggerQueryMetadata(r){return{...this.getBaseMetadata(),undoneQuery:r}}getCategoryBreadcrumbFacetMetadata(r,n){let i=this.getFacetRequest(r)?.field??"";return{...this.getBaseMetadata(),categoryFacetId:r,categoryFacetField:i,categoryFacetPath:n,categoryFacetTitle:`${i}_${r}`}}getOmniboxAnalyticsMetadata(r,n){let o=this.state.querySuggest?.[r],i=o.completions.map(p=>p.expression),a=o.partialQueries.length-1,m=o.partialQueries[a]||"",f=o.responseId;return{...this.getBaseMetadata(),suggestionRanking:i.indexOf(n),partialQuery:m,partialQueries:o.partialQueries.length>0?o.partialQueries:"",suggestions:i.length>0?i:"",querySuggestResponseId:f}}getInterfaceChangeMetadata(){return{...this.getBaseMetadata(),interfaceChangeTo:this.state.configuration.analytics.originLevel2}}getOmniboxFromLinkMetadata(r){return{...this.getBaseMetadata(),...r}}getGeneratedAnswerMetadata(){let r=this.getState(),n={};return r.generatedAnswer?.isVisible!==void 0&&(n.showGeneratedAnswer=r.generatedAnswer.isVisible),n}get resultURIs(){return this.results?.map(r=>({documentUri:r.uri,documentUriHash:r.raw.urihash}))}get results(){return this.state.search?.response.results}get queryText(){return this.state.query?.q||Ne().q}get responseTime(){return this.state.search?.duration||We().duration}get numberOfResults(){return this.state.search?.response.totalCountFiltered||We().response.totalCountFiltered}};pe(Rn,"fallbackPipelineName","default");var vt=Rn,zl=({logger:e,getState:t,analyticsClientMiddleware:r=(i,a)=>a,preprocessRequest:n,provider:o})=>{let i=t(),a=i.configuration.accessToken,m=i.configuration.analytics.apiBaseUrl??Pe(i.configuration.organizationId,i.configuration.environment,"analytics"),f=i.configuration.analytics.runtimeEnvironment,p=i.configuration.analytics.enabled,y=new Ro({token:a,endpoint:m,runtimeEnvironment:f,preprocessRequest:mn(e,n),beforeSendHooks:[gn(e,r),(h,S)=>(e.info({...S,type:h,endpoint:m,token:a},"Analytics request"),S)]},o);return p||y.disable(),y},Rs=()=>{let t=Le.getInstance().getHistory().reverse().find(r=>r.name==="PageView"&&r.value);return t?t.value:""};var Wo=/*#__PURE__*/function(){var _ref25=_asyncToGenerator(function*(e,t){let r=e.analyticsMode==="next";return{analytics:{clientId:yield Zu(e),clientTimestamp:new Date().toISOString(),documentReferrer:e.originLevel3,originContext:e.originContext,...(t&&{actionCause:t.actionCause,customData:t.customData}),...(t&&!r&&{customData:t.customData}),...(e.userDisplayName&&{userDisplayName:e.userDisplayName}),...(e.documentLocation&&{documentLocation:e.documentLocation}),...(e.deviceId&&{deviceId:e.deviceId}),...(Rs()&&{pageId:Rs()}),...(r&&e.trackingId&&{trackingId:e.trackingId}),capture:r,...(r&&{source:yr(e)})}}});return function Wo(_x59,_x60){return _ref25.apply(this,arguments)}}();d();c();l();u();d();c();l();u();d();c();l();u();var kr=()=>({duration:0,error:null,isLoading:!1,id:"Recommendation",recommendations:[],searchUid:"",splitTestRun:"",pipeline:""});var En=class extends ut{getPipeline(){return this.state.pipeline||this.state.recommendation?.pipeline||"default"}getSearchEventRequestPayload(){return{queryText:Ne().q,responseTime:this.responseTime,results:this.mapResultsToAnalyticsDocument(),numberOfResults:this.numberOfResults}}getSearchUID(){return this.getState().recommendation?.searchUid||kr().searchUid}getSplitTestRunName(){return this.state.recommendation?.splitTestRun}getSplitTestRunVersion(){let t=!!this.getSplitTestRunName(),r=this.state.recommendation?.pipeline||this.state.pipeline||"default";return t?r:void 0}get responseTime(){return this.state.recommendation?.duration||kr().duration}mapResultsToAnalyticsDocument(){return this.state.recommendation?.recommendations.map(t=>({documentUri:t.uri,documentUriHash:t.raw.urihash}))}get numberOfResults(){return this.state.recommendation?.recommendations.length||kr().recommendations.length}};var zd=()=>je("analytics/recommendation/update",e=>e.makeRecommendationInterfaceLoad(),e=>new En(e)),Gd=()=>({actionCause:"recommendationInterfaceLoad"}),Jo=e=>je({prefix:"analytics/recommendation/open",__legacy__getBuilder:(t,r)=>(rs(e),t.makeRecommendationOpen(ts(e,r),Vo(e))),__legacy__provider:t=>new En(t),analyticsType:"itemClick",analyticsPayloadBuilder:t=>{let r=ts(e,t),n=Vo(e);return{responseId:e.searchUid??"",position:r.documentPosition,itemMetadata:{uniqueFieldName:n.contentIDKey,uniqueFieldValue:n.contentIDValue,title:r.documentTitle,author:r.documentAuthor,url:r.documentUrl}}}});var Fr=T("recommendation/set",e=>Q(e,{id:W})),Rt=le("recommendation/get",/*#__PURE__*/function(){var _ref26=_asyncToGenerator(function*(e,{getState:t,rejectWithValue:r,extra:{apiClient:n}}){let o=t(),i=Date.now(),a=yield Vv(o),m=yield n.recommendations(a),f=Date.now()-i;return Oe(m)?r(m.error):{recommendations:m.success.results,analyticsAction:zd(),duration:f,searchUid:m.success.searchUid,splitTestRun:m.success.splitTestRun,pipeline:m.success.pipeline}});return function(_x61,_x62){return _ref26.apply(this,arguments)}}()),Vv=/*#__PURE__*/function(){var _ref27=_asyncToGenerator(function*(e){return{accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??pt(e.configuration.organizationId,e.configuration.environment),recommendation:e.recommendation.id,tab:e.configuration.analytics.originLevel2,referrer:e.configuration.analytics.originLevel3,timezone:e.configuration.search.timezone,locale:e.configuration.search.locale,actionsHistory:e.configuration.analytics.enabled?Le.getInstance().getHistory():[],...(e.advancedSearchQueries&&{aq:e.advancedSearchQueries.aq,cq:e.advancedSearchQueries.cq}),...(e.pipeline&&{pipeline:e.pipeline}),...(e.searchHub&&{searchHub:e.searchHub}),...(e.context&&{context:e.context.contextValues}),...(e.dictionaryFieldContext&&{dictionaryFieldContext:e.dictionaryFieldContext.contextValues}),...(e.fields&&{fieldsToInclude:e.fields.fieldsToInclude}),...(e.configuration.analytics.enabled&&(yield Lv(e,Gd()))),...(e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")}),...(e.pagination&&{numberOfResults:e.pagination.numberOfResults})}});return function Vv(_x63){return _ref27.apply(this,arguments)}}(),Lv=/*#__PURE__*/function(){var _ref28=_asyncToGenerator(function*(e,t){let r=e.configuration.analytics.analyticsMode==="legacy"?void 0:{actionCause:t.actionCause,type:t.actionCause};return yield Wo(e.configuration.analytics,r)});return function Lv(_x64,_x65){return _ref28.apply(this,arguments)}}();var Or=ge(kr(),e=>{e.addCase(Fr,(t,r)=>{t.id=r.payload.id}).addCase(Rt.rejected,(t,r)=>{t.error=r.payload?r.payload:null,t.isLoading=!1}).addCase(Rt.fulfilled,(t,r)=>{t.error=null,t.recommendations=r.payload.recommendations.map(n=>({...n,searchUid:r.payload.searchUid})),t.duration=r.payload.duration,t.isLoading=!1,t.searchUid=r.payload.searchUid,t.splitTestRun=r.payload.splitTestRun,t.pipeline=r.payload.pipeline}).addCase(Rt.pending,t=>{t.isLoading=!0}).addCase(fo,(t,r)=>{t.error=r.payload,t.isLoading=!1})});d();c();l();u();var Tr=T("searchHub/set",e=>Q(e,new H({required:!0,emptyAllowed:!0})));d();c();l();u();var Dr=ge(wr(),e=>{e.addCase(Tr,(t,r)=>r.payload).addCase(qe.fulfilled,(t,r)=>r.payload?.searchHub??t).addCase(Je,(t,r)=>r.payload.searchHub||t)});d();c();l();u();d();c();l();u();var Wd=ge(sr,e=>e);d();c();l();u();function Uv(e){let t=e.payload?.analyticsAction;return Kd(e)&&!X(t)}function Kd(e){return"type"in e}var Yd=e=>t=>r=>{let n;Uv(r)&&(n=r.payload.analyticsAction,delete r.payload.analyticsAction);let o=t(r);return Kd(r)&&(r.type==="search/executeSearch/fullfilled"&&n===void 0&&console.error("No analytics action associated with search:",r),r.type==="recommendation/get/fullfilled"&&n===void 0&&console.error("No analytics action associated with recommendation:",r),r.type==="productRecommendations/get/fullfilled"&&n===void 0&&console.error("No analytics action associated with product recommendation:",r)),n!==void 0&&e.dispatch(n),o};d();c();l();u();d();c();l();u();d();c();l();u();var $_=T("tab/register",e=>{let t=new K({values:{id:W,expression:we}});return Q(e,t)}),Xo=T("tab/updateActiveTab",e=>Q(e,W));d();c();l();u();var Zo=Be(Bo(),1),Zd=Be(Jd(),1),ep=Be(Xd(),1);Zo.default.extend(ep.default);Zo.default.extend(Zd.default);var tp=()=>({organizationId:"",accessToken:"",search:{locale:"en-US",timezone:Zo.default.tz.guess(),authenticationProviders:[]},analytics:{enabled:!0,originContext:"Search",originLevel2:"default",originLevel3:"default",anonymous:!1,deviceId:"",userDisplayName:"",documentLocation:"",analyticsMode:"next",source:{}},knowledge:{answerConfigurationId:""},environment:"prod"});d();c();l();u();var Qv=/(^|; )Coveo-Pendragon=([^;]*)/;function Fs(){return typeof window>"u"?!1:Qv.exec(document.cookie)?.pop()||null}var rp=ge(tp(),e=>e.addCase(yt,(t,r)=>{Bv(t,r.payload)}).addCase(Je,(t,r)=>{$v(t,r.payload)}).addCase(cr,(t,r)=>{Hv(t,r.payload)}).addCase(ur,t=>{t.analytics.enabled=!1}).addCase(lr,t=>{t.analytics.enabled=!0}).addCase(ao,(t,r)=>{t.analytics.originLevel2=r.payload.originLevel2}).addCase(so,(t,r)=>{t.analytics.originLevel3=r.payload.originLevel3}).addCase(Xo,(t,r)=>{t.analytics.originLevel2=r.payload}).addCase(Ru,(t,r)=>{t.analytics.originLevel2=r.payload}).addCase(ht,(t,r)=>{X(r.payload.tab)||(t.analytics.originLevel2=r.payload.tab)}));function Bv(e,t){X(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",X(t.organizationId)||(e.organizationId=t.organizationId)}function $v(e,t){X(t.proxyBaseUrl)||(e.search.apiBaseUrl=t.proxyBaseUrl),X(t.locale)||(e.search.locale=t.locale),X(t.timezone)||(e.search.timezone=t.timezone),X(t.authenticationProviders)||(e.search.authenticationProviders=t.authenticationProviders)}function Hv(e,t){X(t.enabled)||(e.analytics.enabled=t.enabled),X(t.originContext)||(e.analytics.originContext=t.originContext),X(t.originLevel2)||(e.analytics.originLevel2=t.originLevel2),X(t.originLevel3)||(e.analytics.originLevel3=t.originLevel3),X(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),X(t.trackingId)||(e.analytics.trackingId=t.trackingId),X(t.analyticsMode)||(e.analytics.analyticsMode=t.analyticsMode),X(t.source)||(e.analytics.source=t.source);try{let r=Fs();r&&(e.analytics.analyticsMode="next",e.analytics.trackingId=r)}catch{}X(t.runtimeEnvironment)||(e.analytics.runtimeEnvironment=t.runtimeEnvironment),X(t.anonymous)||(e.analytics.anonymous=t.anonymous),X(t.deviceId)||(e.analytics.deviceId=t.deviceId),X(t.userDisplayName)||(e.analytics.userDisplayName=t.userDisplayName),X(t.documentLocation)||(e.analytics.documentLocation=t.documentLocation)}var ze=rp;d();c();l();u();function zv(e){return e.instantlyCallable}var np=()=>e=>t=>e(zv(t)?t():t);d();c();l();u();var op=e=>()=>t=>r=>{let n=r;if(!n.error)return t(r);let o=n.error,i=[n.payload?.errorCode,n.payload?.message].filter(Boolean).join(" - ");if(n.payload?.ignored||e.error(i||o.stack||o.message||o.name||"Error",`Action dispatch error ${n.type}`,r),n.error.name!=="SchemaValidationError")return t(r)},ip=e=>t=>r=>n=>(e.debug({action:n,nextState:t.getState()},`Action dispatched: ${n.type}`),r(n));d();c();l();u();var Os=(e,t)=>{let{referrer:r,userAgent:n,location:o,clientId:i}=e.getMeta("");return{...(t?t():{}),referrer:r,userAgent:n,location:o,clientId:i}};d();c();l();u();function ap(e,t){let r={...e},n,o=i=>(a,m)=>{let f=i(a,m);return n?n(f,m):f};return{get combinedReducer(){let i=vc(Object.entries(t).filter(([a])=>!(a in r)).map(([a,m])=>[a,()=>m]));return o(tr({...i,...r}))},containsAll(i){return Object.keys(i).every(m=>m in r)},add(i){Object.keys(i).filter(a=>!(a in r)).forEach(a=>{r[a]=i[a]})},addCrossReducer(i){n=i}}}d();c();l();u();d();c();l();u();function Gv(e){if(!e||!Wv(e))return null;try{let r=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=atob(r),o=decodeURIComponent(n.split("").map(i=>`%${`00${i.charCodeAt(0).toString(16)}`.slice(-2)}`).join(""));return JSON.parse(o)}catch{return null}}function sp(e,t=60){if(!e)return!1;let r=Gv(e);if(!r||typeof r.exp!="number")return!1;let n=Math.floor(Date.now()/1e3);return r.exp<=n+t}function Wv(e){return e?/^[A-Za-z0-9_-]{2,}(?:\.[A-Za-z0-9_-]{2,}){2}$/.test(e):!1}function up(e,t){let r=0,n=null,o=Nn(()=>{r=0},500),i=/*#__PURE__*/function(){var _ref29=_asyncToGenerator(function*(f,p=!1){let y=!n;y&&t&&(n=_asyncToGenerator(function*(){return p&&Yv(t),yield t()})().finally(()=>{n=null}));let h=yield n;return y&&h&&f.dispatch(yt({accessToken:h})),h});return function i(_x66){return _ref29.apply(this,arguments)}}(),a=/*#__PURE__*/function(){var _ref31=_asyncToGenerator(function*(f){let p=f.getState(),y=Jv(p);if(!(!y||!sp(y))){e.debug("Access token is expired or about to expire, attempting renewal.");try{(yield i(f))?e.debug("Access token was renewed."):e.warn("Access token renewal returned an empty token. Please check the #renewAccessToken function.")}catch(h){e.warn(h,"Access token renewal failed. A retry will occur if necessary.")}}});return function a(_x67){return _ref31.apply(this,arguments)}}(),m=/*#__PURE__*/function(){var _ref32=_asyncToGenerator(function*(f,p,y){if(r>=5)return e.warn("Attempted to renew the token but was not successful. Please check the #renewAccessToken function."),cp(f,p.error),p;r++,o(),yield i(f,!0),f.dispatch(y)});return function m(_x68,_x69,_x70){return _ref32.apply(this,arguments)}}();return f=>p=>(/*#__PURE__*/function(){var _ref33=_asyncToGenerator(function*(y){let h=typeof y=="function",S=typeof t=="function";if(!h)return p(y);S&&(yield a(f));let g=yield p(y);return Kv(g)?S?yield m(f,g,y):(e.warn("Unable to renew the expired token because a renew function was not provided. Please specify the #renewAccessToken option when initializing the engine."),cp(f,g.error),g):g});return function(_x71){return _ref33.apply(this,arguments)}}())}function Kv(e){return typeof e=="object"&&e!==null&&"error"in e&&e.error?.name===new er().name}function cp(e,t){e.dispatch(fo({status:401,statusCode:401,message:t.message,type:t.name}))}function Yv(_x72){return _Yv.apply(this,arguments)}function _Yv(){_Yv=_asyncToGenerator(function*(e){try{return yield e()}catch{return""}});return _Yv.apply(this,arguments)}function Jv(e){return e.configuration.accessToken}d();c();l();u();function lp({reducer:e,preloadedState:t,middlewares:r=[],thunkExtraArguments:n,name:o}){return uu({reducer:e,preloadedState:t,devTools:{stateSanitizer:i=>i.history?{...i,history:"<<OMIT>>"}:i,name:o,shouldHotReload:!1},middleware:i=>i({thunk:{extraArgument:n}}).prepend(...r).concat(ip(n.logger))})}function Xv(e,t){let{analytics:r}=e,{analyticsClientMiddleware:n,...o}=r??{},i={...o,...(r?.proxyBaseUrl&&{apiBaseUrl:r.proxyBaseUrl,nexApiBaseUrl:r.proxyBaseUrl})};return i.analyticsMode!=="next"&&Sc()?(t.info("Analytics disabled since doNotTrack is active."),{...i,enabled:!1}):i}function dp(e,t){let r={...e.reducers,configuration:ze,version:Wd},n=Zv({...e,reducers:r},t,ze),{accessToken:o,environment:i,organizationId:a}=e.configuration;n.dispatch(yt({accessToken:o,environment:i,organizationId:a}));let m=Xv(e.configuration,n.logger);return m&&n.dispatch(cr(m)),n}function Zv(e,t,r){let{reducers:n,navigatorContextProvider:o}=e,i=ap({...n,configurationReducer:r},e.preloadedState??{});e.crossReducer&&i.addCrossReducer(e.crossReducer);let a=t.logger,m={...t,get relay(){return bn(p.state,o)},get navigatorContext(){return Os(this.relay,o)}},f=eb(e,m,i),p={addReducers(y){i.containsAll(y)||(i.add(y),f.replaceReducer(i.combinedReducer))},dispatch:f.dispatch,subscribe:f.subscribe,enableAnalytics(){f.dispatch(lr())},disableAnalytics(){f.dispatch(ur())},get state(){return f.getState()},get relay(){return bn(this.state,o)},get navigatorContext(){return Os(this.relay,o)},logger:a,store:f};return p}function eb(e,t,r){let{preloadedState:n,configuration:o}=e,i=o.name||"coveo-headless",a=tb(e,t.logger);return lp({preloadedState:n,reducer:r.combinedReducer,middlewares:a,thunkExtraArguments:t,name:i})}function tb(e,t){let{renewAccessToken:r}=e.configuration,n=up(t,r);return[np,n,op(t),Yd].concat(Ko.middleware,e.middlewares||[])}d();c();l();u();var bp=Be(vp(),1);function Ap(e){return(0,bp.pino)({name:"@coveo/headless",level:e?.level||"warn",formatters:{log:e?.logFormatter}})}d();c();l();u();function Cp(e,t){let r=vb(e),n=Ve,o=bb(e);return{analyticsClientMiddleware:r,validatePayload:n,preprocessRequest:o,logger:t}}function vb(e){let{analytics:t}=e,r=(n,o)=>o;return t?.analyticsClientMiddleware||r}function bb(e){return e.preprocessRequest||Ln}d();c();l();u();d();c();l();u();var wp={organizationId:W,accessToken:W,name:new H({required:!1,emptyAllowed:!1}),analytics:new K({options:{required:!1},values:{enabled:new ne({required:!1}),originContext:new H({required:!1}),originLevel2:new H({required:!1}),originLevel3:new H({required:!1}),analyticsMode:new H({constrainTo:["legacy","next"],required:!1,default:"next"}),proxyBaseUrl:new H({required:!1,url:!0}),trackingId:new H({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/})}}),environment:new H({required:!1,default:"prod",constrainTo:["prod","hipaa","stg","dev"]})};function xp(){return{organizationId:"searchuisamples",accessToken:"xx564559b1-0045-48e1-953c-3addd1ee4457"}}var Rp=new Fe({...wp,pipeline:new H({required:!1,emptyAllowed:!0}),searchHub:Ce,locale:Ce,timezone:Ce});function Ns(){return{...xp(),searchHub:"default"}}var Ab={debug:po,pipeline:fr,searchHub:Dr,recommendation:Or};function Ep(e){let t=Ap(e.loggerOptions);Cb(e.configuration,t);let r=wb(e.configuration,t),n={...Cp(e.configuration,t),apiClient:r},o={...e,reducers:Ab},i=dp(o,n),{pipeline:a,searchHub:m,timezone:f,locale:p,proxyBaseUrl:y}=e.configuration;return i.dispatch(Je({timezone:f,locale:p,proxyBaseUrl:y})),X(a)||i.dispatch(dr(a)),X(m)||i.dispatch(Tr(m)),{...i,get state(){return i.state}}}function Cb(e,t){try{Rp.validate(e)}catch(r){throw t.error(r,"Recommendation engine configuration error"),r}}function wb(e,t){return new Bn({logger:t,preprocessRequest:e.preprocessRequest||Ln,postprocessSearchResponseMiddleware:e.preprocessSearchResponseMiddleware||Mc,postprocessFacetSearchResponseMiddleware:Nc,postprocessQuerySuggestResponseMiddleware:_c})}d();c();l();u();d();c();l();u();d();c();l();u();var xb=new ie({each:W,required:!0}),Ip=(e,t)=>(Q(e,W),jn(t)?Q(t,W):Q(t,xb),{payload:{contextKey:e,contextValue:t}}),zt=T("context/set",e=>{for(let[t,r]of Object.entries(e))Ip(t,r);return{payload:e}}),Gt=T("context/add",e=>Ip(e.contextKey,e.contextValue)),Wt=T("context/remove",e=>Q(e,W));d();c();l();u();d();c();l();u();function ri(){return{contextValues:{}}}var ni=ge(ri(),e=>{e.addCase(zt,(t,r)=>{t.contextValues=r.payload}).addCase(Gt,(t,r)=>{t.contextValues[r.payload.contextKey]=r.payload.contextValue}).addCase(Wt,(t,r)=>{delete t.contextValues[r.payload]}).addCase(qe.fulfilled,(t,r)=>{r.payload&&(t.contextValues=r.payload.context.contextValues)})});d();c();l();u();function It(e){let t,r=new Map,n=()=>r.size===0,o=i=>{try{let a=JSON.stringify(i),m=t!==a;return t=a,m}catch(a){return console.warn("Could not detect if state has changed, check the controller \"get state method\"",a),!0}};return{subscribe(i){i();let a=Symbol(),m;return n()&&(t=JSON.stringify(this.state),m=e.subscribe(()=>{o(this.state)&&r.forEach(f=>f())})),r.set(a,i),()=>{r.delete(a),n()&&m?.()}},get state(){return{}}}}d();c();l();u();var Rb=["caseId","caseNumber"],Eb={caseId:"caseContext",caseNumber:"caseContext"},Pn=class extends Error{constructor(t){super(`The key "${t}" is reserved for internal use. Use ${Eb[t]} to set this value.}`)}};function _s(e){return Rb.includes(e)}var Ib=new Fe({values:new K({options:{required:!1}})});function Pp(e,t={}){if(!Fb(e))throw Ge;let r=It(e),{dispatch:n}=e,o=()=>e.state,i=vu(e,Ib,t.initialState,"buildContext");return i.values&&n(zt(i.values)),{...r,get state(){return{values:o().context.contextValues}},set(a){n(zt(a))},...(o().configuration.analytics.analyticsMode==="legacy"?Pb(n):kb(n))}}var Pb=e=>({add(t,r){e(Gt({contextKey:t,contextValue:r}))},remove(t){e(Wt(t))}}),kb=e=>({add(t,r){if(_s(t))throw new Pn(t);e(Gt({contextKey:t,contextValue:r}))},remove(t){if(_s(t))throw new Pn(t);e(Wt(t))}});function Fb(e){return e.addReducers({context:ni}),!0}function kp(e,t){return Pp(e,t)}d();c();l();u();d();c();l();u();var jr=T("dictionaryFieldContext/set",e=>{let t=new K({options:{required:!0}}),r=Q(e,t).error;if(r)return{payload:e,error:r};let n=Object.values(e),o=new ie({each:we}),i=Q(n,o).error;return i?{payload:e,error:i}:{payload:e}}),Mr=T("dictionaryFieldContext/add",e=>{let t=new K({options:{required:!0},values:{field:we,key:we}});return Q(e,t)}),Nr=T("dictionaryFieldContext/remove",e=>Q(e,we));d();c();l();u();d();c();l();u();function oi(){return{contextValues:{}}}var ii=ge(oi(),e=>{e.addCase(jr,(t,r)=>{t.contextValues=r.payload}).addCase(Mr,(t,r)=>{let{field:n,key:o}=r.payload;t.contextValues[n]=o}).addCase(Nr,(t,r)=>{delete t.contextValues[r.payload]}).addCase(qe.fulfilled,(t,r)=>{r.payload&&(t.contextValues=r.payload.dictionaryFieldContext.contextValues)})});function Fp(e){if(!Ob(e))throw Ge;let t=It(e),{dispatch:r}=e,n=()=>e.state;return{...t,get state(){return{values:n().dictionaryFieldContext.contextValues}},set(o){r(jr(o))},add(o,i){r(Mr({field:o,key:i}))},remove(o){r(Nr(o))}}}function Ob(e){return e.addReducers({dictionaryFieldContext:ii}),!0}d();c();l();u();d();c();l();u();d();c();l();u();d();c();l();u();var ai=T("breadcrumb/deselectAll"),Op=T("breadcrumb/deselectAllNonBreadcrumbs");d();c();l();u();d();c();l();u();var kn={value:W,numberOfResults:new J({min:0}),state:W};d();c();l();u();var de=W;var jb=new J({min:1,default:8,required:!1}),Mb=new J({min:1,max:20,default:5,required:!1}),Nb={desiredCount:Mb,numberOfValues:jb},U1=T("automaticFacet/setOptions",e=>Q(e,Nb)),Q1=T("automaticFacet/deselectAll",e=>Q(e,de)),_b=W,Tp=T("automaticFacet/toggleSelectValue",e=>Q(e,{field:_b,selection:new K({values:kn})}));d();c();l();u();d();c();l();u();var Vb={state:new fe({required:!0}),numberOfResults:new J({required:!0,min:0}),value:new H({required:!0,emptyAllowed:!0}),path:new ie({required:!0,each:W}),moreValuesAvailable:new ne({required:!1})};function Vs(e){e.children.forEach(t=>{Vs(t)}),Ve({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},Vb)}var _r={facetId:de,field:W,tabs:new K({options:{required:!1},values:{included:new ie({each:new H}),excluded:new ie({each:new H})}}),activeTab:new H({required:!1}),delimitingCharacter:new H({required:!1,emptyAllowed:!0}),filterFacetCount:new ne({required:!1}),injectionDepth:new J({required:!1,min:0}),numberOfValues:new J({required:!1,min:1}),sortCriteria:new fe({required:!1}),basePath:new ie({required:!1,each:W}),filterByBasePath:new ne({required:!1})};var aB=T("categoryFacet/register",e=>Q(e,_r)),Dp=T("categoryFacet/toggleSelectValue",e=>{try{return Ve(e.facetId,W),Vs(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:it(t)}}}),qp=T("categoryFacet/deselectAll",e=>Q(e,_r.facetId)),sB=T("categoryFacet/updateNumberOfValues",e=>Q(e,{facetId:_r.facetId,numberOfValues:_r.numberOfValues})),cB=T("categoryFacet/updateSortCriterion",e=>Q(e,{facetId:_r.facetId,criterion:new fe})),uB=T("categoryFacet/updateBasePath",e=>Q(e,{facetId:_r.facetId,basePath:new ie({each:W})}));d();c();l();u();d();c();l();u();var Fn={facetId:de,captions:new K({options:{required:!1}}),numberOfValues:new J({required:!1,min:1}),query:new H({required:!1,emptyAllowed:!0})};var Lb={path:new ie({required:!0,each:W}),displayValue:we,rawValue:we,count:new J({required:!0,min:0})},jp=T("categoryFacet/selectSearchResult",e=>Q(e,{facetId:de,value:new K({values:Lb})})),IB=T("categoryFacetSearch/register",e=>Q(e,Fn));d();c();l();u();var Mp={facetId:de,value:new K({values:{displayValue:we,rawValue:we,count:new J({required:!0,min:0})}})},_B=T("facetSearch/register",e=>Q(e,Fn)),VB=T("facetSearch/update",e=>Q(e,Fn)),Np=T("facetSearch/toggleSelectValue",e=>Q(e,Mp)),_p=T("facetSearch/toggleExcludeValue",e=>Q(e,Mp));d();c();l();u();d();c();l();u();var zB=new H({regex:/^[a-zA-Z0-9-_]+$/}),GB=new H({required:!0}),WB=new ie({each:new H}),KB=new H,YB=new ne,JB=new ne,XB=new J({min:0}),Ub=new J({min:1}),ZB=new ne({required:!0}),Qb=new K,Bb=new H,$b={captions:Qb,numberOfValues:Ub,query:Bb},e$=new K({values:$b}),Vp=new K({options:{required:!1},values:{type:new H({constrainTo:["simple"],emptyAllowed:!1,required:!0}),values:new ie({required:!0,max:25,each:new H({emptyAllowed:!1,required:!0})})}}),t$=new ne,Lp=new ie({min:1,max:25,required:!1,each:new H({emptyAllowed:!1,required:!0})});var Hb={facetId:de,field:new H({required:!0,emptyAllowed:!0}),tabs:new K({options:{required:!1},values:{included:new ie({each:new H}),excluded:new ie({each:new H})}}),activeTab:new H({required:!1}),filterFacetCount:new ne({required:!1}),injectionDepth:new J({required:!1,min:0}),numberOfValues:new J({required:!1,min:1}),sortCriteria:new fe({required:!1}),resultsMustMatch:new fe({required:!1}),allowedValues:Vp,customSort:Lp},f$=T("facet/register",e=>Q(e,Hb)),Up=T("facet/toggleSelectValue",e=>Q(e,{facetId:de,selection:new K({values:kn})})),Qp=T("facet/toggleExcludeValue",e=>Q(e,{facetId:de,selection:new K({values:kn})})),si=T("facet/deselectAll",e=>Q(e,de)),m$=T("facet/updateSortCriterion",e=>Q(e,{facetId:de,criterion:new fe({required:!0})})),g$=T("facet/updateNumberOfValues",e=>Q(e,{facetId:de,numberOfValues:new J({required:!0,min:1})})),y$=T("facet/updateIsFieldExpanded",e=>Q(e,{facetId:de,isFieldExpanded:new ne({required:!0})})),h$=T("facet/updateFreezeCurrentValues",e=>Q(e,{facetId:de,freezeCurrentValues:new ne({required:!0})}));d();c();l();u();d();c();l();u();function $p(e){let t=Bp(e.start,e),r=Bp(e.end,e),n=e.endInclusive??!1,o=e.state??"idle";return{start:t,end:r,endInclusive:n,state:o}}function Bp(e,t){let{dateFormat:r}=t;return sd(e)?(ls(e),od(e)):typeof e=="string"&&bt(e)?(ls(e),e):(ed(e,r),Ho(Rr(e,r)))}d();c();l();u();var Hp=T("rangeFacet/updateSortCriterion",e=>Q(e,{facetId:de,criterion:new fe({required:!0})}));d();c();l();u();var ci={state:W,start:new J({required:!0}),end:new J({required:!0}),endInclusive:new ne({required:!0}),numberOfResults:new J({required:!0,min:0})},ui={start:W,end:W,endInclusive:new ne({required:!0}),state:W,numberOfResults:new J({required:!0,min:0})};var zb={start:W,end:W,endInclusive:new ne({required:!0}),state:W},Gb={facetId:de,field:W,tabs:new K({options:{required:!1},values:{included:new ie({each:new H}),excluded:new ie({each:new H})}}),activeTab:new H({required:!1}),currentValues:new ie({required:!1,each:new K({values:zb})}),generateAutomaticRanges:new ne({required:!0}),filterFacetCount:new ne({required:!1}),injectionDepth:new J({required:!1,min:0}),numberOfValues:new J({required:!1,min:1}),sortCriteria:new fe({required:!1}),rangeAlgorithm:new fe({required:!1})};function zp(e){return bt(e)?wn(e):e}function Gp(e){e.currentValues&&e.currentValues.forEach(t=>{let{start:r,end:n}=$p(t);if(Rr(zp(r)).isAfter(Rr(zp(n))))throw new Error(`The start value is greater than the end value for the date range ${t.start} to ${t.end}`)})}var nH=T("dateFacet/register",e=>{try{return Ve(e,Gb),Gp(e),{payload:e,error:null}}catch(t){return{payload:e,error:it(t)}}}),Wp=T("dateFacet/toggleSelectValue",e=>Q(e,{facetId:de,selection:new K({values:ui})})),Kp=T("dateFacet/toggleExcludeValue",e=>Q(e,{facetId:de,selection:new K({values:ui})})),Yp=T("dateFacet/updateFacetValues",e=>{try{return Ve(e,{facetId:de,values:new ie({each:new K({values:ui})})}),Gp({currentValues:e.values}),{payload:e,error:null}}catch(t){return{payload:e,error:it(t)}}});d();c();l();u();var Wb={state:W,start:new J({required:!0}),end:new J({required:!0}),endInclusive:new ne({required:!0})},Kb={facetId:de,field:W,tabs:new K({options:{required:!1},values:{included:new ie({each:new H}),excluded:new ie({each:new H})}}),activeTab:new H({required:!1}),currentValues:new ie({required:!1,each:new K({values:Wb})}),generateAutomaticRanges:new ne({required:!0}),filterFacetCount:new ne({required:!1}),injectionDepth:new J({required:!1,min:0}),numberOfValues:new J({required:!1,min:1}),sortCriteria:new fe({required:!1}),rangeAlgorithm:new fe({required:!1})};function Jp(e){e.currentValues&&e.currentValues.forEach(({start:t,end:r})=>{if(t>r)throw new Error(`The start value is greater than the end value for the numeric range ${t} to ${r}`)})}var yH=T("numericFacet/register",e=>{try{return Q(e,Kb),Jp(e),{payload:e,error:null}}catch(t){return{payload:e,error:it(t)}}}),Xp=T("numericFacet/toggleSelectValue",e=>Q(e,{facetId:de,selection:new K({values:ci})})),Zp=T("numericFacet/toggleExcludeValue",e=>Q(e,{facetId:de,selection:new K({values:ci})})),ef=T("numericFacet/updateFacetValues",e=>{try{return Ve(e,{facetId:de,values:new ie({each:new K({values:ci})})}),Jp({currentValues:e.values}),{payload:e,error:null}}catch(t){return{payload:e,error:it(t)}}});d();c();l();u();d();c();l();u();var tf=T("facet/updateFacetAutoSelection",e=>Q(e,{allow:new ne({required:!0})}));d();c();l();u();d();c();l();u();var li=class extends vt{constructor(r){super(r);this.getState=r}get activeInstantResultQuery(){let r=this.getState().instantResults;for(let n in r)for(let o in r[n].cache)if(r[n].cache[o].isActive)return r[n].q;return null}get activeInstantResultCache(){let r=this.getState().instantResults;for(let n in r)for(let o in r[n].cache)if(r[n].cache[o].isActive)return r[n].cache[o];return null}get results(){return this.activeInstantResultCache?.results}get queryText(){return this.activeInstantResultQuery??Ne().q}get responseTime(){return this.activeInstantResultCache?.duration??We().duration}get numberOfResults(){return this.activeInstantResultCache?.totalCountFiltered??We().response.totalCountFiltered}getSearchUID(){return this.activeInstantResultCache?.searchUid||super.getSearchUID()}};var rf=()=>je("analytics/instantResult/searchboxAsYouType",e=>e.makeSearchboxAsYouType(),e=>new li(e)),nf=()=>({actionCause:"searchboxAsYouType"});d();c();l();u();var Ls={id:W},Yb={...Ls,q:we},KH=T("instantResults/register",e=>Q(e,Ls)),di=T("instantResults/updateQuery",e=>Q(e,Yb)),YH=T("instantResults/clearExpired",e=>Q(e,Ls));d();c();l();u();var pi=new J({required:!0,min:0}),fi=T("pagination/registerNumberOfResults",e=>Q(e,pi)),mi=T("pagination/updateNumberOfResults",e=>Q(e,pi)),gi=T("pagination/registerPage",e=>Q(e,pi)),Vr=T("pagination/updatePage",e=>Q(e,pi)),yi=T("pagination/nextPage"),hi=T("pagination/previousPage");d();c();l();u();var Lr=T("query/updateQuery",e=>Q(e,{q:new H,enableQuerySyntax:new ne}));d();c();l();u();d();c();l();u();d();c();l();u();var Pt=()=>({cq:"",cqWasSet:!1,aq:"",aqWasSet:!1,lq:"",lqWasSet:!1,dq:"",dqWasSet:!1,defaultFilters:{cq:"",aq:"",lq:"",dq:""}});var Us=()=>je("search/logFetchMoreResults",e=>e.makeFetchMoreResults()),kt=e=>je("search/queryError",(t,r)=>t.makeQueryError({query:r.query?.q||Ne().q,aq:r.advancedSearchQueries?.aq||Pt().aq,cq:r.advancedSearchQueries?.cq||Pt().cq,dq:r.advancedSearchQueries?.dq||Pt().dq,errorType:e.type,errorMessage:e.message}));d();c();l();u();d();c();l();u();var qz=T("didYouMean/enable"),jz=T("didYouMean/disable"),Mz=T("didYouMean/automaticCorrections/disable"),Nz=T("didYouMean/automaticCorrections/enable"),Si=T("didYouMean/correction",e=>Q(e,W)),_z=T("didYouMean/automaticCorrections/mode",e=>Q(e,new H({constrainTo:["next","legacy"],emptyAllowed:!1,required:!0})));d();c();l();u();var Qs=()=>je("analytics/didyoumean/automatic",e=>e.makeDidYouMeanAutomatic());var of=()=>({actionCause:"didYouMeanAutomatic"});d();c();l();u();d();c();l();u();function af(){return{freezeFacetOrder:!1,facets:{}}}d();c();l();u();function sf(){return[]}d();c();l();u();function On(){return{firstResult:0,defaultNumberOfResults:10,numberOfResults:10,totalCountFiltered:0}}d();c();l();u();function cf(){return{}}d();c();l();u();function uf(){return{}}d();c();l();u();function lf(){return{}}function et(e){return{context:e.context||ri(),dictionaryFieldContext:e.dictionaryFieldContext||oi(),facetSet:e.facetSet||qo(),numericFacetSet:e.numericFacetSet||Do(),dateFacetSet:e.dateFacetSet||To(),categoryFacetSet:e.categoryFacetSet||Oo(),automaticFacetSet:e.automaticFacetSet??Fo(),pagination:e.pagination||On(),query:e.query||Ne(),tabSet:e.tabSet||lf(),advancedSearchQueries:e.advancedSearchQueries||Pt(),staticFilterSet:e.staticFilterSet||uf(),querySet:e.querySet||cf(),sortCriteria:e.sortCriteria||Yo(),pipeline:e.pipeline||pr(),searchHub:e.searchHub||wr(),facetOptions:e.facetOptions||af(),facetOrder:e.facetOrder??sf(),debug:e.debug??lo()}}d();c();l();u();var eG=new K({values:{undoneQuery:we},options:{required:!0}}),df=()=>je("analytics/trigger/query",(e,t)=>t.triggers?.queryModification.newQuery?e.makeTriggerQuery():null);d();c();l();u();var vi=T("trigger/query/ignore",e=>Q(e,new H({emptyAllowed:!0,required:!0}))),bi=T("trigger/query/modification",e=>Q(e,new K({values:{originalQuery:Ce,modification:Ce}})));d();c();l();u();var Ft=/*#__PURE__*/function(){var _ref34=_asyncToGenerator(function*(e,t){let r=Zb(e),n=Go(e),o=Jb(e),i=yield wt(e,t),a=()=>e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>5e3?5e3-e.pagination.firstResult:e.pagination.numberOfResults:void 0;return At({...i,...(e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="next",options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&e.didYouMean.queryCorrectionMode==="legacy"}),...(r&&{cq:r}),...(n.length&&{facets:n}),...(e.pagination&&{numberOfResults:a(),firstResult:e.pagination.firstResult}),...(e.facetOptions&&{facetOptions:{freezeFacetOrder:e.facetOptions.freezeFacetOrder}}),...(e.folding?.enabled&&{filterField:e.folding.fields.collection,childField:e.folding.fields.parent,parentField:e.folding.fields.child,filterFieldRange:e.folding.filterFieldRange}),...(e.automaticFacetSet&&{generateAutomaticFacets:{desiredCount:e.automaticFacetSet.desiredCount,numberOfValues:e.automaticFacetSet.numberOfValues,currentFacets:o}}),...(e.generatedAnswer&&{pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:e.generatedAnswer.fieldsToIncludeInCitations}}})})});return function Ft(_x73,_x74){return _ref34.apply(this,arguments)}}();function Jb(e){let t=e.automaticFacetSet?.set;return t?Object.values(t).map(r=>r.response).map(Xb).filter(r=>r.currentValues.length>0):void 0}function Xb(e){let{field:t,label:r,values:n}=e,o=n.filter(i=>i.state==="selected");return{field:t,label:r,currentValues:o}}function Zb(e){let t=e.advancedSearchQueries?.cq.trim()||"",n=Object.values(e.tabSet||{}).find(i=>i.isActive)?.expression.trim()||"",o=eA(e);return[t,n,...o].filter(i=>!!i).join(" AND ")}function eA(e){return Object.values(e.staticFilterSet||{}).map(r=>{let n=r.values.filter(i=>i.state==="selected"&&!!i.expression.trim()),o=n.map(i=>i.expression).join(" OR ");return n.length>1?`(${o})`:o})}var Ot=class{constructor(t,r=n=>{this.dispatch(Lr({q:n}))}){this.config=t;this.onUpdateQueryForCorrection=r}fetchFromAPI(_x75,_x76){var _this10=this;return _asyncToGenerator(function*({mappings:t,request:r},n){let o=Date.now(),i=zo(yield _this10.extra.apiClient.search(r,n),t),a=Date.now()-o,m=_this10.getState().query?.q||"";return{response:i,duration:a,queryExecuted:m,requestExecuted:r}}).apply(this,arguments)}process(t){var _this11=this;return _asyncToGenerator(function*(){return _this11.processQueryErrorOrContinue(t)??(yield _this11.processQueryCorrectionsOrContinue(t))??(yield _this11.processQueryTriggersOrContinue(t))??_this11.processSuccessResponse(t)})()}processQueryErrorOrContinue(t){return Oe(t.response)?(this.dispatch(kt(t.response.error)),this.rejectWithValue(t.response.error)):null}processQueryCorrectionsOrContinue(t){var _this12=this;return _asyncToGenerator(function*(){let r=_this12.getState(),n=_this12.getSuccessResponse(t);if(!n||!r.didYouMean)return null;let{enableDidYouMean:o,automaticallyCorrectQuery:i}=r.didYouMean,{results:a,queryCorrections:m,queryCorrection:f}=n;if(!o||!i)return null;let p=a.length===0&&m&&m.length!==0,y=!X(f)&&!X(f.correctedQuery);if(!p&&!y)return null;let S=p?yield _this12.processLegacyDidYouMeanAutoCorrection(t):_this12.processModernDidYouMeanAutoCorrection(t);return _this12.dispatch(Xe(et(_this12.getState()))),S})()}processLegacyDidYouMeanAutoCorrection(t){var _this13=this;return _asyncToGenerator(function*(){let r=_this13.getCurrentQuery(),n=_this13.getSuccessResponse(t);if(!n.queryCorrections)return null;let{correctedQuery:o}=n.queryCorrections[0],i=yield _this13.automaticallyRetryQueryWithCorrection(o);return Oe(i.response)?(_this13.dispatch(kt(i.response.error)),_this13.rejectWithValue(i.response.error)):(_this13.logOriginalAnalyticsQueryBeforeAutoCorrection(t),_this13.dispatch(Xe(et(_this13.getState()))),{...i,response:{...i.response.success,queryCorrections:n.queryCorrections},automaticallyCorrected:!0,originalQuery:r,analyticsAction:Qs()})})()}processModernDidYouMeanAutoCorrection(t){let r=this.getSuccessResponse(t),{correctedQuery:n,originalQuery:o}=r.queryCorrection;return this.onUpdateQueryForCorrection(n),{...t,response:{...r},queryExecuted:n,automaticallyCorrected:!0,originalQuery:o,analyticsAction:Qs()}}logOriginalAnalyticsQueryBeforeAutoCorrection(t){let r=this.getState(),n=this.getSuccessResponse(t);this.analyticsAction?.()(this.dispatch,()=>this.getStateAfterResponse(t.queryExecuted,t.duration,r,n),this.extra)}processQueryTriggersOrContinue(t){var _this14=this;return _asyncToGenerator(function*(){let r=_this14.getSuccessResponse(t);if(!r)return null;let n=r.triggers.find(m=>m.type==="query")?.content||"";if(!n)return null;if(_this14.getState().triggers?.queryModification.queryToIgnore===n)return _this14.dispatch(vi("")),null;_this14.analyticsAction&&(yield _this14.dispatch(_this14.analyticsAction));let i=_this14.getCurrentQuery(),a=yield _this14.automaticallyRetryQueryWithTriggerModification(n);return Oe(a.response)?(_this14.dispatch(kt(a.response.error)),_this14.rejectWithValue(a.response.error)):(_this14.dispatch(Xe(et(_this14.getState()))),{...a,response:{...a.response.success},automaticallyCorrected:!1,originalQuery:i,analyticsAction:df()})})()}getStateAfterResponse(t,r,n,o){return{...n,query:{q:t,enableQuerySyntax:n.query?.enableQuerySyntax??Ne().enableQuerySyntax},search:{...We(),duration:r,response:o,results:o.results}}}processSuccessResponse(t){return this.dispatch(Xe(et(this.getState()))),{...t,response:this.getSuccessResponse(t),automaticallyCorrected:!1,originalQuery:this.getCurrentQuery(),analyticsAction:this.analyticsAction}}getSuccessResponse(t){return $n(t.response)?t.response.success:null}automaticallyRetryQueryWithCorrection(t){var _this15=this;return _asyncToGenerator(function*(){_this15.onUpdateQueryForCorrection(t);let r=yield _this15.fetchFromAPI(yield Ft(_this15.getState()),{origin:"mainSearch"});return _this15.dispatch(Si(t)),r})()}automaticallyRetryQueryWithTriggerModification(t){var _this16=this;return _asyncToGenerator(function*(){return _this16.dispatch(bi({newQuery:t,originalQuery:_this16.getCurrentQuery()})),_this16.onUpdateQueryForCorrection(t),yield _this16.fetchFromAPI(yield Ft(_this16.getState()),{origin:"mainSearch"})})()}getCurrentQuery(){let t=this.getState();return t.query?.q!==void 0?t.query.q:""}get extra(){return this.config.extra}getState(){return this.config.getState()}get dispatch(){return this.config.dispatch}get analyticsAction(){return this.config.analyticsAction}get rejectWithValue(){return this.config.rejectWithValue}};var ZG=le("search/executeSearch",/*#__PURE__*/function(){var _ref35=_asyncToGenerator(function*(e,t){let r=t.getState();return yield Ai(r,t,e)});return function(_x77,_x78){return _ref35.apply(this,arguments)}}()),eW=le("search/fetchPage",/*#__PURE__*/function(){var _ref36=_asyncToGenerator(function*(e,t){let r=t.getState();return yield $s(r,t,e)});return function(_x79,_x80){return _ref36.apply(this,arguments)}}()),tW=le("search/fetchMoreResults",/*#__PURE__*/function(){var _ref37=_asyncToGenerator(function*(e,t){let r=t.getState();return yield Hs(t,r)});return function(_x81,_x82){return _ref37.apply(this,arguments)}}()),rW=le("search/fetchFacetValues",/*#__PURE__*/function(){var _ref38=_asyncToGenerator(function*(e,t){let r=t.getState();return yield oA(t,e,r)});return function(_x83,_x84){return _ref38.apply(this,arguments)}}()),nW=le("search/fetchInstantResults",/*#__PURE__*/function(){var _ref39=_asyncToGenerator(function*(e,t){return Bs(e,t)});return function(_x85,_x86){return _ref39.apply(this,arguments)}}()),tA=/*#__PURE__*/function(){var _ref40=_asyncToGenerator(function*(e,t){let r=yield Ft(e,t);return r.request={...r.request,firstResult:(e.pagination?.firstResult??0)+(e.search?.results.length??0)},r});return function tA(_x87,_x88){return _ref40.apply(this,arguments)}}(),rA=/*#__PURE__*/function(){var _ref41=_asyncToGenerator(function*(e,t,r){let n=yield wt(e);return At({...n,...(e.didYouMean&&{enableDidYouMean:e.didYouMean.enableDidYouMean}),numberOfResults:r,q:t})});return function rA(_x89,_x90,_x91){return _ref41.apply(this,arguments)}}(),nA=/*#__PURE__*/function(){var _ref42=_asyncToGenerator(function*(e,t){let r=yield Ft(e,t);return r.request.numberOfResults=0,r});return function nA(_x92,_x93){return _ref42.apply(this,arguments)}}(),pf=e=>{e.configuration.analytics.enabled&&Le.getInstance().addElement({name:"Query",...(e.query?.q&&{value:e.query.q}),time:JSON.stringify(new Date)})};function Bs(_x94,_x95){return _Bs.apply(this,arguments)}function _Bs(){_Bs=_asyncToGenerator(function*(e,t){Q(e,{id:W,q:W,maxResultsPerQuery:new J({required:!0,min:1}),cacheTimeout:new J});let{q:r,maxResultsPerQuery:n}=e,o=t.getState(),i=new Ot({...t,analyticsAction:rf()},p=>{t.dispatch(di({q:p,id:e.id}))}),a=yield rA(o,r,n),m=yield i.fetchFromAPI(a,{origin:"instantResults",disableAbortWarning:!0}),f=yield i.process(m);return"response"in f?{results:f.response.results,searchUid:f.response.searchUid,analyticsAction:f.analyticsAction,totalCountFiltered:f.response.totalCountFiltered,duration:f.duration}:f});return _Bs.apply(this,arguments)}function $s(_x96,_x97,_x98){return _$s.apply(this,arguments)}function _$s(){_$s=_asyncToGenerator(function*(e,t,r){pf(e);let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=t.extra,{description:a}=yield r.prepare({getState:()=>t.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i}),m=new Ot({...t,analyticsAction:r}),f=yield Ft(e,a),p=yield m.fetchFromAPI(f,{origin:"mainSearch"});return yield m.process(p)});return _$s.apply(this,arguments)}function Hs(_x99,_x100){return _Hs.apply(this,arguments)}function _Hs(){_Hs=_asyncToGenerator(function*(e,t){let{analyticsClientMiddleware:r,preprocessRequest:n,logger:o}=e.extra,{description:i}=yield Us().prepare({getState:()=>e.getState(),analyticsClientMiddleware:r,preprocessRequest:n,logger:o}),a=new Ot({...e,analyticsAction:Us()}),m=yield tA(t,i),f=yield a.fetchFromAPI(m,{origin:"mainSearch"});return yield a.process(f)});return _Hs.apply(this,arguments)}function oA(_x101,_x102,_x103){return _oA.apply(this,arguments)}function _oA(){_oA=_asyncToGenerator(function*(e,t,r){let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=e.extra,{description:a}=yield t.prepare({getState:()=>e.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i}),m=new Ot({...e,analyticsAction:t}),f=yield nA(r,a),p=yield m.fetchFromAPI(f,{origin:"facetValues"});return yield m.process(p)});return _oA.apply(this,arguments)}function Ai(_x104,_x105,_x106){return _Ai.apply(this,arguments)}function _Ai(){_Ai=_asyncToGenerator(function*(e,t,r){pf(e);let{analyticsClientMiddleware:n,preprocessRequest:o,logger:i}=t.extra,{description:a}=yield r.prepare({getState:()=>t.getState(),analyticsClientMiddleware:n,preprocessRequest:o,logger:i}),m=yield Ft(e,a),f=new Ot({...t,analyticsAction:r}),p=yield f.fetchFromAPI(m,{origin:"mainSearch"});return yield f.process(p)});return _Ai.apply(this,arguments)}d();c();l();u();var Tt=class{constructor(t,r=n=>{this.dispatch(Lr({q:n}))}){this.config=t;this.onUpdateQueryForCorrection=r}fetchFromAPI(_x107,_x108){var _this17=this;return _asyncToGenerator(function*({mappings:t,request:r},n){let o=Date.now(),i=zo(yield _this17.extra.apiClient.search(r,n),t),a=Date.now()-o,m=_this17.getState().query?.q||"";return{response:i,duration:a,queryExecuted:m,requestExecuted:r}}).apply(this,arguments)}process(t){var _this18=this;return _asyncToGenerator(function*(){return _this18.processQueryErrorOrContinue(t)??(yield _this18.processQueryCorrectionsOrContinue(t))??(yield _this18.processQueryTriggersOrContinue(t))??_this18.processSuccessResponse(t)})()}processQueryErrorOrContinue(t){return Oe(t.response)?(this.dispatch(kt(t.response.error)),this.rejectWithValue(t.response.error)):null}processQueryCorrectionsOrContinue(t){var _this19=this;return _asyncToGenerator(function*(){let r=_this19.getState(),n=_this19.getSuccessResponse(t);if(!n||!r.didYouMean)return null;let{enableDidYouMean:o,automaticallyCorrectQuery:i}=r.didYouMean,{results:a,queryCorrections:m,queryCorrection:f}=n;if(!o||!i)return null;let p=a.length===0&&m&&m.length!==0,y=!X(f)&&!X(f.correctedQuery);if(!p&&!y)return null;let S=p?yield _this19.processLegacyDidYouMeanAutoCorrection(t):_this19.processModernDidYouMeanAutoCorrection(t);return _this19.dispatch(Xe(et(_this19.getState()))),S})()}processLegacyDidYouMeanAutoCorrection(t){var _this20=this;return _asyncToGenerator(function*(){let r=_this20.getCurrentQuery(),n=_this20.getSuccessResponse(t);if(!n.queryCorrections)return null;let{correctedQuery:o}=n.queryCorrections[0],i=yield _this20.automaticallyRetryQueryWithCorrection(o);return Oe(i.response)?(_this20.dispatch(kt(i.response.error)),_this20.rejectWithValue(i.response.error)):(_this20.dispatch(Xe(et(_this20.getState()))),{...i,response:{...i.response.success,queryCorrections:n.queryCorrections},automaticallyCorrected:!0,originalQuery:r})})()}processModernDidYouMeanAutoCorrection(t){let r=this.getSuccessResponse(t),{correctedQuery:n,originalQuery:o}=r.queryCorrection;return this.onUpdateQueryForCorrection(n),{...t,response:{...r},queryExecuted:n,automaticallyCorrected:!0,originalQuery:o}}processQueryTriggersOrContinue(t){var _this21=this;return _asyncToGenerator(function*(){let r=_this21.getSuccessResponse(t);if(!r)return null;let n=r.triggers.find(m=>m.type==="query")?.content||"";if(!n)return null;if(_this21.getState().triggers?.queryModification.queryToIgnore===n)return _this21.dispatch(vi("")),null;let i=_this21.getCurrentQuery(),a=yield _this21.automaticallyRetryQueryWithTriggerModification(n);return Oe(a.response)?(_this21.dispatch(kt(a.response.error)),_this21.rejectWithValue(a.response.error)):(_this21.dispatch(Xe(et(_this21.getState()))),{...a,response:{...a.response.success},automaticallyCorrected:!1,originalQuery:i})})()}processSuccessResponse(t){return this.dispatch(Xe(et(this.getState()))),{...t,response:this.getSuccessResponse(t),automaticallyCorrected:!1,originalQuery:this.getCurrentQuery()}}getSuccessResponse(t){return $n(t.response)?t.response.success:null}automaticallyRetryQueryWithCorrection(t){var _this22=this;return _asyncToGenerator(function*(){_this22.onUpdateQueryForCorrection(t);let r=_this22.getState(),{actionCause:n}=of(),o=yield _this22.fetchFromAPI(yield xt(r,_this22.extra.navigatorContext,{actionCause:n}),{origin:"mainSearch"});return _this22.dispatch(Si(t)),o})()}automaticallyRetryQueryWithTriggerModification(t){var _this23=this;return _asyncToGenerator(function*(){return _this23.dispatch(bi({newQuery:t,originalQuery:_this23.getCurrentQuery()})),_this23.onUpdateQueryForCorrection(t),yield _this23.fetchFromAPI(yield xt(_this23.getState(),_this23.extra.navigatorContext),{origin:"mainSearch"})})()}getCurrentQuery(){let t=this.getState();return t.query?.q!==void 0?t.query.q:""}get extra(){return this.config.extra}getState(){return this.config.getState()}get dispatch(){return this.config.dispatch}get rejectWithValue(){return this.config.rejectWithValue}};var QW=le("search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;Q(e,{q:new H,enableQuerySyntax:new ne,clearFilters:new ne}),e.clearFilters&&(r(ai()),r(Op())),r(tf({allow:!0})),r(Lr({q:e.q,enableQuerySyntax:e.enableQuerySyntax})),r(Vr(1))}),BW=T("search/updateSearchAction"),ff=le("search/executeSearch",/*#__PURE__*/function(){var _ref43=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Ai(r,t,e.legacy);mf(r);let n=e.next?gf(e.next):void 0,o=yield xt(r,t.extra.navigatorContext,n),i=new Tt({...t,analyticsAction:n??{}}),a=yield i.fetchFromAPI(o,{origin:"mainSearch"});return yield i.process(a)});return function(_x109,_x110){return _ref43.apply(this,arguments)}}()),$W=le("search/fetchPage",/*#__PURE__*/function(){var _ref44=_asyncToGenerator(function*(e,t){let r=t.getState();if(mf(r),r.configuration.analytics.analyticsMode==="legacy"||!e.next)return $s(r,t,e.legacy);let n=new Tt({...t,analyticsAction:e.next}),o=yield xt(r,t.extra.navigatorContext,e.next),i=yield n.fetchFromAPI(o,{origin:"mainSearch"});return yield n.process(i)});return function(_x111,_x112){return _ref44.apply(this,arguments)}}()),HW=le("search/fetchMoreResults",/*#__PURE__*/function(){var _ref45=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Hs(t,r);let n=Ql("browseResults",t.getState),o=new Tt({...t,analyticsAction:n}),i=yield iA(r,t.extra.navigatorContext,n),a=yield o.fetchFromAPI(i,{origin:"mainSearch"});return yield o.process(a)});return function(_x113,_x114){return _ref45.apply(this,arguments)}}()),zW=le("search/fetchFacetValues",/*#__PURE__*/function(){var _ref46=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Ai(r,t,e.legacy);let n=new Tt({...t,analyticsAction:{}}),o=yield sA(r,t.extra.navigatorContext),i=yield n.fetchFromAPI(o,{origin:"facetValues"});return yield n.process(i)});return function(_x115,_x116){return _ref46.apply(this,arguments)}}()),GW=le("search/fetchInstantResults",/*#__PURE__*/function(){var _ref47=_asyncToGenerator(function*(e,t){let r=t.getState();if(r.configuration.analytics.analyticsMode==="legacy")return Bs(e,t);Q(e,{id:W,q:W,maxResultsPerQuery:new J({required:!0,min:1}),cacheTimeout:new J});let{q:n,maxResultsPerQuery:o}=e,i=gf(nf()),a=yield aA(r,t.extra.navigatorContext,n,o,i),m=new Tt({...t,analyticsAction:i},y=>{t.dispatch(di({q:y,id:e.id}))}),f=yield m.fetchFromAPI(a,{origin:"instantResults",disableAbortWarning:!0}),p=yield m.process(f);return"response"in p?{results:p.response.results,searchUid:p.response.searchUid,totalCountFiltered:p.response.totalCountFiltered,duration:p.duration}:p});return function(_x117,_x118){return _ref47.apply(this,arguments)}}()),iA=/*#__PURE__*/function(){var _ref48=_asyncToGenerator(function*(e,t,r){let n=yield xt(e,t,r);return n.request={...n.request,firstResult:(e.pagination?.firstResult??0)+(e.search?.results.length??0)},n});return function iA(_x119,_x120,_x121){return _ref48.apply(this,arguments)}}(),aA=/*#__PURE__*/function(){var _ref49=_asyncToGenerator(function*(e,t,r,n,o){let i=Er(e,t,o);return At({...i,...(e.didYouMean&&{enableDidYouMean:e.didYouMean.enableDidYouMean}),numberOfResults:n,q:r})});return function aA(_x122,_x123,_x124,_x125,_x126){return _ref49.apply(this,arguments)}}(),sA=/*#__PURE__*/function(){var _ref50=_asyncToGenerator(function*(e,t,r){let n=yield xt(e,t,r);return n.request.numberOfResults=0,n});return function sA(_x127,_x128,_x129){return _ref50.apply(this,arguments)}}(),mf=e=>{e.configuration.analytics.enabled&&Le.getInstance().addElement({name:"Query",...(e.query?.q&&{value:e.query.q}),time:JSON.stringify(new Date)})},gf=e=>({actionCause:e.actionCause,type:e.actionCause});var yf=ge(On(),e=>{e.addCase(fi,(t,r)=>{let n=zs(t),o=r.payload;t.defaultNumberOfResults=t.numberOfResults=o,t.firstResult=Tn(n,o)}).addCase(mi,(t,r)=>{t.numberOfResults=r.payload,t.firstResult=0}).addCase(Xo,t=>{t.firstResult=0}).addCase(gi,(t,r)=>{let n=r.payload;t.firstResult=Tn(n,t.numberOfResults)}).addCase(Vr,(t,r)=>{let n=r.payload;t.firstResult=Tn(n,t.numberOfResults)}).addCase(hi,t=>{let r=zs(t),n=Math.max(r-1,1);t.firstResult=Tn(n,t.numberOfResults)}).addCase(yi,t=>{let r=zs(t),n=uA(t),o=Math.min(r+1,n);t.firstResult=Tn(o,t.numberOfResults)}).addCase(qe.fulfilled,(t,r)=>{r.payload&&(t.numberOfResults=r.payload.pagination.numberOfResults,t.firstResult=r.payload.pagination.firstResult)}).addCase(ht,(t,r)=>{t.firstResult=r.payload.firstResult??t.firstResult,t.numberOfResults=r.payload.numberOfResults??t.defaultNumberOfResults}).addCase(ff.fulfilled,(t,r)=>{let{response:n}=r.payload;t.totalCountFiltered=n.totalCountFiltered}).addCase(si,t=>{Ie(t)}).addCase(Kp,t=>{Ie(t)}).addCase(Qp,t=>{Ie(t)}).addCase(Zp,t=>{Ie(t)}).addCase(_p,t=>{Ie(t)}).addCase(Up,t=>{Ie(t)}).addCase(qp,t=>{Ie(t)}).addCase(Dp,t=>{Ie(t)}).addCase(jp,t=>{Ie(t)}).addCase(Wp,t=>{Ie(t)}).addCase(Xp,t=>{Ie(t)}).addCase(ai,t=>{Ie(t)}).addCase(Yp,t=>{Ie(t)}).addCase(ef,t=>{Ie(t)}).addCase(Np,t=>{Ie(t)}).addCase(Tp,t=>{Ie(t)})});function Ie(e){e.firstResult=On().firstResult}function zs(e){let{firstResult:t,numberOfResults:r}=e;return lA(t,r)}function uA(e){let{totalCountFiltered:t,numberOfResults:r}=e;return dA(t,r)}function Tn(e,t){return(e-1)*t}function lA(e,t){return Math.round(e/t)+1}function dA(e,t){let r=Math.min(e,5e3);return Math.ceil(r/t)}function Gs(e){return e.addReducers({pagination:yf}),{nextPage:yi,previousPage:hi,registerNumberOfResults:fi,registerPage:gi,updateNumberOfResults:mi,updatePage:Vr}}var pA=new Fe({id:new H({emptyAllowed:!0,required:!1,default:""}),numberOfRecommendations:new J({min:0})});function hf(e,t={}){if(!fA(e))throw Ge;let r=It(e),{dispatch:n}=e,o=()=>e.state,i=bu(e,pA,t.options,"buildRecommendationList");return i.id!==""&&n(Fr({id:i.id})),i.numberOfRecommendations&&n(Gs(e).updateNumberOfResults(i.numberOfRecommendations)),{...r,refresh(){n(Rt())},get state(){let a=o();return{recommendations:a.recommendation.recommendations,error:a.recommendation.error,isLoading:a.recommendation.isLoading,searchResponseId:a.recommendation.searchUid}}}}function fA(e){return e.addReducers({recommendation:Or,configuration:ze}),!0}d();c();l();u();d();c();l();u();function Sf(e,t,r){if(!mA(e))throw Ge;let n=1e3,o={selectionDelay:n,debounceWait:n,...t.options},i;return{select:Nn(r,o.debounceWait,{isImmediate:!0}),beginDelayedSelect(){i=setTimeout(r,o.selectionDelay)},cancelPendingSelect(){i&&clearTimeout(i)}}}function mA(e){return e.addReducers({configuration:ze}),!0}function vf(e,t){let r=!1,n=()=>{r||(r=!0,e.dispatch(Jo(t.options.result)))};return Sf(e,t,()=>{n()})}d();c();l();u();d();c();l();u();d();c();l();u();var Dt=()=>new H({required:!1,emptyAllowed:!0}),Ci=T("advancedSearchQueries/update",e=>Q(e,{aq:Dt(),cq:Dt(),lq:Dt(),dq:Dt()})),wi=T("advancedSearchQueries/register",e=>Q(e,{aq:Dt(),cq:Dt(),lq:Dt(),dq:Dt()}));var bf=ge(Pt(),e=>{e.addCase(Ci,(t,r)=>{let{aq:n,cq:o,lq:i,dq:a}=r.payload;ve(n)||(t.aq=n,t.aqWasSet=!0),ve(o)||(t.cq=o,t.cqWasSet=!0),ve(i)||(t.lq=i,t.lqWasSet=!0),ve(a)||(t.dq=a,t.dqWasSet=!0)}).addCase(wi,(t,r)=>{let{aq:n,cq:o,lq:i,dq:a}=r.payload;ve(n)||(t.defaultFilters.aq=n,t.aqWasSet||(t.aq=n)),ve(o)||(t.defaultFilters.cq=o,t.cqWasSet||(t.cq=o)),ve(i)||(t.defaultFilters.lq=i,t.lqWasSet||(t.lq=i)),ve(a)||(t.defaultFilters.dq=a,t.dqWasSet||(t.dq=a))}).addCase(qe.fulfilled,(t,r)=>r.payload?.advancedSearchQueries??t).addCase(ht,(t,r)=>{let{aq:n,cq:o}=r.payload;ve(n)||(t.aq=n,t.aqWasSet=!0),ve(o)||(t.cq=o,t.cqWasSet=!0)})});function gA(e){return e.addReducers({advancedSearchQueries:bf}),{updateAdvancedSearchQueries:Ci,registerAdvancedSearchQueries:wi}}d();c();l();u();function yA(e){return e.addReducers({configuration:ze}),{disableAnalytics:ur,enableAnalytics:lr,setOriginLevel2:ao,setOriginLevel3:so,updateAnalyticsConfiguration:cr,updateBasicConfiguration:yt}}d();c();l();u();function hA(e){return e.addReducers({configuration:ze,pipeline:fr,searchHub:Dr}),{updateSearchConfiguration:Je}}d();c();l();u();function SA(e){return e.addReducers({context:ni}),{addContext:Gt,removeContext:Wt,setContext:zt}}d();c();l();u();function vA(e){return e.addReducers({debug:po}),{disableDebug:uo,enableDebug:co}}d();c();l();u();function bA(e){return e.addReducers({dictionaryFieldContext:ii}),{addContext:Mr,removeContext:Nr,setContext:jr}}d();c();l();u();d();c();l();u();d();c();l();u();var AA={collectionField:new H({emptyAllowed:!1,required:!1}),parentField:new H({emptyAllowed:!1,required:!1}),childField:new H({emptyAllowed:!1,required:!1}),numberOfFoldedResults:new J({min:0,required:!1})},Af=T("folding/register",e=>Q(e,AA)),yY=le("folding/loadCollection",/*#__PURE__*/function(){var _ref51=_asyncToGenerator(function*(e,{getState:t,rejectWithValue:r,extra:{apiClient:n,navigatorContext:o}}){let i=t(),a=i.configuration.analytics.analyticsMode==="legacy"?yield wt(i):Er(i,o),m=yield n.search({...a,q:CA(i),enableQuerySyntax:!0,cq:`@${i.folding.fields.collection}="${e}"`,filterField:i.folding.fields.collection,childField:i.folding.fields.parent,parentField:i.folding.fields.child,filterFieldRange:100},{origin:"foldingCollection"});return Oe(m)?r(m.error):{collectionId:e,results:m.success.results,searchUid:m.success.searchUid,rootResult:i.folding.collections[e].result}});return function(_x130,_x131){return _ref51.apply(this,arguments)}}());function CA(e){return e.query.q===""?"":e.query.enableQuerySyntax?`${e.query.q} OR @uri`:`( <@- ${e.query.q} -@> ) OR @uri`}d();c();l();u();var Cf=()=>({enabled:!1,fields:{collection:"foldingcollection",parent:"foldingparent",child:"foldingchild"},filterFieldRange:2,collections:{}});d();c();l();u();var Ur=T("fields/registerFieldsToInclude",e=>Q(e,io)),xi=T("fields/fetchall/enable"),Ri=T("fields/fetchall/disable"),Ei=le("fields/fetchDescription",/*#__PURE__*/function(){var _ref52=_asyncToGenerator(function*(e,{extra:t,getState:r,rejectWithValue:n}){let o=r(),{accessToken:i,environment:a,organizationId:m}=o.configuration,{apiBaseUrl:f}=o.configuration.search,p=yield t.apiClient.fieldDescriptions({accessToken:i,organizationId:m,url:f??pt(m,a)});return Oe(p)?n(p.error):p.success.fields});return function(_x132,_x133){return _ref52.apply(this,arguments)}}());d();c();l();u();var Ii=["author","language","urihash","objecttype","collection","source","permanentid"],Ws=[...Ii,"date","filetype","parents"],wf=[...Ws,"ec_price","ec_name","ec_description","ec_brand","ec_category","ec_item_group_id","ec_shortdesc","ec_thumbnails","ec_images","ec_promo_price","ec_in_stock","ec_rating"],xf=()=>({fieldsToInclude:Ii,fetchAllFields:!1,fieldsDescription:[]});var Pi=ge(xf(),e=>e.addCase(Ur,(t,r)=>{t.fieldsToInclude=[...new Set(t.fieldsToInclude.concat(r.payload))]}).addCase(xi,t=>{t.fetchAllFields=!0}).addCase(Ri,t=>{t.fetchAllFields=!1}).addCase(Ei.fulfilled,(t,{payload:r})=>{t.fieldsDescription=r}).addCase(Af,(t,{payload:r})=>{let n=Cf().fields;t.fieldsToInclude.push(r.collectionField??n.collection,r.parentField??n.parent,r.childField??n.child)}));function wA(e){return e.addReducers({fields:Pi}),{registerFieldsToInclude:Ur,enableFetchAllFields:xi,disableFetchAllFields:Ri,fetchFieldsDescription:Ei}}d();c();l();u();function xA(e){return e.addReducers({pipeline:fr}),{setPipeline:dr}}d();c();l();u();function RA(e){return e.addReducers({recommendation:Or}),{getRecommendations:Rt,setRecommendationId:Fr}}d();c();l();u();function EA(e){return e.addReducers({}),{logRecommendationOpen:Jo}}d();c();l();u();d();c();l();u();var IA=new Fe({content:new fe({required:!0}),conditions:new fe({required:!0}),priority:new J({required:!1,default:0,min:0}),fields:new ie({required:!1,each:W})});function Rf(){let e=[],t=r=>{let n=IA.validate(r);if(!r.conditions.every(i=>i instanceof Function))throw new Wr("Each template condition should be a function that takes a Result or Product as an argument and returns a boolean");return n};return{registerTemplates(...r){r.forEach(n=>{let o={...t(n),fields:n.fields||[]};e.push(o)}),e.sort((n,o)=>o.priority-n.priority)},selectTemplate(r){let n=e.find(o=>o.conditions.every(i=>i(r)));return n?n.content:null},selectLinkTemplate(r){let n=e.find(o=>o.conditions.every(i=>i(r)));return n?n.linkContent:null}}}function Ef(e){if(!PA(e))throw Ge;let{registerTemplates:t,selectTemplate:r,selectLinkTemplate:n}=Rf();return{registerTemplates:(...o)=>{t(...o);let i=[];o.forEach(a=>{a.fields&&i.push(...a.fields)}),e.dispatch(Ur(i))},selectTemplate:r,selectLinkTemplate:n}}function PA(e){return e.addReducers({fields:Pi}),!0}d();c();l();u();function kA(e){return e.addReducers({searchHub:Dr}),{setSearchHub:Tr}}/**
32
32
  * @license
33
33
  *
34
34
  * Copyright 2025 Coveo Solutions Inc.
@@ -44,4 +44,6 @@ ${y}`:y;break;case"event":n.event=y;break;case"id":e(n.id=y);break;case"retry":k
44
44
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
45
45
  * See the License for the specific language governing permissions and
46
46
  * limitations under the License.
47
- */if(__exports!=exports)module.exports=exports;return module.exports});
47
+ */if(__exports!=exports)module.exports=exports;return module.exports});
48
+
49
+ window.coveoQuanticVersion = '3.30.4-pre.003bd2b1f2';