@coveo/headless 3.16.1-pre.2f5ed054e8 → 3.16.1-pre.3f4a309ff4

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 (34) 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/case-assist/headless.js +1 -1
  24. package/dist/quantic/commerce/headless.js +1 -1
  25. package/dist/quantic/headless.js +1 -1
  26. package/dist/quantic/insight/headless.js +1 -1
  27. package/dist/quantic/recommendation/headless.js +1 -1
  28. package/dist/recommendation/headless.cjs +1 -1
  29. package/dist/recommendation/headless.esm.js +1 -1
  30. package/dist/ssr/headless.cjs +1 -1
  31. package/dist/ssr/headless.esm.js +1 -1
  32. package/dist/ssr-commerce/headless.cjs +1 -1
  33. package/dist/ssr-commerce/headless.esm.js +1 -1
  34. package/package.json +1 -1
@@ -16,7 +16,7 @@
16
16
  * limitations under the License.
17
17
  */(function(g,f){if(typeof exports=="object"&&typeof module<"u"){module.exports=f(require)}else if("function"==typeof define && define.amd){define("CoveoHeadlessCommerce",["crypto","@coveo/bueno"],function(_d_0,_d_1){var d={"crypto": _d_0,"@coveo/bueno": _d_1},r=function(m){if(m in d) return d[m];if(typeof require=="function") return require(m);throw new Error("Cannot find module '"+m+"'")};return f(r)})}else {var gN={"crypto":"crypto","@coveo/bueno":"@coveo/bueno"},gReq=function(r){var mod = r in gN ? g[gN[r]] : g[r]; return mod };g["CoveoHeadlessCommerce"]=f(gReq)}}(typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : this,function(require){var exports={};var __exports=exports;var module={exports};
18
18
  "use strict";var wR=Object.create;var Ia=Object.defineProperty;var IR=Object.getOwnPropertyDescriptor;var ER=Object.getOwnPropertyNames;var TR=Object.getPrototypeOf,OR=Object.prototype.hasOwnProperty;var qR=(e,t,r)=>t in e?Ia(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ae=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Zu=(e,t)=>{for(var r in t)Ia(e,r,{get:t[r],enumerable:!0})},Km=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ER(t))!OR.call(e,n)&&n!==r&&Ia(e,n,{get:()=>t[n],enumerable:!(o=IR(t,n))||o.enumerable});return e};var Lt=(e,t,r)=>(r=e!=null?wR(TR(e)):{},Km(t||!e||!e.__esModule?Ia(r,"default",{value:e,enumerable:!0}):r,e)),kR=e=>Km(Ia({},"__esModule",{value:!0}),e);var Oe=(e,t,r)=>qR(e,typeof t!="symbol"?t+"":t,r);var Yp=Ae(za=>{"use strict";var cc=za&&za.__assign||function(){return cc=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},cc.apply(this,arguments)};Object.defineProperty(za,"__esModule",{value:!0});var DF={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function NF(e){var t=cc(cc({},DF),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}za.getSanitizedOptions=NF});var Jp=Ae(bl=>{"use strict";Object.defineProperty(bl,"__esModule",{value:!0});function MF(e){var t=Math.random()*e;return Math.round(t)}bl.fullJitter=MF});var Xp=Ae(wl=>{"use strict";Object.defineProperty(wl,"__esModule",{value:!0});function LF(e){return e}wl.noJitter=LF});var Zp=Ae(Il=>{"use strict";Object.defineProperty(Il,"__esModule",{value:!0});var QF=Jp(),UF=Xp();function BF(e){switch(e.jitter){case"full":return QF.fullJitter;case"none":default:return UF.noJitter}}Il.JitterFactory=BF});var Tl=Ae(El=>{"use strict";Object.defineProperty(El,"__esModule",{value:!0});var jF=Zp(),_F=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=jF.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}();El.Delay=_F});var ef=Ae(gr=>{"use strict";var $F=gr&&gr.__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)}}(),zF=gr&&gr.__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())})},WF=gr&&gr.__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(gr,"__esModule",{value:!0});var KF=Tl(),HF=function(e){$F(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return zF(this,void 0,void 0,function(){return WF(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}(KF.Delay);gr.SkipFirstDelay=HF});var tf=Ae(Wa=>{"use strict";var GF=Wa&&Wa.__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(Wa,"__esModule",{value:!0});var YF=Tl(),JF=function(e){GF(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(YF.Delay);Wa.AlwaysDelay=JF});var rf=Ae(Ol=>{"use strict";Object.defineProperty(Ol,"__esModule",{value:!0});var XF=ef(),ZF=tf();function eP(e,t){var r=tP(e);return r.setAttemptNumber(t),r}Ol.DelayFactory=eP;function tP(e){return e.delayFirstAttempt?new ZF.AlwaysDelay(e):new XF.SkipFirstDelay(e)}});var of=Ae(Io=>{"use strict";var ql=Io&&Io.__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())})},kl=Io&&Io.__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(Io,"__esModule",{value:!0});var rP=Yp(),oP=rf();function nP(e,t){return t===void 0&&(t={}),ql(this,void 0,void 0,function(){var r,o;return kl(this,function(n){switch(n.label){case 0:return r=rP.getSanitizedOptions(t),o=new aP(e,r),[4,o.execute()];case 1:return[2,n.sent()]}})})}Io.backOff=nP;var aP=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return ql(this,void 0,void 0,function(){var t,r;return kl(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 ql(this,void 0,void 0,function(){var t;return kl(this,function(r){switch(r.label){case 0:return t=oP.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var Hc=Ae((xd,Rd)=>{"use strict";(function(e,t){typeof xd=="object"&&typeof Rd<"u"?Rd.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(xd,function(){"use strict";var e=1e3,t=6e4,r=36e5,o="millisecond",n="second",a="minute",i="hour",c="day",u="week",s="month",l="quarter",d="year",p="date",m="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,S={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(V){var k=["th","st","nd","rd"],I=V%100;return"["+V+(k[(I-20)%10]||k[I]||k[0])+"]"}},x=function(V,k,I){var M=String(V);return!M||M.length>=k?V:""+Array(k+1-M.length).join(I)+V},y={s:x,z:function(V){var k=-V.utcOffset(),I=Math.abs(k),M=Math.floor(I/60),D=I%60;return(k<=0?"+":"-")+x(M,2,"0")+":"+x(D,2,"0")},m:function V(k,I){if(k.date()<I.date())return-V(I,k);var M=12*(I.year()-k.year())+(I.month()-k.month()),D=k.clone().add(M,s),j=I-D<0,U=k.clone().add(M+(j?-1:1),s);return+(-(M+(I-D)/(j?D-U:U-D))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:s,y:d,w:u,d:c,D:p,h:i,m:a,s:n,ms:o,Q:l}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},C="en",P={};P[C]=S;var O="$isDayjsObject",A=function(V){return V instanceof q||!(!V||!V[O])},F=function V(k,I,M){var D;if(!k)return C;if(typeof k=="string"){var j=k.toLowerCase();P[j]&&(D=j),I&&(P[j]=I,D=j);var U=k.split("-");if(!D&&U.length>1)return V(U[0])}else{var W=k.name;P[W]=k,D=W}return!M&&D&&(C=D),D||!M&&C},E=function(V,k){if(A(V))return V.clone();var I=typeof k=="object"?k:{};return I.date=V,I.args=arguments,new q(I)},w=y;w.l=F,w.i=A,w.w=function(V,k){return E(V,{locale:k.$L,utc:k.$u,x:k.$x,$offset:k.$offset})};var q=function(){function V(I){this.$L=F(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[O]=!0}var k=V.prototype;return k.parse=function(I){this.$d=function(M){var D=M.date,j=M.utc;if(D===null)return new Date(NaN);if(w.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var U=D.match(f);if(U){var W=U[2]-1||0,Y=(U[7]||"0").substring(0,3);return j?new Date(Date.UTC(U[1],W,U[3]||1,U[4]||0,U[5]||0,U[6]||0,Y)):new Date(U[1],W,U[3]||1,U[4]||0,U[5]||0,U[6]||0,Y)}}return new Date(D)}(I),this.init()},k.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},k.$utils=function(){return w},k.isValid=function(){return this.$d.toString()!==m},k.isSame=function(I,M){var D=E(I);return this.startOf(M)<=D&&D<=this.endOf(M)},k.isAfter=function(I,M){return E(I)<this.startOf(M)},k.isBefore=function(I,M){return this.endOf(M)<E(I)},k.$g=function(I,M,D){return w.u(I)?this[M]:this.set(D,I)},k.unix=function(){return Math.floor(this.valueOf()/1e3)},k.valueOf=function(){return this.$d.getTime()},k.startOf=function(I,M){var D=this,j=!!w.u(M)||M,U=w.p(I),W=function(Mt,Pe){var mt=w.w(D.$u?Date.UTC(D.$y,Pe,Mt):new Date(D.$y,Pe,Mt),D);return j?mt:mt.endOf(c)},Y=function(Mt,Pe){return w.w(D.toDate()[Mt].apply(D.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(Pe)),D)},J=this.$W,X=this.$M,Z=this.$D,ce="set"+(this.$u?"UTC":"");switch(U){case d:return j?W(1,0):W(31,11);case s:return j?W(1,X):W(0,X+1);case u:var Fe=this.$locale().weekStart||0,Co=(J<Fe?J+7:J)-Fe;return W(j?Z-Co:Z+(6-Co),X);case c:case p:return Y(ce+"Hours",0);case i:return Y(ce+"Minutes",1);case a:return Y(ce+"Seconds",2);case n:return Y(ce+"Milliseconds",3);default:return this.clone()}},k.endOf=function(I){return this.startOf(I,!1)},k.$set=function(I,M){var D,j=w.p(I),U="set"+(this.$u?"UTC":""),W=(D={},D[c]=U+"Date",D[p]=U+"Date",D[s]=U+"Month",D[d]=U+"FullYear",D[i]=U+"Hours",D[a]=U+"Minutes",D[n]=U+"Seconds",D[o]=U+"Milliseconds",D)[j],Y=j===c?this.$D+(M-this.$W):M;if(j===s||j===d){var J=this.clone().set(p,1);J.$d[W](Y),J.init(),this.$d=J.set(p,Math.min(this.$D,J.daysInMonth())).$d}else W&&this.$d[W](Y);return this.init(),this},k.set=function(I,M){return this.clone().$set(I,M)},k.get=function(I){return this[w.p(I)]()},k.add=function(I,M){var D,j=this;I=Number(I);var U=w.p(M),W=function(X){var Z=E(j);return w.w(Z.date(Z.date()+Math.round(X*I)),j)};if(U===s)return this.set(s,this.$M+I);if(U===d)return this.set(d,this.$y+I);if(U===c)return W(1);if(U===u)return W(7);var Y=(D={},D[a]=t,D[i]=r,D[n]=e,D)[U]||1,J=this.$d.getTime()+I*Y;return w.w(J,this)},k.subtract=function(I,M){return this.add(-1*I,M)},k.format=function(I){var M=this,D=this.$locale();if(!this.isValid())return D.invalidDate||m;var j=I||"YYYY-MM-DDTHH:mm:ssZ",U=w.z(this),W=this.$H,Y=this.$m,J=this.$M,X=D.weekdays,Z=D.months,ce=D.meridiem,Fe=function(Pe,mt,mr,Tr){return Pe&&(Pe[mt]||Pe(M,j))||mr[mt].slice(0,Tr)},Co=function(Pe){return w.s(W%12||12,Pe,"0")},Mt=ce||function(Pe,mt,mr){var Tr=Pe<12?"AM":"PM";return mr?Tr.toLowerCase():Tr};return j.replace(g,function(Pe,mt){return mt||function(mr){switch(mr){case"YY":return String(M.$y).slice(-2);case"YYYY":return w.s(M.$y,4,"0");case"M":return J+1;case"MM":return w.s(J+1,2,"0");case"MMM":return Fe(D.monthsShort,J,Z,3);case"MMMM":return Fe(Z,J);case"D":return M.$D;case"DD":return w.s(M.$D,2,"0");case"d":return String(M.$W);case"dd":return Fe(D.weekdaysMin,M.$W,X,2);case"ddd":return Fe(D.weekdaysShort,M.$W,X,3);case"dddd":return X[M.$W];case"H":return String(W);case"HH":return w.s(W,2,"0");case"h":return Co(1);case"hh":return Co(2);case"a":return Mt(W,Y,!0);case"A":return Mt(W,Y,!1);case"m":return String(Y);case"mm":return w.s(Y,2,"0");case"s":return String(M.$s);case"ss":return w.s(M.$s,2,"0");case"SSS":return w.s(M.$ms,3,"0");case"Z":return U}return null}(Pe)||U.replace(":","")})},k.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},k.diff=function(I,M,D){var j,U=this,W=w.p(M),Y=E(I),J=(Y.utcOffset()-this.utcOffset())*t,X=this-Y,Z=function(){return w.m(U,Y)};switch(W){case d:j=Z()/12;break;case s:j=Z();break;case l:j=Z()/3;break;case u:j=(X-J)/6048e5;break;case c:j=(X-J)/864e5;break;case i:j=X/r;break;case a:j=X/t;break;case n:j=X/e;break;default:j=X}return D?j:w.a(j)},k.daysInMonth=function(){return this.endOf(s).$D},k.$locale=function(){return P[this.$L]},k.locale=function(I,M){if(!I)return this.$L;var D=this.clone(),j=F(I,M,!0);return j&&(D.$L=j),D},k.clone=function(){return w.w(this.$d,this)},k.toDate=function(){return new Date(this.valueOf())},k.toJSON=function(){return this.isValid()?this.toISOString():null},k.toISOString=function(){return this.$d.toISOString()},k.toString=function(){return this.$d.toUTCString()},V}(),L=q.prototype;return E.prototype=L,[["$ms",o],["$s",n],["$m",a],["$H",i],["$W",c],["$M",s],["$y",d],["$D",p]].forEach(function(V){L[V[1]]=function(k){return this.$g(k,V[0],V[1])}}),E.extend=function(V,k){return V.$i||(V(k,q,E),V.$i=!0),E},E.locale=F,E.isDayjs=A,E.unix=function(V){return E(1e3*V)},E.en=P[C],E.Ls=P,E.p={},E})});var $g=Ae((Fd,Pd)=>{"use strict";(function(e,t){typeof Fd=="object"&&typeof Pd<"u"?Pd.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_quarterOfYear=t()})(Fd,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 zg=Ae((Ad,vd)=>{"use strict";(function(e,t){typeof Ad=="object"&&typeof vd<"u"?vd.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=t()})(Ad,function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,o=/\d\d/,n=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,i={},c=function(f){return(f=+f)+(f>68?1900:2e3)},u=function(f){return function(g){this[f]=+g}},s=[/[+-]\d\d:?(\d\d)?|Z/,function(f){(this.zone||(this.zone={})).offset=function(g){if(!g||g==="Z")return 0;var S=g.match(/([+-]|\d\d)/g),x=60*S[1]+(+S[2]||0);return x===0?0:S[0]==="+"?-x:x}(f)}],l=function(f){var g=i[f];return g&&(g.indexOf?g:g.s.concat(g.f))},d=function(f,g){var S,x=i.meridiem;if(x){for(var y=1;y<=24;y+=1)if(f.indexOf(x(y,0,g))>-1){S=y>12;break}}else S=f===(g?"pm":"PM");return S},p={A:[a,function(f){this.afternoon=d(f,!1)}],a:[a,function(f){this.afternoon=d(f,!0)}],Q:[r,function(f){this.month=3*(f-1)+1}],S:[r,function(f){this.milliseconds=100*+f}],SS:[o,function(f){this.milliseconds=10*+f}],SSS:[/\d{3}/,function(f){this.milliseconds=+f}],s:[n,u("seconds")],ss:[n,u("seconds")],m:[n,u("minutes")],mm:[n,u("minutes")],H:[n,u("hours")],h:[n,u("hours")],HH:[n,u("hours")],hh:[n,u("hours")],D:[n,u("day")],DD:[o,u("day")],Do:[a,function(f){var g=i.ordinal,S=f.match(/\d+/);if(this.day=S[0],g)for(var x=1;x<=31;x+=1)g(x).replace(/\[|\]/g,"")===f&&(this.day=x)}],w:[n,u("week")],ww:[o,u("week")],M:[n,u("month")],MM:[o,u("month")],MMM:[a,function(f){var g=l("months"),S=(l("monthsShort")||g.map(function(x){return x.slice(0,3)})).indexOf(f)+1;if(S<1)throw new Error;this.month=S%12||S}],MMMM:[a,function(f){var g=l("months").indexOf(f)+1;if(g<1)throw new Error;this.month=g%12||g}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(f){this.year=c(f)}],YYYY:[/\d{4}/,u("year")],Z:s,ZZ:s};function m(f){var g,S;g=f,S=i&&i.formats;for(var x=(f=g.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(E,w,q){var L=q&&q.toUpperCase();return w||S[q]||e[q]||S[L].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(V,k,I){return k||I.slice(1)})})).match(t),y=x.length,C=0;C<y;C+=1){var P=x[C],O=p[P],A=O&&O[0],F=O&&O[1];x[C]=F?{regex:A,parser:F}:P.replace(/^\[|\]$/g,"")}return function(E){for(var w={},q=0,L=0;q<y;q+=1){var V=x[q];if(typeof V=="string")L+=V.length;else{var k=V.regex,I=V.parser,M=E.slice(L),D=k.exec(M)[0];I.call(w,D),E=E.replace(D,"")}}return function(j){var U=j.afternoon;if(U!==void 0){var W=j.hours;U?W<12&&(j.hours+=12):W===12&&(j.hours=0),delete j.afternoon}}(w),w}}return function(f,g,S){S.p.customParseFormat=!0,f&&f.parseTwoDigitYear&&(c=f.parseTwoDigitYear);var x=g.prototype,y=x.parse;x.parse=function(C){var P=C.date,O=C.utc,A=C.args;this.$u=O;var F=A[1];if(typeof F=="string"){var E=A[2]===!0,w=A[3]===!0,q=E||w,L=A[2];w&&(L=A[2]),i=this.$locale(),!E&&L&&(i=S.Ls[L]),this.$d=function(M,D,j,U){try{if(["x","X"].indexOf(D)>-1)return new Date((D==="X"?1e3:1)*M);var W=m(D)(M),Y=W.year,J=W.month,X=W.day,Z=W.hours,ce=W.minutes,Fe=W.seconds,Co=W.milliseconds,Mt=W.zone,Pe=W.week,mt=new Date,mr=X||(Y||J?1:mt.getDate()),Tr=Y||mt.getFullYear(),Qi=0;Y&&!J||(Qi=J>0?J-1:mt.getMonth());var Ui,Gu=Z||0,Yu=ce||0,Ju=Fe||0,Xu=Co||0;return Mt?new Date(Date.UTC(Tr,Qi,mr,Gu,Yu,Ju,Xu+60*Mt.offset*1e3)):j?new Date(Date.UTC(Tr,Qi,mr,Gu,Yu,Ju,Xu)):(Ui=new Date(Tr,Qi,mr,Gu,Yu,Ju,Xu),Pe&&(Ui=U(Ui).week(Pe).toDate()),Ui)}catch{return new Date("")}}(P,F,O,S),this.init(),L&&L!==!0&&(this.$L=this.locale(L).$L),q&&P!=this.format(F)&&(this.$d=new Date("")),i={}}else if(F instanceof Array)for(var V=F.length,k=1;k<=V;k+=1){A[1]=F[k-1];var I=S.apply(this,A);if(I.isValid()){this.$d=I.$d,this.$L=I.$L,this.init();break}k===V&&(this.$d=new Date(""))}else y.call(this,C)}}})});var LS=Ae((uG,MS)=>{"use strict";var dI=/(^|; )Coveo-Pendragon=([^;]*)/;MS.exports=()=>dI.exec(document.cookie)?.pop()||null});var US=Ae((mm,pm)=>{"use strict";(function(e,t){typeof mm=="object"&&typeof pm<"u"?pm.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(mm,function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,o,n){var a,i=function(l,d,p){p===void 0&&(p={});var m=new Date(l),f=function(g,S){S===void 0&&(S={});var x=S.timeZoneName||"short",y=g+"|"+x,C=t[y];return C||(C=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:g,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:x}),t[y]=C),C}(d,p);return f.formatToParts(m)},c=function(l,d){for(var p=i(l,d),m=[],f=0;f<p.length;f+=1){var g=p[f],S=g.type,x=g.value,y=e[S];y>=0&&(m[y]=parseInt(x,10))}var C=m[3],P=C===24?0:C,O=m[0]+"-"+m[1]+"-"+m[2]+" "+P+":"+m[4]+":"+m[5]+":000",A=+l;return(n.utc(O).valueOf()-(A-=A%1e3))/6e4},u=o.prototype;u.tz=function(l,d){l===void 0&&(l=a);var p,m=this.utcOffset(),f=this.toDate(),g=f.toLocaleString("en-US",{timeZone:l}),S=Math.round((f-new Date(g))/1e3/60),x=15*-Math.round(f.getTimezoneOffset()/15)-S;if(!Number(x))p=this.utcOffset(0,d);else if(p=n(g,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(x,!0),d){var y=p.utcOffset();p=p.add(m-y,"minute")}return p.$x.$timezone=l,p},u.offsetName=function(l){var d=this.$x.$timezone||n.tz.guess(),p=i(this.valueOf(),d,{timeZoneName:l}).find(function(m){return m.type.toLowerCase()==="timezonename"});return p&&p.value};var s=u.startOf;u.startOf=function(l,d){if(!this.$x||!this.$x.$timezone)return s.call(this,l,d);var p=n(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return s.call(p,l,d).tz(this.$x.$timezone,!0)},n.tz=function(l,d,p){var m=p&&d,f=p||d||a,g=c(+n(),f);if(typeof l!="string")return n(l).tz(f);var S=function(P,O,A){var F=P-60*O*1e3,E=c(F,A);if(O===E)return[F,O];var w=c(F-=60*(E-O)*1e3,A);return E===w?[F,E]:[P-60*Math.min(E,w)*1e3,Math.max(E,w)]}(n.utc(l,m).valueOf(),g,f),x=S[0],y=S[1],C=n(x).utcOffset(y);return C.$x.$timezone=f,C},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.tz.setDefault=function(l){a=l}}})});var BS=Ae((fm,gm)=>{"use strict";(function(e,t){typeof fm=="object"&&typeof gm<"u"?gm.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(fm,function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(o,n,a){var i=n.prototype;a.utc=function(m){var f={date:m,utc:!0,args:arguments};return new n(f)},i.utc=function(m){var f=a(this.toDate(),{locale:this.$L,utc:!0});return m?f.add(this.utcOffset(),e):f},i.local=function(){return a(this.toDate(),{locale:this.$L,utc:!1})};var c=i.parse;i.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),c.call(this,m)};var u=i.init;i.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else u.call(this)};var s=i.utcOffset;i.utcOffset=function(m,f){var g=this.$utils().u;if(g(m))return this.$u?0:g(this.$offset)?s.call(this):this.$offset;if(typeof m=="string"&&(m=function(C){C===void 0&&(C="");var P=C.match(t);if(!P)return null;var O=(""+P[0]).match(r)||["-",0,0],A=O[0],F=60*+O[1]+ +O[2];return F===0?0:A==="+"?F:-F}(m),m===null))return this;var S=Math.abs(m)<=16?60*m:m,x=this;if(f)return x.$offset=S,x.$u=m===0,x;if(m!==0){var y=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(x=this.local().add(S+y,e)).$offset=S,x.$x.$localOffset=y}else x=this.utc();return x};var l=i.format;i.format=function(m){var f=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,f)},i.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var d=i.toDate;i.toDate=function(m){return m==="s"&&this.$offset?a(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var p=i.diff;i.diff=function(m,f,g){if(m&&this.$u===m.$u)return p.call(this,m,f,g);var S=this.local(),x=a(m).local();return p.call(S,x,f,g)}}})});var eC=Ae((h2,ZS)=>{"use strict";function xI(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}ZS.exports=RI;function RI(e,t,r){var o=r&&r.stringify||xI,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 iC=Ae((S2,nu)=>{"use strict";var tC=eC();nu.exports=Er;var Ei=NI().console||{},FI={mapHttpRequest:ou,mapHttpResponse:ou,wrapRequestSerializer:Sm,wrapResponseSerializer:Sm,wrapErrorSerializer:Sm,req:ou,res:ou,err:oC,errWithCause:oC};function ho(e,t){return e==="silent"?1/0:t.levels.values[e]}var Rm=Symbol("pino.logFuncs"),Cm=Symbol("pino.hierarchy"),PI={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function rC(e,t){let r={logger:t,parent:e[Cm]};t[Cm]=r}function AI(e,t,r){let o={};t.forEach(n=>{o[n]=r[n]?r[n]:Ei[n]||Ei[PI[n]||"log"]||ga}),e[Rm]=o}function vI(e,t){return Array.isArray(e)?e.filter(function(o){return o!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function Er(e){e=e||{},e.browser=e.browser||{};let t=e.browser.transmit;if(t&&typeof t.send!="function")throw Error("pino: transmit option must have a send function");let r=e.browser.write||Ei;e.browser.write&&(e.browser.asObject=!0);let o=e.serializers||{},n=vI(e.browser.serialize,o),a=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(a=!1);let i=Object.keys(e.customLevels||{}),c=["error","fatal","warn","info","debug","trace"].concat(i);typeof r=="function"&&c.forEach(function(g){r[g]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let u=e.level||"info",s=Object.create(r);s.log||(s.log=ga),AI(s,c,r),rC({},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:kI(e),messageKey:e.messageKey||"msg",onChild:e.onChild||ga};s.levels=bI(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=ga,s.serializers=o,s._serialize=n,s._stdErrSerialize=a,s.child=function(...g){return f.call(this,l,...g)},t&&(s._logEvent=xm());function d(){return ho(this.level,this)}function p(){return this._level}function m(g){if(g!=="silent"&&!this.levels.values[g])throw Error("unknown level "+g);this._level=g,zo(this,l,s,"error"),zo(this,l,s,"fatal"),zo(this,l,s,"warn"),zo(this,l,s,"info"),zo(this,l,s,"debug"),zo(this,l,s,"trace"),i.forEach(S=>{zo(this,l,s,S)})}function f(g,S,x){if(!S)throw new Error("missing bindings for child Pino");x=x||{},n&&S.serializers&&(x.serializers=S.serializers);let y=x.serializers;if(n&&y){var C=Object.assign({},o,y),P=e.browser.serialize===!0?Object.keys(C):n;delete S.serializers,Fm([S],P,C,this._stdErrSerialize)}function O(F){this._childLevel=(F._childLevel|0)+1,this.bindings=S,C&&(this.serializers=C,this._serialize=P),t&&(this._logEvent=xm([].concat(F._logEvent.bindings,S)))}O.prototype=this;let A=new O(this);return rC(this,A),A.child=function(...F){return f.call(this,g,...F)},A.level=x.level||this.level,g.onChild(A),A}return s}function bI(e){let t=e.customLevels||{},r=Object.assign({},Er.levels.values,t),o=Object.assign({},Er.levels.labels,wI(t));return{values:r,labels:o}}function wI(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}Er.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"}};Er.stdSerializers=FI;Er.stdTimeFunctions=Object.assign({},{nullTime:nC,epochTime:aC,unixTime:VI,isoTime:DI});function II(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[Cm];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function zo(e,t,r,o){if(Object.defineProperty(e,o,{value:ho(e.level,r)>ho(o,r)?ga:r[Rm][o],writable:!0,enumerable:!0,configurable:!0}),e[o]===ga){if(!t.transmit)return;let a=t.transmit.level||e.level,i=ho(a,r);if(ho(o,r)<i)return}e[o]=TI(e,t,r,o);let n=II(e);n.length!==0&&(e[o]=EI(n,e[o]))}function EI(e,t){return function(){return t.apply(this,[...e,...arguments])}}function TI(e,t,r,o){return function(n){return function(){let i=t.timestamp(),c=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===Ei?Ei:this;for(var s=0;s<c.length;s++)c[s]=arguments[s];var l=!1;if(t.serialize&&(Fm(c,this._serialize,this.serializers,this._stdErrSerialize),l=!0),t.asObject||t.formatters?n.call(u,OI(this,o,c,i,t)):n.apply(u,c),t.transmit){let d=t.transmit.level||e._level,p=ho(d,r),m=ho(o,r);if(m<p)return;qI(this,{ts:i,methodLevel:o,methodValue:m,transmitLevel:d,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:ho(e._level,r)},c,l)}}}(e[Rm][o])}function OI(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?tC(c.shift(),c):void 0}else typeof u=="string"&&(u=tC(c.shift(),c));return u!==void 0&&(s[n.messageKey]=u),i(s)}function Fm(e,t,r,o){for(let n in e)if(o&&e[n]instanceof Error)e[n]=Er.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 qI(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||Fm(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=xm(s)}function xm(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function oC(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 kI(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?nC:aC}function ou(){return{}}function Sm(e){return e}function ga(){}function nC(){return!1}function aC(){return Date.now()}function VI(){return Math.round(Date.now()/1e3)}function DI(){return new Date(Date.now()).toISOString()}function NI(){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)||{}}}nu.exports.default=Er;nu.exports.pino=Er});var tq={};Zu(tq,{HighlightUtils:()=>vl,ProductTemplatesHelpers:()=>xR,Selectors:()=>Fl,SortBy:()=>pt,SortDirection:()=>Dr,buildCart:()=>If,buildCommerceEngine:()=>pC,buildContext:()=>QC,buildController:()=>z,buildDateRange:()=>vr,buildFieldSuggestionsGenerator:()=>bR,buildFieldsSortCriterion:()=>Ba,buildInstantProducts:()=>dR,buildNotifyTrigger:()=>RR,buildProductListing:()=>nR,buildProductTemplatesManager:()=>SR,buildProductView:()=>iR,buildQueryTrigger:()=>PR,buildRecentQueriesList:()=>lR,buildRecommendations:()=>aR,buildRedirectionTrigger:()=>FR,buildRelevanceSortCriterion:()=>bt,buildSearch:()=>tR,buildSearchBox:()=>Wu,buildStandaloneSearchBox:()=>yR,deserializeRelativeDate:()=>ty,getAnalyticsNextApiBaseUrl:()=>sc,getCommerceApiBaseUrl:()=>sn,getOrganizationEndpoint:()=>we,getSampleCommerceEngineConfiguration:()=>mC,loadCartActions:()=>HI,loadCategoryFacetSetActions:()=>JI,loadConfigurationActions:()=>iE,loadContextActions:()=>jI,loadCoreFacetActions:()=>YI,loadDateFacetActions:()=>eE,loadInstantProductsActions:()=>fE,loadLocationFacetActions:()=>ZI,loadNumericFacetActions:()=>tE,loadPaginationActions:()=>WI,loadProductActions:()=>KI,loadProductListingActions:()=>$I,loadProductListingParametersActions:()=>uE,loadQueryActions:()=>cE,loadQuerySetActions:()=>oE,loadQuerySuggestActions:()=>aE,loadRecentQueriesActions:()=>gE,loadRecommendationsActions:()=>zI,loadRegularFacetActions:()=>XI,loadSearchActions:()=>_I,loadSearchParametersActions:()=>sE,loadSortActions:()=>GI,loadStandaloneSearchBoxSetActions:()=>CE,loadTriggersActions:()=>lE,productListingSerializer:()=>qu,searchSerializer:()=>Ou,validateRelativeDate:()=>Gr});module.exports=kR(tq);var Fl={};Zu(Fl,{ProductListing:()=>Rl,Search:()=>xl});var Hm="coveo-headless-internal-state",Q=Symbol.for(Hm),Gm=e=>new Proxy(e,{ownKeys(t){return Reflect.ownKeys(t).filter(r=>r!==Q)},get(t,r,o){return typeof r=="symbol"&&r.description===Hm&&r!==Q&&e.logger.warn(`You might be loading Headless twice. Please check your setup.
19
- If you are trying to access the inner state... Don't`),Reflect.get(t,r,o)}});var Ep=require("@coveo/bueno");function ve(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 VR=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ym=VR,el=()=>Math.random().toString(36).substring(7).split("").join("."),DR={INIT:`@@redux/INIT${el()}`,REPLACE:`@@redux/REPLACE${el()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${el()}`},Bi=DR;function Qt(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 tl(e,t,r){if(typeof e!="function")throw new Error(ve(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ve(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ve(1));return r(tl)(e,t)}let o=e,n=t,a=new Map,i=a,c=0,u=!1;function s(){i===a&&(i=new Map,a.forEach((S,x)=>{i.set(x,S)}))}function l(){if(u)throw new Error(ve(3));return n}function d(S){if(typeof S!="function")throw new Error(ve(4));if(u)throw new Error(ve(5));let x=!0;s();let y=c++;return i.set(y,S),function(){if(x){if(u)throw new Error(ve(6));x=!1,s(),i.delete(y),a=null}}}function p(S){if(!Qt(S))throw new Error(ve(7));if(typeof S.type>"u")throw new Error(ve(8));if(typeof S.type!="string")throw new Error(ve(17));if(u)throw new Error(ve(9));try{u=!0,n=o(n,S)}finally{u=!1}return(a=i).forEach(y=>{y()}),S}function m(S){if(typeof S!="function")throw new Error(ve(10));o=S,p({type:Bi.REPLACE})}function f(){let S=d;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(ve(11));function y(){let P=x;P.next&&P.next(l())}return y(),{unsubscribe:S(y)}},[Ym](){return this}}}return p({type:Bi.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[Ym]:f}}function NR(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Bi.INIT})>"u")throw new Error(ve(12));if(typeof r(void 0,{type:Bi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ve(13))})}function Xo(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{NR(r)}catch(i){a=i}return function(c={},u){if(a)throw a;let s=!1,l={};for(let d=0;d<o.length;d++){let p=o[d],m=r[p],f=c[p],g=m(f,u);if(typeof g>"u"){let S=u&&u.type;throw new Error(ve(14))}l[p]=g,s=s||g!==f}return s=s||o.length!==Object.keys(c).length,s?l:c}}function Zo(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function Jm(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(ve(15))},i={getState:n.getState,dispatch:(u,...s)=>a(u,...s)},c=e.map(u=>u(i));return a=Zo(...c)(n.dispatch),{...n,dispatch:a}}}function ji(e){return Qt(e)&&"type"in e&&typeof e.type=="string"}var dl=Symbol.for("immer-nothing"),Ea=Symbol.for("immer-draftable"),He=Symbol.for("immer-state");function be(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ro=Object.getPrototypeOf;function nt(e){return!!e&&!!e[He]}function Ge(e){return e?rp(e)||Array.isArray(e)||!!e[Ea]||!!e.constructor?.[Ea]||Va(e)||Da(e):!1}var MR=Object.prototype.constructor.toString();function rp(e){if(!e||typeof e!="object")return!1;let t=Ro(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)===MR}function ml(e){return nt(e)||be(15,e),e[He].base_}function Ta(e,t){Fo(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function Fo(e){let t=e[He];return t?t.type_:Array.isArray(e)?1:Va(e)?2:Da(e)?3:0}function Oa(e,t){return Fo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function rl(e,t){return Fo(e)===2?e.get(t):e[t]}function op(e,t,r){let o=Fo(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function LR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Va(e){return e instanceof Map}function Da(e){return e instanceof Set}function xo(e){return e.copy_||e.base_}function al(e,t){if(Va(e))return new Map(e);if(Da(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=rp(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[He];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(Ro(e),o)}else{let o=Ro(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function zi(e,t=!1){return Wi(e)||nt(e)||!Ge(e)||(Fo(e)>1&&(e.set=e.add=e.clear=e.delete=QR),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>zi(o,!0))),e}function QR(){be(2)}function Wi(e){return Object.isFrozen(e)}var il={};function Po(e){let t=il[e];return t||be(0,e),t}function UR(e,t){il[e]||(il[e]=t)}var qa;function np(){return qa}function BR(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Xm(e,t){t&&(Po("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function cl(e){sl(e),e.drafts_.forEach(jR),e.drafts_=null}function sl(e){e===qa&&(qa=e.parent_)}function Zm(e){return qa=BR(qa,e)}function jR(e){let t=e[He];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ep(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[He].modified_&&(cl(t),be(4)),Ge(e)&&(e=_i(t,e),t.parent_||$i(t,e)),t.patches_&&Po("Patches").generateReplacementPatches_(r[He].base_,e,t.patches_,t.inversePatches_)):e=_i(t,r,[]),cl(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==dl?e:void 0}function _i(e,t,r){if(Wi(t))return t;let o=t[He];if(!o)return Ta(t,(n,a)=>tp(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return $i(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),Ta(a,(c,u)=>tp(e,o,n,c,u,r,i)),$i(e,n,!1),r&&e.patches_&&Po("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function tp(e,t,r,o,n,a,i){if(nt(n)){let c=a&&t&&t.type_!==3&&!Oa(t.assigned_,o)?a.concat(o):void 0,u=_i(e,n,c);if(op(r,o,u),nt(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(Ge(n)&&!Wi(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;_i(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&$i(e,n)}}function $i(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&zi(t,r)}function _R(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:np(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=pl;r&&(n=[o],a=ka);let{revoke:i,proxy:c}=Proxy.revocable(n,a);return o.draft_=c,o.revoke_=i,c}var pl={get(e,t){if(t===He)return e;let r=xo(e);if(!Oa(r,t))return $R(e,r,t);let o=r[t];return e.finalized_||!Ge(o)?o:o===ol(e.base_,t)?(nl(e),e.copy_[t]=ll(o,e)):o},has(e,t){return t in xo(e)},ownKeys(e){return Reflect.ownKeys(xo(e))},set(e,t,r){let o=ap(xo(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=ol(xo(e),t),a=n?.[He];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(LR(r,n)&&(r!==void 0||Oa(e.base_,t)))return!0;nl(e),ul(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 ol(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,nl(e),ul(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=xo(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){be(11)},getPrototypeOf(e){return Ro(e.base_)},setPrototypeOf(){be(12)}},ka={};Ta(pl,(e,t)=>{ka[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ka.deleteProperty=function(e,t){return ka.set.call(this,e,t,void 0)};ka.set=function(e,t,r){return pl.set.call(this,e[0],t,r,e[0])};function ol(e,t){let r=e[He];return(r?xo(r):e)[t]}function $R(e,t,r){let o=ap(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function ap(e,t){if(!(t in e))return;let r=Ro(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Ro(r)}}function ul(e){e.modified_||(e.modified_=!0,e.parent_&&ul(e.parent_))}function nl(e){e.copy_||(e.copy_=al(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var zR=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"&&be(6),o!==void 0&&typeof o!="function"&&be(7);let n;if(Ge(t)){let a=Zm(this),i=ll(t,void 0),c=!0;try{n=r(i),c=!1}finally{c?cl(a):sl(a)}return Xm(a,o),ep(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===dl&&(n=void 0),this.autoFreeze_&&zi(n,!0),o){let a=[],i=[];Po("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else be(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){Ge(e)||be(8),nt(e)&&(e=ip(e));let t=Zm(this),r=ll(e,void 0);return r[He].isManual_=!0,sl(t),r}finishDraft(e,t){let r=e&&e[He];(!r||!r.isManual_)&&be(9);let{scope_:o}=r;return Xm(o,t),ep(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=Po("Patches").applyPatches_;return nt(e)?o(e,t):this.produce(e,n=>o(n,t))}};function ll(e,t){let r=Va(e)?Po("MapSet").proxyMap_(e,t):Da(e)?Po("MapSet").proxySet_(e,t):_R(e,t);return(t?t.scope_:np()).drafts_.push(r),r}function ip(e){return nt(e)||be(10,e),cp(e)}function cp(e){if(!Ge(e)||Wi(e))return e;let t=e[He],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=al(e,t.scope_.immer_.useStrictShallowCopy_)}else r=al(e,!0);return Ta(r,(o,n)=>{op(r,o,cp(n))}),t&&(t.finalized_=!1),r}function sp(){let t="replace",r="add",o="remove";function n(p,m,f,g){switch(p.type_){case 0:case 2:return i(p,m,f,g);case 1:return a(p,m,f,g);case 3:return c(p,m,f,g)}}function a(p,m,f,g){let{base_:S,assigned_:x}=p,y=p.copy_;y.length<S.length&&([S,y]=[y,S],[f,g]=[g,f]);for(let C=0;C<S.length;C++)if(x[C]&&y[C]!==S[C]){let P=m.concat([C]);f.push({op:t,path:P,value:d(y[C])}),g.push({op:t,path:P,value:d(S[C])})}for(let C=S.length;C<y.length;C++){let P=m.concat([C]);f.push({op:r,path:P,value:d(y[C])})}for(let C=y.length-1;S.length<=C;--C){let P=m.concat([C]);g.push({op:o,path:P})}}function i(p,m,f,g){let{base_:S,copy_:x}=p;Ta(p.assigned_,(y,C)=>{let P=rl(S,y),O=rl(x,y),A=C?Oa(S,y)?t:r:o;if(P===O&&A===t)return;let F=m.concat(y);f.push(A===o?{op:A,path:F}:{op:A,path:F,value:O}),g.push(A===r?{op:o,path:F}:A===o?{op:r,path:F,value:d(P)}:{op:t,path:F,value:d(P)})})}function c(p,m,f,g){let{base_:S,copy_:x}=p,y=0;S.forEach(C=>{if(!x.has(C)){let P=m.concat([y]);f.push({op:o,path:P,value:C}),g.unshift({op:r,path:P,value:C})}y++}),y=0,x.forEach(C=>{if(!S.has(C)){let P=m.concat([y]);f.push({op:r,path:P,value:C}),g.unshift({op:o,path:P,value:C})}y++})}function u(p,m,f,g){f.push({op:t,path:[],value:m===dl?void 0:m}),g.push({op:t,path:[],value:p})}function s(p,m){return m.forEach(f=>{let{path:g,op:S}=f,x=p;for(let O=0;O<g.length-1;O++){let A=Fo(x),F=g[O];typeof F!="string"&&typeof F!="number"&&(F=""+F),(A===0||A===1)&&(F==="__proto__"||F==="constructor")&&be(19),typeof x=="function"&&F==="prototype"&&be(19),x=rl(x,F),typeof x!="object"&&be(18,g.join("/"))}let y=Fo(x),C=l(f.value),P=g[g.length-1];switch(S){case t:switch(y){case 2:return x.set(P,C);case 3:be(16);default:return x[P]=C}case r:switch(y){case 1:return P==="-"?x.push(C):x.splice(P,0,C);case 2:return x.set(P,C);case 3:return x.add(C);default:return x[P]=C}case o:switch(y){case 1:return x.splice(P,1);case 2:return x.delete(P);case 3:return x.delete(f.value);default:return delete x[P]}default:be(17,S)}}),p}function l(p){if(!Ge(p))return p;if(Array.isArray(p))return p.map(l);if(Va(p))return new Map(Array.from(p.entries()).map(([f,g])=>[f,l(g)]));if(Da(p))return new Set(Array.from(p).map(l));let m=Object.create(Ro(p));for(let f in p)m[f]=l(p[f]);return Oa(p,Ea)&&(m[Ea]=p[Ea]),m}function d(p){return nt(p)?l(p):p}UR("Patches",{applyPatches_:s,generatePatches_:n,generateReplacementPatches_:u})}var at=new zR,pr=at.produce,Ki=at.produceWithPatches.bind(at),iq=at.setAutoFreeze.bind(at),cq=at.setUseStrictShallowCopy.bind(at),fl=at.applyPatches.bind(at),sq=at.createDraft.bind(at),uq=at.finishDraft.bind(at);function WR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function KR(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function HR(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 up=e=>Array.isArray(e)?e:[e];function GR(e){let t=Array.isArray(e[0])?e[0]:e;return HR(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function YR(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var mq=Symbol();var pq=Object.getPrototypeOf({});var JR=class{constructor(e){this.value=e}deref(){return this.value}},XR=typeof WeakRef<"u"?WeakRef:JR,ZR=0,lp=1;function Hi(){return{s:ZR,v:void 0,o:null,p:null}}function en(e,t={}){let r=Hi(),{resultEqualityCheck:o}=t,n,a=0;function i(){let c=r,{length:u}=arguments;for(let d=0,p=u;d<p;d++){let m=arguments[d];if(typeof m=="function"||typeof m=="object"&&m!==null){let f=c.o;f===null&&(c.o=f=new WeakMap);let g=f.get(m);g===void 0?(c=Hi(),f.set(m,c)):c=g}else{let f=c.p;f===null&&(c.p=f=new Map);let g=f.get(m);g===void 0?(c=Hi(),f.set(m,c)):c=g}}let s=c,l;if(c.s===lp)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 XR(l):l}return s.s=lp,s.v=l,l}return i.clearCache=()=>{r=Hi(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function dp(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...n)=>{let a=0,i=0,c,u={},s=n.pop();typeof s=="object"&&(u=s,s=n.pop()),WR(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=en,argsMemoizeOptions:f=[],devModeChecks:g={}}=l,S=up(p),x=up(f),y=GR(n),C=d(function(){return a++,s.apply(null,arguments)},...S),P=!0,O=m(function(){i++;let F=YR(y,arguments);return c=C.apply(null,F),c},...x);return Object.assign(O,{resultFunc:s,memoizedResultFunc:C,dependencies:y,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>c,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var N=dp(en),eF=Object.assign((e,t=N)=>{KR(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:()=>eF});function mp(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var pp=mp(),fp=mp;var tF=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Zo:Zo.apply(null,arguments)},Pq=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},rF=e=>e&&typeof e.match=="function";function h(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(vt(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=>ji(o)&&o.type===e,r}var Cp=class Na extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Na.prototype)}static get[Symbol.species](){return Na}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Na(...t[0].concat(this)):new Na(...t.concat(this))}};function gp(e){return Ge(e)?pr(e,()=>{}):e}function yp(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function oF(e){return typeof e=="boolean"}var nF=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new Cp;return r&&(oF(r)?i.push(pp):i.push(fp(r.extraArgument))),i},Or="RTK_autoBatch",rn=()=>e=>({payload:e,meta:{[Or]:!0}}),hp=e=>t=>{setTimeout(t,e)},aF=(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:hp(10):e.type==="callback"?e.queueNotification:hp(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?.[Or],a=!n,a&&(i||(i=!0,u(s))),o.dispatch(l)}finally{n=!0}}})},iF=e=>function(r){let{autoBatch:o=!0}=r??{},n=new Cp(e);return o&&n.push(aF(typeof o=="object"?o:void 0)),n};function xp(e){let t=nF(),{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(Qt(r))c=Xo(r);else throw new Error(vt(1));let u;typeof o=="function"?u=o(t):u=t();let s=Zo;n&&(s=tF({trace:!1,...typeof n=="object"&&n}));let l=Jm(...u),d=iF(l),p=typeof i=="function"?i(d):d(),m=s(...p);return tl(c,a,m)}function Rp(e){let t={},r=[],o,n={addCase(a,i){let c=typeof a=="string"?a:a.type;if(!c)throw new Error(vt(28));if(c in t)throw new Error(vt(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 cF(e){return typeof e=="function"}function B(e,t){let[r,o,n]=Rp(t),a;if(cF(e))a=()=>gp(e());else{let c=gp(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(nt(l)){let m=d(l,u);return m===void 0?l:m}else{if(Ge(l))return pr(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 Fp=(e,t)=>rF(e)?e.match(t):e(t);function Ut(...e){return t=>e.some(r=>Fp(r,t))}function tn(...e){return t=>e.every(r=>Fp(r,t))}function Yi(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 Ma(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Ji(...e){return e.length===0?t=>Yi(t,["pending"]):Ma(e)?Ut(...e.map(t=>t.pending)):Ji()(e[0])}function Ao(...e){return e.length===0?t=>Yi(t,["rejected"]):Ma(e)?Ut(...e.map(t=>t.rejected)):Ao()(e[0])}function La(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?tn(Ao(...e),t):Ma(e)?tn(Ao(...e),t):La()(e[0])}function fr(...e){return e.length===0?t=>Yi(t,["fulfilled"]):Ma(e)?Ut(...e.map(t=>t.fulfilled)):fr()(e[0])}function Xi(...e){return e.length===0?t=>Yi(t,["pending","fulfilled","rejected"]):Ma(e)?Ut(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Xi()(e[0])}var sF="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Zi=(e=21)=>{let t="",r=e;for(;r--;)t+=sF[Math.random()*64|0];return t},uF=["name","message","stack","code"],gl=class{constructor(e,t){Oe(this,"_type");this.payload=e,this.meta=t}},Sp=class{constructor(e,t){Oe(this,"_type");this.payload=e,this.meta=t}},lF=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of uF)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},_=(()=>{function e(t,r,o){let n=h(t+"/fulfilled",(u,s,l,d)=>({payload:u,meta:{...d||{},arg:l,requestId:s,requestStatus:"fulfilled"}})),a=h(t+"/pending",(u,s,l)=>({payload:void 0,meta:{...l||{},arg:s,requestId:u,requestStatus:"pending"}})),i=h(t+"/rejected",(u,s,l,d,p)=>({payload:d,error:(o&&o.serializeError||lF)(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):Zi(),m=new AbortController,f,g;function S(y){g=y,m.abort()}let x=async function(){let y;try{let P=o?.condition?.(u,{getState:l,extra:d});if(mF(P)&&(P=await P),P===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let O=new Promise((A,F)=>{f=()=>{F({name:"AbortError",message:g||"Aborted"})},m.signal.addEventListener("abort",f)});s(a(p,u,o?.getPendingMeta?.({requestId:p,arg:u},{getState:l,extra:d}))),y=await Promise.race([O,Promise.resolve(r(u,{dispatch:s,getState:l,extra:d,requestId:p,signal:m.signal,abort:S,rejectWithValue:(A,F)=>new gl(A,F),fulfillWithValue:(A,F)=>new Sp(A,F)})).then(A=>{if(A instanceof gl)throw A;return A instanceof Sp?n(A.payload,p,u,A.meta):n(A,p,u)})])}catch(P){y=P instanceof gl?i(null,p,u,P.payload,P.meta):i(P,p,u)}finally{f&&m.signal.removeEventListener("abort",f)}return o&&!o.dispatchConditionRejection&&i.match(y)&&y.meta.condition||s(y),y}();return Object.assign(x,{abort:S,requestId:p,arg:u,unwrap(){return x.then(dF)}})}}return Object.assign(c,{pending:a,rejected:i,fulfilled:n,settled:Ut(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function dF(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function mF(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Pp=Symbol.for("rtk-slice-createasyncthunk"),Iq={[Pp]:_};function pF(e,t){return`${e}/${t}`}function fF({creators:e}={}){let t=e?.asyncThunk?.[Pp];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(vt(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(yF()):o.reducers)||{},c=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(y,C){let P=typeof y=="string"?y:y.type;if(!P)throw new Error(vt(12));if(P in u.sliceCaseReducersByType)throw new Error(vt(13));return u.sliceCaseReducersByType[P]=C,s},addMatcher(y,C){return u.sliceMatchers.push({matcher:y,reducer:C}),s},exposeAction(y,C){return u.actionCreators[y]=C,s},exposeCaseReducer(y,C){return u.sliceCaseReducersByName[y]=C,s}};c.forEach(y=>{let C=i[y],P={reducerName:y,type:pF(n,y),createNotation:typeof o.reducers=="function"};SF(C)?xF(P,C,s,t):hF(P,C,s)});function l(){let[y={},C=[],P=void 0]=typeof o.extraReducers=="function"?Rp(o.extraReducers):[o.extraReducers],O={...y,...u.sliceCaseReducersByType};return B(o.initialState,A=>{for(let F in O)A.addCase(F,O[F]);for(let F of u.sliceMatchers)A.addMatcher(F.matcher,F.reducer);for(let F of C)A.addMatcher(F.matcher,F.reducer);P&&A.addDefaultCase(P)})}let d=y=>y,p=new Map,m;function f(y,C){return m||(m=l()),m(y,C)}function g(){return m||(m=l()),m.getInitialState()}function S(y,C=!1){function P(A){let F=A[y];return typeof F>"u"&&C&&(F=g()),F}function O(A=d){let F=yp(p,C,()=>new WeakMap);return yp(F,A,()=>{let E={};for(let[w,q]of Object.entries(o.selectors??{}))E[w]=gF(q,A,g,C);return E})}return{reducerPath:y,getSelectors:O,get selectors(){return O(P)},selectSlice:P}}let x={name:n,reducer:f,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:g,...S(a),injectInto(y,{reducerPath:C,...P}={}){let O=C??a;return y.inject({reducerPath:O,reducer:f},P),{...x,...S(O,!0)}}};return x}}function gF(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 vo=fF();function yF(){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 hF({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!CF(o))throw new Error(vt(17));a=o.reducer,i=o.prepare}else a=o;n.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?h(e,i):h(e))}function SF(e){return e._reducerDefinitionType==="asyncThunk"}function CF(e){return e._reducerDefinitionType==="reducerWithPrepare"}function xF({type:e,reducerName:t},r,o,n){if(!n)throw new Error(vt(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||Gi,pending:c||Gi,rejected:u||Gi,settled:s||Gi})}function Gi(){}var Ap="listener",vp="completed",bp="cancelled",Eq=`task-${bp}`,Tq=`task-${vp}`,Oq=`${Ap}-${bp}`,qq=`${Ap}-${vp}`;var{assign:wp}=Object;var yl="listenerMiddleware";var RF=wp(h(`${yl}/add`),{withTypes:()=>RF}),kq=h(`${yl}/removeAll`),FF=wp(h(`${yl}/remove`),{withTypes:()=>FF});var Vq=Symbol.for("rtk-state-proxy-original");function vt(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 qr=N(e=>e.commercePagination?.principal.perPage||0,e=>e),ec=N((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),kr=N(e=>e.commercePagination?.principal.totalEntries||0,e=>e),tc=N((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),rc=N(e=>e.commercePagination?.principal.page||0,e=>e),Ip=N((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var zq=N(e=>e[Q].productListing.responseId,e=>e),Qa=N(e=>e.productListing.responseId,e=>e),Tp=N(e=>e.productListing.requestId,e=>e),Ua=N(e=>e.productListing?.products.length||0,e=>e),Op=N(e=>({total:kr(e),current:Ua(e)}),({current:e,total:t})=>e<t),qp=N(e=>e.productListing?.isLoading,e=>(0,Ep.isNullOrUndefined)(e)?!1:e),kp=N(e=>e.productListing?.error,e=>e??null);var Cl=require("@coveo/bueno");function hl(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function Sl(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 jt(e){let{activeValue:t,ancestryMap:r}=AF(e);return t?vF(t,r):[]}function AF(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 vF(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function Vp(){return{principal:Vr(),recommendations:{}}}function Vr(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}var wt=require("@coveo/bueno");var _t=require("@coveo/bueno"),pt=(r=>(r.Relevance="relevance",r.Fields="fields",r))(pt||{}),Dr=(r=>(r.Ascending="asc",r.Descending="desc",r))(Dr||{}),bt=()=>({by:"relevance"});var Gq=new _t.RecordValue({options:{required:!1},values:{by:new _t.EnumValue({enum:pt,required:!0}),fields:new _t.ArrayValue({each:new _t.RecordValue({values:{name:new _t.StringValue,direction:new _t.EnumValue({enum:Dr})}})})}});var Ba=e=>({by:"fields",fields:e}),Dp=new wt.RecordValue({options:{required:!1},values:{by:new wt.EnumValue({enum:pt,required:!0}),fields:new wt.ArrayValue({each:new wt.RecordValue({values:{field:new wt.StringValue({required:!0}),direction:new wt.EnumValue({enum:Dr}),displayName:new wt.StringValue}})})}});function bo(){return{appliedSort:bt(),availableSorts:[bt()]}}function oc(e){return{...bF(e?.commercePagination,t=>t.principal.page,Vr().page),...wF(e?.commercePagination,t=>t.principal.perPage,Vr().perPage),...Sl(e?.commerceSort,t=>t.appliedSort,bo().appliedSort),...Bt(e.commerceFacetSet,Nr(e,"regular"),IF,"f"),...Bt(e.commerceFacetSet,Nr(e,"regular"),EF,"fExcluded"),...Bt(e.commerceFacetSet,Nr(e,"location"),TF,"lf"),...Bt(e.commerceFacetSet,Nr(e,"hierarchical"),OF,"cf"),...Bt(e.commerceFacetSet,Nr(e,"dateRange"),Np,"df"),...Bt(e.commerceFacetSet,Nr(e,"dateRange"),Mp,"dfExcluded"),...Bt(e.commerceFacetSet,Nr(e,"numericalRange"),Np,"nf"),...Bt(e.commerceFacetSet,Nr(e,"numericalRange"),Mp,"nfExcluded"),...Lp("selected",e.manualNumericFacetSet),...Lp("excluded",e.manualNumericFacetSet)}}function bF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function wF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function IF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function EF(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function TF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function Np(e){return e.values.filter(t=>t.state==="selected")}function Mp(e){return e.values.filter(t=>t.state==="excluded")}function Lp(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 OF(e){return jt(e.values).map(r=>r.value)}function Nr(e,t){return r=>e.commerceFacetSet[r].request.type===t}var nc=()=>({query:""});var Sk=N(e=>e[Q].commerceSearch.responseId,e=>e),ja=N(e=>e.commerceSearch.responseId,e=>e),Qp=N(e=>e.commerceSearch.requestId,e=>e),_a=N(e=>e.commerceSearch?.products.length||0,e=>e),Up=N(e=>({total:kr(e),current:_a(e)}),({current:e,total:t})=>e<t),Bp=N(e=>e.commerceSearch?.isLoading,e=>(0,Cl.isNullOrUndefined)(e)?!1:e),jp=N(e=>e.commerceSearch?.error,e=>e??null),ac=N(e=>e.commerceQuery?.query,e=>e??""),qF=N(e=>e.commerceSearch?.queryExecuted,e=>e),_p=(e,t)=>(0,Cl.isNullOrUndefined)(t.queryCorrection?.correctedQuery)?ac(e):t.queryCorrection.correctedQuery,$p=e=>({...hl(e?.commerceQuery,t=>t.query,nc().query),...oc(e)});function zp(e){return{query:qF(e)||""}}var xl;(t=>t.responseIdSelector=Wp(ja))(xl||(xl={}));var Rl;(t=>t.responseIdSelector=Wp(Qa))(Rl||(Rl={}));function Wp(e){return t=>e(t[Q])}var vl={};Zu(vl,{escape:()=>on,getHighlightedSuggestion:()=>Al,highlightString:()=>VF});var Gp=require("@coveo/bueno");var wo=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function Kp(e){return Array.isArray(e)}function ic(e){return e.trim()===""}function Hp(e){let t={};for(let[r,o]of e)t[r]=o;return t}function $a(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function VF(e){if(ic(e.openingDelimiter)||ic(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if((0,Gp.isNullOrUndefined)(e.content)||ic(e.content))return e.content;if(e.highlights.length===0)return on(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+=on(e.content.slice(o,i)),r+=e.openingDelimiter,r+=on(e.content.slice(i,c)),r+=e.closingDelimiter,o=c}return o!==t&&(r+=on(e.content.slice(o))),r}function Al(e,t){return e=on(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,o,n,a)=>o?Pl(o,t.notMatchDelimiters):n?Pl(n,t.exactMatchDelimiters):a?Pl(a,t.correctionDelimiters):r)}function Pl(e,t){return t?t.open+e+t.close:e}function on(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 sf=Lt(of(),1);var iP="recommendation-internal-options",Ok=Symbol.for(iP);var $=new Error("Failed to load reducers."),nn=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var Eo=class extends Error{constructor(r,o){super();Oe(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function nf(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function af(e){return typeof e!="object"||!e?!1:Object.values(e).every(cP)}function cP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function cf(e){return e===429}var an=class e{static async call(t){let r=sP(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(cf(u.status))throw u;return u};try{let u=await(0,sf.backOff)(c,{retry:s=>{let l=s&&cf(s.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new nn;case 404:throw new Eo(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new Eo(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:c,...u}=t,s=$a(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 we(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function ft(e,t="prod"){return`${we(e,t)}/rest/search/v2`}function sc(e,t="prod"){return`${we(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function sP(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,c=e.method==="POST"||e.method==="PUT",u=uP(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...c&&{body:u},signal:i}}function uP(e,t){return t==="application/x-www-form-urlencoded"?af(e)?nf(e):"":JSON.stringify(e)}function lP(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function dP(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Vl(e,t){if(t&&e.name==="AbortError")return{error:dP(e)};if(e instanceof Eo)return{error:lP(e)};throw e}var cn=(e,t)=>({...Ka(e,t),requestParams:mP(e)}),mP=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}},Ka=(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 uf=(e,t)=>({...Ka(e,t),requestParams:pP(e)}),pP=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 lf=e=>({...Ka(e,"search/querySuggest"),requestParams:fP(e)}),fP=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 qe=e=>e.error!==void 0,uc=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...cn(t,"listing"),...this.options})}async search(t){let r=cn(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...uf(t,"recommendations"),...this.options})}async productSuggestions(t){let r=cn(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=lf(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=cn(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=cn(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await an.call(t);if(r instanceof Error)return Vl(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function sn(e,t="prod"){return`${we(e,t)}/rest/organizations/${e}/commerce/v2`}var lc=e=>e;var Ml=require("@coveo/bueno");var Ye=require("@coveo/bueno"),T=new Ye.StringValue({required:!0,emptyAllowed:!1}),re=new Ye.StringValue({required:!1,emptyAllowed:!1}),fe=new Ye.StringValue({required:!0,emptyAllowed:!0}),df=new Ye.StringValue({required:!1,emptyAllowed:!0}),mf=new Ye.ArrayValue({each:T,required:!0}),pf=new Ye.StringValue({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),je=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),he=(e,t)=>{if("required"in t)return{payload:new Ye.Schema({value:t}).validate({value:e}).value};let n=new Ye.RecordValue({options:{required:!0},values:t}).validate(e);if(n)throw new Ye.SchemaValidationError(n);return{payload:e}},R=(e,t)=>{try{return he(e,t)}catch(r){return{payload:e,error:je(r)}}},Je=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return ff(e,t,r,n,"Controller initialization error")},_e=(e,t,r,o)=>{let n=`Check the options of ${o}`;return ff(e,t,r,n,"Controller initialization error")},ff=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};var $e=require("@coveo/bueno");var un="3.16.1-pre.2f5ed054e8",gf=["@coveo/atomic","@coveo/quantic"];var Dl=()=>re,yf=()=>T,To=h("configuration/updateBasicConfiguration",e=>R(e,{accessToken:re,environment:new $e.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:re})),hf=h("configuration/updateSearchConfiguration",e=>R(e,{proxyBaseUrl:new $e.StringValue({required:!1,url:!0}),pipeline:new $e.StringValue({required:!1,emptyAllowed:!0}),searchHub:re,timezone:re,locale:re,authenticationProviders:new $e.ArrayValue({required:!1,each:T})})),ln={enabled:new $e.BooleanValue({default:!0}),originContext:Dl(),originLevel2:Dl(),originLevel3:Dl(),proxyBaseUrl:new $e.StringValue({required:!1,url:!0}),runtimeEnvironment:new $e.Value,anonymous:new $e.BooleanValue({default:!1}),deviceId:re,userDisplayName:re,documentLocation:re,trackingId:re,analyticsMode:new $e.StringValue({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new $e.RecordValue({options:{required:!1},values:gf.reduce((e,t)=>(e[t]=pf,e),{})})},Nl=h("configuration/updateAnalyticsConfiguration",e=>R(e,ln)),dc=h("configuration/analytics/disable"),mc=h("configuration/analytics/enable"),Sf=h("configuration/analytics/originlevel2",e=>R(e,{originLevel2:yf()})),Cf=h("configuration/analytics/originlevel3",e=>R(e,{originLevel3:yf()}));var dn=h("commerce/configuration/updateBasicConfiguration",e=>R(e,{accessToken:re,environment:new Ml.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:re})),mn=h("commerce/configuration/updateProxyBaseUrl",e=>R(e,{proxyBaseUrl:new Ml.StringValue({required:!1,url:!0})})),pn=h("commerce/configuration/updateAnalyticsConfiguration",e=>R(e,{enabled:ln.enabled,proxyBaseUrl:ln.proxyBaseUrl,source:ln.source,trackingId:ln.trackingId})),pc=h("commerce/configuration/analytics/disable"),fc=h("commerce/configuration/analytics/enable");var Mr=require("@coveo/bueno");var xf=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var Ll=B(xf(),e=>e.addCase(dn,(t,r)=>{Rf(t,r.payload)}).addCase(To,(t,r)=>{Rf(t,r.payload)}).addCase(mn,(t,r)=>{gP(t,r.payload)}).addCase(pn,(t,r)=>{yP(t,r.payload)}).addCase(pc,t=>{t.analytics.enabled=!1}).addCase(fc,t=>{t.analytics.enabled=!0}));function Rf(e,t){(0,Mr.isNullOrUndefined)(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",(0,Mr.isNullOrUndefined)(t.organizationId)||(e.organizationId=t.organizationId)}function gP(e,t){(0,Mr.isNullOrUndefined)(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function yP(e,t){(0,Mr.isNullOrUndefined)(t.enabled)||(e.analytics.enabled=t.enabled),(0,Mr.isNullOrUndefined)(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),(0,Mr.isNullOrUndefined)(t.source)||(e.analytics.source=t.source),(0,Mr.isNullOrUndefined)(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function fn(e){return e.currency}var Ff=(e,t)=>({currency:fn(t.commerceContext),products:hP(t.cart),transaction:e}),Pf=(e,t)=>({currency:fn(t.commerceContext),...e}),Oo=N(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),hP=N(Oo,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));var It=require("@coveo/bueno");var Ql={productId:T,quantity:new It.NumberValue({required:!0,min:0}),name:new It.StringValue({required:!1}),price:new It.NumberValue({required:!1,min:0})},Ul=new It.ArrayValue({each:new It.RecordValue({values:{...Ql}})}),Bl={items:Ul},Af=new It.Schema(Bl);var Lr=h("commerce/cart/setItems",e=>R(e,Ul)),gn=h("commerce/cart/updateItemQuantity",e=>R(e,Ql)),yn=h("commerce/cart/purchase"),gc=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=Ff(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),yc=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=Pf(e,r()),{relay:n}=t;n.emit("ec.cartAction",o)});function z(e){let t,r=new Map,o=()=>r.size===0,n=a=>{try{let i=JSON.stringify(a),c=t!==i;return t=i,c}catch(i){return console.warn('Could not detect if state has changed, check the controller "get state method"',i),!0}};return{subscribe(a){a();let i=Symbol(),c;return o()&&(t=JSON.stringify(this.state),c=e.subscribe(()=>{n(this.state)&&r.forEach(u=>u())})),r.set(i,a),()=>{r.delete(i),o()&&c&&c()}},get state(){return{}}}}function vf(e,t){return e.cart[qo(t)]}var bf=N(Oo,e=>e.reduce((t,r)=>t+r.quantity,0)),wf=N(Oo,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function If(e,t={}){if(!SP(e))throw $;let{dispatch:r}=e,o=z(e),n=()=>e[Q].cart,a={...t.initialState};Je(e,Af,a,"buildCart"),a.items!==void 0&&r(Lr(a.items));function i(l,d){return d?d.quantity!==l.quantity:!0}function c(l,d){return!d||l.quantity>d.quantity?"add":"remove"}function u(l,d){return d?l.name===d.name&&l.price===d.price&&l.quantity===d.quantity:!1}function s(l,d){let{quantity:p,...m}=l,f=c(l,d),g=d?Math.abs(p-d.quantity):p;return{action:f,quantity:g,product:m}}return{...o,empty:function(){for(let l of Oo(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(gc(l)),r(yn())},updateItemQuantity(l){let d=vf(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(yc(s(l,d))),r(gn(l)))},get state(){let l=n();return{items:Oo(l),totalQuantity:bf(l),totalPrice:wf(l)}}}}function qo(e){return`${e.productId},${e.name},${e.price}`}function SP(e){return e.addReducers({cart:hn}),!0}var hc=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),Sc=e=>Tf(e.cartItems,e.cart),Ef=e=>Tf(e.purchasedItems,e.purchased);function Tf(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 hn=B(hc(),e=>{e.addCase(Lr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let c=qo(i);return{cartItems:[...a.cartItems,c],cart:{...a.cart,[c]:i},purchasedItems:[],purchased:{}}},hc());Of(t,n,o)}).addCase(gn,(t,{payload:r})=>{let o=qo(r);if(!(o in t.cart)){CP(r,t);return}if(r.quantity<=0){xP(r,t);return}t.cart[o]=r}).addCase(yn,t=>{RP(t);let{cart:r,cartItems:o}=hc();Of(t,o,r)})});function Of(e,t,r){e.cartItems=t,e.cart=r}function CP(e,t){if(e.quantity<=0)return;let r=qo(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function xP(e,t){let r=qo(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function RP(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]}}var $t=require("@coveo/bueno");var FP=Intl.supportedValuesOf("currency"),PP=new $t.StringValue({required:!0,emptyAllowed:!1,constrainTo:FP}),jl={url:T},_l={latitude:new $t.NumberValue({min:-90,max:90,required:!0}),longitude:new $t.NumberValue({min:-180,max:180,required:!0})},Ha={language:T,country:T,currency:PP,view:new $t.RecordValue({options:{required:!0},values:jl}),location:new $t.RecordValue({options:{required:!1},values:_l})},qf=new $t.Schema(Ha);var se=h("commerce/context/set",e=>R(e,Ha)),ue=h("commerce/context/setView",e=>R(e,jl)),Sn=h("commerce/context/setLocation",e=>R(e,_l));var kf=()=>({language:"",country:"",currency:"",view:{url:""}});var zt=B(kf(),e=>{e.addCase(se,(t,{payload:r})=>r).addCase(ue,(t,{payload:r})=>{t.view=r}).addCase(Sn,(t,{payload:r})=>{t.location=r})});var Cc=()=>({correctedQuery:"",corrections:[],originalQuery:""});var No=require("@coveo/bueno");var gt=h("breadcrumb/deselectAll"),Qr=h("breadcrumb/deselectAllNonBreadcrumbs");var Wt=N(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${un}`));var it=(e,t)=>({...Ga(e,t),facets:[...vP(e)],...e.commerceSort&&{sort:bP(e.commerceSort.appliedSort)}}),Vf=(e,t)=>{let{commercePagination:r,...o}=e;return{...it(o,t)}},Ga=(e,t,r)=>{let{view:o,location:n,...a}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??sn(e.configuration.organizationId,e.configuration.environment),organizationId:e.configuration.organizationId,trackingId:e.configuration.analytics.trackingId,...a,...e.configuration.analytics.enabled?{clientId:t.clientId}:{},context:{user:{...n,...t.userAgent?{userAgent:t.userAgent}:{}},view:{...o,...t.referrer?{referrer:t.referrer}:{}},capture:e.configuration.analytics.enabled,cart:Sc(e.cart),source:Wt(e.configuration.analytics)},...AP(e,r)}},AP=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};function vP(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 bP(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}var Cn=require("@coveo/bueno");var ko=h("commerce/facets/core/updateNumberOfValues",e=>R(e,{facetId:T,numberOfValues:new Cn.NumberValue({required:!0,min:1})})),Vo=h("commerce/facets/core/updateIsFieldExpanded",e=>R(e,{facetId:T,isFieldExpanded:new Cn.BooleanValue({required:!0})})),ke=h("commerce/facets/core/clearAll"),Ve=h("commerce/facets/core/deselectAllValues",e=>R(e,{facetId:T})),Do=h("commerce/facets/core/updateFreezeCurrentValues",e=>R(e,{facetId:T,freezeCurrentValues:new Cn.BooleanValue({required:!0})})),xn=h("commerce/facets/core/updateAutoSelectionForAll",e=>R(e,{allow:new Cn.BooleanValue({required:!0})}));var $l=require("@coveo/bueno");var xc={slotId:df},wP={...xc,pageSize:new $l.NumberValue({required:!0,min:0})},yr=h("commerce/pagination/setPageSize",e=>R(e,wP)),IP={...xc,page:new $l.NumberValue({required:!0,min:0})},Kt=h("commerce/pagination/selectPage",e=>R(e,IP)),Ur=h("commerce/pagination/nextPage",e=>R(e,xc)),Br=h("commerce/pagination/previousPage",e=>R(e,xc)),Rn=h("commerce/pagination/registerRecommendationsSlot",e=>R(e,{slotId:T}));var Df=require("@coveo/bueno");var De=h("commerce/query/update",e=>R(e,{query:new Df.StringValue}));var zl=require("@coveo/bueno");var Rc=require("@coveo/bueno");var jr=h("commerce/triggers/query/updateIgnore",e=>R(e,{q:new Rc.StringValue({emptyAllowed:!0,required:!0})})),Fn=h("commerce/triggers/query/applyModification",e=>R(e,new Rc.RecordValue({values:{originalQuery:re,modification:re}})));var Ya=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 qe(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(!(!(0,zl.isNullOrUndefined)(n)&&!(0,zl.isNullOrUndefined)(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:c}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:_p(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(jr({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(o);return qe(i.response)?this.rejectWithValue(i.response.error):{...i,response:{...i.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t){return this.dispatch(Fn({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...it(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 qe(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(De({query:t}))}};var H=_("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=it(o,n),i=ac(o),c=new Ya(t),u=await c.fetchFromAPI({...a,query:i});return c.process(u)}),_r=_("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!Up(o))return null;let i=qr(o),u=_a(o)/i,s=ac(o),l=it(o,n),d=new Ya(t),p=await d.fetchFromAPI({...l,query:s,page:u});return d.process(p)}),Pn=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;R(e,{query:new No.StringValue,clearFilters:new No.BooleanValue}),e.clearFilters&&(r(ke()),r(Qr())),r(xn({allow:!0})),r(De({query:e.query})),r(Kt({page:0}))}),An=_("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({...Vf(n,i),query:c});return qe(u)?r(u.error):{response:{...u.success,products:u.success.products}}}),EP={child:new No.RecordValue({options:{required:!0},values:{permanentid:new No.StringValue({required:!0})}})},vn=h("commerce/search/promoteChildToParent",e=>R(e,EP));function Nf(){return{wasCorrectedTo:"",queryCorrection:Cc(),originalQuery:""}}var Fc=B(Nf(),e=>{e.addCase(H.pending,t=>{t.queryCorrection=Cc(),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??[]}})});var de=require("@coveo/bueno");var K=T;var Ht=require("@coveo/bueno");var TP={state:new Ht.Value({required:!0}),numberOfResults:new Ht.NumberValue({required:!0,min:0}),value:new Ht.StringValue({required:!0,emptyAllowed:!0}),path:new Ht.ArrayValue({required:!0,each:T}),moreValuesAvailable:new Ht.BooleanValue({required:!1})};function Ja(e){e.children.forEach(t=>{Ja(t)}),he({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},TP)}var bn={facetId:K,field:T,tabs:new de.RecordValue({options:{required:!1},values:{included:new de.ArrayValue({each:new de.StringValue}),excluded:new de.ArrayValue({each:new de.StringValue})}}),activeTab:new de.StringValue({required:!1}),delimitingCharacter:new de.StringValue({required:!1,emptyAllowed:!0}),filterFacetCount:new de.BooleanValue({required:!1}),injectionDepth:new de.NumberValue({required:!1,min:0}),numberOfValues:new de.NumberValue({required:!1,min:1}),sortCriteria:new de.Value({required:!1}),basePath:new de.ArrayValue({required:!1,each:T}),filterByBasePath:new de.BooleanValue({required:!1})},wn=5,Mf=h("categoryFacet/register",e=>R(e,bn)),Lf=h("categoryFacet/toggleSelectValue",e=>{try{return he(e.facetId,T),Ja(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:je(t)}}}),Qf=h("categoryFacet/deselectAll",e=>R(e,bn.facetId)),QN=h("categoryFacet/updateNumberOfValues",e=>R(e,{facetId:bn.facetId,numberOfValues:bn.numberOfValues})),UN=h("categoryFacet/updateSortCriterion",e=>R(e,{facetId:bn.facetId,criterion:new de.Value})),BN=h("categoryFacet/updateBasePath",e=>R(e,{facetId:bn.facetId,basePath:new de.ArrayValue({each:T})}));var En=require("@coveo/bueno");var In=require("@coveo/bueno");var Xa={facetId:K,captions:new In.RecordValue({options:{required:!1}}),numberOfValues:new In.NumberValue({required:!1,min:1}),query:new In.StringValue({required:!1,emptyAllowed:!0})};var OP={path:new En.ArrayValue({required:!0,each:T}),displayValue:fe,rawValue:fe,count:new En.NumberValue({required:!0,min:0})},$r=h("categoryFacet/selectSearchResult",e=>R(e,{facetId:K,value:new En.RecordValue({values:OP})})),Pc=h("categoryFacetSearch/register",e=>R(e,Xa));var Ac=require("@coveo/bueno");var Uf={facetId:K,value:new Ac.RecordValue({values:{displayValue:fe,rawValue:fe,count:new Ac.NumberValue({required:!0,min:0})}})},vc=h("facetSearch/register",e=>R(e,Xa)),zr=h("facetSearch/update",e=>R(e,Xa)),Et=h("facetSearch/toggleSelectValue",e=>R(e,Uf)),Tt=h("facetSearch/toggleExcludeValue",e=>R(e,Uf));var Bf=require("@coveo/bueno");var hr=h("facetOptions/update",(e={freezeFacetOrder:!0})=>R(e,{freezeFacetOrder:new Bf.BooleanValue({required:!1})})),Wl=h("facetOptions/facet/enable",e=>R(e,K)),Sr=h("facetOptions/facet/disable",e=>R(e,K));var qP=h("history/undo"),kP=h("history/redo"),Gt=h("history/snapshot"),iM=_("history/back",async(e,{dispatch:t})=>{t(qP()),await t(xe())}),cM=_("history/forward",async(e,{dispatch:t})=>{t(kP()),await t(xe())}),xe=_("history/change",async(e,{getState:t})=>t().history.present);var me=require("@coveo/bueno"),bc={q:new me.StringValue,enableQuerySyntax:new me.BooleanValue,aq:new me.StringValue,cq:new me.StringValue,firstResult:new me.NumberValue({min:0}),numberOfResults:new me.NumberValue({min:0}),sortCriteria:new me.StringValue,f:new me.RecordValue,fExcluded:new me.RecordValue,cf:new me.RecordValue,nf:new me.RecordValue,mnf:new me.RecordValue,df:new me.RecordValue,debug:new me.BooleanValue,sf:new me.RecordValue,tab:new me.StringValue,af:new me.RecordValue};var Ie=h("searchParameters/restore",e=>R(e,bc));var oo=require("@coveo/bueno");function Cr(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function v(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function c(l){try{s(o.next(l))}catch(d){i(d)}}function u(l){try{s(o.throw(l))}catch(d){i(d)}}function s(l){l.done?a(l.value):n(l.value).then(c,u)}s((o=o.apply(e,t||[])).next())})}var G;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(G||(G={}));function Gl(){return typeof window<"u"}function sd(){return typeof navigator<"u"}function Tn(){return typeof document<"u"}function Yl(){try{return typeof localStorage<"u"}catch{return!1}}function VP(){try{return typeof sessionStorage<"u"}catch{return!1}}function tg(){return sd()&&navigator.cookieEnabled}var DP=[G.click,G.custom,G.search,G.view],NP=(e,t)=>DP.indexOf(e)!==-1?Object.assign({language:Tn()?document.documentElement.lang:"unknown",userAgent:sd()?navigator.userAgent:"unknown"},t):t,ti=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?jf(t,r,a):(i=c.split("."),n=i[i.length-2]+"."+i[i.length-1],jf(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 jf(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function MP(){return Yl()?localStorage:tg()?new ri:VP()?sessionStorage:new qn}var ri=class e{getItem(t){return ti.get(`${e.prefix}${t}`)}removeItem(t){ti.erase(`${e.prefix}${t}`)}setItem(t,r,o){ti.set(`${e.prefix}${t}`,r,o)}};ri.prefix="coveo_";var Jl=class{constructor(){this.cookieStorage=new ri}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)}},qn=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Za="__coveo.analytics.history",rg=20,og=1e3*60,ng=75,kn=class{constructor(t){this.store=t||MP()}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){return v(this,void 0,void 0,function*(){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=yield this.getHistoryWithInternalTimeAsync();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])})}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){return v(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Za);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return v(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Za);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Za,JSON.stringify(t.slice(0,rg)))}catch{}}clear(){try{this.store.removeItem(Za)}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,ng)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>og:!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))}},ag=Object.freeze({__proto__:null,HistoryStore:kn,MAX_NUMBER_OF_HISTORY_ELEMENTS:rg,MAX_VALUE_SIZE:ng,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:og,STORE_KEY:Za,default:kn}),LP=(e,t)=>v(void 0,void 0,void 0,function*(){return e===G.view?(yield QP(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),QP=e=>v(void 0,void 0,void 0,function*(){let t=new kn,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),wc,UP=new Uint8Array(16);function BP(){if(!wc&&(wc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!wc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return wc(UP)}var jP=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Ec(e){return typeof e=="string"&&jP.test(e)}var Ee=[];for(let e=0;e<256;++e)Ee.push((e+256).toString(16).slice(1));function ig(e,t=0){return(Ee[e[t+0]]+Ee[e[t+1]]+Ee[e[t+2]]+Ee[e[t+3]]+"-"+Ee[e[t+4]]+Ee[e[t+5]]+"-"+Ee[e[t+6]]+Ee[e[t+7]]+"-"+Ee[e[t+8]]+Ee[e[t+9]]+"-"+Ee[e[t+10]]+Ee[e[t+11]]+Ee[e[t+12]]+Ee[e[t+13]]+Ee[e[t+14]]+Ee[e[t+15]]).toLowerCase()}function _P(e){if(!Ec(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}function $P(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var zP="6ba7b810-9dad-11d1-80b4-00c04fd430c8",WP="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function KP(e,t,r){function o(n,a,i,c){var u;if(typeof n=="string"&&(n=$P(n)),typeof a=="string"&&(a=_P(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 ig(s)}try{o.name=e}catch{}return o.DNS=zP,o.URL=WP,o}var HP=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),_f={randomUUID:HP};function Mo(e,t,r){if(_f.randomUUID&&!t&&!e)return _f.randomUUID();e=e||{};let o=e.random||(e.rng||BP)();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 ig(o)}function GP(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 Kl(e,t){return e<<t|e>>>32-t}function YP(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]=Kl(c[m-3]^c[m-8]^c[m-14]^c[m-16],1);let u=r[0],s=r[1],l=r[2],d=r[3],p=r[4];for(let m=0;m<80;++m){let f=Math.floor(m/20),g=Kl(u,5)+GP(f,s,l,d)+p+t[f]+c[m]>>>0;p=d,d=l,l=Kl(s,30)>>>0,s=u,u=g}r[0]=r[0]+u>>>0,r[1]=r[1]+s>>>0,r[2]=r[2]+l>>>0,r[3]=r[3]+d>>>0,r[4]=r[4]+p>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var JP=KP("v5",80,YP),$f=JP,cg="2.30.43",zf=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,ei={pageview:"pageview",event:"event"},Tc=class{constructor({client:t,uuidGenerator:r=Mo}){this.client=t,this.uuidGenerator=r}},Xl=class extends Tc{constructor({client:t,uuidGenerator:r=Mo}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=zf(window.location),this.lastReferrer=Tn()?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:Tn()?document.title:"",encoding:Tn()?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===ei.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===ei.pageview?this.nextPageViewId:this.pageViewId,referrer:t===ei.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===ei.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 zf(window.location)}},Wr=class e{constructor(t,r){if(!Ec(t))throw Error("Not a valid uuid");this.clientId=t,this.creationDate=Math.floor(r/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime}validate(t,r){return!this.expired&&this.matchReferrer(t,r)}matchReferrer(t,r){try{let o=new URL(t);return r.some(n=>new RegExp(n.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(o.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[o,n]=r;if(o.length!==32||isNaN(parseInt(n)))return null;let a=o.substring(0,8)+"-"+o.substring(8,12)+"-"+o.substring(12,16)+"-"+o.substring(16,20)+"-"+o.substring(20,32);return Ec(a)?new e(a,Number.parseInt(n)*1e3):null}};Wr.cvo_cid="cvo_cid";Wr.expirationTime=120;var Zl=class extends Tc{constructor({client:t,uuidGenerator:r=Mo}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return v(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),o=yield this.client.getCurrentVisitorId();return r.searchParams.set(Wr.cvo_cid,new Wr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Zl.Id="link";var yt=Object.keys;function Ic(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Hl=128,sg=192,Wf=224,Kf=240;function XP(e){return(e&248)===Kf?4:(e&Kf)===Wf?3:(e&Wf)===sg?2:1}function ZP(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&Hl)!=Hl)break;if(r-=3,(o&sg)!=Hl){t-r>=XP(o)*3&&(r=t);break}}return e.substring(0,r)}var ed={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"},eA=yt(ed).map(e=>ed[e]),tA=[...eA].join("|"),rA=new RegExp(`^(${tA}$)`),oA={svcAction:"svc_action",svcActionData:"svc_action_data"},nA=e=>yt(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=ed[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),aA=e=>rA.test(e),iA=[aA],Hf={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Gf={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ne={action:"pa",list:"pal",listSource:"pls"},Oc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},cA=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],td={id:"quoteId",affiliation:"quoteAffiliation"},rd={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},sA={add:Ne,bookmark_add:Ne,bookmark_remove:Ne,click:Ne,checkout:Ne,checkout_option:Ne,detail:Ne,impression:Ne,remove:Ne,refund:Object.assign(Object.assign({},Ne),Oc),purchase:Object.assign(Object.assign({},Ne),Oc),quickview:Ne,quote:Object.assign(Object.assign({},Ne),td),review:Object.assign(Object.assign({},Ne),rd)},uA=yt(Hf).map(e=>Hf[e]),lA=yt(Gf).map(e=>Gf[e]),dA=yt(Ne).map(e=>Ne[e]),mA=yt(Oc).map(e=>Oc[e]),pA=yt(rd).map(e=>rd[e]),fA=yt(td).map(e=>td[e]),gA=[...uA,"custom"].join("|"),yA=[...lA,"custom"].join("|"),ug="(pr[0-9]+)",lg="(il[0-9]+pi[0-9]+)",hA=new RegExp(`^${ug}(${gA})$`),SA=new RegExp(`^(${lg}(${yA}))|(il[0-9]+nm)$`),CA=new RegExp(`^(${dA.join("|")})$`),xA=new RegExp(`^(${mA.join("|")})$`),RA=new RegExp(`^${ug}custom$`),FA=new RegExp(`^${lg}custom$`),PA=new RegExp(`^(${[...cA,...pA,...fA].join("|")})$`),AA=e=>hA.test(e),vA=e=>SA.test(e),bA=e=>CA.test(e),wA=e=>xA.test(e),IA=e=>PA.test(e),EA=[vA,AA,bA,wA,IA],TA=[RA,FA],OA={anonymizeIp:"aip"},qA={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},kA={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},VA=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],DA=Object.assign(Object.assign(Object.assign(Object.assign({},OA),qA),kA),VA.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),od=Object.assign(Object.assign({},DA),oA),NA=e=>{let t=!!e.action&&sA[e.action]||{};return yt(e).reduce((r,o)=>{let n=t[o]||od[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},MA=yt(od).map(e=>od[e]),LA=e=>MA.indexOf(e)!==-1,QA=e=>e==="custom",UA=e=>[...EA,...iA,LA,QA].some(t=>t(e)),BA=e=>yt(e).reduce((t,r)=>{let o=jA(r);return o?Object.assign(Object.assign({},t),_A(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),jA=e=>{let t;return[...TA].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},_A=(e,t)=>yt(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),nd=class{constructor(t){this.opts=t}sendEvent(t,r){return v(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:o,preprocessRequest:n}=this.opts,a=yield this.getQueryParamsForEventType(t),{url:i,payload:c}=yield this.preProcessRequestAsPotentialJSONString(`${o}/analytics/${t}?${a}`,r,n),u=this.encodeForEventType(t,c),s=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,s)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,o){return v(this,void 0,void 0,function*(){let n=t,a=r;if(o){let i=yield o({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:c,body:u}=i;n=c||t;try{a=JSON.parse(u)}catch(s){console.error("Unable to process the request body as a JSON string",s)}}return{payload:a,url:n}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return v(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:o}=this.opts,n=yield o.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",n?`visitorId=${n}`:"","discardVisitInfo=true"].filter(a=>!!a).join("&")})}isEventTypeLegacy(t){return[G.click,G.custom,G.search,G.view].indexOf(t)!==-1}encodeEventToJson(t,r,o){let n=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return o&&(n=`access_token=${encodeURIComponent(o)}&${n}`),n}},ad=class{sendEvent(t,r){return v(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return v(this,void 0,void 0,function*(){return Promise.resolve()})}},Yf=globalThis.fetch,qc=class{constructor(t){this.opts=t}sendEvent(t,r){return v(this,void 0,void 0,function*(){let{baseUrl:o,visitorIdProvider:n,preprocessRequest:a}=this.opts,i=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",c={url:`${o}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},c),a?yield a(c,"analyticsFetch"):{}),{url:s}=u,l=Cr(u,["url"]),d;try{d=yield Yf(s,l)}catch(p){console.error("An error has occured when sending the event.",p);return}if(d.ok){let p=yield d.json();return p.visitorId&&n.setCurrentVisitorId(p.visitorId),p}else{try{d.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,d,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return v(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Yf(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[G.click,G.custom,G.search,G.view].indexOf(t)!==-1}getVisitorIdParam(){return v(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},id=class{constructor(t,r){Yl()&&tg()?this.storage=new Jl:Yl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new qn),this.client=new qc(t),this.beaconClient=new nd(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}},cd=class{constructor(t,r){this.storage=r||new qn,this.client=new qc(t)}getClientDependingOnEventType(t){return this.client}},kc=class{constructor(){this.storage=new qn,this.client=new ad}getClientDependingOnEventType(t){return this.client}},$A="xx",zA=e=>e?.startsWith($A)||!1,WA=`
19
+ If you are trying to access the inner state... Don't`),Reflect.get(t,r,o)}});var Ep=require("@coveo/bueno");function ve(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 VR=typeof Symbol=="function"&&Symbol.observable||"@@observable",Ym=VR,el=()=>Math.random().toString(36).substring(7).split("").join("."),DR={INIT:`@@redux/INIT${el()}`,REPLACE:`@@redux/REPLACE${el()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${el()}`},Bi=DR;function Qt(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 tl(e,t,r){if(typeof e!="function")throw new Error(ve(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(ve(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(ve(1));return r(tl)(e,t)}let o=e,n=t,a=new Map,i=a,c=0,u=!1;function s(){i===a&&(i=new Map,a.forEach((S,x)=>{i.set(x,S)}))}function l(){if(u)throw new Error(ve(3));return n}function d(S){if(typeof S!="function")throw new Error(ve(4));if(u)throw new Error(ve(5));let x=!0;s();let y=c++;return i.set(y,S),function(){if(x){if(u)throw new Error(ve(6));x=!1,s(),i.delete(y),a=null}}}function p(S){if(!Qt(S))throw new Error(ve(7));if(typeof S.type>"u")throw new Error(ve(8));if(typeof S.type!="string")throw new Error(ve(17));if(u)throw new Error(ve(9));try{u=!0,n=o(n,S)}finally{u=!1}return(a=i).forEach(y=>{y()}),S}function m(S){if(typeof S!="function")throw new Error(ve(10));o=S,p({type:Bi.REPLACE})}function f(){let S=d;return{subscribe(x){if(typeof x!="object"||x===null)throw new Error(ve(11));function y(){let P=x;P.next&&P.next(l())}return y(),{unsubscribe:S(y)}},[Ym](){return this}}}return p({type:Bi.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[Ym]:f}}function NR(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:Bi.INIT})>"u")throw new Error(ve(12));if(typeof r(void 0,{type:Bi.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ve(13))})}function Xo(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{NR(r)}catch(i){a=i}return function(c={},u){if(a)throw a;let s=!1,l={};for(let d=0;d<o.length;d++){let p=o[d],m=r[p],f=c[p],g=m(f,u);if(typeof g>"u"){let S=u&&u.type;throw new Error(ve(14))}l[p]=g,s=s||g!==f}return s=s||o.length!==Object.keys(c).length,s?l:c}}function Zo(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function Jm(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(ve(15))},i={getState:n.getState,dispatch:(u,...s)=>a(u,...s)},c=e.map(u=>u(i));return a=Zo(...c)(n.dispatch),{...n,dispatch:a}}}function ji(e){return Qt(e)&&"type"in e&&typeof e.type=="string"}var dl=Symbol.for("immer-nothing"),Ea=Symbol.for("immer-draftable"),He=Symbol.for("immer-state");function be(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ro=Object.getPrototypeOf;function nt(e){return!!e&&!!e[He]}function Ge(e){return e?rp(e)||Array.isArray(e)||!!e[Ea]||!!e.constructor?.[Ea]||Va(e)||Da(e):!1}var MR=Object.prototype.constructor.toString();function rp(e){if(!e||typeof e!="object")return!1;let t=Ro(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)===MR}function ml(e){return nt(e)||be(15,e),e[He].base_}function Ta(e,t){Fo(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function Fo(e){let t=e[He];return t?t.type_:Array.isArray(e)?1:Va(e)?2:Da(e)?3:0}function Oa(e,t){return Fo(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function rl(e,t){return Fo(e)===2?e.get(t):e[t]}function op(e,t,r){let o=Fo(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function LR(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Va(e){return e instanceof Map}function Da(e){return e instanceof Set}function xo(e){return e.copy_||e.base_}function al(e,t){if(Va(e))return new Map(e);if(Da(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=rp(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[He];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(Ro(e),o)}else{let o=Ro(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function zi(e,t=!1){return Wi(e)||nt(e)||!Ge(e)||(Fo(e)>1&&(e.set=e.add=e.clear=e.delete=QR),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>zi(o,!0))),e}function QR(){be(2)}function Wi(e){return Object.isFrozen(e)}var il={};function Po(e){let t=il[e];return t||be(0,e),t}function UR(e,t){il[e]||(il[e]=t)}var qa;function np(){return qa}function BR(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Xm(e,t){t&&(Po("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function cl(e){sl(e),e.drafts_.forEach(jR),e.drafts_=null}function sl(e){e===qa&&(qa=e.parent_)}function Zm(e){return qa=BR(qa,e)}function jR(e){let t=e[He];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ep(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[He].modified_&&(cl(t),be(4)),Ge(e)&&(e=_i(t,e),t.parent_||$i(t,e)),t.patches_&&Po("Patches").generateReplacementPatches_(r[He].base_,e,t.patches_,t.inversePatches_)):e=_i(t,r,[]),cl(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==dl?e:void 0}function _i(e,t,r){if(Wi(t))return t;let o=t[He];if(!o)return Ta(t,(n,a)=>tp(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return $i(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),Ta(a,(c,u)=>tp(e,o,n,c,u,r,i)),$i(e,n,!1),r&&e.patches_&&Po("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function tp(e,t,r,o,n,a,i){if(nt(n)){let c=a&&t&&t.type_!==3&&!Oa(t.assigned_,o)?a.concat(o):void 0,u=_i(e,n,c);if(op(r,o,u),nt(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(Ge(n)&&!Wi(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;_i(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&$i(e,n)}}function $i(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&zi(t,r)}function _R(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:np(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=pl;r&&(n=[o],a=ka);let{revoke:i,proxy:c}=Proxy.revocable(n,a);return o.draft_=c,o.revoke_=i,c}var pl={get(e,t){if(t===He)return e;let r=xo(e);if(!Oa(r,t))return $R(e,r,t);let o=r[t];return e.finalized_||!Ge(o)?o:o===ol(e.base_,t)?(nl(e),e.copy_[t]=ll(o,e)):o},has(e,t){return t in xo(e)},ownKeys(e){return Reflect.ownKeys(xo(e))},set(e,t,r){let o=ap(xo(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=ol(xo(e),t),a=n?.[He];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(LR(r,n)&&(r!==void 0||Oa(e.base_,t)))return!0;nl(e),ul(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 ol(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,nl(e),ul(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=xo(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:o.enumerable,value:r[t]}},defineProperty(){be(11)},getPrototypeOf(e){return Ro(e.base_)},setPrototypeOf(){be(12)}},ka={};Ta(pl,(e,t)=>{ka[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ka.deleteProperty=function(e,t){return ka.set.call(this,e,t,void 0)};ka.set=function(e,t,r){return pl.set.call(this,e[0],t,r,e[0])};function ol(e,t){let r=e[He];return(r?xo(r):e)[t]}function $R(e,t,r){let o=ap(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function ap(e,t){if(!(t in e))return;let r=Ro(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Ro(r)}}function ul(e){e.modified_||(e.modified_=!0,e.parent_&&ul(e.parent_))}function nl(e){e.copy_||(e.copy_=al(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var zR=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"&&be(6),o!==void 0&&typeof o!="function"&&be(7);let n;if(Ge(t)){let a=Zm(this),i=ll(t,void 0),c=!0;try{n=r(i),c=!1}finally{c?cl(a):sl(a)}return Xm(a,o),ep(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===dl&&(n=void 0),this.autoFreeze_&&zi(n,!0),o){let a=[],i=[];Po("Patches").generateReplacementPatches_(t,n,a,i),o(a,i)}return n}else be(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){Ge(e)||be(8),nt(e)&&(e=ip(e));let t=Zm(this),r=ll(e,void 0);return r[He].isManual_=!0,sl(t),r}finishDraft(e,t){let r=e&&e[He];(!r||!r.isManual_)&&be(9);let{scope_:o}=r;return Xm(o,t),ep(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=Po("Patches").applyPatches_;return nt(e)?o(e,t):this.produce(e,n=>o(n,t))}};function ll(e,t){let r=Va(e)?Po("MapSet").proxyMap_(e,t):Da(e)?Po("MapSet").proxySet_(e,t):_R(e,t);return(t?t.scope_:np()).drafts_.push(r),r}function ip(e){return nt(e)||be(10,e),cp(e)}function cp(e){if(!Ge(e)||Wi(e))return e;let t=e[He],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=al(e,t.scope_.immer_.useStrictShallowCopy_)}else r=al(e,!0);return Ta(r,(o,n)=>{op(r,o,cp(n))}),t&&(t.finalized_=!1),r}function sp(){let t="replace",r="add",o="remove";function n(p,m,f,g){switch(p.type_){case 0:case 2:return i(p,m,f,g);case 1:return a(p,m,f,g);case 3:return c(p,m,f,g)}}function a(p,m,f,g){let{base_:S,assigned_:x}=p,y=p.copy_;y.length<S.length&&([S,y]=[y,S],[f,g]=[g,f]);for(let C=0;C<S.length;C++)if(x[C]&&y[C]!==S[C]){let P=m.concat([C]);f.push({op:t,path:P,value:d(y[C])}),g.push({op:t,path:P,value:d(S[C])})}for(let C=S.length;C<y.length;C++){let P=m.concat([C]);f.push({op:r,path:P,value:d(y[C])})}for(let C=y.length-1;S.length<=C;--C){let P=m.concat([C]);g.push({op:o,path:P})}}function i(p,m,f,g){let{base_:S,copy_:x}=p;Ta(p.assigned_,(y,C)=>{let P=rl(S,y),O=rl(x,y),A=C?Oa(S,y)?t:r:o;if(P===O&&A===t)return;let F=m.concat(y);f.push(A===o?{op:A,path:F}:{op:A,path:F,value:O}),g.push(A===r?{op:o,path:F}:A===o?{op:r,path:F,value:d(P)}:{op:t,path:F,value:d(P)})})}function c(p,m,f,g){let{base_:S,copy_:x}=p,y=0;S.forEach(C=>{if(!x.has(C)){let P=m.concat([y]);f.push({op:o,path:P,value:C}),g.unshift({op:r,path:P,value:C})}y++}),y=0,x.forEach(C=>{if(!S.has(C)){let P=m.concat([y]);f.push({op:r,path:P,value:C}),g.unshift({op:o,path:P,value:C})}y++})}function u(p,m,f,g){f.push({op:t,path:[],value:m===dl?void 0:m}),g.push({op:t,path:[],value:p})}function s(p,m){return m.forEach(f=>{let{path:g,op:S}=f,x=p;for(let O=0;O<g.length-1;O++){let A=Fo(x),F=g[O];typeof F!="string"&&typeof F!="number"&&(F=""+F),(A===0||A===1)&&(F==="__proto__"||F==="constructor")&&be(19),typeof x=="function"&&F==="prototype"&&be(19),x=rl(x,F),typeof x!="object"&&be(18,g.join("/"))}let y=Fo(x),C=l(f.value),P=g[g.length-1];switch(S){case t:switch(y){case 2:return x.set(P,C);case 3:be(16);default:return x[P]=C}case r:switch(y){case 1:return P==="-"?x.push(C):x.splice(P,0,C);case 2:return x.set(P,C);case 3:return x.add(C);default:return x[P]=C}case o:switch(y){case 1:return x.splice(P,1);case 2:return x.delete(P);case 3:return x.delete(f.value);default:return delete x[P]}default:be(17,S)}}),p}function l(p){if(!Ge(p))return p;if(Array.isArray(p))return p.map(l);if(Va(p))return new Map(Array.from(p.entries()).map(([f,g])=>[f,l(g)]));if(Da(p))return new Set(Array.from(p).map(l));let m=Object.create(Ro(p));for(let f in p)m[f]=l(p[f]);return Oa(p,Ea)&&(m[Ea]=p[Ea]),m}function d(p){return nt(p)?l(p):p}UR("Patches",{applyPatches_:s,generatePatches_:n,generateReplacementPatches_:u})}var at=new zR,pr=at.produce,Ki=at.produceWithPatches.bind(at),iq=at.setAutoFreeze.bind(at),cq=at.setUseStrictShallowCopy.bind(at),fl=at.applyPatches.bind(at),sq=at.createDraft.bind(at),uq=at.finishDraft.bind(at);function WR(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function KR(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function HR(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 up=e=>Array.isArray(e)?e:[e];function GR(e){let t=Array.isArray(e[0])?e[0]:e;return HR(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function YR(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var mq=Symbol();var pq=Object.getPrototypeOf({});var JR=class{constructor(e){this.value=e}deref(){return this.value}},XR=typeof WeakRef<"u"?WeakRef:JR,ZR=0,lp=1;function Hi(){return{s:ZR,v:void 0,o:null,p:null}}function en(e,t={}){let r=Hi(),{resultEqualityCheck:o}=t,n,a=0;function i(){let c=r,{length:u}=arguments;for(let d=0,p=u;d<p;d++){let m=arguments[d];if(typeof m=="function"||typeof m=="object"&&m!==null){let f=c.o;f===null&&(c.o=f=new WeakMap);let g=f.get(m);g===void 0?(c=Hi(),f.set(m,c)):c=g}else{let f=c.p;f===null&&(c.p=f=new Map);let g=f.get(m);g===void 0?(c=Hi(),f.set(m,c)):c=g}}let s=c,l;if(c.s===lp)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 XR(l):l}return s.s=lp,s.v=l,l}return i.clearCache=()=>{r=Hi(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function dp(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...n)=>{let a=0,i=0,c,u={},s=n.pop();typeof s=="object"&&(u=s,s=n.pop()),WR(s,`createSelector expects an output function after the inputs, but received: [${typeof s}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=en,argsMemoizeOptions:f=[],devModeChecks:g={}}=l,S=up(p),x=up(f),y=GR(n),C=d(function(){return a++,s.apply(null,arguments)},...S),P=!0,O=m(function(){i++;let F=YR(y,arguments);return c=C.apply(null,F),c},...x);return Object.assign(O,{resultFunc:s,memoizedResultFunc:C,dependencies:y,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>c,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var N=dp(en),eF=Object.assign((e,t=N)=>{KR(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:()=>eF});function mp(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var pp=mp(),fp=mp;var tF=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Zo:Zo.apply(null,arguments)},Pq=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},rF=e=>e&&typeof e.match=="function";function h(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(vt(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=>ji(o)&&o.type===e,r}var Cp=class Na extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Na.prototype)}static get[Symbol.species](){return Na}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Na(...t[0].concat(this)):new Na(...t.concat(this))}};function gp(e){return Ge(e)?pr(e,()=>{}):e}function yp(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function oF(e){return typeof e=="boolean"}var nF=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new Cp;return r&&(oF(r)?i.push(pp):i.push(fp(r.extraArgument))),i},Or="RTK_autoBatch",rn=()=>e=>({payload:e,meta:{[Or]:!0}}),hp=e=>t=>{setTimeout(t,e)},aF=(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:hp(10):e.type==="callback"?e.queueNotification:hp(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?.[Or],a=!n,a&&(i||(i=!0,u(s))),o.dispatch(l)}finally{n=!0}}})},iF=e=>function(r){let{autoBatch:o=!0}=r??{},n=new Cp(e);return o&&n.push(aF(typeof o=="object"?o:void 0)),n};function xp(e){let t=nF(),{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(Qt(r))c=Xo(r);else throw new Error(vt(1));let u;typeof o=="function"?u=o(t):u=t();let s=Zo;n&&(s=tF({trace:!1,...typeof n=="object"&&n}));let l=Jm(...u),d=iF(l),p=typeof i=="function"?i(d):d(),m=s(...p);return tl(c,a,m)}function Rp(e){let t={},r=[],o,n={addCase(a,i){let c=typeof a=="string"?a:a.type;if(!c)throw new Error(vt(28));if(c in t)throw new Error(vt(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 cF(e){return typeof e=="function"}function B(e,t){let[r,o,n]=Rp(t),a;if(cF(e))a=()=>gp(e());else{let c=gp(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(nt(l)){let m=d(l,u);return m===void 0?l:m}else{if(Ge(l))return pr(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 Fp=(e,t)=>rF(e)?e.match(t):e(t);function Ut(...e){return t=>e.some(r=>Fp(r,t))}function tn(...e){return t=>e.every(r=>Fp(r,t))}function Yi(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 Ma(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Ji(...e){return e.length===0?t=>Yi(t,["pending"]):Ma(e)?Ut(...e.map(t=>t.pending)):Ji()(e[0])}function Ao(...e){return e.length===0?t=>Yi(t,["rejected"]):Ma(e)?Ut(...e.map(t=>t.rejected)):Ao()(e[0])}function La(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?tn(Ao(...e),t):Ma(e)?tn(Ao(...e),t):La()(e[0])}function fr(...e){return e.length===0?t=>Yi(t,["fulfilled"]):Ma(e)?Ut(...e.map(t=>t.fulfilled)):fr()(e[0])}function Xi(...e){return e.length===0?t=>Yi(t,["pending","fulfilled","rejected"]):Ma(e)?Ut(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Xi()(e[0])}var sF="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Zi=(e=21)=>{let t="",r=e;for(;r--;)t+=sF[Math.random()*64|0];return t},uF=["name","message","stack","code"],gl=class{constructor(e,t){Oe(this,"_type");this.payload=e,this.meta=t}},Sp=class{constructor(e,t){Oe(this,"_type");this.payload=e,this.meta=t}},lF=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of uF)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},_=(()=>{function e(t,r,o){let n=h(t+"/fulfilled",(u,s,l,d)=>({payload:u,meta:{...d||{},arg:l,requestId:s,requestStatus:"fulfilled"}})),a=h(t+"/pending",(u,s,l)=>({payload:void 0,meta:{...l||{},arg:s,requestId:u,requestStatus:"pending"}})),i=h(t+"/rejected",(u,s,l,d,p)=>({payload:d,error:(o&&o.serializeError||lF)(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):Zi(),m=new AbortController,f,g;function S(y){g=y,m.abort()}let x=async function(){let y;try{let P=o?.condition?.(u,{getState:l,extra:d});if(mF(P)&&(P=await P),P===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let O=new Promise((A,F)=>{f=()=>{F({name:"AbortError",message:g||"Aborted"})},m.signal.addEventListener("abort",f)});s(a(p,u,o?.getPendingMeta?.({requestId:p,arg:u},{getState:l,extra:d}))),y=await Promise.race([O,Promise.resolve(r(u,{dispatch:s,getState:l,extra:d,requestId:p,signal:m.signal,abort:S,rejectWithValue:(A,F)=>new gl(A,F),fulfillWithValue:(A,F)=>new Sp(A,F)})).then(A=>{if(A instanceof gl)throw A;return A instanceof Sp?n(A.payload,p,u,A.meta):n(A,p,u)})])}catch(P){y=P instanceof gl?i(null,p,u,P.payload,P.meta):i(P,p,u)}finally{f&&m.signal.removeEventListener("abort",f)}return o&&!o.dispatchConditionRejection&&i.match(y)&&y.meta.condition||s(y),y}();return Object.assign(x,{abort:S,requestId:p,arg:u,unwrap(){return x.then(dF)}})}}return Object.assign(c,{pending:a,rejected:i,fulfilled:n,settled:Ut(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function dF(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function mF(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Pp=Symbol.for("rtk-slice-createasyncthunk"),Iq={[Pp]:_};function pF(e,t){return`${e}/${t}`}function fF({creators:e}={}){let t=e?.asyncThunk?.[Pp];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(vt(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(yF()):o.reducers)||{},c=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(y,C){let P=typeof y=="string"?y:y.type;if(!P)throw new Error(vt(12));if(P in u.sliceCaseReducersByType)throw new Error(vt(13));return u.sliceCaseReducersByType[P]=C,s},addMatcher(y,C){return u.sliceMatchers.push({matcher:y,reducer:C}),s},exposeAction(y,C){return u.actionCreators[y]=C,s},exposeCaseReducer(y,C){return u.sliceCaseReducersByName[y]=C,s}};c.forEach(y=>{let C=i[y],P={reducerName:y,type:pF(n,y),createNotation:typeof o.reducers=="function"};SF(C)?xF(P,C,s,t):hF(P,C,s)});function l(){let[y={},C=[],P=void 0]=typeof o.extraReducers=="function"?Rp(o.extraReducers):[o.extraReducers],O={...y,...u.sliceCaseReducersByType};return B(o.initialState,A=>{for(let F in O)A.addCase(F,O[F]);for(let F of u.sliceMatchers)A.addMatcher(F.matcher,F.reducer);for(let F of C)A.addMatcher(F.matcher,F.reducer);P&&A.addDefaultCase(P)})}let d=y=>y,p=new Map,m;function f(y,C){return m||(m=l()),m(y,C)}function g(){return m||(m=l()),m.getInitialState()}function S(y,C=!1){function P(A){let F=A[y];return typeof F>"u"&&C&&(F=g()),F}function O(A=d){let F=yp(p,C,()=>new WeakMap);return yp(F,A,()=>{let E={};for(let[w,q]of Object.entries(o.selectors??{}))E[w]=gF(q,A,g,C);return E})}return{reducerPath:y,getSelectors:O,get selectors(){return O(P)},selectSlice:P}}let x={name:n,reducer:f,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:g,...S(a),injectInto(y,{reducerPath:C,...P}={}){let O=C??a;return y.inject({reducerPath:O,reducer:f},P),{...x,...S(O,!0)}}};return x}}function gF(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 vo=fF();function yF(){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 hF({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!CF(o))throw new Error(vt(17));a=o.reducer,i=o.prepare}else a=o;n.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?h(e,i):h(e))}function SF(e){return e._reducerDefinitionType==="asyncThunk"}function CF(e){return e._reducerDefinitionType==="reducerWithPrepare"}function xF({type:e,reducerName:t},r,o,n){if(!n)throw new Error(vt(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||Gi,pending:c||Gi,rejected:u||Gi,settled:s||Gi})}function Gi(){}var Ap="listener",vp="completed",bp="cancelled",Eq=`task-${bp}`,Tq=`task-${vp}`,Oq=`${Ap}-${bp}`,qq=`${Ap}-${vp}`;var{assign:wp}=Object;var yl="listenerMiddleware";var RF=wp(h(`${yl}/add`),{withTypes:()=>RF}),kq=h(`${yl}/removeAll`),FF=wp(h(`${yl}/remove`),{withTypes:()=>FF});var Vq=Symbol.for("rtk-state-proxy-original");function vt(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 qr=N(e=>e.commercePagination?.principal.perPage||0,e=>e),ec=N((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),kr=N(e=>e.commercePagination?.principal.totalEntries||0,e=>e),tc=N((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),rc=N(e=>e.commercePagination?.principal.page||0,e=>e),Ip=N((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);var zq=N(e=>e[Q].productListing.responseId,e=>e),Qa=N(e=>e.productListing.responseId,e=>e),Tp=N(e=>e.productListing.requestId,e=>e),Ua=N(e=>e.productListing?.products.length||0,e=>e),Op=N(e=>({total:kr(e),current:Ua(e)}),({current:e,total:t})=>e<t),qp=N(e=>e.productListing?.isLoading,e=>(0,Ep.isNullOrUndefined)(e)?!1:e),kp=N(e=>e.productListing?.error,e=>e??null);var Cl=require("@coveo/bueno");function hl(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function Sl(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 jt(e){let{activeValue:t,ancestryMap:r}=AF(e);return t?vF(t,r):[]}function AF(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 vF(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function Vp(){return{principal:Vr(),recommendations:{}}}function Vr(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}var wt=require("@coveo/bueno");var _t=require("@coveo/bueno"),pt=(r=>(r.Relevance="relevance",r.Fields="fields",r))(pt||{}),Dr=(r=>(r.Ascending="asc",r.Descending="desc",r))(Dr||{}),bt=()=>({by:"relevance"});var Gq=new _t.RecordValue({options:{required:!1},values:{by:new _t.EnumValue({enum:pt,required:!0}),fields:new _t.ArrayValue({each:new _t.RecordValue({values:{name:new _t.StringValue,direction:new _t.EnumValue({enum:Dr})}})})}});var Ba=e=>({by:"fields",fields:e}),Dp=new wt.RecordValue({options:{required:!1},values:{by:new wt.EnumValue({enum:pt,required:!0}),fields:new wt.ArrayValue({each:new wt.RecordValue({values:{field:new wt.StringValue({required:!0}),direction:new wt.EnumValue({enum:Dr}),displayName:new wt.StringValue}})})}});function bo(){return{appliedSort:bt(),availableSorts:[bt()]}}function oc(e){return{...bF(e?.commercePagination,t=>t.principal.page,Vr().page),...wF(e?.commercePagination,t=>t.principal.perPage,Vr().perPage),...Sl(e?.commerceSort,t=>t.appliedSort,bo().appliedSort),...Bt(e.commerceFacetSet,Nr(e,"regular"),IF,"f"),...Bt(e.commerceFacetSet,Nr(e,"regular"),EF,"fExcluded"),...Bt(e.commerceFacetSet,Nr(e,"location"),TF,"lf"),...Bt(e.commerceFacetSet,Nr(e,"hierarchical"),OF,"cf"),...Bt(e.commerceFacetSet,Nr(e,"dateRange"),Np,"df"),...Bt(e.commerceFacetSet,Nr(e,"dateRange"),Mp,"dfExcluded"),...Bt(e.commerceFacetSet,Nr(e,"numericalRange"),Np,"nf"),...Bt(e.commerceFacetSet,Nr(e,"numericalRange"),Mp,"nfExcluded"),...Lp("selected",e.manualNumericFacetSet),...Lp("excluded",e.manualNumericFacetSet)}}function bF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function wF(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function IF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function EF(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function TF(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function Np(e){return e.values.filter(t=>t.state==="selected")}function Mp(e){return e.values.filter(t=>t.state==="excluded")}function Lp(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 OF(e){return jt(e.values).map(r=>r.value)}function Nr(e,t){return r=>e.commerceFacetSet[r].request.type===t}var nc=()=>({query:""});var Sk=N(e=>e[Q].commerceSearch.responseId,e=>e),ja=N(e=>e.commerceSearch.responseId,e=>e),Qp=N(e=>e.commerceSearch.requestId,e=>e),_a=N(e=>e.commerceSearch?.products.length||0,e=>e),Up=N(e=>({total:kr(e),current:_a(e)}),({current:e,total:t})=>e<t),Bp=N(e=>e.commerceSearch?.isLoading,e=>(0,Cl.isNullOrUndefined)(e)?!1:e),jp=N(e=>e.commerceSearch?.error,e=>e??null),ac=N(e=>e.commerceQuery?.query,e=>e??""),qF=N(e=>e.commerceSearch?.queryExecuted,e=>e),_p=(e,t)=>(0,Cl.isNullOrUndefined)(t.queryCorrection?.correctedQuery)?ac(e):t.queryCorrection.correctedQuery,$p=e=>({...hl(e?.commerceQuery,t=>t.query,nc().query),...oc(e)});function zp(e){return{query:qF(e)||""}}var xl;(t=>t.responseIdSelector=Wp(ja))(xl||(xl={}));var Rl;(t=>t.responseIdSelector=Wp(Qa))(Rl||(Rl={}));function Wp(e){return t=>e(t[Q])}var vl={};Zu(vl,{escape:()=>on,getHighlightedSuggestion:()=>Al,highlightString:()=>VF});var Gp=require("@coveo/bueno");var wo=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function Kp(e){return Array.isArray(e)}function ic(e){return e.trim()===""}function Hp(e){let t={};for(let[r,o]of e)t[r]=o;return t}function $a(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function VF(e){if(ic(e.openingDelimiter)||ic(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if((0,Gp.isNullOrUndefined)(e.content)||ic(e.content))return e.content;if(e.highlights.length===0)return on(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+=on(e.content.slice(o,i)),r+=e.openingDelimiter,r+=on(e.content.slice(i,c)),r+=e.closingDelimiter,o=c}return o!==t&&(r+=on(e.content.slice(o))),r}function Al(e,t){return e=on(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,o,n,a)=>o?Pl(o,t.notMatchDelimiters):n?Pl(n,t.exactMatchDelimiters):a?Pl(a,t.correctionDelimiters):r)}function Pl(e,t){return t?t.open+e+t.close:e}function on(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 sf=Lt(of(),1);var iP="recommendation-internal-options",Ok=Symbol.for(iP);var $=new Error("Failed to load reducers."),nn=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var Eo=class extends Error{constructor(r,o){super();Oe(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function nf(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function af(e){return typeof e!="object"||!e?!1:Object.values(e).every(cP)}function cP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function cf(e){return e===429}var an=class e{static async call(t){let r=sP(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(cf(u.status))throw u;return u};try{let u=await(0,sf.backOff)(c,{retry:s=>{let l=s&&cf(s.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new nn;case 404:throw new Eo(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new Eo(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:c,...u}=t,s=$a(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 we(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function ft(e,t="prod"){return`${we(e,t)}/rest/search/v2`}function sc(e,t="prod"){return`${we(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function sP(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,c=e.method==="POST"||e.method==="PUT",u=uP(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...c&&{body:u},signal:i}}function uP(e,t){return t==="application/x-www-form-urlencoded"?af(e)?nf(e):"":JSON.stringify(e)}function lP(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function dP(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Vl(e,t){if(t&&e.name==="AbortError")return{error:dP(e)};if(e instanceof Eo)return{error:lP(e)};throw e}var cn=(e,t)=>({...Ka(e,t),requestParams:mP(e)}),mP=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}},Ka=(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 uf=(e,t)=>({...Ka(e,t),requestParams:pP(e)}),pP=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 lf=e=>({...Ka(e,"search/querySuggest"),requestParams:fP(e)}),fP=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 qe=e=>e.error!==void 0,uc=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...cn(t,"listing"),...this.options})}async search(t){let r=cn(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...uf(t,"recommendations"),...this.options})}async productSuggestions(t){let r=cn(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=lf(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=cn(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=cn(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await an.call(t);if(r instanceof Error)return Vl(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function sn(e,t="prod"){return`${we(e,t)}/rest/organizations/${e}/commerce/v2`}var lc=e=>e;var Ml=require("@coveo/bueno");var Ye=require("@coveo/bueno"),T=new Ye.StringValue({required:!0,emptyAllowed:!1}),re=new Ye.StringValue({required:!1,emptyAllowed:!1}),fe=new Ye.StringValue({required:!0,emptyAllowed:!0}),df=new Ye.StringValue({required:!1,emptyAllowed:!0}),mf=new Ye.ArrayValue({each:T,required:!0}),pf=new Ye.StringValue({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),je=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),he=(e,t)=>{if("required"in t)return{payload:new Ye.Schema({value:t}).validate({value:e}).value};let n=new Ye.RecordValue({options:{required:!0},values:t}).validate(e);if(n)throw new Ye.SchemaValidationError(n);return{payload:e}},R=(e,t)=>{try{return he(e,t)}catch(r){return{payload:e,error:je(r)}}},Je=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return ff(e,t,r,n,"Controller initialization error")},_e=(e,t,r,o)=>{let n=`Check the options of ${o}`;return ff(e,t,r,n,"Controller initialization error")},ff=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};var $e=require("@coveo/bueno");var un="3.16.1-pre.3f4a309ff4",gf=["@coveo/atomic","@coveo/quantic"];var Dl=()=>re,yf=()=>T,To=h("configuration/updateBasicConfiguration",e=>R(e,{accessToken:re,environment:new $e.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:re})),hf=h("configuration/updateSearchConfiguration",e=>R(e,{proxyBaseUrl:new $e.StringValue({required:!1,url:!0}),pipeline:new $e.StringValue({required:!1,emptyAllowed:!0}),searchHub:re,timezone:re,locale:re,authenticationProviders:new $e.ArrayValue({required:!1,each:T})})),ln={enabled:new $e.BooleanValue({default:!0}),originContext:Dl(),originLevel2:Dl(),originLevel3:Dl(),proxyBaseUrl:new $e.StringValue({required:!1,url:!0}),runtimeEnvironment:new $e.Value,anonymous:new $e.BooleanValue({default:!1}),deviceId:re,userDisplayName:re,documentLocation:re,trackingId:re,analyticsMode:new $e.StringValue({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new $e.RecordValue({options:{required:!1},values:gf.reduce((e,t)=>(e[t]=pf,e),{})})},Nl=h("configuration/updateAnalyticsConfiguration",e=>R(e,ln)),dc=h("configuration/analytics/disable"),mc=h("configuration/analytics/enable"),Sf=h("configuration/analytics/originlevel2",e=>R(e,{originLevel2:yf()})),Cf=h("configuration/analytics/originlevel3",e=>R(e,{originLevel3:yf()}));var dn=h("commerce/configuration/updateBasicConfiguration",e=>R(e,{accessToken:re,environment:new Ml.StringValue({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:re})),mn=h("commerce/configuration/updateProxyBaseUrl",e=>R(e,{proxyBaseUrl:new Ml.StringValue({required:!1,url:!0})})),pn=h("commerce/configuration/updateAnalyticsConfiguration",e=>R(e,{enabled:ln.enabled,proxyBaseUrl:ln.proxyBaseUrl,source:ln.source,trackingId:ln.trackingId})),pc=h("commerce/configuration/analytics/disable"),fc=h("commerce/configuration/analytics/enable");var Mr=require("@coveo/bueno");var xf=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var Ll=B(xf(),e=>e.addCase(dn,(t,r)=>{Rf(t,r.payload)}).addCase(To,(t,r)=>{Rf(t,r.payload)}).addCase(mn,(t,r)=>{gP(t,r.payload)}).addCase(pn,(t,r)=>{yP(t,r.payload)}).addCase(pc,t=>{t.analytics.enabled=!1}).addCase(fc,t=>{t.analytics.enabled=!0}));function Rf(e,t){(0,Mr.isNullOrUndefined)(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",(0,Mr.isNullOrUndefined)(t.organizationId)||(e.organizationId=t.organizationId)}function gP(e,t){(0,Mr.isNullOrUndefined)(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function yP(e,t){(0,Mr.isNullOrUndefined)(t.enabled)||(e.analytics.enabled=t.enabled),(0,Mr.isNullOrUndefined)(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),(0,Mr.isNullOrUndefined)(t.source)||(e.analytics.source=t.source),(0,Mr.isNullOrUndefined)(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function fn(e){return e.currency}var Ff=(e,t)=>({currency:fn(t.commerceContext),products:hP(t.cart),transaction:e}),Pf=(e,t)=>({currency:fn(t.commerceContext),...e}),Oo=N(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),hP=N(Oo,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));var It=require("@coveo/bueno");var Ql={productId:T,quantity:new It.NumberValue({required:!0,min:0}),name:new It.StringValue({required:!1}),price:new It.NumberValue({required:!1,min:0})},Ul=new It.ArrayValue({each:new It.RecordValue({values:{...Ql}})}),Bl={items:Ul},Af=new It.Schema(Bl);var Lr=h("commerce/cart/setItems",e=>R(e,Ul)),gn=h("commerce/cart/updateItemQuantity",e=>R(e,Ql)),yn=h("commerce/cart/purchase"),gc=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=Ff(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),yc=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=Pf(e,r()),{relay:n}=t;n.emit("ec.cartAction",o)});function z(e){let t,r=new Map,o=()=>r.size===0,n=a=>{try{let i=JSON.stringify(a),c=t!==i;return t=i,c}catch(i){return console.warn('Could not detect if state has changed, check the controller "get state method"',i),!0}};return{subscribe(a){a();let i=Symbol(),c;return o()&&(t=JSON.stringify(this.state),c=e.subscribe(()=>{n(this.state)&&r.forEach(u=>u())})),r.set(i,a),()=>{r.delete(i),o()&&c&&c()}},get state(){return{}}}}function vf(e,t){return e.cart[qo(t)]}var bf=N(Oo,e=>e.reduce((t,r)=>t+r.quantity,0)),wf=N(Oo,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function If(e,t={}){if(!SP(e))throw $;let{dispatch:r}=e,o=z(e),n=()=>e[Q].cart,a={...t.initialState};Je(e,Af,a,"buildCart"),a.items!==void 0&&r(Lr(a.items));function i(l,d){return d?d.quantity!==l.quantity:!0}function c(l,d){return!d||l.quantity>d.quantity?"add":"remove"}function u(l,d){return d?l.name===d.name&&l.price===d.price&&l.quantity===d.quantity:!1}function s(l,d){let{quantity:p,...m}=l,f=c(l,d),g=d?Math.abs(p-d.quantity):p;return{action:f,quantity:g,product:m}}return{...o,empty:function(){for(let l of Oo(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(gc(l)),r(yn())},updateItemQuantity(l){let d=vf(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(yc(s(l,d))),r(gn(l)))},get state(){let l=n();return{items:Oo(l),totalQuantity:bf(l),totalPrice:wf(l)}}}}function qo(e){return`${e.productId},${e.name},${e.price}`}function SP(e){return e.addReducers({cart:hn}),!0}var hc=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),Sc=e=>Tf(e.cartItems,e.cart),Ef=e=>Tf(e.purchasedItems,e.purchased);function Tf(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 hn=B(hc(),e=>{e.addCase(Lr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let c=qo(i);return{cartItems:[...a.cartItems,c],cart:{...a.cart,[c]:i},purchasedItems:[],purchased:{}}},hc());Of(t,n,o)}).addCase(gn,(t,{payload:r})=>{let o=qo(r);if(!(o in t.cart)){CP(r,t);return}if(r.quantity<=0){xP(r,t);return}t.cart[o]=r}).addCase(yn,t=>{RP(t);let{cart:r,cartItems:o}=hc();Of(t,o,r)})});function Of(e,t,r){e.cartItems=t,e.cart=r}function CP(e,t){if(e.quantity<=0)return;let r=qo(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function xP(e,t){let r=qo(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function RP(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]}}var $t=require("@coveo/bueno");var FP=Intl.supportedValuesOf("currency"),PP=new $t.StringValue({required:!0,emptyAllowed:!1,constrainTo:FP}),jl={url:T},_l={latitude:new $t.NumberValue({min:-90,max:90,required:!0}),longitude:new $t.NumberValue({min:-180,max:180,required:!0})},Ha={language:T,country:T,currency:PP,view:new $t.RecordValue({options:{required:!0},values:jl}),location:new $t.RecordValue({options:{required:!1},values:_l})},qf=new $t.Schema(Ha);var se=h("commerce/context/set",e=>R(e,Ha)),ue=h("commerce/context/setView",e=>R(e,jl)),Sn=h("commerce/context/setLocation",e=>R(e,_l));var kf=()=>({language:"",country:"",currency:"",view:{url:""}});var zt=B(kf(),e=>{e.addCase(se,(t,{payload:r})=>r).addCase(ue,(t,{payload:r})=>{t.view=r}).addCase(Sn,(t,{payload:r})=>{t.location=r})});var Cc=()=>({correctedQuery:"",corrections:[],originalQuery:""});var No=require("@coveo/bueno");var gt=h("breadcrumb/deselectAll"),Qr=h("breadcrumb/deselectAllNonBreadcrumbs");var Wt=N(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${un}`));var it=(e,t)=>({...Ga(e,t),facets:[...vP(e)],...e.commerceSort&&{sort:bP(e.commerceSort.appliedSort)}}),Vf=(e,t)=>{let{commercePagination:r,...o}=e;return{...it(o,t)}},Ga=(e,t,r)=>{let{view:o,location:n,...a}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??sn(e.configuration.organizationId,e.configuration.environment),organizationId:e.configuration.organizationId,trackingId:e.configuration.analytics.trackingId,...a,...e.configuration.analytics.enabled?{clientId:t.clientId}:{},context:{user:{...n,...t.userAgent?{userAgent:t.userAgent}:{}},view:{...o,...t.referrer?{referrer:t.referrer}:{}},capture:e.configuration.analytics.enabled,cart:Sc(e.cart),source:Wt(e.configuration.analytics)},...AP(e,r)}},AP=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};function vP(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 bP(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}var Cn=require("@coveo/bueno");var ko=h("commerce/facets/core/updateNumberOfValues",e=>R(e,{facetId:T,numberOfValues:new Cn.NumberValue({required:!0,min:1})})),Vo=h("commerce/facets/core/updateIsFieldExpanded",e=>R(e,{facetId:T,isFieldExpanded:new Cn.BooleanValue({required:!0})})),ke=h("commerce/facets/core/clearAll"),Ve=h("commerce/facets/core/deselectAllValues",e=>R(e,{facetId:T})),Do=h("commerce/facets/core/updateFreezeCurrentValues",e=>R(e,{facetId:T,freezeCurrentValues:new Cn.BooleanValue({required:!0})})),xn=h("commerce/facets/core/updateAutoSelectionForAll",e=>R(e,{allow:new Cn.BooleanValue({required:!0})}));var $l=require("@coveo/bueno");var xc={slotId:df},wP={...xc,pageSize:new $l.NumberValue({required:!0,min:0})},yr=h("commerce/pagination/setPageSize",e=>R(e,wP)),IP={...xc,page:new $l.NumberValue({required:!0,min:0})},Kt=h("commerce/pagination/selectPage",e=>R(e,IP)),Ur=h("commerce/pagination/nextPage",e=>R(e,xc)),Br=h("commerce/pagination/previousPage",e=>R(e,xc)),Rn=h("commerce/pagination/registerRecommendationsSlot",e=>R(e,{slotId:T}));var Df=require("@coveo/bueno");var De=h("commerce/query/update",e=>R(e,{query:new Df.StringValue}));var zl=require("@coveo/bueno");var Rc=require("@coveo/bueno");var jr=h("commerce/triggers/query/updateIgnore",e=>R(e,{q:new Rc.StringValue({emptyAllowed:!0,required:!0})})),Fn=h("commerce/triggers/query/applyModification",e=>R(e,new Rc.RecordValue({values:{originalQuery:re,modification:re}})));var Ya=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 qe(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(!(!(0,zl.isNullOrUndefined)(n)&&!(0,zl.isNullOrUndefined)(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:c}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:_p(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(jr({q:""})),null;let a=this.getCurrentQuery(),i=await this.automaticallyRetryQueryWithTriggerModification(o);return qe(i.response)?this.rejectWithValue(i.response.error):{...i,response:{...i.response.success},originalQuery:a}}async automaticallyRetryQueryWithTriggerModification(t){return this.dispatch(Fn({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...it(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 qe(t.response)?null:t.response.success}get extra(){return this.config.extra}onUpdateQueryForCorrection(t){this.dispatch(De({query:t}))}};var H=_("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=it(o,n),i=ac(o),c=new Ya(t),u=await c.fetchFromAPI({...a,query:i});return c.process(u)}),_r=_("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!Up(o))return null;let i=qr(o),u=_a(o)/i,s=ac(o),l=it(o,n),d=new Ya(t),p=await d.fetchFromAPI({...l,query:s,page:u});return d.process(p)}),Pn=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;R(e,{query:new No.StringValue,clearFilters:new No.BooleanValue}),e.clearFilters&&(r(ke()),r(Qr())),r(xn({allow:!0})),r(De({query:e.query})),r(Kt({page:0}))}),An=_("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({...Vf(n,i),query:c});return qe(u)?r(u.error):{response:{...u.success,products:u.success.products}}}),EP={child:new No.RecordValue({options:{required:!0},values:{permanentid:new No.StringValue({required:!0})}})},vn=h("commerce/search/promoteChildToParent",e=>R(e,EP));function Nf(){return{wasCorrectedTo:"",queryCorrection:Cc(),originalQuery:""}}var Fc=B(Nf(),e=>{e.addCase(H.pending,t=>{t.queryCorrection=Cc(),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??[]}})});var de=require("@coveo/bueno");var K=T;var Ht=require("@coveo/bueno");var TP={state:new Ht.Value({required:!0}),numberOfResults:new Ht.NumberValue({required:!0,min:0}),value:new Ht.StringValue({required:!0,emptyAllowed:!0}),path:new Ht.ArrayValue({required:!0,each:T}),moreValuesAvailable:new Ht.BooleanValue({required:!1})};function Ja(e){e.children.forEach(t=>{Ja(t)}),he({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},TP)}var bn={facetId:K,field:T,tabs:new de.RecordValue({options:{required:!1},values:{included:new de.ArrayValue({each:new de.StringValue}),excluded:new de.ArrayValue({each:new de.StringValue})}}),activeTab:new de.StringValue({required:!1}),delimitingCharacter:new de.StringValue({required:!1,emptyAllowed:!0}),filterFacetCount:new de.BooleanValue({required:!1}),injectionDepth:new de.NumberValue({required:!1,min:0}),numberOfValues:new de.NumberValue({required:!1,min:1}),sortCriteria:new de.Value({required:!1}),basePath:new de.ArrayValue({required:!1,each:T}),filterByBasePath:new de.BooleanValue({required:!1})},wn=5,Mf=h("categoryFacet/register",e=>R(e,bn)),Lf=h("categoryFacet/toggleSelectValue",e=>{try{return he(e.facetId,T),Ja(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:je(t)}}}),Qf=h("categoryFacet/deselectAll",e=>R(e,bn.facetId)),QN=h("categoryFacet/updateNumberOfValues",e=>R(e,{facetId:bn.facetId,numberOfValues:bn.numberOfValues})),UN=h("categoryFacet/updateSortCriterion",e=>R(e,{facetId:bn.facetId,criterion:new de.Value})),BN=h("categoryFacet/updateBasePath",e=>R(e,{facetId:bn.facetId,basePath:new de.ArrayValue({each:T})}));var En=require("@coveo/bueno");var In=require("@coveo/bueno");var Xa={facetId:K,captions:new In.RecordValue({options:{required:!1}}),numberOfValues:new In.NumberValue({required:!1,min:1}),query:new In.StringValue({required:!1,emptyAllowed:!0})};var OP={path:new En.ArrayValue({required:!0,each:T}),displayValue:fe,rawValue:fe,count:new En.NumberValue({required:!0,min:0})},$r=h("categoryFacet/selectSearchResult",e=>R(e,{facetId:K,value:new En.RecordValue({values:OP})})),Pc=h("categoryFacetSearch/register",e=>R(e,Xa));var Ac=require("@coveo/bueno");var Uf={facetId:K,value:new Ac.RecordValue({values:{displayValue:fe,rawValue:fe,count:new Ac.NumberValue({required:!0,min:0})}})},vc=h("facetSearch/register",e=>R(e,Xa)),zr=h("facetSearch/update",e=>R(e,Xa)),Et=h("facetSearch/toggleSelectValue",e=>R(e,Uf)),Tt=h("facetSearch/toggleExcludeValue",e=>R(e,Uf));var Bf=require("@coveo/bueno");var hr=h("facetOptions/update",(e={freezeFacetOrder:!0})=>R(e,{freezeFacetOrder:new Bf.BooleanValue({required:!1})})),Wl=h("facetOptions/facet/enable",e=>R(e,K)),Sr=h("facetOptions/facet/disable",e=>R(e,K));var qP=h("history/undo"),kP=h("history/redo"),Gt=h("history/snapshot"),iM=_("history/back",async(e,{dispatch:t})=>{t(qP()),await t(xe())}),cM=_("history/forward",async(e,{dispatch:t})=>{t(kP()),await t(xe())}),xe=_("history/change",async(e,{getState:t})=>t().history.present);var me=require("@coveo/bueno"),bc={q:new me.StringValue,enableQuerySyntax:new me.BooleanValue,aq:new me.StringValue,cq:new me.StringValue,firstResult:new me.NumberValue({min:0}),numberOfResults:new me.NumberValue({min:0}),sortCriteria:new me.StringValue,f:new me.RecordValue,fExcluded:new me.RecordValue,cf:new me.RecordValue,nf:new me.RecordValue,mnf:new me.RecordValue,df:new me.RecordValue,debug:new me.BooleanValue,sf:new me.RecordValue,tab:new me.StringValue,af:new me.RecordValue};var Ie=h("searchParameters/restore",e=>R(e,bc));var oo=require("@coveo/bueno");function Cr(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function v(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function c(l){try{s(o.next(l))}catch(d){i(d)}}function u(l){try{s(o.throw(l))}catch(d){i(d)}}function s(l){l.done?a(l.value):n(l.value).then(c,u)}s((o=o.apply(e,t||[])).next())})}var G;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(G||(G={}));function Gl(){return typeof window<"u"}function sd(){return typeof navigator<"u"}function Tn(){return typeof document<"u"}function Yl(){try{return typeof localStorage<"u"}catch{return!1}}function VP(){try{return typeof sessionStorage<"u"}catch{return!1}}function tg(){return sd()&&navigator.cookieEnabled}var DP=[G.click,G.custom,G.search,G.view],NP=(e,t)=>DP.indexOf(e)!==-1?Object.assign({language:Tn()?document.documentElement.lang:"unknown",userAgent:sd()?navigator.userAgent:"unknown"},t):t,ti=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?jf(t,r,a):(i=c.split("."),n=i[i.length-2]+"."+i[i.length-1],jf(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 jf(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function MP(){return Yl()?localStorage:tg()?new ri:VP()?sessionStorage:new qn}var ri=class e{getItem(t){return ti.get(`${e.prefix}${t}`)}removeItem(t){ti.erase(`${e.prefix}${t}`)}setItem(t,r,o){ti.set(`${e.prefix}${t}`,r,o)}};ri.prefix="coveo_";var Jl=class{constructor(){this.cookieStorage=new ri}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)}},qn=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Za="__coveo.analytics.history",rg=20,og=1e3*60,ng=75,kn=class{constructor(t){this.store=t||MP()}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){return v(this,void 0,void 0,function*(){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=yield this.getHistoryWithInternalTimeAsync();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])})}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){return v(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Za);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return v(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Za);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Za,JSON.stringify(t.slice(0,rg)))}catch{}}clear(){try{this.store.removeItem(Za)}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,ng)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>og:!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))}},ag=Object.freeze({__proto__:null,HistoryStore:kn,MAX_NUMBER_OF_HISTORY_ELEMENTS:rg,MAX_VALUE_SIZE:ng,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:og,STORE_KEY:Za,default:kn}),LP=(e,t)=>v(void 0,void 0,void 0,function*(){return e===G.view?(yield QP(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),QP=e=>v(void 0,void 0,void 0,function*(){let t=new kn,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),wc,UP=new Uint8Array(16);function BP(){if(!wc&&(wc=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!wc))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return wc(UP)}var jP=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Ec(e){return typeof e=="string"&&jP.test(e)}var Ee=[];for(let e=0;e<256;++e)Ee.push((e+256).toString(16).slice(1));function ig(e,t=0){return(Ee[e[t+0]]+Ee[e[t+1]]+Ee[e[t+2]]+Ee[e[t+3]]+"-"+Ee[e[t+4]]+Ee[e[t+5]]+"-"+Ee[e[t+6]]+Ee[e[t+7]]+"-"+Ee[e[t+8]]+Ee[e[t+9]]+"-"+Ee[e[t+10]]+Ee[e[t+11]]+Ee[e[t+12]]+Ee[e[t+13]]+Ee[e[t+14]]+Ee[e[t+15]]).toLowerCase()}function _P(e){if(!Ec(e))throw TypeError("Invalid UUID");let t,r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=t&255,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=t&255,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=t&255,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=t&255,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=t&255,r}function $P(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var zP="6ba7b810-9dad-11d1-80b4-00c04fd430c8",WP="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function KP(e,t,r){function o(n,a,i,c){var u;if(typeof n=="string"&&(n=$P(n)),typeof a=="string"&&(a=_P(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 ig(s)}try{o.name=e}catch{}return o.DNS=zP,o.URL=WP,o}var HP=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),_f={randomUUID:HP};function Mo(e,t,r){if(_f.randomUUID&&!t&&!e)return _f.randomUUID();e=e||{};let o=e.random||(e.rng||BP)();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 ig(o)}function GP(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 Kl(e,t){return e<<t|e>>>32-t}function YP(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]=Kl(c[m-3]^c[m-8]^c[m-14]^c[m-16],1);let u=r[0],s=r[1],l=r[2],d=r[3],p=r[4];for(let m=0;m<80;++m){let f=Math.floor(m/20),g=Kl(u,5)+GP(f,s,l,d)+p+t[f]+c[m]>>>0;p=d,d=l,l=Kl(s,30)>>>0,s=u,u=g}r[0]=r[0]+u>>>0,r[1]=r[1]+s>>>0,r[2]=r[2]+l>>>0,r[3]=r[3]+d>>>0,r[4]=r[4]+p>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,r[0]&255,r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,r[1]&255,r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,r[2]&255,r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,r[3]&255,r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,r[4]&255]}var JP=KP("v5",80,YP),$f=JP,cg="2.30.43",zf=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,ei={pageview:"pageview",event:"event"},Tc=class{constructor({client:t,uuidGenerator:r=Mo}){this.client=t,this.uuidGenerator=r}},Xl=class extends Tc{constructor({client:t,uuidGenerator:r=Mo}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=zf(window.location),this.lastReferrer=Tn()?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:Tn()?document.title:"",encoding:Tn()?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===ei.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===ei.pageview?this.nextPageViewId:this.pageViewId,referrer:t===ei.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===ei.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 zf(window.location)}},Wr=class e{constructor(t,r){if(!Ec(t))throw Error("Not a valid uuid");this.clientId=t,this.creationDate=Math.floor(r/1e3)}toString(){return this.clientId.replace(/-/g,"")+"."+this.creationDate.toString()}get expired(){let t=Math.floor(Date.now()/1e3)-this.creationDate;return t<0||t>e.expirationTime}validate(t,r){return!this.expired&&this.matchReferrer(t,r)}matchReferrer(t,r){try{let o=new URL(t);return r.some(n=>new RegExp(n.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(o.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[o,n]=r;if(o.length!==32||isNaN(parseInt(n)))return null;let a=o.substring(0,8)+"-"+o.substring(8,12)+"-"+o.substring(12,16)+"-"+o.substring(16,20)+"-"+o.substring(20,32);return Ec(a)?new e(a,Number.parseInt(n)*1e3):null}};Wr.cvo_cid="cvo_cid";Wr.expirationTime=120;var Zl=class extends Tc{constructor({client:t,uuidGenerator:r=Mo}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return v(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),o=yield this.client.getCurrentVisitorId();return r.searchParams.set(Wr.cvo_cid,new Wr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Zl.Id="link";var yt=Object.keys;function Ic(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Hl=128,sg=192,Wf=224,Kf=240;function XP(e){return(e&248)===Kf?4:(e&Kf)===Wf?3:(e&Wf)===sg?2:1}function ZP(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&Hl)!=Hl)break;if(r-=3,(o&sg)!=Hl){t-r>=XP(o)*3&&(r=t);break}}return e.substring(0,r)}var ed={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"},eA=yt(ed).map(e=>ed[e]),tA=[...eA].join("|"),rA=new RegExp(`^(${tA}$)`),oA={svcAction:"svc_action",svcActionData:"svc_action_data"},nA=e=>yt(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=ed[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),aA=e=>rA.test(e),iA=[aA],Hf={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},Gf={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},Ne={action:"pa",list:"pal",listSource:"pls"},Oc={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},cA=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],td={id:"quoteId",affiliation:"quoteAffiliation"},rd={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},sA={add:Ne,bookmark_add:Ne,bookmark_remove:Ne,click:Ne,checkout:Ne,checkout_option:Ne,detail:Ne,impression:Ne,remove:Ne,refund:Object.assign(Object.assign({},Ne),Oc),purchase:Object.assign(Object.assign({},Ne),Oc),quickview:Ne,quote:Object.assign(Object.assign({},Ne),td),review:Object.assign(Object.assign({},Ne),rd)},uA=yt(Hf).map(e=>Hf[e]),lA=yt(Gf).map(e=>Gf[e]),dA=yt(Ne).map(e=>Ne[e]),mA=yt(Oc).map(e=>Oc[e]),pA=yt(rd).map(e=>rd[e]),fA=yt(td).map(e=>td[e]),gA=[...uA,"custom"].join("|"),yA=[...lA,"custom"].join("|"),ug="(pr[0-9]+)",lg="(il[0-9]+pi[0-9]+)",hA=new RegExp(`^${ug}(${gA})$`),SA=new RegExp(`^(${lg}(${yA}))|(il[0-9]+nm)$`),CA=new RegExp(`^(${dA.join("|")})$`),xA=new RegExp(`^(${mA.join("|")})$`),RA=new RegExp(`^${ug}custom$`),FA=new RegExp(`^${lg}custom$`),PA=new RegExp(`^(${[...cA,...pA,...fA].join("|")})$`),AA=e=>hA.test(e),vA=e=>SA.test(e),bA=e=>CA.test(e),wA=e=>xA.test(e),IA=e=>PA.test(e),EA=[vA,AA,bA,wA,IA],TA=[RA,FA],OA={anonymizeIp:"aip"},qA={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},kA={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},VA=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],DA=Object.assign(Object.assign(Object.assign(Object.assign({},OA),qA),kA),VA.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),od=Object.assign(Object.assign({},DA),oA),NA=e=>{let t=!!e.action&&sA[e.action]||{};return yt(e).reduce((r,o)=>{let n=t[o]||od[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},MA=yt(od).map(e=>od[e]),LA=e=>MA.indexOf(e)!==-1,QA=e=>e==="custom",UA=e=>[...EA,...iA,LA,QA].some(t=>t(e)),BA=e=>yt(e).reduce((t,r)=>{let o=jA(r);return o?Object.assign(Object.assign({},t),_A(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),jA=e=>{let t;return[...TA].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},_A=(e,t)=>yt(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),nd=class{constructor(t){this.opts=t}sendEvent(t,r){return v(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:o,preprocessRequest:n}=this.opts,a=yield this.getQueryParamsForEventType(t),{url:i,payload:c}=yield this.preProcessRequestAsPotentialJSONString(`${o}/analytics/${t}?${a}`,r,n),u=this.encodeForEventType(t,c),s=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,s)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,o){return v(this,void 0,void 0,function*(){let n=t,a=r;if(o){let i=yield o({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:c,body:u}=i;n=c||t;try{a=JSON.parse(u)}catch(s){console.error("Unable to process the request body as a JSON string",s)}}return{payload:a,url:n}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return v(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:o}=this.opts,n=yield o.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",n?`visitorId=${n}`:"","discardVisitInfo=true"].filter(a=>!!a).join("&")})}isEventTypeLegacy(t){return[G.click,G.custom,G.search,G.view].indexOf(t)!==-1}encodeEventToJson(t,r,o){let n=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return o&&(n=`access_token=${encodeURIComponent(o)}&${n}`),n}},ad=class{sendEvent(t,r){return v(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return v(this,void 0,void 0,function*(){return Promise.resolve()})}},Yf=globalThis.fetch,qc=class{constructor(t){this.opts=t}sendEvent(t,r){return v(this,void 0,void 0,function*(){let{baseUrl:o,visitorIdProvider:n,preprocessRequest:a}=this.opts,i=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",c={url:`${o}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},c),a?yield a(c,"analyticsFetch"):{}),{url:s}=u,l=Cr(u,["url"]),d;try{d=yield Yf(s,l)}catch(p){console.error("An error has occured when sending the event.",p);return}if(d.ok){let p=yield d.json();return p.visitorId&&n.setCurrentVisitorId(p.visitorId),p}else{try{d.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,d,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return v(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Yf(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[G.click,G.custom,G.search,G.view].indexOf(t)!==-1}getVisitorIdParam(){return v(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},id=class{constructor(t,r){Yl()&&tg()?this.storage=new Jl:Yl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new qn),this.client=new qc(t),this.beaconClient=new nd(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}},cd=class{constructor(t,r){this.storage=r||new qn,this.client=new qc(t)}getClientDependingOnEventType(t){return this.client}},kc=class{constructor(){this.storage=new qn,this.client=new ad}getClientDependingOnEventType(t){return this.client}},$A="xx",zA=e=>e?.startsWith($A)||!1,WA=`
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