@coveo/headless 3.13.1-pre.cf8bb8919d → 3.13.1-pre.db77dd01fb

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/browser/case-assist/headless.esm.js +1 -1
  2. package/dist/browser/case-assist/headless.js +1 -1
  3. package/dist/browser/commerce/headless.esm.js +1 -1
  4. package/dist/browser/commerce/headless.js +1 -1
  5. package/dist/browser/headless.esm.js +1 -1
  6. package/dist/browser/headless.js +1 -1
  7. package/dist/browser/insight/headless.esm.js +1 -1
  8. package/dist/browser/insight/headless.js +1 -1
  9. package/dist/browser/recommendation/headless.esm.js +1 -1
  10. package/dist/browser/recommendation/headless.js +1 -1
  11. package/dist/browser/ssr/headless.esm.js +1 -1
  12. package/dist/browser/ssr/headless.js +1 -1
  13. package/dist/browser/ssr-commerce/headless.esm.js +1 -1
  14. package/dist/browser/ssr-commerce/headless.js +1 -1
  15. package/dist/case-assist/headless.cjs +1 -1
  16. package/dist/case-assist/headless.esm.js +1 -1
  17. package/dist/commerce/headless.cjs +1 -1
  18. package/dist/commerce/headless.esm.js +1 -1
  19. package/dist/headless.cjs +1 -1
  20. package/dist/headless.esm.js +1 -1
  21. package/dist/insight/headless.cjs +1 -1
  22. package/dist/insight/headless.esm.js +1 -1
  23. package/dist/parsed_doc.json +136 -136
  24. package/dist/quantic/case-assist/headless.js +1 -1
  25. package/dist/quantic/commerce/headless.js +1 -1
  26. package/dist/quantic/headless.js +1 -1
  27. package/dist/quantic/insight/headless.js +1 -1
  28. package/dist/quantic/recommendation/headless.js +1 -1
  29. package/dist/recommendation/headless.cjs +1 -1
  30. package/dist/recommendation/headless.esm.js +1 -1
  31. package/dist/ssr/headless.cjs +1 -1
  32. package/dist/ssr/headless.esm.js +1 -1
  33. package/dist/ssr-commerce/headless.cjs +1 -1
  34. package/dist/ssr-commerce/headless.esm.js +1 -1
  35. package/package.json +1 -1
@@ -16,7 +16,7 @@
16
16
  * limitations under the License.
17
17
  */
18
18
  var eR=Object.create;var di=Object.defineProperty;var tR=Object.getOwnPropertyDescriptor;var rR=Object.getOwnPropertyNames;var oR=Object.getPrototypeOf,nR=Object.prototype.hasOwnProperty;var aR=(e,t,r)=>t in e?di(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var ye=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),xm=(e,t)=>{for(var r in t)di(e,r,{get:t[r],enumerable:!0})},iR=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of rR(t))!nR.call(e,n)&&n!==r&&di(e,n,{get:()=>t[n],enumerable:!(o=tR(t,n))||o.enumerable});return e};var ht=(e,t,r)=>(r=e!=null?eR(oR(e)):{},iR(t||!e||!e.__esModule?di(r,"default",{value:e,enumerable:!0}):r,e));var Re=(e,t,r)=>aR(e,typeof t!="symbol"?t+"":t,r);var Ep=ye(sa=>{"use strict";var ki=sa&&sa.__assign||function(){return ki=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},ki.apply(this,arguments)};Object.defineProperty(sa,"__esModule",{value:!0});var pF={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function fF(e){var t=ki(ki({},pF),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}sa.getSanitizedOptions=fF});var Tp=ye($u=>{"use strict";Object.defineProperty($u,"__esModule",{value:!0});function gF(e){var t=Math.random()*e;return Math.round(t)}$u.fullJitter=gF});var Op=ye(zu=>{"use strict";Object.defineProperty(zu,"__esModule",{value:!0});function yF(e){return e}zu.noJitter=yF});var qp=ye(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});var hF=Tp(),SF=Op();function CF(e){switch(e.jitter){case"full":return hF.fullJitter;case"none":default:return SF.noJitter}}Wu.JitterFactory=CF});var Hu=ye(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});var xF=qp(),RF=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=xF.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=RF});var kp=ye(zt=>{"use strict";var FF=zt&&zt.__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)}}(),PF=zt&&zt.__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())})},AF=zt&&zt.__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(zt,"__esModule",{value:!0});var vF=Hu(),bF=function(e){FF(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return PF(this,void 0,void 0,function(){return AF(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);zt.SkipFirstDelay=bF});var Vp=ye(ua=>{"use strict";var IF=ua&&ua.__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(ua,"__esModule",{value:!0});var wF=Hu(),EF=function(e){IF(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(wF.Delay);ua.AlwaysDelay=EF});var Dp=ye(Gu=>{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});var TF=kp(),OF=Vp();function qF(e,t){var r=kF(e);return r.setAttemptNumber(t),r}Gu.DelayFactory=qF;function kF(e){return e.delayFirstAttempt?new OF.AlwaysDelay(e):new TF.SkipFirstDelay(e)}});var Np=ye(Zr=>{"use strict";var Yu=Zr&&Zr.__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=Zr&&Zr.__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(Zr,"__esModule",{value:!0});var VF=Ep(),DF=Dp();function NF(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=VF.getSanitizedOptions(t),o=new MF(e,r),[4,o.execute()];case 1:return[2,n.sent()]}})})}Zr.backOff=NF;var MF=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=DF.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var Cc=ye((Nl,Ml)=>{"use strict";(function(e,t){typeof Nl=="object"&&typeof Ml<"u"?Ml.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(Nl,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,C={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(k){var q=["th","st","nd","rd"],T=k%100;return"["+k+(q[(T-20)%10]||q[T]||q[0])+"]"}},x=function(k,q,T){var M=String(k);return!M||M.length>=q?k:""+Array(q+1-M.length).join(T)+k},y={s:x,z:function(k){var q=-k.utcOffset(),T=Math.abs(q),M=Math.floor(T/60),D=T%60;return(q<=0?"+":"-")+x(M,2,"0")+":"+x(D,2,"0")},m:function k(q,T){if(q.date()<T.date())return-k(T,q);var M=12*(T.year()-q.year())+(T.month()-q.month()),D=q.clone().add(M,s),_=T-D<0,U=q.clone().add(M+(_?-1:1),s);return+(-(M+(T-D)/(_?D-U:U-D))||0)},a:function(k){return k<0?Math.ceil(k)||0:Math.floor(k)},p:function(k){return{M:s,y:d,w:u,d:c,D:p,h:i,m:a,s:n,ms:o,Q:l}[k]||String(k||"").toLowerCase().replace(/s$/,"")},u:function(k){return k===void 0}},S="en",P={};P[S]=C;var O="$isDayjsObject",A=function(k){return k instanceof V||!(!k||!k[O])},F=function k(q,T,M){var D;if(!q)return S;if(typeof q=="string"){var _=q.toLowerCase();P[_]&&(D=_),T&&(P[_]=T,D=_);var U=q.split("-");if(!D&&U.length>1)return k(U[0])}else{var W=q.name;P[W]=q,D=W}return!M&&D&&(S=D),D||!M&&S},w=function(k,q){if(A(k))return k.clone();var T=typeof q=="object"?q:{};return T.date=k,T.args=arguments,new V(T)},b=y;b.l=F,b.i=A,b.w=function(k,q){return w(k,{locale:q.$L,utc:q.$u,x:q.$x,$offset:q.$offset})};var V=function(){function k(T){this.$L=F(T.locale,null,!0),this.parse(T),this.$x=this.$x||T.x||{},this[O]=!0}var q=k.prototype;return q.parse=function(T){this.$d=function(M){var D=M.date,_=M.utc;if(D===null)return new Date(NaN);if(b.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var U=D.match(f);if(U){var W=U[2]-1||0,Y=(U[7]||"0").substring(0,3);return _?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(D)}(T),this.init()},q.init=function(){var T=this.$d;this.$y=T.getFullYear(),this.$M=T.getMonth(),this.$D=T.getDate(),this.$W=T.getDay(),this.$H=T.getHours(),this.$m=T.getMinutes(),this.$s=T.getSeconds(),this.$ms=T.getMilliseconds()},q.$utils=function(){return b},q.isValid=function(){return this.$d.toString()!==m},q.isSame=function(T,M){var D=w(T);return this.startOf(M)<=D&&D<=this.endOf(M)},q.isAfter=function(T,M){return w(T)<this.startOf(M)},q.isBefore=function(T,M){return this.endOf(M)<w(T)},q.$g=function(T,M,D){return b.u(T)?this[M]:this.set(D,T)},q.unix=function(){return Math.floor(this.valueOf()/1e3)},q.valueOf=function(){return this.$d.getTime()},q.startOf=function(T,M){var D=this,_=!!b.u(M)||M,U=b.p(T),W=function(yt,ge){var Ge=b.w(D.$u?Date.UTC(D.$y,ge,yt):new Date(D.$y,ge,yt),D);return _?Ge:Ge.endOf(c)},Y=function(yt,ge){return b.w(D.toDate()[yt].apply(D.toDate("s"),(_?[0,0,0,0]:[23,59,59,999]).slice(ge)),D)},J=this.$W,X=this.$M,Z=this.$D,oe="set"+(this.$u?"UTC":"");switch(U){case d:return _?W(1,0):W(31,11);case s:return _?W(1,X):W(0,X+1);case u:var fe=this.$locale().weekStart||0,_r=(J<fe?J+7:J)-fe;return W(_?Z-_r:Z+(6-_r),X);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()}},q.endOf=function(T){return this.startOf(T,!1)},q.$set=function(T,M){var D,_=b.p(T),U="set"+(this.$u?"UTC":""),W=(D={},D[c]=U+"Date",D[p]=U+"Date",D[s]=U+"Month",D[d]=U+"FullYear",D[i]=U+"Hours",D[a]=U+"Minutes",D[n]=U+"Seconds",D[o]=U+"Milliseconds",D)[_],Y=_===c?this.$D+(M-this.$W):M;if(_===s||_===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},q.set=function(T,M){return this.clone().$set(T,M)},q.get=function(T){return this[b.p(T)]()},q.add=function(T,M){var D,_=this;T=Number(T);var U=b.p(M),W=function(X){var Z=w(_);return b.w(Z.date(Z.date()+Math.round(X*T)),_)};if(U===s)return this.set(s,this.$M+T);if(U===d)return this.set(d,this.$y+T);if(U===c)return W(1);if(U===u)return W(7);var Y=(D={},D[a]=t,D[i]=r,D[n]=e,D)[U]||1,J=this.$d.getTime()+T*Y;return b.w(J,this)},q.subtract=function(T,M){return this.add(-1*T,M)},q.format=function(T){var M=this,D=this.$locale();if(!this.isValid())return D.invalidDate||m;var _=T||"YYYY-MM-DDTHH:mm:ssZ",U=b.z(this),W=this.$H,Y=this.$m,J=this.$M,X=D.weekdays,Z=D.months,oe=D.meridiem,fe=function(ge,Ge,jt,or){return ge&&(ge[Ge]||ge(M,_))||jt[Ge].slice(0,or)},_r=function(ge){return b.s(W%12||12,ge,"0")},yt=oe||function(ge,Ge,jt){var or=ge<12?"AM":"PM";return jt?or.toLowerCase():or};return _.replace(g,function(ge,Ge){return Ge||function(jt){switch(jt){case"YY":return String(M.$y).slice(-2);case"YYYY":return b.s(M.$y,4,"0");case"M":return J+1;case"MM":return b.s(J+1,2,"0");case"MMM":return fe(D.monthsShort,J,Z,3);case"MMMM":return fe(Z,J);case"D":return M.$D;case"DD":return b.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return fe(D.weekdaysMin,M.$W,X,2);case"ddd":return fe(D.weekdaysShort,M.$W,X,3);case"dddd":return X[M.$W];case"H":return String(W);case"HH":return b.s(W,2,"0");case"h":return _r(1);case"hh":return _r(2);case"a":return yt(W,Y,!0);case"A":return yt(W,Y,!1);case"m":return String(Y);case"mm":return b.s(Y,2,"0");case"s":return String(M.$s);case"ss":return b.s(M.$s,2,"0");case"SSS":return b.s(M.$ms,3,"0");case"Z":return U}return null}(ge)||U.replace(":","")})},q.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},q.diff=function(T,M,D){var _,U=this,W=b.p(M),Y=w(T),J=(Y.utcOffset()-this.utcOffset())*t,X=this-Y,Z=function(){return b.m(U,Y)};switch(W){case d:_=Z()/12;break;case s:_=Z();break;case l:_=Z()/3;break;case u:_=(X-J)/6048e5;break;case c:_=(X-J)/864e5;break;case i:_=X/r;break;case a:_=X/t;break;case n:_=X/e;break;default:_=X}return D?_:b.a(_)},q.daysInMonth=function(){return this.endOf(s).$D},q.$locale=function(){return P[this.$L]},q.locale=function(T,M){if(!T)return this.$L;var D=this.clone(),_=F(T,M,!0);return _&&(D.$L=_),D},q.clone=function(){return b.w(this.$d,this)},q.toDate=function(){return new Date(this.valueOf())},q.toJSON=function(){return this.isValid()?this.toISOString():null},q.toISOString=function(){return this.$d.toISOString()},q.toString=function(){return this.$d.toUTCString()},k}(),L=V.prototype;return w.prototype=L,[["$ms",o],["$s",n],["$m",a],["$H",i],["$W",c],["$M",s],["$y",d],["$D",p]].forEach(function(k){L[k[1]]=function(q){return this.$g(q,k[0],k[1])}}),w.extend=function(k,q){return k.$i||(k(q,V,w),k.$i=!0),w},w.locale=F,w.isDayjs=A,w.unix=function(k){return w(1e3*k)},w.en=P[S],w.Ls=P,w.p={},w})});var Ig=ye((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_plugin_quarterOfYear=t()})(Ll,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 wg=ye((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_customParseFormat=t()})(Ul,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 C=g.match(/([+-]|\d\d)/g),x=60*C[1]+(+C[2]||0);return x===0?0:C[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 C,x=i.meridiem;if(x){for(var y=1;y<=24;y+=1)if(f.indexOf(x(y,0,g))>-1){C=y>12;break}}else C=f===(g?"pm":"PM");return C},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,C=f.match(/\d+/);if(this.day=C[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"),C=(l("monthsShort")||g.map(function(x){return x.slice(0,3)})).indexOf(f)+1;if(C<1)throw new Error;this.month=C%12||C}],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,C;g=f,C=i&&i.formats;for(var x=(f=g.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(w,b,V){var L=V&&V.toUpperCase();return b||C[V]||e[V]||C[L].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(k,q,T){return q||T.slice(1)})})).match(t),y=x.length,S=0;S<y;S+=1){var P=x[S],O=p[P],A=O&&O[0],F=O&&O[1];x[S]=F?{regex:A,parser:F}:P.replace(/^\[|\]$/g,"")}return function(w){for(var b={},V=0,L=0;V<y;V+=1){var k=x[V];if(typeof k=="string")L+=k.length;else{var q=k.regex,T=k.parser,M=w.slice(L),D=q.exec(M)[0];T.call(b,D),w=w.replace(D,"")}}return function(_){var U=_.afternoon;if(U!==void 0){var W=_.hours;U?W<12&&(_.hours+=12):W===12&&(_.hours=0),delete _.afternoon}}(b),b}}return function(f,g,C){C.p.customParseFormat=!0,f&&f.parseTwoDigitYear&&(c=f.parseTwoDigitYear);var x=g.prototype,y=x.parse;x.parse=function(S){var P=S.date,O=S.utc,A=S.args;this.$u=O;var F=A[1];if(typeof F=="string"){var w=A[2]===!0,b=A[3]===!0,V=w||b,L=A[2];b&&(L=A[2]),i=this.$locale(),!w&&L&&(i=C.Ls[L]),this.$d=function(M,D,_,U){try{if(["x","X"].indexOf(D)>-1)return new Date((D==="X"?1e3:1)*M);var W=m(D)(M),Y=W.year,J=W.month,X=W.day,Z=W.hours,oe=W.minutes,fe=W.seconds,_r=W.milliseconds,yt=W.zone,ge=W.week,Ge=new Date,jt=X||(Y||J?1:Ge.getDate()),or=Y||Ge.getFullYear(),ui=0;Y&&!J||(ui=J>0?J-1:Ge.getMonth());var li,hu=Z||0,Su=oe||0,Cu=fe||0,xu=_r||0;return yt?new Date(Date.UTC(or,ui,jt,hu,Su,Cu,xu+60*yt.offset*1e3)):_?new Date(Date.UTC(or,ui,jt,hu,Su,Cu,xu)):(li=new Date(or,ui,jt,hu,Su,Cu,xu),ge&&(li=U(li).week(ge).toDate()),li)}catch{return new Date("")}}(P,F,O,C),this.init(),L&&L!==!0&&(this.$L=this.locale(L).$L),V&&P!=this.format(F)&&(this.$d=new Date("")),i={}}else if(F instanceof Array)for(var k=F.length,q=1;q<=k;q+=1){A[1]=F[q-1];var T=C.apply(this,A);if(T.isValid()){this.$d=T.$d,this.$L=T.$L,this.init();break}q===k&&(this.$d=new Date(""))}else y.call(this,S)}}})});var PS=ye((o3,FS)=>{"use strict";var cE=/(^|; )Coveo-Pendragon=([^;]*)/;FS.exports=()=>cE.exec(document.cookie)?.pop()||null});var AS=ye((Nd,Md)=>{"use strict";(function(e,t){typeof Nd=="object"&&typeof Md<"u"?Md.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(Nd,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,C){C===void 0&&(C={});var x=C.timeZoneName||"short",y=g+"|"+x,S=t[y];return S||(S=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]=S),S}(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],C=g.type,x=g.value,y=e[C];y>=0&&(m[y]=parseInt(x,10))}var S=m[3],P=S===24?0:S,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}),C=Math.round((f-new Date(g))/1e3/60),x=15*-Math.round(f.getTimezoneOffset()/15)-C;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 C=function(P,O,A){var F=P-60*O*1e3,w=c(F,A);if(O===w)return[F,O];var b=c(F-=60*(w-O)*1e3,A);return w===b?[F,w]:[P-60*Math.min(w,b)*1e3,Math.max(w,b)]}(n.utc(l,m).valueOf(),g,f),x=C[0],y=C[1],S=n(x).utcOffset(y);return S.$x.$timezone=f,S},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.tz.setDefault=function(l){a=l}}})});var vS=ye((Ld,Qd)=>{"use strict";(function(e,t){typeof Ld=="object"&&typeof Qd<"u"?Qd.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(Ld,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(S){S===void 0&&(S="");var P=S.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 C=Math.abs(m)<=16?60*m:m,x=this;if(f)return x.$offset=C,x.$u=m===0,x;if(m!==0){var y=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(x=this.local().add(C+y,e)).$offset=C,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 C=this.local(),x=a(m).local();return p.call(C,x,f,g)}}})});var LS=ye((p4,MS)=>{"use strict";function hE(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}MS.exports=SE;function SE(e,t,r){var o=r&&r.stringify||hE,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 $S=ye((f4,Vs)=>{"use strict";var QS=LS();Vs.exports=rr;var ei=kE().console||{},CE={mapHttpRequest:ks,mapHttpResponse:ks,wrapRequestSerializer:jd,wrapResponseSerializer:jd,wrapErrorSerializer:jd,req:ks,res:ks,err:BS,errWithCause:BS};function Br(e,t){return e==="silent"?1/0:t.levels.values[e]}var zd=Symbol("pino.logFuncs"),_d=Symbol("pino.hierarchy"),xE={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function US(e,t){let r={logger:t,parent:e[_d]};t[_d]=r}function RE(e,t,r){let o={};t.forEach(n=>{o[n]=r[n]?r[n]:ei[n]||ei[xE[n]||"log"]||Dn}),e[zd]=o}function FE(e,t){return Array.isArray(e)?e.filter(function(o){return o!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function rr(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||ei;e.browser.write&&(e.browser.asObject=!0);let o=e.serializers||{},n=FE(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=Dn),RE(s,c,r),US({},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:TE(e),messageKey:e.messageKey||"msg",onChild:e.onChild||Dn};s.levels=PE(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=Dn,s.serializers=o,s._serialize=n,s._stdErrSerialize=a,s.child=function(...g){return f.call(this,l,...g)},t&&(s._logEvent=$d());function d(){return Br(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,yo(this,l,s,"error"),yo(this,l,s,"fatal"),yo(this,l,s,"warn"),yo(this,l,s,"info"),yo(this,l,s,"debug"),yo(this,l,s,"trace"),i.forEach(C=>{yo(this,l,s,C)})}function f(g,C,x){if(!C)throw new Error("missing bindings for child Pino");x=x||{},n&&C.serializers&&(x.serializers=C.serializers);let y=x.serializers;if(n&&y){var S=Object.assign({},o,y),P=e.browser.serialize===!0?Object.keys(S):n;delete C.serializers,Wd([C],P,S,this._stdErrSerialize)}function O(F){this._childLevel=(F._childLevel|0)+1,this.bindings=C,S&&(this.serializers=S,this._serialize=P),t&&(this._logEvent=$d([].concat(F._logEvent.bindings,C)))}O.prototype=this;let A=new O(this);return US(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 PE(e){let t=e.customLevels||{},r=Object.assign({},rr.levels.values,t),o=Object.assign({},rr.levels.labels,AE(t));return{values:r,labels:o}}function AE(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}rr.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"}};rr.stdSerializers=CE;rr.stdTimeFunctions=Object.assign({},{nullTime:jS,epochTime:_S,unixTime:OE,isoTime:qE});function vE(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[_d];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function yo(e,t,r,o){if(Object.defineProperty(e,o,{value:Br(e.level,r)>Br(o,r)?Dn:r[zd][o],writable:!0,enumerable:!0,configurable:!0}),e[o]===Dn){if(!t.transmit)return;let a=t.transmit.level||e.level,i=Br(a,r);if(Br(o,r)<i)return}e[o]=IE(e,t,r,o);let n=vE(e);n.length!==0&&(e[o]=bE(n,e[o]))}function bE(e,t){return function(){return t.apply(this,[...e,...arguments])}}function IE(e,t,r,o){return function(n){return function(){let i=t.timestamp(),c=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===ei?ei:this;for(var s=0;s<c.length;s++)c[s]=arguments[s];var l=!1;if(t.serialize&&(Wd(c,this._serialize,this.serializers,this._stdErrSerialize),l=!0),t.asObject||t.formatters?n.call(u,wE(this,o,c,i,t)):n.apply(u,c),t.transmit){let d=t.transmit.level||e._level,p=Br(d,r),m=Br(o,r);if(m<p)return;EE(this,{ts:i,methodLevel:o,methodValue:m,transmitLevel:d,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:Br(e._level,r)},c,l)}}}(e[zd][o])}function wE(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?QS(c.shift(),c):void 0}else typeof u=="string"&&(u=QS(c.shift(),c));return u!==void 0&&(s[n.messageKey]=u),i(s)}function Wd(e,t,r,o){for(let n in e)if(o&&e[n]instanceof Error)e[n]=rr.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 EE(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||Wd(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=$d(s)}function $d(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function BS(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 TE(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?jS:_S}function ks(){return{}}function jd(e){return e}function Dn(){}function jS(){return!1}function _S(){return Date.now()}function OE(){return Math.round(Date.now()/1e3)}function qE(){return new Date(Date.now()).toISOString()}function kE(){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)||{}}}Vs.exports.default=rr;Vs.exports.pino=rr});var vp={};xm(vp,{ProductListing:()=>Bu,Search:()=>Uu});var Rm="coveo-headless-internal-state",Q=Symbol.for(Rm),Fm=e=>new Proxy(e,{ownKeys(t){return Reflect.ownKeys(t).filter(r=>r!==Q)},get(t,r,o){return typeof r=="symbol"&&r.description===Rm&&r!==Q&&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 YR}from"@coveo/bueno";function he(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var cR=typeof Symbol=="function"&&Symbol.observable||"@@observable",Pm=cR,Ru=()=>Math.random().toString(36).substring(7).split("").join("."),sR={INIT:`@@redux/INIT${Ru()}`,REPLACE:`@@redux/REPLACE${Ru()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ru()}`},mi=sR;function St(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(he(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(he(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(he(1));return r(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((C,x)=>{i.set(x,C)}))}function l(){if(u)throw new Error(he(3));return n}function d(C){if(typeof C!="function")throw new Error(he(4));if(u)throw new Error(he(5));let x=!0;s();let y=c++;return i.set(y,C),function(){if(x){if(u)throw new Error(he(6));x=!1,s(),i.delete(y),a=null}}}function p(C){if(!St(C))throw new Error(he(7));if(typeof C.type>"u")throw new Error(he(8));if(typeof C.type!="string")throw new Error(he(17));if(u)throw new Error(he(9));try{u=!0,n=o(n,C)}finally{u=!1}return(a=i).forEach(y=>{y()}),C}function m(C){if(typeof C!="function")throw new Error(he(10));o=C,p({type:mi.REPLACE})}function f(){let C=d;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(he(11));function y(){let P=x;P.next&&P.next(l())}return y(),{unsubscribe:C(y)}},[Pm](){return this}}}return p({type:mi.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[Pm]:f}}function uR(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:mi.INIT})>"u")throw new Error(he(12));if(typeof r(void 0,{type:mi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(he(13))})}function Ao(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{uR(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 C=u&&u.type;throw new Error(he(14))}l[p]=g,s=s||g!==f}return s=s||o.length!==Object.keys(c).length,s?l:c}}function vo(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function Am(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(he(15))},i={getState:n.getState,dispatch:(u,...s)=>a(u,...s)},c=e.map(u=>u(i));return a=vo(...c)(n.dispatch),{...n,dispatch:a}}}function pi(e){return St(e)&&"type"in e&&typeof e.type=="string"}var qu=Symbol.for("immer-nothing"),Kn=Symbol.for("immer-draftable"),Ne=Symbol.for("immer-state");function Se(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var zr=Object.getPrototypeOf;function $e(e){return!!e&&!!e[Ne]}function Me(e){return e?Em(e)||Array.isArray(e)||!!e[Kn]||!!e.constructor?.[Kn]||Xn(e)||Zn(e):!1}var lR=Object.prototype.constructor.toString();function Em(e){if(!e||typeof e!="object")return!1;let t=zr(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)===lR}function ku(e){return $e(e)||Se(15,e),e[Ne].base_}function Hn(e,t){Wr(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function Wr(e){let t=e[Ne];return t?t.type_:Array.isArray(e)?1:Xn(e)?2:Zn(e)?3:0}function Gn(e,t){return Wr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Pu(e,t){return Wr(e)===2?e.get(t):e[t]}function Tm(e,t,r){let o=Wr(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function dR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Xn(e){return e instanceof Map}function Zn(e){return e instanceof Set}function $r(e){return e.copy_||e.base_}function bu(e,t){if(Xn(e))return new Map(e);if(Zn(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Em(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[Ne];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(zr(e),o)}else{let o=zr(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function yi(e,t=!1){return hi(e)||$e(e)||!Me(e)||(Wr(e)>1&&(e.set=e.add=e.clear=e.delete=mR),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>yi(o,!0))),e}function mR(){Se(2)}function hi(e){return Object.isFrozen(e)}var Iu={};function Kr(e){let t=Iu[e];return t||Se(0,e),t}function pR(e,t){Iu[e]||(Iu[e]=t)}var Yn;function Om(){return Yn}function fR(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function vm(e,t){t&&(Kr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function wu(e){Eu(e),e.drafts_.forEach(gR),e.drafts_=null}function Eu(e){e===Yn&&(Yn=e.parent_)}function bm(e){return Yn=fR(Yn,e)}function gR(e){let t=e[Ne];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Im(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Ne].modified_&&(wu(t),Se(4)),Me(e)&&(e=fi(t,e),t.parent_||gi(t,e)),t.patches_&&Kr("Patches").generateReplacementPatches_(r[Ne].base_,e,t.patches_,t.inversePatches_)):e=fi(t,r,[]),wu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==qu?e:void 0}function fi(e,t,r){if(hi(t))return t;let o=t[Ne];if(!o)return Hn(t,(n,a)=>wm(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return gi(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),Hn(a,(c,u)=>wm(e,o,n,c,u,r,i)),gi(e,n,!1),r&&e.patches_&&Kr("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function wm(e,t,r,o,n,a,i){if($e(n)){let c=a&&t&&t.type_!==3&&!Gn(t.assigned_,o)?a.concat(o):void 0,u=fi(e,n,c);if(Tm(r,o,u),$e(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(Me(n)&&!hi(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;fi(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&gi(e,n)}}function gi(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&yi(t,r)}function yR(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:Om(),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=Jn);let{revoke:i,proxy:c}=Proxy.revocable(n,a);return o.draft_=c,o.revoke_=i,c}var Vu={get(e,t){if(t===Ne)return e;let r=$r(e);if(!Gn(r,t))return hR(e,r,t);let o=r[t];return e.finalized_||!Me(o)?o:o===Au(e.base_,t)?(vu(e),e.copy_[t]=Ou(o,e)):o},has(e,t){return t in $r(e)},ownKeys(e){return Reflect.ownKeys($r(e))},set(e,t,r){let o=qm($r(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=Au($r(e),t),a=n?.[Ne];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(dR(r,n)&&(r!==void 0||Gn(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=$r(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){Se(11)},getPrototypeOf(e){return zr(e.base_)},setPrototypeOf(){Se(12)}},Jn={};Hn(Vu,(e,t)=>{Jn[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Jn.deleteProperty=function(e,t){return Jn.set.call(this,e,t,void 0)};Jn.set=function(e,t,r){return Vu.set.call(this,e[0],t,r,e[0])};function Au(e,t){let r=e[Ne];return(r?$r(r):e)[t]}function hR(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=zr(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=zr(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 SR=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"&&Se(6),o!==void 0&&typeof o!="function"&&Se(7);let n;if(Me(t)){let a=bm(this),i=Ou(t,void 0),c=!0;try{n=r(i),c=!1}finally{c?wu(a):Eu(a)}return vm(a,o),Im(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===qu&&(n=void 0),this.autoFreeze_&&yi(n,!0),o){let a=[],i=[];Kr("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else Se(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){Me(e)||Se(8),$e(e)&&(e=km(e));let t=bm(this),r=Ou(e,void 0);return r[Ne].isManual_=!0,Eu(t),r}finishDraft(e,t){let r=e&&e[Ne];(!r||!r.isManual_)&&Se(9);let{scope_:o}=r;return vm(o,t),Im(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=Kr("Patches").applyPatches_;return $e(e)?o(e,t):this.produce(e,n=>o(n,t))}};function Ou(e,t){let r=Xn(e)?Kr("MapSet").proxyMap_(e,t):Zn(e)?Kr("MapSet").proxySet_(e,t):yR(e,t);return(t?t.scope_:Om()).drafts_.push(r),r}function km(e){return $e(e)||Se(10,e),Vm(e)}function Vm(e){if(!Me(e)||hi(e))return e;let t=e[Ne],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 Hn(r,(o,n)=>{Tm(r,o,Vm(n))}),t&&(t.finalized_=!1),r}function Dm(){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_:C,assigned_:x}=p,y=p.copy_;y.length<C.length&&([C,y]=[y,C],[f,g]=[g,f]);for(let S=0;S<C.length;S++)if(x[S]&&y[S]!==C[S]){let P=m.concat([S]);f.push({op:t,path:P,value:d(y[S])}),g.push({op:t,path:P,value:d(C[S])})}for(let S=C.length;S<y.length;S++){let P=m.concat([S]);f.push({op:r,path:P,value:d(y[S])})}for(let S=y.length-1;C.length<=S;--S){let P=m.concat([S]);g.push({op:o,path:P})}}function i(p,m,f,g){let{base_:C,copy_:x}=p;Hn(p.assigned_,(y,S)=>{let P=Pu(C,y),O=Pu(x,y),A=S?Gn(C,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_:C,copy_:x}=p,y=0;C.forEach(S=>{if(!x.has(S)){let P=m.concat([y]);f.push({op:o,path:P,value:S}),g.unshift({op:r,path:P,value:S})}y++}),y=0,x.forEach(S=>{if(!C.has(S)){let P=m.concat([y]);f.push({op:r,path:P,value:S}),g.unshift({op:o,path:P,value:S})}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:C}=f,x=p;for(let O=0;O<g.length-1;O++){let A=Wr(x),F=g[O];typeof F!="string"&&typeof F!="number"&&(F=""+F),(A===0||A===1)&&(F==="__proto__"||F==="constructor")&&Se(19),typeof x=="function"&&F==="prototype"&&Se(19),x=Pu(x,F),typeof x!="object"&&Se(18,g.join("/"))}let y=Wr(x),S=l(f.value),P=g[g.length-1];switch(C){case t:switch(y){case 2:return x.set(P,S);case 3:Se(16);default:return x[P]=S}case r:switch(y){case 1:return P==="-"?x.push(S):x.splice(P,0,S);case 2:return x.set(P,S);case 3:return x.add(S);default:return x[P]=S}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:Se(17,C)}}),p}function l(p){if(!Me(p))return p;if(Array.isArray(p))return p.map(l);if(Xn(p))return new Map(Array.from(p.entries()).map(([f,g])=>[f,l(g)]));if(Zn(p))return new Set(Array.from(p).map(l));let m=Object.create(zr(p));for(let f in p)m[f]=l(p[f]);return Gn(p,Kn)&&(m[Kn]=p[Kn]),m}function d(p){return $e(p)?l(p):p}pR("Patches",{applyPatches_:s,generatePatches_:n,generateReplacementPatches_:u})}var ze=new SR,_t=ze.produce,Si=ze.produceWithPatches.bind(ze),Uk=ze.setAutoFreeze.bind(ze),Bk=ze.setUseStrictShallowCopy.bind(ze),Du=ze.applyPatches.bind(ze),jk=ze.createDraft.bind(ze),_k=ze.finishDraft.bind(ze);function CR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function xR(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function RR(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 Nm=e=>Array.isArray(e)?e:[e];function FR(e){let t=Array.isArray(e[0])?e[0]:e;return RR(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function PR(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var Wk=Symbol();var Kk=Object.getPrototypeOf({});var AR=class{constructor(e){this.value=e}deref(){return this.value}},vR=typeof WeakRef<"u"?WeakRef:AR,bR=0,Mm=1;function Ci(){return{s:bR,v:void 0,o:null,p:null}}function bo(e,t={}){let r=Ci(),{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=Ci(),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=Ci(),f.set(m,c)):c=g}}let s=c,l;if(c.s===Mm)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=Mm,s.v=l,l}return i.clearCache=()=>{r=Ci(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function Lm(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()),CR(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=bo,argsMemoizeOptions:f=[],devModeChecks:g={}}=l,C=Nm(p),x=Nm(f),y=FR(n),S=d(function(){return a++,s.apply(null,arguments)},...C),P=!0,O=m(function(){i++;let F=PR(y,arguments);return c=S.apply(null,F),c},...x);return Object.assign(O,{resultFunc:s,memoizedResultFunc:S,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 N=Lm(bo),IR=Object.assign((e,t=N)=>{xR(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:()=>IR});function Qm(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var Um=Qm(),Bm=Qm;var wR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?vo:vo.apply(null,arguments)},oV=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},ER=e=>e&&typeof e.match=="function";function h(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(ct(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=>pi(o)&&o.type===e,r}var Wm=class ea extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ea.prototype)}static get[Symbol.species](){return ea}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ea(...t[0].concat(this)):new ea(...t.concat(this))}};function jm(e){return Me(e)?_t(e,()=>{}):e}function _m(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function TR(e){return typeof e=="boolean"}var OR=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new Wm;return r&&(TR(r)?i.push(Um):i.push(Bm(r.extraArgument))),i},nr="RTK_autoBatch",wo=()=>e=>({payload:e,meta:{[nr]:!0}}),$m=e=>t=>{setTimeout(t,e)},qR=(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:$m(10):e.type==="callback"?e.queueNotification:$m(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?.[nr],a=!n,a&&(i||(i=!0,u(s))),o.dispatch(l)}finally{n=!0}}})},kR=e=>function(r){let{autoBatch:o=!0}=r??{},n=new Wm(e);return o&&n.push(qR(typeof o=="object"?o:void 0)),n};function Km(e){let t=OR(),{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(St(r))c=Ao(r);else throw new Error(ct(1));let u;typeof o=="function"?u=o(t):u=t();let s=vo;n&&(s=wR({trace:!1,...typeof n=="object"&&n}));let l=Am(...u),d=kR(l),p=typeof i=="function"?i(d):d(),m=s(...p);return Fu(c,a,m)}function Hm(e){let t={},r=[],o,n={addCase(a,i){let c=typeof a=="string"?a:a.type;if(!c)throw new Error(ct(28));if(c in t)throw new Error(ct(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 VR(e){return typeof e=="function"}function B(e,t){let[r,o,n]=Hm(t),a;if(VR(e))a=()=>jm(e());else{let c=jm(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($e(l)){let m=d(l,u);return m===void 0?l:m}else{if(Me(l))return _t(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 Gm=(e,t)=>ER(e)?e.match(t):e(t);function Ct(...e){return t=>e.some(r=>Gm(r,t))}function Io(...e){return t=>e.every(r=>Gm(r,t))}function Ri(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 ta(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Fi(...e){return e.length===0?t=>Ri(t,["pending"]):ta(e)?Ct(...e.map(t=>t.pending)):Fi()(e[0])}function Hr(...e){return e.length===0?t=>Ri(t,["rejected"]):ta(e)?Ct(...e.map(t=>t.rejected)):Hr()(e[0])}function ra(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Io(Hr(...e),t):ta(e)?Io(Hr(...e),t):ra()(e[0])}function $t(...e){return e.length===0?t=>Ri(t,["fulfilled"]):ta(e)?Ct(...e.map(t=>t.fulfilled)):$t()(e[0])}function Pi(...e){return e.length===0?t=>Ri(t,["pending","fulfilled","rejected"]):ta(e)?Ct(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Pi()(e[0])}var DR="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ai=(e=21)=>{let t="",r=e;for(;r--;)t+=DR[Math.random()*64|0];return t},NR=["name","message","stack","code"],Nu=class{constructor(e,t){Re(this,"_type");this.payload=e,this.meta=t}},zm=class{constructor(e,t){Re(this,"_type");this.payload=e,this.meta=t}},MR=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of NR)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},j=(()=>{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||MR)(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):Ai(),m=new AbortController,f,g;function C(y){g=y,m.abort()}let x=async function(){let y;try{let P=o?.condition?.(u,{getState:l,extra:d});if(QR(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:C,rejectWithValue:(A,F)=>new Nu(A,F),fulfillWithValue:(A,F)=>new zm(A,F)})).then(A=>{if(A instanceof Nu)throw A;return A instanceof zm?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:C,requestId:p,arg:u,unwrap(){return x.then(LR)}})}}return Object.assign(c,{pending:a,rejected:i,fulfilled:n,settled:Ct(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function LR(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function QR(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ym=Symbol.for("rtk-slice-createasyncthunk"),sV={[Ym]:j};function UR(e,t){return`${e}/${t}`}function BR({creators:e}={}){let t=e?.asyncThunk?.[Ym];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(ct(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(_R()):o.reducers)||{},c=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(y,S){let P=typeof y=="string"?y:y.type;if(!P)throw new Error(ct(12));if(P in u.sliceCaseReducersByType)throw new Error(ct(13));return u.sliceCaseReducersByType[P]=S,s},addMatcher(y,S){return u.sliceMatchers.push({matcher:y,reducer:S}),s},exposeAction(y,S){return u.actionCreators[y]=S,s},exposeCaseReducer(y,S){return u.sliceCaseReducersByName[y]=S,s}};c.forEach(y=>{let S=i[y],P={reducerName:y,type:UR(n,y),createNotation:typeof o.reducers=="function"};zR(S)?KR(P,S,s,t):$R(P,S,s)});function l(){let[y={},S=[],P=void 0]=typeof o.extraReducers=="function"?Hm(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 S)A.addMatcher(F.matcher,F.reducer);P&&A.addDefaultCase(P)})}let d=y=>y,p=new Map,m;function f(y,S){return m||(m=l()),m(y,S)}function g(){return m||(m=l()),m.getInitialState()}function C(y,S=!1){function P(A){let F=A[y];return typeof F>"u"&&S&&(F=g()),F}function O(A=d){let F=_m(p,S,()=>new WeakMap);return _m(F,A,()=>{let w={};for(let[b,V]of Object.entries(o.selectors??{}))w[b]=jR(V,A,g,S);return w})}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,...C(a),injectInto(y,{reducerPath:S,...P}={}){let O=S??a;return y.inject({reducerPath:O,reducer:f},P),{...x,...C(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 Gr=BR();function _R(){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 $R({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!WR(o))throw new Error(ct(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 zR(e){return e._reducerDefinitionType==="asyncThunk"}function WR(e){return e._reducerDefinitionType==="reducerWithPrepare"}function KR({type:e,reducerName:t},r,o,n){if(!n)throw new Error(ct(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||xi,pending:c||xi,rejected:u||xi,settled:s||xi})}function xi(){}var Jm="listener",Xm="completed",Zm="cancelled",uV=`task-${Zm}`,lV=`task-${Xm}`,dV=`${Jm}-${Zm}`,mV=`${Jm}-${Xm}`;var{assign:ep}=Object;var Mu="listenerMiddleware";var HR=ep(h(`${Mu}/add`),{withTypes:()=>HR}),pV=h(`${Mu}/removeAll`),GR=ep(h(`${Mu}/remove`),{withTypes:()=>GR});var fV=Symbol.for("rtk-state-proxy-original");function ct(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 ar=N(e=>e.commercePagination?.principal.perPage||0,e=>e),vi=N((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),ir=N(e=>e.commercePagination?.principal.totalEntries||0,e=>e),bi=N((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),Ii=N(e=>e.commercePagination?.principal.page||0,e=>e),tp=N((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var bV=N(e=>e[Q].productListing.responseId,e=>e),oa=N(e=>e.productListing.responseId,e=>e),rp=N(e=>e.productListing.requestId,e=>e),na=N(e=>e.productListing?.products.length||0,e=>e),op=N(e=>({total:ir(e),current:na(e)}),({current:e,total:t})=>e<t),np=N(e=>e.productListing?.isLoading,e=>YR(e)?!1:e),ap=N(e=>e.productListing?.error,e=>e??null);import{isNullOrUndefined as yp}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 xt(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 Rt(e){let{activeValue:t,ancestryMap:r}=XR(e);return t?ZR(t,r):[]}function XR(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 ZR(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function ip(){return{principal:cr(),recommendations:{}}}function cr(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}import{ArrayValue as rF,EnumValue as up,StringValue as lp,RecordValue as dp}from"@coveo/bueno";import{ArrayValue as eF,EnumValue as cp,RecordValue as sp,StringValue as tF}from"@coveo/bueno";var st=(r=>(r.Relevance="relevance",r.Fields="fields",r))(st||{}),Yr=(r=>(r.Ascending="asc",r.Descending="desc",r))(Yr||{}),Ft=()=>({by:"relevance"});var OV=new sp({options:{required:!1},values:{by:new cp({enum:st,required:!0}),fields:new eF({each:new sp({values:{name:new tF,direction:new cp({enum:Yr})}})})}});var wi=e=>({by:"fields",fields:e}),mp=new dp({options:{required:!1},values:{by:new up({enum:st,required:!0}),fields:new rF({each:new dp({values:{field:new lp({required:!0}),direction:new up({enum:Yr}),displayName:new lp}})})}});function Jr(){return{appliedSort:Ft(),availableSorts:[Ft()]}}function Ei(e){return{...oF(e?.commercePagination,t=>t.principal.page,cr().page),...nF(e?.commercePagination,t=>t.principal.perPage,cr().perPage),...Qu(e?.commerceSort,t=>t.appliedSort,Jr().appliedSort),...xt(e.commerceFacetSet,sr(e,"regular"),aF,"f"),...xt(e.commerceFacetSet,sr(e,"regular"),iF,"fExcluded"),...xt(e.commerceFacetSet,sr(e,"location"),cF,"lf"),...xt(e.commerceFacetSet,sr(e,"hierarchical"),sF,"cf"),...xt(e.commerceFacetSet,sr(e,"dateRange"),pp,"df"),...xt(e.commerceFacetSet,sr(e,"dateRange"),fp,"dfExcluded"),...xt(e.commerceFacetSet,sr(e,"numericalRange"),pp,"nf"),...xt(e.commerceFacetSet,sr(e,"numericalRange"),fp,"nfExcluded"),...gp("selected",e.manualNumericFacetSet),...gp("excluded",e.manualNumericFacetSet)}}function oF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function nF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function aF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function iF(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function cF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function pp(e){return e.values.filter(t=>t.state==="selected")}function fp(e){return e.values.filter(t=>t.state==="excluded")}function gp(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 sF(e){return Rt(e.values).map(r=>r.value)}function sr(e,t){return r=>e.commerceFacetSet[r].request.type===t}var Ti=()=>({query:""});var rD=N(e=>e[Q].commerceSearch.responseId,e=>e),aa=N(e=>e.commerceSearch.responseId,e=>e),hp=N(e=>e.commerceSearch.requestId,e=>e),ia=N(e=>e.commerceSearch?.products.length||0,e=>e),Sp=N(e=>({total:ir(e),current:ia(e)}),({current:e,total:t})=>e<t),Cp=N(e=>e.commerceSearch?.isLoading,e=>yp(e)?!1:e),xp=N(e=>e.commerceSearch?.error,e=>e??null),Oi=N(e=>e.commerceQuery?.query,e=>e??""),uF=N(e=>e.commerceSearch?.queryExecuted,e=>e),Rp=(e,t)=>yp(t.queryCorrection?.correctedQuery)?Oi(e):t.queryCorrection.correctedQuery,Fp=e=>({...Lu(e?.commerceQuery,t=>t.query,Ti().query),...Ei(e)});function Pp(e){return{query:uF(e)||""}}var Uu;(t=>t.responseIdSelector=Ap(aa))(Uu||(Uu={}));var Bu;(t=>t.responseIdSelector=Ap(oa))(Bu||(Bu={}));function Ap(e){return t=>e(t[Q])}var wp={};xm(wp,{escape:()=>Eo,getHighlightedSuggestion:()=>_u,highlightString:()=>mF});import{isNullOrUndefined as dF}from"@coveo/bueno";var Xr=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function bp(e){return Array.isArray(e)}function qi(e){return e.trim()===""}function Ip(e){let t={};for(let[r,o]of e)t[r]=o;return t}function ca(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function mF(e){if(qi(e.openingDelimiter)||qi(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(dF(e.content)||qi(e.content))return e.content;if(e.highlights.length===0)return Eo(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+=Eo(e.content.slice(o,i)),r+=e.openingDelimiter,r+=Eo(e.content.slice(i,c)),r+=e.closingDelimiter,o=c}return o!==t&&(r+=Eo(e.content.slice(o))),r}function _u(e,t){return e=Eo(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 Eo(e){let t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r="(?:"+Object.keys(t).join("|")+")",o=RegExp(r),n=RegExp(r,"g");return o.test(e)?e.replace(n,a=>t[a]):e}var Up=ht(Np(),1);var LF="recommendation-internal-options",yD=Symbol.for(LF);var $=new Error("Failed to load reducers."),To=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var eo=class extends Error{constructor(r,o){super();Re(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function Mp(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function Lp(e){return typeof e!="object"||!e?!1:Object.values(e).every(QF)}function QF(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Qp(e){return e===429}var Oo=class e{static async call(t){let r=UF(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(Qp(u.status))throw u;return u};try{let u=await(0,Up.backOff)(c,{retry:s=>{let l=s&&Qp(s.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new To;case 404:throw new eo(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new eo(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:c,...u}=t,s=ca(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 Fe(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function Ye(e,t="prod"){return`${Fe(e,t)}/rest/search/v2`}function Xu(e,t="prod"){return`${Fe(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function UF(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,c=e.method==="POST"||e.method==="PUT",u=BF(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...c&&{body:u},signal:i}}function BF(e,t){return t==="application/x-www-form-urlencoded"?Lp(e)?Mp(e):"":JSON.stringify(e)}function jF(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function _F(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Zu(e,t){if(t&&e.name==="AbortError")return{error:_F(e)};if(e instanceof eo)return{error:jF(e)};throw e}var qo=(e,t)=>({...la(e,t),requestParams:$F(e)}),$F=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}},la=(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 Bp=(e,t)=>({...la(e,t),requestParams:zF(e)}),zF=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 jp=e=>({...la(e,"search/querySuggest"),requestParams:WF(e)}),WF=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 Pe=e=>e.error!==void 0,Vi=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...qo(t,"listing"),...this.options})}async search(t){let r=qo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...Bp(t,"recommendations"),...this.options})}async productSuggestions(t){let r=qo(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=jp(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=qo(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=qo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await Oo.call(t);if(r instanceof Error)return Zu(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function da(e,t="prod"){return`${Fe(e,t)}/rest/organizations/${e}/commerce/v2`}var Di=e=>e;import{StringValue as Zp}from"@coveo/bueno";import{Schema as KF,SchemaValidationError as HF,StringValue as ma,RecordValue as GF,ArrayValue as YF}from"@coveo/bueno";var E=new ma({required:!0,emptyAllowed:!1}),te=new ma({required:!1,emptyAllowed:!1}),ce=new ma({required:!0,emptyAllowed:!0}),_p=new ma({required:!1,emptyAllowed:!0}),$p=new YF({each:E,required:!0}),zp=new ma({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),ke=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),ue=(e,t)=>{if("required"in t)return{payload:new KF({value:t}).validate({value:e}).value};let n=new GF({options:{required:!0},values:t}).validate(e);if(n)throw new HF(n);return{payload:e}},R=(e,t)=>{try{return ue(e,t)}catch(r){return{payload:e,error:ke(r)}}},Le=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return Wp(e,t,r,n,"Controller initialization error")},Ve=(e,t,r,o)=>{let n=`Check the options of ${o}`;return Wp(e,t,r,n,"Controller initialization error")},Wp=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};import{ArrayValue as JF,BooleanValue as Hp,RecordValue as XF,StringValue as pa,Value as ZF}from"@coveo/bueno";var ko="3.13.1-pre.cf8bb8919d",Kp=["@coveo/atomic","@coveo/quantic"];var el=()=>te,Gp=()=>E,fa=h("configuration/updateBasicConfiguration",e=>R(e,{accessToken:te,environment:new pa({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:te})),Yp=h("configuration/updateSearchConfiguration",e=>R(e,{proxyBaseUrl:new pa({required:!1,url:!0}),pipeline:new pa({required:!1,emptyAllowed:!0}),searchHub:te,timezone:te,locale:te,authenticationProviders:new JF({required:!1,each:E})})),Vo={enabled:new Hp({default:!0}),originContext:el(),originLevel2:el(),originLevel3:el(),proxyBaseUrl:new pa({required:!1,url:!0}),runtimeEnvironment:new ZF,anonymous:new Hp({default:!1}),deviceId:te,userDisplayName:te,documentLocation:te,trackingId:te,analyticsMode:new pa({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new XF({options:{required:!1},values:Kp.reduce((e,t)=>(e[t]=zp,e),{})})},tl=h("configuration/updateAnalyticsConfiguration",e=>R(e,Vo)),Ni=h("configuration/analytics/disable"),Mi=h("configuration/analytics/enable"),Jp=h("configuration/analytics/originlevel2",e=>R(e,{originLevel2:Gp()})),Xp=h("configuration/analytics/originlevel3",e=>R(e,{originLevel3:Gp()}));var Do=h("commerce/configuration/updateBasicConfiguration",e=>R(e,{accessToken:te,environment:new Zp({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:te})),No=h("commerce/configuration/updateProxyBaseUrl",e=>R(e,{proxyBaseUrl:new Zp({required:!1,url:!0})})),Mo=h("commerce/configuration/updateAnalyticsConfiguration",e=>R(e,{enabled:Vo.enabled,proxyBaseUrl:Vo.proxyBaseUrl,source:Vo.source,trackingId:Vo.trackingId})),Li=h("commerce/configuration/analytics/disable"),Qi=h("commerce/configuration/analytics/enable");import{isNullOrUndefined as to}from"@coveo/bueno";var ef=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var rl=B(ef(),e=>e.addCase(Do,(t,r)=>{eP(t,r.payload)}).addCase(No,(t,r)=>{tP(t,r.payload)}).addCase(Mo,(t,r)=>{rP(t,r.payload)}).addCase(Li,t=>{t.analytics.enabled=!1}).addCase(Qi,t=>{t.analytics.enabled=!0}));function eP(e,t){to(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",to(t.organizationId)||(e.organizationId=t.organizationId)}function tP(e,t){to(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function rP(e,t){to(t.enabled)||(e.analytics.enabled=t.enabled),to(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),to(t.source)||(e.analytics.source=t.source),to(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function Lo(e){return e.currency}var tf=(e,t)=>({currency:Lo(t.commerceContext),products:oP(t.cart),transaction:e}),rf=(e,t)=>({currency:Lo(t.commerceContext),...e}),ro=N(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),oP=N(ro,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));import{ArrayValue as nP,NumberValue as of,RecordValue as aP,Schema as iP,StringValue as cP}from"@coveo/bueno";var ol={productId:E,quantity:new of({required:!0,min:0}),name:new cP({required:!1}),price:new of({required:!1,min:0})},nl=new nP({each:new aP({values:{...ol}})}),al={items:nl},nf=new iP(al);var ur=h("commerce/cart/setItems",e=>R(e,nl)),Qo=h("commerce/cart/updateItemQuantity",e=>R(e,ol)),Uo=h("commerce/cart/purchase"),Ui=j("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=tf(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),Bi=j("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=rf(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 af(e,t){return e.cart[oo(t)]}var cf=N(ro,e=>e.reduce((t,r)=>t+r.quantity,0)),sf=N(ro,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function sP(e,t={}){if(!uP(e))throw $;let{dispatch:r}=e,o=z(e),n=()=>e[Q].cart,a={...t.initialState};Le(e,nf,a,"buildCart"),a.items!==void 0&&r(ur(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 ro(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(Ui(l)),r(Uo())},updateItemQuantity(l){let d=af(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(Bi(s(l,d))),r(Qo(l)))},get state(){let l=n();return{items:ro(l),totalQuantity:cf(l),totalPrice:sf(l)}}}}function oo(e){return`${e.productId},${e.name},${e.price}`}function uP(e){return e.addReducers({cart:Bo}),!0}var ji=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),_i=e=>lf(e.cartItems,e.cart),uf=e=>lf(e.purchasedItems,e.purchased);function lf(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 Bo=B(ji(),e=>{e.addCase(ur,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let c=oo(i);return{cartItems:[...a.cartItems,c],cart:{...a.cart,[c]:i},purchasedItems:[],purchased:{}}},ji());df(t,n,o)}).addCase(Qo,(t,{payload:r})=>{let o=oo(r);if(!(o in t.cart)){lP(r,t);return}if(r.quantity<=0){dP(r,t);return}t.cart[o]=r}).addCase(Uo,t=>{mP(t);let{cart:r,cartItems:o}=ji();df(t,o,r)})});function df(e,t,r){e.cartItems=t,e.cart=r}function lP(e,t){if(e.quantity<=0)return;let r=oo(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function dP(e,t){let r=oo(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function mP(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 mf,RecordValue as pf,Schema as pP,StringValue as fP}from"@coveo/bueno";var gP=Intl.supportedValuesOf("currency"),yP=new fP({required:!0,emptyAllowed:!1,constrainTo:gP}),il={url:E},cl={latitude:new mf({min:-90,max:90,required:!0}),longitude:new mf({min:-180,max:180,required:!0})},ga={language:E,country:E,currency:yP,view:new pf({options:{required:!0},values:il}),location:new pf({options:{required:!1},values:cl})},ff=new pP(ga);var ne=h("commerce/context/set",e=>R(e,ga)),ae=h("commerce/context/setView",e=>R(e,il)),jo=h("commerce/context/setLocation",e=>R(e,cl));var gf=()=>({language:"",country:"",currency:"",view:{url:""}});var Pt=B(gf(),e=>{e.addCase(ne,(t,{payload:r})=>r).addCase(ae,(t,{payload:r})=>{t.view=r}).addCase(jo,(t,{payload:r})=>{t.location=r})});var $i=()=>({correctedQuery:"",corrections:[],originalQuery:""});import{BooleanValue as bP,RecordValue as IP,StringValue as Sf}from"@coveo/bueno";var Je=h("breadcrumb/deselectAll"),lr=h("breadcrumb/deselectAllNonBreadcrumbs");var At=N(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${ko}`));var We=(e,t)=>({...ya(e,t),facets:[...SP(e)],...e.commerceSort&&{sort:CP(e.commerceSort.appliedSort)}}),ya=(e,t,r)=>{let{view:o,location:n,...a}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??da(e.configuration.organizationId,e.configuration.environment),organizationId:e.configuration.organizationId,trackingId:e.configuration.analytics.trackingId,...a,...e.configuration.analytics.enabled?{clientId:t.clientId}:{},context:{user:{...n,...t.userAgent?{userAgent:t.userAgent}:{}},view:{...o,...t.referrer?{referrer:t.referrer}:{}},capture:e.configuration.analytics.enabled,cart:_i(e.cart),source:At(e.configuration.analytics)},...hP(e,r)}},hP=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};function SP(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 CP(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}import{BooleanValue as sl,NumberValue as xP}from"@coveo/bueno";var no=h("commerce/facets/core/updateNumberOfValues",e=>R(e,{facetId:E,numberOfValues:new xP({required:!0,min:1})})),ao=h("commerce/facets/core/updateIsFieldExpanded",e=>R(e,{facetId:E,isFieldExpanded:new sl({required:!0})})),Ae=h("commerce/facets/core/clearAll"),ve=h("commerce/facets/core/deselectAllValues",e=>R(e,{facetId:E})),io=h("commerce/facets/core/updateFreezeCurrentValues",e=>R(e,{facetId:E,freezeCurrentValues:new sl({required:!0})})),_o=h("commerce/facets/core/updateAutoSelectionForAll",e=>R(e,{allow:new sl({required:!0})}));import{NumberValue as yf}from"@coveo/bueno";var zi={slotId:_p},RP={...zi,pageSize:new yf({required:!0,min:0})},Wt=h("commerce/pagination/setPageSize",e=>R(e,RP)),FP={...zi,page:new yf({required:!0,min:0})},vt=h("commerce/pagination/selectPage",e=>R(e,FP)),dr=h("commerce/pagination/nextPage",e=>R(e,zi)),mr=h("commerce/pagination/previousPage",e=>R(e,zi)),$o=h("commerce/pagination/registerRecommendationsSlot",e=>R(e,{slotId:E}));import{StringValue as PP}from"@coveo/bueno";var be=h("commerce/query/update",e=>R(e,{query:new PP}));import{isNullOrUndefined as hf}from"@coveo/bueno";import{RecordValue as AP,StringValue as vP}from"@coveo/bueno";var pr=h("commerce/triggers/query/updateIgnore",e=>R(e,{q:new vP({emptyAllowed:!0,required:!0})})),zo=h("commerce/triggers/query/applyModification",e=>R(e,new AP({values:{originalQuery:te,modification:te}})));var ha=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 Pe(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(!(!hf(n)&&!hf(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:c}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:Rp(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(pr({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(o);return Pe(i.response)?this.rejectWithValue(i.response.error):{...i,response:{...i.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t){return this.dispatch(zo({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...We(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 Pe(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(be({query:t}))}};var H=j("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=We(o,n),i=Oi(o),c=new ha(t),u=await c.fetchFromAPI({...a,query:i});return c.process(u)}),fr=j("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!Sp(o))return null;let i=ar(o),u=ia(o)/i,s=Oi(o),l=We(o,n),d=new ha(t),p=await d.fetchFromAPI({...l,query:s,page:u});return d.process(p)}),Wo=j("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;R(e,{query:new Sf,clearFilters:new bP}),e.clearFilters&&(r(Ae()),r(lr())),r(_o({allow:!0})),r(be({query:e.query})),r(vt({page:0}))}),Ko=j("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({...We(n,i),query:c});if(Pe(u))return r(u.error);let s=u.success.products.slice(0,5);return{response:{...u.success,products:s}}}),wP={child:new IP({options:{required:!0},values:{permanentid:new Sf({required:!0})}})},Ho=h("commerce/search/promoteChildToParent",e=>R(e,wP));function Cf(){return{wasCorrectedTo:"",queryCorrection:$i(),originalQuery:""}}var Wi=B(Cf(),e=>{e.addCase(H.pending,t=>{t.queryCorrection=$i(),t.wasCorrectedTo=""}).addCase(H.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 Ff,BooleanValue as xf,ArrayValue as Hi,StringValue as Ki,NumberValue as Rf,RecordValue as DP}from"@coveo/bueno";var K=E;import{Value as EP,NumberValue as TP,StringValue as OP,ArrayValue as qP,BooleanValue as kP}from"@coveo/bueno";var VP={state:new EP({required:!0}),numberOfResults:new TP({required:!0,min:0}),value:new OP({required:!0,emptyAllowed:!0}),path:new qP({required:!0,each:E}),moreValuesAvailable:new kP({required:!1})};function Sa(e){e.children.forEach(t=>{Sa(t)}),ue({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},VP)}var Go={facetId:K,field:E,tabs:new DP({options:{required:!1},values:{included:new Hi({each:new Ki}),excluded:new Hi({each:new Ki})}}),activeTab:new Ki({required:!1}),delimitingCharacter:new Ki({required:!1,emptyAllowed:!0}),filterFacetCount:new xf({required:!1}),injectionDepth:new Rf({required:!1,min:0}),numberOfValues:new Rf({required:!1,min:1}),sortCriteria:new Ff({required:!1}),basePath:new Hi({required:!1,each:E}),filterByBasePath:new xf({required:!1})},Yo=5,Pf=h("categoryFacet/register",e=>R(e,Go)),Af=h("categoryFacet/toggleSelectValue",e=>{try{return ue(e.facetId,E),Sa(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:ke(t)}}}),vf=h("categoryFacet/deselectAll",e=>R(e,Go.facetId)),M0=h("categoryFacet/updateNumberOfValues",e=>R(e,{facetId:Go.facetId,numberOfValues:Go.numberOfValues})),L0=h("categoryFacet/updateSortCriterion",e=>R(e,{facetId:Go.facetId,criterion:new Ff})),Q0=h("categoryFacet/updateBasePath",e=>R(e,{facetId:Go.facetId,basePath:new Hi({each:E})}));import{NumberValue as QP,RecordValue as UP,ArrayValue as BP}from"@coveo/bueno";import{RecordValue as NP,NumberValue as MP,StringValue as LP}from"@coveo/bueno";var Ca={facetId:K,captions:new NP({options:{required:!1}}),numberOfValues:new MP({required:!1,min:1}),query:new LP({required:!1,emptyAllowed:!0})};var jP={path:new BP({required:!0,each:E}),displayValue:ce,rawValue:ce,count:new QP({required:!0,min:0})},gr=h("categoryFacet/selectSearchResult",e=>R(e,{facetId:K,value:new UP({values:jP})})),Gi=h("categoryFacetSearch/register",e=>R(e,Ca));import{RecordValue as _P,NumberValue as $P}from"@coveo/bueno";var bf={facetId:K,value:new _P({values:{displayValue:ce,rawValue:ce,count:new $P({required:!0,min:0})}})},Yi=h("facetSearch/register",e=>R(e,Ca)),yr=h("facetSearch/update",e=>R(e,Ca)),ut=h("facetSearch/toggleSelectValue",e=>R(e,bf)),lt=h("facetSearch/toggleExcludeValue",e=>R(e,bf));import{BooleanValue as zP}from"@coveo/bueno";var Kt=h("facetOptions/update",(e={freezeFacetOrder:!0})=>R(e,{freezeFacetOrder:new zP({required:!1})})),ul=h("facetOptions/facet/enable",e=>R(e,K)),Ht=h("facetOptions/facet/disable",e=>R(e,K));var WP=h("history/undo"),KP=h("history/redo"),bt=h("history/snapshot"),sL=j("history/back",async(e,{dispatch:t})=>{t(WP()),await t(me())}),uL=j("history/forward",async(e,{dispatch:t})=>{t(KP()),await t(me())}),me=j("history/change",async(e,{getState:t})=>t().history.present);import{BooleanValue as If,StringValue as xa,NumberValue as wf,RecordValue as hr}from"@coveo/bueno";var Ji={q:new xa,enableQuerySyntax:new If,aq:new xa,cq:new xa,firstResult:new wf({min:0}),numberOfResults:new wf({min:0}),sortCriteria:new xa,f:new hr,fExcluded:new hr,cf:new hr,nf:new hr,mnf:new hr,df:new hr,debug:new If,sf:new hr,tab:new xa,af:new hr};var Ce=h("searchParameters/restore",e=>R(e,Ji));import{BooleanValue as ry,NumberValue as oy,StringValue as eI}from"@coveo/bueno";function Gt(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 G;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(G||(G={}));function ml(){return typeof window<"u"}function vl(){return typeof navigator<"u"}function Jo(){return typeof document<"u"}function pl(){try{return typeof localStorage<"u"}catch{return!1}}function HP(){try{return typeof sessionStorage<"u"}catch{return!1}}function jf(){return vl()&&navigator.cookieEnabled}var GP=[G.click,G.custom,G.search,G.view],YP=(e,t)=>GP.indexOf(e)!==-1?Object.assign({language:Jo()?document.documentElement.lang:"unknown",userAgent:vl()?navigator.userAgent:"unknown"},t):t,Pa=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?Ef(t,r,a):(i=c.split("."),n=i[i.length-2]+"."+i[i.length-1],Ef(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 Ef(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function JP(){return pl()?localStorage:jf()?new Aa:HP()?sessionStorage:new Zo}var Aa=class e{getItem(t){return Pa.get(`${e.prefix}${t}`)}removeItem(t){Pa.erase(`${e.prefix}${t}`)}setItem(t,r,o){Pa.set(`${e.prefix}${t}`,r,o)}};Aa.prefix="coveo_";var fl=class{constructor(){this.cookieStorage=new Aa}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)}},Zo=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Ra="__coveo.analytics.history",_f=20,$f=1e3*60,zf=75,en=class{constructor(t){this.store=t||JP()}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(Ra);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(Ra);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Ra,JSON.stringify(t.slice(0,_f)))}catch{}}clear(){try{this.store.removeItem(Ra)}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,zf)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>$f:!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))}},Wf=Object.freeze({__proto__:null,HistoryStore:en,MAX_NUMBER_OF_HISTORY_ELEMENTS:_f,MAX_VALUE_SIZE:zf,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:$f,STORE_KEY:Ra,default:en}),XP=(e,t)=>v(void 0,void 0,void 0,function*(){return e===G.view?(yield ZP(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),ZP=e=>v(void 0,void 0,void 0,function*(){let t=new en,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Xi,eA=new Uint8Array(16);function tA(){if(!Xi&&(Xi=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xi(eA)}var rA=/^(?:[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 ec(e){return typeof e=="string"&&rA.test(e)}var xe=[];for(let e=0;e<256;++e)xe.push((e+256).toString(16).slice(1));function Kf(e,t=0){return(xe[e[t+0]]+xe[e[t+1]]+xe[e[t+2]]+xe[e[t+3]]+"-"+xe[e[t+4]]+xe[e[t+5]]+"-"+xe[e[t+6]]+xe[e[t+7]]+"-"+xe[e[t+8]]+xe[e[t+9]]+"-"+xe[e[t+10]]+xe[e[t+11]]+xe[e[t+12]]+xe[e[t+13]]+xe[e[t+14]]+xe[e[t+15]]).toLowerCase()}function oA(e){if(!ec(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 nA(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var aA="6ba7b810-9dad-11d1-80b4-00c04fd430c8",iA="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function cA(e,t,r){function o(n,a,i,c){var u;if(typeof n=="string"&&(n=nA(n)),typeof a=="string"&&(a=oA(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 Kf(s)}try{o.name=e}catch{}return o.DNS=aA,o.URL=iA,o}var sA=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Tf={randomUUID:sA};function co(e,t,r){if(Tf.randomUUID&&!t&&!e)return Tf.randomUUID();e=e||{};let o=e.random||(e.rng||tA)();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 Kf(o)}function uA(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 ll(e,t){return e<<t|e>>>32-t}function lA(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]=ll(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=ll(u,5)+uA(f,s,l,d)+p+t[f]+c[m]>>>0;p=d,d=l,l=ll(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 dA=cA("v5",80,lA),Of=dA,Hf="2.30.42",qf=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Fa={pageview:"pageview",event:"event"},tc=class{constructor({client:t,uuidGenerator:r=co}){this.client=t,this.uuidGenerator=r}},gl=class extends tc{constructor({client:t,uuidGenerator:r=co}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=qf(window.location),this.lastReferrer=Jo()?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:Jo()?document.title:"",encoding:Jo()?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===Fa.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Fa.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Fa.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Fa.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 qf(window.location)}},Sr=class e{constructor(t,r){if(!ec(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 ec(a)?new e(a,Number.parseInt(n)*1e3):null}};Sr.cvo_cid="cvo_cid";Sr.expirationTime=120;var yl=class extends tc{constructor({client:t,uuidGenerator:r=co}){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(Sr.cvo_cid,new Sr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};yl.Id="link";var Xe=Object.keys;function Zi(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var dl=128,Gf=192,kf=224,Vf=240;function mA(e){return(e&248)===Vf?4:(e&Vf)===kf?3:(e&kf)===Gf?2:1}function pA(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&dl)!=dl)break;if(r-=3,(o&Gf)!=dl){t-r>=mA(o)*3&&(r=t);break}}return e.substring(0,r)}var hl={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=Xe(hl).map(e=>hl[e]),gA=[...fA].join("|"),yA=new RegExp(`^(${gA}$)`),hA={svcAction:"svc_action",svcActionData:"svc_action_data"},SA=e=>Xe(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=hl[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),CA=e=>yA.test(e),xA=[CA],Df={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Nf={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ie={action:"pa",list:"pal",listSource:"pls"},rc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},RA=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Sl={id:"quoteId",affiliation:"quoteAffiliation"},Cl={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},FA={add:Ie,bookmark_add:Ie,bookmark_remove:Ie,click:Ie,checkout:Ie,checkout_option:Ie,detail:Ie,impression:Ie,remove:Ie,refund:Object.assign(Object.assign({},Ie),rc),purchase:Object.assign(Object.assign({},Ie),rc),quickview:Ie,quote:Object.assign(Object.assign({},Ie),Sl),review:Object.assign(Object.assign({},Ie),Cl)},PA=Xe(Df).map(e=>Df[e]),AA=Xe(Nf).map(e=>Nf[e]),vA=Xe(Ie).map(e=>Ie[e]),bA=Xe(rc).map(e=>rc[e]),IA=Xe(Cl).map(e=>Cl[e]),wA=Xe(Sl).map(e=>Sl[e]),EA=[...PA,"custom"].join("|"),TA=[...AA,"custom"].join("|"),Yf="(pr[0-9]+)",Jf="(il[0-9]+pi[0-9]+)",OA=new RegExp(`^${Yf}(${EA})$`),qA=new RegExp(`^(${Jf}(${TA}))|(il[0-9]+nm)$`),kA=new RegExp(`^(${vA.join("|")})$`),VA=new RegExp(`^(${bA.join("|")})$`),DA=new RegExp(`^${Yf}custom$`),NA=new RegExp(`^${Jf}custom$`),MA=new RegExp(`^(${[...RA,...IA,...wA].join("|")})$`),LA=e=>OA.test(e),QA=e=>qA.test(e),UA=e=>kA.test(e),BA=e=>VA.test(e),jA=e=>MA.test(e),_A=[QA,LA,UA,BA,jA],$A=[DA,NA],zA={anonymizeIp:"aip"},WA={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},KA={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},HA=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],GA=Object.assign(Object.assign(Object.assign(Object.assign({},zA),WA),KA),HA.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),xl=Object.assign(Object.assign({},GA),hA),YA=e=>{let t=!!e.action&&FA[e.action]||{};return Xe(e).reduce((r,o)=>{let n=t[o]||xl[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},JA=Xe(xl).map(e=>xl[e]),XA=e=>JA.indexOf(e)!==-1,ZA=e=>e==="custom",ev=e=>[..._A,...xA,XA,ZA].some(t=>t(e)),tv=e=>Xe(e).reduce((t,r)=>{let o=rv(r);return o?Object.assign(Object.assign({},t),ov(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),rv=e=>{let t;return[...$A].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},ov=(e,t)=>Xe(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),Rl=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[G.click,G.custom,G.search,G.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}},Fl=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()})}},Mf=globalThis.fetch,oc=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=Gt(u,["url"]),d;try{d=yield Mf(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 Mf(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[G.click,G.custom,G.search,G.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"})}},Pl=class{constructor(t,r){pl()&&jf()?this.storage=new fl:pl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Zo),this.client=new oc(t),this.beaconClient=new Rl(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}},Al=class{constructor(t,r){this.storage=r||new Zo,this.client=new oc(t)}getClientDependingOnEventType(t){return this.client}},nc=class{constructor(){this.storage=new Zo,this.client=new Fl}getClientDependingOnEventType(t){return this.client}},nv="xx",av=e=>e?.startsWith(nv)||!1,iv=`
19
+ If you are trying to access the inner state... Don't`),Reflect.get(t,r,o)}});import{isNullOrUndefined as YR}from"@coveo/bueno";function he(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var cR=typeof Symbol=="function"&&Symbol.observable||"@@observable",Pm=cR,Ru=()=>Math.random().toString(36).substring(7).split("").join("."),sR={INIT:`@@redux/INIT${Ru()}`,REPLACE:`@@redux/REPLACE${Ru()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Ru()}`},mi=sR;function St(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(he(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(he(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(he(1));return r(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((C,x)=>{i.set(x,C)}))}function l(){if(u)throw new Error(he(3));return n}function d(C){if(typeof C!="function")throw new Error(he(4));if(u)throw new Error(he(5));let x=!0;s();let y=c++;return i.set(y,C),function(){if(x){if(u)throw new Error(he(6));x=!1,s(),i.delete(y),a=null}}}function p(C){if(!St(C))throw new Error(he(7));if(typeof C.type>"u")throw new Error(he(8));if(typeof C.type!="string")throw new Error(he(17));if(u)throw new Error(he(9));try{u=!0,n=o(n,C)}finally{u=!1}return(a=i).forEach(y=>{y()}),C}function m(C){if(typeof C!="function")throw new Error(he(10));o=C,p({type:mi.REPLACE})}function f(){let C=d;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(he(11));function y(){let P=x;P.next&&P.next(l())}return y(),{unsubscribe:C(y)}},[Pm](){return this}}}return p({type:mi.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[Pm]:f}}function uR(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:mi.INIT})>"u")throw new Error(he(12));if(typeof r(void 0,{type:mi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(he(13))})}function Ao(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{uR(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 C=u&&u.type;throw new Error(he(14))}l[p]=g,s=s||g!==f}return s=s||o.length!==Object.keys(c).length,s?l:c}}function vo(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function Am(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(he(15))},i={getState:n.getState,dispatch:(u,...s)=>a(u,...s)},c=e.map(u=>u(i));return a=vo(...c)(n.dispatch),{...n,dispatch:a}}}function pi(e){return St(e)&&"type"in e&&typeof e.type=="string"}var qu=Symbol.for("immer-nothing"),Kn=Symbol.for("immer-draftable"),Ne=Symbol.for("immer-state");function Se(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var zr=Object.getPrototypeOf;function $e(e){return!!e&&!!e[Ne]}function Me(e){return e?Em(e)||Array.isArray(e)||!!e[Kn]||!!e.constructor?.[Kn]||Xn(e)||Zn(e):!1}var lR=Object.prototype.constructor.toString();function Em(e){if(!e||typeof e!="object")return!1;let t=zr(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)===lR}function ku(e){return $e(e)||Se(15,e),e[Ne].base_}function Hn(e,t){Wr(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function Wr(e){let t=e[Ne];return t?t.type_:Array.isArray(e)?1:Xn(e)?2:Zn(e)?3:0}function Gn(e,t){return Wr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Pu(e,t){return Wr(e)===2?e.get(t):e[t]}function Tm(e,t,r){let o=Wr(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function dR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Xn(e){return e instanceof Map}function Zn(e){return e instanceof Set}function $r(e){return e.copy_||e.base_}function bu(e,t){if(Xn(e))return new Map(e);if(Zn(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Em(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[Ne];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(zr(e),o)}else{let o=zr(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function yi(e,t=!1){return hi(e)||$e(e)||!Me(e)||(Wr(e)>1&&(e.set=e.add=e.clear=e.delete=mR),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>yi(o,!0))),e}function mR(){Se(2)}function hi(e){return Object.isFrozen(e)}var Iu={};function Kr(e){let t=Iu[e];return t||Se(0,e),t}function pR(e,t){Iu[e]||(Iu[e]=t)}var Yn;function Om(){return Yn}function fR(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function vm(e,t){t&&(Kr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function wu(e){Eu(e),e.drafts_.forEach(gR),e.drafts_=null}function Eu(e){e===Yn&&(Yn=e.parent_)}function bm(e){return Yn=fR(Yn,e)}function gR(e){let t=e[Ne];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Im(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Ne].modified_&&(wu(t),Se(4)),Me(e)&&(e=fi(t,e),t.parent_||gi(t,e)),t.patches_&&Kr("Patches").generateReplacementPatches_(r[Ne].base_,e,t.patches_,t.inversePatches_)):e=fi(t,r,[]),wu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==qu?e:void 0}function fi(e,t,r){if(hi(t))return t;let o=t[Ne];if(!o)return Hn(t,(n,a)=>wm(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return gi(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),Hn(a,(c,u)=>wm(e,o,n,c,u,r,i)),gi(e,n,!1),r&&e.patches_&&Kr("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function wm(e,t,r,o,n,a,i){if($e(n)){let c=a&&t&&t.type_!==3&&!Gn(t.assigned_,o)?a.concat(o):void 0,u=fi(e,n,c);if(Tm(r,o,u),$e(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(Me(n)&&!hi(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;fi(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&gi(e,n)}}function gi(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&yi(t,r)}function yR(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:Om(),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=Jn);let{revoke:i,proxy:c}=Proxy.revocable(n,a);return o.draft_=c,o.revoke_=i,c}var Vu={get(e,t){if(t===Ne)return e;let r=$r(e);if(!Gn(r,t))return hR(e,r,t);let o=r[t];return e.finalized_||!Me(o)?o:o===Au(e.base_,t)?(vu(e),e.copy_[t]=Ou(o,e)):o},has(e,t){return t in $r(e)},ownKeys(e){return Reflect.ownKeys($r(e))},set(e,t,r){let o=qm($r(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=Au($r(e),t),a=n?.[Ne];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(dR(r,n)&&(r!==void 0||Gn(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=$r(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){Se(11)},getPrototypeOf(e){return zr(e.base_)},setPrototypeOf(){Se(12)}},Jn={};Hn(Vu,(e,t)=>{Jn[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Jn.deleteProperty=function(e,t){return Jn.set.call(this,e,t,void 0)};Jn.set=function(e,t,r){return Vu.set.call(this,e[0],t,r,e[0])};function Au(e,t){let r=e[Ne];return(r?$r(r):e)[t]}function hR(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=zr(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=zr(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 SR=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"&&Se(6),o!==void 0&&typeof o!="function"&&Se(7);let n;if(Me(t)){let a=bm(this),i=Ou(t,void 0),c=!0;try{n=r(i),c=!1}finally{c?wu(a):Eu(a)}return vm(a,o),Im(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===qu&&(n=void 0),this.autoFreeze_&&yi(n,!0),o){let a=[],i=[];Kr("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else Se(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){Me(e)||Se(8),$e(e)&&(e=km(e));let t=bm(this),r=Ou(e,void 0);return r[Ne].isManual_=!0,Eu(t),r}finishDraft(e,t){let r=e&&e[Ne];(!r||!r.isManual_)&&Se(9);let{scope_:o}=r;return vm(o,t),Im(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=Kr("Patches").applyPatches_;return $e(e)?o(e,t):this.produce(e,n=>o(n,t))}};function Ou(e,t){let r=Xn(e)?Kr("MapSet").proxyMap_(e,t):Zn(e)?Kr("MapSet").proxySet_(e,t):yR(e,t);return(t?t.scope_:Om()).drafts_.push(r),r}function km(e){return $e(e)||Se(10,e),Vm(e)}function Vm(e){if(!Me(e)||hi(e))return e;let t=e[Ne],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 Hn(r,(o,n)=>{Tm(r,o,Vm(n))}),t&&(t.finalized_=!1),r}function Dm(){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_:C,assigned_:x}=p,y=p.copy_;y.length<C.length&&([C,y]=[y,C],[f,g]=[g,f]);for(let S=0;S<C.length;S++)if(x[S]&&y[S]!==C[S]){let P=m.concat([S]);f.push({op:t,path:P,value:d(y[S])}),g.push({op:t,path:P,value:d(C[S])})}for(let S=C.length;S<y.length;S++){let P=m.concat([S]);f.push({op:r,path:P,value:d(y[S])})}for(let S=y.length-1;C.length<=S;--S){let P=m.concat([S]);g.push({op:o,path:P})}}function i(p,m,f,g){let{base_:C,copy_:x}=p;Hn(p.assigned_,(y,S)=>{let P=Pu(C,y),O=Pu(x,y),A=S?Gn(C,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_:C,copy_:x}=p,y=0;C.forEach(S=>{if(!x.has(S)){let P=m.concat([y]);f.push({op:o,path:P,value:S}),g.unshift({op:r,path:P,value:S})}y++}),y=0,x.forEach(S=>{if(!C.has(S)){let P=m.concat([y]);f.push({op:r,path:P,value:S}),g.unshift({op:o,path:P,value:S})}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:C}=f,x=p;for(let O=0;O<g.length-1;O++){let A=Wr(x),F=g[O];typeof F!="string"&&typeof F!="number"&&(F=""+F),(A===0||A===1)&&(F==="__proto__"||F==="constructor")&&Se(19),typeof x=="function"&&F==="prototype"&&Se(19),x=Pu(x,F),typeof x!="object"&&Se(18,g.join("/"))}let y=Wr(x),S=l(f.value),P=g[g.length-1];switch(C){case t:switch(y){case 2:return x.set(P,S);case 3:Se(16);default:return x[P]=S}case r:switch(y){case 1:return P==="-"?x.push(S):x.splice(P,0,S);case 2:return x.set(P,S);case 3:return x.add(S);default:return x[P]=S}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:Se(17,C)}}),p}function l(p){if(!Me(p))return p;if(Array.isArray(p))return p.map(l);if(Xn(p))return new Map(Array.from(p.entries()).map(([f,g])=>[f,l(g)]));if(Zn(p))return new Set(Array.from(p).map(l));let m=Object.create(zr(p));for(let f in p)m[f]=l(p[f]);return Gn(p,Kn)&&(m[Kn]=p[Kn]),m}function d(p){return $e(p)?l(p):p}pR("Patches",{applyPatches_:s,generatePatches_:n,generateReplacementPatches_:u})}var ze=new SR,_t=ze.produce,Si=ze.produceWithPatches.bind(ze),Uk=ze.setAutoFreeze.bind(ze),Bk=ze.setUseStrictShallowCopy.bind(ze),Du=ze.applyPatches.bind(ze),jk=ze.createDraft.bind(ze),_k=ze.finishDraft.bind(ze);function CR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function xR(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function RR(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 Nm=e=>Array.isArray(e)?e:[e];function FR(e){let t=Array.isArray(e[0])?e[0]:e;return RR(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function PR(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var Wk=Symbol();var Kk=Object.getPrototypeOf({});var AR=class{constructor(e){this.value=e}deref(){return this.value}},vR=typeof WeakRef<"u"?WeakRef:AR,bR=0,Mm=1;function Ci(){return{s:bR,v:void 0,o:null,p:null}}function bo(e,t={}){let r=Ci(),{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=Ci(),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=Ci(),f.set(m,c)):c=g}}let s=c,l;if(c.s===Mm)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=Mm,s.v=l,l}return i.clearCache=()=>{r=Ci(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function Lm(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()),CR(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=bo,argsMemoizeOptions:f=[],devModeChecks:g={}}=l,C=Nm(p),x=Nm(f),y=FR(n),S=d(function(){return a++,s.apply(null,arguments)},...C),P=!0,O=m(function(){i++;let F=PR(y,arguments);return c=S.apply(null,F),c},...x);return Object.assign(O,{resultFunc:s,memoizedResultFunc:S,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 N=Lm(bo),IR=Object.assign((e,t=N)=>{xR(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:()=>IR});function Qm(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var Um=Qm(),Bm=Qm;var wR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?vo:vo.apply(null,arguments)},oV=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},ER=e=>e&&typeof e.match=="function";function h(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(ct(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=>pi(o)&&o.type===e,r}var Wm=class ea extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,ea.prototype)}static get[Symbol.species](){return ea}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new ea(...t[0].concat(this)):new ea(...t.concat(this))}};function jm(e){return Me(e)?_t(e,()=>{}):e}function _m(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function TR(e){return typeof e=="boolean"}var OR=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new Wm;return r&&(TR(r)?i.push(Um):i.push(Bm(r.extraArgument))),i},nr="RTK_autoBatch",wo=()=>e=>({payload:e,meta:{[nr]:!0}}),$m=e=>t=>{setTimeout(t,e)},qR=(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:$m(10):e.type==="callback"?e.queueNotification:$m(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?.[nr],a=!n,a&&(i||(i=!0,u(s))),o.dispatch(l)}finally{n=!0}}})},kR=e=>function(r){let{autoBatch:o=!0}=r??{},n=new Wm(e);return o&&n.push(qR(typeof o=="object"?o:void 0)),n};function Km(e){let t=OR(),{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(St(r))c=Ao(r);else throw new Error(ct(1));let u;typeof o=="function"?u=o(t):u=t();let s=vo;n&&(s=wR({trace:!1,...typeof n=="object"&&n}));let l=Am(...u),d=kR(l),p=typeof i=="function"?i(d):d(),m=s(...p);return Fu(c,a,m)}function Hm(e){let t={},r=[],o,n={addCase(a,i){let c=typeof a=="string"?a:a.type;if(!c)throw new Error(ct(28));if(c in t)throw new Error(ct(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 VR(e){return typeof e=="function"}function B(e,t){let[r,o,n]=Hm(t),a;if(VR(e))a=()=>jm(e());else{let c=jm(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($e(l)){let m=d(l,u);return m===void 0?l:m}else{if(Me(l))return _t(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 Gm=(e,t)=>ER(e)?e.match(t):e(t);function Ct(...e){return t=>e.some(r=>Gm(r,t))}function Io(...e){return t=>e.every(r=>Gm(r,t))}function Ri(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 ta(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Fi(...e){return e.length===0?t=>Ri(t,["pending"]):ta(e)?Ct(...e.map(t=>t.pending)):Fi()(e[0])}function Hr(...e){return e.length===0?t=>Ri(t,["rejected"]):ta(e)?Ct(...e.map(t=>t.rejected)):Hr()(e[0])}function ra(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Io(Hr(...e),t):ta(e)?Io(Hr(...e),t):ra()(e[0])}function $t(...e){return e.length===0?t=>Ri(t,["fulfilled"]):ta(e)?Ct(...e.map(t=>t.fulfilled)):$t()(e[0])}function Pi(...e){return e.length===0?t=>Ri(t,["pending","fulfilled","rejected"]):ta(e)?Ct(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Pi()(e[0])}var DR="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ai=(e=21)=>{let t="",r=e;for(;r--;)t+=DR[Math.random()*64|0];return t},NR=["name","message","stack","code"],Nu=class{constructor(e,t){Re(this,"_type");this.payload=e,this.meta=t}},zm=class{constructor(e,t){Re(this,"_type");this.payload=e,this.meta=t}},MR=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of NR)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},j=(()=>{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||MR)(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):Ai(),m=new AbortController,f,g;function C(y){g=y,m.abort()}let x=async function(){let y;try{let P=o?.condition?.(u,{getState:l,extra:d});if(QR(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:C,rejectWithValue:(A,F)=>new Nu(A,F),fulfillWithValue:(A,F)=>new zm(A,F)})).then(A=>{if(A instanceof Nu)throw A;return A instanceof zm?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:C,requestId:p,arg:u,unwrap(){return x.then(LR)}})}}return Object.assign(c,{pending:a,rejected:i,fulfilled:n,settled:Ct(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function LR(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function QR(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ym=Symbol.for("rtk-slice-createasyncthunk"),sV={[Ym]:j};function UR(e,t){return`${e}/${t}`}function BR({creators:e}={}){let t=e?.asyncThunk?.[Ym];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(ct(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(_R()):o.reducers)||{},c=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(y,S){let P=typeof y=="string"?y:y.type;if(!P)throw new Error(ct(12));if(P in u.sliceCaseReducersByType)throw new Error(ct(13));return u.sliceCaseReducersByType[P]=S,s},addMatcher(y,S){return u.sliceMatchers.push({matcher:y,reducer:S}),s},exposeAction(y,S){return u.actionCreators[y]=S,s},exposeCaseReducer(y,S){return u.sliceCaseReducersByName[y]=S,s}};c.forEach(y=>{let S=i[y],P={reducerName:y,type:UR(n,y),createNotation:typeof o.reducers=="function"};zR(S)?KR(P,S,s,t):$R(P,S,s)});function l(){let[y={},S=[],P=void 0]=typeof o.extraReducers=="function"?Hm(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 S)A.addMatcher(F.matcher,F.reducer);P&&A.addDefaultCase(P)})}let d=y=>y,p=new Map,m;function f(y,S){return m||(m=l()),m(y,S)}function g(){return m||(m=l()),m.getInitialState()}function C(y,S=!1){function P(A){let F=A[y];return typeof F>"u"&&S&&(F=g()),F}function O(A=d){let F=_m(p,S,()=>new WeakMap);return _m(F,A,()=>{let w={};for(let[b,V]of Object.entries(o.selectors??{}))w[b]=jR(V,A,g,S);return w})}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,...C(a),injectInto(y,{reducerPath:S,...P}={}){let O=S??a;return y.inject({reducerPath:O,reducer:f},P),{...x,...C(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 Gr=BR();function _R(){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 $R({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!WR(o))throw new Error(ct(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 zR(e){return e._reducerDefinitionType==="asyncThunk"}function WR(e){return e._reducerDefinitionType==="reducerWithPrepare"}function KR({type:e,reducerName:t},r,o,n){if(!n)throw new Error(ct(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||xi,pending:c||xi,rejected:u||xi,settled:s||xi})}function xi(){}var Jm="listener",Xm="completed",Zm="cancelled",uV=`task-${Zm}`,lV=`task-${Xm}`,dV=`${Jm}-${Zm}`,mV=`${Jm}-${Xm}`;var{assign:ep}=Object;var Mu="listenerMiddleware";var HR=ep(h(`${Mu}/add`),{withTypes:()=>HR}),pV=h(`${Mu}/removeAll`),GR=ep(h(`${Mu}/remove`),{withTypes:()=>GR});var fV=Symbol.for("rtk-state-proxy-original");function ct(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 ar=N(e=>e.commercePagination?.principal.perPage||0,e=>e),vi=N((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),ir=N(e=>e.commercePagination?.principal.totalEntries||0,e=>e),bi=N((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),Ii=N(e=>e.commercePagination?.principal.page||0,e=>e),tp=N((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var bV=N(e=>e[Q].productListing.responseId,e=>e),oa=N(e=>e.productListing.responseId,e=>e),rp=N(e=>e.productListing.requestId,e=>e),na=N(e=>e.productListing?.products.length||0,e=>e),op=N(e=>({total:ir(e),current:na(e)}),({current:e,total:t})=>e<t),np=N(e=>e.productListing?.isLoading,e=>YR(e)?!1:e),ap=N(e=>e.productListing?.error,e=>e??null);import{isNullOrUndefined as yp}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 xt(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 Rt(e){let{activeValue:t,ancestryMap:r}=XR(e);return t?ZR(t,r):[]}function XR(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 ZR(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function ip(){return{principal:cr(),recommendations:{}}}function cr(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}import{ArrayValue as rF,EnumValue as up,StringValue as lp,RecordValue as dp}from"@coveo/bueno";import{ArrayValue as eF,EnumValue as cp,RecordValue as sp,StringValue as tF}from"@coveo/bueno";var st=(r=>(r.Relevance="relevance",r.Fields="fields",r))(st||{}),Yr=(r=>(r.Ascending="asc",r.Descending="desc",r))(Yr||{}),Ft=()=>({by:"relevance"});var OV=new sp({options:{required:!1},values:{by:new cp({enum:st,required:!0}),fields:new eF({each:new sp({values:{name:new tF,direction:new cp({enum:Yr})}})})}});var wi=e=>({by:"fields",fields:e}),mp=new dp({options:{required:!1},values:{by:new up({enum:st,required:!0}),fields:new rF({each:new dp({values:{field:new lp({required:!0}),direction:new up({enum:Yr}),displayName:new lp}})})}});function Jr(){return{appliedSort:Ft(),availableSorts:[Ft()]}}function Ei(e){return{...oF(e?.commercePagination,t=>t.principal.page,cr().page),...nF(e?.commercePagination,t=>t.principal.perPage,cr().perPage),...Qu(e?.commerceSort,t=>t.appliedSort,Jr().appliedSort),...xt(e.commerceFacetSet,sr(e,"regular"),aF,"f"),...xt(e.commerceFacetSet,sr(e,"regular"),iF,"fExcluded"),...xt(e.commerceFacetSet,sr(e,"location"),cF,"lf"),...xt(e.commerceFacetSet,sr(e,"hierarchical"),sF,"cf"),...xt(e.commerceFacetSet,sr(e,"dateRange"),pp,"df"),...xt(e.commerceFacetSet,sr(e,"dateRange"),fp,"dfExcluded"),...xt(e.commerceFacetSet,sr(e,"numericalRange"),pp,"nf"),...xt(e.commerceFacetSet,sr(e,"numericalRange"),fp,"nfExcluded"),...gp("selected",e.manualNumericFacetSet),...gp("excluded",e.manualNumericFacetSet)}}function oF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function nF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function aF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function iF(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function cF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function pp(e){return e.values.filter(t=>t.state==="selected")}function fp(e){return e.values.filter(t=>t.state==="excluded")}function gp(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 sF(e){return Rt(e.values).map(r=>r.value)}function sr(e,t){return r=>e.commerceFacetSet[r].request.type===t}var Ti=()=>({query:""});var rD=N(e=>e[Q].commerceSearch.responseId,e=>e),aa=N(e=>e.commerceSearch.responseId,e=>e),hp=N(e=>e.commerceSearch.requestId,e=>e),ia=N(e=>e.commerceSearch?.products.length||0,e=>e),Sp=N(e=>({total:ir(e),current:ia(e)}),({current:e,total:t})=>e<t),Cp=N(e=>e.commerceSearch?.isLoading,e=>yp(e)?!1:e),xp=N(e=>e.commerceSearch?.error,e=>e??null),Oi=N(e=>e.commerceQuery?.query,e=>e??""),uF=N(e=>e.commerceSearch?.queryExecuted,e=>e),Rp=(e,t)=>yp(t.queryCorrection?.correctedQuery)?Oi(e):t.queryCorrection.correctedQuery,Fp=e=>({...Lu(e?.commerceQuery,t=>t.query,Ti().query),...Ei(e)});function Pp(e){return{query:uF(e)||""}}var Uu;(t=>t.responseIdSelector=Ap(aa))(Uu||(Uu={}));var Bu;(t=>t.responseIdSelector=Ap(oa))(Bu||(Bu={}));function Ap(e){return t=>e(t[Q])}var wp={};xm(wp,{escape:()=>Eo,getHighlightedSuggestion:()=>_u,highlightString:()=>mF});import{isNullOrUndefined as dF}from"@coveo/bueno";var Xr=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function bp(e){return Array.isArray(e)}function qi(e){return e.trim()===""}function Ip(e){let t={};for(let[r,o]of e)t[r]=o;return t}function ca(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function mF(e){if(qi(e.openingDelimiter)||qi(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(dF(e.content)||qi(e.content))return e.content;if(e.highlights.length===0)return Eo(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+=Eo(e.content.slice(o,i)),r+=e.openingDelimiter,r+=Eo(e.content.slice(i,c)),r+=e.closingDelimiter,o=c}return o!==t&&(r+=Eo(e.content.slice(o))),r}function _u(e,t){return e=Eo(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 Eo(e){let t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r="(?:"+Object.keys(t).join("|")+")",o=RegExp(r),n=RegExp(r,"g");return o.test(e)?e.replace(n,a=>t[a]):e}var Up=ht(Np(),1);var LF="recommendation-internal-options",yD=Symbol.for(LF);var $=new Error("Failed to load reducers."),To=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var eo=class extends Error{constructor(r,o){super();Re(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function Mp(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function Lp(e){return typeof e!="object"||!e?!1:Object.values(e).every(QF)}function QF(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Qp(e){return e===429}var Oo=class e{static async call(t){let r=UF(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(Qp(u.status))throw u;return u};try{let u=await(0,Up.backOff)(c,{retry:s=>{let l=s&&Qp(s.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new To;case 404:throw new eo(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new eo(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:c,...u}=t,s=ca(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 Fe(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function Ye(e,t="prod"){return`${Fe(e,t)}/rest/search/v2`}function Xu(e,t="prod"){return`${Fe(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function UF(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,c=e.method==="POST"||e.method==="PUT",u=BF(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...c&&{body:u},signal:i}}function BF(e,t){return t==="application/x-www-form-urlencoded"?Lp(e)?Mp(e):"":JSON.stringify(e)}function jF(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function _F(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Zu(e,t){if(t&&e.name==="AbortError")return{error:_F(e)};if(e instanceof eo)return{error:jF(e)};throw e}var qo=(e,t)=>({...la(e,t),requestParams:$F(e)}),$F=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}},la=(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 Bp=(e,t)=>({...la(e,t),requestParams:zF(e)}),zF=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 jp=e=>({...la(e,"search/querySuggest"),requestParams:WF(e)}),WF=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 Pe=e=>e.error!==void 0,Vi=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...qo(t,"listing"),...this.options})}async search(t){let r=qo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...Bp(t,"recommendations"),...this.options})}async productSuggestions(t){let r=qo(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=jp(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=qo(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=qo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await Oo.call(t);if(r instanceof Error)return Zu(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function da(e,t="prod"){return`${Fe(e,t)}/rest/organizations/${e}/commerce/v2`}var Di=e=>e;import{StringValue as Zp}from"@coveo/bueno";import{Schema as KF,SchemaValidationError as HF,StringValue as ma,RecordValue as GF,ArrayValue as YF}from"@coveo/bueno";var E=new ma({required:!0,emptyAllowed:!1}),te=new ma({required:!1,emptyAllowed:!1}),ce=new ma({required:!0,emptyAllowed:!0}),_p=new ma({required:!1,emptyAllowed:!0}),$p=new YF({each:E,required:!0}),zp=new ma({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),ke=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),ue=(e,t)=>{if("required"in t)return{payload:new KF({value:t}).validate({value:e}).value};let n=new GF({options:{required:!0},values:t}).validate(e);if(n)throw new HF(n);return{payload:e}},R=(e,t)=>{try{return ue(e,t)}catch(r){return{payload:e,error:ke(r)}}},Le=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return Wp(e,t,r,n,"Controller initialization error")},Ve=(e,t,r,o)=>{let n=`Check the options of ${o}`;return Wp(e,t,r,n,"Controller initialization error")},Wp=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};import{ArrayValue as JF,BooleanValue as Hp,RecordValue as XF,StringValue as pa,Value as ZF}from"@coveo/bueno";var ko="3.13.1-pre.db77dd01fb",Kp=["@coveo/atomic","@coveo/quantic"];var el=()=>te,Gp=()=>E,fa=h("configuration/updateBasicConfiguration",e=>R(e,{accessToken:te,environment:new pa({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:te})),Yp=h("configuration/updateSearchConfiguration",e=>R(e,{proxyBaseUrl:new pa({required:!1,url:!0}),pipeline:new pa({required:!1,emptyAllowed:!0}),searchHub:te,timezone:te,locale:te,authenticationProviders:new JF({required:!1,each:E})})),Vo={enabled:new Hp({default:!0}),originContext:el(),originLevel2:el(),originLevel3:el(),proxyBaseUrl:new pa({required:!1,url:!0}),runtimeEnvironment:new ZF,anonymous:new Hp({default:!1}),deviceId:te,userDisplayName:te,documentLocation:te,trackingId:te,analyticsMode:new pa({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new XF({options:{required:!1},values:Kp.reduce((e,t)=>(e[t]=zp,e),{})})},tl=h("configuration/updateAnalyticsConfiguration",e=>R(e,Vo)),Ni=h("configuration/analytics/disable"),Mi=h("configuration/analytics/enable"),Jp=h("configuration/analytics/originlevel2",e=>R(e,{originLevel2:Gp()})),Xp=h("configuration/analytics/originlevel3",e=>R(e,{originLevel3:Gp()}));var Do=h("commerce/configuration/updateBasicConfiguration",e=>R(e,{accessToken:te,environment:new Zp({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:te})),No=h("commerce/configuration/updateProxyBaseUrl",e=>R(e,{proxyBaseUrl:new Zp({required:!1,url:!0})})),Mo=h("commerce/configuration/updateAnalyticsConfiguration",e=>R(e,{enabled:Vo.enabled,proxyBaseUrl:Vo.proxyBaseUrl,source:Vo.source,trackingId:Vo.trackingId})),Li=h("commerce/configuration/analytics/disable"),Qi=h("commerce/configuration/analytics/enable");import{isNullOrUndefined as to}from"@coveo/bueno";var ef=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var rl=B(ef(),e=>e.addCase(Do,(t,r)=>{eP(t,r.payload)}).addCase(No,(t,r)=>{tP(t,r.payload)}).addCase(Mo,(t,r)=>{rP(t,r.payload)}).addCase(Li,t=>{t.analytics.enabled=!1}).addCase(Qi,t=>{t.analytics.enabled=!0}));function eP(e,t){to(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",to(t.organizationId)||(e.organizationId=t.organizationId)}function tP(e,t){to(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function rP(e,t){to(t.enabled)||(e.analytics.enabled=t.enabled),to(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),to(t.source)||(e.analytics.source=t.source),to(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function Lo(e){return e.currency}var tf=(e,t)=>({currency:Lo(t.commerceContext),products:oP(t.cart),transaction:e}),rf=(e,t)=>({currency:Lo(t.commerceContext),...e}),ro=N(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),oP=N(ro,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));import{ArrayValue as nP,NumberValue as of,RecordValue as aP,Schema as iP,StringValue as cP}from"@coveo/bueno";var ol={productId:E,quantity:new of({required:!0,min:0}),name:new cP({required:!1}),price:new of({required:!1,min:0})},nl=new nP({each:new aP({values:{...ol}})}),al={items:nl},nf=new iP(al);var ur=h("commerce/cart/setItems",e=>R(e,nl)),Qo=h("commerce/cart/updateItemQuantity",e=>R(e,ol)),Uo=h("commerce/cart/purchase"),Ui=j("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=tf(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),Bi=j("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=rf(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 af(e,t){return e.cart[oo(t)]}var cf=N(ro,e=>e.reduce((t,r)=>t+r.quantity,0)),sf=N(ro,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function sP(e,t={}){if(!uP(e))throw $;let{dispatch:r}=e,o=z(e),n=()=>e[Q].cart,a={...t.initialState};Le(e,nf,a,"buildCart"),a.items!==void 0&&r(ur(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 ro(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(Ui(l)),r(Uo())},updateItemQuantity(l){let d=af(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(Bi(s(l,d))),r(Qo(l)))},get state(){let l=n();return{items:ro(l),totalQuantity:cf(l),totalPrice:sf(l)}}}}function oo(e){return`${e.productId},${e.name},${e.price}`}function uP(e){return e.addReducers({cart:Bo}),!0}var ji=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),_i=e=>lf(e.cartItems,e.cart),uf=e=>lf(e.purchasedItems,e.purchased);function lf(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 Bo=B(ji(),e=>{e.addCase(ur,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let c=oo(i);return{cartItems:[...a.cartItems,c],cart:{...a.cart,[c]:i},purchasedItems:[],purchased:{}}},ji());df(t,n,o)}).addCase(Qo,(t,{payload:r})=>{let o=oo(r);if(!(o in t.cart)){lP(r,t);return}if(r.quantity<=0){dP(r,t);return}t.cart[o]=r}).addCase(Uo,t=>{mP(t);let{cart:r,cartItems:o}=ji();df(t,o,r)})});function df(e,t,r){e.cartItems=t,e.cart=r}function lP(e,t){if(e.quantity<=0)return;let r=oo(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function dP(e,t){let r=oo(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function mP(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 mf,RecordValue as pf,Schema as pP,StringValue as fP}from"@coveo/bueno";var gP=Intl.supportedValuesOf("currency"),yP=new fP({required:!0,emptyAllowed:!1,constrainTo:gP}),il={url:E},cl={latitude:new mf({min:-90,max:90,required:!0}),longitude:new mf({min:-180,max:180,required:!0})},ga={language:E,country:E,currency:yP,view:new pf({options:{required:!0},values:il}),location:new pf({options:{required:!1},values:cl})},ff=new pP(ga);var ne=h("commerce/context/set",e=>R(e,ga)),ae=h("commerce/context/setView",e=>R(e,il)),jo=h("commerce/context/setLocation",e=>R(e,cl));var gf=()=>({language:"",country:"",currency:"",view:{url:""}});var Pt=B(gf(),e=>{e.addCase(ne,(t,{payload:r})=>r).addCase(ae,(t,{payload:r})=>{t.view=r}).addCase(jo,(t,{payload:r})=>{t.location=r})});var $i=()=>({correctedQuery:"",corrections:[],originalQuery:""});import{BooleanValue as bP,RecordValue as IP,StringValue as Sf}from"@coveo/bueno";var Je=h("breadcrumb/deselectAll"),lr=h("breadcrumb/deselectAllNonBreadcrumbs");var At=N(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${ko}`));var We=(e,t)=>({...ya(e,t),facets:[...SP(e)],...e.commerceSort&&{sort:CP(e.commerceSort.appliedSort)}}),ya=(e,t,r)=>{let{view:o,location:n,...a}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??da(e.configuration.organizationId,e.configuration.environment),organizationId:e.configuration.organizationId,trackingId:e.configuration.analytics.trackingId,...a,...e.configuration.analytics.enabled?{clientId:t.clientId}:{},context:{user:{...n,...t.userAgent?{userAgent:t.userAgent}:{}},view:{...o,...t.referrer?{referrer:t.referrer}:{}},capture:e.configuration.analytics.enabled,cart:_i(e.cart),source:At(e.configuration.analytics)},...hP(e,r)}},hP=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};function SP(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 CP(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}import{BooleanValue as sl,NumberValue as xP}from"@coveo/bueno";var no=h("commerce/facets/core/updateNumberOfValues",e=>R(e,{facetId:E,numberOfValues:new xP({required:!0,min:1})})),ao=h("commerce/facets/core/updateIsFieldExpanded",e=>R(e,{facetId:E,isFieldExpanded:new sl({required:!0})})),Ae=h("commerce/facets/core/clearAll"),ve=h("commerce/facets/core/deselectAllValues",e=>R(e,{facetId:E})),io=h("commerce/facets/core/updateFreezeCurrentValues",e=>R(e,{facetId:E,freezeCurrentValues:new sl({required:!0})})),_o=h("commerce/facets/core/updateAutoSelectionForAll",e=>R(e,{allow:new sl({required:!0})}));import{NumberValue as yf}from"@coveo/bueno";var zi={slotId:_p},RP={...zi,pageSize:new yf({required:!0,min:0})},Wt=h("commerce/pagination/setPageSize",e=>R(e,RP)),FP={...zi,page:new yf({required:!0,min:0})},vt=h("commerce/pagination/selectPage",e=>R(e,FP)),dr=h("commerce/pagination/nextPage",e=>R(e,zi)),mr=h("commerce/pagination/previousPage",e=>R(e,zi)),$o=h("commerce/pagination/registerRecommendationsSlot",e=>R(e,{slotId:E}));import{StringValue as PP}from"@coveo/bueno";var be=h("commerce/query/update",e=>R(e,{query:new PP}));import{isNullOrUndefined as hf}from"@coveo/bueno";import{RecordValue as AP,StringValue as vP}from"@coveo/bueno";var pr=h("commerce/triggers/query/updateIgnore",e=>R(e,{q:new vP({emptyAllowed:!0,required:!0})})),zo=h("commerce/triggers/query/applyModification",e=>R(e,new AP({values:{originalQuery:te,modification:te}})));var ha=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 Pe(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(!(!hf(n)&&!hf(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:c}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:Rp(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(pr({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(o);return Pe(i.response)?this.rejectWithValue(i.response.error):{...i,response:{...i.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t){return this.dispatch(zo({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...We(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 Pe(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(be({query:t}))}};var H=j("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=We(o,n),i=Oi(o),c=new ha(t),u=await c.fetchFromAPI({...a,query:i});return c.process(u)}),fr=j("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!Sp(o))return null;let i=ar(o),u=ia(o)/i,s=Oi(o),l=We(o,n),d=new ha(t),p=await d.fetchFromAPI({...l,query:s,page:u});return d.process(p)}),Wo=j("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;R(e,{query:new Sf,clearFilters:new bP}),e.clearFilters&&(r(Ae()),r(lr())),r(_o({allow:!0})),r(be({query:e.query})),r(vt({page:0}))}),Ko=j("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({...We(n,i),query:c});if(Pe(u))return r(u.error);let s=u.success.products.slice(0,5);return{response:{...u.success,products:s}}}),wP={child:new IP({options:{required:!0},values:{permanentid:new Sf({required:!0})}})},Ho=h("commerce/search/promoteChildToParent",e=>R(e,wP));function Cf(){return{wasCorrectedTo:"",queryCorrection:$i(),originalQuery:""}}var Wi=B(Cf(),e=>{e.addCase(H.pending,t=>{t.queryCorrection=$i(),t.wasCorrectedTo=""}).addCase(H.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 Ff,BooleanValue as xf,ArrayValue as Hi,StringValue as Ki,NumberValue as Rf,RecordValue as DP}from"@coveo/bueno";var K=E;import{Value as EP,NumberValue as TP,StringValue as OP,ArrayValue as qP,BooleanValue as kP}from"@coveo/bueno";var VP={state:new EP({required:!0}),numberOfResults:new TP({required:!0,min:0}),value:new OP({required:!0,emptyAllowed:!0}),path:new qP({required:!0,each:E}),moreValuesAvailable:new kP({required:!1})};function Sa(e){e.children.forEach(t=>{Sa(t)}),ue({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},VP)}var Go={facetId:K,field:E,tabs:new DP({options:{required:!1},values:{included:new Hi({each:new Ki}),excluded:new Hi({each:new Ki})}}),activeTab:new Ki({required:!1}),delimitingCharacter:new Ki({required:!1,emptyAllowed:!0}),filterFacetCount:new xf({required:!1}),injectionDepth:new Rf({required:!1,min:0}),numberOfValues:new Rf({required:!1,min:1}),sortCriteria:new Ff({required:!1}),basePath:new Hi({required:!1,each:E}),filterByBasePath:new xf({required:!1})},Yo=5,Pf=h("categoryFacet/register",e=>R(e,Go)),Af=h("categoryFacet/toggleSelectValue",e=>{try{return ue(e.facetId,E),Sa(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:ke(t)}}}),vf=h("categoryFacet/deselectAll",e=>R(e,Go.facetId)),M0=h("categoryFacet/updateNumberOfValues",e=>R(e,{facetId:Go.facetId,numberOfValues:Go.numberOfValues})),L0=h("categoryFacet/updateSortCriterion",e=>R(e,{facetId:Go.facetId,criterion:new Ff})),Q0=h("categoryFacet/updateBasePath",e=>R(e,{facetId:Go.facetId,basePath:new Hi({each:E})}));import{NumberValue as QP,RecordValue as UP,ArrayValue as BP}from"@coveo/bueno";import{RecordValue as NP,NumberValue as MP,StringValue as LP}from"@coveo/bueno";var Ca={facetId:K,captions:new NP({options:{required:!1}}),numberOfValues:new MP({required:!1,min:1}),query:new LP({required:!1,emptyAllowed:!0})};var jP={path:new BP({required:!0,each:E}),displayValue:ce,rawValue:ce,count:new QP({required:!0,min:0})},gr=h("categoryFacet/selectSearchResult",e=>R(e,{facetId:K,value:new UP({values:jP})})),Gi=h("categoryFacetSearch/register",e=>R(e,Ca));import{RecordValue as _P,NumberValue as $P}from"@coveo/bueno";var bf={facetId:K,value:new _P({values:{displayValue:ce,rawValue:ce,count:new $P({required:!0,min:0})}})},Yi=h("facetSearch/register",e=>R(e,Ca)),yr=h("facetSearch/update",e=>R(e,Ca)),ut=h("facetSearch/toggleSelectValue",e=>R(e,bf)),lt=h("facetSearch/toggleExcludeValue",e=>R(e,bf));import{BooleanValue as zP}from"@coveo/bueno";var Kt=h("facetOptions/update",(e={freezeFacetOrder:!0})=>R(e,{freezeFacetOrder:new zP({required:!1})})),ul=h("facetOptions/facet/enable",e=>R(e,K)),Ht=h("facetOptions/facet/disable",e=>R(e,K));var WP=h("history/undo"),KP=h("history/redo"),bt=h("history/snapshot"),sL=j("history/back",async(e,{dispatch:t})=>{t(WP()),await t(me())}),uL=j("history/forward",async(e,{dispatch:t})=>{t(KP()),await t(me())}),me=j("history/change",async(e,{getState:t})=>t().history.present);import{BooleanValue as If,StringValue as xa,NumberValue as wf,RecordValue as hr}from"@coveo/bueno";var Ji={q:new xa,enableQuerySyntax:new If,aq:new xa,cq:new xa,firstResult:new wf({min:0}),numberOfResults:new wf({min:0}),sortCriteria:new xa,f:new hr,fExcluded:new hr,cf:new hr,nf:new hr,mnf:new hr,df:new hr,debug:new If,sf:new hr,tab:new xa,af:new hr};var Ce=h("searchParameters/restore",e=>R(e,Ji));import{BooleanValue as ry,NumberValue as oy,StringValue as eI}from"@coveo/bueno";function Gt(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 G;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(G||(G={}));function ml(){return typeof window<"u"}function vl(){return typeof navigator<"u"}function Jo(){return typeof document<"u"}function pl(){try{return typeof localStorage<"u"}catch{return!1}}function HP(){try{return typeof sessionStorage<"u"}catch{return!1}}function jf(){return vl()&&navigator.cookieEnabled}var GP=[G.click,G.custom,G.search,G.view],YP=(e,t)=>GP.indexOf(e)!==-1?Object.assign({language:Jo()?document.documentElement.lang:"unknown",userAgent:vl()?navigator.userAgent:"unknown"},t):t,Pa=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?Ef(t,r,a):(i=c.split("."),n=i[i.length-2]+"."+i[i.length-1],Ef(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 Ef(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function JP(){return pl()?localStorage:jf()?new Aa:HP()?sessionStorage:new Zo}var Aa=class e{getItem(t){return Pa.get(`${e.prefix}${t}`)}removeItem(t){Pa.erase(`${e.prefix}${t}`)}setItem(t,r,o){Pa.set(`${e.prefix}${t}`,r,o)}};Aa.prefix="coveo_";var fl=class{constructor(){this.cookieStorage=new Aa}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)}},Zo=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Ra="__coveo.analytics.history",_f=20,$f=1e3*60,zf=75,en=class{constructor(t){this.store=t||JP()}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(Ra);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(Ra);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Ra,JSON.stringify(t.slice(0,_f)))}catch{}}clear(){try{this.store.removeItem(Ra)}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,zf)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>$f:!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))}},Wf=Object.freeze({__proto__:null,HistoryStore:en,MAX_NUMBER_OF_HISTORY_ELEMENTS:_f,MAX_VALUE_SIZE:zf,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:$f,STORE_KEY:Ra,default:en}),XP=(e,t)=>v(void 0,void 0,void 0,function*(){return e===G.view?(yield ZP(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),ZP=e=>v(void 0,void 0,void 0,function*(){let t=new en,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Xi,eA=new Uint8Array(16);function tA(){if(!Xi&&(Xi=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Xi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Xi(eA)}var rA=/^(?:[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 ec(e){return typeof e=="string"&&rA.test(e)}var xe=[];for(let e=0;e<256;++e)xe.push((e+256).toString(16).slice(1));function Kf(e,t=0){return(xe[e[t+0]]+xe[e[t+1]]+xe[e[t+2]]+xe[e[t+3]]+"-"+xe[e[t+4]]+xe[e[t+5]]+"-"+xe[e[t+6]]+xe[e[t+7]]+"-"+xe[e[t+8]]+xe[e[t+9]]+"-"+xe[e[t+10]]+xe[e[t+11]]+xe[e[t+12]]+xe[e[t+13]]+xe[e[t+14]]+xe[e[t+15]]).toLowerCase()}function oA(e){if(!ec(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 nA(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var aA="6ba7b810-9dad-11d1-80b4-00c04fd430c8",iA="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function cA(e,t,r){function o(n,a,i,c){var u;if(typeof n=="string"&&(n=nA(n)),typeof a=="string"&&(a=oA(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 Kf(s)}try{o.name=e}catch{}return o.DNS=aA,o.URL=iA,o}var sA=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Tf={randomUUID:sA};function co(e,t,r){if(Tf.randomUUID&&!t&&!e)return Tf.randomUUID();e=e||{};let o=e.random||(e.rng||tA)();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 Kf(o)}function uA(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 ll(e,t){return e<<t|e>>>32-t}function lA(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]=ll(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=ll(u,5)+uA(f,s,l,d)+p+t[f]+c[m]>>>0;p=d,d=l,l=ll(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 dA=cA("v5",80,lA),Of=dA,Hf="2.30.42",qf=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Fa={pageview:"pageview",event:"event"},tc=class{constructor({client:t,uuidGenerator:r=co}){this.client=t,this.uuidGenerator=r}},gl=class extends tc{constructor({client:t,uuidGenerator:r=co}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=qf(window.location),this.lastReferrer=Jo()?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:Jo()?document.title:"",encoding:Jo()?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===Fa.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Fa.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Fa.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Fa.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 qf(window.location)}},Sr=class e{constructor(t,r){if(!ec(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 ec(a)?new e(a,Number.parseInt(n)*1e3):null}};Sr.cvo_cid="cvo_cid";Sr.expirationTime=120;var yl=class extends tc{constructor({client:t,uuidGenerator:r=co}){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(Sr.cvo_cid,new Sr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};yl.Id="link";var Xe=Object.keys;function Zi(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var dl=128,Gf=192,kf=224,Vf=240;function mA(e){return(e&248)===Vf?4:(e&Vf)===kf?3:(e&kf)===Gf?2:1}function pA(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&dl)!=dl)break;if(r-=3,(o&Gf)!=dl){t-r>=mA(o)*3&&(r=t);break}}return e.substring(0,r)}var hl={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=Xe(hl).map(e=>hl[e]),gA=[...fA].join("|"),yA=new RegExp(`^(${gA}$)`),hA={svcAction:"svc_action",svcActionData:"svc_action_data"},SA=e=>Xe(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=hl[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),CA=e=>yA.test(e),xA=[CA],Df={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Nf={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ie={action:"pa",list:"pal",listSource:"pls"},rc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},RA=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Sl={id:"quoteId",affiliation:"quoteAffiliation"},Cl={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},FA={add:Ie,bookmark_add:Ie,bookmark_remove:Ie,click:Ie,checkout:Ie,checkout_option:Ie,detail:Ie,impression:Ie,remove:Ie,refund:Object.assign(Object.assign({},Ie),rc),purchase:Object.assign(Object.assign({},Ie),rc),quickview:Ie,quote:Object.assign(Object.assign({},Ie),Sl),review:Object.assign(Object.assign({},Ie),Cl)},PA=Xe(Df).map(e=>Df[e]),AA=Xe(Nf).map(e=>Nf[e]),vA=Xe(Ie).map(e=>Ie[e]),bA=Xe(rc).map(e=>rc[e]),IA=Xe(Cl).map(e=>Cl[e]),wA=Xe(Sl).map(e=>Sl[e]),EA=[...PA,"custom"].join("|"),TA=[...AA,"custom"].join("|"),Yf="(pr[0-9]+)",Jf="(il[0-9]+pi[0-9]+)",OA=new RegExp(`^${Yf}(${EA})$`),qA=new RegExp(`^(${Jf}(${TA}))|(il[0-9]+nm)$`),kA=new RegExp(`^(${vA.join("|")})$`),VA=new RegExp(`^(${bA.join("|")})$`),DA=new RegExp(`^${Yf}custom$`),NA=new RegExp(`^${Jf}custom$`),MA=new RegExp(`^(${[...RA,...IA,...wA].join("|")})$`),LA=e=>OA.test(e),QA=e=>qA.test(e),UA=e=>kA.test(e),BA=e=>VA.test(e),jA=e=>MA.test(e),_A=[QA,LA,UA,BA,jA],$A=[DA,NA],zA={anonymizeIp:"aip"},WA={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},KA={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},HA=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],GA=Object.assign(Object.assign(Object.assign(Object.assign({},zA),WA),KA),HA.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),xl=Object.assign(Object.assign({},GA),hA),YA=e=>{let t=!!e.action&&FA[e.action]||{};return Xe(e).reduce((r,o)=>{let n=t[o]||xl[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},JA=Xe(xl).map(e=>xl[e]),XA=e=>JA.indexOf(e)!==-1,ZA=e=>e==="custom",ev=e=>[..._A,...xA,XA,ZA].some(t=>t(e)),tv=e=>Xe(e).reduce((t,r)=>{let o=rv(r);return o?Object.assign(Object.assign({},t),ov(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),rv=e=>{let t;return[...$A].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},ov=(e,t)=>Xe(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),Rl=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[G.click,G.custom,G.search,G.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}},Fl=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()})}},Mf=globalThis.fetch,oc=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=Gt(u,["url"]),d;try{d=yield Mf(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 Mf(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[G.click,G.custom,G.search,G.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"})}},Pl=class{constructor(t,r){pl()&&jf()?this.storage=new fl:pl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Zo),this.client=new oc(t),this.beaconClient=new Rl(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}},Al=class{constructor(t,r){this.storage=r||new Zo,this.client=new oc(t)}getClientDependingOnEventType(t){return this.client}},nc=class{constructor(){this.storage=new Zo,this.client=new Fl}getClientDependingOnEventType(t){return this.client}},nv="xx",av=e=>e?.startsWith(nv)||!1,iv=`
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