@coveo/headless 3.22.5 → 3.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/case-assist/headless.esm.js +1 -1
- package/dist/browser/case-assist/headless.js +1 -1
- package/dist/browser/commerce/headless.esm.js +1 -1
- package/dist/browser/commerce/headless.js +1 -1
- package/dist/browser/headless.esm.js +1 -1
- package/dist/browser/headless.js +1 -1
- package/dist/browser/insight/headless.esm.js +1 -1
- package/dist/browser/insight/headless.js +1 -1
- package/dist/browser/recommendation/headless.esm.js +1 -1
- package/dist/browser/recommendation/headless.js +1 -1
- package/dist/browser/ssr/headless.esm.js +1 -1
- package/dist/browser/ssr/headless.js +1 -1
- package/dist/browser/ssr-commerce/headless.esm.js +1 -1
- package/dist/browser/ssr-commerce/headless.js +1 -1
- package/dist/case-assist/headless.cjs +1 -1
- package/dist/case-assist/headless.esm.js +1 -1
- package/dist/commerce/headless.cjs +1 -1
- package/dist/commerce/headless.esm.js +1 -1
- package/dist/headless.cjs +1 -1
- package/dist/headless.esm.js +1 -1
- package/dist/insight/headless.cjs +1 -1
- package/dist/insight/headless.esm.js +1 -1
- package/dist/quantic/case-assist/headless.js +1 -1
- package/dist/quantic/commerce/headless.js +1 -1
- package/dist/quantic/headless.js +1 -1
- package/dist/quantic/insight/headless.js +1 -1
- package/dist/quantic/recommendation/headless.js +1 -1
- package/dist/recommendation/headless.cjs +1 -1
- package/dist/recommendation/headless.esm.js +1 -1
- package/dist/ssr/headless.cjs +1 -1
- package/dist/ssr/headless.esm.js +1 -1
- package/dist/ssr-commerce/headless.cjs +1 -1
- package/dist/ssr-commerce/headless.esm.js +1 -1
- package/package.json +2 -2
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
var DF=Object.create;var nl=Object.defineProperty;var kF=Object.getOwnPropertyDescriptor;var VF=Object.getOwnPropertyNames;var NF=Object.getPrototypeOf,MF=Object.prototype.hasOwnProperty;var QF=(e,t,r)=>t in e?nl(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);var LF=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of VF(t))!MF.call(e,n)&&n!==r&&nl(e,n,{get:()=>t[n],enumerable:!(o=kF(t,n))||o.enumerable});return e};var It=(e,t,r)=>(r=e!=null?DF(NF(e)):{},LF(t||!e||!e.__esModule?nl(r,"default",{value:e,enumerable:!0}):r,e));var We=(e,t,r)=>QF(e,typeof t!="symbol"?t+"":t,r);var Np=Ae(Ca=>{"use strict";var Qi=Ca&&Ca.__assign||function(){return Qi=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},Qi.apply(this,arguments)};Object.defineProperty(Ca,"__esModule",{value:!0});var UF={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function jF(e){var t=Qi(Qi({},UF),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Ca.getSanitizedOptions=jF});var Mp=Ae(al=>{"use strict";Object.defineProperty(al,"__esModule",{value:!0});function _F(e){var t=Math.random()*e;return Math.round(t)}al.fullJitter=_F});var Qp=Ae(il=>{"use strict";Object.defineProperty(il,"__esModule",{value:!0});function $F(e){return e}il.noJitter=$F});var Lp=Ae(sl=>{"use strict";Object.defineProperty(sl,"__esModule",{value:!0});var zF=Mp(),WF=Qp();function KF(e){switch(e.jitter){case"full":return zF.fullJitter;case"none":default:return WF.noJitter}}sl.JitterFactory=KF});var ul=Ae(cl=>{"use strict";Object.defineProperty(cl,"__esModule",{value:!0});var GF=Lp(),HF=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=GF.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}();cl.Delay=HF});var Bp=Ae(tr=>{"use strict";var YF=tr&&tr.__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)}}(),JF=tr&&tr.__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 s(l){try{c(o.next(l))}catch(d){i(d)}}function u(l){try{c(o.throw(l))}catch(d){i(d)}}function c(l){l.done?a(l.value):n(l.value).then(s,u)}c((o=o.apply(e,t||[])).next())})},XF=tr&&tr.__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:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(c){return function(l){return u([c,l])}}function u(c){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=c[0]&2?n.return:c[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,c[1])).done)return a;switch(n=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(l){c=[6,l],n=0}finally{o=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(tr,"__esModule",{value:!0});var ZF=ul(),eP=function(e){YF(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return JF(this,void 0,void 0,function(){return XF(this,function(r){return[2,this.isFirstAttempt?!0:e.prototype.apply.call(this)]})})},Object.defineProperty(t.prototype,"isFirstAttempt",{get:function(){return this.attempt===0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt-1},enumerable:!0,configurable:!0}),t}(ZF.Delay);tr.SkipFirstDelay=eP});var Up=Ae(xa=>{"use strict";var tP=xa&&xa.__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(xa,"__esModule",{value:!0});var rP=ul(),oP=function(e){tP(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(rP.Delay);xa.AlwaysDelay=oP});var jp=Ae(ll=>{"use strict";Object.defineProperty(ll,"__esModule",{value:!0});var nP=Bp(),aP=Up();function iP(e,t){var r=sP(e);return r.setAttemptNumber(t),r}ll.DelayFactory=iP;function sP(e){return e.delayFirstAttempt?new aP.AlwaysDelay(e):new nP.SkipFirstDelay(e)}});var _p=Ae(co=>{"use strict";var dl=co&&co.__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 s(l){try{c(o.next(l))}catch(d){i(d)}}function u(l){try{c(o.throw(l))}catch(d){i(d)}}function c(l){l.done?a(l.value):n(l.value).then(s,u)}c((o=o.apply(e,t||[])).next())})},ml=co&&co.__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:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(c){return function(l){return u([c,l])}}function u(c){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=c[0]&2?n.return:c[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,c[1])).done)return a;switch(n=0,a&&(c=[c[0]&2,a.value]),c[0]){case 0:case 1:a=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,n=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!a||c[1]>a[0]&&c[1]<a[3])){r.label=c[1];break}if(c[0]===6&&r.label<a[1]){r.label=a[1],a=c;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(c);break}a[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(l){c=[6,l],n=0}finally{o=a=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(co,"__esModule",{value:!0});var cP=Np(),uP=jp();function lP(e,t){return t===void 0&&(t={}),dl(this,void 0,void 0,function(){var r,o;return ml(this,function(n){switch(n.label){case 0:return r=cP.getSanitizedOptions(t),o=new dP(e,r),[4,o.execute()];case 1:return[2,n.sent()]}})})}co.backOff=lP;var dP=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return dl(this,void 0,void 0,function(){var t,r;return ml(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 dl(this,void 0,void 0,function(){var t;return ml(this,function(r){switch(r.label){case 0:return t=uP.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var Gs=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=t()})(Ad,function(){"use strict";var e=1e3,t=6e4,r=36e5,o="millisecond",n="second",a="minute",i="hour",s="day",u="week",c="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+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(V){var q=["th","st","nd","rd"],O=V%100;return"["+V+(q[(O-20)%10]||q[O]||q[0])+"]"}},S=function(V,q,O){var N=String(V);return!N||N.length>=q?V:""+Array(q+1-N.length).join(O)+V},A={s:S,z:function(V){var q=-V.utcOffset(),O=Math.abs(q),N=Math.floor(O/60),k=O%60;return(q<=0?"+":"-")+S(N,2,"0")+":"+S(k,2,"0")},m:function V(q,O){if(q.date()<O.date())return-V(O,q);var N=12*(O.year()-q.year())+(O.month()-q.month()),k=q.clone().add(N,c),L=O-k<0,B=q.clone().add(N+(L?-1:1),c);return+(-(N+(O-k)/(L?k-B:B-k))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:c,y:d,w:u,d:s,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}},y="en",x={};x[y]=C;var I="$isDayjsObject",v=function(V){return V instanceof T||!(!V||!V[I])},R=function V(q,O,N){var k;if(!q)return y;if(typeof q=="string"){var L=q.toLowerCase();x[L]&&(k=L),O&&(x[L]=O,k=L);var B=q.split("-");if(!k&&B.length>1)return V(B[0])}else{var z=q.name;x[z]=q,k=z}return!N&&k&&(y=k),k||!N&&y},P=function(V,q){if(v(V))return V.clone();var O=typeof q=="object"?q:{};return O.date=V,O.args=arguments,new T(O)},b=A;b.l=R,b.i=v,b.w=function(V,q){return P(V,{locale:q.$L,utc:q.$u,x:q.$x,$offset:q.$offset})};var T=function(){function V(O){this.$L=R(O.locale,null,!0),this.parse(O),this.$x=this.$x||O.x||{},this[I]=!0}var q=V.prototype;return q.parse=function(O){this.$d=function(N){var k=N.date,L=N.utc;if(k===null)return new Date(NaN);if(b.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var B=k.match(f);if(B){var z=B[2]-1||0,Y=(B[7]||"0").substring(0,3);return L?new Date(Date.UTC(B[1],z,B[3]||1,B[4]||0,B[5]||0,B[6]||0,Y)):new Date(B[1],z,B[3]||1,B[4]||0,B[5]||0,B[6]||0,Y)}}return new Date(k)}(O),this.init()},q.init=function(){var O=this.$d;this.$y=O.getFullYear(),this.$M=O.getMonth(),this.$D=O.getDate(),this.$W=O.getDay(),this.$H=O.getHours(),this.$m=O.getMinutes(),this.$s=O.getSeconds(),this.$ms=O.getMilliseconds()},q.$utils=function(){return b},q.isValid=function(){return this.$d.toString()!==m},q.isSame=function(O,N){var k=P(O);return this.startOf(N)<=k&&k<=this.endOf(N)},q.isAfter=function(O,N){return P(O)<this.startOf(N)},q.isBefore=function(O,N){return this.endOf(N)<P(O)},q.$g=function(O,N,k){return b.u(O)?this[N]:this.set(k,O)},q.unix=function(){return Math.floor(this.valueOf()/1e3)},q.valueOf=function(){return this.$d.getTime()},q.startOf=function(O,N){var k=this,L=!!b.u(N)||N,B=b.p(O),z=function(re,se){var de=b.w(k.$u?Date.UTC(k.$y,se,re):new Date(k.$y,se,re),k);return L?de:de.endOf(s)},Y=function(re,se){return b.w(k.toDate()[re].apply(k.toDate("s"),(L?[0,0,0,0]:[23,59,59,999]).slice(se)),k)},te=this.$W,G=this.$M,J=this.$D,K="set"+(this.$u?"UTC":"");switch(B){case d:return L?z(1,0):z(31,11);case c:return L?z(1,G):z(0,G+1);case u:var Z=this.$locale().weekStart||0,ue=(te<Z?te+7:te)-Z;return z(L?J-ue:J+(6-ue),G);case s:case p:return Y(K+"Hours",0);case i:return Y(K+"Minutes",1);case a:return Y(K+"Seconds",2);case n:return Y(K+"Milliseconds",3);default:return this.clone()}},q.endOf=function(O){return this.startOf(O,!1)},q.$set=function(O,N){var k,L=b.p(O),B="set"+(this.$u?"UTC":""),z=(k={},k[s]=B+"Date",k[p]=B+"Date",k[c]=B+"Month",k[d]=B+"FullYear",k[i]=B+"Hours",k[a]=B+"Minutes",k[n]=B+"Seconds",k[o]=B+"Milliseconds",k)[L],Y=L===s?this.$D+(N-this.$W):N;if(L===c||L===d){var te=this.clone().set(p,1);te.$d[z](Y),te.init(),this.$d=te.set(p,Math.min(this.$D,te.daysInMonth())).$d}else z&&this.$d[z](Y);return this.init(),this},q.set=function(O,N){return this.clone().$set(O,N)},q.get=function(O){return this[b.p(O)]()},q.add=function(O,N){var k,L=this;O=Number(O);var B=b.p(N),z=function(G){var J=P(L);return b.w(J.date(J.date()+Math.round(G*O)),L)};if(B===c)return this.set(c,this.$M+O);if(B===d)return this.set(d,this.$y+O);if(B===s)return z(1);if(B===u)return z(7);var Y=(k={},k[a]=t,k[i]=r,k[n]=e,k)[B]||1,te=this.$d.getTime()+O*Y;return b.w(te,this)},q.subtract=function(O,N){return this.add(-1*O,N)},q.format=function(O){var N=this,k=this.$locale();if(!this.isValid())return k.invalidDate||m;var L=O||"YYYY-MM-DDTHH:mm:ssZ",B=b.z(this),z=this.$H,Y=this.$m,te=this.$M,G=k.weekdays,J=k.months,K=k.meridiem,Z=function(se,de,ze,st){return se&&(se[de]||se(N,L))||ze[de].slice(0,st)},ue=function(se){return b.s(z%12||12,se,"0")},re=K||function(se,de,ze){var st=se<12?"AM":"PM";return ze?st.toLowerCase():st};return L.replace(h,function(se,de){return de||function(ze){switch(ze){case"YY":return String(N.$y).slice(-2);case"YYYY":return b.s(N.$y,4,"0");case"M":return te+1;case"MM":return b.s(te+1,2,"0");case"MMM":return Z(k.monthsShort,te,J,3);case"MMMM":return Z(J,te);case"D":return N.$D;case"DD":return b.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return Z(k.weekdaysMin,N.$W,G,2);case"ddd":return Z(k.weekdaysShort,N.$W,G,3);case"dddd":return G[N.$W];case"H":return String(z);case"HH":return b.s(z,2,"0");case"h":return ue(1);case"hh":return ue(2);case"a":return re(z,Y,!0);case"A":return re(z,Y,!1);case"m":return String(Y);case"mm":return b.s(Y,2,"0");case"s":return String(N.$s);case"ss":return b.s(N.$s,2,"0");case"SSS":return b.s(N.$ms,3,"0");case"Z":return B}return null}(se)||B.replace(":","")})},q.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},q.diff=function(O,N,k){var L,B=this,z=b.p(N),Y=P(O),te=(Y.utcOffset()-this.utcOffset())*t,G=this-Y,J=function(){return b.m(B,Y)};switch(z){case d:L=J()/12;break;case c:L=J();break;case l:L=J()/3;break;case u:L=(G-te)/6048e5;break;case s:L=(G-te)/864e5;break;case i:L=G/r;break;case a:L=G/t;break;case n:L=G/e;break;default:L=G}return k?L:b.a(L)},q.daysInMonth=function(){return this.endOf(c).$D},q.$locale=function(){return x[this.$L]},q.locale=function(O,N){if(!O)return this.$L;var k=this.clone(),L=R(O,N,!0);return L&&(k.$L=L),k},q.clone=function(){return b.w(this.$d,this)},q.toDate=function(){return new Date(this.valueOf())},q.toJSON=function(){return this.isValid()?this.toISOString():null},q.toISOString=function(){return this.$d.toISOString()},q.toString=function(){return this.$d.toUTCString()},V}(),M=T.prototype;return P.prototype=M,[["$ms",o],["$s",n],["$m",a],["$H",i],["$W",s],["$M",c],["$y",d],["$D",p]].forEach(function(V){M[V[1]]=function(q){return this.$g(q,V[0],V[1])}}),P.extend=function(V,q){return V.$i||(V(q,T,P),V.$i=!0),P},P.locale=R,P.isDayjs=v,P.unix=function(V){return P(1e3*V)},P.en=x[y],P.Ls=x,P.p={},P})});var Oy=Ae((bd,wd)=>{"use strict";(function(e,t){typeof bd=="object"&&typeof wd<"u"?wd.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_quarterOfYear=t()})(bd,function(){"use strict";var e="month",t="quarter";return function(r,o){var n=o.prototype;n.quarter=function(s){return this.$utils().u(s)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(s-1))};var a=n.add;n.add=function(s,u){return s=Number(s),this.$utils().p(u)===t?this.add(3*s,e):a.bind(this)(s,u)};var i=n.startOf;n.startOf=function(s,u){var c=this.$utils(),l=!!c.u(u)||u;if(c.p(s)===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)(s,u)}}})});var qy=Ae((Ed,Id)=>{"use strict";(function(e,t){typeof Ed=="object"&&typeof Id<"u"?Id.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=t()})(Ed,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={},s=function(f){return(f=+f)+(f>68?1900:2e3)},u=function(f){return function(h){this[f]=+h}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(f){(this.zone||(this.zone={})).offset=function(h){if(!h||h==="Z")return 0;var C=h.match(/([+-]|\d\d)/g),S=60*C[1]+(+C[2]||0);return S===0?0:C[0]==="+"?-S:S}(f)}],l=function(f){var h=i[f];return h&&(h.indexOf?h:h.s.concat(h.f))},d=function(f,h){var C,S=i.meridiem;if(S){for(var A=1;A<=24;A+=1)if(f.indexOf(S(A,0,h))>-1){C=A>12;break}}else C=f===(h?"pm":"PM");return C},p={A:[a,function(f){this.afternoon=d(f,!1)}],a:[a,function(f){this.afternoon=d(f,!0)}],Q:[r,function(f){this.month=3*(f-1)+1}],S:[r,function(f){this.milliseconds=100*+f}],SS:[o,function(f){this.milliseconds=10*+f}],SSS:[/\d{3}/,function(f){this.milliseconds=+f}],s:[n,u("seconds")],ss:[n,u("seconds")],m:[n,u("minutes")],mm:[n,u("minutes")],H:[n,u("hours")],h:[n,u("hours")],HH:[n,u("hours")],hh:[n,u("hours")],D:[n,u("day")],DD:[o,u("day")],Do:[a,function(f){var h=i.ordinal,C=f.match(/\d+/);if(this.day=C[0],h)for(var S=1;S<=31;S+=1)h(S).replace(/\[|\]/g,"")===f&&(this.day=S)}],w:[n,u("week")],ww:[o,u("week")],M:[n,u("month")],MM:[o,u("month")],MMM:[a,function(f){var h=l("months"),C=(l("monthsShort")||h.map(function(S){return S.slice(0,3)})).indexOf(f)+1;if(C<1)throw new Error;this.month=C%12||C}],MMMM:[a,function(f){var h=l("months").indexOf(f)+1;if(h<1)throw new Error;this.month=h%12||h}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(f){this.year=s(f)}],YYYY:[/\d{4}/,u("year")],Z:c,ZZ:c};function m(f){var h,C;h=f,C=i&&i.formats;for(var S=(f=h.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(P,b,T){var M=T&&T.toUpperCase();return b||C[T]||e[T]||C[M].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(V,q,O){return q||O.slice(1)})})).match(t),A=S.length,y=0;y<A;y+=1){var x=S[y],I=p[x],v=I&&I[0],R=I&&I[1];S[y]=R?{regex:v,parser:R}:x.replace(/^\[|\]$/g,"")}return function(P){for(var b={},T=0,M=0;T<A;T+=1){var V=S[T];if(typeof V=="string")M+=V.length;else{var q=V.regex,O=V.parser,N=P.slice(M),k=q.exec(N)[0];O.call(b,k),P=P.replace(k,"")}}return function(L){var B=L.afternoon;if(B!==void 0){var z=L.hours;B?z<12&&(L.hours+=12):z===12&&(L.hours=0),delete L.afternoon}}(b),b}}return function(f,h,C){C.p.customParseFormat=!0,f&&f.parseTwoDigitYear&&(s=f.parseTwoDigitYear);var S=h.prototype,A=S.parse;S.parse=function(y){var x=y.date,I=y.utc,v=y.args;this.$u=I;var R=v[1];if(typeof R=="string"){var P=v[2]===!0,b=v[3]===!0,T=P||b,M=v[2];b&&(M=v[2]),i=this.$locale(),!P&&M&&(i=C.Ls[M]),this.$d=function(N,k,L,B){try{if(["x","X"].indexOf(k)>-1)return new Date((k==="X"?1e3:1)*N);var z=m(k)(N),Y=z.year,te=z.month,G=z.day,J=z.hours,K=z.minutes,Z=z.seconds,ue=z.milliseconds,re=z.zone,se=z.week,de=new Date,ze=G||(Y||te?1:de.getDate()),st=Y||de.getFullYear(),Cr=0;Y&&!te||(Cr=te>0?te-1:de.getMonth());var jo,_o=J||0,ha=K||0,rl=Z||0,ol=ue||0;return re?new Date(Date.UTC(st,Cr,ze,_o,ha,rl,ol+60*re.offset*1e3)):L?new Date(Date.UTC(st,Cr,ze,_o,ha,rl,ol)):(jo=new Date(st,Cr,ze,_o,ha,rl,ol),se&&(jo=B(jo).week(se).toDate()),jo)}catch{return new Date("")}}(x,R,I,C),this.init(),M&&M!==!0&&(this.$L=this.locale(M).$L),T&&x!=this.format(R)&&(this.$d=new Date("")),i={}}else if(R instanceof Array)for(var V=R.length,q=1;q<=V;q+=1){v[1]=R[q-1];var O=C.apply(this,v);if(O.isValid()){this.$d=O.$d,this.$L=O.$L,this.init();break}q===V&&(this.$d=new Date(""))}else A.call(this,y)}}})});var OC=Ae((b6,TC)=>{"use strict";var BT=/(^|; )Coveo-Pendragon=([^;]*)/;TC.exports=()=>BT.exec(document.cookie)?.pop()||null});var qC=Ae((Om,qm)=>{"use strict";(function(e,t){typeof Om=="object"&&typeof qm<"u"?qm.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(Om,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(h,C){C===void 0&&(C={});var S=C.timeZoneName||"short",A=h+"|"+S,y=t[A];return y||(y=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:h,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:S}),t[A]=y),y}(d,p);return f.formatToParts(m)},s=function(l,d){for(var p=i(l,d),m=[],f=0;f<p.length;f+=1){var h=p[f],C=h.type,S=h.value,A=e[C];A>=0&&(m[A]=parseInt(S,10))}var y=m[3],x=y===24?0:y,I=m[0]+"-"+m[1]+"-"+m[2]+" "+x+":"+m[4]+":"+m[5]+":000",v=+l;return(n.utc(I).valueOf()-(v-=v%1e3))/6e4},u=o.prototype;u.tz=function(l,d){l===void 0&&(l=a);var p,m=this.utcOffset(),f=this.toDate(),h=f.toLocaleString("en-US",{timeZone:l}),C=Math.round((f-new Date(h))/1e3/60),S=15*-Math.round(f.getTimezoneOffset()/15)-C;if(!Number(S))p=this.utcOffset(0,d);else if(p=n(h,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(S,!0),d){var A=p.utcOffset();p=p.add(m-A,"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 c=u.startOf;u.startOf=function(l,d){if(!this.$x||!this.$x.$timezone)return c.call(this,l,d);var p=n(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(p,l,d).tz(this.$x.$timezone,!0)},n.tz=function(l,d,p){var m=p&&d,f=p||d||a,h=s(+n(),f);if(typeof l!="string")return n(l).tz(f);var C=function(x,I,v){var R=x-60*I*1e3,P=s(R,v);if(I===P)return[R,I];var b=s(R-=60*(P-I)*1e3,v);return P===b?[R,P]:[x-60*Math.min(P,b)*1e3,Math.max(P,b)]}(n.utc(l,m).valueOf(),h,f),S=C[0],A=C[1],y=n(S).utcOffset(A);return y.$x.$timezone=f,y},n.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},n.tz.setDefault=function(l){a=l}}})});var DC=Ae((Dm,km)=>{"use strict";(function(e,t){typeof Dm=="object"&&typeof km<"u"?km.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})(Dm,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 s=i.parse;i.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),s.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 c=i.utcOffset;i.utcOffset=function(m,f){var h=this.$utils().u;if(h(m))return this.$u?0:h(this.$offset)?c.call(this):this.$offset;if(typeof m=="string"&&(m=function(y){y===void 0&&(y="");var x=y.match(t);if(!x)return null;var I=(""+x[0]).match(r)||["-",0,0],v=I[0],R=60*+I[1]+ +I[2];return R===0?0:v==="+"?R:-R}(m),m===null))return this;var C=Math.abs(m)<=16?60*m:m,S=this;if(f)return S.$offset=C,S.$u=m===0,S;if(m!==0){var A=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(S=this.local().add(C+A,e)).$offset=C,S.$x.$localOffset=A}else S=this.utc();return S};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,h){if(m&&this.$u===m.$u)return p.call(this,m,f,h);var C=this.local(),S=a(m).local();return p.call(C,S,f,h)}}})});var WC=Ae((N8,zC)=>{"use strict";function YT(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}zC.exports=JT;function JT(e,t,r){var o=r&&r.stringify||YT,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 s=1;s<a;s++)i[s]=o(t[s]);return i.join(" ")}if(typeof e!="string")return e;var u=t.length;if(u===0)return e;for(var c="",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&&(c+=e.slice(d,m)),c+=Number(t[l]),d=m+2,m++;break;case 105:if(l>=u||t[l]==null)break;d<m&&(c+=e.slice(d,m)),c+=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&&(c+=e.slice(d,m));var f=typeof t[l];if(f==="string"){c+="'"+t[l]+"'",d=m+2,m++;break}if(f==="function"){c+=t[l].name||"<anonymous>",d=m+2,m++;break}c+=o(t[l]),d=m+2,m++;break;case 115:if(l>=u)break;d<m&&(c+=e.slice(d,m)),c+=String(t[l]),d=m+2,m++;break;case 37:d<m&&(c+=e.slice(d,m)),c+="%",d=m+2,m++,l--;break}++l}++m}return d===-1?e:(d<p&&(c+=e.slice(d)),c)}});var XC=Ae((M8,cu)=>{"use strict";var KC=WC();cu.exports=gr;var xi=mO().console||{},XT={mapHttpRequest:su,mapHttpResponse:su,wrapRequestSerializer:Mm,wrapResponseSerializer:Mm,wrapErrorSerializer:Mm,req:su,res:su,err:HC,errWithCause:HC};function oo(e,t){return e==="silent"?1/0:t.levels.values[e]}var Bm=Symbol("pino.logFuncs"),Qm=Symbol("pino.hierarchy"),ZT={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function GC(e,t){let r={logger:t,parent:e[Qm]};t[Qm]=r}function eO(e,t,r){let o={};t.forEach(n=>{o[n]=r[n]?r[n]:xi[n]||xi[ZT[n]||"log"]||ra}),e[Bm]=o}function tO(e,t){return Array.isArray(e)?e.filter(function(o){return o!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function gr(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||xi;e.browser.write&&(e.browser.asObject=!0);let o=e.serializers||{},n=tO(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||{}),s=["error","fatal","warn","info","debug","trace"].concat(i);typeof r=="function"&&s.forEach(function(h){r[h]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let u=e.level||"info",c=Object.create(r);c.log||(c.log=ra),eO(c,s,r),GC({},c),Object.defineProperty(c,"levelVal",{get:d}),Object.defineProperty(c,"level",{get:p,set:m});let l={transmit:t,serialize:n,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:s,timestamp:uO(e),messageKey:e.messageKey||"msg",onChild:e.onChild||ra};c.levels=rO(e),c.level=u,c.setMaxListeners=c.getMaxListeners=c.emit=c.addListener=c.on=c.prependListener=c.once=c.prependOnceListener=c.removeListener=c.removeAllListeners=c.listeners=c.listenerCount=c.eventNames=c.write=c.flush=ra,c.serializers=o,c._serialize=n,c._stdErrSerialize=a,c.child=function(...h){return f.call(this,l,...h)},t&&(c._logEvent=Lm());function d(){return oo(this.level,this)}function p(){return this._level}function m(h){if(h!=="silent"&&!this.levels.values[h])throw Error("unknown level "+h);this._level=h,No(this,l,c,"error"),No(this,l,c,"fatal"),No(this,l,c,"warn"),No(this,l,c,"info"),No(this,l,c,"debug"),No(this,l,c,"trace"),i.forEach(C=>{No(this,l,c,C)})}function f(h,C,S){if(!C)throw new Error("missing bindings for child Pino");S=S||{},n&&C.serializers&&(S.serializers=C.serializers);let A=S.serializers;if(n&&A){var y=Object.assign({},o,A),x=e.browser.serialize===!0?Object.keys(y):n;delete C.serializers,Um([C],x,y,this._stdErrSerialize)}function I(R){this._childLevel=(R._childLevel|0)+1,this.bindings=C,y&&(this.serializers=y,this._serialize=x),t&&(this._logEvent=Lm([].concat(R._logEvent.bindings,C)))}I.prototype=this;let v=new I(this);return GC(this,v),v.child=function(...R){return f.call(this,h,...R)},v.level=S.level||this.level,h.onChild(v),v}return c}function rO(e){let t=e.customLevels||{},r=Object.assign({},gr.levels.values,t),o=Object.assign({},gr.levels.labels,oO(t));return{values:r,labels:o}}function oO(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}gr.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"}};gr.stdSerializers=XT;gr.stdTimeFunctions=Object.assign({},{nullTime:YC,epochTime:JC,unixTime:lO,isoTime:dO});function nO(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[Qm];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function No(e,t,r,o){if(Object.defineProperty(e,o,{value:oo(e.level,r)>oo(o,r)?ra:r[Bm][o],writable:!0,enumerable:!0,configurable:!0}),e[o]===ra){if(!t.transmit)return;let a=t.transmit.level||e.level,i=oo(a,r);if(oo(o,r)<i)return}e[o]=iO(e,t,r,o);let n=nO(e);n.length!==0&&(e[o]=aO(n,e[o]))}function aO(e,t){return function(){return t.apply(this,[...e,...arguments])}}function iO(e,t,r,o){return function(n){return function(){let i=t.timestamp(),s=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===xi?xi:this;for(var c=0;c<s.length;c++)s[c]=arguments[c];var l=!1;if(t.serialize&&(Um(s,this._serialize,this.serializers,this._stdErrSerialize),l=!0),t.asObject||t.formatters?n.call(u,sO(this,o,s,i,t)):n.apply(u,s),t.transmit){let d=t.transmit.level||e._level,p=oo(d,r),m=oo(o,r);if(m<p)return;cO(this,{ts:i,methodLevel:o,methodValue:m,transmitLevel:d,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:oo(e._level,r)},s,l)}}}(e[Bm][o])}function sO(e,t,r,o,n){let{level:a,log:i=p=>p}=n.formatters||{},s=r.slice(),u=s[0],c={};if(o&&(c.time=o),a){let p=a(t,e.levels.values[t]);Object.assign(c,p)}else c.level=e.levels.values[t];let l=(e._childLevel|0)+1;if(l<1&&(l=1),u!==null&&typeof u=="object"){for(;l--&&typeof s[0]=="object";)Object.assign(c,s.shift());u=s.length?KC(s.shift(),s):void 0}else typeof u=="string"&&(u=KC(s.shift(),s));return u!==void 0&&(c[n.messageKey]=u),i(c)}function Um(e,t,r,o){for(let n in e)if(o&&e[n]instanceof Error)e[n]=gr.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 cO(e,t,r,o=!1){let n=t.send,a=t.ts,i=t.methodLevel,s=t.methodValue,u=t.val,c=e._logEvent.bindings;o||Um(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 c.indexOf(l)===-1}),e._logEvent.level.label=i,e._logEvent.level.value=s,n(i,e._logEvent,u),e._logEvent=Lm(c)}function Lm(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function HC(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 uO(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?YC:JC}function su(){return{}}function Mm(e){return e}function ra(){}function YC(){return!1}function JC(){return Date.now()}function lO(){return Math.round(Date.now()/1e3)}function dO(){return new Date(Date.now()).toISOString()}function mO(){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)||{}}}cu.exports.default=gr;cu.exports.pino=gr});var Tp="coveo-headless-internal-state",U=Symbol.for(Tp),Op=e=>new Proxy(e,{ownKeys(t){return Reflect.ownKeys(t).filter(r=>r!==U)},get(t,r,o){return typeof r=="symbol"&&r.description===Tp&&r!==U&&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 so=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function qp(e){return Array.isArray(e)}function ki(e){return e.trim()===""}function Dp(e){let t={};for(let[r,o]of e)t[r]=o;return t}function Vi(e,t){return Object.fromEntries(Object.entries(e).map(([r,o])=>[r,t(o,r)]))}function Ni(e,t){return Object.fromEntries(Object.entries(e).filter(([r,o])=>t(o,r)))}function er(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function kp(){let e=null,t=null;return{promise:new Promise((o,n)=>{e=o,t=n}),resolve:e,reject:t}}function Mi(e){let{promise:t,resolve:r}=kp();return{promise:t,middleware:()=>n=>a=>{n(a),e(a)&&r(a)}}}function BF(e){return e==null?!1:typeof e=="object"&&"meta"in e?e.meta?.arg?.slotId!==void 0:!1}function Vp(e,t){let{promise:r,resolve:o}=kp(),n=!1,a=s=>t.has(s);return{promise:r,middleware:()=>s=>u=>{s(u),e(u)&&!n&&BF(u)&&!a(u.meta.arg.slotId)&&(n=!0,t.add(u.meta.arg.slotId),o(u))}}}var Kp=It(_p(),1);var Te=(n=>(n.search="search",n.listing="listing",n.standalone="standalone",n.recommendation="recommendation",n))(Te||{}),mP="recommendation-internal-options",$o=Symbol.for(mP);var $=new Error("Failed to load reducers."),zo=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}},Li=class extends Error{constructor(){super(),this.name="InvalidControllerDefinition",this.message=`A controller must be defined for at least one solution type: ${Object.keys(Te).map(t=>t.toLowerCase()).join(", ")}`}},Wo=class extends Error{constructor(t){super(),this.name="MissingControllerProps",this.message=`${t} props are required but were undefined. Ensure they are included when calling \`fetchStaticState\` or \`hydrateStaticState\`.`}},Bi=class extends Error{constructor(t){super(),this.name="MultipleRecommendationError",this.message=`Multiple recommendation controllers found for the same slotId: ${t}. Only one recommendation controller per slotId is supported.`}},uo=class extends Error{constructor(r,o){super();We(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function $p(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function zp(e){return typeof e!="object"||!e?!1:Object.values(e).every(pP)}function pP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Wp(e){return e===429}var Ko=class e{static async call(t){let r=fP(t),{logger:o}=t,n=await e.preprocessRequest(r,t);o.info(n,"Platform request");let{url:a,...i}=n,s=async()=>{let u=await fetch(a,i);if(Wp(u.status))throw u;return u};try{let u=await(0,Kp.backOff)(s,{retry:c=>{let l=c&&Wp(c.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new zo;case 404:throw new uo(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new uo(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:s,...u}=t,c=er(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 c}};function Oe(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function Ke(e,t="prod"){return`${Oe(e,t)}/rest/search/v2`}function pl(e,t="prod"){return`${Oe(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function fP(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,s=e.method==="POST"||e.method==="PUT",u=gP(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...s&&{body:u},signal:i}}function gP(e,t){return t==="application/x-www-form-urlencoded"?zp(e)?$p(e):"":JSON.stringify(e)}function yP(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function SP(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function fl(e,t){if(t&&e.name==="AbortError")return{error:SP(e)};if(e instanceof uo)return{error:yP(e)};throw e}var Go=(e,t)=>({...Ra(e,t),requestParams:hP(e)}),hP=e=>{let{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:s,perPage:u,facets:c,sort:l}=e;return{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:s,perPage:u,facets:c,sort:l}},Ra=(e,t)=>{let{url:r,accessToken:o}=e,n=`${r}/${t}`;return{accessToken:o,method:"POST",contentType:"application/json",url:n,origin:"commerceApiFetch",requestMetadata:{method:t}}};var Gp=(e,t)=>({...Ra(e,t),requestParams:CP(e)}),CP=e=>{let{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:s,page:u,perPage:c}=e;return{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:s,page:u,perPage:c}};var Hp=e=>({...Ra(e,"search/querySuggest"),requestParams:xP(e)}),xP=e=>{let{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:s}=e;return{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:s}};var qe=e=>e.error!==void 0,Ui=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...Go(t,"listing"),...this.options})}async search(t){let r=Go(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...Gp(t,"recommendations"),...this.options})}async productSuggestions(t){let r=Go(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=Hp(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=Go(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=Go(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await Ko.call(t);if(r instanceof Error)return fl(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function gl(e,t="prod"){return`${Oe(e,t)}/rest/organizations/${e}/commerce/v2`}var ji=e=>e;import{StringValue as Qf}from"@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 RP=typeof Symbol=="function"&&Symbol.observable||"@@observable",Yp=RP,yl=()=>Math.random().toString(36).substring(7).split("").join("."),FP={INIT:`@@redux/INIT${yl()}`,REPLACE:`@@redux/REPLACE${yl()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${yl()}`},_i=FP;function Tt(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 Sl(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(Sl)(e,t)}let o=e,n=t,a=new Map,i=a,s=0,u=!1;function c(){i===a&&(i=new Map,a.forEach((C,S)=>{i.set(S,C)}))}function l(){if(u)throw new Error(ve(3));return n}function d(C){if(typeof C!="function")throw new Error(ve(4));if(u)throw new Error(ve(5));let S=!0;c();let A=s++;return i.set(A,C),function(){if(S){if(u)throw new Error(ve(6));S=!1,c(),i.delete(A),a=null}}}function p(C){if(!Tt(C))throw new Error(ve(7));if(typeof C.type>"u")throw new Error(ve(8));if(typeof C.type!="string")throw new Error(ve(17));if(u)throw new Error(ve(9));try{u=!0,n=o(n,C)}finally{u=!1}return(a=i).forEach(A=>{A()}),C}function m(C){if(typeof C!="function")throw new Error(ve(10));o=C,p({type:_i.REPLACE})}function f(){let C=d;return{subscribe(S){if(typeof S!="object"||S===null)throw new Error(ve(11));function A(){let x=S;x.next&&x.next(l())}return A(),{unsubscribe:C(A)}},[Yp](){return this}}}return p({type:_i.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[Yp]:f}}function PP(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:_i.INIT})>"u")throw new Error(ve(12));if(typeof r(void 0,{type:_i.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ve(13))})}function Ho(e){let t=Object.keys(e),r={};for(let i=0;i<t.length;i++){let s=t[i];typeof e[s]=="function"&&(r[s]=e[s])}let o=Object.keys(r),n,a;try{PP(r)}catch(i){a=i}return function(s={},u){if(a)throw a;let c=!1,l={};for(let d=0;d<o.length;d++){let p=o[d],m=r[p],f=s[p],h=m(f,u);if(typeof h>"u"){let C=u&&u.type;throw new Error(ve(14))}l[p]=h,c=c||h!==f}return c=c||o.length!==Object.keys(s).length,c?l:s}}function Yo(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function Jp(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(ve(15))},i={getState:n.getState,dispatch:(u,...c)=>a(u,...c)},s=e.map(u=>u(i));return a=Yo(...s)(n.dispatch),{...n,dispatch:a}}}function $i(e){return Tt(e)&&"type"in e&&typeof e.type=="string"}var wl=Symbol.for("immer-nothing"),Fa=Symbol.for("immer-draftable"),Ge=Symbol.for("immer-state");function be(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var mo=Object.getPrototypeOf;function rt(e){return!!e&&!!e[Ge]}function He(e){return e?rf(e)||Array.isArray(e)||!!e[Fa]||!!e.constructor?.[Fa]||wa(e)||Ea(e):!1}var AP=Object.prototype.constructor.toString();function rf(e){if(!e||typeof e!="object")return!1;let t=mo(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)===AP}function El(e){return rt(e)||be(15,e),e[Ge].base_}function Pa(e,t){po(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function po(e){let t=e[Ge];return t?t.type_:Array.isArray(e)?1:wa(e)?2:Ea(e)?3:0}function Aa(e,t){return po(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function hl(e,t){return po(e)===2?e.get(t):e[t]}function of(e,t,r){let o=po(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function vP(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function wa(e){return e instanceof Map}function Ea(e){return e instanceof Set}function lo(e){return e.copy_||e.base_}function Rl(e,t){if(wa(e))return new Map(e);if(Ea(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=rf(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[Ge];let n=Reflect.ownKeys(o);for(let a=0;a<n.length;a++){let i=n[a],s=o[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(o[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(mo(e),o)}else{let o=mo(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function Ki(e,t=!1){return Gi(e)||rt(e)||!He(e)||(po(e)>1&&(e.set=e.add=e.clear=e.delete=bP),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>Ki(o,!0))),e}function bP(){be(2)}function Gi(e){return Object.isFrozen(e)}var Fl={};function fo(e){let t=Fl[e];return t||be(0,e),t}function wP(e,t){Fl[e]||(Fl[e]=t)}var va;function nf(){return va}function EP(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Xp(e,t){t&&(fo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Pl(e){Al(e),e.drafts_.forEach(IP),e.drafts_=null}function Al(e){e===va&&(va=e.parent_)}function Zp(e){return va=EP(va,e)}function IP(e){let t=e[Ge];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ef(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Ge].modified_&&(Pl(t),be(4)),He(e)&&(e=zi(t,e),t.parent_||Wi(t,e)),t.patches_&&fo("Patches").generateReplacementPatches_(r[Ge].base_,e,t.patches_,t.inversePatches_)):e=zi(t,r,[]),Pl(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==wl?e:void 0}function zi(e,t,r){if(Gi(t))return t;let o=t[Ge];if(!o)return Pa(t,(n,a)=>tf(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return Wi(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),Pa(a,(s,u)=>tf(e,o,n,s,u,r,i)),Wi(e,n,!1),r&&e.patches_&&fo("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function tf(e,t,r,o,n,a,i){if(rt(n)){let s=a&&t&&t.type_!==3&&!Aa(t.assigned_,o)?a.concat(o):void 0,u=zi(e,n,s);if(of(r,o,u),rt(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(He(n)&&!Gi(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;zi(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&Wi(e,n)}}function Wi(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ki(t,r)}function TP(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:nf(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=Il;r&&(n=[o],a=ba);let{revoke:i,proxy:s}=Proxy.revocable(n,a);return o.draft_=s,o.revoke_=i,s}var Il={get(e,t){if(t===Ge)return e;let r=lo(e);if(!Aa(r,t))return OP(e,r,t);let o=r[t];return e.finalized_||!He(o)?o:o===Cl(e.base_,t)?(xl(e),e.copy_[t]=bl(o,e)):o},has(e,t){return t in lo(e)},ownKeys(e){return Reflect.ownKeys(lo(e))},set(e,t,r){let o=af(lo(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=Cl(lo(e),t),a=n?.[Ge];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(vP(r,n)&&(r!==void 0||Aa(e.base_,t)))return!0;xl(e),vl(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 Cl(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,xl(e),vl(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=lo(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 mo(e.base_)},setPrototypeOf(){be(12)}},ba={};Pa(Il,(e,t)=>{ba[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ba.deleteProperty=function(e,t){return ba.set.call(this,e,t,void 0)};ba.set=function(e,t,r){return Il.set.call(this,e[0],t,r,e[0])};function Cl(e,t){let r=e[Ge];return(r?lo(r):e)[t]}function OP(e,t,r){let o=af(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function af(e,t){if(!(t in e))return;let r=mo(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=mo(r)}}function vl(e){e.modified_||(e.modified_=!0,e.parent_&&vl(e.parent_))}function xl(e){e.copy_||(e.copy_=Rl(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var qP=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,...c){return i.produce(u,l=>r.call(this,l,...c))}}typeof r!="function"&&be(6),o!==void 0&&typeof o!="function"&&be(7);let n;if(He(t)){let a=Zp(this),i=bl(t,void 0),s=!0;try{n=r(i),s=!1}finally{s?Pl(a):Al(a)}return Xp(a,o),ef(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===wl&&(n=void 0),this.autoFreeze_&&Ki(n,!0),o){let a=[],i=[];fo("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,...s)=>this.produceWithPatches(i,u=>t(u,...s));let o,n;return[this.produce(t,r,(i,s)=>{o=i,n=s}),o,n]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){He(e)||be(8),rt(e)&&(e=sf(e));let t=Zp(this),r=bl(e,void 0);return r[Ge].isManual_=!0,Al(t),r}finishDraft(e,t){let r=e&&e[Ge];(!r||!r.isManual_)&&be(9);let{scope_:o}=r;return Xp(o,t),ef(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=fo("Patches").applyPatches_;return rt(e)?o(e,t):this.produce(e,n=>o(n,t))}};function bl(e,t){let r=wa(e)?fo("MapSet").proxyMap_(e,t):Ea(e)?fo("MapSet").proxySet_(e,t):TP(e,t);return(t?t.scope_:nf()).drafts_.push(r),r}function sf(e){return rt(e)||be(10,e),cf(e)}function cf(e){if(!He(e)||Gi(e))return e;let t=e[Ge],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Rl(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Rl(e,!0);return Pa(r,(o,n)=>{of(r,o,cf(n))}),t&&(t.finalized_=!1),r}function uf(){let t="replace",r="add",o="remove";function n(p,m,f,h){switch(p.type_){case 0:case 2:return i(p,m,f,h);case 1:return a(p,m,f,h);case 3:return s(p,m,f,h)}}function a(p,m,f,h){let{base_:C,assigned_:S}=p,A=p.copy_;A.length<C.length&&([C,A]=[A,C],[f,h]=[h,f]);for(let y=0;y<C.length;y++)if(S[y]&&A[y]!==C[y]){let x=m.concat([y]);f.push({op:t,path:x,value:d(A[y])}),h.push({op:t,path:x,value:d(C[y])})}for(let y=C.length;y<A.length;y++){let x=m.concat([y]);f.push({op:r,path:x,value:d(A[y])})}for(let y=A.length-1;C.length<=y;--y){let x=m.concat([y]);h.push({op:o,path:x})}}function i(p,m,f,h){let{base_:C,copy_:S}=p;Pa(p.assigned_,(A,y)=>{let x=hl(C,A),I=hl(S,A),v=y?Aa(C,A)?t:r:o;if(x===I&&v===t)return;let R=m.concat(A);f.push(v===o?{op:v,path:R}:{op:v,path:R,value:I}),h.push(v===r?{op:o,path:R}:v===o?{op:r,path:R,value:d(x)}:{op:t,path:R,value:d(x)})})}function s(p,m,f,h){let{base_:C,copy_:S}=p,A=0;C.forEach(y=>{if(!S.has(y)){let x=m.concat([A]);f.push({op:o,path:x,value:y}),h.unshift({op:r,path:x,value:y})}A++}),A=0,S.forEach(y=>{if(!C.has(y)){let x=m.concat([A]);f.push({op:r,path:x,value:y}),h.unshift({op:o,path:x,value:y})}A++})}function u(p,m,f,h){f.push({op:t,path:[],value:m===wl?void 0:m}),h.push({op:t,path:[],value:p})}function c(p,m){return m.forEach(f=>{let{path:h,op:C}=f,S=p;for(let I=0;I<h.length-1;I++){let v=po(S),R=h[I];typeof R!="string"&&typeof R!="number"&&(R=""+R),(v===0||v===1)&&(R==="__proto__"||R==="constructor")&&be(19),typeof S=="function"&&R==="prototype"&&be(19),S=hl(S,R),typeof S!="object"&&be(18,h.join("/"))}let A=po(S),y=l(f.value),x=h[h.length-1];switch(C){case t:switch(A){case 2:return S.set(x,y);case 3:be(16);default:return S[x]=y}case r:switch(A){case 1:return x==="-"?S.push(y):S.splice(x,0,y);case 2:return S.set(x,y);case 3:return S.add(y);default:return S[x]=y}case o:switch(A){case 1:return S.splice(x,1);case 2:return S.delete(x);case 3:return S.delete(f.value);default:return delete S[x]}default:be(17,C)}}),p}function l(p){if(!He(p))return p;if(Array.isArray(p))return p.map(l);if(wa(p))return new Map(Array.from(p.entries()).map(([f,h])=>[f,l(h)]));if(Ea(p))return new Set(Array.from(p).map(l));let m=Object.create(mo(p));for(let f in p)m[f]=l(p[f]);return Aa(p,Fa)&&(m[Fa]=p[Fa]),m}function d(p){return rt(p)?l(p):p}wP("Patches",{applyPatches_:c,generatePatches_:n,generateReplacementPatches_:u})}var ot=new qP,rr=ot.produce,Hi=ot.produceWithPatches.bind(ot),UN=ot.setAutoFreeze.bind(ot),jN=ot.setUseStrictShallowCopy.bind(ot),Tl=ot.applyPatches.bind(ot),_N=ot.createDraft.bind(ot),$N=ot.finishDraft.bind(ot);function DP(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function kP(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function VP(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 lf=e=>Array.isArray(e)?e:[e];function NP(e){let t=Array.isArray(e[0])?e[0]:e;return VP(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function MP(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var KN=Symbol();var GN=Object.getPrototypeOf({});var QP=class{constructor(e){this.value=e}deref(){return this.value}},LP=typeof WeakRef<"u"?WeakRef:QP,BP=0,df=1;function Yi(){return{s:BP,v:void 0,o:null,p:null}}function Jo(e,t={}){let r=Yi(),{resultEqualityCheck:o}=t,n,a=0;function i(){let s=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=s.o;f===null&&(s.o=f=new WeakMap);let h=f.get(m);h===void 0?(s=Yi(),f.set(m,s)):s=h}else{let f=s.p;f===null&&(s.p=f=new Map);let h=f.get(m);h===void 0?(s=Yi(),f.set(m,s)):s=h}}let c=s,l;if(s.s===df)l=s.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 LP(l):l}return c.s=df,c.v=l,l}return i.clearCache=()=>{r=Yi(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function mf(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...n)=>{let a=0,i=0,s,u={},c=n.pop();typeof c=="object"&&(u=c,c=n.pop()),DP(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=Jo,argsMemoizeOptions:f=[],devModeChecks:h={}}=l,C=lf(p),S=lf(f),A=NP(n),y=d(function(){return a++,c.apply(null,arguments)},...C),x=!0,I=m(function(){i++;let R=MP(A,arguments);return s=y.apply(null,R),s},...S);return Object.assign(I,{resultFunc:c,memoizedResultFunc:y,dependencies:A,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var Q=mf(Jo),UP=Object.assign((e,t=Q)=>{kP(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,s,u)=>(i[r[u]]=s,i),{}))},{withTypes:()=>UP});function pf(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var ff=pf(),gf=pf;var jP=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Yo:Yo.apply(null,arguments)},nM=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},_P=e=>e&&typeof e.match=="function";function g(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(Ft(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=>$i(o)&&o.type===e,r}var xf=class Ia extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ia.prototype)}static get[Symbol.species](){return Ia}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ia(...t[0].concat(this)):new Ia(...t.concat(this))}};function yf(e){return He(e)?rr(e,()=>{}):e}function Sf(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function $P(e){return typeof e=="boolean"}var zP=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new xf;return r&&($P(r)?i.push(ff):i.push(gf(r.extraArgument))),i},Ta="RTK_autoBatch",Zo=()=>e=>({payload:e,meta:{[Ta]:!0}}),hf=e=>t=>{setTimeout(t,e)},WP=(e={type:"raf"})=>t=>(...r)=>{let o=t(...r),n=!0,a=!1,i=!1,s=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:hf(10):e.type==="callback"?e.queueNotification:hf(e.timeout),c=()=>{i=!1,a&&(a=!1,s.forEach(l=>l()))};return Object.assign({},o,{subscribe(l){let d=()=>n&&l(),p=o.subscribe(d);return s.add(l),()=>{p(),s.delete(l)}},dispatch(l){try{return n=!l?.meta?.[Ta],a=!n,a&&(i||(i=!0,u(c))),o.dispatch(l)}finally{n=!0}}})},KP=e=>function(r){let{autoBatch:o=!0}=r??{},n=new xf(e);return o&&n.push(WP(typeof o=="object"?o:void 0)),n};function Rf(e){let t=zP(),{reducer:r=void 0,middleware:o,devTools:n=!0,preloadedState:a=void 0,enhancers:i=void 0}=e||{},s;if(typeof r=="function")s=r;else if(Tt(r))s=Ho(r);else throw new Error(Ft(1));let u;typeof o=="function"?u=o(t):u=t();let c=Yo;n&&(c=jP({trace:!1,...typeof n=="object"&&n}));let l=Jp(...u),d=KP(l),p=typeof i=="function"?i(d):d(),m=c(...p);return Sl(s,a,m)}function Ff(e){let t={},r=[],o,n={addCase(a,i){let s=typeof a=="string"?a:a.type;if(!s)throw new Error(Ft(28));if(s in t)throw new Error(Ft(29));return t[s]=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 GP(e){return typeof e=="function"}function j(e,t){let[r,o,n]=Ff(t),a;if(GP(e))a=()=>yf(e());else{let s=yf(e);a=()=>s}function i(s=a(),u){let c=[r[u.type],...o.filter(({matcher:l})=>l(u)).map(({reducer:l})=>l)];return c.filter(l=>!!l).length===0&&(c=[n]),c.reduce((l,d)=>{if(d)if(rt(l)){let m=d(l,u);return m===void 0?l:m}else{if(He(l))return rr(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},s)}return i.getInitialState=a,i}var Pf=(e,t)=>_P(e)?e.match(t):e(t);function Ot(...e){return t=>e.some(r=>Pf(r,t))}function Xo(...e){return t=>e.every(r=>Pf(r,t))}function Xi(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 Oa(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Zi(...e){return e.length===0?t=>Xi(t,["pending"]):Oa(e)?Ot(...e.map(t=>t.pending)):Zi()(e[0])}function go(...e){return e.length===0?t=>Xi(t,["rejected"]):Oa(e)?Ot(...e.map(t=>t.rejected)):go()(e[0])}function qa(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Xo(go(...e),t):Oa(e)?Xo(go(...e),t):qa()(e[0])}function or(...e){return e.length===0?t=>Xi(t,["fulfilled"]):Oa(e)?Ot(...e.map(t=>t.fulfilled)):or()(e[0])}function es(...e){return e.length===0?t=>Xi(t,["pending","fulfilled","rejected"]):Oa(e)?Ot(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):es()(e[0])}var HP="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ts=(e=21)=>{let t="",r=e;for(;r--;)t+=HP[Math.random()*64|0];return t},YP=["name","message","stack","code"],Ol=class{constructor(e,t){We(this,"_type");this.payload=e,this.meta=t}},Cf=class{constructor(e,t){We(this,"_type");this.payload=e,this.meta=t}},JP=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of YP)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},_=(()=>{function e(t,r,o){let n=g(t+"/fulfilled",(u,c,l,d)=>({payload:u,meta:{...d||{},arg:l,requestId:c,requestStatus:"fulfilled"}})),a=g(t+"/pending",(u,c,l)=>({payload:void 0,meta:{...l||{},arg:c,requestId:u,requestStatus:"pending"}})),i=g(t+"/rejected",(u,c,l,d,p)=>({payload:d,error:(o&&o.serializeError||JP)(u||"Rejected"),meta:{...p||{},arg:l,requestId:c,rejectedWithValue:!!d,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function s(u){return(c,l,d)=>{let p=o?.idGenerator?o.idGenerator(u):ts(),m=new AbortController,f,h;function C(A){h=A,m.abort()}let S=async function(){let A;try{let x=o?.condition?.(u,{getState:l,extra:d});if(ZP(x)&&(x=await x),x===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let I=new Promise((v,R)=>{f=()=>{R({name:"AbortError",message:h||"Aborted"})},m.signal.addEventListener("abort",f)});c(a(p,u,o?.getPendingMeta?.({requestId:p,arg:u},{getState:l,extra:d}))),A=await Promise.race([I,Promise.resolve(r(u,{dispatch:c,getState:l,extra:d,requestId:p,signal:m.signal,abort:C,rejectWithValue:(v,R)=>new Ol(v,R),fulfillWithValue:(v,R)=>new Cf(v,R)})).then(v=>{if(v instanceof Ol)throw v;return v instanceof Cf?n(v.payload,p,u,v.meta):n(v,p,u)})])}catch(x){A=x instanceof Ol?i(null,p,u,x.payload,x.meta):i(x,p,u)}finally{f&&m.signal.removeEventListener("abort",f)}return o&&!o.dispatchConditionRejection&&i.match(A)&&A.meta.condition||c(A),A}();return Object.assign(S,{abort:C,requestId:p,arg:u,unwrap(){return S.then(XP)}})}}return Object.assign(s,{pending:a,rejected:i,fulfilled:n,settled:Ot(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function XP(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function ZP(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Af=Symbol.for("rtk-slice-createasyncthunk"),uM={[Af]:_};function eA(e,t){return`${e}/${t}`}function tA({creators:e}={}){let t=e?.asyncThunk?.[Af];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(Ft(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(oA()):o.reducers)||{},s=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(A,y){let x=typeof A=="string"?A:A.type;if(!x)throw new Error(Ft(12));if(x in u.sliceCaseReducersByType)throw new Error(Ft(13));return u.sliceCaseReducersByType[x]=y,c},addMatcher(A,y){return u.sliceMatchers.push({matcher:A,reducer:y}),c},exposeAction(A,y){return u.actionCreators[A]=y,c},exposeCaseReducer(A,y){return u.sliceCaseReducersByName[A]=y,c}};s.forEach(A=>{let y=i[A],x={reducerName:A,type:eA(n,A),createNotation:typeof o.reducers=="function"};aA(y)?sA(x,y,c,t):nA(x,y,c)});function l(){let[A={},y=[],x=void 0]=typeof o.extraReducers=="function"?Ff(o.extraReducers):[o.extraReducers],I={...A,...u.sliceCaseReducersByType};return j(o.initialState,v=>{for(let R in I)v.addCase(R,I[R]);for(let R of u.sliceMatchers)v.addMatcher(R.matcher,R.reducer);for(let R of y)v.addMatcher(R.matcher,R.reducer);x&&v.addDefaultCase(x)})}let d=A=>A,p=new Map,m;function f(A,y){return m||(m=l()),m(A,y)}function h(){return m||(m=l()),m.getInitialState()}function C(A,y=!1){function x(v){let R=v[A];return typeof R>"u"&&y&&(R=h()),R}function I(v=d){let R=Sf(p,y,()=>new WeakMap);return Sf(R,v,()=>{let P={};for(let[b,T]of Object.entries(o.selectors??{}))P[b]=rA(T,v,h,y);return P})}return{reducerPath:A,getSelectors:I,get selectors(){return I(x)},selectSlice:x}}let S={name:n,reducer:f,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:h,...C(a),injectInto(A,{reducerPath:y,...x}={}){let I=y??a;return A.inject({reducerPath:I,reducer:f},x),{...S,...C(I,!0)}}};return S}}function rA(e,t,r,o){function n(a,...i){let s=t(a);return typeof s>"u"&&o&&(s=r()),e(s,...i)}return n.unwrapped=e,n}var yo=tA();function oA(){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 nA({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!iA(o))throw new Error(Ft(17));a=o.reducer,i=o.prepare}else a=o;n.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?g(e,i):g(e))}function aA(e){return e._reducerDefinitionType==="asyncThunk"}function iA(e){return e._reducerDefinitionType==="reducerWithPrepare"}function sA({type:e,reducerName:t},r,o,n){if(!n)throw new Error(Ft(18));let{payloadCreator:a,fulfilled:i,pending:s,rejected:u,settled:c,options:l}=r,d=n(e,a,l);o.exposeAction(t,d),i&&o.addCase(d.fulfilled,i),s&&o.addCase(d.pending,s),u&&o.addCase(d.rejected,u),c&&o.addMatcher(d.settled,c),o.exposeCaseReducer(t,{fulfilled:i||Ji,pending:s||Ji,rejected:u||Ji,settled:c||Ji})}function Ji(){}var vf="listener",bf="completed",wf="cancelled",lM=`task-${wf}`,dM=`task-${bf}`,mM=`${vf}-${wf}`,pM=`${vf}-${bf}`;var{assign:Ef}=Object;var ql="listenerMiddleware";var cA=Ef(g(`${ql}/add`),{withTypes:()=>cA}),fM=g(`${ql}/removeAll`),uA=Ef(g(`${ql}/remove`),{withTypes:()=>uA});var gM=Symbol.for("rtk-state-proxy-original");function Ft(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. `}import{Schema as lA,SchemaValidationError as dA,StringValue as Da,RecordValue as mA,ArrayValue as pA}from"@coveo/bueno";var D=new Da({required:!0,emptyAllowed:!1}),ne=new Da({required:!1,emptyAllowed:!1}),me=new Da({required:!0,emptyAllowed:!0}),If=new Da({required:!1,emptyAllowed:!0}),rs=new pA({each:D,required:!0}),Tf=new Da({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),je=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Se=(e,t)=>{if("required"in t)return{payload:new lA({value:t}).validate({value:e}).value};let n=new mA({options:{required:!0},values:t}).validate(e);if(n)throw new dA(n);return{payload:e}},F=(e,t)=>{try{return Se(e,t)}catch(r){return{payload:e,error:je(r)}}},Ye=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return Of(e,t,r,n,"Controller initialization error")},_e=(e,t,r,o)=>{let n=`Check the options of ${o}`;return Of(e,t,r,n,"Controller initialization error")},Of=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};import{ArrayValue as fA,BooleanValue as Df,RecordValue as gA,StringValue as ka,Value as yA}from"@coveo/bueno";var So="3.22.5",qf=["@coveo/atomic","@coveo/quantic"];var Dl=()=>ne,kf=()=>D,ho=g("configuration/updateBasicConfiguration",e=>F(e,{accessToken:ne,environment:new ka({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ne})),Vf=g("configuration/updateSearchConfiguration",e=>F(e,{proxyBaseUrl:new ka({required:!1,url:!0}),pipeline:new ka({required:!1,emptyAllowed:!0}),searchHub:ne,timezone:ne,locale:ne,authenticationProviders:new fA({required:!1,each:D})})),en={enabled:new Df({default:!0}),originContext:Dl(),originLevel2:Dl(),originLevel3:Dl(),proxyBaseUrl:new ka({required:!1,url:!0}),runtimeEnvironment:new yA,anonymous:new Df({default:!1}),deviceId:ne,userDisplayName:ne,documentLocation:ne,trackingId:ne,analyticsMode:new ka({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new gA({options:{required:!1},values:qf.reduce((e,t)=>(e[t]=Tf,e),{})})},kl=g("configuration/updateAnalyticsConfiguration",e=>F(e,en)),os=g("configuration/analytics/disable"),ns=g("configuration/analytics/enable"),Nf=g("configuration/analytics/originlevel2",e=>F(e,{originLevel2:kf()})),Mf=g("configuration/analytics/originlevel3",e=>F(e,{originLevel3:kf()}));var tn=g("commerce/configuration/updateBasicConfiguration",e=>F(e,{accessToken:ne,environment:new Qf({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ne})),rn=g("commerce/configuration/updateProxyBaseUrl",e=>F(e,{proxyBaseUrl:new Qf({required:!1,url:!0})})),on=g("commerce/configuration/updateAnalyticsConfiguration",e=>F(e,{enabled:en.enabled,proxyBaseUrl:en.proxyBaseUrl,source:en.source,trackingId:en.trackingId})),as=g("commerce/configuration/analytics/disable"),is=g("commerce/configuration/analytics/enable");import{isNullOrUndefined as Co}from"@coveo/bueno";var Lf=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var Vl=j(Lf(),e=>e.addCase(tn,(t,r)=>{Bf(t,r.payload)}).addCase(ho,(t,r)=>{Bf(t,r.payload)}).addCase(rn,(t,r)=>{SA(t,r.payload)}).addCase(on,(t,r)=>{hA(t,r.payload)}).addCase(as,t=>{t.analytics.enabled=!1}).addCase(is,t=>{t.analytics.enabled=!0}));function Bf(e,t){Co(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",Co(t.organizationId)||(e.organizationId=t.organizationId)}function SA(e,t){Co(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function hA(e,t){Co(t.enabled)||(e.analytics.enabled=t.enabled),Co(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),Co(t.source)||(e.analytics.source=t.source),Co(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function nn(e){return e.currency}var Uf=(e,t)=>({currency:nn(t.commerceContext),products:CA(t.cart),transaction:e}),jf=(e,t)=>({currency:nn(t.commerceContext),...e}),xo=Q(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),CA=Q(xo,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));import{ArrayValue as xA,NumberValue as _f,RecordValue as RA,Schema as FA,StringValue as PA}from"@coveo/bueno";var Nl={productId:D,quantity:new _f({required:!0,min:0}),name:new PA({required:!1}),price:new _f({required:!1,min:0})},Ml=new xA({each:new RA({values:{...Nl}})}),Ql={items:Ml},$f=new FA(Ql);var xr=g("commerce/cart/setItems",e=>F(e,Ml)),an=g("commerce/cart/updateItemQuantity",e=>F(e,Nl)),sn=g("commerce/cart/purchase"),ss=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=Uf(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),cs=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=jf(e,r()),{relay:n}=t;n.emit("ec.cartAction",o)});function W(e){let t,r=new Map,o=()=>r.size===0,n=a=>{try{let i=JSON.stringify(a),s=t!==i;return t=i,s}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(),s;return o()&&(t=JSON.stringify(this.state),s=e.subscribe(()=>{n(this.state)&&r.forEach(u=>u())})),r.set(i,a),()=>{r.delete(i),o()&&s&&s()}},get state(){return{}}}}function zf(e,t){return e.cart[Ro(t)]}var Wf=Q(xo,e=>e.reduce((t,r)=>t+r.quantity,0)),Kf=Q(xo,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function Gf(e,t={}){if(!AA(e))throw $;let{dispatch:r}=e,o=W(e),n=()=>e[U].cart,a={...t.initialState};Ye(e,$f,a,"buildCart"),a.items!==void 0&&r(xr(a.items));function i(l,d){return d?d.quantity!==l.quantity:!0}function s(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 c(l,d){let{quantity:p,...m}=l,f=s(l,d),h=d?Math.abs(p-d.quantity):p;return{action:f,quantity:h,product:m}}return{...o,empty:function(){for(let l of xo(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(ss(l)),r(sn())},updateItemQuantity(l){let d=zf(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(cs(c(l,d))),r(an(l)))},get state(){let l=n();return{items:xo(l),totalQuantity:Wf(l),totalPrice:Kf(l)}}}}function Ro(e){return`${e.productId},${e.name},${e.price}`}function AA(e){return e.addReducers({cart:cn}),!0}var us=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),Hf=e=>Jf(e.cartItems,e.cart),Yf=e=>Jf(e.purchasedItems,e.purchased);function Jf(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 cn=j(us(),e=>{e.addCase(xr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let s=Ro(i);return{cartItems:[...a.cartItems,s],cart:{...a.cart,[s]:i},purchasedItems:[],purchased:{}}},us());Xf(t,n,o)}).addCase(an,(t,{payload:r})=>{let o=Ro(r);if(!(o in t.cart)){vA(r,t);return}if(r.quantity<=0){bA(r,t);return}t.cart[o]=r}).addCase(sn,t=>{wA(t);let{cart:r,cartItems:o}=us();Xf(t,o,r)})});function Xf(e,t,r){e.cartItems=t,e.cart=r}function vA(e,t){if(e.quantity<=0)return;let r=Ro(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function bA(e,t){let r=Ro(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function wA(e){for(let t of e.cartItems){if(t in e.purchased){e.purchased[t].quantity+=e.cart[t].quantity;continue}e.purchasedItems=[...e.purchasedItems,t],e.purchased[t]=e.cart[t]}}import{NumberValue as Zf,RecordValue as eg,Schema as EA,StringValue as IA}from"@coveo/bueno";var TA=Intl.supportedValuesOf("currency"),OA=new IA({required:!0,emptyAllowed:!1,constrainTo:TA}),Ll={url:D},Bl={latitude:new Zf({min:-90,max:90,required:!0}),longitude:new Zf({min:-180,max:180,required:!0})},Va={language:D,country:D,currency:OA,view:new eg({options:{required:!0},values:Ll}),location:new eg({options:{required:!1},values:Bl})},tg=new EA(Va);var ce=g("commerce/context/set",e=>F(e,Va)),le=g("commerce/context/setView",e=>F(e,Ll)),un=g("commerce/context/setLocation",e=>F(e,Bl));var rg=()=>({language:"",country:"",currency:"",view:{url:""}});var qt=j(rg(),e=>{e.addCase(ce,(t,{payload:r})=>r).addCase(le,(t,{payload:r})=>{t.view=r}).addCase(un,(t,{payload:r})=>{t.location=r})});var ls=()=>({correctedQuery:"",corrections:[],originalQuery:""});import{BooleanValue as ZA,RecordValue as ev,StringValue as Ag}from"@coveo/bueno";var ct=g("breadcrumb/deselectAll"),Rr=g("breadcrumb/deselectAllNonBreadcrumbs");var Fr=Q(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${So}`));var Pr=(e,t)=>{let{view:r,location:o,...n}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??gl(e.configuration.organizationId,e.configuration.environment),organizationId:e.configuration.organizationId,trackingId:e.configuration.analytics.trackingId,...n,...e.configuration.analytics.enabled?{clientId:t.clientId}:{},context:{user:{...o,...t.userAgent?{userAgent:t.userAgent}:{}},view:{...r,...t.referrer?{referrer:t.referrer}:{}},capture:t.capture??e.configuration.analytics.enabled,cart:Hf(e.cart),source:Fr(e.configuration.analytics)}}};import{ArrayValue as kA,EnumValue as ag,StringValue as ig,RecordValue as sg}from"@coveo/bueno";import{ArrayValue as qA,EnumValue as og,RecordValue as ng,StringValue as DA}from"@coveo/bueno";var Pt=(r=>(r.Relevance="relevance",r.Fields="fields",r))(Pt||{}),ln=(r=>(r.Ascending="asc",r.Descending="desc",r))(ln||{}),nr=()=>({by:"relevance"});var sQ=new ng({options:{required:!1},values:{by:new og({enum:Pt,required:!0}),fields:new qA({each:new ng({values:{name:new DA,direction:new og({enum:ln})}})})}});var Ul=e=>({by:"fields",fields:e}),cg=new sg({options:{required:!1},values:{by:new ag({enum:Pt,required:!0}),fields:new kA({each:new sg({values:{field:new ig({required:!0}),direction:new ag({enum:ln}),displayName:new ig}})})}});var ds=(e,t,r)=>({...Pr(e,t),...VA(e,r)}),VA=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};var ut=(e,t)=>({...ds(e,t),facets:[...NA(e)],...e.commerceSort&&{sort:MA(e.commerceSort.appliedSort)}});function NA(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 MA(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}import{BooleanValue as jl,NumberValue as QA}from"@coveo/bueno";var Fo=g("commerce/facets/core/updateNumberOfValues",e=>F(e,{facetId:D,numberOfValues:new QA({required:!0,min:1})})),Po=g("commerce/facets/core/updateIsFieldExpanded",e=>F(e,{facetId:D,isFieldExpanded:new jl({required:!0})})),pe=g("commerce/facets/core/clearAll"),De=g("commerce/facets/core/deselectAllValues",e=>F(e,{facetId:D})),Ao=g("commerce/facets/core/updateFreezeCurrentValues",e=>F(e,{facetId:D,freezeCurrentValues:new jl({required:!0})})),dn=g("commerce/facets/core/updateAutoSelectionForAll",e=>F(e,{allow:new jl({required:!0})}));import{NumberValue as ug}from"@coveo/bueno";var ms={slotId:If},LA={...ms,pageSize:new ug({required:!0,min:0})},ar=g("commerce/pagination/setPageSize",e=>F(e,LA)),BA={...ms,page:new ug({required:!0,min:0})},Dt=g("commerce/pagination/selectPage",e=>F(e,BA)),Ar=g("commerce/pagination/nextPage",e=>F(e,ms)),vr=g("commerce/pagination/previousPage",e=>F(e,ms)),mn=g("commerce/pagination/registerRecommendationsSlot",e=>F(e,{slotId:D}));var br=Q(e=>e.commercePagination?.principal.perPage||0,e=>e),ps=Q((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),wr=Q(e=>e.commercePagination?.principal.totalEntries||0,e=>e),fs=Q((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),gs=Q(e=>e.commercePagination?.principal.page||0,e=>e),lg=Q((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);import{StringValue as UA}from"@coveo/bueno";var fe=g("commerce/query/update",e=>F(e,{query:new UA}));import{isNullOrUndefined as Pg}from"@coveo/bueno";import{RecordValue as jA,StringValue as _A}from"@coveo/bueno";var Er=g("commerce/triggers/query/updateIgnore",e=>F(e,{q:new _A({emptyAllowed:!0,required:!0})})),pn=g("commerce/triggers/query/applyModification",e=>F(e,new jA({values:{originalQuery:ne,modification:ne}})));import{isNullOrUndefined as gg}from"@coveo/bueno";function _l(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function $l(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{sortCriteria:o}:{}}function kt(e,t,r,o){if(e===void 0)return{};let n=Object.entries(e).filter(([a])=>t(a)).map(([a,{request:i}])=>{let s=r(i);return s.length?{[a]:s}:{}}).reduce((a,i)=>({...a,...i}),{});return Object.keys(n).length?{[o]:n}:{}}function Vt(e){let{activeValue:t,ancestryMap:r}=$A(e);return t?zA(t,r):[]}function $A(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 zA(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function dg(){return{principal:Ir(),recommendations:{}}}function Ir(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}function vo(){return{appliedSort:nr(),availableSorts:[nr()]}}function ys(e){return{...WA(e?.commercePagination,t=>t.principal.page,Ir().page),...KA(e?.commercePagination,t=>t.principal.perPage,Ir().perPage),...$l(e?.commerceSort,t=>t.appliedSort,vo().appliedSort),...kt(e.commerceFacetSet,Tr(e,"regular"),GA,"f"),...kt(e.commerceFacetSet,Tr(e,"regular"),HA,"fExcluded"),...kt(e.commerceFacetSet,Tr(e,"location"),YA,"lf"),...kt(e.commerceFacetSet,Tr(e,"hierarchical"),JA,"cf"),...kt(e.commerceFacetSet,Tr(e,"dateRange"),mg,"df"),...kt(e.commerceFacetSet,Tr(e,"dateRange"),pg,"dfExcluded"),...kt(e.commerceFacetSet,Tr(e,"numericalRange"),mg,"nf"),...kt(e.commerceFacetSet,Tr(e,"numericalRange"),pg,"nfExcluded"),...fg("selected",e.manualNumericFacetSet),...fg("excluded",e.manualNumericFacetSet)}}function WA(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function KA(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function GA(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function HA(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function YA(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function mg(e){return e.values.filter(t=>t.state==="selected")}function pg(e){return e.values.filter(t=>t.state==="excluded")}function fg(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 JA(e){return Vt(e.values).map(r=>r.value)}function Tr(e,t){return r=>e.commerceFacetSet[r].request.type===t}var Ss=()=>({query:""});var sL=Q(e=>e[U].commerceSearch.responseId,e=>e),zl=Q(e=>e.commerceSearch.responseId,e=>e),yg=Q(e=>e.commerceSearch.requestId,e=>e),Na=Q(e=>e.commerceSearch?.products.length||0,e=>e),Sg=Q(e=>({total:wr(e),current:Na(e)}),({current:e,total:t})=>e<t),hg=Q(e=>e.commerceSearch?.isLoading,e=>gg(e)?!1:e),Cg=Q(e=>e.commerceSearch?.error,e=>e??null),hs=Q(e=>e.commerceQuery?.query,e=>e??""),XA=Q(e=>e.commerceSearch?.queryExecuted,e=>e),xg=(e,t)=>gg(t.queryCorrection?.correctedQuery)?hs(e):t.queryCorrection.correctedQuery,Rg=e=>({..._l(e?.commerceQuery,t=>t.query,Ss().query),...ys(e)});function Fg(e){return{query:XA(e)||""}}var Ma=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(!(!Pg(n)&&!Pg(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:s}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:xg(r,o),originalQuery:s??""}}async processQueryTriggersOrContinue(t){let r=this.getSuccessResponse(t);if(!r)return null;let o=r.triggers.find(s=>s.type==="query")?.content||"";if(!o)return null;if(this.getState().triggers?.queryModification.queryToIgnore===o)return this.dispatch(Er({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(pn({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...ut(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(fe({query:t}))}};var X=_("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=ut(o,n),i=hs(o),s=new Ma(t),u=await s.fetchFromAPI({...a,query:i});return s.process(u)}),Or=_("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!Sg(o))return null;let i=br(o),u=Na(o)/i,c=hs(o),l=ut(o,n),d=new Ma(t),p=await d.fetchFromAPI({...l,query:c,page:u});return d.process(p)}),fn=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;F(e,{query:new Ag,clearFilters:new ZA}),e.clearFilters&&(r(pe()),r(Rr())),r(dn({allow:!0})),r(fe({query:e.query})),r(Dt({page:0}))}),gn=_("commerce/search/fetchInstantProducts",async(e,{getState:t,rejectWithValue:r,extra:o})=>{let n=t(),{apiClient:a,navigatorContext:i}=o,{q:s}=e,u=await a.productSuggestions({...Pr(n,i),query:s});return qe(u)?r(u.error):{response:{...u.success,products:u.success.products}}}),tv={child:new ev({options:{required:!0},values:{permanentid:new Ag({required:!0})}})},yn=g("commerce/search/promoteChildToParent",e=>F(e,tv));function vg(){return{wasCorrectedTo:"",queryCorrection:ls(),originalQuery:""}}var Cs=j(vg(),e=>{e.addCase(X.pending,t=>{t.queryCorrection=ls(),t.wasCorrectedTo=""}).addCase(X.fulfilled,(t,r)=>{let{queryCorrection:o}=r.payload.response;t.originalQuery=r.payload.originalQuery,t.wasCorrectedTo=o?.correctedQuery??"",t.queryCorrection={correctedQuery:o?.correctedQuery??o?.corrections[0]?.correctedQuery??"",wordCorrections:o?.corrections[0]?.wordCorrections??[]}})});import{Value as Eg,BooleanValue as bg,ArrayValue as Rs,StringValue as xs,NumberValue as wg,RecordValue as cv}from"@coveo/bueno";var H=D;import{Value as rv,NumberValue as ov,StringValue as nv,ArrayValue as av,BooleanValue as iv}from"@coveo/bueno";var sv={state:new rv({required:!0}),numberOfResults:new ov({required:!0,min:0}),value:new nv({required:!0,emptyAllowed:!0}),path:new av({required:!0,each:D}),moreValuesAvailable:new iv({required:!1})};function Qa(e){e.children.forEach(t=>{Qa(t)}),Se({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},sv)}var Sn={facetId:H,field:D,tabs:new cv({options:{required:!1},values:{included:new Rs({each:new xs}),excluded:new Rs({each:new xs})}}),activeTab:new xs({required:!1}),delimitingCharacter:new xs({required:!1,emptyAllowed:!0}),filterFacetCount:new bg({required:!1}),injectionDepth:new wg({required:!1,min:0}),numberOfValues:new wg({required:!1,min:1}),sortCriteria:new Eg({required:!1}),basePath:new Rs({required:!1,each:D}),filterByBasePath:new bg({required:!1})},hn=5,Ig=g("categoryFacet/register",e=>F(e,Sn)),Tg=g("categoryFacet/toggleSelectValue",e=>{try{return Se(e.facetId,D),Qa(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:je(t)}}}),Og=g("categoryFacet/deselectAll",e=>F(e,Sn.facetId)),ZL=g("categoryFacet/updateNumberOfValues",e=>F(e,{facetId:Sn.facetId,numberOfValues:Sn.numberOfValues})),eB=g("categoryFacet/updateSortCriterion",e=>F(e,{facetId:Sn.facetId,criterion:new Eg})),tB=g("categoryFacet/updateBasePath",e=>F(e,{facetId:Sn.facetId,basePath:new Rs({each:D})}));import{NumberValue as mv,RecordValue as pv,ArrayValue as fv}from"@coveo/bueno";import{RecordValue as uv,NumberValue as lv,StringValue as dv}from"@coveo/bueno";var La={facetId:H,captions:new uv({options:{required:!1}}),numberOfValues:new lv({required:!1,min:1}),query:new dv({required:!1,emptyAllowed:!0})};var gv={path:new fv({required:!0,each:D}),displayValue:me,rawValue:me,count:new mv({required:!0,min:0})},Nt=g("categoryFacet/selectSearchResult",e=>F(e,{facetId:H,value:new pv({values:gv})})),Fs=g("categoryFacetSearch/register",e=>F(e,La));import{RecordValue as yv,NumberValue as Sv}from"@coveo/bueno";var qg={facetId:H,value:new yv({values:{displayValue:me,rawValue:me,count:new Sv({required:!0,min:0})}})},Ps=g("facetSearch/register",e=>F(e,La)),qr=g("facetSearch/update",e=>F(e,La)),nt=g("facetSearch/toggleSelectValue",e=>F(e,qg)),At=g("facetSearch/toggleExcludeValue",e=>F(e,qg));import{BooleanValue as hv}from"@coveo/bueno";var ir=g("facetOptions/update",(e={freezeFacetOrder:!0})=>F(e,{freezeFacetOrder:new hv({required:!1})})),Wl=g("facetOptions/facet/enable",e=>F(e,H)),sr=g("facetOptions/facet/disable",e=>F(e,H));var Cv=g("history/undo"),xv=g("history/redo"),Mt=g("history/snapshot"),AB=_("history/back",async(e,{dispatch:t})=>{t(Cv()),await t(xe())}),vB=_("history/forward",async(e,{dispatch:t})=>{t(xv()),await t(xe())}),xe=_("history/change",async(e,{getState:t})=>t().history.present);import{BooleanValue as Dg,StringValue as Ba,NumberValue as kg,RecordValue as Dr}from"@coveo/bueno";var As={q:new Ba,enableQuerySyntax:new Dg,aq:new Ba,cq:new Ba,firstResult:new kg({min:0}),numberOfResults:new kg({min:0}),sortCriteria:new Ba,f:new Dr,fExcluded:new Dr,cf:new Dr,nf:new Dr,mnf:new Dr,df:new Dr,debug:new Dg,sf:new Dr,tab:new Ba,af:new Dr};var we=g("searchParameters/restore",e=>F(e,As)),Rv=g("searchParameters/restoreTab",e=>F(e,D));import{BooleanValue as iS,NumberValue as sS,StringValue as DE}from"@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 w(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function s(l){try{c(o.next(l))}catch(d){i(d)}}function u(l){try{c(o.throw(l))}catch(d){i(d)}}function c(l){l.done?a(l.value):n(l.value).then(s,u)}c((o=o.apply(e,t||[])).next())})}var ee;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ee||(ee={}));function Hl(){return typeof window<"u"}function cd(){return typeof navigator<"u"}function Cn(){return typeof document<"u"}function Yl(){try{return typeof localStorage<"u"}catch{return!1}}function Fv(){try{return typeof sessionStorage<"u"}catch{return!1}}function Gg(){return cd()&&navigator.cookieEnabled}var Pv=[ee.click,ee.custom,ee.search,ee.view],Av=(e,t)=>Pv.indexOf(e)!==-1?Object.assign({language:Cn()?document.documentElement.lang:"unknown",userAgent:cd()?navigator.userAgent:"unknown"},t):t,_a=class e{static set(t,r,o){var n,a,i,s;o&&(a=new Date,a.setTime(a.getTime()+o)),s=window.location.hostname,s.indexOf(".")===-1?Vg(t,r,a):(i=s.split("."),n=i[i.length-2]+"."+i[i.length-1],Vg(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 Vg(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function vv(){return Yl()?localStorage:Gg()?new $a:Fv()?sessionStorage:new Rn}var $a=class e{getItem(t){return _a.get(`${e.prefix}${t}`)}removeItem(t){_a.erase(`${e.prefix}${t}`)}setItem(t,r,o){_a.set(`${e.prefix}${t}`,r,o)}};$a.prefix="coveo_";var Jl=class{constructor(){this.cookieStorage=new $a}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)}},Rn=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Ua="__coveo.analytics.history",Hg=20,Yg=1e3*60,Jg=75,Fn=class{constructor(t){this.store=t||vv()}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){return w(this,void 0,void 0,function*(){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=yield this.getHistoryWithInternalTimeAsync();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])})}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){return w(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Ua);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return w(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Ua);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Ua,JSON.stringify(t.slice(0,Hg)))}catch{}}clear(){try{this.store.removeItem(Ua)}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,Jg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Yg:!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))}},Xg=Object.freeze({__proto__:null,HistoryStore:Fn,MAX_NUMBER_OF_HISTORY_ELEMENTS:Hg,MAX_VALUE_SIZE:Jg,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:Yg,STORE_KEY:Ua,default:Fn}),bv=(e,t)=>w(void 0,void 0,void 0,function*(){return e===ee.view?(yield wv(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),wv=e=>w(void 0,void 0,void 0,function*(){let t=new Fn,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),vs,Ev=new Uint8Array(16);function Iv(){if(!vs&&(vs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!vs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return vs(Ev)}var Tv=/^(?:[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 ws(e){return typeof e=="string"&&Tv.test(e)}var Ee=[];for(let e=0;e<256;++e)Ee.push((e+256).toString(16).slice(1));function Zg(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 Ov(e){if(!ws(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 qv(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Dv="6ba7b810-9dad-11d1-80b4-00c04fd430c8",kv="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Vv(e,t,r){function o(n,a,i,s){var u;if(typeof n=="string"&&(n=qv(n)),typeof a=="string"&&(a=Ov(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 c=new Uint8Array(16+n.length);if(c.set(a),c.set(n,a.length),c=r(c),c[6]=c[6]&15|t,c[8]=c[8]&63|128,i){s=s||0;for(let l=0;l<16;++l)i[s+l]=c[l];return i}return Zg(c)}try{o.name=e}catch{}return o.DNS=Dv,o.URL=kv,o}var Nv=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ng={randomUUID:Nv};function bo(e,t,r){if(Ng.randomUUID&&!t&&!e)return Ng.randomUUID();e=e||{};let o=e.random||(e.rng||Iv)();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 Zg(o)}function Mv(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 Qv(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 s=0;s<i.length;++s)e.push(i.charCodeAt(s))}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 s=new Uint32Array(16);for(let u=0;u<16;++u)s[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]=s}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 s=new Uint32Array(80);for(let m=0;m<16;++m)s[m]=a[i][m];for(let m=16;m<80;++m)s[m]=Kl(s[m-3]^s[m-8]^s[m-14]^s[m-16],1);let u=r[0],c=r[1],l=r[2],d=r[3],p=r[4];for(let m=0;m<80;++m){let f=Math.floor(m/20),h=Kl(u,5)+Mv(f,c,l,d)+p+t[f]+s[m]>>>0;p=d,d=l,l=Kl(c,30)>>>0,c=u,u=h}r[0]=r[0]+u>>>0,r[1]=r[1]+c>>>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 Lv=Vv("v5",80,Qv),Mg=Lv,ey="2.30.45",Qg=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,ja={pageview:"pageview",event:"event"},Es=class{constructor({client:t,uuidGenerator:r=bo}){this.client=t,this.uuidGenerator=r}},Xl=class extends Es{constructor({client:t,uuidGenerator:r=bo}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Qg(window.location),this.lastReferrer=Cn()?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:Cn()?document.title:"",encoding:Cn()?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===ja.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===ja.pageview?this.nextPageViewId:this.pageViewId,referrer:t===ja.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===ja.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 Qg(window.location)}},kr=class e{constructor(t,r){if(!ws(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 ws(a)?new e(a,Number.parseInt(n)*1e3):null}};kr.cvo_cid="cvo_cid";kr.expirationTime=120;var Zl=class extends Es{constructor({client:t,uuidGenerator:r=bo}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return w(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),o=yield this.client.getCurrentVisitorId();return r.searchParams.set(kr.cvo_cid,new kr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Zl.Id="link";var dt=Object.keys;function bs(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Gl=128,ty=192,Lg=224,Bg=240;function Bv(e){return(e&248)===Bg?4:(e&Bg)===Lg?3:(e&Lg)===ty?2:1}function Uv(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&Gl)!=Gl)break;if(r-=3,(o&ty)!=Gl){t-r>=Bv(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"},jv=dt(ed).map(e=>ed[e]),_v=[...jv].join("|"),$v=new RegExp(`^(${_v}$)`),zv={svcAction:"svc_action",svcActionData:"svc_action_data"},Wv=e=>dt(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=ed[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),Kv=e=>$v.test(e),Gv=[Kv],Ug={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},jg={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},ke={action:"pa",list:"pal",listSource:"pls"},Is={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},Hv=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],td={id:"quoteId",affiliation:"quoteAffiliation"},rd={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Yv={add:ke,bookmark_add:ke,bookmark_remove:ke,click:ke,checkout:ke,checkout_option:ke,detail:ke,impression:ke,remove:ke,refund:Object.assign(Object.assign({},ke),Is),purchase:Object.assign(Object.assign({},ke),Is),quickview:ke,quote:Object.assign(Object.assign({},ke),td),review:Object.assign(Object.assign({},ke),rd)},Jv=dt(Ug).map(e=>Ug[e]),Xv=dt(jg).map(e=>jg[e]),Zv=dt(ke).map(e=>ke[e]),eb=dt(Is).map(e=>Is[e]),tb=dt(rd).map(e=>rd[e]),rb=dt(td).map(e=>td[e]),ob=[...Jv,"custom"].join("|"),nb=[...Xv,"custom"].join("|"),ry="(pr[0-9]+)",oy="(il[0-9]+pi[0-9]+)",ab=new RegExp(`^${ry}(${ob})$`),ib=new RegExp(`^(${oy}(${nb}))|(il[0-9]+nm)$`),sb=new RegExp(`^(${Zv.join("|")})$`),cb=new RegExp(`^(${eb.join("|")})$`),ub=new RegExp(`^${ry}custom$`),lb=new RegExp(`^${oy}custom$`),db=new RegExp(`^(${[...Hv,...tb,...rb].join("|")})$`),mb=e=>ab.test(e),pb=e=>ib.test(e),fb=e=>sb.test(e),gb=e=>cb.test(e),yb=e=>db.test(e),Sb=[pb,mb,fb,gb,yb],hb=[ub,lb],Cb={anonymizeIp:"aip"},xb={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Rb={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},Fb=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],Pb=Object.assign(Object.assign(Object.assign(Object.assign({},Cb),xb),Rb),Fb.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),od=Object.assign(Object.assign({},Pb),zv),Ab=e=>{let t=!!e.action&&Yv[e.action]||{};return dt(e).reduce((r,o)=>{let n=t[o]||od[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},vb=dt(od).map(e=>od[e]),bb=e=>vb.indexOf(e)!==-1,wb=e=>e==="custom",Eb=e=>[...Sb,...Gv,bb,wb].some(t=>t(e)),Ib=e=>dt(e).reduce((t,r)=>{let o=Tb(r);return o?Object.assign(Object.assign({},t),Ob(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Tb=e=>{let t;return[...hb].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},Ob=(e,t)=>dt(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),nd=class{constructor(t){this.opts=t}sendEvent(t,r){return w(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:o,preprocessRequest:n}=this.opts,a=yield this.getQueryParamsForEventType(t),{url:i,payload:s}=yield this.preProcessRequestAsPotentialJSONString(`${o}/analytics/${t}?${a}`,r,n),u=this.encodeForEventType(t,s),c=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,c)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,o){return w(this,void 0,void 0,function*(){let n=t,a=r;if(o){let i=yield o({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:s,body:u}=i;n=s||t;try{a=JSON.parse(u)}catch(c){console.error("Unable to process the request body as a JSON string",c)}}return{payload:a,url:n}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return w(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:o}=this.opts,n=yield o.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",n?`visitorId=${n}`:"","discardVisitInfo=true"].filter(a=>!!a).join("&")})}isEventTypeLegacy(t){return[ee.click,ee.custom,ee.search,ee.view].indexOf(t)!==-1}encodeEventToJson(t,r,o){let n=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return o&&(n=`access_token=${encodeURIComponent(o)}&${n}`),n}},ad=class{sendEvent(t,r){return w(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return w(this,void 0,void 0,function*(){return Promise.resolve()})}},_g=globalThis.fetch,Ts=class{constructor(t){this.opts=t}sendEvent(t,r){return w(this,void 0,void 0,function*(){let{baseUrl:o,visitorIdProvider:n,preprocessRequest:a}=this.opts,i=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",s={url:`${o}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},s),a?yield a(s,"analyticsFetch"):{}),{url:c}=u,l=cr(u,["url"]),d;try{d=yield _g(c,l)}catch(p){console.error("An error has occured when sending the event.",p);return}if(d.ok){let p=yield d.json();return p.visitorId&&n.setCurrentVisitorId(p.visitorId),p}else{try{d.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,d,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return w(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield _g(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ee.click,ee.custom,ee.search,ee.view].indexOf(t)!==-1}getVisitorIdParam(){return w(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},id=class{constructor(t,r){Yl()&&Gg()?this.storage=new Jl:Yl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Rn),this.client=new Ts(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}},sd=class{constructor(t,r){this.storage=r||new Rn,this.client=new Ts(t)}getClientDependingOnEventType(t){return this.client}},Os=class{constructor(){this.storage=new Rn,this.client=new ad}getClientDependingOnEventType(t){return this.client}},qb="xx",Db=e=>e?.startsWith(qb)||!1,kb=`
|
|
19
|
+
If you are trying to access the inner state... Don't`),Reflect.get(t,r,o)}});var so=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function qp(e){return Array.isArray(e)}function ki(e){return e.trim()===""}function Dp(e){let t={};for(let[r,o]of e)t[r]=o;return t}function Vi(e,t){return Object.fromEntries(Object.entries(e).map(([r,o])=>[r,t(o,r)]))}function Ni(e,t){return Object.fromEntries(Object.entries(e).filter(([r,o])=>t(o,r)))}function er(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function kp(){let e=null,t=null;return{promise:new Promise((o,n)=>{e=o,t=n}),resolve:e,reject:t}}function Mi(e){let{promise:t,resolve:r}=kp();return{promise:t,middleware:()=>n=>a=>{n(a),e(a)&&r(a)}}}function BF(e){return e==null?!1:typeof e=="object"&&"meta"in e?e.meta?.arg?.slotId!==void 0:!1}function Vp(e,t){let{promise:r,resolve:o}=kp(),n=!1,a=s=>t.has(s);return{promise:r,middleware:()=>s=>u=>{s(u),e(u)&&!n&&BF(u)&&!a(u.meta.arg.slotId)&&(n=!0,t.add(u.meta.arg.slotId),o(u))}}}var Kp=It(_p(),1);var Te=(n=>(n.search="search",n.listing="listing",n.standalone="standalone",n.recommendation="recommendation",n))(Te||{}),mP="recommendation-internal-options",$o=Symbol.for(mP);var $=new Error("Failed to load reducers."),zo=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}},Li=class extends Error{constructor(){super(),this.name="InvalidControllerDefinition",this.message=`A controller must be defined for at least one solution type: ${Object.keys(Te).map(t=>t.toLowerCase()).join(", ")}`}},Wo=class extends Error{constructor(t){super(),this.name="MissingControllerProps",this.message=`${t} props are required but were undefined. Ensure they are included when calling \`fetchStaticState\` or \`hydrateStaticState\`.`}},Bi=class extends Error{constructor(t){super(),this.name="MultipleRecommendationError",this.message=`Multiple recommendation controllers found for the same slotId: ${t}. Only one recommendation controller per slotId is supported.`}},uo=class extends Error{constructor(r,o){super();We(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=o??0}};function $p(e){let t=[];for(let r in e){let o=encodeURIComponent(r),n=encodeURIComponent(e[r]);t.push(`${o}=${n}`)}return t.join("&")}function zp(e){return typeof e!="object"||!e?!1:Object.values(e).every(pP)}function pP(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function Wp(e){return e===429}var Ko=class e{static async call(t){let r=fP(t),{logger:o}=t,n=await e.preprocessRequest(r,t);o.info(n,"Platform request");let{url:a,...i}=n,s=async()=>{let u=await fetch(a,i);if(Wp(u.status))throw u;return u};try{let u=await(0,Kp.backOff)(s,{retry:c=>{let l=c&&Wp(c.status);return l&&o.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw o.info("Platform renewing token"),new zo;case 404:throw new uo(a,u.status);default:return o.info({response:u,requestInfo:n},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new uo(a):u}}static async preprocessRequest(t,r){let{origin:o,preprocessRequest:n,logger:a,requestMetadata:i}=r,{signal:s,...u}=t,c=er(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 c}};function Oe(e,t="prod",r="platform"){let o=t==="prod"?"":t,n=r==="platform"?"":`.${r}`;return`https://${e}${n}.org${o}.coveo.com`}function Ke(e,t="prod"){return`${Oe(e,t)}/rest/search/v2`}function pl(e,t="prod"){return`${Oe(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function fP(e){let{url:t,method:r,requestParams:o,contentType:n,accessToken:a,signal:i}=e,s=e.method==="POST"||e.method==="PUT",u=gP(o,n);return{url:t,method:r,headers:{"Content-Type":n,Authorization:`Bearer ${a}`,...e.headers},...s&&{body:u},signal:i}}function gP(e,t){return t==="application/x-www-form-urlencoded"?zp(e)?$p(e):"":JSON.stringify(e)}function yP(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function SP(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function fl(e,t){if(t&&e.name==="AbortError")return{error:SP(e)};if(e instanceof uo)return{error:yP(e)};throw e}var Go=(e,t)=>({...Ra(e,t),requestParams:hP(e)}),hP=e=>{let{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:s,perPage:u,facets:c,sort:l}=e;return{trackingId:t,clientId:r,context:o,language:n,country:a,currency:i,page:s,perPage:u,facets:c,sort:l}},Ra=(e,t)=>{let{url:r,accessToken:o}=e,n=`${r}/${t}`;return{accessToken:o,method:"POST",contentType:"application/json",url:n,origin:"commerceApiFetch",requestMetadata:{method:t}}};var Gp=(e,t)=>({...Ra(e,t),requestParams:CP(e)}),CP=e=>{let{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:s,page:u,perPage:c}=e;return{slotId:t,trackingId:r,clientId:o,context:n,language:a,country:i,currency:s,page:u,perPage:c}};var Hp=e=>({...Ra(e,"search/querySuggest"),requestParams:xP(e)}),xP=e=>{let{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:s}=e;return{trackingId:t,query:r,clientId:o,context:n,language:a,country:i,currency:s}};var qe=e=>e.error!==void 0,Ui=class{constructor(t){this.options=t}async getProductListing(t){return this.query({...Go(t,"listing"),...this.options})}async search(t){let r=Go(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async getRecommendations(t){return this.query({...Gp(t,"recommendations"),...this.options})}async productSuggestions(t){let r=Go(t,"search/productSuggest");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async querySuggest(t){let r=Hp(t);return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async facetSearch(t,r){let o=Go(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=Go(t,"search");return this.query({...r,requestParams:{...r.requestParams,query:t?.query},...this.options})}async query(t){let r=await Ko.call(t);if(r instanceof Error)return fl(r);let o=await r.json();return r.ok?{success:o}:{error:o}}};function gl(e,t="prod"){return`${Oe(e,t)}/rest/organizations/${e}/commerce/v2`}var ji=e=>e;import{StringValue as Qf}from"@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 RP=typeof Symbol=="function"&&Symbol.observable||"@@observable",Yp=RP,yl=()=>Math.random().toString(36).substring(7).split("").join("."),FP={INIT:`@@redux/INIT${yl()}`,REPLACE:`@@redux/REPLACE${yl()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${yl()}`},_i=FP;function Tt(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 Sl(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(Sl)(e,t)}let o=e,n=t,a=new Map,i=a,s=0,u=!1;function c(){i===a&&(i=new Map,a.forEach((C,S)=>{i.set(S,C)}))}function l(){if(u)throw new Error(ve(3));return n}function d(C){if(typeof C!="function")throw new Error(ve(4));if(u)throw new Error(ve(5));let S=!0;c();let A=s++;return i.set(A,C),function(){if(S){if(u)throw new Error(ve(6));S=!1,c(),i.delete(A),a=null}}}function p(C){if(!Tt(C))throw new Error(ve(7));if(typeof C.type>"u")throw new Error(ve(8));if(typeof C.type!="string")throw new Error(ve(17));if(u)throw new Error(ve(9));try{u=!0,n=o(n,C)}finally{u=!1}return(a=i).forEach(A=>{A()}),C}function m(C){if(typeof C!="function")throw new Error(ve(10));o=C,p({type:_i.REPLACE})}function f(){let C=d;return{subscribe(S){if(typeof S!="object"||S===null)throw new Error(ve(11));function A(){let x=S;x.next&&x.next(l())}return A(),{unsubscribe:C(A)}},[Yp](){return this}}}return p({type:_i.INIT}),{dispatch:p,subscribe:d,getState:l,replaceReducer:m,[Yp]:f}}function PP(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:_i.INIT})>"u")throw new Error(ve(12));if(typeof r(void 0,{type:_i.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(ve(13))})}function Ho(e){let t=Object.keys(e),r={};for(let i=0;i<t.length;i++){let s=t[i];typeof e[s]=="function"&&(r[s]=e[s])}let o=Object.keys(r),n,a;try{PP(r)}catch(i){a=i}return function(s={},u){if(a)throw a;let c=!1,l={};for(let d=0;d<o.length;d++){let p=o[d],m=r[p],f=s[p],h=m(f,u);if(typeof h>"u"){let C=u&&u.type;throw new Error(ve(14))}l[p]=h,c=c||h!==f}return c=c||o.length!==Object.keys(s).length,c?l:s}}function Yo(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function Jp(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(ve(15))},i={getState:n.getState,dispatch:(u,...c)=>a(u,...c)},s=e.map(u=>u(i));return a=Yo(...s)(n.dispatch),{...n,dispatch:a}}}function $i(e){return Tt(e)&&"type"in e&&typeof e.type=="string"}var wl=Symbol.for("immer-nothing"),Fa=Symbol.for("immer-draftable"),Ge=Symbol.for("immer-state");function be(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var mo=Object.getPrototypeOf;function rt(e){return!!e&&!!e[Ge]}function He(e){return e?rf(e)||Array.isArray(e)||!!e[Fa]||!!e.constructor?.[Fa]||wa(e)||Ea(e):!1}var AP=Object.prototype.constructor.toString();function rf(e){if(!e||typeof e!="object")return!1;let t=mo(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)===AP}function El(e){return rt(e)||be(15,e),e[Ge].base_}function Pa(e,t){po(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,o)=>t(o,r,e))}function po(e){let t=e[Ge];return t?t.type_:Array.isArray(e)?1:wa(e)?2:Ea(e)?3:0}function Aa(e,t){return po(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function hl(e,t){return po(e)===2?e.get(t):e[t]}function of(e,t,r){let o=po(e);o===2?e.set(t,r):o===3?e.add(r):e[t]=r}function vP(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function wa(e){return e instanceof Map}function Ea(e){return e instanceof Set}function lo(e){return e.copy_||e.base_}function Rl(e,t){if(wa(e))return new Map(e);if(Ea(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=rf(e);if(t===!0||t==="class_only"&&!r){let o=Object.getOwnPropertyDescriptors(e);delete o[Ge];let n=Reflect.ownKeys(o);for(let a=0;a<n.length;a++){let i=n[a],s=o[i];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(o[i]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[i]})}return Object.create(mo(e),o)}else{let o=mo(e);if(o!==null&&r)return{...e};let n=Object.create(o);return Object.assign(n,e)}}function Ki(e,t=!1){return Gi(e)||rt(e)||!He(e)||(po(e)>1&&(e.set=e.add=e.clear=e.delete=bP),Object.freeze(e),t&&Object.entries(e).forEach(([r,o])=>Ki(o,!0))),e}function bP(){be(2)}function Gi(e){return Object.isFrozen(e)}var Fl={};function fo(e){let t=Fl[e];return t||be(0,e),t}function wP(e,t){Fl[e]||(Fl[e]=t)}var va;function nf(){return va}function EP(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Xp(e,t){t&&(fo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Pl(e){Al(e),e.drafts_.forEach(IP),e.drafts_=null}function Al(e){e===va&&(va=e.parent_)}function Zp(e){return va=EP(va,e)}function IP(e){let t=e[Ge];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ef(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[Ge].modified_&&(Pl(t),be(4)),He(e)&&(e=zi(t,e),t.parent_||Wi(t,e)),t.patches_&&fo("Patches").generateReplacementPatches_(r[Ge].base_,e,t.patches_,t.inversePatches_)):e=zi(t,r,[]),Pl(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==wl?e:void 0}function zi(e,t,r){if(Gi(t))return t;let o=t[Ge];if(!o)return Pa(t,(n,a)=>tf(e,o,t,n,a,r)),t;if(o.scope_!==e)return t;if(!o.modified_)return Wi(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),Pa(a,(s,u)=>tf(e,o,n,s,u,r,i)),Wi(e,n,!1),r&&e.patches_&&fo("Patches").generatePatches_(o,r,e.patches_,e.inversePatches_)}return o.copy_}function tf(e,t,r,o,n,a,i){if(rt(n)){let s=a&&t&&t.type_!==3&&!Aa(t.assigned_,o)?a.concat(o):void 0,u=zi(e,n,s);if(of(r,o,u),rt(u))e.canAutoFreeze_=!1;else return}else i&&r.add(n);if(He(n)&&!Gi(n)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;zi(e,n),(!t||!t.scope_.parent_)&&typeof o!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,o)&&Wi(e,n)}}function Wi(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Ki(t,r)}function TP(e,t){let r=Array.isArray(e),o={type_:r?1:0,scope_:t?t.scope_:nf(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},n=o,a=Il;r&&(n=[o],a=ba);let{revoke:i,proxy:s}=Proxy.revocable(n,a);return o.draft_=s,o.revoke_=i,s}var Il={get(e,t){if(t===Ge)return e;let r=lo(e);if(!Aa(r,t))return OP(e,r,t);let o=r[t];return e.finalized_||!He(o)?o:o===Cl(e.base_,t)?(xl(e),e.copy_[t]=bl(o,e)):o},has(e,t){return t in lo(e)},ownKeys(e){return Reflect.ownKeys(lo(e))},set(e,t,r){let o=af(lo(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=Cl(lo(e),t),a=n?.[Ge];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(vP(r,n)&&(r!==void 0||Aa(e.base_,t)))return!0;xl(e),vl(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 Cl(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,xl(e),vl(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=lo(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 mo(e.base_)},setPrototypeOf(){be(12)}},ba={};Pa(Il,(e,t)=>{ba[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});ba.deleteProperty=function(e,t){return ba.set.call(this,e,t,void 0)};ba.set=function(e,t,r){return Il.set.call(this,e[0],t,r,e[0])};function Cl(e,t){let r=e[Ge];return(r?lo(r):e)[t]}function OP(e,t,r){let o=af(t,r);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}function af(e,t){if(!(t in e))return;let r=mo(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=mo(r)}}function vl(e){e.modified_||(e.modified_=!0,e.parent_&&vl(e.parent_))}function xl(e){e.copy_||(e.copy_=Rl(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var qP=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,...c){return i.produce(u,l=>r.call(this,l,...c))}}typeof r!="function"&&be(6),o!==void 0&&typeof o!="function"&&be(7);let n;if(He(t)){let a=Zp(this),i=bl(t,void 0),s=!0;try{n=r(i),s=!1}finally{s?Pl(a):Al(a)}return Xp(a,o),ef(n,a)}else if(!t||typeof t!="object"){if(n=r(t),n===void 0&&(n=t),n===wl&&(n=void 0),this.autoFreeze_&&Ki(n,!0),o){let a=[],i=[];fo("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,...s)=>this.produceWithPatches(i,u=>t(u,...s));let o,n;return[this.produce(t,r,(i,s)=>{o=i,n=s}),o,n]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){He(e)||be(8),rt(e)&&(e=sf(e));let t=Zp(this),r=bl(e,void 0);return r[Ge].isManual_=!0,Al(t),r}finishDraft(e,t){let r=e&&e[Ge];(!r||!r.isManual_)&&be(9);let{scope_:o}=r;return Xp(o,t),ef(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=fo("Patches").applyPatches_;return rt(e)?o(e,t):this.produce(e,n=>o(n,t))}};function bl(e,t){let r=wa(e)?fo("MapSet").proxyMap_(e,t):Ea(e)?fo("MapSet").proxySet_(e,t):TP(e,t);return(t?t.scope_:nf()).drafts_.push(r),r}function sf(e){return rt(e)||be(10,e),cf(e)}function cf(e){if(!He(e)||Gi(e))return e;let t=e[Ge],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=Rl(e,t.scope_.immer_.useStrictShallowCopy_)}else r=Rl(e,!0);return Pa(r,(o,n)=>{of(r,o,cf(n))}),t&&(t.finalized_=!1),r}function uf(){let t="replace",r="add",o="remove";function n(p,m,f,h){switch(p.type_){case 0:case 2:return i(p,m,f,h);case 1:return a(p,m,f,h);case 3:return s(p,m,f,h)}}function a(p,m,f,h){let{base_:C,assigned_:S}=p,A=p.copy_;A.length<C.length&&([C,A]=[A,C],[f,h]=[h,f]);for(let y=0;y<C.length;y++)if(S[y]&&A[y]!==C[y]){let x=m.concat([y]);f.push({op:t,path:x,value:d(A[y])}),h.push({op:t,path:x,value:d(C[y])})}for(let y=C.length;y<A.length;y++){let x=m.concat([y]);f.push({op:r,path:x,value:d(A[y])})}for(let y=A.length-1;C.length<=y;--y){let x=m.concat([y]);h.push({op:o,path:x})}}function i(p,m,f,h){let{base_:C,copy_:S}=p;Pa(p.assigned_,(A,y)=>{let x=hl(C,A),I=hl(S,A),v=y?Aa(C,A)?t:r:o;if(x===I&&v===t)return;let R=m.concat(A);f.push(v===o?{op:v,path:R}:{op:v,path:R,value:I}),h.push(v===r?{op:o,path:R}:v===o?{op:r,path:R,value:d(x)}:{op:t,path:R,value:d(x)})})}function s(p,m,f,h){let{base_:C,copy_:S}=p,A=0;C.forEach(y=>{if(!S.has(y)){let x=m.concat([A]);f.push({op:o,path:x,value:y}),h.unshift({op:r,path:x,value:y})}A++}),A=0,S.forEach(y=>{if(!C.has(y)){let x=m.concat([A]);f.push({op:r,path:x,value:y}),h.unshift({op:o,path:x,value:y})}A++})}function u(p,m,f,h){f.push({op:t,path:[],value:m===wl?void 0:m}),h.push({op:t,path:[],value:p})}function c(p,m){return m.forEach(f=>{let{path:h,op:C}=f,S=p;for(let I=0;I<h.length-1;I++){let v=po(S),R=h[I];typeof R!="string"&&typeof R!="number"&&(R=""+R),(v===0||v===1)&&(R==="__proto__"||R==="constructor")&&be(19),typeof S=="function"&&R==="prototype"&&be(19),S=hl(S,R),typeof S!="object"&&be(18,h.join("/"))}let A=po(S),y=l(f.value),x=h[h.length-1];switch(C){case t:switch(A){case 2:return S.set(x,y);case 3:be(16);default:return S[x]=y}case r:switch(A){case 1:return x==="-"?S.push(y):S.splice(x,0,y);case 2:return S.set(x,y);case 3:return S.add(y);default:return S[x]=y}case o:switch(A){case 1:return S.splice(x,1);case 2:return S.delete(x);case 3:return S.delete(f.value);default:return delete S[x]}default:be(17,C)}}),p}function l(p){if(!He(p))return p;if(Array.isArray(p))return p.map(l);if(wa(p))return new Map(Array.from(p.entries()).map(([f,h])=>[f,l(h)]));if(Ea(p))return new Set(Array.from(p).map(l));let m=Object.create(mo(p));for(let f in p)m[f]=l(p[f]);return Aa(p,Fa)&&(m[Fa]=p[Fa]),m}function d(p){return rt(p)?l(p):p}wP("Patches",{applyPatches_:c,generatePatches_:n,generateReplacementPatches_:u})}var ot=new qP,rr=ot.produce,Hi=ot.produceWithPatches.bind(ot),UN=ot.setAutoFreeze.bind(ot),jN=ot.setUseStrictShallowCopy.bind(ot),Tl=ot.applyPatches.bind(ot),_N=ot.createDraft.bind(ot),$N=ot.finishDraft.bind(ot);function DP(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function kP(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function VP(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 lf=e=>Array.isArray(e)?e:[e];function NP(e){let t=Array.isArray(e[0])?e[0]:e;return VP(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function MP(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var KN=Symbol();var GN=Object.getPrototypeOf({});var QP=class{constructor(e){this.value=e}deref(){return this.value}},LP=typeof WeakRef<"u"?WeakRef:QP,BP=0,df=1;function Yi(){return{s:BP,v:void 0,o:null,p:null}}function Jo(e,t={}){let r=Yi(),{resultEqualityCheck:o}=t,n,a=0;function i(){let s=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=s.o;f===null&&(s.o=f=new WeakMap);let h=f.get(m);h===void 0?(s=Yi(),f.set(m,s)):s=h}else{let f=s.p;f===null&&(s.p=f=new Map);let h=f.get(m);h===void 0?(s=Yi(),f.set(m,s)):s=h}}let c=s,l;if(s.s===df)l=s.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 LP(l):l}return c.s=df,c.v=l,l}return i.clearCache=()=>{r=Yi(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function mf(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...n)=>{let a=0,i=0,s,u={},c=n.pop();typeof c=="object"&&(u=c,c=n.pop()),DP(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);let l={...r,...u},{memoize:d,memoizeOptions:p=[],argsMemoize:m=Jo,argsMemoizeOptions:f=[],devModeChecks:h={}}=l,C=lf(p),S=lf(f),A=NP(n),y=d(function(){return a++,c.apply(null,arguments)},...C),x=!0,I=m(function(){i++;let R=MP(A,arguments);return s=y.apply(null,R),s},...S);return Object.assign(I,{resultFunc:c,memoizedResultFunc:y,dependencies:A,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:d,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var Q=mf(Jo),UP=Object.assign((e,t=Q)=>{kP(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,s,u)=>(i[r[u]]=s,i),{}))},{withTypes:()=>UP});function pf(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var ff=pf(),gf=pf;var jP=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?Yo:Yo.apply(null,arguments)},nM=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},_P=e=>e&&typeof e.match=="function";function g(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(Ft(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=>$i(o)&&o.type===e,r}var xf=class Ia extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Ia.prototype)}static get[Symbol.species](){return Ia}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Ia(...t[0].concat(this)):new Ia(...t.concat(this))}};function yf(e){return He(e)?rr(e,()=>{}):e}function Sf(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function $P(e){return typeof e=="boolean"}var zP=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new xf;return r&&($P(r)?i.push(ff):i.push(gf(r.extraArgument))),i},Ta="RTK_autoBatch",Zo=()=>e=>({payload:e,meta:{[Ta]:!0}}),hf=e=>t=>{setTimeout(t,e)},WP=(e={type:"raf"})=>t=>(...r)=>{let o=t(...r),n=!0,a=!1,i=!1,s=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:hf(10):e.type==="callback"?e.queueNotification:hf(e.timeout),c=()=>{i=!1,a&&(a=!1,s.forEach(l=>l()))};return Object.assign({},o,{subscribe(l){let d=()=>n&&l(),p=o.subscribe(d);return s.add(l),()=>{p(),s.delete(l)}},dispatch(l){try{return n=!l?.meta?.[Ta],a=!n,a&&(i||(i=!0,u(c))),o.dispatch(l)}finally{n=!0}}})},KP=e=>function(r){let{autoBatch:o=!0}=r??{},n=new xf(e);return o&&n.push(WP(typeof o=="object"?o:void 0)),n};function Rf(e){let t=zP(),{reducer:r=void 0,middleware:o,devTools:n=!0,preloadedState:a=void 0,enhancers:i=void 0}=e||{},s;if(typeof r=="function")s=r;else if(Tt(r))s=Ho(r);else throw new Error(Ft(1));let u;typeof o=="function"?u=o(t):u=t();let c=Yo;n&&(c=jP({trace:!1,...typeof n=="object"&&n}));let l=Jp(...u),d=KP(l),p=typeof i=="function"?i(d):d(),m=c(...p);return Sl(s,a,m)}function Ff(e){let t={},r=[],o,n={addCase(a,i){let s=typeof a=="string"?a:a.type;if(!s)throw new Error(Ft(28));if(s in t)throw new Error(Ft(29));return t[s]=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 GP(e){return typeof e=="function"}function j(e,t){let[r,o,n]=Ff(t),a;if(GP(e))a=()=>yf(e());else{let s=yf(e);a=()=>s}function i(s=a(),u){let c=[r[u.type],...o.filter(({matcher:l})=>l(u)).map(({reducer:l})=>l)];return c.filter(l=>!!l).length===0&&(c=[n]),c.reduce((l,d)=>{if(d)if(rt(l)){let m=d(l,u);return m===void 0?l:m}else{if(He(l))return rr(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},s)}return i.getInitialState=a,i}var Pf=(e,t)=>_P(e)?e.match(t):e(t);function Ot(...e){return t=>e.some(r=>Pf(r,t))}function Xo(...e){return t=>e.every(r=>Pf(r,t))}function Xi(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 Oa(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Zi(...e){return e.length===0?t=>Xi(t,["pending"]):Oa(e)?Ot(...e.map(t=>t.pending)):Zi()(e[0])}function go(...e){return e.length===0?t=>Xi(t,["rejected"]):Oa(e)?Ot(...e.map(t=>t.rejected)):go()(e[0])}function qa(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?Xo(go(...e),t):Oa(e)?Xo(go(...e),t):qa()(e[0])}function or(...e){return e.length===0?t=>Xi(t,["fulfilled"]):Oa(e)?Ot(...e.map(t=>t.fulfilled)):or()(e[0])}function es(...e){return e.length===0?t=>Xi(t,["pending","fulfilled","rejected"]):Oa(e)?Ot(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):es()(e[0])}var HP="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",ts=(e=21)=>{let t="",r=e;for(;r--;)t+=HP[Math.random()*64|0];return t},YP=["name","message","stack","code"],Ol=class{constructor(e,t){We(this,"_type");this.payload=e,this.meta=t}},Cf=class{constructor(e,t){We(this,"_type");this.payload=e,this.meta=t}},JP=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of YP)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},_=(()=>{function e(t,r,o){let n=g(t+"/fulfilled",(u,c,l,d)=>({payload:u,meta:{...d||{},arg:l,requestId:c,requestStatus:"fulfilled"}})),a=g(t+"/pending",(u,c,l)=>({payload:void 0,meta:{...l||{},arg:c,requestId:u,requestStatus:"pending"}})),i=g(t+"/rejected",(u,c,l,d,p)=>({payload:d,error:(o&&o.serializeError||JP)(u||"Rejected"),meta:{...p||{},arg:l,requestId:c,rejectedWithValue:!!d,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function s(u){return(c,l,d)=>{let p=o?.idGenerator?o.idGenerator(u):ts(),m=new AbortController,f,h;function C(A){h=A,m.abort()}let S=async function(){let A;try{let x=o?.condition?.(u,{getState:l,extra:d});if(ZP(x)&&(x=await x),x===!1||m.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let I=new Promise((v,R)=>{f=()=>{R({name:"AbortError",message:h||"Aborted"})},m.signal.addEventListener("abort",f)});c(a(p,u,o?.getPendingMeta?.({requestId:p,arg:u},{getState:l,extra:d}))),A=await Promise.race([I,Promise.resolve(r(u,{dispatch:c,getState:l,extra:d,requestId:p,signal:m.signal,abort:C,rejectWithValue:(v,R)=>new Ol(v,R),fulfillWithValue:(v,R)=>new Cf(v,R)})).then(v=>{if(v instanceof Ol)throw v;return v instanceof Cf?n(v.payload,p,u,v.meta):n(v,p,u)})])}catch(x){A=x instanceof Ol?i(null,p,u,x.payload,x.meta):i(x,p,u)}finally{f&&m.signal.removeEventListener("abort",f)}return o&&!o.dispatchConditionRejection&&i.match(A)&&A.meta.condition||c(A),A}();return Object.assign(S,{abort:C,requestId:p,arg:u,unwrap(){return S.then(XP)}})}}return Object.assign(s,{pending:a,rejected:i,fulfilled:n,settled:Ot(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function XP(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function ZP(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Af=Symbol.for("rtk-slice-createasyncthunk"),uM={[Af]:_};function eA(e,t){return`${e}/${t}`}function tA({creators:e}={}){let t=e?.asyncThunk?.[Af];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(Ft(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(oA()):o.reducers)||{},s=Object.keys(i),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(A,y){let x=typeof A=="string"?A:A.type;if(!x)throw new Error(Ft(12));if(x in u.sliceCaseReducersByType)throw new Error(Ft(13));return u.sliceCaseReducersByType[x]=y,c},addMatcher(A,y){return u.sliceMatchers.push({matcher:A,reducer:y}),c},exposeAction(A,y){return u.actionCreators[A]=y,c},exposeCaseReducer(A,y){return u.sliceCaseReducersByName[A]=y,c}};s.forEach(A=>{let y=i[A],x={reducerName:A,type:eA(n,A),createNotation:typeof o.reducers=="function"};aA(y)?sA(x,y,c,t):nA(x,y,c)});function l(){let[A={},y=[],x=void 0]=typeof o.extraReducers=="function"?Ff(o.extraReducers):[o.extraReducers],I={...A,...u.sliceCaseReducersByType};return j(o.initialState,v=>{for(let R in I)v.addCase(R,I[R]);for(let R of u.sliceMatchers)v.addMatcher(R.matcher,R.reducer);for(let R of y)v.addMatcher(R.matcher,R.reducer);x&&v.addDefaultCase(x)})}let d=A=>A,p=new Map,m;function f(A,y){return m||(m=l()),m(A,y)}function h(){return m||(m=l()),m.getInitialState()}function C(A,y=!1){function x(v){let R=v[A];return typeof R>"u"&&y&&(R=h()),R}function I(v=d){let R=Sf(p,y,()=>new WeakMap);return Sf(R,v,()=>{let P={};for(let[b,T]of Object.entries(o.selectors??{}))P[b]=rA(T,v,h,y);return P})}return{reducerPath:A,getSelectors:I,get selectors(){return I(x)},selectSlice:x}}let S={name:n,reducer:f,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:h,...C(a),injectInto(A,{reducerPath:y,...x}={}){let I=y??a;return A.inject({reducerPath:I,reducer:f},x),{...S,...C(I,!0)}}};return S}}function rA(e,t,r,o){function n(a,...i){let s=t(a);return typeof s>"u"&&o&&(s=r()),e(s,...i)}return n.unwrapped=e,n}var yo=tA();function oA(){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 nA({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!iA(o))throw new Error(Ft(17));a=o.reducer,i=o.prepare}else a=o;n.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?g(e,i):g(e))}function aA(e){return e._reducerDefinitionType==="asyncThunk"}function iA(e){return e._reducerDefinitionType==="reducerWithPrepare"}function sA({type:e,reducerName:t},r,o,n){if(!n)throw new Error(Ft(18));let{payloadCreator:a,fulfilled:i,pending:s,rejected:u,settled:c,options:l}=r,d=n(e,a,l);o.exposeAction(t,d),i&&o.addCase(d.fulfilled,i),s&&o.addCase(d.pending,s),u&&o.addCase(d.rejected,u),c&&o.addMatcher(d.settled,c),o.exposeCaseReducer(t,{fulfilled:i||Ji,pending:s||Ji,rejected:u||Ji,settled:c||Ji})}function Ji(){}var vf="listener",bf="completed",wf="cancelled",lM=`task-${wf}`,dM=`task-${bf}`,mM=`${vf}-${wf}`,pM=`${vf}-${bf}`;var{assign:Ef}=Object;var ql="listenerMiddleware";var cA=Ef(g(`${ql}/add`),{withTypes:()=>cA}),fM=g(`${ql}/removeAll`),uA=Ef(g(`${ql}/remove`),{withTypes:()=>uA});var gM=Symbol.for("rtk-state-proxy-original");function Ft(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. `}import{Schema as lA,SchemaValidationError as dA,StringValue as Da,RecordValue as mA,ArrayValue as pA}from"@coveo/bueno";var D=new Da({required:!0,emptyAllowed:!1}),ne=new Da({required:!1,emptyAllowed:!1}),me=new Da({required:!0,emptyAllowed:!0}),If=new Da({required:!1,emptyAllowed:!0}),rs=new pA({each:D,required:!0}),Tf=new Da({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),je=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),Se=(e,t)=>{if("required"in t)return{payload:new lA({value:t}).validate({value:e}).value};let n=new mA({options:{required:!0},values:t}).validate(e);if(n)throw new dA(n);return{payload:e}},F=(e,t)=>{try{return Se(e,t)}catch(r){return{payload:e,error:je(r)}}},Ye=(e,t,r,o)=>{let n=`Check the initialState of ${o}`;return Of(e,t,r,n,"Controller initialization error")},_e=(e,t,r,o)=>{let n=`Check the options of ${o}`;return Of(e,t,r,n,"Controller initialization error")},Of=(e,t,r,o,n)=>{try{return t.validate(r,o)}catch(a){throw e.logger.error(a,n),a}};import{ArrayValue as fA,BooleanValue as Df,RecordValue as gA,StringValue as ka,Value as yA}from"@coveo/bueno";var So="3.23.0",qf=["@coveo/atomic","@coveo/quantic"];var Dl=()=>ne,kf=()=>D,ho=g("configuration/updateBasicConfiguration",e=>F(e,{accessToken:ne,environment:new ka({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ne})),Vf=g("configuration/updateSearchConfiguration",e=>F(e,{proxyBaseUrl:new ka({required:!1,url:!0}),pipeline:new ka({required:!1,emptyAllowed:!0}),searchHub:ne,timezone:ne,locale:ne,authenticationProviders:new fA({required:!1,each:D})})),en={enabled:new Df({default:!0}),originContext:Dl(),originLevel2:Dl(),originLevel3:Dl(),proxyBaseUrl:new ka({required:!1,url:!0}),runtimeEnvironment:new yA,anonymous:new Df({default:!1}),deviceId:ne,userDisplayName:ne,documentLocation:ne,trackingId:ne,analyticsMode:new ka({constrainTo:["legacy","next"],required:!1,default:"next"}),source:new gA({options:{required:!1},values:qf.reduce((e,t)=>(e[t]=Tf,e),{})})},kl=g("configuration/updateAnalyticsConfiguration",e=>F(e,en)),os=g("configuration/analytics/disable"),ns=g("configuration/analytics/enable"),Nf=g("configuration/analytics/originlevel2",e=>F(e,{originLevel2:kf()})),Mf=g("configuration/analytics/originlevel3",e=>F(e,{originLevel3:kf()}));var tn=g("commerce/configuration/updateBasicConfiguration",e=>F(e,{accessToken:ne,environment:new Qf({required:!1,constrainTo:["prod","hipaa","stg","dev"]}),organizationId:ne})),rn=g("commerce/configuration/updateProxyBaseUrl",e=>F(e,{proxyBaseUrl:new Qf({required:!1,url:!0})})),on=g("commerce/configuration/updateAnalyticsConfiguration",e=>F(e,{enabled:en.enabled,proxyBaseUrl:en.proxyBaseUrl,source:en.source,trackingId:en.trackingId})),as=g("commerce/configuration/analytics/disable"),is=g("commerce/configuration/analytics/enable");import{isNullOrUndefined as Co}from"@coveo/bueno";var Lf=()=>({accessToken:"",environment:"prod",organizationId:"",analytics:{enabled:!0,trackingId:"",source:{}},commerce:{}});var Vl=j(Lf(),e=>e.addCase(tn,(t,r)=>{Bf(t,r.payload)}).addCase(ho,(t,r)=>{Bf(t,r.payload)}).addCase(rn,(t,r)=>{SA(t,r.payload)}).addCase(on,(t,r)=>{hA(t,r.payload)}).addCase(as,t=>{t.analytics.enabled=!1}).addCase(is,t=>{t.analytics.enabled=!0}));function Bf(e,t){Co(t.accessToken)||(e.accessToken=t.accessToken),e.environment=t.environment??"prod",Co(t.organizationId)||(e.organizationId=t.organizationId)}function SA(e,t){Co(t.proxyBaseUrl)||(e.commerce.apiBaseUrl=t.proxyBaseUrl)}function hA(e,t){Co(t.enabled)||(e.analytics.enabled=t.enabled),Co(t.proxyBaseUrl)||(e.analytics.apiBaseUrl=t.proxyBaseUrl),Co(t.source)||(e.analytics.source=t.source),Co(t.trackingId)||(e.analytics.trackingId=t.trackingId)}function nn(e){return e.currency}var Uf=(e,t)=>({currency:nn(t.commerceContext),products:CA(t.cart),transaction:e}),jf=(e,t)=>({currency:nn(t.commerceContext),...e}),xo=Q(e=>e.cart,e=>e.cartItems,(e,t)=>t.map(r=>e[r])),CA=Q(xo,e=>e.map(({quantity:t,...r})=>({quantity:t,product:r})));import{ArrayValue as xA,NumberValue as _f,RecordValue as RA,Schema as FA,StringValue as PA}from"@coveo/bueno";var Nl={productId:D,quantity:new _f({required:!0,min:0}),name:new PA({required:!1}),price:new _f({required:!1,min:0})},Ml=new xA({each:new RA({values:{...Nl}})}),Ql={items:Ml},$f=new FA(Ql);var xr=g("commerce/cart/setItems",e=>F(e,Ml)),an=g("commerce/cart/updateItemQuantity",e=>F(e,Nl)),sn=g("commerce/cart/purchase"),ss=_("commerce/cart/emit/purchaseEvent",async(e,{extra:t,getState:r})=>{let o=Uf(e,r()),{relay:n}=t;n.emit("ec.purchase",o)}),cs=_("commerce/cart/emit/cartActionEvent",async(e,{extra:t,getState:r})=>{let o=jf(e,r()),{relay:n}=t;n.emit("ec.cartAction",o)});function W(e){let t,r=new Map,o=()=>r.size===0,n=a=>{try{let i=JSON.stringify(a),s=t!==i;return t=i,s}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(),s;return o()&&(t=JSON.stringify(this.state),s=e.subscribe(()=>{n(this.state)&&r.forEach(u=>u())})),r.set(i,a),()=>{r.delete(i),o()&&s&&s()}},get state(){return{}}}}function zf(e,t){return e.cart[Ro(t)]}var Wf=Q(xo,e=>e.reduce((t,r)=>t+r.quantity,0)),Kf=Q(xo,e=>e.reduce((t,r)=>t+r.price*r.quantity,0));function Gf(e,t={}){if(!AA(e))throw $;let{dispatch:r}=e,o=W(e),n=()=>e[U].cart,a={...t.initialState};Ye(e,$f,a,"buildCart"),a.items!==void 0&&r(xr(a.items));function i(l,d){return d?d.quantity!==l.quantity:!0}function s(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 c(l,d){let{quantity:p,...m}=l,f=s(l,d),h=d?Math.abs(p-d.quantity):p;return{action:f,quantity:h,product:m}}return{...o,empty:function(){for(let l of xo(n()))this.updateItemQuantity({...l,quantity:0})},purchase(l){r(ss(l)),r(sn())},updateItemQuantity(l){let d=zf(n(),l);!d&&l.quantity<=0||u(l,d)||(i(l,d)&&r(cs(c(l,d))),r(an(l)))},get state(){let l=n();return{items:xo(l),totalQuantity:Wf(l),totalPrice:Kf(l)}}}}function Ro(e){return`${e.productId},${e.name},${e.price}`}function AA(e){return e.addReducers({cart:cn}),!0}var us=()=>({cartItems:[],cart:{},purchasedItems:[],purchased:{}}),Hf=e=>Jf(e.cartItems,e.cart),Yf=e=>Jf(e.purchasedItems,e.purchased);function Jf(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 cn=j(us(),e=>{e.addCase(xr,(t,{payload:r})=>{let{cart:o,cartItems:n}=r.reduce((a,i)=>{let s=Ro(i);return{cartItems:[...a.cartItems,s],cart:{...a.cart,[s]:i},purchasedItems:[],purchased:{}}},us());Xf(t,n,o)}).addCase(an,(t,{payload:r})=>{let o=Ro(r);if(!(o in t.cart)){vA(r,t);return}if(r.quantity<=0){bA(r,t);return}t.cart[o]=r}).addCase(sn,t=>{wA(t);let{cart:r,cartItems:o}=us();Xf(t,o,r)})});function Xf(e,t,r){e.cartItems=t,e.cart=r}function vA(e,t){if(e.quantity<=0)return;let r=Ro(e);t.cartItems=[...t.cartItems,r],t.cart[r]=e}function bA(e,t){let r=Ro(e);t.cartItems=t.cartItems.filter(o=>o!==r),delete t.cart[r]}function wA(e){for(let t of e.cartItems){if(t in e.purchased){e.purchased[t].quantity+=e.cart[t].quantity;continue}e.purchasedItems=[...e.purchasedItems,t],e.purchased[t]=e.cart[t]}}import{NumberValue as Zf,RecordValue as eg,Schema as EA,StringValue as IA}from"@coveo/bueno";var TA=Intl.supportedValuesOf("currency"),OA=new IA({required:!0,emptyAllowed:!1,constrainTo:TA}),Ll={url:D},Bl={latitude:new Zf({min:-90,max:90,required:!0}),longitude:new Zf({min:-180,max:180,required:!0})},Va={language:D,country:D,currency:OA,view:new eg({options:{required:!0},values:Ll}),location:new eg({options:{required:!1},values:Bl})},tg=new EA(Va);var ce=g("commerce/context/set",e=>F(e,Va)),le=g("commerce/context/setView",e=>F(e,Ll)),un=g("commerce/context/setLocation",e=>F(e,Bl));var rg=()=>({language:"",country:"",currency:"",view:{url:""}});var qt=j(rg(),e=>{e.addCase(ce,(t,{payload:r})=>r).addCase(le,(t,{payload:r})=>{t.view=r}).addCase(un,(t,{payload:r})=>{t.location=r})});var ls=()=>({correctedQuery:"",corrections:[],originalQuery:""});import{BooleanValue as ZA,RecordValue as ev,StringValue as Ag}from"@coveo/bueno";var ct=g("breadcrumb/deselectAll"),Rr=g("breadcrumb/deselectAllNonBreadcrumbs");var Fr=Q(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${So}`));var Pr=(e,t)=>{let{view:r,location:o,...n}=e.commerceContext;return{accessToken:e.configuration.accessToken,url:e.configuration.commerce.apiBaseUrl??gl(e.configuration.organizationId,e.configuration.environment),organizationId:e.configuration.organizationId,trackingId:e.configuration.analytics.trackingId,...n,...e.configuration.analytics.enabled?{clientId:t.clientId}:{},context:{user:{...o,...t.userAgent?{userAgent:t.userAgent}:{}},view:{...r,...t.referrer?{referrer:t.referrer}:{}},capture:t.capture??e.configuration.analytics.enabled,cart:Hf(e.cart),source:Fr(e.configuration.analytics)}}};import{ArrayValue as kA,EnumValue as ag,StringValue as ig,RecordValue as sg}from"@coveo/bueno";import{ArrayValue as qA,EnumValue as og,RecordValue as ng,StringValue as DA}from"@coveo/bueno";var Pt=(r=>(r.Relevance="relevance",r.Fields="fields",r))(Pt||{}),ln=(r=>(r.Ascending="asc",r.Descending="desc",r))(ln||{}),nr=()=>({by:"relevance"});var sQ=new ng({options:{required:!1},values:{by:new og({enum:Pt,required:!0}),fields:new qA({each:new ng({values:{name:new DA,direction:new og({enum:ln})}})})}});var Ul=e=>({by:"fields",fields:e}),cg=new sg({options:{required:!1},values:{by:new ag({enum:Pt,required:!0}),fields:new kA({each:new sg({values:{field:new ig({required:!0}),direction:new ag({enum:ln}),displayName:new ig}})})}});var ds=(e,t,r)=>({...Pr(e,t),...VA(e,r)}),VA=(e,t)=>{let r=t?e.commercePagination?.recommendations[t]:e.commercePagination?.principal;return r&&{page:r.page,...r.perPage&&{perPage:r.perPage}}};var ut=(e,t)=>({...ds(e,t),facets:[...NA(e)],...e.commerceSort&&{sort:MA(e.commerceSort.appliedSort)}});function NA(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 MA(e){return e.by==="relevance"?{sortCriteria:"relevance"}:{sortCriteria:"fields",fields:e.fields.map(({name:t,direction:r})=>({field:t,direction:r}))}}import{BooleanValue as jl,NumberValue as QA}from"@coveo/bueno";var Fo=g("commerce/facets/core/updateNumberOfValues",e=>F(e,{facetId:D,numberOfValues:new QA({required:!0,min:1})})),Po=g("commerce/facets/core/updateIsFieldExpanded",e=>F(e,{facetId:D,isFieldExpanded:new jl({required:!0})})),pe=g("commerce/facets/core/clearAll"),De=g("commerce/facets/core/deselectAllValues",e=>F(e,{facetId:D})),Ao=g("commerce/facets/core/updateFreezeCurrentValues",e=>F(e,{facetId:D,freezeCurrentValues:new jl({required:!0})})),dn=g("commerce/facets/core/updateAutoSelectionForAll",e=>F(e,{allow:new jl({required:!0})}));import{NumberValue as ug}from"@coveo/bueno";var ms={slotId:If},LA={...ms,pageSize:new ug({required:!0,min:0})},ar=g("commerce/pagination/setPageSize",e=>F(e,LA)),BA={...ms,page:new ug({required:!0,min:0})},Dt=g("commerce/pagination/selectPage",e=>F(e,BA)),Ar=g("commerce/pagination/nextPage",e=>F(e,ms)),vr=g("commerce/pagination/previousPage",e=>F(e,ms)),mn=g("commerce/pagination/registerRecommendationsSlot",e=>F(e,{slotId:D}));var br=Q(e=>e.commercePagination?.principal.perPage||0,e=>e),ps=Q((e,t)=>e.commercePagination?.recommendations[t]?.perPage||0,e=>e),wr=Q(e=>e.commercePagination?.principal.totalEntries||0,e=>e),fs=Q((e,t)=>e.commercePagination?.recommendations[t]?.totalEntries||0,e=>e),gs=Q(e=>e.commercePagination?.principal.page||0,e=>e),lg=Q((e,t)=>e.commercePagination?.recommendations[t]?.page||0,e=>e);import{StringValue as UA}from"@coveo/bueno";var fe=g("commerce/query/update",e=>F(e,{query:new UA}));import{isNullOrUndefined as Pg}from"@coveo/bueno";import{RecordValue as jA,StringValue as _A}from"@coveo/bueno";var Er=g("commerce/triggers/query/updateIgnore",e=>F(e,{q:new _A({emptyAllowed:!0,required:!0})})),pn=g("commerce/triggers/query/applyModification",e=>F(e,new jA({values:{originalQuery:ne,modification:ne}})));import{isNullOrUndefined as gg}from"@coveo/bueno";function _l(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{q:o}:{}}function $l(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{sortCriteria:o}:{}}function kt(e,t,r,o){if(e===void 0)return{};let n=Object.entries(e).filter(([a])=>t(a)).map(([a,{request:i}])=>{let s=r(i);return s.length?{[a]:s}:{}}).reduce((a,i)=>({...a,...i}),{});return Object.keys(n).length?{[o]:n}:{}}function Vt(e){let{activeValue:t,ancestryMap:r}=$A(e);return t?zA(t,r):[]}function $A(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 zA(e,t){let r=[];if(!e)return[];let o=e;do r.unshift(o),o=t.get(o);while(o);return r}function dg(){return{principal:Ir(),recommendations:{}}}function Ir(){return{page:0,perPage:0,totalEntries:0,totalPages:0}}function vo(){return{appliedSort:nr(),availableSorts:[nr()]}}function ys(e){return{...WA(e?.commercePagination,t=>t.principal.page,Ir().page),...KA(e?.commercePagination,t=>t.principal.perPage,Ir().perPage),...$l(e?.commerceSort,t=>t.appliedSort,vo().appliedSort),...kt(e.commerceFacetSet,Tr(e,"regular"),GA,"f"),...kt(e.commerceFacetSet,Tr(e,"regular"),HA,"fExcluded"),...kt(e.commerceFacetSet,Tr(e,"location"),YA,"lf"),...kt(e.commerceFacetSet,Tr(e,"hierarchical"),JA,"cf"),...kt(e.commerceFacetSet,Tr(e,"dateRange"),mg,"df"),...kt(e.commerceFacetSet,Tr(e,"dateRange"),pg,"dfExcluded"),...kt(e.commerceFacetSet,Tr(e,"numericalRange"),mg,"nf"),...kt(e.commerceFacetSet,Tr(e,"numericalRange"),pg,"nfExcluded"),...fg("selected",e.manualNumericFacetSet),...fg("excluded",e.manualNumericFacetSet)}}function WA(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{page:o}:{}}function KA(e,t,r){if(e===void 0)return{};let o=t(e);return o!==r?{perPage:o}:{}}function GA(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function HA(e){return e.values.filter(t=>t.state==="excluded").map(t=>t.value)}function YA(e){return e.values.filter(t=>t.state==="selected").map(t=>t.value)}function mg(e){return e.values.filter(t=>t.state==="selected")}function pg(e){return e.values.filter(t=>t.state==="excluded")}function fg(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 JA(e){return Vt(e.values).map(r=>r.value)}function Tr(e,t){return r=>e.commerceFacetSet[r].request.type===t}var Ss=()=>({query:""});var sL=Q(e=>e[U].commerceSearch.responseId,e=>e),zl=Q(e=>e.commerceSearch.responseId,e=>e),yg=Q(e=>e.commerceSearch.requestId,e=>e),Na=Q(e=>e.commerceSearch?.products.length||0,e=>e),Sg=Q(e=>({total:wr(e),current:Na(e)}),({current:e,total:t})=>e<t),hg=Q(e=>e.commerceSearch?.isLoading,e=>gg(e)?!1:e),Cg=Q(e=>e.commerceSearch?.error,e=>e??null),hs=Q(e=>e.commerceQuery?.query,e=>e??""),XA=Q(e=>e.commerceSearch?.queryExecuted,e=>e),xg=(e,t)=>gg(t.queryCorrection?.correctedQuery)?hs(e):t.queryCorrection.correctedQuery,Rg=e=>({..._l(e?.commerceQuery,t=>t.query,Ss().query),...ys(e)});function Fg(e){return{query:XA(e)||""}}var Ma=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(!(!Pg(n)&&!Pg(n.correctedQuery)))return null;let{correctedQuery:i,originalQuery:s}=o.queryCorrection;return this.onUpdateQueryForCorrection(i??""),{...t,response:{...o},queryExecuted:xg(r,o),originalQuery:s??""}}async processQueryTriggersOrContinue(t){let r=this.getSuccessResponse(t);if(!r)return null;let o=r.triggers.find(s=>s.type==="query")?.content||"";if(!o)return null;if(this.getState().triggers?.queryModification.queryToIgnore===o)return this.dispatch(Er({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(pn({newQuery:t,originalQuery:this.getCurrentQuery()})),this.onUpdateQueryForCorrection(t),await this.fetchFromAPI({...ut(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(fe({query:t}))}};var X=_("commerce/search/executeSearch",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra,a=ut(o,n),i=hs(o),s=new Ma(t),u=await s.fetchFromAPI({...a,query:i});return s.process(u)}),Or=_("commerce/search/fetchMoreProducts",async(e,t)=>{let{getState:r}=t,o=r(),{navigatorContext:n}=t.extra;if(!Sg(o))return null;let i=br(o),u=Na(o)/i,c=hs(o),l=ut(o,n),d=new Ma(t),p=await d.fetchFromAPI({...l,query:c,page:u});return d.process(p)}),fn=_("commerce/search/prepareForSearchWithQuery",(e,t)=>{let{dispatch:r}=t;F(e,{query:new Ag,clearFilters:new ZA}),e.clearFilters&&(r(pe()),r(Rr())),r(dn({allow:!0})),r(fe({query:e.query})),r(Dt({page:0}))}),gn=_("commerce/search/fetchInstantProducts",async(e,{getState:t,rejectWithValue:r,extra:o})=>{let n=t(),{apiClient:a,navigatorContext:i}=o,{q:s}=e,u=await a.productSuggestions({...Pr(n,i),query:s});return qe(u)?r(u.error):{response:{...u.success,products:u.success.products}}}),tv={child:new ev({options:{required:!0},values:{permanentid:new Ag({required:!0})}})},yn=g("commerce/search/promoteChildToParent",e=>F(e,tv));function vg(){return{wasCorrectedTo:"",queryCorrection:ls(),originalQuery:""}}var Cs=j(vg(),e=>{e.addCase(X.pending,t=>{t.queryCorrection=ls(),t.wasCorrectedTo=""}).addCase(X.fulfilled,(t,r)=>{let{queryCorrection:o}=r.payload.response;t.originalQuery=r.payload.originalQuery,t.wasCorrectedTo=o?.correctedQuery??"",t.queryCorrection={correctedQuery:o?.correctedQuery??o?.corrections[0]?.correctedQuery??"",wordCorrections:o?.corrections[0]?.wordCorrections??[]}})});import{Value as Eg,BooleanValue as bg,ArrayValue as Rs,StringValue as xs,NumberValue as wg,RecordValue as cv}from"@coveo/bueno";var H=D;import{Value as rv,NumberValue as ov,StringValue as nv,ArrayValue as av,BooleanValue as iv}from"@coveo/bueno";var sv={state:new rv({required:!0}),numberOfResults:new ov({required:!0,min:0}),value:new nv({required:!0,emptyAllowed:!0}),path:new av({required:!0,each:D}),moreValuesAvailable:new iv({required:!1})};function Qa(e){e.children.forEach(t=>{Qa(t)}),Se({state:e.state,numberOfResults:e.numberOfResults,value:e.value,path:e.path,moreValuesAvailable:e.moreValuesAvailable},sv)}var Sn={facetId:H,field:D,tabs:new cv({options:{required:!1},values:{included:new Rs({each:new xs}),excluded:new Rs({each:new xs})}}),activeTab:new xs({required:!1}),delimitingCharacter:new xs({required:!1,emptyAllowed:!0}),filterFacetCount:new bg({required:!1}),injectionDepth:new wg({required:!1,min:0}),numberOfValues:new wg({required:!1,min:1}),sortCriteria:new Eg({required:!1}),basePath:new Rs({required:!1,each:D}),filterByBasePath:new bg({required:!1})},hn=5,Ig=g("categoryFacet/register",e=>F(e,Sn)),Tg=g("categoryFacet/toggleSelectValue",e=>{try{return Se(e.facetId,D),Qa(e.selection),{payload:e,error:null}}catch(t){return{payload:e,error:je(t)}}}),Og=g("categoryFacet/deselectAll",e=>F(e,Sn.facetId)),ZL=g("categoryFacet/updateNumberOfValues",e=>F(e,{facetId:Sn.facetId,numberOfValues:Sn.numberOfValues})),eB=g("categoryFacet/updateSortCriterion",e=>F(e,{facetId:Sn.facetId,criterion:new Eg})),tB=g("categoryFacet/updateBasePath",e=>F(e,{facetId:Sn.facetId,basePath:new Rs({each:D})}));import{NumberValue as mv,RecordValue as pv,ArrayValue as fv}from"@coveo/bueno";import{RecordValue as uv,NumberValue as lv,StringValue as dv}from"@coveo/bueno";var La={facetId:H,captions:new uv({options:{required:!1}}),numberOfValues:new lv({required:!1,min:1}),query:new dv({required:!1,emptyAllowed:!0})};var gv={path:new fv({required:!0,each:D}),displayValue:me,rawValue:me,count:new mv({required:!0,min:0})},Nt=g("categoryFacet/selectSearchResult",e=>F(e,{facetId:H,value:new pv({values:gv})})),Fs=g("categoryFacetSearch/register",e=>F(e,La));import{RecordValue as yv,NumberValue as Sv}from"@coveo/bueno";var qg={facetId:H,value:new yv({values:{displayValue:me,rawValue:me,count:new Sv({required:!0,min:0})}})},Ps=g("facetSearch/register",e=>F(e,La)),qr=g("facetSearch/update",e=>F(e,La)),nt=g("facetSearch/toggleSelectValue",e=>F(e,qg)),At=g("facetSearch/toggleExcludeValue",e=>F(e,qg));import{BooleanValue as hv}from"@coveo/bueno";var ir=g("facetOptions/update",(e={freezeFacetOrder:!0})=>F(e,{freezeFacetOrder:new hv({required:!1})})),Wl=g("facetOptions/facet/enable",e=>F(e,H)),sr=g("facetOptions/facet/disable",e=>F(e,H));var Cv=g("history/undo"),xv=g("history/redo"),Mt=g("history/snapshot"),AB=_("history/back",async(e,{dispatch:t})=>{t(Cv()),await t(xe())}),vB=_("history/forward",async(e,{dispatch:t})=>{t(xv()),await t(xe())}),xe=_("history/change",async(e,{getState:t})=>t().history.present);import{BooleanValue as Dg,StringValue as Ba,NumberValue as kg,RecordValue as Dr}from"@coveo/bueno";var As={q:new Ba,enableQuerySyntax:new Dg,aq:new Ba,cq:new Ba,firstResult:new kg({min:0}),numberOfResults:new kg({min:0}),sortCriteria:new Ba,f:new Dr,fExcluded:new Dr,cf:new Dr,nf:new Dr,mnf:new Dr,df:new Dr,debug:new Dg,sf:new Dr,tab:new Ba,af:new Dr};var we=g("searchParameters/restore",e=>F(e,As)),Rv=g("searchParameters/restoreTab",e=>F(e,D));import{BooleanValue as iS,NumberValue as sS,StringValue as DE}from"@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 w(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function s(l){try{c(o.next(l))}catch(d){i(d)}}function u(l){try{c(o.throw(l))}catch(d){i(d)}}function c(l){l.done?a(l.value):n(l.value).then(s,u)}c((o=o.apply(e,t||[])).next())})}var ee;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(ee||(ee={}));function Hl(){return typeof window<"u"}function cd(){return typeof navigator<"u"}function Cn(){return typeof document<"u"}function Yl(){try{return typeof localStorage<"u"}catch{return!1}}function Fv(){try{return typeof sessionStorage<"u"}catch{return!1}}function Gg(){return cd()&&navigator.cookieEnabled}var Pv=[ee.click,ee.custom,ee.search,ee.view],Av=(e,t)=>Pv.indexOf(e)!==-1?Object.assign({language:Cn()?document.documentElement.lang:"unknown",userAgent:cd()?navigator.userAgent:"unknown"},t):t,_a=class e{static set(t,r,o){var n,a,i,s;o&&(a=new Date,a.setTime(a.getTime()+o)),s=window.location.hostname,s.indexOf(".")===-1?Vg(t,r,a):(i=s.split("."),n=i[i.length-2]+"."+i[i.length-1],Vg(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 Vg(e,t,r,o){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(o?`;domain=${o}`:"")+";path=/;SameSite=Lax"}function vv(){return Yl()?localStorage:Gg()?new $a:Fv()?sessionStorage:new Rn}var $a=class e{getItem(t){return _a.get(`${e.prefix}${t}`)}removeItem(t){_a.erase(`${e.prefix}${t}`)}setItem(t,r,o){_a.set(`${e.prefix}${t}`,r,o)}};$a.prefix="coveo_";var Jl=class{constructor(){this.cookieStorage=new $a}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)}},Rn=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},Ua="__coveo.analytics.history",Hg=20,Yg=1e3*60,Jg=75,Fn=class{constructor(t){this.store=t||vv()}addElement(t){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=this.getHistoryWithInternalTime();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])}addElementAsync(t){return w(this,void 0,void 0,function*(){t.internalTime=new Date().getTime(),t=this.cropQueryElement(this.stripEmptyQuery(t));let r=yield this.getHistoryWithInternalTimeAsync();r!=null?this.isValidEntry(t)&&this.setHistory([t].concat(r)):this.setHistory([t])})}getHistory(){let t=this.getHistoryWithInternalTime();return this.stripEmptyQueries(this.stripInternalTime(t))}getHistoryAsync(){return w(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(Ua);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return w(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(Ua);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(Ua,JSON.stringify(t.slice(0,Hg)))}catch{}}clear(){try{this.store.removeItem(Ua)}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,Jg)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>Yg:!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))}},Xg=Object.freeze({__proto__:null,HistoryStore:Fn,MAX_NUMBER_OF_HISTORY_ELEMENTS:Hg,MAX_VALUE_SIZE:Jg,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:Yg,STORE_KEY:Ua,default:Fn}),bv=(e,t)=>w(void 0,void 0,void 0,function*(){return e===ee.view?(yield wv(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),wv=e=>w(void 0,void 0,void 0,function*(){let t=new Fn,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),vs,Ev=new Uint8Array(16);function Iv(){if(!vs&&(vs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!vs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return vs(Ev)}var Tv=/^(?:[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 ws(e){return typeof e=="string"&&Tv.test(e)}var Ee=[];for(let e=0;e<256;++e)Ee.push((e+256).toString(16).slice(1));function Zg(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 Ov(e){if(!ws(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 qv(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var Dv="6ba7b810-9dad-11d1-80b4-00c04fd430c8",kv="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function Vv(e,t,r){function o(n,a,i,s){var u;if(typeof n=="string"&&(n=qv(n)),typeof a=="string"&&(a=Ov(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 c=new Uint8Array(16+n.length);if(c.set(a),c.set(n,a.length),c=r(c),c[6]=c[6]&15|t,c[8]=c[8]&63|128,i){s=s||0;for(let l=0;l<16;++l)i[s+l]=c[l];return i}return Zg(c)}try{o.name=e}catch{}return o.DNS=Dv,o.URL=kv,o}var Nv=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Ng={randomUUID:Nv};function bo(e,t,r){if(Ng.randomUUID&&!t&&!e)return Ng.randomUUID();e=e||{};let o=e.random||(e.rng||Iv)();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 Zg(o)}function Mv(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 Qv(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 s=0;s<i.length;++s)e.push(i.charCodeAt(s))}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 s=new Uint32Array(16);for(let u=0;u<16;++u)s[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]=s}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 s=new Uint32Array(80);for(let m=0;m<16;++m)s[m]=a[i][m];for(let m=16;m<80;++m)s[m]=Kl(s[m-3]^s[m-8]^s[m-14]^s[m-16],1);let u=r[0],c=r[1],l=r[2],d=r[3],p=r[4];for(let m=0;m<80;++m){let f=Math.floor(m/20),h=Kl(u,5)+Mv(f,c,l,d)+p+t[f]+s[m]>>>0;p=d,d=l,l=Kl(c,30)>>>0,c=u,u=h}r[0]=r[0]+u>>>0,r[1]=r[1]+c>>>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 Lv=Vv("v5",80,Qv),Mg=Lv,ey="2.30.45",Qg=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,ja={pageview:"pageview",event:"event"},Es=class{constructor({client:t,uuidGenerator:r=bo}){this.client=t,this.uuidGenerator=r}},Xl=class extends Es{constructor({client:t,uuidGenerator:r=bo}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=Qg(window.location),this.lastReferrer=Cn()?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:Cn()?document.title:"",encoding:Cn()?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===ja.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===ja.pageview?this.nextPageViewId:this.pageViewId,referrer:t===ja.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===ja.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 Qg(window.location)}},kr=class e{constructor(t,r){if(!ws(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 ws(a)?new e(a,Number.parseInt(n)*1e3):null}};kr.cvo_cid="cvo_cid";kr.expirationTime=120;var Zl=class extends Es{constructor({client:t,uuidGenerator:r=bo}){super({client:t,uuidGenerator:r})}getApi(t){switch(t){case"decorate":return this.decorate;case"acceptFrom":return this.acceptFrom;default:return null}}decorate(t){return w(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),o=yield this.client.getCurrentVisitorId();return r.searchParams.set(kr.cvo_cid,new kr(o,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};Zl.Id="link";var dt=Object.keys;function bs(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Gl=128,ty=192,Lg=224,Bg=240;function Bv(e){return(e&248)===Bg?4:(e&Bg)===Lg?3:(e&Lg)===ty?2:1}function Uv(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&Gl)!=Gl)break;if(r-=3,(o&ty)!=Gl){t-r>=Bv(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"},jv=dt(ed).map(e=>ed[e]),_v=[...jv].join("|"),$v=new RegExp(`^(${_v}$)`),zv={svcAction:"svc_action",svcActionData:"svc_action_data"},Wv=e=>dt(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let o=ed[r]||r;return Object.assign(Object.assign({},t),{[o]:e[r]})},{}),Kv=e=>$v.test(e),Gv=[Kv],Ug={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},jg={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},ke={action:"pa",list:"pal",listSource:"pls"},Is={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},Hv=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],td={id:"quoteId",affiliation:"quoteAffiliation"},rd={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},Yv={add:ke,bookmark_add:ke,bookmark_remove:ke,click:ke,checkout:ke,checkout_option:ke,detail:ke,impression:ke,remove:ke,refund:Object.assign(Object.assign({},ke),Is),purchase:Object.assign(Object.assign({},ke),Is),quickview:ke,quote:Object.assign(Object.assign({},ke),td),review:Object.assign(Object.assign({},ke),rd)},Jv=dt(Ug).map(e=>Ug[e]),Xv=dt(jg).map(e=>jg[e]),Zv=dt(ke).map(e=>ke[e]),eb=dt(Is).map(e=>Is[e]),tb=dt(rd).map(e=>rd[e]),rb=dt(td).map(e=>td[e]),ob=[...Jv,"custom"].join("|"),nb=[...Xv,"custom"].join("|"),ry="(pr[0-9]+)",oy="(il[0-9]+pi[0-9]+)",ab=new RegExp(`^${ry}(${ob})$`),ib=new RegExp(`^(${oy}(${nb}))|(il[0-9]+nm)$`),sb=new RegExp(`^(${Zv.join("|")})$`),cb=new RegExp(`^(${eb.join("|")})$`),ub=new RegExp(`^${ry}custom$`),lb=new RegExp(`^${oy}custom$`),db=new RegExp(`^(${[...Hv,...tb,...rb].join("|")})$`),mb=e=>ab.test(e),pb=e=>ib.test(e),fb=e=>sb.test(e),gb=e=>cb.test(e),yb=e=>db.test(e),Sb=[pb,mb,fb,gb,yb],hb=[ub,lb],Cb={anonymizeIp:"aip"},xb={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Rb={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},Fb=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],Pb=Object.assign(Object.assign(Object.assign(Object.assign({},Cb),xb),Rb),Fb.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),od=Object.assign(Object.assign({},Pb),zv),Ab=e=>{let t=!!e.action&&Yv[e.action]||{};return dt(e).reduce((r,o)=>{let n=t[o]||od[o]||o;return Object.assign(Object.assign({},r),{[n]:e[o]})},{})},vb=dt(od).map(e=>od[e]),bb=e=>vb.indexOf(e)!==-1,wb=e=>e==="custom",Eb=e=>[...Sb,...Gv,bb,wb].some(t=>t(e)),Ib=e=>dt(e).reduce((t,r)=>{let o=Tb(r);return o?Object.assign(Object.assign({},t),Ob(o,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Tb=e=>{let t;return[...hb].every(r=>{var o;return t=(o=r.exec(e))===null||o===void 0?void 0:o[1],!t}),t},Ob=(e,t)=>dt(t).reduce((r,o)=>Object.assign(Object.assign({},r),{[`${e}${o}`]:t[o]}),{}),nd=class{constructor(t){this.opts=t}sendEvent(t,r){return w(this,void 0,void 0,function*(){if(!this.isAvailable())throw new Error('navigator.sendBeacon is not supported in this browser. Consider adding a polyfill like "sendbeacon-polyfill".');let{baseUrl:o,preprocessRequest:n}=this.opts,a=yield this.getQueryParamsForEventType(t),{url:i,payload:s}=yield this.preProcessRequestAsPotentialJSONString(`${o}/analytics/${t}?${a}`,r,n),u=this.encodeForEventType(t,s),c=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(i,c)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,o){return w(this,void 0,void 0,function*(){let n=t,a=r;if(o){let i=yield o({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:s,body:u}=i;n=s||t;try{a=JSON.parse(u)}catch(c){console.error("Unable to process the request body as a JSON string",c)}}return{payload:a,url:n}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return w(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:o}=this.opts,n=yield o.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",n?`visitorId=${n}`:"","discardVisitInfo=true"].filter(a=>!!a).join("&")})}isEventTypeLegacy(t){return[ee.click,ee.custom,ee.search,ee.view].indexOf(t)!==-1}encodeEventToJson(t,r,o){let n=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return o&&(n=`access_token=${encodeURIComponent(o)}&${n}`),n}},ad=class{sendEvent(t,r){return w(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return w(this,void 0,void 0,function*(){return Promise.resolve()})}},_g=globalThis.fetch,Ts=class{constructor(t){this.opts=t}sendEvent(t,r){return w(this,void 0,void 0,function*(){let{baseUrl:o,visitorIdProvider:n,preprocessRequest:a}=this.opts,i=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",s={url:`${o}/analytics/${t}${i}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},s),a?yield a(s,"analyticsFetch"):{}),{url:c}=u,l=cr(u,["url"]),d;try{d=yield _g(c,l)}catch(p){console.error("An error has occured when sending the event.",p);return}if(d.ok){let p=yield d.json();return p.visitorId&&n.setCurrentVisitorId(p.visitorId),p}else{try{d.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,d,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return w(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield _g(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[ee.click,ee.custom,ee.search,ee.view].indexOf(t)!==-1}getVisitorIdParam(){return w(this,void 0,void 0,function*(){let{visitorIdProvider:t}=this.opts,r=yield t.getCurrentVisitorId();return r?`?visitor=${r}`:""})}getHeaders(){let{token:t}=this.opts;return Object.assign(Object.assign({},t?{Authorization:`Bearer ${t}`}:{}),{"Content-Type":"application/json"})}},id=class{constructor(t,r){Yl()&&Gg()?this.storage=new Jl:Yl()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new Rn),this.client=new Ts(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}},sd=class{constructor(t,r){this.storage=r||new Rn,this.client=new Ts(t)}getClientDependingOnEventType(t){return this.client}},Os=class{constructor(){this.storage=new Rn,this.client=new ad}getClientDependingOnEventType(t){return this.client}},qb="xx",Db=e=>e?.startsWith(qb)||!1,kb=`
|
|
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
|