@coveo/headless 3.19.0-pre.25495db2ab → 3.19.0-pre.afe9f4e635
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/case-assist/headless.esm.js +1 -1
- package/dist/browser/case-assist/headless.js +1 -1
- package/dist/browser/commerce/headless.esm.js +1 -1
- package/dist/browser/commerce/headless.js +1 -1
- package/dist/browser/headless.esm.js +1 -1
- package/dist/browser/headless.js +1 -1
- package/dist/browser/insight/headless.esm.js +1 -1
- package/dist/browser/insight/headless.js +1 -1
- package/dist/browser/recommendation/headless.esm.js +1 -1
- package/dist/browser/recommendation/headless.js +1 -1
- package/dist/browser/ssr/headless.esm.js +1 -1
- package/dist/browser/ssr/headless.js +1 -1
- package/dist/browser/ssr-commerce/headless.esm.js +1 -1
- package/dist/browser/ssr-commerce/headless.js +1 -1
- package/dist/case-assist/headless.cjs +1 -1
- package/dist/case-assist/headless.esm.js +1 -1
- package/dist/commerce/headless.cjs +1 -1
- package/dist/commerce/headless.esm.js +1 -1
- package/dist/headless.cjs +1 -1
- package/dist/headless.esm.js +1 -1
- package/dist/insight/headless.cjs +1 -1
- package/dist/insight/headless.esm.js +1 -1
- package/dist/quantic/case-assist/headless.js +1 -1
- package/dist/quantic/commerce/headless.js +1 -1
- package/dist/quantic/headless.js +1 -1
- package/dist/quantic/insight/headless.js +1 -1
- package/dist/quantic/recommendation/headless.js +1 -1
- package/dist/recommendation/headless.cjs +1 -1
- package/dist/recommendation/headless.esm.js +1 -1
- package/dist/ssr/headless.cjs +1 -1
- package/dist/ssr/headless.esm.js +1 -1
- package/dist/ssr-commerce/headless.cjs +1 -1
- package/dist/ssr-commerce/headless.esm.js +1 -1
- package/package.json +1 -1
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
var uR=Object.create;var gi=Object.defineProperty;var lR=Object.getOwnPropertyDescriptor;var dR=Object.getOwnPropertyNames;var mR=Object.getPrototypeOf,pR=Object.prototype.hasOwnProperty;var fR=(e,t,r)=>t in e?gi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ce=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Im=(e,t)=>{for(var r in t)gi(e,r,{get:t[r],enumerable:!0})},gR=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of dR(t))!pR.call(e,n)&&n!==r&&gi(e,n,{get:()=>t[n],enumerable:!(o=lR(t,n))||o.enumerable});return e};var xt=(e,t,r)=>(r=e!=null?uR(mR(e)):{},gR(t||!e||!e.__esModule?gi(r,"default",{value:e,enumerable:!0}):r,e));var be=(e,t,r)=>fR(e,typeof t!="symbol"?t+"":t,r);var Np=Ce(ya=>{"use strict";var Mi=ya&&ya.__assign||function(){return Mi=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++){t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},Mi.apply(this,arguments)};Object.defineProperty(ya,"__esModule",{value:!0});var FF={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function PF(e){var t=Mi(Mi({},FF),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}ya.getSanitizedOptions=PF});var Mp=Ce($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});function AF(e){var t=Math.random()*e;return Math.round(t)}$u.fullJitter=AF});var Lp=Ce(zu=>{"use strict";Object.defineProperty(zu,"__esModule",{value:!0});function vF(e){return e}zu.noJitter=vF});var Qp=Ce(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});var bF=Mp(),IF=Lp();function wF(e){switch(e.jitter){case"full":return bF.fullJitter;case"none":default:return IF.noJitter}}Wu.JitterFactory=wF});var Gu=Ce(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});var EF=Qp(),TF=function(){function e(t){this.options=t,this.attempt=0}return e.prototype.apply=function(){var t=this;return new Promise(function(r){return setTimeout(r,t.jitteredDelay)})},e.prototype.setAttemptNumber=function(t){this.attempt=t},Object.defineProperty(e.prototype,"jitteredDelay",{get:function(){var t=EF.JitterFactory(this.options);return t(this.delay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"delay",{get:function(){var t=this.options.startingDelay,r=this.options.timeMultiple,o=this.numOfDelayedAttempts,n=t*Math.pow(r,o);return Math.min(n,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();Ku.Delay=TF});var Up=Ce(Kt=>{"use strict";var OF=Kt&&Kt.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var a in n)n.hasOwnProperty(a)&&(o[a]=n[a])},e(t,r)};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),qF=Kt&&Kt.__awaiter||function(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function c(l){try{s(o.next(l))}catch(d){i(d)}}function u(l){try{s(o.throw(l))}catch(d){i(d)}}function s(l){l.done?a(l.value):n(l.value).then(c,u)}s((o=o.apply(e,t||[])).next())})},kF=Kt&&Kt.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,i;return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(s){return function(l){return u([s,l])}}function u(s){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=s[0]&2?n.return:s[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;switch(n=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,n=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){r.label=s[1];break}if(s[0]===6&&r.label<a[1]){r.label=a[1],a=s;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(s);break}a[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(l){s=[6,l],n=0}finally{o=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};Object.defineProperty(Kt,"__esModule",{value:!0});var VF=Gu(),DF=function(e){OF(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return qF(this,void 0,void 0,function(){return kF(this,function(r){return[2,this.isFirstAttempt?!0:e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(VF.Delay);Kt.SkipFirstDelay=DF});var Bp=Ce(ha=>{"use strict";var NF=ha&&ha.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var a in n)n.hasOwnProperty(a)&&(o[a]=n[a])},e(t,r)};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}();Object.defineProperty(ha,"__esModule",{value:!0});var MF=Gu(),LF=function(e){NF(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(MF.Delay);ha.AlwaysDelay=LF});var jp=Ce(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});var QF=Up(),UF=Bp();function BF(e,t){var r=jF(e);return r.setAttemptNumber(t),r}Hu.DelayFactory=BF;function jF(e){return e.delayFirstAttempt?new UF.AlwaysDelay(e):new QF.SkipFirstDelay(e)}});var _p=Ce(oo=>{"use strict";var Yu=oo&&oo.__awaiter||function(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function c(l){try{s(o.next(l))}catch(d){i(d)}}function u(l){try{s(o.throw(l))}catch(d){i(d)}}function s(l){l.done?a(l.value):n(l.value).then(c,u)}s((o=o.apply(e,t||[])).next())})},Ju=oo&&oo.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,i;return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(s){return function(l){return u([s,l])}}function u(s){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=s[0]&2?n.return:s[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;switch(n=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,n=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){r.label=s[1];break}if(s[0]===6&&r.label<a[1]){r.label=a[1],a=s;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(s);break}a[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(l){s=[6,l],n=0}finally{o=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};Object.defineProperty(oo,"__esModule",{value:!0});var _F=Np(),$F=jp();function zF(e,t){return t===void 0&&(t={}),Yu(this,void 0,void 0,function(){var r,o;return Ju(this,function(n){switch(n.label){case 0:return r=_F.getSanitizedOptions(t),o=new WF(e,r),[4,o.execute()];case 1:return[2,n.sent()]}})})}oo.backOff=zF;var WF=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return Yu(this,void 0,void 0,function(){var t,r;return Ju(this,function(o){switch(o.label){case 0:if(this.attemptLimitReached)return[3,7];o.label=1;case 1:return o.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return o.sent(),[4,this.request()];case 3:return[2,o.sent()];case 4:return t=o.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(r=o.sent(),!r||this.attemptLimitReached)throw t;return[3,6];case 6:return[3,0];case 7:throw new Error("Something went wrong.")}})})},Object.defineProperty(e.prototype,"attemptLimitReached",{get:function(){return this.attemptNumber>=this.options.numOfAttempts},enumerable:!0,configurable:!0}),e.prototype.applyDelay=function(){return Yu(this,void 0,void 0,function(){var t;return Ju(this,function(r){switch(r.label){case 0:return t=$F.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var Pc=Ce((Ll,Ql)=>{"use strict";(function(e,t){typeof Ll=="object"&&typeof Ql<"u"?Ql.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(Ll,function(){"use strict";var e=1e3,t=6e4,r=36e5,o="millisecond",n="second",a="minute",i="hour",c="day",u="week",s="month",l="quarter",d="year",p="date",m="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(V){var k=["th","st","nd","rd"],w=V%100;return"["+V+(k[(w-20)%10]||k[w]||k[0])+"]"}},x=function(V,k,w){var M=String(V);return!M||M.length>=k?V:""+Array(k+1-M.length).join(w)+V},y={s:x,z:function(V){var k=-V.utcOffset(),w=Math.abs(k),M=Math.floor(w/60),N=w%60;return(k<=0?"+":"-")+x(M,2,"0")+":"+x(N,2,"0")},m:function V(k,w){if(k.date()<w.date())return-V(w,k);var M=12*(w.year()-k.year())+(w.month()-k.month()),N=k.clone().add(M,s),j=w-N<0,U=k.clone().add(M+(j?-1:1),s);return+(-(M+(w-N)/(j?N-U:U-N))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:s,y:d,w:u,d:c,D:p,h:i,m:a,s:n,ms:o,Q:l}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},C="en",P={};P[C]=S;var O="$isDayjsObject",A=function(V){return V instanceof q||!(!V||!V[O])},F=function V(k,w,M){var N;if(!k)return C;if(typeof k=="string"){var j=k.toLowerCase();P[j]&&(N=j),w&&(P[j]=w,N=j);var U=k.split("-");if(!N&&U.length>1)return V(U[0])}else{var W=k.name;P[W]=k,N=W}return!M&&N&&(C=N),N||!M&&C},E=function(V,k){if(A(V))return V.clone();var w=typeof k=="object"?k:{};return w.date=V,w.args=arguments,new q(w)},I=y;I.l=F,I.i=A,I.w=function(V,k){return E(V,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var q=function(){function V(w){this.$L=F(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[O]=!0}var k=V.prototype;return k.parse=function(w){this.$d=function(M){var N=M.date,j=M.utc;if(N===null)return new Date(NaN);if(I.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var U=N.match(f);if(U){var W=U[2]-1||0,Y=(U[7]||"0").substring(0,3);return j?new Date(Date.UTC(U[1],W,U[3]||1,U[4]||0,U[5]||0,U[6]||0,Y)):new Date(U[1],W,U[3]||1,U[4]||0,U[5]||0,U[6]||0,Y)}}return new Date(N)}(w),this.init()},k.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},k.$utils=function(){return I},k.isValid=function(){return this.$d.toString()!==m},k.isSame=function(w,M){var N=E(w);return this.startOf(M)<=N&&N<=this.endOf(M)},k.isAfter=function(w,M){return E(w)<this.startOf(M)},k.isBefore=function(w,M){return this.endOf(M)<E(w)},k.$g=function(w,M,N){return I.u(w)?this[M]:this.set(N,w)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(w,M){var N=this,j=!!I.u(M)||M,U=I.p(w),W=function(Ct,Se){var Ye=I.w(N.$u?Date.UTC(N.$y,Se,Ct):new Date(N.$y,Se,Ct),N);return j?Ye:Ye.endOf(c)},Y=function(Ct,Se){return I.w(N.toDate()[Ct].apply(N.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(Se)),N)},J=this.$W,Z=this.$M,ee=this.$D,oe="set"+(this.$u?"UTC":"");switch(U){case d:return j?W(1,0):W(31,11);case s:return j?W(1,Z):W(0,Z+1);case u:var he=this.$locale().weekStart||0,Kr=(J<he?J+7:J)-he;return W(j?ee-Kr:ee+(6-Kr),Z);case c:case p:return Y(oe+"Hours",0);case i:return Y(oe+"Minutes",1);case a:return Y(oe+"Seconds",2);case n:return Y(oe+"Milliseconds",3);default:return this.clone()}},k.endOf=function(w){return this.startOf(w,!1)},k.$set=function(w,M){var N,j=I.p(w),U="set"+(this.$u?"UTC":""),W=(N={},N[c]=U+"Date",N[p]=U+"Date",N[s]=U+"Month",N[d]=U+"FullYear",N[i]=U+"Hours",N[a]=U+"Minutes",N[n]=U+"Seconds",N[o]=U+"Milliseconds",N)[j],Y=j===c?this.$D+(M-this.$W):M;if(j===s||j===d){var J=this.clone().set(p,1);J.$d[W](Y),J.init(),this.$d=J.set(p,Math.min(this.$D,J.daysInMonth())).$d}else W&&this.$d[W](Y);return this.init(),this},k.set=function(w,M){return this.clone().$set(w,M)},k.get=function(w){return this[I.p(w)]()},k.add=function(w,M){var N,j=this;w=Number(w);var U=I.p(M),W=function(Z){var ee=E(j);return I.w(ee.date(ee.date()+Math.round(Z*w)),j)};if(U===s)return this.set(s,this.$M+w);if(U===d)return this.set(d,this.$y+w);if(U===c)return W(1);if(U===u)return W(7);var Y=(N={},N[a]=t,N[i]=r,N[n]=e,N)[U]||1,J=this.$d.getTime()+w*Y;return I.w(J,this)},k.subtract=function(w,M){return this.add(-1*w,M)},k.format=function(w){var M=this,N=this.$locale();if(!this.isValid())return N.invalidDate||m;var j=w||"YYYY-MM-DDTHH:mm:ssZ",U=I.z(this),W=this.$H,Y=this.$m,J=this.$M,Z=N.weekdays,ee=N.months,oe=N.meridiem,he=function(Se,Ye,$t,ar){return Se&&(Se[Ye]||Se(M,j))||$t[Ye].slice(0,ar)},Kr=function(Se){return I.s(W%12||12,Se,"0")},Ct=oe||function(Se,Ye,$t){var ar=Se<12?"AM":"PM";return $t?ar.toLowerCase():ar};return j.replace(g,function(Se,Ye){return Ye||function($t){switch($t){case"YY":return String(M.$y).slice(-2);case"YYYY":return I.s(M.$y,4,"0");case"M":return J+1;case"MM":return I.s(J+1,2,"0");case"MMM":return he(N.monthsShort,J,ee,3);case"MMMM":return he(ee,J);case"D":return M.$D;case"DD":return I.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return he(N.weekdaysMin,M.$W,Z,2);case"ddd":return he(N.weekdaysShort,M.$W,Z,3);case"dddd":return Z[M.$W];case"H":return String(W);case"HH":return I.s(W,2,"0");case"h":return Kr(1);case"hh":return Kr(2);case"a":return Ct(W,Y,!0);case"A":return Ct(W,Y,!1);case"m":return String(Y);case"mm":return I.s(Y,2,"0");case"s":return String(M.$s);case"ss":return I.s(M.$s,2,"0");case"SSS":return I.s(M.$ms,3,"0");case"Z":return U}return null}(Se)||U.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(w,M,N){var j,U=this,W=I.p(M),Y=E(w),J=(Y.utcOffset()-this.utcOffset())*t,Z=this-Y,ee=function(){return I.m(U,Y)};switch(W){case d:j=ee()/12;break;case s:j=ee();break;case l:j=ee()/3;break;case u:j=(Z-J)/6048e5;break;case c:j=(Z-J)/864e5;break;case i:j=Z/r;break;case a:j=Z/t;break;case n:j=Z/e;break;default:j=Z}return N?j:I.a(j)},k.daysInMonth=function(){return this.endOf(s).$D},k.$locale=function(){return P[this.$L]},k.locale=function(w,M){if(!w)return this.$L;var N=this.clone(),j=F(w,M,!0);return j&&(N.$L=j),N},k.clone=function(){return I.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},V}(),Q=q.prototype;return E.prototype=Q,[["$ms",o],["$s",n],["$m",a],["$H",i],["$W",c],["$M",s],["$y",d],["$D",p]].forEach(function(V){Q[V[1]]=function(k){return this.$g(k,V[0],V[1])}}),E.extend=function(V,k){return V.$i||(V(k,q,E),V.$i=!0),E},E.locale=F,E.isDayjs=A,E.unix=function(V){return E(1e3*V)},E.en=P[C],E.Ls=P,E.p={},E})});var Mg=Ce((Ul,Bl)=>{"use strict";(function(e,t){typeof Ul=="object"&&typeof Bl<"u"?Bl.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_quarterOfYear=t()})(Ul,function(){"use strict";var e="month",t="quarter";return function(r,o){var n=o.prototype;n.quarter=function(c){return this.$utils().u(c)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(c-1))};var a=n.add;n.add=function(c,u){return c=Number(c),this.$utils().p(u)===t?this.add(3*c,e):a.bind(this)(c,u)};var i=n.startOf;n.startOf=function(c,u){var s=this.$utils(),l=!!s.u(u)||u;if(s.p(c)===t){var d=this.quarter()-1;return l?this.month(3*d).startOf(e).startOf("day"):this.month(3*d+2).endOf(e).endOf("day")}return i.bind(this)(c,u)}}})});var Lg=Ce((jl,_l)=>{"use strict";(function(e,t){typeof jl=="object"&&typeof _l<"u"?_l.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=t()})(jl,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/,o=/\d\d/,n=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,i={},c=function(f){return(f=+f)+(f>68?1900:2e3)},u=function(f){return function(g){this[f]=+g}},s=[/[+-]\d\d:?(\d\d)?|Z/,function(f){(this.zone||(this.zone={})).offset=function(g){if(!g||g==="Z")return 0;var S=g.match(/([+-]|\d\d)/g),x=60*S[1]+(+S[2]||0);return x===0?0:S[0]==="+"?-x:x}(f)}],l=function(f){var g=i[f];return g&&(g.indexOf?g:g.s.concat(g.f))},d=function(f,g){var S,x=i.meridiem;if(x){for(var y=1;y<=24;y+=1)if(f.indexOf(x(y,0,g))>-1){S=y>12;break}}else S=f===(g?"pm":"PM");return S},p={A:[a,function(f){this.afternoon=d(f,!1)}],a:[a,function(f){this.afternoon=d(f,!0)}],Q:[r,function(f){this.month=3*(f-1)+1}],S:[r,function(f){this.milliseconds=100*+f}],SS:[o,function(f){this.milliseconds=10*+f}],SSS:[/\d{3}/,function(f){this.milliseconds=+f}],s:[n,u("seconds")],ss:[n,u("seconds")],m:[n,u("minutes")],mm:[n,u("minutes")],H:[n,u("hours")],h:[n,u("hours")],HH:[n,u("hours")],hh:[n,u("hours")],D:[n,u("day")],DD:[o,u("day")],Do:[a,function(f){var g=i.ordinal,S=f.match(/\d+/);if(this.day=S[0],g)for(var x=1;x<=31;x+=1)g(x).replace(/\[|\]/g,"")===f&&(this.day=x)}],w:[n,u("week")],ww:[o,u("week")],M:[n,u("month")],MM:[o,u("month")],MMM:[a,function(f){var g=l("months"),S=(l("monthsShort")||g.map(function(x){return x.slice(0,3)})).indexOf(f)+1;if(S<1)throw new Error;this.month=S%12||S}],MMMM:[a,function(f){var g=l("months").indexOf(f)+1;if(g<1)throw new Error;this.month=g%12||g}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(f){this.year=c(f)}],YYYY:[/\d{4}/,u("year")],Z:s,ZZ:s};function m(f){var g,S;g=f,S=i&&i.formats;for(var x=(f=g.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(E,I,q){var Q=q&&q.toUpperCase();return I||S[q]||e[q]||S[Q].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(V,k,w){return k||w.slice(1)})})).match(t),y=x.length,C=0;C<y;C+=1){var P=x[C],O=p[P],A=O&&O[0],F=O&&O[1];x[C]=F?{regex:A,parser:F}:P.replace(/^\[|\]$/g,"")}return function(E){for(var I={},q=0,Q=0;q<y;q+=1){var V=x[q];if(typeof V=="string")Q+=V.length;else{var k=V.regex,w=V.parser,M=E.slice(Q),N=k.exec(M)[0];w.call(I,N),E=E.replace(N,"")}}return function(j){var U=j.afternoon;if(U!==void 0){var W=j.hours;U?W<12&&(j.hours+=12):W===12&&(j.hours=0),delete j.afternoon}}(I),I}}return function(f,g,S){S.p.customParseFormat=!0,f&&f.parseTwoDigitYear&&(c=f.parseTwoDigitYear);var x=g.prototype,y=x.parse;x.parse=function(C){var P=C.date,O=C.utc,A=C.args;this.$u=O;var F=A[1];if(typeof F=="string"){var E=A[2]===!0,I=A[3]===!0,q=E||I,Q=A[2];I&&(Q=A[2]),i=this.$locale(),!E&&Q&&(i=S.Ls[Q]),this.$d=function(M,N,j,U){try{if(["x","X"].indexOf(N)>-1)return new Date((N==="X"?1e3:1)*M);var W=m(N)(M),Y=W.year,J=W.month,Z=W.day,ee=W.hours,oe=W.minutes,he=W.seconds,Kr=W.milliseconds,Ct=W.zone,Se=W.week,Ye=new Date,$t=Z||(Y||J?1:Ye.getDate()),ar=Y||Ye.getFullYear(),pi=0;Y&&!J||(pi=J>0?J-1:Ye.getMonth());var fi,hu=ee||0,Su=oe||0,Cu=he||0,xu=Kr||0;return Ct?new Date(Date.UTC(ar,pi,$t,hu,Su,Cu,xu+60*Ct.offset*1e3)):j?new Date(Date.UTC(ar,pi,$t,hu,Su,Cu,xu)):(fi=new Date(ar,pi,$t,hu,Su,Cu,xu),Se&&(fi=U(fi).week(Se).toDate()),fi)}catch{return new Date("")}}(P,F,O,S),this.init(),Q&&Q!==!0&&(this.$L=this.locale(Q).$L),q&&P!=this.format(F)&&(this.$d=new Date("")),i={}}else if(F instanceof Array)for(var V=F.length,k=1;k<=V;k+=1){A[1]=F[k-1];var w=S.apply(this,A);if(w.isValid()){this.$d=w.$d,this.$L=w.$L,this.init();break}k===V&&(this.$d=new Date(""))}else y.call(this,C)}}})});var DS=Ce((A3,VS)=>{"use strict";var CE=/(^|; )Coveo-Pendragon=([^;]*)/;VS.exports=()=>CE.exec(document.cookie)?.pop()||null});var NS=Ce((Qd,Ud)=>{"use strict";(function(e,t){typeof Qd=="object"&&typeof Ud<"u"?Ud.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(Qd,function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,o,n){var a,i=function(l,d,p){p===void 0&&(p={});var m=new Date(l),f=function(g,S){S===void 0&&(S={});var x=S.timeZoneName||"short",y=g+"|"+x,C=t[y];return C||(C=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:g,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:x}),t[y]=C),C}(d,p);return f.formatToParts(m)},c=function(l,d){for(var p=i(l,d),m=[],f=0;f<p.length;f+=1){var g=p[f],S=g.type,x=g.value,y=e[S];y>=0&&(m[y]=parseInt(x,10))}var C=m[3],P=C===24?0:C,O=m[0]+"-"+m[1]+"-"+m[2]+" "+P+":"+m[4]+":"+m[5]+":000",A=+l;return(n.utc(O).valueOf()-(A-=A%1e3))/6e4},u=o.prototype;u.tz=function(l,d){l===void 0&&(l=a);var p,m=this.utcOffset(),f=this.toDate(),g=f.toLocaleString("en-US",{timeZone:l}),S=Math.round((f-new Date(g))/1e3/60),x=15*-Math.round(f.getTimezoneOffset()/15)-S;if(!Number(x))p=this.utcOffset(0,d);else if(p=n(g,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(x,!0),d){var y=p.utcOffset();p=p.add(m-y,"minute")}return p.$x.$timezone=l,p},u.offsetName=function(l){var d=this.$x.$timezone||n.tz.guess(),p=i(this.valueOf(),d,{timeZoneName:l}).find(function(m){return m.type.toLowerCase()==="timezonename"});return p&&p.value};var s=u.startOf;u.startOf=function(l,d){if(!this.$x||!this.$x.$timezone)return s.call(this,l,d);var p=n(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return s.call(p,l,d).tz(this.$x.$timezone,!0)},n.tz=function(l,d,p){var m=p&&d,f=p||d||a,g=c(+n(),f);if(typeof l!="string")return n(l).tz(f);var S=function(P,O,A){var F=P-60*O*1e3,E=c(F,A);if(O===E)return[F,O];var I=c(F-=60*(E-O)*1e3,A);return E===I?[F,E]:[P-60*Math.min(E,I)*1e3,Math.max(E,I)]}(n.utc(l,m).valueOf(),g,f),x=S[0],y=S[1],C=n(x).utcOffset(y);return C.$x.$timezone=f,C},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.tz.setDefault=function(l){a=l}}})});var MS=Ce((Bd,jd)=>{"use strict";(function(e,t){typeof Bd=="object"&&typeof jd<"u"?jd.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(Bd,function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(o,n,a){var i=n.prototype;a.utc=function(m){var f={date:m,utc:!0,args:arguments};return new n(f)},i.utc=function(m){var f=a(this.toDate(),{locale:this.$L,utc:!0});return m?f.add(this.utcOffset(),e):f},i.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var c=i.parse;i.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),c.call(this,m)};var u=i.init;i.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else u.call(this)};var s=i.utcOffset;i.utcOffset=function(m,f){var g=this.$utils().u;if(g(m))return this.$u?0:g(this.$offset)?s.call(this):this.$offset;if(typeof m=="string"&&(m=function(C){C===void 0&&(C="");var P=C.match(t);if(!P)return null;var O=(""+P[0]).match(r)||["-",0,0],A=O[0],F=60*+O[1]+ +O[2];return F===0?0:A==="+"?F:-F}(m),m===null))return this;var S=Math.abs(m)<=16?60*m:m,x=this;if(f)return x.$offset=S,x.$u=m===0,x;if(m!==0){var y=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(x=this.local().add(S+y,e)).$offset=S,x.$x.$localOffset=y}else x=this.utc();return x};var l=i.format;i.format=function(m){var f=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,f)},i.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var d=i.toDate;i.toDate=function(m){return m==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var p=i.diff;i.diff=function(m,f,g){if(m&&this.$u===m.$u)return p.call(this,m,f,g);var S=this.local(),x=a(m).local();return p.call(S,x,f,g)}}})});var YS=Ce((V4,HS)=>{"use strict";function EE(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}HS.exports=TE;function TE(e,t,r){var o=r&&r.stringify||EE,n=1;if(typeof e=="object"&&e!==null){var a=t.length+n;if(a===1)return e;var i=new Array(a);i[0]=o(e);for(var c=1;c<a;c++)i[c]=o(t[c]);return i.join(" ")}if(typeof e!="string")return e;var u=t.length;if(u===0)return e;for(var s="",l=1-n,d=-1,p=e&&e.length||0,m=0;m<p;){if(e.charCodeAt(m)===37&&m+1<p){switch(d=d>-1?d:0,e.charCodeAt(m+1)){case 100:case 102:if(l>=u||t[l]==null)break;d<m&&(s+=e.slice(d,m)),s+=Number(t[l]),d=m+2,m++;break;case 105:if(l>=u||t[l]==null)break;d<m&&(s+=e.slice(d,m)),s+=Math.floor(Number(t[l])),d=m+2,m++;break;case 79:case 111:case 106:if(l>=u||t[l]===void 0)break;d<m&&(s+=e.slice(d,m));var f=typeof t[l];if(f==="string"){s+="'"+t[l]+"'",d=m+2,m++;break}if(f==="function"){s+=t[l].name||"<anonymous>",d=m+2,m++;break}s+=o(t[l]),d=m+2,m++;break;case 115:if(l>=u)break;d<m&&(s+=e.slice(d,m)),s+=String(t[l]),d=m+2,m++;break;case 37:d<m&&(s+=e.slice(d,m)),s+="%",d=m+2,m++,l--;break}++l}++m}return d===-1?e:(d<p&&(s+=e.slice(d)),s)}});var rC=Ce((D4,Ms)=>{"use strict";var JS=YS();Ms.exports=nr;var ni=zE().console||{},OE={mapHttpRequest:Ns,mapHttpResponse:Ns,wrapRequestSerializer:zd,wrapResponseSerializer:zd,wrapErrorSerializer:zd,req:Ns,res:Ns,err:ZS,errWithCause:ZS};function $r(e,t){return e==="silent"?1/0:t.levels.values[e]}var Gd=Symbol("pino.logFuncs"),Wd=Symbol("pino.hierarchy"),qE={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function XS(e,t){let r={logger:t,parent:e[Wd]};t[Wd]=r}function kE(e,t,r){let o={};t.forEach(n=>{o[n]=r[n]?r[n]:ni[n]||ni[qE[n]||"log"]||Un}),e[Gd]=o}function VE(e,t){return Array.isArray(e)?e.filter(function(o){return o!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function nr(e){e=e||{},e.browser=e.browser||{};let t=e.browser.transmit;if(t&&typeof t.send!="function")throw Error("pino: transmit option must have a send function");let r=e.browser.write||ni;e.browser.write&&(e.browser.asObject=!0);let o=e.serializers||{},n=VE(e.browser.serialize,o),a=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(a=!1);let i=Object.keys(e.customLevels||{}),c=["error","fatal","warn","info","debug","trace"].concat(i);typeof r=="function"&&c.forEach(function(g){r[g]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let u=e.level||"info",s=Object.create(r);s.log||(s.log=Un),kE(s,c,r),XS({},s),Object.defineProperty(s,"levelVal",{get:d}),Object.defineProperty(s,"level",{get:p,set:m});let l={transmit:t,serialize:n,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:c,timestamp:jE(e),messageKey:e.messageKey||"msg",onChild:e.onChild||Un};s.levels=DE(e),s.level=u,s.setMaxListeners=s.getMaxListeners=s.emit=s.addListener=s.on=s.prependListener=s.once=s.prependOnceListener=s.removeListener=s.removeAllListeners=s.listeners=s.listenerCount=s.eventNames=s.write=s.flush=Un,s.serializers=o,s._serialize=n,s._stdErrSerialize=a,s.child=function(...g){return f.call(this,l,...g)},t&&(s._logEvent=Kd());function d(){return $r(this.level,this)}function p(){return this._level}function m(g){if(g!=="silent"&&!this.levels.values[g])throw Error("unknown level "+g);this._level=g,Ro(this,l,s,"error"),Ro(this,l,s,"fatal"),Ro(this,l,s,"warn"),Ro(this,l,s,"info"),Ro(this,l,s,"debug"),Ro(this,l,s,"trace"),i.forEach(S=>{Ro(this,l,s,S)})}function f(g,S,x){if(!S)throw new Error("missing bindings for child Pino");x=x||{},n&&S.serializers&&(x.serializers=S.serializers);let y=x.serializers;if(n&&y){var C=Object.assign({},o,y),P=e.browser.serialize===!0?Object.keys(C):n;delete S.serializers,Hd([S],P,C,this._stdErrSerialize)}function O(F){this._childLevel=(F._childLevel|0)+1,this.bindings=S,C&&(this.serializers=C,this._serialize=P),t&&(this._logEvent=Kd([].concat(F._logEvent.bindings,S)))}O.prototype=this;let A=new O(this);return XS(this,A),A.child=function(...F){return f.call(this,g,...F)},A.level=x.level||this.level,g.onChild(A),A}return s}function DE(e){let t=e.customLevels||{},r=Object.assign({},nr.levels.values,t),o=Object.assign({},nr.levels.labels,NE(t));return{values:r,labels:o}}function NE(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}nr.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"}};nr.stdSerializers=OE;nr.stdTimeFunctions=Object.assign({},{nullTime:eC,epochTime:tC,unixTime:_E,isoTime:$E});function ME(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[Wd];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function Ro(e,t,r,o){if(Object.defineProperty(e,o,{value:$r(e.level,r)>$r(o,r)?Un:r[Gd][o],writable:!0,enumerable:!0,configurable:!0}),e[o]===Un){if(!t.transmit)return;let a=t.transmit.level||e.level,i=$r(a,r);if($r(o,r)<i)return}e[o]=QE(e,t,r,o);let n=ME(e);n.length!==0&&(e[o]=LE(n,e[o]))}function LE(e,t){return function(){return t.apply(this,[...e,...arguments])}}function QE(e,t,r,o){return function(n){return function(){let i=t.timestamp(),c=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===ni?ni:this;for(var s=0;s<c.length;s++)c[s]=arguments[s];var l=!1;if(t.serialize&&(Hd(c,this._serialize,this.serializers,this._stdErrSerialize),l=!0),t.asObject||t.formatters?n.call(u,UE(this,o,c,i,t)):n.apply(u,c),t.transmit){let d=t.transmit.level||e._level,p=$r(d,r),m=$r(o,r);if(m<p)return;BE(this,{ts:i,methodLevel:o,methodValue:m,transmitLevel:d,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:$r(e._level,r)},c,l)}}}(e[Gd][o])}function UE(e,t,r,o,n){let{level:a,log:i=p=>p}=n.formatters||{},c=r.slice(),u=c[0],s={};if(o&&(s.time=o),a){let p=a(t,e.levels.values[t]);Object.assign(s,p)}else s.level=e.levels.values[t];let l=(e._childLevel|0)+1;if(l<1&&(l=1),u!==null&&typeof u=="object"){for(;l--&&typeof c[0]=="object";)Object.assign(s,c.shift());u=c.length?JS(c.shift(),c):void 0}else typeof u=="string"&&(u=JS(c.shift(),c));return u!==void 0&&(s[n.messageKey]=u),i(s)}function Hd(e,t,r,o){for(let n in e)if(o&&e[n]instanceof Error)e[n]=nr.stdSerializers.err(e[n]);else if(typeof e[n]=="object"&&!Array.isArray(e[n])&&t)for(let a in e[n])t.indexOf(a)>-1&&a in r&&(e[n][a]=r[a](e[n][a]))}function BE(e,t,r,o=!1){let n=t.send,a=t.ts,i=t.methodLevel,c=t.methodValue,u=t.val,s=e._logEvent.bindings;o||Hd(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=a,e._logEvent.messages=r.filter(function(l){return s.indexOf(l)===-1}),e._logEvent.level.label=i,e._logEvent.level.value=c,n(i,e._logEvent,u),e._logEvent=Kd(s)}function Kd(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function ZS(e){let t={type:e.constructor.name,msg:e.message,stack:e.stack};for(let r in e)t[r]===void 0&&(t[r]=e[r]);return t}function jE(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?eC:tC}function Ns(){return{}}function zd(e){return e}function Un(){}function eC(){return!1}function tC(){return Date.now()}function _E(){return Math.round(Date.now()/1e3)}function $E(){return new Date(Date.now()).toISOString()}function zE(){function e(t){return typeof t<"u"&&t}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return e(self)||e(window)||e(this)||{}}}Ms.exports.default=nr;Ms.exports.pino=nr});var qp={};Im(qp,{ProductListing:()=>Bu,Search:()=>Uu});var wm="coveo-headless-internal-state",L=Symbol.for(wm),Em=e=>new Proxy(e,{ownKeys(t){return Reflect.ownKeys(t).filter(r=>r!==L)},get(t,r,o){return typeof r=="symbol"&&r.description===wm&&r!==L&&e.logger.warn(`You might be loading Headless twice. Please check your setup.
|
|
19
|
-
If you are trying to access the inner state... Don't`),Reflect.get(t,r,o)}});import{isNullOrUndefined as aF}from"@coveo/bueno";function xe(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var yR=typeof Symbol=="function"&&Symbol.observable||"@@observable",Tm=yR,Ru=()=>Math.random().toString(36).substring(7).split("").join("."),hR={INIT:`@@redux/INIT${Ru()}`,REPLACE:`@@redux/REPLACE${Ru()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ru()}`},yi=hR;function Rt(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Fu(e,t,r){if(typeof e!="function")throw new Error(xe(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(xe(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(xe(1));return r(Fu)(e,t)}let o=e,n=t,a=new Map,i=a,c=0,u=!1;function s(){i===a&&(i=new Map,a.forEach((S,x)=>{i.set(x,S)}))}function l(){if(u)throw new Error(xe(3));return n}function d(S){if(typeof S!="function")throw new Error(xe(4));if(u)throw new Error(xe(5));let x=!0;s();let y=c++;return i.set(y,S),function(){if(x){if(u)throw new Error(xe(6));x=!1,s(),i.delete(y),a=null}}}function p(S){if(!Rt(S))throw new Error(xe(7));if(typeof S.type>"u")throw new Error(xe(8));if(typeof S.type!="string")throw new Error(xe(17));if(u)throw new Error(xe(9));try{u=!0,n=o(n,S)}finally{u=!1}return(a=i).forEach(y=>{y()}),S}function m(S){if(typeof S!="function")throw new Error(xe(10));o=S,p({type:yi.REPLACE})}function f(){let S=d;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(xe(11));function y(){let P=x;P.next&&P.next(l())}return y(),{unsubscribe:S(y)}},[Tm](){return this}}}return p({type:yi.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[Tm]:f}}function SR(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:yi.INIT})>"u")throw new Error(xe(12));if(typeof r(void 0,{type:yi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(xe(13))})}function Eo(e){let t=Object.keys(e),r={};for(let i=0;i<t.length;i++){let c=t[i];typeof e[c]=="function"&&(r[c]=e[c])}let o=Object.keys(r),n,a;try{SR(r)}catch(i){a=i}return function(c={},u){if(a)throw a;let s=!1,l={};for(let d=0;d<o.length;d++){let p=o[d],m=r[p],f=c[p],g=m(f,u);if(typeof g>"u"){let S=u&&u.type;throw new Error(xe(14))}l[p]=g,s=s||g!==f}return s=s||o.length!==Object.keys(c).length,s?l:c}}function To(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function Om(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(xe(15))},i={getState:n.getState,dispatch:(u,...s)=>a(u,...s)},c=e.map(u=>u(i));return a=To(...c)(n.dispatch),{...n,dispatch:a}}}function hi(e){return Rt(e)&&"type"in e&&typeof e.type=="string"}var qu=Symbol.for("immer-nothing"),ta=Symbol.for("immer-draftable"),Le=Symbol.for("immer-state");function Re(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Hr=Object.getPrototypeOf;function ze(e){return!!e&&!!e[Le]}function Qe(e){return e?Nm(e)||Array.isArray(e)||!!e[ta]||!!e.constructor?.[ta]||ia(e)||ca(e):!1}var CR=Object.prototype.constructor.toString();function Nm(e){if(!e||typeof e!="object")return!1;let t=Hr(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===CR}function ku(e){return ze(e)||Re(15,e),e[Le].base_}function ra(e,t){Yr(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function Yr(e){let t=e[Le];return t?t.type_:Array.isArray(e)?1:ia(e)?2:ca(e)?3:0}function oa(e,t){return Yr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Pu(e,t){return Yr(e)===2?e.get(t):e[t]}function Mm(e,t,r){let o=Yr(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function xR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ia(e){return e instanceof Map}function ca(e){return e instanceof Set}function Gr(e){return e.copy_||e.base_}function bu(e,t){if(ia(e))return new Map(e);if(ca(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Nm(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[Le];let n=Reflect.ownKeys(o);for(let a=0;a<n.length;a++){let i=n[a],c=o[i];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(o[i]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[i]})}return Object.create(Hr(e),o)}else{let o=Hr(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function xi(e,t=!1){return Ri(e)||ze(e)||!Qe(e)||(Yr(e)>1&&(e.set=e.add=e.clear=e.delete=RR),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>xi(o,!0))),e}function RR(){Re(2)}function Ri(e){return Object.isFrozen(e)}var Iu={};function Jr(e){let t=Iu[e];return t||Re(0,e),t}function FR(e,t){Iu[e]||(Iu[e]=t)}var na;function Lm(){return na}function PR(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function qm(e,t){t&&(Jr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function wu(e){Eu(e),e.drafts_.forEach(AR),e.drafts_=null}function Eu(e){e===na&&(na=e.parent_)}function km(e){return na=PR(na,e)}function AR(e){let t=e[Le];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Vm(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Le].modified_&&(wu(t),Re(4)),Qe(e)&&(e=Si(t,e),t.parent_||Ci(t,e)),t.patches_&&Jr("Patches").generateReplacementPatches_(r[Le].base_,e,t.patches_,t.inversePatches_)):e=Si(t,r,[]),wu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==qu?e:void 0}function Si(e,t,r){if(Ri(t))return t;let o=t[Le];if(!o)return ra(t,(n,a)=>Dm(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return Ci(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;let n=o.copy_,a=n,i=!1;o.type_===3&&(a=new Set(n),n.clear(),i=!0),ra(a,(c,u)=>Dm(e,o,n,c,u,r,i)),Ci(e,n,!1),r&&e.patches_&&Jr("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function Dm(e,t,r,o,n,a,i){if(ze(n)){let c=a&&t&&t.type_!==3&&!oa(t.assigned_,o)?a.concat(o):void 0,u=Si(e,n,c);if(Mm(r,o,u),ze(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(Qe(n)&&!Ri(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Si(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&Ci(e,n)}}function Ci(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&xi(t,r)}function vR(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:Lm(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=Vu;r&&(n=[o],a=aa);let{revoke:i,proxy:c}=Proxy.revocable(n,a);return o.draft_=c,o.revoke_=i,c}var Vu={get(e,t){if(t===Le)return e;let r=Gr(e);if(!oa(r,t))return bR(e,r,t);let o=r[t];return e.finalized_||!Qe(o)?o:o===Au(e.base_,t)?(vu(e),e.copy_[t]=Ou(o,e)):o},has(e,t){return t in Gr(e)},ownKeys(e){return Reflect.ownKeys(Gr(e))},set(e,t,r){let o=Qm(Gr(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=Au(Gr(e),t),a=n?.[Le];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(xR(r,n)&&(r!==void 0||oa(e.base_,t)))return!0;vu(e),Tu(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Au(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,vu(e),Tu(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Gr(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){Re(11)},getPrototypeOf(e){return Hr(e.base_)},setPrototypeOf(){Re(12)}},aa={};ra(Vu,(e,t)=>{aa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});aa.deleteProperty=function(e,t){return aa.set.call(this,e,t,void 0)};aa.set=function(e,t,r){return Vu.set.call(this,e[0],t,r,e[0])};function Au(e,t){let r=e[Le];return(r?Gr(r):e)[t]}function bR(e,t,r){let o=Qm(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function Qm(e,t){if(!(t in e))return;let r=Hr(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Hr(r)}}function Tu(e){e.modified_||(e.modified_=!0,e.parent_&&Tu(e.parent_))}function vu(e){e.copy_||(e.copy_=bu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var IR=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,o)=>{if(typeof t=="function"&&typeof r!="function"){let a=r;r=t;let i=this;return function(u=a,...s){return i.produce(u,l=>r.call(this,l,...s))}}typeof r!="function"&&Re(6),o!==void 0&&typeof o!="function"&&Re(7);let n;if(Qe(t)){let a=km(this),i=Ou(t,void 0),c=!0;try{n=r(i),c=!1}finally{c?wu(a):Eu(a)}return qm(a,o),Vm(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===qu&&(n=void 0),this.autoFreeze_&&xi(n,!0),o){let a=[],i=[];Jr("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else Re(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(i,...c)=>this.produceWithPatches(i,u=>t(u,...c));let o,n;return[this.produce(t,r,(i,c)=>{o=i,n=c}),o,n]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Qe(e)||Re(8),ze(e)&&(e=Um(e));let t=km(this),r=Ou(e,void 0);return r[Le].isManual_=!0,Eu(t),r}finishDraft(e,t){let r=e&&e[Le];(!r||!r.isManual_)&&Re(9);let{scope_:o}=r;return qm(o,t),Vm(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let n=t[r];if(n.path.length===0&&n.op==="replace"){e=n.value;break}}r>-1&&(t=t.slice(r+1));let o=Jr("Patches").applyPatches_;return ze(e)?o(e,t):this.produce(e,n=>o(n,t))}};function Ou(e,t){let r=ia(e)?Jr("MapSet").proxyMap_(e,t):ca(e)?Jr("MapSet").proxySet_(e,t):vR(e,t);return(t?t.scope_:Lm()).drafts_.push(r),r}function Um(e){return ze(e)||Re(10,e),Bm(e)}function Bm(e){if(!Qe(e)||Ri(e))return e;let t=e[Le],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=bu(e,t.scope_.immer_.useStrictShallowCopy_)}else r=bu(e,!0);return ra(r,(o,n)=>{Mm(r,o,Bm(n))}),t&&(t.finalized_=!1),r}function jm(){let t="replace",r="add",o="remove";function n(p,m,f,g){switch(p.type_){case 0:case 2:return i(p,m,f,g);case 1:return a(p,m,f,g);case 3:return c(p,m,f,g)}}function a(p,m,f,g){let{base_:S,assigned_:x}=p,y=p.copy_;y.length<S.length&&([S,y]=[y,S],[f,g]=[g,f]);for(let C=0;C<S.length;C++)if(x[C]&&y[C]!==S[C]){let P=m.concat([C]);f.push({op:t,path:P,value:d(y[C])}),g.push({op:t,path:P,value:d(S[C])})}for(let C=S.length;C<y.length;C++){let P=m.concat([C]);f.push({op:r,path:P,value:d(y[C])})}for(let C=y.length-1;S.length<=C;--C){let P=m.concat([C]);g.push({op:o,path:P})}}function i(p,m,f,g){let{base_:S,copy_:x}=p;ra(p.assigned_,(y,C)=>{let P=Pu(S,y),O=Pu(x,y),A=C?oa(S,y)?t:r:o;if(P===O&&A===t)return;let F=m.concat(y);f.push(A===o?{op:A,path:F}:{op:A,path:F,value:O}),g.push(A===r?{op:o,path:F}:A===o?{op:r,path:F,value:d(P)}:{op:t,path:F,value:d(P)})})}function c(p,m,f,g){let{base_:S,copy_:x}=p,y=0;S.forEach(C=>{if(!x.has(C)){let P=m.concat([y]);f.push({op:o,path:P,value:C}),g.unshift({op:r,path:P,value:C})}y++}),y=0,x.forEach(C=>{if(!S.has(C)){let P=m.concat([y]);f.push({op:r,path:P,value:C}),g.unshift({op:o,path:P,value:C})}y++})}function u(p,m,f,g){f.push({op:t,path:[],value:m===qu?void 0:m}),g.push({op:t,path:[],value:p})}function s(p,m){return m.forEach(f=>{let{path:g,op:S}=f,x=p;for(let O=0;O<g.length-1;O++){let A=Yr(x),F=g[O];typeof F!="string"&&typeof F!="number"&&(F=""+F),(A===0||A===1)&&(F==="__proto__"||F==="constructor")&&Re(19),typeof x=="function"&&F==="prototype"&&Re(19),x=Pu(x,F),typeof x!="object"&&Re(18,g.join("/"))}let y=Yr(x),C=l(f.value),P=g[g.length-1];switch(S){case t:switch(y){case 2:return x.set(P,C);case 3:Re(16);default:return x[P]=C}case r:switch(y){case 1:return P==="-"?x.push(C):x.splice(P,0,C);case 2:return x.set(P,C);case 3:return x.add(C);default:return x[P]=C}case o:switch(y){case 1:return x.splice(P,1);case 2:return x.delete(P);case 3:return x.delete(f.value);default:return delete x[P]}default:Re(17,S)}}),p}function l(p){if(!Qe(p))return p;if(Array.isArray(p))return p.map(l);if(ia(p))return new Map(Array.from(p.entries()).map(([f,g])=>[f,l(g)]));if(ca(p))return new Set(Array.from(p).map(l));let m=Object.create(Hr(p));for(let f in p)m[f]=l(p[f]);return oa(p,ta)&&(m[ta]=p[ta]),m}function d(p){return ze(p)?l(p):p}FR("Patches",{applyPatches_:s,generatePatches_:n,generateReplacementPatches_:u})}var We=new IR,zt=We.produce,Fi=We.produceWithPatches.bind(We),eV=We.setAutoFreeze.bind(We),tV=We.setUseStrictShallowCopy.bind(We),Du=We.applyPatches.bind(We),rV=We.createDraft.bind(We),oV=We.finishDraft.bind(We);function wR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function ER(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function TR(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(o=>typeof o=="function"?`function ${o.name||"unnamed"}()`:typeof o).join(", ");throw new TypeError(`${t}[${r}]`)}}var _m=e=>Array.isArray(e)?e:[e];function OR(e){let t=Array.isArray(e[0])?e[0]:e;return TR(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function qR(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var iV=Symbol();var cV=Object.getPrototypeOf({});var kR=class{constructor(e){this.value=e}deref(){return this.value}},VR=typeof WeakRef<"u"?WeakRef:kR,DR=0,$m=1;function Pi(){return{s:DR,v:void 0,o:null,p:null}}function Oo(e,t={}){let r=Pi(),{resultEqualityCheck:o}=t,n,a=0;function i(){let c=r,{length:u}=arguments;for(let d=0,p=u;d<p;d++){let m=arguments[d];if(typeof m=="function"||typeof m=="object"&&m!==null){let f=c.o;f===null&&(c.o=f=new WeakMap);let g=f.get(m);g===void 0?(c=Pi(),f.set(m,c)):c=g}else{let f=c.p;f===null&&(c.p=f=new Map);let g=f.get(m);g===void 0?(c=Pi(),f.set(m,c)):c=g}}let s=c,l;if(c.s===$m)l=c.v;else if(l=e.apply(null,arguments),a++,o){let d=n?.deref?.()??n;d!=null&&o(d,l)&&(l=d,a!==0&&a--),n=typeof l=="object"&&l!==null||typeof l=="function"?new VR(l):l}return s.s=$m,s.v=l,l}return i.clearCache=()=>{r=Pi(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function zm(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...n)=>{let a=0,i=0,c,u={},s=n.pop();typeof s=="object"&&(u=s,s=n.pop()),wR(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=Oo,argsMemoizeOptions:f=[],devModeChecks:g={}}=l,S=_m(p),x=_m(f),y=OR(n),C=d(function(){return a++,s.apply(null,arguments)},...S),P=!0,O=m(function(){i++;let F=qR(y,arguments);return c=C.apply(null,F),c},...x);return Object.assign(O,{resultFunc:s,memoizedResultFunc:C,dependencies:y,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>c,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var D=zm(Oo),NR=Object.assign((e,t=D)=>{ER(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),o=r.map(a=>e[a]);return t(o,(...a)=>a.reduce((i,c,u)=>(i[r[u]]=c,i),{}))},{withTypes:()=>NR});function Wm(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var Km=Wm(),Gm=Wm;var MR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?To:To.apply(null,arguments)},hV=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},LR=e=>e&&typeof e.match=="function";function h(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(dt(0));return{type:e,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:e,payload:o[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=o=>hi(o)&&o.type===e,r}var Zm=class sa extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,sa.prototype)}static get[Symbol.species](){return sa}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new sa(...t[0].concat(this)):new sa(...t.concat(this))}};function Hm(e){return Qe(e)?zt(e,()=>{}):e}function Ym(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function QR(e){return typeof e=="boolean"}var UR=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new Zm;return r&&(QR(r)?i.push(Km):i.push(Gm(r.extraArgument))),i},ir="RTK_autoBatch",ko=()=>e=>({payload:e,meta:{[ir]:!0}}),Jm=e=>t=>{setTimeout(t,e)},BR=(e={type:"raf"})=>t=>(...r)=>{let o=t(...r),n=!0,a=!1,i=!1,c=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Jm(10):e.type==="callback"?e.queueNotification:Jm(e.timeout),s=()=>{i=!1,a&&(a=!1,c.forEach(l=>l()))};return Object.assign({},o,{subscribe(l){let d=()=>n&&l(),p=o.subscribe(d);return c.add(l),()=>{p(),c.delete(l)}},dispatch(l){try{return n=!l?.meta?.[ir],a=!n,a&&(i||(i=!0,u(s))),o.dispatch(l)}finally{n=!0}}})},jR=e=>function(r){let{autoBatch:o=!0}=r??{},n=new Zm(e);return o&&n.push(BR(typeof o=="object"?o:void 0)),n};function ep(e){let t=UR(),{reducer:r=void 0,middleware:o,devTools:n=!0,preloadedState:a=void 0,enhancers:i=void 0}=e||{},c;if(typeof r=="function")c=r;else if(Rt(r))c=Eo(r);else throw new Error(dt(1));let u;typeof o=="function"?u=o(t):u=t();let s=To;n&&(s=MR({trace:!1,...typeof n=="object"&&n}));let l=Om(...u),d=jR(l),p=typeof i=="function"?i(d):d(),m=s(...p);return Fu(c,a,m)}function tp(e){let t={},r=[],o,n={addCase(a,i){let c=typeof a=="string"?a:a.type;if(!c)throw new Error(dt(28));if(c in t)throw new Error(dt(29));return t[c]=i,n},addMatcher(a,i){return r.push({matcher:a,reducer:i}),n},addDefaultCase(a){return o=a,n}};return e(n),[t,r,o]}function _R(e){return typeof e=="function"}function B(e,t){let[r,o,n]=tp(t),a;if(_R(e))a=()=>Hm(e());else{let c=Hm(e);a=()=>c}function i(c=a(),u){let s=[r[u.type],...o.filter(({matcher:l})=>l(u)).map(({reducer:l})=>l)];return s.filter(l=>!!l).length===0&&(s=[n]),s.reduce((l,d)=>{if(d)if(ze(l)){let m=d(l,u);return m===void 0?l:m}else{if(Qe(l))return zt(l,p=>d(p,u));{let p=d(l,u);if(p===void 0){if(l===null)return l;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return l},c)}return i.getInitialState=a,i}var rp=(e,t)=>LR(e)?e.match(t):e(t);function Ft(...e){return t=>e.some(r=>rp(r,t))}function qo(...e){return t=>e.every(r=>rp(r,t))}function vi(e,t){if(!e||!e.meta)return!1;let r=typeof e.meta.requestId=="string",o=t.indexOf(e.meta.requestStatus)>-1;return r&&o}function ua(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function bi(...e){return e.length===0?t=>vi(t,["pending"]):ua(e)?Ft(...e.map(t=>t.pending)):bi()(e[0])}function Xr(...e){return e.length===0?t=>vi(t,["rejected"]):ua(e)?Ft(...e.map(t=>t.rejected)):Xr()(e[0])}function la(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?qo(Xr(...e),t):ua(e)?qo(Xr(...e),t):la()(e[0])}function Wt(...e){return e.length===0?t=>vi(t,["fulfilled"]):ua(e)?Ft(...e.map(t=>t.fulfilled)):Wt()(e[0])}function Ii(...e){return e.length===0?t=>vi(t,["pending","fulfilled","rejected"]):ua(e)?Ft(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ii()(e[0])}var $R="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",wi=(e=21)=>{let t="",r=e;for(;r--;)t+=$R[Math.random()*64|0];return t},zR=["name","message","stack","code"],Nu=class{constructor(e,t){be(this,"_type");this.payload=e,this.meta=t}},Xm=class{constructor(e,t){be(this,"_type");this.payload=e,this.meta=t}},WR=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of zR)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},_=(()=>{function e(t,r,o){let n=h(t+"/fulfilled",(u,s,l,d)=>({payload:u,meta:{...d||{},arg:l,requestId:s,requestStatus:"fulfilled"}})),a=h(t+"/pending",(u,s,l)=>({payload:void 0,meta:{...l||{},arg:s,requestId:u,requestStatus:"pending"}})),i=h(t+"/rejected",(u,s,l,d,p)=>({payload:d,error:(o&&o.serializeError||WR)(u||"Rejected"),meta:{...p||{},arg:l,requestId:s,rejectedWithValue:!!d,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function c(u){return(s,l,d)=>{let p=o?.idGenerator?o.idGenerator(u):wi(),m=new AbortController,f,g;function S(y){g=y,m.abort()}let x=async function(){let y;try{let P=o?.condition?.(u,{getState:l,extra:d});if(GR(P)&&(P=await P),P===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let O=new Promise((A,F)=>{f=()=>{F({name:"AbortError",message:g||"Aborted"})},m.signal.addEventListener("abort",f)});s(a(p,u,o?.getPendingMeta?.({requestId:p,arg:u},{getState:l,extra:d}))),y=await Promise.race([O,Promise.resolve(r(u,{dispatch:s,getState:l,extra:d,requestId:p,signal:m.signal,abort:S,rejectWithValue:(A,F)=>new Nu(A,F),fulfillWithValue:(A,F)=>new Xm(A,F)})).then(A=>{if(A instanceof Nu)throw A;return A instanceof Xm?n(A.payload,p,u,A.meta):n(A,p,u)})])}catch(P){y=P instanceof Nu?i(null,p,u,P.payload,P.meta):i(P,p,u)}finally{f&&m.signal.removeEventListener("abort",f)}return o&&!o.dispatchConditionRejection&&i.match(y)&&y.meta.condition||s(y),y}();return Object.assign(x,{abort:S,requestId:p,arg:u,unwrap(){return x.then(KR)}})}}return Object.assign(c,{pending:a,rejected:i,fulfilled:n,settled:Ft(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function KR(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function GR(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var op=Symbol.for("rtk-slice-createasyncthunk"),FV={[op]:_};function HR(e,t){return`${e}/${t}`}function YR({creators:e}={}){let t=e?.asyncThunk?.[op];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(dt(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(XR()):o.reducers)||{},c=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(y,C){let P=typeof y=="string"?y:y.type;if(!P)throw new Error(dt(12));if(P in u.sliceCaseReducersByType)throw new Error(dt(13));return u.sliceCaseReducersByType[P]=C,s},addMatcher(y,C){return u.sliceMatchers.push({matcher:y,reducer:C}),s},exposeAction(y,C){return u.actionCreators[y]=C,s},exposeCaseReducer(y,C){return u.sliceCaseReducersByName[y]=C,s}};c.forEach(y=>{let C=i[y],P={reducerName:y,type:HR(n,y),createNotation:typeof o.reducers=="function"};eF(C)?rF(P,C,s,t):ZR(P,C,s)});function l(){let[y={},C=[],P=void 0]=typeof o.extraReducers=="function"?tp(o.extraReducers):[o.extraReducers],O={...y,...u.sliceCaseReducersByType};return B(o.initialState,A=>{for(let F in O)A.addCase(F,O[F]);for(let F of u.sliceMatchers)A.addMatcher(F.matcher,F.reducer);for(let F of C)A.addMatcher(F.matcher,F.reducer);P&&A.addDefaultCase(P)})}let d=y=>y,p=new Map,m;function f(y,C){return m||(m=l()),m(y,C)}function g(){return m||(m=l()),m.getInitialState()}function S(y,C=!1){function P(A){let F=A[y];return typeof F>"u"&&C&&(F=g()),F}function O(A=d){let F=Ym(p,C,()=>new WeakMap);return Ym(F,A,()=>{let E={};for(let[I,q]of Object.entries(o.selectors??{}))E[I]=JR(q,A,g,C);return E})}return{reducerPath:y,getSelectors:O,get selectors(){return O(P)},selectSlice:P}}let x={name:n,reducer:f,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:g,...S(a),injectInto(y,{reducerPath:C,...P}={}){let O=C??a;return y.inject({reducerPath:O,reducer:f},P),{...x,...S(O,!0)}}};return x}}function JR(e,t,r,o){function n(a,...i){let c=t(a);return typeof c>"u"&&o&&(c=r()),e(c,...i)}return n.unwrapped=e,n}var Zr=YR();function XR(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function ZR({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!tF(o))throw new Error(dt(17));a=o.reducer,i=o.prepare}else a=o;n.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?h(e,i):h(e))}function eF(e){return e._reducerDefinitionType==="asyncThunk"}function tF(e){return e._reducerDefinitionType==="reducerWithPrepare"}function rF({type:e,reducerName:t},r,o,n){if(!n)throw new Error(dt(18));let{payloadCreator:a,fulfilled:i,pending:c,rejected:u,settled:s,options:l}=r,d=n(e,a,l);o.exposeAction(t,d),i&&o.addCase(d.fulfilled,i),c&&o.addCase(d.pending,c),u&&o.addCase(d.rejected,u),s&&o.addMatcher(d.settled,s),o.exposeCaseReducer(t,{fulfilled:i||Ai,pending:c||Ai,rejected:u||Ai,settled:s||Ai})}function Ai(){}var np="listener",ap="completed",ip="cancelled",PV=`task-${ip}`,AV=`task-${ap}`,vV=`${np}-${ip}`,bV=`${np}-${ap}`;var{assign:cp}=Object;var Mu="listenerMiddleware";var oF=cp(h(`${Mu}/add`),{withTypes:()=>oF}),IV=h(`${Mu}/removeAll`),nF=cp(h(`${Mu}/remove`),{withTypes:()=>nF});var wV=Symbol.for("rtk-state-proxy-original");function dt(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. `}var cr=D(e=>e.commercePagination?.principal.perPage||0,e=>e),Ei=D((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),sr=D(e=>e.commercePagination?.principal.totalEntries||0,e=>e),Ti=D((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),Oi=D(e=>e.commercePagination?.principal.page||0,e=>e),sp=D((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var UV=D(e=>e[L].productListing.responseId,e=>e),da=D(e=>e.productListing.responseId,e=>e),up=D(e=>e.productListing.requestId,e=>e),ma=D(e=>e.productListing?.products.length||0,e=>e),lp=D(e=>({total:sr(e),current:ma(e)}),({current:e,total:t})=>e<t),dp=D(e=>e.productListing?.isLoading,e=>aF(e)?!1:e),mp=D(e=>e.productListing?.error,e=>e??null);import{isNullOrUndefined as Pp}from"@coveo/bueno";function Lu(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function Qu(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{sortCriteria:o}:{}}function Pt(e,t,r,o){if(e===void 0)return{};let n=Object.entries(e).filter(([a])=>t(a)).map(([a,{request:i}])=>{let c=r(i);return c.length?{[a]:c}:{}}).reduce((a,i)=>({...a,...i}),{});return Object.keys(n).length?{[o]:n}:{}}function At(e){let{activeValue:t,ancestryMap:r}=cF(e);return t?sF(t,r):[]}function cF(e){let t=[...e],r=new Map;for(;t.length>0;){let o=t.shift();if(o.state==="selected")return{activeValue:o,ancestryMap:r};if(r)for(let n of o.children)r.set(n,o);t.unshift(...o.children)}return{}}function sF(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function pp(){return{principal:ur(),recommendations:{}}}function ur(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}import{ArrayValue as dF,EnumValue as yp,StringValue as hp,RecordValue as Sp}from"@coveo/bueno";import{ArrayValue as uF,EnumValue as fp,RecordValue as gp,StringValue as lF}from"@coveo/bueno";var mt=(r=>(r.Relevance="relevance",r.Fields="fields",r))(mt||{}),eo=(r=>(r.Ascending="asc",r.Descending="desc",r))(eo||{}),vt=()=>({by:"relevance"});var zV=new gp({options:{required:!1},values:{by:new fp({enum:mt,required:!0}),fields:new uF({each:new gp({values:{name:new lF,direction:new fp({enum:eo})}})})}});var qi=e=>({by:"fields",fields:e}),Cp=new Sp({options:{required:!1},values:{by:new yp({enum:mt,required:!0}),fields:new dF({each:new Sp({values:{field:new hp({required:!0}),direction:new yp({enum:eo}),displayName:new hp}})})}});function to(){return{appliedSort:vt(),availableSorts:[vt()]}}function ki(e){return{...mF(e?.commercePagination,t=>t.principal.page,ur().page),...pF(e?.commercePagination,t=>t.principal.perPage,ur().perPage),...Qu(e?.commerceSort,t=>t.appliedSort,to().appliedSort),...Pt(e.commerceFacetSet,lr(e,"regular"),fF,"f"),...Pt(e.commerceFacetSet,lr(e,"regular"),gF,"fExcluded"),...Pt(e.commerceFacetSet,lr(e,"location"),yF,"lf"),...Pt(e.commerceFacetSet,lr(e,"hierarchical"),hF,"cf"),...Pt(e.commerceFacetSet,lr(e,"dateRange"),xp,"df"),...Pt(e.commerceFacetSet,lr(e,"dateRange"),Rp,"dfExcluded"),...Pt(e.commerceFacetSet,lr(e,"numericalRange"),xp,"nf"),...Pt(e.commerceFacetSet,lr(e,"numericalRange"),Rp,"nfExcluded"),...Fp("selected",e.manualNumericFacetSet),...Fp("excluded",e.manualNumericFacetSet)}}function mF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function pF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function fF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function gF(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function yF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function xp(e){return e.values.filter(t=>t.state==="selected")}function Rp(e){return e.values.filter(t=>t.state==="excluded")}function Fp(e,t){if(!t||e==="idle")return{};let r=Object.entries(t).map(([o,n])=>{if(!(n.manualRange===void 0||n.manualRange.state!==e))return{[o]:[n.manualRange]}}).filter(o=>o!==void 0).reduce((o,n)=>({...o,...n}),{});return e==="selected"?{mnf:r}:{mnfExcluded:r}}function hF(e){return At(e.values).map(r=>r.value)}function lr(e,t){return r=>e.commerceFacetSet[r].request.type===t}var Vi=()=>({query:""});var yD=D(e=>e[L].commerceSearch.responseId,e=>e),pa=D(e=>e.commerceSearch.responseId,e=>e),Ap=D(e=>e.commerceSearch.requestId,e=>e),fa=D(e=>e.commerceSearch?.products.length||0,e=>e),vp=D(e=>({total:sr(e),current:fa(e)}),({current:e,total:t})=>e<t),bp=D(e=>e.commerceSearch?.isLoading,e=>Pp(e)?!1:e),Ip=D(e=>e.commerceSearch?.error,e=>e??null),Di=D(e=>e.commerceQuery?.query,e=>e??""),SF=D(e=>e.commerceSearch?.queryExecuted,e=>e),wp=(e,t)=>Pp(t.queryCorrection?.correctedQuery)?Di(e):t.queryCorrection.correctedQuery,Ep=e=>({...Lu(e?.commerceQuery,t=>t.query,Vi().query),...ki(e)});function Tp(e){return{query:SF(e)||""}}var Uu;(t=>t.responseIdSelector=Op(pa))(Uu||(Uu={}));var Bu;(t=>t.responseIdSelector=Op(da))(Bu||(Bu={}));function Op(e){return t=>e(t[L])}var Dp={};Im(Dp,{escape:()=>Vo,getHighlightedSuggestion:()=>_u,highlightString:()=>RF});import{isNullOrUndefined as xF}from"@coveo/bueno";var ro=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function kp(e){return Array.isArray(e)}function Ni(e){return e.trim()===""}function Vp(e){let t={};for(let[r,o]of e)t[r]=o;return t}function ga(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function RF(e){if(Ni(e.openingDelimiter)||Ni(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(xF(e.content)||Ni(e.content))return e.content;if(e.highlights.length===0)return Vo(e.content);let t=e.content.length,r="",o=0;for(let n=0;n<e.highlights.length;n++){let a=e.highlights[n],i=a.offset,c=i+a.length;if(c>t)break;r+=Vo(e.content.slice(o,i)),r+=e.openingDelimiter,r+=Vo(e.content.slice(i,c)),r+=e.closingDelimiter,o=c}return o!==t&&(r+=Vo(e.content.slice(o))),r}function _u(e,t){return e=Vo(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,o,n,a)=>o?ju(o,t.notMatchDelimiters):n?ju(n,t.exactMatchDelimiters):a?ju(a,t.correctionDelimiters):r)}function ju(e,t){return t?t.open+e+t.close:e}function Vo(e){let t={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},r="(?:"+Object.keys(t).join("|")+")",o=RegExp(r),n=RegExp(r,"g");return o.test(e)?e.replace(n,a=>t[a]):e}var Kp=xt(_p(),1);var KF="recommendation-internal-options",TD=Symbol.for(KF);var $=new Error("Failed to load reducers."),Do=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var no=class extends Error{constructor(r,o){super();be(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function $p(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function zp(e){return typeof e!="object"||!e?!1:Object.values(e).every(GF)}function GF(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Wp(e){return e===429}var No=class e{static async call(t){let r=HF(t),{logger:o}=t,n=await e.preprocessRequest(r,t);o.info(n,"Platform request");let{url:a,...i}=n,c=async()=>{let u=await fetch(a,i);if(Wp(u.status))throw u;return u};try{let u=await(0,Kp.backOff)(c,{retry:s=>{let l=s&&Wp(s.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new Do;case 404:throw new no(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new no(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:c,...u}=t,s=ga(u);try{let l=await n(t,o,i);return{...t,...l}}catch(l){a.error(l,"Platform request preprocessing failed. Returning default request options.")}return s}};function Ie(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function Je(e,t="prod"){return`${Ie(e,t)}/rest/search/v2`}function Xu(e,t="prod"){return`${Ie(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function HF(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,c=e.method==="POST"||e.method==="PUT",u=YF(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...c&&{body:u},signal:i}}function YF(e,t){return t==="application/x-www-form-urlencoded"?zp(e)?$p(e):"":JSON.stringify(e)}function JF(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function XF(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Zu(e,t){if(t&&e.name==="AbortError")return{error:XF(e)};if(e instanceof no)return{error:JF(e)};throw e}var Mo=(e,t)=>({...Sa(e,t),requestParams:ZF(e)}),ZF=e=>{let{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:c,perPage:u,facets:s,sort:l}=e;return{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:c,perPage:u,facets:s,sort:l}},Sa=(e,t)=>{let{url:r,accessToken:o}=e,n=`${r}/${t}`;return{accessToken:o,method:"POST",contentType:"application/json",url:n,origin:"commerceApiFetch",requestMetadata:{method:t}}};var Gp=(e,t)=>({...Sa(e,t),requestParams:eP(e)}),eP=e=>{let{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:c,page:u,perPage:s}=e;return{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:c,page:u,perPage:s}};var Hp=e=>({...Sa(e,"search/querySuggest"),requestParams:tP(e)}),tP=e=>{let{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:c}=e;return{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:c}};var we=e=>e.error!==void 0,Li=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...Mo(t,"listing"),...this.options})}async search(t){let r=Mo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...Gp(t,"recommendations"),...this.options})}async productSuggestions(t){let r=Mo(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=Hp(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=Mo(t,"facet");return this.query({...o,url:`${o.url}?type=${r}`,requestParams:{...o.requestParams,facetId:t?.facetId,facetQuery:t?.facetQuery,query:t?.query},...this.options})}async plan(t){let r=Mo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await No.call(t);if(r instanceof Error)return Zu(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function el(e,t="prod"){return`${Ie(e,t)}/rest/organizations/${e}/commerce/v2`}var Qi=e=>e;import{StringValue as cf}from"@coveo/bueno";import{Schema as rP,SchemaValidationError as oP,StringValue as Ca,RecordValue as nP,ArrayValue as aP}from"@coveo/bueno";var T=new Ca({required:!0,emptyAllowed:!1}),te=new Ca({required:!1,emptyAllowed:!1}),ce=new Ca({required:!0,emptyAllowed:!0}),Yp=new Ca({required:!1,emptyAllowed:!0}),Jp=new aP({each:T,required:!0}),Xp=new Ca({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Ne=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),de=(e,t)=>{if("required"in t)return{payload:new rP({value:t}).validate({value:e}).value};let n=new nP({options:{required:!0},values:t}).validate(e);if(n)throw new oP(n);return{payload:e}},R=(e,t)=>{try{return de(e,t)}catch(r){return{payload:e,error:Ne(r)}}},Ue=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return Zp(e,t,r,n,"Controller initialization error")},Me=(e,t,r,o)=>{let n=`Check the options of ${o}`;return Zp(e,t,r,n,"Controller initialization error")},Zp=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};import{ArrayValue as iP,BooleanValue as tf,RecordValue as cP,StringValue as xa,Value as sP}from"@coveo/bueno";var Lo="3.19.0-pre.25495db2ab",ef=["@coveo/atomic","@coveo/quantic"];var tl=()=>te,rf=()=>T,ao=h("configuration/updateBasicConfiguration",e=>R(e,{accessToken:te,environment:new xa({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:te})),of=h("configuration/updateSearchConfiguration",e=>R(e,{proxyBaseUrl:new xa({required:!1,url:!0}),pipeline:new xa({required:!1,emptyAllowed:!0}),searchHub:te,timezone:te,locale:te,authenticationProviders:new iP({required:!1,each:T})})),Qo={enabled:new tf({default:!0}),originContext:tl(),originLevel2:tl(),originLevel3:tl(),proxyBaseUrl:new xa({required:!1,url:!0}),runtimeEnvironment:new sP,anonymous:new tf({default:!1}),deviceId:te,userDisplayName:te,documentLocation:te,trackingId:te,analyticsMode:new xa({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new cP({options:{required:!1},values:ef.reduce((e,t)=>(e[t]=Xp,e),{})})},rl=h("configuration/updateAnalyticsConfiguration",e=>R(e,Qo)),Ui=h("configuration/analytics/disable"),Bi=h("configuration/analytics/enable"),nf=h("configuration/analytics/originlevel2",e=>R(e,{originLevel2:rf()})),af=h("configuration/analytics/originlevel3",e=>R(e,{originLevel3:rf()}));var Uo=h("commerce/configuration/updateBasicConfiguration",e=>R(e,{accessToken:te,environment:new cf({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:te})),Bo=h("commerce/configuration/updateProxyBaseUrl",e=>R(e,{proxyBaseUrl:new cf({required:!1,url:!0})})),jo=h("commerce/configuration/updateAnalyticsConfiguration",e=>R(e,{enabled:Qo.enabled,proxyBaseUrl:Qo.proxyBaseUrl,source:Qo.source,trackingId:Qo.trackingId})),ji=h("commerce/configuration/analytics/disable"),_i=h("commerce/configuration/analytics/enable");import{isNullOrUndefined as io}from"@coveo/bueno";var sf=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var ol=B(sf(),e=>e.addCase(Uo,(t,r)=>{uf(t,r.payload)}).addCase(ao,(t,r)=>{uf(t,r.payload)}).addCase(Bo,(t,r)=>{uP(t,r.payload)}).addCase(jo,(t,r)=>{lP(t,r.payload)}).addCase(ji,t=>{t.analytics.enabled=!1}).addCase(_i,t=>{t.analytics.enabled=!0}));function uf(e,t){io(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",io(t.organizationId)||(e.organizationId=t.organizationId)}function uP(e,t){io(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function lP(e,t){io(t.enabled)||(e.analytics.enabled=t.enabled),io(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),io(t.source)||(e.analytics.source=t.source),io(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function _o(e){return e.currency}var lf=(e,t)=>({currency:_o(t.commerceContext),products:dP(t.cart),transaction:e}),df=(e,t)=>({currency:_o(t.commerceContext),...e}),co=D(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),dP=D(co,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));import{ArrayValue as mP,NumberValue as mf,RecordValue as pP,Schema as fP,StringValue as gP}from"@coveo/bueno";var nl={productId:T,quantity:new mf({required:!0,min:0}),name:new gP({required:!1}),price:new mf({required:!1,min:0})},al=new mP({each:new pP({values:{...nl}})}),il={items:al},pf=new fP(il);var dr=h("commerce/cart/setItems",e=>R(e,al)),$o=h("commerce/cart/updateItemQuantity",e=>R(e,nl)),zo=h("commerce/cart/purchase"),$i=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=lf(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),zi=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=df(e,r()),{relay:n}=t;n.emit("ec.cartAction",o)});function z(e){let t,r=new Map,o=()=>r.size===0,n=a=>{try{let i=JSON.stringify(a),c=t!==i;return t=i,c}catch(i){return console.warn('Could not detect if state has changed, check the controller "get state method"',i),!0}};return{subscribe(a){a();let i=Symbol(),c;return o()&&(t=JSON.stringify(this.state),c=e.subscribe(()=>{n(this.state)&&r.forEach(u=>u())})),r.set(i,a),()=>{r.delete(i),o()&&c&&c()}},get state(){return{}}}}function ff(e,t){return e.cart[so(t)]}var gf=D(co,e=>e.reduce((t,r)=>t+r.quantity,0)),yf=D(co,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function yP(e,t={}){if(!hP(e))throw $;let{dispatch:r}=e,o=z(e),n=()=>e[L].cart,a={...t.initialState};Ue(e,pf,a,"buildCart"),a.items!==void 0&&r(dr(a.items));function i(l,d){return d?d.quantity!==l.quantity:!0}function c(l,d){return!d||l.quantity>d.quantity?"add":"remove"}function u(l,d){return d?l.name===d.name&&l.price===d.price&&l.quantity===d.quantity:!1}function s(l,d){let{quantity:p,...m}=l,f=c(l,d),g=d?Math.abs(p-d.quantity):p;return{action:f,quantity:g,product:m}}return{...o,empty:function(){for(let l of co(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r($i(l)),r(zo())},updateItemQuantity(l){let d=ff(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(zi(s(l,d))),r($o(l)))},get state(){let l=n();return{items:co(l),totalQuantity:gf(l),totalPrice:yf(l)}}}}function so(e){return`${e.productId},${e.name},${e.price}`}function hP(e){return e.addReducers({cart:Wo}),!0}var Wi=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),hf=e=>Cf(e.cartItems,e.cart),Sf=e=>Cf(e.purchasedItems,e.purchased);function Cf(e,t){let r=e.reduce((o,n)=>{let{productId:a,quantity:i}=t[n];return a in o||(o[a]={productId:a,quantity:0}),o[a].quantity+=i,o},{});return[...Object.values(r)]}var Wo=B(Wi(),e=>{e.addCase(dr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let c=so(i);return{cartItems:[...a.cartItems,c],cart:{...a.cart,[c]:i},purchasedItems:[],purchased:{}}},Wi());xf(t,n,o)}).addCase($o,(t,{payload:r})=>{let o=so(r);if(!(o in t.cart)){SP(r,t);return}if(r.quantity<=0){CP(r,t);return}t.cart[o]=r}).addCase(zo,t=>{xP(t);let{cart:r,cartItems:o}=Wi();xf(t,o,r)})});function xf(e,t,r){e.cartItems=t,e.cart=r}function SP(e,t){if(e.quantity<=0)return;let r=so(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function CP(e,t){let r=so(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function xP(e){for(let t of e.cartItems){if(t in e.purchased){e.purchased[t].quantity+=e.cart[t].quantity;continue}e.purchasedItems=[...e.purchasedItems,t],e.purchased[t]=e.cart[t]}}import{NumberValue as Rf,RecordValue as Ff,Schema as RP,StringValue as FP}from"@coveo/bueno";var PP=Intl.supportedValuesOf("currency"),AP=new FP({required:!0,emptyAllowed:!1,constrainTo:PP}),cl={url:T},sl={latitude:new Rf({min:-90,max:90,required:!0}),longitude:new Rf({min:-180,max:180,required:!0})},Ra={language:T,country:T,currency:AP,view:new Ff({options:{required:!0},values:cl}),location:new Ff({options:{required:!1},values:sl})},Pf=new RP(Ra);var ne=h("commerce/context/set",e=>R(e,Ra)),ae=h("commerce/context/setView",e=>R(e,cl)),Ko=h("commerce/context/setLocation",e=>R(e,sl));var Af=()=>({language:"",country:"",currency:"",view:{url:""}});var bt=B(Af(),e=>{e.addCase(ne,(t,{payload:r})=>r).addCase(ae,(t,{payload:r})=>{t.view=r}).addCase(Ko,(t,{payload:r})=>{t.location=r})});var Ki=()=>({correctedQuery:"",corrections:[],originalQuery:""});import{BooleanValue as VP,RecordValue as DP,StringValue as If}from"@coveo/bueno";var Xe=h("breadcrumb/deselectAll"),mr=h("breadcrumb/deselectAllNonBreadcrumbs");var pr=D(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${Lo}`));var fr=(e,t)=>{let{view:r,location:o,...n}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??el(e.configuration.organizationId,e.configuration.environment),organizationId:e.configuration.organizationId,trackingId:e.configuration.analytics.trackingId,...n,...e.configuration.analytics.enabled?{clientId:t.clientId}:{},context:{user:{...o,...t.userAgent?{userAgent:t.userAgent}:{}},view:{...r,...t.referrer?{referrer:t.referrer}:{}},capture:t.capture??e.configuration.analytics.enabled,cart:hf(e.cart),source:pr(e.configuration.analytics)}}};var Gi=(e,t,r)=>({...fr(e,t),...vP(e,r)}),vP=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};var Ze=(e,t)=>({...Gi(e,t),facets:[...bP(e)],...e.commerceSort&&{sort:IP(e.commerceSort.appliedSort)}});function bP(e){return!e.facetOrder||!e.commerceFacetSet?[]:e.facetOrder.filter(t=>e.commerceFacetSet?.[t]).map(t=>e.manualNumericFacetSet?.[t]?.manualRange?{facetId:t,field:t,numberOfValues:1,isFieldExpanded:!1,preventAutoSelect:!0,type:"numericalRange",values:[e.manualNumericFacetSet[t].manualRange],initialNumberOfValues:1}:e.commerceFacetSet[t].request).filter(t=>t&&t.values.length>0)}function IP(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}import{BooleanValue as ul,NumberValue as wP}from"@coveo/bueno";var uo=h("commerce/facets/core/updateNumberOfValues",e=>R(e,{facetId:T,numberOfValues:new wP({required:!0,min:1})})),lo=h("commerce/facets/core/updateIsFieldExpanded",e=>R(e,{facetId:T,isFieldExpanded:new ul({required:!0})})),se=h("commerce/facets/core/clearAll"),Ee=h("commerce/facets/core/deselectAllValues",e=>R(e,{facetId:T})),mo=h("commerce/facets/core/updateFreezeCurrentValues",e=>R(e,{facetId:T,freezeCurrentValues:new ul({required:!0})})),Go=h("commerce/facets/core/updateAutoSelectionForAll",e=>R(e,{allow:new ul({required:!0})}));import{NumberValue as vf}from"@coveo/bueno";var Hi={slotId:Yp},EP={...Hi,pageSize:new vf({required:!0,min:0})},Gt=h("commerce/pagination/setPageSize",e=>R(e,EP)),TP={...Hi,page:new vf({required:!0,min:0})},It=h("commerce/pagination/selectPage",e=>R(e,TP)),gr=h("commerce/pagination/nextPage",e=>R(e,Hi)),yr=h("commerce/pagination/previousPage",e=>R(e,Hi)),Ho=h("commerce/pagination/registerRecommendationsSlot",e=>R(e,{slotId:T}));import{StringValue as OP}from"@coveo/bueno";var ue=h("commerce/query/update",e=>R(e,{query:new OP}));import{isNullOrUndefined as bf}from"@coveo/bueno";import{RecordValue as qP,StringValue as kP}from"@coveo/bueno";var hr=h("commerce/triggers/query/updateIgnore",e=>R(e,{q:new kP({emptyAllowed:!0,required:!0})})),Yo=h("commerce/triggers/query/applyModification",e=>R(e,new qP({values:{originalQuery:te,modification:te}})));var Fa=class{constructor(t){this.config=t}async process(t){return this.processQueryErrorOrContinue(t)??await this.processQueryCorrectionsOrContinue(t)??await this.processQueryTriggersOrContinue(t)??this.processSuccessResponse(t)}async fetchFromAPI(t){let r=new Date().getTime(),o=await this.extra.apiClient.search(t),n=new Date().getTime()-r,a=this.getState().commerceQuery.query||"";return{response:o,duration:n,queryExecuted:a,requestExecuted:t}}processSuccessResponse(t){return{...t,response:this.getSuccessResponse(t),originalQuery:this.getCurrentQuery()}}processQueryErrorOrContinue(t){return we(t.response)?this.rejectWithValue(t.response.error):null}async processQueryCorrectionsOrContinue(t){let r=this.getState(),o=this.getSuccessResponse(t);if(!o||!r.didYouMean)return null;let{queryCorrection:n}=o;if(!(!bf(n)&&!bf(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:c}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:wp(r,o),originalQuery:c??""}}async processQueryTriggersOrContinue(t){let r=this.getSuccessResponse(t);if(!r)return null;let o=r.triggers.find(c=>c.type==="query")?.content||"";if(!o)return null;if(this.getState().triggers?.queryModification.queryToIgnore===o)return this.dispatch(hr({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(o);return we(i.response)?this.rejectWithValue(i.response.error):{...i,response:{...i.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t){return this.dispatch(Yo({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...Ze(this.getState(),this.navigatorContext),query:t})}get dispatch(){return this.config.dispatch}get rejectWithValue(){return this.config.rejectWithValue}getState(){return this.config.getState()}get navigatorContext(){return this.config.extra.navigatorContext}getCurrentQuery(){let t=this.getState();return t.commerceQuery.query!==void 0?t.commerceQuery.query:""}getSuccessResponse(t){return we(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(ue({query:t}))}};var K=_("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=Ze(o,n),i=Di(o),c=new Fa(t),u=await c.fetchFromAPI({...a,query:i});return c.process(u)}),Sr=_("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!vp(o))return null;let i=cr(o),u=fa(o)/i,s=Di(o),l=Ze(o,n),d=new Fa(t),p=await d.fetchFromAPI({...l,query:s,page:u});return d.process(p)}),Jo=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;R(e,{query:new If,clearFilters:new VP}),e.clearFilters&&(r(se()),r(mr())),r(Go({allow:!0})),r(ue({query:e.query})),r(It({page:0}))}),Xo=_("commerce/search/fetchInstantProducts",async(e,{getState:t,rejectWithValue:r,extra:o})=>{let n=t(),{apiClient:a,navigatorContext:i}=o,{q:c}=e,u=await a.productSuggestions({...fr(n,i),query:c});return we(u)?r(u.error):{response:{...u.success,products:u.success.products}}}),NP={child:new DP({options:{required:!0},values:{permanentid:new If({required:!0})}})},Zo=h("commerce/search/promoteChildToParent",e=>R(e,NP));function wf(){return{wasCorrectedTo:"",queryCorrection:Ki(),originalQuery:""}}var Yi=B(wf(),e=>{e.addCase(K.pending,t=>{t.queryCorrection=Ki(),t.wasCorrectedTo=""}).addCase(K.fulfilled,(t,r)=>{let{queryCorrection:o}=r.payload.response;t.originalQuery=r.payload.originalQuery,t.wasCorrectedTo=o?.correctedQuery??"",t.queryCorrection={correctedQuery:o?.correctedQuery??o?.corrections[0]?.correctedQuery??"",wordCorrections:o?.corrections[0]?.wordCorrections??[]}})});import{Value as Of,BooleanValue as Ef,ArrayValue as Xi,StringValue as Ji,NumberValue as Tf,RecordValue as _P}from"@coveo/bueno";var G=T;import{Value as MP,NumberValue as LP,StringValue as QP,ArrayValue as UP,BooleanValue as BP}from"@coveo/bueno";var jP={state:new MP({required:!0}),numberOfResults:new LP({required:!0,min:0}),value:new QP({required:!0,emptyAllowed:!0}),path:new UP({required:!0,each:T}),moreValuesAvailable:new BP({required:!1})};function Pa(e){e.children.forEach(t=>{Pa(t)}),de({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},jP)}var en={facetId:G,field:T,tabs:new _P({options:{required:!1},values:{included:new Xi({each:new Ji}),excluded:new Xi({each:new Ji})}}),activeTab:new Ji({required:!1}),delimitingCharacter:new Ji({required:!1,emptyAllowed:!0}),filterFacetCount:new Ef({required:!1}),injectionDepth:new Tf({required:!1,min:0}),numberOfValues:new Tf({required:!1,min:1}),sortCriteria:new Of({required:!1}),basePath:new Xi({required:!1,each:T}),filterByBasePath:new Ef({required:!1})},tn=5,qf=h("categoryFacet/register",e=>R(e,en)),kf=h("categoryFacet/toggleSelectValue",e=>{try{return de(e.facetId,T),Pa(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:Ne(t)}}}),Vf=h("categoryFacet/deselectAll",e=>R(e,en.facetId)),aL=h("categoryFacet/updateNumberOfValues",e=>R(e,{facetId:en.facetId,numberOfValues:en.numberOfValues})),iL=h("categoryFacet/updateSortCriterion",e=>R(e,{facetId:en.facetId,criterion:new Of})),cL=h("categoryFacet/updateBasePath",e=>R(e,{facetId:en.facetId,basePath:new Xi({each:T})}));import{NumberValue as KP,RecordValue as GP,ArrayValue as HP}from"@coveo/bueno";import{RecordValue as $P,NumberValue as zP,StringValue as WP}from"@coveo/bueno";var Aa={facetId:G,captions:new $P({options:{required:!1}}),numberOfValues:new zP({required:!1,min:1}),query:new WP({required:!1,emptyAllowed:!0})};var YP={path:new HP({required:!0,each:T}),displayValue:ce,rawValue:ce,count:new KP({required:!0,min:0})},et=h("categoryFacet/selectSearchResult",e=>R(e,{facetId:G,value:new GP({values:YP})})),Zi=h("categoryFacetSearch/register",e=>R(e,Aa));import{RecordValue as JP,NumberValue as XP}from"@coveo/bueno";var Df={facetId:G,value:new JP({values:{displayValue:ce,rawValue:ce,count:new XP({required:!0,min:0})}})},ec=h("facetSearch/register",e=>R(e,Aa)),Cr=h("facetSearch/update",e=>R(e,Aa)),Ke=h("facetSearch/toggleSelectValue",e=>R(e,Df)),pt=h("facetSearch/toggleExcludeValue",e=>R(e,Df));import{BooleanValue as ZP}from"@coveo/bueno";var Ht=h("facetOptions/update",(e={freezeFacetOrder:!0})=>R(e,{freezeFacetOrder:new ZP({required:!1})})),ll=h("facetOptions/facet/enable",e=>R(e,G)),Yt=h("facetOptions/facet/disable",e=>R(e,G));var eA=h("history/undo"),tA=h("history/redo"),wt=h("history/snapshot"),TL=_("history/back",async(e,{dispatch:t})=>{t(eA()),await t(fe())}),OL=_("history/forward",async(e,{dispatch:t})=>{t(tA()),await t(fe())}),fe=_("history/change",async(e,{getState:t})=>t().history.present);import{BooleanValue as Nf,StringValue as va,NumberValue as Mf,RecordValue as xr}from"@coveo/bueno";var tc={q:new va,enableQuerySyntax:new Nf,aq:new va,cq:new va,firstResult:new Mf({min:0}),numberOfResults:new Mf({min:0}),sortCriteria:new va,f:new xr,fExcluded:new xr,cf:new xr,nf:new xr,mnf:new xr,df:new xr,debug:new Nf,sf:new xr,tab:new va,af:new xr};var Fe=h("searchParameters/restore",e=>R(e,tc));import{BooleanValue as my,NumberValue as py,StringValue as pI}from"@coveo/bueno";function Jt(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function v(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function c(l){try{s(o.next(l))}catch(d){i(d)}}function u(l){try{s(o.throw(l))}catch(d){i(d)}}function s(l){l.done?a(l.value):n(l.value).then(c,u)}s((o=o.apply(e,t||[])).next())})}var H;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(H||(H={}));function pl(){return typeof window<"u"}function bl(){return typeof navigator<"u"}function rn(){return typeof document<"u"}function fl(){try{return typeof localStorage<"u"}catch{return!1}}function rA(){try{return typeof sessionStorage<"u"}catch{return!1}}function Jf(){return bl()&&navigator.cookieEnabled}var oA=[H.click,H.custom,H.search,H.view],nA=(e,t)=>oA.indexOf(e)!==-1?Object.assign({language:rn()?document.documentElement.lang:"unknown",userAgent:bl()?navigator.userAgent:"unknown"},t):t,wa=class e{static set(t,r,o){var n,a,i,c;o&&(a=new Date,a.setTime(a.getTime()+o)),c=window.location.hostname,c.indexOf(".")===-1?Lf(t,r,a):(i=c.split("."),n=i[i.length-2]+"."+i[i.length-1],Lf(t,r,a,n))}static get(t){for(var r=t+"=",o=document.cookie.split(";"),n=0;n<o.length;n++){var a=o[n];if(a=a.replace(/^\s+/,""),a.lastIndexOf(r,0)===0)return a.substring(r.length,a.length)}return null}static erase(t){e.set(t,"",-1)}};function Lf(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function aA(){return fl()?localStorage:Jf()?new Ea:rA()?sessionStorage:new nn}var Ea=class e{getItem(t){return wa.get(`${e.prefix}${t}`)}removeItem(t){wa.erase(`${e.prefix}${t}`)}setItem(t,r,o){wa.set(`${e.prefix}${t}`,r,o)}};Ea.prefix="coveo_";var gl=class{constructor(){this.cookieStorage=new Ea}getItem(t){return localStorage.getItem(t)||this.cookieStorage.getItem(t)}removeItem(t){this.cookieStorage.removeItem(t),localStorage.removeItem(t)}setItem(t,r){localStorage.setItem(t,r),this.cookieStorage.setItem(t,r,31556926e3)}},nn=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},ba="__coveo.analytics.history",Xf=20,Zf=1e3*60,eg=75,an=class{constructor(t){this.store=t||aA()}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){return v(this,void 0,void 0,function*(){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=yield this.getHistoryWithInternalTimeAsync();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])})}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){return v(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(ba);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return v(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(ba);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(ba,JSON.stringify(t.slice(0,Xf)))}catch{}}clear(){try{this.store.removeItem(ba)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((o,n)=>(n.internalTime||0)-(o.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,eg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Zf:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:o,time:n,value:a}=r;return{name:o,time:n,value:a}}):[]}stripEmptyQuery(t){let{name:r,time:o,value:n}=t;return r&&typeof n=="string"&&r.toLowerCase()==="query"&&n.trim()===""?{name:r,time:o}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}},tg=Object.freeze({__proto__:null,HistoryStore:an,MAX_NUMBER_OF_HISTORY_ELEMENTS:Xf,MAX_VALUE_SIZE:eg,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:Zf,STORE_KEY:ba,default:an}),iA=(e,t)=>v(void 0,void 0,void 0,function*(){return e===H.view?(yield cA(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),cA=e=>v(void 0,void 0,void 0,function*(){let t=new an,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),rc,sA=new Uint8Array(16);function uA(){if(!rc&&(rc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!rc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return rc(sA)}var lA=/^(?:[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 nc(e){return typeof e=="string"&&lA.test(e)}var Pe=[];for(let e=0;e<256;++e)Pe.push((e+256).toString(16).slice(1));function rg(e,t=0){return(Pe[e[t+0]]+Pe[e[t+1]]+Pe[e[t+2]]+Pe[e[t+3]]+"-"+Pe[e[t+4]]+Pe[e[t+5]]+"-"+Pe[e[t+6]]+Pe[e[t+7]]+"-"+Pe[e[t+8]]+Pe[e[t+9]]+"-"+Pe[e[t+10]]+Pe[e[t+11]]+Pe[e[t+12]]+Pe[e[t+13]]+Pe[e[t+14]]+Pe[e[t+15]]).toLowerCase()}function dA(e){if(!nc(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}function mA(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var pA="6ba7b810-9dad-11d1-80b4-00c04fd430c8",fA="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function gA(e,t,r){function o(n,a,i,c){var u;if(typeof n=="string"&&(n=mA(n)),typeof a=="string"&&(a=dA(a)),((u=a)===null||u===void 0?void 0:u.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let s=new Uint8Array(16+n.length);if(s.set(a),s.set(n,a.length),s=r(s),s[6]=s[6]&15|t,s[8]=s[8]&63|128,i){c=c||0;for(let l=0;l<16;++l)i[c+l]=s[l];return i}return rg(s)}try{o.name=e}catch{}return o.DNS=pA,o.URL=fA,o}var yA=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Qf={randomUUID:yA};function po(e,t,r){if(Qf.randomUUID&&!t&&!e)return Qf.randomUUID();e=e||{};let o=e.random||(e.rng||uA)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){r=r||0;for(let n=0;n<16;++n)t[r+n]=o[n];return t}return rg(o)}function hA(e,t,r,o){switch(e){case 0:return t&r^~t&o;case 1:return t^r^o;case 2:return t&r^t&o^r&o;case 3:return t^r^o}}function dl(e,t){return e<<t|e>>>32-t}function SA(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let i=unescape(encodeURIComponent(e));e=[];for(let c=0;c<i.length;++c)e.push(i.charCodeAt(c))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let o=e.length/4+2,n=Math.ceil(o/16),a=new Array(n);for(let i=0;i<n;++i){let c=new Uint32Array(16);for(let u=0;u<16;++u)c[u]=e[i*64+u*4]<<24|e[i*64+u*4+1]<<16|e[i*64+u*4+2]<<8|e[i*64+u*4+3];a[i]=c}a[n-1][14]=(e.length-1)*8/Math.pow(2,32),a[n-1][14]=Math.floor(a[n-1][14]),a[n-1][15]=(e.length-1)*8&4294967295;for(let i=0;i<n;++i){let c=new Uint32Array(80);for(let m=0;m<16;++m)c[m]=a[i][m];for(let m=16;m<80;++m)c[m]=dl(c[m-3]^c[m-8]^c[m-14]^c[m-16],1);let u=r[0],s=r[1],l=r[2],d=r[3],p=r[4];for(let m=0;m<80;++m){let f=Math.floor(m/20),g=dl(u,5)+hA(f,s,l,d)+p+t[f]+c[m]>>>0;p=d,d=l,l=dl(s,30)>>>0,s=u,u=g}r[0]=r[0]+u>>>0,r[1]=r[1]+s>>>0,r[2]=r[2]+l>>>0,r[3]=r[3]+d>>>0,r[4]=r[4]+p>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var CA=gA("v5",80,SA),Uf=CA,og="2.30.43",Bf=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Ia={pageview:"pageview",event:"event"},ac=class{constructor({client:t,uuidGenerator:r=po}){this.client=t,this.uuidGenerator=r}},yl=class extends ac{constructor({client:t,uuidGenerator:r=po}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Bf(window.location),this.lastReferrer=rn()?document.referrer:"",this.addHooks()}getApi(t){switch(t){case"setAction":return this.setAction;default:return null}}setAction(t,r){this.action=t,this.actionData=r}clearData(){this.clearPluginData(),this.action=void 0,this.actionData={}}getLocationInformation(t,r){return Object.assign({hitType:t},this.getNextValues(t,r))}updateLocationInformation(t,r){this.updateLocationForNextPageView(t,r)}getDefaultContextInformation(t){let r={title:rn()?document.title:"",encoding:rn()?document.characterSet:"UTF-8"},o={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},n={language:navigator.language,userAgent:navigator.userAgent},a={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},a),o),n),r)}updateLocationForNextPageView(t,r){let{pageViewId:o,referrer:n,location:a}=this.getNextValues(t,r);this.lastReferrer=n,this.pageViewId=o,this.currentLocation=a,t===Ia.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Ia.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Ia.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Ia.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=n=>n.replace(/^\/?(.*)$/,"/$1");return`${(n=>n.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return Bf(window.location)}},Rr=class e{constructor(t,r){if(!nc(t))throw Error("Not a valid uuid");this.clientId=t,this.creationDate=Math.floor(r/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime}validate(t,r){return!this.expired&&this.matchReferrer(t,r)}matchReferrer(t,r){try{let o=new URL(t);return r.some(n=>new RegExp(n.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(o.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[o,n]=r;if(o.length!==32||isNaN(parseInt(n)))return null;let a=o.substring(0,8)+"-"+o.substring(8,12)+"-"+o.substring(12,16)+"-"+o.substring(16,20)+"-"+o.substring(20,32);return nc(a)?new e(a,Number.parseInt(n)*1e3):null}};Rr.cvo_cid="cvo_cid";Rr.expirationTime=120;var hl=class extends ac{constructor({client:t,uuidGenerator:r=po}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return v(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),o=yield this.client.getCurrentVisitorId();return r.searchParams.set(Rr.cvo_cid,new Rr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};hl.Id="link";var tt=Object.keys;function oc(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var ml=128,ng=192,jf=224,_f=240;function xA(e){return(e&248)===_f?4:(e&_f)===jf?3:(e&jf)===ng?2:1}function RA(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 o=Number.parseInt(e.substring(r-2,r),16);if((o&ml)!=ml)break;if(r-=3,(o&ng)!=ml){t-r>=xA(o)*3&&(r=t);break}}return e.substring(0,r)}var Sl={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"},FA=tt(Sl).map(e=>Sl[e]),PA=[...FA].join("|"),AA=new RegExp(`^(${PA}$)`),vA={svcAction:"svc_action",svcActionData:"svc_action_data"},bA=e=>tt(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=Sl[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),IA=e=>AA.test(e),wA=[IA],$f={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},zf={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Te={action:"pa",list:"pal",listSource:"pls"},ic={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},EA=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Cl={id:"quoteId",affiliation:"quoteAffiliation"},xl={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},TA={add:Te,bookmark_add:Te,bookmark_remove:Te,click:Te,checkout:Te,checkout_option:Te,detail:Te,impression:Te,remove:Te,refund:Object.assign(Object.assign({},Te),ic),purchase:Object.assign(Object.assign({},Te),ic),quickview:Te,quote:Object.assign(Object.assign({},Te),Cl),review:Object.assign(Object.assign({},Te),xl)},OA=tt($f).map(e=>$f[e]),qA=tt(zf).map(e=>zf[e]),kA=tt(Te).map(e=>Te[e]),VA=tt(ic).map(e=>ic[e]),DA=tt(xl).map(e=>xl[e]),NA=tt(Cl).map(e=>Cl[e]),MA=[...OA,"custom"].join("|"),LA=[...qA,"custom"].join("|"),ag="(pr[0-9]+)",ig="(il[0-9]+pi[0-9]+)",QA=new RegExp(`^${ag}(${MA})$`),UA=new RegExp(`^(${ig}(${LA}))|(il[0-9]+nm)$`),BA=new RegExp(`^(${kA.join("|")})$`),jA=new RegExp(`^(${VA.join("|")})$`),_A=new RegExp(`^${ag}custom$`),$A=new RegExp(`^${ig}custom$`),zA=new RegExp(`^(${[...EA,...DA,...NA].join("|")})$`),WA=e=>QA.test(e),KA=e=>UA.test(e),GA=e=>BA.test(e),HA=e=>jA.test(e),YA=e=>zA.test(e),JA=[KA,WA,GA,HA,YA],XA=[_A,$A],ZA={anonymizeIp:"aip"},ev={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},tv={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},rv=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],ov=Object.assign(Object.assign(Object.assign(Object.assign({},ZA),ev),tv),rv.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Rl=Object.assign(Object.assign({},ov),vA),nv=e=>{let t=!!e.action&&TA[e.action]||{};return tt(e).reduce((r,o)=>{let n=t[o]||Rl[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},av=tt(Rl).map(e=>Rl[e]),iv=e=>av.indexOf(e)!==-1,cv=e=>e==="custom",sv=e=>[...JA,...wA,iv,cv].some(t=>t(e)),uv=e=>tt(e).reduce((t,r)=>{let o=lv(r);return o?Object.assign(Object.assign({},t),dv(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),lv=e=>{let t;return[...XA].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},dv=(e,t)=>tt(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),Fl=class{constructor(t){this.opts=t}sendEvent(t,r){return v(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:o,preprocessRequest:n}=this.opts,a=yield this.getQueryParamsForEventType(t),{url:i,payload:c}=yield this.preProcessRequestAsPotentialJSONString(`${o}/analytics/${t}?${a}`,r,n),u=this.encodeForEventType(t,c),s=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,s)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,o){return v(this,void 0,void 0,function*(){let n=t,a=r;if(o){let i=yield o({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:c,body:u}=i;n=c||t;try{a=JSON.parse(u)}catch(s){console.error("Unable to process the request body as a JSON string",s)}}return{payload:a,url:n}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return v(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:o}=this.opts,n=yield o.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",n?`visitorId=${n}`:"","discardVisitInfo=true"].filter(a=>!!a).join("&")})}isEventTypeLegacy(t){return[H.click,H.custom,H.search,H.view].indexOf(t)!==-1}encodeEventToJson(t,r,o){let n=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return o&&(n=`access_token=${encodeURIComponent(o)}&${n}`),n}},Pl=class{sendEvent(t,r){return v(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return v(this,void 0,void 0,function*(){return Promise.resolve()})}},Wf=globalThis.fetch,cc=class{constructor(t){this.opts=t}sendEvent(t,r){return v(this,void 0,void 0,function*(){let{baseUrl:o,visitorIdProvider:n,preprocessRequest:a}=this.opts,i=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",c={url:`${o}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},c),a?yield a(c,"analyticsFetch"):{}),{url:s}=u,l=Jt(u,["url"]),d;try{d=yield Wf(s,l)}catch(p){console.error("An error has occured when sending the event.",p);return}if(d.ok){let p=yield d.json();return p.visitorId&&n.setCurrentVisitorId(p.visitorId),p}else{try{d.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,d,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return v(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Wf(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[H.click,H.custom,H.search,H.view].indexOf(t)!==-1}getVisitorIdParam(){return v(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},Al=class{constructor(t,r){fl()&&Jf()?this.storage=new gl:fl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new nn),this.client=new cc(t),this.beaconClient=new Fl(t),window.addEventListener("beforeunload",()=>{let o=r();for(let{eventType:n,payload:a}of o)this.beaconClient.sendEvent(n,a)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},vl=class{constructor(t,r){this.storage=r||new nn,this.client=new cc(t)}getClientDependingOnEventType(t){return this.client}},sc=class{constructor(){this.storage=new nn,this.client=new Pl}getClientDependingOnEventType(t){return this.client}},mv="xx",pv=e=>e?.startsWith(mv)||!1,fv=`
|
|
19
|
+
If you are trying to access the inner state... Don't`),Reflect.get(t,r,o)}});import{isNullOrUndefined as aF}from"@coveo/bueno";function xe(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var yR=typeof Symbol=="function"&&Symbol.observable||"@@observable",Tm=yR,Ru=()=>Math.random().toString(36).substring(7).split("").join("."),hR={INIT:`@@redux/INIT${Ru()}`,REPLACE:`@@redux/REPLACE${Ru()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ru()}`},yi=hR;function Rt(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function Fu(e,t,r){if(typeof e!="function")throw new Error(xe(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(xe(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(xe(1));return r(Fu)(e,t)}let o=e,n=t,a=new Map,i=a,c=0,u=!1;function s(){i===a&&(i=new Map,a.forEach((S,x)=>{i.set(x,S)}))}function l(){if(u)throw new Error(xe(3));return n}function d(S){if(typeof S!="function")throw new Error(xe(4));if(u)throw new Error(xe(5));let x=!0;s();let y=c++;return i.set(y,S),function(){if(x){if(u)throw new Error(xe(6));x=!1,s(),i.delete(y),a=null}}}function p(S){if(!Rt(S))throw new Error(xe(7));if(typeof S.type>"u")throw new Error(xe(8));if(typeof S.type!="string")throw new Error(xe(17));if(u)throw new Error(xe(9));try{u=!0,n=o(n,S)}finally{u=!1}return(a=i).forEach(y=>{y()}),S}function m(S){if(typeof S!="function")throw new Error(xe(10));o=S,p({type:yi.REPLACE})}function f(){let S=d;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(xe(11));function y(){let P=x;P.next&&P.next(l())}return y(),{unsubscribe:S(y)}},[Tm](){return this}}}return p({type:yi.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[Tm]:f}}function SR(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:yi.INIT})>"u")throw new Error(xe(12));if(typeof r(void 0,{type:yi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(xe(13))})}function Eo(e){let t=Object.keys(e),r={};for(let i=0;i<t.length;i++){let c=t[i];typeof e[c]=="function"&&(r[c]=e[c])}let o=Object.keys(r),n,a;try{SR(r)}catch(i){a=i}return function(c={},u){if(a)throw a;let s=!1,l={};for(let d=0;d<o.length;d++){let p=o[d],m=r[p],f=c[p],g=m(f,u);if(typeof g>"u"){let S=u&&u.type;throw new Error(xe(14))}l[p]=g,s=s||g!==f}return s=s||o.length!==Object.keys(c).length,s?l:c}}function To(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function Om(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(xe(15))},i={getState:n.getState,dispatch:(u,...s)=>a(u,...s)},c=e.map(u=>u(i));return a=To(...c)(n.dispatch),{...n,dispatch:a}}}function hi(e){return Rt(e)&&"type"in e&&typeof e.type=="string"}var qu=Symbol.for("immer-nothing"),ta=Symbol.for("immer-draftable"),Le=Symbol.for("immer-state");function Re(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Hr=Object.getPrototypeOf;function ze(e){return!!e&&!!e[Le]}function Qe(e){return e?Nm(e)||Array.isArray(e)||!!e[ta]||!!e.constructor?.[ta]||ia(e)||ca(e):!1}var CR=Object.prototype.constructor.toString();function Nm(e){if(!e||typeof e!="object")return!1;let t=Hr(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===CR}function ku(e){return ze(e)||Re(15,e),e[Le].base_}function ra(e,t){Yr(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function Yr(e){let t=e[Le];return t?t.type_:Array.isArray(e)?1:ia(e)?2:ca(e)?3:0}function oa(e,t){return Yr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Pu(e,t){return Yr(e)===2?e.get(t):e[t]}function Mm(e,t,r){let o=Yr(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function xR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ia(e){return e instanceof Map}function ca(e){return e instanceof Set}function Gr(e){return e.copy_||e.base_}function bu(e,t){if(ia(e))return new Map(e);if(ca(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Nm(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[Le];let n=Reflect.ownKeys(o);for(let a=0;a<n.length;a++){let i=n[a],c=o[i];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(o[i]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[i]})}return Object.create(Hr(e),o)}else{let o=Hr(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function xi(e,t=!1){return Ri(e)||ze(e)||!Qe(e)||(Yr(e)>1&&(e.set=e.add=e.clear=e.delete=RR),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>xi(o,!0))),e}function RR(){Re(2)}function Ri(e){return Object.isFrozen(e)}var Iu={};function Jr(e){let t=Iu[e];return t||Re(0,e),t}function FR(e,t){Iu[e]||(Iu[e]=t)}var na;function Lm(){return na}function PR(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function qm(e,t){t&&(Jr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function wu(e){Eu(e),e.drafts_.forEach(AR),e.drafts_=null}function Eu(e){e===na&&(na=e.parent_)}function km(e){return na=PR(na,e)}function AR(e){let t=e[Le];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Vm(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Le].modified_&&(wu(t),Re(4)),Qe(e)&&(e=Si(t,e),t.parent_||Ci(t,e)),t.patches_&&Jr("Patches").generateReplacementPatches_(r[Le].base_,e,t.patches_,t.inversePatches_)):e=Si(t,r,[]),wu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==qu?e:void 0}function Si(e,t,r){if(Ri(t))return t;let o=t[Le];if(!o)return ra(t,(n,a)=>Dm(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return Ci(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;let n=o.copy_,a=n,i=!1;o.type_===3&&(a=new Set(n),n.clear(),i=!0),ra(a,(c,u)=>Dm(e,o,n,c,u,r,i)),Ci(e,n,!1),r&&e.patches_&&Jr("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function Dm(e,t,r,o,n,a,i){if(ze(n)){let c=a&&t&&t.type_!==3&&!oa(t.assigned_,o)?a.concat(o):void 0,u=Si(e,n,c);if(Mm(r,o,u),ze(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(Qe(n)&&!Ri(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Si(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&Ci(e,n)}}function Ci(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&xi(t,r)}function vR(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:Lm(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=Vu;r&&(n=[o],a=aa);let{revoke:i,proxy:c}=Proxy.revocable(n,a);return o.draft_=c,o.revoke_=i,c}var Vu={get(e,t){if(t===Le)return e;let r=Gr(e);if(!oa(r,t))return bR(e,r,t);let o=r[t];return e.finalized_||!Qe(o)?o:o===Au(e.base_,t)?(vu(e),e.copy_[t]=Ou(o,e)):o},has(e,t){return t in Gr(e)},ownKeys(e){return Reflect.ownKeys(Gr(e))},set(e,t,r){let o=Qm(Gr(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=Au(Gr(e),t),a=n?.[Le];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(xR(r,n)&&(r!==void 0||oa(e.base_,t)))return!0;vu(e),Tu(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return Au(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,vu(e),Tu(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Gr(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){Re(11)},getPrototypeOf(e){return Hr(e.base_)},setPrototypeOf(){Re(12)}},aa={};ra(Vu,(e,t)=>{aa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});aa.deleteProperty=function(e,t){return aa.set.call(this,e,t,void 0)};aa.set=function(e,t,r){return Vu.set.call(this,e[0],t,r,e[0])};function Au(e,t){let r=e[Le];return(r?Gr(r):e)[t]}function bR(e,t,r){let o=Qm(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function Qm(e,t){if(!(t in e))return;let r=Hr(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Hr(r)}}function Tu(e){e.modified_||(e.modified_=!0,e.parent_&&Tu(e.parent_))}function vu(e){e.copy_||(e.copy_=bu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var IR=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,o)=>{if(typeof t=="function"&&typeof r!="function"){let a=r;r=t;let i=this;return function(u=a,...s){return i.produce(u,l=>r.call(this,l,...s))}}typeof r!="function"&&Re(6),o!==void 0&&typeof o!="function"&&Re(7);let n;if(Qe(t)){let a=km(this),i=Ou(t,void 0),c=!0;try{n=r(i),c=!1}finally{c?wu(a):Eu(a)}return qm(a,o),Vm(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===qu&&(n=void 0),this.autoFreeze_&&xi(n,!0),o){let a=[],i=[];Jr("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else Re(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(i,...c)=>this.produceWithPatches(i,u=>t(u,...c));let o,n;return[this.produce(t,r,(i,c)=>{o=i,n=c}),o,n]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Qe(e)||Re(8),ze(e)&&(e=Um(e));let t=km(this),r=Ou(e,void 0);return r[Le].isManual_=!0,Eu(t),r}finishDraft(e,t){let r=e&&e[Le];(!r||!r.isManual_)&&Re(9);let{scope_:o}=r;return qm(o,t),Vm(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let n=t[r];if(n.path.length===0&&n.op==="replace"){e=n.value;break}}r>-1&&(t=t.slice(r+1));let o=Jr("Patches").applyPatches_;return ze(e)?o(e,t):this.produce(e,n=>o(n,t))}};function Ou(e,t){let r=ia(e)?Jr("MapSet").proxyMap_(e,t):ca(e)?Jr("MapSet").proxySet_(e,t):vR(e,t);return(t?t.scope_:Lm()).drafts_.push(r),r}function Um(e){return ze(e)||Re(10,e),Bm(e)}function Bm(e){if(!Qe(e)||Ri(e))return e;let t=e[Le],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=bu(e,t.scope_.immer_.useStrictShallowCopy_)}else r=bu(e,!0);return ra(r,(o,n)=>{Mm(r,o,Bm(n))}),t&&(t.finalized_=!1),r}function jm(){let t="replace",r="add",o="remove";function n(p,m,f,g){switch(p.type_){case 0:case 2:return i(p,m,f,g);case 1:return a(p,m,f,g);case 3:return c(p,m,f,g)}}function a(p,m,f,g){let{base_:S,assigned_:x}=p,y=p.copy_;y.length<S.length&&([S,y]=[y,S],[f,g]=[g,f]);for(let C=0;C<S.length;C++)if(x[C]&&y[C]!==S[C]){let P=m.concat([C]);f.push({op:t,path:P,value:d(y[C])}),g.push({op:t,path:P,value:d(S[C])})}for(let C=S.length;C<y.length;C++){let P=m.concat([C]);f.push({op:r,path:P,value:d(y[C])})}for(let C=y.length-1;S.length<=C;--C){let P=m.concat([C]);g.push({op:o,path:P})}}function i(p,m,f,g){let{base_:S,copy_:x}=p;ra(p.assigned_,(y,C)=>{let P=Pu(S,y),O=Pu(x,y),A=C?oa(S,y)?t:r:o;if(P===O&&A===t)return;let F=m.concat(y);f.push(A===o?{op:A,path:F}:{op:A,path:F,value:O}),g.push(A===r?{op:o,path:F}:A===o?{op:r,path:F,value:d(P)}:{op:t,path:F,value:d(P)})})}function c(p,m,f,g){let{base_:S,copy_:x}=p,y=0;S.forEach(C=>{if(!x.has(C)){let P=m.concat([y]);f.push({op:o,path:P,value:C}),g.unshift({op:r,path:P,value:C})}y++}),y=0,x.forEach(C=>{if(!S.has(C)){let P=m.concat([y]);f.push({op:r,path:P,value:C}),g.unshift({op:o,path:P,value:C})}y++})}function u(p,m,f,g){f.push({op:t,path:[],value:m===qu?void 0:m}),g.push({op:t,path:[],value:p})}function s(p,m){return m.forEach(f=>{let{path:g,op:S}=f,x=p;for(let O=0;O<g.length-1;O++){let A=Yr(x),F=g[O];typeof F!="string"&&typeof F!="number"&&(F=""+F),(A===0||A===1)&&(F==="__proto__"||F==="constructor")&&Re(19),typeof x=="function"&&F==="prototype"&&Re(19),x=Pu(x,F),typeof x!="object"&&Re(18,g.join("/"))}let y=Yr(x),C=l(f.value),P=g[g.length-1];switch(S){case t:switch(y){case 2:return x.set(P,C);case 3:Re(16);default:return x[P]=C}case r:switch(y){case 1:return P==="-"?x.push(C):x.splice(P,0,C);case 2:return x.set(P,C);case 3:return x.add(C);default:return x[P]=C}case o:switch(y){case 1:return x.splice(P,1);case 2:return x.delete(P);case 3:return x.delete(f.value);default:return delete x[P]}default:Re(17,S)}}),p}function l(p){if(!Qe(p))return p;if(Array.isArray(p))return p.map(l);if(ia(p))return new Map(Array.from(p.entries()).map(([f,g])=>[f,l(g)]));if(ca(p))return new Set(Array.from(p).map(l));let m=Object.create(Hr(p));for(let f in p)m[f]=l(p[f]);return oa(p,ta)&&(m[ta]=p[ta]),m}function d(p){return ze(p)?l(p):p}FR("Patches",{applyPatches_:s,generatePatches_:n,generateReplacementPatches_:u})}var We=new IR,zt=We.produce,Fi=We.produceWithPatches.bind(We),eV=We.setAutoFreeze.bind(We),tV=We.setUseStrictShallowCopy.bind(We),Du=We.applyPatches.bind(We),rV=We.createDraft.bind(We),oV=We.finishDraft.bind(We);function wR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function ER(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function TR(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(o=>typeof o=="function"?`function ${o.name||"unnamed"}()`:typeof o).join(", ");throw new TypeError(`${t}[${r}]`)}}var _m=e=>Array.isArray(e)?e:[e];function OR(e){let t=Array.isArray(e[0])?e[0]:e;return TR(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function qR(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var iV=Symbol();var cV=Object.getPrototypeOf({});var kR=class{constructor(e){this.value=e}deref(){return this.value}},VR=typeof WeakRef<"u"?WeakRef:kR,DR=0,$m=1;function Pi(){return{s:DR,v:void 0,o:null,p:null}}function Oo(e,t={}){let r=Pi(),{resultEqualityCheck:o}=t,n,a=0;function i(){let c=r,{length:u}=arguments;for(let d=0,p=u;d<p;d++){let m=arguments[d];if(typeof m=="function"||typeof m=="object"&&m!==null){let f=c.o;f===null&&(c.o=f=new WeakMap);let g=f.get(m);g===void 0?(c=Pi(),f.set(m,c)):c=g}else{let f=c.p;f===null&&(c.p=f=new Map);let g=f.get(m);g===void 0?(c=Pi(),f.set(m,c)):c=g}}let s=c,l;if(c.s===$m)l=c.v;else if(l=e.apply(null,arguments),a++,o){let d=n?.deref?.()??n;d!=null&&o(d,l)&&(l=d,a!==0&&a--),n=typeof l=="object"&&l!==null||typeof l=="function"?new VR(l):l}return s.s=$m,s.v=l,l}return i.clearCache=()=>{r=Pi(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function zm(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...n)=>{let a=0,i=0,c,u={},s=n.pop();typeof s=="object"&&(u=s,s=n.pop()),wR(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=Oo,argsMemoizeOptions:f=[],devModeChecks:g={}}=l,S=_m(p),x=_m(f),y=OR(n),C=d(function(){return a++,s.apply(null,arguments)},...S),P=!0,O=m(function(){i++;let F=qR(y,arguments);return c=C.apply(null,F),c},...x);return Object.assign(O,{resultFunc:s,memoizedResultFunc:C,dependencies:y,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>c,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var D=zm(Oo),NR=Object.assign((e,t=D)=>{ER(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),o=r.map(a=>e[a]);return t(o,(...a)=>a.reduce((i,c,u)=>(i[r[u]]=c,i),{}))},{withTypes:()=>NR});function Wm(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var Km=Wm(),Gm=Wm;var MR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?To:To.apply(null,arguments)},hV=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},LR=e=>e&&typeof e.match=="function";function h(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(dt(0));return{type:e,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:e,payload:o[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=o=>hi(o)&&o.type===e,r}var Zm=class sa extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,sa.prototype)}static get[Symbol.species](){return sa}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new sa(...t[0].concat(this)):new sa(...t.concat(this))}};function Hm(e){return Qe(e)?zt(e,()=>{}):e}function Ym(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function QR(e){return typeof e=="boolean"}var UR=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new Zm;return r&&(QR(r)?i.push(Km):i.push(Gm(r.extraArgument))),i},ir="RTK_autoBatch",ko=()=>e=>({payload:e,meta:{[ir]:!0}}),Jm=e=>t=>{setTimeout(t,e)},BR=(e={type:"raf"})=>t=>(...r)=>{let o=t(...r),n=!0,a=!1,i=!1,c=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:Jm(10):e.type==="callback"?e.queueNotification:Jm(e.timeout),s=()=>{i=!1,a&&(a=!1,c.forEach(l=>l()))};return Object.assign({},o,{subscribe(l){let d=()=>n&&l(),p=o.subscribe(d);return c.add(l),()=>{p(),c.delete(l)}},dispatch(l){try{return n=!l?.meta?.[ir],a=!n,a&&(i||(i=!0,u(s))),o.dispatch(l)}finally{n=!0}}})},jR=e=>function(r){let{autoBatch:o=!0}=r??{},n=new Zm(e);return o&&n.push(BR(typeof o=="object"?o:void 0)),n};function ep(e){let t=UR(),{reducer:r=void 0,middleware:o,devTools:n=!0,preloadedState:a=void 0,enhancers:i=void 0}=e||{},c;if(typeof r=="function")c=r;else if(Rt(r))c=Eo(r);else throw new Error(dt(1));let u;typeof o=="function"?u=o(t):u=t();let s=To;n&&(s=MR({trace:!1,...typeof n=="object"&&n}));let l=Om(...u),d=jR(l),p=typeof i=="function"?i(d):d(),m=s(...p);return Fu(c,a,m)}function tp(e){let t={},r=[],o,n={addCase(a,i){let c=typeof a=="string"?a:a.type;if(!c)throw new Error(dt(28));if(c in t)throw new Error(dt(29));return t[c]=i,n},addMatcher(a,i){return r.push({matcher:a,reducer:i}),n},addDefaultCase(a){return o=a,n}};return e(n),[t,r,o]}function _R(e){return typeof e=="function"}function B(e,t){let[r,o,n]=tp(t),a;if(_R(e))a=()=>Hm(e());else{let c=Hm(e);a=()=>c}function i(c=a(),u){let s=[r[u.type],...o.filter(({matcher:l})=>l(u)).map(({reducer:l})=>l)];return s.filter(l=>!!l).length===0&&(s=[n]),s.reduce((l,d)=>{if(d)if(ze(l)){let m=d(l,u);return m===void 0?l:m}else{if(Qe(l))return zt(l,p=>d(p,u));{let p=d(l,u);if(p===void 0){if(l===null)return l;throw Error("A case reducer on a non-draftable value must not return undefined")}return p}}return l},c)}return i.getInitialState=a,i}var rp=(e,t)=>LR(e)?e.match(t):e(t);function Ft(...e){return t=>e.some(r=>rp(r,t))}function qo(...e){return t=>e.every(r=>rp(r,t))}function vi(e,t){if(!e||!e.meta)return!1;let r=typeof e.meta.requestId=="string",o=t.indexOf(e.meta.requestStatus)>-1;return r&&o}function ua(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function bi(...e){return e.length===0?t=>vi(t,["pending"]):ua(e)?Ft(...e.map(t=>t.pending)):bi()(e[0])}function Xr(...e){return e.length===0?t=>vi(t,["rejected"]):ua(e)?Ft(...e.map(t=>t.rejected)):Xr()(e[0])}function la(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?qo(Xr(...e),t):ua(e)?qo(Xr(...e),t):la()(e[0])}function Wt(...e){return e.length===0?t=>vi(t,["fulfilled"]):ua(e)?Ft(...e.map(t=>t.fulfilled)):Wt()(e[0])}function Ii(...e){return e.length===0?t=>vi(t,["pending","fulfilled","rejected"]):ua(e)?Ft(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ii()(e[0])}var $R="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",wi=(e=21)=>{let t="",r=e;for(;r--;)t+=$R[Math.random()*64|0];return t},zR=["name","message","stack","code"],Nu=class{constructor(e,t){be(this,"_type");this.payload=e,this.meta=t}},Xm=class{constructor(e,t){be(this,"_type");this.payload=e,this.meta=t}},WR=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of zR)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},_=(()=>{function e(t,r,o){let n=h(t+"/fulfilled",(u,s,l,d)=>({payload:u,meta:{...d||{},arg:l,requestId:s,requestStatus:"fulfilled"}})),a=h(t+"/pending",(u,s,l)=>({payload:void 0,meta:{...l||{},arg:s,requestId:u,requestStatus:"pending"}})),i=h(t+"/rejected",(u,s,l,d,p)=>({payload:d,error:(o&&o.serializeError||WR)(u||"Rejected"),meta:{...p||{},arg:l,requestId:s,rejectedWithValue:!!d,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function c(u){return(s,l,d)=>{let p=o?.idGenerator?o.idGenerator(u):wi(),m=new AbortController,f,g;function S(y){g=y,m.abort()}let x=async function(){let y;try{let P=o?.condition?.(u,{getState:l,extra:d});if(GR(P)&&(P=await P),P===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let O=new Promise((A,F)=>{f=()=>{F({name:"AbortError",message:g||"Aborted"})},m.signal.addEventListener("abort",f)});s(a(p,u,o?.getPendingMeta?.({requestId:p,arg:u},{getState:l,extra:d}))),y=await Promise.race([O,Promise.resolve(r(u,{dispatch:s,getState:l,extra:d,requestId:p,signal:m.signal,abort:S,rejectWithValue:(A,F)=>new Nu(A,F),fulfillWithValue:(A,F)=>new Xm(A,F)})).then(A=>{if(A instanceof Nu)throw A;return A instanceof Xm?n(A.payload,p,u,A.meta):n(A,p,u)})])}catch(P){y=P instanceof Nu?i(null,p,u,P.payload,P.meta):i(P,p,u)}finally{f&&m.signal.removeEventListener("abort",f)}return o&&!o.dispatchConditionRejection&&i.match(y)&&y.meta.condition||s(y),y}();return Object.assign(x,{abort:S,requestId:p,arg:u,unwrap(){return x.then(KR)}})}}return Object.assign(c,{pending:a,rejected:i,fulfilled:n,settled:Ft(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function KR(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function GR(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var op=Symbol.for("rtk-slice-createasyncthunk"),FV={[op]:_};function HR(e,t){return`${e}/${t}`}function YR({creators:e}={}){let t=e?.asyncThunk?.[op];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(dt(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(XR()):o.reducers)||{},c=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(y,C){let P=typeof y=="string"?y:y.type;if(!P)throw new Error(dt(12));if(P in u.sliceCaseReducersByType)throw new Error(dt(13));return u.sliceCaseReducersByType[P]=C,s},addMatcher(y,C){return u.sliceMatchers.push({matcher:y,reducer:C}),s},exposeAction(y,C){return u.actionCreators[y]=C,s},exposeCaseReducer(y,C){return u.sliceCaseReducersByName[y]=C,s}};c.forEach(y=>{let C=i[y],P={reducerName:y,type:HR(n,y),createNotation:typeof o.reducers=="function"};eF(C)?rF(P,C,s,t):ZR(P,C,s)});function l(){let[y={},C=[],P=void 0]=typeof o.extraReducers=="function"?tp(o.extraReducers):[o.extraReducers],O={...y,...u.sliceCaseReducersByType};return B(o.initialState,A=>{for(let F in O)A.addCase(F,O[F]);for(let F of u.sliceMatchers)A.addMatcher(F.matcher,F.reducer);for(let F of C)A.addMatcher(F.matcher,F.reducer);P&&A.addDefaultCase(P)})}let d=y=>y,p=new Map,m;function f(y,C){return m||(m=l()),m(y,C)}function g(){return m||(m=l()),m.getInitialState()}function S(y,C=!1){function P(A){let F=A[y];return typeof F>"u"&&C&&(F=g()),F}function O(A=d){let F=Ym(p,C,()=>new WeakMap);return Ym(F,A,()=>{let E={};for(let[I,q]of Object.entries(o.selectors??{}))E[I]=JR(q,A,g,C);return E})}return{reducerPath:y,getSelectors:O,get selectors(){return O(P)},selectSlice:P}}let x={name:n,reducer:f,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:g,...S(a),injectInto(y,{reducerPath:C,...P}={}){let O=C??a;return y.inject({reducerPath:O,reducer:f},P),{...x,...S(O,!0)}}};return x}}function JR(e,t,r,o){function n(a,...i){let c=t(a);return typeof c>"u"&&o&&(c=r()),e(c,...i)}return n.unwrapped=e,n}var Zr=YR();function XR(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function ZR({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!tF(o))throw new Error(dt(17));a=o.reducer,i=o.prepare}else a=o;n.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?h(e,i):h(e))}function eF(e){return e._reducerDefinitionType==="asyncThunk"}function tF(e){return e._reducerDefinitionType==="reducerWithPrepare"}function rF({type:e,reducerName:t},r,o,n){if(!n)throw new Error(dt(18));let{payloadCreator:a,fulfilled:i,pending:c,rejected:u,settled:s,options:l}=r,d=n(e,a,l);o.exposeAction(t,d),i&&o.addCase(d.fulfilled,i),c&&o.addCase(d.pending,c),u&&o.addCase(d.rejected,u),s&&o.addMatcher(d.settled,s),o.exposeCaseReducer(t,{fulfilled:i||Ai,pending:c||Ai,rejected:u||Ai,settled:s||Ai})}function Ai(){}var np="listener",ap="completed",ip="cancelled",PV=`task-${ip}`,AV=`task-${ap}`,vV=`${np}-${ip}`,bV=`${np}-${ap}`;var{assign:cp}=Object;var Mu="listenerMiddleware";var oF=cp(h(`${Mu}/add`),{withTypes:()=>oF}),IV=h(`${Mu}/removeAll`),nF=cp(h(`${Mu}/remove`),{withTypes:()=>nF});var wV=Symbol.for("rtk-state-proxy-original");function dt(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. `}var cr=D(e=>e.commercePagination?.principal.perPage||0,e=>e),Ei=D((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),sr=D(e=>e.commercePagination?.principal.totalEntries||0,e=>e),Ti=D((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),Oi=D(e=>e.commercePagination?.principal.page||0,e=>e),sp=D((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var UV=D(e=>e[L].productListing.responseId,e=>e),da=D(e=>e.productListing.responseId,e=>e),up=D(e=>e.productListing.requestId,e=>e),ma=D(e=>e.productListing?.products.length||0,e=>e),lp=D(e=>({total:sr(e),current:ma(e)}),({current:e,total:t})=>e<t),dp=D(e=>e.productListing?.isLoading,e=>aF(e)?!1:e),mp=D(e=>e.productListing?.error,e=>e??null);import{isNullOrUndefined as Pp}from"@coveo/bueno";function Lu(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function Qu(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{sortCriteria:o}:{}}function Pt(e,t,r,o){if(e===void 0)return{};let n=Object.entries(e).filter(([a])=>t(a)).map(([a,{request:i}])=>{let c=r(i);return c.length?{[a]:c}:{}}).reduce((a,i)=>({...a,...i}),{});return Object.keys(n).length?{[o]:n}:{}}function At(e){let{activeValue:t,ancestryMap:r}=cF(e);return t?sF(t,r):[]}function cF(e){let t=[...e],r=new Map;for(;t.length>0;){let o=t.shift();if(o.state==="selected")return{activeValue:o,ancestryMap:r};if(r)for(let n of o.children)r.set(n,o);t.unshift(...o.children)}return{}}function sF(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function pp(){return{principal:ur(),recommendations:{}}}function ur(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}import{ArrayValue as dF,EnumValue as yp,StringValue as hp,RecordValue as Sp}from"@coveo/bueno";import{ArrayValue as uF,EnumValue as fp,RecordValue as gp,StringValue as lF}from"@coveo/bueno";var mt=(r=>(r.Relevance="relevance",r.Fields="fields",r))(mt||{}),eo=(r=>(r.Ascending="asc",r.Descending="desc",r))(eo||{}),vt=()=>({by:"relevance"});var zV=new gp({options:{required:!1},values:{by:new fp({enum:mt,required:!0}),fields:new uF({each:new gp({values:{name:new lF,direction:new fp({enum:eo})}})})}});var qi=e=>({by:"fields",fields:e}),Cp=new Sp({options:{required:!1},values:{by:new yp({enum:mt,required:!0}),fields:new dF({each:new Sp({values:{field:new hp({required:!0}),direction:new yp({enum:eo}),displayName:new hp}})})}});function to(){return{appliedSort:vt(),availableSorts:[vt()]}}function ki(e){return{...mF(e?.commercePagination,t=>t.principal.page,ur().page),...pF(e?.commercePagination,t=>t.principal.perPage,ur().perPage),...Qu(e?.commerceSort,t=>t.appliedSort,to().appliedSort),...Pt(e.commerceFacetSet,lr(e,"regular"),fF,"f"),...Pt(e.commerceFacetSet,lr(e,"regular"),gF,"fExcluded"),...Pt(e.commerceFacetSet,lr(e,"location"),yF,"lf"),...Pt(e.commerceFacetSet,lr(e,"hierarchical"),hF,"cf"),...Pt(e.commerceFacetSet,lr(e,"dateRange"),xp,"df"),...Pt(e.commerceFacetSet,lr(e,"dateRange"),Rp,"dfExcluded"),...Pt(e.commerceFacetSet,lr(e,"numericalRange"),xp,"nf"),...Pt(e.commerceFacetSet,lr(e,"numericalRange"),Rp,"nfExcluded"),...Fp("selected",e.manualNumericFacetSet),...Fp("excluded",e.manualNumericFacetSet)}}function mF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function pF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function fF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function gF(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function yF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function xp(e){return e.values.filter(t=>t.state==="selected")}function Rp(e){return e.values.filter(t=>t.state==="excluded")}function Fp(e,t){if(!t||e==="idle")return{};let r=Object.entries(t).map(([o,n])=>{if(!(n.manualRange===void 0||n.manualRange.state!==e))return{[o]:[n.manualRange]}}).filter(o=>o!==void 0).reduce((o,n)=>({...o,...n}),{});return e==="selected"?{mnf:r}:{mnfExcluded:r}}function hF(e){return At(e.values).map(r=>r.value)}function lr(e,t){return r=>e.commerceFacetSet[r].request.type===t}var Vi=()=>({query:""});var yD=D(e=>e[L].commerceSearch.responseId,e=>e),pa=D(e=>e.commerceSearch.responseId,e=>e),Ap=D(e=>e.commerceSearch.requestId,e=>e),fa=D(e=>e.commerceSearch?.products.length||0,e=>e),vp=D(e=>({total:sr(e),current:fa(e)}),({current:e,total:t})=>e<t),bp=D(e=>e.commerceSearch?.isLoading,e=>Pp(e)?!1:e),Ip=D(e=>e.commerceSearch?.error,e=>e??null),Di=D(e=>e.commerceQuery?.query,e=>e??""),SF=D(e=>e.commerceSearch?.queryExecuted,e=>e),wp=(e,t)=>Pp(t.queryCorrection?.correctedQuery)?Di(e):t.queryCorrection.correctedQuery,Ep=e=>({...Lu(e?.commerceQuery,t=>t.query,Vi().query),...ki(e)});function Tp(e){return{query:SF(e)||""}}var Uu;(t=>t.responseIdSelector=Op(pa))(Uu||(Uu={}));var Bu;(t=>t.responseIdSelector=Op(da))(Bu||(Bu={}));function Op(e){return t=>e(t[L])}var Dp={};Im(Dp,{escape:()=>Vo,getHighlightedSuggestion:()=>_u,highlightString:()=>RF});import{isNullOrUndefined as xF}from"@coveo/bueno";var ro=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function kp(e){return Array.isArray(e)}function Ni(e){return e.trim()===""}function Vp(e){let t={};for(let[r,o]of e)t[r]=o;return t}function ga(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function RF(e){if(Ni(e.openingDelimiter)||Ni(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(xF(e.content)||Ni(e.content))return e.content;if(e.highlights.length===0)return Vo(e.content);let t=e.content.length,r="",o=0;for(let n=0;n<e.highlights.length;n++){let a=e.highlights[n],i=a.offset,c=i+a.length;if(c>t)break;r+=Vo(e.content.slice(o,i)),r+=e.openingDelimiter,r+=Vo(e.content.slice(i,c)),r+=e.closingDelimiter,o=c}return o!==t&&(r+=Vo(e.content.slice(o))),r}function _u(e,t){return e=Vo(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,o,n,a)=>o?ju(o,t.notMatchDelimiters):n?ju(n,t.exactMatchDelimiters):a?ju(a,t.correctionDelimiters):r)}function ju(e,t){return t?t.open+e+t.close:e}function Vo(e){let t={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},r="(?:"+Object.keys(t).join("|")+")",o=RegExp(r),n=RegExp(r,"g");return o.test(e)?e.replace(n,a=>t[a]):e}var Kp=xt(_p(),1);var KF="recommendation-internal-options",TD=Symbol.for(KF);var $=new Error("Failed to load reducers."),Do=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var no=class extends Error{constructor(r,o){super();be(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function $p(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function zp(e){return typeof e!="object"||!e?!1:Object.values(e).every(GF)}function GF(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Wp(e){return e===429}var No=class e{static async call(t){let r=HF(t),{logger:o}=t,n=await e.preprocessRequest(r,t);o.info(n,"Platform request");let{url:a,...i}=n,c=async()=>{let u=await fetch(a,i);if(Wp(u.status))throw u;return u};try{let u=await(0,Kp.backOff)(c,{retry:s=>{let l=s&&Wp(s.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new Do;case 404:throw new no(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new no(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:c,...u}=t,s=ga(u);try{let l=await n(t,o,i);return{...t,...l}}catch(l){a.error(l,"Platform request preprocessing failed. Returning default request options.")}return s}};function Ie(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function Je(e,t="prod"){return`${Ie(e,t)}/rest/search/v2`}function Xu(e,t="prod"){return`${Ie(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function HF(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,c=e.method==="POST"||e.method==="PUT",u=YF(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...c&&{body:u},signal:i}}function YF(e,t){return t==="application/x-www-form-urlencoded"?zp(e)?$p(e):"":JSON.stringify(e)}function JF(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function XF(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Zu(e,t){if(t&&e.name==="AbortError")return{error:XF(e)};if(e instanceof no)return{error:JF(e)};throw e}var Mo=(e,t)=>({...Sa(e,t),requestParams:ZF(e)}),ZF=e=>{let{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:c,perPage:u,facets:s,sort:l}=e;return{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:c,perPage:u,facets:s,sort:l}},Sa=(e,t)=>{let{url:r,accessToken:o}=e,n=`${r}/${t}`;return{accessToken:o,method:"POST",contentType:"application/json",url:n,origin:"commerceApiFetch",requestMetadata:{method:t}}};var Gp=(e,t)=>({...Sa(e,t),requestParams:eP(e)}),eP=e=>{let{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:c,page:u,perPage:s}=e;return{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:c,page:u,perPage:s}};var Hp=e=>({...Sa(e,"search/querySuggest"),requestParams:tP(e)}),tP=e=>{let{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:c}=e;return{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:c}};var we=e=>e.error!==void 0,Li=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...Mo(t,"listing"),...this.options})}async search(t){let r=Mo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...Gp(t,"recommendations"),...this.options})}async productSuggestions(t){let r=Mo(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=Hp(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=Mo(t,"facet");return this.query({...o,url:`${o.url}?type=${r}`,requestParams:{...o.requestParams,facetId:t?.facetId,facetQuery:t?.facetQuery,query:t?.query},...this.options})}async plan(t){let r=Mo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await No.call(t);if(r instanceof Error)return Zu(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function el(e,t="prod"){return`${Ie(e,t)}/rest/organizations/${e}/commerce/v2`}var Qi=e=>e;import{StringValue as cf}from"@coveo/bueno";import{Schema as rP,SchemaValidationError as oP,StringValue as Ca,RecordValue as nP,ArrayValue as aP}from"@coveo/bueno";var T=new Ca({required:!0,emptyAllowed:!1}),te=new Ca({required:!1,emptyAllowed:!1}),ce=new Ca({required:!0,emptyAllowed:!0}),Yp=new Ca({required:!1,emptyAllowed:!0}),Jp=new aP({each:T,required:!0}),Xp=new Ca({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Ne=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),de=(e,t)=>{if("required"in t)return{payload:new rP({value:t}).validate({value:e}).value};let n=new nP({options:{required:!0},values:t}).validate(e);if(n)throw new oP(n);return{payload:e}},R=(e,t)=>{try{return de(e,t)}catch(r){return{payload:e,error:Ne(r)}}},Ue=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return Zp(e,t,r,n,"Controller initialization error")},Me=(e,t,r,o)=>{let n=`Check the options of ${o}`;return Zp(e,t,r,n,"Controller initialization error")},Zp=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};import{ArrayValue as iP,BooleanValue as tf,RecordValue as cP,StringValue as xa,Value as sP}from"@coveo/bueno";var Lo="3.19.0-pre.afe9f4e635",ef=["@coveo/atomic","@coveo/quantic"];var tl=()=>te,rf=()=>T,ao=h("configuration/updateBasicConfiguration",e=>R(e,{accessToken:te,environment:new xa({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:te})),of=h("configuration/updateSearchConfiguration",e=>R(e,{proxyBaseUrl:new xa({required:!1,url:!0}),pipeline:new xa({required:!1,emptyAllowed:!0}),searchHub:te,timezone:te,locale:te,authenticationProviders:new iP({required:!1,each:T})})),Qo={enabled:new tf({default:!0}),originContext:tl(),originLevel2:tl(),originLevel3:tl(),proxyBaseUrl:new xa({required:!1,url:!0}),runtimeEnvironment:new sP,anonymous:new tf({default:!1}),deviceId:te,userDisplayName:te,documentLocation:te,trackingId:te,analyticsMode:new xa({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new cP({options:{required:!1},values:ef.reduce((e,t)=>(e[t]=Xp,e),{})})},rl=h("configuration/updateAnalyticsConfiguration",e=>R(e,Qo)),Ui=h("configuration/analytics/disable"),Bi=h("configuration/analytics/enable"),nf=h("configuration/analytics/originlevel2",e=>R(e,{originLevel2:rf()})),af=h("configuration/analytics/originlevel3",e=>R(e,{originLevel3:rf()}));var Uo=h("commerce/configuration/updateBasicConfiguration",e=>R(e,{accessToken:te,environment:new cf({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:te})),Bo=h("commerce/configuration/updateProxyBaseUrl",e=>R(e,{proxyBaseUrl:new cf({required:!1,url:!0})})),jo=h("commerce/configuration/updateAnalyticsConfiguration",e=>R(e,{enabled:Qo.enabled,proxyBaseUrl:Qo.proxyBaseUrl,source:Qo.source,trackingId:Qo.trackingId})),ji=h("commerce/configuration/analytics/disable"),_i=h("commerce/configuration/analytics/enable");import{isNullOrUndefined as io}from"@coveo/bueno";var sf=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var ol=B(sf(),e=>e.addCase(Uo,(t,r)=>{uf(t,r.payload)}).addCase(ao,(t,r)=>{uf(t,r.payload)}).addCase(Bo,(t,r)=>{uP(t,r.payload)}).addCase(jo,(t,r)=>{lP(t,r.payload)}).addCase(ji,t=>{t.analytics.enabled=!1}).addCase(_i,t=>{t.analytics.enabled=!0}));function uf(e,t){io(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",io(t.organizationId)||(e.organizationId=t.organizationId)}function uP(e,t){io(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function lP(e,t){io(t.enabled)||(e.analytics.enabled=t.enabled),io(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),io(t.source)||(e.analytics.source=t.source),io(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function _o(e){return e.currency}var lf=(e,t)=>({currency:_o(t.commerceContext),products:dP(t.cart),transaction:e}),df=(e,t)=>({currency:_o(t.commerceContext),...e}),co=D(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),dP=D(co,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));import{ArrayValue as mP,NumberValue as mf,RecordValue as pP,Schema as fP,StringValue as gP}from"@coveo/bueno";var nl={productId:T,quantity:new mf({required:!0,min:0}),name:new gP({required:!1}),price:new mf({required:!1,min:0})},al=new mP({each:new pP({values:{...nl}})}),il={items:al},pf=new fP(il);var dr=h("commerce/cart/setItems",e=>R(e,al)),$o=h("commerce/cart/updateItemQuantity",e=>R(e,nl)),zo=h("commerce/cart/purchase"),$i=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=lf(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),zi=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=df(e,r()),{relay:n}=t;n.emit("ec.cartAction",o)});function z(e){let t,r=new Map,o=()=>r.size===0,n=a=>{try{let i=JSON.stringify(a),c=t!==i;return t=i,c}catch(i){return console.warn('Could not detect if state has changed, check the controller "get state method"',i),!0}};return{subscribe(a){a();let i=Symbol(),c;return o()&&(t=JSON.stringify(this.state),c=e.subscribe(()=>{n(this.state)&&r.forEach(u=>u())})),r.set(i,a),()=>{r.delete(i),o()&&c&&c()}},get state(){return{}}}}function ff(e,t){return e.cart[so(t)]}var gf=D(co,e=>e.reduce((t,r)=>t+r.quantity,0)),yf=D(co,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function yP(e,t={}){if(!hP(e))throw $;let{dispatch:r}=e,o=z(e),n=()=>e[L].cart,a={...t.initialState};Ue(e,pf,a,"buildCart"),a.items!==void 0&&r(dr(a.items));function i(l,d){return d?d.quantity!==l.quantity:!0}function c(l,d){return!d||l.quantity>d.quantity?"add":"remove"}function u(l,d){return d?l.name===d.name&&l.price===d.price&&l.quantity===d.quantity:!1}function s(l,d){let{quantity:p,...m}=l,f=c(l,d),g=d?Math.abs(p-d.quantity):p;return{action:f,quantity:g,product:m}}return{...o,empty:function(){for(let l of co(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r($i(l)),r(zo())},updateItemQuantity(l){let d=ff(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(zi(s(l,d))),r($o(l)))},get state(){let l=n();return{items:co(l),totalQuantity:gf(l),totalPrice:yf(l)}}}}function so(e){return`${e.productId},${e.name},${e.price}`}function hP(e){return e.addReducers({cart:Wo}),!0}var Wi=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),hf=e=>Cf(e.cartItems,e.cart),Sf=e=>Cf(e.purchasedItems,e.purchased);function Cf(e,t){let r=e.reduce((o,n)=>{let{productId:a,quantity:i}=t[n];return a in o||(o[a]={productId:a,quantity:0}),o[a].quantity+=i,o},{});return[...Object.values(r)]}var Wo=B(Wi(),e=>{e.addCase(dr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let c=so(i);return{cartItems:[...a.cartItems,c],cart:{...a.cart,[c]:i},purchasedItems:[],purchased:{}}},Wi());xf(t,n,o)}).addCase($o,(t,{payload:r})=>{let o=so(r);if(!(o in t.cart)){SP(r,t);return}if(r.quantity<=0){CP(r,t);return}t.cart[o]=r}).addCase(zo,t=>{xP(t);let{cart:r,cartItems:o}=Wi();xf(t,o,r)})});function xf(e,t,r){e.cartItems=t,e.cart=r}function SP(e,t){if(e.quantity<=0)return;let r=so(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function CP(e,t){let r=so(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function xP(e){for(let t of e.cartItems){if(t in e.purchased){e.purchased[t].quantity+=e.cart[t].quantity;continue}e.purchasedItems=[...e.purchasedItems,t],e.purchased[t]=e.cart[t]}}import{NumberValue as Rf,RecordValue as Ff,Schema as RP,StringValue as FP}from"@coveo/bueno";var PP=Intl.supportedValuesOf("currency"),AP=new FP({required:!0,emptyAllowed:!1,constrainTo:PP}),cl={url:T},sl={latitude:new Rf({min:-90,max:90,required:!0}),longitude:new Rf({min:-180,max:180,required:!0})},Ra={language:T,country:T,currency:AP,view:new Ff({options:{required:!0},values:cl}),location:new Ff({options:{required:!1},values:sl})},Pf=new RP(Ra);var ne=h("commerce/context/set",e=>R(e,Ra)),ae=h("commerce/context/setView",e=>R(e,cl)),Ko=h("commerce/context/setLocation",e=>R(e,sl));var Af=()=>({language:"",country:"",currency:"",view:{url:""}});var bt=B(Af(),e=>{e.addCase(ne,(t,{payload:r})=>r).addCase(ae,(t,{payload:r})=>{t.view=r}).addCase(Ko,(t,{payload:r})=>{t.location=r})});var Ki=()=>({correctedQuery:"",corrections:[],originalQuery:""});import{BooleanValue as VP,RecordValue as DP,StringValue as If}from"@coveo/bueno";var Xe=h("breadcrumb/deselectAll"),mr=h("breadcrumb/deselectAllNonBreadcrumbs");var pr=D(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${Lo}`));var fr=(e,t)=>{let{view:r,location:o,...n}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??el(e.configuration.organizationId,e.configuration.environment),organizationId:e.configuration.organizationId,trackingId:e.configuration.analytics.trackingId,...n,...e.configuration.analytics.enabled?{clientId:t.clientId}:{},context:{user:{...o,...t.userAgent?{userAgent:t.userAgent}:{}},view:{...r,...t.referrer?{referrer:t.referrer}:{}},capture:t.capture??e.configuration.analytics.enabled,cart:hf(e.cart),source:pr(e.configuration.analytics)}}};var Gi=(e,t,r)=>({...fr(e,t),...vP(e,r)}),vP=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};var Ze=(e,t)=>({...Gi(e,t),facets:[...bP(e)],...e.commerceSort&&{sort:IP(e.commerceSort.appliedSort)}});function bP(e){return!e.facetOrder||!e.commerceFacetSet?[]:e.facetOrder.filter(t=>e.commerceFacetSet?.[t]).map(t=>e.manualNumericFacetSet?.[t]?.manualRange?{facetId:t,field:t,numberOfValues:1,isFieldExpanded:!1,preventAutoSelect:!0,type:"numericalRange",values:[e.manualNumericFacetSet[t].manualRange],initialNumberOfValues:1}:e.commerceFacetSet[t].request).filter(t=>t&&t.values.length>0)}function IP(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}import{BooleanValue as ul,NumberValue as wP}from"@coveo/bueno";var uo=h("commerce/facets/core/updateNumberOfValues",e=>R(e,{facetId:T,numberOfValues:new wP({required:!0,min:1})})),lo=h("commerce/facets/core/updateIsFieldExpanded",e=>R(e,{facetId:T,isFieldExpanded:new ul({required:!0})})),se=h("commerce/facets/core/clearAll"),Ee=h("commerce/facets/core/deselectAllValues",e=>R(e,{facetId:T})),mo=h("commerce/facets/core/updateFreezeCurrentValues",e=>R(e,{facetId:T,freezeCurrentValues:new ul({required:!0})})),Go=h("commerce/facets/core/updateAutoSelectionForAll",e=>R(e,{allow:new ul({required:!0})}));import{NumberValue as vf}from"@coveo/bueno";var Hi={slotId:Yp},EP={...Hi,pageSize:new vf({required:!0,min:0})},Gt=h("commerce/pagination/setPageSize",e=>R(e,EP)),TP={...Hi,page:new vf({required:!0,min:0})},It=h("commerce/pagination/selectPage",e=>R(e,TP)),gr=h("commerce/pagination/nextPage",e=>R(e,Hi)),yr=h("commerce/pagination/previousPage",e=>R(e,Hi)),Ho=h("commerce/pagination/registerRecommendationsSlot",e=>R(e,{slotId:T}));import{StringValue as OP}from"@coveo/bueno";var ue=h("commerce/query/update",e=>R(e,{query:new OP}));import{isNullOrUndefined as bf}from"@coveo/bueno";import{RecordValue as qP,StringValue as kP}from"@coveo/bueno";var hr=h("commerce/triggers/query/updateIgnore",e=>R(e,{q:new kP({emptyAllowed:!0,required:!0})})),Yo=h("commerce/triggers/query/applyModification",e=>R(e,new qP({values:{originalQuery:te,modification:te}})));var Fa=class{constructor(t){this.config=t}async process(t){return this.processQueryErrorOrContinue(t)??await this.processQueryCorrectionsOrContinue(t)??await this.processQueryTriggersOrContinue(t)??this.processSuccessResponse(t)}async fetchFromAPI(t){let r=new Date().getTime(),o=await this.extra.apiClient.search(t),n=new Date().getTime()-r,a=this.getState().commerceQuery.query||"";return{response:o,duration:n,queryExecuted:a,requestExecuted:t}}processSuccessResponse(t){return{...t,response:this.getSuccessResponse(t),originalQuery:this.getCurrentQuery()}}processQueryErrorOrContinue(t){return we(t.response)?this.rejectWithValue(t.response.error):null}async processQueryCorrectionsOrContinue(t){let r=this.getState(),o=this.getSuccessResponse(t);if(!o||!r.didYouMean)return null;let{queryCorrection:n}=o;if(!(!bf(n)&&!bf(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:c}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:wp(r,o),originalQuery:c??""}}async processQueryTriggersOrContinue(t){let r=this.getSuccessResponse(t);if(!r)return null;let o=r.triggers.find(c=>c.type==="query")?.content||"";if(!o)return null;if(this.getState().triggers?.queryModification.queryToIgnore===o)return this.dispatch(hr({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(o);return we(i.response)?this.rejectWithValue(i.response.error):{...i,response:{...i.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t){return this.dispatch(Yo({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...Ze(this.getState(),this.navigatorContext),query:t})}get dispatch(){return this.config.dispatch}get rejectWithValue(){return this.config.rejectWithValue}getState(){return this.config.getState()}get navigatorContext(){return this.config.extra.navigatorContext}getCurrentQuery(){let t=this.getState();return t.commerceQuery.query!==void 0?t.commerceQuery.query:""}getSuccessResponse(t){return we(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(ue({query:t}))}};var K=_("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=Ze(o,n),i=Di(o),c=new Fa(t),u=await c.fetchFromAPI({...a,query:i});return c.process(u)}),Sr=_("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!vp(o))return null;let i=cr(o),u=fa(o)/i,s=Di(o),l=Ze(o,n),d=new Fa(t),p=await d.fetchFromAPI({...l,query:s,page:u});return d.process(p)}),Jo=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;R(e,{query:new If,clearFilters:new VP}),e.clearFilters&&(r(se()),r(mr())),r(Go({allow:!0})),r(ue({query:e.query})),r(It({page:0}))}),Xo=_("commerce/search/fetchInstantProducts",async(e,{getState:t,rejectWithValue:r,extra:o})=>{let n=t(),{apiClient:a,navigatorContext:i}=o,{q:c}=e,u=await a.productSuggestions({...fr(n,i),query:c});return we(u)?r(u.error):{response:{...u.success,products:u.success.products}}}),NP={child:new DP({options:{required:!0},values:{permanentid:new If({required:!0})}})},Zo=h("commerce/search/promoteChildToParent",e=>R(e,NP));function wf(){return{wasCorrectedTo:"",queryCorrection:Ki(),originalQuery:""}}var Yi=B(wf(),e=>{e.addCase(K.pending,t=>{t.queryCorrection=Ki(),t.wasCorrectedTo=""}).addCase(K.fulfilled,(t,r)=>{let{queryCorrection:o}=r.payload.response;t.originalQuery=r.payload.originalQuery,t.wasCorrectedTo=o?.correctedQuery??"",t.queryCorrection={correctedQuery:o?.correctedQuery??o?.corrections[0]?.correctedQuery??"",wordCorrections:o?.corrections[0]?.wordCorrections??[]}})});import{Value as Of,BooleanValue as Ef,ArrayValue as Xi,StringValue as Ji,NumberValue as Tf,RecordValue as _P}from"@coveo/bueno";var G=T;import{Value as MP,NumberValue as LP,StringValue as QP,ArrayValue as UP,BooleanValue as BP}from"@coveo/bueno";var jP={state:new MP({required:!0}),numberOfResults:new LP({required:!0,min:0}),value:new QP({required:!0,emptyAllowed:!0}),path:new UP({required:!0,each:T}),moreValuesAvailable:new BP({required:!1})};function Pa(e){e.children.forEach(t=>{Pa(t)}),de({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},jP)}var en={facetId:G,field:T,tabs:new _P({options:{required:!1},values:{included:new Xi({each:new Ji}),excluded:new Xi({each:new Ji})}}),activeTab:new Ji({required:!1}),delimitingCharacter:new Ji({required:!1,emptyAllowed:!0}),filterFacetCount:new Ef({required:!1}),injectionDepth:new Tf({required:!1,min:0}),numberOfValues:new Tf({required:!1,min:1}),sortCriteria:new Of({required:!1}),basePath:new Xi({required:!1,each:T}),filterByBasePath:new Ef({required:!1})},tn=5,qf=h("categoryFacet/register",e=>R(e,en)),kf=h("categoryFacet/toggleSelectValue",e=>{try{return de(e.facetId,T),Pa(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:Ne(t)}}}),Vf=h("categoryFacet/deselectAll",e=>R(e,en.facetId)),aL=h("categoryFacet/updateNumberOfValues",e=>R(e,{facetId:en.facetId,numberOfValues:en.numberOfValues})),iL=h("categoryFacet/updateSortCriterion",e=>R(e,{facetId:en.facetId,criterion:new Of})),cL=h("categoryFacet/updateBasePath",e=>R(e,{facetId:en.facetId,basePath:new Xi({each:T})}));import{NumberValue as KP,RecordValue as GP,ArrayValue as HP}from"@coveo/bueno";import{RecordValue as $P,NumberValue as zP,StringValue as WP}from"@coveo/bueno";var Aa={facetId:G,captions:new $P({options:{required:!1}}),numberOfValues:new zP({required:!1,min:1}),query:new WP({required:!1,emptyAllowed:!0})};var YP={path:new HP({required:!0,each:T}),displayValue:ce,rawValue:ce,count:new KP({required:!0,min:0})},et=h("categoryFacet/selectSearchResult",e=>R(e,{facetId:G,value:new GP({values:YP})})),Zi=h("categoryFacetSearch/register",e=>R(e,Aa));import{RecordValue as JP,NumberValue as XP}from"@coveo/bueno";var Df={facetId:G,value:new JP({values:{displayValue:ce,rawValue:ce,count:new XP({required:!0,min:0})}})},ec=h("facetSearch/register",e=>R(e,Aa)),Cr=h("facetSearch/update",e=>R(e,Aa)),Ke=h("facetSearch/toggleSelectValue",e=>R(e,Df)),pt=h("facetSearch/toggleExcludeValue",e=>R(e,Df));import{BooleanValue as ZP}from"@coveo/bueno";var Ht=h("facetOptions/update",(e={freezeFacetOrder:!0})=>R(e,{freezeFacetOrder:new ZP({required:!1})})),ll=h("facetOptions/facet/enable",e=>R(e,G)),Yt=h("facetOptions/facet/disable",e=>R(e,G));var eA=h("history/undo"),tA=h("history/redo"),wt=h("history/snapshot"),TL=_("history/back",async(e,{dispatch:t})=>{t(eA()),await t(fe())}),OL=_("history/forward",async(e,{dispatch:t})=>{t(tA()),await t(fe())}),fe=_("history/change",async(e,{getState:t})=>t().history.present);import{BooleanValue as Nf,StringValue as va,NumberValue as Mf,RecordValue as xr}from"@coveo/bueno";var tc={q:new va,enableQuerySyntax:new Nf,aq:new va,cq:new va,firstResult:new Mf({min:0}),numberOfResults:new Mf({min:0}),sortCriteria:new va,f:new xr,fExcluded:new xr,cf:new xr,nf:new xr,mnf:new xr,df:new xr,debug:new Nf,sf:new xr,tab:new va,af:new xr};var Fe=h("searchParameters/restore",e=>R(e,tc));import{BooleanValue as my,NumberValue as py,StringValue as pI}from"@coveo/bueno";function Jt(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function v(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function c(l){try{s(o.next(l))}catch(d){i(d)}}function u(l){try{s(o.throw(l))}catch(d){i(d)}}function s(l){l.done?a(l.value):n(l.value).then(c,u)}s((o=o.apply(e,t||[])).next())})}var H;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(H||(H={}));function pl(){return typeof window<"u"}function bl(){return typeof navigator<"u"}function rn(){return typeof document<"u"}function fl(){try{return typeof localStorage<"u"}catch{return!1}}function rA(){try{return typeof sessionStorage<"u"}catch{return!1}}function Jf(){return bl()&&navigator.cookieEnabled}var oA=[H.click,H.custom,H.search,H.view],nA=(e,t)=>oA.indexOf(e)!==-1?Object.assign({language:rn()?document.documentElement.lang:"unknown",userAgent:bl()?navigator.userAgent:"unknown"},t):t,wa=class e{static set(t,r,o){var n,a,i,c;o&&(a=new Date,a.setTime(a.getTime()+o)),c=window.location.hostname,c.indexOf(".")===-1?Lf(t,r,a):(i=c.split("."),n=i[i.length-2]+"."+i[i.length-1],Lf(t,r,a,n))}static get(t){for(var r=t+"=",o=document.cookie.split(";"),n=0;n<o.length;n++){var a=o[n];if(a=a.replace(/^\s+/,""),a.lastIndexOf(r,0)===0)return a.substring(r.length,a.length)}return null}static erase(t){e.set(t,"",-1)}};function Lf(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function aA(){return fl()?localStorage:Jf()?new Ea:rA()?sessionStorage:new nn}var Ea=class e{getItem(t){return wa.get(`${e.prefix}${t}`)}removeItem(t){wa.erase(`${e.prefix}${t}`)}setItem(t,r,o){wa.set(`${e.prefix}${t}`,r,o)}};Ea.prefix="coveo_";var gl=class{constructor(){this.cookieStorage=new Ea}getItem(t){return localStorage.getItem(t)||this.cookieStorage.getItem(t)}removeItem(t){this.cookieStorage.removeItem(t),localStorage.removeItem(t)}setItem(t,r){localStorage.setItem(t,r),this.cookieStorage.setItem(t,r,31556926e3)}},nn=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},ba="__coveo.analytics.history",Xf=20,Zf=1e3*60,eg=75,an=class{constructor(t){this.store=t||aA()}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){return v(this,void 0,void 0,function*(){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=yield this.getHistoryWithInternalTimeAsync();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])})}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){return v(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(ba);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return v(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(ba);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(ba,JSON.stringify(t.slice(0,Xf)))}catch{}}clear(){try{this.store.removeItem(ba)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((o,n)=>(n.internalTime||0)-(o.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,eg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Zf:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:o,time:n,value:a}=r;return{name:o,time:n,value:a}}):[]}stripEmptyQuery(t){let{name:r,time:o,value:n}=t;return r&&typeof n=="string"&&r.toLowerCase()==="query"&&n.trim()===""?{name:r,time:o}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}},tg=Object.freeze({__proto__:null,HistoryStore:an,MAX_NUMBER_OF_HISTORY_ELEMENTS:Xf,MAX_VALUE_SIZE:eg,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:Zf,STORE_KEY:ba,default:an}),iA=(e,t)=>v(void 0,void 0,void 0,function*(){return e===H.view?(yield cA(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),cA=e=>v(void 0,void 0,void 0,function*(){let t=new an,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),rc,sA=new Uint8Array(16);function uA(){if(!rc&&(rc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!rc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return rc(sA)}var lA=/^(?:[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 nc(e){return typeof e=="string"&&lA.test(e)}var Pe=[];for(let e=0;e<256;++e)Pe.push((e+256).toString(16).slice(1));function rg(e,t=0){return(Pe[e[t+0]]+Pe[e[t+1]]+Pe[e[t+2]]+Pe[e[t+3]]+"-"+Pe[e[t+4]]+Pe[e[t+5]]+"-"+Pe[e[t+6]]+Pe[e[t+7]]+"-"+Pe[e[t+8]]+Pe[e[t+9]]+"-"+Pe[e[t+10]]+Pe[e[t+11]]+Pe[e[t+12]]+Pe[e[t+13]]+Pe[e[t+14]]+Pe[e[t+15]]).toLowerCase()}function dA(e){if(!nc(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}function mA(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var pA="6ba7b810-9dad-11d1-80b4-00c04fd430c8",fA="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function gA(e,t,r){function o(n,a,i,c){var u;if(typeof n=="string"&&(n=mA(n)),typeof a=="string"&&(a=dA(a)),((u=a)===null||u===void 0?void 0:u.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let s=new Uint8Array(16+n.length);if(s.set(a),s.set(n,a.length),s=r(s),s[6]=s[6]&15|t,s[8]=s[8]&63|128,i){c=c||0;for(let l=0;l<16;++l)i[c+l]=s[l];return i}return rg(s)}try{o.name=e}catch{}return o.DNS=pA,o.URL=fA,o}var yA=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Qf={randomUUID:yA};function po(e,t,r){if(Qf.randomUUID&&!t&&!e)return Qf.randomUUID();e=e||{};let o=e.random||(e.rng||uA)();if(o[6]=o[6]&15|64,o[8]=o[8]&63|128,t){r=r||0;for(let n=0;n<16;++n)t[r+n]=o[n];return t}return rg(o)}function hA(e,t,r,o){switch(e){case 0:return t&r^~t&o;case 1:return t^r^o;case 2:return t&r^t&o^r&o;case 3:return t^r^o}}function dl(e,t){return e<<t|e>>>32-t}function SA(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let i=unescape(encodeURIComponent(e));e=[];for(let c=0;c<i.length;++c)e.push(i.charCodeAt(c))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let o=e.length/4+2,n=Math.ceil(o/16),a=new Array(n);for(let i=0;i<n;++i){let c=new Uint32Array(16);for(let u=0;u<16;++u)c[u]=e[i*64+u*4]<<24|e[i*64+u*4+1]<<16|e[i*64+u*4+2]<<8|e[i*64+u*4+3];a[i]=c}a[n-1][14]=(e.length-1)*8/Math.pow(2,32),a[n-1][14]=Math.floor(a[n-1][14]),a[n-1][15]=(e.length-1)*8&4294967295;for(let i=0;i<n;++i){let c=new Uint32Array(80);for(let m=0;m<16;++m)c[m]=a[i][m];for(let m=16;m<80;++m)c[m]=dl(c[m-3]^c[m-8]^c[m-14]^c[m-16],1);let u=r[0],s=r[1],l=r[2],d=r[3],p=r[4];for(let m=0;m<80;++m){let f=Math.floor(m/20),g=dl(u,5)+hA(f,s,l,d)+p+t[f]+c[m]>>>0;p=d,d=l,l=dl(s,30)>>>0,s=u,u=g}r[0]=r[0]+u>>>0,r[1]=r[1]+s>>>0,r[2]=r[2]+l>>>0,r[3]=r[3]+d>>>0,r[4]=r[4]+p>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var CA=gA("v5",80,SA),Uf=CA,og="2.30.43",Bf=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Ia={pageview:"pageview",event:"event"},ac=class{constructor({client:t,uuidGenerator:r=po}){this.client=t,this.uuidGenerator=r}},yl=class extends ac{constructor({client:t,uuidGenerator:r=po}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Bf(window.location),this.lastReferrer=rn()?document.referrer:"",this.addHooks()}getApi(t){switch(t){case"setAction":return this.setAction;default:return null}}setAction(t,r){this.action=t,this.actionData=r}clearData(){this.clearPluginData(),this.action=void 0,this.actionData={}}getLocationInformation(t,r){return Object.assign({hitType:t},this.getNextValues(t,r))}updateLocationInformation(t,r){this.updateLocationForNextPageView(t,r)}getDefaultContextInformation(t){let r={title:rn()?document.title:"",encoding:rn()?document.characterSet:"UTF-8"},o={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},n={language:navigator.language,userAgent:navigator.userAgent},a={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},a),o),n),r)}updateLocationForNextPageView(t,r){let{pageViewId:o,referrer:n,location:a}=this.getNextValues(t,r);this.lastReferrer=n,this.pageViewId=o,this.currentLocation=a,t===Ia.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Ia.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Ia.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Ia.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=n=>n.replace(/^\/?(.*)$/,"/$1");return`${(n=>n.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return Bf(window.location)}},Rr=class e{constructor(t,r){if(!nc(t))throw Error("Not a valid uuid");this.clientId=t,this.creationDate=Math.floor(r/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime}validate(t,r){return!this.expired&&this.matchReferrer(t,r)}matchReferrer(t,r){try{let o=new URL(t);return r.some(n=>new RegExp(n.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(o.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[o,n]=r;if(o.length!==32||isNaN(parseInt(n)))return null;let a=o.substring(0,8)+"-"+o.substring(8,12)+"-"+o.substring(12,16)+"-"+o.substring(16,20)+"-"+o.substring(20,32);return nc(a)?new e(a,Number.parseInt(n)*1e3):null}};Rr.cvo_cid="cvo_cid";Rr.expirationTime=120;var hl=class extends ac{constructor({client:t,uuidGenerator:r=po}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return v(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),o=yield this.client.getCurrentVisitorId();return r.searchParams.set(Rr.cvo_cid,new Rr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};hl.Id="link";var tt=Object.keys;function oc(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var ml=128,ng=192,jf=224,_f=240;function xA(e){return(e&248)===_f?4:(e&_f)===jf?3:(e&jf)===ng?2:1}function RA(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 o=Number.parseInt(e.substring(r-2,r),16);if((o&ml)!=ml)break;if(r-=3,(o&ng)!=ml){t-r>=xA(o)*3&&(r=t);break}}return e.substring(0,r)}var Sl={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"},FA=tt(Sl).map(e=>Sl[e]),PA=[...FA].join("|"),AA=new RegExp(`^(${PA}$)`),vA={svcAction:"svc_action",svcActionData:"svc_action_data"},bA=e=>tt(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=Sl[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),IA=e=>AA.test(e),wA=[IA],$f={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},zf={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Te={action:"pa",list:"pal",listSource:"pls"},ic={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},EA=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Cl={id:"quoteId",affiliation:"quoteAffiliation"},xl={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},TA={add:Te,bookmark_add:Te,bookmark_remove:Te,click:Te,checkout:Te,checkout_option:Te,detail:Te,impression:Te,remove:Te,refund:Object.assign(Object.assign({},Te),ic),purchase:Object.assign(Object.assign({},Te),ic),quickview:Te,quote:Object.assign(Object.assign({},Te),Cl),review:Object.assign(Object.assign({},Te),xl)},OA=tt($f).map(e=>$f[e]),qA=tt(zf).map(e=>zf[e]),kA=tt(Te).map(e=>Te[e]),VA=tt(ic).map(e=>ic[e]),DA=tt(xl).map(e=>xl[e]),NA=tt(Cl).map(e=>Cl[e]),MA=[...OA,"custom"].join("|"),LA=[...qA,"custom"].join("|"),ag="(pr[0-9]+)",ig="(il[0-9]+pi[0-9]+)",QA=new RegExp(`^${ag}(${MA})$`),UA=new RegExp(`^(${ig}(${LA}))|(il[0-9]+nm)$`),BA=new RegExp(`^(${kA.join("|")})$`),jA=new RegExp(`^(${VA.join("|")})$`),_A=new RegExp(`^${ag}custom$`),$A=new RegExp(`^${ig}custom$`),zA=new RegExp(`^(${[...EA,...DA,...NA].join("|")})$`),WA=e=>QA.test(e),KA=e=>UA.test(e),GA=e=>BA.test(e),HA=e=>jA.test(e),YA=e=>zA.test(e),JA=[KA,WA,GA,HA,YA],XA=[_A,$A],ZA={anonymizeIp:"aip"},ev={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},tv={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},rv=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],ov=Object.assign(Object.assign(Object.assign(Object.assign({},ZA),ev),tv),rv.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Rl=Object.assign(Object.assign({},ov),vA),nv=e=>{let t=!!e.action&&TA[e.action]||{};return tt(e).reduce((r,o)=>{let n=t[o]||Rl[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},av=tt(Rl).map(e=>Rl[e]),iv=e=>av.indexOf(e)!==-1,cv=e=>e==="custom",sv=e=>[...JA,...wA,iv,cv].some(t=>t(e)),uv=e=>tt(e).reduce((t,r)=>{let o=lv(r);return o?Object.assign(Object.assign({},t),dv(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),lv=e=>{let t;return[...XA].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},dv=(e,t)=>tt(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),Fl=class{constructor(t){this.opts=t}sendEvent(t,r){return v(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:o,preprocessRequest:n}=this.opts,a=yield this.getQueryParamsForEventType(t),{url:i,payload:c}=yield this.preProcessRequestAsPotentialJSONString(`${o}/analytics/${t}?${a}`,r,n),u=this.encodeForEventType(t,c),s=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,s)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,o){return v(this,void 0,void 0,function*(){let n=t,a=r;if(o){let i=yield o({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:c,body:u}=i;n=c||t;try{a=JSON.parse(u)}catch(s){console.error("Unable to process the request body as a JSON string",s)}}return{payload:a,url:n}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return v(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:o}=this.opts,n=yield o.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",n?`visitorId=${n}`:"","discardVisitInfo=true"].filter(a=>!!a).join("&")})}isEventTypeLegacy(t){return[H.click,H.custom,H.search,H.view].indexOf(t)!==-1}encodeEventToJson(t,r,o){let n=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return o&&(n=`access_token=${encodeURIComponent(o)}&${n}`),n}},Pl=class{sendEvent(t,r){return v(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return v(this,void 0,void 0,function*(){return Promise.resolve()})}},Wf=globalThis.fetch,cc=class{constructor(t){this.opts=t}sendEvent(t,r){return v(this,void 0,void 0,function*(){let{baseUrl:o,visitorIdProvider:n,preprocessRequest:a}=this.opts,i=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",c={url:`${o}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},c),a?yield a(c,"analyticsFetch"):{}),{url:s}=u,l=Jt(u,["url"]),d;try{d=yield Wf(s,l)}catch(p){console.error("An error has occured when sending the event.",p);return}if(d.ok){let p=yield d.json();return p.visitorId&&n.setCurrentVisitorId(p.visitorId),p}else{try{d.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,d,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return v(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Wf(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[H.click,H.custom,H.search,H.view].indexOf(t)!==-1}getVisitorIdParam(){return v(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},Al=class{constructor(t,r){fl()&&Jf()?this.storage=new gl:fl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new nn),this.client=new cc(t),this.beaconClient=new Fl(t),window.addEventListener("beforeunload",()=>{let o=r();for(let{eventType:n,payload:a}of o)this.beaconClient.sendEvent(n,a)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},vl=class{constructor(t,r){this.storage=r||new nn,this.client=new cc(t)}getClientDependingOnEventType(t){return this.client}},sc=class{constructor(){this.storage=new nn,this.client=new Pl}getClientDependingOnEventType(t){return this.client}},mv="xx",pv=e=>e?.startsWith(mv)||!1,fv=`
|
|
20
20
|
We've detected you're using React Native but have not provided the corresponding runtime,
|
|
21
21
|
for an optimal experience please use the "coveo.analytics/react-native" subpackage.
|
|
22
22
|
Follow the Readme on how to set it up: https://github.com/coveo/coveo.analytics.js#using-react-native
|