@coveo/headless 3.19.0 → 3.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/browser/case-assist/headless.esm.js +1 -1
  2. package/dist/browser/case-assist/headless.js +1 -1
  3. package/dist/browser/commerce/headless.esm.js +1 -1
  4. package/dist/browser/commerce/headless.js +1 -1
  5. package/dist/browser/headless.esm.js +1 -1
  6. package/dist/browser/headless.js +1 -1
  7. package/dist/browser/insight/headless.esm.js +1 -1
  8. package/dist/browser/insight/headless.js +1 -1
  9. package/dist/browser/recommendation/headless.esm.js +1 -1
  10. package/dist/browser/recommendation/headless.js +1 -1
  11. package/dist/browser/ssr/headless.esm.js +1 -1
  12. package/dist/browser/ssr/headless.js +1 -1
  13. package/dist/browser/ssr-commerce/headless.esm.js +1 -1
  14. package/dist/browser/ssr-commerce/headless.js +1 -1
  15. package/dist/case-assist/headless.cjs +1 -1
  16. package/dist/case-assist/headless.esm.js +1 -1
  17. package/dist/commerce/headless.cjs +1 -1
  18. package/dist/commerce/headless.esm.js +1 -1
  19. package/dist/headless.cjs +1 -1
  20. package/dist/headless.esm.js +1 -1
  21. package/dist/insight/headless.cjs +1 -1
  22. package/dist/insight/headless.esm.js +1 -1
  23. package/dist/quantic/case-assist/headless.js +1 -1
  24. package/dist/quantic/commerce/headless.js +1 -1
  25. package/dist/quantic/headless.js +1 -1
  26. package/dist/quantic/insight/headless.js +1 -1
  27. package/dist/quantic/recommendation/headless.js +1 -1
  28. package/dist/recommendation/headless.cjs +1 -1
  29. package/dist/recommendation/headless.esm.js +1 -1
  30. package/dist/ssr/headless.cjs +1 -1
  31. package/dist/ssr/headless.esm.js +1 -1
  32. package/dist/ssr-commerce/headless.cjs +1 -1
  33. package/dist/ssr-commerce/headless.esm.js +1 -1
  34. package/package.json +1 -1
@@ -16,7 +16,7 @@
16
16
  * limitations under the License.
17
17
  */(function(g,f){if(typeof exports=="object"&&typeof module<"u"){module.exports=f(require)}else if("function"==typeof define && define.amd){define("CoveoHeadlessInsight",["crypto","@coveo/bueno"],function(_d_0,_d_1){var d={"crypto": _d_0,"@coveo/bueno": _d_1},r=function(m){if(m in d) return d[m];if(typeof require=="function") return require(m);throw new Error("Cannot find module '"+m+"'")};return f(r)})}else {var gN={"crypto":"crypto","@coveo/bueno":"@coveo/bueno"},gReq=function(r){var mod = r in gN ? g[gN[r]] : g[r]; return mod };g["CoveoHeadlessInsight"]=f(gReq)}}(typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : this,function(require){var exports={};var __exports=exports;var module={exports};
18
18
  "use strict";var rb=Object.create;var Hi=Object.defineProperty;var nb=Object.getOwnPropertyDescriptor;var ob=Object.getOwnPropertyNames;var ib=Object.getPrototypeOf,ab=Object.prototype.hasOwnProperty;var sb=(e,t,r)=>t in e?Hi(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Ue=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Lg=(e,t)=>{for(var r in t)Hi(e,r,{get:t[r],enumerable:!0})},Ug=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ob(t))!ab.call(e,o)&&o!==r&&Hi(e,o,{get:()=>t[o],enumerable:!(n=nb(t,o))||n.enumerable});return e};var Xt=(e,t,r)=>(r=e!=null?rb(ib(e)):{},Ug(t||!e||!e.__esModule?Hi(r,"default",{value:e,enumerable:!0}):r,e)),cb=e=>Ug(Hi({},"__esModule",{value:!0}),e);var Ee=(e,t,r)=>sb(e,typeof t!="symbol"?t+"":t,r);var Zg=Ue(Ki=>{"use strict";var xs=Ki&&Ki.__assign||function(){return xs=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},xs.apply(this,arguments)};Object.defineProperty(Ki,"__esModule",{value:!0});var Cb={delayFirstAttempt:!1,jitter:"none",maxDelay:1/0,numOfAttempts:10,retry:function(){return!0},startingDelay:100,timeMultiple:2};function Ab(e){var t=xs(xs({},Cb),e);return t.numOfAttempts<1&&(t.numOfAttempts=1),t}Ki.getSanitizedOptions=Ab});var ef=Ue(Ud=>{"use strict";Object.defineProperty(Ud,"__esModule",{value:!0});function xb(e){var t=Math.random()*e;return Math.round(t)}Ud.fullJitter=xb});var tf=Ue(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});function Rb(e){return e}_d.noJitter=Rb});var rf=Ue(Bd=>{"use strict";Object.defineProperty(Bd,"__esModule",{value:!0});var Fb=ef(),bb=tf();function vb(e){switch(e.jitter){case"full":return Fb.fullJitter;case"none":default:return bb.noJitter}}Bd.JitterFactory=vb});var $d=Ue(jd=>{"use strict";Object.defineProperty(jd,"__esModule",{value:!0});var Ib=rf(),wb=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=Ib.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,n=this.numOfDelayedAttempts,o=t*Math.pow(r,n);return Math.min(o,this.options.maxDelay)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numOfDelayedAttempts",{get:function(){return this.attempt},enumerable:!0,configurable:!0}),e}();jd.Delay=wb});var nf=Ue(Tr=>{"use strict";var Pb=Tr&&Tr.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Eb=Tr&&Tr.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(l){try{c(n.next(l))}catch(p){a(p)}}function u(l){try{c(n.throw(l))}catch(p){a(p)}}function c(l){l.done?i(l.value):o(l.value).then(s,u)}c((n=n.apply(e,t||[])).next())})},Tb=Tr&&Tr.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(l){return u([c,l])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,o=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){r.label=c[1];break}if(c[0]===6&&r.label<i[1]){r.label=i[1],i=c;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(c);break}i[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(l){c=[6,l],o=0}finally{n=i=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 kb=$d(),qb=function(e){Pb(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.apply=function(){return Eb(this,void 0,void 0,function(){return Tb(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}(kb.Delay);Tr.SkipFirstDelay=qb});var of=Ue(Ji=>{"use strict";var Ob=Ji&&Ji.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(Ji,"__esModule",{value:!0});var Db=$d(),Vb=function(e){Ob(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Db.Delay);Ji.AlwaysDelay=Vb});var af=Ue(Gd=>{"use strict";Object.defineProperty(Gd,"__esModule",{value:!0});var Nb=nf(),Mb=of();function Qb(e,t){var r=Lb(e);return r.setAttemptNumber(t),r}Gd.DelayFactory=Qb;function Lb(e){return e.delayFirstAttempt?new Mb.AlwaysDelay(e):new Nb.SkipFirstDelay(e)}});var sf=Ue(Nn=>{"use strict";var zd=Nn&&Nn.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(l){try{c(n.next(l))}catch(p){a(p)}}function u(l){try{c(n.throw(l))}catch(p){a(p)}}function c(l){l.done?i(l.value):o(l.value).then(s,u)}c((n=n.apply(e,t||[])).next())})},Hd=Nn&&Nn.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,o,i,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(l){return u([c,l])}}function u(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,o=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){r.label=c[1];break}if(c[0]===6&&r.label<i[1]){r.label=i[1],i=c;break}if(i&&r.label<i[2]){r.label=i[2],r.ops.push(c);break}i[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(l){c=[6,l],o=0}finally{n=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};Object.defineProperty(Nn,"__esModule",{value:!0});var Ub=Zg(),_b=af();function Bb(e,t){return t===void 0&&(t={}),zd(this,void 0,void 0,function(){var r,n;return Hd(this,function(o){switch(o.label){case 0:return r=Ub.getSanitizedOptions(t),n=new jb(e,r),[4,n.execute()];case 1:return[2,o.sent()]}})})}Nn.backOff=Bb;var jb=function(){function e(t,r){this.request=t,this.options=r,this.attemptNumber=0}return e.prototype.execute=function(){return zd(this,void 0,void 0,function(){var t,r;return Hd(this,function(n){switch(n.label){case 0:if(this.attemptLimitReached)return[3,7];n.label=1;case 1:return n.trys.push([1,4,,6]),[4,this.applyDelay()];case 2:return n.sent(),[4,this.request()];case 3:return[2,n.sent()];case 4:return t=n.sent(),this.attemptNumber++,[4,this.options.retry(t,this.attemptNumber)];case 5:if(r=n.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 zd(this,void 0,void 0,function(){var t;return Hd(this,function(r){switch(r.label){case 0:return t=_b.DelayFactory(this.options,this.attemptNumber),[4,t.apply()];case 1:return r.sent(),[2]}})})},e}()});var lc=Ue((Wp,Yp)=>{"use strict";(function(e,t){typeof Wp=="object"&&typeof Yp<"u"?Yp.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(Wp,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",a="hour",s="day",u="week",c="month",l="quarter",p="year",m="date",d="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|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,f={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"],k=V%100;return"["+V+(q[(k-20)%10]||q[k]||q[0])+"]"}},h=function(V,q,k){var N=String(V);return!N||N.length>=q?V:""+Array(q+1-N.length).join(k)+V},R={s:h,z:function(V){var q=-V.utcOffset(),k=Math.abs(q),N=Math.floor(k/60),O=k%60;return(q<=0?"+":"-")+h(N,2,"0")+":"+h(O,2,"0")},m:function V(q,k){if(q.date()<k.date())return-V(k,q);var N=12*(k.year()-q.year())+(k.month()-q.month()),O=q.clone().add(N,c),Q=k-O<0,L=q.clone().add(N+(Q?-1:1),c);return+(-(N+(k-O)/(Q?O-L:L-O))||0)},a:function(V){return V<0?Math.ceil(V)||0:Math.floor(V)},p:function(V){return{M:c,y:p,w:u,d:s,D:m,h:a,m:i,s:o,ms:n,Q:l}[V]||String(V||"").toLowerCase().replace(/s$/,"")},u:function(V){return V===void 0}},y="en",x={};x[y]=f;var E="$isDayjsObject",I=function(V){return V instanceof T||!(!V||!V[E])},F=function V(q,k,N){var O;if(!q)return y;if(typeof q=="string"){var Q=q.toLowerCase();x[Q]&&(O=Q),k&&(x[Q]=k,O=Q);var L=q.split("-");if(!O&&L.length>1)return V(L[0])}else{var z=q.name;x[z]=q,O=z}return!N&&O&&(y=O),O||!N&&y},v=function(V,q){if(I(V))return V.clone();var k=typeof q=="object"?q:{};return k.date=V,k.args=arguments,new T(k)},w=R;w.l=F,w.i=I,w.w=function(V,q){return v(V,{locale:q.$L,utc:q.$u,x:q.$x,$offset:q.$offset})};var T=function(){function V(k){this.$L=F(k.locale,null,!0),this.parse(k),this.$x=this.$x||k.x||{},this[E]=!0}var q=V.prototype;return q.parse=function(k){this.$d=function(N){var O=N.date,Q=N.utc;if(O===null)return new Date(NaN);if(w.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var L=O.match(g);if(L){var z=L[2]-1||0,ee=(L[7]||"0").substring(0,3);return Q?new Date(Date.UTC(L[1],z,L[3]||1,L[4]||0,L[5]||0,L[6]||0,ee)):new Date(L[1],z,L[3]||1,L[4]||0,L[5]||0,L[6]||0,ee)}}return new Date(O)}(k),this.init()},q.init=function(){var k=this.$d;this.$y=k.getFullYear(),this.$M=k.getMonth(),this.$D=k.getDate(),this.$W=k.getDay(),this.$H=k.getHours(),this.$m=k.getMinutes(),this.$s=k.getSeconds(),this.$ms=k.getMilliseconds()},q.$utils=function(){return w},q.isValid=function(){return this.$d.toString()!==d},q.isSame=function(k,N){var O=v(k);return this.startOf(N)<=O&&O<=this.endOf(N)},q.isAfter=function(k,N){return v(k)<this.startOf(N)},q.isBefore=function(k,N){return this.endOf(N)<v(k)},q.$g=function(k,N,O){return w.u(k)?this[N]:this.set(O,k)},q.unix=function(){return Math.floor(this.valueOf()/1e3)},q.valueOf=function(){return this.$d.getTime()},q.startOf=function(k,N){var O=this,Q=!!w.u(N)||N,L=w.p(k),z=function(ce,Fe){var Pe=w.w(O.$u?Date.UTC(O.$y,Fe,ce):new Date(O.$y,Fe,ce),O);return Q?Pe:Pe.endOf(s)},ee=function(ce,Fe){return w.w(O.toDate()[ce].apply(O.toDate("s"),(Q?[0,0,0,0]:[23,59,59,999]).slice(Fe)),O)},ie=this.$W,Z=this.$M,te=this.$D,X="set"+(this.$u?"UTC":"");switch(L){case p:return Q?z(1,0):z(31,11);case c:return Q?z(1,Z):z(0,Z+1);case u:var ne=this.$locale().weekStart||0,ve=(ie<ne?ie+7:ie)-ne;return z(Q?te-ve:te+(6-ve),Z);case s:case m:return ee(X+"Hours",0);case a:return ee(X+"Minutes",1);case i:return ee(X+"Seconds",2);case o:return ee(X+"Milliseconds",3);default:return this.clone()}},q.endOf=function(k){return this.startOf(k,!1)},q.$set=function(k,N){var O,Q=w.p(k),L="set"+(this.$u?"UTC":""),z=(O={},O[s]=L+"Date",O[m]=L+"Date",O[c]=L+"Month",O[p]=L+"FullYear",O[a]=L+"Hours",O[i]=L+"Minutes",O[o]=L+"Seconds",O[n]=L+"Milliseconds",O)[Q],ee=Q===s?this.$D+(N-this.$W):N;if(Q===c||Q===p){var ie=this.clone().set(m,1);ie.$d[z](ee),ie.init(),this.$d=ie.set(m,Math.min(this.$D,ie.daysInMonth())).$d}else z&&this.$d[z](ee);return this.init(),this},q.set=function(k,N){return this.clone().$set(k,N)},q.get=function(k){return this[w.p(k)]()},q.add=function(k,N){var O,Q=this;k=Number(k);var L=w.p(N),z=function(Z){var te=v(Q);return w.w(te.date(te.date()+Math.round(Z*k)),Q)};if(L===c)return this.set(c,this.$M+k);if(L===p)return this.set(p,this.$y+k);if(L===s)return z(1);if(L===u)return z(7);var ee=(O={},O[i]=t,O[a]=r,O[o]=e,O)[L]||1,ie=this.$d.getTime()+k*ee;return w.w(ie,this)},q.subtract=function(k,N){return this.add(-1*k,N)},q.format=function(k){var N=this,O=this.$locale();if(!this.isValid())return O.invalidDate||d;var Q=k||"YYYY-MM-DDTHH:mm:ssZ",L=w.z(this),z=this.$H,ee=this.$m,ie=this.$M,Z=O.weekdays,te=O.months,X=O.meridiem,ne=function(Fe,Pe,ot,Ft){return Fe&&(Fe[Pe]||Fe(N,Q))||ot[Pe].slice(0,Ft)},ve=function(Fe){return w.s(z%12||12,Fe,"0")},ce=X||function(Fe,Pe,ot){var Ft=Fe<12?"AM":"PM";return ot?Ft.toLowerCase():Ft};return Q.replace(C,function(Fe,Pe){return Pe||function(ot){switch(ot){case"YY":return String(N.$y).slice(-2);case"YYYY":return w.s(N.$y,4,"0");case"M":return ie+1;case"MM":return w.s(ie+1,2,"0");case"MMM":return ne(O.monthsShort,ie,te,3);case"MMMM":return ne(te,ie);case"D":return N.$D;case"DD":return w.s(N.$D,2,"0");case"d":return String(N.$W);case"dd":return ne(O.weekdaysMin,N.$W,Z,2);case"ddd":return ne(O.weekdaysShort,N.$W,Z,3);case"dddd":return Z[N.$W];case"H":return String(z);case"HH":return w.s(z,2,"0");case"h":return ve(1);case"hh":return ve(2);case"a":return ce(z,ee,!0);case"A":return ce(z,ee,!1);case"m":return String(ee);case"mm":return w.s(ee,2,"0");case"s":return String(N.$s);case"ss":return w.s(N.$s,2,"0");case"SSS":return w.s(N.$ms,3,"0");case"Z":return L}return null}(Fe)||L.replace(":","")})},q.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},q.diff=function(k,N,O){var Q,L=this,z=w.p(N),ee=v(k),ie=(ee.utcOffset()-this.utcOffset())*t,Z=this-ee,te=function(){return w.m(L,ee)};switch(z){case p:Q=te()/12;break;case c:Q=te();break;case l:Q=te()/3;break;case u:Q=(Z-ie)/6048e5;break;case s:Q=(Z-ie)/864e5;break;case a:Q=Z/r;break;case i:Q=Z/t;break;case o:Q=Z/e;break;default:Q=Z}return O?Q:w.a(Q)},q.daysInMonth=function(){return this.endOf(c).$D},q.$locale=function(){return x[this.$L]},q.locale=function(k,N){if(!k)return this.$L;var O=this.clone(),Q=F(k,N,!0);return Q&&(O.$L=Q),O},q.clone=function(){return w.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 v.prototype=M,[["$ms",n],["$s",o],["$m",i],["$H",a],["$W",s],["$M",c],["$y",p],["$D",m]].forEach(function(V){M[V[1]]=function(q){return this.$g(q,V[0],V[1])}}),v.extend=function(V,q){return V.$i||(V(q,T,v),V.$i=!0),v},v.locale=F,v.isDayjs=I,v.unix=function(V){return v(1e3*V)},v.en=x[y],v.Ls=x,v.p={},v})});var gy=Ue((Kp,Jp)=>{"use strict";(function(e,t){typeof Kp=="object"&&typeof Jp<"u"?Jp.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_quarterOfYear=t()})(Kp,function(){"use strict";var e="month",t="quarter";return function(r,n){var o=n.prototype;o.quarter=function(s){return this.$utils().u(s)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(s-1))};var i=o.add;o.add=function(s,u){return s=Number(s),this.$utils().p(u)===t?this.add(3*s,e):i.bind(this)(s,u)};var a=o.startOf;o.startOf=function(s,u){var c=this.$utils(),l=!!c.u(u)||u;if(c.p(s)===t){var p=this.quarter()-1;return l?this.month(3*p).startOf(e).startOf("day"):this.month(3*p+2).endOf(e).endOf("day")}return a.bind(this)(s,u)}}})});var fy=Ue((Xp,Zp)=>{"use strict";(function(e,t){typeof Xp=="object"&&typeof Zp<"u"?Zp.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_customParseFormat=t()})(Xp,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/,n=/\d\d/,o=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,a={},s=function(g){return(g=+g)+(g>68?1900:2e3)},u=function(g){return function(C){this[g]=+C}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=function(C){if(!C||C==="Z")return 0;var f=C.match(/([+-]|\d\d)/g),h=60*f[1]+(+f[2]||0);return h===0?0:f[0]==="+"?-h:h}(g)}],l=function(g){var C=a[g];return C&&(C.indexOf?C:C.s.concat(C.f))},p=function(g,C){var f,h=a.meridiem;if(h){for(var R=1;R<=24;R+=1)if(g.indexOf(h(R,0,C))>-1){f=R>12;break}}else f=g===(C?"pm":"PM");return f},m={A:[i,function(g){this.afternoon=p(g,!1)}],a:[i,function(g){this.afternoon=p(g,!0)}],Q:[r,function(g){this.month=3*(g-1)+1}],S:[r,function(g){this.milliseconds=100*+g}],SS:[n,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[o,u("seconds")],ss:[o,u("seconds")],m:[o,u("minutes")],mm:[o,u("minutes")],H:[o,u("hours")],h:[o,u("hours")],HH:[o,u("hours")],hh:[o,u("hours")],D:[o,u("day")],DD:[n,u("day")],Do:[i,function(g){var C=a.ordinal,f=g.match(/\d+/);if(this.day=f[0],C)for(var h=1;h<=31;h+=1)C(h).replace(/\[|\]/g,"")===g&&(this.day=h)}],w:[o,u("week")],ww:[n,u("week")],M:[o,u("month")],MM:[n,u("month")],MMM:[i,function(g){var C=l("months"),f=(l("monthsShort")||C.map(function(h){return h.slice(0,3)})).indexOf(g)+1;if(f<1)throw new Error;this.month=f%12||f}],MMMM:[i,function(g){var C=l("months").indexOf(g)+1;if(C<1)throw new Error;this.month=C%12||C}],Y:[/[+-]?\d+/,u("year")],YY:[n,function(g){this.year=s(g)}],YYYY:[/\d{4}/,u("year")],Z:c,ZZ:c};function d(g){var C,f;C=g,f=a&&a.formats;for(var h=(g=C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(v,w,T){var M=T&&T.toUpperCase();return w||f[T]||e[T]||f[M].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(V,q,k){return q||k.slice(1)})})).match(t),R=h.length,y=0;y<R;y+=1){var x=h[y],E=m[x],I=E&&E[0],F=E&&E[1];h[y]=F?{regex:I,parser:F}:x.replace(/^\[|\]$/g,"")}return function(v){for(var w={},T=0,M=0;T<R;T+=1){var V=h[T];if(typeof V=="string")M+=V.length;else{var q=V.regex,k=V.parser,N=v.slice(M),O=q.exec(N)[0];k.call(w,O),v=v.replace(O,"")}}return function(Q){var L=Q.afternoon;if(L!==void 0){var z=Q.hours;L?z<12&&(Q.hours+=12):z===12&&(Q.hours=0),delete Q.afternoon}}(w),w}}return function(g,C,f){f.p.customParseFormat=!0,g&&g.parseTwoDigitYear&&(s=g.parseTwoDigitYear);var h=C.prototype,R=h.parse;h.parse=function(y){var x=y.date,E=y.utc,I=y.args;this.$u=E;var F=I[1];if(typeof F=="string"){var v=I[2]===!0,w=I[3]===!0,T=v||w,M=I[2];w&&(M=I[2]),a=this.$locale(),!v&&M&&(a=f.Ls[M]),this.$d=function(N,O,Q,L){try{if(["x","X"].indexOf(O)>-1)return new Date((O==="X"?1e3:1)*N);var z=d(O)(N),ee=z.year,ie=z.month,Z=z.day,te=z.hours,X=z.minutes,ne=z.seconds,ve=z.milliseconds,ce=z.zone,Fe=z.week,Pe=new Date,ot=Z||(ee||ie?1:Pe.getDate()),Ft=ee||Pe.getFullYear(),jr=0;ee&&!ie||(jr=ie>0?ie-1:Pe.getMonth());var co,uo=te||0,zi=X||0,kd=ne||0,qd=ve||0;return ce?new Date(Date.UTC(Ft,jr,ot,uo,zi,kd,qd+60*ce.offset*1e3)):Q?new Date(Date.UTC(Ft,jr,ot,uo,zi,kd,qd)):(co=new Date(Ft,jr,ot,uo,zi,kd,qd),Fe&&(co=L(co).week(Fe).toDate()),co)}catch{return new Date("")}}(x,F,E,f),this.init(),M&&M!==!0&&(this.$L=this.locale(M).$L),T&&x!=this.format(F)&&(this.$d=new Date("")),a={}}else if(F instanceof Array)for(var V=F.length,q=1;q<=V;q+=1){I[1]=F[q-1];var k=f.apply(this,I);if(k.isValid()){this.$d=k.$d,this.$L=k.$L,this.init();break}q===V&&(this.$d=new Date(""))}else R.call(this,y)}}})});var tC=Ue((p$,eC)=>{"use strict";var GE=/(^|; )Coveo-Pendragon=([^;]*)/;eC.exports=()=>GE.exec(document.cookie)?.pop()||null});var nC=Ue((Bm,jm)=>{"use strict";(function(e,t){typeof Bm=="object"&&typeof jm<"u"?jm.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_timezone=t()})(Bm,function(){"use strict";var e={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(r,n,o){var i,a=function(l,p,m){m===void 0&&(m={});var d=new Date(l),g=function(C,f){f===void 0&&(f={});var h=f.timeZoneName||"short",R=C+"|"+h,y=t[R];return y||(y=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:C,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:h}),t[R]=y),y}(p,m);return g.formatToParts(d)},s=function(l,p){for(var m=a(l,p),d=[],g=0;g<m.length;g+=1){var C=m[g],f=C.type,h=C.value,R=e[f];R>=0&&(d[R]=parseInt(h,10))}var y=d[3],x=y===24?0:y,E=d[0]+"-"+d[1]+"-"+d[2]+" "+x+":"+d[4]+":"+d[5]+":000",I=+l;return(o.utc(E).valueOf()-(I-=I%1e3))/6e4},u=n.prototype;u.tz=function(l,p){l===void 0&&(l=i);var m,d=this.utcOffset(),g=this.toDate(),C=g.toLocaleString("en-US",{timeZone:l}),f=Math.round((g-new Date(C))/1e3/60),h=15*-Math.round(g.getTimezoneOffset()/15)-f;if(!Number(h))m=this.utcOffset(0,p);else if(m=o(C,{locale:this.$L}).$set("millisecond",this.$ms).utcOffset(h,!0),p){var R=m.utcOffset();m=m.add(d-R,"minute")}return m.$x.$timezone=l,m},u.offsetName=function(l){var p=this.$x.$timezone||o.tz.guess(),m=a(this.valueOf(),p,{timeZoneName:l}).find(function(d){return d.type.toLowerCase()==="timezonename"});return m&&m.value};var c=u.startOf;u.startOf=function(l,p){if(!this.$x||!this.$x.$timezone)return c.call(this,l,p);var m=o(this.format("YYYY-MM-DD HH:mm:ss:SSS"),{locale:this.$L});return c.call(m,l,p).tz(this.$x.$timezone,!0)},o.tz=function(l,p,m){var d=m&&p,g=m||p||i,C=s(+o(),g);if(typeof l!="string")return o(l).tz(g);var f=function(x,E,I){var F=x-60*E*1e3,v=s(F,I);if(E===v)return[F,E];var w=s(F-=60*(v-E)*1e3,I);return v===w?[F,v]:[x-60*Math.min(v,w)*1e3,Math.max(v,w)]}(o.utc(l,d).valueOf(),C,g),h=f[0],R=f[1],y=o(h).utcOffset(R);return y.$x.$timezone=g,y},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(l){i=l}}})});var oC=Ue(($m,Gm)=>{"use strict";(function(e,t){typeof $m=="object"&&typeof Gm<"u"?Gm.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs_plugin_utc=t()})($m,function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,r=/([+-]|\d\d)/g;return function(n,o,i){var a=o.prototype;i.utc=function(d){var g={date:d,utc:!0,args:arguments};return new o(g)},a.utc=function(d){var g=i(this.toDate(),{locale:this.$L,utc:!0});return d?g.add(this.utcOffset(),e):g},a.local=function(){return i(this.toDate(),{locale:this.$L,utc:!1})};var s=a.parse;a.parse=function(d){d.utc&&(this.$u=!0),this.$utils().u(d.$offset)||(this.$offset=d.$offset),s.call(this,d)};var u=a.init;a.init=function(){if(this.$u){var d=this.$d;this.$y=d.getUTCFullYear(),this.$M=d.getUTCMonth(),this.$D=d.getUTCDate(),this.$W=d.getUTCDay(),this.$H=d.getUTCHours(),this.$m=d.getUTCMinutes(),this.$s=d.getUTCSeconds(),this.$ms=d.getUTCMilliseconds()}else u.call(this)};var c=a.utcOffset;a.utcOffset=function(d,g){var C=this.$utils().u;if(C(d))return this.$u?0:C(this.$offset)?c.call(this):this.$offset;if(typeof d=="string"&&(d=function(y){y===void 0&&(y="");var x=y.match(t);if(!x)return null;var E=(""+x[0]).match(r)||["-",0,0],I=E[0],F=60*+E[1]+ +E[2];return F===0?0:I==="+"?F:-F}(d),d===null))return this;var f=Math.abs(d)<=16?60*d:d,h=this;if(g)return h.$offset=f,h.$u=d===0,h;if(d!==0){var R=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(h=this.local().add(f+R,e)).$offset=f,h.$x.$localOffset=R}else h=this.utc();return h};var l=a.format;a.format=function(d){var g=d||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,g)},a.valueOf=function(){var d=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*d},a.isUTC=function(){return!!this.$u},a.toISOString=function(){return this.toDate().toISOString()},a.toString=function(){return this.toDate().toUTCString()};var p=a.toDate;a.toDate=function(d){return d==="s"&&this.$offset?i(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():p.call(this)};var m=a.diff;a.diff=function(d,g,C){if(d&&this.$u===d.$u)return m.call(this,d,g,C);var f=this.local(),h=i(d).local();return m.call(f,h,g,C)}}})});var hC=Ue((bG,fC)=>{"use strict";function rT(e){try{return JSON.stringify(e)}catch{return'"[Circular]"'}}fC.exports=nT;function nT(e,t,r){var n=r&&r.stringify||rT,o=1;if(typeof e=="object"&&e!==null){var i=t.length+o;if(i===1)return e;var a=new Array(i);a[0]=n(e);for(var s=1;s<i;s++)a[s]=n(t[s]);return a.join(" ")}if(typeof e!="string")return e;var u=t.length;if(u===0)return e;for(var c="",l=1-o,p=-1,m=e&&e.length||0,d=0;d<m;){if(e.charCodeAt(d)===37&&d+1<m){switch(p=p>-1?p:0,e.charCodeAt(d+1)){case 100:case 102:if(l>=u||t[l]==null)break;p<d&&(c+=e.slice(p,d)),c+=Number(t[l]),p=d+2,d++;break;case 105:if(l>=u||t[l]==null)break;p<d&&(c+=e.slice(p,d)),c+=Math.floor(Number(t[l])),p=d+2,d++;break;case 79:case 111:case 106:if(l>=u||t[l]===void 0)break;p<d&&(c+=e.slice(p,d));var g=typeof t[l];if(g==="string"){c+="'"+t[l]+"'",p=d+2,d++;break}if(g==="function"){c+=t[l].name||"<anonymous>",p=d+2,d++;break}c+=n(t[l]),p=d+2,d++;break;case 115:if(l>=u)break;p<d&&(c+=e.slice(p,d)),c+=String(t[l]),p=d+2,d++;break;case 37:p<d&&(c+=e.slice(p,d)),c+="%",p=d+2,d++,l--;break}++l}++d}return p===-1?e:(p<m&&(c+=e.slice(p)),c)}});var RC=Ue((vG,xu)=>{"use strict";var yC=hC();xu.exports=Mr;var La=ST().console||{},oT={mapHttpRequest:Au,mapHttpResponse:Au,wrapRequestSerializer:Ym,wrapResponseSerializer:Ym,wrapErrorSerializer:Ym,req:Au,res:Au,err:CC,errWithCause:CC};function gn(e,t){return e==="silent"?1/0:t.levels.values[e]}var Xm=Symbol("pino.logFuncs"),Km=Symbol("pino.hierarchy"),iT={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function SC(e,t){let r={logger:t,parent:e[Km]};t[Km]=r}function aT(e,t,r){let n={};t.forEach(o=>{n[o]=r[o]?r[o]:La[o]||La[iT[o]||"log"]||Jo}),e[Xm]=n}function sT(e,t){return Array.isArray(e)?e.filter(function(n){return n!=="!stdSerializers.err"}):e===!0?Object.keys(t):!1}function Mr(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||La;e.browser.write&&(e.browser.asObject=!0);let n=e.serializers||{},o=sT(e.browser.serialize,n),i=e.browser.serialize;Array.isArray(e.browser.serialize)&&e.browser.serialize.indexOf("!stdSerializers.err")>-1&&(i=!1);let a=Object.keys(e.customLevels||{}),s=["error","fatal","warn","info","debug","trace"].concat(a);typeof r=="function"&&s.forEach(function(C){r[C]=r}),(e.enabled===!1||e.browser.disabled)&&(e.level="silent");let u=e.level||"info",c=Object.create(r);c.log||(c.log=Jo),aT(c,s,r),SC({},c),Object.defineProperty(c,"levelVal",{get:p}),Object.defineProperty(c,"level",{get:m,set:d});let l={transmit:t,serialize:o,asObject:e.browser.asObject,formatters:e.browser.formatters,levels:s,timestamp:fT(e),messageKey:e.messageKey||"msg",onChild:e.onChild||Jo};c.levels=cT(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=Jo,c.serializers=n,c._serialize=o,c._stdErrSerialize=i,c.child=function(...C){return g.call(this,l,...C)},t&&(c._logEvent=Jm());function p(){return gn(this.level,this)}function m(){return this._level}function d(C){if(C!=="silent"&&!this.levels.values[C])throw Error("unknown level "+C);this._level=C,Xn(this,l,c,"error"),Xn(this,l,c,"fatal"),Xn(this,l,c,"warn"),Xn(this,l,c,"info"),Xn(this,l,c,"debug"),Xn(this,l,c,"trace"),a.forEach(f=>{Xn(this,l,c,f)})}function g(C,f,h){if(!f)throw new Error("missing bindings for child Pino");h=h||{},o&&f.serializers&&(h.serializers=f.serializers);let R=h.serializers;if(o&&R){var y=Object.assign({},n,R),x=e.browser.serialize===!0?Object.keys(y):o;delete f.serializers,Zm([f],x,y,this._stdErrSerialize)}function E(F){this._childLevel=(F._childLevel|0)+1,this.bindings=f,y&&(this.serializers=y,this._serialize=x),t&&(this._logEvent=Jm([].concat(F._logEvent.bindings,f)))}E.prototype=this;let I=new E(this);return SC(this,I),I.child=function(...F){return g.call(this,C,...F)},I.level=h.level||this.level,C.onChild(I),I}return c}function cT(e){let t=e.customLevels||{},r=Object.assign({},Mr.levels.values,t),n=Object.assign({},Mr.levels.labels,uT(t));return{values:r,labels:n}}function uT(e){let t={};return Object.keys(e).forEach(function(r){t[e[r]]=r}),t}Mr.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"}};Mr.stdSerializers=oT;Mr.stdTimeFunctions=Object.assign({},{nullTime:AC,epochTime:xC,unixTime:hT,isoTime:yT});function lT(e){let t=[];e.bindings&&t.push(e.bindings);let r=e[Km];for(;r.parent;)r=r.parent,r.logger.bindings&&t.push(r.logger.bindings);return t.reverse()}function Xn(e,t,r,n){if(Object.defineProperty(e,n,{value:gn(e.level,r)>gn(n,r)?Jo:r[Xm][n],writable:!0,enumerable:!0,configurable:!0}),e[n]===Jo){if(!t.transmit)return;let i=t.transmit.level||e.level,a=gn(i,r);if(gn(n,r)<a)return}e[n]=pT(e,t,r,n);let o=lT(e);o.length!==0&&(e[n]=dT(o,e[n]))}function dT(e,t){return function(){return t.apply(this,[...e,...arguments])}}function pT(e,t,r,n){return function(o){return function(){let a=t.timestamp(),s=new Array(arguments.length),u=Object.getPrototypeOf&&Object.getPrototypeOf(this)===La?La:this;for(var c=0;c<s.length;c++)s[c]=arguments[c];var l=!1;if(t.serialize&&(Zm(s,this._serialize,this.serializers,this._stdErrSerialize),l=!0),t.asObject||t.formatters?o.call(u,mT(this,n,s,a,t)):o.apply(u,s),t.transmit){let p=t.transmit.level||e._level,m=gn(p,r),d=gn(n,r);if(d<m)return;gT(this,{ts:a,methodLevel:n,methodValue:d,transmitLevel:p,transmitValue:r.levels.values[t.transmit.level||e._level],send:t.transmit.send,val:gn(e._level,r)},s,l)}}}(e[Xm][n])}function mT(e,t,r,n,o){let{level:i,log:a=m=>m}=o.formatters||{},s=r.slice(),u=s[0],c={};if(n&&(c.time=n),i){let m=i(t,e.levels.values[t]);Object.assign(c,m)}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?yC(s.shift(),s):void 0}else typeof u=="string"&&(u=yC(s.shift(),s));return u!==void 0&&(c[o.messageKey]=u),a(c)}function Zm(e,t,r,n){for(let o in e)if(n&&e[o]instanceof Error)e[o]=Mr.stdSerializers.err(e[o]);else if(typeof e[o]=="object"&&!Array.isArray(e[o])&&t)for(let i in e[o])t.indexOf(i)>-1&&i in r&&(e[o][i]=r[i](e[o][i]))}function gT(e,t,r,n=!1){let o=t.send,i=t.ts,a=t.methodLevel,s=t.methodValue,u=t.val,c=e._logEvent.bindings;n||Zm(r,e._serialize||Object.keys(e.serializers),e.serializers,e._stdErrSerialize===void 0?!0:e._stdErrSerialize),e._logEvent.ts=i,e._logEvent.messages=r.filter(function(l){return c.indexOf(l)===-1}),e._logEvent.level.label=a,e._logEvent.level.value=s,o(a,e._logEvent,u),e._logEvent=Jm(c)}function Jm(e){return{ts:0,messages:[],bindings:e||[],level:{label:"",value:0}}}function CC(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 fT(e){return typeof e.timestamp=="function"?e.timestamp:e.timestamp===!1?AC:xC}function Au(){return{}}function Ym(e){return e}function Jo(){}function AC(){return!1}function xC(){return Date.now()}function hT(){return Math.round(Date.now()/1e3)}function yT(){return new Date(Date.now()).toISOString()}function ST(){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)||{}}}xu.exports.default=Mr;xu.exports.pino=Mr});var OD={};Lg(OD,{HighlightUtils:()=>Vd,ResultTemplatesHelpers:()=>gS,SortOrder:()=>Zs,buildAttachToCase:()=>HR,buildBreadcrumbManager:()=>bx,buildCategoryFacet:()=>pR,buildController:()=>W,buildCriterionExpression:()=>or,buildDateFacet:()=>qR,buildDateFilter:()=>_R,buildDateRange:()=>di,buildDateSortCriterion:()=>Kh,buildDidYouMean:()=>ix,buildFacet:()=>vR,buildFacetConditionsManager:()=>NF,buildFacetManager:()=>Wx,buildFoldedResultList:()=>iF,buildGeneratedAnswer:()=>WF,buildInsightEngine:()=>EC,buildInsightInterface:()=>MF,buildInteractiveCitation:()=>KF,buildInteractiveResult:()=>sF,buildNotifyTrigger:()=>DF,buildNumericFacet:()=>MR,buildNumericFilter:()=>LR,buildNumericRange:()=>Sd,buildPager:()=>jR,buildQueryError:()=>tb,buildQuerySummary:()=>YR,buildQuickview:()=>ZR,buildRelevanceSortCriterion:()=>tc,buildResultList:()=>eF,buildResultTemplatesManager:()=>ZF,buildResultsPerPage:()=>uF,buildSearchBox:()=>fF,buildSearchParameterManager:()=>zx,buildSearchStatus:()=>hF,buildSmartSnippet:()=>_F,buildSmartSnippetQuestionsList:()=>$F,buildSort:()=>xF,buildTab:()=>vF,buildUserActions:()=>JF,deserializeRelativeDate:()=>Iy,getAnalyticsNextApiBaseUrl:()=>Rs,getOrganizationEndpoint:()=>ge,getSampleInsightEngineConfiguration:()=>eg,loadAttachedResultsActions:()=>Ek,loadCaseContextActions:()=>xk,loadContextActions:()=>Fk,loadDateFacetSetActions:()=>fk,loadFieldActions:()=>wk,loadFoldingActions:()=>Mk,loadGenericAnalyticsActions:()=>Tk,loadInsightAnalyticsActions:()=>pk,loadInsightInterfaceActions:()=>IT,loadInsightSearchActions:()=>PT,loadInsightSearchAnalyticsActions:()=>bk,loadInsightUserActionsActions:()=>Hk,loadNumericFacetSetActions:()=>Sk,loadQuerySetActions:()=>LT,loadQuerySuggestActions:()=>Yk,loadQuestionAnsweringActions:()=>qk,loadRecentResultsActions:()=>Ak});module.exports=cb(OD);var Vd={};Lg(Vd,{escape:()=>po,getHighlightedSuggestion:()=>Dd,highlightString:()=>db});var Gg=require("@coveo/bueno");var gs=(e,t=5)=>e+Math.random().toString(36).substring(2,2+t);function fs(e){return Array.isArray(e)}function hs(e){return e.trim()===""}function _g(e,t){return[...e.reduce((r,n)=>{let o=t(n);return r.has(o)||r.set(o,n),r},new Map).values()]}function ub(e){return btoa(encodeURI(e))}function ys(e,t){let{[e]:r,...n}=t;return n}function lo(e){return ub(JSON.stringify(e))}var lb=new Set(["1",1,"yes",!0]);function Bg(){if(typeof navigator>"u"||typeof window>"u")return!1;let e=navigator,t=window;return[e.globalPrivacyControl,e.doNotTrack,e.msDoNotTrack,t.doNotTrack].some(r=>lb.has(r))}function jg(e){let t={};for(let[r,n]of e)t[r]=n;return t}function $g(e,t,r){return clearTimeout(t),setTimeout(e,r)}function Wi(e){if(typeof e!="object"||!e)return e;try{return JSON.parse(JSON.stringify(e))}catch{return e}}function db(e){if(hs(e.openingDelimiter)||hs(e.closingDelimiter))throw Error("delimiters should be a non-empty string");if((0,Gg.isNullOrUndefined)(e.content)||hs(e.content))return e.content;if(e.highlights.length===0)return po(e.content);let t=e.content.length,r="",n=0;for(let o=0;o<e.highlights.length;o++){let i=e.highlights[o],a=i.offset,s=a+i.length;if(s>t)break;r+=po(e.content.slice(n,a)),r+=e.openingDelimiter,r+=po(e.content.slice(a,s)),r+=e.closingDelimiter,n=s}return n!==t&&(r+=po(e.content.slice(n))),r}function Dd(e,t){return e=po(e),e.replace(/\[(.*?)\]|\{(.*?)\}|\((.*?)\)/g,(r,n,o,i)=>n?Od(n,t.notMatchDelimiters):o?Od(o,t.exactMatchDelimiters):i?Od(i,t.correctionDelimiters):r)}function Od(e,t){return t?t.open+e+t.close:e}function po(e){let t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},r="(?:"+Object.keys(t).join("|")+")",n=RegExp(r),o=RegExp(r,"g");return n.test(e)?e.replace(o,i=>t[i]):e}async function Hg(e,t){let r=e.getReader(),n;for(;!(n=await r.read()).done;)t(n.value)}function Wg(e){let t,r,n,o=!1;return function(a){t===void 0?(t=a,r=0,n=-1):t=mb(t,a);let s=t.length,u=0;for(;r<s;){o&&(t[r]===10&&(u=++r),o=!1);let c=-1;for(;r<s&&c===-1;++r)switch(t[r]){case 58:n===-1&&(n=r-u);break;case 13:o=!0,c=r;break;case 10:c=r;break}if(c===-1)break;e(t.subarray(u,c),n),u=r,n=-1}u===s?t=void 0:u!==0&&(t=t.subarray(u),r-=u)}}function Yg(e,t,r){let n=zg(),o=new TextDecoder;return function(a,s){if(a.length===0)r?.(n),n=zg();else if(s>0){let u=o.decode(a.subarray(0,s)),c=s+(a[s+1]===32?2:1),l=o.decode(a.subarray(c));switch(u){case"data":n.data=n.data?n.data+`
19
- `+l:l;break;case"event":n.event=l;break;case"id":e(n.id=l);break;case"retry":pb(l,n,t);break}}}}function pb(e,t,r){let n=parseInt(e,10);isNaN(n)||r(t.retry=n)}function mb(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function zg(){return{data:"",event:"",id:"",retry:void 0}}var Nd="text/event-stream",gb=1e3,Kg="last-event-id";function Jg(){return typeof window<"u"}function Ss(e,{signal:t,headers:r,onopen:n,onmessage:o,onclose:i,onerror:a,openWhenHidden:s,fetch:u,...c}){return new Promise((l,p)=>{let m={...r};m.accept||(m.accept=Nd);let d;function g(){d?.abort(),document.hidden||x()}!s&&Jg()&&document.addEventListener("visibilitychange",g);let C=gb,f;function h(){Jg()&&document.removeEventListener("visibilitychange",g),clearTimeout(f),d?.abort()}t?.addEventListener("abort",()=>{h(),l()});let R=u??fetch,y=n??fb;async function x(){d=AbortController?new AbortController:null;try{let E=await R(e,{...c,headers:m,signal:d?.signal});await y(E),await Hg(E.body,Wg(Yg(I=>{I?m[Kg]=I:delete m[Kg]},I=>{C=I},o))),i?.(),h(),l()}catch(E){if(!d?.signal?.aborted)try{let I=a?.(E)??C;clearTimeout(f),f=setTimeout(x,I)}catch(I){h(),p(I)}}}x()})}function fb(e){let t=e.headers.get("content-type");if(!t?.startsWith(Nd))throw new Error(`Expected content-type to be ${Nd}, Actual: ${t}`)}var $r=class{constructor(t){Ee(this,"_basePath");Ee(this,"_params",{});this._basePath=t}addParam(t,r){this._params={...this.params,[t]:r}}get basePath(){return this._basePath}get params(){return this._params}get hasParams(){return Object.entries(this._params).length}get href(){return this.hasParams?`${this.basePath}?${Object.entries(this.params).map(([t,r])=>`${t}=${encodeURIComponent(r)}`).join("&")}`:this.basePath}};var hb=(e,t,r)=>new $r(`${e}/rest/organizations/${t}/machinelearning/streaming/${r}`).href,Xg=3,yb=5e3,Sb="text/event-stream",Ld=1,Md=class extends Error{},Yi=class extends Error{constructor(r){super(r.message);this.payload=r}},Qd=class{constructor(){Ee(this,"timeouts",new Set)}add(t){this.timeouts.add(t)}remove(t){clearTimeout(t),this.timeouts.delete(t)}isActive(t){return this.timeouts.has(t)}},Cs=class{constructor(t){Ee(this,"logger");this.logger=t.logger}streamGeneratedAnswer(t,r){let{url:n,organizationId:o,streamId:i,accessToken:a}=t,{write:s,abort:u,close:c,resetAnswer:l}=r,p=new Qd;if(!i){this.logger.error("No stream ID found");return}let m=0,d,g=()=>{d&&!p.isActive(d)&&(f?.abort(),l(),h())},C=()=>{p.remove(d),d=$g(g,d,yb),p.add(d)},f=new AbortController,h=()=>Ss(hb(n,o,i),{method:"GET",fetch,headers:{Authorization:`Bearer ${a}`,accept:"*/*"},openWhenHidden:!0,signal:f?.signal,async onopen(R){if(R.ok&&R.headers.get("content-type")===Sb)return;throw R.status>=400&&R.status<500&&R.status!==429?new Yi({message:"Error opening stream",code:R.status}):new Md},onmessage:R=>{if(f?.signal.aborted)return;let y=JSON.parse(R.data);if(y.finishReason==="ERROR"){p.remove(d),f?.abort(),u({message:y.errorMessage,code:y.statusCode});return}s(y),m=0,y.finishReason==="COMPLETED"?(p.remove(d),c()):C()},onerror:R=>{if(!f?.signal.aborted){if(p.remove(d),R instanceof Yi)throw f?.abort(),u(R),R;if(++m>Xg){this.logger.info("Maximum retry exceeded.");let y={message:"Failed to complete stream.",code:Ld};throw f?.abort(),u(y),new Yi(y)}this.logger.info(`Retrying...(${m}/${Xg})`),l()}}});return h(),f}};var As=e=>e;var df=Xt(sf(),1);var $b="recommendation-internal-options",iV=Symbol.for($b);var j=new Error("Failed to load reducers."),mo=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var Mn=class extends Error{constructor(r,n){super();Ee(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};function cf(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function uf(e){return typeof e!="object"||!e?!1:Object.values(e).every(Gb)}function Gb(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function lf(e){return e===429}var Nt=class e{static async call(t){let r=zb(t),{logger:n}=t,o=await e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:i,...a}=o,s=async()=>{let u=await fetch(i,a);if(lf(u.status))throw u;return u};try{let u=await(0,df.backOff)(s,{retry:c=>{let l=c&&lf(c.status);return l&&n.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw n.info("Platform renewing token"),new mo;case 404:throw new Mn(i,u.status);default:return n.info({response:u,requestInfo:o},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new Mn(i):u}}static async preprocessRequest(t,r){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:a}=r,{signal:s,...u}=t,c=Wi(u);try{let l=await o(t,n,a);return{...t,...l}}catch(l){i.error(l,"Platform request preprocessing failed. Returning default request options.")}return c}};function ge(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function it(e,t="prod"){return`${ge(e,t)}/rest/search/v2`}function Rs(e,t="prod"){return`${ge(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function zb(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:a}=e,s=e.method==="POST"||e.method==="PUT",u=Hb(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...s&&{body:u},signal:a}}function Hb(e,t){return t==="application/x-www-form-urlencoded"?uf(e)?cf(e):"":JSON.stringify(e)}function Xi(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...i}=e;return i}var Wd=e=>{let{response:t}=e;return t.body?Wb(e):Yb(t)},Wb=e=>Jb(e)?Xb(e):Kb(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},Yb=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Kb(e){return e.body.statusCode!==void 0}function Jb(e){return e.body.exception!==void 0}var Xb=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});function pf(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}var Yd=(e,t,r,n)=>{let o=new $r(`${e.url}${n}`);return o.addParam("organizationId",e.organizationId),e.authentication&&o.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:o.href,origin:"searchApiFetch"}};var mf=(e,t)=>{let r=new $r(`${e.url}${t}`);return r.addParam("access_token",e.accessToken),r.addParam("organizationId",e.organizationId),r.addParam("uniqueId",e.uniqueId),e.authentication&&r.addParam("authentication",e.authentication),e.q!==void 0&&r.addParam("q",e.q),e.enableNavigation!==void 0&&r.addParam("enableNavigation",`${e.enableNavigation}`),e.requestedOutputSize!==void 0&&r.addParam("requestedOutputSize",`${e.requestedOutputSize}`),r.href},Kd=async(e,t)=>{let r=await Nt.call({...Yd(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:Xi(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=pf(r),o=await r.arrayBuffer(),a=new TextDecoder(n).decode(o);return Zb(a)?{success:a}:{error:Wd({response:r,body:a})}};function Zb(e){return typeof e=="string"}var gf=require("@coveo/bueno");function go(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function Ne(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:go(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:go(),extendedResults:{}}}function ev(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function tv(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Qn(e,t){if(t&&e.name==="AbortError")return{error:tv(e)};if(e instanceof Mn)return{error:ev(e)};throw e}var Gr=e=>e.success!==void 0,le=e=>e.error!==void 0;function ff(e){return e.results!==void 0}function hf(e){let t=go();return(0,gf.isNullOrUndefined)(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}var Jd=(e,t)=>`${e.url}/rest/organizations/${e.organizationId}/insight/v1/configs/${e.insightId}${t??""}`,rv=e=>`${e.url}/rest/organizations/${e.organizationId}/machinelearning/user/actions`,Zi=(e,t,r,n)=>{nv(e);let o=Jd(e,n);return{accessToken:e.accessToken,method:t,contentType:r,url:o,origin:"insightApiFetch"}},yf=(e,t,r)=>{ov(e);let n=rv(e);return{accessToken:e.accessToken,method:t,contentType:r,url:n,origin:"insightApiFetch"}},Xd=e=>{let{insightId:t,...r}=Xi(e);return r},Sf=e=>{if(!e.url)throw new Error("The 'url' attribute must contain a valid platform URL.");if(!e.organizationId)throw new Error("The 'organizationId' attribute must contain a valid organization ID.");if(!e.accessToken)throw new Error("The 'accessToken' attribute must contain a valid platform access token.")},nv=e=>{if(Sf(e),!e.insightId)throw new Error("The 'insightId' attribute must contain a valid Insight Panel configuration ID.")},ov=e=>{if(Sf(e),!e.userId)throw new Error("The 'userId' attribute must contain a valid user ID.")};var Cf=e=>({...Zi(e,"GET","application/json","/interface"),requestParams:{}});var Af=e=>({...Zi(e,"POST","application/json","/search"),requestParams:Xd(e)}),xf=e=>({...Zi(e,"POST","application/json","/querysuggest"),requestParams:Xd(e)});var Rf=e=>({...yf(e,"POST","application/json"),requestParams:{objectId:e.userId}});var Fs=class{constructor(t){this.options=t}async getInterface(t){let r=await Nt.call({...Cf(t),...this.options});if(r instanceof Error)return Qn(r);let n=await r.json();return r.ok?{success:n}:{error:n}}async query(t,r){let n=await Nt.call({...Af(t),requestMetadata:{method:"search",origin:r?.origin},...this.options});if(n instanceof Error)return Qn(n);let o=await n.json();return ff(o)&&(o=hf(o)),n.ok?{success:o}:{error:o}}async querySuggest(t){let r=await Nt.call({...xf(t),...this.options});if(r instanceof Error)return Qn(r);let n=await r.json();return n.completions?{success:n}:{error:n}}async userActions(t){let r=await Nt.call({...Rf(t),...this.options});if(r instanceof Error)return Qn(r);let n=await r.json();return r.ok?{success:n}:{error:n}}async html(t){return Kd(t,{...this.options})}};var at=require("@coveo/bueno"),D=new at.StringValue({required:!0,emptyAllowed:!1}),ae=new at.StringValue({required:!1,emptyAllowed:!1}),de=new at.StringValue({required:!0,emptyAllowed:!0}),Ff=new at.StringValue({required:!1,emptyAllowed:!0}),bs=new at.ArrayValue({each:D,required:!0}),bf=new at.StringValue({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Mt=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),bt=(e,t)=>{if("required"in t)return{payload:new at.Schema({value:t}).validate({value:e}).value};let o=new at.RecordValue({options:{required:!0},values:t}).validate(e);if(o)throw new at.SchemaValidationError(o);return{payload:e}},A=(e,t)=>{try{return bt(e,t)}catch(r){return{payload:e,error:Mt(r)}}},Zt=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return vf(e,t,r,o,"Controller initialization error")},Me=(e,t,r,n)=>{let o=`Check the options of ${n}`;return vf(e,t,r,o,"Controller initialization error")},vf=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(i){throw e.logger.error(i,o),i}};var Ct=require("@coveo/bueno");function _e(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 iv=typeof Symbol=="function"&&Symbol.observable||"@@observable",If=iv,Zd=()=>Math.random().toString(36).substring(7).split("").join("."),av={INIT:`@@redux/INIT${Zd()}`,REPLACE:`@@redux/REPLACE${Zd()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Zd()}`},vs=av;function er(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 ep(e,t,r){if(typeof e!="function")throw new Error(_e(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(_e(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(_e(1));return r(ep)(e,t)}let n=e,o=t,i=new Map,a=i,s=0,u=!1;function c(){a===i&&(a=new Map,i.forEach((f,h)=>{a.set(h,f)}))}function l(){if(u)throw new Error(_e(3));return o}function p(f){if(typeof f!="function")throw new Error(_e(4));if(u)throw new Error(_e(5));let h=!0;c();let R=s++;return a.set(R,f),function(){if(h){if(u)throw new Error(_e(6));h=!1,c(),a.delete(R),i=null}}}function m(f){if(!er(f))throw new Error(_e(7));if(typeof f.type>"u")throw new Error(_e(8));if(typeof f.type!="string")throw new Error(_e(17));if(u)throw new Error(_e(9));try{u=!0,o=n(o,f)}finally{u=!1}return(i=a).forEach(R=>{R()}),f}function d(f){if(typeof f!="function")throw new Error(_e(10));n=f,m({type:vs.REPLACE})}function g(){let f=p;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(_e(11));function R(){let x=h;x.next&&x.next(l())}return R(),{unsubscribe:f(R)}},[If](){return this}}}return m({type:vs.INIT}),{dispatch:m,subscribe:p,getState:l,replaceReducer:d,[If]:g}}function sv(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:vs.INIT})>"u")throw new Error(_e(12));if(typeof r(void 0,{type:vs.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(_e(13))})}function fo(e){let t=Object.keys(e),r={};for(let a=0;a<t.length;a++){let s=t[a];typeof e[s]=="function"&&(r[s]=e[s])}let n=Object.keys(r),o,i;try{sv(r)}catch(a){i=a}return function(s={},u){if(i)throw i;let c=!1,l={};for(let p=0;p<n.length;p++){let m=n[p],d=r[m],g=s[m],C=d(g,u);if(typeof C>"u"){let f=u&&u.type;throw new Error(_e(14))}l[m]=C,c=c||C!==g}return c=c||n.length!==Object.keys(s).length,c?l:s}}function ho(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function wf(...e){return t=>(r,n)=>{let o=t(r,n),i=()=>{throw new Error(_e(15))},a={getState:o.getState,dispatch:(u,...c)=>i(u,...c)},s=e.map(u=>u(a));return i=ho(...s)(o.dispatch),{...o,dispatch:i}}}function Is(e){return er(e)&&"type"in e&&typeof e.type=="string"}var lp=Symbol.for("immer-nothing"),ea=Symbol.for("immer-draftable"),st=Symbol.for("immer-state");function Be(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Un=Object.getPrototypeOf;function ht(e){return!!e&&!!e[st]}function ct(e){return e?qf(e)||Array.isArray(e)||!!e[ea]||!!e.constructor?.[ea]||ia(e)||aa(e):!1}var cv=Object.prototype.constructor.toString();function qf(e){if(!e||typeof e!="object")return!1;let t=Un(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)===cv}function dp(e){return ht(e)||Be(15,e),e[st].base_}function ta(e,t){_n(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function _n(e){let t=e[st];return t?t.type_:Array.isArray(e)?1:ia(e)?2:aa(e)?3:0}function ra(e,t){return _n(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function tp(e,t){return _n(e)===2?e.get(t):e[t]}function Of(e,t,r){let n=_n(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function uv(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ia(e){return e instanceof Map}function aa(e){return e instanceof Set}function Ln(e){return e.copy_||e.base_}function op(e,t){if(ia(e))return new Map(e);if(aa(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=qf(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[st];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let a=o[i],s=n[a];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[a]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[a]})}return Object.create(Un(e),n)}else{let n=Un(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function Es(e,t=!1){return Ts(e)||ht(e)||!ct(e)||(_n(e)>1&&(e.set=e.add=e.clear=e.delete=lv),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>Es(n,!0))),e}function lv(){Be(2)}function Ts(e){return Object.isFrozen(e)}var ip={};function Bn(e){let t=ip[e];return t||Be(0,e),t}function dv(e,t){ip[e]||(ip[e]=t)}var na;function Df(){return na}function pv(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Pf(e,t){t&&(Bn("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ap(e){sp(e),e.drafts_.forEach(mv),e.drafts_=null}function sp(e){e===na&&(na=e.parent_)}function Ef(e){return na=pv(na,e)}function mv(e){let t=e[st];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Tf(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[st].modified_&&(ap(t),Be(4)),ct(e)&&(e=ws(t,e),t.parent_||Ps(t,e)),t.patches_&&Bn("Patches").generateReplacementPatches_(r[st].base_,e,t.patches_,t.inversePatches_)):e=ws(t,r,[]),ap(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==lp?e:void 0}function ws(e,t,r){if(Ts(t))return t;let n=t[st];if(!n)return ta(t,(o,i)=>kf(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return Ps(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,i=o,a=!1;n.type_===3&&(i=new Set(o),o.clear(),a=!0),ta(i,(s,u)=>kf(e,n,o,s,u,r,a)),Ps(e,o,!1),r&&e.patches_&&Bn("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function kf(e,t,r,n,o,i,a){if(ht(o)){let s=i&&t&&t.type_!==3&&!ra(t.assigned_,n)?i.concat(n):void 0,u=ws(e,o,s);if(Of(r,n,u),ht(u))e.canAutoFreeze_=!1;else return}else a&&r.add(o);if(ct(o)&&!Ts(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ws(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&Ps(e,o)}}function Ps(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Es(t,r)}function gv(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Df(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,i=pp;r&&(o=[n],i=oa);let{revoke:a,proxy:s}=Proxy.revocable(o,i);return n.draft_=s,n.revoke_=a,s}var pp={get(e,t){if(t===st)return e;let r=Ln(e);if(!ra(r,t))return fv(e,r,t);let n=r[t];return e.finalized_||!ct(n)?n:n===rp(e.base_,t)?(np(e),e.copy_[t]=up(n,e)):n},has(e,t){return t in Ln(e)},ownKeys(e){return Reflect.ownKeys(Ln(e))},set(e,t,r){let n=Vf(Ln(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=rp(Ln(e),t),i=o?.[st];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(uv(r,o)&&(r!==void 0||ra(e.base_,t)))return!0;np(e),cp(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 rp(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,np(e),cp(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Ln(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Be(11)},getPrototypeOf(e){return Un(e.base_)},setPrototypeOf(){Be(12)}},oa={};ta(pp,(e,t)=>{oa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});oa.deleteProperty=function(e,t){return oa.set.call(this,e,t,void 0)};oa.set=function(e,t,r){return pp.set.call(this,e[0],t,r,e[0])};function rp(e,t){let r=e[st];return(r?Ln(r):e)[t]}function fv(e,t,r){let n=Vf(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function Vf(e,t){if(!(t in e))return;let r=Un(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Un(r)}}function cp(e){e.modified_||(e.modified_=!0,e.parent_&&cp(e.parent_))}function np(e){e.copy_||(e.copy_=op(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var hv=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let i=r;r=t;let a=this;return function(u=i,...c){return a.produce(u,l=>r.call(this,l,...c))}}typeof r!="function"&&Be(6),n!==void 0&&typeof n!="function"&&Be(7);let o;if(ct(t)){let i=Ef(this),a=up(t,void 0),s=!0;try{o=r(a),s=!1}finally{s?ap(i):sp(i)}return Pf(i,n),Tf(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===lp&&(o=void 0),this.autoFreeze_&&Es(o,!0),n){let i=[],a=[];Bn("Patches").generateReplacementPatches_(t,o,i,a),n(i,a)}return o}else Be(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...s)=>this.produceWithPatches(a,u=>t(u,...s));let n,o;return[this.produce(t,r,(a,s)=>{n=a,o=s}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){ct(e)||Be(8),ht(e)&&(e=Nf(e));let t=Ef(this),r=up(e,void 0);return r[st].isManual_=!0,sp(t),r}finishDraft(e,t){let r=e&&e[st];(!r||!r.isManual_)&&Be(9);let{scope_:n}=r;return Pf(n,t),Tf(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=Bn("Patches").applyPatches_;return ht(e)?n(e,t):this.produce(e,o=>n(o,t))}};function up(e,t){let r=ia(e)?Bn("MapSet").proxyMap_(e,t):aa(e)?Bn("MapSet").proxySet_(e,t):gv(e,t);return(t?t.scope_:Df()).drafts_.push(r),r}function Nf(e){return ht(e)||Be(10,e),Mf(e)}function Mf(e){if(!ct(e)||Ts(e))return e;let t=e[st],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=op(e,t.scope_.immer_.useStrictShallowCopy_)}else r=op(e,!0);return ta(r,(n,o)=>{Of(r,n,Mf(o))}),t&&(t.finalized_=!1),r}function Qf(){let t="replace",r="add",n="remove";function o(m,d,g,C){switch(m.type_){case 0:case 2:return a(m,d,g,C);case 1:return i(m,d,g,C);case 3:return s(m,d,g,C)}}function i(m,d,g,C){let{base_:f,assigned_:h}=m,R=m.copy_;R.length<f.length&&([f,R]=[R,f],[g,C]=[C,g]);for(let y=0;y<f.length;y++)if(h[y]&&R[y]!==f[y]){let x=d.concat([y]);g.push({op:t,path:x,value:p(R[y])}),C.push({op:t,path:x,value:p(f[y])})}for(let y=f.length;y<R.length;y++){let x=d.concat([y]);g.push({op:r,path:x,value:p(R[y])})}for(let y=R.length-1;f.length<=y;--y){let x=d.concat([y]);C.push({op:n,path:x})}}function a(m,d,g,C){let{base_:f,copy_:h}=m;ta(m.assigned_,(R,y)=>{let x=tp(f,R),E=tp(h,R),I=y?ra(f,R)?t:r:n;if(x===E&&I===t)return;let F=d.concat(R);g.push(I===n?{op:I,path:F}:{op:I,path:F,value:E}),C.push(I===r?{op:n,path:F}:I===n?{op:r,path:F,value:p(x)}:{op:t,path:F,value:p(x)})})}function s(m,d,g,C){let{base_:f,copy_:h}=m,R=0;f.forEach(y=>{if(!h.has(y)){let x=d.concat([R]);g.push({op:n,path:x,value:y}),C.unshift({op:r,path:x,value:y})}R++}),R=0,h.forEach(y=>{if(!f.has(y)){let x=d.concat([R]);g.push({op:r,path:x,value:y}),C.unshift({op:n,path:x,value:y})}R++})}function u(m,d,g,C){g.push({op:t,path:[],value:d===lp?void 0:d}),C.push({op:t,path:[],value:m})}function c(m,d){return d.forEach(g=>{let{path:C,op:f}=g,h=m;for(let E=0;E<C.length-1;E++){let I=_n(h),F=C[E];typeof F!="string"&&typeof F!="number"&&(F=""+F),(I===0||I===1)&&(F==="__proto__"||F==="constructor")&&Be(19),typeof h=="function"&&F==="prototype"&&Be(19),h=tp(h,F),typeof h!="object"&&Be(18,C.join("/"))}let R=_n(h),y=l(g.value),x=C[C.length-1];switch(f){case t:switch(R){case 2:return h.set(x,y);case 3:Be(16);default:return h[x]=y}case r:switch(R){case 1:return x==="-"?h.push(y):h.splice(x,0,y);case 2:return h.set(x,y);case 3:return h.add(y);default:return h[x]=y}case n:switch(R){case 1:return h.splice(x,1);case 2:return h.delete(x);case 3:return h.delete(g.value);default:return delete h[x]}default:Be(17,f)}}),m}function l(m){if(!ct(m))return m;if(Array.isArray(m))return m.map(l);if(ia(m))return new Map(Array.from(m.entries()).map(([g,C])=>[g,l(C)]));if(aa(m))return new Set(Array.from(m).map(l));let d=Object.create(Un(m));for(let g in m)d[g]=l(m[g]);return ra(m,ea)&&(d[ea]=m[ea]),d}function p(m){return ht(m)?l(m):m}dv("Patches",{applyPatches_:c,generatePatches_:o,generateReplacementPatches_:u})}var yt=new hv,kr=yt.produce,ks=yt.produceWithPatches.bind(yt),hN=yt.setAutoFreeze.bind(yt),yN=yt.setUseStrictShallowCopy.bind(yt),mp=yt.applyPatches.bind(yt),SN=yt.createDraft.bind(yt),CN=yt.finishDraft.bind(yt);function yv(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Sv(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Cv(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Lf=e=>Array.isArray(e)?e:[e];function Av(e){let t=Array.isArray(e[0])?e[0]:e;return Cv(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function xv(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var RN=Symbol();var FN=Object.getPrototypeOf({});var Rv=class{constructor(e){this.value=e}deref(){return this.value}},Fv=typeof WeakRef<"u"?WeakRef:Rv,bv=0,Uf=1;function qs(){return{s:bv,v:void 0,o:null,p:null}}function yo(e,t={}){let r=qs(),{resultEqualityCheck:n}=t,o,i=0;function a(){let s=r,{length:u}=arguments;for(let p=0,m=u;p<m;p++){let d=arguments[p];if(typeof d=="function"||typeof d=="object"&&d!==null){let g=s.o;g===null&&(s.o=g=new WeakMap);let C=g.get(d);C===void 0?(s=qs(),g.set(d,s)):s=C}else{let g=s.p;g===null&&(s.p=g=new Map);let C=g.get(d);C===void 0?(s=qs(),g.set(d,s)):s=C}}let c=s,l;if(s.s===Uf)l=s.v;else if(l=e.apply(null,arguments),i++,n){let p=o?.deref?.()??o;p!=null&&n(p,l)&&(l=p,i!==0&&i--),o=typeof l=="object"&&l!==null||typeof l=="function"?new Fv(l):l}return c.s=Uf,c.v=l,l}return a.clearCache=()=>{r=qs(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function _f(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let i=0,a=0,s,u={},c=o.pop();typeof c=="object"&&(u=c,c=o.pop()),yv(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);let l={...r,...u},{memoize:p,memoizeOptions:m=[],argsMemoize:d=yo,argsMemoizeOptions:g=[],devModeChecks:C={}}=l,f=Lf(m),h=Lf(g),R=Av(o),y=p(function(){return i++,c.apply(null,arguments)},...f),x=!0,E=d(function(){a++;let F=xv(R,arguments);return s=y.apply(null,F),s},...h);return Object.assign(E,{resultFunc:c,memoizedResultFunc:y,dependencies:R,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:p,argsMemoize:d})};return Object.assign(n,{withTypes:()=>n}),n}var Y=_f(yo),vv=Object.assign((e,t=Y)=>{Sv(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),n=r.map(i=>e[i]);return t(n,(...i)=>i.reduce((a,s,u)=>(a[r[u]]=s,a),{}))},{withTypes:()=>vv});function Bf(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var jf=Bf(),$f=Bf;var Iv=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ho:ho.apply(null,arguments)},ON=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},wv=e=>e&&typeof e.match=="function";function S(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(Qt(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Is(n)&&n.type===e,r}var Yf=class sa extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,sa.prototype)}static get[Symbol.species](){return sa}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new sa(...t[0].concat(this)):new sa(...t.concat(this))}};function Gf(e){return ct(e)?kr(e,()=>{}):e}function zf(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Pv(e){return typeof e=="boolean"}var Ev=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},a=new Yf;return r&&(Pv(r)?a.push(jf):a.push($f(r.extraArgument))),a},ca="RTK_autoBatch",Co=()=>e=>({payload:e,meta:{[ca]:!0}}),Hf=e=>t=>{setTimeout(t,e)},Tv=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,i=!1,a=!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=()=>{a=!1,i&&(i=!1,s.forEach(l=>l()))};return Object.assign({},n,{subscribe(l){let p=()=>o&&l(),m=n.subscribe(p);return s.add(l),()=>{m(),s.delete(l)}},dispatch(l){try{return o=!l?.meta?.[ca],i=!o,i&&(a||(a=!0,u(c))),n.dispatch(l)}finally{o=!0}}})},kv=e=>function(r){let{autoBatch:n=!0}=r??{},o=new Yf(e);return n&&o.push(Tv(typeof n=="object"?n:void 0)),o};function Kf(e){let t=Ev(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:i=void 0,enhancers:a=void 0}=e||{},s;if(typeof r=="function")s=r;else if(er(r))s=fo(r);else throw new Error(Qt(1));let u;typeof n=="function"?u=n(t):u=t();let c=ho;o&&(c=Iv({trace:!1,...typeof o=="object"&&o}));let l=wf(...u),p=kv(l),m=typeof a=="function"?a(p):p(),d=c(...m);return ep(s,i,d)}function Jf(e){let t={},r=[],n,o={addCase(i,a){let s=typeof i=="string"?i:i.type;if(!s)throw new Error(Qt(28));if(s in t)throw new Error(Qt(29));return t[s]=a,o},addMatcher(i,a){return r.push({matcher:i,reducer:a}),o},addDefaultCase(i){return n=i,o}};return e(o),[t,r,n]}function qv(e){return typeof e=="function"}function G(e,t){let[r,n,o]=Jf(t),i;if(qv(e))i=()=>Gf(e());else{let s=Gf(e);i=()=>s}function a(s=i(),u){let c=[r[u.type],...n.filter(({matcher:l})=>l(u)).map(({reducer:l})=>l)];return c.filter(l=>!!l).length===0&&(c=[o]),c.reduce((l,p)=>{if(p)if(ht(l)){let d=p(l,u);return d===void 0?l:d}else{if(ct(l))return kr(l,m=>p(m,u));{let m=p(l,u);if(m===void 0){if(l===null)return l;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return l},s)}return a.getInitialState=i,a}var Xf=(e,t)=>wv(e)?e.match(t):e(t);function tr(...e){return t=>e.some(r=>Xf(r,t))}function So(...e){return t=>e.every(r=>Xf(r,t))}function Ds(e,t){if(!e||!e.meta)return!1;let r=typeof e.meta.requestId=="string",n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function ua(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Vs(...e){return e.length===0?t=>Ds(t,["pending"]):ua(e)?tr(...e.map(t=>t.pending)):Vs()(e[0])}function jn(...e){return e.length===0?t=>Ds(t,["rejected"]):ua(e)?tr(...e.map(t=>t.rejected)):jn()(e[0])}function la(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?So(jn(...e),t):ua(e)?So(jn(...e),t):la()(e[0])}function qr(...e){return e.length===0?t=>Ds(t,["fulfilled"]):ua(e)?tr(...e.map(t=>t.fulfilled)):qr()(e[0])}function Ns(...e){return e.length===0?t=>Ds(t,["pending","fulfilled","rejected"]):ua(e)?tr(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ns()(e[0])}var Ov="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ms=(e=21)=>{let t="",r=e;for(;r--;)t+=Ov[Math.random()*64|0];return t},Dv=["name","message","stack","code"],gp=class{constructor(e,t){Ee(this,"_type");this.payload=e,this.meta=t}},Wf=class{constructor(e,t){Ee(this,"_type");this.payload=e,this.meta=t}},Vv=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Dv)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},B=(()=>{function e(t,r,n){let o=S(t+"/fulfilled",(u,c,l,p)=>({payload:u,meta:{...p||{},arg:l,requestId:c,requestStatus:"fulfilled"}})),i=S(t+"/pending",(u,c,l)=>({payload:void 0,meta:{...l||{},arg:c,requestId:u,requestStatus:"pending"}})),a=S(t+"/rejected",(u,c,l,p,m)=>({payload:p,error:(n&&n.serializeError||Vv)(u||"Rejected"),meta:{...m||{},arg:l,requestId:c,rejectedWithValue:!!p,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function s(u){return(c,l,p)=>{let m=n?.idGenerator?n.idGenerator(u):Ms(),d=new AbortController,g,C;function f(R){C=R,d.abort()}let h=async function(){let R;try{let x=n?.condition?.(u,{getState:l,extra:p});if(Mv(x)&&(x=await x),x===!1||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let E=new Promise((I,F)=>{g=()=>{F({name:"AbortError",message:C||"Aborted"})},d.signal.addEventListener("abort",g)});c(i(m,u,n?.getPendingMeta?.({requestId:m,arg:u},{getState:l,extra:p}))),R=await Promise.race([E,Promise.resolve(r(u,{dispatch:c,getState:l,extra:p,requestId:m,signal:d.signal,abort:f,rejectWithValue:(I,F)=>new gp(I,F),fulfillWithValue:(I,F)=>new Wf(I,F)})).then(I=>{if(I instanceof gp)throw I;return I instanceof Wf?o(I.payload,m,u,I.meta):o(I,m,u)})])}catch(x){R=x instanceof gp?a(null,m,u,x.payload,x.meta):a(x,m,u)}finally{g&&d.signal.removeEventListener("abort",g)}return n&&!n.dispatchConditionRejection&&a.match(R)&&R.meta.condition||c(R),R}();return Object.assign(h,{abort:f,requestId:m,arg:u,unwrap(){return h.then(Nv)}})}}return Object.assign(s,{pending:i,rejected:a,fulfilled:o,settled:tr(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Nv(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Mv(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Zf=Symbol.for("rtk-slice-createasyncthunk"),QN={[Zf]:B};function Qv(e,t){return`${e}/${t}`}function Lv({creators:e}={}){let t=e?.asyncThunk?.[Zf];return function(n){let{name:o,reducerPath:i=o}=n;if(!o)throw new Error(Qt(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(_v()):n.reducers)||{},s=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(R,y){let x=typeof R=="string"?R:R.type;if(!x)throw new Error(Qt(12));if(x in u.sliceCaseReducersByType)throw new Error(Qt(13));return u.sliceCaseReducersByType[x]=y,c},addMatcher(R,y){return u.sliceMatchers.push({matcher:R,reducer:y}),c},exposeAction(R,y){return u.actionCreators[R]=y,c},exposeCaseReducer(R,y){return u.sliceCaseReducersByName[R]=y,c}};s.forEach(R=>{let y=a[R],x={reducerName:R,type:Qv(o,R),createNotation:typeof n.reducers=="function"};jv(y)?Gv(x,y,c,t):Bv(x,y,c)});function l(){let[R={},y=[],x=void 0]=typeof n.extraReducers=="function"?Jf(n.extraReducers):[n.extraReducers],E={...R,...u.sliceCaseReducersByType};return G(n.initialState,I=>{for(let F in E)I.addCase(F,E[F]);for(let F of u.sliceMatchers)I.addMatcher(F.matcher,F.reducer);for(let F of y)I.addMatcher(F.matcher,F.reducer);x&&I.addDefaultCase(x)})}let p=R=>R,m=new Map,d;function g(R,y){return d||(d=l()),d(R,y)}function C(){return d||(d=l()),d.getInitialState()}function f(R,y=!1){function x(I){let F=I[R];return typeof F>"u"&&y&&(F=C()),F}function E(I=p){let F=zf(m,y,()=>new WeakMap);return zf(F,I,()=>{let v={};for(let[w,T]of Object.entries(n.selectors??{}))v[w]=Uv(T,I,C,y);return v})}return{reducerPath:R,getSelectors:E,get selectors(){return E(x)},selectSlice:x}}let h={name:o,reducer:g,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:C,...f(i),injectInto(R,{reducerPath:y,...x}={}){let E=y??i;return R.inject({reducerPath:E,reducer:g},x),{...h,...f(E,!0)}}};return h}}function Uv(e,t,r,n){function o(i,...a){let s=t(i);return typeof s>"u"&&n&&(s=r()),e(s,...a)}return o.unwrapped=e,o}var $n=Lv();function _v(){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 Bv({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!$v(n))throw new Error(Qt(17));i=n.reducer,a=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?S(e,a):S(e))}function jv(e){return e._reducerDefinitionType==="asyncThunk"}function $v(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Gv({type:e,reducerName:t},r,n,o){if(!o)throw new Error(Qt(18));let{payloadCreator:i,fulfilled:a,pending:s,rejected:u,settled:c,options:l}=r,p=o(e,i,l);n.exposeAction(t,p),a&&n.addCase(p.fulfilled,a),s&&n.addCase(p.pending,s),u&&n.addCase(p.rejected,u),c&&n.addMatcher(p.settled,c),n.exposeCaseReducer(t,{fulfilled:a||Os,pending:s||Os,rejected:u||Os,settled:c||Os})}function Os(){}var eh="listener",th="completed",rh="cancelled",LN=`task-${rh}`,UN=`task-${th}`,_N=`${eh}-${rh}`,BN=`${eh}-${th}`;var{assign:nh}=Object;var fp="listenerMiddleware";var zv=nh(S(`${fp}/add`),{withTypes:()=>zv}),jN=S(`${fp}/removeAll`),Hv=nh(S(`${fp}/remove`),{withTypes:()=>Hv});var $N=Symbol.for("rtk-state-proxy-original");function Qt(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. `}function Wv({config:e,environment:t,event:r,listenerManager:n}){let{url:o,token:i,mode:a}=e;a!=="disabled"&&(n.call(r),t.send(o,i,r))}var Yv=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function Kv(e){return typeof e=="string"&&Yv.test(e)}var je=[];for(let e=0;e<256;++e)je.push((e+256).toString(16).slice(1));function Jv(e,t=0){return(je[e[t+0]]+je[e[t+1]]+je[e[t+2]]+je[e[t+3]]+"-"+je[e[t+4]]+je[e[t+5]]+"-"+je[e[t+6]]+je[e[t+7]]+"-"+je[e[t+8]]+je[e[t+9]]+"-"+je[e[t+10]]+je[e[t+11]]+je[e[t+12]]+je[e[t+13]]+je[e[t+14]]+je[e[t+15]]).toLowerCase()}var hp,Xv=new Uint8Array(16);function Zv(){if(!hp){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");hp=crypto.getRandomValues.bind(crypto)}return hp(Xv)}var eI=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),oh={randomUUID:eI};function tI(e,t,r){if(oh.randomUUID&&!e)return oh.randomUUID();e=e||{};let n=e.random??e.rng?.()??Zv();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Jv(n)}function rI(e){return{getClientId:()=>{let t="visitorId",r=e.get(),n=r.storage,o=n.getItem(t),i=o&&Kv(o)?o:r.generateUUID();return n.setItem(t,i),i}}}var ah="1.0.0";function nI(e){let{trackingId:t}=e;return{trackingId:t}}function oI(e){return(e.source||[]).concat([`relay@${ah}`])}function sh(e,t,r,n){let{getReferrer:o,getLocation:i,getUserAgent:a}=r,s=nI(t),u=n.getClientId();return Object.freeze({type:e,config:s,ts:Date.now(),source:oI(t),clientId:u,userAgent:a(),referrer:o(),location:i()})}function iI(e,t,r,n,o){return{...t,meta:sh(e,r,n,o)}}var aI="*";function sI(){let e=[];function t({type:u,callback:c}){return e.findIndex(l=>l.type===u&&l.callback===c)}function r(u,c){return u.type==="*"||c===u.type}function n(u){return t(u)<0&&e.push(u),()=>s(u.type,u.callback)}function o(u){e.forEach(c=>{if(r(c,u.meta.type))try{c.callback(u)}catch(l){console.error(l)}})}function i(u){if(u===aI)e.length=0;else for(let c=e.length-1;c>=0;c--)e[c].type===u&&e.splice(c,1)}function a(u){let c=t(u);c>=0&&e.splice(c,1)}function s(u,c){c?a({type:u,callback:c}):i(u)}return{add:n,call:o,remove:s}}function ih({url:e,token:t,trackingId:r,...n}){return Object.freeze({url:e,token:t,trackingId:r,...!!n.mode&&{mode:n.mode},...!!n.source&&{source:n.source}})}function cI(e){let t=ih(e);return{get:()=>t,update:r=>{t=ih({...t,...r})}}}function uI(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}var yp=lI();function lI(){let e="coveo_",t=r=>{let n=r.split(".").slice(-2);return n.length==2?n.join("."):""};return{getItem(r){let n=`${e}${r}=`,o=document.cookie.split(";");for(let i of o){let a=i.replace(/^\s+/,"");if(a.lastIndexOf(n,0)===0)return a.substring(n.length,a.length)}return null},setItem(r,n,o){let i=t(window.location.hostname),a=`;expires=${new Date(new Date().getTime()+o).toUTCString()}`,s=i?`;domain=${i}`:"";document.cookie=`${e}${r}=${n}${a}${s};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function dI(){return{getItem(e){return yp.getItem(e)||localStorage.getItem(e)},removeItem(e){yp.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),yp.setItem(e,t,31556952e3)}}}function pI(){let e=document.referrer;return e===""?null:e}function mI(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(uI().sendMessage({kind:"EVENT_PROTOCOL",event:r,url:e,token:t}),!n)throw new Error("Failed to send the event(s) because the payload size exceeded the maximum allowed size (32 KB). Please contact support if the problem persists.")},getReferrer:()=>pI(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>tI(),storage:dI()}}function gI(){try{let e="__storage_test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return e instanceof DOMException&&e.name==="QuotaExceededError"&&localStorage&&localStorage.length!==0}}function fI(){return{getItem(){return null},removeItem(){},setItem(){}}}function hI(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:fI()}}function yI(e){return e.get().mode!=="disabled"&&SI()&&gI()?mI():hI()}function SI(){try{return typeof window=="object"}catch{return!1}}function CI(e){return{get:()=>Object.freeze(yI(e))}}function ch(e){let t=cI(e),r=sI(),n=CI(t),o=rI(n);return{emit:(i,a)=>{let s=t.get(),u=n.get(),c=iI(i,a,s,u,o);return Wv({config:s,environment:u,event:c,listenerManager:r})},getMeta:i=>sh(i,t.get(),n.get(),o),on:(i,a)=>r.add({type:i,callback:a}),off:(i,a)=>r.remove(i,a),updateConfig:i=>t.update(i),version:ah}}var Ao="3.19.0",uh=["@coveo/atomic","@coveo/quantic"];var zr=Y(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${Ao}`));var xo=Y(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>zr(e.configuration.analytics),(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:i},a)=>ch({mode:i?"emit":"disabled",url:o??Rs(e,t),token:r,trackingId:n,source:a}));function rr(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function P(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(l){try{c(n.next(l))}catch(p){a(p)}}function u(l){try{c(n.throw(l))}catch(p){a(p)}}function c(l){l.done?i(l.value):o(l.value).then(s,u)}c((n=n.apply(e,t||[])).next())})}var oe;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(oe||(oe={}));function Ap(){return typeof window<"u"}function Dp(){return typeof navigator<"u"}function Ro(){return typeof document<"u"}function xp(){try{return typeof localStorage<"u"}catch{return!1}}function AI(){try{return typeof sessionStorage<"u"}catch{return!1}}function Rh(){return Dp()&&navigator.cookieEnabled}var xI=[oe.click,oe.custom,oe.search,oe.view],RI=(e,t)=>xI.indexOf(e)!==-1?Object.assign({language:Ro()?document.documentElement.lang:"unknown",userAgent:Dp()?navigator.userAgent:"unknown"},t):t,ma=class e{static set(t,r,n){var o,i,a,s;n&&(i=new Date,i.setTime(i.getTime()+n)),s=window.location.hostname,s.indexOf(".")===-1?lh(t,r,i):(a=s.split("."),o=a[a.length-2]+"."+a[a.length-1],lh(t,r,i,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function lh(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function FI(){return xp()?localStorage:Rh()?new ga:AI()?sessionStorage:new bo}var ga=class e{getItem(t){return ma.get(`${e.prefix}${t}`)}removeItem(t){ma.erase(`${e.prefix}${t}`)}setItem(t,r,n){ma.set(`${e.prefix}${t}`,r,n)}};ga.prefix="coveo_";var Rp=class{constructor(){this.cookieStorage=new ga}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)}},bo=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},da="__coveo.analytics.history",Fh=20,bh=1e3*60,vh=75,vo=class{constructor(t){this.store=t||FI()}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 P(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 P(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(da);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return P(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(da);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(da,JSON.stringify(t.slice(0,Fh)))}catch{}}clear(){try{this.store.removeItem(da)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,vh)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>bh:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}},Ih=Object.freeze({__proto__:null,HistoryStore:vo,MAX_NUMBER_OF_HISTORY_ELEMENTS:Fh,MAX_VALUE_SIZE:vh,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:bh,STORE_KEY:da,default:vo}),bI=(e,t)=>P(void 0,void 0,void 0,function*(){return e===oe.view?(yield vI(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),vI=e=>P(void 0,void 0,void 0,function*(){let t=new vo,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Qs,II=new Uint8Array(16);function wI(){if(!Qs&&(Qs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Qs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qs(II)}var PI=/^(?:[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 Us(e){return typeof e=="string"&&PI.test(e)}var $e=[];for(let e=0;e<256;++e)$e.push((e+256).toString(16).slice(1));function wh(e,t=0){return($e[e[t+0]]+$e[e[t+1]]+$e[e[t+2]]+$e[e[t+3]]+"-"+$e[e[t+4]]+$e[e[t+5]]+"-"+$e[e[t+6]]+$e[e[t+7]]+"-"+$e[e[t+8]]+$e[e[t+9]]+"-"+$e[e[t+10]]+$e[e[t+11]]+$e[e[t+12]]+$e[e[t+13]]+$e[e[t+14]]+$e[e[t+15]]).toLowerCase()}function EI(e){if(!Us(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 TI(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var kI="6ba7b810-9dad-11d1-80b4-00c04fd430c8",qI="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function OI(e,t,r){function n(o,i,a,s){var u;if(typeof o=="string"&&(o=TI(o)),typeof i=="string"&&(i=EI(i)),((u=i)===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+o.length);if(c.set(i),c.set(o,i.length),c=r(c),c[6]=c[6]&15|t,c[8]=c[8]&63|128,a){s=s||0;for(let l=0;l<16;++l)a[s+l]=c[l];return a}return wh(c)}try{n.name=e}catch{}return n.DNS=kI,n.URL=qI,n}var DI=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),dh={randomUUID:DI};function Gn(e,t,r){if(dh.randomUUID&&!t&&!e)return dh.randomUUID();e=e||{};let n=e.random||(e.rng||wI)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return wh(n)}function VI(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}function Sp(e,t){return e<<t|e>>>32-t}function NI(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let a=unescape(encodeURIComponent(e));e=[];for(let s=0;s<a.length;++s)e.push(a.charCodeAt(s))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),i=new Array(o);for(let a=0;a<o;++a){let s=new Uint32Array(16);for(let u=0;u<16;++u)s[u]=e[a*64+u*4]<<24|e[a*64+u*4+1]<<16|e[a*64+u*4+2]<<8|e[a*64+u*4+3];i[a]=s}i[o-1][14]=(e.length-1)*8/Math.pow(2,32),i[o-1][14]=Math.floor(i[o-1][14]),i[o-1][15]=(e.length-1)*8&4294967295;for(let a=0;a<o;++a){let s=new Uint32Array(80);for(let d=0;d<16;++d)s[d]=i[a][d];for(let d=16;d<80;++d)s[d]=Sp(s[d-3]^s[d-8]^s[d-14]^s[d-16],1);let u=r[0],c=r[1],l=r[2],p=r[3],m=r[4];for(let d=0;d<80;++d){let g=Math.floor(d/20),C=Sp(u,5)+VI(g,c,l,p)+m+t[g]+s[d]>>>0;m=p,p=l,l=Sp(c,30)>>>0,c=u,u=C}r[0]=r[0]+u>>>0,r[1]=r[1]+c>>>0,r[2]=r[2]+l>>>0,r[3]=r[3]+p>>>0,r[4]=r[4]+m>>>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 MI=OI("v5",80,NI),ph=MI,Ph="2.30.44",mh=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,pa={pageview:"pageview",event:"event"},_s=class{constructor({client:t,uuidGenerator:r=Gn}){this.client=t,this.uuidGenerator=r}},Fp=class extends _s{constructor({client:t,uuidGenerator:r=Gn}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=mh(window.location),this.lastReferrer=Ro()?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:Ro()?document.title:"",encoding:Ro()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},i={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},i),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:i}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=i,t===pa.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===pa.pageview?this.nextPageViewId:this.pageViewId,referrer:t===pa.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===pa.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=o=>o.replace(/^\/?(.*)$/,"/$1");return`${(o=>o.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return mh(window.location)}},Hr=class e{constructor(t,r){if(!Us(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 n=new URL(t);return r.some(o=>new RegExp(o.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[n,o]=r;if(n.length!==32||isNaN(parseInt(o)))return null;let i=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return Us(i)?new e(i,Number.parseInt(o)*1e3):null}};Hr.cvo_cid="cvo_cid";Hr.expirationTime=120;var bp=class extends _s{constructor({client:t,uuidGenerator:r=Gn}){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 P(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),n=yield this.client.getCurrentVisitorId();return r.searchParams.set(Hr.cvo_cid,new Hr(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};bp.Id="link";var It=Object.keys;function Ls(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Cp=128,Eh=192,gh=224,fh=240;function QI(e){return(e&248)===fh?4:(e&fh)===gh?3:(e&gh)===Eh?2:1}function LI(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 n=Number.parseInt(e.substring(r-2,r),16);if((n&Cp)!=Cp)break;if(r-=3,(n&Eh)!=Cp){t-r>=QI(n)*3&&(r=t);break}}return e.substring(0,r)}var vp={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"},UI=It(vp).map(e=>vp[e]),_I=[...UI].join("|"),BI=new RegExp(`^(${_I}$)`),jI={svcAction:"svc_action",svcActionData:"svc_action_data"},$I=e=>It(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=vp[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),GI=e=>BI.test(e),zI=[GI],hh={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},yh={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},He={action:"pa",list:"pal",listSource:"pls"},Bs={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},HI=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Ip={id:"quoteId",affiliation:"quoteAffiliation"},wp={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},WI={add:He,bookmark_add:He,bookmark_remove:He,click:He,checkout:He,checkout_option:He,detail:He,impression:He,remove:He,refund:Object.assign(Object.assign({},He),Bs),purchase:Object.assign(Object.assign({},He),Bs),quickview:He,quote:Object.assign(Object.assign({},He),Ip),review:Object.assign(Object.assign({},He),wp)},YI=It(hh).map(e=>hh[e]),KI=It(yh).map(e=>yh[e]),JI=It(He).map(e=>He[e]),XI=It(Bs).map(e=>Bs[e]),ZI=It(wp).map(e=>wp[e]),ew=It(Ip).map(e=>Ip[e]),tw=[...YI,"custom"].join("|"),rw=[...KI,"custom"].join("|"),Th="(pr[0-9]+)",kh="(il[0-9]+pi[0-9]+)",nw=new RegExp(`^${Th}(${tw})$`),ow=new RegExp(`^(${kh}(${rw}))|(il[0-9]+nm)$`),iw=new RegExp(`^(${JI.join("|")})$`),aw=new RegExp(`^(${XI.join("|")})$`),sw=new RegExp(`^${Th}custom$`),cw=new RegExp(`^${kh}custom$`),uw=new RegExp(`^(${[...HI,...ZI,...ew].join("|")})$`),lw=e=>nw.test(e),dw=e=>ow.test(e),pw=e=>iw.test(e),mw=e=>aw.test(e),gw=e=>uw.test(e),fw=[dw,lw,pw,mw,gw],hw=[sw,cw],yw={anonymizeIp:"aip"},Sw={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Cw={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},Aw=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],xw=Object.assign(Object.assign(Object.assign(Object.assign({},yw),Sw),Cw),Aw.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Pp=Object.assign(Object.assign({},xw),jI),Rw=e=>{let t=!!e.action&&WI[e.action]||{};return It(e).reduce((r,n)=>{let o=t[n]||Pp[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},Fw=It(Pp).map(e=>Pp[e]),bw=e=>Fw.indexOf(e)!==-1,vw=e=>e==="custom",Iw=e=>[...fw,...zI,bw,vw].some(t=>t(e)),ww=e=>It(e).reduce((t,r)=>{let n=Pw(r);return n?Object.assign(Object.assign({},t),Ew(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Pw=e=>{let t;return[...hw].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},Ew=(e,t)=>It(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),Ep=class{constructor(t){this.opts=t}sendEvent(t,r){return P(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:n,preprocessRequest:o}=this.opts,i=yield this.getQueryParamsForEventType(t),{url:a,payload:s}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${i}`,r,o),u=this.encodeForEventType(t,s),c=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(a,c)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return P(this,void 0,void 0,function*(){let o=t,i=r;if(n){let a=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:s,body:u}=a;o=s||t;try{i=JSON.parse(u)}catch(c){console.error("Unable to process the request body as a JSON string",c)}}return{payload:i,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return P(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,o=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",o?`visitorId=${o}`:"","discardVisitInfo=true"].filter(i=>!!i).join("&")})}isEventTypeLegacy(t){return[oe.click,oe.custom,oe.search,oe.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let o=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(o=`access_token=${encodeURIComponent(n)}&${o}`),o}},Tp=class{sendEvent(t,r){return P(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return P(this,void 0,void 0,function*(){return Promise.resolve()})}},Sh=globalThis.fetch,js=class{constructor(t){this.opts=t}sendEvent(t,r){return P(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:i}=this.opts,a=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",s={url:`${n}/analytics/${t}${a}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},s),i?yield i(s,"analyticsFetch"):{}),{url:c}=u,l=rr(u,["url"]),p;try{p=yield Sh(c,l)}catch(m){console.error("An error has occured when sending the event.",m);return}if(p.ok){let m=yield p.json();return m.visitorId&&o.setCurrentVisitorId(m.visitorId),m}else{try{p.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,p,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return P(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Sh(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[oe.click,oe.custom,oe.search,oe.view].indexOf(t)!==-1}getVisitorIdParam(){return P(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"})}},kp=class{constructor(t,r){xp()&&Rh()?this.storage=new Rp:xp()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new bo),this.client=new js(t),this.beaconClient=new Ep(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:i}of n)this.beaconClient.sendEvent(o,i)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},qp=class{constructor(t,r){this.storage=r||new bo,this.client=new js(t)}getClientDependingOnEventType(t){return this.client}},$s=class{constructor(){this.storage=new bo,this.client=new Tp}getClientDependingOnEventType(t){return this.client}},Tw="xx",kw=e=>e?.startsWith(Tw)||!1,qw=`
19
+ `+l:l;break;case"event":n.event=l;break;case"id":e(n.id=l);break;case"retry":pb(l,n,t);break}}}}function pb(e,t,r){let n=parseInt(e,10);isNaN(n)||r(t.retry=n)}function mb(e,t){let r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}function zg(){return{data:"",event:"",id:"",retry:void 0}}var Nd="text/event-stream",gb=1e3,Kg="last-event-id";function Jg(){return typeof window<"u"}function Ss(e,{signal:t,headers:r,onopen:n,onmessage:o,onclose:i,onerror:a,openWhenHidden:s,fetch:u,...c}){return new Promise((l,p)=>{let m={...r};m.accept||(m.accept=Nd);let d;function g(){d?.abort(),document.hidden||x()}!s&&Jg()&&document.addEventListener("visibilitychange",g);let C=gb,f;function h(){Jg()&&document.removeEventListener("visibilitychange",g),clearTimeout(f),d?.abort()}t?.addEventListener("abort",()=>{h(),l()});let R=u??fetch,y=n??fb;async function x(){d=AbortController?new AbortController:null;try{let E=await R(e,{...c,headers:m,signal:d?.signal});await y(E),await Hg(E.body,Wg(Yg(I=>{I?m[Kg]=I:delete m[Kg]},I=>{C=I},o))),i?.(),h(),l()}catch(E){if(!d?.signal?.aborted)try{let I=a?.(E)??C;clearTimeout(f),f=setTimeout(x,I)}catch(I){h(),p(I)}}}x()})}function fb(e){let t=e.headers.get("content-type");if(!t?.startsWith(Nd))throw new Error(`Expected content-type to be ${Nd}, Actual: ${t}`)}var $r=class{constructor(t){Ee(this,"_basePath");Ee(this,"_params",{});this._basePath=t}addParam(t,r){this._params={...this.params,[t]:r}}get basePath(){return this._basePath}get params(){return this._params}get hasParams(){return Object.entries(this._params).length}get href(){return this.hasParams?`${this.basePath}?${Object.entries(this.params).map(([t,r])=>`${t}=${encodeURIComponent(r)}`).join("&")}`:this.basePath}};var hb=(e,t,r)=>new $r(`${e}/rest/organizations/${t}/machinelearning/streaming/${r}`).href,Xg=3,yb=5e3,Sb="text/event-stream",Ld=1,Md=class extends Error{},Yi=class extends Error{constructor(r){super(r.message);this.payload=r}},Qd=class{constructor(){Ee(this,"timeouts",new Set)}add(t){this.timeouts.add(t)}remove(t){clearTimeout(t),this.timeouts.delete(t)}isActive(t){return this.timeouts.has(t)}},Cs=class{constructor(t){Ee(this,"logger");this.logger=t.logger}streamGeneratedAnswer(t,r){let{url:n,organizationId:o,streamId:i,accessToken:a}=t,{write:s,abort:u,close:c,resetAnswer:l}=r,p=new Qd;if(!i){this.logger.error("No stream ID found");return}let m=0,d,g=()=>{d&&!p.isActive(d)&&(f?.abort(),l(),h())},C=()=>{p.remove(d),d=$g(g,d,yb),p.add(d)},f=new AbortController,h=()=>Ss(hb(n,o,i),{method:"GET",fetch,headers:{Authorization:`Bearer ${a}`,accept:"*/*"},openWhenHidden:!0,signal:f?.signal,async onopen(R){if(R.ok&&R.headers.get("content-type")===Sb)return;throw R.status>=400&&R.status<500&&R.status!==429?new Yi({message:"Error opening stream",code:R.status}):new Md},onmessage:R=>{if(f?.signal.aborted)return;let y=JSON.parse(R.data);if(y.finishReason==="ERROR"){p.remove(d),f?.abort(),u({message:y.errorMessage,code:y.statusCode});return}s(y),m=0,y.finishReason==="COMPLETED"?(p.remove(d),c()):C()},onerror:R=>{if(!f?.signal.aborted){if(p.remove(d),R instanceof Yi)throw f?.abort(),u(R),R;if(++m>Xg){this.logger.info("Maximum retry exceeded.");let y={message:"Failed to complete stream.",code:Ld};throw f?.abort(),u(y),new Yi(y)}this.logger.info(`Retrying...(${m}/${Xg})`),l()}}});return h(),f}};var As=e=>e;var df=Xt(sf(),1);var $b="recommendation-internal-options",iV=Symbol.for($b);var j=new Error("Failed to load reducers."),mo=class extends Error{constructor(){super(),this.name="ExpiredToken",this.message="The token being used to perform the request is expired."}};var Mn=class extends Error{constructor(r,n){super();Ee(this,"statusCode");this.name="Disconnected",this.message=`Client could not connect to the following URL: ${r}`,this.statusCode=n??0}};function cf(e){let t=[];for(let r in e){let n=encodeURIComponent(r),o=encodeURIComponent(e[r]);t.push(`${n}=${o}`)}return t.join("&")}function uf(e){return typeof e!="object"||!e?!1:Object.values(e).every(Gb)}function Gb(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"}function lf(e){return e===429}var Nt=class e{static async call(t){let r=zb(t),{logger:n}=t,o=await e.preprocessRequest(r,t);n.info(o,"Platform request");let{url:i,...a}=o,s=async()=>{let u=await fetch(i,a);if(lf(u.status))throw u;return u};try{let u=await(0,df.backOff)(s,{retry:c=>{let l=c&&lf(c.status);return l&&n.info("Platform retrying request"),l}});switch(u.status){case 419:case 401:throw n.info("Platform renewing token"),new mo;case 404:throw new Mn(i,u.status);default:return n.info({response:u,requestInfo:o},"Platform response"),u}}catch(u){return u.message==="Failed to fetch"?new Mn(i):u}}static async preprocessRequest(t,r){let{origin:n,preprocessRequest:o,logger:i,requestMetadata:a}=r,{signal:s,...u}=t,c=Wi(u);try{let l=await o(t,n,a);return{...t,...l}}catch(l){i.error(l,"Platform request preprocessing failed. Returning default request options.")}return c}};function ge(e,t="prod",r="platform"){let n=t==="prod"?"":t,o=r==="platform"?"":`.${r}`;return`https://${e}${o}.org${n}.coveo.com`}function it(e,t="prod"){return`${ge(e,t)}/rest/search/v2`}function Rs(e,t="prod"){return`${ge(e,t,"analytics")}/rest/organizations/${e}/events/v1`}function zb(e){let{url:t,method:r,requestParams:n,contentType:o,accessToken:i,signal:a}=e,s=e.method==="POST"||e.method==="PUT",u=Hb(n,o);return{url:t,method:r,headers:{"Content-Type":o,Authorization:`Bearer ${i}`,...e.headers},...s&&{body:u},signal:a}}function Hb(e,t){return t==="application/x-www-form-urlencoded"?uf(e)?cf(e):"":JSON.stringify(e)}function Xi(e){let{url:t,accessToken:r,organizationId:n,authentication:o,...i}=e;return i}var Wd=e=>{let{response:t}=e;return t.body?Wb(e):Yb(t)},Wb=e=>Jb(e)?Xb(e):Kb(e)?e.body:{message:"unknown",statusCode:0,type:"unknown"},Yb=e=>{let t=JSON.parse(JSON.stringify(e,Object.getOwnPropertyNames(e)));return{...t,message:`Client side error: ${t.message||""}`,statusCode:400,type:"ClientError"}};function Kb(e){return e.body.statusCode!==void 0}function Jb(e){return e.body.exception!==void 0}var Xb=e=>({message:e.body.exception.code,statusCode:e.response.status,type:e.body.exception.code});function pf(e){return((e.headers.get("content-type")||"").split(";").find(n=>n.indexOf("charset=")!==-1)||"").split("=")[1]||"UTF-8"}var Yd=(e,t,r,n)=>{let o=new $r(`${e.url}${n}`);return o.addParam("organizationId",e.organizationId),e.authentication&&o.addParam("authentication",e.authentication),{accessToken:e.accessToken,method:t,contentType:r,url:o.href,origin:"searchApiFetch"}};var mf=(e,t)=>{let r=new $r(`${e.url}${t}`);return r.addParam("access_token",e.accessToken),r.addParam("organizationId",e.organizationId),r.addParam("uniqueId",e.uniqueId),e.authentication&&r.addParam("authentication",e.authentication),e.q!==void 0&&r.addParam("q",e.q),e.enableNavigation!==void 0&&r.addParam("enableNavigation",`${e.enableNavigation}`),e.requestedOutputSize!==void 0&&r.addParam("requestedOutputSize",`${e.requestedOutputSize}`),r.href},Kd=async(e,t)=>{let r=await Nt.call({...Yd(e,"POST","application/x-www-form-urlencoded","/html"),requestParams:Xi(e),requestMetadata:{method:"html"},...t});if(r instanceof Error)throw r;let n=pf(r),o=await r.arrayBuffer(),a=new TextDecoder(n).decode(o);return Zb(a)?{success:a}:{error:Wd({response:r,body:a})}};function Zb(e){return typeof e=="string"}var gf=require("@coveo/bueno");function go(){return{answerSnippet:"",documentId:{contentIdKey:"",contentIdValue:""},question:"",relatedQuestions:[],score:0}}function Ne(){return{response:{results:[],searchUid:"",totalCountFiltered:0,facets:[],generateAutomaticFacets:{facets:[]},queryCorrections:[],triggers:[],questionAnswer:go(),pipeline:"",splitTestRun:"",termsToHighlight:{},phrasesToHighlight:{},extendedResults:{}},duration:0,queryExecuted:"",error:null,automaticallyCorrected:!1,isLoading:!1,results:[],searchResponseId:"",requestId:"",questionAnswer:go(),extendedResults:{}}}function ev(e){return{statusCode:e.statusCode,type:e.name,message:e.message}}function tv(e){return{statusCode:e.code,type:e.name,message:e.message,ignored:!0}}function Qn(e,t){if(t&&e.name==="AbortError")return{error:tv(e)};if(e instanceof Mn)return{error:ev(e)};throw e}var Gr=e=>e.success!==void 0,le=e=>e.error!==void 0;function ff(e){return e.results!==void 0}function hf(e){let t=go();return(0,gf.isNullOrUndefined)(e.questionAnswer)?(e.questionAnswer=t,e):(e.questionAnswer={...t,...e.questionAnswer},e)}var Jd=(e,t)=>`${e.url}/rest/organizations/${e.organizationId}/insight/v1/configs/${e.insightId}${t??""}`,rv=e=>`${e.url}/rest/organizations/${e.organizationId}/machinelearning/user/actions`,Zi=(e,t,r,n)=>{nv(e);let o=Jd(e,n);return{accessToken:e.accessToken,method:t,contentType:r,url:o,origin:"insightApiFetch"}},yf=(e,t,r)=>{ov(e);let n=rv(e);return{accessToken:e.accessToken,method:t,contentType:r,url:n,origin:"insightApiFetch"}},Xd=e=>{let{insightId:t,...r}=Xi(e);return r},Sf=e=>{if(!e.url)throw new Error("The 'url' attribute must contain a valid platform URL.");if(!e.organizationId)throw new Error("The 'organizationId' attribute must contain a valid organization ID.");if(!e.accessToken)throw new Error("The 'accessToken' attribute must contain a valid platform access token.")},nv=e=>{if(Sf(e),!e.insightId)throw new Error("The 'insightId' attribute must contain a valid Insight Panel configuration ID.")},ov=e=>{if(Sf(e),!e.userId)throw new Error("The 'userId' attribute must contain a valid user ID.")};var Cf=e=>({...Zi(e,"GET","application/json","/interface"),requestParams:{}});var Af=e=>({...Zi(e,"POST","application/json","/search"),requestParams:Xd(e)}),xf=e=>({...Zi(e,"POST","application/json","/querysuggest"),requestParams:Xd(e)});var Rf=e=>({...yf(e,"POST","application/json"),requestParams:{objectId:e.userId}});var Fs=class{constructor(t){this.options=t}async getInterface(t){let r=await Nt.call({...Cf(t),...this.options});if(r instanceof Error)return Qn(r);let n=await r.json();return r.ok?{success:n}:{error:n}}async query(t,r){let n=await Nt.call({...Af(t),requestMetadata:{method:"search",origin:r?.origin},...this.options});if(n instanceof Error)return Qn(n);let o=await n.json();return ff(o)&&(o=hf(o)),n.ok?{success:o}:{error:o}}async querySuggest(t){let r=await Nt.call({...xf(t),...this.options});if(r instanceof Error)return Qn(r);let n=await r.json();return n.completions?{success:n}:{error:n}}async userActions(t){let r=await Nt.call({...Rf(t),...this.options});if(r instanceof Error)return Qn(r);let n=await r.json();return r.ok?{success:n}:{error:n}}async html(t){return Kd(t,{...this.options})}};var at=require("@coveo/bueno"),D=new at.StringValue({required:!0,emptyAllowed:!1}),ae=new at.StringValue({required:!1,emptyAllowed:!1}),de=new at.StringValue({required:!0,emptyAllowed:!0}),Ff=new at.StringValue({required:!1,emptyAllowed:!0}),bs=new at.ArrayValue({each:D,required:!0}),bf=new at.StringValue({required:!1,emptyAllowed:!1,regex:/^\d+\.\d+\.\d+$/}),Mt=({message:e,name:t,stack:r})=>({message:e,name:t,stack:r}),bt=(e,t)=>{if("required"in t)return{payload:new at.Schema({value:t}).validate({value:e}).value};let o=new at.RecordValue({options:{required:!0},values:t}).validate(e);if(o)throw new at.SchemaValidationError(o);return{payload:e}},A=(e,t)=>{try{return bt(e,t)}catch(r){return{payload:e,error:Mt(r)}}},Zt=(e,t,r,n)=>{let o=`Check the initialState of ${n}`;return vf(e,t,r,o,"Controller initialization error")},Me=(e,t,r,n)=>{let o=`Check the options of ${n}`;return vf(e,t,r,o,"Controller initialization error")},vf=(e,t,r,n,o)=>{try{return t.validate(r,n)}catch(i){throw e.logger.error(i,o),i}};var Ct=require("@coveo/bueno");function _e(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 iv=typeof Symbol=="function"&&Symbol.observable||"@@observable",If=iv,Zd=()=>Math.random().toString(36).substring(7).split("").join("."),av={INIT:`@@redux/INIT${Zd()}`,REPLACE:`@@redux/REPLACE${Zd()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Zd()}`},vs=av;function er(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 ep(e,t,r){if(typeof e!="function")throw new Error(_e(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(_e(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(_e(1));return r(ep)(e,t)}let n=e,o=t,i=new Map,a=i,s=0,u=!1;function c(){a===i&&(a=new Map,i.forEach((f,h)=>{a.set(h,f)}))}function l(){if(u)throw new Error(_e(3));return o}function p(f){if(typeof f!="function")throw new Error(_e(4));if(u)throw new Error(_e(5));let h=!0;c();let R=s++;return a.set(R,f),function(){if(h){if(u)throw new Error(_e(6));h=!1,c(),a.delete(R),i=null}}}function m(f){if(!er(f))throw new Error(_e(7));if(typeof f.type>"u")throw new Error(_e(8));if(typeof f.type!="string")throw new Error(_e(17));if(u)throw new Error(_e(9));try{u=!0,o=n(o,f)}finally{u=!1}return(i=a).forEach(R=>{R()}),f}function d(f){if(typeof f!="function")throw new Error(_e(10));n=f,m({type:vs.REPLACE})}function g(){let f=p;return{subscribe(h){if(typeof h!="object"||h===null)throw new Error(_e(11));function R(){let x=h;x.next&&x.next(l())}return R(),{unsubscribe:f(R)}},[If](){return this}}}return m({type:vs.INIT}),{dispatch:m,subscribe:p,getState:l,replaceReducer:d,[If]:g}}function sv(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:vs.INIT})>"u")throw new Error(_e(12));if(typeof r(void 0,{type:vs.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(_e(13))})}function fo(e){let t=Object.keys(e),r={};for(let a=0;a<t.length;a++){let s=t[a];typeof e[s]=="function"&&(r[s]=e[s])}let n=Object.keys(r),o,i;try{sv(r)}catch(a){i=a}return function(s={},u){if(i)throw i;let c=!1,l={};for(let p=0;p<n.length;p++){let m=n[p],d=r[m],g=s[m],C=d(g,u);if(typeof C>"u"){let f=u&&u.type;throw new Error(_e(14))}l[m]=C,c=c||C!==g}return c=c||n.length!==Object.keys(s).length,c?l:s}}function ho(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function wf(...e){return t=>(r,n)=>{let o=t(r,n),i=()=>{throw new Error(_e(15))},a={getState:o.getState,dispatch:(u,...c)=>i(u,...c)},s=e.map(u=>u(a));return i=ho(...s)(o.dispatch),{...o,dispatch:i}}}function Is(e){return er(e)&&"type"in e&&typeof e.type=="string"}var lp=Symbol.for("immer-nothing"),ea=Symbol.for("immer-draftable"),st=Symbol.for("immer-state");function Be(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Un=Object.getPrototypeOf;function ht(e){return!!e&&!!e[st]}function ct(e){return e?qf(e)||Array.isArray(e)||!!e[ea]||!!e.constructor?.[ea]||ia(e)||aa(e):!1}var cv=Object.prototype.constructor.toString();function qf(e){if(!e||typeof e!="object")return!1;let t=Un(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)===cv}function dp(e){return ht(e)||Be(15,e),e[st].base_}function ta(e,t){_n(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function _n(e){let t=e[st];return t?t.type_:Array.isArray(e)?1:ia(e)?2:aa(e)?3:0}function ra(e,t){return _n(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function tp(e,t){return _n(e)===2?e.get(t):e[t]}function Of(e,t,r){let n=_n(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function uv(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ia(e){return e instanceof Map}function aa(e){return e instanceof Set}function Ln(e){return e.copy_||e.base_}function op(e,t){if(ia(e))return new Map(e);if(aa(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);let r=qf(e);if(t===!0||t==="class_only"&&!r){let n=Object.getOwnPropertyDescriptors(e);delete n[st];let o=Reflect.ownKeys(n);for(let i=0;i<o.length;i++){let a=o[i],s=n[a];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[a]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[a]})}return Object.create(Un(e),n)}else{let n=Un(e);if(n!==null&&r)return{...e};let o=Object.create(n);return Object.assign(o,e)}}function Es(e,t=!1){return Ts(e)||ht(e)||!ct(e)||(_n(e)>1&&(e.set=e.add=e.clear=e.delete=lv),Object.freeze(e),t&&Object.entries(e).forEach(([r,n])=>Es(n,!0))),e}function lv(){Be(2)}function Ts(e){return Object.isFrozen(e)}var ip={};function Bn(e){let t=ip[e];return t||Be(0,e),t}function dv(e,t){ip[e]||(ip[e]=t)}var na;function Df(){return na}function pv(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Pf(e,t){t&&(Bn("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ap(e){sp(e),e.drafts_.forEach(mv),e.drafts_=null}function sp(e){e===na&&(na=e.parent_)}function Ef(e){return na=pv(na,e)}function mv(e){let t=e[st];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Tf(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];return e!==void 0&&e!==r?(r[st].modified_&&(ap(t),Be(4)),ct(e)&&(e=ws(t,e),t.parent_||Ps(t,e)),t.patches_&&Bn("Patches").generateReplacementPatches_(r[st].base_,e,t.patches_,t.inversePatches_)):e=ws(t,r,[]),ap(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==lp?e:void 0}function ws(e,t,r){if(Ts(t))return t;let n=t[st];if(!n)return ta(t,(o,i)=>kf(e,n,t,o,i,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return Ps(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;let o=n.copy_,i=o,a=!1;n.type_===3&&(i=new Set(o),o.clear(),a=!0),ta(i,(s,u)=>kf(e,n,o,s,u,r,a)),Ps(e,o,!1),r&&e.patches_&&Bn("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function kf(e,t,r,n,o,i,a){if(ht(o)){let s=i&&t&&t.type_!==3&&!ra(t.assigned_,n)?i.concat(n):void 0,u=ws(e,o,s);if(Of(r,n,u),ht(u))e.canAutoFreeze_=!1;else return}else a&&r.add(o);if(ct(o)&&!Ts(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ws(e,o),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&Object.prototype.propertyIsEnumerable.call(r,n)&&Ps(e,o)}}function Ps(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Es(t,r)}function gv(e,t){let r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:Df(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1},o=n,i=pp;r&&(o=[n],i=oa);let{revoke:a,proxy:s}=Proxy.revocable(o,i);return n.draft_=s,n.revoke_=a,s}var pp={get(e,t){if(t===st)return e;let r=Ln(e);if(!ra(r,t))return fv(e,r,t);let n=r[t];return e.finalized_||!ct(n)?n:n===rp(e.base_,t)?(np(e),e.copy_[t]=up(n,e)):n},has(e,t){return t in Ln(e)},ownKeys(e){return Reflect.ownKeys(Ln(e))},set(e,t,r){let n=Vf(Ln(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){let o=rp(Ln(e),t),i=o?.[st];if(i&&i.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(uv(r,o)&&(r!==void 0||ra(e.base_,t)))return!0;np(e),cp(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 rp(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,np(e),cp(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=Ln(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Be(11)},getPrototypeOf(e){return Un(e.base_)},setPrototypeOf(){Be(12)}},oa={};ta(pp,(e,t)=>{oa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});oa.deleteProperty=function(e,t){return oa.set.call(this,e,t,void 0)};oa.set=function(e,t,r){return pp.set.call(this,e[0],t,r,e[0])};function rp(e,t){let r=e[st];return(r?Ln(r):e)[t]}function fv(e,t,r){let n=Vf(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function Vf(e,t){if(!(t in e))return;let r=Un(e);for(;r;){let n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=Un(r)}}function cp(e){e.modified_||(e.modified_=!0,e.parent_&&cp(e.parent_))}function np(e){e.copy_||(e.copy_=op(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var hv=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){let i=r;r=t;let a=this;return function(u=i,...c){return a.produce(u,l=>r.call(this,l,...c))}}typeof r!="function"&&Be(6),n!==void 0&&typeof n!="function"&&Be(7);let o;if(ct(t)){let i=Ef(this),a=up(t,void 0),s=!0;try{o=r(a),s=!1}finally{s?ap(i):sp(i)}return Pf(i,n),Tf(o,i)}else if(!t||typeof t!="object"){if(o=r(t),o===void 0&&(o=t),o===lp&&(o=void 0),this.autoFreeze_&&Es(o,!0),n){let i=[],a=[];Bn("Patches").generateReplacementPatches_(t,o,i,a),n(i,a)}return o}else Be(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(a,...s)=>this.produceWithPatches(a,u=>t(u,...s));let n,o;return[this.produce(t,r,(a,s)=>{n=a,o=s}),n,o]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){ct(e)||Be(8),ht(e)&&(e=Nf(e));let t=Ef(this),r=up(e,void 0);return r[st].isManual_=!0,sp(t),r}finishDraft(e,t){let r=e&&e[st];(!r||!r.isManual_)&&Be(9);let{scope_:n}=r;return Pf(n,t),Tf(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let o=t[r];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}r>-1&&(t=t.slice(r+1));let n=Bn("Patches").applyPatches_;return ht(e)?n(e,t):this.produce(e,o=>n(o,t))}};function up(e,t){let r=ia(e)?Bn("MapSet").proxyMap_(e,t):aa(e)?Bn("MapSet").proxySet_(e,t):gv(e,t);return(t?t.scope_:Df()).drafts_.push(r),r}function Nf(e){return ht(e)||Be(10,e),Mf(e)}function Mf(e){if(!ct(e)||Ts(e))return e;let t=e[st],r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=op(e,t.scope_.immer_.useStrictShallowCopy_)}else r=op(e,!0);return ta(r,(n,o)=>{Of(r,n,Mf(o))}),t&&(t.finalized_=!1),r}function Qf(){let t="replace",r="add",n="remove";function o(m,d,g,C){switch(m.type_){case 0:case 2:return a(m,d,g,C);case 1:return i(m,d,g,C);case 3:return s(m,d,g,C)}}function i(m,d,g,C){let{base_:f,assigned_:h}=m,R=m.copy_;R.length<f.length&&([f,R]=[R,f],[g,C]=[C,g]);for(let y=0;y<f.length;y++)if(h[y]&&R[y]!==f[y]){let x=d.concat([y]);g.push({op:t,path:x,value:p(R[y])}),C.push({op:t,path:x,value:p(f[y])})}for(let y=f.length;y<R.length;y++){let x=d.concat([y]);g.push({op:r,path:x,value:p(R[y])})}for(let y=R.length-1;f.length<=y;--y){let x=d.concat([y]);C.push({op:n,path:x})}}function a(m,d,g,C){let{base_:f,copy_:h}=m;ta(m.assigned_,(R,y)=>{let x=tp(f,R),E=tp(h,R),I=y?ra(f,R)?t:r:n;if(x===E&&I===t)return;let F=d.concat(R);g.push(I===n?{op:I,path:F}:{op:I,path:F,value:E}),C.push(I===r?{op:n,path:F}:I===n?{op:r,path:F,value:p(x)}:{op:t,path:F,value:p(x)})})}function s(m,d,g,C){let{base_:f,copy_:h}=m,R=0;f.forEach(y=>{if(!h.has(y)){let x=d.concat([R]);g.push({op:n,path:x,value:y}),C.unshift({op:r,path:x,value:y})}R++}),R=0,h.forEach(y=>{if(!f.has(y)){let x=d.concat([R]);g.push({op:r,path:x,value:y}),C.unshift({op:n,path:x,value:y})}R++})}function u(m,d,g,C){g.push({op:t,path:[],value:d===lp?void 0:d}),C.push({op:t,path:[],value:m})}function c(m,d){return d.forEach(g=>{let{path:C,op:f}=g,h=m;for(let E=0;E<C.length-1;E++){let I=_n(h),F=C[E];typeof F!="string"&&typeof F!="number"&&(F=""+F),(I===0||I===1)&&(F==="__proto__"||F==="constructor")&&Be(19),typeof h=="function"&&F==="prototype"&&Be(19),h=tp(h,F),typeof h!="object"&&Be(18,C.join("/"))}let R=_n(h),y=l(g.value),x=C[C.length-1];switch(f){case t:switch(R){case 2:return h.set(x,y);case 3:Be(16);default:return h[x]=y}case r:switch(R){case 1:return x==="-"?h.push(y):h.splice(x,0,y);case 2:return h.set(x,y);case 3:return h.add(y);default:return h[x]=y}case n:switch(R){case 1:return h.splice(x,1);case 2:return h.delete(x);case 3:return h.delete(g.value);default:return delete h[x]}default:Be(17,f)}}),m}function l(m){if(!ct(m))return m;if(Array.isArray(m))return m.map(l);if(ia(m))return new Map(Array.from(m.entries()).map(([g,C])=>[g,l(C)]));if(aa(m))return new Set(Array.from(m).map(l));let d=Object.create(Un(m));for(let g in m)d[g]=l(m[g]);return ra(m,ea)&&(d[ea]=m[ea]),d}function p(m){return ht(m)?l(m):m}dv("Patches",{applyPatches_:c,generatePatches_:o,generateReplacementPatches_:u})}var yt=new hv,kr=yt.produce,ks=yt.produceWithPatches.bind(yt),hN=yt.setAutoFreeze.bind(yt),yN=yt.setUseStrictShallowCopy.bind(yt),mp=yt.applyPatches.bind(yt),SN=yt.createDraft.bind(yt),CN=yt.finishDraft.bind(yt);function yv(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Sv(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Cv(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var Lf=e=>Array.isArray(e)?e:[e];function Av(e){let t=Array.isArray(e[0])?e[0]:e;return Cv(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function xv(e,t){let r=[],{length:n}=e;for(let o=0;o<n;o++)r.push(e[o].apply(null,t));return r}var RN=Symbol();var FN=Object.getPrototypeOf({});var Rv=class{constructor(e){this.value=e}deref(){return this.value}},Fv=typeof WeakRef<"u"?WeakRef:Rv,bv=0,Uf=1;function qs(){return{s:bv,v:void 0,o:null,p:null}}function yo(e,t={}){let r=qs(),{resultEqualityCheck:n}=t,o,i=0;function a(){let s=r,{length:u}=arguments;for(let p=0,m=u;p<m;p++){let d=arguments[p];if(typeof d=="function"||typeof d=="object"&&d!==null){let g=s.o;g===null&&(s.o=g=new WeakMap);let C=g.get(d);C===void 0?(s=qs(),g.set(d,s)):s=C}else{let g=s.p;g===null&&(s.p=g=new Map);let C=g.get(d);C===void 0?(s=qs(),g.set(d,s)):s=C}}let c=s,l;if(s.s===Uf)l=s.v;else if(l=e.apply(null,arguments),i++,n){let p=o?.deref?.()??o;p!=null&&n(p,l)&&(l=p,i!==0&&i--),o=typeof l=="object"&&l!==null||typeof l=="function"?new Fv(l):l}return c.s=Uf,c.v=l,l}return a.clearCache=()=>{r=qs(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function _f(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...o)=>{let i=0,a=0,s,u={},c=o.pop();typeof c=="object"&&(u=c,c=o.pop()),yv(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);let l={...r,...u},{memoize:p,memoizeOptions:m=[],argsMemoize:d=yo,argsMemoizeOptions:g=[],devModeChecks:C={}}=l,f=Lf(m),h=Lf(g),R=Av(o),y=p(function(){return i++,c.apply(null,arguments)},...f),x=!0,E=d(function(){a++;let F=xv(R,arguments);return s=y.apply(null,F),s},...h);return Object.assign(E,{resultFunc:c,memoizedResultFunc:y,dependencies:R,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>i,resetRecomputations:()=>{i=0},memoize:p,argsMemoize:d})};return Object.assign(n,{withTypes:()=>n}),n}var Y=_f(yo),vv=Object.assign((e,t=Y)=>{Sv(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),n=r.map(i=>e[i]);return t(n,(...i)=>i.reduce((a,s,u)=>(a[r[u]]=s,a),{}))},{withTypes:()=>vv});function Bf(e){return({dispatch:r,getState:n})=>o=>i=>typeof i=="function"?i(r,n,e):o(i)}var jf=Bf(),$f=Bf;var Iv=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?ho:ho.apply(null,arguments)},ON=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},wv=e=>e&&typeof e.match=="function";function S(e,t){function r(...n){if(t){let o=t(...n);if(!o)throw new Error(Qt(0));return{type:e,payload:o.payload,..."meta"in o&&{meta:o.meta},..."error"in o&&{error:o.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Is(n)&&n.type===e,r}var Yf=class sa extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,sa.prototype)}static get[Symbol.species](){return sa}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new sa(...t[0].concat(this)):new sa(...t.concat(this))}};function Gf(e){return ct(e)?kr(e,()=>{}):e}function zf(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function Pv(e){return typeof e=="boolean"}var Ev=()=>function(t){let{thunk:r=!0,immutableCheck:n=!0,serializableCheck:o=!0,actionCreatorCheck:i=!0}=t??{},a=new Yf;return r&&(Pv(r)?a.push(jf):a.push($f(r.extraArgument))),a},ca="RTK_autoBatch",Co=()=>e=>({payload:e,meta:{[ca]:!0}}),Hf=e=>t=>{setTimeout(t,e)},Tv=(e={type:"raf"})=>t=>(...r)=>{let n=t(...r),o=!0,i=!1,a=!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=()=>{a=!1,i&&(i=!1,s.forEach(l=>l()))};return Object.assign({},n,{subscribe(l){let p=()=>o&&l(),m=n.subscribe(p);return s.add(l),()=>{m(),s.delete(l)}},dispatch(l){try{return o=!l?.meta?.[ca],i=!o,i&&(a||(a=!0,u(c))),n.dispatch(l)}finally{o=!0}}})},kv=e=>function(r){let{autoBatch:n=!0}=r??{},o=new Yf(e);return n&&o.push(Tv(typeof n=="object"?n:void 0)),o};function Kf(e){let t=Ev(),{reducer:r=void 0,middleware:n,devTools:o=!0,preloadedState:i=void 0,enhancers:a=void 0}=e||{},s;if(typeof r=="function")s=r;else if(er(r))s=fo(r);else throw new Error(Qt(1));let u;typeof n=="function"?u=n(t):u=t();let c=ho;o&&(c=Iv({trace:!1,...typeof o=="object"&&o}));let l=wf(...u),p=kv(l),m=typeof a=="function"?a(p):p(),d=c(...m);return ep(s,i,d)}function Jf(e){let t={},r=[],n,o={addCase(i,a){let s=typeof i=="string"?i:i.type;if(!s)throw new Error(Qt(28));if(s in t)throw new Error(Qt(29));return t[s]=a,o},addMatcher(i,a){return r.push({matcher:i,reducer:a}),o},addDefaultCase(i){return n=i,o}};return e(o),[t,r,n]}function qv(e){return typeof e=="function"}function G(e,t){let[r,n,o]=Jf(t),i;if(qv(e))i=()=>Gf(e());else{let s=Gf(e);i=()=>s}function a(s=i(),u){let c=[r[u.type],...n.filter(({matcher:l})=>l(u)).map(({reducer:l})=>l)];return c.filter(l=>!!l).length===0&&(c=[o]),c.reduce((l,p)=>{if(p)if(ht(l)){let d=p(l,u);return d===void 0?l:d}else{if(ct(l))return kr(l,m=>p(m,u));{let m=p(l,u);if(m===void 0){if(l===null)return l;throw Error("A case reducer on a non-draftable value must not return undefined")}return m}}return l},s)}return a.getInitialState=i,a}var Xf=(e,t)=>wv(e)?e.match(t):e(t);function tr(...e){return t=>e.some(r=>Xf(r,t))}function So(...e){return t=>e.every(r=>Xf(r,t))}function Ds(e,t){if(!e||!e.meta)return!1;let r=typeof e.meta.requestId=="string",n=t.indexOf(e.meta.requestStatus)>-1;return r&&n}function ua(e){return typeof e[0]=="function"&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function Vs(...e){return e.length===0?t=>Ds(t,["pending"]):ua(e)?tr(...e.map(t=>t.pending)):Vs()(e[0])}function jn(...e){return e.length===0?t=>Ds(t,["rejected"]):ua(e)?tr(...e.map(t=>t.rejected)):jn()(e[0])}function la(...e){let t=r=>r&&r.meta&&r.meta.rejectedWithValue;return e.length===0?So(jn(...e),t):ua(e)?So(jn(...e),t):la()(e[0])}function qr(...e){return e.length===0?t=>Ds(t,["fulfilled"]):ua(e)?tr(...e.map(t=>t.fulfilled)):qr()(e[0])}function Ns(...e){return e.length===0?t=>Ds(t,["pending","fulfilled","rejected"]):ua(e)?tr(...e.flatMap(t=>[t.pending,t.rejected,t.fulfilled])):Ns()(e[0])}var Ov="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Ms=(e=21)=>{let t="",r=e;for(;r--;)t+=Ov[Math.random()*64|0];return t},Dv=["name","message","stack","code"],gp=class{constructor(e,t){Ee(this,"_type");this.payload=e,this.meta=t}},Wf=class{constructor(e,t){Ee(this,"_type");this.payload=e,this.meta=t}},Vv=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of Dv)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},B=(()=>{function e(t,r,n){let o=S(t+"/fulfilled",(u,c,l,p)=>({payload:u,meta:{...p||{},arg:l,requestId:c,requestStatus:"fulfilled"}})),i=S(t+"/pending",(u,c,l)=>({payload:void 0,meta:{...l||{},arg:c,requestId:u,requestStatus:"pending"}})),a=S(t+"/rejected",(u,c,l,p,m)=>({payload:p,error:(n&&n.serializeError||Vv)(u||"Rejected"),meta:{...m||{},arg:l,requestId:c,rejectedWithValue:!!p,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function s(u){return(c,l,p)=>{let m=n?.idGenerator?n.idGenerator(u):Ms(),d=new AbortController,g,C;function f(R){C=R,d.abort()}let h=async function(){let R;try{let x=n?.condition?.(u,{getState:l,extra:p});if(Mv(x)&&(x=await x),x===!1||d.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let E=new Promise((I,F)=>{g=()=>{F({name:"AbortError",message:C||"Aborted"})},d.signal.addEventListener("abort",g)});c(i(m,u,n?.getPendingMeta?.({requestId:m,arg:u},{getState:l,extra:p}))),R=await Promise.race([E,Promise.resolve(r(u,{dispatch:c,getState:l,extra:p,requestId:m,signal:d.signal,abort:f,rejectWithValue:(I,F)=>new gp(I,F),fulfillWithValue:(I,F)=>new Wf(I,F)})).then(I=>{if(I instanceof gp)throw I;return I instanceof Wf?o(I.payload,m,u,I.meta):o(I,m,u)})])}catch(x){R=x instanceof gp?a(null,m,u,x.payload,x.meta):a(x,m,u)}finally{g&&d.signal.removeEventListener("abort",g)}return n&&!n.dispatchConditionRejection&&a.match(R)&&R.meta.condition||c(R),R}();return Object.assign(h,{abort:f,requestId:m,arg:u,unwrap(){return h.then(Nv)}})}}return Object.assign(s,{pending:i,rejected:a,fulfilled:o,settled:tr(a,o),typePrefix:t})}return e.withTypes=()=>e,e})();function Nv(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Mv(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Zf=Symbol.for("rtk-slice-createasyncthunk"),QN={[Zf]:B};function Qv(e,t){return`${e}/${t}`}function Lv({creators:e}={}){let t=e?.asyncThunk?.[Zf];return function(n){let{name:o,reducerPath:i=o}=n;if(!o)throw new Error(Qt(11));typeof process<"u";let a=(typeof n.reducers=="function"?n.reducers(_v()):n.reducers)||{},s=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(R,y){let x=typeof R=="string"?R:R.type;if(!x)throw new Error(Qt(12));if(x in u.sliceCaseReducersByType)throw new Error(Qt(13));return u.sliceCaseReducersByType[x]=y,c},addMatcher(R,y){return u.sliceMatchers.push({matcher:R,reducer:y}),c},exposeAction(R,y){return u.actionCreators[R]=y,c},exposeCaseReducer(R,y){return u.sliceCaseReducersByName[R]=y,c}};s.forEach(R=>{let y=a[R],x={reducerName:R,type:Qv(o,R),createNotation:typeof n.reducers=="function"};jv(y)?Gv(x,y,c,t):Bv(x,y,c)});function l(){let[R={},y=[],x=void 0]=typeof n.extraReducers=="function"?Jf(n.extraReducers):[n.extraReducers],E={...R,...u.sliceCaseReducersByType};return G(n.initialState,I=>{for(let F in E)I.addCase(F,E[F]);for(let F of u.sliceMatchers)I.addMatcher(F.matcher,F.reducer);for(let F of y)I.addMatcher(F.matcher,F.reducer);x&&I.addDefaultCase(x)})}let p=R=>R,m=new Map,d;function g(R,y){return d||(d=l()),d(R,y)}function C(){return d||(d=l()),d.getInitialState()}function f(R,y=!1){function x(I){let F=I[R];return typeof F>"u"&&y&&(F=C()),F}function E(I=p){let F=zf(m,y,()=>new WeakMap);return zf(F,I,()=>{let v={};for(let[w,T]of Object.entries(n.selectors??{}))v[w]=Uv(T,I,C,y);return v})}return{reducerPath:R,getSelectors:E,get selectors(){return E(x)},selectSlice:x}}let h={name:o,reducer:g,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:C,...f(i),injectInto(R,{reducerPath:y,...x}={}){let E=y??i;return R.inject({reducerPath:E,reducer:g},x),{...h,...f(E,!0)}}};return h}}function Uv(e,t,r,n){function o(i,...a){let s=t(i);return typeof s>"u"&&n&&(s=r()),e(s,...a)}return o.unwrapped=e,o}var $n=Lv();function _v(){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 Bv({type:e,reducerName:t,createNotation:r},n,o){let i,a;if("reducer"in n){if(r&&!$v(n))throw new Error(Qt(17));i=n.reducer,a=n.prepare}else i=n;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?S(e,a):S(e))}function jv(e){return e._reducerDefinitionType==="asyncThunk"}function $v(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Gv({type:e,reducerName:t},r,n,o){if(!o)throw new Error(Qt(18));let{payloadCreator:i,fulfilled:a,pending:s,rejected:u,settled:c,options:l}=r,p=o(e,i,l);n.exposeAction(t,p),a&&n.addCase(p.fulfilled,a),s&&n.addCase(p.pending,s),u&&n.addCase(p.rejected,u),c&&n.addMatcher(p.settled,c),n.exposeCaseReducer(t,{fulfilled:a||Os,pending:s||Os,rejected:u||Os,settled:c||Os})}function Os(){}var eh="listener",th="completed",rh="cancelled",LN=`task-${rh}`,UN=`task-${th}`,_N=`${eh}-${rh}`,BN=`${eh}-${th}`;var{assign:nh}=Object;var fp="listenerMiddleware";var zv=nh(S(`${fp}/add`),{withTypes:()=>zv}),jN=S(`${fp}/removeAll`),Hv=nh(S(`${fp}/remove`),{withTypes:()=>Hv});var $N=Symbol.for("rtk-state-proxy-original");function Qt(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. `}function Wv({config:e,environment:t,event:r,listenerManager:n}){let{url:o,token:i,mode:a}=e;a!=="disabled"&&(n.call(r),t.send(o,i,r))}var Yv=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function Kv(e){return typeof e=="string"&&Yv.test(e)}var je=[];for(let e=0;e<256;++e)je.push((e+256).toString(16).slice(1));function Jv(e,t=0){return(je[e[t+0]]+je[e[t+1]]+je[e[t+2]]+je[e[t+3]]+"-"+je[e[t+4]]+je[e[t+5]]+"-"+je[e[t+6]]+je[e[t+7]]+"-"+je[e[t+8]]+je[e[t+9]]+"-"+je[e[t+10]]+je[e[t+11]]+je[e[t+12]]+je[e[t+13]]+je[e[t+14]]+je[e[t+15]]).toLowerCase()}var hp,Xv=new Uint8Array(16);function Zv(){if(!hp){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");hp=crypto.getRandomValues.bind(crypto)}return hp(Xv)}var eI=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),oh={randomUUID:eI};function tI(e,t,r){if(oh.randomUUID&&!e)return oh.randomUUID();e=e||{};let n=e.random??e.rng?.()??Zv();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Jv(n)}function rI(e){return{getClientId:()=>{let t="visitorId",r=e.get(),n=r.storage,o=n.getItem(t),i=o&&Kv(o)?o:r.generateUUID();return n.setItem(t,i),i}}}var ah="1.0.0";function nI(e){let{trackingId:t}=e;return{trackingId:t}}function oI(e){return(e.source||[]).concat([`relay@${ah}`])}function sh(e,t,r,n){let{getReferrer:o,getLocation:i,getUserAgent:a}=r,s=nI(t),u=n.getClientId();return Object.freeze({type:e,config:s,ts:Date.now(),source:oI(t),clientId:u,userAgent:a(),referrer:o(),location:i()})}function iI(e,t,r,n,o){return{...t,meta:sh(e,r,n,o)}}var aI="*";function sI(){let e=[];function t({type:u,callback:c}){return e.findIndex(l=>l.type===u&&l.callback===c)}function r(u,c){return u.type==="*"||c===u.type}function n(u){return t(u)<0&&e.push(u),()=>s(u.type,u.callback)}function o(u){e.forEach(c=>{if(r(c,u.meta.type))try{c.callback(u)}catch(l){console.error(l)}})}function i(u){if(u===aI)e.length=0;else for(let c=e.length-1;c>=0;c--)e[c].type===u&&e.splice(c,1)}function a(u){let c=t(u);c>=0&&e.splice(c,1)}function s(u,c){c?a({type:u,callback:c}):i(u)}return{add:n,call:o,remove:s}}function ih({url:e,token:t,trackingId:r,...n}){return Object.freeze({url:e,token:t,trackingId:r,...!!n.mode&&{mode:n.mode},...!!n.source&&{source:n.source}})}function cI(e){let t=ih(e);return{get:()=>t,update:r=>{t=ih({...t,...r})}}}function uI(){let e=typeof window<"u";return{sendMessage(t){e&&window.postMessage(t,"*")}}}var yp=lI();function lI(){let e="coveo_",t=r=>{let n=r.split(".").slice(-2);return n.length==2?n.join("."):""};return{getItem(r){let n=`${e}${r}=`,o=document.cookie.split(";");for(let i of o){let a=i.replace(/^\s+/,"");if(a.lastIndexOf(n,0)===0)return a.substring(n.length,a.length)}return null},setItem(r,n,o){let i=t(window.location.hostname),a=`;expires=${new Date(new Date().getTime()+o).toUTCString()}`,s=i?`;domain=${i}`:"";document.cookie=`${e}${r}=${n}${a}${s};path=/;SameSite=Lax`},removeItem(r){this.setItem(r,"",-1)}}}function dI(){return{getItem(e){return yp.getItem(e)||localStorage.getItem(e)},removeItem(e){yp.removeItem(e),localStorage.removeItem(e)},setItem(e,t){localStorage.setItem(e,t),yp.setItem(e,t,31556952e3)}}}function pI(){let e=document.referrer;return e===""?null:e}function mI(){return{runtime:"browser",send:(e,t,r)=>{let n=navigator.sendBeacon(`${e}?access_token=${t}`,new Blob([JSON.stringify([r])],{type:"application/json"}));if(uI().sendMessage({kind:"EVENT_PROTOCOL",event:r,url:e,token:t}),!n)throw new Error("Failed to send the event(s) because the payload size exceeded the maximum allowed size (32 KB). Please contact support if the problem persists.")},getReferrer:()=>pI(),getLocation:()=>window.location.href,getUserAgent:()=>navigator.userAgent,generateUUID:()=>tI(),storage:dI()}}function gI(){try{let e="__storage_test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return e instanceof DOMException&&e.name==="QuotaExceededError"&&localStorage&&localStorage.length!==0}}function fI(){return{getItem(){return null},removeItem(){},setItem(){}}}function hI(){return{runtime:"null",send:()=>{},getReferrer:()=>null,getLocation:()=>null,getUserAgent:()=>null,generateUUID:()=>"",storage:fI()}}function yI(e){return e.get().mode!=="disabled"&&SI()&&gI()?mI():hI()}function SI(){try{return typeof window=="object"}catch{return!1}}function CI(e){return{get:()=>Object.freeze(yI(e))}}function ch(e){let t=cI(e),r=sI(),n=CI(t),o=rI(n);return{emit:(i,a)=>{let s=t.get(),u=n.get(),c=iI(i,a,s,u,o);return Wv({config:s,environment:u,event:c,listenerManager:r})},getMeta:i=>sh(i,t.get(),n.get(),o),on:(i,a)=>r.add({type:i,callback:a}),off:(i,a)=>r.remove(i,a),updateConfig:i=>t.update(i),version:ah}}var Ao="3.19.1",uh=["@coveo/atomic","@coveo/quantic"];var zr=Y(e=>e.source,e=>Object.entries(e).map(([t,r])=>`${t}@${r}`).concat(`@coveo/headless@${Ao}`));var xo=Y(e=>e.configuration.organizationId,e=>e.configuration.environment,e=>e.configuration.accessToken,e=>e.configuration.analytics,e=>zr(e.configuration.analytics),(e,t,r,{trackingId:n,apiBaseUrl:o,enabled:i},a)=>ch({mode:i?"emit":"disabled",url:o??Rs(e,t),token:r,trackingId:n,source:a}));function rr(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function P(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(l){try{c(n.next(l))}catch(p){a(p)}}function u(l){try{c(n.throw(l))}catch(p){a(p)}}function c(l){l.done?i(l.value):o(l.value).then(s,u)}c((n=n.apply(e,t||[])).next())})}var oe;(function(e){e.search="search",e.click="click",e.custom="custom",e.view="view",e.collect="collect"})(oe||(oe={}));function Ap(){return typeof window<"u"}function Dp(){return typeof navigator<"u"}function Ro(){return typeof document<"u"}function xp(){try{return typeof localStorage<"u"}catch{return!1}}function AI(){try{return typeof sessionStorage<"u"}catch{return!1}}function Rh(){return Dp()&&navigator.cookieEnabled}var xI=[oe.click,oe.custom,oe.search,oe.view],RI=(e,t)=>xI.indexOf(e)!==-1?Object.assign({language:Ro()?document.documentElement.lang:"unknown",userAgent:Dp()?navigator.userAgent:"unknown"},t):t,ma=class e{static set(t,r,n){var o,i,a,s;n&&(i=new Date,i.setTime(i.getTime()+n)),s=window.location.hostname,s.indexOf(".")===-1?lh(t,r,i):(a=s.split("."),o=a[a.length-2]+"."+a[a.length-1],lh(t,r,i,o))}static get(t){for(var r=t+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){var i=n[o];if(i=i.replace(/^\s+/,""),i.lastIndexOf(r,0)===0)return i.substring(r.length,i.length)}return null}static erase(t){e.set(t,"",-1)}};function lh(e,t,r,n){document.cookie=`${e}=${t}`+(r?`;expires=${r.toUTCString()}`:"")+(n?`;domain=${n}`:"")+";path=/;SameSite=Lax"}function FI(){return xp()?localStorage:Rh()?new ga:AI()?sessionStorage:new bo}var ga=class e{getItem(t){return ma.get(`${e.prefix}${t}`)}removeItem(t){ma.erase(`${e.prefix}${t}`)}setItem(t,r,n){ma.set(`${e.prefix}${t}`,r,n)}};ga.prefix="coveo_";var Rp=class{constructor(){this.cookieStorage=new ga}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)}},bo=class{getItem(t){return null}removeItem(t){}setItem(t,r){}},da="__coveo.analytics.history",Fh=20,bh=1e3*60,vh=75,vo=class{constructor(t){this.store=t||FI()}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 P(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 P(this,void 0,void 0,function*(){let t=yield this.getHistoryWithInternalTimeAsync();return this.stripEmptyQueries(this.stripInternalTime(t))})}getHistoryWithInternalTime(){try{let t=this.store.getItem(da);return t&&typeof t=="string"?JSON.parse(t):[]}catch{return[]}}getHistoryWithInternalTimeAsync(){return P(this,void 0,void 0,function*(){try{let t=yield this.store.getItem(da);return t?JSON.parse(t):[]}catch{return[]}})}setHistory(t){try{this.store.setItem(da,JSON.stringify(t.slice(0,Fh)))}catch{}}clear(){try{this.store.removeItem(da)}catch{}}getMostRecentElement(){let t=this.getHistoryWithInternalTime();return Array.isArray(t)?t.sort((n,o)=>(o.internalTime||0)-(n.internalTime||0))[0]:null}cropQueryElement(t){return t.name&&t.value&&t.name.toLowerCase()==="query"&&(t.value=t.value.slice(0,vh)),t}isValidEntry(t){let r=this.getMostRecentElement();return r&&r.value==t.value?(t.internalTime||0)-(r.internalTime||0)>bh:!0}stripInternalTime(t){return Array.isArray(t)?t.map(r=>{let{name:n,time:o,value:i}=r;return{name:n,time:o,value:i}}):[]}stripEmptyQuery(t){let{name:r,time:n,value:o}=t;return r&&typeof o=="string"&&r.toLowerCase()==="query"&&o.trim()===""?{name:r,time:n}:t}stripEmptyQueries(t){return t.map(r=>this.stripEmptyQuery(r))}},Ih=Object.freeze({__proto__:null,HistoryStore:vo,MAX_NUMBER_OF_HISTORY_ELEMENTS:Fh,MAX_VALUE_SIZE:vh,MIN_THRESHOLD_FOR_DUPLICATE_VALUE:bh,STORE_KEY:da,default:vo}),bI=(e,t)=>P(void 0,void 0,void 0,function*(){return e===oe.view?(yield vI(t.contentIdValue),Object.assign({location:window.location.toString(),referrer:document.referrer,title:document.title},t)):t}),vI=e=>P(void 0,void 0,void 0,function*(){let t=new vo,r={name:"PageView",value:e,time:new Date().toISOString()};yield t.addElementAsync(r)}),Qs,II=new Uint8Array(16);function wI(){if(!Qs&&(Qs=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Qs))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qs(II)}var PI=/^(?:[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 Us(e){return typeof e=="string"&&PI.test(e)}var $e=[];for(let e=0;e<256;++e)$e.push((e+256).toString(16).slice(1));function wh(e,t=0){return($e[e[t+0]]+$e[e[t+1]]+$e[e[t+2]]+$e[e[t+3]]+"-"+$e[e[t+4]]+$e[e[t+5]]+"-"+$e[e[t+6]]+$e[e[t+7]]+"-"+$e[e[t+8]]+$e[e[t+9]]+"-"+$e[e[t+10]]+$e[e[t+11]]+$e[e[t+12]]+$e[e[t+13]]+$e[e[t+14]]+$e[e[t+15]]).toLowerCase()}function EI(e){if(!Us(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 TI(e){e=unescape(encodeURIComponent(e));let t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}var kI="6ba7b810-9dad-11d1-80b4-00c04fd430c8",qI="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function OI(e,t,r){function n(o,i,a,s){var u;if(typeof o=="string"&&(o=TI(o)),typeof i=="string"&&(i=EI(i)),((u=i)===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+o.length);if(c.set(i),c.set(o,i.length),c=r(c),c[6]=c[6]&15|t,c[8]=c[8]&63|128,a){s=s||0;for(let l=0;l<16;++l)a[s+l]=c[l];return a}return wh(c)}try{n.name=e}catch{}return n.DNS=kI,n.URL=qI,n}var DI=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),dh={randomUUID:DI};function Gn(e,t,r){if(dh.randomUUID&&!t&&!e)return dh.randomUUID();e=e||{};let n=e.random||(e.rng||wI)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return wh(n)}function VI(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:return t^r^n;case 2:return t&r^t&n^r&n;case 3:return t^r^n}}function Sp(e,t){return e<<t|e>>>32-t}function NI(e){let t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof e=="string"){let a=unescape(encodeURIComponent(e));e=[];for(let s=0;s<a.length;++s)e.push(a.charCodeAt(s))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);let n=e.length/4+2,o=Math.ceil(n/16),i=new Array(o);for(let a=0;a<o;++a){let s=new Uint32Array(16);for(let u=0;u<16;++u)s[u]=e[a*64+u*4]<<24|e[a*64+u*4+1]<<16|e[a*64+u*4+2]<<8|e[a*64+u*4+3];i[a]=s}i[o-1][14]=(e.length-1)*8/Math.pow(2,32),i[o-1][14]=Math.floor(i[o-1][14]),i[o-1][15]=(e.length-1)*8&4294967295;for(let a=0;a<o;++a){let s=new Uint32Array(80);for(let d=0;d<16;++d)s[d]=i[a][d];for(let d=16;d<80;++d)s[d]=Sp(s[d-3]^s[d-8]^s[d-14]^s[d-16],1);let u=r[0],c=r[1],l=r[2],p=r[3],m=r[4];for(let d=0;d<80;++d){let g=Math.floor(d/20),C=Sp(u,5)+VI(g,c,l,p)+m+t[g]+s[d]>>>0;m=p,p=l,l=Sp(c,30)>>>0,c=u,u=C}r[0]=r[0]+u>>>0,r[1]=r[1]+c>>>0,r[2]=r[2]+l>>>0,r[3]=r[3]+p>>>0,r[4]=r[4]+m>>>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 MI=OI("v5",80,NI),ph=MI,Ph="2.30.44",mh=e=>`${e.protocol}//${e.hostname}${e.pathname.indexOf("/")===0?e.pathname:`/${e.pathname}`}${e.search}`,pa={pageview:"pageview",event:"event"},_s=class{constructor({client:t,uuidGenerator:r=Gn}){this.client=t,this.uuidGenerator=r}},Fp=class extends _s{constructor({client:t,uuidGenerator:r=Gn}){super({client:t,uuidGenerator:r}),this.actionData={},this.pageViewId=r(),this.nextPageViewId=this.pageViewId,this.currentLocation=mh(window.location),this.lastReferrer=Ro()?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:Ro()?document.title:"",encoding:Ro()?document.characterSet:"UTF-8"},n={screenResolution:`${screen.width}x${screen.height}`,screenColor:`${screen.colorDepth}-bit`},o={language:navigator.language,userAgent:navigator.userAgent},i={time:Date.now(),eventId:this.uuidGenerator()};return Object.assign(Object.assign(Object.assign(Object.assign({},i),n),o),r)}updateLocationForNextPageView(t,r){let{pageViewId:n,referrer:o,location:i}=this.getNextValues(t,r);this.lastReferrer=o,this.pageViewId=n,this.currentLocation=i,t===pa.pageview&&(this.nextPageViewId=this.uuidGenerator(),this.hasSentFirstPageView=!0)}getNextValues(t,r){return{pageViewId:t===pa.pageview?this.nextPageViewId:this.pageViewId,referrer:t===pa.pageview&&this.hasSentFirstPageView?this.currentLocation:this.lastReferrer,location:t===pa.pageview?this.getCurrentLocationFromPayload(r):this.currentLocation}}getCurrentLocationFromPayload(t){if(t.page){let r=o=>o.replace(/^\/?(.*)$/,"/$1");return`${(o=>o.split("/").slice(0,3).join("/"))(this.currentLocation)}${r(t.page)}`}else return mh(window.location)}},Hr=class e{constructor(t,r){if(!Us(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 n=new URL(t);return r.some(o=>new RegExp(o.replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")+"$").test(n.host))}catch{return!1}}static fromString(t){let r=t.split(".");if(r.length!==2)return null;let[n,o]=r;if(n.length!==32||isNaN(parseInt(o)))return null;let i=n.substring(0,8)+"-"+n.substring(8,12)+"-"+n.substring(12,16)+"-"+n.substring(16,20)+"-"+n.substring(20,32);return Us(i)?new e(i,Number.parseInt(o)*1e3):null}};Hr.cvo_cid="cvo_cid";Hr.expirationTime=120;var bp=class extends _s{constructor({client:t,uuidGenerator:r=Gn}){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 P(this,void 0,void 0,function*(){if(!this.client.getCurrentVisitorId)throw new Error("Could not retrieve current clientId");try{let r=new URL(t),n=yield this.client.getCurrentVisitorId();return r.searchParams.set(Hr.cvo_cid,new Hr(n,Date.now()).toString()),r.toString()}catch{throw new Error("Invalid URL provided")}})}acceptFrom(t){this.client.setAcceptedLinkReferrers(t)}};bp.Id="link";var It=Object.keys;function Ls(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}var Cp=128,Eh=192,gh=224,fh=240;function QI(e){return(e&248)===fh?4:(e&fh)===gh?3:(e&gh)===Eh?2:1}function LI(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 n=Number.parseInt(e.substring(r-2,r),16);if((n&Cp)!=Cp)break;if(r-=3,(n&Eh)!=Cp){t-r>=QI(n)*3&&(r=t);break}}return e.substring(0,r)}var vp={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"},UI=It(vp).map(e=>vp[e]),_I=[...UI].join("|"),BI=new RegExp(`^(${_I}$)`),jI={svcAction:"svc_action",svcActionData:"svc_action_data"},$I=e=>It(e).filter(t=>e[t]!==void 0).reduce((t,r)=>{let n=vp[r]||r;return Object.assign(Object.assign({},t),{[n]:e[r]})},{}),GI=e=>BI.test(e),zI=[GI],hh={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",price:"pr",quantity:"qt",coupon:"cc",position:"ps",group:"group"},yh={id:"id",name:"nm",brand:"br",category:"ca",variant:"va",position:"ps",price:"pr",group:"group"},He={action:"pa",list:"pal",listSource:"pls"},Bs={id:"ti",revenue:"tr",tax:"tt",shipping:"ts",coupon:"tcc",affiliation:"ta",step:"cos",option:"col"},HI=["loyaltyCardId","loyaltyTier","thirdPartyPersona","companyName","favoriteStore","storeName","userIndustry","userRole","userDepartment","businessUnit"],Ip={id:"quoteId",affiliation:"quoteAffiliation"},wp={id:"reviewId",rating:"reviewRating",comment:"reviewComment"},WI={add:He,bookmark_add:He,bookmark_remove:He,click:He,checkout:He,checkout_option:He,detail:He,impression:He,remove:He,refund:Object.assign(Object.assign({},He),Bs),purchase:Object.assign(Object.assign({},He),Bs),quickview:He,quote:Object.assign(Object.assign({},He),Ip),review:Object.assign(Object.assign({},He),wp)},YI=It(hh).map(e=>hh[e]),KI=It(yh).map(e=>yh[e]),JI=It(He).map(e=>He[e]),XI=It(Bs).map(e=>Bs[e]),ZI=It(wp).map(e=>wp[e]),ew=It(Ip).map(e=>Ip[e]),tw=[...YI,"custom"].join("|"),rw=[...KI,"custom"].join("|"),Th="(pr[0-9]+)",kh="(il[0-9]+pi[0-9]+)",nw=new RegExp(`^${Th}(${tw})$`),ow=new RegExp(`^(${kh}(${rw}))|(il[0-9]+nm)$`),iw=new RegExp(`^(${JI.join("|")})$`),aw=new RegExp(`^(${XI.join("|")})$`),sw=new RegExp(`^${Th}custom$`),cw=new RegExp(`^${kh}custom$`),uw=new RegExp(`^(${[...HI,...ZI,...ew].join("|")})$`),lw=e=>nw.test(e),dw=e=>ow.test(e),pw=e=>iw.test(e),mw=e=>aw.test(e),gw=e=>uw.test(e),fw=[dw,lw,pw,mw,gw],hw=[sw,cw],yw={anonymizeIp:"aip"},Sw={eventCategory:"ec",eventAction:"ea",eventLabel:"el",eventValue:"ev",page:"dp",visitorId:"cid",clientId:"cid",userId:"uid",currencyCode:"cu"},Cw={hitType:"t",pageViewId:"pid",encoding:"de",location:"dl",referrer:"dr",screenColor:"sd",screenResolution:"sr",title:"dt",userAgent:"ua",language:"ul",eventId:"z",time:"tm"},Aw=["contentId","contentIdKey","contentType","searchHub","tab","searchUid","permanentId","contentLocale","trackingId"],xw=Object.assign(Object.assign(Object.assign(Object.assign({},yw),Sw),Cw),Aw.reduce((e,t)=>Object.assign(Object.assign({},e),{[t]:t}),{})),Pp=Object.assign(Object.assign({},xw),jI),Rw=e=>{let t=!!e.action&&WI[e.action]||{};return It(e).reduce((r,n)=>{let o=t[n]||Pp[n]||n;return Object.assign(Object.assign({},r),{[o]:e[n]})},{})},Fw=It(Pp).map(e=>Pp[e]),bw=e=>Fw.indexOf(e)!==-1,vw=e=>e==="custom",Iw=e=>[...fw,...zI,bw,vw].some(t=>t(e)),ww=e=>It(e).reduce((t,r)=>{let n=Pw(r);return n?Object.assign(Object.assign({},t),Ew(n,e[r])):Object.assign(Object.assign({},t),{[r]:e[r]})},{}),Pw=e=>{let t;return[...hw].every(r=>{var n;return t=(n=r.exec(e))===null||n===void 0?void 0:n[1],!t}),t},Ew=(e,t)=>It(t).reduce((r,n)=>Object.assign(Object.assign({},r),{[`${e}${n}`]:t[n]}),{}),Ep=class{constructor(t){this.opts=t}sendEvent(t,r){return P(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:n,preprocessRequest:o}=this.opts,i=yield this.getQueryParamsForEventType(t),{url:a,payload:s}=yield this.preProcessRequestAsPotentialJSONString(`${n}/analytics/${t}?${i}`,r,o),u=this.encodeForEventType(t,s),c=new Blob([u],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(a,c)})}isAvailable(){return"sendBeacon"in navigator}deleteHttpCookieVisitorId(){return Promise.resolve()}preProcessRequestAsPotentialJSONString(t,r,n){return P(this,void 0,void 0,function*(){let o=t,i=r;if(n){let a=yield n({url:t,body:JSON.stringify(r)},"analyticsBeacon"),{url:s,body:u}=a;o=s||t;try{i=JSON.parse(u)}catch(c){console.error("Unable to process the request body as a JSON string",c)}}return{payload:i,url:o}})}encodeForEventType(t,r){return this.isEventTypeLegacy(t)?this.encodeEventToJson(t,r):this.encodeEventToJson(t,r,this.opts.token)}getQueryParamsForEventType(t){return P(this,void 0,void 0,function*(){let{token:r,visitorIdProvider:n}=this.opts,o=yield n.getCurrentVisitorId();return[r&&this.isEventTypeLegacy(t)?`access_token=${r}`:"",o?`visitorId=${o}`:"","discardVisitInfo=true"].filter(i=>!!i).join("&")})}isEventTypeLegacy(t){return[oe.click,oe.custom,oe.search,oe.view].indexOf(t)!==-1}encodeEventToJson(t,r,n){let o=`${t}Event=${encodeURIComponent(JSON.stringify(r))}`;return n&&(o=`access_token=${encodeURIComponent(n)}&${o}`),o}},Tp=class{sendEvent(t,r){return P(this,void 0,void 0,function*(){return Promise.resolve()})}deleteHttpCookieVisitorId(){return P(this,void 0,void 0,function*(){return Promise.resolve()})}},Sh=globalThis.fetch,js=class{constructor(t){this.opts=t}sendEvent(t,r){return P(this,void 0,void 0,function*(){let{baseUrl:n,visitorIdProvider:o,preprocessRequest:i}=this.opts,a=this.shouldAppendVisitorId(t)?yield this.getVisitorIdParam():"",s={url:`${n}/analytics/${t}${a}`,credentials:"include",mode:"cors",headers:this.getHeaders(),method:"POST",body:JSON.stringify(r)},u=Object.assign(Object.assign({},s),i?yield i(s,"analyticsFetch"):{}),{url:c}=u,l=rr(u,["url"]),p;try{p=yield Sh(c,l)}catch(m){console.error("An error has occured when sending the event.",m);return}if(p.ok){let m=yield p.json();return m.visitorId&&o.setCurrentVisitorId(m.visitorId),m}else{try{p.json()}catch{}throw console.error(`An error has occured when sending the "${t}" event.`,p,r),new Error(`An error has occurred when sending the "${t}" event. Check the console logs for more details.`)}})}deleteHttpCookieVisitorId(){return P(this,void 0,void 0,function*(){let{baseUrl:t}=this.opts,r=`${t}/analytics/visit`;yield Sh(r,{headers:this.getHeaders(),method:"DELETE"})})}shouldAppendVisitorId(t){return[oe.click,oe.custom,oe.search,oe.view].indexOf(t)!==-1}getVisitorIdParam(){return P(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"})}},kp=class{constructor(t,r){xp()&&Rh()?this.storage=new Rp:xp()?this.storage=localStorage:(console.warn("BrowserRuntime detected no valid storage available.",this),this.storage=new bo),this.client=new js(t),this.beaconClient=new Ep(t),window.addEventListener("beforeunload",()=>{let n=r();for(let{eventType:o,payload:i}of n)this.beaconClient.sendEvent(o,i)})}getClientDependingOnEventType(t){return t==="click"&&this.beaconClient.isAvailable()?this.beaconClient:this.client}},qp=class{constructor(t,r){this.storage=r||new bo,this.client=new js(t)}getClientDependingOnEventType(t){return this.client}},$s=class{constructor(){this.storage=new bo,this.client=new Tp}getClientDependingOnEventType(t){return this.client}},Tw="xx",kw=e=>e?.startsWith(Tw)||!1,qw=`
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