@coveo/headless 3.23.1-pre.a2f9cb2e69 → 3.23.1-pre.a7bfaa6d0d

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 (44) 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/quantic/browser.cjs.stats.json +1 -1
  24. package/dist/quantic/case-assist/browser.cjs.stats.json +1 -1
  25. package/dist/quantic/case-assist/headless.js +2 -2
  26. package/dist/quantic/case-assist/headless.js.map +2 -2
  27. package/dist/quantic/commerce/browser.cjs.stats.json +1 -1
  28. package/dist/quantic/commerce/headless.js +2 -2
  29. package/dist/quantic/commerce/headless.js.map +2 -2
  30. package/dist/quantic/headless.js +2 -2
  31. package/dist/quantic/headless.js.map +2 -2
  32. package/dist/quantic/insight/browser.cjs.stats.json +1 -1
  33. package/dist/quantic/insight/headless.js +6 -6
  34. package/dist/quantic/insight/headless.js.map +3 -3
  35. package/dist/quantic/recommendation/browser.cjs.stats.json +1 -1
  36. package/dist/quantic/recommendation/headless.js +2 -2
  37. package/dist/quantic/recommendation/headless.js.map +2 -2
  38. package/dist/recommendation/headless.cjs +1 -1
  39. package/dist/recommendation/headless.esm.js +1 -1
  40. package/dist/ssr/headless.cjs +1 -1
  41. package/dist/ssr/headless.esm.js +1 -1
  42. package/dist/ssr-commerce/headless.cjs +1 -1
  43. package/dist/ssr-commerce/headless.esm.js +1 -1
  44. package/package.json +4 -4
@@ -16,7 +16,7 @@
16
16
  * limitations under the License.
17
17
  */
18
18
  var xR=Object.create;var hi=Object.defineProperty;var RR=Object.getOwnPropertyDescriptor;var FR=Object.getOwnPropertyNames;var PR=Object.getPrototypeOf,vR=Object.prototype.hasOwnProperty;var AR=(e,t,r)=>t in e?hi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Fe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Mm=(e,t)=>{for(var r in t)hi(e,r,{get:t[r],enumerable:!0})},bR=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of FR(t))!vR.call(e,n)&&n!==r&&hi(e,n,{get:()=>t[n],enumerable:!(o=RR(t,n))||o.enumerable});return e};var Pt=(e,t,r)=>(r=e!=null?xR(PR(e)):{},bR(t||!e||!e.__esModule?hi(r,"default",{value:e,enumerable:!0}):r,e));var Be=(e,t,r)=>AR(e,typeof t!="symbol"?t+"":t,r);var Wp=Fe(xa=>{"use strict";var Li=xa&&xa.__assign||function(){return Li=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},Li.apply(this,arguments)};Object.defineProperty(xa,"__esModule",{value:!0});var kF={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function VF(e){var t=Li(Li({},kF),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}xa.getSanitizedOptions=VF});var Kp=Fe(zu=>{"use strict";Object.defineProperty(zu,"__esModule",{value:!0});function DF(e){var t=Math.random()*e;return Math.round(t)}zu.fullJitter=DF});var Gp=Fe(Wu=>{"use strict";Object.defineProperty(Wu,"__esModule",{value:!0});function NF(e){return e}Wu.noJitter=NF});var Hp=Fe(Ku=>{"use strict";Object.defineProperty(Ku,"__esModule",{value:!0});var MF=Kp(),QF=Gp();function LF(e){switch(e.jitter){case"full":return MF.fullJitter;case"none":default:return QF.noJitter}}Ku.JitterFactory=LF});var Hu=Fe(Gu=>{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});var UF=Hp(),BF=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=UF.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}();Gu.Delay=BF});var Yp=Fe(Yt=>{"use strict";var jF=Yt&&Yt.__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)}}(),_F=Yt&&Yt.__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())})},$F=Yt&&Yt.__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(Yt,"__esModule",{value:!0});var zF=Hu(),WF=function(e){jF(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return _F(this,void 0,void 0,function(){return $F(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}(zF.Delay);Yt.SkipFirstDelay=WF});var Jp=Fe(Ra=>{"use strict";var KF=Ra&&Ra.__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(Ra,"__esModule",{value:!0});var GF=Hu(),HF=function(e){KF(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(GF.Delay);Ra.AlwaysDelay=HF});var Xp=Fe(Yu=>{"use strict";Object.defineProperty(Yu,"__esModule",{value:!0});var YF=Yp(),JF=Jp();function XF(e,t){var r=ZF(e);return r.setAttemptNumber(t),r}Yu.DelayFactory=XF;function ZF(e){return e.delayFirstAttempt?new JF.AlwaysDelay(e):new YF.SkipFirstDelay(e)}});var Zp=Fe(oo=>{"use strict";var Ju=oo&&oo.__awaiter||function(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function c(l){try{s(o.next(l))}catch(d){i(d)}}function u(l){try{s(o.throw(l))}catch(d){i(d)}}function s(l){l.done?a(l.value):n(l.value).then(c,u)}s((o=o.apply(e,t||[])).next())})},Xu=oo&&oo.__generator||function(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,i;return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(s){return function(l){return u([s,l])}}function u(s){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=s[0]&2?n.return:s[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;switch(n=0,a&&(s=[s[0]&2,a.value]),s[0]){case 0:case 1:a=s;break;case 4:return r.label++,{value:s[1],done:!1};case 5:r.label++,n=s[1],s=[0];continue;case 7:s=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){r=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){r.label=s[1];break}if(s[0]===6&&r.label<a[1]){r.label=a[1],a=s;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(s);break}a[2]&&r.ops.pop(),r.trys.pop();continue}s=t.call(e,r)}catch(l){s=[6,l],n=0}finally{o=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}};Object.defineProperty(oo,"__esModule",{value:!0});var eP=Wp(),tP=Xp();function rP(e,t){return t===void 0&&(t={}),Ju(this,void 0,void 0,function(){var r,o;return Xu(this,function(n){switch(n.label){case 0:return r=eP.getSanitizedOptions(t),o=new oP(e,r),[4,o.execute()];case 1:return[2,n.sent()]}})})}oo.backOff=rP;var oP=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return Ju(this,void 0,void 0,function(){var t,r;return Xu(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 Ju(this,void 0,void 0,function(){var t;return Xu(this,function(r){switch(r.label){case 0:return t=tP.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var bc=Fe((_l,$l)=>{"use strict";(function(e,t){typeof _l=="object"&&typeof $l<"u"?$l.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(_l,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+)?$/,S=/\[([^\]]+)]|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(D){var q=["th","st","nd","rd"],O=D%100;return"["+D+(q[(O-20)%10]||q[O]||q[0])+"]"}},h=function(D,q,O){var N=String(D);return!N||N.length>=q?D:""+Array(q+1-N.length).join(O)+D},v={s:h,z:function(D){var q=-D.utcOffset(),O=Math.abs(q),N=Math.floor(O/60),V=O%60;return(q<=0?"+":"-")+h(N,2,"0")+":"+h(V,2,"0")},m:function D(q,O){if(q.date()<O.date())return-D(O,q);var N=12*(O.year()-q.year())+(O.month()-q.month()),V=q.clone().add(N,s),L=O-V<0,U=q.clone().add(N+(L?-1:1),s);return+(-(N+(O-V)/(L?V-U:U-V))||0)},a:function(D){return D<0?Math.ceil(D)||0:Math.floor(D)},p:function(D){return{M:s,y:d,w:u,d:c,D:p,h:i,m:a,s:n,ms:o,Q:l}[D]||String(D||"").toLowerCase().replace(/s$/,"")},u:function(D){return D===void 0}},y="en",x={};x[y]=C;var E="$isDayjsObject",A=function(D){return D instanceof T||!(!D||!D[E])},R=function D(q,O,N){var V;if(!q)return y;if(typeof q=="string"){var L=q.toLowerCase();x[L]&&(V=L),O&&(x[L]=O,V=L);var U=q.split("-");if(!V&&U.length>1)return D(U[0])}else{var z=q.name;x[z]=q,V=z}return!N&&V&&(y=V),V||!N&&y},P=function(D,q){if(A(D))return D.clone();var O=typeof q=="object"?q:{};return O.date=D,O.args=arguments,new T(O)},b=v;b.l=R,b.i=A,b.w=function(D,q){return P(D,{locale:q.$L,utc:q.$u,x:q.$x,$offset:q.$offset})};var T=function(){function D(O){this.$L=R(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[E]=!0}var q=D.prototype;return q.parse=function(O){this.$d=function(N){var V=N.date,L=N.utc;if(V===null)return new Date(NaN);if(b.u(V))return new Date;if(V instanceof Date)return new Date(V);if(typeof V=="string"&&!/Z$/i.test(V)){var U=V.match(f);if(U){var z=U[2]-1||0,J=(U[7]||"0").substring(0,3);return L?new Date(Date.UTC(U[1],z,U[3]||1,U[4]||0,U[5]||0,U[6]||0,J)):new Date(U[1],z,U[3]||1,U[4]||0,U[5]||0,U[6]||0,J)}}return new Date(V)}(O),this.init()},q.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},q.$utils=function(){return b},q.isValid=function(){return this.$d.toString()!==m},q.isSame=function(O,N){var V=P(O);return this.startOf(N)<=V&&V<=this.endOf(N)},q.isAfter=function(O,N){return P(O)<this.startOf(N)},q.isBefore=function(O,N){return this.endOf(N)<P(O)},q.$g=function(O,N,V){return b.u(O)?this[N]:this.set(V,O)},q.unix=function(){return Math.floor(this.valueOf()/1e3)},q.valueOf=function(){return this.$d.getTime()},q.startOf=function(O,N){var V=this,L=!!b.u(N)||N,U=b.p(O),z=function(re,ce){var de=b.w(V.$u?Date.UTC(V.$y,ce,re):new Date(V.$y,ce,re),V);return L?de:de.endOf(c)},J=function(re,ce){return b.w(V.toDate()[re].apply(V.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(ce)),V)},te=this.$W,G=this.$M,X=this.$D,K="set"+(this.$u?"UTC":"");switch(U){case d:return L?z(1,0):z(31,11);case s:return L?z(1,G):z(0,G+1);case u:var Z=this.$locale().weekStart||0,ue=(te<Z?te+7:te)-Z;return z(L?X-ue:X+(6-ue),G);case c:case p:return J(K+"Hours",0);case i:return J(K+"Minutes",1);case a:return J(K+"Seconds",2);case n:return J(K+"Milliseconds",3);default:return this.clone()}},q.endOf=function(O){return this.startOf(O,!1)},q.$set=function(O,N){var V,L=b.p(O),U="set"+(this.$u?"UTC":""),z=(V={},V[c]=U+"Date",V[p]=U+"Date",V[s]=U+"Month",V[d]=U+"FullYear",V[i]=U+"Hours",V[a]=U+"Minutes",V[n]=U+"Seconds",V[o]=U+"Milliseconds",V)[L],J=L===c?this.$D+(N-this.$W):N;if(L===s||L===d){var te=this.clone().set(p,1);te.$d[z](J),te.init(),this.$d=te.set(p,Math.min(this.$D,te.daysInMonth())).$d}else z&&this.$d[z](J);return this.init(),this},q.set=function(O,N){return this.clone().$set(O,N)},q.get=function(O){return this[b.p(O)]()},q.add=function(O,N){var V,L=this;O=Number(O);var U=b.p(N),z=function(G){var X=P(L);return b.w(X.date(X.date()+Math.round(G*O)),L)};if(U===s)return this.set(s,this.$M+O);if(U===d)return this.set(d,this.$y+O);if(U===c)return z(1);if(U===u)return z(7);var J=(V={},V[a]=t,V[i]=r,V[n]=e,V)[U]||1,te=this.$d.getTime()+O*J;return b.w(te,this)},q.subtract=function(O,N){return this.add(-1*O,N)},q.format=function(O){var N=this,V=this.$locale();if(!this.isValid())return V.invalidDate||m;var L=O||"YYYY-MM-DDTHH:mm:ssZ",U=b.z(this),z=this.$H,J=this.$m,te=this.$M,G=V.weekdays,X=V.months,K=V.meridiem,Z=function(ce,de,Ue,et){return ce&&(ce[de]||ce(N,L))||Ue[de].slice(0,et)},ue=function(ce){return b.s(z%12||12,ce,"0")},re=K||function(ce,de,Ue){var et=ce<12?"AM":"PM";return Ue?et.toLowerCase():et};return L.replace(S,function(ce,de){return de||function(Ue){switch(Ue){case"YY":return String(N.$y).slice(-2);case"YYYY":return b.s(N.$y,4,"0");case"M":return te+1;case"MM":return b.s(te+1,2,"0");case"MMM":return Z(V.monthsShort,te,X,3);case"MMMM":return Z(X,te);case"D":return N.$D;case"DD":return b.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return Z(V.weekdaysMin,N.$W,G,2);case"ddd":return Z(V.weekdaysShort,N.$W,G,3);case"dddd":return G[N.$W];case"H":return String(z);case"HH":return b.s(z,2,"0");case"h":return ue(1);case"hh":return ue(2);case"a":return re(z,J,!0);case"A":return re(z,J,!1);case"m":return String(J);case"mm":return b.s(J,2,"0");case"s":return String(N.$s);case"ss":return b.s(N.$s,2,"0");case"SSS":return b.s(N.$ms,3,"0");case"Z":return U}return null}(ce)||U.replace(":","")})},q.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},q.diff=function(O,N,V){var L,U=this,z=b.p(N),J=P(O),te=(J.utcOffset()-this.utcOffset())*t,G=this-J,X=function(){return b.m(U,J)};switch(z){case d:L=X()/12;break;case s:L=X();break;case l:L=X()/3;break;case u:L=(G-te)/6048e5;break;case c:L=(G-te)/864e5;break;case i:L=G/r;break;case a:L=G/t;break;case n:L=G/e;break;default:L=G}return V?L:b.a(L)},q.daysInMonth=function(){return this.endOf(s).$D},q.$locale=function(){return x[this.$L]},q.locale=function(O,N){if(!O)return this.$L;var V=this.clone(),L=R(O,N,!0);return L&&(V.$L=L),V},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()},D}(),M=T.prototype;return P.prototype=M,[["$ms",o],["$s",n],["$m",a],["$H",i],["$W",c],["$M",s],["$y",d],["$D",p]].forEach(function(D){M[D[1]]=function(q){return this.$g(q,D[0],D[1])}}),P.extend=function(D,q){return D.$i||(D(q,T,P),D.$i=!0),P},P.locale=R,P.isDayjs=A,P.unix=function(D){return P(1e3*D)},P.en=x[y],P.Ls=x,P.p={},P})});var Hg=Fe((zl,Wl)=>{"use strict";(function(e,t){typeof zl=="object"&&typeof Wl<"u"?Wl.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_quarterOfYear=t()})(zl,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 Yg=Fe((Kl,Gl)=>{"use strict";(function(e,t){typeof Kl=="object"&&typeof Gl<"u"?Gl.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=t()})(Kl,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(S){this[f]=+S}},s=[/[+-]\d\d:?(\d\d)?|Z/,function(f){(this.zone||(this.zone={})).offset=function(S){if(!S||S==="Z")return 0;var C=S.match(/([+-]|\d\d)/g),h=60*C[1]+(+C[2]||0);return h===0?0:C[0]==="+"?-h:h}(f)}],l=function(f){var S=i[f];return S&&(S.indexOf?S:S.s.concat(S.f))},d=function(f,S){var C,h=i.meridiem;if(h){for(var v=1;v<=24;v+=1)if(f.indexOf(h(v,0,S))>-1){C=v>12;break}}else C=f===(S?"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 S=i.ordinal,C=f.match(/\d+/);if(this.day=C[0],S)for(var h=1;h<=31;h+=1)S(h).replace(/\[|\]/g,"")===f&&(this.day=h)}],w:[n,u("week")],ww:[o,u("week")],M:[n,u("month")],MM:[o,u("month")],MMM:[a,function(f){var S=l("months"),C=(l("monthsShort")||S.map(function(h){return h.slice(0,3)})).indexOf(f)+1;if(C<1)throw new Error;this.month=C%12||C}],MMMM:[a,function(f){var S=l("months").indexOf(f)+1;if(S<1)throw new Error;this.month=S%12||S}],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 S,C;S=f,C=i&&i.formats;for(var h=(f=S.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(P,b,T){var M=T&&T.toUpperCase();return b||C[T]||e[T]||C[M].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(D,q,O){return q||O.slice(1)})})).match(t),v=h.length,y=0;y<v;y+=1){var x=h[y],E=p[x],A=E&&E[0],R=E&&E[1];h[y]=R?{regex:A,parser:R}:x.replace(/^\[|\]$/g,"")}return function(P){for(var b={},T=0,M=0;T<v;T+=1){var D=h[T];if(typeof D=="string")M+=D.length;else{var q=D.regex,O=D.parser,N=P.slice(M),V=q.exec(N)[0];O.call(b,V),P=P.replace(V,"")}}return function(L){var U=L.afternoon;if(U!==void 0){var z=L.hours;U?z<12&&(L.hours+=12):z===12&&(L.hours=0),delete L.afternoon}}(b),b}}return function(f,S,C){C.p.customParseFormat=!0,f&&f.parseTwoDigitYear&&(c=f.parseTwoDigitYear);var h=S.prototype,v=h.parse;h.parse=function(y){var x=y.date,E=y.utc,A=y.args;this.$u=E;var R=A[1];if(typeof R=="string"){var P=A[2]===!0,b=A[3]===!0,T=P||b,M=A[2];b&&(M=A[2]),i=this.$locale(),!P&&M&&(i=C.Ls[M]),this.$d=function(N,V,L,U){try{if(["x","X"].indexOf(V)>-1)return new Date((V==="X"?1e3:1)*N);var z=m(V)(N),J=z.year,te=z.month,G=z.day,X=z.hours,K=z.minutes,Z=z.seconds,ue=z.milliseconds,re=z.zone,ce=z.week,de=new Date,Ue=G||(J||te?1:de.getDate()),et=J||de.getFullYear(),sr=0;J&&!te||(sr=te>0?te-1:de.getMonth());var To,Oo=X||0,oa=K||0,xu=Z||0,Ru=ue||0;return re?new Date(Date.UTC(et,sr,Ue,Oo,oa,xu,Ru+60*re.offset*1e3)):L?new Date(Date.UTC(et,sr,Ue,Oo,oa,xu,Ru)):(To=new Date(et,sr,Ue,Oo,oa,xu,Ru),ce&&(To=U(To).week(ce).toDate()),To)}catch{return new Date("")}}(x,R,E,C),this.init(),M&&M!==!0&&(this.$L=this.locale(M).$L),T&&x!=this.format(R)&&(this.$d=new Date("")),i={}}else if(R instanceof Array)for(var D=R.length,q=1;q<=D;q+=1){A[1]=R[q-1];var O=C.apply(this,A);if(O.isValid()){this.$d=O.$d,this.$L=O.$L,this.init();break}q===D&&(this.$d=new Date(""))}else v.call(this,y)}}})});var zS=Fe((Y3,$S)=>{"use strict";var wE=/(^|; )Coveo-Pendragon=([^;]*)/;$S.exports=()=>wE.exec(document.cookie)?.pop()||null});var WS=Fe((Hd,Yd)=>{"use strict";(function(e,t){typeof Hd=="object"&&typeof Yd<"u"?Yd.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(Hd,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(S,C){C===void 0&&(C={});var h=C.timeZoneName||"short",v=S+"|"+h,y=t[v];return y||(y=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:S,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:h}),t[v]=y),y}(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 S=p[f],C=S.type,h=S.value,v=e[C];v>=0&&(m[v]=parseInt(h,10))}var y=m[3],x=y===24?0:y,E=m[0]+"-"+m[1]+"-"+m[2]+" "+x+":"+m[4]+":"+m[5]+":000",A=+l;return(n.utc(E).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(),S=f.toLocaleString("en-US",{timeZone:l}),C=Math.round((f-new Date(S))/1e3/60),h=15*-Math.round(f.getTimezoneOffset()/15)-C;if(!Number(h))p=this.utcOffset(0,d);else if(p=n(S,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(h,!0),d){var v=p.utcOffset();p=p.add(m-v,"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,S=c(+n(),f);if(typeof l!="string")return n(l).tz(f);var C=function(x,E,A){var R=x-60*E*1e3,P=c(R,A);if(E===P)return[R,E];var b=c(R-=60*(P-E)*1e3,A);return P===b?[R,P]:[x-60*Math.min(P,b)*1e3,Math.max(P,b)]}(n.utc(l,m).valueOf(),S,f),h=C[0],v=C[1],y=n(h).utcOffset(v);return y.$x.$timezone=f,y},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.tz.setDefault=function(l){a=l}}})});var KS=Fe((Jd,Xd)=>{"use strict";(function(e,t){typeof Jd=="object"&&typeof Xd<"u"?Xd.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(Jd,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 S=this.$utils().u;if(S(m))return this.$u?0:S(this.$offset)?s.call(this):this.$offset;if(typeof m=="string"&&(m=function(y){y===void 0&&(y="");var x=y.match(t);if(!x)return null;var E=(""+x[0]).match(r)||["-",0,0],A=E[0],R=60*+E[1]+ +E[2];return R===0?0:A==="+"?R:-R}(m),m===null))return this;var C=Math.abs(m)<=16?60*m:m,h=this;if(f)return h.$offset=C,h.$u=m===0,h;if(m!==0){var v=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(h=this.local().add(C+v,e)).$offset=C,h.$x.$localOffset=v}else h=this.utc();return h};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,S){if(m&&this.$u===m.$u)return p.call(this,m,f,S);var C=this.local(),h=a(m).local();return p.call(C,h,f,S)}}})});var iC=Fe((i6,aC)=>{"use strict";function ME(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}aC.exports=QE;function QE(e,t,r){var o=r&&r.stringify||ME,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 mC=Fe((c6,Bs)=>{"use strict";var cC=iC();Bs.exports=cr;var ci=ZE().console||{},LE={mapHttpRequest:Us,mapHttpResponse:Us,wrapRequestSerializer:tm,wrapResponseSerializer:tm,wrapErrorSerializer:tm,req:Us,res:Us,err:uC,errWithCause:uC};function zr(e,t){return e==="silent"?1/0:t.levels.values[e]}var nm=Symbol("pino.logFuncs"),rm=Symbol("pino.hierarchy"),UE={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function sC(e,t){let r={logger:t,parent:e[rm]};t[rm]=r}function BE(e,t,r){let o={};t.forEach(n=>{o[n]=r[n]?r[n]:ci[n]||ci[UE[n]||"log"]||jn}),e[nm]=o}function jE(e,t){return Array.isArray(e)?e.filter(function(o){return o!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function cr(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||ci;e.browser.write&&(e.browser.asObject=!0);let o=e.serializers||{},n=jE(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(S){r[S]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let u=e.level||"info",s=Object.create(r);s.log||(s.log=jn),BE(s,c,r),sC({},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:YE(e),messageKey:e.messageKey||"msg",onChild:e.onChild||jn};s.levels=_E(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=jn,s.serializers=o,s._serialize=n,s._stdErrSerialize=a,s.child=function(...S){return f.call(this,l,...S)},t&&(s._logEvent=om());function d(){return zr(this.level,this)}function p(){return this._level}function m(S){if(S!=="silent"&&!this.levels.values[S])throw Error("unknown level "+S);this._level=S,Fo(this,l,s,"error"),Fo(this,l,s,"fatal"),Fo(this,l,s,"warn"),Fo(this,l,s,"info"),Fo(this,l,s,"debug"),Fo(this,l,s,"trace"),i.forEach(C=>{Fo(this,l,s,C)})}function f(S,C,h){if(!C)throw new Error("missing bindings for child Pino");h=h||{},n&&C.serializers&&(h.serializers=C.serializers);let v=h.serializers;if(n&&v){var y=Object.assign({},o,v),x=e.browser.serialize===!0?Object.keys(y):n;delete C.serializers,am([C],x,y,this._stdErrSerialize)}function E(R){this._childLevel=(R._childLevel|0)+1,this.bindings=C,y&&(this.serializers=y,this._serialize=x),t&&(this._logEvent=om([].concat(R._logEvent.bindings,C)))}E.prototype=this;let A=new E(this);return sC(this,A),A.child=function(...R){return f.call(this,S,...R)},A.level=h.level||this.level,S.onChild(A),A}return s}function _E(e){let t=e.customLevels||{},r=Object.assign({},cr.levels.values,t),o=Object.assign({},cr.levels.labels,$E(t));return{values:r,labels:o}}function $E(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}cr.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"}};cr.stdSerializers=LE;cr.stdTimeFunctions=Object.assign({},{nullTime:lC,epochTime:dC,unixTime:JE,isoTime:XE});function zE(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[rm];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function Fo(e,t,r,o){if(Object.defineProperty(e,o,{value:zr(e.level,r)>zr(o,r)?jn:r[nm][o],writable:!0,enumerable:!0,configurable:!0}),e[o]===jn){if(!t.transmit)return;let a=t.transmit.level||e.level,i=zr(a,r);if(zr(o,r)<i)return}e[o]=KE(e,t,r,o);let n=zE(e);n.length!==0&&(e[o]=WE(n,e[o]))}function WE(e,t){return function(){return t.apply(this,[...e,...arguments])}}function KE(e,t,r,o){return function(n){return function(){let i=t.timestamp(),c=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===ci?ci:this;for(var s=0;s<c.length;s++)c[s]=arguments[s];var l=!1;if(t.serialize&&(am(c,this._serialize,this.serializers,this._stdErrSerialize),l=!0),t.asObject||t.formatters?n.call(u,GE(this,o,c,i,t)):n.apply(u,c),t.transmit){let d=t.transmit.level||e._level,p=zr(d,r),m=zr(o,r);if(m<p)return;HE(this,{ts:i,methodLevel:o,methodValue:m,transmitLevel:d,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:zr(e._level,r)},c,l)}}}(e[nm][o])}function GE(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?cC(c.shift(),c):void 0}else typeof u=="string"&&(u=cC(c.shift(),c));return u!==void 0&&(s[n.messageKey]=u),i(s)}function am(e,t,r,o){for(let n in e)if(o&&e[n]instanceof Error)e[n]=cr.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 HE(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||am(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=om(s)}function om(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function uC(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 YE(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?lC:dC}function Us(){return{}}function tm(e){return e}function jn(){}function lC(){return!1}function dC(){return Date.now()}function JE(){return Math.round(Date.now()/1e3)}function XE(){return new Date(Date.now()).toISOString()}function ZE(){function e(t){return typeof t<"u"&&t}try{return typeof globalThis<"u"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return e(self)||e(window)||e(this)||{}}}Bs.exports.default=cr;Bs.exports.pino=cr});var jp={};Mm(jp,{ProductListing:()=>ju,Search:()=>Bu});var Qm="coveo-headless-internal-state",B=Symbol.for(Qm),Lm=e=>new Proxy(e,{ownKeys(t){return Reflect.ownKeys(t).filter(r=>r!==B)},get(t,r,o){return typeof r=="symbol"&&r.description===Qm&&r!==B&&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 yF}from"@coveo/bueno";function Pe(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 wR=typeof Symbol=="function"&&Symbol.observable||"@@observable",Um=wR,Fu=()=>Math.random().toString(36).substring(7).split("").join("."),IR={INIT:`@@redux/INIT${Fu()}`,REPLACE:`@@redux/REPLACE${Fu()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Fu()}`},Si=IR;function vt(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 Pu(e,t,r){if(typeof e!="function")throw new Error(Pe(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Pe(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Pe(1));return r(Pu)(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,h)=>{i.set(h,C)}))}function l(){if(u)throw new Error(Pe(3));return n}function d(C){if(typeof C!="function")throw new Error(Pe(4));if(u)throw new Error(Pe(5));let h=!0;s();let v=c++;return i.set(v,C),function(){if(h){if(u)throw new Error(Pe(6));h=!1,s(),i.delete(v),a=null}}}function p(C){if(!vt(C))throw new Error(Pe(7));if(typeof C.type>"u")throw new Error(Pe(8));if(typeof C.type!="string")throw new Error(Pe(17));if(u)throw new Error(Pe(9));try{u=!0,n=o(n,C)}finally{u=!1}return(a=i).forEach(v=>{v()}),C}function m(C){if(typeof C!="function")throw new Error(Pe(10));o=C,p({type:Si.REPLACE})}function f(){let C=d;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(Pe(11));function v(){let x=h;x.next&&x.next(l())}return v(),{unsubscribe:C(v)}},[Um](){return this}}}return p({type:Si.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[Um]:f}}function ER(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Si.INIT})>"u")throw new Error(Pe(12));if(typeof r(void 0,{type:Si.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Pe(13))})}function qo(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{ER(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],S=m(f,u);if(typeof S>"u"){let C=u&&u.type;throw new Error(Pe(14))}l[p]=S,s=s||S!==f}return s=s||o.length!==Object.keys(c).length,s?l:c}}function ko(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function Bm(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(Pe(15))},i={getState:n.getState,dispatch:(u,...s)=>a(u,...s)},c=e.map(u=>u(i));return a=ko(...c)(n.dispatch),{...n,dispatch:a}}}function Ci(e){return vt(e)&&"type"in e&&typeof e.type=="string"}var ku=Symbol.for("immer-nothing"),na=Symbol.for("immer-draftable"),je=Symbol.for("immer-state");function ve(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Hr=Object.getPrototypeOf;function He(e){return!!e&&!!e[je]}function _e(e){return e?Wm(e)||Array.isArray(e)||!!e[na]||!!e.constructor?.[na]||ua(e)||la(e):!1}var TR=Object.prototype.constructor.toString();function Wm(e){if(!e||typeof e!="object")return!1;let t=Hr(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===TR}function Vu(e){return He(e)||ve(15,e),e[je].base_}function aa(e,t){Yr(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function Yr(e){let t=e[je];return t?t.type_:Array.isArray(e)?1:ua(e)?2:la(e)?3:0}function ia(e,t){return Yr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function vu(e,t){return Yr(e)===2?e.get(t):e[t]}function Km(e,t,r){let o=Yr(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function OR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ua(e){return e instanceof Map}function la(e){return e instanceof Set}function Gr(e){return e.copy_||e.base_}function wu(e,t){if(ua(e))return new Map(e);if(la(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Wm(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[je];let n=Reflect.ownKeys(o);for(let a=0;a<n.length;a++){let i=n[a],c=o[i];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(o[i]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[i]})}return Object.create(Hr(e),o)}else{let o=Hr(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function Fi(e,t=!1){return Pi(e)||He(e)||!_e(e)||(Yr(e)>1&&(e.set=e.add=e.clear=e.delete=qR),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>Fi(o,!0))),e}function qR(){ve(2)}function Pi(e){return Object.isFrozen(e)}var Iu={};function Jr(e){let t=Iu[e];return t||ve(0,e),t}function kR(e,t){Iu[e]||(Iu[e]=t)}var ca;function Gm(){return ca}function VR(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function jm(e,t){t&&(Jr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Eu(e){Tu(e),e.drafts_.forEach(DR),e.drafts_=null}function Tu(e){e===ca&&(ca=e.parent_)}function _m(e){return ca=VR(ca,e)}function DR(e){let t=e[je];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function $m(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[je].modified_&&(Eu(t),ve(4)),_e(e)&&(e=xi(t,e),t.parent_||Ri(t,e)),t.patches_&&Jr("Patches").generateReplacementPatches_(r[je].base_,e,t.patches_,t.inversePatches_)):e=xi(t,r,[]),Eu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ku?e:void 0}function xi(e,t,r){if(Pi(t))return t;let o=t[je];if(!o)return aa(t,(n,a)=>zm(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return Ri(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),aa(a,(c,u)=>zm(e,o,n,c,u,r,i)),Ri(e,n,!1),r&&e.patches_&&Jr("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function zm(e,t,r,o,n,a,i){if(He(n)){let c=a&&t&&t.type_!==3&&!ia(t.assigned_,o)?a.concat(o):void 0,u=xi(e,n,c);if(Km(r,o,u),He(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(_e(n)&&!Pi(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;xi(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&Ri(e,n)}}function Ri(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Fi(t,r)}function NR(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:Gm(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=Du;r&&(n=[o],a=sa);let{revoke:i,proxy:c}=Proxy.revocable(n,a);return o.draft_=c,o.revoke_=i,c}var Du={get(e,t){if(t===je)return e;let r=Gr(e);if(!ia(r,t))return MR(e,r,t);let o=r[t];return e.finalized_||!_e(o)?o:o===Au(e.base_,t)?(bu(e),e.copy_[t]=qu(o,e)):o},has(e,t){return t in Gr(e)},ownKeys(e){return Reflect.ownKeys(Gr(e))},set(e,t,r){let o=Hm(Gr(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=Au(Gr(e),t),a=n?.[je];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(OR(r,n)&&(r!==void 0||ia(e.base_,t)))return!0;bu(e),Ou(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,bu(e),Ou(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Gr(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){ve(11)},getPrototypeOf(e){return Hr(e.base_)},setPrototypeOf(){ve(12)}},sa={};aa(Du,(e,t)=>{sa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});sa.deleteProperty=function(e,t){return sa.set.call(this,e,t,void 0)};sa.set=function(e,t,r){return Du.set.call(this,e[0],t,r,e[0])};function Au(e,t){let r=e[je];return(r?Gr(r):e)[t]}function MR(e,t,r){let o=Hm(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function Hm(e,t){if(!(t in e))return;let r=Hr(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Hr(r)}}function Ou(e){e.modified_||(e.modified_=!0,e.parent_&&Ou(e.parent_))}function bu(e){e.copy_||(e.copy_=wu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var QR=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"&&ve(6),o!==void 0&&typeof o!="function"&&ve(7);let n;if(_e(t)){let a=_m(this),i=qu(t,void 0),c=!0;try{n=r(i),c=!1}finally{c?Eu(a):Tu(a)}return jm(a,o),$m(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===ku&&(n=void 0),this.autoFreeze_&&Fi(n,!0),o){let a=[],i=[];Jr("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else ve(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){_e(e)||ve(8),He(e)&&(e=Ym(e));let t=_m(this),r=qu(e,void 0);return r[je].isManual_=!0,Tu(t),r}finishDraft(e,t){let r=e&&e[je];(!r||!r.isManual_)&&ve(9);let{scope_:o}=r;return jm(o,t),$m(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let n=t[r];if(n.path.length===0&&n.op==="replace"){e=n.value;break}}r>-1&&(t=t.slice(r+1));let o=Jr("Patches").applyPatches_;return He(e)?o(e,t):this.produce(e,n=>o(n,t))}};function qu(e,t){let r=ua(e)?Jr("MapSet").proxyMap_(e,t):la(e)?Jr("MapSet").proxySet_(e,t):NR(e,t);return(t?t.scope_:Gm()).drafts_.push(r),r}function Ym(e){return He(e)||ve(10,e),Jm(e)}function Jm(e){if(!_e(e)||Pi(e))return e;let t=e[je],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=wu(e,t.scope_.immer_.useStrictShallowCopy_)}else r=wu(e,!0);return aa(r,(o,n)=>{Km(r,o,Jm(n))}),t&&(t.finalized_=!1),r}function Xm(){let t="replace",r="add",o="remove";function n(p,m,f,S){switch(p.type_){case 0:case 2:return i(p,m,f,S);case 1:return a(p,m,f,S);case 3:return c(p,m,f,S)}}function a(p,m,f,S){let{base_:C,assigned_:h}=p,v=p.copy_;v.length<C.length&&([C,v]=[v,C],[f,S]=[S,f]);for(let y=0;y<C.length;y++)if(h[y]&&v[y]!==C[y]){let x=m.concat([y]);f.push({op:t,path:x,value:d(v[y])}),S.push({op:t,path:x,value:d(C[y])})}for(let y=C.length;y<v.length;y++){let x=m.concat([y]);f.push({op:r,path:x,value:d(v[y])})}for(let y=v.length-1;C.length<=y;--y){let x=m.concat([y]);S.push({op:o,path:x})}}function i(p,m,f,S){let{base_:C,copy_:h}=p;aa(p.assigned_,(v,y)=>{let x=vu(C,v),E=vu(h,v),A=y?ia(C,v)?t:r:o;if(x===E&&A===t)return;let R=m.concat(v);f.push(A===o?{op:A,path:R}:{op:A,path:R,value:E}),S.push(A===r?{op:o,path:R}:A===o?{op:r,path:R,value:d(x)}:{op:t,path:R,value:d(x)})})}function c(p,m,f,S){let{base_:C,copy_:h}=p,v=0;C.forEach(y=>{if(!h.has(y)){let x=m.concat([v]);f.push({op:o,path:x,value:y}),S.unshift({op:r,path:x,value:y})}v++}),v=0,h.forEach(y=>{if(!C.has(y)){let x=m.concat([v]);f.push({op:r,path:x,value:y}),S.unshift({op:o,path:x,value:y})}v++})}function u(p,m,f,S){f.push({op:t,path:[],value:m===ku?void 0:m}),S.push({op:t,path:[],value:p})}function s(p,m){return m.forEach(f=>{let{path:S,op:C}=f,h=p;for(let E=0;E<S.length-1;E++){let A=Yr(h),R=S[E];typeof R!="string"&&typeof R!="number"&&(R=""+R),(A===0||A===1)&&(R==="__proto__"||R==="constructor")&&ve(19),typeof h=="function"&&R==="prototype"&&ve(19),h=vu(h,R),typeof h!="object"&&ve(18,S.join("/"))}let v=Yr(h),y=l(f.value),x=S[S.length-1];switch(C){case t:switch(v){case 2:return h.set(x,y);case 3:ve(16);default:return h[x]=y}case r:switch(v){case 1:return x==="-"?h.push(y):h.splice(x,0,y);case 2:return h.set(x,y);case 3:return h.add(y);default:return h[x]=y}case o:switch(v){case 1:return h.splice(x,1);case 2:return h.delete(x);case 3:return h.delete(f.value);default:return delete h[x]}default:ve(17,C)}}),p}function l(p){if(!_e(p))return p;if(Array.isArray(p))return p.map(l);if(ua(p))return new Map(Array.from(p.entries()).map(([f,S])=>[f,l(S)]));if(la(p))return new Set(Array.from(p).map(l));let m=Object.create(Hr(p));for(let f in p)m[f]=l(p[f]);return ia(p,na)&&(m[na]=p[na]),m}function d(p){return He(p)?l(p):p}kR("Patches",{applyPatches_:s,generatePatches_:n,generateReplacementPatches_:u})}var Ye=new QR,Gt=Ye.produce,vi=Ye.produceWithPatches.bind(Ye),sV=Ye.setAutoFreeze.bind(Ye),uV=Ye.setUseStrictShallowCopy.bind(Ye),Nu=Ye.applyPatches.bind(Ye),lV=Ye.createDraft.bind(Ye),dV=Ye.finishDraft.bind(Ye);function LR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function UR(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function BR(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 Zm=e=>Array.isArray(e)?e:[e];function jR(e){let t=Array.isArray(e[0])?e[0]:e;return BR(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function _R(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var fV=Symbol();var gV=Object.getPrototypeOf({});var $R=class{constructor(e){this.value=e}deref(){return this.value}},zR=typeof WeakRef<"u"?WeakRef:$R,WR=0,ep=1;function Ai(){return{s:WR,v:void 0,o:null,p:null}}function Vo(e,t={}){let r=Ai(),{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 S=f.get(m);S===void 0?(c=Ai(),f.set(m,c)):c=S}else{let f=c.p;f===null&&(c.p=f=new Map);let S=f.get(m);S===void 0?(c=Ai(),f.set(m,c)):c=S}}let s=c,l;if(c.s===ep)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 zR(l):l}return s.s=ep,s.v=l,l}return i.clearCache=()=>{r=Ai(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function tp(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()),LR(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=Vo,argsMemoizeOptions:f=[],devModeChecks:S={}}=l,C=Zm(p),h=Zm(f),v=jR(n),y=d(function(){return a++,s.apply(null,arguments)},...C),x=!0,E=m(function(){i++;let R=_R(v,arguments);return c=y.apply(null,R),c},...h);return Object.assign(E,{resultFunc:s,memoizedResultFunc:y,dependencies:v,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>c,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var Q=tp(Vo),KR=Object.assign((e,t=Q)=>{UR(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:()=>KR});function rp(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var op=rp(),np=rp;var GR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ko:ko.apply(null,arguments)},AV=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},HR=e=>e&&typeof e.match=="function";function g(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(yt(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=>Ci(o)&&o.type===e,r}var up=class da extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,da.prototype)}static get[Symbol.species](){return da}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new da(...t[0].concat(this)):new da(...t.concat(this))}};function ap(e){return _e(e)?Gt(e,()=>{}):e}function ip(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function YR(e){return typeof e=="boolean"}var JR=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new up;return r&&(YR(r)?i.push(op):i.push(np(r.extraArgument))),i},ma="RTK_autoBatch",No=()=>e=>({payload:e,meta:{[ma]:!0}}),cp=e=>t=>{setTimeout(t,e)},XR=(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:cp(10):e.type==="callback"?e.queueNotification:cp(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?.[ma],a=!n,a&&(i||(i=!0,u(s))),o.dispatch(l)}finally{n=!0}}})},ZR=e=>function(r){let{autoBatch:o=!0}=r??{},n=new up(e);return o&&n.push(XR(typeof o=="object"?o:void 0)),n};function lp(e){let t=JR(),{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(vt(r))c=qo(r);else throw new Error(yt(1));let u;typeof o=="function"?u=o(t):u=t();let s=ko;n&&(s=GR({trace:!1,...typeof n=="object"&&n}));let l=Bm(...u),d=ZR(l),p=typeof i=="function"?i(d):d(),m=s(...p);return Pu(c,a,m)}function dp(e){let t={},r=[],o,n={addCase(a,i){let c=typeof a=="string"?a:a.type;if(!c)throw new Error(yt(28));if(c in t)throw new Error(yt(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 eF(e){return typeof e=="function"}function j(e,t){let[r,o,n]=dp(t),a;if(eF(e))a=()=>ap(e());else{let c=ap(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(He(l)){let m=d(l,u);return m===void 0?l:m}else{if(_e(l))return Gt(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 mp=(e,t)=>HR(e)?e.match(t):e(t);function At(...e){return t=>e.some(r=>mp(r,t))}function Do(...e){return t=>e.every(r=>mp(r,t))}function wi(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 pa(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Ii(...e){return e.length===0?t=>wi(t,["pending"]):pa(e)?At(...e.map(t=>t.pending)):Ii()(e[0])}function Xr(...e){return e.length===0?t=>wi(t,["rejected"]):pa(e)?At(...e.map(t=>t.rejected)):Xr()(e[0])}function fa(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Do(Xr(...e),t):pa(e)?Do(Xr(...e),t):fa()(e[0])}function Ht(...e){return e.length===0?t=>wi(t,["fulfilled"]):pa(e)?At(...e.map(t=>t.fulfilled)):Ht()(e[0])}function Ei(...e){return e.length===0?t=>wi(t,["pending","fulfilled","rejected"]):pa(e)?At(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ei()(e[0])}var tF="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ti=(e=21)=>{let t="",r=e;for(;r--;)t+=tF[Math.random()*64|0];return t},rF=["name","message","stack","code"],Mu=class{constructor(e,t){Be(this,"_type");this.payload=e,this.meta=t}},sp=class{constructor(e,t){Be(this,"_type");this.payload=e,this.meta=t}},oF=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of rF)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},_=(()=>{function e(t,r,o){let n=g(t+"/fulfilled",(u,s,l,d)=>({payload:u,meta:{...d||{},arg:l,requestId:s,requestStatus:"fulfilled"}})),a=g(t+"/pending",(u,s,l)=>({payload:void 0,meta:{...l||{},arg:s,requestId:u,requestStatus:"pending"}})),i=g(t+"/rejected",(u,s,l,d,p)=>({payload:d,error:(o&&o.serializeError||oF)(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):Ti(),m=new AbortController,f,S;function C(v){S=v,m.abort()}let h=async function(){let v;try{let x=o?.condition?.(u,{getState:l,extra:d});if(aF(x)&&(x=await x),x===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let E=new Promise((A,R)=>{f=()=>{R({name:"AbortError",message:S||"Aborted"})},m.signal.addEventListener("abort",f)});s(a(p,u,o?.getPendingMeta?.({requestId:p,arg:u},{getState:l,extra:d}))),v=await Promise.race([E,Promise.resolve(r(u,{dispatch:s,getState:l,extra:d,requestId:p,signal:m.signal,abort:C,rejectWithValue:(A,R)=>new Mu(A,R),fulfillWithValue:(A,R)=>new sp(A,R)})).then(A=>{if(A instanceof Mu)throw A;return A instanceof sp?n(A.payload,p,u,A.meta):n(A,p,u)})])}catch(x){v=x instanceof Mu?i(null,p,u,x.payload,x.meta):i(x,p,u)}finally{f&&m.signal.removeEventListener("abort",f)}return o&&!o.dispatchConditionRejection&&i.match(v)&&v.meta.condition||s(v),v}();return Object.assign(h,{abort:C,requestId:p,arg:u,unwrap(){return h.then(nF)}})}}return Object.assign(c,{pending:a,rejected:i,fulfilled:n,settled:At(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function nF(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function aF(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var pp=Symbol.for("rtk-slice-createasyncthunk"),TV={[pp]:_};function iF(e,t){return`${e}/${t}`}function cF({creators:e}={}){let t=e?.asyncThunk?.[pp];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(yt(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(uF()):o.reducers)||{},c=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(v,y){let x=typeof v=="string"?v:v.type;if(!x)throw new Error(yt(12));if(x in u.sliceCaseReducersByType)throw new Error(yt(13));return u.sliceCaseReducersByType[x]=y,s},addMatcher(v,y){return u.sliceMatchers.push({matcher:v,reducer:y}),s},exposeAction(v,y){return u.actionCreators[v]=y,s},exposeCaseReducer(v,y){return u.sliceCaseReducersByName[v]=y,s}};c.forEach(v=>{let y=i[v],x={reducerName:v,type:iF(n,v),createNotation:typeof o.reducers=="function"};dF(y)?pF(x,y,s,t):lF(x,y,s)});function l(){let[v={},y=[],x=void 0]=typeof o.extraReducers=="function"?dp(o.extraReducers):[o.extraReducers],E={...v,...u.sliceCaseReducersByType};return j(o.initialState,A=>{for(let R in E)A.addCase(R,E[R]);for(let R of u.sliceMatchers)A.addMatcher(R.matcher,R.reducer);for(let R of y)A.addMatcher(R.matcher,R.reducer);x&&A.addDefaultCase(x)})}let d=v=>v,p=new Map,m;function f(v,y){return m||(m=l()),m(v,y)}function S(){return m||(m=l()),m.getInitialState()}function C(v,y=!1){function x(A){let R=A[v];return typeof R>"u"&&y&&(R=S()),R}function E(A=d){let R=ip(p,y,()=>new WeakMap);return ip(R,A,()=>{let P={};for(let[b,T]of Object.entries(o.selectors??{}))P[b]=sF(T,A,S,y);return P})}return{reducerPath:v,getSelectors:E,get selectors(){return E(x)},selectSlice:x}}let h={name:n,reducer:f,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:S,...C(a),injectInto(v,{reducerPath:y,...x}={}){let E=y??a;return v.inject({reducerPath:E,reducer:f},x),{...h,...C(E,!0)}}};return h}}function sF(e,t,r,o){function n(a,...i){let c=t(a);return typeof c>"u"&&o&&(c=r()),e(c,...i)}return n.unwrapped=e,n}var Zr=cF();function uF(){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 lF({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!mF(o))throw new Error(yt(17));a=o.reducer,i=o.prepare}else a=o;n.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?g(e,i):g(e))}function dF(e){return e._reducerDefinitionType==="asyncThunk"}function mF(e){return e._reducerDefinitionType==="reducerWithPrepare"}function pF({type:e,reducerName:t},r,o,n){if(!n)throw new Error(yt(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||bi,pending:c||bi,rejected:u||bi,settled:s||bi})}function bi(){}var fp="listener",gp="completed",yp="cancelled",OV=`task-${yp}`,qV=`task-${gp}`,kV=`${fp}-${yp}`,VV=`${fp}-${gp}`;var{assign:hp}=Object;var Qu="listenerMiddleware";var fF=hp(g(`${Qu}/add`),{withTypes:()=>fF}),DV=g(`${Qu}/removeAll`),gF=hp(g(`${Qu}/remove`),{withTypes:()=>gF});var NV=Symbol.for("rtk-state-proxy-original");function yt(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 ur=Q(e=>e.commercePagination?.principal.perPage||0,e=>e),Oi=Q((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),lr=Q(e=>e.commercePagination?.principal.totalEntries||0,e=>e),qi=Q((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),ki=Q(e=>e.commercePagination?.principal.page||0,e=>e),Sp=Q((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var GV=Q(e=>e[B].productListing.responseId,e=>e),ga=Q(e=>e.productListing.responseId,e=>e),Cp=Q(e=>e.productListing.requestId,e=>e),ya=Q(e=>e.productListing?.products.length||0,e=>e),xp=Q(e=>({total:lr(e),current:ya(e)}),({current:e,total:t})=>e<t),Rp=Q(e=>e.productListing?.isLoading,e=>yF(e)?!1:e),Fp=Q(e=>e.productListing?.error,e=>e??null);import{isNullOrUndefined as kp}from"@coveo/bueno";function Lu(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function Uu(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{sortCriteria:o}:{}}function bt(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 wt(e){let{activeValue:t,ancestryMap:r}=SF(e);return t?CF(t,r):[]}function SF(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 CF(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function Pp(){return{principal:dr(),recommendations:{}}}function dr(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}import{ArrayValue as FF,EnumValue as bp,StringValue as wp,RecordValue as Ip}from"@coveo/bueno";import{ArrayValue as xF,EnumValue as vp,RecordValue as Ap,StringValue as RF}from"@coveo/bueno";var ht=(r=>(r.Relevance="relevance",r.Fields="fields",r))(ht||{}),eo=(r=>(r.Ascending="asc",r.Descending="desc",r))(eo||{}),It=()=>({by:"relevance"});var ZV=new Ap({options:{required:!1},values:{by:new vp({enum:ht,required:!0}),fields:new xF({each:new Ap({values:{name:new RF,direction:new vp({enum:eo})}})})}});var Vi=e=>({by:"fields",fields:e}),Ep=new Ip({options:{required:!1},values:{by:new bp({enum:ht,required:!0}),fields:new FF({each:new Ip({values:{field:new wp({required:!0}),direction:new bp({enum:eo}),displayName:new wp}})})}});function to(){return{appliedSort:It(),availableSorts:[It()]}}function Di(e){return{...PF(e?.commercePagination,t=>t.principal.page,dr().page),...vF(e?.commercePagination,t=>t.principal.perPage,dr().perPage),...Uu(e?.commerceSort,t=>t.appliedSort,to().appliedSort),...bt(e.commerceFacetSet,mr(e,"regular"),AF,"f"),...bt(e.commerceFacetSet,mr(e,"regular"),bF,"fExcluded"),...bt(e.commerceFacetSet,mr(e,"location"),wF,"lf"),...bt(e.commerceFacetSet,mr(e,"hierarchical"),IF,"cf"),...bt(e.commerceFacetSet,mr(e,"dateRange"),Tp,"df"),...bt(e.commerceFacetSet,mr(e,"dateRange"),Op,"dfExcluded"),...bt(e.commerceFacetSet,mr(e,"numericalRange"),Tp,"nf"),...bt(e.commerceFacetSet,mr(e,"numericalRange"),Op,"nfExcluded"),...qp("selected",e.manualNumericFacetSet),...qp("excluded",e.manualNumericFacetSet)}}function PF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function vF(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 bF(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function wF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function Tp(e){return e.values.filter(t=>t.state==="selected")}function Op(e){return e.values.filter(t=>t.state==="excluded")}function qp(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 IF(e){return wt(e.values).map(r=>r.value)}function mr(e,t){return r=>e.commerceFacetSet[r].request.type===t}var Ni=()=>({query:""});var vD=Q(e=>e[B].commerceSearch.responseId,e=>e),ha=Q(e=>e.commerceSearch.responseId,e=>e),Vp=Q(e=>e.commerceSearch.requestId,e=>e),Sa=Q(e=>e.commerceSearch?.products.length||0,e=>e),Dp=Q(e=>({total:lr(e),current:Sa(e)}),({current:e,total:t})=>e<t),Np=Q(e=>e.commerceSearch?.isLoading,e=>kp(e)?!1:e),Mp=Q(e=>e.commerceSearch?.error,e=>e??null),Mi=Q(e=>e.commerceQuery?.query,e=>e??""),EF=Q(e=>e.commerceSearch?.queryExecuted,e=>e),Qp=(e,t)=>kp(t.queryCorrection?.correctedQuery)?Mi(e):t.queryCorrection.correctedQuery,Lp=e=>({...Lu(e?.commerceQuery,t=>t.query,Ni().query),...Di(e)});function Up(e){return{query:EF(e)||""}}var Bu;(t=>t.responseIdSelector=Bp(ha))(Bu||(Bu={}));var ju;(t=>t.responseIdSelector=Bp(ga))(ju||(ju={}));function Bp(e){return t=>e(t[B])}var zp={};Mm(zp,{escape:()=>Mo,getHighlightedSuggestion:()=>$u,highlightString:()=>qF});import{isNullOrUndefined as OF}from"@coveo/bueno";var ro=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function _p(e){return Array.isArray(e)}function Qi(e){return e.trim()===""}function $p(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 qF(e){if(Qi(e.openingDelimiter)||Qi(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(OF(e.content)||Qi(e.content))return e.content;if(e.highlights.length===0)return Mo(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+=Mo(e.content.slice(o,i)),r+=e.openingDelimiter,r+=Mo(e.content.slice(i,c)),r+=e.closingDelimiter,o=c}return o!==t&&(r+=Mo(e.content.slice(o))),r}function $u(e,t){return e=Mo(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,o,n,a)=>o?_u(o,t.notMatchDelimiters):n?_u(n,t.exactMatchDelimiters):a?_u(a,t.correctionDelimiters):r)}function _u(e,t){return t?t.open+e+t.close:e}function Mo(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 of=Pt(Zp(),1);var nP="recommendation-internal-options",QD=Symbol.for(nP);var $=new Error("Failed to load reducers."),Qo=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var no=class extends Error{constructor(r,o){super();Be(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function ef(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function tf(e){return typeof e!="object"||!e?!1:Object.values(e).every(aP)}function aP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function rf(e){return e===429}var Lo=class e{static async call(t){let r=iP(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(rf(u.status))throw u;return u};try{let u=await(0,of.backOff)(c,{retry:s=>{let l=s&&rf(s.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new Qo;case 404:throw new no(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new no(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:c,...u}=t,s=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 Ee(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function tt(e,t="prod"){return`${Ee(e,t)}/rest/search/v2`}function Zu(e,t="prod"){return`${Ee(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function iP(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,c=e.method==="POST"||e.method==="PUT",u=cP(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...c&&{body:u},signal:i}}function cP(e,t){return t==="application/x-www-form-urlencoded"?tf(e)?ef(e):"":JSON.stringify(e)}function sP(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function uP(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function el(e,t){if(t&&e.name==="AbortError")return{error:uP(e)};if(e instanceof no)return{error:sP(e)};throw e}var Uo=(e,t)=>({...Fa(e,t),requestParams:lP(e)}),lP=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}},Fa=(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 nf=(e,t)=>({...Fa(e,t),requestParams:dP(e)}),dP=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 af=e=>({...Fa(e,"search/querySuggest"),requestParams:mP(e)}),mP=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 Te=e=>e.error!==void 0,Ui=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...Uo(t,"listing"),...this.options})}async search(t){let r=Uo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...nf(t,"recommendations"),...this.options})}async productSuggestions(t){let r=Uo(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=af(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=Uo(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=Uo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await Lo.call(t);if(r instanceof Error)return el(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function tl(e,t="prod"){return`${Ee(e,t)}/rest/organizations/${e}/commerce/v2`}var Bi=e=>e;import{StringValue as hf}from"@coveo/bueno";import{Schema as pP,SchemaValidationError as fP,StringValue as Pa,RecordValue as gP,ArrayValue as yP}from"@coveo/bueno";var k=new Pa({required:!0,emptyAllowed:!1}),ne=new Pa({required:!1,emptyAllowed:!1}),me=new Pa({required:!0,emptyAllowed:!0}),cf=new Pa({required:!1,emptyAllowed:!0}),sf=new yP({each:k,required:!0}),uf=new Pa({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Qe=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),ye=(e,t)=>{if("required"in t)return{payload:new pP({value:t}).validate({value:e}).value};let n=new gP({options:{required:!0},values:t}).validate(e);if(n)throw new fP(n);return{payload:e}},F=(e,t)=>{try{return ye(e,t)}catch(r){return{payload:e,error:Qe(r)}}},$e=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return lf(e,t,r,n,"Controller initialization error")},Le=(e,t,r,o)=>{let n=`Check the options of ${o}`;return lf(e,t,r,n,"Controller initialization error")},lf=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};import{ArrayValue as hP,BooleanValue as mf,RecordValue as SP,StringValue as va,Value as CP}from"@coveo/bueno";var Bo="3.23.1-pre.a2f9cb2e69",df=["@coveo/atomic","@coveo/quantic"];var rl=()=>ne,pf=()=>k,ao=g("configuration/updateBasicConfiguration",e=>F(e,{accessToken:ne,environment:new va({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ne})),ff=g("configuration/updateSearchConfiguration",e=>F(e,{proxyBaseUrl:new va({required:!1,url:!0}),pipeline:new va({required:!1,emptyAllowed:!0}),searchHub:ne,timezone:ne,locale:ne,authenticationProviders:new hP({required:!1,each:k})})),jo={enabled:new mf({default:!0}),originContext:rl(),originLevel2:rl(),originLevel3:rl(),proxyBaseUrl:new va({required:!1,url:!0}),runtimeEnvironment:new CP,anonymous:new mf({default:!1}),deviceId:ne,userDisplayName:ne,documentLocation:ne,trackingId:ne,analyticsMode:new va({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new SP({options:{required:!1},values:df.reduce((e,t)=>(e[t]=uf,e),{})})},ol=g("configuration/updateAnalyticsConfiguration",e=>F(e,jo)),ji=g("configuration/analytics/disable"),_i=g("configuration/analytics/enable"),gf=g("configuration/analytics/originlevel2",e=>F(e,{originLevel2:pf()})),yf=g("configuration/analytics/originlevel3",e=>F(e,{originLevel3:pf()}));var _o=g("commerce/configuration/updateBasicConfiguration",e=>F(e,{accessToken:ne,environment:new hf({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ne})),$o=g("commerce/configuration/updateProxyBaseUrl",e=>F(e,{proxyBaseUrl:new hf({required:!1,url:!0})})),zo=g("commerce/configuration/updateAnalyticsConfiguration",e=>F(e,{enabled:jo.enabled,proxyBaseUrl:jo.proxyBaseUrl,source:jo.source,trackingId:jo.trackingId})),$i=g("commerce/configuration/analytics/disable"),zi=g("commerce/configuration/analytics/enable");import{isNullOrUndefined as io}from"@coveo/bueno";var Sf=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var nl=j(Sf(),e=>e.addCase(_o,(t,r)=>{Cf(t,r.payload)}).addCase(ao,(t,r)=>{Cf(t,r.payload)}).addCase($o,(t,r)=>{xP(t,r.payload)}).addCase(zo,(t,r)=>{RP(t,r.payload)}).addCase($i,t=>{t.analytics.enabled=!1}).addCase(zi,t=>{t.analytics.enabled=!0}));function Cf(e,t){io(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",io(t.organizationId)||(e.organizationId=t.organizationId)}function xP(e,t){io(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function RP(e,t){io(t.enabled)||(e.analytics.enabled=t.enabled),io(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),io(t.source)||(e.analytics.source=t.source),io(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function Wo(e){return e.currency}var xf=(e,t)=>({currency:Wo(t.commerceContext),products:FP(t.cart),transaction:e}),Rf=(e,t)=>({currency:Wo(t.commerceContext),...e}),co=Q(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),FP=Q(co,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));import{ArrayValue as PP,NumberValue as Ff,RecordValue as vP,Schema as AP,StringValue as bP}from"@coveo/bueno";var al={productId:k,quantity:new Ff({required:!0,min:0}),name:new bP({required:!1}),price:new Ff({required:!1,min:0})},il=new PP({each:new vP({values:{...al}})}),cl={items:il},Pf=new AP(cl);var pr=g("commerce/cart/setItems",e=>F(e,il)),Ko=g("commerce/cart/updateItemQuantity",e=>F(e,al)),Go=g("commerce/cart/purchase"),Wi=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=xf(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),Ki=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=Rf(e,r()),{relay:n}=t;n.emit("ec.cartAction",o)});function W(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 vf(e,t){return e.cart[so(t)]}var Af=Q(co,e=>e.reduce((t,r)=>t+r.quantity,0)),bf=Q(co,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function wP(e,t={}){if(!IP(e))throw $;let{dispatch:r}=e,o=W(e),n=()=>e[B].cart,a={...t.initialState};$e(e,Pf,a,"buildCart"),a.items!==void 0&&r(pr(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),S=d?Math.abs(p-d.quantity):p;return{action:f,quantity:S,product:m}}return{...o,empty:function(){for(let l of co(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(Wi(l)),r(Go())},updateItemQuantity(l){let d=vf(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(Ki(s(l,d))),r(Ko(l)))},get state(){let l=n();return{items:co(l),totalQuantity:Af(l),totalPrice:bf(l)}}}}function so(e){return`${e.productId},${e.name},${e.price}`}function IP(e){return e.addReducers({cart:Ho}),!0}var Gi=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),wf=e=>Ef(e.cartItems,e.cart),If=e=>Ef(e.purchasedItems,e.purchased);function Ef(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 Ho=j(Gi(),e=>{e.addCase(pr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let c=so(i);return{cartItems:[...a.cartItems,c],cart:{...a.cart,[c]:i},purchasedItems:[],purchased:{}}},Gi());Tf(t,n,o)}).addCase(Ko,(t,{payload:r})=>{let o=so(r);if(!(o in t.cart)){EP(r,t);return}if(r.quantity<=0){TP(r,t);return}t.cart[o]=r}).addCase(Go,t=>{OP(t);let{cart:r,cartItems:o}=Gi();Tf(t,o,r)})});function Tf(e,t,r){e.cartItems=t,e.cart=r}function EP(e,t){if(e.quantity<=0)return;let r=so(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function TP(e,t){let r=so(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function OP(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 Of,RecordValue as qf,Schema as qP,StringValue as kP}from"@coveo/bueno";var VP=Intl.supportedValuesOf("currency"),DP=new kP({required:!0,emptyAllowed:!1,constrainTo:VP}),sl={url:k},ul={latitude:new Of({min:-90,max:90,required:!0}),longitude:new Of({min:-180,max:180,required:!0})},Aa={language:k,country:k,currency:DP,view:new qf({options:{required:!0},values:sl}),location:new qf({options:{required:!1},values:ul})},kf=new qP(Aa);var se=g("commerce/context/set",e=>F(e,Aa)),le=g("commerce/context/setView",e=>F(e,sl)),Yo=g("commerce/context/setLocation",e=>F(e,ul));var Vf=()=>({language:"",country:"",currency:"",view:{url:""}});var Et=j(Vf(),e=>{e.addCase(se,(t,{payload:r})=>r).addCase(le,(t,{payload:r})=>{t.view=r}).addCase(Yo,(t,{payload:r})=>{t.location=r})});var Hi=()=>({correctedQuery:"",corrections:[],originalQuery:""});import{BooleanValue as zP,RecordValue as WP,StringValue as Mf}from"@coveo/bueno";var rt=g("breadcrumb/deselectAll"),fr=g("breadcrumb/deselectAllNonBreadcrumbs");var gr=Q(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${Bo}`));var yr=(e,t)=>{let{view:r,location:o,...n}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??tl(e.configuration.organizationId,e.configuration.environment),organizationId:e.configuration.organizationId,trackingId:e.configuration.analytics.trackingId,...n,...e.configuration.analytics.enabled?{clientId:t.clientId}:{},context:{user:{...o,...t.userAgent?{userAgent:t.userAgent}:{}},view:{...r,...t.referrer?{referrer:t.referrer}:{}},capture:t.capture??e.configuration.analytics.enabled,cart:wf(e.cart),source:gr(e.configuration.analytics)}}};var Yi=(e,t,r)=>({...yr(e,t),...NP(e,r)}),NP=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};var ot=(e,t)=>({...Yi(e,t),facets:[...MP(e)],...e.commerceSort&&{sort:QP(e.commerceSort.appliedSort)}});function MP(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 QP(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}import{BooleanValue as ll,NumberValue as LP}from"@coveo/bueno";var uo=g("commerce/facets/core/updateNumberOfValues",e=>F(e,{facetId:k,numberOfValues:new LP({required:!0,min:1})})),lo=g("commerce/facets/core/updateIsFieldExpanded",e=>F(e,{facetId:k,isFieldExpanded:new ll({required:!0})})),pe=g("commerce/facets/core/clearAll"),Oe=g("commerce/facets/core/deselectAllValues",e=>F(e,{facetId:k})),mo=g("commerce/facets/core/updateFreezeCurrentValues",e=>F(e,{facetId:k,freezeCurrentValues:new ll({required:!0})})),Jo=g("commerce/facets/core/updateAutoSelectionForAll",e=>F(e,{allow:new ll({required:!0})}));import{NumberValue as Df}from"@coveo/bueno";var Ji={slotId:cf},UP={...Ji,pageSize:new Df({required:!0,min:0})},Jt=g("commerce/pagination/setPageSize",e=>F(e,UP)),BP={...Ji,page:new Df({required:!0,min:0})},Tt=g("commerce/pagination/selectPage",e=>F(e,BP)),hr=g("commerce/pagination/nextPage",e=>F(e,Ji)),Sr=g("commerce/pagination/previousPage",e=>F(e,Ji)),Xo=g("commerce/pagination/registerRecommendationsSlot",e=>F(e,{slotId:k}));import{StringValue as jP}from"@coveo/bueno";var fe=g("commerce/query/update",e=>F(e,{query:new jP}));import{isNullOrUndefined as Nf}from"@coveo/bueno";import{RecordValue as _P,StringValue as $P}from"@coveo/bueno";var Cr=g("commerce/triggers/query/updateIgnore",e=>F(e,{q:new $P({emptyAllowed:!0,required:!0})})),Zo=g("commerce/triggers/query/applyModification",e=>F(e,new _P({values:{originalQuery:ne,modification:ne}})));var ba=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 Te(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(!(!Nf(n)&&!Nf(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:c}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:Qp(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(Cr({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(o);return Te(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({...ot(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 Te(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(fe({query:t}))}};var H=_("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=ot(o,n),i=Mi(o),c=new ba(t),u=await c.fetchFromAPI({...a,query:i});return c.process(u)}),xr=_("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!Dp(o))return null;let i=ur(o),u=Sa(o)/i,s=Mi(o),l=ot(o,n),d=new ba(t),p=await d.fetchFromAPI({...l,query:s,page:u});return d.process(p)}),en=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;F(e,{query:new Mf,clearFilters:new zP}),e.clearFilters&&(r(pe()),r(fr())),r(Jo({allow:!0})),r(fe({query:e.query})),r(Tt({page:0}))}),tn=_("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({...yr(n,i),query:c});return Te(u)?r(u.error):{response:{...u.success,products:u.success.products}}}),KP={child:new WP({options:{required:!0},values:{permanentid:new Mf({required:!0})}})},rn=g("commerce/search/promoteChildToParent",e=>F(e,KP));function Qf(){return{wasCorrectedTo:"",queryCorrection:Hi(),originalQuery:""}}var Xi=j(Qf(),e=>{e.addCase(H.pending,t=>{t.queryCorrection=Hi(),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 Bf,BooleanValue as Lf,ArrayValue as ec,StringValue as Zi,NumberValue as Uf,RecordValue as ev}from"@coveo/bueno";var Y=k;import{Value as GP,NumberValue as HP,StringValue as YP,ArrayValue as JP,BooleanValue as XP}from"@coveo/bueno";var ZP={state:new GP({required:!0}),numberOfResults:new HP({required:!0,min:0}),value:new YP({required:!0,emptyAllowed:!0}),path:new JP({required:!0,each:k}),moreValuesAvailable:new XP({required:!1})};function wa(e){e.children.forEach(t=>{wa(t)}),ye({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},ZP)}var on={facetId:Y,field:k,tabs:new ev({options:{required:!1},values:{included:new ec({each:new Zi}),excluded:new ec({each:new Zi})}}),activeTab:new Zi({required:!1}),delimitingCharacter:new Zi({required:!1,emptyAllowed:!0}),filterFacetCount:new Lf({required:!1}),injectionDepth:new Uf({required:!1,min:0}),numberOfValues:new Uf({required:!1,min:1}),sortCriteria:new Bf({required:!1}),basePath:new ec({required:!1,each:k}),filterByBasePath:new Lf({required:!1})},nn=5,jf=g("categoryFacet/register",e=>F(e,on)),_f=g("categoryFacet/toggleSelectValue",e=>{try{return ye(e.facetId,k),wa(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:Qe(t)}}}),$f=g("categoryFacet/deselectAll",e=>F(e,on.facetId)),pQ=g("categoryFacet/updateNumberOfValues",e=>F(e,{facetId:on.facetId,numberOfValues:on.numberOfValues})),fQ=g("categoryFacet/updateSortCriterion",e=>F(e,{facetId:on.facetId,criterion:new Bf})),gQ=g("categoryFacet/updateBasePath",e=>F(e,{facetId:on.facetId,basePath:new ec({each:k})}));import{NumberValue as nv,RecordValue as av,ArrayValue as iv}from"@coveo/bueno";import{RecordValue as tv,NumberValue as rv,StringValue as ov}from"@coveo/bueno";var Ia={facetId:Y,captions:new tv({options:{required:!1}}),numberOfValues:new rv({required:!1,min:1}),query:new ov({required:!1,emptyAllowed:!0})};var cv={path:new iv({required:!0,each:k}),displayValue:me,rawValue:me,count:new nv({required:!0,min:0})},nt=g("categoryFacet/selectSearchResult",e=>F(e,{facetId:Y,value:new av({values:cv})})),tc=g("categoryFacetSearch/register",e=>F(e,Ia));import{RecordValue as sv,NumberValue as uv}from"@coveo/bueno";var zf={facetId:Y,value:new sv({values:{displayValue:me,rawValue:me,count:new uv({required:!0,min:0})}})},rc=g("facetSearch/register",e=>F(e,Ia)),Rr=g("facetSearch/update",e=>F(e,Ia)),Je=g("facetSearch/toggleSelectValue",e=>F(e,zf)),St=g("facetSearch/toggleExcludeValue",e=>F(e,zf));import{BooleanValue as lv}from"@coveo/bueno";var Xt=g("facetOptions/update",(e={freezeFacetOrder:!0})=>F(e,{freezeFacetOrder:new lv({required:!1})})),dl=g("facetOptions/facet/enable",e=>F(e,Y)),Zt=g("facetOptions/facet/disable",e=>F(e,Y));var dv=g("history/undo"),mv=g("history/redo"),Ot=g("history/snapshot"),QQ=_("history/back",async(e,{dispatch:t})=>{t(dv()),await t(Ce())}),LQ=_("history/forward",async(e,{dispatch:t})=>{t(mv()),await t(Ce())}),Ce=_("history/change",async(e,{getState:t})=>t().history.present);import{BooleanValue as Wf,StringValue as Ea,NumberValue as Kf,RecordValue as Fr}from"@coveo/bueno";var oc={q:new Ea,enableQuerySyntax:new Wf,aq:new Ea,cq:new Ea,firstResult:new Kf({min:0}),numberOfResults:new Kf({min:0}),sortCriteria:new Ea,f:new Fr,fExcluded:new Fr,cf:new Fr,nf:new Fr,mnf:new Fr,df:new Fr,debug:new Wf,sf:new Fr,tab:new Ea,af:new Fr};var Ae=g("searchParameters/restore",e=>F(e,oc)),pv=g("searchParameters/restoreTab",e=>F(e,k));import{BooleanValue as vy,NumberValue as Ay,StringValue as Rw}from"@coveo/bueno";function er(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 w(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 ee;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ee||(ee={}));function fl(){return typeof window<"u"}function wl(){return typeof navigator<"u"}function an(){return typeof document<"u"}function gl(){try{return typeof localStorage<"u"}catch{return!1}}function fv(){try{return typeof sessionStorage<"u"}catch{return!1}}function cg(){return wl()&&navigator.cookieEnabled}var gv=[ee.click,ee.custom,ee.search,ee.view],yv=(e,t)=>gv.indexOf(e)!==-1?Object.assign({language:an()?document.documentElement.lang:"unknown",userAgent:wl()?navigator.userAgent:"unknown"},t):t,qa=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?Gf(t,r,a):(i=c.split("."),n=i[i.length-2]+"."+i[i.length-1],Gf(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 Gf(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function hv(){return gl()?localStorage:cg()?new ka:fv()?sessionStorage:new sn}var ka=class e{getItem(t){return qa.get(`${e.prefix}${t}`)}removeItem(t){qa.erase(`${e.prefix}${t}`)}setItem(t,r,o){qa.set(`${e.prefix}${t}`,r,o)}};ka.prefix="coveo_";var yl=class{constructor(){this.cookieStorage=new ka}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)}},sn=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Ta="__coveo.analytics.history",sg=20,ug=1e3*60,lg=75,un=class{constructor(t){this.store=t||hv()}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 w(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 w(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Ta);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return w(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Ta);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Ta,JSON.stringify(t.slice(0,sg)))}catch{}}clear(){try{this.store.removeItem(Ta)}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,lg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>ug:!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))}},dg=Object.freeze({__proto__:null,HistoryStore:un,MAX_NUMBER_OF_HISTORY_ELEMENTS:sg,MAX_VALUE_SIZE:lg,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:ug,STORE_KEY:Ta,default:un}),Sv=(e,t)=>w(void 0,void 0,void 0,function*(){return e===ee.view?(yield Cv(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),Cv=e=>w(void 0,void 0,void 0,function*(){let t=new un,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),nc,xv=new Uint8Array(16);function Rv(){if(!nc&&(nc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!nc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return nc(xv)}var Fv=/^(?:[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 ic(e){return typeof e=="string"&&Fv.test(e)}var be=[];for(let e=0;e<256;++e)be.push((e+256).toString(16).slice(1));function mg(e,t=0){return(be[e[t+0]]+be[e[t+1]]+be[e[t+2]]+be[e[t+3]]+"-"+be[e[t+4]]+be[e[t+5]]+"-"+be[e[t+6]]+be[e[t+7]]+"-"+be[e[t+8]]+be[e[t+9]]+"-"+be[e[t+10]]+be[e[t+11]]+be[e[t+12]]+be[e[t+13]]+be[e[t+14]]+be[e[t+15]]).toLowerCase()}function Pv(e){if(!ic(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 vv(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Av="6ba7b810-9dad-11d1-80b4-00c04fd430c8",bv="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function wv(e,t,r){function o(n,a,i,c){var u;if(typeof n=="string"&&(n=vv(n)),typeof a=="string"&&(a=Pv(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 mg(s)}try{o.name=e}catch{}return o.DNS=Av,o.URL=bv,o}var Iv=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Hf={randomUUID:Iv};function po(e,t,r){if(Hf.randomUUID&&!t&&!e)return Hf.randomUUID();e=e||{};let o=e.random||(e.rng||Rv)();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 mg(o)}function Ev(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 ml(e,t){return e<<t|e>>>32-t}function Tv(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]=ml(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),S=ml(u,5)+Ev(f,s,l,d)+p+t[f]+c[m]>>>0;p=d,d=l,l=ml(s,30)>>>0,s=u,u=S}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 Ov=wv("v5",80,Tv),Yf=Ov,pg="2.30.45",Jf=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Oa={pageview:"pageview",event:"event"},cc=class{constructor({client:t,uuidGenerator:r=po}){this.client=t,this.uuidGenerator=r}},hl=class extends cc{constructor({client:t,uuidGenerator:r=po}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Jf(window.location),this.lastReferrer=an()?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:an()?document.title:"",encoding:an()?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===Oa.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Oa.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Oa.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Oa.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 Jf(window.location)}},Pr=class e{constructor(t,r){if(!ic(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 ic(a)?new e(a,Number.parseInt(n)*1e3):null}};Pr.cvo_cid="cvo_cid";Pr.expirationTime=120;var Sl=class extends cc{constructor({client:t,uuidGenerator:r=po}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return w(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(Pr.cvo_cid,new Pr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Sl.Id="link";var it=Object.keys;function ac(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var pl=128,fg=192,Xf=224,Zf=240;function qv(e){return(e&248)===Zf?4:(e&Zf)===Xf?3:(e&Xf)===fg?2:1}function kv(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&pl)!=pl)break;if(r-=3,(o&fg)!=pl){t-r>=qv(o)*3&&(r=t);break}}return e.substring(0,r)}var Cl={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"},Vv=it(Cl).map(e=>Cl[e]),Dv=[...Vv].join("|"),Nv=new RegExp(`^(${Dv}$)`),Mv={svcAction:"svc_action",svcActionData:"svc_action_data"},Qv=e=>it(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=Cl[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),Lv=e=>Nv.test(e),Uv=[Lv],eg={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},tg={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},qe={action:"pa",list:"pal",listSource:"pls"},sc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},Bv=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],xl={id:"quoteId",affiliation:"quoteAffiliation"},Rl={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},jv={add:qe,bookmark_add:qe,bookmark_remove:qe,click:qe,checkout:qe,checkout_option:qe,detail:qe,impression:qe,remove:qe,refund:Object.assign(Object.assign({},qe),sc),purchase:Object.assign(Object.assign({},qe),sc),quickview:qe,quote:Object.assign(Object.assign({},qe),xl),review:Object.assign(Object.assign({},qe),Rl)},_v=it(eg).map(e=>eg[e]),$v=it(tg).map(e=>tg[e]),zv=it(qe).map(e=>qe[e]),Wv=it(sc).map(e=>sc[e]),Kv=it(Rl).map(e=>Rl[e]),Gv=it(xl).map(e=>xl[e]),Hv=[..._v,"custom"].join("|"),Yv=[...$v,"custom"].join("|"),gg="(pr[0-9]+)",yg="(il[0-9]+pi[0-9]+)",Jv=new RegExp(`^${gg}(${Hv})$`),Xv=new RegExp(`^(${yg}(${Yv}))|(il[0-9]+nm)$`),Zv=new RegExp(`^(${zv.join("|")})$`),eA=new RegExp(`^(${Wv.join("|")})$`),tA=new RegExp(`^${gg}custom$`),rA=new RegExp(`^${yg}custom$`),oA=new RegExp(`^(${[...Bv,...Kv,...Gv].join("|")})$`),nA=e=>Jv.test(e),aA=e=>Xv.test(e),iA=e=>Zv.test(e),cA=e=>eA.test(e),sA=e=>oA.test(e),uA=[aA,nA,iA,cA,sA],lA=[tA,rA],dA={anonymizeIp:"aip"},mA={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},pA={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},fA=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],gA=Object.assign(Object.assign(Object.assign(Object.assign({},dA),mA),pA),fA.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Fl=Object.assign(Object.assign({},gA),Mv),yA=e=>{let t=!!e.action&&jv[e.action]||{};return it(e).reduce((r,o)=>{let n=t[o]||Fl[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},hA=it(Fl).map(e=>Fl[e]),SA=e=>hA.indexOf(e)!==-1,CA=e=>e==="custom",xA=e=>[...uA,...Uv,SA,CA].some(t=>t(e)),RA=e=>it(e).reduce((t,r)=>{let o=FA(r);return o?Object.assign(Object.assign({},t),PA(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),FA=e=>{let t;return[...lA].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},PA=(e,t)=>it(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),Pl=class{constructor(t){this.opts=t}sendEvent(t,r){return w(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 w(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 w(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[ee.click,ee.custom,ee.search,ee.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}},vl=class{sendEvent(t,r){return w(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return w(this,void 0,void 0,function*(){return Promise.resolve()})}},rg=globalThis.fetch,uc=class{constructor(t){this.opts=t}sendEvent(t,r){return w(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=er(u,["url"]),d;try{d=yield rg(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 w(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield rg(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ee.click,ee.custom,ee.search,ee.view].indexOf(t)!==-1}getVisitorIdParam(){return w(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},Al=class{constructor(t,r){gl()&&cg()?this.storage=new yl:gl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new sn),this.client=new uc(t),this.beaconClient=new Pl(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}},bl=class{constructor(t,r){this.storage=r||new sn,this.client=new uc(t)}getClientDependingOnEventType(t){return this.client}},lc=class{constructor(){this.storage=new sn,this.client=new vl}getClientDependingOnEventType(t){return this.client}},vA="xx",AA=e=>e?.startsWith(vA)||!1,bA=`
19
+ If you are trying to access the inner state... Don't`),Reflect.get(t,r,o)}});import{isNullOrUndefined as yF}from"@coveo/bueno";function Pe(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 wR=typeof Symbol=="function"&&Symbol.observable||"@@observable",Um=wR,Fu=()=>Math.random().toString(36).substring(7).split("").join("."),IR={INIT:`@@redux/INIT${Fu()}`,REPLACE:`@@redux/REPLACE${Fu()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Fu()}`},Si=IR;function vt(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 Pu(e,t,r){if(typeof e!="function")throw new Error(Pe(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(Pe(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(Pe(1));return r(Pu)(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,h)=>{i.set(h,C)}))}function l(){if(u)throw new Error(Pe(3));return n}function d(C){if(typeof C!="function")throw new Error(Pe(4));if(u)throw new Error(Pe(5));let h=!0;s();let v=c++;return i.set(v,C),function(){if(h){if(u)throw new Error(Pe(6));h=!1,s(),i.delete(v),a=null}}}function p(C){if(!vt(C))throw new Error(Pe(7));if(typeof C.type>"u")throw new Error(Pe(8));if(typeof C.type!="string")throw new Error(Pe(17));if(u)throw new Error(Pe(9));try{u=!0,n=o(n,C)}finally{u=!1}return(a=i).forEach(v=>{v()}),C}function m(C){if(typeof C!="function")throw new Error(Pe(10));o=C,p({type:Si.REPLACE})}function f(){let C=d;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(Pe(11));function v(){let x=h;x.next&&x.next(l())}return v(),{unsubscribe:C(v)}},[Um](){return this}}}return p({type:Si.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[Um]:f}}function ER(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Si.INIT})>"u")throw new Error(Pe(12));if(typeof r(void 0,{type:Si.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(Pe(13))})}function qo(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{ER(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],S=m(f,u);if(typeof S>"u"){let C=u&&u.type;throw new Error(Pe(14))}l[p]=S,s=s||S!==f}return s=s||o.length!==Object.keys(c).length,s?l:c}}function ko(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function Bm(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(Pe(15))},i={getState:n.getState,dispatch:(u,...s)=>a(u,...s)},c=e.map(u=>u(i));return a=ko(...c)(n.dispatch),{...n,dispatch:a}}}function Ci(e){return vt(e)&&"type"in e&&typeof e.type=="string"}var ku=Symbol.for("immer-nothing"),na=Symbol.for("immer-draftable"),je=Symbol.for("immer-state");function ve(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Hr=Object.getPrototypeOf;function He(e){return!!e&&!!e[je]}function _e(e){return e?Wm(e)||Array.isArray(e)||!!e[na]||!!e.constructor?.[na]||ua(e)||la(e):!1}var TR=Object.prototype.constructor.toString();function Wm(e){if(!e||typeof e!="object")return!1;let t=Hr(e);if(t===null)return!0;let r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===TR}function Vu(e){return He(e)||ve(15,e),e[je].base_}function aa(e,t){Yr(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function Yr(e){let t=e[je];return t?t.type_:Array.isArray(e)?1:ua(e)?2:la(e)?3:0}function ia(e,t){return Yr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function vu(e,t){return Yr(e)===2?e.get(t):e[t]}function Km(e,t,r){let o=Yr(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function OR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ua(e){return e instanceof Map}function la(e){return e instanceof Set}function Gr(e){return e.copy_||e.base_}function wu(e,t){if(ua(e))return new Map(e);if(la(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=Wm(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[je];let n=Reflect.ownKeys(o);for(let a=0;a<n.length;a++){let i=n[a],c=o[i];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(o[i]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[i]})}return Object.create(Hr(e),o)}else{let o=Hr(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function Fi(e,t=!1){return Pi(e)||He(e)||!_e(e)||(Yr(e)>1&&(e.set=e.add=e.clear=e.delete=qR),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>Fi(o,!0))),e}function qR(){ve(2)}function Pi(e){return Object.isFrozen(e)}var Iu={};function Jr(e){let t=Iu[e];return t||ve(0,e),t}function kR(e,t){Iu[e]||(Iu[e]=t)}var ca;function Gm(){return ca}function VR(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function jm(e,t){t&&(Jr("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Eu(e){Tu(e),e.drafts_.forEach(DR),e.drafts_=null}function Tu(e){e===ca&&(ca=e.parent_)}function _m(e){return ca=VR(ca,e)}function DR(e){let t=e[je];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function $m(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[je].modified_&&(Eu(t),ve(4)),_e(e)&&(e=xi(t,e),t.parent_||Ri(t,e)),t.patches_&&Jr("Patches").generateReplacementPatches_(r[je].base_,e,t.patches_,t.inversePatches_)):e=xi(t,r,[]),Eu(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==ku?e:void 0}function xi(e,t,r){if(Pi(t))return t;let o=t[je];if(!o)return aa(t,(n,a)=>zm(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return Ri(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),aa(a,(c,u)=>zm(e,o,n,c,u,r,i)),Ri(e,n,!1),r&&e.patches_&&Jr("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function zm(e,t,r,o,n,a,i){if(He(n)){let c=a&&t&&t.type_!==3&&!ia(t.assigned_,o)?a.concat(o):void 0,u=xi(e,n,c);if(Km(r,o,u),He(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(_e(n)&&!Pi(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;xi(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&Ri(e,n)}}function Ri(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Fi(t,r)}function NR(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:Gm(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=Du;r&&(n=[o],a=sa);let{revoke:i,proxy:c}=Proxy.revocable(n,a);return o.draft_=c,o.revoke_=i,c}var Du={get(e,t){if(t===je)return e;let r=Gr(e);if(!ia(r,t))return MR(e,r,t);let o=r[t];return e.finalized_||!_e(o)?o:o===Au(e.base_,t)?(bu(e),e.copy_[t]=qu(o,e)):o},has(e,t){return t in Gr(e)},ownKeys(e){return Reflect.ownKeys(Gr(e))},set(e,t,r){let o=Hm(Gr(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=Au(Gr(e),t),a=n?.[je];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(OR(r,n)&&(r!==void 0||ia(e.base_,t)))return!0;bu(e),Ou(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,bu(e),Ou(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Gr(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){ve(11)},getPrototypeOf(e){return Hr(e.base_)},setPrototypeOf(){ve(12)}},sa={};aa(Du,(e,t)=>{sa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});sa.deleteProperty=function(e,t){return sa.set.call(this,e,t,void 0)};sa.set=function(e,t,r){return Du.set.call(this,e[0],t,r,e[0])};function Au(e,t){let r=e[je];return(r?Gr(r):e)[t]}function MR(e,t,r){let o=Hm(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function Hm(e,t){if(!(t in e))return;let r=Hr(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Hr(r)}}function Ou(e){e.modified_||(e.modified_=!0,e.parent_&&Ou(e.parent_))}function bu(e){e.copy_||(e.copy_=wu(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var QR=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"&&ve(6),o!==void 0&&typeof o!="function"&&ve(7);let n;if(_e(t)){let a=_m(this),i=qu(t,void 0),c=!0;try{n=r(i),c=!1}finally{c?Eu(a):Tu(a)}return jm(a,o),$m(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===ku&&(n=void 0),this.autoFreeze_&&Fi(n,!0),o){let a=[],i=[];Jr("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else ve(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){_e(e)||ve(8),He(e)&&(e=Ym(e));let t=_m(this),r=qu(e,void 0);return r[je].isManual_=!0,Tu(t),r}finishDraft(e,t){let r=e&&e[je];(!r||!r.isManual_)&&ve(9);let{scope_:o}=r;return jm(o,t),$m(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let n=t[r];if(n.path.length===0&&n.op==="replace"){e=n.value;break}}r>-1&&(t=t.slice(r+1));let o=Jr("Patches").applyPatches_;return He(e)?o(e,t):this.produce(e,n=>o(n,t))}};function qu(e,t){let r=ua(e)?Jr("MapSet").proxyMap_(e,t):la(e)?Jr("MapSet").proxySet_(e,t):NR(e,t);return(t?t.scope_:Gm()).drafts_.push(r),r}function Ym(e){return He(e)||ve(10,e),Jm(e)}function Jm(e){if(!_e(e)||Pi(e))return e;let t=e[je],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=wu(e,t.scope_.immer_.useStrictShallowCopy_)}else r=wu(e,!0);return aa(r,(o,n)=>{Km(r,o,Jm(n))}),t&&(t.finalized_=!1),r}function Xm(){let t="replace",r="add",o="remove";function n(p,m,f,S){switch(p.type_){case 0:case 2:return i(p,m,f,S);case 1:return a(p,m,f,S);case 3:return c(p,m,f,S)}}function a(p,m,f,S){let{base_:C,assigned_:h}=p,v=p.copy_;v.length<C.length&&([C,v]=[v,C],[f,S]=[S,f]);for(let y=0;y<C.length;y++)if(h[y]&&v[y]!==C[y]){let x=m.concat([y]);f.push({op:t,path:x,value:d(v[y])}),S.push({op:t,path:x,value:d(C[y])})}for(let y=C.length;y<v.length;y++){let x=m.concat([y]);f.push({op:r,path:x,value:d(v[y])})}for(let y=v.length-1;C.length<=y;--y){let x=m.concat([y]);S.push({op:o,path:x})}}function i(p,m,f,S){let{base_:C,copy_:h}=p;aa(p.assigned_,(v,y)=>{let x=vu(C,v),E=vu(h,v),A=y?ia(C,v)?t:r:o;if(x===E&&A===t)return;let R=m.concat(v);f.push(A===o?{op:A,path:R}:{op:A,path:R,value:E}),S.push(A===r?{op:o,path:R}:A===o?{op:r,path:R,value:d(x)}:{op:t,path:R,value:d(x)})})}function c(p,m,f,S){let{base_:C,copy_:h}=p,v=0;C.forEach(y=>{if(!h.has(y)){let x=m.concat([v]);f.push({op:o,path:x,value:y}),S.unshift({op:r,path:x,value:y})}v++}),v=0,h.forEach(y=>{if(!C.has(y)){let x=m.concat([v]);f.push({op:r,path:x,value:y}),S.unshift({op:o,path:x,value:y})}v++})}function u(p,m,f,S){f.push({op:t,path:[],value:m===ku?void 0:m}),S.push({op:t,path:[],value:p})}function s(p,m){return m.forEach(f=>{let{path:S,op:C}=f,h=p;for(let E=0;E<S.length-1;E++){let A=Yr(h),R=S[E];typeof R!="string"&&typeof R!="number"&&(R=""+R),(A===0||A===1)&&(R==="__proto__"||R==="constructor")&&ve(19),typeof h=="function"&&R==="prototype"&&ve(19),h=vu(h,R),typeof h!="object"&&ve(18,S.join("/"))}let v=Yr(h),y=l(f.value),x=S[S.length-1];switch(C){case t:switch(v){case 2:return h.set(x,y);case 3:ve(16);default:return h[x]=y}case r:switch(v){case 1:return x==="-"?h.push(y):h.splice(x,0,y);case 2:return h.set(x,y);case 3:return h.add(y);default:return h[x]=y}case o:switch(v){case 1:return h.splice(x,1);case 2:return h.delete(x);case 3:return h.delete(f.value);default:return delete h[x]}default:ve(17,C)}}),p}function l(p){if(!_e(p))return p;if(Array.isArray(p))return p.map(l);if(ua(p))return new Map(Array.from(p.entries()).map(([f,S])=>[f,l(S)]));if(la(p))return new Set(Array.from(p).map(l));let m=Object.create(Hr(p));for(let f in p)m[f]=l(p[f]);return ia(p,na)&&(m[na]=p[na]),m}function d(p){return He(p)?l(p):p}kR("Patches",{applyPatches_:s,generatePatches_:n,generateReplacementPatches_:u})}var Ye=new QR,Gt=Ye.produce,vi=Ye.produceWithPatches.bind(Ye),sV=Ye.setAutoFreeze.bind(Ye),uV=Ye.setUseStrictShallowCopy.bind(Ye),Nu=Ye.applyPatches.bind(Ye),lV=Ye.createDraft.bind(Ye),dV=Ye.finishDraft.bind(Ye);function LR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function UR(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function BR(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 Zm=e=>Array.isArray(e)?e:[e];function jR(e){let t=Array.isArray(e[0])?e[0]:e;return BR(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function _R(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var fV=Symbol();var gV=Object.getPrototypeOf({});var $R=class{constructor(e){this.value=e}deref(){return this.value}},zR=typeof WeakRef<"u"?WeakRef:$R,WR=0,ep=1;function Ai(){return{s:WR,v:void 0,o:null,p:null}}function Vo(e,t={}){let r=Ai(),{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 S=f.get(m);S===void 0?(c=Ai(),f.set(m,c)):c=S}else{let f=c.p;f===null&&(c.p=f=new Map);let S=f.get(m);S===void 0?(c=Ai(),f.set(m,c)):c=S}}let s=c,l;if(c.s===ep)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 zR(l):l}return s.s=ep,s.v=l,l}return i.clearCache=()=>{r=Ai(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function tp(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()),LR(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=Vo,argsMemoizeOptions:f=[],devModeChecks:S={}}=l,C=Zm(p),h=Zm(f),v=jR(n),y=d(function(){return a++,s.apply(null,arguments)},...C),x=!0,E=m(function(){i++;let R=_R(v,arguments);return c=y.apply(null,R),c},...h);return Object.assign(E,{resultFunc:s,memoizedResultFunc:y,dependencies:v,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>c,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var Q=tp(Vo),KR=Object.assign((e,t=Q)=>{UR(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:()=>KR});function rp(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var op=rp(),np=rp;var GR=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ko:ko.apply(null,arguments)},AV=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},HR=e=>e&&typeof e.match=="function";function g(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(yt(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=>Ci(o)&&o.type===e,r}var up=class da extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,da.prototype)}static get[Symbol.species](){return da}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new da(...t[0].concat(this)):new da(...t.concat(this))}};function ap(e){return _e(e)?Gt(e,()=>{}):e}function ip(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function YR(e){return typeof e=="boolean"}var JR=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new up;return r&&(YR(r)?i.push(op):i.push(np(r.extraArgument))),i},ma="RTK_autoBatch",No=()=>e=>({payload:e,meta:{[ma]:!0}}),cp=e=>t=>{setTimeout(t,e)},XR=(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:cp(10):e.type==="callback"?e.queueNotification:cp(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?.[ma],a=!n,a&&(i||(i=!0,u(s))),o.dispatch(l)}finally{n=!0}}})},ZR=e=>function(r){let{autoBatch:o=!0}=r??{},n=new up(e);return o&&n.push(XR(typeof o=="object"?o:void 0)),n};function lp(e){let t=JR(),{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(vt(r))c=qo(r);else throw new Error(yt(1));let u;typeof o=="function"?u=o(t):u=t();let s=ko;n&&(s=GR({trace:!1,...typeof n=="object"&&n}));let l=Bm(...u),d=ZR(l),p=typeof i=="function"?i(d):d(),m=s(...p);return Pu(c,a,m)}function dp(e){let t={},r=[],o,n={addCase(a,i){let c=typeof a=="string"?a:a.type;if(!c)throw new Error(yt(28));if(c in t)throw new Error(yt(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 eF(e){return typeof e=="function"}function j(e,t){let[r,o,n]=dp(t),a;if(eF(e))a=()=>ap(e());else{let c=ap(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(He(l)){let m=d(l,u);return m===void 0?l:m}else{if(_e(l))return Gt(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 mp=(e,t)=>HR(e)?e.match(t):e(t);function At(...e){return t=>e.some(r=>mp(r,t))}function Do(...e){return t=>e.every(r=>mp(r,t))}function wi(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 pa(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Ii(...e){return e.length===0?t=>wi(t,["pending"]):pa(e)?At(...e.map(t=>t.pending)):Ii()(e[0])}function Xr(...e){return e.length===0?t=>wi(t,["rejected"]):pa(e)?At(...e.map(t=>t.rejected)):Xr()(e[0])}function fa(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Do(Xr(...e),t):pa(e)?Do(Xr(...e),t):fa()(e[0])}function Ht(...e){return e.length===0?t=>wi(t,["fulfilled"]):pa(e)?At(...e.map(t=>t.fulfilled)):Ht()(e[0])}function Ei(...e){return e.length===0?t=>wi(t,["pending","fulfilled","rejected"]):pa(e)?At(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ei()(e[0])}var tF="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ti=(e=21)=>{let t="",r=e;for(;r--;)t+=tF[Math.random()*64|0];return t},rF=["name","message","stack","code"],Mu=class{constructor(e,t){Be(this,"_type");this.payload=e,this.meta=t}},sp=class{constructor(e,t){Be(this,"_type");this.payload=e,this.meta=t}},oF=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of rF)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},_=(()=>{function e(t,r,o){let n=g(t+"/fulfilled",(u,s,l,d)=>({payload:u,meta:{...d||{},arg:l,requestId:s,requestStatus:"fulfilled"}})),a=g(t+"/pending",(u,s,l)=>({payload:void 0,meta:{...l||{},arg:s,requestId:u,requestStatus:"pending"}})),i=g(t+"/rejected",(u,s,l,d,p)=>({payload:d,error:(o&&o.serializeError||oF)(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):Ti(),m=new AbortController,f,S;function C(v){S=v,m.abort()}let h=async function(){let v;try{let x=o?.condition?.(u,{getState:l,extra:d});if(aF(x)&&(x=await x),x===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let E=new Promise((A,R)=>{f=()=>{R({name:"AbortError",message:S||"Aborted"})},m.signal.addEventListener("abort",f)});s(a(p,u,o?.getPendingMeta?.({requestId:p,arg:u},{getState:l,extra:d}))),v=await Promise.race([E,Promise.resolve(r(u,{dispatch:s,getState:l,extra:d,requestId:p,signal:m.signal,abort:C,rejectWithValue:(A,R)=>new Mu(A,R),fulfillWithValue:(A,R)=>new sp(A,R)})).then(A=>{if(A instanceof Mu)throw A;return A instanceof sp?n(A.payload,p,u,A.meta):n(A,p,u)})])}catch(x){v=x instanceof Mu?i(null,p,u,x.payload,x.meta):i(x,p,u)}finally{f&&m.signal.removeEventListener("abort",f)}return o&&!o.dispatchConditionRejection&&i.match(v)&&v.meta.condition||s(v),v}();return Object.assign(h,{abort:C,requestId:p,arg:u,unwrap(){return h.then(nF)}})}}return Object.assign(c,{pending:a,rejected:i,fulfilled:n,settled:At(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function nF(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function aF(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var pp=Symbol.for("rtk-slice-createasyncthunk"),TV={[pp]:_};function iF(e,t){return`${e}/${t}`}function cF({creators:e}={}){let t=e?.asyncThunk?.[pp];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(yt(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(uF()):o.reducers)||{},c=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(v,y){let x=typeof v=="string"?v:v.type;if(!x)throw new Error(yt(12));if(x in u.sliceCaseReducersByType)throw new Error(yt(13));return u.sliceCaseReducersByType[x]=y,s},addMatcher(v,y){return u.sliceMatchers.push({matcher:v,reducer:y}),s},exposeAction(v,y){return u.actionCreators[v]=y,s},exposeCaseReducer(v,y){return u.sliceCaseReducersByName[v]=y,s}};c.forEach(v=>{let y=i[v],x={reducerName:v,type:iF(n,v),createNotation:typeof o.reducers=="function"};dF(y)?pF(x,y,s,t):lF(x,y,s)});function l(){let[v={},y=[],x=void 0]=typeof o.extraReducers=="function"?dp(o.extraReducers):[o.extraReducers],E={...v,...u.sliceCaseReducersByType};return j(o.initialState,A=>{for(let R in E)A.addCase(R,E[R]);for(let R of u.sliceMatchers)A.addMatcher(R.matcher,R.reducer);for(let R of y)A.addMatcher(R.matcher,R.reducer);x&&A.addDefaultCase(x)})}let d=v=>v,p=new Map,m;function f(v,y){return m||(m=l()),m(v,y)}function S(){return m||(m=l()),m.getInitialState()}function C(v,y=!1){function x(A){let R=A[v];return typeof R>"u"&&y&&(R=S()),R}function E(A=d){let R=ip(p,y,()=>new WeakMap);return ip(R,A,()=>{let P={};for(let[b,T]of Object.entries(o.selectors??{}))P[b]=sF(T,A,S,y);return P})}return{reducerPath:v,getSelectors:E,get selectors(){return E(x)},selectSlice:x}}let h={name:n,reducer:f,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:S,...C(a),injectInto(v,{reducerPath:y,...x}={}){let E=y??a;return v.inject({reducerPath:E,reducer:f},x),{...h,...C(E,!0)}}};return h}}function sF(e,t,r,o){function n(a,...i){let c=t(a);return typeof c>"u"&&o&&(c=r()),e(c,...i)}return n.unwrapped=e,n}var Zr=cF();function uF(){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 lF({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!mF(o))throw new Error(yt(17));a=o.reducer,i=o.prepare}else a=o;n.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?g(e,i):g(e))}function dF(e){return e._reducerDefinitionType==="asyncThunk"}function mF(e){return e._reducerDefinitionType==="reducerWithPrepare"}function pF({type:e,reducerName:t},r,o,n){if(!n)throw new Error(yt(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||bi,pending:c||bi,rejected:u||bi,settled:s||bi})}function bi(){}var fp="listener",gp="completed",yp="cancelled",OV=`task-${yp}`,qV=`task-${gp}`,kV=`${fp}-${yp}`,VV=`${fp}-${gp}`;var{assign:hp}=Object;var Qu="listenerMiddleware";var fF=hp(g(`${Qu}/add`),{withTypes:()=>fF}),DV=g(`${Qu}/removeAll`),gF=hp(g(`${Qu}/remove`),{withTypes:()=>gF});var NV=Symbol.for("rtk-state-proxy-original");function yt(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 ur=Q(e=>e.commercePagination?.principal.perPage||0,e=>e),Oi=Q((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),lr=Q(e=>e.commercePagination?.principal.totalEntries||0,e=>e),qi=Q((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),ki=Q(e=>e.commercePagination?.principal.page||0,e=>e),Sp=Q((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var GV=Q(e=>e[B].productListing.responseId,e=>e),ga=Q(e=>e.productListing.responseId,e=>e),Cp=Q(e=>e.productListing.requestId,e=>e),ya=Q(e=>e.productListing?.products.length||0,e=>e),xp=Q(e=>({total:lr(e),current:ya(e)}),({current:e,total:t})=>e<t),Rp=Q(e=>e.productListing?.isLoading,e=>yF(e)?!1:e),Fp=Q(e=>e.productListing?.error,e=>e??null);import{isNullOrUndefined as kp}from"@coveo/bueno";function Lu(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function Uu(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{sortCriteria:o}:{}}function bt(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 wt(e){let{activeValue:t,ancestryMap:r}=SF(e);return t?CF(t,r):[]}function SF(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 CF(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function Pp(){return{principal:dr(),recommendations:{}}}function dr(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}import{ArrayValue as FF,EnumValue as bp,StringValue as wp,RecordValue as Ip}from"@coveo/bueno";import{ArrayValue as xF,EnumValue as vp,RecordValue as Ap,StringValue as RF}from"@coveo/bueno";var ht=(r=>(r.Relevance="relevance",r.Fields="fields",r))(ht||{}),eo=(r=>(r.Ascending="asc",r.Descending="desc",r))(eo||{}),It=()=>({by:"relevance"});var ZV=new Ap({options:{required:!1},values:{by:new vp({enum:ht,required:!0}),fields:new xF({each:new Ap({values:{name:new RF,direction:new vp({enum:eo})}})})}});var Vi=e=>({by:"fields",fields:e}),Ep=new Ip({options:{required:!1},values:{by:new bp({enum:ht,required:!0}),fields:new FF({each:new Ip({values:{field:new wp({required:!0}),direction:new bp({enum:eo}),displayName:new wp}})})}});function to(){return{appliedSort:It(),availableSorts:[It()]}}function Di(e){return{...PF(e?.commercePagination,t=>t.principal.page,dr().page),...vF(e?.commercePagination,t=>t.principal.perPage,dr().perPage),...Uu(e?.commerceSort,t=>t.appliedSort,to().appliedSort),...bt(e.commerceFacetSet,mr(e,"regular"),AF,"f"),...bt(e.commerceFacetSet,mr(e,"regular"),bF,"fExcluded"),...bt(e.commerceFacetSet,mr(e,"location"),wF,"lf"),...bt(e.commerceFacetSet,mr(e,"hierarchical"),IF,"cf"),...bt(e.commerceFacetSet,mr(e,"dateRange"),Tp,"df"),...bt(e.commerceFacetSet,mr(e,"dateRange"),Op,"dfExcluded"),...bt(e.commerceFacetSet,mr(e,"numericalRange"),Tp,"nf"),...bt(e.commerceFacetSet,mr(e,"numericalRange"),Op,"nfExcluded"),...qp("selected",e.manualNumericFacetSet),...qp("excluded",e.manualNumericFacetSet)}}function PF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function vF(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 bF(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function wF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function Tp(e){return e.values.filter(t=>t.state==="selected")}function Op(e){return e.values.filter(t=>t.state==="excluded")}function qp(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 IF(e){return wt(e.values).map(r=>r.value)}function mr(e,t){return r=>e.commerceFacetSet[r].request.type===t}var Ni=()=>({query:""});var vD=Q(e=>e[B].commerceSearch.responseId,e=>e),ha=Q(e=>e.commerceSearch.responseId,e=>e),Vp=Q(e=>e.commerceSearch.requestId,e=>e),Sa=Q(e=>e.commerceSearch?.products.length||0,e=>e),Dp=Q(e=>({total:lr(e),current:Sa(e)}),({current:e,total:t})=>e<t),Np=Q(e=>e.commerceSearch?.isLoading,e=>kp(e)?!1:e),Mp=Q(e=>e.commerceSearch?.error,e=>e??null),Mi=Q(e=>e.commerceQuery?.query,e=>e??""),EF=Q(e=>e.commerceSearch?.queryExecuted,e=>e),Qp=(e,t)=>kp(t.queryCorrection?.correctedQuery)?Mi(e):t.queryCorrection.correctedQuery,Lp=e=>({...Lu(e?.commerceQuery,t=>t.query,Ni().query),...Di(e)});function Up(e){return{query:EF(e)||""}}var Bu;(t=>t.responseIdSelector=Bp(ha))(Bu||(Bu={}));var ju;(t=>t.responseIdSelector=Bp(ga))(ju||(ju={}));function Bp(e){return t=>e(t[B])}var zp={};Mm(zp,{escape:()=>Mo,getHighlightedSuggestion:()=>$u,highlightString:()=>qF});import{isNullOrUndefined as OF}from"@coveo/bueno";var ro=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function _p(e){return Array.isArray(e)}function Qi(e){return e.trim()===""}function $p(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 qF(e){if(Qi(e.openingDelimiter)||Qi(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if(OF(e.content)||Qi(e.content))return e.content;if(e.highlights.length===0)return Mo(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+=Mo(e.content.slice(o,i)),r+=e.openingDelimiter,r+=Mo(e.content.slice(i,c)),r+=e.closingDelimiter,o=c}return o!==t&&(r+=Mo(e.content.slice(o))),r}function $u(e,t){return e=Mo(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,o,n,a)=>o?_u(o,t.notMatchDelimiters):n?_u(n,t.exactMatchDelimiters):a?_u(a,t.correctionDelimiters):r)}function _u(e,t){return t?t.open+e+t.close:e}function Mo(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 of=Pt(Zp(),1);var nP="recommendation-internal-options",QD=Symbol.for(nP);var $=new Error("Failed to load reducers."),Qo=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var no=class extends Error{constructor(r,o){super();Be(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function ef(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function tf(e){return typeof e!="object"||!e?!1:Object.values(e).every(aP)}function aP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function rf(e){return e===429}var Lo=class e{static async call(t){let r=iP(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(rf(u.status))throw u;return u};try{let u=await(0,of.backOff)(c,{retry:s=>{let l=s&&rf(s.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new Qo;case 404:throw new no(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new no(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:c,...u}=t,s=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 Ee(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function tt(e,t="prod"){return`${Ee(e,t)}/rest/search/v2`}function Zu(e,t="prod"){return`${Ee(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function iP(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,c=e.method==="POST"||e.method==="PUT",u=cP(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...c&&{body:u},signal:i}}function cP(e,t){return t==="application/x-www-form-urlencoded"?tf(e)?ef(e):"":JSON.stringify(e)}function sP(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function uP(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function el(e,t){if(t&&e.name==="AbortError")return{error:uP(e)};if(e instanceof no)return{error:sP(e)};throw e}var Uo=(e,t)=>({...Fa(e,t),requestParams:lP(e)}),lP=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}},Fa=(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 nf=(e,t)=>({...Fa(e,t),requestParams:dP(e)}),dP=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 af=e=>({...Fa(e,"search/querySuggest"),requestParams:mP(e)}),mP=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 Te=e=>e.error!==void 0,Ui=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...Uo(t,"listing"),...this.options})}async search(t){let r=Uo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...nf(t,"recommendations"),...this.options})}async productSuggestions(t){let r=Uo(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=af(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=Uo(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=Uo(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await Lo.call(t);if(r instanceof Error)return el(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function tl(e,t="prod"){return`${Ee(e,t)}/rest/organizations/${e}/commerce/v2`}var Bi=e=>e;import{StringValue as hf}from"@coveo/bueno";import{Schema as pP,SchemaValidationError as fP,StringValue as Pa,RecordValue as gP,ArrayValue as yP}from"@coveo/bueno";var k=new Pa({required:!0,emptyAllowed:!1}),ne=new Pa({required:!1,emptyAllowed:!1}),me=new Pa({required:!0,emptyAllowed:!0}),cf=new Pa({required:!1,emptyAllowed:!0}),sf=new yP({each:k,required:!0}),uf=new Pa({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Qe=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),ye=(e,t)=>{if("required"in t)return{payload:new pP({value:t}).validate({value:e}).value};let n=new gP({options:{required:!0},values:t}).validate(e);if(n)throw new fP(n);return{payload:e}},F=(e,t)=>{try{return ye(e,t)}catch(r){return{payload:e,error:Qe(r)}}},$e=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return lf(e,t,r,n,"Controller initialization error")},Le=(e,t,r,o)=>{let n=`Check the options of ${o}`;return lf(e,t,r,n,"Controller initialization error")},lf=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};import{ArrayValue as hP,BooleanValue as mf,RecordValue as SP,StringValue as va,Value as CP}from"@coveo/bueno";var Bo="3.23.1-pre.a7bfaa6d0d",df=["@coveo/atomic","@coveo/quantic"];var rl=()=>ne,pf=()=>k,ao=g("configuration/updateBasicConfiguration",e=>F(e,{accessToken:ne,environment:new va({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ne})),ff=g("configuration/updateSearchConfiguration",e=>F(e,{proxyBaseUrl:new va({required:!1,url:!0}),pipeline:new va({required:!1,emptyAllowed:!0}),searchHub:ne,timezone:ne,locale:ne,authenticationProviders:new hP({required:!1,each:k})})),jo={enabled:new mf({default:!0}),originContext:rl(),originLevel2:rl(),originLevel3:rl(),proxyBaseUrl:new va({required:!1,url:!0}),runtimeEnvironment:new CP,anonymous:new mf({default:!1}),deviceId:ne,userDisplayName:ne,documentLocation:ne,trackingId:ne,analyticsMode:new va({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new SP({options:{required:!1},values:df.reduce((e,t)=>(e[t]=uf,e),{})})},ol=g("configuration/updateAnalyticsConfiguration",e=>F(e,jo)),ji=g("configuration/analytics/disable"),_i=g("configuration/analytics/enable"),gf=g("configuration/analytics/originlevel2",e=>F(e,{originLevel2:pf()})),yf=g("configuration/analytics/originlevel3",e=>F(e,{originLevel3:pf()}));var _o=g("commerce/configuration/updateBasicConfiguration",e=>F(e,{accessToken:ne,environment:new hf({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ne})),$o=g("commerce/configuration/updateProxyBaseUrl",e=>F(e,{proxyBaseUrl:new hf({required:!1,url:!0})})),zo=g("commerce/configuration/updateAnalyticsConfiguration",e=>F(e,{enabled:jo.enabled,proxyBaseUrl:jo.proxyBaseUrl,source:jo.source,trackingId:jo.trackingId})),$i=g("commerce/configuration/analytics/disable"),zi=g("commerce/configuration/analytics/enable");import{isNullOrUndefined as io}from"@coveo/bueno";var Sf=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var nl=j(Sf(),e=>e.addCase(_o,(t,r)=>{Cf(t,r.payload)}).addCase(ao,(t,r)=>{Cf(t,r.payload)}).addCase($o,(t,r)=>{xP(t,r.payload)}).addCase(zo,(t,r)=>{RP(t,r.payload)}).addCase($i,t=>{t.analytics.enabled=!1}).addCase(zi,t=>{t.analytics.enabled=!0}));function Cf(e,t){io(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",io(t.organizationId)||(e.organizationId=t.organizationId)}function xP(e,t){io(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function RP(e,t){io(t.enabled)||(e.analytics.enabled=t.enabled),io(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),io(t.source)||(e.analytics.source=t.source),io(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function Wo(e){return e.currency}var xf=(e,t)=>({currency:Wo(t.commerceContext),products:FP(t.cart),transaction:e}),Rf=(e,t)=>({currency:Wo(t.commerceContext),...e}),co=Q(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),FP=Q(co,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));import{ArrayValue as PP,NumberValue as Ff,RecordValue as vP,Schema as AP,StringValue as bP}from"@coveo/bueno";var al={productId:k,quantity:new Ff({required:!0,min:0}),name:new bP({required:!1}),price:new Ff({required:!1,min:0})},il=new PP({each:new vP({values:{...al}})}),cl={items:il},Pf=new AP(cl);var pr=g("commerce/cart/setItems",e=>F(e,il)),Ko=g("commerce/cart/updateItemQuantity",e=>F(e,al)),Go=g("commerce/cart/purchase"),Wi=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=xf(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),Ki=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=Rf(e,r()),{relay:n}=t;n.emit("ec.cartAction",o)});function W(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 vf(e,t){return e.cart[so(t)]}var Af=Q(co,e=>e.reduce((t,r)=>t+r.quantity,0)),bf=Q(co,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function wP(e,t={}){if(!IP(e))throw $;let{dispatch:r}=e,o=W(e),n=()=>e[B].cart,a={...t.initialState};$e(e,Pf,a,"buildCart"),a.items!==void 0&&r(pr(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),S=d?Math.abs(p-d.quantity):p;return{action:f,quantity:S,product:m}}return{...o,empty:function(){for(let l of co(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(Wi(l)),r(Go())},updateItemQuantity(l){let d=vf(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(Ki(s(l,d))),r(Ko(l)))},get state(){let l=n();return{items:co(l),totalQuantity:Af(l),totalPrice:bf(l)}}}}function so(e){return`${e.productId},${e.name},${e.price}`}function IP(e){return e.addReducers({cart:Ho}),!0}var Gi=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),wf=e=>Ef(e.cartItems,e.cart),If=e=>Ef(e.purchasedItems,e.purchased);function Ef(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 Ho=j(Gi(),e=>{e.addCase(pr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let c=so(i);return{cartItems:[...a.cartItems,c],cart:{...a.cart,[c]:i},purchasedItems:[],purchased:{}}},Gi());Tf(t,n,o)}).addCase(Ko,(t,{payload:r})=>{let o=so(r);if(!(o in t.cart)){EP(r,t);return}if(r.quantity<=0){TP(r,t);return}t.cart[o]=r}).addCase(Go,t=>{OP(t);let{cart:r,cartItems:o}=Gi();Tf(t,o,r)})});function Tf(e,t,r){e.cartItems=t,e.cart=r}function EP(e,t){if(e.quantity<=0)return;let r=so(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function TP(e,t){let r=so(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function OP(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 Of,RecordValue as qf,Schema as qP,StringValue as kP}from"@coveo/bueno";var VP=Intl.supportedValuesOf("currency"),DP=new kP({required:!0,emptyAllowed:!1,constrainTo:VP}),sl={url:k},ul={latitude:new Of({min:-90,max:90,required:!0}),longitude:new Of({min:-180,max:180,required:!0})},Aa={language:k,country:k,currency:DP,view:new qf({options:{required:!0},values:sl}),location:new qf({options:{required:!1},values:ul})},kf=new qP(Aa);var se=g("commerce/context/set",e=>F(e,Aa)),le=g("commerce/context/setView",e=>F(e,sl)),Yo=g("commerce/context/setLocation",e=>F(e,ul));var Vf=()=>({language:"",country:"",currency:"",view:{url:""}});var Et=j(Vf(),e=>{e.addCase(se,(t,{payload:r})=>r).addCase(le,(t,{payload:r})=>{t.view=r}).addCase(Yo,(t,{payload:r})=>{t.location=r})});var Hi=()=>({correctedQuery:"",corrections:[],originalQuery:""});import{BooleanValue as zP,RecordValue as WP,StringValue as Mf}from"@coveo/bueno";var rt=g("breadcrumb/deselectAll"),fr=g("breadcrumb/deselectAllNonBreadcrumbs");var gr=Q(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${Bo}`));var yr=(e,t)=>{let{view:r,location:o,...n}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??tl(e.configuration.organizationId,e.configuration.environment),organizationId:e.configuration.organizationId,trackingId:e.configuration.analytics.trackingId,...n,...e.configuration.analytics.enabled?{clientId:t.clientId}:{},context:{user:{...o,...t.userAgent?{userAgent:t.userAgent}:{}},view:{...r,...t.referrer?{referrer:t.referrer}:{}},capture:t.capture??e.configuration.analytics.enabled,cart:wf(e.cart),source:gr(e.configuration.analytics)}}};var Yi=(e,t,r)=>({...yr(e,t),...NP(e,r)}),NP=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};var ot=(e,t)=>({...Yi(e,t),facets:[...MP(e)],...e.commerceSort&&{sort:QP(e.commerceSort.appliedSort)}});function MP(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 QP(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}import{BooleanValue as ll,NumberValue as LP}from"@coveo/bueno";var uo=g("commerce/facets/core/updateNumberOfValues",e=>F(e,{facetId:k,numberOfValues:new LP({required:!0,min:1})})),lo=g("commerce/facets/core/updateIsFieldExpanded",e=>F(e,{facetId:k,isFieldExpanded:new ll({required:!0})})),pe=g("commerce/facets/core/clearAll"),Oe=g("commerce/facets/core/deselectAllValues",e=>F(e,{facetId:k})),mo=g("commerce/facets/core/updateFreezeCurrentValues",e=>F(e,{facetId:k,freezeCurrentValues:new ll({required:!0})})),Jo=g("commerce/facets/core/updateAutoSelectionForAll",e=>F(e,{allow:new ll({required:!0})}));import{NumberValue as Df}from"@coveo/bueno";var Ji={slotId:cf},UP={...Ji,pageSize:new Df({required:!0,min:0})},Jt=g("commerce/pagination/setPageSize",e=>F(e,UP)),BP={...Ji,page:new Df({required:!0,min:0})},Tt=g("commerce/pagination/selectPage",e=>F(e,BP)),hr=g("commerce/pagination/nextPage",e=>F(e,Ji)),Sr=g("commerce/pagination/previousPage",e=>F(e,Ji)),Xo=g("commerce/pagination/registerRecommendationsSlot",e=>F(e,{slotId:k}));import{StringValue as jP}from"@coveo/bueno";var fe=g("commerce/query/update",e=>F(e,{query:new jP}));import{isNullOrUndefined as Nf}from"@coveo/bueno";import{RecordValue as _P,StringValue as $P}from"@coveo/bueno";var Cr=g("commerce/triggers/query/updateIgnore",e=>F(e,{q:new $P({emptyAllowed:!0,required:!0})})),Zo=g("commerce/triggers/query/applyModification",e=>F(e,new _P({values:{originalQuery:ne,modification:ne}})));var ba=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 Te(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(!(!Nf(n)&&!Nf(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:c}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:Qp(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(Cr({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(o);return Te(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({...ot(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 Te(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(fe({query:t}))}};var H=_("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=ot(o,n),i=Mi(o),c=new ba(t),u=await c.fetchFromAPI({...a,query:i});return c.process(u)}),xr=_("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!Dp(o))return null;let i=ur(o),u=Sa(o)/i,s=Mi(o),l=ot(o,n),d=new ba(t),p=await d.fetchFromAPI({...l,query:s,page:u});return d.process(p)}),en=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;F(e,{query:new Mf,clearFilters:new zP}),e.clearFilters&&(r(pe()),r(fr())),r(Jo({allow:!0})),r(fe({query:e.query})),r(Tt({page:0}))}),tn=_("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({...yr(n,i),query:c});return Te(u)?r(u.error):{response:{...u.success,products:u.success.products}}}),KP={child:new WP({options:{required:!0},values:{permanentid:new Mf({required:!0})}})},rn=g("commerce/search/promoteChildToParent",e=>F(e,KP));function Qf(){return{wasCorrectedTo:"",queryCorrection:Hi(),originalQuery:""}}var Xi=j(Qf(),e=>{e.addCase(H.pending,t=>{t.queryCorrection=Hi(),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 Bf,BooleanValue as Lf,ArrayValue as ec,StringValue as Zi,NumberValue as Uf,RecordValue as ev}from"@coveo/bueno";var Y=k;import{Value as GP,NumberValue as HP,StringValue as YP,ArrayValue as JP,BooleanValue as XP}from"@coveo/bueno";var ZP={state:new GP({required:!0}),numberOfResults:new HP({required:!0,min:0}),value:new YP({required:!0,emptyAllowed:!0}),path:new JP({required:!0,each:k}),moreValuesAvailable:new XP({required:!1})};function wa(e){e.children.forEach(t=>{wa(t)}),ye({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},ZP)}var on={facetId:Y,field:k,tabs:new ev({options:{required:!1},values:{included:new ec({each:new Zi}),excluded:new ec({each:new Zi})}}),activeTab:new Zi({required:!1}),delimitingCharacter:new Zi({required:!1,emptyAllowed:!0}),filterFacetCount:new Lf({required:!1}),injectionDepth:new Uf({required:!1,min:0}),numberOfValues:new Uf({required:!1,min:1}),sortCriteria:new Bf({required:!1}),basePath:new ec({required:!1,each:k}),filterByBasePath:new Lf({required:!1})},nn=5,jf=g("categoryFacet/register",e=>F(e,on)),_f=g("categoryFacet/toggleSelectValue",e=>{try{return ye(e.facetId,k),wa(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:Qe(t)}}}),$f=g("categoryFacet/deselectAll",e=>F(e,on.facetId)),pQ=g("categoryFacet/updateNumberOfValues",e=>F(e,{facetId:on.facetId,numberOfValues:on.numberOfValues})),fQ=g("categoryFacet/updateSortCriterion",e=>F(e,{facetId:on.facetId,criterion:new Bf})),gQ=g("categoryFacet/updateBasePath",e=>F(e,{facetId:on.facetId,basePath:new ec({each:k})}));import{NumberValue as nv,RecordValue as av,ArrayValue as iv}from"@coveo/bueno";import{RecordValue as tv,NumberValue as rv,StringValue as ov}from"@coveo/bueno";var Ia={facetId:Y,captions:new tv({options:{required:!1}}),numberOfValues:new rv({required:!1,min:1}),query:new ov({required:!1,emptyAllowed:!0})};var cv={path:new iv({required:!0,each:k}),displayValue:me,rawValue:me,count:new nv({required:!0,min:0})},nt=g("categoryFacet/selectSearchResult",e=>F(e,{facetId:Y,value:new av({values:cv})})),tc=g("categoryFacetSearch/register",e=>F(e,Ia));import{RecordValue as sv,NumberValue as uv}from"@coveo/bueno";var zf={facetId:Y,value:new sv({values:{displayValue:me,rawValue:me,count:new uv({required:!0,min:0})}})},rc=g("facetSearch/register",e=>F(e,Ia)),Rr=g("facetSearch/update",e=>F(e,Ia)),Je=g("facetSearch/toggleSelectValue",e=>F(e,zf)),St=g("facetSearch/toggleExcludeValue",e=>F(e,zf));import{BooleanValue as lv}from"@coveo/bueno";var Xt=g("facetOptions/update",(e={freezeFacetOrder:!0})=>F(e,{freezeFacetOrder:new lv({required:!1})})),dl=g("facetOptions/facet/enable",e=>F(e,Y)),Zt=g("facetOptions/facet/disable",e=>F(e,Y));var dv=g("history/undo"),mv=g("history/redo"),Ot=g("history/snapshot"),QQ=_("history/back",async(e,{dispatch:t})=>{t(dv()),await t(Ce())}),LQ=_("history/forward",async(e,{dispatch:t})=>{t(mv()),await t(Ce())}),Ce=_("history/change",async(e,{getState:t})=>t().history.present);import{BooleanValue as Wf,StringValue as Ea,NumberValue as Kf,RecordValue as Fr}from"@coveo/bueno";var oc={q:new Ea,enableQuerySyntax:new Wf,aq:new Ea,cq:new Ea,firstResult:new Kf({min:0}),numberOfResults:new Kf({min:0}),sortCriteria:new Ea,f:new Fr,fExcluded:new Fr,cf:new Fr,nf:new Fr,mnf:new Fr,df:new Fr,debug:new Wf,sf:new Fr,tab:new Ea,af:new Fr};var Ae=g("searchParameters/restore",e=>F(e,oc)),pv=g("searchParameters/restoreTab",e=>F(e,k));import{BooleanValue as vy,NumberValue as Ay,StringValue as Rw}from"@coveo/bueno";function er(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 w(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 ee;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ee||(ee={}));function fl(){return typeof window<"u"}function wl(){return typeof navigator<"u"}function an(){return typeof document<"u"}function gl(){try{return typeof localStorage<"u"}catch{return!1}}function fv(){try{return typeof sessionStorage<"u"}catch{return!1}}function cg(){return wl()&&navigator.cookieEnabled}var gv=[ee.click,ee.custom,ee.search,ee.view],yv=(e,t)=>gv.indexOf(e)!==-1?Object.assign({language:an()?document.documentElement.lang:"unknown",userAgent:wl()?navigator.userAgent:"unknown"},t):t,qa=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?Gf(t,r,a):(i=c.split("."),n=i[i.length-2]+"."+i[i.length-1],Gf(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 Gf(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function hv(){return gl()?localStorage:cg()?new ka:fv()?sessionStorage:new sn}var ka=class e{getItem(t){return qa.get(`${e.prefix}${t}`)}removeItem(t){qa.erase(`${e.prefix}${t}`)}setItem(t,r,o){qa.set(`${e.prefix}${t}`,r,o)}};ka.prefix="coveo_";var yl=class{constructor(){this.cookieStorage=new ka}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)}},sn=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Ta="__coveo.analytics.history",sg=20,ug=1e3*60,lg=75,un=class{constructor(t){this.store=t||hv()}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 w(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 w(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Ta);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return w(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Ta);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Ta,JSON.stringify(t.slice(0,sg)))}catch{}}clear(){try{this.store.removeItem(Ta)}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,lg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>ug:!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))}},dg=Object.freeze({__proto__:null,HistoryStore:un,MAX_NUMBER_OF_HISTORY_ELEMENTS:sg,MAX_VALUE_SIZE:lg,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:ug,STORE_KEY:Ta,default:un}),Sv=(e,t)=>w(void 0,void 0,void 0,function*(){return e===ee.view?(yield Cv(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),Cv=e=>w(void 0,void 0,void 0,function*(){let t=new un,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),nc,xv=new Uint8Array(16);function Rv(){if(!nc&&(nc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!nc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return nc(xv)}var Fv=/^(?:[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 ic(e){return typeof e=="string"&&Fv.test(e)}var be=[];for(let e=0;e<256;++e)be.push((e+256).toString(16).slice(1));function mg(e,t=0){return(be[e[t+0]]+be[e[t+1]]+be[e[t+2]]+be[e[t+3]]+"-"+be[e[t+4]]+be[e[t+5]]+"-"+be[e[t+6]]+be[e[t+7]]+"-"+be[e[t+8]]+be[e[t+9]]+"-"+be[e[t+10]]+be[e[t+11]]+be[e[t+12]]+be[e[t+13]]+be[e[t+14]]+be[e[t+15]]).toLowerCase()}function Pv(e){if(!ic(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 vv(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Av="6ba7b810-9dad-11d1-80b4-00c04fd430c8",bv="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function wv(e,t,r){function o(n,a,i,c){var u;if(typeof n=="string"&&(n=vv(n)),typeof a=="string"&&(a=Pv(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 mg(s)}try{o.name=e}catch{}return o.DNS=Av,o.URL=bv,o}var Iv=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Hf={randomUUID:Iv};function po(e,t,r){if(Hf.randomUUID&&!t&&!e)return Hf.randomUUID();e=e||{};let o=e.random||(e.rng||Rv)();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 mg(o)}function Ev(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 ml(e,t){return e<<t|e>>>32-t}function Tv(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]=ml(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),S=ml(u,5)+Ev(f,s,l,d)+p+t[f]+c[m]>>>0;p=d,d=l,l=ml(s,30)>>>0,s=u,u=S}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 Ov=wv("v5",80,Tv),Yf=Ov,pg="2.30.45",Jf=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,Oa={pageview:"pageview",event:"event"},cc=class{constructor({client:t,uuidGenerator:r=po}){this.client=t,this.uuidGenerator=r}},hl=class extends cc{constructor({client:t,uuidGenerator:r=po}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Jf(window.location),this.lastReferrer=an()?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:an()?document.title:"",encoding:an()?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===Oa.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===Oa.pageview?this.nextPageViewId:this.pageViewId,referrer:t===Oa.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===Oa.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 Jf(window.location)}},Pr=class e{constructor(t,r){if(!ic(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 ic(a)?new e(a,Number.parseInt(n)*1e3):null}};Pr.cvo_cid="cvo_cid";Pr.expirationTime=120;var Sl=class extends cc{constructor({client:t,uuidGenerator:r=po}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return w(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(Pr.cvo_cid,new Pr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Sl.Id="link";var it=Object.keys;function ac(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var pl=128,fg=192,Xf=224,Zf=240;function qv(e){return(e&248)===Zf?4:(e&Zf)===Xf?3:(e&Xf)===fg?2:1}function kv(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&pl)!=pl)break;if(r-=3,(o&fg)!=pl){t-r>=qv(o)*3&&(r=t);break}}return e.substring(0,r)}var Cl={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"},Vv=it(Cl).map(e=>Cl[e]),Dv=[...Vv].join("|"),Nv=new RegExp(`^(${Dv}$)`),Mv={svcAction:"svc_action",svcActionData:"svc_action_data"},Qv=e=>it(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=Cl[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),Lv=e=>Nv.test(e),Uv=[Lv],eg={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},tg={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},qe={action:"pa",list:"pal",listSource:"pls"},sc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},Bv=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],xl={id:"quoteId",affiliation:"quoteAffiliation"},Rl={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},jv={add:qe,bookmark_add:qe,bookmark_remove:qe,click:qe,checkout:qe,checkout_option:qe,detail:qe,impression:qe,remove:qe,refund:Object.assign(Object.assign({},qe),sc),purchase:Object.assign(Object.assign({},qe),sc),quickview:qe,quote:Object.assign(Object.assign({},qe),xl),review:Object.assign(Object.assign({},qe),Rl)},_v=it(eg).map(e=>eg[e]),$v=it(tg).map(e=>tg[e]),zv=it(qe).map(e=>qe[e]),Wv=it(sc).map(e=>sc[e]),Kv=it(Rl).map(e=>Rl[e]),Gv=it(xl).map(e=>xl[e]),Hv=[..._v,"custom"].join("|"),Yv=[...$v,"custom"].join("|"),gg="(pr[0-9]+)",yg="(il[0-9]+pi[0-9]+)",Jv=new RegExp(`^${gg}(${Hv})$`),Xv=new RegExp(`^(${yg}(${Yv}))|(il[0-9]+nm)$`),Zv=new RegExp(`^(${zv.join("|")})$`),eA=new RegExp(`^(${Wv.join("|")})$`),tA=new RegExp(`^${gg}custom$`),rA=new RegExp(`^${yg}custom$`),oA=new RegExp(`^(${[...Bv,...Kv,...Gv].join("|")})$`),nA=e=>Jv.test(e),aA=e=>Xv.test(e),iA=e=>Zv.test(e),cA=e=>eA.test(e),sA=e=>oA.test(e),uA=[aA,nA,iA,cA,sA],lA=[tA,rA],dA={anonymizeIp:"aip"},mA={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},pA={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},fA=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],gA=Object.assign(Object.assign(Object.assign(Object.assign({},dA),mA),pA),fA.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Fl=Object.assign(Object.assign({},gA),Mv),yA=e=>{let t=!!e.action&&jv[e.action]||{};return it(e).reduce((r,o)=>{let n=t[o]||Fl[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},hA=it(Fl).map(e=>Fl[e]),SA=e=>hA.indexOf(e)!==-1,CA=e=>e==="custom",xA=e=>[...uA,...Uv,SA,CA].some(t=>t(e)),RA=e=>it(e).reduce((t,r)=>{let o=FA(r);return o?Object.assign(Object.assign({},t),PA(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),FA=e=>{let t;return[...lA].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},PA=(e,t)=>it(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),Pl=class{constructor(t){this.opts=t}sendEvent(t,r){return w(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 w(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 w(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[ee.click,ee.custom,ee.search,ee.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}},vl=class{sendEvent(t,r){return w(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return w(this,void 0,void 0,function*(){return Promise.resolve()})}},rg=globalThis.fetch,uc=class{constructor(t){this.opts=t}sendEvent(t,r){return w(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=er(u,["url"]),d;try{d=yield rg(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 w(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield rg(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ee.click,ee.custom,ee.search,ee.view].indexOf(t)!==-1}getVisitorIdParam(){return w(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},Al=class{constructor(t,r){gl()&&cg()?this.storage=new yl:gl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new sn),this.client=new uc(t),this.beaconClient=new Pl(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}},bl=class{constructor(t,r){this.storage=r||new sn,this.client=new uc(t)}getClientDependingOnEventType(t){return this.client}},lc=class{constructor(){this.storage=new sn,this.client=new vl}getClientDependingOnEventType(t){return this.client}},vA="xx",AA=e=>e?.startsWith(vA)||!1,bA=`
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