PageSourceSearch

https://www.philips.es/c-resources/_next/static/chunks/4595-a45af2a8f2097719.js

js philips.es collected 2026-09-24 18:12:22 UTC 490,165 bytes, 20 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4595],{577:(e,t,r)=>{"use strict";r.d(t,{FT:()=>u,Vr:()=>d,Xk:()=>l,cb:()=>o,lp:()=>c});var n=r(32995),i=r(40687),a=r(34541),s=r(70766);let o=()=>(0,n.Zl)("analytics/pager/resize",(e,t)=>e.makePagerResize({currentResultsPerPage:t.pagination?.numberOfResults||(0,s.y)().numberOfResults})),u=()=>(0,n.Zl)("analytics/pager/number",(e,t)=>e.makePagerNumber({pagerNumber:(0,a.wF)(t)})),l=()=>(0,n.Zl)("analytics/pager/next",(e,t)=>e.makePagerNext({pagerNumber:(0,a.wF)(t)})),c=()=>(0,n.Zl)("analytics/pager/previous",(e,t)=>e.makePagerPrevious({pagerNumber:(0,a.wF)(t)})),d=()=>({actionCause:i.d.browseResults})},914:(e,t,r)=>{"use strict";r.d(t,{Ce:()=>a,He:()=>n,sG:()=>i});let n=Error("Failed to load reducers.");class i 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."}}class a extends Error{statusCode;constructor(e,t){super(),this.name="Disconnected",this.message=`Client could not connect to the following URL: ${e}`,this.statusCode=t??0}}},2308:(e,t,r)=>{"use strict";r.d(t,{y:()=>n});let n=()=>({cq:"",cqWasSet:!1,aq:"",aqWasSet:!1,lq:"",lqWasSet:!1,dq:"",dqWasSet:!1,defaultFilters:{cq:"",aq:"",lq:"",dq:""}})},2377:(e,t,r)=>{var n=r(18240);e.exports=function(e){return e==e&&!n(e)}},2430:(e,t,r)=>{"use strict";r.d(t,{x:()=>a});var n=r(65179),i=r(58604);let a={organizationId:i.r3,accessToken:i.r3,name:new n.hU({required:!1,emptyAllowed:!1}),analytics:new n.Bo({options:{required:!1},values:{enabled:new n.Ci({required:!1}),originContext:new n.hU({required:!1}),originLevel2:new n.hU({required:!1}),originLevel3:new n.hU({required:!1}),analyticsMode:new n.hU({constrainTo:["legacy","next"],required:!1,default:"next"}),proxyBaseUrl:new n.hU({required:!1,url:!0}),trackingId:new n.hU({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/})}}),environment:new n.hU({required:!1,default:"prod",constrainTo:["prod","hipaa","stg","dev"]})}},2738:(e,t,r)=>{"use strict";var n,i;r.d(t,{to:()=>s}),(i=n||(n={}))[i.SseMaxDurationExceeded=1e3]="SseMaxDurationExceeded",i[i.SseFollowUpNotSupported=1001]="SseFollowUpNotSupported",i[i.ConversationNotFound=1002]="ConversationNotFound",i[i.SseModelsNotAvailable=1003]="SseModelsNotAvailable",i[i.SseInternalError=1004]="SseInternalError",i[i.SseTurnLimitReached=1005]="SseTurnLimitReached";let a={"KNOWLEDGE:SSE_MAX_DURATION_EXCEEDED":n.SseMaxDurationExceeded,"KNOWLEDGE:SSE_FOLLOW_UP_NOT_SUPPORTED":n.SseFollowUpNotSupported,"KNOWLEDGE:NOT_FOUND":n.ConversationNotFound,"KNOWLEDGE:SSE_MODELS_NOT_AVAILABLE":n.SseModelsNotAvailable,"KNOWLEDGE:SSE_INTERNAL_ERROR":n.SseInternalError,"KNOWLEDGE:SSE_TURN_LIMIT_REACHED":n.SseTurnLimitReached};function s(e){return e?a[e]??n.SseInternalError:n.SseInternalError}},3107:(e,t,r)=>{"use strict";r.d(t,{v:()=>a});var n=r(72802),i=r(29043);class a{getState;state;constructor(e){this.getState=e,this.state=e()}getLanguage(){let e;return(e=this.state.configuration.search.locale.split("-")[0])&&2===e.length?e:"en"}getBaseMetadata(){let{context:e,configuration:t}=this.state,r=e?.contextValues||{},n={};for(let[e,t]of Object.entries(r))n[`context_${e}`]=t;return"legacy"===t.analytics.analyticsMode&&(n.coveoHeadlessVersion=i.x),n}getOriginContext(){return this.state.configuration.analytics.originContext}getOriginLevel1(){return this.state.searchHub||(0,n.J)()}getOriginLevel2(){return this.state.configuration.analytics.originLevel2}getOriginLevel3(){return this.state.configuration.analytics.originLevel3}getIsAnonymous(){return this.state.configuration.analytics.anonymous}}},3774:(e,t,r)=>{"use strict";r.d(t,{AE:()=>T,C5:()=>w,GE:()=>f,Ln:()=>x,OP:()=>E,V$:()=>_,Z9:()=>h,aI:()=>C,hU:()=>b,hz:()=>g,iw:()=>A,mC:()=>I,nD:()=>v,o5:()=>d,pg:()=>y,q9:()=>S,qH:()=>m,sG:()=>k,y7:()=>p,yU:()=>O});var n=r(65179),i=r(69285),a=r(58604),s=r(19528),o=r(73282);let u=new n.hU({required:!0}),l=new n.hU({required:!0,constrainTo:o.VS}),c=e=>({...e,name:(0,o.x$)(e.name)}),d=(0,i.VP)("followUpAnswers/setIsEnabled",e=>(0,a.rq)(e,new n.Ci({required:!0}))),f=(0,i.VP)("followUpAnswers/setFollowUpAnswersConversationId",e=>(0,a.rq)(e,a.r3)),p=(0,i.VP)("followUpAnswers/setFollowUpAnswersConversationToken",e=>(0,a.rq)(e,a.r3)),h=(0,i.VP)("followUpAnswers/clearFollowUpAnswersConversationToken"),g=(0,i.VP)("followUpAnswers/createFollowUpAnswer",e=>(0,a.rq)(e,{question:a.r3})),m=(0,i.VP)("followUpAnswers/setActiveFollowUpAnswerId",e=>(0,a.rq)(e,a.r3)),v=(0,i.VP)("followUpAnswers/setFollowUpAnswerContentFormat",e=>(0,a.rq)(e,{contentFormat:s.Ez,answerId:a.r3})),y=(0,i.VP)("followUpAnswers/setFollowUpIsLoading",e=>(0,a.rq)(e,{isLoading:new n.Ci({required:!0}),answerId:a.r3})),b=(0,i.VP)("followUpAnswers/setFollowUpIsStreaming",e=>(0,a.rq)(e,{isStreaming:new n.Ci({required:!0}),answerId:a.r3})),w=(0,i.VP)("followUpAnswers/followUpMessageChunkReceived",e=>(0,a.rq)(e,{textDelta:u,answerId:a.r3})),S=(0,i.VP)("followUpAnswers/followUpCitationsReceived",e=>(0,a.rq)(e,{citations:new n.v({required:!0,each:new n.Bo({values:s.XQ})}),answerId:a.r3})),E=(0,i.VP)("followUpAnswers/followUpCompleted",e=>(0,a.rq)(e,{answerId:a.r3,cannotAnswer:new n.Ci({required:!1})})),I=(0,i.VP)("followUpAnswers/followUpFailed",e=>(0,a.rq)(e,{message:new n.hU,code:new n.lS({min:0}),answerId:a.r3})),A=(0,i.VP)("followUpAnswers/activeFollowUpStartFailed",e=>(0,a.rq)(e,{message:new n.hU})),k=(0,i.VP)("followUpAnswers/likeFollowUp",e=>(0,a.rq)(e,{answerId:a.r3}
1)),C=(0,i.VP)("followUpAnswers/dislikeFollowUp",e=>(0,a.rq)(e,{answerId:a.r3})),T=(0,i.VP)("followUpAnswers/submitFollowUpFeedback",e=>(0,a.rq)(e,{answerId:a.r3})),_=(0,i.VP)("followUpAnswers/resetFollowUpAnswers"),O=(0,i.VP)("followUpAnswers/stepStarted",e=>(0,a.rq)(c(e),{answerId:a.r3,name:l,startedAt:new n.lS({min:0,required:!0})})),x=(0,i.VP)("followUpAnswers/stepFinished",e=>(0,a.rq)(c(e),{answerId:a.r3,name:l,finishedAt:new n.lS({min:0,required:!0})}))},3800:(e,t,r)=>{"use strict";r.d(t,{$i:()=>eh,Qx:()=>m,YT:()=>ec,a6:()=>v,c2:()=>S,jM:()=>ef,ss:()=>el,vI:()=>ep});var n,i=Symbol.for("immer-nothing"),a=Symbol.for("immer-draftable"),s=Symbol.for("immer-state");function o(e){throw Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var u=Object,l=u.getPrototypeOf,c="constructor",d="prototype",f="configurable",p="enumerable",h="writable",g="value",m=e=>!!e&&!!e[s];function v(e){return!!e&&(w(e)||T(e)||!!e[a]||!!e[c]?.[a]||_(e)||O(e))}var y=u[d][c].toString(),b=new WeakMap;function w(e){if(!e||!x(e))return!1;let t=l(e);if(null===t||t===u[d])return!0;let r=u.hasOwnProperty.call(t,c)&&t[c];if(r===Object)return!0;if(!R(r))return!1;let n=b.get(r);return void 0===n&&(n=Function.toString.call(r),b.set(r,n)),n===y}function S(e){return m(e)||o(15,e),e[s].base_}function E(e,t,r=!0){0===I(e)?(r?Reflect.ownKeys(e):u.keys(e)).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function I(e){let t=e[s];return t?t.type_:T(e)?1:_(e)?2:3*!!O(e)}var A=(e,t,r=I(e))=>2===r?e.has(t):u[d].hasOwnProperty.call(e,t),k=(e,t,r=I(e))=>2===r?e.get(t):e[t],C=(e,t,r,n=I(e))=>{2===n?e.set(t,r):3===n?e.add(r):e[t]=r},T=Array.isArray,_=e=>e instanceof Map,O=e=>e instanceof Set,x=e=>"object"==typeof e,R=e=>"function"==typeof e,N=e=>e.modified_?e.copy_:e.base_;function P(e,t){if(_(e))return new Map(e);if(O(e))return new Set(e);if(T(e))return Array[d].slice.call(e);let r=w(e);if(!0!==t&&("class_only"!==t||r)){let t=l(e);if(null!==t&&r)return{...e};let n=u.create(t);return u.assign(n,e)}{let t=u.getOwnPropertyDescriptors(e);delete t[s];let r=Reflect.ownKeys(t);for(let n=0;n<r.length;n++){let i=r[n],a=t[i];!1===a[h]&&(a[h]=!0,a[f]=!0),(a.get||a.set)&&(t[i]={[f]:!0,[h]:!0,[p]:a[p],[g]:e[i]})}return u.create(l(e),t)}}function q(e,t=!1){return D(e)||m(e)||!v(e)||(I(e)>1&&u.defineProperties(e,{set:j,add:j,clear:j,delete:j}),u.freeze(e),t&&E(e,(e,t)=>{q(t,!0)},!1)),e}var j={[g]:function(){o(2)}};function D(e){return!(null!==e&&x(e))||u.isFrozen(e)}var M="MapSet",U="Patches",F="ArrayMethods",L={};function V(e){let t=L[e];return t||o(0,e),t}var $=e=>!!L[e];function G(e,t){t&&(e.patchPlugin_=V(U),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function z(e){Q(e),e.drafts_.forEach(Y),e.drafts_=null}function Q(e){e===n&&(n=e.parent_)}var H=e=>n={drafts_:[],parent_:n,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:$(M)?V(M):void 0,arrayMethodsPlugin_:$(F)?V(F):void 0};function Y(e){let t=e[s];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function B(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(void 0!==e&&e!==r){r[s].modified_&&(z(t),o(4)),v(e)&&(e=K(t,e));let{patchPlugin_:n}=t;n&&n.generateReplacementPatches_(r[s].base_,e,t)}else e=K(t,r);return function(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&q(t,r)}(t,e,!0),z(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==i?e:void 0}function K(e,t){if(D(t))return t;let r=t[s];if(!r)return et(t,e.handledSet_,e);if(!X(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:t}=r;if(t)for(;t.length>0;)t.pop()(e);ee(r,e)}return r.copy_}function W(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var X=(e,t)=>e.scope_===t,Z=[];function J(e,t,r,n){let i=e.copy_||e.base_,a=e.type_;if(void 0!==n&&k(i,n,a)===t)return void C(i,n,r,a);if(!e.draftLocations_){let t=e.draftLocations_=new Map;E(i,(e,r)=>{if(m(r)){let n=t.get(r)||[];n.push(e),t.set(r,n)}})}for(let n of e.draftLocations_.get(t)??Z)C(i,n,r,a)}function ee(e,t){if(e.modified_&&!e.finalized_&&(3===e.type_||1===e.type_&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:r}=t;if(r){let n=r.getPath(e);n&&r.generatePatches_(e,n,t)}W(e)}}function et(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||m(e)||t.has(e)||!v(e)||D(e)||(t.add(e),E(e,(n,i)=>{if(m(i)){let t=i[s];X(t,r)&&(C(e,n,N(t),e.type_),W(t))}else v(i)&&et(i,t,r)})),e}var er={get(e,t){var r,n,i,a;let o;if(t===s)return e;let u=e.scope_.arrayMethodsPlugin_,l=1===e.type_&&"string"==typeof t;if(l&&u?.isArrayOperationMethod(t))return u.createMethodInterceptor(e,t);let c=e.copy_||e.base_;if(!A(c,t,e.type_)){let n;return r=e,(n=ea(c,t))?g in n?n[g]:n.get?.call(r.draft_):void 0}let d=c[t];if(e.finalized_||!v(d)||l&&e.operationMethod&&u?.isMutatingArrayMethod(e.operationMethod)&&Number.isInteger(o=+t)&&String(o)===t)return d;if(d===ei(e.base_,t)||(n=e,i=t,a=d,!(1!==n.type_||!n.allIndicesReassigned_||n.assigned_?.get(i))&&v(a)&&!a[s]&&n.baseRefs_.has(a))){eo(e);let r=1===e.type_?+t:t,n=eu(e.scope_,d,e,r);return e.copy_[r]=n}return d},has:(e,t)=>t in(e.copy_||e.base_),ownKeys:e=>Reflect.ownKeys(e.copy_||e.base_),set(e,t,r){let n=ea(e.copy_||e.base_,t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let n=ei(e.copy_||e.base_,t),i=n?.[s];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if((r===n?0!==r||1/r==1/n:r!=r&&n!=n)&&(void 0!==r||A(e.base_,t,e.type_)))return!0;eo(e),es(e)}return!!(e.copy_[t]===r&&(void 0!==r||A(e.copy_,t,e.type_))||Number.isNaN(r)&&Number.isNaN(e.copy_[t]))||
1(e.copy_[t]=r,e.assigned_.set(t,!0),!function(e,t,r){let{scope_:n}=e;if(m(r)){let i=r[s];X(i,n)&&i.callbacks_.push(function(){eo(e),J(e,r,N(i),t)})}else v(r)&&e.callbacks_.push(function(){let i=e.copy_||e.base_;3===e.type_?i.has(r)&&et(r,n.handledSet_,n):k(i,t,e.type_)===r&&n.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&et(k(e.copy_,t,e.type_),n.handledSet_,n)})}(e,t,r),!0)},deleteProperty:(e,t)=>(eo(e),void 0!==ei(e.base_,t)||t in e.base_?(e.assigned_.set(t,!1),es(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){let r=e.copy_||e.base_,n=Reflect.getOwnPropertyDescriptor(r,t);return n?{[h]:!0,[f]:1!==e.type_||"length"!==t,[p]:n[p],[g]:r[t]}:n},defineProperty(){o(11)},getPrototypeOf:e=>l(e.base_),setPrototypeOf(){o(12)}},en={};for(let e in er){let t=er[e];en[e]=function(){let e=arguments;return e[0]=e[0][0],t.apply(this,e)}}function ei(e,t){let r=e[s];return(r?r.copy_||r.base_:e)[t]}function ea(e,t){if(!(t in e))return;let r=l(e);for(;r;){let e=Object.getOwnPropertyDescriptor(r,t);if(e)return e;r=l(r)}}function es(e){!e.modified_&&(e.modified_=!0,e.parent_&&es(e.parent_))}function eo(e){e.copy_||(e.assigned_=new Map,e.copy_=P(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function eu(e,t,r,i){let[a,s]=_(t)?V(M).proxyMap_(t,r):O(t)?V(M).proxySet_(t,r):function(e,t){let r=T(e),i={type_:+!!r,scope_:t?t.scope_:n,modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},a=i,s=er;r&&(a=[i],s=en);let{revoke:o,proxy:u}=Proxy.revocable(a,s);return i.draft_=u,i.revoke_=o,[u,i]}(t,r);if((r?.scope_??n).drafts_.push(a),s.callbacks_=r?.callbacks_??[],s.key_=i,r&&void 0!==i)r.callbacks_.push(function(e){if(!s||!X(s,e))return;e.mapSetPlugin_?.fixSetContents(s);let t=N(s);J(r,s.draft_??s,t,i),ee(s,e)});else s.callbacks_.push(function(e){e.mapSetPlugin_?.fixSetContents(s);let{patchPlugin_:t}=e;s.modified_&&t&&t.generatePatches_(s,[],e)});return a}function el(e){return m(e)||o(10,e),function e(t){let r;if(!v(t)||D(t))return t;let n=t[s],i=!0;if(n){if(!n.modified_)return n.base_;n.finalized_=!0,r=P(t,n.scope_.immer_.useStrictShallowCopy_),i=n.scope_.immer_.shouldUseStrictIteration()}else r=P(t,!0);return E(r,(t,n)=>{C(r,t,e(n))},i),n&&(n.finalized_=!1),r}(e)}function ec(){let e="replace",t="remove";function r(e){if(!v(e))return e;if(T(e))return e.map(r);if(_(e))return new Map(Array.from(e.entries()).map(([e,t])=>[e,r(t)]));if(O(e))return new Set(Array.from(e).map(r));let t=Object.create(l(e));for(let n in e)t[n]=r(e[n]);return A(e,a)&&(t[a]=e[a]),t}function n(e){return m(e)?r(e):e}L[U]||(L[U]={applyPatches_:function(n,i){return i.forEach(i=>{let{path:a,op:s}=i,u=n;for(let e=0;e<a.length-1;e++){let t=I(u),r=a[e];"string"!=typeof r&&"number"!=typeof r&&(r=""+r),(0===t||1===t)&&("__proto__"===r||r===c)&&o(19),R(u)&&r===d&&o(19),null!==(u=k(u,r))&&x(u)||o(18,a.join("/"))}let l=I(u),f=r(i.value),p=a[a.length-1];switch(s){case e:switch(l){case 2:return u.set(p,f);case 3:o(16);default:return u[p]=f}case"add":switch(l){case 1:return"-"===p?u.push(f):u.splice(p,0,f);case 2:return u.set(p,f);case 3:return u.add(f);default:return u[p]=f}case t:switch(l){case 1:return u.splice(p,1);case 2:return u.delete(p);case 3:return u.delete(i.value);default:return delete u[p]}default:o(17,s)}}),n},generatePatches_:function(r,i,a){if(r.scope_.processedForPatches_.has(r))return;r.scope_.processedForPatches_.add(r);let{patches_:o,inversePatches_:u}=a;switch(r.type_){case 0:case 2:return function(r,i,a,s){let{base_:o,copy_:u,type_:l}=r;E(r.assigned_,(r,c)=>{let d=k(o,r,l),f=k(u,r,l),p=c?A(o,r)?e:"add":t;if(d===f&&p===e)return;let h=i.concat(r);a.push(p===t?{op:p,path:h}:{op:p,path:h,value:n(f)}),s.push("add"===p?{op:t,path:h}:p===t?{op:"add",path:h,value:n(d)}:{op:e,path:h,value:n(d)})})}(r,i,o,u);case 1:return function(r,i,a,o){let{base_:u,assigned_:l}=r,c=r.copy_;c.length<u.length&&([u,c]=[c,u],[a,o]=[o,a]);let d=!0===r.allIndicesReassigned_;for(let t=0;t<u.length;t++){let r=c[t],f=u[t];if((d||l?.get(t.toString()))&&r!==f){let u=r?.[s];if(u&&u.modified_)continue;let l=i.concat([t]);a.push({op:e,path:l,value:n(r)}),o.push({op:e,path:l,value:n(f)})}}for(let e=u.length;e<c.length;e++){let t=i.concat([e]);a.push({op:"add",path:t,value:n(c[e])})}for(let e=c.length-1;u.length<=e;--e){let r=i.concat([e]);o.push({op:t,path:r})}}(r,i,o,u);case 3:return function(e,r,n,i){let{base_:a,copy_:s}
1=e,o=0;a.forEach(e=>{if(!s.has(e)){let a=r.concat([o]);n.push({op:t,path:a,value:e}),i.unshift({op:"add",path:a,value:e})}o++}),o=0,s.forEach(e=>{if(!a.has(e)){let a=r.concat([o]);n.push({op:"add",path:a,value:e}),i.unshift({op:t,path:a,value:e})}o++})}(r,i,o,u)}},generateReplacementPatches_:function(t,r,n){let{patches_:a,inversePatches_:s}=n;a.push({op:e,path:[],value:r===i?void 0:r}),s.push({op:e,path:[],value:t})},getPath:function e(t,r=[]){if(void 0!==t.key_){var n;let e,i=t.parent_.copy_??t.parent_.base_,a=x(n=k(i,t.key_))?n?.[s]:null,o=k(i,t.key_);if(void 0===o||o!==t.draft_&&o!==t.base_&&o!==t.copy_||null!=a&&a.base_!==t.base_)return null;let u=3===t.parent_.type_;if(e=u?Array.from(t.parent_.drafts_.keys()).indexOf(t.key_):t.key_,!(u&&i.size>e||A(i,e)))return null;r.push(e)}if(t.parent_)return e(t.parent_,r);r.reverse();try{var i=t.copy_,a=r;let e=i;for(let t=0;t<a.length-1;t++)if(!x(e=k(e,a[t]))||null===e)throw Error(`Cannot resolve path at '${a.join("/")}'`)}catch(e){return null}return r}})}en.deleteProperty=function(e,t){return en.set.call(this,e,t,void 0)},en.set=function(e,t,r){return er.set.call(this,e[0],t,r,e[0])};var ed=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(e,t,r)=>{let n;if(R(e)&&!R(t)){let r=t;t=e;let n=this;return function(e=r,...i){return n.produce(e,e=>t.call(this,e,...i))}}if(R(t)||o(6),void 0===r||R(r)||o(7),v(e)){let i=H(this),a=eu(i,e,void 0),s=!0;try{n=t(a),s=!1}finally{s?z(i):Q(i)}return G(i,r),B(n,i)}if(e&&x(e))o(1,e);else{if(void 0===(n=t(e))&&(n=e),n===i&&(n=void 0),this.autoFreeze_&&q(n,!0),r){let t=[],i=[];V(U).generateReplacementPatches_(e,n,{patches_:t,inversePatches_:i}),r(t,i)}return n}},this.produceWithPatches=(e,t)=>{let r,n;return R(e)?(t,...r)=>this.produceWithPatches(t,t=>e(t,...r)):[this.produce(e,t,(e,t)=>{r=e,n=t}),r,n]},(e=>"boolean"==typeof e)(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),(e=>"boolean"==typeof e)(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),(e=>"boolean"==typeof e)(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){v(e)||o(8),m(e)&&(e=el(e));let t=H(this),r=eu(t,e,void 0);return r[s].isManual_=!0,Q(t),r}finishDraft(e,t){let r=e&&e[s];r&&r.isManual_||o(9);let{scope_:n}=r;return G(n,t),B(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let n=t[r];if(0===n.path.length&&"replace"===n.op){e=n.value;break}}r>-1&&(t=t.slice(r+1));let n=V(U).applyPatches_;return m(e)?n(e,t):this.produce(e,e=>n(e,t))}},ef=ed.produce,ep=ed.produceWithPatches.bind(ed),eh=ed.applyPatches.bind(ed)},4270:(e,t,r)=>{"use strict";r.d(t,{S:()=>n});let n=()=>""},4477:(e,t,r)=>{"use strict";function n(){return{}}r.d(t,{v:()=>n})},4793:(e,t,r)=>{"use strict";function n(){return{}}r.d(t,{L:()=>n})},5121:(e,t,r)=>{"use strict";r.d(t,{FC:()=>c,Kj:()=>d,m2:()=>p,ru:()=>s,wH:()=>u});var n=r(65179),i=r(78752),a=r(95448);let s=e=>o(e)||u(e)?e.generatedAnswer?.answerId:l(e)?e.search?.response?.extendedResults?.generativeQuestionAnsweringId:void 0,o=e=>"answer"in e&&"generatedAnswer"in e&&!(0,n.hX)(e.generatedAnswer?.answerConfigurationId),u=e=>{let t=(0,a.Fh)(e);return"generatedAnswer"in e&&"string"==typeof t&&t.trim().length>0},l=e=>"search"in e&&void 0!==e.search&&"object"==typeof e.search,c=e=>e.generatedAnswer?.fieldsToIncludeInCitations,d=e=>e.followUpAnswers?.conversationId,f=(0,i.Mz)(e=>e.followUpAnswers?.followUpAnswers,e=>e?.flatMap(e=>e.citations)),p=(0,i.Mz)(e=>e.generatedAnswer?.citations,f,(e,t)=>t,(e,t,r)=>e?.find(e=>e.id===r)??t?.find(e=>e.id===r))},5980:(e,t,r)=>{"use strict";r.d(t,{H:()=>n});let n=()=>({enabled:!1,fields:{collection:"foldingcollection",parent:"foldingparent",child:"foldingchild"},filterFieldRange:2,collections:{}})},6005:()=>{},6301:(e,t,r)=>{"use strict";r.d(t,{Hf:()=>s,a5:()=>o,nn:()=>a});var n=r(78752),i=r(66208);function a(e){return""!==e.search.response.searchUid}function s(e,t,r){return e.search.results.find(e=>(0,i.VJ)(e,t)===r)}let o=(0,n.Mz)(e=>e.search,e=>e?.searchAction?.actionCause||"")},6466:(e,t,r)=>{"use strict";r.d(t,{$:()=>o,p:()=>s});var n=r(65179),i=r(69285),a=r(58604);let s=(0,i.VP)("tab/register",e=>{let t=new n.Bo({values:{id:a.r3,expression:a.GH}});return(0,a.rq)(e,t)}),o=(0,i.VP)("tab/updateActiveTab",e=>(0,a.rq)(e,a.r3))},7465:(e,t,r)=>{"use strict";r.d(t,{F4:()=>w,LG:()=>m,NE:()=>b,SH:()=>E,hd:()=>v,xy:()=>y,yj:()=>S});var n=r(65179),i=r(69285),a=r(69096),s=r(74891),o=r(53267),u=r(58604),l=r(52103),c=r(64379),d=r
1(58994),f=r(93758);let p={start:u.r3,end:u.r3,endInclusive:new n.Ci({required:!0}),state:u.r3},h={facetId:c.k,field:u.r3,tabs:new n.Bo({options:{required:!1},values:{included:new n.v({each:new n.hU}),excluded:new n.v({each:new n.hU})}}),activeTab:new n.hU({required:!1}),currentValues:new n.v({required:!1,each:new n.Bo({values:p})}),generateAutomaticRanges:new n.Ci({required:!0}),filterFacetCount:new n.Ci({required:!1}),injectionDepth:new n.lS({required:!1,min:0}),numberOfValues:new n.lS({required:!1,min:1}),sortCriteria:new n.WT({required:!1}),rangeAlgorithm:new n.WT({required:!1})};function g(e){return(0,s.o6)(e)?(0,s.RH)(e):e}function m(e){e.currentValues&&e.currentValues.forEach(e=>{let{start:t,end:r}=(0,o.w)(e);if((0,a._U)(g(t)).isAfter((0,a._U)(g(r))))throw Error(`The start value is greater than the end value for the date range ${e.start} to ${e.end}`)})}let v=(0,i.VP)("dateFacet/register",e=>{try{return(0,u.En)(e,h),m(e),{payload:e,error:null}}catch(t){return{payload:e,error:(0,u.py)(t)}}}),y=(0,i.VP)("dateFacet/toggleSelectValue",e=>(0,u.rq)(e,{facetId:c.k,selection:new n.Bo({values:f.kr})})),b=(0,i.VP)("dateFacet/toggleExcludeValue",e=>(0,u.rq)(e,{facetId:c.k,selection:new n.Bo({values:f.kr})})),w=(0,i.VP)("dateFacet/updateFacetValues",e=>{try{return(0,u.En)(e,{facetId:c.k,values:new n.v({each:new n.Bo({values:f.kr})})}),m({currentValues:e.values}),{payload:e,error:null}}catch(t){return{payload:e,error:(0,u.py)(t)}}}),S=d.L,E=l.ge},7931:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,a){function s(e){try{u(n.next(e))}catch(e){a(e)}}function o(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,o)}u((n=n.apply(e,t||[])).next())})},s=this&&this.__generator||function(e,t){var r,n,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){var u=[a,o];if(r)throw TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,n=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){s=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){s.label=u[1];break}if(6===u[0]&&s.label<i[1]){s.label=i[1],i=u;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(u);break}i[2]&&s.ops.pop(),s.trys.pop();continue}u=t.call(e,s)}catch(e){u=[6,e],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}};Object.defineProperty(t,"__esModule",{value:!0}),t.SkipFirstDelay=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.apply=function(){return a(this,void 0,void 0,function(){return s(this,function(t){return[2,!!this.isFirstAttempt||e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return 0===this.attempt},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(r(75455).Delay)},8045:(e,t,r)=>{"use strict";r.d(t,{D:()=>i});var n=r(35521);let i=(e,t,r)=>{let i=(0,n.bV)(t,r),a=e?.trim();if(!i||!t||!a)throw Error("Missing required parameters for answer endpoint");let s=`/api/preview/organizations/${t}/agents`;return`${i}${s}/${a}`}},8190:(e,t,r)=>{"use strict";r.d(t,{l:()=>a});var n=r(69285),i=r(31746);let a=(0,n.vy)({},e=>e.addCase(i.am,(e,t)=>{let{id:r,redirectionUrl:n,overwrite:i}=t.payload;!i&&r in e||(e[r]=s(n))}).addCase(i.MJ,(e,t)=>{let{id:r}=t.payload,n=e[r];if(n){e[r]=s(n.defaultRedirectionUrl);return}}).addCase(i.tD,(e,t)=>{let{id:r,redirectionUrl:n}=t.payload;r in e&&(e[r]=s(n))}).addCase(i.GA.pending,(e,t)=>{let r=e[t.meta.arg.id];r&&(r.isLoading=!0)}).addCase(i.GA.fulfilled,(e,t)=>{let r=t.payload,n=e[t.meta.arg.id];n&&(n.redirectTo=r||n.defaultRedirectionUrl,n.isLoading=!1)}).addCase(i.GA.rejected,(e,t)=>{let r=e[t.meta.arg.id];r&&(r.isLoading=!1)}).addCase(i.zj,(e,t)=>{let r=e[t.payload.id];r&&(r.analytics.cause="searchFromLink")}).addCase(i.DP,(e,t)=>{let r=e[t.payload.id];r&&(r.analytics.cause="omniboxFromLink",r.analytics.metadata=t.payload.metadata)}));function s(e){return{defaultRedirectionUrl:e,redirectTo:"",isLoading:!1,analytics:{cause:"",metadata:null}}}},8207:(e,t,r)=>{"use strict";r.d(t,{US:()=>a,Zt:()=>s,id:()=>o,sE:()=>i});var n=r(82184);function i(e,t,r){if(void 0===e)return{};let n=t(e);return n!==r?{q:n}:{}}function a(e,t,r){if(void 0===e)return{};let i=t(e);return(0,n.bD)(i,r)?{}:{sortCriteria:i}}function s(e,t,r,n){if(void 0===e)return{};let i=Object.entries(e).filter(([e])=>t(e)).map(([e,{request:t}])=>{let n=r(t);return n.length?{[e]:n}:{}}).reduce((e,t)=>
1({...e,...t}),{});return Object.keys(i).length?{[n]:i}:{}}function o(e,t,r){if(void 0===e)return{};let n=t(e);return n!==r?{tab:n}:{}}},8215:(e,t,r)=>{"use strict";r.d(t,{z:()=>o});var n=r(56294),i=r(51342),a=r(87929),s=r(28405);function o(e,t){let{dispatch:r}=e,o={...a.R_,...t.options},{facetId:u}=o;r((0,i.z)(o));let l=(0,s.H)(e,{options:o,getFacetSearch:()=>"state"in e?e.state.categoryFacetSearchSet[u]:e[n.b].categoryFacetSearchSet[u],isForFieldSuggestions:t.isForFieldSuggestions,executeFacetSearchActionCreator:t.executeFacetSearchActionCreator,executeFieldSuggestActionCreator:t.executeFieldSuggestActionCreator});return{...l,select(e){r((0,i.p)({facetId:u,value:e})),t.select(e)},get state(){return l.state}}}},9248:(e,t,r)=>{"use strict";r.d(t,{LN:()=>o,Yf:()=>s,Zl:()=>u});var n=r(65179),i=r(69285),a=r(58604);let s={queries:new n.v({required:!0,each:new n.hU({emptyAllowed:!1})}),maxLength:new n.lS({required:!0,min:1,default:10})},o=(0,i.VP)("recentQueries/registerRecentQueries",e=>(0,a.rq)(e,s)),u=(0,i.VP)("recentQueries/clearRecentQueries")},10595:(e,t,r)=>{"use strict";r.d(t,{F1:()=>a,NJ:()=>u,nq:()=>o});var n=r(65179),i=r(58604);let a={enableQuerySyntax:!1,numberOfSuggestions:5,clearFilters:!0},s={open:new n.hU,close:new n.hU},o={id:i.r3,numberOfSuggestions:new n.lS({min:0}),enableQuerySyntax:new n.Ci,highlightOptions:new n.Bo({values:{notMatchDelimiters:new n.Bo({values:s}),exactMatchDelimiters:new n.Bo({values:s}),correctionDelimiters:new n.Bo({values:s})}}),clearFilters:new n.Ci},u=new n.Sj(o)},10634:(e,t,r)=>{"use strict";function n(e,t){let{facetId:r,criterion:n}=t,i=e[r]?.request;i&&(i.sortCriteria=n)}function i(e){e&&(e.currentValues=e.currentValues.map(e=>({...e,...{previousState:"idle"!==e.state?e.state:void 0},state:"idle"})),e.preventAutoSelect=!0)}function a(e,t){e&&(e.numberOfValues=t)}r.d(t,{_c:()=>n,fz:()=>a,qI:()=>i})},10870:(e,t,r)=>{"use strict";r.d(t,{V:()=>s});var n=r(95886),i=r(87264),a=r(94110);let s=async(e,t)=>{let r="next"===e.analyticsMode;return{analytics:{clientId:await (0,i.kg)(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},...(0,a.LL)()&&{pageId:(0,a.LL)()},...r&&e.trackingId&&{trackingId:e.trackingId},...{capture:r},...r&&{source:(0,n.i)(e)}}}}},10902:e=>{e.exports=function(e,t){return e.has(t)}},11722:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(83305),i=r(20177);t.JitterFactory=function(e){return"full"===e.jitter?n.fullJitter:i.noJitter}},12676:(e,t,r)=>{"use strict";r.d(t,{t:()=>n});let n=()=>!1},12698:(e,t,r)=>{"use strict";function n(e){let{url:t,accessToken:r,organizationId:n,authentication:i,...a}=e;return a}r.d(t,{E:()=>n,o:()=>i});let i=e=>{let{response:t}=e;return t.body?a(e):s(t)},a=e=>void 0!==e.body.exception?o(e):void 0!==e.body.statusCode?e.body:{message:"unknown",statusCode:0,type:"unknown"},s=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}},o=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code})},12799:(e,t,r)=>{"use strict";r.d(t,{b9:()=>a,sv:()=>o,ic:()=>s,l3:()=>u,M:()=>n,ep:()=>i});let n=(e,t)=>{let{id:r}=e;if(!t[r])return t[r]={q:"",cache:{}},t},i=(e,t)=>{let{q:r,id:n}=e;r&&(t[n].q=r)},a=(e,t)=>{let{id:r}=e;Object.entries(t[r].cache).forEach(([e,n])=>{n&&n.expiresAt&&Date.now()>=n.expiresAt&&delete t[r].cache[e]})},s=(e,t,r)=>{for(let e in t)for(let r in t[e].cache)t[e].cache[r].isActive=!1;if(!l(e,t))return void c(e,t,r);let n=l(e,t);n.isLoading=!0,n.isActive=!0,n.error=null},o=(e,t,r)=>{let{id:n,q:i,searchUid:a,cacheTimeout:s,totalCountFiltered:o,duration:u}=e;t[n].cache[i]={...l(e,t),...r,isActive:!0,searchUid:a,isLoading:!1,error:null,expiresAt:s?s+Date.now():0,totalCountFiltered:o,duration:u}},u=(e,t)=>
1{let{id:r,q:n,error:i}=e;t[r].cache[n].error=i||null,t[r].cache[n].isLoading=!1,t[r].cache[n].isActive=!1},l=(e,t)=>{let{q:r,id:n}=e;return t[n].cache[r]||null},c=(e,t,r)=>{let{q:n,id:i}=e;t[i].cache[n]={isLoading:!0,error:null,expiresAt:0,isActive:!0,searchUid:"",totalCountFiltered:0,duration:0,...r}}},13437:(e,t,r)=>{"use strict";r.d(t,{N:()=>m,b:()=>g});var n=r(69285),i=r(87998),a=r(47882),s=r(94888),o=r(71358),u=r(59730),l=r(15389),c=r(6466),d=r(10634),f=r(27842),p=r(14729),h=r(79454);let g=(0,n.vy)((0,h._)(),e=>{e.addCase(p.UK,(e,t)=>{var r;let{payload:n}=t,{tabs:i}=n,a=(r=n,{...f.UP,currentValues:[],preventAutoSelect:!1,type:"numericalRange",...r});(0,f.cj)(e,(0,h.w)(a,i))}).addCase(o.Zg.fulfilled,(e,t)=>t.payload?.numericFacetSet??e).addCase(l.p,(e,t)=>{let r=t.payload.nf||{};(0,f.E0)(e,r)}).addCase(p.kd,(e,t)=>{let{facetId:r,selection:n}=t.payload;(0,f.VN)(e,r,n)}).addCase(p.QH,(e,t)=>{let{facetId:r,selection:n}=t.payload;(0,f.zY)(e,r,n)}).addCase(p._e,(e,t)=>{let{facetId:r,values:n}=t.payload;(0,f.N5)(e,r,n)}).addCase(p.jV,(e,t)=>{(0,f.HM)(e,t.payload)}).addCase(i.R,e=>{Object.keys(e).forEach(t=>{(0,f.HM)(e,t)})}).addCase(p.JM,(e,t)=>{(0,d._c)(e,t.payload)}).addCase(u.kB.fulfilled,(e,t)=>{let r=t.payload.response.facets;(0,f.WM)(e,r,m)}).addCase(a.eV,(e,t)=>{(0,f.HM)(e,t.payload)}).addCase(c.$,(e,t)=>{let r=t.payload;Object.keys(e).forEach(t=>{let n=e[t];(n.tabs?.included?.length||n.tabs?.excluded?.length)&&!(0,s.E)(n.tabs,r)&&(0,f.HM)(e,t)})})});function m(e){return e.map(e=>{let{numberOfResults:t,...r}=e;return r})}},14729:(e,t,r)=>{"use strict";r.d(t,{JM:()=>v,QH:()=>g,UK:()=>p,_e:()=>m,gq:()=>f,jV:()=>y,kd:()=>h});var n=r(65179),i=r(69285),a=r(58604),s=r(52103),o=r(64379),u=r(58994),l=r(93758);let c={state:a.r3,start:new n.lS({required:!0}),end:new n.lS({required:!0}),endInclusive:new n.Ci({required:!0})},d={facetId:o.k,field:a.r3,tabs:new n.Bo({options:{required:!1},values:{included:new n.v({each:new n.hU}),excluded:new n.v({each:new n.hU})}}),activeTab:new n.hU({required:!1}),currentValues:new n.v({required:!1,each:new n.Bo({values:c})}),generateAutomaticRanges:new n.Ci({required:!0}),filterFacetCount:new n.Ci({required:!1}),injectionDepth:new n.lS({required:!1,min:0}),numberOfValues:new n.lS({required:!1,min:1}),sortCriteria:new n.WT({required:!1}),rangeAlgorithm:new n.WT({required:!1})};function f(e){e.currentValues&&e.currentValues.forEach(({start:e,end:t})=>{if(e>t)throw Error(`The start value is greater than the end value for the numeric range ${e} to ${t}`)})}let p=(0,i.VP)("numericFacet/register",e=>{try{return(0,a.rq)(e,d),f(e),{payload:e,error:null}}catch(t){return{payload:e,error:(0,a.py)(t)}}}),h=(0,i.VP)("numericFacet/toggleSelectValue",e=>(0,a.rq)(e,{facetId:o.k,selection:new n.Bo({values:l.BE})})),g=(0,i.VP)("numericFacet/toggleExcludeValue",e=>(0,a.rq)(e,{facetId:o.k,selection:new n.Bo({values:l.BE})})),m=(0,i.VP)("numericFacet/updateFacetValues",e=>{try{return(0,a.En)(e,{facetId:o.k,values:new n.v({each:new n.Bo({values:l.BE})})}),f({currentValues:e.values}),{payload:e,error:null}}catch(t){return{payload:e,error:(0,a.py)(t)}}}),v=u.L,y=s.ge},15389:(e,t,r)=>{"use strict";r.d(t,{I:()=>o,p:()=>s});var n=r(69285),i=r(58604),a=r(47341);let s=(0,n.VP)("searchParameters/restore",e=>(0,i.rq)(e,a.G)),o=(0,n.VP)("searchParameters/restoreTab",e=>(0,i.rq)(e,i.r3))},15620:()=>{},15810:(e,t,r)=>{"use strict";r.d(t,{$A:()=>l,LU:()=>u,TP:()=>o});var n=r(69285),i=r(58604);let a={id:i.r3},s={...a,q:i.GH},o=(0,n.VP)("instantResults/register",e=>(0,i.rq)(e,a)),u=(0,n.VP)("instantResults/updateQuery",e=>(0,i.rq)(e,s)),l=(0,n.VP)("instantResults/clearExpired",e=>(0,i.rq)(e,a))},17046:(e,t,r)=>{"use strict";r.d(t,{E:()=>o});var n=r(65179),i=r(89969),a=r(35521),s=r(10870);let o=async(e,t)=>({accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??(0,a.Ns)(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:i.Ay.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&&await (0,s.V)(e.configuration.analytics,t),...e.excerptLength&&!(0,n.hX)(e.excerptLength.length)&&{excerptLength:e.excerptLength.length},...e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")}})},17558:(e,t,r)=>{"use strict";r.d(t,{$m:()=>l,JK:()=>f,jS:()=>c,zP:()=>d});var n=r(65179),i=r(69285),a=r(58604),s=r(64379),o=r(82208);let u={facetId:s.k,value:new n.Bo({values:{displayValue:a.GH,rawValue:a.GH,count:new n.lS({required:!0,min:0})}})},l=(0,i.VP)("facetSearch/register",e=>(0,a.rq)(e,o.$)),c=(0,i.VP)("facetSearch/update",e=>(0,a.rq)(e,o.$)),d=(0,i.VP)("facetSearch/toggleSelectValue",e=>(0,a.rq)(e,u)),f=(0,i.VP)("facetSearch/toggleExcludeValue",e=>(0,a.rq)(e,u))},18287:(e,t,r)=>{"use strict";r.d(t,{W:()=>n,Y:()=>i});let n=(e,t)=>e.facetOptions.facets[t]?.enabled??!0,i=e=>{let{freezeFacetOrder:t}=e.facetOptions??{};return void 0!==t?{freezeFacetOrder:t}:void 0}},18367:(e,t,r)=>{"use strict";r.d(t,{G:()=>s});var n=r(95155),i=r(12115);let a=(0,r(84348).E)((0,i.forwardRef)((e,t)=>(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e,children:[(0,n.jsx)("path",{stroke:"currentColor",strokeLinecap:"square",strokeLinejoin:"round",strokeWidth:1.5,d:"M18 12h1.013c.993 0 1-4.5 0-4.5h-1.516m-10.802 0H5.007c-1.02 0-1.015 4.5-.002 4.5H7m9.5 5c2.193.398 4.315 2.375 4.5 3.983L3 21c.354-1.647 1.942-3.134 4-3.5 2.854-.48 2.5-1.5 2.5-2v-1C6.947 12.798 7.002 9.662 7.002 7c0-3.056 3.028-4 4.969-4 1.94 0 4.506.993 5.052 4 .227 1.25.477 3.47 0 5"}),(0,n.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15.5 14.219c0-.655-.5-1.219-1-1.219h-1.502c-.5 0-.998.564-.998 1.219s.494 1.281.998 1.281H14.5c.499 0 .999-.626.999-1.281",clipRule:"evenodd"}),(0,n.jsx)("path",{stroke:"currentColor",strokeWidth:1.5,d:"M15.5 14.5H19a.75.75 0 0 0 .75-.75V10"})]}))),s=(0,i.memo)(a)},18669:(e,t,r)=>{"use strict";r.d(t,{E:()=>m});var n=r(95155);r(36585),r(66854),r(37768),r(90710),r(81788),r(93543),r(27934),r(3225),r(53213),r(92585),r(4738),r(42617),r(75858),r(96963),r(48366),r(25651),r(13166),r(79091),r(60052);var i={topLeft:"_3bpl7a2",top:"_3bpl7a3",topRight:"_3bpl7a4",right:"_3bpl7a5",left:"_3bpl7a6",bottomLeft:"_3bpl7a7",bottom:"_3bpl7a8",bottomRight:"_3bpl7a9"},a={default:"_3bpl7ac",success:"_3bpl7ad",theme:"_3bpl7ae",warning:"_3bpl7af"},s={default:"_3bpl7aa",dot:"_3bpl7ab"},o=r(67767),u=r(87202),l=r(75441),c=r(10953),d=r(22300),f=r(4776),p=r(12115),h=r(46339);let g=(e,t)=>{let{position:r,placement:d=r??"topRight",children:g,signal:m="default",variant:v="default",value:y,maxValue:b,showZero:w=!1,"aria-label":S,"aria-live":E="assertive",formatAnnouncement:I,...A}=e,{styleProps:k}=(0,o.pO)(A),C=(0,u._)(A),T=(0,l.N)(t),{badgeProps:_,isHidden:O,formattedValue:x}=function(e){let{value:t,maxValue:r,showZero:n=!1,isDot:i=!1,"aria-label":a,"aria-live":s="assertive",formatAnnouncement:o}=e,u=i?0===t:0===t&&!n,l=(0,p.useMemo)(()=>
1{if(i||void 0===t||u)return null;let e=Number(t);return void 0!==r&&Number.isFinite(e)&&e>r?`${r}+`:t},[t,r,i,u]),c=(0,p.useMemo)(()=>{if(u)return;if(i||"object"==typeof l)return a;let e=String(l);return a&&o?o(e,a):a?`${e} ${a}`:e},[l,u,i,a,o]),[d,f]=(0,p.useState)(c);return(0,p.useEffect)(()=>{if("off"!==s&&c){let e=i&&void 0===d,t=!i&&c!==d;(e||t)&&(0,h.iP)(c,s)}f(c)},[c,s,i]),{badgeProps:(0,p.useMemo)(()=>({"aria-label":c,"aria-live":"off"}),[c]),isHidden:u,formattedValue:l}}({value:y,maxValue:b,showZero:w,isDot:"dot"===v,"aria-label":S,"aria-live":E,formatAnnouncement:I}),R=p.Children.count(g)>0,N=(0,n.jsx)("output",{...(0,c.v)(k,C,A,_,{ref:T,className:(0,f.$)("_3bpl7a1 _1mf949z0",a[m],s[v],{[i[d]]:R,_3bpl7ag:O})}),children:x});return R?(0,n.jsxs)("div",{role:"presentation",className:"_3bpl7a0",children:[g,N]}):N};g.displayName="Badge";let m=(0,d.g)(g)},19065:(e,t,r)=>{"use strict";r.d(t,{$c:()=>a,WD:()=>n,XF:()=>s,kP:()=>i,qq:()=>o});let n=1,i=20,a=5,s=1,o=8},19405:(e,t,r)=>{"use strict";r.d(t,{d:()=>u});var n=r(95155),i=r(4523),a=r(4776),s=r(18944),o=r(28907);let u=e=>{let{children:t,className:r,size:u="l",mode:l="dark",gradientOverlay:c={mobile:"bottom-top",tablet:"left-right"},...d}=e;return(0,n.jsx)(s.l,{mode:l,size:u,className:(0,a.$)(o.sD.spotlight,(0,i.T)(c),i.M.default,r),...d,children:t})}},19475:(e,t,r)=>{var n=r(34017),i=r(99391);e.exports=function e(t,r,a,s,o){return t===r||(null!=t&&null!=r&&(i(t)||i(r))?n(t,r,a,s,e,o):t!=t&&r!=r)}},19528:(e,t,r)=>{"use strict";r.d(t,{Ez:()=>h,XQ:()=>p,kE:()=>R,vj:()=>O,xb:()=>C,ii:()=>_,IT:()=>G,JO:()=>k,m2:()=>T,ZH:()=>U,W9:()=>A,LB:()=>N,B5:()=>V,ti:()=>j,In:()=>b,ot:()=>y,sM:()=>L,Aq:()=>x,ez:()=>F,o5:()=>w,F6:()=>P,l8:()=>q,PS:()=>v,bP:()=>$,xP:()=>z,j3:()=>M,sY:()=>E,Yw:()=>I,nc:()=>S,kN:()=>D});var n=r(65179),i=r(69285),a=r(46597),s=r(58604),o=r(88869),u=r(38278),l=r(73282);let c=new n.hU({required:!0}),d=new n.hU,f=new n.Ci({required:!0}),p={id:c,title:c,uri:c,permanentid:c,clickUri:d},h=new n.hU({required:!0,constrainTo:["text/plain","text/markdown"]}),g=new n.hU({required:!0,constrainTo:l.VS}),m=e=>({...e,name:(0,l.x$)(e.name)}),v=(0,i.VP)("generatedAnswer/setIsVisible",e=>(0,s.rq)(e,f)),y=(0,i.VP)("generatedAnswer/setAnswerId",e=>(0,s.rq)(e,s.r3)),b=(0,i.VP)("generatedAnswer/setAnswerGenerationMode",e=>(0,s.rq)(e,new n.hU({constrainTo:["automatic","manual"],required:!1,default:"automatic"}))),w=(0,i.VP)("generatedAnswer/setIsEnabled",e=>(0,s.rq)(e,f)),S=(0,i.VP)("generatedAnswer/updateMessage",e=>(0,s.rq)(e,{textDelta:c})),E=(0,i.VP)("generatedAnswer/updateCitations",e=>(0,s.rq)(e,{citations:new n.v({required:!0,each:new n.Bo({values:p})})})),I=(0,i.VP)("generatedAnswer/updateError",e=>(0,s.rq)(e,{message:d,code:new n.lS({min:0})})),A=(0,i.VP)("generatedAnswer/resetAnswer"),k=(0,i.VP)("generatedAnswer/like"),C=(0,i.VP)("generatedAnswer/dislike"),T=(0,i.VP)("generatedAnswer/feedbackModal/open"),_=(0,i.VP)("generatedAnswer/expand"),O=(0,i.VP)("generatedAnswer/collapse"),x=(0,i.VP)("generatedAnswer/setId",e=>(0,s.rq)(e,{id:new n.hU({required:!0})})),R=(0,i.VP)("generatedAnswer/feedbackModal/close"),N=(0,i.VP)("generatedAnswer/sendFeedback"),P=(0,i.VP)("generatedAnswer/setIsLoading",e=>(0,s.rq)(e,f)),q=(0,i.VP)("generatedAnswer/setIsStreaming",e=>(0,s.rq)(e,f)),j=(0,i.VP)("generatedAnswer/setAnswerContentFormat",e=>(0,s.rq)(e,h)),D=(0,i.VP)("generatedAnswer/updateResponseFormat",e=>(0,s.rq)(e,{contentFormat:new n.v({each:h,default:["text/plain"]})})),M=(0,i.VP)("knowledge/updateAnswerConfigurationId",e=>(0,s.rq)(e,c)),U=(0,i.VP)("generatedAnswer/registerFieldsToIncludeInCitations",e=>(0,s.rq)(e,s.XP)),F=(0,i.VP)("generatedAnswer/setIsAnswerGenerated",e=>(0,s.rq)(e,f)),L=(0,i.VP)("generatedAnswer/setCannotAnswer",e=>(0,s.rq)(e,f)),V=(0,i.VP)("generatedAnswer/setAnswerApiQueryParams",e=>(0,s.rq)(e,new n.Bo({}))),$=(0,i.VP)("generatedAnswer/startStep",e=>(0,s.rq)(m(e),{name:g,startedAt:new n.lS({min:0,required:!0})})),G=(0,i.VP)("generatedAnswer/finishStep",e=>(0,s.rq)(m(e),{name:g,finishedAt:new n.lS({min:0,required:!0})})),z=(0,i.zD)("generatedAnswer/streamAnswer",async(e,t)=>{let r=t.getState(),{dispatch:n,extra:i,getState:a}=t,{search:s}=a(),{queryExecuted:l}=s,{setAbortControllerRef:c}=e,d=await (0,u.oq)(r);n(P(!0));let f=e=>e.streamId===t.getState().search.extendedResults.generativeQuestionAnsweringId,p=i.streamingClient?.streamGeneratedAnswer(d,{write:e=>{f(d)&&(n(P(!1)),e.payload&&e.payloadType&&((e,t)=>{switch(e){case"genqa.headerMessageType":n(j(JSON.parse(t).contentFormat));break;case"genqa.messageType":n(S(JSON.parse(t)));break;case"genqa.citationsType":n(E(JSON.parse(t)));break;case"genqa.endOfStreamType":{let e=JSON.parse(t).answerGenerated,{answerId:r,answer:i}=a().generatedAnswer,s=0!==l.length&&!e,u=!i?.trim();n(L(s)),n(q(!1)),n(F(e)),n((0,o.$Z)(e,r,e?u:void 0)),n((0,o.mR)());break}default:r.debug&&i.logger.warn(`Unknown payloadType: "${e}"`)}})(e.payloadType,e.payload))},abort:e=>{f(d)&&n(I(e))},close:()=>{f(d)&&n(q(!1))},resetAnswer:()=>{f(d)&&n(A())}});p?c(p):n(P(!1))});(0,i.zD)("generatedAnswer/generateAnswer",async(e,{getState:t,dispatch:r,extra:{navigatorContext:n,logger:i}})=>{r(A());let s=t();if(s.generatedAnswer.answerConfigurationId){let e=(0,u.Us)(s,n);r(V(e)),await r((0,a.$3)(e))}else i.warn("[WARNING] Missing answerConfigurationId in engine configuration. The generateAnswer action requires an answer configuration ID to use CRGA with the Answer API.")})},19814:(e,t,r)=>{"use strict";r.d(t,{Pl:()=>c,ZM:()=>d,a3:()=>l});var n=r(65179),i=r(69285),a=r(81088),s=r(58604),o=r(17046),u=r(89014);let l={collectionField:new n.hU({emptyAllowed:!1,required:!1}),parentField:new n.hU({emptyAllowed:!1,required:!1}),childField:new n.hU({emptyAllowed:!1,required:!1}),numberOfFoldedResults:new n.lS({min:0,required:!1})},c=(0,i.VP)("folding/register",e=>(0,s.rq)(e,l)),d=(0,i.zD)("folding/loadCollection",async(e,{getState:t,rejectWithValue:r,extra:{apiClient:n,navigatorContext:i}})=>{var s;let l=t(),c="legacy"===l.configuration.analytics.analyticsMode?await (0,o.E)(l):(0,u.E)(l,i),d=await n.search({...c,q:""===(s=l).query.q?"":s.query.enableQuerySyntax?`${s.query.q} OR @uri`:`( <@- ${s.query.q} -@> ) OR @uri`,enableQuerySyntax:!0,cq:`@${l.folding.fields.collection}="${e}"`,filterField:l.folding.fields.collection,childField:l.folding.fields.parent,parentField:l.folding.fields.child,filterFieldRange:100},{origin:"foldingCollection"});return(0,a.CR)(d)?r(d.error):{collectionId:e,results:d.success.results,searchUid:d.success.searchUid,rootResult:l.folding.collections[e].result}})},20129:function(e,t,r){"use strict";
1var n,i=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AlwaysDelay=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(r(75455).Delay)},20177:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noJitter=function(e){return e}},20239:(e,t,r)=>{"use strict";r.d(t,{U:()=>u});var n=r(69285),i=r(19814),a=r(5980),s=r(91894),o=r(93932);let u=(0,n.vy)((0,o.jg)(),e=>e.addCase(s.o7,(e,t)=>{e.fieldsToInclude=[...new Set(e.fieldsToInclude.concat(t.payload))]}).addCase(s.Iv,e=>{e.fetchAllFields=!0}).addCase(s.zJ,e=>{e.fetchAllFields=!1}).addCase(s.st.fulfilled,(e,{payload:t})=>{e.fieldsDescription=t}).addCase(i.Pl,(e,{payload:t})=>{let r=(0,a.H)().fields;e.fieldsToInclude.push(t.collectionField??r.collection,t.parentField??r.parent,t.childField??r.child)}))},20666:(e,t,r)=>{var n=r(15683);e.exports=function(e){return function(t){return n(t,e)}}},21226:(e,t,r)=>{"use strict";r.d(t,{X:()=>f});var n=r(65179),i=r(72018),a=r(61166),s=r(27523),o=r(14729),u=r(58604),l=r(84649);let c={start:new n.lS,end:new n.lS,endInclusive:new n.Ci,state:new n.hU({constrainTo:a.z})},d=new n.Sj({facetId:l.zr,tabs:new n.Bo({options:{required:!1},values:{included:new n.v({each:new n.hU}),excluded:new n.v({each:new n.hU})}}),field:l.ZZ,generateAutomaticRanges:l.LM,filterFacetCount:l.t_,injectionDepth:l.j8,numberOfValues:l.dR,currentValues:new n.v({each:new n.Bo({values:c})}),sortCriteria:new n.hU({constrainTo:s.i}),resultsMustMatch:new n.hU({constrainTo:i.g}),rangeAlgorithm:new n.hU({constrainTo:s.t})});function f(e,t){(0,u.Lm)(e,d,t,"buildNumericFacet"),(0,o.gq)(t)}},21600:(e,t,r)=>{"use strict";function n(e){let t,r=new Map;return{subscribe(n){let i;n();let a=Symbol();return 0===r.size&&(t=JSON.stringify(this.state),i=e.subscribe(()=>{(e=>{try{let r=JSON.stringify(e),n=t!==r;return t=r,n}catch(e){return console.warn('Could not detect if state has changed, check the controller "get state method"',e),!0}})(this.state)&&r.forEach(e=>e())})),r.set(a,n),()=>{r.delete(a),0===r.size&&i?.()}},get state(){return{}}}}r.d(t,{P:()=>n})},22212:(e,t,r)=>{"use strict";r.d(t,{yq:()=>l,nZ:()=>c});var n=r(68092),i=r(29534),a=r(94110);class s extends a.ME{getState;constructor(e){super(e),this.getState=e}get activeInstantResultQuery(){let e=this.getState().instantResults;for(let t in e)for(let r in e[t].cache)if(e[t].cache[r].isActive)return e[t].q;return null}get activeInstantResultCache(){let e=this.getState().instantResults;for(let t in e)for(let r in e[t].cache)if(e[t].cache[r].isActive)return e[t].cache[r];return null}get results(){return this.activeInstantResultCache?.results}get queryText(){return this.activeInstantResultQuery??(0,n.O)().q}get responseTime(){return this.activeInstantResultCache?.duration??(0,i.B)().duration}get numberOfResults(){return this.activeInstantResultCache?.totalCountFiltered??(0,i.B)().response.totalCountFiltered}getSearchUID(){return this.activeInstantResultCache?.searchUid||super.getSearchUID()}}var o=r(32995),u=r(40687);let l=()=>(0,o.Zl)("analytics/instantResult/searchboxAsYouType",e=>e.makeSearchboxAsYouType(),e=>new s(e)),c=()=>({actionCause:u.d.searchboxAsYouType})},22478:(e,t,r)=>{"use strict";r.d(t,{KG:()=>c,PW:()=>d,R3:()=>s,cJ:()=>o,cy:()=>i,hW:()=>v,jw:()=>a,kJ:()=>h,lZ:()=>n,o8:()=>g,s8:()=>p,sg:()=>b,sx:()=>u,tP:()=>f,xl:()=>y});let n=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function i(e){return Array.isArray(e)}function a(e){return""===e.trim()}function s(e,t){return[...e.reduce((e,r)=>{let n=t(r);return e.has(n)||e.set(n,r),e},new Map).values()]}function o(e,t){let{[e]:r,...n}=t;return n}function u(e){return btoa(encodeURI(JSON.stringify(e)))}let l=new Set(["1",1,"yes",!0]);function c(){if("u"<typeof navigator||"u"<typeof window)return!1;let e=navigator,t=window;return[e.globalPrivacyControl,e.doNotTrack,e.msDoNotTrack,t.doNotTrack].some(e=>l.has(e))}function d(e){let t={};for(let[r,n]of e)t[r]=n;return t}function f(e,t,r){return clearTimeout(t),setTimeout(e,r)}function p(e,t){return Object.fromEntries(Object.entries(e).map(([e,r])=>[e,t(r,e)]))}function h(e,t){return Object.fromEntries(Object.entries(e).filter(([e,r])=>t(r,e)))}function g(e){if("object"!=typeof e||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch(t){return e}}function m(){let e=null,t=null;return{promise:new Promise((r,n)=>{e=r,t=n}),resolve:e,reject:t}}function v(e){let{promise:t,resolve:r}=m();return{promise:t,middleware:()=>t=>n=>{t(n),e(n)&&r(n)}}}function y(e,t){let{promise:r,resolve:n}=m(),i=!1;return{promise:r,middleware:()=>r=>a=>{let s;r(a),e(a)&&!i&&null!=a&&"object"==typeof a&&"meta"in a&&a.meta?.arg?.slotId!==void 0&&(s=a.meta.arg.slotId,!t.has(s))&&(i=!0,t.add(a.meta.arg.slotId),n(a)
1)}}}function b(e,t,r={}){let n;return(...i)=>{let a=r.isImmediate&&!n;if(clearTimeout(n),n=setTimeout(()=>{n=void 0,r.isImmediate||e.apply(void 0,i)},t),a)return e.apply(void 0,i)}}},22887:(e,t,r)=>{"use strict";r.d(t,{r:()=>i});var n=r(84940);function i(e){return(0,n.pino)({name:"@coveo/headless",level:e?.level||"warn",formatters:{log:e?.logFormatter}})}},23819:(e,t,r)=>{"use strict";r.d(t,{D:()=>a});var n=r(95724),i=r(58604);function a(e,t){let r=function(e){let{analytics:t}=e;return t?.analyticsClientMiddleware||((e,t)=>t)}(e);return{analyticsClientMiddleware:r,validatePayload:i.En,preprocessRequest:e.preprocessRequest||n.w,logger:t}}},23909:(e,t,r)=>{"use strict";function n(){return[]}r.d(t,{j:()=>n})},24038:(e,t,r)=>{var n=r(91070),i=r(87178),a=r(49714);e.exports=function(e,t,r){return t==t?a(e,t,r):n(e,i,r)}},24323:(e,t,r)=>{"use strict";r.d(t,{p:()=>d});var n=r(65179),i=r(69285),a=r(15389),s=r(6466),o=r(28022),u=r(64268);let l=/(^|; )Coveo-Pendragon=([^;]*)/,c=/(^|; )Coveo-SearchAgentDebug=([^;]*)/,d=(0,i.vy)((0,u.U)(),e=>e.addCase(o.mg,(e,t)=>{var r,i;r=e,i=t.payload,(0,n.hX)(i.accessToken)||(r.accessToken=i.accessToken),r.environment=i.environment??"prod",(0,n.hX)(i.organizationId)||(r.organizationId=i.organizationId)}).addCase(o.Gf,(e,t)=>{var r,i;r=e,i=t.payload,(0,n.hX)(i.proxyBaseUrl)||(r.search.apiBaseUrl=i.proxyBaseUrl),(0,n.hX)(i.locale)||(r.search.locale=i.locale),(0,n.hX)(i.timezone)||(r.search.timezone=i.timezone),(0,n.hX)(i.authenticationProviders)||(r.search.authenticationProviders=i.authenticationProviders)}).addCase(o.ix,(e,t)=>{var r=e,i=t.payload;(0,n.hX)(i.enabled)||(r.analytics.enabled=i.enabled),(0,n.hX)(i.originContext)||(r.analytics.originContext=i.originContext),(0,n.hX)(i.originLevel2)||(r.analytics.originLevel2=i.originLevel2),(0,n.hX)(i.originLevel3)||(r.analytics.originLevel3=i.originLevel3),(0,n.hX)(i.proxyBaseUrl)||(r.analytics.apiBaseUrl=i.proxyBaseUrl),(0,n.hX)(i.trackingId)||(r.analytics.trackingId=i.trackingId),(0,n.hX)(i.analyticsMode)||(r.analytics.analyticsMode=i.analyticsMode),(0,n.hX)(i.source)||(r.analytics.source=i.source);try{let e=!("u"<typeof window)&&(l.exec(document.cookie)?.pop()||null);e&&(r.analytics.analyticsMode="next",r.analytics.trackingId=e)}catch(e){}(0,n.hX)(i.runtimeEnvironment)||(r.analytics.runtimeEnvironment=i.runtimeEnvironment),(0,n.hX)(i.anonymous)||(r.analytics.anonymous=i.anonymous),(0,n.hX)(i.deviceId)||(r.analytics.deviceId=i.deviceId),(0,n.hX)(i.userDisplayName)||(r.analytics.userDisplayName=i.userDisplayName),(0,n.hX)(i.documentLocation)||(r.analytics.documentLocation=i.documentLocation)}).addCase(o.Re,e=>{e.analytics.enabled=!1}).addCase(o.gQ,e=>{e.analytics.enabled=!0}).addCase(o.ZA,(e,t)=>{e.analytics.originLevel2=t.payload.originLevel2}).addCase(o.Sh,(e,t)=>{e.analytics.originLevel3=t.payload.originLevel3}).addCase(s.$,(e,t)=>{e.analytics.originLevel2=t.payload}).addCase(a.I,(e,t)=>{e.analytics.originLevel2=t.payload}).addCase(a.p,(e,t)=>{(0,n.hX)(t.payload.tab)||(e.analytics.originLevel2=t.payload.tab)}).addCase(o.vl,(e,{payload:t})=>{var r=e,i=t;r.knowledge.agentId=i;try{let e=!("u"<typeof window)&&c.test(document.cookie);(0,n.hX)(e)||(r.knowledge.debugAgentSession=!0)}catch(e){}}))},26923:(e,t,r)=>{"use strict";r.d(t,{VB:()=>a,hf:()=>s});var n=r(32995),i=r(40687);let a=()=>(0,n.Zl)("analytics/didyoumean/automatic",e=>e.makeDidYouMeanAutomatic()),s=()=>({actionCause:i.d.didYouMeanAutomatic})},26967:(e,t,r)=>{"use strict";r.d(t,{b:()=>d});var n=r(65179),i=r(69285),a=r(71358),s=r(88830),o=r(59730),u=r(15389),l=r(45166),c=r(94260);let d=(0,i.vy)((0,c.u)(),e=>{e.addCase(l.G8,(e,t)=>g(e,t.payload)).addCase(l.ET,(e,t)=>{let{id:r,query:n}=t.payload;h(e,r,n)}).addCase(s.nA,(e,t)=>{let{id:r,expression:n}=t.payload;h(e,r,n)}).addCase(o.kB.fulfilled,(e,t)=>{let{queryExecuted:r}=t.payload;p(e,r)}).addCase(u.p,f).addCase(a.Zg.fulfilled,(e,t)=>{if(t.payload)for(let[r,n]of Object.entries(t.payload.querySet))h(e,r,n)})});function f(e,t){(0,n.hX)(t.payload.q)||p(e,t.payload.q)}function p(e,t){Object.keys(e).forEach(r=>{e[r]=t})}let h=(e,t,r)=>{t in e&&(e[t]=r)},g=(e,t)=>{let{id:r,query:n}=t;r in e||(e[r]=n)}},27208:(e,t,r)=>{"use strict";r.d(t,{z:()=>i});var n=r(62547);function i(){return(0,n.YB)((0,n.r7)())}},27523:(e,t,r)=>{"use strict";r.d(t,{i:()=>n,t:()=>i});let n=["ascending","descending"],i=["even","equiprobable"]},27554:(e,t,r)=>{"use strict";r.d(t,{Gz:()=>w,k3:()=>m,zx:()=>b});var n=r(69285),i=r(87998),a=r(47882),s=r(94888),o=r(71358),u=r(59730),l=r(15389),c=r(6466),d=r(17558),f=r(67553),p=r(10634),h=r(52103),g=r(71769);let m=(0,n.vy)((0,g.v)(),e=>{e.addCase(h.pT,(e,t)=>{var r;let{facetId:n,tabs:i}=t.payload;
1n in e||(e[n]=(0,g.d)((r=t.payload,{...b,type:"specific",currentValues:[],freezeCurrentValues:!1,isFieldExpanded:!1,preventAutoSelect:!1,...r}),i))}).addCase(o.Zg.fulfilled,(e,t)=>{if(t.payload&&0!==Object.keys(t.payload.facetSet).length)return t.payload.facetSet}).addCase(l.p,(e,t)=>{let r=t.payload.f||{},n=t.payload.fExcluded||{};Object.keys(e).forEach(t=>{let{request:i}=e[t],a=r[t]||[],s=n[t]||[],o=a.length+s.length,u=i.currentValues.filter(e=>!a.includes(e.value)&&!s.includes(e.value));i.currentValues=[...a.map(S),...s.map(E),...u.map(I)],i.preventAutoSelect=o>0,i.numberOfValues=Math.max(o,i.numberOfValues)})}).addCase(h.zV,(e,t)=>{let{facetId:r,selection:n}=t.payload,i=e[r]?.request;if(!i)return;i.preventAutoSelect=!0;let a=i.currentValues.find(e=>e.value===n.value);if(!a)return void v(i,n);let s="selected"===a.state;a.previousState=a.state,a.state=s?"idle":"selected",i.freezeCurrentValues=!0}).addCase(h.Fy,(e,t)=>{let{facetId:r,selection:n}=t.payload,i=e[r]?.request;if(!i)return;i.preventAutoSelect=!0;let a=i.currentValues.find(e=>e.value===n.value);if(!a)return void v(i,n);let s="excluded"===a.state;a.previousState=a.state,a.state=s?"idle":"excluded",i.freezeCurrentValues=!0}).addCase(h.I,(e,t)=>{let{facetId:r,freezeCurrentValues:n}=t.payload,i=e[r]?.request;i&&(i.freezeCurrentValues=n)}).addCase(h.ge,(e,t)=>{(0,p.qI)(e[t.payload]?.request)}).addCase(i.R,e=>{Object.values(e).filter(e=>e.hasBreadcrumbs).forEach(({request:e})=>(0,p.qI)(e))}).addCase(i.y,e=>{Object.values(e).filter(e=>!e.hasBreadcrumbs).forEach(({request:e})=>(0,p.qI)(e))}).addCase(f.m,(e,t)=>Object.values(e).forEach(e=>{e.request.preventAutoSelect=!t.payload.allow})).addCase(h.Gt,(e,t)=>{(0,p._c)(e,t.payload)}).addCase(h.Zm,(e,t)=>{let{facetId:r,numberOfValues:n}=t.payload;(0,p.fz)(e[r]?.request,n)}).addCase(h.IF,(e,t)=>{let{facetId:r,isFieldExpanded:n}=t.payload,i=e[r]?.request;i&&(i.isFieldExpanded=n)}).addCase(u.kB.fulfilled,(e,t)=>{t.payload.response.facets.forEach(t=>y(e[t.facetId]?.request,t))}).addCase(u.Sw.fulfilled,(e,t)=>{t.payload.response.facets.forEach(t=>y(e[t.facetId]?.request,t))}).addCase(d.zP,(e,t)=>{let{facetId:r,value:n}=t.payload,i=e[r]?.request;if(!i)return;let{rawValue:a}=n,{currentValues:s}=i,o=s.find(e=>e.value===a);if(o){o.state="selected";return}v(i,S(a)),i.freezeCurrentValues=!0,i.preventAutoSelect=!0}).addCase(d.JK,(e,t)=>{let{facetId:r,value:n}=t.payload,i=e[r]?.request;if(!i)return;let{rawValue:a}=n,{currentValues:s}=i,o=s.find(e=>e.value===a);if(o){o.state="excluded";return}v(i,E(a)),i.freezeCurrentValues=!0,i.preventAutoSelect=!0}).addCase(a.eV,(e,t)=>{if(!(t.payload in e))return;let{request:r}=e[t.payload];(0,p.qI)(r)}).addCase(c.$,(e,t)=>{let r=t.payload;Object.keys(e).forEach(t=>{let n=e[t];(n.tabs?.included?.length||n.tabs?.excluded?.length)&&!(0,s.E)(n.tabs,r)&&(0,p.qI)(n.request)})})});function v(e,t){let{currentValues:r}=e,n=r.findIndex(e=>"idle"===e.state),i=-1===n?r.length:n;e.currentValues.splice(i,0,t),n>-1&&e.currentValues.pop(),e.numberOfValues=e.currentValues.length}function y(e,t){e&&(e.currentValues=t.values.map(w),e.freezeCurrentValues=!1,e.preventAutoSelect=!1)}let b={filterFacetCount:!0,injectionDepth:1e3,numberOfValues:8,sortCriteria:"automatic",resultsMustMatch:"atLeastOneValue"};function w(e){let{value:t,state:r}=e;return{value:t,state:r}}function S(e){return{value:e,state:"selected"}}function E(e){return{value:e,state:"excluded"}}function I(e){return{...e,state:"idle"}}},27842:(e,t,r)=>{"use strict";r.d(t,{E0:()=>l,HM:()=>u,N5:()=>a,UP:()=>n,VN:()=>s,WM:()=>c,cj:()=>i,fM:()=>f,zY:()=>o});let n={filterFacetCount:!0,injectionDepth:1e3,numberOfValues:8,sortCriteria:"ascending",rangeAlgorithm:"even",resultsMustMatch:"atLeastOneValue"};function i(e,t){let{request:r}=t,{facetId:n}=r;if(n in e)return;let i=p(r);r.numberOfValues=i,e[n]=t}function a(e,t,r){let n=e[t]?.request;n&&(n.currentValues=r,n.numberOfValues=p(n))}function s(e,t,r){let n=e[t]?.request;if(!n)return;let i=d(n.currentValues,r);if(!i)return;let a="selected"===i.state;i.previousState=i.state,i.state=a?"idle":"selected",n.preventAutoSelect=!0}function o(e,t,r){let n=e[t]?.request;if(!n)return;let i=d(n.currentValues,r);if(!i)return;let a="excluded"===i.state;i.previousState=i.state,i.state=a?"idle":"excluded",n.preventAutoSelect=!0}function u(e,t){let r=e[t]?.request;
1r&&r.currentValues.forEach(e=>{"idle"!==e.state&&(e.previousState=e.state),e.state="idle"})}function l(e,t){Object.entries(e).forEach(([e,{request:r}])=>{let n=t[e]||[];r.currentValues.forEach(r=>(d(n,r)?r.state="selected":"object"==typeof t&&e in t&&"idle"!==r.state&&(r.previousState=r.state,r.state="idle"),r));let i=n.filter(e=>!d(r.currentValues,e)),a=r.currentValues;a.push(...i),r.numberOfValues=Math.max(r.numberOfValues,a.length)})}function c(e,t,r){t.forEach(t=>{let n=t.facetId,i=e[n]?.request;i&&(i.currentValues=r(t.values),i.preventAutoSelect=!1)})}function d(e,t){let{start:r,end:n}=t;return e.find(e=>e.start===r&&e.end===n)}function f(e,t){let{start:r,end:n,endInclusive:i}=t;return e.find(e=>e.start===r&&e.end===n&&e.endInclusive===i)}function p(e){let{generateAutomaticRanges:t,currentValues:r,numberOfValues:n}=e;return t?Math.max(n,r.length):r.length}},28022:(e,t,r)=>{"use strict";r.d(t,{Gf:()=>u,Re:()=>d,Sh:()=>h,ZA:()=>p,gQ:()=>f,ix:()=>c,mg:()=>o,vl:()=>g,yM:()=>l});var n=r(65179),i=r(69285),a=r(58604),s=r(29043);let o=(0,i.VP)("configuration/updateBasicConfiguration",e=>(0,a.rq)(e,{accessToken:a.y0,environment:new n.hU({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:a.y0})),u=(0,i.VP)("configuration/updateSearchConfiguration",e=>(0,a.rq)(e,{proxyBaseUrl:new n.hU({required:!1,url:!0}),pipeline:new n.hU({required:!1,emptyAllowed:!0}),searchHub:a.y0,timezone:a.y0,locale:a.y0,authenticationProviders:new n.v({required:!1,each:a.r3})})),l={enabled:new n.Ci({default:!0}),originContext:a.y0,originLevel2:a.y0,originLevel3:a.y0,proxyBaseUrl:new n.hU({required:!1,url:!0}),runtimeEnvironment:new n.WT,anonymous:new n.Ci({default:!1}),deviceId:a.y0,userDisplayName:a.y0,documentLocation:a.y0,trackingId:a.dc,analyticsMode:new n.hU({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new n.Bo({options:{required:!1},values:s.m.reduce((e,t)=>(e[t]=a.kG,e),{})})},c=(0,i.VP)("configuration/updateAnalyticsConfiguration",e=>(0,a.rq)(e,l)),d=(0,i.VP)("configuration/analytics/disable"),f=(0,i.VP)("configuration/analytics/enable"),p=(0,i.VP)("configuration/analytics/originlevel2",e=>(0,a.rq)(e,{originLevel2:a.r3})),h=(0,i.VP)("configuration/analytics/originlevel3",e=>(0,a.rq)(e,{originLevel3:a.r3})),g=(0,i.VP)("knowledge/setAgentId",e=>(0,a.rq)(e,new n.hU({required:!0})))},28222:(e,t,r)=>{"use strict";function n(e,t){return{request:e,tabs:t}}function i(){return{}}r.d(t,{P:()=>n,V:()=>i})},28405:(e,t,r)=>{"use strict";r.d(t,{H:()=>a});var n=r(53356),i=r(17558);function a(e,t){let r=e.dispatch,{options:a,getFacetSearch:s,executeFacetSearchActionCreator:o,executeFieldSuggestActionCreator:u}=t,{facetId:l}=a;return{updateText(e){r((0,i.jS)({facetId:l,query:e,numberOfValues:s().initialNumberOfValues}))},showMoreResults(){let{initialNumberOfValues:e,options:n}=s();r((0,i.jS)({facetId:l,numberOfValues:n.numberOfValues+e})),r(t.isForFieldSuggestions?u(l):o(l))},search(){r(t.isForFieldSuggestions?u(l):o(l))},clear(){r((0,n.HB)({facetId:l}))},updateCaptions(e){r((0,i.jS)({facetId:l,captions:e}))},get state(){let{response:e,isLoading:t,options:r}=s(),{query:n}=r,i=e.values;return{...e,values:i,isLoading:t,query:n}}}}},28806:(e,t,r)=>{"use strict";r.d(t,{O:()=>s,f:()=>o});var n=r(65179),i=r(69285),a=r(58604);let s=(0,i.VP)("trigger/query/ignore",e=>(0,a.rq)(e,new n.hU({emptyAllowed:!0,required:!0}))),o=(0,i.VP)("trigger/query/modification",e=>(0,a.rq)(e,new n.Bo({values:{originalQuery:a.y0,modification:a.y0}})))},29043:(e,t,r)=>{"use strict";r.d(t,{m:()=>i,x:()=>n});let n="3.51.4",i=["@coveo/atomic","@coveo/quantic"]},29534:(e,t,r)=>{"use strict";function n(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function i(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:n(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:n(),extendedResults:{},searchAction:void 0}}r.d(t,{B:()=>i,U:()=>n})},30140:(e,t,r)=>{"use strict";function n(){return{contextValues:{}}}r.d(t,{h:()=>n})},30417:(e,t,r)=>{"use strict";r(62547)},30702:(e,t,r)=>{"use strict";r(20239),r(914),r(91894),r(56750)},30790:e=>{e.exports=function(e){return this.__data__.has(e)}},31178:(e,t,r)=>
1{var n=r(73870),i=r(50733),a=r(10902);e.exports=function(e,t,r,s,o,u){var l=1&r,c=e.length,d=t.length;if(c!=d&&!(l&&d>c))return!1;var f=u.get(e),p=u.get(t);if(f&&p)return f==t&&p==e;var h=-1,g=!0,m=2&r?new n:void 0;for(u.set(e,t),u.set(t,e);++h<c;){var v=e[h],y=t[h];if(s)var b=l?s(y,v,h,t,e,u):s(v,y,h,e,t,u);if(void 0!==b){if(b)continue;g=!1;break}if(m){if(!i(t,function(e,t){if(!a(m,t)&&(v===e||o(v,e,r,s,u)))return m.push(t)})){g=!1;break}}else if(!(v===y||o(v,y,r,s,u))){g=!1;break}}return u.delete(e),u.delete(t),g}},31364:(e,t,r)=>{var n=r(35063),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,a,s,o){var u=1&r,l=n(e),c=l.length;if(c!=n(t).length&&!u)return!1;for(var d=c;d--;){var f=l[d];if(!(u?f in t:i.call(t,f)))return!1}var p=o.get(e),h=o.get(t);if(p&&h)return p==t&&h==e;var g=!0;o.set(e,t),o.set(t,e);for(var m=u;++d<c;){var v=e[f=l[d]],y=t[f];if(a)var b=u?a(y,v,f,t,e,o):a(v,y,f,e,t,o);if(!(void 0===b?v===y||s(v,y,r,a,o):b)){g=!1;break}m||(m="constructor"==f)}if(g&&!m){var w=e.constructor,S=t.constructor;w!=S&&"constructor"in e&&"constructor"in t&&!("function"==typeof w&&w instanceof w&&"function"==typeof S&&S instanceof S)&&(g=!1)}return o.delete(e),o.delete(t),g}},31365:function(e,t){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var n={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};t.getSanitizedOptions=function(e){var t=r(r({},n),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}},31739:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n,n:()=>i});let n=e=>e.query,i=e=>e.query?.enableQuerySyntax},31746:(e,t,r)=>{"use strict";r.d(t,{GA:()=>y,am:()=>p,MJ:()=>g,DP:()=>v,zj:()=>m,tD:()=>h});var n=r(65179),i=r(69285),a=r(35521);function s(e){return"redirect"===e.type}class o{response;constructor(e){this.response=e}get basicExpression(){return this.response.parsedInput.basicExpression}get largeExpression(){return this.response.parsedInput.largeExpression}get redirectionUrl(){let e=this.response.preprocessingOutput.triggers.filter(s);return e.length?e[0].content:null}}var u=r(81088),l=r(58604),c=r(32995),d=r(58035),f=r(10870);let p=(0,i.VP)("standaloneSearchBox/register",e=>(0,l.rq)(e,{id:l.r3,redirectionUrl:l.r3,overwrite:new n.Ci({required:!1})})),h=(0,i.VP)("standaloneSearchBox/updateRedirectionUrl",e=>(0,l.rq)(e,{id:l.r3,redirectionUrl:l.r3})),g=(0,i.VP)("standaloneSearchBox/reset",e=>(0,l.rq)(e,{id:l.r3})),m=(0,i.VP)("standaloneSearchBox/updateAnalyticsToSearchFromLink",e=>(0,l.rq)(e,{id:l.r3})),v=(0,i.VP)("standaloneSearchBox/updateAnalyticsToOmniboxFromLink"),y=(0,i.zD)("standaloneSearchBox/fetchRedirect",async(e,{dispatch:t,getState:r,rejectWithValue:i,extra:{apiClient:a,validatePayload:s,navigatorContext:l}})=>{s(e,{id:new n.hU({emptyAllowed:!1})});let c=await w(r(),l),d=await a.plan(c);if((0,u.CR)(d))return i(d.error);let{redirectionUrl:f}=new o(d.success);return f&&t(b(f)),f||""}),b=e=>(0,c.Zl)("analytics/standaloneSearchBox/redirect",t=>t.makeTriggerRedirect({redirectedTo:e})),w=async(e,t)=>({accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??(0,a.Ns)(e.configuration.organizationId,e.configuration.environment),locale:e.configuration.search.locale,timezone:e.configuration.search.timezone,q:e.query.q,...e.context&&{context:e.context.contextValues},...e.pipeline&&{pipeline:e.pipeline},...e.searchHub&&{searchHub:e.searchHub},...void 0!==e.query.enableQuerySyntax&&{enableQuerySyntax:e.query.enableQuerySyntax},...e.configuration.analytics.enabled&&"legacy"===e.configuration.analytics.analyticsMode?await (0,f.V)(e.configuration.analytics):(0,d.V)(e.configuration.analytics,t),...e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")}})},31767:(e,t,r)=>{"use strict";r.d(t,{HF:()=>a,jG:()=>s,qP:()=>o});var n=r(32995),i=r(40687);let a=e=>(0,n.Zl)("analytics/querySuggest",(t,r)=>{let n=o(r,e);return t.makeOmniboxAnalytics(n)}),s=()=>({actionCause:i.d.omniboxAnalytics});function o(e,t){let{id:r,suggestion:n}=t,i=e.querySuggest?.[r];if(!i)throw Error(`Unable to determine the query suggest analytics metadata to send because no query suggest with id "${r}" was found. Please check the sent #id.`);let a=i.completions.map(e=>e.expression),s=i.partialQueries.length-1,o=i.partialQueries[s]||"",u=i.responseId;return{suggestionRanking:a.indexOf(n),partialQuery:o,partialQueries:i.partialQueries,suggestions:a,querySuggestResponseId:u}}},32089:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},32848:(e,t,r)=>{"use strict";r.d(t,{r:()=>a});var n=r(69285),i=r(29043);let a=(0,n.vy)(i.x,e=>e)},32995:(e,t,r)=>{"use strict";r.d(t,{MU:()=>E,jY:()=>A,Zl:()=>b,Xk:()=>g,PK:()=>S,rq:()=>w,KQ:()=>C,sr:()=>T});var n=r(65179),i=r(69285),a=r(81401),s=r(58450),o=r(35521),u=r(3107),l=r(87264);class c extends u.v{getSearchUID(){return this.state.documentSuggestion?.status.lastResponseId??""}}r(5121);var d=r(94110),f=r(58604),p=r(48788),h=r(4270);function g(e,t){return{...new d.ME(t).getBaseMetadata(),actionCause:e,type:e}}let m=(e,t,r)=>function(...n){return v(1===n.length?{...n[0],__legacy__getBuilder:t(n[0].__legacy__getBuilder),analyticsConfigurator:e,providerClass:r}:{prefix:n[0],__legacy__getBuilder:t(n[1]),__legacy__provider:n[2],analyticsConfigurator:e,providerClass:r})},v=({prefix:e,__legacy__getBuilder:t,__legacy__provider:r,analyticsPayloadBuilder:n,analyticsType:s,analyticsConfigurator:o,providerClass:u})=>{var l;let c,d;return r??=e=>new u(e),l=async({getState:e,analyticsClientMiddleware:i,preprocessRequest:u,logger:l})=>{let c=[],d={log:async({state:e})=>{for(let t of c)await t(e)}},f=e(),p=o({getState:e,logger:l,analyticsClientMiddleware:i,preprocessRequest:u,provider:r(e)}),h=await t(p,e());d.description=h?.description,c.push(async e=>{"legacy"===e.configuration.analytics.analyticsMode&&await y(h,r,e,l,p.coveoAnalyticsClient)});let{emit:g}=(0,a.S)(f);return c.push(async e=>{if("next"===e.configuration.analytics.analyticsMode&&s&&n){let t=n(e);await O(g,s,t)}}),d},Object.assign(d=(c=t=>{let r=(0,i.zD)(e,t);return Object.assign(Object.assign(r,{type:r.typePrefix}),{instantlyCallable:!0})})(async(e,{getState:t,extra:r})=>{let{analyticsClientMiddleware:n,preprocessRequest:i,logger:a}=r;return await (await l({getState:t,analyticsClientMiddleware:n,preprocessRequest:i,logger:a})).log({state:t(),extra:r})}),{prepare:async({getState:e,analyticsClientMiddleware:t,preprocessRequest:r,logger:n})=>{let{description:i,log:a}=await l({getState:e,analyticsClientMiddleware:t,preprocessRequest:r,logger:n});return{description:i,action:c(async(e,{getState:t,extra:r})=>await a({state:t(),extra:r}))}}}),d};async function y(e,t,r,n,i){t(()=>r);let a=await e?.log({searchUID:t(()=>r).getSearchUID()});n.info({client:i,response:a},"Analytics response")}let b=m(e=>(0,d.UT)({...e,provider:e.provider||new d.ME(e.getState)}),e=>e,d.ME);m(({logger:e,getState:t,analyticsClientMiddleware:r=(e,t)=>
1t,preprocessRequest:n,provider:i=new c(t)})=>{let a=t(),u=a.configuration.accessToken,d=a.configuration.analytics.apiBaseUrl??(0,o.bV)(a.configuration.organizationId,a.configuration.environment,"analytics"),f=a.configuration.analytics.runtimeEnvironment,p=a.configuration.analytics.enabled,h=new s.l0({enableAnalytics:p,token:u,endpoint:d,runtimeEnvironment:f,preprocessRequest:(0,l.I3)(e,n),beforeSendHooks:[(0,l.ps)(e,r),(t,r)=>(e.info({...r,type:t,endpoint:d,token:u},"Analytics request"),r)]},i);return p||h.disable(),h},e=>(t,r)=>Promise.resolve({description:{actionCause:"caseAssist"},log:async n=>{e(t,r)}}),c);let w=(e,t)=>{var r,i,a;let s,o,u,l=-1,c=t.search?.results;(l=_(e,c))<0&&(l=function(e,t){for(let[r,n]of t.entries())if(-1!==_(e,(0,p.A)(n)))return r;return -1}(e,c)),l<0&&(l=0);return r=e,i=l+(t.pagination?.firstResult??0),a=t,{collectionName:"string"==typeof(s=r.raw.collection)?s:"default",documentAuthor:(o=r.raw.author,(0,n.hX)(o)?"unknown":Array.isArray(o)?o.join(";"):`${o}`),...I(r)?{documentCategory:I(r)}:{},documentPosition:i+1,documentTitle:r.title,documentUri:r.uri,documentUriHash:r.raw.urihash,documentUrl:r.clickUri,rankingModifier:r.rankingModifier||"",sourceName:(u=r.raw.source,(0,n.hX)(u)?"unknown":u),queryPipeline:a.pipeline||(0,h.S)()}},S=(e,t)=>{let r;return{sourceName:(r=e.source,(0,n.hX)(r)?"unknown":r),documentPosition:1,documentTitle:e.title,documentUri:e.uri,documentUrl:e.clickUri,queryPipeline:t.pipeline||(0,h.S)()}},E=e=>({contentIdKey:"permanentid",contentIdValue:e.permanentid||""});function I(e){return e.raw?.objecttype||void 0}let A=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||""}),k={urihash:new n.hU,sourcetype:new n.hU,permanentid:new n.hU},C={uniqueId:f.r3,raw:new n.Bo({values:k}),title:f.r3,uri:f.r3,clickUri:f.r3,rankingModifier:new n.hU({required:!1,emptyAllowed:!0})},T=e=>{var t;return new n.Sj(C).validate(Object.assign({},...Object.keys(C).map(t=>({[t]:e[t]})),{raw:(t=e.raw,Object.assign({},...Object.keys(k).map(e=>({[e]:t[e]}))))}))};function _(e,t=[]){return t.findIndex(({uniqueId:t})=>t===e.uniqueId)}async function O(e,t,r){await e(t,r)}},33421:(e,t,r)=>{"use strict";r.d(t,{G1:()=>C,zn:()=>k});var n=r(81401),i=r(46597),a=r(28022),s=r(32848),o=r(22478),u=r(65179);let l=e=>t=>r=>{let n,i;i=r.payload?.analyticsAction,"type"in r&&!(0,u.hX)(i)&&(n=r.payload.analyticsAction,delete r.payload.analyticsAction);let a=t(r);return"type"in r&&("search/executeSearch/fullfilled"===r.type&&void 0===n&&console.error("No anal
1ytics action associated with search:",r),"recommendation/get/fullfilled"===r.type&&void 0===n&&console.error("No analytics action associated with recommendation:",r),"productRecommendations/get/fullfilled"===r.type&&void 0===n&&console.error("No analytics action associated with product recommendation:",r)),void 0!==n&&e.dispatch(n),a};var c=r(64060);let d=()=>e=>t=>e(t.instantlyCallable?t():t);var f=r(69285),p=r(84436),h=r(3774),g=r(19528),m=r(5121),v=r(31739),y=r(59730);let b=(e,t)=>{let{referrer:r,userAgent:n,location:i,clientId:a}=e.getMeta("");return{...t?t():{},referrer:r,userAgent:n,location:i,clientId:a}};var w=r(63272),S=r(53330),E=r(914),I=r(65570);function A(e,t){e.dispatch((0,S.N)({status:401,statusCode:401,message:t.message,type:t.name}))}function k(e,t){let r={...e.reducers,configuration:c.H,version:s.r},n=C({...e,reducers:r},t,c.H),{accessToken:i,environment:u,organizationId:l}=e.configuration;n.dispatch((0,a.mg)({accessToken:i,environment:u,organizationId:l}));let d=function(e,t){let{analytics:r}=e,{analyticsClientMiddleware:n,...i}=r??{},a={...i,...r?.proxyBaseUrl&&{apiBaseUrl:r.proxyBaseUrl,nexApiBaseUrl:r.proxyBaseUrl}};return"next"!==a.analyticsMode&&(0,o.KG)()?(t.info("Analytics disabled since doNotTrack is active."),{...a,enabled:!1}):a}(e.configuration,n.logger);return d&&n.dispatch((0,a.ix)(d)),n}function C(e,t,r){var s,u;let c,S,{reducers:k,navigatorContextProvider:C}=e,T=(s={...k,configurationReducer:r},u=e.preloadedState??{},S={...s},{get combinedReducer(){let e,t=(0,o.PW)(Object.entries(u).filter(([e])=>!(e in S)).map(([e,t])=>[e,()=>t]));return e=(0,w.HY)({...t,...S}),(t,r)=>{let n=e(t,r);return c?c(n,r):n}},containsAll:e=>Object.keys(e).every(e=>e in S),add(e){Object.keys(e).filter(e=>!(e in S)).forEach(t=>{S[t]=e[t]})},addCrossReducer(e){c=e}});e.crossReducer&&T.addCrossReducer(e.crossReducer);let _=t.logger,O=function(e,t,r){let{preloadedState:n,configuration:s}=e,u=s.name||"coveo-headless",c=function(e,t,r){var n;let s,u,c,b,w,S,k,C,{renewAccessToken:T}=e.configuration,_=(s=0,u=null,c=(0,o.sg)(()=>{s=0},500),b=async(e,t=!1)=>{let r=!u;r&&T&&(u=(async()=>{try{return await T()}catch(e){if(!t)throw e;return null}})().finally(()=>{u=null}));let n=await u;return r&&n&&e.dispatch((0,a.mg)({accessToken:n})),n},w=async e=>{let r=e.getState().configuration.accessToken;if(r&&(0,I.Q)(r)){t.debug("Access token is expired or about to expire, attempting renewal.");try{await b(e)?t.debug("Access token was renewed."):t.warn("Access token renewal returned an empty token. Please check the #renewAccessToken function.")}catch(e){t.warn(e,"Access token renewal failed. A retry will occur if necessary.")}}},S=async(e,r,n)=>{if(s>=5)return t.warn("Attempted to renew the token but was not successful. Please check the #renewAccessToken function."),A(e,r.error),r;u||(s++,c());try{await b(e,!0)}catch(e){t.debug(e,"Token renewal failed in reactive path (piggybacked on a proactive renewal). The action will be re-dispatched.")}e.dispatch(n)},e=>r=>async n=>{var i;let a="function"==typeof T;if("function"!=typeof n)return r(n);a&&await w(e);let s=await r(n);return"object"==typeof(i=s)&&null!==i&&"error"in i&&i.error?.name===new E.sG().name?a?await S(e,s,n):(t.warn("Unable to renew the expired token because a renew function was not provided. Please specify the #renewAccessToken option when initializing the engine."),A(e,s.error),s):s}),O=(n={getNavigatorContext:r},k=(0,f.Nc)({extra:n}),C=(0,p.$)(),k.startListening({actionCreator:y.kB.pending,effect:async(e,t)=>{let r=t.getState();if(!(0,m.wH)(r))return;C.abortRun(),t.dispatch((0,g.W9)()),t.dispatch((0,h.V$)());let i=(0,v.Z)(r)?.q;i&&""!==i.trim()&&C.run(r,t.dispatch,n.getNavigatorContext)}}),k);return[d,_,()=>e=>r=>{if(!r.error)return e(r);let n=r.error;if(r.payload?.ignored||t.error({error:n,action:r},`Action dispatch error ${r.type}`),"SchemaValidationError"!==r.error.name)return e(r)},l].concat(i.xS.middleware,O.middleware,e.middlewares||[])}(e,t.logger,()=>t.navigatorContext);return function({reducer:e,preloadedState:t,middlewares:r=[],thunkExtraArguments:n,name:i}){return(0,f.U1)({reducer:e,preloadedState:t,devTools:{stateSanitizer:e=>e.history?{...e,history:"<<OMIT>>"}:e,name:i,shouldHotReload:!1},middleware:e=>{let t;return e({thunk:{extraArgument:n}}).prepend(...r).concat((t=n.logger,e=>r=>n=>(t.debug({action:n,nextState:e.getState()},`Action dispatched: ${n.type}`),r(n))))}})}({preloadedState:n,reducer:r.combinedReducer,middlewares:c,thunkExtraArguments:t,name:u})}(e,{...t,get relay(){return(0,n.S)(x.state,C)},get navigatorContext(){return b(this.relay,C)}},T),x={addReducers(e){T.containsAll(e)||(T.add(e),O.replaceReducer(T.combinedReducer))},dispatch:O.dispatch,subscribe:O.subscribe,enableAnalytics(){O.dis
1patch((0,a.gQ)())},disableAnalytics(){O.dispatch((0,a.Re)())},get state(){return O.getState()},get relay(){return(0,n.S)(this.state,C)},get navigatorContext(){return b(this.relay,C)},logger:_,store:O};return x}r(56294)},33533:(e,t,r)=>{"use strict";r.d(t,{U:()=>g,Y:()=>m});var n=r(69285),i=r(87998),a=r(47882),s=r(94888),o=r(71358),u=r(59730),l=r(15389),c=r(6466),d=r(10634),f=r(27842),p=r(7465),h=r(28222);let g=(0,n.vy)((0,h.V)(),e=>{e.addCase(p.hd,(e,t)=>{var r;let{payload:n}=t,{tabs:i}=n,a=(r=n,{...f.UP,currentValues:[],preventAutoSelect:!1,type:"dateRange",...r});(0,f.cj)(e,(0,h.P)(a,i))}).addCase(o.Zg.fulfilled,(e,t)=>t.payload?.dateFacetSet??e).addCase(l.p,(e,t)=>{let r=t.payload.df||{};(0,f.E0)(e,r)}).addCase(p.xy,(e,t)=>{let{facetId:r,selection:n}=t.payload;(0,f.VN)(e,r,n)}).addCase(p.NE,(e,t)=>{let{facetId:r,selection:n}=t.payload;(0,f.zY)(e,r,n)}).addCase(p.F4,(e,t)=>{let{facetId:r,values:n}=t.payload;(0,f.N5)(e,r,n)}).addCase(p.SH,(e,t)=>{(0,f.HM)(e,t.payload)}).addCase(i.R,e=>{Object.keys(e).forEach(t=>{(0,f.HM)(e,t)})}).addCase(p.yj,(e,t)=>{(0,d._c)(e,t.payload)}).addCase(u.kB.fulfilled,(e,t)=>{let r=t.payload.response.facets;(0,f.WM)(e,r,m)}).addCase(a.eV,(e,t)=>{(0,f.HM)(e,t.payload)}).addCase(c.$,(e,t)=>{let r=t.payload;Object.keys(e).forEach(t=>{let n=e[t];(n.tabs?.included?.length||n.tabs?.excluded?.length)&&!(0,s.E)(n.tabs,r)&&(0,f.HM)(e,t)})})});function m(e){return e.map(e=>{let{numberOfResults:t,...r}=e;return r})}},34017:(e,t,r)=>{var n=r(56996),i=r(31178),a=r(40391),s=r(31364),o=r(23848),u=r(10756),l=r(81421),c=r(33730),d="[object Arguments]",f="[object Array]",p="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,r,g,m,v){var y=u(e),b=u(t),w=y?f:o(e),S=b?f:o(t);w=w==d?p:w,S=S==d?p:S;var E=w==p,I=S==p,A=w==S;if(A&&l(e)){if(!l(t))return!1;y=!0,E=!1}if(A&&!E)return v||(v=new n),y||c(e)?i(e,t,r,g,m,v):a(e,t,w,r,g,m,v);if(!(1&r)){var k=E&&h.call(e,"__wrapped__"),C=I&&h.call(t,"__wrapped__");
1if(k||C){var T=k?e.value():e,_=C?t.value():t;return v||(v=new n),m(T,_,r,g,v)}}return!!A&&(v||(v=new n),s(e,t,r,g,m,v))}},34536:(e,t,r)=>{"use strict";r.d(t,{Pq:()=>i,_u:()=>a,lL:()=>s});var n=r(22478);function i({definitionsMap:e,engine:t,propsMap:r}){return(0,n.s8)(e,(e,n)=>(function({definition:e,engine:t,props:r}){return"build"in e?e.build(t):e.buildWithProps(t,r)})({definition:e,engine:t,props:r?.[n]}))}function a({searchAction:e,controllers:t}){return{controllers:(0,n.s8)(t,e=>({state:(0,n.o8)(e.state)})),searchAction:(0,n.o8)(e)}}function s(e,t){let r=(...t)=>e(...t);for(let[e,n]of Object.entries(t))r[e]=n;return r}},34541:(e,t,r)=>{"use strict";r.d(t,{Zj:()=>u,jE:()=>o,wF:()=>s});var n=r(99334),i=r(70445);function a(e){return e.pagination.numberOfResults}let s=e=>{let t=e.pagination.firstResult,r=a(e);return(0,i.mq)(t,r)},o=e=>{let t=e.pagination.totalCountFiltered,r=a(e);return(0,i.QF)(t,r)},u=(e,t)=>{let r,i,a,u=s(e),l=o(e),c={start:(d=u)-(r=Math.floor((f=t)/2)),end:d+(f%2==0?r-1:r)};{var d,f,p,h,g,m=(h=(p=c,i=Math.max(n.I-p.start,0),c={start:p.start+i,end:p.end+i}),g=l,a=Math.max(h.end-g,0),c={start:Math.max(h.start-a,n.I),end:h.end-a});let e=[];for(let t=m.start;t<=m.end;++t)e.push(t);return e}}},34630:(e,t,r)=>{"use strict";r.d(t,{F:()=>function e(t){t.children.forEach(t=>{e(t)}),(0,i.En)({state:t.state,numberOfResults:t.numberOfResults,value:t.value,path:t.path,moreValuesAvailable:t.moreValuesAvailable},a)}});var n=r(65179),i=r(58604);let a={state:new n.WT({required:!0}),numberOfResults:new n.lS({required:!0,min:0}),value:new n.hU({required:!0,emptyAllowed:!0}),path:new n.v({required:!0,each:i.r3}),moreValuesAvailable:new n.Ci({required:!1})}},35521:(e,t,r)=>{"use strict";r.d(t,{Ht:()=>o,Uw:()=>d,Yk:()=>l,bV:()=>u,Ns:()=>c});var n=r(74683),i=r(914),a=r(22478);function s(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}class o{static async call(e){let t=function(e){let{url:t,method:r,requestParams:n,contentType:i,accessToken:a,signal:o}=e,u="POST"===e.method||"PUT"===e.method,l=function(e,t){if("application/x-www-form-urlencoded"===t)return"object"==typeof e&&e&&Object.values(e).every(s)?function(e){let t=[];for(let r in e){let n=encodeURIComponent(r),i=encodeURIComponent(e[r]);t.push(`${n}=${i}`)}return t.join("&")}(e):"";return JSON.stringify(e)}(n,i);return{url:t,method:r,headers:{"Content-Type":i,Authorization:`Bearer ${a}`,...e.headers},...u&&{body:l},signal:o}}(e),{logger:r}=e,a=await o.preprocessRequest(t,e);r.info(a,"Platform request");let{url:u,...l}=a,c=async()=>{let e=await fetch(u,l);if(429===e.status)throw e;return e};try{let e=await (0,n.backOff)(c,{startingDelay:100,timeMultiple:2,maxDelay:800,numOfAttempts:4,jitter:"full",retry:async e=>{var t;let n=e&&(t=e.status,429===t);return n&&(r.info("Platform retrying request"),await new Promise(e=>setTimeout(e,1e3))),n}});switch(e.status){case 419:case 401:throw r.info("Platform renewing token"),new i.sG;case 404:throw new i.Ce(u,e.status);default:return r.info({response:e,requestInfo:a},"Platform response"),e}}catch(e){if("Failed to fetch"===e.message)return new i.Ce(u);return e}}static async preprocessRequest(e,t){let{origin:r,preprocessRequest:n,logger:i,requestMetadata:s}=t,{signal:o,...u}=e,l=(0,a.o8)(u);try{let t=await n(e,r,s);return{...e,...t}}catch(e){i.error(e,"Platform request preprocessing failed. Returning default request options.")}return l}}function u(e,t="prod",r="platform"){let n="platform"===r?"":`.${r}`;return`https://${e}${n}.org${"prod"===t?"":t}.coveo.com`}function l(e,t,r="prod"){return e??u(t,r)}function c(e,t="prod"){let r=u(e,t);return`${r}/rest/search/v2`}function d(e,t="prod"){let r=u(e,t,"analytics");return`${r}/rest/organizations/${e}/events/v1`}},35728:(e,t,r)=>{"use strict";function n(){return{enabled:!0,tabs:{}}}function i(){return{freezeFacetOrder:!1,facets:{}}}r.d(t,{b:()=>n,x:()=>i})},36363:(e,t,r)=>{"use strict";function n(e){return e.query="",e.queryModification={originalQuery:"",newQuery:"",queryToIgnore:e.queryModification.queryToIgnore},e}function i(e,t){let r=[],n=[],i=[],a=[];
1return t.forEach(e=>{switch(e.type){case"redirect":r.push(e.content);break;case"query":n.push(e.content);break;case"execute":i.push({functionName:e.content.name,params:e.content.params});break;case"notify":a.push(e.content)}}),e.redirectTo=r[0]??"",e.query=e.queryModification.newQuery,e.executions=i,e.notifications=a,e}function a(e,t){return e.queryModification={...t,queryToIgnore:""},e}function s(e,t){return e.queryModification.queryToIgnore=t,e}r.d(t,{Ne:()=>a,QS:()=>n,eW:()=>s,y3:()=>i})},37472:(e,t,r)=>{"use strict";r.d(t,{Nu:()=>o,V_:()=>s,q0:()=>a,vc:()=>i});var n=r(71950);let i=e=>"selected"===e.state,a=e=>"excluded"===e.state,s=(e,t)=>{let r={facetId:e,facetValue:`${t.start}..${t.end}`};return i(t)?(0,n.$e)(r):(0,n.Ub)(r)},o=e=>i(e)?(0,n.$g)():(0,n.Yv)()},37832:(e,t,r)=>{var n=r(42596),i=r(46291),a=r(53034);e.exports=n&&1/a(new n([,-0]))[1]==1/0?function(e){return new n(e)}:i},37978:(e,t,r)=>{"use strict";r.d(t,{B8:()=>o,I1:()=>a,WM:()=>l,_E:()=>c,lY:()=>u,w9:()=>s,z$:()=>f,z5:()=>d}),r(58604);var n=r(32995),i=r(40687);let a=()=>(0,n.Zl)("analytics/interface/load",e=>e.makeInterfaceLoad()),s=()=>(0,n.Zl)("analytics/interface/change",(e,t)=>e.makeInterfaceChange({interfaceChangeTo:t.configuration.analytics.originLevel2})),o=()=>(0,n.Zl)("analytics/interface/searchFromLink",e=>e.makeSearchFromLink()),u=e=>(0,n.Zl)("analytics/interface/omniboxFromLink",t=>t.makeOmniboxFromLink(e)),l=()=>({actionCause:i.d.interfaceLoad}),c=()=>({actionCause:i.d.interfaceChange}),d=()=>({actionCause:i.d.searchFromLink}),f=()=>({actionCause:i.d.omniboxFromLink})},38278:(e,t,r)=>{"use strict";r.d(t,{oq:()=>m,Us:()=>v,BL:()=>y});var n=r(89969),i=r(35521);let a=(0,r(78752).Mz)(e=>e.advancedSearchQueries,e=>{if(!e)return{};let{aq:t,cq:r,dq:n,lq:i}=e;return{...t&&{aq:t},...r&&{cq:r},...n&&{dq:n},...i&&{lq:i}}});var s=r(58035),o=r(5121),u=r(31739),l=r(67539),c=r(59924),d=r(6301),f=r(82487),p=r(99860),h=r(95448),g=r(18287);let m=async e=>({accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:(0,i.Yk)(e.configuration.search.apiBaseUrl,e.configuration.organizationId,e.configuration.environment),streamId:e.search.extendedResults?.generativeQuestionAnsweringId}),v=(e,t)=>{let r=(0,u.Z)(e)?.q,{aq:n,cq:i,dq:a,lq:l}=S(e),p=e.context,m=(0,s.V)(e.configuration.analytics,t,{actionCause:(0,d.a5)(e)}),v=e.searchHub,y=e.pipeline,E=(0,o.FC)(e)??[],I=b(e),A=(0,f.g)(e.tabSet)||"default",k=(0,h.JV)(e),C=(0,h.Q_)(e),T=t.referrer||"",_=(0,g.Y)(e),O=e.sortCriteria,x=w(e),R=e.excerptLength?.length,N=(e=>{if(e.folding)return{filterField:e.folding.fields.collection,childField:e.folding.fields.parent,parentField:e.folding.fields.child,filterFieldRange:e.folding.filterFieldRange}})(e),P=(e=>{if(e.dictionaryFieldContext&&Object.keys(e.dictionaryFieldContext.contextValues).length)return e.dictionaryFieldContext.contextValues})(e);return{q:r,...n&&{aq:n},...i&&{cq:i},...a&&{dq:a},...l&&{lq:l},...e.query&&{enableQuerySyntax:(0,u.n)(e)},...p?.contextValues&&{context:p.contextValues},pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:E}},...v?.length&&{searchHub:v},...y?.length&&{pipeline:y},...I.length&&{facets:I},...e.fields&&{fieldsToInclude:e.fields.fieldsToInclude},...e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&"next"===e.didYouMean.queryCorrectionMode,options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&"legacy"===e.didYouMean.queryCorrectionMode},...e.pagination&&{numberOfResults:(0,c.v_)(e),firstResult:e.pagination.firstResult},tab:A,locale:k,timezone:C,...void 0!==e.debug&&{debug:e.debug},referrer:T,...x,...N??{},...R&&{excerptLength:R},...P&&{dictionaryFieldContext:P},sortCriteria:O,..._&&{facetOptions:_},...m,...e.insightCaseContext?.caseContext&&{caseContext:e.insightCaseContext?.caseContext}}},y=(e,t)=>{let r=(0,u.Z)(e)?.q,n=b(e),i=(0,s.V)(e.configuration.analytics,t,{actionCause:(0,d.a5)(e)}),a=(0,h.JV)(e),l=(0,f.g)(e.tabSet)||"default",c=t.referrer,{aq:p,cq:g}=S(e),m=e.searchHub,v=e.pipeline,y=e.context,w=(0,o.FC)(e)??[];return{q:r||"",...n.length&&{facets:n},citationsFieldToInclude:w,...m?.length&&{searchHub:m},...v?.length&&{pipeline:v},...y?.contextValues&&{context:y.contextValues},...p&&{aq:p},...g&&{cq:g},tab:l,referrer:c,...i,locale:a}},b=e=>(0,p.Zt)(e)?.map(e=>(0,l.lc)(e,(0,l.kB)())).sort((e,t)=>
1e.facetId>t.facetId?1:t.facetId>e.facetId?-1:0),w=e=>({actionsHistory:e.configuration.analytics.enabled?n.Ay.getInstance().getHistory():[]}),S=e=>{let t=a(e),r=(0,c.hq)(e);return{...t,...r&&{cq:r}}}},40391:(e,t,r)=>{var n=r(16868),i=r(50313),a=r(91101),s=r(31178),o=r(76864),u=r(53034),l=n?n.prototype:void 0,c=l?l.valueOf:void 0;e.exports=function(e,t,r,n,l,d,f){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)break;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":if(e.byteLength!=t.byteLength||!d(new i(e),new i(t)))break;return!0;case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=o;case"[object Set]":var h=1&n;if(p||(p=u),e.size!=t.size&&!h)break;var g=f.get(e);if(g)return g==t;n|=2,f.set(e,t);var m=s(p(e),p(t),n,l,d,f);return f.delete(e),m;case"[object Symbol]":if(c)return c.call(e)==c.call(t)}return!1}},40687:(e,t,r)=>{"use strict";var n,i;r.d(t,{d:()=>n}),(i=n||(n={})).interfaceLoad="interfaceLoad",i.interfaceChange="interfaceChange",i.didYouMeanAutomatic="didYouMeanAutomatic",i.didYouMeanClick="didYouMeanClick",i.resultsSort="resultsSort",i.searchboxSubmit="searchboxSubmit",i.searchboxAsYouType="searchboxAsYouType",i.breadcrumbFacet="breadcrumbFacet",i.breadcrumbResetAll="breadcrumbResetAll",i.documentOpen="documentOpen",i.omniboxAnalytics="omniboxAnalytics",i.omniboxFromLink="omniboxFromLink",i.searchFromLink="searchFromLink",i.triggerQuery="query",i.browseResults="browseResults",i.staticFilterDeselect="staticFilterDeselect",i.facetClearAll="facetClearAll",i.facetSelect="facetSelect",i.facetDeselect="facetDeselect",i.facetExclude="facetExclude",i.facetUnexclude="facetUnexclude",i.facetUpdateSort="facetUpdateSort",i.documentSuggestion="documentSuggestion",i.facetShowMore="showMoreFacetResults",i.facetShowLess="showLessFacetResults",i.queryError="query",i.recommendationInterfaceLoad="recommendationInterfaceLoad",i.likeSmartSnippet="likeSmartSnippet",i.dislikeSmartSnippet="dislikeSmartSnippet",i.expandSmartSnippet="expandSmartSnippet",i.collapseSmartSnippet="collapseSmartSnippet",i.openSmartSnippetFeedbackModal="openSmartSnippetFeedbackModal",i.closeSmartSnippetFeedbackModal="closeSmartSnippetFeedbackModal",i.sendSmartSnippetReason="sendSmartSnippetReason",i.expandSmartSnippetSuggestion="expandSmartSnippetSuggestion",i.collapseSmartSnippetSuggestion="collapseSmartSnippetSuggestion",i.openSmartSnippetSource="openSmartSnippetSource",i.openSmartSnippetSuggestionSource="openSmartSnippetSuggestionSource",i.showMoreFoldedResults="showMoreFoldedResults",i.showLessFoldedResults="showLessFoldedResults",i.copyToClipboard="copyToClipboard",i.caseSendEmail="Case.SendEmail",i.feedItemTextPost="FeedItem.TextPost",i.caseAttach="caseAttach",i.caseDetach="caseDetach",i.generatedAnswerCitationDocumentAttach="generatedAnswerCitationDocumentAttach",i.retryGeneratedAnswer="retryGeneratedAnswer",i.likeGeneratedAnswer="likeGeneratedAnswer",i.dislikeGeneratedAnswer="dislikeGeneratedAnswer",i.openGeneratedAnswerSource="openGeneratedAnswerSource",i.generatedAnswerStreamEnd="generatedAnswerStreamEnd",i.contextChanged="contextChanged",i.generatedAnswerSourceHover="generatedAnswerSourceHover",i.generatedAnswerFeedbackSubmit="generatedAnswerFeedbackSubmit",i.generatedAnswerHideAnswers="generatedAnswerHideAnswers",i.generatedAnswerShowAnswers="generatedAnswerShowAnswers",i.generatedAnswerExpand="generatedAnswerExpand",i.generatedAnswerCollapse="generatedAnswerCollapse",i.generatedAnswerCopyToClipboard="generatedAnswerCopyToClipboard",i.expandToFullUI="expandToFullUI",i.createArticle="createArticle",i.recentQueriesClick="recentQueriesClick",i.clearRecentQueries="clearRecentQueries"},40933:e=>{e.exports=function(e){return e}},41252:(e,t,r)=>{"use strict";r.d(t,{K:()=>E,q:()=>I});var n=r(2308),i=r(30140),a=r(12676),s=r(60624),o=r(35728),u=r(45989),l=r(4477),c=r(23909),d=r(71769),f=r(28222),p=r(79454),h=r(70766),g=r(4270),m=r(68092),v=r(94260),y=r(72802),b=r(27208),w=r(52376),S=r(66200);function E(){return I({})}function I(e){return{context:e.context||(0,i.h)(),dictionaryFieldContext:e.dictionaryFieldContext||(0,s.h)(),facetSet:e.facetSet||(0,d.v)(),numericFacetSet:e.numericFacetSet||(0,p._)(),dateFacetSet:e.dateFacetSet||(0,f.V)(),categoryFacetSet:e.categoryFacetSet||(0,l.v)(),automaticFacetSet:e.automaticFacetSet??(0,u.S)(),pagination:e.pagination||(0,h.y)(),query:e.query||(0,m.O)(),tabSet:e.tabSet||(0,S.N)(),advancedSearchQueries:e.advancedSearchQueries||(0,n.y)(),staticFilterSet:e.staticFilterSet||(0,w.I)(),querySet:e.querySet||(0,v.u)(),sortCriteria:e.sortCriteria||(0,b.z)(),pipeline:e.pipeline||(0,g.S)(),searchHub:e.searchHub||(0,y.J)(),facetOptions:e.facetOptions||(0,o.x)(),facetOrder:e.facetOrder??(0,c.j)(),debug:e.debug??(0,a.t)()}}},42548:(e,t,r)=>{"use strict";function n(e){return Object.values(e).map(e=>e.request)}r.d(t,{g:()=>n})},42994:(e,t,r)=>{"use strict";r.d(t,{E:()=>c,G6:()=>d,Gt:()=>u,HI:()=>s,Lq:()=>l,qZ:()=>o});var n=r(65179),i=r(69285),a=r(58604);let s=(0,i.VP)("didYouMean/enable"),o=(0,i.VP)("didYouMean/disable"),u=(0,i.VP)("didYouMean/automaticCorrections/disable"),l=(0,i.VP)("didYouMean/automaticCorrections/enable"),c=(0,i.VP)("didYouMean/correction",e=>(0,a.rq)(e,a.r3)),d=(0,i.VP)("didYouMean/automaticCorrections/mode",e=>(0,a.rq)(e,new n.hU({constrainTo:["next","legacy"],emptyAllowed:!1,required:!0})))},43308:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(22887),i=r(45731);let a=Symbol("augmentedWithForwardedFor");function s(e){let t=e.preprocessRequest;if(t?.[a])return t;let r=async(r,a,s)=>{if(!(0,i.B)()){let t=new Headers(r.headers),i=e.navigatorContextProvider?.()?.forwardedFor;i?t.set("x-forwarded-for",i):(0,n.r)(e.loggerOptions).warn("[WARNING] Unable to set x-forwarded-for header. Make sure to set the 'forwardedFor' property in the navigator context provider."),r.headers=t}return t?t(r,a,s):r};return r[a]=!0,r}},43970:(e,t,r)=>{"use strict";let n,i;r.d(t,{w:()=>s});var a=r(12115);let s=e=>{let{box:t,onResize:r,ref:s,htmlElement:o,trackSize:u=!1}=e,[l,c]=(0,a.useState)(u?{width:0,height:0}:void 0),d=(0,a.useRef)(null),f=(0,a.useRef)(r);return(0,a.useEffect)(()=>{f.current=r},[r]),(0,a.useEffect)(()=>
1{if("u"<typeof window)return;let e=o??s?.current;if(!e)return;let r=(()=>{if("u">typeof window&&"u">typeof ResizeObserver)return n||(n=new Map),i||(i=new ResizeObserver(e=>{for(let t of e){let e=n?.get(t.target);e&&e(t)}})),{observer:i,entries:n}})();if(!r)return;let{observer:a,entries:l}=r;return l.set(e,e=>{let r="border-box"===t?e.borderBoxSize:e.contentBoxSize,n=0,i=0;if(r){let e=Array.isArray(r)?r[0]:r;n=e.inlineSize,i=e.blockSize}else{let t=e.contentRect;n=t.width,i=t.height}null!==d.current&&cancelAnimationFrame(d.current),d.current=requestAnimationFrame(()=>{u&&c(e=>e&&e.width===n&&e.height===i?e:{width:n,height:i}),f.current?.(e)})}),a.observe(e),()=>{null!==d.current&&cancelAnimationFrame(d.current),l.delete(e),a.unobserve(e),0===l.size&&(a.disconnect(),i=void 0)}},[t,o,s,u]),l}},43995:(e,t,r)=>{"use strict";r.d(t,{C9:()=>p,Zg:()=>h,dy:()=>f,jb:()=>c,si:()=>d,vi:()=>l});var n=r(65179),i=r(69285),a=r(58604),s=r(64379),o=r(34630);let u={facetId:s.k,field:a.r3,tabs:new n.Bo({options:{required:!1},values:{included:new n.v({each:new n.hU}),excluded:new n.v({each:new n.hU})}}),activeTab:new n.hU({required:!1}),delimitingCharacter:new n.hU({required:!1,emptyAllowed:!0}),filterFacetCount:new n.Ci({required:!1}),injectionDepth:new n.lS({required:!1,min:0}),numberOfValues:new n.lS({required:!1,min:1}),sortCriteria:new n.WT({required:!1}),basePath:new n.v({required:!1,each:a.r3}),filterByBasePath:new n.Ci({required:!1})},l=(0,i.VP)("categoryFacet/register",e=>(0,a.rq)(e,u)),c=(0,i.VP)("categoryFacet/toggleSelectValue",e=>{try{return(0,a.En)(e.facetId,a.r3),(0,o.F)(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:(0,a.py)(t)}}}),d=(0,i.VP)("categoryFacet/deselectAll",e=>(0,a.rq)(e,u.facetId)),f=(0,i.VP)("categoryFacet/updateNumberOfValues",e=>(0,a.rq)(e,{facetId:u.facetId,numberOfValues:u.numberOfValues})),p=(0,i.VP)("categoryFacet/updateSortCriterion",e=>(0,a.rq)(e,{facetId:u.facetId,criterion:new n.WT})),h=(0,i.VP)("categoryFacet/updateBasePath",e=>(0,a.rq)(e,{facetId:u.facetId,basePath:new n.v({each:a.r3})}))},45166:(e,t,r)=>{"use strict";r.d(t,{ET:()=>o,G8:()=>s,qc:()=>a});var n=r(69285),i=r(58604);let a={id:i.r3,query:i.GH},s=(0,n.VP)("querySet/register",e=>(0,i.rq)(e,a)),o=(0,n.VP)("querySet/update",e=>(0,i.rq)(e,a))},45490:(e,t,r)=>{"use strict";function n(e){return`${e.slice(0,1).toUpperCase()}${e.slice(1)}`}function i(e){let t,r=!1;return{get:()=>(r||(t=e(),r=!0),t)}}function a(e,t){return Object.fromEntries(Object.entries(e).map(([e,r])=>[e,t(r,e)]))}r.d(t,{Gr:()=>i,ZH:()=>n,s8:()=>a})},45731:(e,t,r)=>{"use strict";function n(){return"u">typeof window&&"u">typeof document}r.d(t,{B:()=>n})},45989:(e,t,r)=>{"use strict";r.d(t,{S:()=>i});var n=r(19065);function i(){return{desiredCount:n.$c,numberOfValues:n.qq,set:{}}}},46291:e=>{e.exports=function(){}},46314:(e,t,r)=>{"use strict";var n,i;async function a(e,t){let r,n=e.getReader();for(;!(r=await n.read()).done;)t(r.value)}function s(){return{data:"",event:"",id:"",retry:void 0}}r.d(t,{y:()=>c}),(i=n||(n={}))[i.NewLine=10]="NewLine",i[i.CarriageReturn=13]="CarriageReturn",i[i.Space=32]="Space",i[i.Colon=58]="Colon";let o="text/event-stream",u="last-event-id";function l(){return"u">typeof window}function c(e,{signal:t,headers:r,onopen:i,onmessage:f,onclose:p,onerror:h,openWhenHidden:g,fetch:m,...v}){return new Promise((c,y)=>{let b,w,S={...r};function E(){b?.abort(),document.hidden||T()}S.accept||(S.accept=o),!g&&l()&&document.addEventListener("visibilitychange",E);let I=1e3;function A(){l()&&document.removeEventListener("visibilitychange",E),clearTimeout(w),b?.abort()}t?.addEventListener("abort",()=>{A(),c()});let k=m??fetch,C=i??d;async function T(){b=AbortController?new AbortController:null;try{var t,r,i;let o,l,d,h,g,m,y=await k(e,{...v,headers:S,signal:b?.signal});await C(y),await a(y.body,(t=e=>{e?S[u]=e:delete S[u]},r=e=>{I=e},o=s(),l=new TextDecoder,i=function(e,i){if(0===e.length)f?.(o),o=s();else if(i>0){let s=l.decode(e.subarray(0,i)),d=i+(e[i+1]===n.Space?2:1),f=l.decode(e.subarray(d));switch(s){case"data":o.data=o.data?`${o.data}
2${f}`:f;break;case"event":o.event=f;break;case"id":t(o.id=f);break;case"retry":var a,u,c;let p;a=f,u=o,c=r,p=parseInt(a,10),Number.isNaN(p)||c(u.retry=p)}}},m=!1,function(e){var t,r;let a;void 0===d?(d=e,h=0,g=-1):(t=d,r=e,(a=new Uint8Array(t.length+r.length)).set(t),a.set(r,t.length),d=a);let s=d.length,o=0;for(;h<s;){m&&(d[h]===n.NewLine&&(o=++h),m=!1);let e=-1;for(;h<s&&-1===e;++h)switch(d[h]){case n.Colon:-1===g&&(g=h-o);break;case n.CarriageReturn:m=!0,e=h;break;case n.NewLine:e=h}if(-1===e)break;i(d.subarray(o,e),g),o=h,g=-1}o===s?d=void 0:0!==o&&(d=d.subarray(o),h-=o)})),p?.(),A(),c()}catch(e){if(!b?.signal?.aborted)try{let t=h?.(e)??I;clearTimeout(w),w=setTimeout(T,t)}catch(e){A(),y(e)}}}T()})}function d(e){let t=e.headers.get("content-type");if(!t?.startsWith(o))throw Error(`Expected content-type to be ${o}, Actual: ${t}`)}},46443:(e,t,r)=>{"use strict";r.d(t,{K:()=>c});var n=r(47882),i=r(18287),a=r(52103),s=r(83206),o=r(58994),u=r(37472),l=r(21600);function c(e,t){let{facetId:r,getRequest:c}
2=t,d=(0,l.P)(e),f=e.dispatch;return{...d,isValueSelected:u.vc,isValueExcluded:u.q0,deselectAll(){f((0,a.ge)(r)),f((0,n.L)())},sortBy(e){f((0,o.L)({facetId:r,criterion:e})),f((0,n.L)())},isSortedBy(e){return this.state.sortCriterion===e},enable(){f((0,n.bF)(r))},disable(){f((0,n.eV)(r))},get state(){let t=c(),n=(0,s.Ph)(e.state,r),a=t.sortCriteria,o=t.resultsMustMatch,u=n?n.values:[],l=(0,s._t)(e.state),d=(0,i.W)(e.state,r),f=u.some(e=>"idle"!==e.state);return{facetId:r,values:u,sortCriterion:a,resultsMustMatch:o,hasActiveValues:f,isLoading:l,enabled:d,domain:n?.domain}}}}},46597:(e,t,r)=>{"use strict";r.d(t,{$3:()=>u,xS:()=>o}),r(74992);var n=r(19528),i=r(88869),a=r(46314),s=r(35521);let o=r(60508).F.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:e,queryArgs:t})=>{let{analytics:r,...n}=t;return`${e}(${JSON.stringify(n)})`},async onCacheEntryAdded(e,{getState:t,cacheDataLoaded:r,updateCachedData:o,dispatch:u}){await r;let{configuration:l,generatedAnswer:c,insightConfiguration:d}=t(),{organizationId:f,environment:p,accessToken:h}=l,g=((e,t,r,n)=>{if(!e||!t||!r)throw Error("Missing required parameters for answer endpoint");let i=`/rest/organizations/${t}`,a=n?`insight/v1/configs/${n}/answer`:"answer/v1/configs";return`${e}${i}/${a}/${r}/generate`})((0,s.Yk)(l.search.apiBaseUrl,f,p),f,c.answerConfigurationId,d?.insightId);await (0,a.y)(g,{method:"POST",body:JSON.stringify(e),headers:{Authorization:`Bearer ${h}`,Accept:"application/json","Content-Type":"application/json","Accept-Encoding":"*"},fetch,onopen:async e=>{let t=e.headers.get("x-answer-id");t&&o(e=>{e.answerId=t,u((0,n.ot)(t))})},onmessage:e=>{o(t=>{((e,t,r)=>{let a,s=JSON.parse(e.data);"ERROR"===s.finishReason&&s.errorMessage&&(t.error={message:a=s.errorMessage||"Unknown error occurred",code:s.code},t.isStreaming=!1,t.isLoading=!1,console.error(`Generated answer error: ${a} (code: ${s.code})`));let o=s.payload.length?JSON.parse(s.payload):{};switch(s.payloadType){case"genqa.headerMessageType":o.contentFormat&&(((e,t)=>{let{contentFormat:r}=t;e.contentFormat=r,e.isStreaming=!0,e.isLoading=!1})(t,o),r((0,n.ti)(o.contentFormat)));break;case"genqa.messageType":"string"==typeof o.textDelta&&(((e,t)=>{let{textDelta:r}=t;if("string"!=typeof r)return;let n=e.answer;(n?.trim()||r.trim())&&(e.answer=n?.trim()?n.concat(r):r)})(t,o),r((0,n.nc)({textDelta:o.textDelta})));break;case"genqa.citationsType":o.citations&&(t.citations=o.citations,r((0,n.sY)({citations:o.citations})));break;case"genqa.endOfStreamType":{t.generated=o.answerGenerated,t.isStreaming=!1;let e=t.answerId,n=o.answerGenerated??!1,a=n?!t.answer?.trim():void 0;r((0,i.$Z)(n,e,a)),r((0,i.mR)())}}})(e,t,u)})},onerror:e=>{throw e},onclose:()=>{o(e=>{u((0,n.sM)(!e.generated))})}})}})})}),u=e=>o.endpoints.getAnswer.initiate(e)},47242:(e,t,r)=>{var n=r(47816),i=r(20666),a=r(93551),s=r(20680);e.exports=function(e){return a(e)?n(s(e)):i(e)}},47341:(e,t,r)=>{"use strict";r.d(t,{G:()=>i});var n=r(65179);let i={q:new n.hU,enableQuerySyntax:new n.Ci,aq:new n.hU,cq:new n.hU,firstResult:new n.lS({min:0}),numberOfResults:new n.lS({min:0}),sortCriteria:new n.hU,f:new n.Bo,fExcluded:new n.Bo,cf:new n.Bo,nf:new n.Bo,mnf:new n.Bo,df:new n.Bo,debug:new n.Ci,sf:new n.Bo,tab:new n.hU,af:new n.Bo}},47727:(e,t,r)=>{"use strict";r.d(t,{Q:()=>s,Y:()=>a});var n=r(32995),i=r(40687);let a=()=>(0,n.Zl)("analytics/searchbox/submit",e=>e.makeSearchboxSubmit()),s=()=>({actionCause:i.d.searchboxSubmit})},47816:e=>{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},47882:(e,t,r)=>{"use strict";r.d(t,{L:()=>o,bF:()=>u,eV:()=>l});var n=r(65179),i=r(69285),a=r(58604),s=r(64379);let o=(0,i.VP)("facetOptions/update",(e={freezeFacetOrder:!0})=>(0,a.rq)(e,{freezeFacetOrder:new n.Ci({required:!1})})),u=(0,i.VP)("facetOptions/facet/enable",e=>(0,a.rq)(e,s.k)),l=(0,i.VP)("facetOptions/facet/disable",e=>(0,a.rq)(e,s.k))},48167:(e,t,r)=>{"use strict";r.d(t,{v:()=>u});var n=r(69285),i=r(53330),a=r(88830),s=r(60501),o=r(96708);let u=(0,n.vy)((0,o.I)(),e=>e.addCase(a.sK,(e,t)=>{(0,s.g$)(e,t.payload)}).addCase(a.Lv,(e,t)=>{delete e[t.payload.id]}).addCase(a.AS.pending,s.S).addCase(a.AS.fulfilled,(e,t)=>{let r=e[t.meta.arg.id];if(!r||t.meta.requestId!==r.currentRequestId)return;let{q:n}=t.payload;n&&r.partialQueries.push(n.replace(/;/,encodeURIComponent(";"))),r.responseId=t.payload.responseId,r.completions=t.payload.completions,r.isLoading=!1,r.error=null}).addCase(a.AS.rejected,s.Vn).addCase(a.IV,(e,t)=>{(0,s.Wj)(e,t.payload)}).addCase(i.N,(e,t)=>{Object.keys(e).forEach(r=>{let n=e[r];n&&(n.error=t.payload,n.isLoading=!1)})}))},48444:function(e){e.exports=function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,n,i){var a,s=function(e,r,n){void 0===n&&(n={});var i,a,s,o,u=new Date(e);return(void 0===(i=n)&&(i={}),(o=t[s=r+"|"+(a=i.timeZoneName||"short")])||(o=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:a}),t[s]=o),o).formatToParts(u)},o=function(t,r){for(var n=s(t,r),a=[],o=0;o<n.length;o+=1){var u=n[o],l=u.type,c=u.value,d=e[l];d>=0&&(a[d]=parseInt(c,10))}var f=a[3],p=a[0]+"-"+a[1]+"-"+a[2]+" "+(24===f?0:f)+":"+a[4]+":"+a[5]+":000",h=+t;return(i.utc(p).valueOf()-(h-=h%1e3))/6e4},u=n.prototype;u.tz=function(e,t){void 0===e&&(e=a);
2var r,n=this.utcOffset(),s=this.toDate(),o=s.toLocaleString("en-US",{timeZone:e}),u=Math.round((s-new Date(o))/1e3/60),l=-(15*Math.round(s.getTimezoneOffset()/15))-u;if(Number(l)){if(r=i(o,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(l,!0),t){var c=r.utcOffset();r=r.add(n-c,"minute")}}else r=this.utcOffset(0,t);return r.$x.$timezone=e,r},u.offsetName=function(e){var t=this.$x.$timezone||i.tz.guess(),r=s(this.valueOf(),t,{timeZoneName:e}).find(function(e){return"timezonename"===e.type.toLowerCase()});return r&&r.value};var l=u.startOf;u.startOf=function(e,t){if(!this.$x||!this.$x.$timezone)return l.call(this,e,t);var r=i(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return l.call(r,e,t).tz(this.$x.$timezone,!0)},i.tz=function(e,t,r){var n=r&&t,s=r||t||a,u=o(+i(),s);if("string"!=typeof e)return i(e).tz(s);var l=function(e,t,r){var n=e-60*t*1e3,i=o(n,r);if(t===i)return[n,t];var a=o(n-=60*(i-t)*1e3,r);return i===a?[n,i]:[e-60*Math.min(i,a)*1e3,Math.max(i,a)]}(i.utc(e,n).valueOf(),u,s),c=l[0],d=l[1],f=i(c).utcOffset(d);return f.$x.$timezone=s,f},i.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},i.tz.setDefault=function(e){a=e}}}()},48669:(e,t,r)=>{"use strict";r.d(t,{j:()=>o,u:()=>u});var n=r(58014),i=r(12698),a=r(35521),s=r(69643);let o=(e,t)=>{let r=new n.P(`${e.url}${t}`);return r.addParam("access_token",e.accessToken),r.addParam("organizationId",e.organizationId),r.addParam("uniqueId",e.uniqueId),e.authentication&&r.addParam("authentication",e.authentication),void 0!==e.q&&r.addParam("q",e.q),void 0!==e.enableNavigation&&r.addParam("enableNavigation",`${e.enableNavigation}`),void 0!==e.requestedOutputSize&&r.addParam("requestedOutputSize",`${e.requestedOutputSize}`),r.href},u=async(e,t)=>{let r=await a.Ht.call({...(0,s.L7)(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:(0,i.E)(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=((r.headers.get("content-type")||"").split(";").find(e=>-1!==e.indexOf("charset="))||"").split("=")[1]||"UTF-8",o=await r.arrayBuffer(),u=new TextDecoder(n).decode(o);return"string"==typeof u?{success:u}:{error:(0,i.o)({response:r,body:u})}}},48788:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(22478);function i(e){let t=function e(t){return t.childResults?t.childResults.flatMap(t=>[t,...e(t)]):[]}(e),r=[e,...t].filter(e=>e.parentResult).map(e=>e.parentResult);return(0,n.R3)([e,...t,...r],e=>e.uniqueId)}},48986:(e,t,r)=>{"use strict";r.d(t,{useSyncMemoizedStore:()=>i});var n=r(12115);function i(e,t){var r;let i,a=(0,n.useRef)(null),[,s]=(0,n.useReducer)(e=>e+1,0);return(0,n.useEffect)(()=>{let r=!0,n=e(()=>{r&&(a.current=t(),s())});return()=>{r=!1,n()}},[e,t]),r=[e,t],(null===(i=(0,n.useRef)(null)).current?(i.current=r,1):i.current.length===r.length&&!r.some((e,t)=>!Object.is(i.current[t],e))||(i.current=r,0))&&null!==a.current||(a.current=t()),a.current}},49133:()=>{},49714:e=>{e.exports=function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return -1}},49948:e=>{"use strict";function t(e){try{return JSON.stringify(e)}catch(e){return'"[Circular]"'}}e.exports=function(e,r,n){var i=n&&n.stringify||t;if("object"==typeof e&&null!==e){var a=r.length+1;if(1===a)return e;var s=Array(a);s[0]=i(e);for(var o=1;o<a;o++)s[o]=i(r[o]);return s.join(" ")}if("string"!=typeof e)return e;var u=r.length;if(0===u)return e;for(var l="",c=0,d=-1,f=e&&e.length||0,p=0;p<f;){if(37===e.charCodeAt(p)&&p+1<f){switch(d=d>-1?d:0,e.charCodeAt(p+1)){case 100:case 102:if(c>=u||null==r[c])break;d<p&&(l+=e.slice(d,p)),l+=Number(r[c]),d=p+2,p++;break;case 105:if(c>=u||null==r[c])break;d<p&&(l+=e.slice(d,p)),l+=Math.floor(Number(r[c])),d=p+2,p++;break;case 79:case 111:case 106:if(c>=u||void 0===r[c])break;d<p&&(l+=e.slice(d,p));var h=typeof r[c];if("string"===h){l+="'"+r[c]+"'",d=p+2,p++;break}if("function"===h){l+=r[c].name||"<anonymous>",d=p+2,p++;break}l+=i(r[c]),d=p+2,p++;break;case 115:if(c>=u)break;d<p&&(l+=e.slice(d,p)),l+=String(r[c]),d=p+2,p++;break;case 37:d<p&&(l+=e.slice(d,p)),l+="%",d=p+2,p++,c--}++c}++p}return -1===d?e:(d<f&&(l+=e.slice(d)),l)}},50360:(e,t,r)=>{var n=r(73870),i=r(94816),a=r(83380),s=r(10902),o=r(37832),u=r(53034);e.exports=function(e,t,r){var l=-1,c=i,d=e.length,f=!0,p=[],h=p;if(r)f=!1,c=a;else if(d>=200){var g=t?null:o(e);if(g)return u(g);f=!1,c=s,h=new n}else h=t?[]:p;e:for(;++l<d;){var m=e[l],v=t?t(m):m;if(m=r||0!==m?m:0,f&&v==v){for(var y=h.length;y--;)if(h[y]===v)continue e;t&&h.push(v),p.push(m)}else c(h,v,r)||(h!==p&&h.push(v),p.push(m))}return p}},50733:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}},51342:(e,t,r)=>{"use strict";r.d(t,{p:()=>l,z:()=>c});var n=r(65179),i=r(69285),a=r(58604),s=r(64379),o=r(82208);let u={path:new n.v({required:!0,each:a.r3}),displayValue:a.GH,rawValue:a.GH,count:new n.lS({required:!0,min:0})},l=(0,i.VP)("categoryFacet/selectSearchResult",e=>(0,a.rq)(e,{facetId:s.k,value:new n.Bo({values:u})})),c=(0,i.VP)("categoryFacetSearch/register",e=>(0,a.rq)(e,o.$))},51666:(e,t,r)=>{var n=r(74362),i=r(89693),a=r(93440);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?a(t[0][0],t[0][1]):function(r){return r===e||n(r,e,t)}}},52103:(e,t,r)=>{"use strict";r.d(t,{Fy:()=>f,Gt:()=>h,I:()=>v,IF:()=>m,Zm:()=>g,ge:()=>p,pT:()=>c,zV:()=>d});var n=r(65179),i=r(69285),a=r(84649),s=r(58604),o=r(64379),u=r(80245);let l={facetId:o.k,field:new n.hU({required:!0,emptyAllowed:!0}),tabs:new n.Bo({options:{required:!1},values:{included:new n.v({each:new n.hU}),excluded:new n.v({each:new n.hU})}}),activeTab:new n.hU({required:!1}),filterFacetCount:new n.Ci({required:!1}),injectionDepth:new n.lS({required:!1,min:0}),numberOfValues:new n.lS({required:!1,min:1}),sortCriteria:new n.WT({required:!1}),resultsMustMatch:new n.WT({required:!1}),allowedValues:a.h_,customSort:a.Ye},c=(0,i.VP)("facet/register",e=>(0,s.rq)(e,l)),d=(0,i.VP)("facet/toggleSelectValue",e=>(0,s.rq)(e,{facetId:o.k,selection:new n.Bo({values:u.a})})),f=(0,i.VP)("facet/toggleExcludeValue",e=>(0,s.rq)(e,{facetId:o.k,selection:new n.Bo({values:u.a})})),p=(0,i.VP)("facet/deselectAll",e=>(0,s.rq)(e,o.k)),h=(0,i.VP)("facet/updateSortCriterion",e=>(0,s.rq)(e,{facetId:o.k,criterion:new n.WT({required:!0})})),g=(0,i.VP)("facet/updateNumberOfValues",e=>(0,s.rq)(e,{facetId:o.k,numberOfValues:new n.lS({required:!0,min:1})}
2)),m=(0,i.VP)("facet/updateIsFieldExpanded",e=>(0,s.rq)(e,{facetId:o.k,isFieldExpanded:new n.Ci({required:!0})})),v=(0,i.VP)("facet/updateFreezeCurrentValues",e=>(0,s.rq)(e,{facetId:o.k,freezeCurrentValues:new n.Ci({required:!0})}))},52225:(e,t,r)=>{"use strict";function n(){return{}}r.d(t,{r:()=>n})},52376:(e,t,r)=>{"use strict";function n(){return{}}r.d(t,{I:()=>n})},53034:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}},53267:(e,t,r)=>{"use strict";r.d(t,{w:()=>a});var n=r(69096),i=r(74891);function a(e){let t=s(e.start,e),r=s(e.end,e);return{start:t,end:r,endInclusive:e.endInclusive??!1,state:e.state??"idle"}}function s(e,t){let{dateFormat:r}=t;return(0,i.Dj)(e)?((0,i.lV)(e),(0,i.Bk)(e)):"string"==typeof e&&(0,i.o6)(e)?((0,i.lV)(e),e):((0,n.W5)(e,r),(0,n.x3)((0,n._U)(e,r)))}},53307:(e,t,r)=>{"use strict";r.d(t,{Z:()=>j});var n=r(12676),i=r(70766),a=r(68092),s=r(59730),o=r(71950),u=r(47727),l=r(85355),c=r(37978),d=r(577);function f(e={},t={},r=!1){let n=Object.keys(e),i=Object.keys(t),a=n.filter(e=>!i.includes(e));if(a.length){let t=a[0];switch(!0){case e[t].length>1:return(0,o.qq)(t);case r:return(0,o.NV)({facetId:t,facetValue:e[t][0]});default:return(0,o.$e)({facetId:t,facetValue:e[t][0]})}}let s=i.filter(e=>!n.includes(e));if(s.length){let e=s[0];return r?(0,o.mv)({facetId:e,facetValue:t[e][0]}):(0,o.Ub)({facetId:e,facetValue:t[e][0]})}let u=i.find(r=>t[r].filter(t=>e[r].includes(t)));if(!u)return(0,c.w9)();let l=e[u],d=t[u],p=d.filter(e=>!l.includes(e));if(p.length)return r?(0,o.mv)({facetId:u,facetValue:p[0]}):(0,o.Ub)({facetId:u,facetValue:p[0]});let h=l.filter(e=>!d.includes(e));return h.length?r?(0,o.NV)({facetId:u,facetValue:h[0]}):(0,o.$e)({facetId:u,facetValue:h[0]}):(0,c.w9)()}function p(e={},t={}){return f(m(e),m(t))}function h(e={},t={}){return JSON.stringify(e)!==JSON.stringify(t)}function g(e={},t={},r=!1){let n=Object.keys(e),i=Object.keys(t),a=n.filter(e=>!i.includes(e));if(a.length)return e[a[0]].length>1?(0,o.G6)():(0,o.$g)();if(i.filter(e=>!n.includes(e)).length)return r?(0,o.ud)():(0,o.Yv)();let s=i.find(r=>t[r].filter(t=>e[r].includes(t)));if(!s)return(0,c._E)();let u=e[s],l=t[s];return l.filter(e=>!u.includes(e)).length?r?(0,o.ud)():(0,o.Yv)():u.filter(e=>!l.includes(e)).length?(0,o.$g)():(0,c._E)()}function m(e={}){let t={};return Object.keys(e).forEach(r=>{t[r]=e[r].map(e=>`${e.start}..${e.end}`)}),t}var v=r(82184),y=r(65179),b=r(94888),w=r(57656),S=r(8207),E=r(15389),I=r(47341),A=r(2308),k=r(27208),C=r(58604),T=r(21600);let _=new y.Sj({parameters:new y.Bo({options:{required:!0},values:I.G})});function O(e,t){var r;let s={...(r=e.state,{q:(0,a.O)().q,enableQuerySyntax:(0,a.O)().enableQuerySyntax,aq:r.advancedSearchQueries?.defaultFilters.aq??(0,A.y)().defaultFilters.aq,cq:r.advancedSearchQueries?.defaultFilters.cq??(0,A.y)().defaultFilters.cq,firstResult:(0,i.y)().firstResult,numberOfResults:r.pagination?.defaultNumberOfResults??(0,i.y)().defaultNumberOfResults,sortCriteria:(0,k.z)(),f:{},fExcluded:{},cf:{},nf:{},df:{},debug:(0,n.t)(),sf:{},tab:"",af:{},mnf:{}}),...t},o={};if(e.state.dateFacetSet)for(let t of Object.keys(e.state.dateFacetSet))o[t]=[];let u={};if(e.state.numericFacetSet)for(let t of Object.keys(e.state.numericFacetSet))u[t]=[];return{...s,df:{...o,...s.df},nf:{...u,...s.nf}}}function x(e,t){if((0,y.hX)(t.tab)||!e)return t;if(""===t.tab)return{...t,tab:R(e)};if(!Object.values(e).some(e=>e.id===t.tab)){let r=Object.values(e).find(e=>e.isActive);return{...t,tab:r?.id??R(e)}}return t}function R(e){return Object.keys(e)[0]??""}function N(e){var t,r,n;let i=e.state;return{...(0,S.sE)(i.query,e=>e.q,(0,a.O)().q),...(0,S.id)(i.tabSet,e=>{let t=Object.values(e??{}).find(e=>e.isActive);return t?t.id:Object.keys(e??{})[0]},i.tabSet?Object.keys(i.tabSet)[0]:""),...(0,S.US)(i.sortCriteria,e=>e,(0,k.z)()),...function(e){let t=e.facetSet;if(void 0===t)return{};let r=P(e),n={},i={};for(let[e,{request:a}]of Object.entries(t)){if(!r(e))continue;let t=a.currentValues.filter(e=>"selected"===e.state).map(e=>e.value),s=a.currentValues.filter(e=>"excluded"===e.state).map(e=>e.value);t.length&&(n[e]=t),s.length&&(i[e]=s)}return{...Object.keys(n).length?{f:n}:{},...Object.keys(i).length?{fExcluded:i}:{}}}(i),...(t=i,(0,S.Zt)(t.categoryFacetSet,P(t),e=>(0,w.o)(e.currentValues).map(e=>e.value),"cf")),...(r=i,(0,S.Zt)(r.numericFacetSet,P(r),q,"nf")),...(n=i,(0,S.Zt)(n.dateFacetSet,P(n),q,"df")),...function(e){let t=e.automaticFacetSet?.set;if(void 0===t)return{};let r=Object.entries(t).map(([e,{response:t}])=>{let r=t.values.filter(e=>"selected"===e.state).map(e=>e.value);return r.length?{[e]:r}:{}}).reduce((e,t)=>
2({...e,...t}),{});return Object.keys(r).length?{af:r}:{}}(i)}}function P(e){let t=function(e){let t=e.tabSet;if(!t)return;let r=Object.values(t).find(e=>e.isActive);return r?.id}(e);return r=>{let n=e.facetOptions?.facets[r],i=n?.enabled??!0,a=(0,b.E)(n?.tabs,t);return i&&a}}function q(e){return e.currentValues.filter(e=>"selected"===e.state)}function j(e,t){let{dispatch:r}=e,n=function(e,t){let{dispatch:r}=e,n=(0,T.P)(e);(0,C.yz)(e,_,t.initialState,"buildSearchParameterManager");let i=x(e.state.tabSet,t.initialState.parameters);return r((0,E.p)(i)),{...n,synchronize(t){let n=x(e.state.tabSet,O(e,t));r((0,E.p)(n))},get state(){return{parameters:N(e)}}}}(e,t);return{...n,synchronize(t){let i=D(e),a=O(e,i),o=O(e,t);!(0,v.VD)(a,o)&&(n.synchronize(t),r((0,s.kB)({legacy:a.q!==o.q?(0,u.Y)():a.sortCriteria!==o.sortCriteria?(0,l.D)():a.firstResult!==o.firstResult?(0,d.FT)():a.numberOfResults!==o.numberOfResults?(0,d.cb)():h(a.f,o.f)?f(a.f,o.f):h(a.fExcluded,o.fExcluded)?f(a.fExcluded,o.fExcluded,!0):h(a.cf,o.cf)?f(a.cf,o.cf):h(a.af,o.af)?f(a.af,o.af):h(a.nf,o.nf)?p(a.nf,o.nf):h(a.df,o.df)?p(a.df,o.df):(0,c.w9)(),next:a.q!==o.q?(0,u.Q)():a.sortCriteria!==o.sortCriteria?(0,l.F)():h(a.f,o.f)?g(a.f,o.f):h(a.fExcluded,o.fExcluded)?g(a.fExcluded,o.fExcluded,!0):h(a.cf,o.cf)?g(a.cf,o.cf):h(a.af,o.af)?g(a.af,o.af):h(a.nf,o.nf)?g(m(a.nf),m(o.nf)):h(a.df,o.df)?g(m(a.df),m(o.df)):(0,c._E)()})))},get state(){return{parameters:D(e)}}}}function D(e){let t=e.state;return{...N(e),...function(e){if(void 0===e.query)return{};let t=e.query.enableQuerySyntax;return void 0!==t&&t!==(0,a.O)().enableQuerySyntax?{enableQuerySyntax:t}:{}}(t),...function(e){if(void 0===e.advancedSearchQueries)return{};let{aq:t,defaultFilters:r}=e.advancedSearchQueries;return t!==r.aq?{aq:t}:{}}(t),...function(e){if(void 0===e.advancedSearchQueries)return{};let{cq:t,defaultFilters:r}=e.advancedSearchQueries;return t!==r.cq?{cq:t}:{}}(t),...function(e){if(void 0===e.pagination)return{};let t=e.pagination.firstResult;return t!==(0,i.y)().firstResult?{firstResult:t}:{}}(t),...function(e){if(void 0===e.pagination)return{};let{numberOfResults:t,defaultNumberOfResults:r}=e.pagination;return t!==r?{numberOfResults:t}:{}}(t),...function(e){if(void 0===e.debug)return{};let t=e.debug;return t!==(0,n.t)()?{debug:t}:{}}(t),...function(e){if(void 0===e.staticFilterSet)return{};let t=Object.entries(e.staticFilterSet).map(([e,t])=>{let r=t.values.filter(e=>"selected"===e.state).map(e=>e.caption);return r.length?{[e]:r}:{}}).reduce((e,t)=>({...e,...t}),{});return Object.keys(t).length?{sf:t}:{}}(t)}}},53330:(e,t,r)=>{"use strict";r.d(t,{N:()=>n});let n=(0,r(69285).VP)("app/setError")},53356:(e,t,r)=>{"use strict";r.d(t,{HB:()=>h,Rx:()=>f,oY:()=>p});var n=r(69285),i=r(58604),a=r(64379),s=r(35521),o=r(59924);let u=async(e,t,r,n)=>{let i=t.categoryFacetSearchSet[e].options,a=t.categoryFacetSet[e].request,{captions:u,query:c,numberOfValues:d}=i,{field:f,delimitingCharacter:p,basePath:h,filterFacetCount:g}=a,m=l(a),v=m.length?[m]:[],y=`*${c}*`;return{url:t.configuration.search.apiBaseUrl??(0,s.Ns)(t.configuration.organizationId,t.configuration.environment),accessToken:t.configuration.accessToken,organizationId:t.configuration.organizationId,...t.configuration.search.authenticationProviders.length&&{authentication:t.configuration.search.authenticationProviders.join(",")},basePath:h,captions:u,numberOfValues:d,query:y,field:f,delimitingCharacter:p,ignorePaths:v,filterFacetCount:g,type:"hierarchical",...n?{}:{searchContext:(await (0,o.CG)(t,r)).request}}},l=e=>{let t=[],r=e.currentValues[0];for(;r;)t.push(r.value),r=r.children[0];return t},c=async(e,t,r,n)=>{let{captions:i,query:a,numberOfValues:u}=t.facetSearchSet[e].options,{field:l,currentValues:c,filterFacetCount:d}=t.facetSet[e].request,f=c.filter(e=>"idle"!==e.state).map(e=>e.value),p=`*${a}*`;return{url:t.configuration.search.apiBaseUrl??(0,s.Ns)(t.configuration.organizationId,t.configuration.environment),accessToken:t.configuration.accessToken,organizationId:t.configuration.organizationId,...t.configuration.search.authenticationProviders&&{authentication:t.configuration.search.authenticationProviders.join(",")},captions:i,numberOfValues:u,query:p,field:l,ignoreValues:f,filterFacetCount:d,type:"specific",...n?{}:{searchContext:(await (0,o.CG)(t,r)).request}}},d=e=>async(t,{getState:r,extra:{apiClient:n,validatePayload:a,navigatorContext:s}})=>{let o,l=r();return a(t,i.r3),o=g(l,t)?await c(t,l,s,e):await u(t,l,s,e),{facetId:t,response:await n.facetSearch(o)}},f=(0,n.zD)("facetSearch/executeSearch",d(!1)),p=(0,n.zD)("facetSearch/executeSearch",d(!0)),h=(0,n.VP)("facetSearch/clearResults",e=>(0,i.rq)(e,{facetId:a.k})),g=(e,t)=>void 0!==e.facetSearchSet&&void 0!==e.facetSet&&void 0!==e.facetSet[t]},53384:(e,t,r)=>{"use strict";r.d(t,{EO:()=>o,bH:()=>s});
2var n=r(65179),i=r(58604),a=r(32995);new n.Bo({values:{undoneQuery:i.GH},options:{required:!0}});let s=()=>(0,a.Zl)("analytics/trigger/query",(e,t)=>t.triggers?.queryModification.newQuery?e.makeTriggerQuery():null),o=()=>(0,a.Zl)("analytics/trigger/execute",(e,t)=>t.triggers?.executions.length?e.makeTriggerExecute({executions:t.triggers.executions}):null)},53760:(e,t,r)=>{"use strict";function n(e){let t=new Set,r=null,n=e;return{getAccessToken:()=>n,setAccessToken(e){n=e,t.size>0?(t.forEach(t=>{t(e)}),r=null):r=e},registerCallback(e){t.add(e),r&&(e(r),r=null)}}}r.d(t,{F:()=>n})},56294:(e,t,r)=>{"use strict";r.d(t,{O:()=>a,b:()=>i});let n="coveo-headless-internal-state",i=Symbol.for(n),a=e=>new Proxy(e,{ownKeys:e=>Reflect.ownKeys(e).filter(e=>e!==i),get:(t,r,a)=>("symbol"==typeof r&&r.description===n&&r!==i&&e.logger.warn("You might be loading Headless twice. Please check your setup.\nIf you are trying to access the inner state... Don't"),Reflect.get(t,r,a))})},56750:(e,t,r)=>{"use strict";var n=r(65179),i=r(58604);new n.Sj({content:new n.WT({required:!0}),conditions:new n.WT({required:!0}),priority:new n.lS({required:!1,default:0,min:0}),fields:new n.v({required:!1,each:i.r3})})},57458:()=>{},57656:(e,t,r)=>{"use strict";function n(e){let{activeValue:t,ancestryMap:r}=function(e){let t=[...e],r=new Map;for(;t.length>0;){let e=t.shift();if("selected"===e.state)return{activeValue:e,ancestryMap:r};if(r)for(let t of e.children)r.set(t,e);t.unshift(...e.children)}return{}}(e);return t?function(e,t){let r=[];if(!e)return[];let n=e;do r.unshift(n),n=t.get(n);while(n);return r}(t,r):[]}r.d(t,{o:()=>n})},58014:(e,t,r)=>{"use strict";r.d(t,{P:()=>n});class n{_basePath;_params={};constructor(e){this._basePath=e}addParam(e,t){this._params={...this.params,[e]:t}}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(([e,t])=>`${e}=${encodeURIComponent(t)}`).join("&")}`:this.basePath}}},58035:(e,t,r)=>{"use strict";r.d(t,{V:()=>i});var n=r(95886);let i=(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:(0,n.i)(e)}}})},58450:(e,t,r)=>{"use strict";let n;function i(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)0>t.indexOf(n[i])&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r}function a(e,t,r,n){return new(r||(r=Promise))(function(i,a){function s(e){try{u(n.next(e))}catch(e){a(e)}}function o(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,o)}u((n=n.apply(e,t||[])).next())})}function s(){return"u">typeof window}function o(){return"u">typeof navigator}function u(){return"u">typeof document}function l(){try{return"u">typeof localStorage}catch(e){return!1}}function c(){return o()&&navigator.cookieEnabled}r.d(t,{$Y:()=>eB,iR:()=>eG,l0:()=>eZ}),"function"==typeof SuppressedError&&SuppressedError,(_=O||(O={})).search="search",_.click="click",_.custom="custom",_.view="view",_.collect="collect";let d=[O.click,O.custom,O.search,O.view],f=(e,t)=>-1!==d.indexOf(e)?Object.assign({language:u()?document.documentElement.lang:"unknown",userAgent:o()?navigator.userAgent:"unknown"},t):t;class p{static set(e,t,r){var n,i,a;r&&(n=new Date).setTime(n.getTime()+r),-1===(a=window.location.hostname).indexOf(".")?h(e,t,n):h(e,t,n,(i=a.split("."))[i.length-2]+"."+i[i.length-1])}static get(e){for(var t=e+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){var i=r[n];if(0===(i=i.replace(/^\s+/,"")).lastIndexOf(t,0))return i.substring(t.length,i.length)}return null}static erase(e){p.set(e,"",-1)}}function h(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}class g{getItem(e){return p.get(`${g.prefix}${e}`)}removeItem(e){p.erase(`${g.prefix}${e}`)}setItem(e,t,r){p.set(`${g.prefix}${e}`,t,r)}}g.prefix="coveo_";class m{constructor(){this.cookieStorage=new g}getItem(e){return localStorage.getItem(e)||this.cookieStorage.getItem(e)}removeItem(e){this.cookieStorage.removeItem(e),localStorage.removeItem(e)}setItem(e,t){localStorage.setItem(e,t),this.cookieStorage.setItem(e,t,31556926e3)}}class v{getItem(e){return null}removeItem(e){}setItem(e,t){}}let y="__coveo.analytics.history";class b{constructor(e){this.store=e||(l()?localStorage:c()?new g:!function(){try{return"u">typeof sessionStorage}catch(e){return!1}}()?new v:sessionStorage)}addElement(e){e.internalTime=new Date().getTime(),e=this.cropQueryElement(this.stripEmptyQuery(e));let t=this.getHistoryWithInternalTime();null!=t?this.isValidEntry(e)&&this.setHistory([e].concat(t)):this.setHistory([e])}addElementAsync(e){return a(this,void 0,void 0,function*(){e.internalTime=new Date().getTime(),e=this.cropQueryElement(this.stripEmptyQuery(e));let t=yield this.getHistoryWithInternalTimeAsync();null!=t?this.isValidEntry(e)&&this.setHistory([e].concat(t)):this.setHistory([e])})}getHistory(){let e=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(e))}getHistoryAsync(){return a(this,void 0,void 0,function*(){let e=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(e))})}getHistoryWithInternalTime(){try{let e=this.store.getItem(y);if(e&&"string"==typeof e)return JSON.parse(e);return[]}catch(e){return[]}}getHistoryWithInternalTimeAsync(){return a(this,void 0,void 0,function*(){try{let e=yield this.store.getItem(y);if(e)return JSON.parse(e);return[]}catch(e){return[]}})}setHistory(e){try{this.store.setItem(y,JSON.stringify(e.slice(0,20)))}catch(e){}}clear(){try{this.store.removeItem(y)}catch(e){}}getMostRecentElement(){let e=this.getHistoryWithInternalTime();return Array.isArray(e)?e.sort((e,t)=>
2(t.internalTime||0)-(e.internalTime||0))[0]:null}cropQueryElement(e){return e.name&&e.value&&"query"===e.name.toLowerCase()&&(e.value=e.value.slice(0,75)),e}isValidEntry(e){let t=this.getMostRecentElement();return!t||t.value!=e.value||(e.internalTime||0)-(t.internalTime||0)>6e4}stripInternalTime(e){return Array.isArray(e)?e.map(e=>{let{name:t,time:r,value:n}=e;return{name:t,time:r,value:n}}):[]}stripEmptyQuery(e){let{name:t,time:r,value:n}=e;return t&&"string"==typeof n&&"query"===t.toLowerCase()&&""===n.trim()?{name:t,time:r}:e}stripEmptyQueries(e){return e.map(e=>this.stripEmptyQuery(e))}}let w=(e,t)=>a(void 0,void 0,void 0,function*(){return e===O.view?(yield S(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),S=e=>a(void 0,void 0,void 0,function*(){let t=new b,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),E=new Uint8Array(16);var I,A,k,C,T,_,O,x,R,N,P,q,j=/^(?:[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 D(e){return"string"==typeof e&&j.test(e)}let M=[];for(let e=0;e<256;++e)M.push((e+256).toString(16).slice(1));function U(e,t=0){return M[e[t+0]]+M[e[t+1]]+M[e[t+2]]+M[e[t+3]]+"-"+M[e[t+4]]+M[e[t+5]]+"-"+M[e[t+6]]+M[e[t+7]]+"-"+M[e[t+8]]+M[e[t+9]]+"-"+M[e[t+10]]+M[e[t+11]]+M[e[t+12]]+M[e[t+13]]+M[e[t+14]]+M[e[t+15]]}var F="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);function L(e,t,r){if(F&&!t&&!e)return F();let i=(e=e||{}).random||(e.rng||function(){if(!n&&!(n="u">typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(E)})();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=i[e];return t}return U(i)}function V(e,t){return e<<t|e>>>32-t}let $=function(e){function t(t,r,n,i){var a;if("string"==typeof t&&(t=function(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(t)),"string"==typeof r&&(r=function(e){let t;if(!D(e))throw TypeError("Invalid UUID");let 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]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/0x10000000000&255,r[11]=t/0x100000000&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}(r)),(null==(a=r)?void 0:a.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let s=new Uint8Array(16+t.length);if(s.set(r),s.set(t,r.length),(s=e(s))[6]=15&s[6]|80,s[8]=63&s[8]|128,n){i=i||0;for(let e=0;e<16;++e)n[i+e]=s[e];return n}return U(s)}try{t.name="v5"}catch(e){}return t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",t}(function(e){let t=[0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xca62c1d6],r=[0x67452301,0xefcdab89,0x98badcfe,0x10325476,0xc3d2e1f0];if("string"==typeof e){let t=unescape(encodeURIComponent(e));e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=Math.ceil((e.length/4+2)/16),i=Array(n);for(let t=0;t<n;++t){let r=new Uint32Array(16);for(let n=0;n<16;++n)r[n]=e[64*t+4*n]<<24|e[64*t+4*n+1]<<16|e[64*t+4*n+2]<<8|e[64*t+4*n+3];i[t]=r}i[n-1][14]=(e.length-1)*8/0x100000000,i[n-1][14]=Math.floor(i[n-1][14]),i[n-1][15]=(e.length-1)*8|0;for(let e=0;e<n;++e){let n=new Uint32Array(80);for(let t=0;t<16;++t)n[t]=i[e][t];for(let e=16;e<80;++e)n[e]=V(n[e-3]^n[e-8]^n[e-14]^n[e-16],1);let a=r[0],s=r[1],o=r[2],u=r[3],l=r[4];for(let e=0;e<80;++e){let r=Math.floor(e/20),i=V(a,5)+function(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}(r,s,o,u)+l+t[r]+n[e]>>>0;l=u,u=o,o=V(s,30)>>>0,s=a,a=i}r[0]=r[0]+a>>>0,r[1]=r[1]+s>>>0,r[2]=r[2]+o>>>0,r[3]=r[3]+u>>>0,r[4]=r[4]+l>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]}),G="2.30.56",z=e=>`${e.protocol}//${e.hostname}${0===e.pathname.indexOf("/")?e.pathname:`/${e.pathname}`}${e.search}`,Q={pageview:"pageview",event:"event"};class H{constructor({client:e,uuidGenerator:t=L}){this.client=e,this.uuidGenerator=t}}class Y extends H{constructor({client:e,uuidGenerator:t=L}){super({client:e,uuidGenerator:t}),this.actionData={},this.pageViewId=t(),this.nextPageViewId=this.pageViewId,this.currentLocation=z(window.location),this.lastReferrer=u()?document.referrer:"",this.addHooks()}getApi(e){return"setAction"===e?this.setAction:null}setAction(e,t){this.action=e,this.actionData=t}clearData(){this.clearPluginData(),this.action=void 0,this.actionData={}}getLocationInformation(e,t){return Object.assign({hitType:e},this.getNextValues(e,t))}updateLocationInformation(e,t){this.updateLocationForNextPageView(e,t)}getDefaultContextInformation(e){let t={title:u()?document.title:"",encoding:u()?document.characterSet:"UTF-8"},r={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},n={language:navigator.language,userAgent:navigator.userAgent};return Object.assign(Object.assign(Object.assign(Object.assign({},{time:Date.now(),eventId:this.uuidGenerator()}),r),n),t)}updateLocationForNextPageView(e,t){let{pageViewId:r,referrer:n,location:i}=this.getNextValues(e,t);this.lastReferrer=n,this.pageViewId=r,this.currentLocation=i,e===Q.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(e,t){return{pageViewId:e===Q.pageview?this.nextPageViewId:this.pageViewId,referrer:e===Q.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:e===Q.pageview?this.getCurrentLocationFromPayload(t):this.currentLocation}}getCurrentLocationFromPayload(e){return e.page?`${this.currentLocation.split("/").slice(0,3).join("/")}${e.page.replace(/^\/?(.*)$/,"/$1")}`:z(window.location)}}class B{constructor(e,t){if(!D(e))throw Error("Not a valid uuid");this.clientId=e,this.creationDate=Math.floor(t/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let e=Math.floor(Date.now()/1e3)-this.creationDate;return e<0||e>B.expirationTime}validate(e,t){return!this.expired&&this.matchReferrer(e,t)}matchReferrer(e,t){try{let r=new URL(e);return t.some(e=>RegExp(e.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(r.host))}catch(e){return!1}}static fromString(e){let t=e.split(".");if(2!==t.length)return null;let[r,n]=t;if(32!==r.length||isNaN(parseInt(n)))return null;let i=r.substring(0,8)+"-"+r.substring(8,12)+"-"+r.substring(12,16)+"-"+r.substring(16,20)+"-"+r.substring(20,32);return D(i)?new B(i,1e3*Number.parseInt(n)):null}}B.cvo_cid="cvo_cid",B.expirationTime=120;class K extends H{constructor({client:e,uuidGenerator:t=L}){super({client:e,uuidGenerator:t})}getApi(e){switch(e){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(e){return a(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw Error("Could not retrieve current clientId");try{let t=new URL(e),r=yield this.client.getCurrentVisitorId();return t.searchParams.set(B.cvo_cid,new B(r,Date.now()).toString()),t.toString()}catch(e){throw Error("Invalid URL provided")}})}acceptFrom(e){this.client.setAcceptedLinkReferrers(e)}}K.Id="link";let W=Object.keys;function X(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}let Z={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"},J=[...W(Z).map(e=>Z[e])].join("|"),ee=RegExp(`^(${J}$)`),et=[e=>ee.test(e)],er={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},en={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},ei={action:"pa",list:"pal",listSource:"pls"},ea={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},es={id:"quoteId",affiliation:"quoteAffiliation"},eo={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},eu={add:ei,bookmark_add:ei,bookmark_remove:ei,click:ei,checkout:ei,checkout_option:ei,detail:ei,impression:ei,remove:ei,refund:Object.assign(Object.assign({},ei),ea),purchase:Object.assign(Object.assign({},ei),ea),quickview:ei,quote:Object.assign(Object.assign({},ei),es),review:Object.assign(Object.assign({},ei),eo)},el=W(er).map(e=>er[e]),ec=W(en).map(e=>en[e]),ed=W(ei).map(e=>ei[e]),ef=W(ea).map(e=>ea[e]),ep=W(eo).map(e=>eo[e]),eh=W(es).map(e=>es[e]),eg=[...el,"custom"].join("|"),em=[...ec,"custom"].join("|"),ev="(pr[0-9]+)",ey="(il[0-9]+pi[0-9]+)",eb=RegExp(`^${ev}(${eg})$`),ew=RegExp(`^(${ey}(${em}))|(il[0-9]+nm)$`),eS=RegExp(`^(${ed.join("|")})$`),eE=RegExp(`^(${ef.join("|")})$`),eI=RegExp(`^${ev}custom$`),eA=RegExp(`^${ey}custom$`),ek=RegExp(`^(${["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit",...ep,...eh].join("|")})$`),eC=[e=>ew.test(e),e=>eb.test(e),e=>eS.test(e),e=>eE.test(e),e=>
2ek.test(e)],eT=[eI,eA],e_=Object.assign(Object.assign({},Object.assign(Object.assign(Object.assign(Object.assign({},{anonymizeIp:"aip"}),{eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"}),{hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"}),["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"].reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{}))),{svcAction:"svc_action",svcActionData:"svc_action_data"}),eO=W(e_).map(e=>e_[e]),ex=e=>-1!==eO.indexOf(e),eR=e=>"custom"===e;class eN{constructor(e){this.opts=e}sendEvent(e,t){return a(this,void 0,void 0,function*(){if(!this.isAvailable())throw Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:r,preprocessRequest:n}=this.opts,i=yield this.getQueryParamsForEventType(e),{url:a,payload:s}=yield this.preProcessRequestAsPotentialJSONString(`${r}/analytics/${e}?${i}`,t,n),o=new Blob([this.encodeForEventType(e,s)],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(a,o)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(e,t,r){return a(this,void 0,void 0,function*(){let n=e,i=t;if(r){let{url:a,body:s}=yield r({url:e,body:JSON.stringify(t)},"analyticsBeacon");n=a||e;try{i=JSON.parse(s)}catch(e){console.error("Unable to process the request body as a JSON string",e)}}return{payload:i,url:n}})}encodeForEventType(e,t){return this.isEventTypeLegacy(e)?this.encodeEventToJson(e,t):this.encodeEventToJson(e,t,this.opts.token)}getQueryParamsForEventType(e){return a(this,void 0,void 0,function*(){let{token:t,visitorIdProvider:r}=this.opts,n=yield r.getCurrentVisitorId();return[t&&this.isEventTypeLegacy(e)?`access_token=${t}`:"",n?`visitorId=${n}`:"","discardVisitInfo=true"].filter(e=>!!e).join("&")})}isEventTypeLegacy(e){return -1!==[O.click,O.custom,O.search,O.view].indexOf(e)}encodeEventToJson(e,t,r){let n=`${e}Event=${encodeURIComponent(JSON.stringify(t))}`;return r&&(n=`access_token=${encodeURIComponent(r)}&${n}`),n}}class eP{sendEvent(e,t){return a(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return a(this,void 0,void 0,function*(){return Promise.resolve()})}}let eq=globalThis.fetch;class ej{constructor(e){this.opts=e}sendEvent(e,t){return a(this,void 0,void 0,function*(){let r,{baseUrl:n,visitorIdProvider:a,preprocessRequest:s}=this.opts,o=this.shouldAppendVisitorId(e)?yield this.getVisitorIdParam():"",u={url:`${n}/analytics/${e}${o}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(t)},l=Object.assign(Object.assign({},u),s?yield s(u,"analyticsFetch"):{}),{url:c}=l,d=i(l,["url"]);try{r=yield eq(c,d)}catch(e){console.error("An error has occured when sending the event.",e);return}if(r.ok){let e=yield r.json();return e.visitorId&&a.setCurrentVisitorId(e.visitorId),e}try{r.json()}catch(e){}throw console.error(`An error has occured when sending the "${e}" event.`,r,t),Error(`An error has occurred when sending the "${e}" event. Check the console logs for more details.`)})}deleteHttpCookieVisitorId(){return a(this,void 0,void 0,function*(){let{baseUrl:e}=this.opts,t=`${e}/analytics/visit`;yield eq(t,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(e){return -1!==[O.click,O.custom,O.search,O.view].indexOf(e)}getVisitorIdParam(){return a(this,void 0,void 0,function*(){let{visitorIdProvider:e}=this.opts,t=yield e.getCurrentVisitorId();return t?`?visitor=${t}`:""})}getHeaders(){let{token:e}=this.opts;return Object.assign(Object.assign({},e?{Authorization:`Bearer ${e}`}:{}),{"Content-Type":"application/json"})}}class eD{constructor(e,t){l()&&c()?this.storage=new m:l()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new v),this.client=new ej(e),this.beaconClient=new eN(e),window.addEventListener("beforeunload",()=>{for(let{eventType:e,payload:r}of t())this.beaconClient.sendEvent(e,r)})}
2getClientDependingOnEventType(e){return"click"===e&&this.beaconClient.isAvailable()?this.beaconClient:this.client}}class eM{constructor(e,t){this.storage=t||new v,this.client=new ej(e)}getClientDependingOnEventType(e){return this.client}}class eU{constructor(){this.storage=new v,this.client=new eP}getClientDependingOnEventType(e){return this.client}}let eF=`
3        We've detected you're using React Native but have not provided the corresponding runtime, 
4        for an optimal experience please use the "coveo.analytics/react-native" subpackage.
5        Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native
6    `,eL=["1",1,"yes",!0];function eV(){let e=[];return s()&&e.push(window.doNotTrack),o()&&e.push(navigator.doNotTrack,navigator.msDoNotTrack,navigator.globalPrivacyControl),e.some(e=>-1!==eL.indexOf(e))}let e$="https://analytics.cloud.coveo.com/rest/ua";class eG{get defaultOptions(){return{endpoint:e$,isCustomEndpoint:!1,token:"",version:"v15",beforeSendHooks:[],afterSendHooks:[]}}get version(){return G}constructor(e){if(this.acceptedLinkReferrers=[],!e)throw Error("You have to pass options to this constructor");this.options=Object.assign(Object.assign({},this.defaultOptions),e),this.visitorId="",this.bufferedRequests=[],this.beforeSendHooks=[w,f].concat(this.options.beforeSendHooks),this.afterSendHooks=this.options.afterSendHooks,this.eventTypeMapping={};const t={baseUrl:this.baseUrl,token:this.options.token,visitorIdProvider:this,preprocessRequest:this.options.preprocessRequest};eV()?this.runtime=new eU:this.runtime=this.options.runtimeEnvironment||this.initRuntime(t),this.addEventTypeMapping(O.view,{newEventType:O.view,addClientIdParameter:!0}),this.addEventTypeMapping(O.click,{newEventType:O.click,addClientIdParameter:!0}),this.addEventTypeMapping(O.custom,{newEventType:O.custom,addClientIdParameter:!0}),this.addEventTypeMapping(O.search,{newEventType:O.search,addClientIdParameter:!0})}initRuntime(e){return s()&&u()?new eD(e,()=>{let e=[...this.bufferedRequests];return this.bufferedRequests=[],e}):("u">typeof navigator&&"ReactNative"==navigator.product&&console.warn(eF),new eM(e))}get storage(){return this.runtime.storage}determineVisitorId(){return a(this,void 0,void 0,function*(){try{return s()&&this.extractClientIdFromLink(window.location.href)||(yield this.storage.getItem("visitorId"))||L()}catch(e){return console.log("Could not get visitor ID from the current runtime environment storage. Using a random ID instead.",e),L()}})}getCurrentVisitorId(){return a(this,void 0,void 0,function*(){if(!this.visitorId){let e=yield this.determineVisitorId();yield this.setCurrentVisitorId(e)}return this.visitorId})}setCurrentVisitorId(e){return a(this,void 0,void 0,function*(){this.visitorId=e,yield this.storage.setItem("visitorId",e)})}setClientId(e,t){return a(this,void 0,void 0,function*(){if(D(e))this.setCurrentVisitorId(e.toLowerCase());else{if(!t)throw Error("Cannot generate uuid client id without a specific namespace string.");this.setCurrentVisitorId($(e,$(t,"38824e1f-37f5-42d3-8372-a4b8fa9df946")))}})}getParameters(e,...t){return a(this,void 0,void 0,function*(){return yield this.resolveParameters(e,...t)})}getPayload(e,...t){return a(this,void 0,void 0,function*(){let r=yield this.resolveParameters(e,...t);return yield this.resolvePayloadForParameters(e,r)})}get currentVisitorId(){return"string"!=typeof(this.visitorId||this.storage.getItem("visitorId"))&&this.setCurrentVisitorId(L()),this.visitorId}set currentVisitorId(e){this.visitorId=e,this.storage.setItem("visitorId",e)}extractClientIdFromLink(e){if(eV())return null;try{let t=new URL(e).searchParams.get(B.cvo_cid);if(null==t)return null;let r=B.fromString(t);if(!r||!u()||!r.validate(document.referrer,this.acceptedLinkReferrers))return null;return r.clientId}catch(e){}return null}resolveParameters(e,...t){return a(this,void 0,void 0,function*(){let{variableLengthArgumentsNames:r=[],addVisitorIdParameter:n=!1,usesMeasurementProtocol:i=!1,addClientIdParameter:s=!1}=this.eventTypeMapping[e]||{},o=e=>r.length>0?this.parseVariableArgumentsPayload(r,e):e[0],u=e=>a(this,void 0,void 0,function*(){return Object.assign(Object.assign({},e),{visitorId:n?yield this.getCurrentVisitorId():""})}),l=e=>a(this,void 0,void 0,function*(){return s?Object.assign(Object.assign({},e),{clientId:yield this.getCurrentVisitorId()}):e}),c=e=>i?this.ensureAnonymousUserWhenUsingApiKey(e):e,d=t=>this.beforeSendHooks.reduce((t,r)=>a(this,void 0,void 0,function*(){let n=yield t;return yield r(e,n)}),t);return yield[o,u,l,c,d].reduce((e,t)=>
6a(this,void 0,void 0,function*(){let r=yield e;return yield t(r)}),Promise.resolve(t))})}resolvePayloadForParameters(e,t){return a(this,void 0,void 0,function*(){let{usesMeasurementProtocol:r=!1}=this.eventTypeMapping[e]||{},n=e=>this.setTrackingIdIfTrackingIdNotPresent(e),i=t=>this.removeEmptyPayloadValues(t,e),s=t=>this.validateParams(t,e),o=e=>r?this.removeUnknownParameters(e):e,u=e=>r?this.processCustomParameters(e):this.mapCustomParametersToCustomData(e);return yield[n,i,s,e=>{let t;return r?(t=!!e.action&&eu[e.action]||{},W(e).reduce((r,n)=>{let i=t[n]||e_[n]||n;return Object.assign(Object.assign({},r),{[i]:e[n]})},{})):e},o,u].reduce((e,t)=>a(this,void 0,void 0,function*(){let r=yield e;return yield t(r)}),Promise.resolve(t))})}makeEvent(e,...t){return a(this,void 0,void 0,function*(){let{newEventType:r=e}=this.eventTypeMapping[e]||{},n=yield this.resolveParameters(e,...t),i=yield this.resolvePayloadForParameters(e,n);return{eventType:r,payload:i,log:t=>a(this,void 0,void 0,function*(){return this.bufferedRequests.push({eventType:r,payload:Object.assign(Object.assign({},i),t)}),yield Promise.all(this.afterSendHooks.map(r=>r(e,Object.assign(Object.assign({},n),t)))),yield this.deferExecution(),yield this.sendFromBuffer()})}})}sendEvent(e,...t){return a(this,void 0,void 0,function*(){return(yield this.makeEvent(e,...t)).log({})})}deferExecution(){return new Promise(e=>setTimeout(e,0))}sendFromBuffer(){return a(this,void 0,void 0,function*(){let e=this.bufferedRequests.shift();if(e){let{eventType:t,payload:r}=e;return this.runtime.getClientDependingOnEventType(t).sendEvent(t,r)}})}clear(){this.storage.removeItem("visitorId"),new b().clear()}deleteHttpOnlyVisitorId(){this.runtime.client.deleteHttpCookieVisitorId()}makeSearchEvent(e){return a(this,void 0,void 0,function*(){return this.makeEvent(O.search,e)})}sendSearchEvent(e){return a(this,void 0,void 0,function*(){var{searchQueryUid:t}=e,r=i(e,["searchQueryUid"]);return(yield this.makeSearchEvent(r)).log({searchQueryUid:t})})}makeClickEvent(e){return a(this,void 0,void 0,function*(){return this.makeEvent(O.click,e)})}sendClickEvent(e){return a(this,void 0,void 0,function*(){var{searchQueryUid:t}=e,r=i(e,["searchQueryUid"]);return(yield this.makeClickEvent(r)).log({searchQueryUid:t})})}makeCustomEvent(e){return a(this,void 0,void 0,function*(){return this.makeEvent(O.custom,e)})}sendCustomEvent(e){return a(this,void 0,void 0,function*(){var{lastSearchQueryUid:t}=e,r=i(e,["lastSearchQueryUid"]);return(yield this.makeCustomEvent(r)).log({lastSearchQueryUid:t})})}makeViewEvent(e){return a(this,void 0,void 0,function*(){return this.makeEvent(O.view,e)})}sendViewEvent(e){return a(this,void 0,void 0,function*(){return(yield this.makeViewEvent(e)).log({})})}getVisit(){return a(this,void 0,void 0,function*(){let e=yield fetch(`${this.baseUrl}/analytics/visit`),t=yield e.json();return this.visitorId=t.visitorId,t})}getHealth(){return a(this,void 0,void 0,function*(){let e=yield fetch(`${this.baseUrl}/analytics/monitoring/health`);return yield e.json()})}registerBeforeSendEventHook(e){this.beforeSendHooks.push(e)}registerAfterSendEventHook(e){this.afterSendHooks.push(e)}addEventTypeMapping(e,t){this.eventTypeMapping[e]=t}setAcceptedLinkReferrers(e){if(Array.isArray(e)&&e.every(e=>"string"==typeof e))this.acceptedLinkReferrers=e;else throw Error("Parameter should be an array of domain strings")}parseVariableArgumentsPayload(e,t){let r={};for(let n=0,i=t.length;n<i;n++){let i=t[n];if("string"==typeof i)r[e[n]]=i;else if("object"==typeof i)return Object.assign(Object.assign({},r),i)}return r}isKeyAllowedEmpty(e,t){return -1!==(({[O.search]:["queryText"]})[e]||[]).indexOf(t)}removeEmptyPayloadValues(e,t){return Object.keys(e).filter(r=>{let n;return this.isKeyAllowedEmpty(t,r)||null!=(n=e[r])&&""!==n}).reduce((t,r)=>Object.assign(Object.assign({},t),{[r]:e[r]}),{})}removeUnknownParameters(e){return Object.keys(e).filter(e=>{if([...eC,...et,ex,eR].some(t=>t(e)))return!0;console.log(e,"is not processed by coveoua")}).reduce((t,r)=>Object.assign(Object.assign({},t),{[r]:e[r]}),{})}processCustomParameters(e){let{custom:t}=e,r=i(e,["custom"]),n={};t&&X(t)&&(n=this.lowercaseKeys(t));let a=W(r).reduce((e,t)=>
6{var n;let i,a,s,o=(n=t,[...eT].every(e=>{var t;return!(i=null==(t=e.exec(n))?void 0:t[1])}),i);return o?Object.assign(Object.assign({},e),(a=o,W(s=r[t]).reduce((e,t)=>Object.assign(Object.assign({},e),{[`${a}${t}`]:s[t]}),{}))):Object.assign(Object.assign({},e),{[t]:r[t]})},{});return Object.assign(Object.assign({},n),a)}mapCustomParametersToCustomData(e){let{custom:t}=e,r=i(e,["custom"]);if(!(t&&X(t)))return e;{let n=this.lowercaseKeys(t);return Object.assign(Object.assign({},r),{customData:Object.assign(Object.assign({},n),e.customData)})}}lowercaseKeys(e){let t=Object.keys(e),r={};return t.forEach(t=>{r[t.toLowerCase()]=e[t]}),r}validateParams(e,t){let{anonymizeIp:r}=e,n=i(e,["anonymizeIp"]);return void 0!==r&&-1==["0","false","undefined","null","{}","[]",""].indexOf(`${r}`.toLowerCase())&&(n.anonymizeIp=1),(t==O.view||t==O.click||t==O.search||t==O.custom)&&(n.originLevel3=this.limit(n.originLevel3,1024)),t==O.view&&(n.location=this.limit(n.location,1024)),("pageview"==t||"event"==t)&&(n.referrer=this.limit(n.referrer,2048),n.location=this.limit(n.location,2048),n.page=this.limit(n.page,2048)),n}ensureAnonymousUserWhenUsingApiKey(e){let t,{userId:r}=e,n=i(e,["userId"]);return(null==(t=this.options.token)?void 0:t.startsWith("xx"))&&!r?(n.userId="anonymous",n):e}setTrackingIdIfTrackingIdNotPresent(e){let{trackingId:t}=e,r=i(e,["trackingId"]);return t?e:(r.hasOwnProperty("custom")&&X(r.custom)&&(r.custom.hasOwnProperty("context_website")||r.custom.hasOwnProperty("siteName"))&&(r.trackingId=r.custom.context_website||r.custom.siteName),r.hasOwnProperty("customData")&&X(r.customData)&&(r.customData.hasOwnProperty("context_website")||r.customData.hasOwnProperty("siteName"))&&(r.trackingId=r.customData.context_website||r.customData.siteName),r)}limit(e,t){return"string"==typeof e?function(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((128&n)!=128)break;if(r-=3,(192&n)!=128){t-r>=3*((248&n)==240?4:(240&n)==224?3:(224&n)==192?2:1)&&(r=t);break}}return e.substring(0,r)}(e,t):e}get baseUrl(){return function(e=e$,t="v15",r=!1){if(e=e.replace(/\/$/,""),r)return`${e}/${t}`;let n=e.endsWith("/rest")||e.endsWith("/rest/ua");return`${e}${n?"":"/rest"}/${t}`}(this.options.endpoint,this.options.version,this.options.isCustomEndpoint)}}(I=x||(x={})).contextChanged="contextChanged",I.expandToFullUI="expandToFullUI",I.openUserActions="openUserActions",I.showPrecedingSessions="showPrecedingSessions",I.showFollowingSessions="showFollowingSessions",I.clickViewedDocument="clickViewedDocument",I.clickPageView="clickPageView",I.createArticle="createArticle",(A=R||(R={})).interfaceLoad="interfaceLoad",A.interfaceChange="interfaceChange",A.didyoumeanAutomatic="didyoumeanAutomatic",A.didyoumeanClick="didyoumeanClick",A.resultsSort="resultsSort",A.searchboxSubmit="searchboxSubmit",A.searchboxClear="searchboxClear",A.searchboxAsYouType="searchboxAsYouType",A.breadcrumbFacet="breadcrumbFacet",A.breadcrumbResetAll="breadcrumbResetAll",A.documentQuickview="documentQuickview",A.documentOpen="documentOpen",A.omniboxAnalytics="omniboxAnalytics",A.omniboxFromLink="omniboxFromLink",A.searchFromLink="searchFromLink",A.triggerNotify="notify",A.triggerExecute="execute",A.triggerQuery="query",A.undoTriggerQuery="undoQuery",A.triggerRedirect="redirect",A.pagerResize="pagerResize",A.pagerNumber="pagerNumber",A.pagerNext="pagerNext",A.pagerPrevious="pagerPrevious",A.pagerScrolling="pagerScrolling",A.staticFilterClearAll="staticFilterClearAll",A.staticFilterSelect="staticFilterSelect",A.staticFilterDeselect="staticFilterDeselect",A.facetClearAll="facetClearAll",A.facetSearch="facetSearch",A.facetSelect="facetSelect",A.facetSelectAll="facetSelectAll",A.facetDeselect="facetDeselect",A.facetExclude="facetExclude",A.facetUnexclude="facetUnexclude",A.facetUpdateSort="facetUpdateSort",A.facetShowMore="showMoreFacetResults",A.facetShowLess="showLessFacetResults",A.queryError="query",A.queryErrorBack="errorBack",A.queryErrorClear="errorClearQuery",A.queryErrorRetry="errorRetry",A.re
6commendation="recommendation",A.recommendationInterfaceLoad="recommendationInterfaceLoad",A.recommendationOpen="recommendationOpen",A.likeSmartSnippet="likeSmartSnippet",A.dislikeSmartSnippet="dislikeSmartSnippet",A.expandSmartSnippet="expandSmartSnippet",A.collapseSmartSnippet="collapseSmartSnippet",A.openSmartSnippetFeedbackModal="openSmartSnippetFeedbackModal",A.closeSmartSnippetFeedbackModal="closeSmartSnippetFeedbackModal",A.sendSmartSnippetReason="sendSmartSnippetReason",A.expandSmartSnippetSuggestion="expandSmartSnippetSuggestion",A.collapseSmartSnippetSuggestion="collapseSmartSnippetSuggestion",A.showMoreSmartSnippetSuggestion="showMoreSmartSnippetSuggestion",A.showLessSmartSnippetSuggestion="showLessSmartSnippetSuggestion",A.openSmartSnippetSource="openSmartSnippetSource",A.openSmartSnippetSuggestionSource="openSmartSnippetSuggestionSource",A.openSmartSnippetInlineLink="openSmartSnippetInlineLink",A.openSmartSnippetSuggestionInlineLink="openSmartSnippetSuggestionInlineLink",A.recentQueryClick="recentQueriesClick",A.clearRecentQueries="clearRecentQueries",A.recentResultClick="recentResultClick",A.clearRecentResults="clearRecentResults",A.noResultsBack="noResultsBack",A.showMoreFoldedResults="showMoreFoldedResults",A.showLessFoldedResults="showLessFoldedResults",A.copyToClipboard="copyToClipboard",A.caseSendEmail="Case.SendEmail",A.feedItemTextPost="FeedItem.TextPost",A.caseAttach="caseAttach",A.caseDetach="caseDetach",A.retryGeneratedAnswer="retryGeneratedAnswer",A.likeGeneratedAnswer="likeGeneratedAnswer",A.dislikeGeneratedAnswer="dislikeGeneratedAnswer",A.openGeneratedAnswerSource="openGeneratedAnswerSource",A.generatedAnswerOpenInlineLink="generatedAnswerOpenInlineLink",A.generatedAnswerStreamEnd="generatedAnswerStreamEnd",A.generatedAnswerSourceHover="generatedAnswerSourceHover",A.generatedAnswerCopyToClipboard="generatedAnswerCopyToClipboard",A.generatedAnswerHideAnswers="generatedAnswerHideAnswers",A.generatedAnswerShowAnswers="generatedAnswerShowAnswers",A.generatedAnswerExpand="generatedAnswerExpand",A.generatedAnswerCollapse="generatedAnswerCollapse",A.generatedAnswerFeedbackSubmit="generatedAnswerFeedbackSubmit",A.rephraseGeneratedAnswer="rephraseGeneratedAnswer",A.generatedAnswerFeedbackSubmitV2="generatedAnswerFeedbackSubmitV2",A.generatedAnswerCitationClick="generatedAnswerCitationClick",A.generatedAnswerFollowupOpenSource="generatedAnswerFollowupOpenSource",A.generatedAnswerCitationDocumentAttach="generatedAnswerCitationDocumentAttach";let ez={[R.triggerNotify]:"queryPipelineTriggers",[R.triggerExecute]:"queryPipelineTriggers",[R.triggerQuery]:"queryPipelineTriggers",[R.triggerRedirect]:"queryPipelineTriggers",[R.queryErrorBack]:"errors",[R.queryErrorClear]:"errors",[R.queryErrorRetry]:"errors",[R.pagerNext]:"getMoreResults",[R.pagerPrevious]:"getMoreResults",[R.pagerNumber]:"getMoreResults",[R.pagerResize]:"getMoreResults",[R.pagerScrolling]:"getMoreResults",[R.facetSearch]:"facet",[R.facetShowLess]:"facet",[R.facetShowMore]:"facet",[R.recommendation]:"recommendation",[R.likeSmartSnippet]:"smartSnippet",[R.dislikeSmartSnippet]:"smartSnippet",[R.expandSmartSnippet]:"smartSnippet",[R.collapseSmartSnippet]:"smartSnippet",[R.openSmartSnippetFeedbackModal]:"smartSnippet",[R.closeSmartSnippetFeedbackModal]:"smartSnippet",[R.sendSmartSnippetReason]:"smartSnippet",[R.expandSmartSnippetSuggestion]:"smartSnippetSuggestions",[R.collapseSmartSnippetSuggestion]:"smartSnippetSuggestions",[R.showMoreSmartSnippetSuggestion]:"smartSnippetSuggestions",[R.showLessSmartSnippetSuggestion]:"smartSnippetSuggestions",[R.clearRecentQueries]:"recentQueries",[R.recentResultClick]:"recentlyClickedDocuments",[R.clearRecentResults]:"recentlyClickedDocuments",[R.showLessFoldedResults]:"folding",[R.caseDetach]:"case",[R.likeGeneratedAnswer]:"generatedAnswer",[R.dislikeGeneratedAnswer]:"generatedAnswer",[R.openGeneratedAnswerSource]:"generatedAnswer",[R.generatedAnswerOpenInlineLink]:"generatedAnswer",[R.generatedAnswerFollowupOpenSource]:"generatedAnswer",[R.generatedAnswerStreamEnd]:"generatedAnswer",[R.generatedAnswerSourceHover]:"generatedAnswer",[R.generatedAnswerCopyToClipboard]:"generatedAnswer",[R.generatedAnswerHideAnswers]:"generatedAnswer",[R.generatedAnswerShowAnswers]:"generatedAnswer",[R.generatedAnswerExpand]:"generatedAnswer",[R.generatedAnswerCollapse]:"generatedAnswer",[R.generatedAnswerFeedbackSubmit]:"generatedAnswer",[R.generatedAnswerFeedbackSubmitV2]:"generatedAnswer",[x.expandToFullUI]:"interface",[x.openUserActions]:"User Actions",[x.showPrecedingSessions]:"User Actions",[x.showFollowingSessions]:"User Actions",[x.clickViewedDocument]:"User Actions",[x.clickPageView]:"User Actions",[x.createArticle]:"createArticle"};class eQ{constructor(){this.runtime=new eU,this.currentVisitorId=""}getPayload(){return Promise.resolve()}getParameters(){return Promise.resolve()}makeEvent(e){return Promise.resolve({eventType:e,payload:null,log:()=>Promise.resolve()})}sendEvent(){return Promise.resolve()}makeSearchEvent(){return this.makeEvent(O.search)}sendSearchEvent(){return Promise.resolve()}makeClickEvent(){return this.makeEvent(O.click)}sendClickEvent(){return Promise.resolve()}makeCustomEvent(){return this.makeEvent(O.custom)}sendCustomEvent(){return Promise.resolve()}makeViewEvent(){return this.makeEvent(O.view)}sendViewEvent(){return Promise.resolve()}getVisit(){return Promise.resolve({id:"",visitorId:""})}getHealth(){return Promise.resolve({status:""})}registerBeforeSendEventHook(){}registerAfterSendEventHook(){}addEventTypeMapping(){}get version(){return G}}let eH=e=>{let t,r=e.map(e=>e.replace(/;/g,""));return function e(t){let r=t.join(";");return r.length<=256?r:e(t.slice(1))}((t="",r.filter(e=>{let r=e!==t;return t=e,r})))};function eY(e){let t="string"==typeof e.partialQueries?e.partialQueries:eH(e.partialQueries),r="string"==typeof e.suggestions?e.suggestions:eH(e.suggestions);return Object.assign(Object.assign({},e),{partialQueries:t,suggestions:r})}class eB{constructor(e,t){this.opts=e,this.provider=t;const r=!1===e.enableAnalytics||eV();this.coveoAnalyticsClient=r?new eQ:new eG(e)}disable(){this.coveoAnalyticsClient=new eQ}enable(){this.coveoAnalyticsClient=new eG(this.opts)}makeInterfaceLoad(){return this.makeSearchEvent(R.interfaceLoad)}logInterfaceLoad(){return a(this,void 0,void 0,function*(){return(yield this.makeInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendationInterfaceLoad(){return this.makeSearchEvent(R.recommendationInterfaceLoad)}logRecommendationInterfaceLoad(){return a(this,void 0,void 0,function*(){return(yield this.makeRecommendationInterfaceLoad()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendation(){return this.makeCustomEvent(R.recommendation)}logRecommendation(){return a(this,void 0,void 0,function*(){return(yield this.makeRecommendation()).log({searchUID:this.provider.getSearchUID()})})}makeRecommendationOpen(e,t){return this.makeClickEvent(R.recommendationOpen,e,t)}logRecommendationOpen(e,t){return a(this,void 0,void 0,function*(){return(yield this.makeRecommendationOpen(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterClearAll(e){return this.makeSearchEvent(R.staticFilterClearAll,e)}logStaticFilterClearAll(e){return a(this,void 0,void 0,function*(){return(yield this.makeStaticFilterClearAll(e)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterSelect(e){return this.makeSearchEvent(R.staticFilterSelect,e)}logStaticFilterSelect(e){return a(this,void 0,void 0,function*(){return(yield this.makeStaticFilterSelect(e)).log({searchUID:this.provider.getSearchUID()})})}makeStaticFilterDeselect(e){return this.makeSearchEvent(R.staticFilterDeselect,e)}logStaticFilterDeselect(e){return a(this,void 0,void 0,function*(){return(yield this.makeStaticFilterDeselect(e)).log({searchUID:this.provider.getSearchUID()})})}makeFetchMoreResults(){return this.makeCustomEvent(R.pagerScrolling,{type:"getMoreResults"})}logFetchMoreResults(){return a(this,void 0,void 0,function*(){return(yield this.makeFetchMoreResults()).log({searchUID:this.provider.getSearchUID()})})}makeInterfaceChange(e){return this.makeSearchEvent(R.interfaceChange,e)}logInterfaceChange(e){return a(this,void 0,void 0,function*(){return(yield this.makeInterfaceChange(e)).log({searchUID:this.provider.getSearchUID()})})}makeDidYouMeanAutomatic(){return this.makeSearchEvent(R.didyoumeanAutomatic)}logDidYouMeanAutomatic(){return a(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanAutomatic()).log({searchUID:this.provider.getSearchUID()})})}makeDidYouMeanClick(){return this.makeSearchEvent(R.didyoumeanClick)}logDidYouMeanClick(){return a(this,void 0,void 0,function*(){return(yield this.makeDidYouMeanClick()).log({searchUID:this.provider.getSearchUID()})})}makeResultsSort(e){return this.makeSearchEvent(R.resultsSort,e)}logResultsSort(e){return a(this,void 0,void 0,function*(){return(yield this.makeResultsSort(e)).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxSubmit(){return this.makeSearchEvent(R.searchboxSubmit)}logSearchboxSubmit(){return a(this,void 0,void 0,function*(){return(yield this.makeSearchboxSubmit()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxClear(){return this.makeSearchEvent(R.searchboxClear)}logSearchboxClear(){return a(this,void 0,void 0,function*(){return(yield this.makeSearchboxClear()).log({searchUID:this.provider.getSearchUID()})})}makeSearchboxAsYouType(){return this.makeSearchEvent(R.searchboxAsYouType)}logSearchboxAsYouType(){return a(this,void 0,void 0,function*(){return(yield this.makeSearchboxAsYouType()).log({searchUID:this.provider.getSearchUID()})})}makeBreadcrumbFacet(e){return this.makeSearchEvent(R.breadcrumbFacet,e)}logBreadcrumbFacet(e){return a(this,void 0,void 0,function*(){return(yield this.makeBreadcrumbFacet(e)).log({searchUID:this.provider.getSearchUID()})})}makeBreadcrumbResetAll(){return this.makeSearchEvent(R.breadcrumbResetAll)}logBreadcrumbResetAll(){return a(this,void 0,void 0,function*(){return(yield this.makeBreadcrumbResetAll()).log({searchUID:this.provider.getSearchUID()})})}makeDocumentQuickview(e,t){return this.makeClickEvent(R.documentQuickview,e,t)}logDocumentQuickview(e,t){return a(this,void 0,void 0,function*(){return(yield this.makeDocumentQuickview(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeDocumentOpen(e,t){return this.makeClickEvent(R.documentOpen,e,t)}logDocumentOpen(e,t){return a(this,void 0,void 0,function*(){return(yield this.makeDocumentOpen(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeOmniboxAnalytics(e){return this.makeSearchEvent(R.omniboxAnalytics,eY(e))}logOmniboxAnalytics(e){return a(this,void 0,void 0,function*(){return(yield this.makeOmniboxAnalytics(e)).log({searchUID:this.provider.getSearchUID()})})}makeOmniboxFromLink(e){return this.makeSearchEvent(R.omniboxFromLink,eY(e))}logOmniboxFromLink(e){return a(this,void 0,void 0,function*(){return(yield this.makeOmniboxFromLink(e)).log({searchUID:this.provider.getSearchUID()})})}makeSearchFromLink(){return this.makeSearchEvent(R.searchFromLink)}logSearchFromLink(){return a(this,void 0,void 0,function*(){return(yield this.makeSearchFromLink()).log({searchUID:this.provider.getSearchUID()})})}makeTriggerNotify(e){return this.makeCustomEvent(R.triggerNotify,e)}logTriggerNotify(e){return a(this,void 0,void 0,function*(){return(yield this.makeTriggerNotify(e)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerExecute(e){return this.makeCustomEvent(R.triggerExecute,e)}logTriggerExecute(e){return a(this,void 0,void 0,function*(){return(yield this.makeTriggerExecute(e)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerQuery(){return this.makeCustomEvent(R.triggerQuery,{query:this.provider.getSearchEventRequestPayload().queryText},"queryPipelineTriggers")}logTriggerQuery(){return a(this,void 0,void 0,function*(){return(yield this.makeTriggerQuery()).log({searchUID:this.provider.getSearchUID()})})}makeUndoTriggerQuery(e){return this.makeSearchEvent(R.undoTriggerQuery,e)}logUndoTriggerQuery(e){return a(this,void 0,void 0,function*(){return(yield this.makeUndoTriggerQuery(e)).log({searchUID:this.provider.getSearchUID()})})}makeTriggerRedirect(e){return this.makeCustomEvent(R.triggerRedirect,Object.assign(Object.assign({},e),{query:this.provider.getSearchEventRequestPayload().queryText}))}logTriggerRedirect(e){return a(this,void 0,void 0,function*(){return(yield this.makeTriggerRedirect(e)).log({searchUID:this.provider.getSearchUID()})})}makePagerResize(e){return this.makeCustomEvent(R.pagerResize,e)}logPagerResize(e){return a(this,void 0,void 0,function*(){return(yield this.makePagerResize(e)).log({searchUID:this.provider.getSearchUID()})})}makePagerNumber(e){return this.makeCustomEvent(R.pagerNumber,e)}logPagerNumber(e){return a(this,void 0,void 0,function*(){return(yield this.makePagerNumber(e)).log({searchUID:this.provider.getSearchUID()})})}makePagerNext(e){return this.makeCustomEvent(R.pagerNext,e)}logPagerNext(e){return a(this,void 0,void 0,function*(){return(yield this.makePagerNext(e)).log({searchUID:this.provider.getSearchUID()})})}makePagerPrevious(e){return this.makeCustomEvent(R.pagerPrevious,e)}logPagerPrevious(e){return a(this,void 0,void 0,function*(){return(yield this.makePagerPrevious(e)).log({searchUID:this.provider.getSearchUID()})})}makePagerScrolling(){return this.makeCustomEvent(R.pagerScrolling)}logPagerScrolling(){return a(this,void 0,void 0,function*(){return(yield this.makePagerScrolling()).log({searchUID:this.provider.getSearchUID()})})}makeFacetClearAll(e){return this.makeSearchEvent(R.facetClearAll,e)}logFacetClearAll(e){return a(this,void 0,void 0,function*(){return(yield this.makeFacetClearAll(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSearch(e){return this.makeSearchEvent(R.facetSearch,e)}logFacetSearch(e){return a(this,void 0,void 0,function*(){return(yield this.makeFacetSearch(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSelect(e){return this.makeSearchEvent(R.facetSelect,e)}logFacetSelect(e){return a(this,void 0,void 0,function*(){return(yield this.makeFacetSelect(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetDeselect(e){return this.makeSearchEvent(R.facetDeselect,e)}logFacetDeselect(e){return a(this,void 0,void 0,function*(){return(yield this.makeFacetDeselect(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetExclude(e){return this.makeSearchEvent(R.facetExclude,e)}logFacetExclude(e){return a(this,void 0,void 0,function*(){return(yield this.makeFacetExclude(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetUnexclude(e){return this.makeSearchEvent(R.facetUnexclude,e)}logFacetUnexclude(e){return a(this,void 0,void 0,function*(){return(yield this.makeFacetUnexclude(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetSelectAll(e){return this.makeSearchEvent(R.facetSelectAll,e)}logFacetSelectAll(e){return a(this,void 0,void 0,function*(){return(yield this.makeFacetSelectAll(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetUpdateSort(e){return this.makeSearchEvent(R.facetUpdateSort,e)}
6logFacetUpdateSort(e){return a(this,void 0,void 0,function*(){return(yield this.makeFacetUpdateSort(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetShowMore(e){return this.makeCustomEvent(R.facetShowMore,e)}logFacetShowMore(e){return a(this,void 0,void 0,function*(){return(yield this.makeFacetShowMore(e)).log({searchUID:this.provider.getSearchUID()})})}makeFacetShowLess(e){return this.makeCustomEvent(R.facetShowLess,e)}logFacetShowLess(e){return a(this,void 0,void 0,function*(){return(yield this.makeFacetShowLess(e)).log({searchUID:this.provider.getSearchUID()})})}makeQueryError(e){return this.makeCustomEvent(R.queryError,e)}logQueryError(e){return a(this,void 0,void 0,function*(){return(yield this.makeQueryError(e)).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorBack(){return a(this,void 0,void 0,function*(){let e=yield this.makeCustomEvent(R.queryErrorBack);return{description:e.description,log:()=>a(this,void 0,void 0,function*(){return yield e.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(R.queryErrorBack)})}})}logQueryErrorBack(){return a(this,void 0,void 0,function*(){return(yield this.makeQueryErrorBack()).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorRetry(){return a(this,void 0,void 0,function*(){let e=yield this.makeCustomEvent(R.queryErrorRetry);return{description:e.description,log:()=>a(this,void 0,void 0,function*(){return yield e.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(R.queryErrorRetry)})}})}logQueryErrorRetry(){return a(this,void 0,void 0,function*(){return(yield this.makeQueryErrorRetry()).log({searchUID:this.provider.getSearchUID()})})}makeQueryErrorClear(){return a(this,void 0,void 0,function*(){let e=yield this.makeCustomEvent(R.queryErrorClear);return{description:e.description,log:()=>a(this,void 0,void 0,function*(){return yield e.log({searchUID:this.provider.getSearchUID()}),this.logSearchEvent(R.queryErrorClear)})}})}logQueryErrorClear(){return a(this,void 0,void 0,function*(){return(yield this.makeQueryErrorClear()).log({searchUID:this.provider.getSearchUID()})})}makeLikeSmartSnippet(){return this.makeCustomEvent(R.likeSmartSnippet)}logLikeSmartSnippet(){return a(this,void 0,void 0,function*(){return(yield this.makeLikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeDislikeSmartSnippet(){return this.makeCustomEvent(R.dislikeSmartSnippet)}logDislikeSmartSnippet(){return a(this,void 0,void 0,function*(){return(yield this.makeDislikeSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeExpandSmartSnippet(){return this.makeCustomEvent(R.expandSmartSnippet)}logExpandSmartSnippet(){return a(this,void 0,void 0,function*(){return(yield this.makeExpandSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeCollapseSmartSnippet(){return this.makeCustomEvent(R.collapseSmartSnippet)}logCollapseSmartSnippet(){return a(this,void 0,void 0,function*(){return(yield this.makeCollapseSmartSnippet()).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetFeedbackModal(){return this.makeCustomEvent(R.openSmartSnippetFeedbackModal)}logOpenSmartSnippetFeedbackModal(){return a(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetFeedbackModal()).log({searchUID:this.provider.getSearchUID()})})}makeCloseSmartSnippetFeedbackModal(){return this.makeCustomEvent(R.closeSmartSnippetFeedbackModal)}logCloseSmartSnippetFeedbackModal(){return a(this,void 0,void 0,function*(){return(yield this.makeCloseSmartSnippetFeedbackModal()).log({searchUID:this.provider.getSearchUID()})})}makeSmartSnippetFeedbackReason(e,t){return this.makeCustomEvent(R.sendSmartSnippetReason,{reason:e,details:t})}logSmartSnippetFeedbackReason(e,t){return a(this,void 0,void 0,function*(){return(yield this.makeSmartSnippetFeedbackReason(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeExpandSmartSnippetSuggestion(e){return this.makeCustomEvent(R.expandSmartSnippetSuggestion,"documentId"in e?e:{documentId:e})}logExpandSmartSnippetSuggestion(e){return a(this,void 0,void 0,function*(){return(yield this.makeExpandSmartSnippetSuggestion(e)).log({searchUID:this.provider.getSearchUID()})})}makeCollapseSmartSnippetSuggestion(e){return this.makeCustomEvent(R.collapseSmartSnippetSuggestion,"documentId"in e?e:{documentId:e})}logCollapseSmartSnippetSuggestion(e){return a(this,void 0,void 0,function*(){return(yield this.makeCollapseSmartSnippetSuggestion(e)).log({searchUID:this.provider.getSearchUID()})})}makeShowMoreSmartSnippetSuggestion(e){return this.makeCustomEvent(R.showMoreSmartSnippetSuggestion,e)}logShowMoreSmartSnippetSuggestion(e){return a(this,void 0,void 0,function*(){return(yield this.makeShowMoreSmartSnippetSuggestion(e)).log({searchUID:this.provider.getSearchUID()})})}makeShowLessSmartSnippetSuggestion(e){return this.makeCustomEvent(R.showLessSmartSnippetSuggestion,e)}logShowLessSmartSnippetSuggestion(e){return a(this,void 0,void 0,function*(){return(yield this.makeShowLessSmartSnippetSuggestion(e)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSource(e,t){return this.makeClickEvent(R.openSmartSnippetSource,e,t)}logOpenSmartSnippetSource(e,t){return a(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSource(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSuggestionSource(e,t){return this.makeClickEvent(R.openSmartSnippetSuggestionSource,e,{contentIDKey:t.documentId.contentIdKey,contentIDValue:t.documentId.contentIdValue},t)}makeCopyToClipboard(e,t){return this.makeClickEvent(R.copyToClipboard,e,t)}logCopyToClipboard(e,t){return a(this,void 0,void 0,function*(){return(yield this.makeCopyToClipboard(e,t)).log({searchUID:this.provider.getSearchUID()})})}logOpenSmartSnippetSuggestionSource(e,t){return a(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSuggestionSource(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetInlineLink(e,t){return this.makeClickEvent(R.openSmartSnippetInlineLink,e,{contentIDKey:t.contentIDKey,contentIDValue:t.contentIDValue},t)}logOpenSmartSnippetInlineLink(e,t){return a(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetInlineLink(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeOpenSmartSnippetSuggestionInlineLink(e,t){return this.makeClickEvent(R.openSmartSnippetSuggestionInlineLink,e,{contentIDKey:t.documentId.contentIdKey,contentIDValue:t.documentId.contentIdValue},t)}logOpenSmartSnippetSuggestionInlineLink(e,t){return a(this,void 0,void 0,function*(){return(yield this.makeOpenSmartSnippetSuggestionInlineLink(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeRecentQueryClick(){return this.makeSearchEvent(R.recentQueryClick)}logRecentQueryClick(){return a(this,void 0,void 0,function*(){return(yield this.makeRecentQueryClick()).log({searchUID:this.provider.getSearchUID()})})}makeClearRecentQueries(){return this.makeCustomEvent(R.clearRecentQueries)}logClearRecentQueries(){return a(this,void 0,void 0,function*(){return(yield this.makeClearRecentQueries()).log({searchUID:this.provider.getSearchUID()})})}makeRecentResultClick(e,t){return this.makeCustomEvent(R.recentResultClick,{info:e,identifier:t})}logRecentResultClick(e,t){return a(this,void 0,void 0,function*(){return(yield this.makeRecentResultClick(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeClearRecentResults(){return this.makeCustomEvent(R.clearRecentResults)}logClearRecentResults(){return a(this,void 0,void 0,function*(){return(yield this.makeClearRecentResults()).log({searchUID:this.provider.getSearchUID()})})}makeNoResultsBack(){return this.makeSearchEvent(R.noResultsBack)}logNoResultsBack(){return a(this,void 0,void 0,function*(){return(yield this.makeNoResultsBack()).log({searchUID:this.provider.getSearchUID()})})}makeShowMoreFoldedResults(e,t){return this.makeClickEvent(R.showMoreFoldedResults,e,t)}logShowMoreFoldedResults(e,t){return a(this,void 0,void 0,function*(){return(yield this.makeShowMoreFoldedResults(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeShowLessFoldedResults(){return this.makeCustomEvent(R.showLessFoldedResults)}logShowLessFoldedResults(){return a(this,void 0,void 0,function*(){return(yield this.makeShowLessFoldedResults()).log({searchUID:this.provider.getSearchUID()})})}makeEventDescription(e,t){var r;return{actionCause:t,customData:null==(r=e.payload)?void 0:r.customData}}makeCustomEvent(e,t){return a(this,arguments,void 0,function*(e,t,r=ez[e]){this.coveoAnalyticsClient.getParameters;let n=Object.assign(Object.assign({},this.provider.getBaseMetadata()),t),i=Object.assign(Object.assign({},(yield this.getBaseEventRequest(n))),{eventType:r,eventValue:e}),a=yield this.coveoAnalyticsClient.makeCustomEvent(i);return{description:this.makeEventDescription(a,e),log:({searchUID:e})=>a.log({lastSearchQueryUid:e})}})}logCustomEvent(e,t){return a(this,arguments,void 0,function*(e,t,r=ez[e]){return(yield this.makeCustomEvent(e,t,r)).log({searchUID:this.provider.getSearchUID()})})}makeCustomEventWithType(e,t,r){return a(this,void 0,void 0,function*(){let n=Object.assign(Object.assign({},this.provider.getBaseMetadata()),r),i=Object.assign(Object.assign({},(yield this.getBaseEventRequest(n))),{eventType:t,eventValue:e}),a=yield this.coveoAnalyticsClient.makeCustomEvent(i);return{description:this.makeEventDescription(a,e),log:({searchUID:e})=>a.log({lastSearchQueryUid:e})}})}logCustomEventWithType(e,t,r){return a(this,void 0,void 0,function*(){return(yield this.makeCustomEventWithType(e,t,r)).log({searchUID:this.provider.getSearchUID()})})}logSearchEvent(e,t){return a(this,void 0,void 0,function*(){return(yield this.makeSearchEvent(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeSearchEvent(e,t){return a(this,void 0,void 0,function*(){let r=yield this.getBaseSearchEventRequest(e,t),n=yield this.coveoAnalyticsClient.makeSearchEvent(r);return{description:this.makeEventDescription(n,e),log:({searchUID:e})=>n.log({searchQueryUid:e})}})}makeClickEvent(e,t,r,n){return a(this,void 0,void 0,function*(){let i=Object.assign(Object.assign(Object.assign({},t),(yield this.getBaseEventRequest(Object.assign(Object.assign({},r),n)))),{queryPipeline:this.provider.getPipeline(),actionCause:e}),a=yield this.coveoAnalyticsClient.makeClickEvent(i);return{description:this.makeEventDescription(a,e),log:({searchUID:e})=>a.log({searchQueryUid:e})}})}logClickEvent(e,t,r,n){return a(this,void 0,void 0,function*(){return(yield this.makeClickEvent(e,t,r,n)).log({searchUID:this.provider.getSearchUID()})})}getBaseSearchEventRequest(e,t){return a(this,void 0,void 0,function*(){var r,n;return Object.assign(Object.assign(Object.assign({},(yield this.getBaseEventRequest(Object.assign(Object.assign({},t),null==(n=(r=this.provider).getGeneratedAnswerMetadata)?void 0:n.call(r))))),this.provider.getSearchEventRequestPayload()),{queryPipeline:this.provider.getPipeline(),actionCause:e})})}getBaseEventRequest(e){return a(this,void 0,void 0,function*(){let t=Object.assign(Object.assign({},this.provider.getBaseMetadata()),e);return Object.assign(Object.assign(Object.assign({}
6,this.getOrigins()),this.getSplitTestRun()),{customData:t,language:this.provider.getLanguage(),facetState:this.provider.getFacetState?this.provider.getFacetState():[],anonymous:this.provider.getIsAnonymous(),clientId:yield this.getClientId()})})}getOrigins(){var e,t;return{originContext:null==(t=(e=this.provider).getOriginContext)?void 0:t.call(e),originLevel1:this.provider.getOriginLevel1(),originLevel2:this.provider.getOriginLevel2(),originLevel3:this.provider.getOriginLevel3()}}getClientId(){return this.coveoAnalyticsClient instanceof eG?this.coveoAnalyticsClient.getCurrentVisitorId():void 0}getSplitTestRun(){let e=this.provider.getSplitTestRunName?this.provider.getSplitTestRunName():"",t=this.provider.getSplitTestRunVersion?this.provider.getSplitTestRunVersion():"";return Object.assign(Object.assign({},e&&{splitTestRunName:e}),t&&{splitTestRunVersion:t})}makeLikeGeneratedAnswer(e){return this.makeCustomEvent(R.likeGeneratedAnswer,e)}logLikeGeneratedAnswer(e){return a(this,void 0,void 0,function*(){return(yield this.makeLikeGeneratedAnswer(e)).log({searchUID:this.provider.getSearchUID()})})}makeDislikeGeneratedAnswer(e){return this.makeCustomEvent(R.dislikeGeneratedAnswer,e)}logDislikeGeneratedAnswer(e){return a(this,void 0,void 0,function*(){return(yield this.makeDislikeGeneratedAnswer(e)).log({searchUID:this.provider.getSearchUID()})})}makeOpenGeneratedAnswerSource(e){return this.makeCustomEvent(R.openGeneratedAnswerSource,e)}logOpenGeneratedAnswerSource(e){return a(this,void 0,void 0,function*(){return(yield this.makeOpenGeneratedAnswerSource(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerOpenInlineLink(e){return this.makeCustomEvent(R.generatedAnswerOpenInlineLink,e)}logGeneratedAnswerOpenInlineLink(e){return a(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerOpenInlineLink(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCitationClick(e,t){return this.makeClickEvent(R.generatedAnswerCitationClick,Object.assign(Object.assign({},e),{documentPosition:1}),{contentIDKey:t.documentId.contentIdKey,contentIDValue:t.documentId.contentIdValue},t)}logGeneratedAnswerCitationClick(e,t){return a(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCitationClick(e,t)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerFollowupOpenSource(e){return this.makeCustomEvent(R.generatedAnswerFollowupOpenSource,e)}logGeneratedAnswerFollowupOpenSource(e){return a(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerFollowupOpenSource(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerSourceHover(e){return this.makeCustomEvent(R.generatedAnswerSourceHover,e)}logGeneratedAnswerSourceHover(e){return a(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerSourceHover(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCopyToClipboard(e){return this.makeCustomEvent(R.generatedAnswerCopyToClipboard,e)}logGeneratedAnswerCopyToClipboard(e){return a(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCopyToClipboard(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerHideAnswers(e){return this.makeCustomEvent(R.generatedAnswerHideAnswers,e)}logGeneratedAnswerHideAnswers(e){return a(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerHideAnswers(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerShowAnswers(e){return this.makeCustomEvent(R.generatedAnswerShowAnswers,e)}logGeneratedAnswerShowAnswers(e){return a(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerShowAnswers(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerExpand(e){return this.makeCustomEvent(R.generatedAnswerExpand,e)}logGeneratedAnswerExpand(e){return a(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerExpand(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerCollapse(e){return this.makeCustomEvent(R.generatedAnswerCollapse,e)}logGeneratedAnswerCollapse(e){return a(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerCollapse(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerFeedbackSubmit(e){return this.makeCustomEvent(R.generatedAnswerFeedbackSubmit,e)}logGeneratedAnswerFeedbackSubmit(e){return a(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerFeedbackSubmit(e)).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerFeedbackSubmitV2(e){return this.makeCustomEvent(R.generatedAnswerFeedbackSubmitV2,e)}logGeneratedAnswerFeedbackSubmitV2(e){return a(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerFeedbackSubmitV2(e)).log({searchUID:this.provider.getSearchUID()})})}makeRephraseGeneratedAnswer(e){return this.makeSearchEvent(R.rephraseGeneratedAnswer,e)}
6logRephraseGeneratedAnswer(e){return a(this,void 0,void 0,function*(){return(yield this.makeRephraseGeneratedAnswer(e)).log({searchUID:this.provider.getSearchUID()})})}makeRetryGeneratedAnswer(){return this.makeSearchEvent(R.retryGeneratedAnswer)}logRetryGeneratedAnswer(){return a(this,void 0,void 0,function*(){return(yield this.makeRetryGeneratedAnswer()).log({searchUID:this.provider.getSearchUID()})})}makeGeneratedAnswerStreamEnd(e){return this.makeCustomEvent(R.generatedAnswerStreamEnd,e)}logGeneratedAnswerStreamEnd(e){return a(this,void 0,void 0,function*(){return(yield this.makeGeneratedAnswerStreamEnd(e)).log({searchUID:this.provider.getSearchUID()})})}}let eK=Object.assign({},Q),eW=Object.keys(eK).map(e=>eK[e]);class eX extends Y{constructor({client:e,uuidGenerator:t=L}){super({client:e,uuidGenerator:t}),this.ticket={}}getApi(e){let t=super.getApi(e);return null!==t?t:"setTicket"===e?this.setTicket:null}addHooks(){this.addHooksForEvent(),this.addHooksForPageView(),this.addHooksForSVCEvents()}setTicket(e){this.ticket=e}clearPluginData(){this.ticket={}}addHooksForSVCEvents(){this.client.registerBeforeSendEventHook((e,...[t])=>-1!==eW.indexOf(e)?this.addSVCDataToPayload(e,t):t),this.client.registerAfterSendEventHook((e,...[t])=>(-1!==eW.indexOf(e)&&this.updateLocationInformation(e,t),t))}addHooksForPageView(){this.client.addEventTypeMapping(eK.pageview,{newEventType:O.collect,variableLengthArgumentsNames:["page"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})}addHooksForEvent(){this.client.addEventTypeMapping(eK.event,{newEventType:O.collect,variableLengthArgumentsNames:["eventCategory","eventAction","eventLabel","eventValue"],addVisitorIdParameter:!0,usesMeasurementProtocol:!0})}addSVCDataToPayload(e,t){var r;let n=Object.assign(Object.assign(Object.assign(Object.assign({},this.getLocationInformation(e,t)),this.getDefaultContextInformation(e)),this.action?{svcAction:this.action}:{}),Object.keys(null!=(r=this.actionData)?r:{}).length>0?{svcActionData:this.actionData}:{}),i=this.getTicketPayload();return this.clearData(),Object.assign(Object.assign(Object.assign({},i),n),t)}getTicketPayload(){let e;return W(e=this.ticket).filter(t=>void 0!==e[t]).reduce((t,r)=>{let n=Z[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{})}}eX.Id="svc",(k=N||(N={})).click="click",k.flowStart="flowStart",(C=P||(P={})).enterInterface="ticket_create_start",C.fieldUpdate="ticket_field_update",C.fieldSuggestionClick="ticket_classification_click",C.documentSuggestionClick="documentSuggestionClick",C.documentSuggestionQuickview="documentSuggestionQuickview",C.suggestionRate="suggestion_rate",C.nextCaseStep="ticket_next_stage",C.caseCancelled="ticket_cancel",C.caseSolved="ticket_cancel",C.caseCreated="ticket_create",(T=q||(q={})).quit="Quit",T.solved="Solved";class eZ{constructor(e,t){var r;this.options=e,this.provider=t;const n=(null==(r=e.enableAnalytics)||r)&&!eV();this.coveoAnalyticsClient=n?new eG(e):new eQ,this.svc=new eX({client:this.coveoAnalyticsClient})}disable(){this.coveoAnalyticsClient=new eQ,this.svc=new eX({client:this.coveoAnalyticsClient})}enable(){this.coveoAnalyticsClient=new eG(this.options),this.svc=new eX({client:this.coveoAnalyticsClient})}logEnterInterface(e){return this.svc.setAction(P.enterInterface),this.svc.setTicket(e.ticket),this.sendFlowStartEvent()}logUpdateCaseField(e){return this.svc.setAction(P.fieldUpdate,{fieldName:e.fieldName}),this.svc.setTicket(e.ticket),this.sendClickEvent()}logSelectFieldSuggestion(e){return this.svc.setAction(P.fieldSuggestionClick,e.suggestion),this.svc.setTicket(e.ticket),this.sendClickEvent()}logSelectDocumentSuggestion(e){return this.logClickEvent(P.documentSuggestionClick,e.suggestion.suggestion,{contentIDKey:"permanentId",contentIDValue:e.suggestion.permanentId})}logQuickviewDocumentSuggestion(e){return this.logClickEvent(P.documentSuggestionQuickview,e.suggestion.suggestion,{contentIDKey:"permanentId",contentIDValue:e.suggestion.permanentId})}logRateDocumentSuggestion(e){return this.svc.setAction(P.suggestionRate,Object.assign({rate:e.rating},e.suggestion)),this.svc.setTicket(e.ticket),this.sendClickEvent()}
6logMoveToNextCaseStep(e){return this.svc.setAction(P.nextCaseStep,{stage:null==e?void 0:e.stage}),this.svc.setTicket(e.ticket),this.sendClickEvent()}logCaseCancelled(e){return this.svc.setAction(P.caseCancelled,{reason:q.quit}),this.svc.setTicket(e.ticket),this.sendClickEvent()}logCaseSolved(e){return this.svc.setAction(P.caseSolved,{reason:q.solved}),this.svc.setTicket(e.ticket),this.sendClickEvent()}logCaseCreated(e){return this.svc.setAction(P.caseCreated),this.svc.setTicket(e.ticket),this.sendClickEvent()}sendFlowStartEvent(){return this.coveoAnalyticsClient.sendEvent("event","svc",N.flowStart,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)}sendClickEvent(){return this.coveoAnalyticsClient.sendEvent("event","svc",N.click,this.provider?{searchHub:this.provider.getOriginLevel1()}:null)}getBaseEventRequest(e){return a(this,void 0,void 0,function*(){var t,r;let n=Object.assign({},e);return Object.assign(Object.assign({},this.getOrigins()),{customData:n,language:null==(t=this.provider)?void 0:t.getLanguage(),anonymous:null==(r=this.provider)?void 0:r.getIsAnonymous(),clientId:yield this.getClientId()})})}getClientId(){return this.coveoAnalyticsClient instanceof eG?this.coveoAnalyticsClient.getCurrentVisitorId():void 0}getOrigins(){var e,t,r,n,i;return{originContext:null==(t=null==(e=this.provider)?void 0:e.getOriginContext)?void 0:t.call(e),originLevel1:null==(r=this.provider)?void 0:r.getOriginLevel1(),originLevel2:null==(n=this.provider)?void 0:n.getOriginLevel2(),originLevel3:null==(i=this.provider)?void 0:i.getOriginLevel3()}}logClickEvent(e,t,r,n){return a(this,void 0,void 0,function*(){var i,a;let s=Object.assign(Object.assign(Object.assign({},t),(yield this.getBaseEventRequest(Object.assign(Object.assign({},r),n)))),{searchQueryUid:null!=(a=null==(i=this.provider)?void 0:i.getSearchUID())?a:"",actionCause:e});return this.coveoAnalyticsClient.sendClickEvent(s)})}}},58604:(e,t,r)=>{"use strict";r.d(t,{En:()=>p,GH:()=>s,Lm:()=>m,XP:()=>u,aQ:()=>d,dc:()=>c,kG:()=>l,py:()=>f,r:()=>o,r3:()=>i,rq:()=>h,y0:()=>a,yz:()=>g});var n=r(65179);let i=new n.hU({required:!0,emptyAllowed:!1}),a=new n.hU({required:!1,emptyAllowed:!1}),s=new n.hU({required:!0,emptyAllowed:!0}),o=new n.hU({required:!1,emptyAllowed:!0}),u=new n.v({each:i,required:!0}),l=new n.hU({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),c=new n.hU({required:!1,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),d=new n.hU({required:!0,emptyAllowed:!1,regex:/^[a-zA-Z0-9_\-.]{1,100}$/}),f=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),p=(e,t)=>{if("required"in t)return{payload:new n.Sj({value:t}
6).validate({value:e}).value};let r=new n.Bo({options:{required:!0},values:t}).validate(e);if(r)throw new n.fv(r);return{payload:e}},h=(e,t)=>{try{return p(e,t)}catch(t){return{payload:e,error:f(t)}}},g=(e,t,r,n)=>v(e,t,r,`Check the initialState of ${n}`,"Controller initialization error"),m=(e,t,r,n)=>v(e,t,r,`Check the options of ${n}`,"Controller initialization error"),v=(e,t,r,n,i)=>{try{return t.validate(r,n)}catch(t){throw e.logger.error(t,i),t}}},58994:(e,t,r)=>{"use strict";r.d(t,{L:()=>o});var n=r(65179),i=r(69285),a=r(58604),s=r(64379);let o=(0,i.VP)("rangeFacet/updateSortCriterion",e=>(0,a.rq)(e,{facetId:s.k,criterion:new n.WT({required:!0})}))},59626:(e,t,r)=>{"use strict";r.d(t,{H5:()=>a,xv:()=>s});var n=r(83206),i=r(57656);let a=(e,t)=>{let r=((e,t)=>{let r=(0,n.Ph)(e,t);if(r&&r.facetId in e.categoryFacetSet)return r})(e,t);return(0,i.o)(r?.values??[])},s=(e,t)=>{let r=e.categoryFacetSet[t]?.request;return(0,i.o)(r?.currentValues??[])}},59730:(e,t,r)=>{"use strict";r.d(t,{kB:()=>O,Sw:()=>N,CT:()=>P,qs:()=>R,ae:()=>x,Jq:()=>T,g:()=>_});var n=r(65179),i=r(69285),a=r(89969),s=r(58604),o=r(32995),u=r(40687),l=r(87998),c=r(67553),d=r(22212),f=r(15810),p=r(69492),h=r(63590),g=r(89014),m=r(99166),v=r(81088),y=r(42994),b=r(26923),w=r(71358),S=r(41252),E=r(28806),I=r(77553),A=r(67539),k=r(59924);class C{config;onUpdateQueryForCorrection;constructor(e,t=e=>{this.dispatch((0,h.o)({q:e}))}){this.config=e,this.onUpdateQueryForCorrection=t}async fetchFromAPI({mappings:e,request:t},r){let n=Date.now(),i=(0,A._L)(await this.extra.apiClient.search(t,r),e);return{response:i,duration:Date.now()-n,queryExecuted:this.getState().query?.q||"",requestExecuted:t}}async process(e){return this.processQueryErrorOrContinue(e)??await this.processQueryCorrectionsOrContinue(e)??await this.processQueryTriggersOrContinue(e)??this.processSuccessResponse(e)}processQueryErrorOrContinue(e){return(0,v.CR)(e.response)?(this.dispatch((0,I.$)(e.response.error)),this.rejectWithValue(e.response.error)):null}async processQueryCorrectionsOrContinue(e){let t=this.getState(),r=this.getSuccessResponse(e);if(!r||!t.didYouMean)return null;let{enableDidYouMean:i,automaticallyCorrectQuery:a}=t.didYouMean,{results:s,queryCorrections:o,queryCorrection:u}=r;if(!i||!a)return null;let l=0===s.length&&o&&0!==o.length,c=!(0,n.hX)(u)&&!(0,n.hX)(u.correctedQuery);if(!l&&!c)return null;let d=l?await this.processLegacyDidYouMeanAutoCorrection(e):this.processModernDidYouMeanAutoCorrection(e);return this.dispatch((0,w.P9)((0,S.q)(this.getState()))),d}async processLegacyDidYouMeanAutoCorrection(e){let t=this.getCurrentQuery(),r=this.getSuccessResponse(e);if(!r.queryCorrections)return null;let{correctedQuery:n}=r.queryCorrections[0],i=await this.automaticallyRetryQueryWithCorrection(n);return(0,v.CR)(i.response)?(this.dispatch((0,I.$)(i.response.error)),this.rejectWithValue(i.response.error)):(this.dispatch((0,w.P9)((0,S.q)(this.getState()))),{...i,response:{...i.response.success,queryCorrections:r.queryCorrections},automaticallyCorrected:!0,originalQuery:t})}processModernDidYouMeanAutoCorrection(e){let t=this.getSuccessResponse(e),{correctedQuery:r,originalQuery:n}=t.queryCorrection;return this.onUpdateQueryForCorrection(r),{...e,response:{...t},queryExecuted:r,automaticallyCorrected:!0,originalQuery:n}}async processQueryTriggersOrContinue(e){let t=this.getSuccessResponse(e);if(!t)return null;let r=t.triggers.find(e=>"query"===e.type)?.content||"";if(!r)return null;if(this.getState().triggers?.queryModification.queryToIgnore===r)return this.dispatch((0,E.O)("")),null;let n=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(r);return(0,v.CR)(i.response)?(this.dispatch((0,I.$)(i.response.error)),this.rejectWithValue(i.response.error)):(this.dispatch((0,w.P9)((0,S.q)(this.getState()))),{...i,response:{...i.response.success},automaticallyCorrected:!1,originalQuery:n})}processSuccessResponse(e){return this.dispatch((0,w.P9)((0,S.q)(this.getState()))),{...e,response:this.getSuccessResponse(e),automaticallyCorrected:!1,originalQuery:this.getCurrentQuery()}}getSuccessResponse(e){return(0,v.ny)(e.response)?e.response.success:null}async automaticallyRetryQueryWithCorrection(e){this.onUpdateQueryForCorrection(e);let t=this.getState(),{actionCause:r}=(0,b.hf)(),n=await this.fetchFromAPI(await (0,k.CG)(t,this.extra.navigatorContext,{actionCause:r}),{origin:"mainSearch"});return this.dispatch((0,y.E)(e)),n}async automaticallyRetryQueryWithTriggerModification(e){return this.dispatch((0,E.f)({newQuery:e,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(e),await this.fetchFromAPI(await (0,k.CG)(this.getState(),this.extra.navigatorContext),{origin:"mainSearch"})}getCurrentQuery(){let e=this.getState();return e.query?.q!==void 0?e.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}}let T=(0,i.zD)("search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;(0,s.rq)(e,{q:new n.hU,enableQuerySyntax:new n.Ci,clearFilters:new n.Ci}
6),e.clearFilters&&(r((0,l.R)()),r((0,l.y)())),r((0,c.m)({allow:!0})),r((0,h.o)({q:e.q,enableQuerySyntax:e.enableQuerySyntax})),r((0,p.XA)(1))}),_=(0,i.VP)("search/updateSearchAction"),O=(0,i.zD)("search/executeSearch",async(e,t)=>{let r=t.getState();if("legacy"===r.configuration.analytics.analyticsMode)return(0,m.NA)(r,t,e.legacy);M(r);let n=e.next?U(e.next):void 0,i=await (0,k.CG)(r,t.extra.navigatorContext,n),a=new C({...t,analyticsAction:n??{}}),s=await a.fetchFromAPI(i,{origin:"mainSearch"});return await a.process(s)}),x=(0,i.zD)("search/fetchPage",async(e,t)=>{let r=t.getState();if(M(r),"legacy"===r.configuration.analytics.analyticsMode||!e.next)return(0,m.Ze)(r,t,e.legacy);let n=new C({...t,analyticsAction:e.next}),i=await (0,k.CG)(r,t.extra.navigatorContext,e.next),a=await n.fetchFromAPI(i,{origin:"mainSearch"});return await n.process(a)}),R=(0,i.zD)("search/fetchMoreResults",async(e,t)=>{let r=t.getState();if("legacy"===r.configuration.analytics.analyticsMode)return(0,m.nY)(t,r);let n=(0,o.Xk)(u.d.browseResults,t.getState),i=new C({...t,analyticsAction:n}),a=await q(r,t.extra.navigatorContext,n),s=await i.fetchFromAPI(a,{origin:"mainSearch"});return await i.process(s)}),N=(0,i.zD)("search/fetchFacetValues",async(e,t)=>{let r=t.getState();if("legacy"===r.configuration.analytics.analyticsMode)return(0,m.NA)(r,t,e.legacy);let n=new C({...t,analyticsAction:{}}),i=await D(r,t.extra.navigatorContext),a=await n.fetchFromAPI(i,{origin:"facetValues"});return await n.process(a)}),P=(0,i.zD)("search/fetchInstantResults",async(e,t)=>{let r=t.getState();if("legacy"===r.configuration.analytics.analyticsMode)return(0,m.jW)(e,t);(0,s.rq)(e,{id:s.r3,q:s.r3,maxResultsPerQuery:new n.lS({required:!0,min:1}),cacheTimeout:new n.lS});let{q:i,maxResultsPerQuery:a}=e,o=U((0,d.nZ)()),u=await j(r,t.extra.navigatorContext,i,a,o),l=new C({...t,analyticsAction:o},r=>{t.dispatch((0,f.LU)({q:r,id:e.id}))}),c=await l.fetchFromAPI(u,{origin:"instantResults",disableAbortWarning:!0}),p=await l.process(c);return"response"in p?{results:p.response.results,searchUid:p.response.searchUid,totalCountFiltered:p.response.totalCountFiltered,duration:p.duration}:p}),q=async(e,t,r)=>{let n=await (0,k.CG)(e,t,r);return n.request={...n.request,firstResult:(e.pagination?.firstResult??0)+(e.search?.results.length??0)},n},j=async(e,t,r,n,i)=>{let a=(0,g.E)(e,t,i);return(0,A.UG)({...a,...e.didYouMean&&{enableDidYouMean:e.didYouMean.enableDidYouMean},numberOfResults:n,q:r})},D=async(e,t,r)=>{let n=await (0,k.CG)(e,t,r);return n.request.numberOfResults=0,n},M=e=>{e.configuration.analytics.enabled&&a.Ay.getInstance().addElement({name:"Query",...e.query?.q&&{value:e.query.q},time:JSON.stringify(new Date)})},U=e=>({actionCause:e.actionCause,type:e.actionCause})},59924:(e,t,r)=>{"use strict";r.d(t,{hq:()=>h,CG:()=>c,v_:()=>d});var n=r(99860),i=r(42548),a=r(99334),s=r(17046),o=r(89014);let u=(0,r(78752).Mz)(e=>e.staticFilterSet,e=>Object.values(e||{}).map(e=>{let t=e.values.filter(e=>"selected"===e.state&&!!e.expression.trim()),r=t.map(e=>e.expression).join(" OR ");return t.length>1?`(${r})`:r}));var l=r(67539);let c=async(e,t,r)=>{var a,u,c,g,m;let v,y=h(e),b=(a=e,(0,n.nR)([...(g=(c=u=a).facetSet??{},(0,i.g)(g).map(e=>{let t=n.C1[e.sortCriteria];return t?{...e,sortCriteria:t}:e})),...p(c.numericFacetSet??{}),...p(c.dateFacetSet??{}),...(0,i.g)(c.categoryFacetSet??{})].filter(({facetId:e})=>u.facetOptions?.facets[e]?.enabled??!0),a.facetOrder??[])),w=(m=e,(v=m.automaticFacetSet?.set)?Object.values(v).map(e=>e.response).map(f).filter(e=>e.currentValues.length>0):void 0),S="legacy"===e.configuration.analytics.analyticsMode?await (0,s.E)(e,r):(0,o.E)(e,t,r);return(0,l.UG)({...S,...e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&"next"===e.didYouMean.queryCorrectionMode,options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&"legacy"===e.didYouMean.queryCorrectionMode},...y&&{cq:y},...b.length&&{facets:b},...e.pagination&&{numberOfResults:d(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:w}},...e.generatedAnswer&&{pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:e.generatedAnswer.fieldsToIncludeInCitations}}}})};function d(e){return e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>a.t?a.t-e.pagination.firstResult:e.pagination.numberOfResults:void 0}function f(e){let{field:t,label:r,values:n}=e;return{field:t,label:r,currentValues:n.filter(e=>"selected"===e.state)}}function p(e){return(0,i.g)(e).map(e=>{let t=e.currentValues,r=t.some(({state:e})=>"idle"!==e),n=t.some(e=>e.previousState);return!e.generateAutomaticRanges||r||n?e:{...e,currentValues:[]}})}function h(e){let t=e.advancedSearchQueries?.cq.trim()||"",r=Object.values(e.tabSet||{}).find(e=>e.isActive);
6return[t,r?.expression.trim()||"",...u(e)].filter(e=>!!e).join(" AND ")}},60052:()=>{},60501:(e,t,r)=>{"use strict";function n(e,t){let r=t.id;r in e||(e[r]={id:"",completions:[],responseId:"",count:5,currentRequestId:"",error:null,partialQueries:[],isLoading:!1,...t})}function i(e,t){let r=e[t.meta.arg.id];r&&(r.currentRequestId=t.meta.requestId,r.isLoading=!0)}function a(e,t){let r=e[t.meta.arg.id];r&&(r.error=t.payload||null,r.isLoading=!1)}function s(e,t){let r=e[t.id];r&&(r.responseId="",r.completions=[],r.partialQueries=[])}r.d(t,{S:()=>i,Vn:()=>a,Wj:()=>s,g$:()=>n})},60508:(e,t,r)=>{"use strict";r.d(t,{F:()=>eI});var n,i=r(63272),a=r(69285),s=r(3800),o=r(78752),u=class extends Error{issues;constructor(e){super(e[0].message),this.name="SchemaError",this.issues=e}},l=(r(94833),(n=l||{}).uninitialized="uninitialized",n.pending="pending",n.fulfilled="fulfilled",n.rejected="rejected",n),c="uninitialized",d="pending",f="fulfilled",p="rejected";function h(e){return{status:e,isUninitialized:e===c,isLoading:e===d,isSuccess:e===f,isError:e===p}}var g=i.Qd;function m(e,t,r){return e.reduce((e,n,i)=>(t(n,i)&&e.push(r(n,i)),e),[]).flat()}function v(e){return null!=e}function y(e){return[...e?.values()??[]].filter(v)}function b(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}var w=()=>new Map,S=(...e)=>fetch(...e),E=e=>e.status>=200&&e.status<=299;function I(e){if(!(0,i.Qd)(e))return e;let t={...e};for(let[e,r]of Object.entries(t))void 0===r&&delete t[e];return t}var A=class{constructor(e,t){this.value=e,this.meta=t}value;meta};async function k(e=0,t=5,r){let n=~~((Math.random()+.4)*(300<<Math.min(e,t)));await new Promise((e,t)=>{let i=setTimeout(()=>e(),n);r&&(r.aborted?(clearTimeout(i),t(Error("Aborted"))):r.addEventListener("abort",()=>{clearTimeout(i),t(Error("Aborted"))},{once:!0}))})}function C(e,t){throw Object.assign(new A({error:e,meta:t}),{throwImmediately:!0})}function T(e){e.aborted&&C({status:"CUSTOM_ERROR",error:"Aborted"})}var _={},O=Object.assign((e,t)=>async(r,n,i)=>{let[a]=[5,(t||_).maxRetries,(i||_).maxRetries].filter(e=>void 0!==e).slice(-1),s={maxRetries:a,backoff:k,retryCondition:(e,t,{attempt:r})=>r<=a,...t,...i},o=0;for(;;){T(n.signal);try{let t=await e(r,n,i);if(t.error)throw new A(t);return t}catch(e){if(o++,e.throwImmediately){if(e instanceof A)return e.value;throw e}if(e instanceof A){if(!s.retryCondition(e.value.error,r,{attempt:o,baseQueryApi:n,extraOptions:i}))return e.value}else if(o>s.maxRetries)return{error:e};T(n.signal);try{await s.backoff(o,s.maxRetries,n.signal)}catch(e){throw T(n.signal),e}}}},{fail:C}),x="__rtkq/",R="focused",N=(0,a.VP)(`${x}${R}`),P=(0,a.VP)(`${x}un${R}`),q=(0,a.VP)(`${x}online`),j=(0,a.VP)(`${x}offline`),D="query",M="mutation",U="infinitequery";function F(e){return e.type===D}function L(e){return e.type===U}function V(e){return F(e)||L(e)}function $(e,t,r,n,i,a){let s="function"==typeof e?e(t,r,n,i):e;return s?m(s,v,e=>a(G(e))):[]}function G(e){return"string"==typeof e?{type:e}:e}var z=(e,t)=>e.endpointDefinitions[t],Q=Symbol("forceQueryFn"),H=e=>"function"==typeof e[Q],Y=class extends u{constructor(e,t,r,n){super(e),this.value=t,this.schemaName=r,this._bqMeta=n}value;schemaName;_bqMeta},B=(e,t)=>Array.isArray(e)?e.includes(t):!!e;async function K(e,t,r,n){let i=await e["~standard"].validate(t);if(i.issues)throw new Y(i.issues,t,r,n);return i.value}function W(e){return e}var X=(e={})=>({...e,[a.cN]:!0});function Z(e,{pages:t,pageParams:r},n){let i=t.length-1;return e.getNextPageParam(t[i],t,r[i],r,n)}function J(e,{pages:t,pageParams:r},n){return e.getPreviousPageParam?.(t[0],t,r[0],r,n)}function ee(e,t,r,n){return $(r[e.meta.arg.endpointName][t],(0,a.sf)(e)?e.payload:void 0,(0,a.WA)(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,n)}function et(e){return(0,s.Qx)(e)?(0,s.ss)(e):e}function er(e,t,r){let n=e[t];n&&r(n)}function en(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function ei(e,t,r){let n=e[en(t)];n&&r(n)}var ea={},es=Symbol.for("RTKQ/skipToken"),eo={status:c},eu=(0,s.jM)(eo,()=>{}),el=(0,s.jM)(eo,()=>{}),ec=WeakMap?new WeakMap:void 0,ed=({endpointName:e,queryArgs:t})=>{let r="",n=ec?.get(t);if("string"==typeof n)r=n;else{let e=JSON.stringify(t,(e,t)=>(t="bigint"==typeof t?{$bigint:t.toString()}:t,t=(0,i.Qd)(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t));(0,i.Qd)(t)&&ec?.set(t,e),r=e}return`${e}(${r})`};function ef(e,...t){return Object.assign(e,...t)}var ep=({reducerPath:e,api:t,queryThunk:r,context:n,internalState:i,selectors:{selectQueryEntry:s,selectConfig:o},getRunningQueryThunk:u,mwApi:l})=>{let{removeQueryResult:c,unsubscribeQueryResult:d,cacheEntriesUpserted:f}=t.internalActions,p=(0,a.i0)(d.match,r.fulfilled,r.rejected,f.match);function h(e){let t=i.currentSubscriptions.get(e);return!!t&&t.size>0}let g={};function m(e){for(let t of e.values())t?.abort?.()}function v(e,t,r){let i=t.getState();for(let a of e){let e=s(i,a);e?.endpointName&&function(e,t,r,i){let a=z(n,t),o=a?.keepUnusedData
6For??i.keepUnusedDataFor;if(o===1/0)return;let l=Math.max(0,Math.min(o,2147482.647));if(!h(e)){let t=g[e];t&&clearTimeout(t),g[e]=setTimeout(()=>{if(!h(e)){let t=s(r.getState(),e);if(t?.endpointName){let e=r.dispatch(u(t.endpointName,t.originalArgs));e?.abort()}r.dispatch(c({queryCacheKey:e}))}delete g[e]},1e3*l)}}(a,e.endpointName,t,r)}}return(e,r)=>{let a=o(r.getState());if(p(e)){let t;if(f.match(e))t=e.payload.map(e=>e.queryDescription.queryCacheKey);else{let{queryCacheKey:r}=d.match(e)?e.payload:e.meta.arg;t=[r]}v(t,r,a)}if(t.util.resetApiState.match(e)){for(let[e,t]of Object.entries(g))t&&clearTimeout(t),delete g[e];m(i.runningQueries),m(i.runningMutations)}if(n.hasRehydrationInfo(e)){let{queries:t}=n.extractRehydrationInfo(e);v(Object.keys(t),r,a)}}},eh=Error("Promise never resolved before cacheEntryRemoved."),eg=({api:e,reducerPath:t,context:r,queryThunk:n,mutationThunk:i,internalState:s,selectors:{selectQueryEntry:o,selectApiState:u}})=>{let l=(0,a.$S)(n),c=(0,a.$S)(i),d=(0,a.sf)(n,i),f={},{removeQueryResult:p,removeMutationResult:h,cacheEntriesUpserted:g}=e.internalActions;function m(e,t,r){let n=f[e];n?.valueResolved&&(n.valueResolved({data:t,meta:r}),delete n.valueResolved)}function v(e){let t=f[e];t&&(delete f[e],t.cacheEntryRemoved())}function y(e){let{arg:t,requestId:r}=e.meta,{endpointName:n,originalArgs:i}=t;return[n,i,r]}function b(t,n,i,a,s){let o=z(r,t),u=o?.onCacheEntryAdded;if(!u)return;let l={},c=new Promise(e=>{l.cacheEntryRemoved=e}),d=Promise.race([new Promise(e=>{l.valueResolved=e}),c.then(()=>{throw eh})]);d.catch(()=>{}),f[i]=l;let p=e.endpoints[t].select(V(o)?n:i),h=a.dispatch((e,t,r)=>r),g={...a,getCacheEntry:()=>p(a.getState()),requestId:s,extra:h,updateCachedData:V(o)?r=>a.dispatch(e.util.updateQueryData(t,n,r)):void 0,cacheDataLoaded:d,cacheEntryRemoved:c};Promise.resolve(u(n,g)).catch(e=>{if(e!==eh)throw e})}return(r,a,s)=>{var u;let w=l(u=r)?u.meta.arg.queryCacheKey:c(u)?u.meta.arg.fixedCacheKey??u.meta.requestId:p.match(u)?u.payload.queryCacheKey:h.match(u)?en(u.payload):"";function S(e,t,r,n){let i=o(s,t),u=o(a.getState(),t);!i&&u&&b(e,n,t,a,r)}if(n.pending.match(r)){let[e,t,n]=y(r);S(e,w,n,t)}else if(g.match(r))for(let{queryDescription:e,value:t}of r.payload){let{endpointName:n,originalArgs:i,queryCacheKey:a}=e;S(n,a,r.meta.requestId,i),m(a,t,{})}else if(i.pending.match(r)){if(a.getState()[t].mutations[w]){let[e,t,n]=y(r);b(e,t,w,a,n)}}else if(d(r))m(w,r.payload,r.meta.baseQueryMeta);else if(p.match(r)||h.match(r))v(w);else if(e.util.resetApiState.match(r))for(let e of Object.keys(f))v(e)}},em=({api:e,context:{apiUid:t},reducerPath:r})=>(r,n)=>{e.util.resetApiState.match(r)&&n.dispatch(e.internalActions.middlewareRegistered(t))},ev=({reducerPath:e,context:t,context:{endpointDefinitions:r},mutationThunk:n,queryThunk:i,api:s,assertTagType:o,refetchQuery:u,internalState:l})=>{let{removeQueryResult:d}=s.internalActions,f=(0,a.i0)((0,a.sf)(n),(0,a.WA)(n)),p=(0,a.i0)((0,a.sf)(i,n),(0,a.TK)(i,n)),h=[],g=0;function m(r,n){let i=n.getState(),a=i[e];if(h.push(...r),"delayed"===a.config.invalidationBehavior&&g>0)return;let o=h;if(h=[],0===o.length)return;let f=s.util.selectInvalidatedBy(i,o);t.batch(()=>{for(let{queryCacheKey:e}of Array.from(f.values())){let t=a.queries[e],r=b(l.currentSubscriptions,e,w);t&&(0===r.size?n.dispatch(d({queryCacheKey:e})):t.status!==c&&n.dispatch(u(t)))}})}return(e,t)=>{(i.pending.match(e)||n.pending.match(e))&&g++,p(e)&&(g=Math.max(0,g-1)),f(e)?m(ee(e,"invalidatesTags",r,o),t):p(e)?m([],t):s.util.invalidateTags.match(e)&&m($(e.payload,void 0,void 0,void 0,void 0,o),t)}},ey=({reducerPath:e,queryThunk:t,api:r,refetchQuery:n,internalState:i})=>{let{currentPolls:a,currentSubscriptions:s}=i,o=new Set,u=null;function l(t,r){o.add(t),u||(u=setTimeout(()=>{for(let t of o)!function({queryCacheKey:t},r){let n=r.getState()[e].queries[t],i=s.get(t);if(!n||n.status===c)return;let{lowestPollingInterval:o}=p(i);if(!Number.isFinite(o))return f(t);let u=a.get(t),l=Date.now()+o;(!u||l<u.nextPollTimestamp)&&d({queryCacheKey:t},r)}({queryCacheKey:t},r);o.clear(),u=null},0))}function d({queryCacheKey:t},r){let i=r.getState()[e],o=i.queries[t],u=s.get(t);if(!o||o.status===c)return;let{lowestPollingInterval:l,skipPollingIfUnfocused:f}=p(u);if(!Number.isFinite(l))return;let h=a.get(t);h?.timeout&&(clearTimeout(h.timeout),h.timeout=void 0);let g=Date.now()+l;a.set(t,{nextPollTimestamp:g,pollingInterval:l,timeout:setTimeout(()=>{(i.config.focused||!f)&&r.dispatch(n(o)),d({queryCacheKey:t},r)},l)})}function f(e){let t=a.get(e);t?.timeout&&clearTimeout(t.timeout),a.delete(e)}function p(e=new Map){let t=!1,r=1/0;for(let n of e.values())n.pollingInterval&&(r=Math.min(n.pollingInterval,r),t=n.skipPollingIfUnfocused||t);return{lowestPollingInterval:r,skipPollingIfUnfocused:t}}return(e,n)=>{(r.internalActions.updateSubscriptionOptions.match(e)||r.internalActions.unsubscribeQueryResult.match(e))&&l(e.payload.queryCacheKey,n),(t.pen
6ding.match(e)||t.rejected.match(e)&&e.meta.condition)&&l(e.meta.arg.queryCacheKey,n),(t.fulfilled.match(e)||t.rejected.match(e)&&!e.meta.condition)&&d(e.meta.arg,n),r.util.resetApiState.match(e)&&(function(){for(let e of a.keys())f(e)}(),u&&(clearTimeout(u),u=null),o.clear())}},eb=({api:e,context:t,queryThunk:r,mutationThunk:n})=>{let i=(0,a.mm)(r,n),s=(0,a.TK)(r,n),o=(0,a.sf)(r,n),u={};return(r,n)=>{if(i(r)){let{requestId:i,arg:{endpointName:a,originalArgs:s}}=r.meta,o=z(t,a),l=o?.onQueryStarted;if(l){let t={},r=new Promise((e,r)=>{t.resolve=e,t.reject=r});r.catch(()=>{}),u[i]=t;let c=e.endpoints[a].select(V(o)?s:i),d=n.dispatch((e,t,r)=>r),f={...n,getCacheEntry:()=>c(n.getState()),requestId:i,extra:d,updateCachedData:V(o)?t=>n.dispatch(e.util.updateQueryData(a,s,t)):void 0,queryFulfilled:r};l(s,f)}}else if(o(r)){let{requestId:e,baseQueryMeta:t}=r.meta;u[e]?.resolve({data:r.payload,meta:t}),delete u[e]}else if(s(r)){let{requestId:e,rejectedWithValue:t,baseQueryMeta:n}=r.meta;u[e]?.reject({error:r.payload??r.error,isUnhandledError:!t,meta:n}),delete u[e]}}},ew=Symbol(),eS=function(...e){return function(t){let r=(0,o.X4)(e=>t.extractRehydrationInfo?.(e,{reducerPath:t.reducerPath??"api"})),n={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...t,extractRehydrationInfo:r,serializeQueryArgs(e){let r=ed;if("serializeQueryArgs"in e.endpointDefinition){let t=e.endpointDefinition.serializeQueryArgs;r=e=>{let r=t(e);return"string"==typeof r?r:ed({...e,queryArgs:r})}}else t.serializeQueryArgs&&(r=t.serializeQueryArgs);return r(e)},tagTypes:[...t.tagTypes||[]]},i={endpointDefinitions:{},batch(e){e()},apiUid:(0,a.Ak)(),extractRehydrationInfo:r,hasRehydrationInfo:(0,o.X4)(e=>null!=r(e))},s={injectEndpoints:function(e){for(let[t,r]of Object.entries(e.endpoints({query:e=>({...e,type:D}),mutation:e=>({...e,type:M}),infiniteQuery:e=>({...e,type:U})}))){if(!0!==e.overrideExisting&&t in i.endpointDefinitions){if("throw"===e.overrideExisting)throw Error((0,a.gk)(39));continue}for(let e of(i.endpointDefinitions[t]=r,u))e.injectEndpoint(t,r)}return s},enhanceEndpoints({addTagTypes:e,endpoints:t}){if(e)for(let t of e)n.tagTypes.includes(t)||n.tagTypes.push(t);if(t)for(let[e,r]of Object.entries(t))"function"==typeof r?r(z(i,e)):Object.assign(z(i,e)||{},r);return s}},u=e.map(e=>e.init(s,n,i));return s.injectEndpoints({endpoints:t.endpoints})}}((({createSelector:e=o.Mz}={})=>({name:ew,init(t,{baseQuery:r,tagTypes:n,reducerPath:o,serializeQueryArgs:u,keepUnusedDataFor:l,refetchOnMountOrArgChange:S,refetchOnFocus:E,refetchOnReconnect:I,invalidationBehavior:k,onSchemaFailure:C,catchSchemaFailure:T,skipSchemaValidation:_},O){(0,s.YT)();let x=e=>e;Object.assign(t,{reducerPath:o,endpoints:{},internalActions:{onOnline:q,onOffline:j,onFocus:N,onFocusLost:P},util:{}});let R=function({serializeQueryArgs:e,reducerPath:t,createSelector:r}){let n=e=>eu,i=e=>el;return{buildQuerySelector:function(e,t){return l(e,t,a)},buildInfiniteQuerySelector:function(e,t){let{infiniteQueryOptions:r}=t;return l(e,t,function(e){var t,n,i,a,s,o;let u={...e,...h(e.status)},{isLoading:l,isError:c,direction:d}=u,f="forward"===d,p="backward"===d;return{...u,hasNextPage:(t=r,n=u.data,i=u.originalArgs,!!n&&null!=Z(t,n,i)),hasPreviousPage:(a=r,s=u.data,o=u.originalArgs,!!s&&!!a.getPreviousPageParam&&null!=J(a,s,o)),isFetchingNextPage:l&&f,isFetchingPreviousPage:l&&p,isFetchNextPageError:c&&f,isFetchPreviousPageError:c&&p}})},buildMutationSelector:function(){return e=>{let n;return r((n="object"==typeof e?en(e)??es:e)===es?i:e=>(function(e){return e[t]})(e)?.mutations?.[n]??el,a)}},selectInvalidatedBy:function(e,r){let n=e[t],i=new Set;for(let e of m(r,v,G)){let t=n.provided.tags[e.type];if(t)for(let r of(void 0!==e.id?t[e.id]:Object.values(t).flat())??[])i.add(r)}return Array.from(i.values()).flatMap(e=>{let t=n.queries[e];return t?{queryCacheKey:e,endpointName:t.endpointName,originalArgs:t.originalArgs}:[]})},selectCachedArgsForQuery:function(e,t){return m(Object.values(o(e)),e=>e?.endpointName===t&&e.status!==c,e=>e.originalArgs)},selectApiState:s,selectQueries:o,selectMutations:function(e){return function(e){return e[t]}(e)?.mutations},selectQueryEntry:u,selectConfig:function(e){return function(e){return e[t]}(e)?.config}};function a(e){return{...e,...h(e.status)}}function s(e){return e[t]}function o(e){return e[t]?.queries}function u(e,t){return o(e)?.[t]}function l(t,i,a){return s=>{if(s===es)return r(n,a);let o=e({queryArgs:s,endpointDefinition:i,endpointName:t});return r(e=>u(e,o)??eu,a)}}}({serializeQueryArgs:u,reducerPath:o,createSelector:e}),{selectInvalidatedBy:U,selectCachedArgsForQuery:V,buildQuerySelector:eo,buildInfiniteQuerySelector:ec,buildMutationSelector:ed}=R;ef(t.util,{selectInvalidatedBy:U,selectCachedArgsForQuery:V}
6);let{queryThunk:eh,infiniteQueryThunk:eS,mutationThunk:eE,patchQueryData:eI,updateQueryData:eA,upsertQueryData:ek,prefetch:eC,buildMatchThunkActions:eT}=function({reducerPath:e,baseQuery:t,context:{endpointDefinitions:r},serializeQueryArgs:n,api:i,assertTagType:o,selectors:u,onSchemaFailure:l,catchSchemaFailure:d,skipSchemaValidation:f}){function p(e,t,r=0){let n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}function h(e,t,r=0){let n=[...e,t];return r&&n.length>r?n.slice(1):n}let g=(e,t)=>e.query&&e[t]?e[t]:W,m=async(e,{signal:n,abort:i,rejectWithValue:a,fulfillWithValue:s,dispatch:o,getState:c,extra:m})=>{let y=r[e.endpointName],{metaSchema:b,skipSchemaValidation:w=f}=y,S=e.type===D;try{let r,a=W,l={signal:n,abort:i,dispatch:o,getState:c,extra:m,endpoint:e.endpointName,type:e.type,forced:S?v(e,c()):void 0,queryCacheKey:S?e.queryCacheKey:void 0},d=S?e[Q]:void 0,f=async(t,r,n,i)=>{if(null==r&&t.pages.length)return Promise.resolve({data:t});let a={queryArg:e.originalArgs,pageParam:r},s=await E(a),o=i?p:h;return{data:{pages:o(t.pages,s.data,n),pageParams:o(t.pageParams,r,n)},meta:s.meta}};async function E(e){let r,{extraOptions:n,argSchema:i,rawResponseSchema:s,responseSchema:o}=y;if(i&&!B(w,"arg")&&(e=await K(i,e,"argSchema",{})),d?r=d():y.query?(a=g(y,"transformResponse"),r=await t(y.query(e),l,n)):r=await y.queryFn(e,l,n,e=>t(e,l,n)),r.error)throw new A(r.error,r.meta);let{data:u}=r;s&&!B(w,"rawResponse")&&(u=await K(s,r.data,"rawResponseSchema",r.meta));let c=await a(u,r.meta,e);return o&&!B(w,"response")&&(c=await K(o,c,"responseSchema",r.meta)),{...r,data:c}}if(S&&"infiniteQueryOptions"in y){let t,{infiniteQueryOptions:n}=y,{maxPages:i=1/0}=n,a=e.refetchCachedPages??n.refetchCachedPages??!0,s=u.selectQueryEntry(c(),e.queryCacheKey)?.data,o=(!v(e,c())||e.direction)&&s?s:{pages:[],pageParams:[]};if("direction"in e&&e.direction&&o.pages.length){let r="backward"===e.direction,a=(r?J:Z)(n,o,e.originalArgs);t=await f(o,a,i,r)}else{let{initialPageParam:r=n.initialPageParam}=e,u=s?.pageParams??[],l=u[0]??r,c=u.length;if(t=await f(o,l,i),d&&(t={data:t.data.pages[0]}),a)for(let r=1;r<c;r++){let r=Z(n,t.data,e.originalArgs);t=await f(t.data,r,i)}}r=t}else r=await E(e.originalArgs);return b&&!B(w,"meta")&&r.meta&&(r.meta=await K(b,r.meta,"metaSchema",r.meta)),s(r.data,X({fulfilledTimeStamp:Date.now(),baseQueryMeta:r.meta}))}catch(r){let t=r;if(t instanceof A){let r=g(y,"transformErrorResponse"),{rawErrorResponseSchema:n,errorResponseSchema:i}=y,{value:s,meta:o}=t;try{n&&!B(w,"rawErrorResponse")&&(s=await K(n,s,"rawErrorResponseSchema",o)),b&&!B(w,"meta")&&(o=await K(b,o,"metaSchema",o));let t=await r(s,o,e.originalArgs);return i&&!B(w,"errorResponse")&&(t=await K(i,t,"errorResponseSchema",o)),a(t,X({baseQueryMeta:o}))}catch(e){t=e}}try{if(t instanceof Y){let r={endpoint:e.endpointName,arg:e.originalArgs,type:e.type,queryCacheKey:S?e.queryCacheKey:void 0};y.onSchemaFailure?.(t,r),l?.(t,r);let{catchSchemaFailure:n=d}=y;if(n)return a(n(t,r),X({baseQueryMeta:t._bqMeta}))}}catch(e){t=e}throw console.error(t),t}};function v(e,t){let r=u.selectQueryEntry(t,e.queryCacheKey),n=u.selectConfig(t).refetchOnMountOrArgChange,i=r?.fulfilledTimeStamp,a=e.forceRefetch??(e.subscribe&&n);return!!a&&(!0===a||(Number(new Date)-Number(i))/1e3>=a)}let y=()=>(0,a.zD)(`${e}/executeQuery`,m,{getPendingMeta({arg:e}){let t=r[e.endpointName];return X({startedTimeStamp:Date.now(),...L(t)?{direction:e.direction}:{}})},condition(e,{getState:t}){let n=t(),i=u.selectQueryEntry(n,e.queryCacheKey),a=i?.fulfilledTimeStamp,s=e.originalArgs,o=i?.originalArgs,l=r[e.endpointName],c=e.direction;return!!H(e)||i?.status!=="pending"&&(!!(v(e,n)||F(l)&&l?.forceRefetch?.({currentArg:s,previousArg:o,endpointState:i,state:n}))||!a||!!c)},dispatchConditionRejection:!0}),b=y(),w=y();function S(e){return t=>t?.meta?.arg?.endpointName===e}return{queryThunk:b,mutationThunk:(0,a.zD)(`${e}/executeMutation`,m,{getPendingMeta:()=>X({startedTimeStamp:Date.now()})}),infiniteQueryThunk:w,prefetch:(e,t,r={})=>(n,a)=>{let s="force"in r&&r.force,o="ifOlderThan"in r&&r.ifOlderThan,u=(r=!0)=>i.endpoints[e].initiate(t,{forceRefetch:r,subscribe:!1}),l=i.endpoints[e].select(t)(a());if(s)n(u());else if(o){let e=l?.fulfilledTimeStamp;if(!e)return void n(u());(Number(new Date)-Number(new Date(e)))/1e3>=o&&n(u())}else n(u(!1))},updateQueryData:(e,t,r,n=!0)=>(a,o)=>{let u,l=i.endpoints[e].select(t)(o()),d={patches:[],inversePatches:[],undo:()=>a(i.util.patchQueryData(e,t,d.inversePatches,n))};if(l.status===c)return d;if("data"in l)if((0,s.a6)(l.data)){let[e,t,n]=(0,s.vI)(l.data,r);d.patches.push(...t),d.inversePatches.push(...n),u=e}else u=r(l.data),d.patches.push({op:"replace",path:[],value:u}),d.inversePatches.push({op:"replace",path:[],value:l.data});return 0===d.patches.length||a(i.util.patchQueryData(e,t,d.patches,n)),d},upsertQueryData:(e,t,r)=>n=>n(i.endpoints[e].initiate(t,{subscribe:!1,forceRefetch:!0,[Q]:()=>({data:r})})),patchQueryData:(e,t,a,s)=>(u,l)=>{let c=r[e],d=n({queryArgs:t,endpointDefinition:c,endpointName:e});if(u(i.internalActions.queryResultPatched({queryCacheKey:d,patches:a})),!s)return;let f=i.endpoints[e].select(t)(l()),p=$(c.providesTags,f.data,void 0,t,{},o);u(i.internalActions.updateProvidedBy([{queryCacheKey:d,providedTags:p}]))},buildMatchThunkActions:function(e,t){return{matchPending:(0,a.f$)((0,a.mm)(e),S(t)),matchFulfilled:(0,a.f$)((0,a.sf)(e),S(t)),matchRejected:(0,a.f$)((0,a.TK)(e),S(t))}}}}({baseQuery:r,reducerPath:o,context:O,api:t,serializeQueryArgs:u,assertTagType:x,selectors:R,onSchemaFailure:C,catchSchemaFailure:T,skipSchemaValidation:_}),{reducer:e_,actions:eO}=function({reducerPath:e,queryThunk:t,mutationThunk:r,serializeQueryArgs:n,context:{endpointDefinitions:o,apiUid:u,extractRehydrationInfo:l,hasRehydrationInfo:h},assertTagType:m,config:v}){let y=(0,a.VP)(`${e}/resetApiState`);function b(e,t,r,n){e[t.queryCacheKey]??={status:c,endpointName:t.endpointName},er(e,t.queryCacheKey,e=>
6{e.status=d,e.requestId=r&&e.requestId?e.requestId:n.requestId,void 0!==t.originalArgs&&(e.originalArgs=t.originalArgs),e.startedTimeStamp=n.startedTimeStamp,L(o[n.arg.endpointName])&&"direction"in t&&(e.direction=t.direction)})}function w(e,t,r,n){er(e,t.arg.queryCacheKey,e=>{if(e.requestId!==t.requestId&&!n)return;let{merge:i}=o[t.arg.endpointName];if(e.status=f,i)if(void 0!==e.data){let{fulfilledTimeStamp:n,arg:a,baseQueryMeta:o,requestId:u}=t,l=(0,s.jM)(e.data,e=>i(e,r,{arg:a.originalArgs,baseQueryMeta:o,fulfilledTimeStamp:n,requestId:u}));e.data=l}else e.data=r;else e.data=o[t.arg.endpointName].structuralSharing??!0?function e(t,r){if(t===r||!(g(t)&&g(r)||Array.isArray(t)&&Array.isArray(r)))return r;let n=Object.keys(r),i=Object.keys(t),a=n.length===i.length,s=Array.isArray(r)?[]:{};for(let i of n)s[i]=e(t[i],r[i]),a&&(a=t[i]===s[i]);return a?t:s}((0,s.Qx)(e.data)?(0,s.c2)(e.data):e.data,r):r;delete e.error,e.fulfilledTimeStamp=t.fulfilledTimeStamp})}let S=(0,a.Z0)({name:`${e}/queries`,initialState:ea,reducers:{removeQueryResult:{reducer(e,{payload:{queryCacheKey:t}}){delete e[t]},prepare:(0,a.aA)()},cacheEntriesUpserted:{reducer(e,t){for(let r of t.payload){let{queryDescription:n,value:i}=r;b(e,n,!0,{arg:n,requestId:t.meta.requestId,startedTimeStamp:t.meta.timestamp}),w(e,{arg:n,requestId:t.meta.requestId,fulfilledTimeStamp:t.meta.timestamp,baseQueryMeta:{}},i,!0)}},prepare:e=>({payload:e.map(e=>{let{endpointName:t,arg:r,value:i}=e,a=o[t];return{queryDescription:{type:D,endpointName:t,originalArgs:e.arg,queryCacheKey:n({queryArgs:r,endpointDefinition:a,endpointName:t})},value:i}}),meta:{[a.cN]:!0,requestId:(0,a.Ak)(),timestamp:Date.now()}})},queryResultPatched:{reducer(e,{payload:{queryCacheKey:t,patches:r}}){er(e,t,e=>{e.data=(0,s.$i)(e.data,r.concat())})},prepare:(0,a.aA)()}},extraReducers(e){e.addCase(t.pending,(e,{meta:t,meta:{arg:r}})=>{let n=H(r);b(e,r,n,t)}).addCase(t.fulfilled,(e,{meta:t,payload:r})=>{let n=H(t.arg);w(e,t,r,n)}).addCase(t.rejected,(e,{meta:{condition:t,arg:r,requestId:n},error:i,payload:a})=>{er(e,r.queryCacheKey,e=>{if(t);else{if(e.requestId!==n)return;e.status=p,e.error=a??i}})}).addMatcher(h,(e,t)=>{let{queries:r}=l(t);for(let[t,n]of Object.entries(r))(n?.status===f||n?.status===p)&&(e[t]=n)})}}),E=(0,a.Z0)({name:`${e}/mutations`,initialState:ea,reducers:{removeMutationResult:{reducer(e,{payload:t}){let r=en(t);r in e&&delete e[r]},prepare:(0,a.aA)()}},extraReducers(e){e.addCase(r.pending,(e,{meta:t,meta:{requestId:r,arg:n,startedTimeStamp:i}})=>{n.track&&(e[en(t)]={requestId:r,status:d,endpointName:n.endpointName,startedTimeStamp:i})}).addCase(r.fulfilled,(e,{payload:t,meta:r})=>{r.arg.track&&ei(e,r,e=>{e.requestId===r.requestId&&(e.status=f,e.data=t,e.fulfilledTimeStamp=r.fulfilledTimeStamp)})}).addCase(r.rejected,(e,{payload:t,error:r,meta:n})=>{n.arg.track&&ei(e,n,e=>{e.requestId===n.requestId&&(e.status=p,e.error=t??r)})}).addMatcher(h,(e,t)=>{let{mutations:r}=l(t);for(let[t,n]of Object.entries(r))(n?.status===f||n?.status===p)&&t!==n?.requestId&&(e[t]=n)})}}),I=(0,a.Z0)({name:`${e}/invalidation`,initialState:{tags:{},keys:{}},reducers:{updateProvidedBy:{reducer(e,t){for(let{queryCacheKey:r,providedTags:n}of t.payload){for(let{type:t,id:i}of(A(e,r),n)){let n=(e.tags[t]??={})[i||"__internal_without_id"]??=[];n.includes(r)||n.push(r)}e.keys[r]=n}},prepare:(0,a.aA)()}},extraReducers(e){e.addCase(S.actions.removeQueryResult,(e,{payload:{queryCacheKey:t}})=>{A(e,t)}).addMatcher(h,(e,t)=>{let{provided:r}=l(t);for(let[t,n]of Object.entries(r.tags??{}))for(let[i,a]of Object.entries(n)){let n=(e.tags[t]??={})[i||"__internal_without_id"]??=[];for(let t of a)n.includes(t)||n.push(t),e.keys[t]=r.keys[t]}}).addMatcher((0,a.i0)((0,a.sf)(t),(0,a.WA)(t)),(e,t)=>{k(e,[t])}).addMatcher(S.actions.cacheEntriesUpserted.match,(e,t)=>{k(e,t.payload.map(({queryDescription:e,value:t})=>({type:"UNKNOWN",payload:t,meta:{requestStatus:"fulfilled",requestId:"UNKNOWN",arg:e}})))})}});function A(e,t){for(let r of et(e.keys[t]??[])){let n=r.type,i=r.id??"__internal_without_id",a=e.tags[n]?.[i];a&&(e.tags[n][i]=et(a).filter(e=>e!==t))}delete e.keys[t]}function k(e,t){let r=t.map(e=>{let t=ee(e,"providesTags",o,m),{queryCacheKey:r}=e.meta.arg;return{queryCacheKey:r,providedTags:t}});I.caseReducers.updateProvidedBy(e,I.actions.updateProvidedBy(r))}let C=(0,a.Z0)({name:`${e}/subscriptions`,initialState:ea,reducers:{updateSubscriptionOptions(e,t){},unsubscribeQueryResult(e,t){},internal_getRTKQSubscriptions(){}}}),T=(0,a.Z0)({name:`${e}/internalSubscriptions`,initialState:ea,reducers:{subscriptionsUpdated:{reducer:(e,t)=>(0,s.$i)(e,t.payload),prepare:(0,a.aA)()}}}),_=(0,a.Z0)({name:`${e}/config`,initialState:{online:"u"<typeof navigator||void 0===navigator.onLine||navigator.onLine,focu
6sed:"u"<typeof document||"hidden"!==document.visibilityState,middlewareRegistered:!1,...v},reducers:{middlewareRegistered(e,{payload:t}){e.middlewareRegistered="conflict"!==e.middlewareRegistered&&u===t||"conflict"}},extraReducers:e=>{e.addCase(q,e=>{e.online=!0}).addCase(j,e=>{e.online=!1}).addCase(N,e=>{e.focused=!0}).addCase(P,e=>{e.focused=!1}).addMatcher(h,e=>({...e}))}}),O=(0,i.HY)({queries:S.reducer,mutations:E.reducer,provided:I.reducer,subscriptions:T.reducer,config:_.reducer});return{reducer:(e,t)=>O(y.match(t)?void 0:e,t),actions:{..._.actions,...S.actions,...C.actions,...T.actions,...E.actions,...I.actions,resetApiState:y}}}({context:O,queryThunk:eh,infiniteQueryThunk:eS,mutationThunk:eE,serializeQueryArgs:u,reducerPath:o,assertTagType:x,config:{refetchOnFocus:E,refetchOnReconnect:I,refetchOnMountOrArgChange:S,keepUnusedDataFor:l,reducerPath:o,invalidationBehavior:k}});ef(t.util,{patchQueryData:eI,updateQueryData:eA,upsertQueryData:ek,prefetch:eC,resetApiState:eO.resetApiState,upsertQueryEntries:eO.cacheEntriesUpserted}),ef(t.internalActions,eO);let ex=new WeakMap,eR=e=>b(ex,e,()=>({currentSubscriptions:new Map,currentPolls:new Map,runningQueries:new Map,runningMutations:new Map})),{buildInitiateQuery:eN,buildInitiateInfiniteQuery:eP,buildInitiateMutation:eq,getRunningMutationThunk:ej,getRunningMutationsThunk:eD,getRunningQueriesThunk:eM,getRunningQueryThunk:eU}=function({serializeQueryArgs:e,queryThunk:t,infiniteQueryThunk:r,mutationThunk:n,api:i,context:a,getInternalState:s}){let o=e=>s(e)?.runningQueries,u=e=>s(e)?.runningMutations,{unsubscribeQueryResult:l,removeMutationResult:c,updateSubscriptionOptions:d}=i.internalActions;return{buildInitiateQuery:function(e,t){return f(e,t)},buildInitiateInfiniteQuery:function(e,t){return f(e,t)},buildInitiateMutation:function(e){return(t,{track:r=!0,fixedCacheKey:i}={})=>(a,s)=>{var o,l;let d=a(n({type:"mutation",endpointName:e,originalArgs:t,track:r,fixedCacheKey:i})),{requestId:f,abort:p,unwrap:h}=d,g=Object.assign((o=d.unwrap().then(e=>({data:e})),l=e=>({error:e}),o.catch(l)),{arg:d.arg,requestId:f,abort:p,unwrap:h,reset:()=>{a(c({requestId:f,fixedCacheKey:i}))}}),m=u(a);return m.set(f,g),g.then(()=>{m.delete(f)}),i&&(m.set(i,g),g.then(()=>{m.get(i)===g&&m.delete(i)})),g}},getRunningQueryThunk:function(t,r){return n=>{let i=e({queryArgs:r,endpointDefinition:z(a,t),endpointName:t});return o(n)?.get(i)}},getRunningMutationThunk:function(e,t){return e=>u(e)?.get(t)},getRunningQueriesThunk:function(){return e=>y(o(e))},getRunningMutationsThunk:function(){return e=>y(u(e))}};function f(n,a){let s=(u,{subscribe:c=!0,forceRefetch:f,subscriptionOptions:p,[Q]:h,...g}={})=>(m,v)=>{let y,b=e({queryArgs:u,endpointDefinition:a,endpointName:n}),w={...g,type:D,subscribe:c,forceRefetch:f,subscriptionOptions:p,endpointName:n,originalArgs:u,queryCacheKey:b,[Q]:h};if(F(a))y=t(w);else{let{direction:e,initialPageParam:t,refetchCachedPages:n}=g;y=r({...w,direction:e,initialPageParam:t,refetchCachedPages:n})}let S=i.endpoints[n].select(u),E=m(y),I=S(v()),{requestId:A,abort:k}=E,C=I.requestId!==A,T=o(m)?.get(b),_=()=>S(v()),O=Object.assign(h?E.then(_):C&&!T?Promise.resolve(I):Promise.all([T,E]).then(_),{arg:u,requestId:A,subscriptionOptions:p,queryCacheKey:b,abort:k,async unwrap(){let e=await O;if(e.isError)throw e.error;return e.data},refetch:e=>m(s(u,{subscribe:!1,forceRefetch:!0,...e})),unsubscribe(){c&&m(l({queryCacheKey:b,requestId:A}))},updateSubscriptionOptions(e){O.subscriptionOptions=e,m(d({endpointName:n,requestId:A,queryCacheKey:b,options:e}))}});if(!T&&!C&&!h){let e=o(m);e.set(b,O),O.then(()=>{e.delete(b)})}return O};return s}}({queryThunk:eh,mutationThunk:eE,infiniteQueryThunk:eS,api:t,serializeQueryArgs:u,context:O,getInternalState:eR});ef(t.util,{getRunningMutationThunk:ej,getRunningMutationsThunk:eD,getRunningQueryThunk:eU,getRunningQueriesThunk:eM});let{middleware:eF,actions:eL}=function(e){let{reducerPath:t,queryThunk:r,api:n,context:o,getInternalState:u}=e,{apiUid:l}=o,d={invalidateTags:(0,a.VP)(`${t}/invalidateTags`)},f=e=>e.type.startsWith(`${t}/`),p=[em,ep,ev,ey,eg,eb];return{middleware:r=>{let a=!1,d=u(r.dispatch),g={...e,internalState:d,refetchQuery:h,isThisApiSliceAction:f,mwApi:r},m=p.map(e=>e(g)),v=(({api:e,queryThunk:t,internalState:r,mwApi:n})=>{let i=`${e.reducerPath}
6/subscriptions`,a=null,o=null,{updateSubscriptionOptions:u,unsubscribeQueryResult:l}=e.internalActions,c=()=>r.currentSubscriptions,d={getSubscriptions:c,getSubscriptionCount:e=>{let t=c().get(e);return t?.size??0},isRequestSubscribed:(e,t)=>{let r=c();return!!r?.get(e)?.get(t)}};function f(e){return JSON.parse(JSON.stringify(Object.fromEntries([...e].map(([e,t])=>[e,Object.fromEntries(t)]))))}return(n,c)=>{if(a||(a=f(r.currentSubscriptions)),e.util.resetApiState.match(n))return a={},r.currentSubscriptions.clear(),o=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(n))return[!1,d];let p=((r,n)=>{if(u.match(n)){let{queryCacheKey:e,requestId:t,options:i}=n.payload,a=r.get(e);return a?.has(t)&&a.set(t,i),!0}if(l.match(n)){let{queryCacheKey:e,requestId:t}=n.payload,i=r.get(e);return i&&i.delete(t),!0}if(e.internalActions.removeQueryResult.match(n))return r.delete(n.payload.queryCacheKey),!0;if(t.pending.match(n)){let{meta:{arg:e,requestId:t}}=n,i=b(r,e.queryCacheKey,w);return e.subscribe&&i.set(t,e.subscriptionOptions??i.get(t)??{}),!0}let i=!1;if(t.rejected.match(n)){let{meta:{condition:e,arg:t,requestId:a}}=n;if(e&&t.subscribe){let e=b(r,t.queryCacheKey,w);e.set(a,t.subscriptionOptions??e.get(a)??{}),i=!0}}return i})(r.currentSubscriptions,n),h=!0;if(p){o||(o=setTimeout(()=>{let t=f(r.currentSubscriptions),[,n]=(0,s.vI)(a,()=>t);c.next(e.internalActions.subscriptionsUpdated(n)),a=t,o=null},500));let u="string"==typeof n.type&&!!n.type.startsWith(i),l=t.rejected.match(n)&&n.meta.condition&&!!n.meta.arg.subscribe;h=!u&&!l}return[h,!1]}})(g),y=(({reducerPath:e,context:t,api:r,refetchQuery:n,internalState:i})=>{let{removeQueryResult:a}=r.internalActions;function s(r,s){let o=r.getState()[e],u=o.queries,l=i.currentSubscriptions;t.batch(()=>{for(let e of l.keys()){let t=u[e],i=l.get(e);if(!i||!t)continue;let d=[...i.values()];(d.some(e=>!0===e[s])||d.every(e=>void 0===e[s])&&o.config[s])&&(0===i.size?r.dispatch(a({queryCacheKey:e})):t.status!==c&&r.dispatch(n(t)))}})}return(e,t)=>{N.match(e)&&s(t,"refetchOnFocus"),q.match(e)&&s(t,"refetchOnReconnect")}})(g);return e=>s=>{let u;if(!(0,i.ve)(s))return e(s);a||(a=!0,r.dispatch(n.internalActions.middlewareRegistered(l)));let c={...r,next:e},d=r.getState(),[p,h]=v(s,c,d);if(u=p?e(s):h,r.getState()[t]&&(y(s,c,d),f(s)||o.hasRehydrationInfo(s)))for(let e of m)e(s,c,d);return u}},actions:d};function h(t){return e.api.endpoints[t.endpointName].initiate(t.originalArgs,{subscribe:!1,forceRefetch:!0})}}({reducerPath:o,context:O,queryThunk:eh,mutationThunk:eE,infiniteQueryThunk:eS,api:t,assertTagType:x,selectors:R,getRunningQueryThunk:eU,getInternalState:eR});return ef(t.util,eL),ef(t,{reducer:e_,middleware:eF}),{name:ew,injectEndpoint(e,r){let n=t.endpoints[e]??={};F(r)&&ef(n,{name:e,select:eo(e,r),initiate:eN(e,r)},eT(eh,e)),r.type===M&&ef(n,{name:e,select:ed(),initiate:eq(e)},eT(eE,e)),L(r)&&ef(n,{name:e,select:ec(e,r),initiate:eP(e,r)},eT(eh,e))}}}}))()),eE=r(35521);let eI=eS({reducerPath:"answer",baseQuery:O(async(e,t,r)=>{let n=t.getState(),{accessToken:a,environment:s,organizationId:o}=n.configuration,u=n.generatedAnswer.answerConfigurationId,l={...e,headers:{...e?.headers||{},Authorization:`Bearer ${a}`}};try{let e=(0,eE.Yk)(n.configuration.search?.apiBaseUrl,o,s);return(function({baseUrl:e,prepareHeaders:t=e=>e,fetchFn:r=S,paramsSerializer:n,isJsonContentType:a=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||""),jsonContentType:s="application/json",jsonReplacer:o,timeout:u,responseHandler:l,validateStatus:c,...d}={}){return"u"<typeof fetch&&r===S&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(p,h,g)=>{let m,v,y,b,w,{getState:S,extra:A,endpoint:k,forced:C,type:T}=h,{url:_,headers:O=new Headers(d.headers),params:x,responseHandler:R=l??"json",validateStatus:N=c??E,timeout:P=u,...q}="string"==typeof p?{url:p}:p,j={...d,signal:P?((...e)=>{for(let t of e)if(t.aborted)return AbortSignal.abort(t.reason);let t=new AbortController;for(let r of e)r.addEventListener("abort",()=>t.abort(r.reason),{signal:t.signal,once:!0});return t.signal})(h.signal,(b=new AbortController,setTimeout(()=>{let e="signal timed out",t="TimeoutError";b.abort("u">typeof DOMException?new DOMException(e,t):Object.assign(Error(e),{name:t}))},P),b.signal)):h.signal,...q};O=new Headers(I(O)),j.headers=await t(O,{getState:S,arg:p,extra:A,endpoint:k,forced:C,type:T,extraOptions:g})||O;let D="object"==typeof(w=j.body)&&((0,i.Qd)(w)||Array.isArray(w)||"function"==typeof w.toJSON);if(null==j.body||D||"string"==typeof j.body||j.headers.delete("content-type"),!j.headers.has("content-type")&&D&&j.headers.set("content-type",s),D&&a(j.headers)&&(j.body=JSON.stringify(j.body,o)),j.headers.has("accept")||("json"===R?j.headers.set("accept","application/json"):"text"===R&&j.headers.set("accept","text/plain, text/html, */*")),x){let e=~_.indexOf("?")?"&":"?";_+=e+(n?n(x):new URLSearchParams(I(x)))}
6let M=new Request(_=function(e,t){var r;if(!e)return t;if(!t)return e;if(r=t,RegExp("(^|:)//").test(r))return t;let n=e.endsWith("/")||!t.startsWith("?")?"/":"";return e=e.replace(/\/$/,""),t=t.replace(/^\//,""),`${e}${n}${t}`}(e,_),j);m={request:new Request(_,j)};try{v=await r(M)}catch(e){return{error:{status:(e instanceof Error||"u">typeof DOMException&&e instanceof DOMException)&&"TimeoutError"===e.name?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(e)},meta:m}}let U=v.clone();m.response=U;let F="";try{let e;if(await Promise.all([f(v,R).then(e=>y=e,t=>e=t),U.text().then(e=>F=e,()=>{})]),e)throw e}catch(e){return{error:{status:"PARSING_ERROR",originalStatus:v.status,data:F,error:String(e)},meta:m}}return N(v,y)?{data:y,meta:m}:{error:{status:v.status,data:y},meta:m}};async function f(e,t){if("function"==typeof t)return t(e);if("content-type"===t&&(t=a(e.headers)?"json":"text"),"json"===t){let t=await e.text();return t.length?JSON.parse(t):null}return e.text()}})({baseUrl:`${e}/rest/organizations/${o}/answer/v1/configs/${u}`})(l,t,r)}catch(e){return{error:e}}},{maxRetries:3}),endpoints:()=>({})})},60624:(e,t,r)=>{"use strict";function n(){return{contextValues:{}}}r.d(t,{h:()=>n})},61166:(e,t,r)=>{"use strict";r.d(t,{z:()=>n});let n=["idle","selected","excluded"]},62547:(e,t,r)=>{"use strict";r.d(t,{YB:()=>u,gx:()=>s,hk:()=>c,r7:()=>l,xB:()=>a});var n,i,a,s,o=r(65179);(n=a||(a={})).Ascending="ascending",n.Descending="descending",(i=s||(s={})).Relevancy="relevancy",i.QRE="qre",i.Date="date",i.Field="field",i.NoSort="nosort";let u=e=>{if((0,o.cy)(e))return e.map(e=>u(e)).join(",");switch(e.by){case s.Relevancy:case s.QRE:case s.NoSort:return e.by;case s.Date:return`date ${e.order}`;case s.Field:return`@${e.field} ${e.order}`;default:return""}},l=()=>({by:s.Relevancy}),c=new o.Bo({values:{by:new o.RS({enum:s,required:!0}),order:new o.RS({enum:a}),field:new o.hU}})},62743:(e,t,r)=>{"use strict";r.d(t,{r:()=>C,z:()=>k});var n=r(64060),i=r(71950),a=r(37472),s=r(13437),o=r(59730),u=r(63517),l=r(914),c=r(70171),d=r(52103),f=r(14729),p=r(65179),h=r(69285),g=r(47882),m=r(64379),v=r(76469),y=r(93758);let b={facetId:m.k,selection:new p.Bo({values:y.BE})},w=(0,h.zD)("numericFacet/executeToggleSelect",(e,{dispatch:t,extra:{validatePayload:r}})=>{r(e,b),t((0,f.kd)(e)),t((0,v.f)(e)),t((0,g.L)())});(0,h.zD)("numericFacet/executeToggleExclude",(e,{dispatch:t,extra:{validatePayload:r}})=>{r(e,b),t((0,f.QH)(e)),t((0,v.y)(e)),t((0,g.L)())});var S=r(82487),E=r(90078),I=r(46443),A=r(21226);function k(e){return{endInclusive:!1,state:"idle",...e}}function C(e,t){e.addReducers({numericFacetSet:s.b,configuration:n.H,search:u.J}),!1;let r=function(e,t){e.addReducers({numericFacetSet:s.b,facetOptions:c._,configuration:n.H,search:u.J}),!1;var r=t.options;if(!r.generateAutomaticRanges&&void 0===r.currentValues)throw Error("currentValues should be specified for buildNumericFacet when generateAutomaticRanges is false.");let i=e.dispatch,a=(0,E.m)(e,t.options),o=t.options.tabs??{},l=(0,S.g)(e.state.tabSet),p={currentValues:[],...t.options,facetId:a,tabs:o,activeTab:l};(0,A.X)(e,p),i((0,f.UK)(p));let h=(0,I.K)(e,{facetId:a,getRequest:()=>e.state.numericFacetSet[a].request});return{...h,toggleSelect:e=>i(w({facetId:a,selection:e})),toggleSingleSelect(e){"idle"===e.state&&i((0,d.ge)(a)),this.toggleSelect(e)},get state(){return h.state}}}(e,t),l=e.dispatch;return{...r,deselectAll(){r.deselectAll(),l((0,o.kB)({legacy:(0,i.qq)(r.state.facetId),next:(0,i.G6)()}))},sortBy(e){r.sortBy(e),l((0,o.kB)({legacy:(0,i.H7)({facetId:r.state.facetId,criterion:e})}))},toggleSelect:e=>{r.toggleSelect(e),l((0,o.kB)({legacy:(0,a.V_)(r.state.facetId,e),next:(0,a.Nu)(e)}))},get state(){return{...r.state}}}}},63272:(e,t,r)=>{"use strict";function n(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. `}r.d(t,{HY:()=>l,Qd:()=>o,Tw:()=>d,Zz:()=>c,ve:()=>f,y$:()=>u});var i="function"==typeof Symbol&&Symbol.observable||"@@observable",a=()=>Math.random().toString(36).substring(7).split("").join("."),s={INIT:`@@redux/INIT${a()}`,REPLACE:`@@redux/REPLACE${a()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${a()}`};function o(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function u(e,t,r){if("function"!=typeof e)throw Error(n(2));if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw Error(n(0));if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw Error(n(1));return r(u)(e,t)}let a=e,l=t,c=new Map,d=c,f=0,p=!1;
6function h(){d===c&&(d=new Map,c.forEach((e,t)=>{d.set(t,e)}))}function g(){if(p)throw Error(n(3));return l}function m(e){if("function"!=typeof e)throw Error(n(4));if(p)throw Error(n(5));let t=!0;h();let r=f++;return d.set(r,e),function(){if(t){if(p)throw Error(n(6));t=!1,h(),d.delete(r),c=null}}}function v(e){if(!o(e))throw Error(n(7));if(void 0===e.type)throw Error(n(8));if("string"!=typeof e.type)throw Error(n(17));if(p)throw Error(n(9));try{p=!0,l=a(l,e)}finally{p=!1}return(c=d).forEach(e=>{e()}),e}return v({type:s.INIT}),{dispatch:v,subscribe:m,getState:g,replaceReducer:function(e){if("function"!=typeof e)throw Error(n(10));a=e,v({type:s.REPLACE})},[i]:function(){return{subscribe(e){if("object"!=typeof e||null===e)throw Error(n(11));function t(){e.next&&e.next(g())}return t(),{unsubscribe:m(t)}},[i](){return this}}}}}function l(e){let t,r=Object.keys(e),i={};for(let t=0;t<r.length;t++){let n=r[t];"function"==typeof e[n]&&(i[n]=e[n])}let a=Object.keys(i);try{Object.keys(i).forEach(e=>{let t=i[e];if(void 0===t(void 0,{type:s.INIT}))throw Error(n(12));if(void 0===t(void 0,{type:s.PROBE_UNKNOWN_ACTION()}))throw Error(n(13))})}catch(e){t=e}return function(e={},r){if(t)throw t;let s=!1,o={};for(let t=0;t<a.length;t++){let u=a[t],l=i[u],c=e[u],d=l(c,r);if(void 0===d)throw r&&r.type,Error(n(14));o[u]=d,s=s||d!==c}return(s=s||a.length!==Object.keys(e).length)?o:e}}function c(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce((e,t)=>(...r)=>e(t(...r)))}function d(...e){return t=>(r,i)=>{let a=t(r,i),s=()=>{throw Error(n(15))},o={getState:a.getState,dispatch:(e,...t)=>s(e,...t)};return s=c(...e.map(e=>e(o)))(a.dispatch),{...a,dispatch:s}}}function f(e){return o(e)&&"type"in e&&"string"==typeof e.type}},63488:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7931),i=r(20129);t.DelayFactory=function(e,t){var r,a=(r=e).delayFirstAttempt?new i.AlwaysDelay(r):new n.SkipFirstDelay(r);return a.setAttemptNumber(t),a}},63517:(e,t,r)=>{"use strict";r.d(t,{J:()=>f});var n=r(69285),i=r(40687),a=r(53330),s=r(59730),o=r(29534);function u(e,t){let r=t.payload??null;r&&(e.response=(0,o.B)().response,e.results=[],e.questionAnswer=(0,o.U)()),e.error=r,e.isLoading=!1}function l(e,t){e.error=null,e.response=t.payload.response,e.queryExecuted=t.payload.queryExecuted,e.duration=t.payload.duration,e.isLoading=!1}function c(e,t){e.isLoading=!0,e.searchAction=t.meta.arg.next,e.requestId=t.meta.requestId}function d(e,t){e.isLoading=!0,e.searchAction={actionCause:i.d.browseResults},e.requestId=t.meta.requestId}let f=(0,n.vy)((0,o.B)(),e=>{e.addCase(s.kB.rejected,(e,t)=>u(e,t)),e.addCase(s.qs.rejected,(e,t)=>u(e,t)),e.addCase(s.ae.rejected,(e,t)=>u(e,t)),e.addCase(s.kB.fulfilled,(e,t)=>{l(e,t),e.results=t.payload.response.results.map(e=>({...e,searchUid:t.payload.response.searchUid})),e.searchResponseId=t.payload.response.searchUid,e.questionAnswer=t.payload.response.questionAnswer,e.extendedResults=t.payload.response.extendedResults}),e.addCase(s.qs.fulfilled,(e,t)=>{l(e,t),e.results=[...e.results,...t.payload.response.results.map(e=>({...e,searchUid:t.payload.response.searchUid}))]}),e.addCase(s.ae.fulfilled,(e,t)=>{l(e,t),e.results=[...t.payload.response.results.map(e=>({...e,searchUid:t.payload.response.searchUid}))]}),e.addCase(s.Sw.fulfilled,(e,t)=>{e.response.facets=t.payload.response.facets,e.response.searchUid=t.payload.response.searchUid}),e.addCase(s.kB.pending,c),e.addCase(s.qs.pending,d),e.addCase(s.ae.pending,c),e.addCase(s.g,(e,t)=>{e.searchAction=t.payload}),e.addCase(a.N,(e,t)=>{e.error=t.payload,e.isLoading=!1})})},63590:(e,t,r)=>{"use strict";r.d(t,{o:()=>s});var n=r(65179),i=r(69285),a=r(58604);let s=(0,i.VP)("query/updateQuery",e=>(0,a.rq)(e,{q:new n.hU,enableQuerySyntax:new n.Ci}))},64060:(e,t,r)=>{"use strict";r.d(t,{H:()=>n});let n=r(24323).p},64268:(e,t,r)=>{"use strict";r.d(t,{U:()=>s});var n=r(40180),i=r(48444),a=r(65463);n.extend(a),n.extend(i);let s=()=>({organizationId:"",accessToken:"",search:{locale:"en-US",timezone:n.tz.guess(),authenticationProviders:[]},analytics:{enabled:!0,originContext:"Search",originLevel2:"default",originLevel3:"default",anonymous:!1,deviceId:"",userDisplayName:"",documentLocation:"",analyticsMode:"next",source:{}},knowledge:{answerConfigurationId:"",agentId:void 0},environment:"prod"})},64379:(e,t,r)=>{"use strict";r.d(t,{k:()=>n});let n=r(58604).r3},64627:(e,t,r)=>{var n=r(11868),i=r(72785),a=r(10756),s=r(83836),o=r(10843),u=r(20680);e.exports=function(e,t,r){t=n(t,e);for(var l=-1,c=t.length,d=!1;++l<c;){var f=u(t[l]);if(!(d=null!=e&&r(e,f)))break;e=e[f]}return d||++l!=c?d:!!(c=null==e?0:e.length)&&o(c)&&s(f,c)&&(a(e)||i(e))}},64823:(e,t,r)=>{"use strict";r.d(t,{GE:()=>s,Jh:()=>a,xo:()=>i});var n=r(93600);
6class i extends Error{constructor(){super(),this.name="InvalidControllerDefinition",this.message=`A controller must be defined for at least one solution type: ${Object.keys(n.o).map(e=>e.toLowerCase()).join(", ")}`}}class a extends Error{constructor(e){super(),this.name="MissingControllerProps",this.message=`${e} props are required but were undefined. Ensure they are included when calling \`fetchStaticState\` or \`hydrateStaticState\`.`}}class s extends Error{constructor(e){super(),this.name="MultipleRecommendationError",this.message=`Multiple recommendation controllers found for the same slotId: ${e}. Only one recommendation controller per slotId is supported.`}}},65179:(e,t,r)=>{"use strict";r.d(t,{Bo:()=>g,Ci:()=>u,Kg:()=>h,RS:()=>b,Sj:()=>i,WT:()=>a,b0:()=>s,cy:()=>y,fv:()=>n,hU:()=>p,hX:()=>o,lS:()=>c,v:()=>v});var n=class extends Error{constructor(e){super(e),this.name="SchemaValidationError"}},i=class{constructor(e){this.definition=e}validate(e={},t=""){let r={...this.default,...e},i=[];for(let e in this.definition){let t=this.definition[e].validate(r[e]);t&&i.push(`${e}: ${t}`)}if(i.length)throw new n(`
7  The following properties are invalid:
8
9    ${i.join("\n	")}
10  
11  ${t}
12  `);return r}get default(){let e={};for(let t in this.definition){let r=this.definition[t].default;void 0!==r&&(e[t]=r)}return e}},a=class{constructor(e={}){this.baseConfig=e}validate(e){return this.baseConfig.required&&o(e)?"value is required.":null}get default(){return this.baseConfig.default instanceof Function?this.baseConfig.default():this.baseConfig.default}get required(){return!0===this.baseConfig.required}};function s(e){return void 0===e}function o(e){return s(e)||null===e}var u=class{value;constructor(e={}){this.value=new a(e)}validate(e){var t;let r=this.value.validate(e);return r||(s(t=e)||l(t)?null:"value is not a boolean.")}get default(){return this.value.default}get required(){return this.value.required}};function l(e){return"boolean"==typeof e}var c=class{constructor(e={}){this.config=e,this.value=new a(e)}value;validate(e){var t;let r=this.value.validate(e);return r||(s(t=e)||d(t)?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 d(e){return"number"==typeof e&&!Number.isNaN(e)}var f=/^\d{4}(-\d\d(-\d\d(T\d\d:\d\d(:\d\d)?(\.\d+)?(([+-]\d\d:\d\d)|Z)?)?)?)?$/i,p=class{value;config;constructor(e={}){this.config={emptyAllowed:!0,url:!1,...e},this.value=new a(this.config)}validate(e){let{emptyAllowed:t,url:r,regex:n,constrainTo:i,ISODate:a}=this.config,o=this.value.validate(e);if(o)return o;if(s(e))return null;if(!h(e))return"value is not a string.";if(!t&&!e.length)return"value is an empty string.";if(r)try{new URL(e)}catch(e){return"value is not a valid URL."}if(n&&!n.test(e))return`value did not match provided regex ${n}`;if(i&&!i.includes(e)){let e=i.join(", ");return`value should be one of: ${e}.`}return a&&!(f.test(e)&&"Invalid Date"!==new Date(e).toString())?"value is not a valid ISO8601 date string":null}get default(){return this.value.default}get required(){return this.value.required}};function h(e){return"[object String]"===Object.prototype.toString.call(e)}var g=class{config;constructor(e={}){this.config={options:{required:!1},values:{},...e}}validate(e){if(s(e))return this.config.options.required?"value is required and is currently undefined":null;if(!m(e))return"value is not an object";for(let[t,r]of Object.entries(this.config.values))if(r.required&&o(e[t]))return`value does not contain ${t}`;let t="";for(let[r,n]of Object.entries(this.config.values)){let i=e[r],a=n.validate(i);null!==a&&(t+=` ${a}`)}return""===t?null:t}get default(){}get required(){return!!this.config.options.required}};function m(e){return void 0!==e&&"object"==typeof e}var v=class{constructor(e={}){this.config=e,this.value=new a(this.config)}value;validate(e){if(!o(e)&&!Array.isArray(e))return"value is not an array";let t=this.value.validate(e);if(null!==t)return t;if(o(e))return null;if(void 0!==this.config.max&&e.length>this.config.max)return`value contains more than ${this.config.max}`;if(void 0!==this.config.min&&e.length<this.config.min)return`value contains less than ${this.config.min}`;if(void 0!==this.config.each){let t="";return e.forEach(r=>{this.config.each.required&&o(r)&&(t=`value is null or undefined: ${e.join(",")}`);let n=this.validatePrimitiveValue(r,this.config.each);null!==n&&(t+=` ${n}`)}),""===t?null:t}return null}validatePrimitiveValue(e,t){return l(e)||h(e)?t.validate(e):d(e)?t.validate(e):m(e)?t.validate(e):"value is not a primitive value"}get default(){}get required(){return this.value.required}};function y(e){return Array.isArray(e)}var b=class{constructor(e){this.config=e,this.value=new a(e)}value;validate(e){let t=this.value.validate(e);return null!==t?t:s(e)||Object.values(this.config.enum).find(t=>t===e)?null:"value is not in enum."}get default(){return this.value.default}get required(){return this.value.required}}},65463:function(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,i,a){var s=i.prototype;a.utc=function(e){var t={date:e,utc:!0,args:arguments};return new i(t)},s.utc=function(t){var r=a(this.toDate(),{locale:this.$L,utc:!0});return t?r.add(this.utcOffset(),e):r},s.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var o=s.parse;s.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),o.call(this,e)};var u=s.init;s.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else u.call(this)};var l=s.utcOffset;s.utcOffset=function(n,i){var a=this.$utils().u;if(a(n))return this.$u?0:a(this.$offset)?l.call(this):this.$offset;if("string"==typeof n&&null===(n=function(e){void 0===e&&(e="");var n=e.match(t);if(!n)return null;var i=(""+n[0]).match(r)||["-",0,0],a=i[0],s=60*i[1]+ +i[2];return 0===s?0:"+"===a?s:-s}(n)))return this;var s=16>=Math.abs(n)?60*n:n;if(0===s)return this.utc(i);var o=this.clone();if(i)return o.$offset=s,o.$u=!1,o;var u=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();return(o=this.local().add(s+u,e)).$offset=s,o.$x.$localOffset=u,o};var c=s.format;s.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},s.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},s.isUTC=function(){return!!this.$u},s.toISOString=function(){return this.toDate().toISOString()},s.toString=function(){return this.toDate().toUTCString()};var d=s.toDate;s.toDate=function(e){return"s"===e&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var f=s.diff;s.diff=function(e,t,r){if(e&&this.$u===e.$u)return f.call(this,e,t,r);var n=this.local(),i=a(e).local();return f.call(n,i,t,r)}}}()},65570:(e,t,r)=>{"use strict";function n(e){var t;if(!e||!((t=e)&&/^[A-Za-z0-9_-]{2,}(?:\.[A-Za-z0-9_-]{2,}){2}$/.test(t)))return null;try{let t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),r=atob(t),n=decodeURIComponent(r.split("").map(e=>`%${`00${e.charCodeAt(0).toString(16)}`.slice(-2)}`).join(""));return JSON.parse(n)}catch(e){return null}}function i(e,t=60){if(!e)return!1;let r=n(e);if(!r||"number"!=typeof r.exp)return!1;let a=Math.floor(Date.now()/1e3);return r.exp<=a+t}r.d(t,{Q:()=>i,f:()=>n})},66200:(e,t,r)=>{"use strict";function n(){return{}}r.d(t,{N:()=>n})},66208:(e,t,r)=>{"use strict";r.d(t,{VJ:()=>a});var n=r(65179),i=r(22478);let a=(e,t)=>(0,n.hX)(e[t])?(0,n.hX)(e.raw[t])?null:e.raw[t]:e[t]},67539:(e,t,r)=>{"use strict";r.d(t,{kB:()=>i,lc:()=>a,UG:()=>s,_L:()=>o});var n=r(74891);let i=()=>({dateFacetValueMap:{}});function a(e,t){if("dateRange"===e.type){let{facetId:r,currentValues:i}=e;return t.dateFacetValueMap[r]={},{...e,currentValues:i.map(e=>{var i,a,s,o,u;let l,c;return i=e,a=r,s=t,l=i.start,c=i.end,(0,n.o6)(l)&&(l=(0,n.RH)(l),s.dateFacetValueMap[a][o=l,`start${o}`]=i.start),(0,n.o6)(c)&&(c=(0,n.RH)(c),s.dateFacetValueMap[a][u=c,`end${u}`]=i.end),{...i,start:l,end:c}})}}return e}function s(e){let t=i();return{request:{...e,facets:e.facets?.map(e=>a(e,t))},mappings:t}}function o(e,t){return"success"in e?{success:{...e.success,facets:e.success.facets?.map(e=>e.facetId in t.dateFacetValueMap?{...e,values:e.values.map(r=>{var n,i,a;return n=e.facetId,{...r,start:t.dateFacetValueMap[n][i=r.start,`start${i}`]||r.start,end:t.dateFacetValueMap[n][a=r.end,`end${a}`]||r.end}})}:e)}}:e}},67553:(e,t,r)=>{"use strict";r.d(t,{m:()=>s});var n=r(65179),i=r(69285),a=r(58604);let s=(0,i.VP)("facet/updateFacetAutoSelection",e=>(0,a.rq)(e,{allow:new n.Ci({required:!0})}))},68092:(e,t,r)=>{"use strict";r.d(t,{O:()=>n});let n=()=>({q:"",enableQuerySyntax:!1})},68143:(e,t,r)=>{var n=r(19475),i=r(27377),a=r(94186),s=r(93551),o=r(2377),u=r(93440),l=r(20680);e.exports=function(e,t){return s(e)&&o(t)?u(l(e),t):function(r){var s=i(r,e);return void 0===s&&s===t?a(r,e):n(t,s,3)}}},68704:(e,t,r)=>{var n=r(51666),i=r(68143),a=r(40933),s=r(10756),o=r(47242);e.exports=function(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?s(e)?i(e[0],e[1]):n(e):o(e)}},69096:(e,t,r)=>{"use strict";r.d(t,{W5:()=>l,_U:()=>s,a7:()=>a,wt:()=>c,x3:()=>o,z6:()=>u});var n=r(40180),i=r(99344);n.extend(i);let a="YYYY/MM/DD@HH:mm:ss";function s(e,t){let r=n(e,t);return r.isValid()||t?r:n(e,a)}function o(e){return e.format(a)}function u(e){return o(s(e))===e}function l(e,t){let r=s(e,t);if(!r.isValid()){let r=` with the format "${t}"`;throw Error(`Could not parse the provided date "${e}
12"${t?r:". Please provide a date format string in the configuration options. See https://day.js.org/docs/en/parse/string-format for more information."}`)}c(r)}function c(e){if(e.isBefore("1401-01-01"))throw Error(`Date is before year 1401, which is unsupported by the API: ${e}`)}},69201:(e,t,r)=>{"use strict";r.d(t,{F:()=>s});var n=r(95155),i=r(12115);let a=(0,r(84348).E)((0,i.forwardRef)((e,t)=>(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e,children:(0,n.jsx)("path",{stroke:"currentColor",strokeWidth:1.5,d:"M11.825 3.091a.188.188 0 0 1 .35 0l2.161 5.738 6.16.268a.188.188 0 0 1 .108.334l-4.824 3.811 1.648 5.901a.187.187 0 0 1-.284.207L12 15.97l-5.144 3.38a.187.187 0 0 1-.284-.207l1.648-5.901-4.824-3.811a.188.188 0 0 1 .108-.334l6.16-.268z"})}))),s=(0,i.memo)(a)},69279:()=>{},69285:(e,t,r)=>{"use strict";r.d(t,{cN:()=>p,U1:()=>m,VP:()=>l,zD:()=>x,Nc:()=>ed,vy:()=>y,Z0:()=>q,gk:()=>ef,f$:()=>S,i0:()=>w,$S:()=>function e(...t){return 0===t.length?e=>E(e,["pending","fulfilled","rejected"]):I(t)?w(...t.flatMap(e=>[e.pending,e.rejected,e.fulfilled])):e()(t[0])},sf:()=>function e(...t){return 0===t.length?e=>E(e,["fulfilled"]):I(t)?w(...t.map(e=>e.fulfilled)):e()(t[0])},mm:()=>function e(...t){return 0===t.length?e=>E(e,["pending"]):I(t)?w(...t.map(e=>e.pending)):e()(t[0])},TK:()=>A,WA:()=>function e(...t){let r=e=>e&&e.meta&&e.meta.rejectedWithValue;return 0===t.length||I(t)?S(A(...t),r):e()(t[0])},Ak:()=>k,aA:()=>h});var n,i=r(3800),a=r(63272);function s(e){return({dispatch:t,getState:r})=>n=>i=>"function"==typeof i?i(t,r,e):n(i)}var o=s(),u=(r(94833),"u">typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!=arguments.length)return"object"==typeof arguments[0]?a.Zz:a.Zz.apply(null,arguments)});function l(e,t){function r(...n){if(t){let r=t(...n);if(!r)throw Error(ef(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=t=>(0,a.ve)(t)&&t.type===e,r}"u">typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__;var c=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function d(e){return(0,i.a6)(e)?(0,i.jM)(e,()=>{}):e}function f(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}var p="RTK_autoBatch",h=()=>e=>({payload:e,meta:{[p]:!0}}),g=e=>t=>{setTimeout(t,e)};function m(e){let t,r,n,i=function(e){let{thunk:t=!0,immutableCheck:r=!0,serializableCheck:n=!0,actionCreatorCheck:i=!0}=e??{},a=new c;return t&&("boolean"==typeof t?a.push(o):a.push(s(t.extraArgument))),a},{reducer:l,middleware:d,devTools:f=!0,duplicateMiddlewareCheck:h=!0,preloadedState:m,enhancers:v}=e||{};if("function"==typeof l)t=l;else if((0,a.Qd)(l))t=(0,a.HY)(l);else throw Error(ef(1));r="function"==typeof d?d(i):i();let y=a.Zz;f&&(y=u({trace:!1,..."object"==typeof f&&f}));let b=(n=(0,a.Tw)(...r),function(e){let{autoBatch:t=!0}=e??{},r=new c(n);return t&&r.push(((e={type:"raf"})=>t=>(...r)=>{let n,i=t(...r),a=!0,s=!1,o=!1,u=new Set,l="tick"===e.type?queueMicrotask:"raf"===e.type?"u">typeof window&&window.requestAnimationFrame?(n=window.requestAnimationFrame,e=>{let t=!1,r=()=>{t||(t=!0,cancelAnimationFrame(i),clearTimeout(a),e())},i=n(r),a=setTimeout(r,100)}):g(10):"callback"===e.type?e.queueNotification:g(e.timeout),c=()=>{o=!1,s&&(s=!1,u.forEach(e=>e()))};return Object.assign({},i,{subscribe(e){let t=i.subscribe(()=>a&&e());return u.add(e),()=>{t(),u.delete(e)}},dispatch(e){try{return(s=!(a=!e?.meta?.[p]))&&!o&&(o=!0,l(c)),i.dispatch(e)}finally{a=!0}}})})("object"==typeof t?t:void 0)),r}),w=y(..."function"==typeof v?v(b):b());return(0,a.y$)(t,m,w)}function v(e){let t,r={},n=[],i={addCase(e,t){let n="string"==typeof e?e:e.type;if(!n)throw Error(ef(28));if(n in r)throw Error(ef(29));return r[n]=t,i},addAsyncThunk:(e,t)=>(t.pending&&(r[e.pending.type]=t.pending),t.rejected&&(r[e.rejected.type]=t.rejected),t.fulfilled&&(r[e.fulfilled.type]=t.fulfilled),t.settled&&n.push({matcher:e.settled,reducer:t.settled}),i),addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),i),addDefaultCase:e=>(t=e,i)};return e(i),[r,n,t]}function y(e,t){let r,[n,a,s]=v(t);if("function"==typeof e)r=()=>d(e());else{let t=d(e);r=()=>t}function o(e=r(),t){let u=[n[t.type],...a.filter(({matcher:e})=>e(t)).map(({reducer:e})=>e)];return 0===u.filter(e=>!!e).length&&(u=[s]),u.reduce((e,r)=>{if(r)if((0,i.Qx)(e)){let n=r(e,t);return void 0===n?e:n}else{if((0,i.a6)(e))return(0,i.jM)(e,e=>r(e,t));let n=r(e,t);if(void 0===n){if(null===e)return e;throw Error("A case reducer on a non-draftable value must not return undefined")}return n}return e},e)}return o.getInitialState=r,o}var b=(e,t)=>e&&"function"==typeof e.match?e.match(t):e(t);function w(...e){return t=>e.some(e=>b(e,t))}function S(...e){return t=>e.every(e=>b(e,t))}function E(e,t){if(!e||!e.meta)return!1;let r="string"==typeof e.meta.requestId,n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function I(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function A(...e){return 0===e.length?e=>E(e,["rejected"]):I(e)?w(...e.map(e=>e.rejected)):A()(e[0])}var k=(e=21)=>{let t="",r=e;for(;r--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t},C=["name","message","stack","code"],T=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},_=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},O="External signal was aborted",x=(()=>{function e(e,t,r){let n=l(e+"/fulfilled",(e,t,r,n)=>({payload:e,meta:{...n||{},arg:r,requestId:t,requestStatus:"fulfilled"}})),i=l(e+"/pending",(e,t,r)=>({payload:void 0,meta:{...r||{},arg:t,requestId:e,requestStatus:"pending"}})),a=l(e+"/rejected",(e,t,n,i,a)=>({payload:i,error:(r&&r.serializeError||(e=>{if("object"==typeof e&&null!==e){let t={};for(let r of C)"string"==typeof e[r]&&(t[r]=e[r]);return t}return{message:String(e)}}))(e||"Rejected"),meta:{...a||{},arg:n,requestId:t,rejectedWithValue:!!i,requestStatus:"rejected",aborted:e?.name==="AbortError",condition:e?.name==="ConditionError"}}));return Object.assign(function(e,{signal:s}={}){return(o,u,l)=>{let c,d,f=r?.idGenerator?r.idGenerator(e):k(),p=new AbortController;function h(e){d=e,p.abort()}s&&(s.aborted?h(O):s.addEventListener("abort",()=>h(O),{once:!0}));let g=async function(){let s;try{var g;let a=r?.condition?.(e,{getState:u,extra:l});if(g=a,null!==g&&"object"==typeof g&&"function"==typeof g.then&&(a=await a),!1===a||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let m=new Promise((e,t)=>
12{c=()=>{t({name:"AbortError",message:d||"Aborted"})},p.signal.addEventListener("abort",c,{once:!0})});o(i(f,e,r?.getPendingMeta?.({requestId:f,arg:e},{getState:u,extra:l}))),s=await Promise.race([m,Promise.resolve(t(e,{dispatch:o,getState:u,extra:l,requestId:f,signal:p.signal,abort:h,rejectWithValue:(e,t)=>new T(e,t),fulfillWithValue:(e,t)=>new _(e,t)})).then(t=>{if(t instanceof T)throw t;return t instanceof _?n(t.payload,f,e,t.meta):n(t,f,e)})])}catch(t){s=t instanceof T?a(null,f,e,t.payload,t.meta):a(t,f,e)}finally{c&&p.signal.removeEventListener("abort",c)}return r&&!r.dispatchConditionRejection&&a.match(s)&&s.meta.condition||o(s),s}();return Object.assign(g,{abort:h,requestId:f,arg:e,unwrap:()=>g.then(R)})}},{pending:i,rejected:a,fulfilled:n,settled:w(a,n),typePrefix:e})}return e.withTypes=()=>e,e})();function R(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}var N=Symbol.for("rtk-slice-createasyncthunk"),P=((n=P||{}).reducer="reducer",n.reducerWithPrepare="reducerWithPrepare",n.asyncThunk="asyncThunk",n),q=function({creators:e}={}){let t=e?.asyncThunk?.[N];return function(e){let r,{name:n,reducerPath:i=n}=e;if(!n)throw Error(ef(11));let a=("function"==typeof e.reducers?e.reducers(function(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}()):e.reducers)||{},s=Object.keys(a),o={},u={},c={},d=[],p={addCase(e,t){let r="string"==typeof e?e:e.type;if(!r)throw Error(ef(12));if(r in u)throw Error(ef(13));return u[r]=t,p},addMatcher:(e,t)=>(d.push({matcher:e,reducer:t}),p),exposeAction:(e,t)=>(c[e]=t,p),exposeCaseReducer:(e,t)=>(o[e]=t,p)};function h(){let[t={},r=[],n]="function"==typeof e.extraReducers?v(e.extraReducers):[e.extraReducers],i={...t,...u};return y(e.initialState,e=>{for(let t in i)e.addCase(t,i[t]);for(let t of d)e.addMatcher(t.matcher,t.reducer);for(let t of r)e.addMatcher(t.matcher,t.reducer);n&&e.addDefaultCase(n)})}s.forEach(r=>{let i=a[r],s={reducerName:r,type:`${n}/${r}`,createNotation:"function"==typeof e.reducers};"asyncThunk"===i._reducerDefinitionType?function({type:e,reducerName:t},r,n,i){if(!i)throw Error(ef(18));let{payloadCreator:a,fulfilled:s,pending:o,rejected:u,settled:l,options:c}=r,d=i(e,a,c);n.exposeAction(t,d),s&&n.addCase(d.fulfilled,s),o&&n.addCase(d.pending,o),u&&n.addCase(d.rejected,u),l&&n.addMatcher(d.settled,l),n.exposeCaseReducer(t,{fulfilled:s||j,pending:o||j,rejected:u||j,settled:l||j})}(s,i,p,t):function({type:e,reducerName:t,createNotation:r},n,i){let a,s;if("reducer"in n){if(r&&"reducerWithPrepare"!==n._reducerDefinitionType)throw Error(ef(17));a=n.reducer,s=n.prepare}else a=n;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,s?l(e,s):l(e))}(s,i,p)});let g=e=>e,m=new Map,b=new WeakMap;function w(e,t){return r||(r=h()),r(e,t)}function S(){return r||(r=h()),r.getInitialState()}function E(t,r=!1){function n(e){let i=e[t];return void 0===i&&r&&(i=f(b,n,S)),i}function i(t=g){let n=f(m,r,()=>new WeakMap);return f(n,t,()=>{let n={};for(let[i,a]of Object.entries(e.selectors??{}))n[i]=function(e,t,r,n){function i(a,...s){let o=t(a);return void 0===o&&n&&(o=r()),e(o,...s)}return i.unwrapped=e,i}(a,t,()=>f(b,t,S),r);return n})}return{reducerPath:t,getSelectors:i,get selectors(){return i(n)},selectSlice:n}}let I={name:n,reducer:w,actions:c,caseReducers:o,getInitialState:S,...E(i),injectInto(e,{reducerPath:t,...r}={}){let n=t??i;return e.inject({reducerPath:n,reducer:w},r),{...I,...E(n,!0)}}};return I}}();function j(){}var D="listener",M="completed",U="cancelled",F=`task-${U}`,L=`task-${M}`,V=`${D}-${U}`,$=`${D}-${M}`,G=class{constructor(e){this.code=e,this.message=`task ${U} (reason: ${e})`}code;name="TaskAbortError";message},z=(e,t)=>{if("function"!=typeof e)throw TypeError(ef(32))},Q=()=>{},H=(e,t=Q)=>(e.catch(t),e),Y=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),B=e=>{if(e.aborted)throw new G(e.reason)};function K(e,t){let r=Q;return new Promise((n,i)=>{let a=()=>i(new G(e.reason));e.aborted?a():(r=Y(e,a),t.finally(()=>r()).then(n,i))}).finally(()=>{r=Q})}var W=async(e,t)=>{try{await Promise.resolve();let t=await e();return{status:"ok",value:t}}catch(e){return{status:e instanceof G?"cancelled":"rejected",error:e}}finally{t?.()}},X=e=>t=>H(K(e,t).then(t=>(B(e),t))),Z=e=>{let t=X(e);return e=>t(new Promise(t=>setTimeout(t,e)))},{assign:J}=Object,ee={},et="listenerMiddleware",er=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:a}=e;if(t)i=l(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(i);else throw Error(ef(21));return z(a,"options.listener"),{predicate:i,type:t,effect:a}},en=J(e=>{let{type:t,predicate:r,effect:n}=er(e);
12return{id:k(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw Error(ef(22))}}},{withTypes:()=>en}),ei=(e,t)=>{let{type:r,effect:n,predicate:i}=er(t);return Array.from(e.values()).find(e=>("string"==typeof r?e.type===r:e.predicate===i)&&e.effect===n)},ea=e=>{e.pending.forEach(e=>{e.abort(V)})},es=(e,t,r)=>{try{e(t,r)}catch(e){setTimeout(()=>{throw e},0)}},eo=J(l(`${et}/add`),{withTypes:()=>eo}),eu=l(`${et}/removeAll`),el=J(l(`${et}/remove`),{withTypes:()=>el}),ec=(...e)=>{console.error(`${et}/error`,...e)},ed=(e={})=>{let t=new Map,r=new Map,{extra:n,onError:i=ec}=e;z(i,"onError");let s=e=>{var r;return(r=ei(t,e)??en(e)).unsubscribe=()=>t.delete(r.id),t.set(r.id,r),e=>{r.unsubscribe(),e?.cancelActive&&ea(r)}};J(s,{withTypes:()=>s});let o=e=>{let r=ei(t,e);return r&&(r.unsubscribe(),e.cancelActive&&ea(r)),!!r};J(o,{withTypes:()=>o});let u=async(e,a,o,u)=>{var l,c;let d,f=new AbortController,p=(l=f.signal,d=async(e,t)=>{B(l);let r=()=>{},n=[new Promise((t,n)=>{let i=s({predicate:e,effect:(e,r)=>{r.unsubscribe(),t([e,r.getState(),r.getOriginalState()])}});r=()=>{i(),n()}})];null!=t&&n.push(new Promise(e=>setTimeout(e,t,null)));try{let e=await K(l,Promise.race(n));return B(l),e}finally{r()}},(e,t)=>H(d(e,t))),h=[];try{let i;e.pending.add(f),i=r.get(e)??0,r.set(e,i+1),await Promise.resolve(e.effect(a,J({},o,{getOriginalState:u,condition:(e,t)=>p(e,t).then(Boolean),take:p,delay:Z(f.signal),pause:X(f.signal),extra:n,signal:f.signal,fork:(c=f.signal,(e,t)=>{z(e,"taskExecutor");let r=new AbortController;Y(c,()=>r.abort(c.reason));let n=W(async()=>{B(c),B(r.signal);let t=await e({pause:X(r.signal),delay:Z(r.signal),signal:r.signal});return B(r.signal),t},()=>r.abort(L));return t?.autoJoin&&h.push(n.catch(Q)),{result:X(c)(n),cancel(){r.abort(F)}}}),unsubscribe:e.unsubscribe,subscribe:()=>{t.set(e.id,e)},cancelActiveListeners:()=>{e.pending.forEach((e,t,r)=>{e!==f&&(e.abort(V),r.delete(e))})},cancel:()=>{f.abort(V),e.pending.delete(f)},throwIfCancelled:()=>{B(f.signal)}})))}catch(e){e instanceof G||es(i,e,{raisedBy:"effect"})}finally{let t;await Promise.all(h),f.abort($),1===(t=r.get(e)??1)?r.delete(e):r.set(e,t-1),e.pending.delete(f)}},l=()=>{for(let e of r.keys())ea(e);t.clear()};return{middleware:e=>r=>n=>{let c;if(!(0,a.ve)(n))return r(n);if(eo.match(n))return s(n.payload);if(eu.match(n))return void l();if(el.match(n))return o(n.payload);let d=e.getState(),f=()=>{if(d===ee)throw Error(ef(23));return d};try{if(c=r(n),t.size>0){let r=e.getState();for(let a of Array.from(t.values())){let t=!1;try{t=a.predicate(n,r,d)}catch(e){t=!1,es(i,e,{raisedBy:"predicate"})}t&&u(a,n,e,f)}}}finally{d=ee}return c},startListening:s,stopListening:o,clearListeners:l}};function ef(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. `}},69492:(e,t,r)=>{"use strict";r.d(t,{$w:()=>f,Nx:()=>l,XA:()=>c,Zj:()=>d,aZ:()=>u,u$:()=>o});var n=r(65179),i=r(69285),a=r(58604);let s=new n.lS({required:!0,min:0}),o=(0,i.VP)("pagination/registerNumberOfResults",e=>(0,a.rq)(e,s)),u=(0,i.VP)("pagination/updateNumberOfResults",e=>(0,a.rq)(e,s)),l=(0,i.VP)("pagination/registerPage",e=>(0,a.rq)(e,s)),c=(0,i.VP)("pagination/updatePage",e=>(0,a.rq)(e,s)),d=(0,i.VP)("pagination/nextPage"),f=(0,i.VP)("pagination/previousPage")},69643:(e,t,r)=>{"use strict";r.d(t,{L7:()=>i});var n=r(58014);let i=(e,t,r,i)=>{let a=new n.P(`${e.url}${i}`);return a.addParam("organizationId",e.organizationId),e.authentication&&a.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:a.href,origin:"searchApiFetch"}}},70171:(e,t,r)=>{"use strict";r.d(t,{_:()=>p});var n=r(69285),i=r(43995),a=r(52103),s=r(7465),o=r(14729),u=r(71358),l=r(59730),c=r(15389),d=r(47882),f=r(35728);let p=(0,n.vy)((0,f.x)(),e=>{e.addCase(d.L,(e,t)=>({...e,...t.payload})).addCase(l.kB.fulfilled,e=>{e.freezeFacetOrder=!1}).addCase(l.kB.rejected,e=>{e.freezeFacetOrder=!1}).addCase(u.Zg.fulfilled,(e,t)=>t.payload?.facetOptions??e).addCase(i.vi,(e,t)=>{let{facetId:r,tabs:n}=t.payload;h(n,e,r)}
12).addCase(a.pT,(e,t)=>{let{facetId:r,tabs:n}=t.payload;h(n,e,r)}).addCase(s.hd,(e,t)=>{let{facetId:r,tabs:n}=t.payload;h(n,e,r)}).addCase(o.UK,(e,t)=>{let{facetId:r,tabs:n}=t.payload;h(n,e,r)}).addCase(d.bF,(e,t)=>{e.facets[t.payload].enabled=!0}).addCase(d.eV,(e,t)=>{e.facets[t.payload].enabled=!1}).addCase(c.p,(e,t)=>{[...Object.keys(t.payload.f??{}),...Object.keys(t.payload.fExcluded??{}),...Object.keys(t.payload.cf??{}),...Object.keys(t.payload.nf??{}),...Object.keys(t.payload.df??{})].forEach(t=>{t in e||(e.facets[t]=(0,f.b)()),e.facets[t].enabled=!0})})});function h(e,t,r){let n={...(0,f.b)(),tabs:e??{}};t.facets[r]=n}},70445:(e,t,r)=>{"use strict";r.d(t,{QF:()=>I,mq:()=>E,p7:()=>b});var n=r(69285),i=r(87998),a=r(75411),s=r(43995),o=r(51342),u=r(17558),l=r(52103),c=r(7465),d=r(14729),f=r(71358),p=r(59730),h=r(15389),g=r(6466),m=r(69492),v=r(99334),y=r(70766);let b=(0,n.vy)((0,y.y)(),e=>{e.addCase(m.u$,(e,t)=>{let r=S(e),n=t.payload;e.defaultNumberOfResults=e.numberOfResults=n,e.firstResult=(r-1)*n}).addCase(m.aZ,(e,t)=>{e.numberOfResults=t.payload,e.firstResult=0}).addCase(g.$,e=>{e.firstResult=0}).addCase(m.Nx,(e,t)=>{var r;r=t.payload,e.firstResult=(r-1)*e.numberOfResults}).addCase(m.XA,(e,t)=>{var r;r=t.payload,e.firstResult=(r-1)*e.numberOfResults}).addCase(m.$w,e=>{let t=Math.max(S(e)-1,v.I);e.firstResult=(t-1)*e.numberOfResults}).addCase(m.Zj,e=>{let t=Math.min(S(e)+1,function(e){let{totalCountFiltered:t,numberOfResults:r}=e;return I(t,r)}(e));e.firstResult=(t-1)*e.numberOfResults}).addCase(f.Zg.fulfilled,(e,t)=>{t.payload&&(e.numberOfResults=t.payload.pagination.numberOfResults,e.firstResult=t.payload.pagination.firstResult)}).addCase(h.p,(e,t)=>{e.firstResult=t.payload.firstResult??e.firstResult,e.numberOfResults=t.payload.numberOfResults??e.defaultNumberOfResults}).addCase(p.kB.fulfilled,(e,t)=>{let{response:r}=t.payload;e.totalCountFiltered=r.totalCountFiltered}).addCase(p.ae.fulfilled,(e,t)=>{let{response:r}=t.payload;e.totalCountFiltered=r.totalCountFiltered}).addCase(l.ge,e=>{w(e)}).addCase(c.NE,e=>{w(e)}).addCase(l.Fy,e=>{w(e)}).addCase(d.QH,e=>{w(e)}).addCase(u.JK,e=>{w(e)}).addCase(l.zV,e=>{w(e)}).addCase(s.si,e=>{w(e)}).addCase(s.jb,e=>{w(e)}).addCase(o.p,e=>{w(e)}).addCase(c.xy,e=>{w(e)}).addCase(d.kd,e=>{w(e)}).addCase(i.R,e=>{w(e)}).addCase(c.F4,e=>{w(e)}).addCase(d._e,e=>{w(e)}).addCase(u.zP,e=>{w(e)}).addCase(a.qK,e=>{w(e)})});function w(e){e.firstResult=(0,y.y)().firstResult}function S(e){let{firstResult:t,numberOfResults:r}=e;return E(t,r)}function E(e,t){return Math.round(e/t)+1}function I(e,t){return Math.ceil(Math.min(e,v.t)/t)}},70766:(e,t,r)=>{"use strict";function n(){return{firstResult:0,defaultNumberOfResults:10,numberOfResults:10,totalCountFiltered:0}}r.d(t,{y:()=>n})},71358:(e,t,r)=>{"use strict";r.d(t,{P9:()=>s,ZS:()=>a,Zg:()=>o,tN:()=>i});var n=r(69285);let i=(0,n.VP)("history/undo"),a=(0,n.VP)("history/redo"),s=(0,n.VP)("history/snapshot");(0,n.zD)("history/back",async(e,{dispatch:t})=>{t(i()),await t(o())}),(0,n.zD)("history/forward",async(e,{dispatch:t})=>{t(a()),await t(o())});let o=(0,n.zD)("history/change",async(e,{getState:t})=>t().history.present)},71769:(e,t,r)=>{"use strict";function n(e,t){return{request:e,hasBreadcrumbs:!0,tabs:t}}function i(){return{}}r.d(t,{d:()=>n,v:()=>i})},71950:(e,t,r)=>{"use strict";r.d(t,{$V:()=>v,$e:()=>g,$g:()=>S,G6:()=>y,H7:()=>d,NV:()=>m,O4:()=>l,Pu:()=>I,Ub:()=>p,Yv:()=>b,im:()=>c,mv:()=>h,qq:()=>f,rk:()=>E,ud:()=>w});var n=r(65179),i=r(58604),a=r(32995),s=r(40687),o=r(64379),u=r(99630);let l=e=>(0,a.Zl)("analytics/facet/showMore",(t,r)=>{(0,i.rq)(e,o.k);let n=(0,u.iX)(e,(0,u.qv)(r));return t.makeFacetShowMore(n)}),c=e=>(0,a.Zl)("analytics/facet/showLess",(t,r)=>{(0,i.rq)(e,o.k);let n=(0,u.iX)(e,(0,u.qv)(r));return t.makeFacetShowLess(n)}),d=e=>(0,a.Zl)("analytics/facet/sortChange",(t,r)=>{(0,i.rq)(e,{facetId:o.k,criterion:new n.WT({required:!0})});let{facetId:a,criterion:s}=e,l=(0,u.qv)(r),c={...(0,u.iX)(a,l),criteria:s};return t.makeFacetUpdateSort(c)}),f=e=>(0,a.Zl)("analytics/facet/reset",(t,r)=>{(0,i.rq)(e,o.k);
12let n=(0,u.qv)(r),a=(0,u.iX)(e,n);return t.makeFacetClearAll(a)}),p=e=>(0,a.Zl)("analytics/facet/select",(t,r)=>{(0,i.rq)(e,{facetId:o.k,facetValue:i.r3});let n=(0,u.qv)(r),a=(0,u.RG)(e,n);return t.makeFacetSelect(a)}),h=e=>(0,a.Zl)("analytics/facet/exclude",(t,r)=>{(0,i.rq)(e,{facetId:o.k,facetValue:i.r3});let n=(0,u.qv)(r),a=(0,u.RG)(e,n);return t.makeFacetExclude(a)}),g=e=>(0,a.Zl)("analytics/facet/deselect",(t,r)=>{(0,i.rq)(e,{facetId:o.k,facetValue:i.r3});let n=(0,u.qv)(r),a=(0,u.RG)(e,n);return t.makeFacetDeselect(a)}),m=e=>(0,a.Zl)("analytics/facet/unexclude",(t,r)=>{(0,i.rq)(e,{facetId:o.k,facetValue:i.r3});let n=(0,u.qv)(r),a=(0,u.RG)(e,n);return t.makeFacetUnexclude(a)}),v=e=>(0,a.Zl)("analytics/facet/breadcrumb",(t,r)=>{(0,i.rq)(e,{facetId:o.k,facetValue:i.r3});let n=(0,u.RG)(e,(0,u.qv)(r));return t.makeBreadcrumbFacet(n)}),y=()=>({actionCause:s.d.facetClearAll}),b=()=>({actionCause:s.d.facetSelect}),w=()=>({actionCause:s.d.facetExclude}),S=()=>({actionCause:s.d.facetDeselect}),E=()=>({actionCause:s.d.facetUnexclude}),I=()=>({actionCause:s.d.breadcrumbFacet})},72018:(e,t,r)=>{"use strict";r.d(t,{g:()=>n});let n=["allValues","atLeastOneValue"]},72580:(e,t,r)=>{"use strict";r.d(t,{D:()=>i});var n=r(65179);r(64060),r(86534),r(82184),r(914),r(58604),r(53307);let i=new n.Sj({fragment:new n.hU})},72802:(e,t,r)=>{"use strict";r.d(t,{J:()=>n});let n=()=>"default"},72981:()=>{},72998:()=>{},73220:(e,t,r)=>{"use strict";r.d(t,{V:()=>s});var n=r(64060),i=r(914),a=r(22478);function s(e,t,r){let i;e.addReducers({configuration:n.H}),!1;let s={selectionDelay:1e3,debounceWait:1e3,...t.options};return{select:(0,a.sg)(r,s.debounceWait,{isImmediate:!0}),beginDelayedSelect(){i=setTimeout(r,s.selectionDelay)},cancelPendingSelect(){i&&clearTimeout(i)}}}},73282:(e,t,r)=>{"use strict";r.d(t,{P_:()=>a,VS:()=>n,x$:()=>i});let n=["searching","thinking","answering"];function i(e){return e.toLowerCase()}function a(){return{id:"",isVisible:!0,isEnabled:!0,isLoading:!1,isStreaming:!1,citations:[],liked:!1,disliked:!1,responseFormat:{contentFormat:["text/plain"]},feedbackModalOpen:!1,feedbackSubmitted:!1,fieldsToIncludeInCitations:[],isAnswerGenerated:!1,expanded:!1,cannotAnswer:!1,answerApiQueryParams:void 0,answerId:void 0,answerGenerationMode:"automatic",generationSteps:[]}}},73296:(e,t,r)=>{"use strict";r.d(t,{b:()=>w});var n=r(64060),i=r(63590),a=r(47727),s=r(92479),o=r(45166),u=r(26967),l=r(88830),c=r(31767),d=r(48167),f=r(59730),p=r(63517),h=r(914),g=r(98599),m=r(22478),v=r(58604),y=r(21600),b=r(10595);function w(e,t){e.addReducers({query:s.J,querySuggest:d.v,configuration:n.H,querySet:u.b,search:p.J}),!1;let r=(0,y.P)(e),{dispatch:h}=e,w=t.options?.id||(0,m.lZ)("search_box"),S={id:w,highlightOptions:{...t.options?.highlightOptions},...b.F1,...t.options};(0,v.Lm)(e,b.NJ,S,"buildSearchBox"),h((0,o.G8)({id:w,query:e.state.query.q})),S.numberOfSuggestions&&h((0,l.sK)({id:w,count:S.numberOfSuggestions})),S.enableQuerySyntax&&h((0,i.o)({enableQuerySyntax:S.enableQuerySyntax}));let E=()=>e.state.querySet[S.id],I=async e=>{let{enableQuerySyntax:r,clearFilters:n}=S;h((0,f.Jq)({q:E(),enableQuerySyntax:r,clearFilters:n})),t.isNextAnalyticsReady?h(t.executeSearchActionCreator(e)):h(t.executeSearchActionCreator(e.legacy))};return{...r,updateText(e){h((0,o.ET)({id:w,query:e})),this.showSuggestions()},clear(){h((0,o.ET)({id:w,query:""})),h((0,l.IV)({id:w}))},showSuggestions(){S.numberOfSuggestions&&h(t.fetchQuerySuggestionsActionCreator({id:w}))},selectSuggestion(e){h((0,l.nA)({id:w,expression:e})),I({legacy:(0,c.HF)({id:w,suggestion:e}),next:(0,c.jG)()}).then(()=>{h((0,l.IV)({id:w}))})},submit(e=(0,a.Y)(),t){I({legacy:e,next:t}),h((0,l.IV)({id:w}))},get state(){var A,k;let t=e.state,r=t.querySuggest[S.id],n=(A=r,k=S.highlightOptions,A?A.completions.map(e=>({highlightedValue:(0,g.sP)(e.highlighted,k),rawValue:e.expression})):[]),i=!!r&&r.isLoading;return{searchBoxId:w,value:E(),suggestions:n,isLoading:t.search.isLoading,isLoadingSuggestions:i}}}}},73870:(e,t,r)=>{var n=r(128),i=r(32089),a=r(30790);function s(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new n;++t<r;)this.add(e[t])}s.prototype.add=s.prototype.push=i,s.prototype.has=a,e.exports=s},74362:(e,t,r)=>{var n=r(56996),i=r(19475);e.exports=function(e,t,r,a){var s=r.length,o=s,u=!a;if(null==e)return!o;for(e=Object(e);s--;){var l=r[s];if(u&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++s<o;){var c=(l=r[s])[0],d=e[c],f=l[1];if(u&&l[2]){if(void 0===d&&!(c in e))return!1}else{var p=new n;if(a)var h=a(d,f,c,e,t,p);if(!(void 0===h?i(f,d,3,a,p):h))return!1}}return!0}},74540:()=>{},74683:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(i,a){function s(e){try{u(n.next(e))}catch(e){a(e)}}function o(e){try{u(n.throw(e))}catch(e){a(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(s,o)}u((n=n.apply(e,t||[])).next())})},i=this&&this.__generator||function(e,t){var r,n,i,a,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function o(a){return function(o){var u=[a,o];if(r)throw TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&u[0]?n.return:u[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,u[1])).done)return i;switch(n=0,i&&(u=[2&u[0],i.value]),u[0]){case 0:case 1:i=u;break;case 4:return s.label++,{value:u[1],done:!1};case 5:s.label++,n=u[1],u=[0];continue;case 7:u=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===u[0]||2===u[0])){s=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3])){s.label=u[1];break}if(6===u[0]&&s.label<i[1]){s.label=i[1],i=u;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(u);break}i[2]&&s.ops.pop(),s.trys.pop();continue}u=t.call(e,s)}catch(e){u=[6,e],n=0}finally{r=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}};
12Object.defineProperty(t,"__esModule",{value:!0});var a=r(31365),s=r(63488);t.backOff=function(e,t){return void 0===t&&(t={}),n(this,void 0,void 0,function(){return i(this,function(r){switch(r.label){case 0:return[4,new o(e,a.getSanitizedOptions(t)).execute()];case 1:return[2,r.sent()]}})})};var o=function(){function e(e,t){this.request=e,this.options=t,this.attemptNumber=0}return e.prototype.execute=function(){return n(this,void 0,void 0,function(){var e;return i(this,function(t){switch(t.label){case 0:if(this.attemptLimitReached)return[3,7];t.label=1;case 1:return t.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return t.sent(),[4,this.request()];case 3:return[2,t.sent()];case 4:return e=t.sent(),this.attemptNumber++,[4,this.options.retry(e,this.attemptNumber)];case 5:if(!t.sent()||this.attemptLimitReached)throw e;return[3,6];case 6:return[3,0];case 7:throw 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 n(this,void 0,void 0,function(){return i(this,function(e){switch(e.label){case 0:return[4,s.DelayFactory(this.options,this.attemptNumber).apply()];case 1:return e.sent(),[2]}})})},e}()},74891:(e,t,r)=>{"use strict";r.d(t,{Bk:()=>c,Dj:()=>g,RH:()=>f,lV:()=>l,o6:()=>h});var n=r(65179),i=r(40180),a=r(92829),s=r(69096);i.extend(a);let o=["past","now","next"],u=["minute","hour","day","week","month","quarter","year"];function l(e){let t;if("string"==typeof e&&!h(e))throw Error(`The value "${e}" is not respecting the relative date format "period-amount-unit"`);let r="string"==typeof e?m(e):e;new n.Sj((t="now"===r.period,{amount:new n.lS({required:!t,min:1}),unit:new n.hU({required:!t,constrainTo:u}),period:new n.hU({required:!0,constrainTo:o})})).validate(r);let i=d(r),a=JSON.stringify(r);if(!i.isValid())throw Error(`Date is invalid: ${a}`);(0,s.wt)(i)}function c(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":case"next":return`${t}-${r}-${n}`;case"now":return t}}function d(e){let{period:t,amount:r,unit:n}=e;switch(t){case"past":return i().subtract(r,n);case"next":return i().add(r,n);case"now":return i()}}function f(e){return(0,s.x3)(d(m(e)))}function p(e){return e.toLocaleLowerCase().split("-")}function h(e){let[t,r,n]=p(e);if("now"===t)return!0;if(!o.includes(t)||!u.includes(n))return!1;let i=parseInt(r,10);return!Number.isNaN(i)&&!(i<=0)}function g(e){return!!e&&"object"==typeof e&&"period"in e}function m(e){let[t,r,n]=p(e);return"now"===t?{period:"now"}:{period:t,amount:r?parseInt(r,10):void 0,unit:n||void 0}}},74992:(e,t,r)=>{"use strict";var n=r(78752),i=r(31739);(0,n.Mz)(e=>(0,i.Z)(e)?.q,e=>e.search.requestId,e=>e.generatedAnswer.cannotAnswer,e=>e.configuration.analytics.analyticsMode,e=>e.search.searchAction?.actionCause,(e,t,r,n,i)=>({q:e,requestId:t,cannotAnswer:r,analyticsMode:n,actionCause:i})),(0,n.Mz)(e=>e.generatedAnswer?.answerApiQueryParams,e=>e)},75411:(e,t,r)=>{"use strict";r.d(t,{hn:()=>d,nt:()=>f,qK:()=>h});var n=r(65179),i=r(69285),a=r(58604),s=r(80245),o=r(64379),u=r(19065);let l=new n.lS({min:u.XF,default:u.qq,required:!1}),c={desiredCount:new n.lS({min:u.WD,max:u.kP,default:u.$c,required:!1}),numberOfValues:l},d=(0,i.VP)("automaticFacet/setOptions",e=>(0,a.rq)(e,c)),f=(0,i.VP)("automaticFacet/deselectAll",e=>(0,a.rq)(e,o.k)),p=a.r3,h=(0,i.VP)("automaticFacet/toggleSelectValue",e=>(0,a.rq)(e,{field:p,selection:new n.Bo({values:s.a})}))},75455:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(11722);t.Delay=function(){function e(e){this.options=e,this.attempt=0}return e.prototype.apply=function(){var e=this;return new Promise(function(t){return setTimeout(t,e.jitteredDelay)})},e.prototype.setAttemptNumber=function(e){this.attempt=e},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){return n.JitterFactory(this.options)(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){return Math.min(this.options.startingDelay*Math.pow(this.options.timeMultiple,this.numOfDelayedAttempts),this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}()},76469:(e,t,r)=>{"use strict";r.d(t,{f:()=>s,y:()=>o});
12var n=r(69285),i=r(58604),a=r(93758);let s=(0,n.VP)("rangeFacet/executeToggleSelect",e=>(0,i.rq)(e,(0,a.KM)(e.selection))),o=(0,n.VP)("rangeFacet/executeToggleExclude",e=>(0,i.rq)(e,(0,a.KM)(e.selection)))},76864:e=>{e.exports=function(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}},77244:(e,t,r)=>{"use strict";r.d(t,{y:()=>n});let n=()=>({redirectTo:"",query:"",executions:[],notifications:[],queryModification:{originalQuery:"",newQuery:"",queryToIgnore:""}})},77338:(e,t,r)=>{"use strict";function n(){return{queries:[],maxLength:10}}r.d(t,{X:()=>n})},77553:(e,t,r)=>{"use strict";r.d(t,{$:()=>o,w:()=>s});var n=r(2308),i=r(32995),a=r(68092);let s=()=>(0,i.Zl)("search/logFetchMoreResults",e=>e.makeFetchMoreResults()),o=e=>(0,i.Zl)("search/queryError",(t,r)=>t.makeQueryError({query:r.query?.q||(0,a.O)().q,aq:r.advancedSearchQueries?.aq||(0,n.y)().aq,cq:r.advancedSearchQueries?.cq||(0,n.y)().cq,dq:r.advancedSearchQueries?.dq||(0,n.y)().dq,errorType:e.type,errorMessage:e.message}))},78752:(e,t,r)=>{"use strict";r.d(t,{Mz:()=>w,X4:()=>b});var n=e=>Array.isArray(e)?e:[e],i=0,a=class{revision=i;_value;_lastValue;_isEqual=s;constructor(e,t=s){this._value=this._lastValue=e,this._isEqual=t}get value(){return this._value}set value(e){this.value!==e&&(this._value=e,this.revision=++i)}};function s(e,t){return e===t}function o(e){return e instanceof a||console.warn("Not a valid cell! ",e),e.value}var u=(e,t)=>!1;function l(){return function(e=s){return new a(null,e)}(u)}var c=e=>{let t=e.collectionTag;null===t&&(t=e.collectionTag=l()),o(t)},d=0,f=Object.getPrototypeOf({}),p=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy(this,h);tag=l();tags={};children={};collectionTag=null;id=d++},h={get:(e,t)=>(function(){let{value:r}=e,n=Reflect.get(r,t);if("symbol"==typeof t||t in f)return n;if("object"==typeof n&&null!==n){var i;let r=e.children[t];return void 0===r&&(r=e.children[t]=Array.isArray(i=n)?new g(i):new p(i)),r.tag&&o(r.tag),r.proxy}{let r=e.tags[t];return void 0===r&&((r=e.tags[t]=l()).value=n),o(r),n}})(),ownKeys:e=>(c(e),Reflect.ownKeys(e.value)),getOwnPropertyDescriptor:(e,t)=>Reflect.getOwnPropertyDescriptor(e.value,t),has:(e,t)=>Reflect.has(e.value,t)},g=class{constructor(e){this.value=e,this.value=e,this.tag.value=e}proxy=new Proxy([this],m);tag=l();tags={};children={};collectionTag=null;id=d++},m={get:([e],t)=>("length"===t&&c(e),h.get(e,t)),ownKeys:([e])=>h.ownKeys(e),getOwnPropertyDescriptor:([e],t)=>h.getOwnPropertyDescriptor(e,t),has:([e],t)=>h.has(e,t)},v="u"<typeof WeakRef?class{constructor(e){this.value=e}deref(){return this.value}}:WeakRef;function y(){return{s:0,v:void 0,o:null,p:null}}function b(e,t={}){let r,n=y(),{resultEqualityCheck:i}=t,a=0;function s(){let t,s=n,{length:o}=arguments;for(let e=0;e<o;e++){let t=arguments[e];if("function"==typeof t||"object"==typeof t&&null!==t){let e=s.o;null===e&&(s.o=e=new WeakMap);let r=e.get(t);void 0===r?(s=y(),e.set(t,s)):s=r}else{let e=s.p;null===e&&(s.p=e=new Map);let r=e.get(t);void 0===r?(s=y(),e.set(t,s)):s=r}}let u=s;if(1===s.s)t=s.v;else if(t=e.apply(null,arguments),a++,i){var l;let e=(l=r)instanceof v?l.deref():l;null!=e&&i(e,t)&&(t=e,0!==a&&a--),r="object"==typeof t&&null!==t||"function"==typeof t?new v(t):t}return u.s=1,u.v=t,t}return s.clearCache=()=>{n=y(),s.resetResultsCount()},s.resultsCount=()=>a,s.resetResultsCount=()=>{a=0},s}var w=function(e,...t){let r="function"==typeof e?{memoize:e,memoizeOptions:t}:e,i=(...e)=>{let t,i,a=0,s=0,o={},u=e.pop();"object"==typeof u&&(o=u,u=e.pop()),function(e,t=`expected a function, instead received ${typeof e}`){if("function"!=typeof e)throw TypeError(t)}(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);let{memoize:l,memoizeOptions:c=[],argsMemoize:d=b,argsMemoizeOptions:f=[]}={...r,...o},p=n(c),h=n(f),g=(!function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(e=>"function"==typeof e)){let r=e.map(e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e).join(", ");throw TypeError(`${t}[${r}]`)}}(t=Array.isArray(e[0])?e[0]:e,"createSelector expects all input-selectors to be functions, but received the following types: "),t),m=l(function(){return a++,u.apply(null,arguments)},...p);return Object.assign(d(function(){s++;let e=function(e,t){let r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}(g,arguments);return i=m.apply(null,e)}
12,...h),{resultFunc:u,memoizedResultFunc:m,dependencies:g,dependencyRecomputations:()=>s,resetDependencyRecomputations:()=>{s=0},lastResult:()=>i,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:l,argsMemoize:d})};return Object.assign(i,{withTypes:()=>i}),i}(b),S=Object.assign((e,t=w)=>{!function(e,t=`expected an object, instead received ${typeof e}`){if("object"!=typeof e)throw TypeError(t)}(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);return t(r.map(t=>e[t]),(...e)=>e.reduce((e,t,n)=>(e[r[n]]=t,e),{}))},{withTypes:()=>S})},79091:()=>{},79454:(e,t,r)=>{"use strict";function n(e,t){return{request:e,tabs:t}}function i(){return{}}r.d(t,{_:()=>i,w:()=>n})},80245:(e,t,r)=>{"use strict";r.d(t,{a:()=>a});var n=r(65179),i=r(58604);let a={value:i.r3,numberOfResults:new n.lS({min:0}),state:i.r3}},81088:(e,t,r)=>{"use strict";r.d(t,{A7:()=>d,CR:()=>p,ny:()=>f});var n=r(65179),i=r(29534),a=r(12698),s=r(35521);class o{currentAbortController=null;async enqueue(e,t){let r=this.currentAbortController;this.currentAbortController=new AbortController;let n=this.currentAbortController;r&&(t.warnOnAbort&&t.logger.warn("Cancelling current pending search query"),r.abort());try{return await e(n?.signal??null)}finally{this.currentAbortController===n&&(this.currentAbortController=null)}}}var u=r(48669),l=r(84959),c=r(69643);class d{options;constructor(e){this.options=e}async plan(e){let t=await s.Ht.call({...(0,c.L7)(e,"POST","application/json","/plan"),requestParams:(0,a.E)(e),requestMetadata:{method:"plan"},...this.options});if(t instanceof Error)return(0,l.f)(t);let r=await t.json();return void 0!==r.preprocessingOutput?{success:r}:{error:(0,a.o)({response:t,body:r})}}async querySuggest(e){let t=await s.Ht.call({...(0,c.L7)(e,"POST","application/json","/querySuggest"),requestMetadata:{method:"querySuggest"},requestParams:(0,a.E)(e),...this.options});if(t instanceof Error)return(0,l.f)(t);let r=await t.json(),n={response:t,body:r};return void 0!==r.completions?{success:(await this.options.postprocessQuerySuggestResponseMiddleware(n)).body}:{error:(0,a.o)(n)}}apiCallsQueues={unknown:new o,mainSearch:new o,facetValues:new o,foldingCollection:new o,instantResults:new o};async search(e,t){let r=t?.origin??"unknown",n=await this.apiCallsQueues[r].enqueue(r=>s.Ht.call({...(0,c.L7)(e,"POST","application/json",""),requestParams:(0,a.E)(e),requestMetadata:{method:"search",origin:t?.origin},...this.options,signal:r??void 0}),{logger:this.options.logger,warnOnAbort:!t?.disableAbortWarning});if(n instanceof Error)return(0,l.f)(n,t?.disableAbortWarning);let i=await n.json(),o={response:n,body:i};return h(i)?(o.body=g(i),{success:(await this.options.postprocessSearchResponseMiddleware(o)).body}):{error:(0,a.o)(o)}}async facetSearch(e){let t=await s.Ht.call({...(0,c.L7)(e,"POST","application/json","/facet"),requestParams:(0,a.E)(e),requestMetadata:{method:"facetSearch"},...this.options});if(t instanceof Error)throw t;let r=await t.json();return(await this.options.postprocessFacetSearchResponseMiddleware({response:t,body:r})).body}async recommendations(e){let t=await s.Ht.call({...(0,c.L7)(e,"POST","application/json",""),requestParams:(0,a.E)(e),requestMetadata:{method:"recommendations"},...this.options});if(t instanceof Error)throw t;let r=await t.json();if(h(r)){let e={response:t,body:r};return e.body=g(r),{success:(await this.options.postprocessSearchResponseMiddleware(e)).body}}return{error:(0,a.o)({response:t,body:r})}}async html(e){return(0,u.u)(e,{...this.options})}async fieldDescriptions(e){let t=await s.Ht.call({...(0,c.L7)(e,"GET","application/json","/fields"),requestParams:{},requestMetadata:{method:"fieldDescriptions"},...this.options});if(t instanceof Error)throw t;let r=await t.json();return void 0!==r.fields?{success:r}:{error:(0,a.o)({response:t,body:r})}}}let f=e=>void 0!==e.success,p=e=>void 0!==e.error;function h(e){return void 0!==e.results}function g(e){let t=(0,i.U)();return(0,n.hX)(e.questionAnswer)?e.questionAnswer=t:e.questionAnswer={...t,...e.questionAnswer},e}},81401:(e,t,r)=>{"use strict";let n;r.d(t,{S:()=>y});let i=/^(?:[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;var a=r(68378);async function s({config:e,environment:t,event:r,listenerManager:n}){let{url:i,token:a,mode:o}=e;if("disabled"!==o)return n.call(r),t.send(i,a,r)}let o="2.1.1";function u(e,t,r){let{getReferrer:n,getLocation:i,getUserAgent:a}=r,s=function(e){let{trackingId:t}=e;return{trackingId:t}}(t),u=r.getClientId();return Object.freeze({type:e,config:s,ts:Date.now(),source:(t.source||[]).concat([`relay@${o}`]),clientId:u,userAgent:a(),referrer:l(n()),location:l(i())})}function l(e){return null!==e?function(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((128&n)!=128)break;
12if(r-=3,(192&n)!=128){t-r>=3*((248&n)==240?4:(240&n)==224?3:(224&n)==192?2:1)&&(r=t);break}}return e.substring(0,r)}(e,1024):null}function c({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}})}let d=(n="coveo_",{getItem(e){let t=`${n}${e}=`;for(let e of document.cookie.split(";")){let r=e.replace(/^\s+/,"");if(0===r.lastIndexOf(t,0))return r.substring(t.length,r.length)}return null},setItem(e,t,r){let i,a=2==(i=window.location.hostname.split(".").slice(-2)).length?i.join("."):"",s=`;expires=${new Date(new Date().getTime()+r).toUTCString()}`,o=a?`;domain=${a}`:"";document.cookie=`${n}${e}=${t}${s}${o};path=/;SameSite=Lax`},removeItem(e){this.setItem(e,"",-1)}}),f="visitorId";function p(){let e={getItem:e=>d.getItem(e)||localStorage.getItem(e),removeItem(e){d.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),d.setItem(e,t,31556952e3)}};return{runtime:"browser",send:async(e,t,r)=>{let n,i=fetch(e,{method:"POST",body:JSON.stringify([r]),keepalive:!0,headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`}});(n="u">typeof window,{sendMessage(e){n&&window.postMessage(e,"*")}}).sendMessage({kind:"EVENT_PROTOCOL",event:r,url:e,token:t});let a=await i;if(a?.ok){let e;try{e=await a.json()}catch{return}for(let t of e.events)if(!t.accepted)throw Error(`Received event was rejected for processing: ${t.errorMessage}`)}else throw Error(`Error ${a.status}: Failed to send the event(s).`)},getReferrer:()=>{let e;return""===(e=document.referrer)?null:e},getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,getClientId:()=>{var t;let r=e.getItem(f);if(r&&"string"==typeof(t=r)&&i.test(t))return r;let n=(0,a.A)();return e.setItem(f,n),n}}}var h=r(78752),g=r(45731),m=r(35521),v=r(95886);let y=(0,h.Mz)(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>(0,v.i)(e.configuration.analytics),(e,t)=>t,(e,t,r,{trackingId:n,apiBaseUrl:i,enabled:a},l,d)=>{let f=w(d);return function(e){let t,r=(t=c(e),{get:()=>t,update:e=>{t=c({...t,...e})}}),n=function(){let e=[];function t({type:r,callback:n}){return e.findIndex(e=>e.type===r&&e.callback===n)}function r(r,n){if(n){let i;(i=t({type:r,callback:n}))>=0&&e.splice(i,1)}else if("*"===r)e.length=0;else for(let t=e.length-1;t>=0;t--)e[t].type===r&&e.splice(t,1)}return{add:function(n){return 0>t(n)&&e.push(n),()=>r(n.type,n.callback)},call:function(t){e.forEach(e=>{var r;if(r=t.meta.type,"*"===e.type||r===e.type)try{e.callback(t)}catch(e){console.error(e)}})},remove:r}}(),i={get:()=>{let e,t;return Object.freeze((e="disabled"!==r.get().mode,t=r.get().environment,e&&t?{...t,runtime:"custom"}:e&&function(){try{return"object"==typeof window}catch{return!1}}()&&function(){try{let e="__storage_test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return e instanceof DOMException&&"QuotaExceededError"===e.name&&localStorage&&0!==localStorage.length}}()?p():{runtime:"null",send:()=>Promise.resolve(void 0),getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,getClientId:()=>""}))}};return{emit:async(e,t)=>{let a=r.get(),o=i.get(),l={...t,meta:u(e,a,o)};return s({config:a,environment:o,event:l,listenerManager:n})},getMeta:e=>u(e,r.get(),i.get()),on:(e,t)=>n.add({type:e,callback:t}),off:(e,t)=>n.remove(e,t),updateConfig:e=>r.update(e),version:o}}({mode:a?"emit":"disabled",url:i??(0,m.Uw)(e,t),token:r,trackingId:n??null,source:l,environment:f})}),b={getClientId:()=>"",getLocation:()=>null,getReferrer:()=>null,getUserAgent:()=>null,send:async()=>{}},w=e=>{if(!e)return;let t=e();return{...(0,g.B)()?p():b,getClientId:()=>t.clientId,getLocation:()=>t.location,getReferrer:()=>t.referrer,getUserAgent:()=>t.userAgent}}},81686:(e,t,r)=>{"use strict";r.d(t,{Y:()=>i,h:()=>a});var n=r(45490);class i extends Error{static message="Unable to find Context. Make sure your component using a controller is wrapped in one of the following providers: `RecommendationProvider`, `ListingProvider`, `SearchProvider`, or `StandaloneProvider`";constructor(){super(i.message)}}
12class a extends Error{static createEngineSupportMessage(e){let t=e.map(e=>`${e}EngineDefinition`);return`This controller is only available in these engine definitions:
13${t.map(e=>` • ${e}`).join("\n")}`}constructor(e,t){super([`You're importing a controller (use${(0,n.ZH)(e)}) that is not defined in the current engine definition`,a.createEngineSupportMessage(t),"\nEnsure that the component using the controller is wrapped in the appropriate State Provider."].join("\n"))}}},82184:(e,t,r)=>{"use strict";r.d(t,{af:()=>R,lV:()=>P,bD:()=>O,VD:()=>q});let{getOwnPropertyNames:n,getOwnPropertySymbols:i}=Object,{hasOwnProperty:a}=Object.prototype;function s(e,t){return function(r,n,i){return e(r,n,i)&&t(r,n,i)}}function o(e){return function(t,r,n){if(!t||!r||"object"!=typeof t||"object"!=typeof r)return e(t,r,n);let{cache:i}=n,a=i.get(t),s=i.get(r);if(a&&s)return a===r&&s===t;i.set(t,r),i.set(r,t);let o=e(t,r,n);return i.delete(t),i.delete(r),o}}function u(e){return n(e).concat(i(e))}let l=Object.hasOwn||((e,t)=>a.call(e,t)),{getOwnPropertyDescriptor:c,keys:d}=Object,f=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};function p(e,t){return e===t}function h(e,t){return e.byteLength===t.byteLength&&k(new Uint8Array(e),new Uint8Array(t))}function g(e,t,r){let n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(!r.equals(e[n],t[n],n,n,e,t,r))return!1;return!0}function m(e,t){return e.byteLength===t.byteLength&&k(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function v(e,t){return f(e.getTime(),t.getTime())}function y(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function b(e,t,r){let n,i,a=e.size;if(a!==t.size)return!1;if(!a)return!0;let s=Array(a),o=e.entries(),u=0;for(;(n=o.next())&&!n.done;){let a=t.entries(),o=!1,l=0;for(;(i=a.next())&&!i.done;){if(s[l]){l++;continue}let a=n.value,c=i.value;if(r.equals(a[0],c[0],u,l,e,t,r)&&r.equals(a[1],c[1],a[0],c[0],e,t,r)){o=s[l]=!0;break}l++}if(!o)return!1;u++}return!0}function w(e,t,r){let n=d(e),i=n.length;if(d(t).length!==i)return!1;for(;i-- >0;)if(!T(e,t,r,n[i]))return!1;return!0}function S(e,t,r){let n,i,a,s=u(e),o=s.length;if(u(t).length!==o)return!1;for(;o-- >0;)if(!T(e,t,r,n=s[o])||(i=c(e,n),a=c(t,n),(i||a)&&(!i||!a||i.configurable!==a.configurable||i.enumerable!==a.enumerable||i.writable!==a.writable)))return!1;return!0}function E(e,t){return f(e.valueOf(),t.valueOf())}function I(e,t){return e.source===t.source&&e.flags===t.flags}function A(e,t,r){let n,i,a=e.size;if(a!==t.size)return!1;if(!a)return!0;let s=Array(a),o=e.values();for(;(n=o.next())&&!n.done;){let a=t.values(),o=!1,u=0;for(;(i=a.next())&&!i.done;){if(!s[u]&&r.equals(n.value,i.value,n.value,i.value,e,t,r)){o=s[u]=!0;break}u++}if(!o)return!1}return!0}function k(e,t){let r=e.byteLength;if(t.byteLength!==r||e.byteOffset!==t.byteOffset)return!1;for(;r-- >0;)if(e[r]!==t[r])return!1;return!0}function C(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function T(e,t,r,n){return("_owner"===n||"__o"===n||"__v"===n)&&(!!e.$$typeof||!!t.$$typeof)||l(t,n)&&r.equals(e[n],t[n],n,n,e,t,r)}let _=Object.prototype.toString,O=x();function x(e={}){let{circular:t=!1,createInternalComparator:r,createState:n,strict:i=!1}=e,a=function(e){let t=function({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:r,areDatesEqual:n,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:s,areNumbersEqual:o,areObjectsEqual:u,arePrimitiveWrappersEqual:l,areRegExpsEqual:c,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p}){return{"[object Arguments]":u,"[object Array]":t,"[object ArrayBuffer]":e,"[object AsyncGeneratorFunction]":a,"[object BigInt]":o,"[object BigInt64Array]":f,"[object BigUint64Array]":f,"[object Boolean]":l,"[object DataView]":r,"[object Date]":n,"[object Error]":i,"[object Float16Array]":f,"[object Float32Array]":f,"[object Float64Array]":f,"[object Function]":a,"[object GeneratorFunction]":a,"[object Int8Array]":f,"[object Int16Array]":f,"[object Int32Array]":f,"[object Map]":s,"[object Number]":l,"[object Object]":(e,t,r)=>"function"!=typeof e.then&&"function"!=typeof t.then&&u(e,t,r),"[object RegExp]":c,"[object Set]":d,"[object String]":l,"[object URL]":p,"[object Uint8Array]":f,"[object Uint8ClampedArray]":f,"[object Uint16Array]":f,"[object Uint32Array]":f}}(e),{areArraysEqual:r,areDatesEqual:n,areFunctionsEqual:i,areMapsEqual:a,areNumbersEqual:s,areObjectsEqual:o,areRegExpsEqual:u,areSetsEqual:l,getUnsupportedCustomComparator:c}=e;return function(e,d,f){if(e===d)return!0;
13if(null==e||null==d)return!1;let p=typeof e;if(p!==typeof d)return!1;if("object"!==p)return"number"===p||"bigint"===p?s(e,d,f):"function"===p&&i(e,d,f);let h=e.constructor;if(h!==d.constructor)return!1;if(h===Object)return o(e,d,f);if(h===Array)return r(e,d,f);if(h===Date)return n(e,d,f);if(h===RegExp)return u(e,d,f);if(h===Map)return a(e,d,f);if(h===Set)return l(e,d,f);if(h===Promise)return!1;if(Array.isArray(e))return r(e,d,f);let g=_.call(e),m=t[g];if(m)return m(e,d,f);let v=c&&c(e,d,f,g);return!!v&&v(e,d,f)}}(function({circular:e,createCustomConfig:t,strict:r}){let n={areArrayBuffersEqual:h,areArraysEqual:r?S:g,areDataViewsEqual:m,areDatesEqual:v,areErrorsEqual:y,areFunctionsEqual:p,areMapsEqual:r?s(b,S):b,areNumbersEqual:f,areObjectsEqual:r?S:w,arePrimitiveWrappersEqual:E,areRegExpsEqual:I,areSetsEqual:r?s(A,S):A,areTypedArraysEqual:r?s(k,S):k,areUrlsEqual:C,getUnsupportedCustomComparator:void 0};if(t&&(n=Object.assign({},n,t(n))),e){let e=o(n.areArraysEqual),t=o(n.areMapsEqual),r=o(n.areObjectsEqual),i=o(n.areSetsEqual);n=Object.assign({},n,{areArraysEqual:e,areMapsEqual:t,areObjectsEqual:r,areSetsEqual:i})}return n}(e)),u=r?r(a):function(e,t,r,n,i,s,o){return a(e,t,o)};return function({circular:e,comparator:t,createState:r,equals:n,strict:i}){if(r)return function(a,s){let{cache:o=e?new WeakMap:void 0,meta:u}=r();return t(a,s,{cache:o,equals:n,meta:u,strict:i})};if(e)return function(e,r){return t(e,r,{cache:new WeakMap,equals:n,meta:void 0,strict:i})};let a={cache:void 0,equals:n,meta:void 0,strict:i};return function(e,r){return t(e,r,a)}}({circular:t,comparator:a,createState:n,equals:u,strict:i})}function R(e,t,r=(e,t)=>e===t){return e.length===t.length&&-1===e.findIndex((e,n)=>!r(t[n],e))}function N(e,t){return e.length===t.length&&e.every(e=>-1!==t.findIndex(t=>q(e,t)))}x({strict:!0}),x({circular:!0}),x({circular:!0,strict:!0}),x({createInternalComparator:()=>f}),x({strict:!0,createInternalComparator:()=>f}),x({circular:!0,createInternalComparator:()=>f}),x({circular:!0,createInternalComparator:()=>f,strict:!0});let P=(e,t)=>{let r,n=new Set(e),i=new Set(t);if(n.size!==i.size)return!1;if(1===n.size)return e[0]===t[0];if((r=new Set([...n,...i])).size===n.size&&r.size===i.size){let e=[...i];return![...n].every((t,r)=>e[r]===t)}return!1},q=x({createCustomConfig:e=>({...e,areArraysEqual:N})})},82208:(e,t,r)=>{"use strict";r.d(t,{$:()=>i});var n=r(65179);let i={facetId:r(64379).k,captions:new n.Bo({options:{required:!1}}),numberOfValues:new n.lS({required:!1,min:1}),query:new n.hU({required:!1,emptyAllowed:!0})}},82487:(e,t,r)=>{"use strict";r.d(t,{g:()=>i});var n=r(78752);let i=(0,n.Mz)(e=>e,e=>{if(!e)return"";for(let t in e)if(e[t].isActive)return e[t].id;return""});(0,n.Mz)(e=>e,e=>{let t=i(e);return t&&e?e[t].expression:""})},82659:()=>{},82792:(e,t,r)=>{"use strict";r.d(t,{L2:()=>a,XW:()=>i,vX:()=>n});let n=()=>({correctedQuery:"",wordCorrections:[],originalQuery:""}),i=()=>({correctedQuery:"",corrections:[],originalQuery:""});function a(){return{enableDidYouMean:!1,wasCorrectedTo:"",wasAutomaticallyCorrected:!1,queryCorrection:n(),originalQuery:"",automaticallyCorrectQuery:!0,queryCorrectionMode:"legacy"}}},83206:(e,t,r)=>{"use strict";r.d(t,{Ph:()=>n,Qv:()=>i,_t:()=>o,eX:()=>a,m5:()=>s});let n=(e,t)=>e.search?.response.facets.find(e=>e.facetId===t),i=(e,t)=>e.facetSet[t]?.request,a=(e,t)=>{let r=n(e,t);return r&&r.facetId in e.facetSet?r:void 0},s=(e,t)=>a(e,t)?.values.filter(e=>"idle"!==e.state)||[],o=e=>e.search.isLoading},83305:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fullJitter=function(e){return Math.round(Math.random()*e)}},83380:e=>{e.exports=function(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}},83750:()=>{},84176:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},84388:()=>{},84436:(e,t,r)=>{"use strict";r.d(t,{$:()=>iz});var n,i,a,s,o,u,l,c,d={};r.r(d),r.d(d,{JsonPatchError:()=>e0,_areEquals:()=>te,applyOperation:()=>e5,applyPatch:()=>e4,applyReducer:()=>e6,deepClone:()=>e1,getValueByPointer:()=>e8,validate:()=>e9,validator:()=>e7});var f={};r.r(f),r.d(f,{compare:()=>tu,generate:()=>ts,observe:()=>ta,unobserve:()=>ti});var p=r(95448),h=r(19528),g=r(38278),m=r(68378),v=r(2126),y=r(34864);let b=v.Ik({name:v.Yj(),arguments:v.Yj()}),w=v.Ik({id:v.Yj(),type:v.eu("function"),function:b,encryptedValue:v.Yj().optional()}),S=v.Ik({id:v.Yj(),role:v.Yj(),content:v.Yj().optional(),name:v.Yj().optional(),encryptedValue:v.Yj().optional()}),E=v.Ik({type:v.eu("text"),text:v.Yj()}),I=v.Ik({type:v.eu("data"),value:v.Yj(),mimeType:v.Yj()}),A=v.Ik({type:v.eu("url"),value:v.Yj(),mimeType:v.Yj().optional()}),k=v.gM("type",[I,A]),C=v.Ik({type:v.eu("image"),source:k,metadata:v.L5().optional()}),T=v.Ik({type:v.eu("audio"),source:k,metadata:v.L5().optional()}),_=v.Ik({type:v.eu("video"),source:k,metadata:v.L5().optional()}),O=v.Ik({type:v.eu("document"),source:k,metadata:v.L5().optional()}),x=v.Ik({type:v.eu("binary"),mimeType:v.Yj(),id:v.Yj().optional(),url:v.Yj().optional(),data:v.Yj().optional(),filename:v.Yj().optional()}),R=(e,t)=>
13{e.id||e.url||e.data||t.addIssue({code:y.eq.custom,message:"BinaryInputContent requires at least one of id, url, or data.",path:["id"]})};x.superRefine((e,t)=>{R(e,t)});let N=v.gM("type",[E,C,T,_,O,x]).superRefine((e,t)=>{"binary"===e.type&&R(e,t)}),P=S.extend({role:v.eu("developer"),content:v.Yj()}),q=S.extend({role:v.eu("system"),content:v.Yj()}),j=S.extend({role:v.eu("assistant"),content:v.Yj().optional(),toolCalls:v.YO(w).optional()}),D=S.extend({role:v.eu("user"),content:v.KC([v.Yj(),v.YO(N)])}),M=v.Ik({id:v.Yj(),content:v.Yj(),role:v.eu("tool"),toolCallId:v.Yj(),error:v.Yj().optional(),encryptedValue:v.Yj().optional()}),U=v.Ik({id:v.Yj(),role:v.eu("activity"),activityType:v.Yj(),content:v.g1(v.bz())}),F=v.Ik({id:v.Yj(),role:v.eu("reasoning"),content:v.Yj(),encryptedValue:v.Yj().optional()}),L=v.gM("role",[P,q,j,D,M,U,F]);v.KC([v.eu("developer"),v.eu("system"),v.eu("assistant"),v.eu("user"),v.eu("tool"),v.eu("activity"),v.eu("reasoning")]);let V=v.Ik({description:v.Yj(),value:v.Yj()}),$=v.Ik({name:v.Yj(),description:v.Yj(),parameters:v.bz(),metadata:v.g1(v.bz()).optional()}),G=v.Ik({threadId:v.Yj(),runId:v.Yj(),parentRunId:v.Yj().optional(),state:v.bz(),messages:v.YO(L),tools:v.YO($),context:v.YO(V),forwardedProps:v.bz()}),z=v.bz();var Q=class extends Error{constructor(e){super(e)}},H=class extends Q{constructor(){super("Connect not implemented. This method is not supported by the current agent.")}};let Y=v.Ik({name:v.Yj(),description:v.Yj().optional()}),B=v.Ik({name:v.Yj().optional(),type:v.Yj().optional(),description:v.Yj().optional(),version:v.Yj().optional(),provider:v.Yj().optional(),documentationUrl:v.Yj().optional(),metadata:v.g1(v.L5()).optional()}),K=v.Ik({streaming:v.zM().optional(),websocket:v.zM().optional(),httpBinary:v.zM().optional(),pushNotifications:v.zM().optional(),resumable:v.zM().optional()}),W=v.Ik({supported:v.zM().optional(),items:v.YO($).optional(),parallelCalls:v.zM().optional(),clientProvided:v.zM().optional()}),X=v.Ik({structuredOutput:v.zM().optional(),supportedMimeTypes:v.YO(v.Yj()).optional()}),Z=v.Ik({snapshots:v.zM().optional(),deltas:v.zM().optional(),memory:v.zM().optional(),persistentState:v.zM().optional()}),J=v.Ik({supported:v.zM().optional(),delegation:v.zM().optional(),handoffs:v.zM().optional(),subAgents:v.YO(Y).optional()}),ee=v.Ik({supported:v.zM().optional(),streaming:v.zM().optional(),encrypted:v.zM().optional()}),et=v.Ik({image:v.zM().optional(),audio:v.zM().optional(),video:v.zM().optional(),pdf:v.zM().optional(),file:v.zM().optional()}),er=v.Ik({image:v.zM().optional(),audio:v.zM().optional()}),en=v.Ik({input:et.optional(),output:er.optional()}),ei=v.Ik({codeExecution:v.zM().optional(),sandboxed:v.zM().optional(),maxIterations:v.ai().optional(),maxExecutionTime:v.ai().optional()}),ea=v.Ik({supported:v.zM().optional(),approvals:v.zM().optional(),interventions:v.zM().optional(),feedback:v.zM().optional()});v.Ik({identity:B.optional(),transport:K.optional(),tools:W.optional(),output:X.optional(),state:Z.optional(),multiAgent:J.optional(),reasoning:ee.optional(),multimodal:en.optional(),execution:ei.optional(),humanInTheLoop:ea.optional(),custom:v.g1(v.L5()).optional()});let es=v.KC([v.eu("developer"),v.eu("system"),v.eu("assistant"),v.eu("user")]),eo=((n={}).TEXT_MESSAGE_START="TEXT_MESSAGE_START",n.TEXT_MESSAGE_CONTENT="TEXT_MESSAGE_CONTENT",n.TEXT_MESSAGE_END="TEXT_MESSAGE_END",n.TEXT_MESSAGE_CHUNK="TEXT_MESSAGE_CHUNK",n.TOOL_CALL_START="TOOL_CALL_START",n.TOOL_CALL_ARGS="TOOL_CALL_ARGS",n.TOOL_CALL_END="TOOL_CALL_END",n.TOOL_CALL_CHUNK="TOOL_CALL_CHUNK",n.TOOL_CALL_RESULT="TOOL_CALL_RESULT",n.THINKING_START="THINKING_START",n.THINKING_END="THINKING_END",n.THINKING_TEXT_MESSAGE_START="THINKING_TEXT_MESSAGE_START",n.THINKING_TEXT_MESSAGE_CONTENT="THINKING_TEXT_MESSAGE_CONTENT",n.THINKING_TEXT_MESSAGE_END="THINKING_TEXT_MESSAGE_END",n.STATE_SNAPSHOT="STATE_
13SNAPSHOT",n.STATE_DELTA="STATE_DELTA",n.MESSAGES_SNAPSHOT="MESSAGES_SNAPSHOT",n.ACTIVITY_SNAPSHOT="ACTIVITY_SNAPSHOT",n.ACTIVITY_DELTA="ACTIVITY_DELTA",n.RAW="RAW",n.CUSTOM="CUSTOM",n.RUN_STARTED="RUN_STARTED",n.RUN_FINISHED="RUN_FINISHED",n.RUN_ERROR="RUN_ERROR",n.STEP_STARTED="STEP_STARTED",n.STEP_FINISHED="STEP_FINISHED",n.REASONING_START="REASONING_START",n.REASONING_MESSAGE_START="REASONING_MESSAGE_START",n.REASONING_MESSAGE_CONTENT="REASONING_MESSAGE_CONTENT",n.REASONING_MESSAGE_END="REASONING_MESSAGE_END",n.REASONING_MESSAGE_CHUNK="REASONING_MESSAGE_CHUNK",n.REASONING_END="REASONING_END",n.REASONING_ENCRYPTED_VALUE="REASONING_ENCRYPTED_VALUE",n),eu=v.Ik({type:v.fc(eo),timestamp:v.ai().optional(),rawEvent:v.bz().optional()}).passthrough(),el=eu.extend({type:v.eu(eo.TEXT_MESSAGE_START),messageId:v.Yj(),role:es.default("assistant"),name:v.Yj().optional()}),ec=eu.extend({type:v.eu(eo.TEXT_MESSAGE_CONTENT),messageId:v.Yj(),delta:v.Yj()}),ed=eu.extend({type:v.eu(eo.TEXT_MESSAGE_END),messageId:v.Yj()}),ef=eu.extend({type:v.eu(eo.TEXT_MESSAGE_CHUNK),messageId:v.Yj().optional(),role:es.optional(),delta:v.Yj().optional(),name:v.Yj().optional()}),ep=eu.extend({type:v.eu(eo.THINKING_TEXT_MESSAGE_START)}),eh=ec.omit({messageId:!0,type:!0}).extend({type:v.eu(eo.THINKING_TEXT_MESSAGE_CONTENT)}),eg=eu.extend({type:v.eu(eo.THINKING_TEXT_MESSAGE_END)}),em=eu.extend({type:v.eu(eo.TOOL_CALL_START),toolCallId:v.Yj(),toolCallName:v.Yj(),parentMessageId:v.Yj().optional()}),ev=eu.extend({type:v.eu(eo.TOOL_CALL_ARGS),toolCallId:v.Yj(),delta:v.Yj()}),ey=eu.extend({type:v.eu(eo.TOOL_CALL_END),toolCallId:v.Yj()}),eb=eu.extend({messageId:v.Yj(),type:v.eu(eo.TOOL_CALL_RESULT),toolCallId:v.Yj(),content:v.Yj(),role:v.eu("tool").optional()}),ew=eu.extend({type:v.eu(eo.TOOL_CALL_CHUNK),toolCallId:v.Yj().optional(),toolCallName:v.Yj().optional(),parentMessageId:v.Yj().optional(),delta:v.Yj().optional()}),eS=eu.extend({type:v.eu(eo.THINKING_START),title:v.Yj().optional()}),eE=eu.extend({type:v.eu(eo.THINKING_END)}),eI=eu.extend({type:v.eu(eo.STATE_SNAPSHOT),snapshot:z}),eA=eu.extend({type:v.eu(eo.STATE_DELTA),delta:v.YO(v.bz())}),ek=eu.extend({type:v.eu(eo.MESSAGES_SNAPSHOT),messages:v.YO(L)}),eC=eu.extend({type:v.eu(eo.ACTIVITY_SNAPSHOT),messageId:v.Yj(),activityType:v.Yj(),content:v.g1(v.bz()),replace:v.zM().optional().default(!0)}),eT=eu.extend({type:v.eu(eo.ACTIVITY_DELTA),messageId:v.Yj(),activityType:v.Yj(),patch:v.YO(v.bz())}),e_=eu.extend({type:v.eu(eo.RAW),event:v.bz(),source:v.Yj().optional()}),eO=eu.extend({type:v.eu(eo.CUSTOM),name:v.Yj(),value:v.bz()}),ex=eu.extend({type:v.eu(eo.RUN_STARTED),threadId:v.Yj(),runId:v.Yj(),parentRunId:v.Yj().optional(),input:G.optional()}),eR=eu.extend({type:v.eu(eo.RUN_FINISHED),threadId:v.Yj(),runId:v.Yj(),result:v.bz().optional()}),eN=eu.extend({type:v.eu(eo.RUN_ERROR),message:v.Yj(),code:v.Yj().optional()}),eP=eu.extend({type:v.eu(eo.STEP_STARTED),stepName:v.Yj()}),eq=eu.extend({type:v.eu(eo.STEP_FINISHED),stepName:v.Yj()}),ej=v.KC([v.eu("tool-call"),v.eu("message")]),eD=eu.extend({type:v.eu(eo.REASONING_START),messageId:v.Yj()}),eM=eu.extend({type:v.eu(eo.REASONING_MESSAGE_START),messageId:v.Yj(),role:v.eu("reasoning")}),eU=eu.extend({type:v.eu(eo.REASONING_MESSAGE_CONTENT),messageId:v.Yj(),delta:v.Yj()}),eF=eu.extend({type:v.eu(eo.REASONING_MESSAGE_END),messageId:v.Yj()}),eL=eu.extend({type:v.eu(eo.REASONING_MESSAGE_CHUNK),messageId:v.Yj().optional(),delta:v.Yj().optional()}),eV=eu.extend({type:v.eu(eo.REASONING_END),messageId:v.Yj()}),e$=eu.extend({type:v.eu(eo.REASONING_ENCRYPTED_VALUE),subtype:ej,entityId:v.Yj(),encryptedValue:v.Yj()}),eG=v.gM("type",[el,ec,ed,ef,eS,eE,ep,eh,eg,em,ev,ey,ew,eb,eI,eA,ek,eC,eT,e_,eO,ex,eR,eN,eP,eq,eD,eM,eU,eF,eL,eV,e$]);var ez=(i=function(e,t){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),eQ=Object.prototype.hasOwnProperty;function eH(e,t){return eQ.call(e,t)}function eY(e){if(Array.isArray(e)){for(var t=Array(e.length),r=0;r<t.length;r++)t[r]=""+r;return t}if(Object.keys)return Object.keys(e);var n=[];for(var i in e)eH(e,i)&&n.push(i);return n}function eB(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function eK(e){for(var t,r=0,n=e.length;r<n;){if((t=e.charCodeAt(r))>=48&&t<=57){r++;continue}return!1}return!0}function eW(e){return -1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function eX(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function eZ(e,t){var r=[e];for(var n in t){var i="object"==typeof t[n]?JSON.stringify(t[n],null,2):t[n];void 0!==i&&r.push(n+": "+i)}return r.join("\n")}var eJ=function(e){function t(t,r,n,i,a){var s=this.constructor,o=e.call(this,eZ(t,{name:r,index:n,operation:i,tree:a}))||this;return o.name=r,o.index=n,o.operation=i,o.tree=a,Object.setPrototypeOf(o,s.prototype),o.message=eZ(t,{name:r,index:n,operation:i,tree:a}),o}return ez(t,e),t}(Error),e0=eJ,e1=eB,e2={add:function(e,t,r){return e[t]=this.value,{newDocument:r}},remove:function(e,t,r){var n=e[t];return delete e[t],{newDocument:r,removed:n}},replace:function(e,t,r){var n=e[t];return e[t]=this.value,{newDocument:r,removed:n}},move:function(e,t,r){var n=e8(r,this.path);n&&(n=eB(n));var i=e5(r,{op:"remove",path:this.from}).removed;return e5(r,{op:"add",path:this.path,value:i}),{newDocument:r,removed:n}},copy:function(e,t,r){var n=e8(r,this.from);return e5(r,{op:"add",path:this.path,value:eB(n)}),{newDocument:r}},test:function(e,t,r){return{newDocument:r,test:te(e[t],this.value)}},_get:function(e,t,r){return this.value=e[t],{newDocument:r}}},e3={add:function(e,t,r){return eK(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:r,index:t}},remove:function(e,t,r){return{newDocument:r,removed:e.splice(t,1)[0]}},replace:function(e,t,r){var n=e[t];return e[t]=this.value,{newDocument:r,removed:n}},move:e2.move,copy:e2.copy,test:e2.test,_get:e2._get};function e8(e,t){if(""==t)return e;var r={op:"_get",path:t};return e5(e,r),r.value}function e5(e,t,r,n,i,a){if(void 0===r&&(r=!1),void 0===n&&(n=!0),void 0===i&&(i=!0),void 0===a&&(a=0),r&&("function"==typeof r?r(t,0,e,t.path):e7(t,0)),""===t.path){var s={newDocument:e};if("add"===t.op)return s.newDocument=t.value,s;if("replace"===t.op)return s.newDocument=t.value,s.removed=e,s;if("move"===t.op||"copy"===t.op)return s.newDocument=e8(e,t.from),"move"===t.op&&(s.removed=e),s;else if("test"===t.op){if(s.test=te(e,t.value),!1===s.test)throw new e0("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s.newDocument=e,s}else if("remove"===t.op)return s.removed=e,s.newDocument=null,s;else if("_get"===t.op)return t.value=e,s;else if(!r)return s;else throw new e0("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",a,t,e)}n||(e=eB(e));var o=(t.path||"").split("/"),u=e,l=1,c=o.length,d=void 0,f=void 0,p=void 0;for(p="function"==typeof r?r:e7;;
13){if((f=o[l])&&-1!=f.indexOf("~")&&(f=eX(f)),i&&("__proto__"==f||"prototype"==f&&l>0&&"constructor"==o[l-1]))throw TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(r&&void 0===d&&(void 0===u[f]?d=o.slice(0,l).join("/"):l==c-1&&(d=t.path),void 0!==d&&p(t,0,e,d)),l++,Array.isArray(u)){if("-"===f)f=u.length;else if(r&&!eK(f))throw new e0("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",a,t,e);else eK(f)&&(f=~~f);if(l>=c){if(r&&"add"===t.op&&f>u.length)throw new e0("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",a,t,e);var s=e3[t.op].call(t,u,f,e);if(!1===s.test)throw new e0("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s}}else if(l>=c){var s=e2[t.op].call(t,u,f,e);if(!1===s.test)throw new e0("Test operation failed","TEST_OPERATION_FAILED",a,t,e);return s}if(u=u[f],r&&l<c&&(!u||"object"!=typeof u))throw new e0("Cannot perform operation at the desired path","OPERATION_PATH_UNRESOLVABLE",a,t,e)}}function e4(e,t,r,n,i){if(void 0===n&&(n=!0),void 0===i&&(i=!0),r&&!Array.isArray(t))throw new e0("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");n||(e=eB(e));for(var a=Array(t.length),s=0,o=t.length;s<o;s++)a[s]=e5(e,t[s],r,!0,i,s),e=a[s].newDocument;return a.newDocument=e,a}function e6(e,t,r){var n=e5(e,t);if(!1===n.test)throw new e0("Test operation failed","TEST_OPERATION_FAILED",r,t,e);return n.newDocument}function e7(e,t,r,n){if("object"!=typeof e||null===e||Array.isArray(e))throw new e0("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,r);
13if(e2[e.op]){if("string"!=typeof e.path)throw new e0("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,r);else if(0!==e.path.indexOf("/")&&e.path.length>0)throw new e0('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,r);else if(("move"===e.op||"copy"===e.op)&&"string"!=typeof e.from)throw new e0("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,r);else if(("add"===e.op||"replace"===e.op||"test"===e.op)&&void 0===e.value)throw new e0("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,r);else if(("add"===e.op||"replace"===e.op||"test"===e.op)&&function e(t){if(void 0===t)return!0;if(t){if(Array.isArray(t)){for(var r=0,n=t.length;r<n;r++)if(e(t[r]))return!0}else if("object"==typeof t){for(var i=eY(t),a=i.length,s=0;s<a;s++)if(e(t[i[s]]))return!0}}return!1}(e.value))throw new e0("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,r);else if(r){if("add"==e.op){var i=e.path.split("/").length,a=n.split("/").length;if(i!==a+1&&i!==a)throw new e0("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,r)}else if("replace"===e.op||"remove"===e.op||"_get"===e.op){if(e.path!==n)throw new e0("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,r)}else if("move"===e.op||"copy"===e.op){var s=e9([{op:"_get",path:e.from,value:void 0}],r);if(s&&"OPERATION_PATH_UNRESOLVABLE"===s.name)throw new e0("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,r)}}}else throw new e0("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,r)}function e9(e,t,r){try{if(!Array.isArray(e))throw new e0("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)e4(eB(t),eB(e),r||!0);else{r=r||e7;for(var n=0;n<e.length;n++)r(e[n],n,t,void 0)}}catch(e){if(e instanceof e0)return e;throw e}}function te(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){var r,n,i,a=Array.isArray(e),s=Array.isArray(t);if(a&&s){if((n=e.length)!=t.length)return!1;for(r=n;0!=r--;)if(!te(e[r],t[r]))return!1;return!0}if(a!=s)return!1;var o=Object.keys(e);if((n=o.length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!t.hasOwnProperty(o[r]))return!1;for(r=n;0!=r--;)if(!te(e[i=o[r]],t[i]))return!1;return!0}return e!=e&&t!=t}var tt=new WeakMap,tr=function(e){this.observers=new Map,this.obj=e},tn=function(e,t){this.callback=e,this.observer=t};function ti(e,t){t.unobserve()}function ta(e,t){var r=tt.get(e);if(r){var n,i=r.observers.get(t);n=i&&i.observer}else r=new tr(e),tt.set(e,r);if(n)return n;if(n={},r.value=eB(e),t){n.callback=t,n.next=null;var a=function(){ts(n)},s=function(){clearTimeout(n.next),n.next=setTimeout(a)};"u">typeof window&&(window.addEventListener("mouseup",s),window.addEventListener("keyup",s),window.addEventListener("mousedown",s),window.addEventListener("keydown",s),window.addEventListener("change",s))}return n.patches=[],n.object=e,n.unobserve=function(){var e,t;ts(n),clearTimeout(n.next),e=r,t=n,e.observers.delete(t.callback),"u">typeof window&&(window.removeEventListener("mouseup",s),window.removeEventListener("keyup",s),window.removeEventListener("mousedown",s),window.removeEventListener("keydown",s),window.removeEventListener("change",s))},r.observers.set(t,new tn(t,n)),n}function ts(e,t){void 0===t&&(t=!1);var r=tt.get(e.object);to(r.value,e.object,e.patches,"",t),e.patches.length&&e4(r.value,e.patches);var n=e.patches;return n.length>0&&(e.patches=[],e.callback&&e.callback(n)),n}function to(e,t,r,n,i){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var a=eY(t),s=eY(e),o=!1,u=s.length-1;u>=0;u--){var l=s[u],c=e[l];if(eH(t,l)&&(void 0!==t[l]||void 0===c||!1!==Array.isArray(t))){var d=t[l];"object"==typeof c&&null!=c&&"object"==typeof d&&null!=d&&Array.isArray(c)===Array.isArray(d)?to(c,d,r,n+"/"+eW(l),i):c!==d&&(i&&r.push({op:"test",path:n+"/"+eW(l),value:eB(c)}),r.push({op:"replace",path:n+"/"+eW(l),value:eB(d)}))}else Array.isArray(e)===Array.isArray(t)?(i&&r.push({op:"test",path:n+"/"+eW(l),value:eB(c)}),r.push({op:"remove",path:n+"/"+eW(l)}),o=!0):(i&&r.push({op:"test",path:n,value:e}),r.push({op:"replace",path:n,value:t}))}if(o||a.length!=s.length)for(var u=0;u<a.length;u++){var l=a[u];eH(e,l)||void 0===t[l]||r.push({op:"add",path:n+"/"+eW(l),value:eB(t[l])})}}}function tu(e,t,r){void 0===r&&(r=!1);var n=[];return to(e,t,n,"",r),n}let tl=Object.assign({},d,f,{JsonPatchError:eJ,deepClone:eB,escapePathComponent:eW,unescapePathComponent:eX});function tc(e){return"function"==typeof e}
13var td=function(e,t){return(td=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function tf(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}td(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function tp(e,t){var r,n,i,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=o(0),s.throw=o(1),s.return=o(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function o(o){return function(u){var l=[o,u];if(r)throw TypeError("Generator is already executing.");for(;s&&(s=0,l[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&l[0]?n.return:l[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,l[1])).done)return i;switch(n=0,i&&(l=[2&l[0],i.value]),l[0]){case 0:case 1:i=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,n=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===l[0]||2===l[0])){a=0;continue}if(3===l[0]&&(!i||l[1]>i[0]&&l[1]<i[3])){a.label=l[1];break}if(6===l[0]&&a.label<i[1]){a.label=i[1],i=l;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(l);break}i[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(e){l=[6,e],n=0}finally{r=i=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}function th(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function tg(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return s}function tm(e,t,r){if(r||2==arguments.length)for(var n,i=0,a=t.length;i<a;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function tv(e){return this instanceof tv?(this.v=e,this):new tv(e)}var ty=("function"==typeof SuppressedError&&SuppressedError,function(e){return e&&"number"==typeof e.length&&"function"!=typeof e});function tb(e){return tc(null==e?void 0:e.then)}function tw(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var tS=tw(function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map(function(e,t){return t+1+") "+e.toString()}).join("\n  "):"",this.name="UnsubscriptionError",this.errors=t}});function tE(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}var tI=function(){var e;function t(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return t.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var e,t,r,n,i,a=this._parentage;if(a)if(this._parentage=null,Array.isArray(a))try{for(var s=th(a),o=s.next();!o.done;o=s.next())o.value.remove(this)}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}else a.remove(this);var u=this.initialTeardown;if(tc(u))try{u()}catch(e){i=e instanceof tS?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var c=th(l),d=c.next();!d.done;d=c.next()){var f=d.value;try{tC(f)}catch(e){i=null!=i?i:[],e instanceof tS?i=tm(tm([],tg(i)),tg(e.errors)):i.push(e)}}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}}if(i)throw new tS(i)}},t.prototype.add=function(e){var r;if(e&&e!==this)if(this.closed)tC(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!=(r=this._finalizers)?r:[]).push(e)}},t.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},t.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},t.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&tE(t,e)},t.prototype.remove=function(e){var r=this._finalizers;r&&tE(r,e),e instanceof t&&e._removeParent(this)},(e=new t).closed=!0,t.EMPTY=e,t}(),tA=tI.EMPTY;function tk(e){return e instanceof tI||e&&"closed"in e&&tc(e.remove)&&tc(e.add)&&tc(e.unsubscribe)}function tC(e){tc(e)?e():e.unsubscribe()}var tT=void 0,t_={setTimeout:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];var i=t_.delegate;return(null==i?void 0:i.setTimeout)?i.setTimeout.apply(i,tm([e,t],tg(r))):setTimeout.apply(void 0,tm([e,t],tg(r)))},clearTimeout:function(e){var t=t_.delegate;return((null==t?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function tO(e){t_.setTimeout(function(){!1;throw e})}function tx(){}var tR=tN("C",void 0,void 0);function tN(e,t,r){return{kind:e,value:t,error:r}}var tP=null;function tq(e){var t,r,n,i;1;e()}var tj=function(e){function t(t){var r=e.call(this)||this;return r.isStopped=!1,t?(r.destination=t,tk(t)&&t.add(r)):r.destination=t$,r}return tf(t,e),t.create=function(e,t,r){return new tF(e,t,r)},t.prototype.next=function(e){this.isStopped?tV(tN("N",e,void 0),this):this._next(e)},t.prototype.error=function(e){this.isStopped?tV(tN("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?tV(tR,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(tI),tD=Function.prototype.bind;function tM(e,t){return tD.call(e,t)}var tU=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){tL(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){tL(e)}else tL(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){tL(e)}},e}(),tF=function(e){function t(t,r,n){var i,a,s=e.call(this)||this;return tc(t)||!t?i={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:i=t,s.destination=new tU(i),s}return tf(t,e),t}(tj);function tL(e){1;tO(e)}function tV(e,t){}var t$={closed:!0,next:tx,error:function(e){throw e},complete:tx},tG="function"==typeof Symbol&&Symbol.observable||"@@observable";function tz(e){return e}function tQ(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return tH(e)}function tH(e){return 0===e.length?tz:1===e.length?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var tY=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var n=this,i=!function(e){return e&&e instanceof tj||e&&tc(e.next)&&tc(e.error)&&tc(e.complete)&&tk(e)}(e)?new tF(e,t,r):e;return tq(function(){var e=n.operator,t=n.source;i.add(e?e.call(i,t):t?n._subscribe(i):n._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=tB(t))(function(t,n){var i=new tF({next:function(t){try{e(t)}catch(e){n(e),i.unsubscribe()}},error:n,complete:t});r.subscribe(i)})},e.prototype._subscribe=function(e){var t;return null==(t=this.source)?void 0:t.subscribe(e)},e.prototype[tG]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return tH(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=tB(e))(function(e,r){var n;t.subscribe(function(e){return n=e},function(e){return r(e)},function(){return e(n)})})},e.create=function(t){return new e(t)},e}();function tB(e){var t;return null!=(t=null!=e?e:tT)?t:Promise}function tK(e){return Symbol.asyncIterator&&tc(null==e?void 0:e[Symbol.asyncIterator])}function tW(e){return TypeError("You provided "+(null!==e&&"object"==typeof e?"an invali
13d object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var tX="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function tZ(e){return tc(null==e?void 0:e[tX])}function tJ(e){return function(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),a=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",function(e){return function(t){return Promise.resolve(t).then(e,l)}}),n[Symbol.asyncIterator]=function(){return this},n;function s(e,t){i[e]&&(n[e]=function(t){return new Promise(function(r,n){a.push([e,t,r,n])>1||o(e,t)})},t&&(n[e]=t(n[e])))}function o(e,t){try{var r;(r=i[e](t)).value instanceof tv?Promise.resolve(r.value.v).then(u,l):c(a[0][2],r)}catch(e){c(a[0][3],e)}}function u(e){o("next",e)}function l(e){o("throw",e)}function c(e,t){e(t),a.shift(),a.length&&o(a[0][0],a[0][1])}}(this,arguments,function(){var t,r,n;return tp(this,function(i){switch(i.label){case 0:t=e.getReader(),i.label=1;case 1:i.trys.push([1,,9,10]),i.label=2;case 2:return[4,tv(t.read())];case 3:if(n=(r=i.sent()).value,!r.done)return[3,5];return[4,tv(void 0)];case 4:return[2,i.sent()];case 5:return[4,tv(n)];case 6:return[4,i.sent()];case 7:return i.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}function t0(e){return tc(null==e?void 0:e.getReader)}function t1(e){if(e instanceof tY)return e;if(null!=e){var t,r,n,i;if(tc(e[tG])){return t=e,new tY(function(e){var r=t[tG]();if(tc(r.subscribe))return r.subscribe(e);throw TypeError("Provided object does not correctly implement Symbol.observable")})}if(ty(e)){return r=e,new tY(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}if(tb(e)){return n=e,new tY(function(e){n.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,tO)})}if(tK(e))return t2(e);if(tZ(e)){return i=e,new tY(function(e){var t,r;try{for(var n=th(i),a=n.next();!a.done;a=n.next()){var s=a.value;if(e.next(s),e.closed)return}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(t)throw t.error}}e.complete()})}if(t0(e))return t2(tJ(e))}throw tW(e)}function t2(e){return new tY(function(t){(function(e,t){var r,n,i,a,s,o,u,l;return s=this,o=void 0,u=void 0,l=function(){var s;return tp(this,function(o){switch(o.label){case 0:o.trys.push([0,5,6,11]),r=function(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=th(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,i){var a,s,o;a=n,s=i,o=(t=e[r](t)).done,Promise.resolve(t.value).then(function(e){a({value:e,done:o})},s)})}}}(e),o.label=1;case 1:return[4,r.next()];case 2:if((n=o.sent()).done)return[3,4];if(s=n.value,t.next(s),t.closed)return[2];o.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return i={error:o.sent()},[3,11];case 6:if(o.trys.push([6,,9,10]),!(n&&!n.done&&(a=r.return)))return[3,8];return[4,a.call(r)];case 7:o.sent(),o.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})},new(u||(u=Promise))(function(e,t){function r(e){try{i(l.next(e))}catch(e){t(e)}}function n(e){try{i(l.throw(e))}catch(e){t(e)}}function i(t){var i;t.done?e(t.value):((i=t.value)instanceof u?i:new u(function(e){e(i)})).then(r,n)}i((l=l.apply(s,o||[])).next())})})(e,t).catch(function(e){return t.error(e)})})}function t3(e,t,r,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var a=t.schedule(function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()},n);if(e.add(a),!i)return a}function t8(e){return function(t){if(tc(null==t?void 0:t.lift))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError("Unable to lift unknown Observable type")}}function t5(e,t,r,n,i){return new t4(e,t,r,n,i)}var t4=function(e){function t(t,r,n,i,a,s){var o=e.call(this,t)||this;return o.onFinalize=a,o.shouldUnsubscribe=s,o._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,o._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,o._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,o}return tf(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),r||null==(t=this.onFinalize)||t.call(this)}},t}(tj);function t6(e,t){return void 0===t&&(t=0),t8(function(r,n){r.subscribe(t5(n,function(r){return t3(n,e,function(){return n.next(r)},t)},function(){return t3(n,e,function(){return n.complete()},t)},function(r){return t3(n,e,function(){return n.error(r)},t)}
13))})}function t7(e,t){return void 0===t&&(t=0),t8(function(r,n){n.add(e.schedule(function(){return r.subscribe(n)},t))})}function t9(e,t){if(!e)throw Error("Iterable cannot be null");return new tY(function(r){t3(r,t,function(){var n=e[Symbol.asyncIterator]();t3(r,t,function(){n.next().then(function(e){e.done?r.complete():r.next(e.value)})},0,!0)})})}function re(e,t){return t?function(e,t){if(null!=e){if(tc(e[tG]))return t1(e).pipe(t7(t),t6(t));if(ty(e))return new tY(function(r){var n=0;return t.schedule(function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())})});if(tb(e))return t1(e).pipe(t7(t),t6(t));if(tK(e))return t9(e,t);if(tZ(e))return new tY(function(r){var n;return t3(r,t,function(){n=e[tX](),t3(r,t,function(){var e,t,i;try{t=(e=n.next()).value,i=e.done}catch(e){r.error(e);return}i?r.complete():r.next(t)},0,!0)}),function(){return tc(null==n?void 0:n.return)&&n.return()}});if(t0(e))return t9(tJ(e),t)}throw tW(e)}(e,t):t1(e)}function rt(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=(e=t[t.length-1])&&tc(e.schedule)?t.pop():void 0;return re(t,n)}var rr=new tY(function(e){return e.complete()});function rn(e,t){var r=tc(e)?e:function(){return e},n=function(e){return e.error(r())};return new tY(t?function(e){return t.schedule(n,0,e)}:n)}function ri(e){return new tY(function(t){t1(e()).subscribe(t)})}var ra=tw(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),rs=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return tf(t,e),t.prototype.lift=function(e){var t=new ro(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new ra},t.prototype.next=function(e){var t=this;tq(function(){var r,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=th(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}})},t.prototype.error=function(e){var t=this;tq(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}})},t.prototype.complete=function(){var e=this;tq(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null==(e=this.observers)?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,r=this.hasError,n=this.isStopped,i=this.observers;return r||n?tA:(this.currentObservers=null,i.push(e),new tI(function(){t.currentObservers=null,tE(i,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this.hasError,r=this.thrownError,n=this.isStopped;t?e.error(r):n&&e.complete()},t.prototype.asObservable=function(){var e=new tY;return e.source=this,e},t.create=function(e,t){return new ro(e,t)},t}(tY),ro=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return tf(t,e),t.prototype.next=function(e){var t,r;null==(r=null==(t=this.destination)?void 0:t.next)||r.call(t,e)},t.prototype.error=function(e){var t,r;null==(r=null==(t=this.destination)?void 0:t.error)||r.call(t,e)},t.prototype.complete=function(){var e,t;null==(t=null==(e=this.destination)?void 0:e.complete)||t.call(e)},t.prototype._subscribe=function(e){var t,r;return null!=(r=null==(t=this.source)?void 0:t.subscribe(e))?r:tA},t}(rs),ru={now:function(){return(ru.delegate||Date).now()},delegate:void 0},rl=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=ru);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,r),i}return tf(t,e),t.prototype.next=function(t){var r=this.isStopped,n=this._buffer,i=this._infiniteTimeWindow,a=this._timestampProvider,s=this._windowTime;!r&&(n.push(t),i||n.push(a.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!e.closed;i+=r?1:2)e.next(n[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this._bufferSize,t=this._timestampProvider,r=this._buffer,n=this._infiniteTimeWindow,i=(n?1:2)*e;if(e<1/0&&i<r.length&&r.splice(0,r.length-i),!n){for(var a=t.now(),s=0,o=1;o<r.length&&r[o]<=a;o+=2)s=o;s&&r.splice(0,s+1)}},t}(rs);function rc(e,t){return t8(function(r,n){var i=0;r.subscribe(t5(n,function(r){n.next(e.call(t,r,i++))}))})}function rd(e,t,r){return(void 0===r&&(r=1/0),tc(t))?rd(function(r,n){return rc(function(e,i){return t(r,e,n,i)})(t1(e(r,n)))},r):("number"==typeof t&&(r=t),t8(function(t,n){var i,a,s,o,u,l,c,d;return i=r,a=[],s=0,o=0,u=!1,l=function(){!u||a.length||s||n.complete()},c=function(e){return s<i?d(e):a.push(e)},d=function(t){s++;var r=!1;t1(e(t,o++)).subscribe(t5(n,function(e){n.next(e)},function(){r=!0},void 0,function(){if(r)try{for(s--;a.length&&s<i;)!function(){var e=a.shift();d(e)}();l()}catch(e){n.error(e)}}))},t.subscribe(t5(n,c,function(){u=!0,l()})),function(){}}))}function rf(e){return t8(function(t,r){try{t.subscribe(r)}finally{r.add(e)}})}var rp=tw(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function rh(e,t){var r="object"==typeof t;return new Promise(function(n,i){var a,s=!1;e.subscribe({next:function(e){a=e,s=!0},error:i,complete:function(){s?n(a):r?n(t.defaultValue):i(new rp)}})})}function rg(e,t){return tc(t)?rd(e,t,1):rd(e,1)}function rm(e){return t8(function(t,r){t1(e).subscribe(t5(r,function(){return r.complete()},tx)),r.closed||t.subscribe(r)})}function rv(e){return t8(function(t,r){var n,i=null,a=!1;i=t.subscribe(t5(r,void 0,void 0,function(s){n=t1(e(s,rv(e)(t))),i?(i.unsubscribe(),i=null,n.subscribe(r)):a=!0})),a&&(i.unsubscribe(),i=null,n.subscribe(r))})}function ry(e){return" \r\n	".indexOf(e)>=0}function rb(e){for(var t,r,n,i=["topLevel"],a=0,s=function(e){return i.push(e)},o=function(e){return i[i.length-1]=e},u=function(e){null==t&&(t=a,r=i.length,n=e)},l=function(e){e===n&&(t=void 0,r=void 0,n=void 0)},c=function(){return i.pop()},d=function(){return a--},f=function(e){if("0"<=e&&e<="9")return void s("number");switch(e){case'"':s("string");return;case"-":s("numberNeedsDigit");return;case"t":s("true");return;case"f":s("false");return;case"n":s("null");return;case"[":s("arrayNeedsValue");return;case"{":s("objectNeedsKey");return}},p=e.length;a<p;a++){var h=e[a];switch(i[i.length-1]){case"topLevel":f(h);break;case"string":switch(h){case'"':c();break;case"\\":u("stringEscape"),s("stringEscaped")}break;
13case"stringEscaped":"u"===h?s("stringUnicode"):(l("stringEscape"),c());break;case"stringUnicode":a-e.lastIndexOf("u",a)==4&&(l("stringEscape"),c());break;case"number":"."===h?o("numberNeedsDigit"):"e"===h||"E"===h?o("numberNeedsExponent"):(h<"0"||h>"9")&&(d(),c());break;case"numberNeedsDigit":o("number");break;case"numberNeedsExponent":o("+"===h||"-"===h?"numberNeedsDigit":"number");break;case"true":case"false":case"null":(h<"a"||h>"z")&&(d(),c());break;case"arrayNeedsValue":"]"===h?c():ry(h)||(l("collectionItem"),o("arrayNeedsComma"),f(h));break;case"arrayNeedsComma":"]"===h?c():","===h&&(u("collectionItem"),o("arrayNeedsValue"));break;case"objectNeedsKey":"}"===h?c():'"'===h&&(u("collectionItem"),o("objectNeedsColon"),s("string"));break;case"objectNeedsColon":":"===h&&o("objectNeedsValue");break;case"objectNeedsValue":ry(h)||(l("collectionItem"),o("objectNeedsComma"),f(h));break;case"objectNeedsComma":"}"===h?c():","===h&&(u("collectionItem"),o("objectNeedsKey"))}}null!=r&&(i.length=r);for(var g=[null!=t?e.slice(0,t):e],m=function(t){return g.push(t.slice(e.length-e.lastIndexOf(t[0])))},v=i.length-1;v>=0;v--)switch(i[v]){case"string":g.push('"');break;case"numberNeedsDigit":case"numberNeedsExponent":g.push("0");break;case"true":m("true");break;case"false":m("false");break;case"null":m("null");break;case"arrayNeedsValue":case"arrayNeedsComma":g.push("]");break;case"objectNeedsKey":case"objectNeedsColon":case"objectNeedsValue":case"objectNeedsComma":g.push("}")}return g.join("")}function rw(){let e=0,t=0;for(let r=0;r<28;r+=7){let n=this.buf[this.pos++];if(e|=(127&n)<<r,(128&n)==0)return this.assertBounds(),[e,t]}let r=this.buf[this.pos++];if(e|=(15&r)<<28,t=(112&r)>>4,(128&r)==0)return this.assertBounds(),[e,t];for(let r=3;r<=31;r+=7){let n=this.buf[this.pos++];if(t|=(127&n)<<r,(128&n)==0)return this.assertBounds(),[e,t]}throw Error("invalid varint")}function rS(e,t,r){for(let n=0;n<28;n+=7){let i=e>>>n,a=i>>>7!=0||0!=t,s=(a?128|i:i)&255;if(r.push(s),!a)return}let n=e>>>28&15|(7&t)<<4,i=t>>3!=0;if(r.push((i?128|n:n)&255),i){for(let e=3;e<31;e+=7){let n=t>>>e,i=n>>>7!=0,a=(i?128|n:n)&255;if(r.push(a),!i)return}r.push(t>>>31&1)}}function rE(e){let t="-"===e[0];t&&(e=e.slice(1));let r=0,n=0;function i(t,i){let a=Number(e.slice(t,i));n*=1e6,(r=1e6*r+a)>=0x100000000&&(n+=r/0x100000000|0,r%=0x100000000)}return i(-24,-18),i(-18,-12),i(-12,-6),i(-6),t?rk(r,n):rA(r,n)}function rI(e,t){if({lo:e,hi:t}={lo:e>>>0,hi:t>>>0},t<=2097151)return String(0x100000000*t+e);let r=0xffffff&e,n=(e>>>24|t<<8)&0xffffff,i=t>>16&65535,a=r+6777216*n+6710656*i,s=n+8147497*i,o=2*i;return a>=1e7&&(s+=Math.floor(a/1e7),a%=1e7),s>=1e7&&(o+=Math.floor(s/1e7),s%=1e7),o.toString()+rC(s)+rC(a)}function rA(e,t){return{lo:0|e,hi:0|t}}function rk(e,t){return t=~t,e?e=~e+1:t+=1,rA(e,t)}let rC=e=>{let t=String(e);return"0000000".slice(t.length)+t};function rT(e,t){if(e>=0){for(;e>127;)t.push(127&e|128),e>>>=7;t.push(e)}else{for(let r=0;r<9;r++)t.push(127&e|128),e>>=7;t.push(1)}}function r_(){let e=this.buf[this.pos++],t=127&e;if((128&e)==0||(t|=(127&(e=this.buf[this.pos++]))<<7,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<14,(128&e)==0)||(t|=(127&(e=this.buf[this.pos++]))<<21,(128&e)==0))return this.assertBounds(),t;t|=(15&(e=this.buf[this.pos++]))<<28;for(let t=5;(128&e)!=0&&t<10;t++)e=this.buf[this.pos++];if((128&e)!=0)throw Error("invalid varint");return this.assertBounds(),t>>>0}var rO=r(94833);let rx=function(){let e=new DataView(new ArrayBuffer(8));if("function"==typeof BigInt&&"function"==typeof e.getBigInt64&&"function"==typeof e.getBigUint64&&"function"==typeof e.setBigInt64&&"function"==typeof e.setBigUint64&&(globalThis.Deno||"object"!=typeof rO||"object"!=typeof rO.env||"1"!==rO.env.BUF_BIGINT_DISABLE)){let t=BigInt("-9223372036854775808"),r=BigInt("9223372036854775807"),n=BigInt("0"),i=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(e){let n="bigint"==typeof e?e:BigInt(e);if(n>r||n<t)throw Error(`invalid int64: ${e}`);return n},uParse(e){let t="bigint"==typeof e?e:BigInt(e);if(t>i||t<n)throw Error(`invalid uint64: ${e}`);return t},enc(t){return e.setBigInt64(0,this.parse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(t){return e.setBigInt64(0,this.uParse(t),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec:(t,r)=>(e.setInt32(0,t,!0),e.setInt32(4,r,!0),e.getBigInt64(0,!0)),uDec:(t,r)=>(e.setInt32(0,t,!0),e.setInt32(4,r,!0),e.getBigUint64(0,!0))}}return{zero:"0",supported:!1,parse:e=>("string"!=typeof e&&(e=e.toString()),rR(e),e),uParse:e=>("string"!=typeof e&&(e=e.toString()),rN(e),e),enc:e=>("string"!=typeof e&&(e=e.toString()),rR(e),rE(e)),uEnc:e=>("string"!=typeof e&&(e=e.toString()),rN(e),rE(e)),dec:(e,t)=>{let r,n,i;return(n=0x80000000&(r=rA(e,t)).hi)&&(r=rk(r.lo,r.hi)),i=rI(r.lo,r.hi),n?"-"+i:i},uDec:(e,t)=>rI(e,t)}}();function rR(e){if(!/^-?[0-9]+$/.test(e))throw Error("invalid int64: "+e)}function rN(e){if(!/^[0-9]+$/.test(e))throw Error("invalid uint64: "+e)}let rP=Symbol.for("@bufbuild/protobuf/text-encoding");function rq(){if(void 0==globalThis[rP]){let e,t=new globalThis.TextEncoder,r=new globalThis.TextDecoder;globalThis[rP]={encodeUtf8:e=>t.encode(e),decodeUtf8:(t,n)=>n?(void 0===e&&(e=new globalThis.TextDecoder("utf-8",{fatal:!0})),e.decode(t)):r.decode(t),checkUtf8(e){try{return encodeURIComponent(e),!0}catch(e){return!1}}}}return globalThis[rP]}(a=c||(c={}))[a.Varint=0]="Varint",a[a.Bit64=1]="Bit64",a[a.LengthDelimited=2]="LengthDelimited",a[a.StartGroup=3]="StartGroup",a[a.EndGroup=4]="EndGroup",a[a.Bit32=5]="Bit32";class rj{constructor(e=rq().encodeUtf8){this.encodeUtf8=e,this.stack=[],this.chunks=[],this.buf=[]}finish(){this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]);let e=0;for(let t=0;t<this.chunks.length;t++)e+=this.chunks[t].length;let t=new Uint8Array(e),r=0;for(let e=0;e<this.chunks.length;e++)t.set(this.chunks[e],r),r+=this.chunks[e].length;return this.chunks=[],t}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),t=this.stack.pop();if(!t)throw Error("invalid state, fork stack empty");return this.chunks=t.chunks,this.buf=t.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(rU(e);e>127;)this.buf.push(127&e|128),e>>>=7;return this.buf.push(e),this}int32(e){return rM(e),rT(e,this.buf),this}bool(e){return this.buf.push(+!!e),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let t=this.encodeUtf8(e);return this.uint32(t.byteLength),this.raw(t)}float(e){var t=e;if("string"==typeof t){let e=t;if(Number.isNaN(t=Number(t))&&"NaN"!==e)throw Error("invalid float32: "+e)}else if("number"!=typeof t)throw Error("invalid float32: "+typeof t);
13if(Number.isFinite(t)&&(t>34028234663852886e22||t<-34028234663852886e22))throw Error("invalid float32: "+t);let r=new Uint8Array(4);return new DataView(r.buffer).setFloat32(0,e,!0),this.raw(r)}double(e){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,e,!0),this.raw(t)}fixed32(e){rU(e);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),this.raw(t)}sfixed32(e){rM(e);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,e,!0),this.raw(t)}sint32(e){return rM(e),rT(e=(e<<1^e>>31)>>>0,this.buf),this}sfixed64(e){let t=new Uint8Array(8),r=new DataView(t.buffer),n=rx.enc(e);return r.setInt32(0,n.lo,!0),r.setInt32(4,n.hi,!0),this.raw(t)}fixed64(e){let t=new Uint8Array(8),r=new DataView(t.buffer),n=rx.uEnc(e);return r.setInt32(0,n.lo,!0),r.setInt32(4,n.hi,!0),this.raw(t)}int64(e){let t=rx.enc(e);return rS(t.lo,t.hi,this.buf),this}sint64(e){let t=rx.enc(e),r=t.hi>>31;return rS(t.lo<<1^r,(t.hi<<1|t.lo>>>31)^r,this.buf),this}uint64(e){let t=rx.uEnc(e);return rS(t.lo,t.hi,this.buf),this}}class rD{constructor(e,t=rq().decodeUtf8){this.decodeUtf8=t,this.varint64=rw,this.uint32=r_,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength)}tag(){let e=this.pos,t=this.uint32(),r=this.pos-e;if(r>5||5==r&&this.buf[this.pos-1]>15)throw Error("illegal tag: varint overflows uint32");let n=t>>>3,i=7&t;if(n<=0||i>5)throw Error("illegal tag: field no "+n+" wire type "+i);return[n,i]}skip(e,t){let r=this.pos;switch(e){case c.Varint:for(;128&this.buf[this.pos++];);break;case c.Bit64:this.pos+=4;case c.Bit32:this.pos+=4;break;case c.LengthDelimited:let n=this.uint32();this.pos+=n;break;case c.StartGroup:for(;;){let[e,r]=this.tag();if(r===c.EndGroup){if(void 0!==t&&e!==t)throw Error("invalid end group tag");break}this.skip(r,e)}break;default:throw Error("cant skip wire type "+e)}return this.assertBounds(),this.buf.subarray(r,this.pos)}assertBounds(){if(this.pos>this.len)throw RangeError("premature EOF")}int32(){return 0|this.uint32()}sint32(){let e=this.uint32();return e>>>1^-(1&e)}int64(){return rx.dec(...this.varint64())}uint64(){return rx.uDec(...this.varint64())}sint64(){let[e,t]=this.varint64(),r=-(1&e);return e=(e>>>1|(1&t)<<31)^r,t=t>>>1^r,rx.dec(e,t)}bool(){let[e,t]=this.varint64();return 0!==e||0!==t}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return rx.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return rx.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(e){return this.decodeUtf8(this.bytes(),e)}}function rM(e){if("string"==typeof e)e=Number(e);else if("number"!=typeof e)throw Error("invalid int32: "+typeof e);if(!Number.isInteger(e)||e>0x7fffffff||e<-0x80000000)throw Error("invalid int32: "+e)}function rU(e){if("string"==typeof e)e=Number(e);else if("number"!=typeof e)throw Error("invalid uint32: "+typeof e);if(!Number.isInteger(e)||e>0xffffffff||e<0)throw Error("invalid uint32: "+e)}let rF=((s={})[s.NULL_VALUE=0]="NULL_VALUE",s[s.UNRECOGNIZED=-1]="UNRECOGNIZED",s);function rL(){return{fields:{}}}let rV={encode:(e,t=new rj)=>(Object.entries(e.fields).forEach(([e,r])=>{void 0!==r&&rG.encode({key:e,value:r},t.uint32(10).fork()).join()}),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=rL();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:{if(10!==e)break;let t=rG.decode(r,r.uint32());void 0!==t.value&&(i.fields[t.key]=t.value);continue}}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>rV.fromPartial(e??{}),fromPartial(e){let t=rL();return t.fields=Object.entries(e.fields??{}).reduce((e,[t,r])=>(void 0!==r&&(e[t]=r),e),{}),t},wrap(e){let t=rL();if(void 0!==e)for(let r of Object.keys(e))t.fields[r]=e[r];return t},unwrap(e){let t={};if(e.fields)for(let r of Object.keys(e.fields))t[r]=e.fields[r];return t}};function r$(){return{key:"",value:void 0}}let rG={encode:(e,t=new rj)=>(""!==e.key&&t.uint32(10).string(e.key),void 0!==e.value&&rQ.encode(rQ.wrap(e.value),t.uint32(18).fork()).join(),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=r$();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.key=r.string();continue;case 2:if(18!==e)break;i.value=rQ.unwrap(rQ.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>rG.fromPartial(e??{}),fromPartial(e){let t=r$();return t.key=e.key??"",t.value=e.value??void 0,t}};function rz(){return{nullValue:void 0,numberValue:void 0,stringValue:void 0,boolValue:void 0,structValue:void 0,listValue:void 0}}let rQ={encode:(e,t=new rj)=>(void 0!==e.nullValue&&t.uint32(8).int32(e.nullValue),void 0!==e.numberValue&&t.uint32(17).double(e.numberValue),void 0!==e.stringValue&&t.uint32(26).string(e.stringValue),void 0!==e.boolValue&&t.uint32(32).bool(e.boolValue),void 0!==e.structValue&&rV.encode(rV.wrap(e.structValue),t.uint32(42).fork()).join(),void 0!==e.listValue&&rY.encode(rY.wrap(e.listValue),t.uint32(50).fork()).join(),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=rz();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(8!==e)break;i.nullValue=r.int32();continue;case 2:if(17!==e)break;i.numberValue=r.double();continue;case 3:if(26!==e)break;
13i.stringValue=r.string();continue;case 4:if(32!==e)break;i.boolValue=r.bool();continue;case 5:if(42!==e)break;i.structValue=rV.unwrap(rV.decode(r,r.uint32()));continue;case 6:if(50!==e)break;i.listValue=rY.unwrap(rY.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>rQ.fromPartial(e??{}),fromPartial(e){let t=rz();return t.nullValue=e.nullValue??void 0,t.numberValue=e.numberValue??void 0,t.stringValue=e.stringValue??void 0,t.boolValue=e.boolValue??void 0,t.structValue=e.structValue??void 0,t.listValue=e.listValue??void 0,t},wrap(e){let t=rz();if(null===e)t.nullValue=rF.NULL_VALUE;else if("boolean"==typeof e)t.boolValue=e;else if("number"==typeof e)t.numberValue=e;else if("string"==typeof e)t.stringValue=e;else if(globalThis.Array.isArray(e))t.listValue=e;else if("object"==typeof e)t.structValue=e;else if(void 0!==e)throw new globalThis.Error("Unsupported any value type: "+typeof e);return t},unwrap(e){if(void 0!==e.stringValue)return e.stringValue;if(e?.numberValue!==void 0)return e.numberValue;if(e?.boolValue!==void 0)return e.boolValue;if(e?.structValue!==void 0)return e.structValue;if(e?.listValue!==void 0)return e.listValue;else if(e?.nullValue!==void 0)return null}};function rH(){return{values:[]}}let rY={encode(e,t=new rj){for(let r of e.values)rQ.encode(rQ.wrap(r),t.uint32(10).fork()).join();return t},decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=rH();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.values.push(rQ.unwrap(rQ.decode(r,r.uint32())));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>rY.fromPartial(e??{}),fromPartial(e){let t=rH();return t.values=e.values?.map(e=>e)||[],t},wrap(e){let t=rH();return t.values=e??[],t},unwrap:e=>e?.hasOwnProperty("values")&&globalThis.Array.isArray(e.values)?e.values:e},rB=((o={})[o.ADD=0]="ADD",o[o.REMOVE=1]="REMOVE",o[o.REPLACE=2]="REPLACE",o[o.MOVE=3]="MOVE",o[o.COPY=4]="COPY",o[o.TEST=5]="TEST",o[o.UNRECOGNIZED=-1]="UNRECOGNIZED",o);function rK(){return{op:0,path:"",from:void 0,value:void 0}}let rW={encode:(e,t=new rj)=>(0!==e.op&&t.uint32(8).int32(e.op),""!==e.path&&t.uint32(18).string(e.path),void 0!==e.from&&t.uint32(26).string(e.from),void 0!==e.value&&rQ.encode(rQ.wrap(e.value),t.uint32(34).fork()).join(),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=rK();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(8!==e)break;i.op=r.int32();continue;case 2:if(18!==e)break;i.path=r.string();continue;case 3:if(26!==e)break;i.from=r.string();continue;case 4:if(34!==e)break;i.value=rQ.unwrap(rQ.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>rW.fromPartial(e??{}),fromPartial(e){let t=rK();return t.op=e.op??0,t.path=e.path??"",t.from=e.from??void 0,t.value=e.value??void 0,t}};function rX(){return{id:"",type:"",function:void 0}}let rZ={encode:(e,t=new rj)=>(""!==e.id&&t.uint32(10).string(e.id),""!==e.type&&t.uint32(18).string(e.type),void 0!==e.function&&r0.encode(e.function,t.uint32(26).fork()).join(),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=rX();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.id=r.string();continue;case 2:if(18!==e)break;i.type=r.string();continue;case 3:if(26!==e)break;i.function=r0.decode(r,r.uint32());continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>rZ.fromPartial(e??{}),fromPartial(e){let t=rX();return t.id=e.id??"",t.type=e.type??"",t.function=void 0!==e.function&&null!==e.function?r0.fromPartial(e.function):void 0,t}};function rJ(){return{name:"",arguments:""}}let r0={encode:(e,t=new rj)=>(""!==e.name&&t.uint32(10).string(e.name),""!==e.arguments&&t.uint32(18).string(e.arguments),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=rJ();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.name=r.string();continue;case 2:if(18!==e)break;i.arguments=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>r0.fromPartial(e??{}),fromPartial(e){let t=rJ();return t.name=e.name??"",t.arguments=e.arguments??"",t}};function r1(){return{value:"",mimeType:""}}let r2={encode:(e,t=new rj)=>(""!==e.value&&t.uint32(10).string(e.value),""!==e.mimeType&&t.uint32(18).string(e.mimeType),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=r1();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.value=r.string();continue;case 2:if(18!==e)break;i.mimeType=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>r2.fromPartial(e??{}),fromPartial(e){let t=r1();return t.value=e.value??"",t.mimeType=e.mimeType??"",t}};function r3(){return{value:"",mimeType:void 0}}let r8={encode:(e,t=new rj)=>(""!==e.value&&t.uint32(10).string(e.value),void 0!==e.mimeType&&t.uint32(18).string(e.mimeType),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=r3();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.value=r.string();continue;case 2:if(18!==e)break;i.mimeType=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>r8.fromPartial(e??{}),fromPartial(e){let t=r3();return t.value=e.value??"",t.mimeType=e.mimeType??void 0,t}};function r5(){return{data:void 0,url:void 0}}let r4={encode:(e,t=new rj)=>(void 0!==e.data&&r2.encode(e.data,t.uint32(10).fork()).join(),void 0!==e.url&&r8.encode(e.url,t.uint32(18).fork()).join(),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=r5();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.data=r2.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.url=r8.decode(r,r.uint32());continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>r4.fromPartial(e??{}),fromPartial(e){let t=r5();return t.data=void 0!==e.data&&null!==e.data?r2.fromPartial(e.data):void 0,t.url=void 0!==e.url&&null!==e.url?r8.fromPartial(e.url):void 0,t}},r6={encode:(e,t=new rj)=>(""!==e.text&&t.uint32(10).string(e.text),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i={text:""};for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.text=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>r6.fromPartial(e??{}),fromPartial(e){let t={text:""};return t.text=e.text??"",t}};function r7(){return{source:void 0,metadata:void 0}}let r9={encode:(e,t=new rj)=>(void 0!==e.source&&r4.encode(e.source,t.uint32(10).fork()).join(),void 0!==e.metadata&&rQ.encode(rQ.wrap(e.metadata),t.uint32(18).fork()).join(),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=r7();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.source=r4.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.metadata=rQ.unwrap(rQ.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>r9.fromPartial(e??{}),fromPartial(e){let t=r7();return t.source=void 0!==e.source&&null!==e.source?r4.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function ne(){return{source:void 0,metadata:void 0}}let nt={encode:(e,t=new rj)=>(void 0!==e.source&&r4.encode(e.source,t.uint32(10).fork()).join(),void 0!==e.metadata&&rQ.encode(rQ.wrap(e.metadata),t.uint32(18).fork()).join(),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=ne();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.source=r4.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.metadata=rQ.unwrap(rQ.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>nt.fromPartial(e??{}),fromPartial(e){let t=ne();return t.source=void 0!==e.source&&null!==e.source?r4.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function nr(){return{source:void 0,metadata:void 0}}let nn={encode:(e,t=new rj)=>(void 0!==e.source&&r4.encode(e.source,t.uint32(10).fork()).join(),void 0!==e.metadata&&rQ.encode(rQ.wrap(e.metadata),t.uint32(18).fork()).join(),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=nr();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.source=r4.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.metadata=rQ.unwrap(rQ.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>nn.fromPartial(e??{}),fromPartial(e){let t=nr();return t.source=void 0!==e.source&&null!==e.source?r4.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function ni(){return{source:void 0,metadata:void 0}}let na={encode:(e,t=new rj)=>(void 0!==e.source&&r4.encode(e.source,t.uint32(10).fork()).join(),void 0!==e.metadata&&rQ.encode(rQ.wrap(e.metadata),t.uint32(18).fork()).join(),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=ni();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.source=r4.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.metadata=rQ.unwrap(rQ.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>na.fromPartial(e??{}),fromPartial(e){let t=ni();return t.source=void 0!==e.source&&null!==e.source?r4.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function ns(){return{text:void 0,image:void 0,audio:void 0,video:void 0,document:void 0}}let no={encode:(e,t=new rj)=>(void 0!==e.text&&r6.encode(e.text,t.uint32(10).fork()).join(),void 0!==e.image&&r9.encode(e.image,t.uint32(18).fork()).join(),void 0!==e.audio&&nt.encode(e.audio,t.uint32(26).fork()).join(),void 0!==e.video&&nn.encode(e.video,t.uint32(34).fork()).join(),void 0!==e.document&&na.encode(e.document,t.uint32(42).fork()).join(),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=ns();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.text=r6.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.image=r9.decode(r,r.uint32());continue;case 3:if(26!==e)break;i.audio=nt.decode(r,r.uint32());continue;case 4:if(34!==e)break;i.video=nn.decode(r,r.uint32());continue;case 5:if(42!==e)break;i.document=na.decode(r,r.uint32());continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>no.fromPartial(e??{}),fromPartial(e){let t=ns();return t.text=void 0!==e.text&&null!==e.text?r6.fromPartial(e.text):void 0,t.image=void 0!==e.image&&null!==e.image?r9.fromPartial(e.image):void 0,t.audio=void 0!==e.audio&&null!==e.audio?nt.fromPartial(e.audio):void 0,t.video=void 0!==e.video&&null!==e.video?nn.fromPartial(e.video):void 0,t.document=void 0!==e.document&&null!==e.document?na.fromPartial(e.document):void 0,t}};function nu(){return{id:"",role:"",content:void 0,name:void 0,toolCalls:[],toolCallId:void 0,error:void 0,contentParts:[]}}let nl={encode(e,t=new rj){for(let r of(""!==e.id&&t.uint32(10).string(e.id),""!==e.role&&t.uint32(18).string(e.role),void 0!==e.content&&t.uint32(26).string(e.content),void 0!==e.name&&t.uint32(34).string(e.name),e.toolCalls))rZ.encode(r,t.uint32(42).fork()).join();for(let r of(void 0!==e.toolCallId&&t.uint32(50).string(e.toolCallId),void 0!==e.error&&t.uint32(58).string(e.error),e.contentParts))no.encode(r,t.uint32(66).fork()).join();return t},decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=nu();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.id=r.string();continue;case 2:if(18!==e)break;i.role=r.string();continue;case 3:if(26!==e)break;i.content=r.string();continue;case 4:if(34!==e)break;i.name=r.string();continue;case 5:if(42!==e)break;i.toolCalls.push(rZ.decode(r,r.uint32()));continue;case 6:if(50!==e)break;i.toolCallId=r.string();continue;case 7:if(58!==e)break;i.error=r.string();continue;case 8:if(66!==e)break;i.contentParts.push(no.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>nl.fromPartial(e??{}),fromPartial(e){let t=nu();return t.id=e.id??"",t.role=e.role??"",t.content=e.content??void 0,t.name=e.name??void 0,t.toolCalls=e.toolCalls?.map(e=>rZ.fromPartial(e))||[],t.toolCallId=e.toolCallId??void 0,t.error=e.error??void 0,t.contentParts=e.contentParts?.map(e=>no.fromPartial(e))||[],t}},nc=((u={})[u.TEXT_MESSAGE_START=0]="TEXT_MESSAGE_START",u[u.TEXT_MESSAGE_CONTENT=1]="TEXT_MESSAGE_CONTENT",u[u.TEXT_MESSAGE_END=2]="TEXT_MESSAGE_END",u[u.TOOL_CALL_START=3]="TOOL_CALL_START",u[u.TOOL_CALL_ARGS=4]="TOOL_CALL_ARGS",u[u.TOOL_CALL_END=5]="TOOL_CALL_END",u[u.STATE_SNAPSHOT=6]="STATE_SNAPSHOT",u[u.STATE_DELTA=7]="STATE_DELTA",u[u.MESSAGES_SNAPSHOT=8]="MESSAGES_SNAPSHOT",u[u.RAW=9]="RAW",u[u.CUSTOM=10]="CUSTOM",u[u.RUN_STARTED=11]="RUN_STARTED",u[u.RUN_FINISHED=12]="RUN_FINISHED",u[u.RUN_ERROR=13]="RUN_ERROR",u[u.STEP_STARTED=14]="STEP_STARTED",u[u.STEP_FINISHED=15]="STEP_FINISHED",u[u.UNRECOGNIZED=-1]="UNRECOGNIZED",u);
13function nd(){return{type:0,timestamp:void 0,rawEvent:void 0}}let nf={encode:(e,t=new rj)=>(0!==e.type&&t.uint32(8).int32(e.type),void 0!==e.timestamp&&t.uint32(16).int64(e.timestamp),void 0!==e.rawEvent&&rQ.encode(rQ.wrap(e.rawEvent),t.uint32(26).fork()).join(),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=nd();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(8!==e)break;i.type=r.int32();continue;case 2:if(16!==e)break;i.timestamp=function(e){let t=globalThis.Number(e.toString());if(t>globalThis.Number.MAX_SAFE_INTEGER)throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");if(t<globalThis.Number.MIN_SAFE_INTEGER)throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");return t}(r.int64());continue;case 3:if(26!==e)break;i.rawEvent=rQ.unwrap(rQ.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>nf.fromPartial(e??{}),fromPartial(e){let t=nd();return t.type=e.type??0,t.timestamp=e.timestamp??void 0,t.rawEvent=e.rawEvent??void 0,t}};function np(){return{baseEvent:void 0,messageId:"",role:void 0,name:void 0}}let nh={encode:(e,t=new rj)=>(void 0!==e.baseEvent&&nf.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.messageId&&t.uint32(18).string(e.messageId),void 0!==e.role&&t.uint32(26).string(e.role),void 0!==e.name&&t.uint32(34).string(e.name),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=np();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=nf.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.messageId=r.string();continue;case 3:if(26!==e)break;i.role=r.string();continue;case 4:if(34!==e)break;i.name=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>nh.fromPartial(e??{}),fromPartial(e){let t=np();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?nf.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??"",t.role=e.role??void 0,t.name=e.name??void 0,t}};function ng(){return{baseEvent:void 0,messageId:"",delta:""}}let nm={encode:(e,t=new rj)=>(void 0!==e.baseEvent&&nf.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.messageId&&t.uint32(18).string(e.messageId),""!==e.delta&&t.uint32(26).string(e.delta),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=ng();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=nf.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.messageId=r.string();continue;case 3:if(26!==e)break;i.delta=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>nm.fromPartial(e??{}),fromPartial(e){let t=ng();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?nf.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??"",t.delta=e.delta??"",t}};function nv(){return{baseEvent:void 0,messageId:""}}let ny={encode:(e,t=new rj)=>(void 0!==e.baseEvent&&nf.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.messageId&&t.uint32(18).string(e.messageId),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=nv();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=nf.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.messageId=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>ny.fromPartial(e??{}),fromPartial(e){let t=nv();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?nf.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??"",t}};function nb(){return{baseEvent:void 0,toolCallId:"",toolCallName:"",parentMessageId:void 0}}let nw={encode:(e,t=new rj)=>(void 0!==e.baseEvent&&nf.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.toolCallId&&t.uint32(18).string(e.toolCallId),""!==e.toolCallName&&t.uint32(26).string(e.toolCallName),void 0!==e.parentMessageId&&t.uint32(34).string(e.parentMessageId),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=nb();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=nf.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.toolCallId=r.string();continue;case 3:if(26!==e)break;i.toolCallName=r.string();continue;case 4:if(34!==e)break;i.parentMessageId=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>nw.fromPartial(e??{}),fromPartial(e){let t=nb();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?nf.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??"",t.toolCallName=e.toolCallName??"",t.parentMessageId=e.parentMessageId??void 0,t}};function nS(){return{baseEvent:void 0,toolCallId:"",delta:""}}let nE={encode:(e,t=new rj)=>(void 0!==e.baseEvent&&nf.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.toolCallId&&t.uint32(18).string(e.toolCallId),""!==e.delta&&t.uint32(26).string(e.delta),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=nS();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=nf.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.toolCallId=r.string();continue;case 3:if(26!==e)break;i.delta=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>nE.fromPartial(e??{}),fromPartial(e){let t=nS();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?nf.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??"",t.delta=e.delta??"",t}};function nI(){return{baseEvent:void 0,toolCallId:""}}let nA={encode:(e,t=new rj)=>(void 0!==e.baseEvent&&nf.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.toolCallId&&t.uint32(18).string(e.toolCallId),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=nI();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=nf.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.toolCallId=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>nA.fromPartial(e??{}),fromPartial(e){let t=nI();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?nf.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??"",t}};function nk(){return{baseEvent:void 0,snapshot:void 0}}let nC={encode:(e,t=new rj)=>(void 0!==e.baseEvent&&nf.encode(e.baseEvent,t.uint32(10).fork()).join(),void 0!==e.snapshot&&rQ.encode(rQ.wrap(e.snapshot),t.uint32(18).fork()).join(),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=nk();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=nf.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.snapshot=rQ.unwrap(rQ.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>nC.fromPartial(e??{}),fromPartial(e){let t=nk();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?nf.fromPartial(e.baseEvent):void 0,t.snapshot=e.snapshot??void 0,t}};function nT(){return{baseEvent:void 0,delta:[]}}let n_={encode(e,t=new rj){for(let r of(void 0!==e.baseEvent&&nf.encode(e.baseEvent,t.uint32(10).fork()).join(),e.delta))rW.encode(r,t.uint32(18).fork()).join();return t},decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=nT();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=nf.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.delta.push(rW.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>n_.fromPartial(e??{}),fromPartial(e){let t=nT();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?nf.fromPartial(e.baseEvent):void 0,t.delta=e.delta?.map(e=>rW.fromPartial(e))||[],t}};function nO(){return{baseEvent:void 0,messages:[]}}let nx={encode(e,t=new rj){for(let r of(void 0!==e.baseEvent&&nf.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messages))nl.encode(r,t.uint32(18).fork()).join();return t},decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=nO();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=nf.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.messages.push(nl.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>nx.fromPartial(e??{}),fromPartial(e){let t=nO();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?nf.fromPartial(e.baseEvent):void 0,t.messages=e.messages?.map(e=>nl.fromPartial(e))||[],t}};function nR(){return{baseEvent:void 0,event:void 0,source:void 0}}let nN={encode:(e,t=new rj)=>(void 0!==e.baseEvent&&nf.encode(e.baseEvent,t.uint32(10).fork()).join(),void 0!==e.event&&rQ.encode(rQ.wrap(e.event),t.uint32(18).fork()).join(),void 0!==e.source&&t.uint32(26).string(e.source),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=nR();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=nf.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.event=rQ.unwrap(rQ.decode(r,r.uint32()));continue;case 3:if(26!==e)break;i.source=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>nN.fromPartial(e??{}),fromPartial(e){let t=nR();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?nf.fromPartial(e.baseEvent):void 0,t.event=e.event??void 0,t.source=e.source??void 0,t}};function nP(){return{baseEvent:void 0,name:"",value:void 0}}let nq={encode:(e,t=new rj)=>(void 0!==e.baseEvent&&nf.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.name&&t.uint32(18).string(e.name),void 0!==e.value&&rQ.encode(rQ.wrap(e.value),t.uint32(26).fork()).join(),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=nP();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=nf.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.name=r.string();continue;case 3:if(26!==e)break;i.value=rQ.unwrap(rQ.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>nq.fromPartial(e??{}),fromPartial(e){let t=nP();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?nf.fromPartial(e.baseEvent):void 0,t.name=e.name??"",t.value=e.value??void 0,t}};function nj(){return{baseEvent:void 0,threadId:"",runId:""}}let nD={encode:(e,t=new rj)=>(void 0!==e.baseEvent&&nf.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.threadId&&t.uint32(18).string(e.threadId),""!==e.runId&&t.uint32(26).string(e.runId),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=nj();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=nf.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.threadId=r.string();continue;case 3:if(26!==e)break;
13i.runId=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>nD.fromPartial(e??{}),fromPartial(e){let t=nj();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?nf.fromPartial(e.baseEvent):void 0,t.threadId=e.threadId??"",t.runId=e.runId??"",t}};function nM(){return{baseEvent:void 0,threadId:"",runId:"",result:void 0}}let nU={encode:(e,t=new rj)=>(void 0!==e.baseEvent&&nf.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.threadId&&t.uint32(18).string(e.threadId),""!==e.runId&&t.uint32(26).string(e.runId),void 0!==e.result&&rQ.encode(rQ.wrap(e.result),t.uint32(34).fork()).join(),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=nM();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=nf.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.threadId=r.string();continue;case 3:if(26!==e)break;i.runId=r.string();continue;case 4:if(34!==e)break;i.result=rQ.unwrap(rQ.decode(r,r.uint32()));continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>nU.fromPartial(e??{}),fromPartial(e){let t=nM();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?nf.fromPartial(e.baseEvent):void 0,t.threadId=e.threadId??"",t.runId=e.runId??"",t.result=e.result??void 0,t}};function nF(){return{baseEvent:void 0,code:void 0,message:""}}let nL={encode:(e,t=new rj)=>(void 0!==e.baseEvent&&nf.encode(e.baseEvent,t.uint32(10).fork()).join(),void 0!==e.code&&t.uint32(18).string(e.code),""!==e.message&&t.uint32(26).string(e.message),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=nF();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=nf.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.code=r.string();continue;case 3:if(26!==e)break;i.message=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>nL.fromPartial(e??{}),fromPartial(e){let t=nF();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?nf.fromPartial(e.baseEvent):void 0,t.code=e.code??void 0,t.message=e.message??"",t}};function nV(){return{baseEvent:void 0,stepName:""}}let n$={encode:(e,t=new rj)=>(void 0!==e.baseEvent&&nf.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.stepName&&t.uint32(18).string(e.stepName),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=nV();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=nf.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.stepName=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>n$.fromPartial(e??{}),fromPartial(e){let t=nV();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?nf.fromPartial(e.baseEvent):void 0,t.stepName=e.stepName??"",t}};function nG(){return{baseEvent:void 0,stepName:""}}let nz={encode:(e,t=new rj)=>(void 0!==e.baseEvent&&nf.encode(e.baseEvent,t.uint32(10).fork()).join(),""!==e.stepName&&t.uint32(18).string(e.stepName),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=nG();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=nf.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.stepName=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>nz.fromPartial(e??{}),fromPartial(e){let t=nG();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?nf.fromPartial(e.baseEvent):void 0,t.stepName=e.stepName??"",t}};function nQ(){return{baseEvent:void 0,messageId:void 0,role:void 0,delta:void 0,name:void 0}}let nH={encode:(e,t=new rj)=>(void 0!==e.baseEvent&&nf.encode(e.baseEvent,t.uint32(10).fork()).join(),void 0!==e.messageId&&t.uint32(18).string(e.messageId),void 0!==e.role&&t.uint32(26).string(e.role),void 0!==e.delta&&t.uint32(34).string(e.delta),void 0!==e.name&&t.uint32(42).string(e.name),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=nQ();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=nf.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.messageId=r.string();continue;case 3:if(26!==e)break;i.role=r.string();continue;case 4:if(34!==e)break;i.delta=r.string();continue;case 5:if(42!==e)break;i.name=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>nH.fromPartial(e??{}),fromPartial(e){let t=nQ();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?nf.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??void 0,t.role=e.role??void 0,t.delta=e.delta??void 0,t.name=e.name??void 0,t}};function nY(){return{baseEvent:void 0,toolCallId:void 0,toolCallName:void 0,parentMessageId:void 0,delta:void 0}}let nB={encode:(e,t=new rj)=>(void 0!==e.baseEvent&&nf.encode(e.baseEvent,t.uint32(10).fork()).join(),void 0!==e.toolCallId&&t.uint32(18).string(e.toolCallId),void 0!==e.toolCallName&&t.uint32(26).string(e.toolCallName),void 0!==e.parentMessageId&&t.uint32(34).string(e.parentMessageId),void 0!==e.delta&&t.uint32(42).string(e.delta),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=nY();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.baseEvent=nf.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.toolCallId=r.string();continue;case 3:if(26!==e)break;i.toolCallName=r.string();continue;case 4:if(34!==e)break;i.parentMessageId=r.string();continue;case 5:if(42!==e)break;i.delta=r.string();continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>nB.fromPartial(e??{}),fromPartial(e){let t=nY();return t.baseEvent=void 0!==e.baseEvent&&null!==e.baseEvent?nf.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??void 0,t.toolCallName=e.toolCallName??void 0,t.parentMessageId=e.parentMessageId??void 0,t.delta=e.delta??void 0,t}};function nK(){return{textMessageStart:void 0,textMessageContent:void 0,textMessageEnd:void 0,toolCallStart:void 0,toolCallArgs:void 0,toolCallEnd:void 0,stateSnapshot:void 0,stateDelta:void 0,messagesSnapshot:void 0,raw:void 0,custom:void 0,runStarted:void 0,runFinished:void 0,runError:void 0,stepStarted:void 0,stepFinished:void 0,textMessageChunk:void 0,toolCallChunk:void 0}}let nW={encode:(e,t=new rj)=>(void 0!==e.textMessageStart&&nh.encode(e.textMessageStart,t.uint32(10).fork()).join(),void 0!==e.textMessageContent&&nm.encode(e.textMessageContent,t.uint32(18).fork()).join(),void 0!==e.textMessageEnd&&ny.encode(e.textMessageEnd,t.uint32(26).fork()).join(),void 0!==e.toolCallStart&&nw.encode(e.toolCallStart,t.uint32(34).fork()).join(),void 0!==e.toolCallArgs&&nE.encode(e.toolCallArgs,t.uint32(42).fork()).join(),void 0!==e.toolCallEnd&&nA.encode(e.toolCallEnd,t.uint32(50).fork()).join(),void 0!==e.stateSnapshot&&nC.encode(e.stateSnapshot,t.uint32(58).fork()).join(),void 0!==e.stateDelta&&n_.encode(e.stateDelta,t.uint32(66).fork()).join(),void 0!==e.messagesSnapshot&&nx.encode(e.messagesSnapshot,t.uint32(74).fork()).join(),void 0!==e.raw&&nN.encode(e.raw,t.uint32(82).fork()).join(),void 0!==e.custom&&nq.encode(e.custom,t.uint32(90).fork()).join(),void 0!==e.runStarted&&n
13D.encode(e.runStarted,t.uint32(98).fork()).join(),void 0!==e.runFinished&&nU.encode(e.runFinished,t.uint32(106).fork()).join(),void 0!==e.runError&&nL.encode(e.runError,t.uint32(114).fork()).join(),void 0!==e.stepStarted&&n$.encode(e.stepStarted,t.uint32(122).fork()).join(),void 0!==e.stepFinished&&nz.encode(e.stepFinished,t.uint32(130).fork()).join(),void 0!==e.textMessageChunk&&nH.encode(e.textMessageChunk,t.uint32(138).fork()).join(),void 0!==e.toolCallChunk&&nB.encode(e.toolCallChunk,t.uint32(146).fork()).join(),t),decode(e,t){let r=e instanceof rD?e:new rD(e),n=void 0===t?r.len:r.pos+t,i=nK();for(;r.pos<n;){let e=r.uint32();switch(e>>>3){case 1:if(10!==e)break;i.textMessageStart=nh.decode(r,r.uint32());continue;case 2:if(18!==e)break;i.textMessageContent=nm.decode(r,r.uint32());continue;case 3:if(26!==e)break;i.textMessageEnd=ny.decode(r,r.uint32());continue;case 4:if(34!==e)break;i.toolCallStart=nw.decode(r,r.uint32());continue;case 5:if(42!==e)break;i.toolCallArgs=nE.decode(r,r.uint32());continue;case 6:if(50!==e)break;i.toolCallEnd=nA.decode(r,r.uint32());continue;case 7:if(58!==e)break;i.stateSnapshot=nC.decode(r,r.uint32());continue;case 8:if(66!==e)break;i.stateDelta=n_.decode(r,r.uint32());continue;case 9:if(74!==e)break;i.messagesSnapshot=nx.decode(r,r.uint32());continue;case 10:if(82!==e)break;i.raw=nN.decode(r,r.uint32());continue;case 11:if(90!==e)break;i.custom=nq.decode(r,r.uint32());continue;case 12:if(98!==e)break;i.runStarted=nD.decode(r,r.uint32());continue;case 13:if(106!==e)break;i.runFinished=nU.decode(r,r.uint32());continue;case 14:if(114!==e)break;i.runError=nL.decode(r,r.uint32());continue;case 15:if(122!==e)break;i.stepStarted=n$.decode(r,r.uint32());continue;case 16:if(130!==e)break;i.stepFinished=nz.decode(r,r.uint32());continue;case 17:if(138!==e)break;i.textMessageChunk=nH.decode(r,r.uint32());continue;case 18:if(146!==e)break;i.toolCallChunk=nB.decode(r,r.uint32());continue}if((7&e)==4||0===e)break;r.skip(7&e)}return i},create:e=>nW.fromPartial(e??{}),fromPartial(e){let t=nK();return t.textMessageStart=void 0!==e.textMessageStart&&null!==e.textMessageStart?nh.fromPartial(e.textMessageStart):void 0,t.textMessageContent=void 0!==e.textMessageContent&&null!==e.textMessageContent?nm.fromPartial(e.textMessageContent):void 0,t.textMessageEnd=void 0!==e.textMessageEnd&&null!==e.textMessageEnd?ny.fromPartial(e.textMessageEnd):void 0,t.toolCallStart=void 0!==e.toolCallStart&&null!==e.toolCallStart?nw.fromPartial(e.toolCallStart):void 0,t.toolCallArgs=void 0!==e.toolCallArgs&&null!==e.toolCallArgs?nE.fromPartial(e.toolCallArgs):void 0,t.toolCallEnd=void 0!==e.toolCallEnd&&null!==e.toolCallEnd?nA.fromPartial(e.toolCallEnd):void 0,t.stateSnapshot=void 0!==e.stateSnapshot&&null!==e.stateSnapshot?nC.fromPartial(e.stateSnapshot):void 0,t.stateDelta=void 0!==e.stateDelta&&null!==e.stateDelta?n_.fromPartial(e.stateDelta):void 0,t.messagesSnapshot=void 0!==e.messagesSnapshot&&null!==e.messagesSnapshot?nx.fromPartial(e.messagesSnapshot):void 0,t.raw=void 0!==e.raw&&null!==e.raw?nN.fromPartial(e.raw):void 0,t.custom=void 0!==e.custom&&null!==e.custom?nq.fromPartial(e.custom):void 0,t.runStarted=void 0!==e.runStarted&&null!==e.runStarted?nD.fromPartial(e.runStarted):void 0,t.runFinished=void 0!==e.runFinished&&null!==e.runFinished?nU.fromPartial(e.runFinished):void 0,t.runError=void 0!==e.runError&&null!==e.runError?nL.fromPartial(e.runError):void 0,t.stepStarted=void 0!==e.stepStarted&&null!==e.stepStarted?n$.fromPartial(e.stepStarted):void 0,t.stepFinished=void 0!==e.stepFinished&&null!==e.stepFinished?nz.fromPartial(e.stepFinished):void 0,t.textMessageChunk=void 0!==e.textMessageChunk&&null!==e.textMessageChunk?nH.fromPartial(e.textMessageChunk):void 0,t.toolCallChunk=void 0!==e.toolCallChunk&&null!==e.toolCallChunk?nB.fromPartial(e.toolCallChunk):void 0,t}},nX=e=>{if(e&&"object"==typeof e){if(e.data)return{type:"data",value:e.data.value,mimeType:e.data.mimeType};if(e.url)return{type:"url",value:e.url.value,mimeType:e.url.mimeType}}},nZ=e=>{if(e&&"object"==typeof e){if(e.text)return{type:"text",text:e.text.text};
13if(e.image)return{type:"image",source:nX(e.image.source),metadata:e.image.metadata};if(e.audio)return{type:"audio",source:nX(e.audio.source),metadata:e.audio.metadata};if(e.video)return{type:"video",source:nX(e.video.source),metadata:e.video.metadata};if(e.document)return{type:"document",source:nX(e.document.source),metadata:e.document.metadata}}},nJ="application/vnd.ag-ui.event+proto",n0=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,n1=e=>{if("string"!=typeof e)throw TypeError("Invalid argument expected string");let t=e.match(n0);if(!t)throw Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},n2=e=>"*"===e||"x"===e||"X"===e,n3=e=>{let t=parseInt(e,10);return isNaN(t)?e:t},n8=(e,t)=>{let r,n;if(n2(e)||n2(t))return 0;let[i,a]=typeof(r=n3(e))!=typeof(n=n3(t))?[String(r),String(n)]:[r,n];return i>a?1:i<a?-1:0},n5=(e,t)=>{for(let r=0;r<Math.max(e.length,t.length);r++){let n=n8(e[r]||"0",t[r]||"0");if(0!==n)return n}return 0},n4=(e,t)=>{let r=n1(e),n=n1(t),i=r.pop(),a=n.pop(),s=n5(r,n);return 0!==s?s:i&&a?n5(i.split("."),a.split(".")):i||a?i?-1:1:0};var n6=r(94833);let n7=e=>{if("function"==typeof structuredClone)return structuredClone(e);try{return JSON.parse(JSON.stringify(e))}catch{return Array.isArray(e)?[...e]:{...e}}};function n9(){return(0,m.A)()}function ie(e){if(Object.freeze(e),"object"==typeof e&&e)for(let t of Object.values(e))"object"==typeof t&&t&&!Object.isFrozen(t)&&ie(t);return e}async function it(e,t,r,n){let i="u">typeof n6&&void 0!==n6.env,a=i&&!!n6.env.VITEST_WORKER_ID,s=i&&!!n6.env.VITEST_WORKER_ID,o=n7(t),u=n7(r),l=o,c=u,d;for(let t of e)try{s&&(ie(l),ie(c));let e=await n(t,l,c);if(void 0===e)continue;if(void 0!==e.messages&&e.messages!==l&&(l=n7(e.messages)),void 0!==e.state&&e.state!==c&&(c=n7(e.state)),d=e.stopPropagation,!0===d)break}catch(e){if(s&&e instanceof TypeError){if(a)throw e;console.error("AG-UI: Subscriber attempted to mutate frozen inputs in-place. Return mutations via AgentStateMutation instead of mutating directly.",e)}else a||console.error("Subscriber error:",e);continue}return{...l===o?{}:{messages:s&&Object.isFrozen(l)?n7(l):l},...c===u?{}:{state:s&&Object.isFrozen(c)?n7(c):c},...void 0===d?{}:{stopPropagation:d}}}function ir(e){if(!e)return{enabled:!1,events:!1,lifecycle:!1,verbose:!1};if(!0===e)return{enabled:!0,events:!0,lifecycle:!0,verbose:!0};let t=e.events??!0,r=e.lifecycle??!0;return{enabled:t||r,events:t,lifecycle:r,verbose:e.verbose??!1}}function ii(e){return e instanceof ia?e:!0===e?new ia(ir(!0)):void 0}var ia=class{constructor(e){this.config=e}event(e,t,r,n){this.config.events&&(this.config.verbose?console.debug(`[${e}] ${t}`,"string"==typeof r?r:JSON.stringify(r)):console.debug(`[${e}] ${t}`,n??r))}lifecycle(e,t,r){this.config.lifecycle&&(r?console.debug(`[${e}] ${t}`,r):console.debug(`[${e}] ${t}`))}get eventsEnabled(){return this.config.events}get lifecycleEnabled(){return this.config.lifecycle}get enabled(){return this.config.enabled}};function is(e){return e.enabled?new ia(e):void 0}let io=(e,t,r,n,i)=>{var a,s;let o=ii(i),u=n7(r.messages),l=n7(e.state),c={},d=e=>{void 0!==e.messages&&(u=e.messages,c.messages=e.messages),void 0!==e.state&&(l=e.state,c.state=e.state)},f=()=>{let e=n7(c);return c={},void 0!==e.messages||void 0!==e.state?rt(e):rr};return t.pipe(rg(async t=>{let i=await it(n,u,l,(n,i,a)=>n.onEvent?.({event:t,agent:r,input:e,messages:i,state:a}));if(d(i),!0===i.stopPropagation?o?.event("APPLY","Event dropped:",t,{type:t.type,reason:"stopPropagation by subscriber"}):o?.event("APPLY","Event applied:",t,{type:t.type,subscribers:n.length}),!0===i.stopPropagation)return f();switch(t.type){case eo.TEXT_MESSAGE_START:{let i=await it(n,u,l,(n,i,a)=>n.onTextMessageStartEvent?.({event:t,messages:i,state:a,agent:r,input:e}));if(d(i),!0!==i.stopPropagation){let{messageId:e,role:r="assistant",name:n}=t;if(!u.find(t=>t.id===e)){let t={id:e,role:r,content:"",...void 0!==n&&{name:n}};u.push(t),d({messages:u})}}return f()}case eo.TEXT_MESSAGE_CONTENT:{let{messageId:i,delta:a}=t,s=u.find(e=>e.id===i);if(!s)return console.warn(`TEXT_MESSAGE_CONTENT: No message found with ID '${i}'`),f();let o=await it(n,u,l,(n,i,a)=>n.onTextMessageContentEvent?.({event:t,messages:i,state:a,agent:r,input:e,textMessageBuffer:"string"==typeof s.content?s.content:""}));return d(o),!0!==o.stopPropagation&&(s.content=`${"string"==typeof s.content?s.content:""}${a}`,d({messages:u})),f()}case eo.TEXT_MESSAGE_END:{let{messageId:i}=t,a=u.find(e=>e.id===i);return a?(d(await it(n,u,l,(n,i,s)=>n.onTextMessageEndEvent?.({event:t,messages:i,state:s,agent:r,input:e,textMessageBuffer:"string"==typeof a.content?a.content:""}))),await Promise.all(n.map(t=>{t.onNewMessage?.({message:a,messages:u,state:l,agent:r,input:e})}))):console.warn(`TEXT_MESSAGE_END: No message found with ID '${i}'`),f()}case eo.TOOL_CALL_START:{let i=await it(n,u,l,(n,i,a)=>n.onToolCallStartEvent?.({event:t,messages:i,state:a,agent:r,input:e}));if(d(i),!0!==i.stopPropagation){let{toolCallId:e,toolCallName:r,parentMessageId:n}=t,i=function(e,t,r){if(t){let n=e.find(e=>e.id===t);if(n?.role==="assistant")return n;n&&console.warn(`TOOL_CALL_START: parentMessageId '${t}' matches a '${n.role}' message, not assistant — falling back to toolCallId`);let i={id:n?r:t,role:"assistant",toolCalls:[]};return e.push(i),i}let n={id:r,role:"assistant",toolCalls:[]};return e.push(n),n}(u,n,e);i.toolCalls??=[],i.toolCalls.push({id:e,type:"function",function:{name:r,arguments:""}}),d({messages:u})}return f()}case eo.TOOL_CALL_ARGS:{let{toolCallId:i,delta:a}=t,s=u.find(e=>e.toolCalls?.some(e=>e.id===i));if(!s)return console.warn(`TOOL_CALL_ARGS: No message found containing tool call with ID '${i}'`),f();let o=s.toolCalls?.find(e=>e.id===i);if(!o)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${i}'`),f();let c=await it(n,u,l,(n,i,a)=>{let s=o.function.arguments,u=o.function.name,l={};try{l=rb(s)}catch{}return n.onToolCallArgsEvent?.({event:t,messages:i,state:a,agent:r,input:e,toolCallBuffer:s,toolCallName:u,partialToolCallArgs:l})});return d(c),!0!==c.stopPropagation&&(o.function.arguments+=a,d({messages:u})),f()}case eo.TOOL_CALL_END:{let{toolCallId:i}=t,a=u.find(e=>e.toolCalls?.some(e=>e.id===i));if(!a)return console.warn(`TOOL_CALL_END: No message found containing tool call with ID '${i}'`),f();let s=a.toolCalls?.find(e=>e.id===i);return s?(d(await it(n,u,l,(n,i,a)=>{let o=s.function.arguments,u=s.function.name,l={};try{l=JSON.parse(o)}catch{}return n.onToolCallEndEvent?.({event:t,messages:i,state:a,agent:r,input:e,toolCallName:u,toolCallArgs:l})})),await Promise.all(n.map(t=>{t.onNewToolCall?.({toolCall:s,messages:u,state:l,agent:r,input:e})}))):console.warn(`TOOL_CALL_END: No tool call found with ID '${i}'`),f()}case eo.TOOL_CALL_RESULT:{let i=await it(n,u,l,(n,i,a)=>n.onToolCallResultEvent?.({event:t,messages:i,state:a,agent:r,input:e}));if(d(i),!0!==i.stopPropagation){let{messageId:i,toolCallId:a,content:s,role:o}=t,c={id:i,toolCallId:a,role:o||"tool",content:s};u.push(c),await Promise.all(n.map(t=>{t.onNewMessage?.({message:c,messages:u,state:l,agent:r,input:e})})),d({messages:u})}return f()}
13case eo.STATE_SNAPSHOT:{let i=await it(n,u,l,(n,i,a)=>n.onStateSnapshotEvent?.({event:t,messages:i,state:a,agent:r,input:e}));if(d(i),!0!==i.stopPropagation){let{snapshot:e}=t;d({state:l=e})}return f()}case eo.STATE_DELTA:{let i=await it(n,u,l,(n,i,a)=>n.onStateDeltaEvent?.({event:t,messages:i,state:a,agent:r,input:e}));if(d(i),!0!==i.stopPropagation){let{delta:e}=t;try{l=tl.applyPatch(l,e,!0,!1).newDocument,d({state:l})}catch(r){let t=r instanceof Error?r.message:String(r);console.warn(`Failed to apply state patch:
14Current state: ${JSON.stringify(l,null,2)}
15Patch operations: ${JSON.stringify(e,null,2)}
16Error: ${t}`)}}return f()}case eo.MESSAGES_SNAPSHOT:{let i=await it(n,u,l,(n,i,a)=>n.onMessagesSnapshotEvent?.({event:t,messages:i,state:a,agent:r,input:e}));if(d(i),!0!==i.stopPropagation){let{messages:e}=t,r=new Map(e.map(e=>[e.id,e])),n=e=>"activity"===e||"reasoning"===e,i=new Set((u=u.filter(e=>n(e.role)||r.has(e.id)).map(e=>n(e.role)?e:r.get(e.id))).map(e=>e.id));for(let t of e)i.has(t.id)||u.push(t);d({messages:u})}return f()}case eo.ACTIVITY_SNAPSHOT:{let i=u.findIndex(e=>e.id===t.messageId),a=i>=0?u[i]:void 0,s=a?.role==="activity"?a:void 0,o=t.replace??!0,c=await it(n,u,l,(n,i,o)=>n.onActivitySnapshotEvent?.({event:t,messages:i,state:o,agent:r,input:e,activityMessage:s,existingMessage:a}));if(d(c),!0!==c.stopPropagation){let a={id:t.messageId,role:"activity",activityType:t.activityType,content:n7(t.content)},c;-1===i?(u.push(a),c=a):s?o&&(u[i]={...s,activityType:t.activityType,content:n7(t.content)}):o&&(u[i]=a,c=a),d({messages:u}),c&&await Promise.all(n.map(t=>t.onNewMessage?.({message:c,messages:u,state:l,agent:r,input:e})))}return f()}case eo.ACTIVITY_DELTA:{let i=u.findIndex(e=>e.id===t.messageId);if(-1===i)return f();let a=u[i];if("activity"!==a.role)return console.warn(`ACTIVITY_DELTA: Message '${t.messageId}' is not an activity message`),f();let s=await it(n,u,l,(n,i,s)=>n.onActivityDeltaEvent?.({event:t,messages:i,state:s,agent:r,input:e,activityMessage:a}));if(d(s),!0!==s.stopPropagation)try{let e=n7(a.content??{}),r=tl.applyPatch(e,t.patch??[],!0,!1).newDocument;u[i]={...a,content:n7(r),activityType:t.activityType},d({messages:u})}catch(r){let e=r instanceof Error?r.message:String(r);console.warn(`Failed to apply activity patch for '${t.messageId}': ${e}`)}return f()}case eo.RAW:return d(await it(n,u,l,(n,i,a)=>n.onRawEvent?.({event:t,messages:i,state:a,agent:r,input:e}))),f();case eo.CUSTOM:return d(await it(n,u,l,(n,i,a)=>n.onCustomEvent?.({event:t,messages:i,state:a,agent:r,input:e}))),f();case eo.RUN_STARTED:{let i=await it(n,u,l,(n,i,a)=>n.onRunStartedEvent?.({event:t,messages:i,state:a,agent:r,input:e}));if(d(i),!0!==i.stopPropagation&&t.input?.messages){for(let e of t.input.messages)u.find(t=>t.id===e.id)||u.push(e);d({messages:u})}return f()}case eo.RUN_FINISHED:return d(await it(n,u,l,(n,i,a)=>n.onRunFinishedEvent?.({event:t,messages:i,state:a,agent:r,input:e,result:t.result}))),f();case eo.RUN_ERROR:return d(await it(n,u,l,(n,i,a)=>n.onRunErrorEvent?.({event:t,messages:i,state:a,agent:r,input:e}))),f();case eo.STEP_STARTED:return d(await it(n,u,l,(n,i,a)=>n.onStepStartedEvent?.({event:t,messages:i,state:a,agent:r,input:e}))),f();case eo.STEP_FINISHED:return d(await it(n,u,l,(n,i,a)=>n.onStepFinishedEvent?.({event:t,messages:i,state:a,agent:r,input:e}))),f();case eo.TEXT_MESSAGE_CHUNK:throw Error("TEXT_MESSAGE_CHUNK must be tranformed before being applied");case eo.TOOL_CALL_CHUNK:throw Error("TOOL_CALL_CHUNK must be tranformed before being applied");case eo.THINKING_START:case eo.THINKING_END:case eo.THINKING_TEXT_MESSAGE_START:case eo.THINKING_TEXT_MESSAGE_CONTENT:case eo.THINKING_TEXT_MESSAGE_END:return f();case eo.REASONING_START:return d(await it(n,u,l,(n,i,a)=>n.onReasoningStartEvent?.({event:t,messages:i,state:a,agent:r,input:e}))),f();case eo.REASONING_MESSAGE_START:{let i=await it(n,u,l,(n,i,a)=>n.onReasoningMessageStartEvent?.({event:t,messages:i,state:a,agent:r,input:e}));if(d(i),!0!==i.stopPropagation){let{messageId:e}=t;u.find(t=>t.id===e)||(u.push({id:e,role:"reasoning",content:""}),d({messages:u}))}return f()}case eo.REASONING_MESSAGE_CONTENT:{let{messageId:i,delta:a}=t,s=u.find(e=>e.id===i);if(!s)return console.warn(`REASONING_MESSAGE_CONTENT: No message found with ID '${i}'`),f();let o=await it(n,u,l,(n,i,a)=>n.onReasoningMessageContentEvent?.({event:t,messages:i,state:a,agent:r,input:e,reasoningMessageBuffer:"string"==typeof s.content?s.content:""}));return d(o),!0!==o.stopPropagation&&(s.content=`${"string"==typeof s.content?s.content:""}${a}`,d({messages:u})),f()}case eo.REASONING_MESSAGE_END:{let{messageId:i}=t,a=u.find(e=>e.id===i);return a?(d(await it(n,u,l,(n,i,s)=>n.onReasoningMessageEndEvent?.({event:t,messages:i,state:s,agent:r,input:e,reasoningMessageBuffer:"string"==typeof a.content?a.content:""}))),await Promise.all(n.map(t=>{t.onNewMessage?.({message:a,messages:u,state:l,agent:r,input:e})}))):console.warn(`REASONING_MESSAGE_END: No message found with ID '${i}'`),f()}case eo.REASONING_MESSAGE_CHUNK:throw Error("REASONING_MESSAGE_CHUNK must be transformed before being applied");case eo.REASONING_END:return d(await it(n,u,l,(n,i,a)=>n.onReasoningEndEvent?.({event:t,messages:i,state:a,agent:r,input:e}))),f();
16case eo.REASONING_ENCRYPTED_VALUE:{let{subtype:i,entityId:a,encryptedValue:s}=t,o=await it(n,u,l,(n,i,a)=>n.onReasoningEncryptedValueEvent?.({event:t,messages:i,state:a,agent:r,input:e}));if(d(o),!0!==o.stopPropagation){let e=!1;if("tool-call"===i){for(let t of u)if("assistant"===t.role&&t.toolCalls){let r=t.toolCalls.find(e=>e.id===a);if(r){r.encryptedValue=s,e=!0;break}}}else{let t=u.find(e=>e.id===a);t?.role!=="activity"&&t&&(t.encryptedValue=s,e=!0)}e&&(c.messages=u)}return f()}}return t.type,f()}),(void 0===a&&(a=1/0),rd(tz,a)),n.length>0?(s={},t8(function(e,t){var r=!1;e.subscribe(t5(t,function(e){r=!0,t.next(e)},function(){r||t.next(s),t.complete()}))})):e=>e)},iu=e=>t=>{let r=ii(e),n=new Map,i=new Map,a=!1,s=!1,o=!1,u=new Map,l=!1,c=!1,d=!1;return t.pipe(rd(e=>{let t=e.type;if(r?.event("VERIFY","Event:",e,{type:e.type}),s)return rn(()=>new Q(`Cannot send event type '${t}': The run has already errored with 'RUN_ERROR'. No further events can be sent.`));if(a&&t!==eo.RUN_ERROR&&t!==eo.RUN_STARTED)return rn(()=>new Q(`Cannot send event type '${t}': The run has already finished with 'RUN_FINISHED'. Start a new run with 'RUN_STARTED'.`));if(o){if(t===eo.RUN_STARTED){if(d&&!a)return rn(()=>new Q("Cannot send 'RUN_STARTED' while a run is still active. The previous run must be finished with 'RUN_FINISHED' before starting a new run."));a&&(n.clear(),i.clear(),u.clear(),l=!1,c=!1,a=!1,s=!1,d=!0)}}else if(o=!0,t!==eo.RUN_STARTED&&t!==eo.RUN_ERROR)return rn(()=>new Q("First event must be 'RUN_STARTED'"));switch(t){case eo.TEXT_MESSAGE_START:{let t=e.messageId;return n.has(t)?rn(()=>new Q(`Cannot send 'TEXT_MESSAGE_START' event: A text message with ID '${t}' is already in progress. Complete it with 'TEXT_MESSAGE_END' first.`)):(n.set(t,!0),rt(e))}case eo.TEXT_MESSAGE_CONTENT:{let t=e.messageId;return n.has(t)?rt(e):rn(()=>new Q(`Cannot send 'TEXT_MESSAGE_CONTENT' event: No active text message found with ID '${t}'. Start a text message with 'TEXT_MESSAGE_START' first.`))}case eo.TEXT_MESSAGE_END:{let t=e.messageId;return n.has(t)?(n.delete(t),rt(e)):rn(()=>new Q(`Cannot send 'TEXT_MESSAGE_END' event: No active text message found with ID '${t}'. A 'TEXT_MESSAGE_START' event must be sent first.`))}case eo.TOOL_CALL_START:{let t=e.toolCallId;return i.has(t)?rn(()=>new Q(`Cannot send 'TOOL_CALL_START' event: A tool call with ID '${t}' is already in progress. Complete it with 'TOOL_CALL_END' first.`)):(i.set(t,!0),rt(e))}case eo.TOOL_CALL_ARGS:{let t=e.toolCallId;return i.has(t)?rt(e):rn(()=>new Q(`Cannot send 'TOOL_CALL_ARGS' event: No active tool call found with ID '${t}'. Start a tool call with 'TOOL_CALL_START' first.`))}case eo.TOOL_CALL_END:{let t=e.toolCallId;return i.has(t)?(i.delete(t),rt(e)):rn(()=>new Q(`Cannot send 'TOOL_CALL_END' event: No active tool call found with ID '${t}'. A 'TOOL_CALL_START' event must be sent first.`))}case eo.STEP_STARTED:{let t=e.stepName;return u.has(t)?rn(()=>new Q(`Step "${t}" is already active for 'STEP_STARTED'`)):(u.set(t,!0),rt(e))}case eo.STEP_FINISHED:{let t=e.stepName;return u.has(t)?(u.delete(t),rt(e)):rn(()=>new Q(`Cannot send 'STEP_FINISHED' for step "${t}" that was not started`))}case eo.RUN_STARTED:return d=!0,rt(e);case eo.RUN_FINISHED:if(u.size>0){let e=Array.from(u.keys()).join(", ");return rn(()=>new Q(`Cannot send 'RUN_FINISHED' while steps are still active: ${e}`))}if(n.size>0){let e=Array.from(n.keys()).join(", ");return rn(()=>new Q(`Cannot send 'RUN_FINISHED' while text messages are still active: ${e}`))}if(i.size>0){let e=Array.from(i.keys()).join(", ");return rn(()=>new Q(`Cannot send 'RUN_FINISHED' while tool calls are still active: ${e}`))}return a=!0,rt(e);case eo.RUN_ERROR:return s=!0,rt(e);case eo.CUSTOM:return rt(e);case eo.THINKING_TEXT_MESSAGE_START:return l?c?rn(()=>new Q("Cannot send 'THINKING_TEXT_MESSAGE_START' event: A thinking message is already in progress. Complete it with 'THINKING_TEXT_MESSAGE_END' first.")):(c=!0,rt(e)):rn(()=>new Q("Cannot send 'THINKING_TEXT_MESSAGE_START' event: A thinking step is not in progress. Create one with 'THINKING_START' first."));case eo.THINKING_TEXT_MESSAGE_CONTENT:return c?rt(e):rn(()=>new Q("Cannot send 'THINKING_TEXT_MESSAGE_CONTENT' event: No active thinking message found. Start a message with 'THINKING_TEXT_MESSAGE_START' first."));case eo.THINKING_TEXT_MESSAGE_END:return c?(c=!1,rt(e)):rn(()=>new Q("Cannot send 'THINKING_TEXT_MESSAGE_END' event: No active thinking message found. A 'THINKING_TEXT_MESSAGE_START' event must be sent first."));case eo.THINKING_START:return l?rn(()=>new Q("Cannot send 'THINKING_START' event: A thinking step is already in progress. End it with 'THINKING_END' first.")):(l=!0,rt(e));case eo.THINKING_END:return l?(l=!1,rt(e)):rn(()=>new Q("Cannot send 'THINKING_END' event: No active thinking step found. A 'THINKING_START' event must be sent first."));default:return rt(e)}}))},il=((l={}).HEADERS="headers",l.DATA="data",l),ic=v.k5(["TextMessageStart","TextMessageContent","TextMessageEnd","ActionExecutionStart","ActionExecutionArgs","ActionExecutionEnd","ActionExecutionResult","AgentStateMessage","MetaEvent","RunStarted","RunFinished","RunError","NodeStarted","NodeFinished"]),id=v.k5(["LangGraphInterruptEvent","PredictState","Exit"]),ip=v.Ik({type:v.eu(ic.enum.TextMessageStart),messageId:v.Yj(),parentMessageId:v.Yj().optional(),role:v.Yj().optional()}),ih=v.Ik({type:v.eu(ic.enum.TextMessageContent),messageId:v.Yj(),content:v.Yj()}),ig=v.Ik({type:v.eu(ic.enum.TextMessageEnd),messageId:v.Yj()}),im=v.Ik({type:v.eu(ic.enum.ActionExecutionStart),actionExecutionId:v.Yj(),actionName:v.Yj(),parentMessageId:v.Yj().optional()}),iv=v.Ik({type:v.eu(ic.enum.ActionExecutionArgs),actionExecutionId:v.Yj(),args:v.Yj()}),iy=v.Ik({type:v.eu(ic.enum.ActionExecutionEnd),actionExecutionId:v.Yj()}),ib=v.Ik({type:v.eu(ic.enum.ActionExecutionResult),actionName:v.Yj(),actionExecutionId:v.Yj(),result:v.Yj()}),iw=v.Ik({type:v.eu(ic.enum.AgentStateMessage),threadId:v.Yj(),agentName:v.Yj(),nodeName:v.Yj(),runId:v.Yj(),active:v.zM(),role:v.Yj(),state:v.Yj(),running:v.zM()}),iS=v.Ik({type:v.eu(ic.enum.MetaEvent),name:id,value:v.bz()}),iE=v.Ik({type:v.eu(ic.enum.RunError),message:v.Yj(),code:v.Yj().optional()});v.gM("type",[ip,ih,ig,im,iv,iy,ib,iw,iS,iE]),v.Ik({id:v.Yj(),role:v.Yj(),content:v.Yj(),parentMessageId:v.Yj().optional()}),v.Ik({id:v.Yj(),name:v.Yj(),arguments:v.bz(),parentMessageId:v.Yj().optional()}),v.Ik({id:v.Yj(),result:v.bz(),actionExecutionId:v.Yj(),actionName:v.Yj()});let iI=e=>{if("string"==typeof e)return e;if(!Array.isArray(e))return;let t=e.filter(e=>"text"===e.type).map(e=>e.text).filter(e=>e.length>0);if(0!==t.length)return t.join(`
17`)},iA=e=>t=>{let r=ii(e),n,i,a,s,o=()=>"text"===s?[(()=>{if(!n||"text"!==s)throw Error("No text message to close");let e={type:eo.TEXT_MESSAGE_END,messageId:n.messageId};return s=void 0,n=void 0,r?.event("TRANSFORM","TEXT_MESSAGE_END",e,{messageId:e.messageId}),e})()]:"tool"===s?[(()=>{if(!i||"tool"!==s)throw Error("No tool call to close");let e={type:eo.TOOL_CALL_END,toolCallId:i.toolCallId};return s=void 0,i=void 0,r?.event("TRANSFORM","TOOL_CALL_END",e,{toolCallId:e.toolCallId}),e})()]:"reasoning"===s?[(()=>{if(!a||"reasoning"!==s)throw Error("No reasoning message to close");let e={type:eo.REASONING_MESSAGE_END,messageId:a.messageId};return s=void 0,a=void 0,r?.event("TRANSFORM","REASONING_MESSAGE_END",e,{messageId:e.messageId}),e})()]:[];return t.pipe(rd(e=>{switch(e.type){case eo.TEXT_MESSAGE_START:case eo.TEXT_MESSAGE_CONTENT:case eo.TEXT_MESSAGE_END:case eo.TOOL_CALL_START:case eo.TOOL_CALL_ARGS:case eo.TOOL_CALL_END:case eo.TOOL_CALL_RESULT:case eo.STATE_
17SNAPSHOT:case eo.STATE_DELTA:case eo.MESSAGES_SNAPSHOT:case eo.CUSTOM:case eo.RUN_STARTED:case eo.RUN_FINISHED:case eo.RUN_ERROR:case eo.STEP_STARTED:case eo.STEP_FINISHED:case eo.THINKING_START:case eo.THINKING_END:case eo.THINKING_TEXT_MESSAGE_START:case eo.THINKING_TEXT_MESSAGE_CONTENT:case eo.THINKING_TEXT_MESSAGE_END:case eo.REASONING_START:case eo.REASONING_MESSAGE_START:case eo.REASONING_MESSAGE_CONTENT:case eo.REASONING_MESSAGE_END:case eo.REASONING_END:return[...o(),e];case eo.RAW:case eo.ACTIVITY_SNAPSHOT:case eo.ACTIVITY_DELTA:case eo.REASONING_ENCRYPTED_VALUE:return[e];case eo.TEXT_MESSAGE_CHUNK:let t=[];if(("text"!==s||void 0!==e.messageId&&e.messageId!==n?.messageId)&&t.push(...o()),"text"!==s){if(void 0===e.messageId)throw Error("First TEXT_MESSAGE_CHUNK must have a messageId");n={messageId:e.messageId,name:e.name},s="text";let i={type:eo.TEXT_MESSAGE_START,messageId:e.messageId,role:e.role||"assistant",...void 0!==e.name&&{name:e.name}};t.push(i),r?.event("TRANSFORM","TEXT_MESSAGE_START",i,{messageId:e.messageId})}if(void 0!==e.delta){let i={type:eo.TEXT_MESSAGE_CONTENT,messageId:n.messageId,delta:e.delta};t.push(i),r?.event("TRANSFORM","TEXT_MESSAGE_CONTENT",i,{messageId:n.messageId})}return t;case eo.TOOL_CALL_CHUNK:let u=[];if(("tool"!==s||void 0!==e.toolCallId&&e.toolCallId!==i?.toolCallId)&&u.push(...o()),"tool"!==s){if(void 0===e.toolCallId)throw Error("First TOOL_CALL_CHUNK must have a toolCallId");if(void 0===e.toolCallName)throw Error("First TOOL_CALL_CHUNK must have a toolCallName");i={toolCallId:e.toolCallId,toolCallName:e.toolCallName,parentMessageId:e.parentMessageId},s="tool";let t={type:eo.TOOL_CALL_START,toolCallId:e.toolCallId,toolCallName:e.toolCallName,parentMessageId:e.parentMessageId};u.push(t),r?.event("TRANSFORM","TOOL_CALL_START",t,{toolCallId:e.toolCallId,toolCallName:e.toolCallName})}if(void 0!==e.delta){let t={type:eo.TOOL_CALL_ARGS,toolCallId:i.toolCallId,delta:e.delta};u.push(t),r?.event("TRANSFORM","TOOL_CALL_ARGS",t,{toolCallId:i.toolCallId})}return u;case eo.REASONING_MESSAGE_CHUNK:let l=[];
17if(("reasoning"!==s||e.messageId&&e.messageId!==a?.messageId)&&l.push(...o()),"reasoning"!==s){if(void 0===e.messageId)throw Error("First REASONING_MESSAGE_CHUNK must have a messageId");a={messageId:e.messageId},s="reasoning";let t={type:eo.REASONING_MESSAGE_START,messageId:e.messageId};l.push(t),r?.event("TRANSFORM","REASONING_MESSAGE_START",t,{messageId:e.messageId})}if(void 0!==e.delta){let t={type:eo.REASONING_MESSAGE_CONTENT,messageId:a.messageId,delta:e.delta};l.push(t),r?.event("TRANSFORM","REASONING_MESSAGE_CONTENT",t,{messageId:a.messageId})}return l}return e.type,[]}),rf(()=>{o()}))};var ik=class{runNext(e,t){return t.run(e).pipe(iA(!1))}runNextWithState(e,t){let r=n7(e.messages||[]),n=n7(e.state||{}),i=new rl;return io(e,i,t,[]).subscribe(e=>{void 0!==e.messages&&(r=e.messages),void 0!==e.state&&(n=e.state)}),this.runNext(e,t).pipe(rg(async e=>(i.next(e),await new Promise(e=>setTimeout(e,0)),{event:e,messages:n7(r),state:n7(n)})))}},iC=class extends ik{constructor(e){super(),this.fn=e}run(e,t){return this.fn(e,t)}};function iT(e){let t=e.content;if(Array.isArray(t)){let r=t.filter(e=>"object"==typeof e&&!!e&&"type"in e&&"text"===e.type&&"string"==typeof e.text).map(e=>e.text).join("");return{...e,content:r}}return"string"==typeof t?e:{...e,content:""}}var i_=class extends ik{run(e,t){let{parentRunId:r,...n}=e,i={...n,messages:n.messages.map(iT)};return this.runNext(i,t)}};let iO="THINKING_START",ix="THINKING_END",iR="THINKING_TEXT_MESSAGE_START",iN="THINKING_TEXT_MESSAGE_CONTENT",iP="THINKING_TEXT_MESSAGE_END";var iq=class extends ik{constructor(...e){super(...e),this.currentReasoningId=null,this.currentMessageId=null}warnAboutTransformation(e,t){"u">typeof n6&&void 0!==n6.env&&n6.env.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`AG-UI is converting ${e} to ${t}. To remove this warning, upgrade your AG-UI integration package (e.g. @ag-ui/langgraph). To surpress it, set SUPPRESS_TRANSFORMATION_WARNINGS=true in your .env file.`)}run(e,t){return this.currentReasoningId=null,this.currentMessageId=null,this.runNext(e,t).pipe(rc(e=>this.transformEvent(e)))}transformEvent(e){switch(e.type){case iO:{this.currentReasoningId=n9();let{title:t,...r}=e;return this.warnAboutTransformation(iO,eo.REASONING_START),{...r,type:eo.REASONING_START,messageId:this.currentReasoningId}}case iR:return this.currentMessageId=n9(),this.warnAboutTransformation(iR,eo.REASONING_MESSAGE_START),{...e,type:eo.REASONING_MESSAGE_START,messageId:this.currentMessageId,role:"assistant"};case iN:{let{delta:t,...r}=e;return this.warnAboutTransformation(iN,eo.REASONING_MESSAGE_CONTENT),{...r,type:eo.REASONING_MESSAGE_CONTENT,messageId:this.currentMessageId??n9(),delta:t}}case iP:{let t=this.currentMessageId??n9();return this.warnAboutTransformation(iP,eo.REASONING_MESSAGE_END),{...e,type:eo.REASONING_MESSAGE_END,messageId:t}}case ix:{let t=this.currentReasoningId??n9();return this.warnAboutTransformation(ix,eo.REASONING_END),{...e,type:eo.REASONING_END,messageId:t}}default:return e}}};function ij(e){let t=e.content;if(!Array.isArray(t))return e;let r=t.map(e=>{var t;let r;return"object"==typeof e&&e&&"type"in e&&"binary"===e.type&&"mimeType"in e&&"string"==typeof e.mimeType?(r=(t=e.mimeType).startsWith("image/")?"image":t.startsWith("audio/")?"audio":t.startsWith("video/")?"video":"document",e.data?{type:r,source:{type:"data",value:e.data,mimeType:e.mimeType},...e.filename?{metadata:{filename:e.filename}}:{}}:e.url?{type:r,source:{type:"url",value:e.url,mimeType:e.mimeType},...e.filename?{metadata:{filename:e.filename}}:{}}:e):e});return{...e,content:r}}var iD=class extends ik{run(e,t){let r={...e,messages:e.messages.map(ij)};return this.runNext(r,t)}},iM=class{get maxVersion(){return"0.0.53"}get debug(){return this._debug}set debug(e){this._debug=ir(e),this._debugLogger=is(this._debug)}get debugLogger(){return this._debugLogger}set debugLogger(e){"boolean"==typeof e?this._debugLogger=e?is(ir(!0)):void 0:this._debugLogger=e}constructor({agentId:e,description:t,threadId:r,initialMessages:n,initialState:i,debug:a}={}){this.subscribers=[],this.isRunning=!1,this.middlewares=[],this.agentId=e,this.description=t??"",this.threadId=r??(0,m.A)(),this.messages=n7(n??[]),this.state=n7(i??{}),this._debug=ir(a),this._debugLogger=is(this._debug),0>=n4(this.maxVersion,"0.0.39")&&this.middlewares.unshift(new i_),0>=n4(this.maxVersion,"0.0.45")&&this.middlewares.unshift(new iq),0>=n4(this.maxVersion,"0.0.47")&&this.middlewares.unshift(new iD)}subscribe(e){return this.subscribers.push(e),{unsubscribe:()=>{this.subscribers=this.subscribers.filter(t=>t!==e)}}}use(...e){let t=e.map(e=>"function"==typeof e?new iC(e):e);return this.middlewares.push(...t),this}async runAgent(e,t){try{let r;this.isRunning=!0,this.agentId=this.agentId??(0,m.A)();let n=this.prepareRunAgentInput(e);this.debugLogger?.lifecycle("LIFECYCLE","Run started:",{agentId:this.agentId,threadId:this.threadId});let i,a=new Set(this.messages.map(e=>e.id)),s=[{onRunFinishedEvent:e=>{i=e.result}},...this.subscribers,t??{}];await this.onInitialize(n,s),this.activeRunDetach$=new rs,this.activeRunCompletionPromise=new Promise(e=>{r=e}),await rh(tQ(()=>0===this.middlewares.length?this.run(n):this.middlewares.reduceRight((e,t)=>({run:r=>t.run(r,e),get messages(){return e.messages},get state(){return e.state}}),this).run(n),iA(this.debugLogger),iu(this.debugLogger),e=>e.pipe(rm(this.activeRunDetach$)),e=>this.apply(n,e,s),e=>this.processApplyEvents(n,e,s),rv(e=>(this.debugLogger?.lifecycle("LIFECYCLE","Run errored:",{agentId:this.agentId,error:e instanceof Error?e.message:String(e)}),this.isRunning=!1,this.onError(n,e,s))),rf(()=>{this.debugLogger?.lifecycle("LIFECYCLE","Run finished:",{agentId:this.agentId,threadId:this.threadId}),this.isRunning=!1,this.onFinalize(n,s),r?.(),r=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))(rt(null)));let o=n7(this.messages).filter(e=>!a.has(e.id));return{result:i,newMessages:o}}finally{this.isRunning=!1}}connect(e){throw new H}async connectAgent(e,t){try{let r;this.isRunning=!0,this.agentId=this.agentId??(0,m.A)();let n=this.prepareRunAgentInput(e),i,a=new Set(this.messages.map(e=>e.id)),s=[{onRunFinishedEvent:e=>{i=e.result}},...this.subscribers,t??{}];await this.onInitialize(n,s),this.activeRunDetach$=new rs,this.activeRunCompletionPromise=new Promise(e=>{r=e}),await rh(tQ(()=>ri(()=>this.connect(n)),iA(this.debugLogger),iu(this.debugLogger),e=>e.pipe(rm(this.activeRunDetach$)),e=>this.apply(n,e,s),e=>this.processApplyEvents(n,e,s),rv(e=>(this.isRunning=!1,e instanceof H?rr:this.onError(n,e,s))),rf(()=>{this.isRunning=!1,this.onFinalize(n,s),r?.(),r=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))(rt(null)),{defaultValue:void 0});let o=n7(this.messages).filter(e=>!a.has(e.id));return{result:i,newMessages:o}}finally{this.isRunning=!1}}abortRun(){}async detachActiveRun(){if(!this.activeRunDetach$)return;let e=this.activeRunCompletionPromise??Promise.resolve();this.activeRunDetach$.next(),this.activeRunDetach$?.complete(),await e}apply(e,t,r){return io(e,t,this,r,this.debugLogger)}processApplyEvents(e,t,r){var n,i;return t.pipe((i=tc(n=t=>{t.messages&&(this.messages=t.messages,r.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),t.state&&(this.state=t.state,r.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))})?{next:n,error:void 0,complete:void 0}:n)?t8(function(e,t){null==(r=i.subscribe)||r.call(i);var r,n=!0;e.subscribe(t5(t,function(e){var r;null==(r=i.next)||r.call(i,e),t.next(e)},function(){var e;n=!1,null==(e=i.complete)||e.call(i),t.complete()},function(e){var r;n=!1,null==(r=i.error)||r.call(i,e),t.error(e)},function(){var e,t;n&&(null==(e=i.unsubscribe)||e.call(i)),null==(t=i.finalize)||t.call(i)}))}):tz)}prepareRunAgentInput(e){let t=n7(this.messages).filter(e=>"activity"!==e.role);return{threadId:this.threadId,runId:e?.runId||(0,m.A)(),tools:n7(e?.tools??[]),context:n7(e?.context??[]),forwardedProps:n7(e?.forwardedProps??{}),state:n7(this.state),messages:t}}async onInitialize(e,t){let r=await it(t,this.messages,this.state,(t,r,n)=>t.onRunInitialized?.({messages:r,state:n,agent:this,input:e}));(void 0!==r.messages||void 0!==r.state)&&(r.messages&&(this.messages=r.messages,e.messages=r.messages,t.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),r.state&&(this.state=r.state,e.state=r.state,t.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})})))}onError(e,t,r){return re(it(r,this.messages,this.state,(r,n,i)=>r.onRunFailed?.({error:t,messages:n,state:i,agent:this,input:e}))).pipe(rc(n=>{if((void 0!==n.messages||void 0!==n.state)&&(void 0!==n.messages&&(this.messages=n.messages,r.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),void 0!==n.state&&(this.state=n.state,r.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))),!0!==n.stopPropagation){let e=String(t);if("AbortError"!==t.name&&"Fetch is aborted"!==t.message&&"signal is aborted without reason"!==t.message&&"component unmounted"!==t.message&&"component unmounted"!==e)throw console.error("Agent execution failed:",t),t}return{}}))}async onFinalize(e,t){let r=await it(t,this.messages,this.state,(t,r,n)=>t.onRunFinalized?.({messages:r,state:n,agent:this,input:e}));(void 0!==r.messages||void 0!==r.state)&&(void 0!==r.messages&&(this.messages=r.messages,t.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),void 0!==r.state&&(this.state=r.state,t.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})})))}clone(){let e=Object.create(Object.getPrototypeOf(this));return e.agentId=this.agentId,e.description=this.description,e.threadId=this.threadId,e.messages=n7(this.messages),e.state=n7(this.state),e._debug=this._debug,e._debugLogger=this._debugLogger,e.isRunning=this.isRunning,e.subscribers=[...this.subscribers],e.middlewares=[...this.middlewares],e}addMessage(e){this.messages.push(e),(async()=>{for(let t of this.subscribers)await t.onNewMessage?.({message:e,messages:this.messages,state:this.state,agent:this});if("assistant"===e.role&&e.toolCalls)for(let t of e.toolCalls)for(let e of this.subscribers)await e.onNewToolCall?.({toolCall:t,messages:this.messages,state:this.state,agent:this});for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}addMessages(e){this.messages.push(...e),(async()=>{for(let t of e){for(let e of this.subscribers)await e.onNewMessage?.({message:t,messages:this.messages,state:this.state,agent:this});if("assistant"===t.role&&t.toolCalls)for(let e of t.toolCalls)for(let t of this.subscribers)await t.onNewToolCall?.({toolCall:e,messages:this.messages,state:this.state,agent:this})}for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}setMessages(e){this.messages=n7(e),(async()=>{for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}setState(e){this.state=n7(e),(async()=>{for(let e of this.subscribers)await e.onStateChanged?.({messages:this.messages,state:this.state,agent:this})})()}legacy_to_be_removed_runAgentBridged(e){let t,r,n;this.agentId=this.agentId??(0,m.A)();let i=this.prepareRunAgentInput(e);return(0===this.middlewares.length?this.run(i):this.middlewares.reduceRight((e,t)=>({run:r=>t.run(r,e),get messages(){return e.messages},get state(){return e.state}}),this).run(i)).pipe(iA(this.debugLogger),iu(this.debugLogger),(t=this.threadId,r=i.runId,n=this.agentId,e=>{let i={},a=!0,s=!0,o="",u=null,l=null,c=[],d={},f=e=>{"object"==typeof e&&e&&("messages"in e&&delete e.messages,i=e)};return e.pipe(rd(e=>{switch(e.type){case eo.TEXT_MESSAGE_START:return[{type:ic.enum.TextMessageStart,messageId:e.messageId,role:e.role}];case eo.TEXT_MESSAGE_CONTENT:return[{type:ic.enum.TextMessageContent,messageId:e.messageId,content:e.delta}];case eo.TEXT_MESSAGE_END:return[{type:ic.enum.TextMessageEnd,messageId:e.messageId}];case eo.TOOL_CALL_START:return c.push({id:e.toolCallId,type:"function",function:{name:e.toolCallName,arguments:""}}),s=!0,d[e.toolCallId]=e.toolCallName,[{type:ic.enum.ActionExecutionStart,actionExecutionId:e.toolCallId,actionName:e.toolCallName,parentMessageId:e.parentMessageId}];case eo.TOOL_CALL_ARGS:{let u=c.find(t=>
17t.id===e.toolCallId);if(!u)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${e.toolCallId}'`),[];u.function.arguments+=e.delta;let d=!1;if(l){let e=l.find(e=>e.tool==u.function.name);if(e)try{let t=JSON.parse(rb(u.function.arguments));e.tool_argument&&e.tool_argument in t?(f({...i,[e.state_key]:t[e.tool_argument]}),d=!0):e.tool_argument||(f({...i,[e.state_key]:t}),d=!0)}catch{}}return[{type:ic.enum.ActionExecutionArgs,actionExecutionId:e.toolCallId,args:e.delta},...d?[{type:ic.enum.AgentStateMessage,threadId:t,agentName:n,nodeName:o,runId:r,running:a,role:"assistant",state:JSON.stringify(i),active:s}]:[]]}case eo.TOOL_CALL_END:return[{type:ic.enum.ActionExecutionEnd,actionExecutionId:e.toolCallId}];case eo.TOOL_CALL_RESULT:return[{type:ic.enum.ActionExecutionResult,actionExecutionId:e.toolCallId,result:e.content,actionName:d[e.toolCallId]||"unknown"}];case eo.RAW:return[];case eo.CUSTOM:switch(e.name){case"Exit":a=!1;break;case"PredictState":l=e.value}return[{type:ic.enum.MetaEvent,name:e.name,value:e.value}];case eo.STATE_SNAPSHOT:return f(e.snapshot),[{type:ic.enum.AgentStateMessage,threadId:t,agentName:n,nodeName:o,runId:r,running:a,role:"assistant",state:JSON.stringify(i),active:s}];case eo.STATE_DELTA:{let u=tl.applyPatch(i,e.delta,!0,!1);return u?(f(u.newDocument),[{type:ic.enum.AgentStateMessage,threadId:t,agentName:n,nodeName:o,runId:r,running:a,role:"assistant",state:JSON.stringify(i),active:s}]):[]}case eo.MESSAGES_SNAPSHOT:return u=e.messages,[{type:ic.enum.AgentStateMessage,threadId:t,agentName:n,nodeName:o,runId:r,running:a,role:"assistant",state:JSON.stringify({...i,...u?{messages:u}:{}}),active:!0}];case eo.RUN_STARTED:return[];case eo.RUN_FINISHED:return u&&(i.messages=u),0===Object.keys(i).length?[]:[{type:ic.enum.AgentStateMessage,threadId:t,agentName:n,nodeName:o,runId:r,running:a,role:"assistant",state:JSON.stringify({...i,...u?{messages:function(e){let t=[];for(let r of e)if("assistant"===r.role||"user"===r.role||"system"===r.role){let e=iI(r.content);if(e){let n={id:r.id,role:r.role,content:e};t.push(n)}if("assistant"===r.role&&r.toolCalls&&r.toolCalls.length>0)for(let e of r.toolCalls){let n={id:e.id,name:e.function.name,arguments:JSON.parse(e.function.arguments),parentMessageId:r.id};t.push(n)}}else if("tool"===r.role){let n="unknown";for(let t of e)if("assistant"===t.role&&t.toolCalls?.length){for(let e of t.toolCalls)if(e.id===r.toolCallId){n=e.function.name;break}}let i={id:r.id,result:r.content,actionExecutionId:r.toolCallId,actionName:n};t.push(i)}return t}(u)}:{}}),active:!1}];case eo.RUN_ERROR:return[{type:ic.enum.RunError,message:e.message,code:e.code}];case eo.STEP_STARTED:return o=e.stepName,c=[],l=null,[{type:ic.enum.AgentStateMessage,threadId:t,agentName:n,nodeName:o,runId:r,running:a,role:"assistant",state:JSON.stringify(i),active:!0}];case eo.STEP_FINISHED:return c=[],l=null,[{type:ic.enum.AgentStateMessage,threadId:t,agentName:n,nodeName:o,runId:r,running:a,role:"assistant",state:JSON.stringify(i),active:!1}];default:return[]}}))}),e=>e.pipe(rc(e=>(this.debugLogger?.event("LEGACY","Event:",e,{type:e.type}),e))))}},iU=class extends iM{requestInit(e){return{method:"POST",headers:{...this.headers,"Content-Type":"application/json",Accept:"text/event-stream"},body:JSON.stringify(e),signal:this.abortController.signal}}runAgent(e,t){return this.abortController=e?.abortController??new AbortController,super.runAgent(e,t)}abortRun(){this.abortController.abort(),super.abortRun()}constructor(e){super(e),this.abortController=new AbortController,this.url=e.url,this.headers=n7(e.headers??{})}run(e){var t,r,n,i;let a,s,o,u;return t=this.url,r=this.requestInit(e),i=ri(()=>re(fetch(t,r))).pipe((n=e=>{if(!e.ok){let t=e.headers.get("content-type")||"";return re(e.text()).pipe(rd(r=>{let n=r;if(t.includes("application/json"))try{n=JSON.parse(r)}catch{}let i=Error(`HTTP ${e.status}: ${"string"==typeof n?n:JSON.stringify(n)}`);return i.status=e.status,i.payload=n,rn(()=>i)}))}let t={type:il.HEADERS,status:e.status,headers:e.headers},r=e.body?.getReader();return r?new tY(e=>(e.next(t),(async()=>{try{for(;;){let{done:t,value:n}=await r.read();if(t)break;let i={type:il.DATA,data:n};e.next(i)}e.complete()}catch(t){e.error(t)}})(),()=>{r.cancel().catch(e=>{if(e?.name!=="AbortError")throw e})})):rn(()=>Error("Failed to getReader() from response"))},t8(function(e,t){var r=null,i=0,a=!1,s=function(){return a&&!r&&t.complete()};e.subscribe(t5(t,function(e){null==r||r.unsubscribe(),t1(n(e,i++)).subscribe(r=t5(t,function(e){return t.next(e)},function(){r=null,s()}))},function(){a=!0,s()}))}))),a=ii(this.debugLogger),s=new rs,o=new rl,u=!1,i.subscribe({next:e=>{if(o.next(e),e.type!==il.HEADERS||u)u||s.error(Error("No headers event received before data events"));else{u=!0;let t=e.headers.get("content-type");a?.lifecycle("HTTP","Stream format detected:",{contentType:t,parser:t===nJ?"protobuf":"sse"}),t===nJ?(e=>
17{let t=new rs,r=new Uint8Array;function n(){for(;r.length>=4;){let e=4+new DataView(r.buffer,r.byteOffset,4).getUint32(0,!1);if(r.length<e)break;try{let n=r.slice(4,e),i=function(e){let t=Object.values(nW.decode(e)).find(e=>void 0!==e);if(!t)throw Error("Invalid event");if(t.type=nc[t.baseEvent.type],t.timestamp=t.baseEvent.timestamp,t.rawEvent=t.baseEvent.rawEvent,t.type===eo.MESSAGES_SNAPSHOT)for(let e of t.messages){if("user"===e.role&&Array.isArray(e.contentParts)){let t=e.contentParts.map(e=>nZ(e)).filter(e=>void 0!==e);t.length>0&&(e.content=t)}Array.isArray(e.contentParts)&&0===e.contentParts.length&&(e.contentParts=void 0),e.toolCalls?.length===0&&(e.toolCalls=void 0)}if(t.type===eo.STATE_DELTA)for(let e of t.delta)e.op=rB[e.op].toLowerCase(),Object.keys(e).forEach(t=>{void 0===e[t]&&delete e[t]});return Object.keys(t).forEach(e=>{void 0===t[e]&&delete t[e]}),eG.parse(t)}(n);t.next(i),r=r.slice(e)}catch(r){let e=r instanceof Error?r.message:String(r);t.error(Error(`Failed to decode protocol buffer message: ${e}`));return}}}return e.subscribe({next:e=>{if(e.type!==il.HEADERS&&e.type===il.DATA&&e.data){let t=new Uint8Array(r.length+e.data.length);t.set(r,0),t.set(e.data,r.length),r=t,n()}},error:e=>t.error(e),complete:()=>{if(r.length>0)try{n()}catch{console.warn("Incomplete or invalid protocol buffer data at stream end")}t.complete()}}),t.asObservable()})(o).subscribe({next:e=>s.next(e),error:e=>s.error(e),complete:()=>s.complete()}):((e,t)=>{let r=ii(t),n=new rs,i=new TextDecoder("utf-8",{fatal:!1}),a="";function s(e){let t=e.split(`
18`),i=[];for(let e of t)e.startsWith("data:")&&i.push(e.slice(5).replace(/^ /,""));if(i.length>0)try{let e=i.join(`
19`),t=JSON.parse(e);r?.event("SSE","Event received:",t,{type:t.type}),n.next(t)}catch(e){n.error(e)}}return e.subscribe({next:e=>{if(e.type!==il.HEADERS&&e.type===il.DATA&&e.data){let t=i.decode(e.data,{stream:!0}),r=(a+=t).split(/\n\n/);for(let e of(a=r.pop()||"",r))s(e)}},error:e=>n.error(e),complete:()=>{a&&s(a+=i.decode()),n.complete()}}),n.asObservable()})(o,a).subscribe({next:e=>{try{let t=eG.parse(e);
19a?.event("HTTP","Event validated:",t,{type:t.type,valid:!0}),s.next(t)}catch(t){a?.event("HTTP","Event invalid:",{json:e,error:String(t)}),s.error(t)}},error:e=>{if(e?.name==="AbortError"){s.next({type:eo.RUN_ERROR,message:e.message||"Request aborted",code:"abort",rawEvent:e}),s.complete();return}return s.error(e)},complete:()=>s.complete()})}},error:e=>{o.error(e),s.error(e)},complete:()=>{o.complete()}}),s.asObservable()}clone(){let e=super.clone();e.url=this.url,e.headers=n7(this.headers??{});let t=new AbortController,r=this.abortController.signal;return r.aborted&&t.abort(r.reason),e.abortController=t,e}},iF=r(8045);class iL extends iU{requestInit(e){let{params:t,accessToken:r,recordDebugSession:n}=e.forwardedProps||{},i={...t,...n&&{recordDebugSession:!0}};return{method:"POST",headers:{...this.headers,Authorization:`Bearer ${r}`,"Content-Type":"application/json",Accept:"text/event-stream, application/json"},body:JSON.stringify(i),signal:this.abortController.signal}}}var iV=r(3774),i$=r(88869),iG=r(2738);let iz=()=>{let e,t=()=>{e?.abortRun(),e=void 0};return{run:async(r,n,i)=>{let a,s;t();let o=(0,p.Fh)(r),u=(0,p.P2)(r),l=(0,p.aP)(r),c=(0,p.o7)(r),d=(0,p.Pi)(r),f=new iL({url:`${(0,iF.D)(o,u,l)}/answer`});e=f;let m=(a="",s=!1,{onRunStartedEvent:({event:e})=>{a=e.runId,s=!1,n((0,h.ot)(e.runId)),n((0,h.F6)(!1)),n((0,h.l8)(!0)),n((0,iV.GE)(e.threadId)),n((0,iV.Z9)())},onStepStartedEvent:({event:e})=>{n((0,h.bP)({name:e.stepName,startedAt:e.timestamp??Date.now()}))},onStepFinishedEvent:({event:e})=>{n((0,h.IT)({name:e.stepName,finishedAt:e.timestamp??Date.now()}))},onTextMessageContentEvent:({event:e})=>{e.delta.length>0&&(s=!0),n((0,h.nc)({textDelta:e.delta}))},onCustomEvent:({event:e})=>{let{name:t,value:r}=e;switch(t){case"header":r?.contentFormat&&n((0,h.ti)(r.contentFormat)),"boolean"==typeof r?.followUpEnabled&&n((0,iV.o5)(r.followUpEnabled)),r?.conversationToken&&n((0,iV.y7)(r.conversationToken));return;case"citations":return void n((0,h.sY)({citations:r.citations}))}},onRunErrorEvent:({event:e})=>{let t=(0,iG.to)(e.code);n((0,h.Yw)({message:e.message,code:t}))},onRunFinishedEvent:({event:e})=>{let t=e.result?.completionReason==="ANSWERED",r=t?!s:void 0;n((0,h.ez)(t)),n((0,h.sM)(!t)),n((0,h.l8)(!1)),n((0,i$.$Z)(t,a,r)),n((0,i$.mR)())}}),v=(0,g.BL)(r,i());try{n((0,h.F6)(!0)),await f.runAgent({forwardedProps:{params:v,accessToken:c,recordDebugSession:d}},m)}catch(e){n((0,h.F6)(!1)),n((0,h.Yw)({message:"An error occurred while starting the answer generation."})),console.error("Error running the answer agent:",e)}},abortRun:t}}},84649:(e,t,r)=>{"use strict";r.d(t,{Jp:()=>s,LM:()=>f,Ye:()=>y,ZZ:()=>a,dR:()=>d,f0:()=>v,h_:()=>m,j8:()=>c,kL:()=>u,t_:()=>l,uS:()=>g,y$:()=>o,zr:()=>i});var n=r(65179);let i=new n.hU({regex:/^[a-zA-Z0-9-_]+$/}),a=new n.hU({required:!0}),s=new n.v({each:new n.hU}),o=new n.hU,u=new n.Ci,l=new n.Ci,c=new n.lS({min:0}),d=new n.lS({min:1}),f=new n.Ci({required:!0}),p=new n.Bo,h=new n.hU,g=new n.Bo({values:{captions:p,numberOfValues:d,query:h}}),m=new n.Bo({options:{required:!1},values:{type:new n.hU({constrainTo:["simple"],emptyAllowed:!1,required:!0}),values:new n.v({required:!0,max:25,each:new n.hU({emptyAllowed:!1,required:!0})})}}),v=new n.Ci,y=new n.v({min:1,max:25,required:!1,each:new n.hU({emptyAllowed:!1,required:!0})})},84940:(e,t,r)=>{"use strict";let n=r(49948);e.exports=c;let i=function(){function e(e){return void 0!==e&&e}try{if("u">typeof globalThis)return globalThis;return Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch(t){return e(self)||e(window)||e(this)||{}}}().console||{};function a(e,t){return"silent"===e?1/0:t.levels.values[e]}let s=Symbol("pino.logFuncs"),o=Symbol("pino.hierarchy"),u={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function l(e,t){let r={logger:t,parent:e[o]};t[o]=r}function c(e){var t,r,n;let o,h,g;(e=e||{}).browser=e.browser||{};let m=e.browser.transmit;if(m&&"function"!=typeof m.send)throw Error("pino: transmit option must have a send function");let w=e.browser.write||i;e.browser.write&&(e.browser.asObject=!0);let S=e.serializers||{},E=(t=e.browser.serialize,Array.isArray(t)?t.filter(function(e){return"!stdSerializers.err"!==e}):!0===t&&Object.keys(S)),I=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(I=!1);let A=Object.keys(e.customLevels||{}
19),k=["error","fatal","warn","info","debug","trace"].concat(A);"function"==typeof w&&k.forEach(function(e){w[e]=w}),(!1===e.enabled||e.browser.disabled)&&(e.level="silent");let C=e.level||"info",T=Object.create(w);T.log||(T.log=v),o={},k.forEach(e=>{o[e]=w[e]?w[e]:i[e]||i[u[e]||"log"]||v}),T[s]=o,l({},T),Object.defineProperty(T,"levelVal",{get:function(){return a(this.level,this)}}),Object.defineProperty(T,"level",{get:function(){return this._level},set:function(e){if("silent"!==e&&!this.levels.values[e])throw Error("unknown level "+e);this._level=e,d(this,_,T,"error"),d(this,_,T,"fatal"),d(this,_,T,"warn"),d(this,_,T,"info"),d(this,_,T,"debug"),d(this,_,T,"trace"),A.forEach(e=>{d(this,_,T,e)})}});let _={transmit:m,serialize:E,asObject:e.browser.asObject,asObjectBindingsOnly:e.browser.asObjectBindingsOnly,formatters:e.browser.formatters,levels:k,timestamp:"function"==typeof(r=e).timestamp?r.timestamp:!1===r.timestamp?y:b,messageKey:e.messageKey||"msg",onChild:e.onChild||v};function O(t,r,n){if(!r)throw Error("missing bindings for child Pino");n=n||{},E&&r.serializers&&(n.serializers=r.serializers);let i=n.serializers;if(E&&i){var a=Object.assign({},S,i),s=!0===e.browser.serialize?Object.keys(a):E;delete r.serializers,f([r],s,a,this._stdErrSerialize)}function o(e){this._childLevel=(0|e._childLevel)+1,this.bindings=r,a&&(this.serializers=a,this._serialize=s),m&&(this._logEvent=p([].concat(e._logEvent.bindings,r)))}o.prototype=this;let u=new o(this);return l(this,u),u.child=function(...e){return O.call(this,t,...e)},u.level=n.level||this.level,t.onChild(u),u}return h=e.customLevels||{},T.levels={values:Object.assign({},c.levels.values,h),labels:Object.assign({},c.levels.labels,(g={},Object.keys(n=h).forEach(function(e){g[n[e]]=e}),g))},T.level=C,T.isLevelEnabled=function(e){return!!this.levels.values[e]&&this.levels.values[e]>=this.levels.values[this.level]},T.setMaxListeners=T.getMaxListeners=T.emit=T.addListener=T.on=T.prependListener=T.once=T.prependOnceListener=T.removeListener=T.removeAllListeners=T.listeners=T.listenerCount=T.eventNames=T.write=T.flush=v,T.serializers=S,T._serialize=E,T._stdErrSerialize=I,T.child=function(...e){return O.call(this,_,...e)},m&&(T._logEvent=p()),T}function d(e,t,r,u){var l,c,d,h,g,m,y;if(Object.defineProperty(e,u,{value:a(e.level,r)>a(u,r)?v:r[s][u],writable:!0,enumerable:!0,configurable:!0}),e[u]===v){if(!t.transmit)return;let n=a(t.transmit.level||e.level,r);if(a(u,r)<n)return}e[u]=(l=e,c=t,d=r,h=u,g=l[s][h],function(){let e=c.timestamp(),t=Array(arguments.length),r=Object.getPrototypeOf&&Object.getPrototypeOf(this)===i?i:this;for(var s=0;s<t.length;s++)t[s]=arguments[s];var o=!1;if(c.serialize&&(f(t,this._serialize,this.serializers,this._stdErrSerialize),o=!0),c.asObject||c.formatters?g.call(r,...function(e,t,r,i,a){let{level:s,log:o=e=>e}=a.formatters||{},u=r.slice(),l=u[0],c={},d=(0|e._childLevel)+1;if(d<1&&(d=1),i&&(c.time=i),s?Object.assign(c,s(t,e.levels.values[t])):c.level=e.levels.values[t],a.asObjectBindingsOnly){if(null!==l&&"object"==typeof l)for(;d--&&"object"==typeof u[0];)Object.assign(c,u.shift());return[o(c),...u]}if(null!==l&&"object"==typeof l){for(;d--&&"object"==typeof u[0];)Object.assign(c,u.shift());l=u.length?n(u.shift(),u):void 0}else"string"==typeof l&&(l=n(u.shift(),u));return void 0!==l&&(c[a.messageKey]=l),[o(c)]}(this,h,t,e,c)):g.apply(r,t),c.transmit){let r=c.transmit.level||l._level,n=a(r,d),i=a(h,d);if(i<n)return;!function(e,t,r,n=!1){let i=t.send,a=t.ts,s=t.methodLevel,o=t.methodValue,u=t.val,l=e._logEvent.bindings;n||f(r,e._serialize||Object.keys(e.serializers),e.serializers,void 0===e._stdErrSerialize||e._stdErrSerialize),e._logEvent.ts=a,e._logEvent.messages=r.filter(function(e){return -1===l.indexOf(e)}),e._logEvent.level.label=s,e._logEvent.level.value=o,i(s,e._logEvent,u),e._logEvent=p(l)}(this,{ts:e,methodLevel:h,methodValue:i,transmitLevel:r,transmitValue:d.levels.values[c.transmit.level||l._level],send:c.transmit.send,val:a(l._level,d)},t,o)}});let b=function(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[o];for(;r.parent;)(r=r.parent).logger.bindings&&t.push(r.logger.bindings);return t.reverse()}(e);0!==b.length&&(e[u]=(m=b,y=e[u],function(){return y.apply(this,[...m,...arguments])}))}function f(e,t,r,n){for(let i in e)if(n&&e[i]instanceof Error)e[i]=c.stdSerializers.err(e[i]);else if("object"==typeof e[i]&&!Array.isArray(e[i])&&t)for(let n in e[i])t.indexOf(n)>-1&&n in r&&(e[i][n]=r[n](e[i][n]))}function p(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function h(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)void 0===t[r]&&(t[r]=e[r]);return t}function g(){return{}}function m(e){return e}function v(){}function y(){return!1}function b(){return Date.now()}c.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"}},c.stdSerializers={mapHttpRequest:g,mapHttpResponse:g,wrapRequestSerializer:m,wrapResponseSerializer:m,wrapErrorSerializer:m,req:g,res:g,err:h,errWithCause:h},c.stdTimeFunctions=Object.assign({},{nullTime:y,epochTime:b,unixTime:function(){return Math.round(Date.now()/1e3)},isoTime:function(){return new Date(Date.now()).toISOString()}}),e.exports.default=c,e.exports.pino=c},84959:(e,t,r)=>{"use strict";r.d(t,{f:()=>i});var n=r(914);function i(e,t){if(t&&"AbortError"===e.name)return{error:{statusCode:e.code,type:e.name,message:e.message,ignored:!0}};if(e instanceof n.Ce)return{error:{statusCode:e.statusCode,type:e.name,message:e.message}};throw e}},85355:(e,t,r)=>{"use strict";r.d(t,{D:()=>s,F:()=>o});var n=r(32995),i=r(40687),a=r(27208);let s=()=>(0,n.Zl)("analytics/sort/results",(e,t)=>e.makeResultsSort({resultsSortBy:t.sortCriteria||(0,a.z)()})),o=()=>({actionCause:i.d.resultsSort})},85571:(e,t,r)=>{var n=r(68704),i=r(50360);
19e.exports=function(e,t){return e&&e.length?i(e,n(t,2)):[]}},86534:(e,t,r)=>{"use strict";r.d(t,{Gv:()=>S,H7:()=>u,Ip:()=>k,Iz:()=>m,Ml:()=>T,UQ:()=>A,VN:()=>R,VW:()=>I,X9:()=>C,YP:()=>p,_g:()=>c,g5:()=>g,gt:()=>h,lK:()=>v,nN:()=>O,qC:()=>y,s_:()=>w,tz:()=>l,uV:()=>f,wg:()=>x,z2:()=>b});var n=r(65179),i=r(69096),a=r(74891),s=r(95592),o=r(62743);let u="..",l="...",c=/^(f|fExcluded|cf|nf|df|sf|af|mnf)-(.+)$/,d={f:!0,fExcluded:!0,cf:!0,sf:!0,af:!0,nf:!0,df:!0,mnf:!0},f="&";function p(e){return e in d}function h(e){return e in{q:!0,aq:!0,cq:!0,enableQuerySyntax:!0,firstResult:!0,numberOfResults:!0,sortCriteria:!0,debug:!0,tab:!0}}function g(e){let t=e in{nf:!0,df:!0,mnf:!0};return p(e)&&t}function m(e){return h(e)||p(e)}let v=e=>t=>Object.entries(t).map(e).filter(e=>e).join(f);function y(e,t){return`${e}=${encodeURIComponent(t)}`}function b(e){return!!S(e)&&E(e,e=>"string"==typeof e)}function w(e){return!!S(e)&&E(e,e=>S(e)&&"start"in e&&"end"in e)}function S(e){return!!(e&&"object"==typeof e)}function E(e,t){return 0===Object.entries(e).filter(e=>{let r=e[1];return!Array.isArray(r)||!r.every(t)}).length}function I(e,t){return Object.entries(t).map(([t,r])=>`${e}-${t}=${r.map(e=>encodeURIComponent(e)).join(",")}`).join(f)}function A(e,t){return Object.entries(t).map(([t,r])=>{let n=r.map(({start:e,end:t,endInclusive:r})=>`${e}${r?l:u}${t}`).join(",");return`${e}-${t}=${n}`}).join(f)}function k(e){let[t,...r]=e.split("=");return[t,r.join("=")]}function C(e,t=c){var r,n;let[i,a]=e,s=t.exec(i);if(!s)return e;let o=s[1],u=s[2],l=(r=o,n=a.split(","),"nf"===r||"mnf"===r?T(n,"selected"):"df"===r?O(n,"selected"):n);return[o,JSON.stringify({[u]:l})]}function T(e,t){let r=[];for(let n of e){let{startAsString:e,endAsString:i,isEndInclusive:a}=N(n),s=parseFloat(e),u=parseFloat(i);Number.isFinite(s)&&Number.isFinite(u)&&r.push((0,o.z)({start:s,end:u,state:t,endInclusive:a}))}return r}function _(e){try{if((0,i.z6)(e))return(0,i.W5)(e,i.a7),!0;if((0,a.o6)(e))return(0,a.lV)(e),!0;return!1}catch(e){return!1}}function O(e,t){let r=[];for(let n of e){let{isEndInclusive:e,startAsString:i,endAsString:a}=N(n);_(i)&&_(a)&&r.push((0,s.w)({start:i,end:a,state:t,endInclusive:e}))}return r}function x(e,t=!0){let[r,n]=e;return"enableQuerySyntax"===r||"debug"===r?[r,"true"===n]:"firstResult"===r||"numberOfResults"===r?[r,parseInt(n,10)]:p(r)?[r,R(n)]:[r,t?decodeURIComponent(n):n]}function R(e){let t=JSON.parse(e),r={};return Object.entries(t).forEach(e=>{let[t,i]=e;r[t]=i.map(e=>(0,n.Kg)(e)?decodeURIComponent(e):e)}),r}function N(e){let t=-1!==e.indexOf(l),[r,n]=e.split(t?l:u);return{isEndInclusive:t,startAsString:r,endAsString:n}}},87089:(e,t,r)=>{"use strict";r.d(t,{Rw:()=>l,cQ:()=>o,jp:()=>u});var n=r(69285),i=r(59730),a=r(9248),s=r(77338);function o(e,t){e.queries=Array.from(new Set(t.payload.queries.map(e=>e.trim().toLowerCase()))).slice(0,t.payload.maxLength),e.maxLength=t.payload.maxLength}function u(e){e.queries=[]}function l(e,t){let r=e.trim().toLowerCase();if(""===r)return;let n=Array.from(new Set(t.queries.filter(e=>e.trim().toLowerCase()!==r))).slice(0,t.maxLength-1);t.queries=[r,...n]}(0,n.vy)((0,s.X)(),e=>{e.addCase(a.LN,o).addCase(a.Zl,u).addCase(i.kB.fulfilled,(e,t)=>{let r=t.payload.queryExecuted,n=t.payload.response.results;r.length&&n.length&&l(r,e)})})},87178:e=>{e.exports=function(e){return e!=e}},87264:(e,t,r)=>{"use strict";r.d(t,{I3:()=>s,kg:()=>a,ps:()=>o});var n=r(58450),i=r(22478);let a=e=>new n.iR(e).getCurrentVisitorId(),s=(e,t)=>"function"==typeof t?(...r)=>{let n=(0,i.o8)(r[0]);try{return t.apply(t,r)}catch(t){return e.error(t,"Error in analytics preprocessRequest. Returning original request."),n}}:void 0,o=(e,t)=>(...r)=>{let n=(0,i.o8)(r[1]);try{return t.apply(t,r)}catch(t){return e.error(t,"Error in analytics hook. Returning original request."),n}}},87923:()=>{},87929:(e,t,r)=>{"use strict";function n(e,t,r){let{facetId:n}=t;if(e[n])return;let i={...c,...t},a=r();e[n]={options:i,isLoading:!1,response:a,initialNumberOfValues:i.numberOfValues,requestId:""}}function i(e,t){let{facetId:r,...n}=t,i=e[r];i&&(i.options={...i.options,...n})}function a(e,t,r){let n=e[t];n&&(n.requestId=r,n.isLoading=!0)}function s(e,t){let r=e[t];r&&(r.isLoading=!1)}function o(e,t,r){let{facetId:n,response:i}=t,a=e[n];a&&a.requestId===r&&(a.isLoading=!1,a.response=i)}function u(e,t,r){let{facetId:n}=t,i=e[n];i&&(i.requestId="",i.isLoading=!1,i.response=r(),i.options.numberOfValues=i.initialNumberOfValues,i.options.query=c.query)}function l(e,t){Object.keys(e).forEach(r=>u(e,{facetId:r},t))}r.d(t,{$Q:()=>n,Dg:()=>l,Hn:()=>a,JT:()=>i,PB:()=>o,R_:()=>c,t9:()=>u,y0:()=>s});let c={captions:{},numberOfValues:10,query:""}},87998:(e,t,r)=>{"use strict";r.d(t,{R:()=>i,y:()=>a});var n=r(69285);let i=(0,n.VP)("breadcrumb/deselectAll"),a=(0,n.VP)("breadcrumb/deselectAllNonBreadcrumbs")},88830:(e,t,r)=>{"use strict";r.d(t,{AS:()=>m,IV:()=>g,Lv:()=>p,nA:()=>h,sK:()=>f});var n=r(65179),i=r(69285),a=r(89969),s=r(35521),o=r(81088),u=r(58604),l=r(58035),c=r(10870);let d={id:u.r3},f=(0,i.VP)("querySuggest/register",e=>(0,u.rq)(e,{...d,count:new n.lS({min:0})}
19)),p=(0,i.VP)("querySuggest/unregister",e=>(0,u.rq)(e,d)),h=(0,i.VP)("querySuggest/selectSuggestion",e=>(0,u.rq)(e,{...d,expression:u.GH})),g=(0,i.VP)("querySuggest/clear",e=>(0,u.rq)(e,d)),m=(0,i.zD)("querySuggest/fetch",async(e,{getState:t,rejectWithValue:r,extra:{apiClient:n,validatePayload:i,navigatorContext:a}})=>{i(e,d);let s=e.id,u=await v(s,t(),a),l=await n.querySuggest(u);return(0,o.CR)(l)?r(l.error):{id:s,q:u.q,...l.success}}),v=async(e,t,r)=>({accessToken:t.configuration.accessToken,organizationId:t.configuration.organizationId,url:t.configuration.search.apiBaseUrl??(0,s.Ns)(t.configuration.organizationId,t.configuration.environment),count:t.querySuggest[e].count,q:t.querySet[e],locale:t.configuration.search.locale,timezone:t.configuration.search.timezone,actionsHistory:t.configuration.analytics.enabled?a.Ay.getInstance().getHistory():[],...t.context&&{context:t.context.contextValues},...t.pipeline&&{pipeline:t.pipeline},...t.searchHub&&{searchHub:t.searchHub},tab:t.configuration.analytics.originLevel2,...t.configuration.analytics.enabled&&{...t.configuration.analytics.enabled&&"legacy"===t.configuration.analytics.analyticsMode?await (0,c.V)(t.configuration.analytics):(0,l.V)(t.configuration.analytics,r)},...t.configuration.search.authenticationProviders.length&&{authentication:t.configuration.search.authenticationProviders.join(",")}})},88869:(e,t,r)=>{"use strict";r.d(t,{$Z:()=>a,mR:()=>s});var n=r(32995);r(40687);var i=r(5121);let a=(e,t,r)=>(0,n.Zl)({prefix:"analytics/generatedAnswer/streamEnd",__legacy__getBuilder:(n,a)=>{let s=t??(0,i.ru)(a);if(!s)return null;let o=(0,i.Kj)(a);return n.makeGeneratedAnswerStreamEnd({generativeQuestionAnsweringId:s,answerGenerated:e,answerTextIsEmpty:r,...o&&{conversationId:o}})},analyticsType:"Rga.AnswerReceived",analyticsPayloadBuilder:r=>({answerId:t??(0,i.ru)(r)??"",answerGenerated:e??!1})}),s=e=>(0,n.Zl)({prefix:"analytics/generatedAnswer/responseLinked",__legacy__getBuilder:()=>null,analyticsType:"Rga.ResponseLinked",analyticsPayloadBuilder:t=>({answerId:e??(0,i.ru)(t)??"",responseId:t.search?.searchResponseId||t.search?.response.searchUid||""})})},89014:(e,t,r)=>{"use strict";r.d(t,{E:()=>s});var n=r(65179),i=r(35521),a=r(58035);let s=(e,t,r)=>({accessToken:e.configuration.accessToken,organizationId:e.configuration.organizationId,url:e.configuration.search.apiBaseUrl??(0,i.Ns)(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&&(0,a.V)(e.configuration.analytics,t,r),...e.excerptLength&&!(0,n.hX)(e.excerptLength.length)&&{excerptLength:e.excerptLength.length},...e.configuration.search.authenticationProviders.length&&{authentication:e.configuration.search.authenticationProviders.join(",")}})},89693:(e,t,r)=>{var n=r(2377),i=r(78323);e.exports=function(e){for(var t=i(e),r=t.length;r--;){var a=t[r],s=e[a];t[r]=[a,s,n(s)]}return t}},89969:(e,t,r)=>{"use strict";r.d(t,{Ay:()=>l});class n{static set(e,t,r){let n,a;r&&(n=new Date).setTime(n.getTime()+r);let s=window.location.hostname;/^(\d{1,3}\.){3}\d{1,3}$/.test(s)||/^([0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}$/.test(s)||-1===s.indexOf(".")?i(e,t,n):i(e,t,n,(a=s.split("."))[a.length-2]+"."+a[a.length-1])}static get(e){let t=e+"=",r=document.cookie.split(";");for(let e=0;e<r.length;e++){let n=r[e];if(0===(n=n.replace(/^\s+/,"")).lastIndexOf(t,0))return n.substring(t.length,n.length)}return null}static erase(e){n.set(e,"",-1)}}function i(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"+("https:"===window.location.protocol?";Secure":"")}class a{static prefix="coveo_";getItem(e){return n.get(`${a.prefix}${e}`)}removeItem(e){n.erase(`${a.prefix}${e}`)}setItem(e,t,r){n.set(`${a.prefix}${e}`,t,r)}}class s{getItem(e){return null}removeItem(e){}setItem(e,t){}}let o="__coveo.analytics.history";class u{static instance=null;static getInstance(e){return u.instance||(u.instance=new u(e)),u.instance}store;constructor(e){this.store=e||(!function(){try{return"u">typeof localStorage}catch(e){return!1}}()?"u">typeof navigator&&navigator.cookieEnabled?new a:!function(){try{return"u">typeof sessionStorage}catch(e){return!1}}()?new s:sessionStorage:localStorage)}addElement(e){e.internalTime=new Date().getTime(),e=this.cropQueryElement(this.stripEmptyQuery(e));let t=this.getHistoryWithInternalTime();null!==t?this.isValidEntry(e)&&this.setHistory([e].concat(t)):this.setHistory([e])}async addElementAsync(e){e.internalTime=new Date().getTime(),e=this.cropQueryElement(this.stripEmptyQuery(e));let t=await this.getHistoryWithInternalTimeAsync();null!==t?this.isValidEntry(e)&&this.setHistory([e].concat(t)):this.setHistory([e])}getHistory(){let e=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(e))}async getHistoryAsync(){let e=await this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(e))}getHistoryWithInternalTime(){try{let e=this.store.getItem(o);if(e&&"string"==typeof e)return JSON.parse(e);return[]}catch(e){return[]}}async getHistoryWithInternalTimeAsync(){try{let e=await this.store.getItem(o);if(e)return JSON.parse(e);return[]}catch(e){return[]}}setHistory(e){try{this.store.setItem(o,JSON.stringify(e.slice(0,20)))}catch(e){}}clear(){try{this.store.removeItem(o)}catch(e){}}getMostRecentElement(){let e=this.getHistoryWithInternalTime();return Array.isArray(e)?e.sort((e,t)=>
19(t.internalTime||0)-(e.internalTime||0))[0]:null}cropQueryElement(e){return e.name&&e.value&&"query"===e.name.toLowerCase()&&(e.value=e.value.slice(0,75)),e}isValidEntry(e){let t=this.getMostRecentElement();return!t||t.value!==e.value||(e.internalTime||0)-(t.internalTime||0)>6e4}stripInternalTime(e){return Array.isArray(e)?e.map(e=>{let{name:t,time:r,value:n}=e;return{name:t,time:r,value:n}}):[]}stripEmptyQuery(e){let{name:t,time:r,value:n}=e;return t&&"string"==typeof n&&"query"===t.toLowerCase()&&""===n.trim()?{name:t,time:r}:e}stripEmptyQueries(e){return e.map(e=>this.stripEmptyQuery(e))}}let l=u},90078:(e,t,r)=>{"use strict";function n(e){let{facetSet:t,numericFacetSet:r,dateFacetSet:n,categoryFacetSet:i}=e;return[t,r,n,i]}function i(e,t){let{state:r,logger:i}=e,{field:a,facetId:s}=t;return s||function(e,t){var r,i,a,s,o;let u,{field:l,state:c}=e;if(!function(e){let{field:t,state:r}=e;return n(r).some(e=>e&&t in e)}(e))return l;let d=`${l}_`,f=(r=d,i=n(c).map(e=>Object.keys(e||{})).reduce((e,t)=>e.concat(t),[]),a=r,(i.map(e=>{let t=parseInt(e.split(a)[1],10);return Number.isNaN(t)?0:t}).sort().pop()??0)+1);return s=l,o=t,u=`A facet with field "${s}" already exists.
20  To avoid unexpected behaviour, configure the #id option on the facet controller.`,o.warn(u),`${d}${f}`}({field:a,state:r},i)}r.d(t,{m:()=>i})},91070:e=>{e.exports=function(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a<i;)if(t(e[a],a,e))return a;return -1}},91806:(e,t,r)=>{"use strict";var n=r(65179),i=r(61166);r(7465);var a=r(27523);r(58604);var s=r(84649);let o={start:new n.hU,end:new n.hU,endInclusive:new n.Ci,state:new n.hU({constrainTo:i.z})};new n.Sj({facetId:s.zr,field:s.ZZ,tabs:new n.Bo({options:{required:!1},values:{included:new n.v({each:new n.hU}),excluded:new n.v({each:new n.hU})}}),generateAutomaticRanges:s.LM,filterFacetCount:s.t_,injectionDepth:s.j8,numberOfValues:s.dR,currentValues:new n.v({each:new n.Bo({values:o})}),sortCriteria:new n.hU({constrainTo:a.i}),rangeAlgorithm:new n.hU({constrainTo:a.t})})},91894:(e,t,r)=>{"use strict";r.d(t,{Iv:()=>u,o7:()=>o,st:()=>c,zJ:()=>l});var n=r(69285),i=r(35521),a=r(81088),s=r(58604);let o=(0,n.VP)("fields/registerFieldsToInclude",e=>(0,s.rq)(e,s.XP)),u=(0,n.VP)("fields/fetchall/enable"),l=(0,n.VP)("fields/fetchall/disable"),c=(0,n.zD)("fields/fetchDescription",async(e,{extra:t,getState:r,rejectWithValue:n})=>{let s=r(),{accessToken:o,environment:u,organizationId:l}=s.configuration,{apiBaseUrl:c}=s.configuration.search,d=await t.apiClient.fieldDescriptions({accessToken:o,organizationId:l,url:c??(0,i.Ns)(l,u)});return(0,a.CR)(d)?n(d.error):d.success.fields})},92479:(e,t,r)=>{"use strict";r.d(t,{J:()=>c});var n=r(69285),i=r(42994),a=r(71358),s=r(88830),o=r(15389),u=r(63590),l=r(68092);let c=(0,n.vy)((0,l.O)(),e=>e.addCase(u.o,(e,t)=>({...e,...t.payload})).addCase(i.E,(e,t)=>{e.q=t.payload}).addCase(s.nA,(e,t)=>{e.q=t.payload.expression}).addCase(a.Zg.fulfilled,(e,t)=>t.payload?.query??e).addCase(o.p,(e,t)=>{e.q=t.payload.q??e.q,e.enableQuerySyntax=t.payload.enableQuerySyntax??e.enableQuerySyntax}))},92816:(e,t,r)=>{"use strict";r.d(t,{e:()=>s});var n=r(95155),i=r(12115);let a=(0,r(84348).E)((0,i.forwardRef)((e,t)=>(0,n.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24",ref:t,...e,children:[(0,n.jsx)("path",{stroke:"currentColor",strokeLinecap:"square",strokeWidth:1.5,d:"M4.5 18h-.75a.75.75 0 0 1-.75-.75v-3.453q0-.046.022-.088L4.946 10.1a.19.19 0 0 1 .168-.1h3.511c.207 0 .375.168.375.375v6.875"}),(0,n.jsx)("circle",{cx:6.75,cy:18.25,r:1.75,stroke:"currentColor",strokeWidth:1.5}),(0,n.jsx)("circle",{cx:17.25,cy:18.25,r:1.75,stroke:"currentColor",strokeWidth:1.5}),(0,n.jsx)("path",{stroke:"currentColor",strokeWidth:1.5,d:"M15.5 18H9.75a.75.75 0 0 1-.75-.75V6.75A.75.75 0 0 1 9.75 6h10.5a.75.75 0 0 1 .75.75v10.5a.75.75 0 0 1-.75.75h-1"})]}))),s=(0,i.memo)(a)},92829:function(e){e.exports=function(){"use strict";var e="month",t="quarter";return function(r,n){var i=n.prototype;i.quarter=function(e){return this.$utils().u(e)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(e-1))};var a=i.add;i.add=function(r,n){return r=Number(r),this.$utils().p(n)===t?this.add(3*r,e):a.bind(this)(r,n)};var s=i.startOf;i.startOf=function(r,n){var i=this.$utils(),a=!!i.u(n)||n;if(i.p(r)===t){var o=this.quarter()-1;return a?this.month(3*o).startOf(e).startOf("day"):this.month(3*o+2).endOf(e).endOf("day")}return s.bind(this)(r,n)}}}()},93131:(e,t,r)=>{"use strict";r.d(t,{d0:()=>c,gD:()=>u,gS:()=>o,tu:()=>l});var n=r(65179),i=r(22478),a=r(86534);function s(e){return Array.isArray(e)?e:[e]}function o(e){return null!==a._g.exec(e)||(0,a.gt)(e)}function u(e){let[t,r]=e,n=(0,a.YP)(t),i=(0,a.z2)(r);return n&&i}function l(e){let[t,r]=e,n=(0,a.s_)(r);return("nf"===t||"df"===t)&&n}function c(e,t,r){if((0,n.hX)(r))return;if((0,a.gt)(t)&&"string"==typeof r&&!(0,i.jw)(r)){let[n,i]=(0,a.wg)([t,r],!1);e[n]=i;return}let o=a._g.exec(t);
20if(o){let t=o[1],n=o[2];if(!(0,a.YP)(t))return;((e,r)=>{if(t in e){let i=e[t]??{};i[n]=[...i[n]??[],...r],e[t]=i}else e[t]={[n]:r}})(e,"nf"===t?(0,a.Ml)(s(r),"selected"):"df"===t?(0,a.nN)(s(r),"selected"):s(r))}}},93440:e=>{e.exports=function(e,t){return function(r){return null!=r&&r[e]===t&&(void 0!==t||e in Object(r))}}},93600:(e,t,r)=>{"use strict";var n,i;r.d(t,{b:()=>a,o:()=>n}),(i=n||(n={})).search="search",i.listing="listing",i.standalone="standalone",i.recommendation="recommendation";let a=Symbol.for("recommendation-internal-options")},93758:(e,t,r)=>{"use strict";r.d(t,{BE:()=>s,KM:()=>u,kr:()=>o});var n=r(65179),i=r(58604),a=r(64379);let s={state:i.r3,start:new n.lS({required:!0}),end:new n.lS({required:!0}),endInclusive:new n.Ci({required:!0}),numberOfResults:new n.lS({required:!0,min:0})},o={start:i.r3,end:i.r3,endInclusive:new n.Ci({required:!0}),state:i.r3,numberOfResults:new n.lS({required:!0,min:0})},u=e=>({facetId:a.k,selection:new n.Bo("string"==typeof e.start?{values:o}:{values:s})})},93932:(e,t,r)=>{"use strict";r.d(t,{jg:()=>i});let n=["author","language","urihash","objecttype","collection","source","permanentid"];[...n];let i=()=>({fieldsToInclude:n,fetchAllFields:!1,fieldsDescription:[]})},94110:(e,t,r)=>{"use strict";r.d(t,{LL:()=>g,ME:()=>p,UT:()=>h});var n=r(58450),i=r(99630),a=r(5121),s=r(68092),o=r(29534),u=r(27208),l=r(35521),c=r(3107),d=r(89969),f=r(87264);class p extends c.v{static fallbackPipelineName="default";getFacetState(){return(0,i.aX)((0,i.qv)(this.getState()))}getPipeline(){return this.state.pipeline||this.state.search?.response.pipeline||p.fallbackPipelineName}getSearchEventRequestPayload(){return{queryText:this.queryText,responseTime:this.responseTime,results:this.resultURIs,numberOfResults:this.numberOfResults}}getSearchUID(){let e=this.getState();return e.search?.searchResponseId||e.search?.response.searchUid||(0,o.B)().response.searchUid}getSplitTestRunName(){return this.state.search?.response.splitTestRun}getSplitTestRunVersion(){let e=!!this.getSplitTestRunName(),t=this.state.search?.response.pipeline||this.state.pipeline||p.fallbackPipelineName;return e?t:void 0}getBaseMetadata(){let e=this.getState(),t=super.getBaseMetadata(),r=(0,a.ru)(e);return r&&(t.generativeQuestionAnsweringId=r),t}getFacetMetadata(e,t){let r=this.getFacetRequest(e),n=r?.field??"";return{...this.getBaseMetadata(),facetId:e,facetField:n,facetValue:t,facetTitle:`${n}_${e}`}}getFacetClearAllMetadata(e){let t=this.getFacetRequest(e),r=t?.field??"";return{...this.getBaseMetadata(),facetId:e,facetField:r,facetTitle:`${r}_${e}`}}getFacetUpdateSortMetadata(e,t){let r=this.getFacetRequest(e),n=r?.field??"";return{...this.getBaseMetadata(),facetId:e,facetField:n,criteria:t,facetTitle:`${n}_${e}`}}getRangeBreadcrumbFacetMetadata(e,t){let r=this.getFacetRequest(e),n=r?.field??"";return{...this.getBaseMetadata(),facetId:e,facetField:n,facetRangeEnd:t.end,facetRangeEndInclusive:t.endInclusive,facetRangeStart:t.start,facetTitle:`${n}_${e}`}}getFacetRequest=e=>this.state.facetSet?.[e]?.request||this.state.categoryFacetSet?.[e]?.request||this.state.dateFacetSet?.[e]?.request||this.state.numericFacetSet?.[e]?.request||this.state.automaticFacetSet?.set[e]?.response;getResultSortMetadata(){return{...this.getBaseMetadata(),resultsSortBy:this.state.sortCriteria??(0,u.z)()}}getStaticFilterToggleMetadata(e,t){return{...this.getBaseMetadata(),staticFilterId:e,staticFilterValue:t}}getStaticFilterClearAllMetadata(e){return{...this.getBaseMetadata(),staticFilterId:e}}getUndoTriggerQueryMetadata(e){return{...this.getBaseMetadata(),undoneQuery:e}}getCategoryBreadcrumbFacetMetadata(e,t){let r=this.getFacetRequest(e),n=r?.field??"";return{...this.getBaseMetadata(),categoryFacetId:e,categoryFacetField:n,categoryFacetPath:t,categoryFacetTitle:`${n}_${e}`}}getOmniboxAnalyticsMetadata(e,t){let r=this.state.querySuggest?.[e],n=r.completions.map(e=>e.expression),i=r.partialQueries.length-1,a=r.partialQueries[i]||"",s=r.responseId;return{...this.getBaseMetadata(),suggestionRanking:n.indexOf(t),partialQuery:a,partialQueries:r.partialQueries.length>0?r.partialQueries:"",suggestions:n.length>0?n:"",querySuggestResponseId:s}}getInterfaceChangeMetadata(){return{...this.getBaseMetadata(),interfaceChangeTo:this.state.configuration.analytics.originLevel2}}getOmniboxFromLinkMetadata(e){return{...this.getBaseMetadata(),...e}}getGeneratedAnswerMetadata(){let e=this.getState(),t={};return e.generatedAnswer?.isVisible!==void 0&&(t.showGeneratedAnswer=e.generatedAnswer.isVisible),t}get resultURIs(){return this.results?.map(e=>({documentUri:e.uri,documentUriHash:e.raw.urihash}))}get results(){return this.state.search?.response.results}get queryText(){return this.state.query?.q||(0,s.O)().q}get responseTime(){return this.state.search?.duration||(0,o.B)().duration}get numberOfResults(){return this.state.search?.response.totalCountFiltered||(0,o.B)().response.totalCountFiltered}}let h=({logger:e,getState:t,analyticsClientMiddleware:r=(e,t)=>
20t,preprocessRequest:i,provider:a})=>{let s=t(),o=s.configuration.accessToken,u=s.configuration.analytics.apiBaseUrl??(0,l.bV)(s.configuration.organizationId,s.configuration.environment,"analytics"),c=s.configuration.analytics.runtimeEnvironment,d=s.configuration.analytics.enabled,p=new n.$Y({token:o,endpoint:u,runtimeEnvironment:c,preprocessRequest:(0,f.I3)(e,i),beforeSendHooks:[(0,f.ps)(e,r),(t,r)=>(e.info({...r,type:t,endpoint:u,token:o},"Analytics request"),r)]},a);return d||p.disable(),p},g=()=>{let e=d.Ay.getInstance().getHistory().reverse().find(e=>"PageView"===e.name&&e.value);return e?e.value:""}},94168:(e,t,r)=>{"use strict";r.d(t,{T:()=>n}),r(36585),r(26202),r(48364),r(49133);var n=(0,r(1721).c)({defaultClassName:"_1f03nala _1f03nal1",variantClassNames:{mobile:{"left-right":"_1f03nal2","right-left":"_1f03nal3","top-bottom":"_1f03nal4","bottom-top":"_1f03nal5"},tablet:{"left-right":"_1f03nal6","right-left":"_1f03nal7","top-bottom":"_1f03nal8","bottom-top":"_1f03nal9"}},defaultVariants:{},compoundVariants:[]})},94186:(e,t,r)=>{var n=r(84176),i=r(64627);e.exports=function(e,t){return null!=e&&i(e,t,n)}},94260:(e,t,r)=>{"use strict";function n(){return{}}r.d(t,{u:()=>n})},94816:(e,t,r)=>{var n=r(24038);e.exports=function(e,t){return!!(null==e?0:e.length)&&n(e,t,0)>-1}},94888:(e,t,r)=>{"use strict";r.d(t,{E:()=>n});let n=(e,t)=>"object"==typeof e&&0===Object.keys({...e}).length||!t||!e||!e.excluded?.includes(t)&&(!!(e.included&&(0===e.included.length||e.included.includes(t)))||!!e.excluded&&!e.included)},95448:(e,t,r)=>{"use strict";r.d(t,{Fh:()=>u,JV:()=>n,P2:()=>s,Pi:()=>l,Q_:()=>i,aP:()=>o,o7:()=>a});let n=e=>e.configuration.search.locale,i=e=>e.configuration.search.timezone,a=e=>e.configuration.accessToken,s=e=>e.configuration.organizationId,o=e=>e.configuration.environment,u=e=>e.configuration?.knowledge?.agentId,l=e=>e.configuration.knowledge.debugAgentSession},95592:(e,t,r)=>{"use strict";r.d(t,{w:()=>d.w}),r(71950),r(37472),r(59730),r(64060),r(70171),r(52103);var n=r(7465),i=r(65179),a=r(69285),s=r(47882),o=r(64379),u=r(76469),l=r(93758);let c={facetId:o.k,selection:new i.Bo({values:l.kr})};(0,a.zD)("dateFacet/executeToggleSelect",(e,{dispatch:t,extra:{validatePayload:r}})=>{r(e,c),t((0,n.xy)(e)),t((0,u.f)(e)),t((0,s.L)())}),(0,a.zD)("dateFacet/executeToggleExclude",(e,{dispatch:t,extra:{validatePayload:r}})=>{r(e,c),t((0,n.NE)(e)),t((0,u.y)(e)),t((0,s.L)())}),r(33533),r(63517),r(82487),r(914),r(46443);var d=r(53267);r(91806)},95724:(e,t,r)=>{"use strict";r.d(t,{w:()=>n});let n=e=>e},95886:(e,t,r)=>{"use strict";r.d(t,{i:()=>a});var n=r(78752),i=r(29043);let a=(0,n.Mz)(e=>e.source,e=>Object.entries(e).map(([e,t])=>`${e}@${t}`).concat(`@coveo/headless@${i.x}`))},96304:(e,t,r)=>{"use strict";r.d(t,{q:()=>o});var n=r(56294),i=r(17558),a=r(52103),s=r(28405);function o(e,t){let{dispatch:r}=e,{options:o,select:u,exclude:l,isForFieldSuggestions:c,executeFacetSearchActionCreator:d,executeFieldSuggestActionCreator:f}=t,{facetId:p}=o;r((0,i.$m)(o));let h=(0,s.H)(e,{options:o,getFacetSearch:()=>"state"in e?e.state.facetSearchSet[p]:e[n.b].facetSearchSet[p],isForFieldSuggestions:c,executeFacetSearchActionCreator:d,executeFieldSuggestActionCreator:f});return{...h,select(e){r((0,i.zP)({facetId:p,value:e})),u(e)},exclude(e){r((0,i.JK)({facetId:p,value:e})),l(e)},singleSelect(e){r((0,a.ge)(p)),r((0,i.zP)({facetId:p,value:e})),u(e)},singleExclude(e){r((0,a.ge)(p)),r((0,i.JK)({facetId:p,value:e})),l(e)},get state(){let{values:e}=h.state;return{...h.state,values:e.map(({count:e,displayValue:t,rawValue:r})=>({count:e,displayValue:t,rawValue:r}))}}}}},96708:(e,t,r)=>{"use strict";r.d(t,{I:()=>n});let n=()=>({})},98599:(e,t,r)=>{"use strict";function n(e,t){var r;let n,a,s,o;return(r=e,n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},s=RegExp(a=`(?:${Object.keys(n).join("|")})`),o=RegExp(a,"g"),e=s.test(r)?r.replace(o,e=>n[e]):r).replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(e,r,n,a)=>r?i(r,t.notMatchDelimiters):n?i(n,t.exactMatchDelimiters):a?i(a,t.correctionDelimiters):e)}function i(e,t){return t?t.open+e+t.close:e}r.d(t,{sP:()=>n}),r(65179),r(22478)},99166:(e,t,r)=>{"use strict";r.d(t,{NA:()=>j,jW:()=>R,nY:()=>P,Ze:()=>N});var n=r(65179),i=r(69285),a=r(89969),s=r(58604),o=r(22212),u=r(15810),l=r(17046),c=r(77553),d=r(67539),f=r(81088),p=r(42994),h=r(26923),g=r(71358),m=r(41252),v=r(63590),y=r(68092),b=r(53384),w=r(28806),S=r(29534),E=r(99860),I=r(99334);let A=async(e,t)=>{var r,n;let i,a,s,o=(r=e,i=r.advancedSearchQueries?.cq.trim()||"",a=Object.values(r.tabSet||{}).find(e=>e.isActive),[i,a?.expression.trim()||"",...Object.values(r.staticFilterSet||{}).map(e=>{let t=e.values.filter(e=>"selected"===e.state&&!!e.expression.trim()),r=t.map(e=>e.expression).join(" OR ");return t.length>1?`(${r})`:r})].filter(e=>!!e).join(" AND ")),u=(0,E.Zt)(e),c=(n=e,(s=n.automaticFacetSet?.set)?Object.values(s).map(e=>e.response).map(k).filter(e=>e.currentValues.length>0):void 0),f=await (0,l.E)(e,t);return(0,d.UG)({...f,...e.didYouMean&&{queryCorrection:{enabled:e.didYouMean.enableDidYouMean&&"next"===e.didYouMean.queryCorrectionMode,options:{automaticallyCorrect:e.didYouMean.automaticallyCorrectQuery?"whenNoResults":"never"}},enableDidYouMean:e.didYouMean.enableDidYouMean&&"legacy"===e.didYouMean.queryCorrectionMode},...o&&{cq:o},...u.length&&{facets:u},...e.pagination&&{numberOfResults:e.pagination?e.pagination.firstResult+e.pagination.numberOfResults>I.t?I.t-e.pagination.firstResult:e.pagination.numberOfResults:void 0,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:c}},...e.generatedAnswer&&{pipelineRuleParameters:{mlGenerativeQuestionAnswering:{responseFormat:e.generatedAnswer.responseFormat,citationsFieldToInclude:e.generatedAnswer.fieldsToIncludeInCitations}}}})};function k(e){let{field:t,label:r,values:n}=e;return{field:t,label:r,currentValues:n.filter(e=>"selected"===e.state)}}class C{config;onUpdateQueryForCorrection;constructor(e,t=e=>{this.dispatch((0,v.o)({q:e}))}){this.config=e,this.onUpdateQueryForCorrection=t}async fetchFromAPI({mappings:e,request:t},r){let n=Date.now(),i=(0,d._L)(await this.extra.apiClient.search(t,r),e);return{response:i,duration:Date.now()-n,queryExecuted:this.getState().query?.q||"",requestExecuted:t}}async process(e){return this.processQueryErrorOrContinue(e)??await this.processQueryCorrectionsOrContinue(e)??await this.processQueryTriggersOrContinue(e)??this.processSuccessResponse(e)}processQueryErrorOrContinue(e){return(0,f.CR)(e.response)?(this.dispatch((0,c.$)(e.response.error)),this.rejectWithValue(e.response.error)):null}async processQueryCorrectionsOrContinue(e){let t=this.getState(),r=this.getSuccessResponse(e);if(!r||!t.didYouMean)return null;let{enableDidYouMean:i,automaticallyCorrectQuery:a}=t.didYouMean,{results:s,queryCorrections:o,queryCorrection:u}=r;if(!i||!a)return null;let l=0===s.length&&o&&0!==o.length,c=!(0,n.hX)(u)&&!(0,n.hX)(u.correctedQuery);if(!l&&!c)return null;let d=l?await this.processLegacyDidYouMeanAutoCorrection(e):this.processModernDidYouMeanAutoCorrection(e);return this.dispatch((0,g.P9)((0,m.q)(this.getState()))),d}async processLegacyDidYouMeanAutoCorrection(e){let t=this.getCurrentQuery(),r=this.getSuccessResponse(e);if(!r.queryCorrections)return null;let{correctedQuery:n}=r.queryCorrections[0],i=await this.automaticallyRetryQueryWithCorrection(n);return(0,f.CR)(i.response)?(this.dispatch((0,c.$)(i.response.error)),this.rejectWithValue(i.response.error)):(this.logOriginalAnalyticsQueryBeforeAutoCorrection(e),this.dispatch((0,g.P9)((0,m.q)(this.getState()))),{...i,response:{...i.response.success,queryCorrections:r.queryCorrections},automaticallyCorrected:!0,originalQuery:t,analyticsAction:(0,h.VB)()})}processModernDidYouMeanAutoCorrection(e){let t=this.getSuccessResponse(e),{correctedQuery:r,originalQuery:n}=t.queryCorrection;return this.onUpdateQueryForCorrection(r),{...e,response:{...t},queryExecuted:r,automaticallyCorrected:!0,originalQuery:n,analyticsAction:(0,h.VB)()}}logOriginalAnalyticsQueryBeforeAutoCorrection(e){let t=this.getState(),r=this.getSuccessResponse(e);this.analyticsAction?.()(this.dispatch,()=>this.getStateAfterResponse(e.queryExecuted,e.duration,t,r),this.extra)}async processQueryTriggersOrContinue(e){let t=this.getSuccessResponse(e);if(!t)return null;let r=t.triggers.find(e=>"query"===e.type)?.content||"";if(!r)return null;if(this.getState().triggers?.queryModification.queryToIgnore===r)return this.dispatch((0,w.O)("")),null;this.analyticsAction&&await this.dispatch(this.analyticsAction);let n=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(r);return(0,f.CR)(i.response)?(this.dispatch((0,c.$)(i.response.error)),this.rejectWithValue(i.response.error)):(this.dispatch((0,g.P9)((0,m.q)(this.getState()))),{...i,response:{...i.response.success},automaticallyCorrected:!1,originalQuery:n,analyticsAction:(0,b.bH)()})}getStateAfterResponse(e,t,r,n){return{...r,query:{q:e,enableQuerySyntax:r.query?.enableQuerySyntax??(0,y.O)().enableQuerySyntax},search:{...(0,S.B)(),duration:t,response:n,results:n.results}}}processSuccessResponse(e){return this.dispatch((0,g.P9)((0,m.q)(this.getState()))),{...e,response:this.getSuccessResponse(e),automaticallyCorrected:!1,originalQuery:this.getCurrentQuery(),analyticsAction:this.analyticsAction}}getSuccessResponse(e){return(0,f.ny)(e.response)?e.response.success:null}async automaticallyRetryQueryWithCorrection(e){this.onUpdateQueryForCorrection(e);let t=await this.fetchFromAPI(await A(this.getState()),{origin:"mainSearch"});return this.dispatch((0,p.E)(e)),t}async automaticallyRetryQueryWithTriggerModification(e){return this.dispatch((0,w.f)({newQuery:e,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(e),await this.fetchFromAPI(await A(this.getState()),{origin:"mainSearch"})}getCurrentQuery(){let e=this.getState();return e.query?.q!==void 0?e.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}}(0,i.zD)("search/executeSearch",async(e,t)=>{let r=t.getState();return await j(r,t,e)}),(0,i.zD)("search/fetchPage",async(e,t)=>{let r=t.getState();return await N(r,t,e)}),(0,i.zD)("search/fetchMoreResults",async(e,t)=>{let r=t.getState();return await P(t,r)}),(0,i.zD)("search/fetchFacetValues",async(e,t)=>{let r=t.getState();return await q(t,e,r)}
20),(0,i.zD)("search/fetchInstantResults",async(e,t)=>R(e,t));let T=async(e,t)=>{let r=await A(e,t);return r.request={...r.request,firstResult:(e.pagination?.firstResult??0)+(e.search?.results.length??0)},r},_=async(e,t,r)=>{let n=await (0,l.E)(e);return(0,d.UG)({...n,...e.didYouMean&&{enableDidYouMean:e.didYouMean.enableDidYouMean},numberOfResults:r,q:t})},O=async(e,t)=>{let r=await A(e,t);return r.request.numberOfResults=0,r},x=e=>{e.configuration.analytics.enabled&&a.Ay.getInstance().addElement({name:"Query",...e.query?.q&&{value:e.query.q},time:JSON.stringify(new Date)})};async function R(e,t){(0,s.rq)(e,{id:s.r3,q:s.r3,maxResultsPerQuery:new n.lS({required:!0,min:1}),cacheTimeout:new n.lS});let{q:r,maxResultsPerQuery:i}=e,a=t.getState(),l=new C({...t,analyticsAction:(0,o.yq)()},r=>{t.dispatch((0,u.LU)({q:r,id:e.id}))}),c=await _(a,r,i),d=await l.fetchFromAPI(c,{origin:"instantResults",disableAbortWarning:!0}),f=await l.process(d);return"response"in f?{results:f.response.results,searchUid:f.response.searchUid,analyticsAction:f.analyticsAction,totalCountFiltered:f.response.totalCountFiltered,duration:f.duration}:f}async function N(e,t,r){x(e);let{analyticsClientMiddleware:n,preprocessRequest:i,logger:a}=t.extra,{description:s}=await r.prepare({getState:()=>t.getState(),analyticsClientMiddleware:n,preprocessRequest:i,logger:a}),o=new C({...t,analyticsAction:r}),u=await A(e,s),l=await o.fetchFromAPI(u,{origin:"mainSearch"});return await o.process(l)}async function P(e,t){let{analyticsClientMiddleware:r,preprocessRequest:n,logger:i}=e.extra,{description:a}=await (0,c.w)().prepare({getState:()=>e.getState(),analyticsClientMiddleware:r,preprocessRequest:n,logger:i}),s=new C({...e,analyticsAction:(0,c.w)()}),o=await T(t,a),u=await s.fetchFromAPI(o,{origin:"mainSearch"});return await s.process(u)}async function q(e,t,r){let{analyticsClientMiddleware:n,preprocessRequest:i,logger:a}=e.extra,{description:s}=await t.prepare({getState:()=>e.getState(),analyticsClientMiddleware:n,preprocessRequest:i,logger:a}),o=new C({...e,analyticsAction:t}),u=await O(r,s),l=await o.fetchFromAPI(u,{origin:"facetValues"});return await o.process(l)}async function j(e,t,r){x(e);let{analyticsClientMiddleware:n,preprocessRequest:i,logger:a}=t.extra,{description:s}=await r.prepare({getState:()=>t.getState(),analyticsClientMiddleware:n,preprocessRequest:i,logger:a}),o=await A(e,s),u=new C({...t,analyticsAction:r}),l=await u.fetchFromAPI(o,{origin:"mainSearch"});return await u.process(l)}},99334:(e,t,r)=>{"use strict";r.d(t,{I:()=>n,t:()=>i});let n=1,i=5e3},99344:function(e){e.exports=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/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,s={},o=function(e){return(e*=1)+(e>68?1900:2e3)},u=function(e){return function(t){this[e]=+t}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e||"Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),r=60*t[1]+(+t[2]||0);return 0===r?0:"+"===t[0]?-r:r}(e)}],c=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var r,n=s.meridiem;if(n){for(var i=1;i<=24;i+=1)if(e.indexOf(n(i,0,t))>-1){r=i>12;break}}else r=e===(t?"pm":"PM");return r},f={A:[a,function(e){this.afternoon=d(e,!1)}],a:[a,function(e){this.afternoon=d(e,!0)}],Q:[r,function(e){this.month=3*(e-1)+1}],S:[r,function(e){this.milliseconds=100*e}],SS:[n,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,u("seconds")],ss:[i,u("seconds")],m:[i,u("minutes")],mm:[i,u("minutes")],H:[i,u("hours")],h:[i,u("hours")],HH:[i,u("hours")],hh:[i,u("hours")],D:[i,u("day")],DD:[n,u("day")],Do:[a,function(e){var t=s.ordinal,r=e.match(/\d+/);if(this.day=r[0],t)for(var n=1;n<=31;n+=1)t(n).replace(/\[|\]/g,"")===e&&(this.day=n)}],w:[i,u("week")],ww:[n,u("week")],M:[i,u("month")],MM:[n,u("month")],MMM:[a,function(e){var t=c("months"),r=(c("monthsShort")||t.map(function(e){return e.slice(0,3)})).indexOf(e)+1;if(r<1)throw Error();this.month=r%12||r}],MMMM:[a,function(e){var t=c("months").indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,u("year")],YY:[n,function(e){this.year=o(e)}],YYYY:[/\d{4}/,u("year")],Z:l,ZZ:l};return function(r,n,i){i.p.customParseFormat=!0,r&&r.parseTwoDigitYear&&(o=r.parseTwoDigitYear);var a=n.prototype,u=a.parse;a.parse=function(r){var n=r.date,a=r.utc,o=r.args;this.$u=a;var l=o[1];if("string"==typeof l){var c=!0===o[2],d=!0===o[3],p=o[2];d&&(p=o[2]),s=this.$locale(),!c&&p&&(s=i.Ls[p]),this.$d=function(r,n,i,a){try{if(["x","X"].indexOf(n)>-1)return new Date(("X"===n?1e3:1)*r);var o=(function(r){var n,i;n=r,i=s&&s.formats;for(var a=(r=n.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(t,r,n){var a=n&&n.toUpperCase();return r||i[n]||e[n]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(e,t,r){return t||r.slice(1)})})).match(t),o=a.length,u=0;u<o;u+=1){var l=a[u],c=f[l],d=c&&c[0],p=c&&c[1];a[u]=p?{regex:d,parser:p}:l.replace(/^\[|\]$/g,"")}return function(e){for(var t={},r=0,n=0;r<o;r+=1){var i=a[r];if("string"==typeof i)n+=i.length;else{var s=i.regex,u=i.parser,l=e.slice(n),c=s.exec(l)[0];u.call(t,c),e=e.replace(c,"")}}return function(e){var t=e.afternoon;if(void 0!==t){var r=e.hours;t?r<12&&(e.hours+=12):12===r&&(e.hours=0),delete e.afternoon}}(t),t}})(n)(r),u=o.year,l=o.month,c=o.day,d=o.hours,p=o.minutes,h=o.seconds,g=o.milliseconds,m=o.zone,v=o.week,y=new Date,b=c||(u||l?1:y.getDate()),w=u||y.getFullYear(),S=0;u&&!l||(S=l>0?l-1:y.getMonth());var E,I=d||0,A=p||0,k=h||0,C=g||0;return m?new Date(Date.UTC(w,S,b,I,A,k,C+60*m.offset*1e3)):i?new Date(Date.UTC(w,S,b,I,A,k,C)):(E=new Date(w,S,b,I,A,k,C),v&&(E=a(E).week(v).toDate()),E)}catch(e){return new Date("")}}(n,l,a,i),this.init(),p&&!0!==p&&(this.$L=this.locale(p).$L),(c||d)&&n!=this.format(l)&&(this.$d=new Date("")),s={}}else if(l instanceof Array)for(var h=l.length,g=1;g<=h;g+=1){o[1]=l[g-1];var m=i.apply(this,o);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}g===h&&(this.$d=new Date(""))}else u.call(this,r)}}}()},99630:(e,t,r)=>{"use strict";r.d(t,{RG:()=>c,aX:()=>f,iX:()=>l,qv:()=>d});var n=r(45989),i=r(59626),a=r(4477),s=r(28222),o=r(79454),u=r(71769);let l=(e,t)=>
20{let r=k(t,e),n=r?r.field:"",i=A(n,e);return{facetId:e,facetField:n,facetTitle:i}};function c(e,t){let{facetId:r,facetValue:n}=e,i=l(r,t),a=C(t,r);return{...i,facetValue:"hierarchical"===a?w(t,r):n}}function d(e){return{facetSet:e.facetSet??(0,u.v)(),categoryFacetSet:e.categoryFacetSet??(0,a.v)(),dateFacetSet:e.dateFacetSet??(0,s.V)(),numericFacetSet:e.numericFacetSet??(0,o._)(),automaticFacetSet:e.automaticFacetSet??(0,n.S)()}}let f=e=>{let t=[];return g(e).forEach((r,n)=>{let a=C(e,r.facetId),s=I(r,n+1);if(h(r)){if(!(0,i.xv)(e,r.facetId).length)return;t.push({...s,...S(e,r.facetId),facetType:a,state:"selected"});return}r.currentValues.forEach((e,n)=>{if("idle"===e.state)return;let i=v(e,n+1,a),o=p(r)?b(e):y(e);t.push({...s,...i,...o})})}),m(e).forEach((e,r)=>{let n=E(e,r+1);e.values.forEach((e,r)=>{if("idle"===e.state)return;let i=v(e,r+1,"specific"),a=b(e);t.push({...n,...i,...a})})}),t},p=e=>"specific"===e.type,h=e=>"hierarchical"===e.type,g=e=>[...Object.values(e.facetSet),...Object.values(e.categoryFacetSet),...Object.values(e.dateFacetSet),...Object.values(e.numericFacetSet)].map(e=>e.request),m=e=>[...Object.values(e.automaticFacetSet.set)].map(e=>e.response),v=(e,t,r)=>({state:e.state,valuePosition:t,facetType:r}),y=e=>({displayValue:`${e.start}..${e.end}`,value:`${e.start}..${e.end}`,start:e.start,end:e.end,endInclusive:e.endInclusive}),b=e=>({displayValue:e.value,value:e.value}),w=(e,t)=>(0,i.xv)(e,t).map(e=>e.value).join(";"),S=(e,t)=>{let r=w(e,t);return{value:r,valuePosition:1,displayValue:r}},E=(e,t)=>({title:A(e.field,e.field),field:e.field,id:e.field,facetPosition:t}),I=(e,t)=>({title:A(e.field,e.facetId),field:e.field,id:e.facetId,facetPosition:t}),A=(e,t)=>`${e}_${t}`,k=(e,t)=>e.facetSet[t]?.request||e.categoryFacetSet[t]?.request||e.dateFacetSet[t]?.request||e.numericFacetSet[t]?.request||e.automaticFacetSet.set[t]?.response,C=(e,t)=>{let r=k(e,t);return r?r.type:"specific"}},99860:(e,t,r)=>{"use strict";r.d(t,{C1:()=>s,Zt:()=>o,nR:()=>i});var n=r(42548);function i(e,t){let r={};e.forEach(e=>{r[e.facetId]=e});let n=[];return t.forEach(e=>{e in r&&(n.push(r[e]),delete r[e])}),[...n,...Object.values(r)]}function a(e){return(0,n.g)(e).map(e=>{let t=e.currentValues.some(({state:e})=>"idle"!==e);return e.generateAutomaticRanges&&!t?{...e,currentValues:[]}:e})}let s={alphanumericDescending:{type:"alphanumeric",order:"descending"},alphanumericNaturalDescending:{type:"alphanumericNatural",order:"descending"}};function o(e){var t;return i([...(t=e.facetSet??{},(0,n.g)(t).map(e=>{let t=s[e.sortCriteria];return t?{...e,sortCriteria:t}:e})),...a(e.numericFacetSet??{}),...a(e.dateFacetSet??{}),...(0,n.g)(e.categoryFacetSet??{})].filter(({facetId:t})=>e.facetOptions?.facets[t]?.enabled??!0),e.facetOrder??[])}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.