@orderingstack/front-hooks 2.1.0 → 2.3.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.
- package/dist/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +44 -2
- package/dist/index.es.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/useChannelAvailability.d.ts +6 -0
- package/dist/src/useChannelAvailability.d.ts.map +1 -0
- package/dist/src/useCms.d.ts +1 -0
- package/dist/src/useCms.d.ts.map +1 -1
- package/dist/src/utils/timeAvailabilityFilter.d.ts +2 -1
- package/dist/src/utils/timeAvailabilityFilter.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var V=require("react"),An=require("@orderingstack/ordering-core-react");function st(e,t){const r=V.useRef(),[n,a]=V.useState(null);return V.useEffect(()=>{r.current=e},[e]),V.useEffect(()=>{function i(){var s;(s=r.current)==null||s.call(r)}if(t!==null){const s=setInterval(i,t);return a(s),()=>{a(null),clearInterval(s)}}},[t]),()=>{n&&clearInterval(n)}}var X=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Tn=Object.prototype;function On(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Tn;return e===r}var De=On;function Sn(e,t){return function(r){return e(t(r))}}var Ir=Sn,wn=Ir,Cn=wn(Object.keys,Object),In=Cn,Dn=De,Ln=In,Rn=Object.prototype,jn=Rn.hasOwnProperty;function Pn(e){if(!Dn(e))return Ln(e);var t=[];for(var r in Object(e))jn.call(e,r)&&r!="constructor"&&t.push(r);return t}var Dr=Pn,xn=typeof X=="object"&&X&&X.Object===Object&&X,Lr=xn,Nn=Lr,Mn=typeof self=="object"&&self&&self.Object===Object&&self,Un=Nn||Mn||Function("return this")(),W=Un,Bn=W,Fn=Bn.Symbol,Le=Fn,Ot=Le,Rr=Object.prototype,Hn=Rr.hasOwnProperty,Gn=Rr.toString,de=Ot?Ot.toStringTag:void 0;function Yn(e){var t=Hn.call(e,de),r=e[de];try{e[de]=void 0;var n=!0}catch{}var a=Gn.call(e);return n&&(t?e[de]=r:delete e[de]),a}var Vn=Yn,qn=Object.prototype,Wn=qn.toString;function Kn(e){return Wn.call(e)}var zn=Kn,St=Le,kn=Vn,Jn=zn,Zn="[object Null]",Xn="[object Undefined]",wt=St?St.toStringTag:void 0;function Qn(e){return e==null?e===void 0?Xn:Zn:wt&&wt in Object(e)?kn(e):Jn(e)}var Re=Qn;function ea(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var pe=ea,ta=Re,ra=pe,na="[object AsyncFunction]",aa="[object Function]",ia="[object GeneratorFunction]",sa="[object Proxy]";function oa(e){if(!ra(e))return!1;var t=ta(e);return t==aa||t==ia||t==na||t==sa}var jr=oa,ua=W,ca=ua["__core-js_shared__"],fa=ca,Ge=fa,Ct=function(){var e=/[^.]+$/.exec(Ge&&Ge.keys&&Ge.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function la(e){return!!Ct&&Ct in e}var ha=la,da=Function.prototype,va=da.toString;function pa(e){if(e!=null){try{return va.call(e)}catch{}try{return e+""}catch{}}return""}var Pr=pa,$a=jr,ga=ha,ya=pe,ma=Pr,ba=/[\\^$.*+?()[\]{}|]/g,_a=/^\[object .+?Constructor\]$/,Ea=Function.prototype,Aa=Object.prototype,Ta=Ea.toString,Oa=Aa.hasOwnProperty,Sa=RegExp("^"+Ta.call(Oa).replace(ba,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wa(e){if(!ya(e)||ga(e))return!1;var t=$a(e)?Sa:_a;return t.test(ma(e))}var Ca=wa;function Ia(e,t){return e==null?void 0:e[t]}var Da=Ia,La=Ca,Ra=Da;function ja(e,t){var r=Ra(e,t);return La(r)?r:void 0}var Q=ja,Pa=Q,xa=W,Na=Pa(xa,"DataView"),Ma=Na,Ua=Q,Ba=W,Fa=Ua(Ba,"Map"),ot=Fa,Ha=Q,Ga=W,Ya=Ha(Ga,"Promise"),Va=Ya,qa=Q,Wa=W,Ka=qa(Wa,"Set"),za=Ka,ka=Q,Ja=W,Za=ka(Ja,"WeakMap"),Xa=Za,ke=Ma,Je=ot,Ze=Va,Xe=za,Qe=Xa,xr=Re,ie=Pr,It="[object Map]",Qa="[object Object]",Dt="[object Promise]",Lt="[object Set]",Rt="[object WeakMap]",jt="[object DataView]",ei=ie(ke),ti=ie(Je),ri=ie(Ze),ni=ie(Xe),ai=ie(Qe),Z=xr;(ke&&Z(new ke(new ArrayBuffer(1)))!=jt||Je&&Z(new Je)!=It||Ze&&Z(Ze.resolve())!=Dt||Xe&&Z(new Xe)!=Lt||Qe&&Z(new Qe)!=Rt)&&(Z=function(e){var t=xr(e),r=t==Qa?e.constructor:void 0,n=r?ie(r):"";if(n)switch(n){case ei:return jt;case ti:return It;case ri:return Dt;case ni:return Lt;case ai:return Rt}return t});var $e=Z;function ii(e){return e!=null&&typeof e=="object"}var se=ii,si=Re,oi=se,ui="[object Arguments]";function ci(e){return oi(e)&&si(e)==ui}var fi=ci,Pt=fi,li=se,Nr=Object.prototype,hi=Nr.hasOwnProperty,di=Nr.propertyIsEnumerable,vi=Pt(function(){return arguments}())?Pt:function(e){return li(e)&&hi.call(e,"callee")&&!di.call(e,"callee")},Mr=vi,pi=Array.isArray,ge=pi,$i=9007199254740991;function gi(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=$i}var Ur=gi,yi=jr,mi=Ur;function bi(e){return e!=null&&mi(e.length)&&!yi(e)}var ut=bi,ae={exports:{}};function _i(){return!1}var Ei=_i;(function(e,t){var r=W,n=Ei,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===a,u=s?r.Buffer:void 0,o=u?u.isBuffer:void 0,l=o||n;e.exports=l})(ae,ae.exports);var Ai=Re,Ti=Ur,Oi=se,Si="[object Arguments]",wi="[object Array]",Ci="[object Boolean]",Ii="[object Date]",Di="[object Error]",Li="[object Function]",Ri="[object Map]",ji="[object Number]",Pi="[object Object]",xi="[object RegExp]",Ni="[object Set]",Mi="[object String]",Ui="[object WeakMap]",Bi="[object ArrayBuffer]",Fi="[object DataView]",Hi="[object Float32Array]",Gi="[object Float64Array]",Yi="[object Int8Array]",Vi="[object Int16Array]",qi="[object Int32Array]",Wi="[object Uint8Array]",Ki="[object Uint8ClampedArray]",zi="[object Uint16Array]",ki="[object Uint32Array]",R={};R[Hi]=R[Gi]=R[Yi]=R[Vi]=R[qi]=R[Wi]=R[Ki]=R[zi]=R[ki]=!0;R[Si]=R[wi]=R[Bi]=R[Ci]=R[Fi]=R[Ii]=R[Di]=R[Li]=R[Ri]=R[ji]=R[Pi]=R[xi]=R[Ni]=R[Mi]=R[Ui]=!1;function Ji(e){return Oi(e)&&Ti(e.length)&&!!R[Ai(e)]}var Zi=Ji;function Xi(e){return function(t){return e(t)}}var ct=Xi,ve={exports:{}};(function(e,t){var r=Lr,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i&&r.process,u=function(){try{var o=a&&a.require&&a.require("util").types;return o||s&&s.binding&&s.binding("util")}catch{}}();e.exports=u})(ve,ve.exports);var Qi=Zi,es=ct,xt=ve.exports,Nt=xt&&xt.isTypedArray,ts=Nt?es(Nt):Qi,ft=ts,rs=Dr,ns=$e,as=Mr,is=ge,ss=ut,os=ae.exports,us=De,cs=ft,fs="[object Map]",ls="[object Set]",hs=Object.prototype,ds=hs.hasOwnProperty;function vs(e){if(e==null)return!0;if(ss(e)&&(is(e)||typeof e=="string"||typeof e.splice=="function"||os(e)||cs(e)||as(e)))return!e.length;var t=ns(e);if(t==fs||t==ls)return!e.size;if(us(e))return!rs(e).length;for(var r in e)if(ds.call(e,r))return!1;return!0}var lt=vs,Br={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(X,function(){var r="minute",n=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(i,s,u){var o=s.prototype;u.utc=function(c){var y={date:c,utc:!0,args:arguments};return new s(y)},o.utc=function(c){var y=u(this.toDate(),{locale:this.$L,utc:!0});return c?y.add(this.utcOffset(),r):y},o.local=function(){return u(this.toDate(),{locale:this.$L,utc:!1})};var l=o.parse;o.parse=function(c){c.utc&&(this.$u=!0),this.$utils().u(c.$offset)||(this.$offset=c.$offset),l.call(this,c)};var m=o.init;o.init=function(){if(this.$u){var c=this.$d;this.$y=c.getUTCFullYear(),this.$M=c.getUTCMonth(),this.$D=c.getUTCDate(),this.$W=c.getUTCDay(),this.$H=c.getUTCHours(),this.$m=c.getUTCMinutes(),this.$s=c.getUTCSeconds(),this.$ms=c.getUTCMilliseconds()}else m.call(this)};var v=o.utcOffset;o.utcOffset=function(c,y){var O=this.$utils().u;if(O(c))return this.$u?0:O(this.$offset)?v.call(this):this.$offset;if(typeof c=="string"&&(c=function(I){I===void 0&&(I="");var B=I.match(n);if(!B)return null;var F=(""+B[0]).match(a)||["-",0,0],Y=F[0],D=60*+F[1]+ +F[2];return D===0?0:Y==="+"?D:-D}(c),c===null))return this;var w=Math.abs(c)<=16?60*c:c,A=this;if(y)return A.$offset=w,A.$u=c===0,A;if(c!==0){var P=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(A=this.local().add(w+P,r)).$offset=w,A.$x.$localOffset=P}else A=this.utc();return A};var f=o.format;o.format=function(c){var y=c||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return f.call(this,y)},o.valueOf=function(){var c=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*c},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var h=o.toDate;o.toDate=function(c){return c==="s"&&this.$offset?u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var g=o.diff;o.diff=function(c,y,O){if(c&&this.$u===c.$u)return g.call(this,c,y,O);var w=this.local(),A=u(c).local();return g.call(w,A,y,O)}}})})(Br);var ps=Br.exports,Fr={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(X,function(){var r={year:0,month:1,day:2,hour:3,minute:4,second:5},n={};return function(a,i,s){var u,o=function(f,h,g){g===void 0&&(g={});var c=new Date(f),y=function(O,w){w===void 0&&(w={});var A=w.timeZoneName||"short",P=O+"|"+A,I=n[P];return I||(I=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:O,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:A}),n[P]=I),I}(h,g);return y.formatToParts(c)},l=function(f,h){for(var g=o(f,h),c=[],y=0;y<g.length;y+=1){var O=g[y],w=O.type,A=O.value,P=r[w];P>=0&&(c[P]=parseInt(A,10))}var I=c[3],B=I===24?0:I,F=c[0]+"-"+c[1]+"-"+c[2]+" "+B+":"+c[4]+":"+c[5]+":000",Y=+f;return(s.utc(F).valueOf()-(Y-=Y%1e3))/6e4},m=i.prototype;m.tz=function(f,h){f===void 0&&(f=u);var g=this.utcOffset(),c=this.toDate(),y=c.toLocaleString("en-US",{timeZone:f}),O=Math.round((c-new Date(y))/1e3/60),w=s(y).$set("millisecond",this.$ms).utcOffset(15*-Math.round(c.getTimezoneOffset()/15)-O,!0);if(h){var A=w.utcOffset();w=w.add(g-A,"minute")}return w.$x.$timezone=f,w},m.offsetName=function(f){var h=this.$x.$timezone||s.tz.guess(),g=o(this.valueOf(),h,{timeZoneName:f}).find(function(c){return c.type.toLowerCase()==="timezonename"});return g&&g.value};var v=m.startOf;m.startOf=function(f,h){if(!this.$x||!this.$x.$timezone)return v.call(this,f,h);var g=s(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return v.call(g,f,h).tz(this.$x.$timezone,!0)},s.tz=function(f,h,g){var c=g&&h,y=g||h||u,O=l(+s(),y);if(typeof f!="string")return s(f).tz(y);var w=function(B,F,Y){var D=B-60*F*1e3,S=l(D,Y);if(F===S)return[D,F];var z=l(D-=60*(S-F)*1e3,Y);return S===z?[D,S]:[B-60*Math.min(S,z)*1e3,Math.max(S,z)]}(s.utc(f,c).valueOf(),O,y),A=w[0],P=w[1],I=s(A).utcOffset(P);return I.$x.$timezone=y,I},s.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},s.tz.setDefault=function(f){u=f}}})})(Fr);var $s=Fr.exports,Hr={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(X,function(){var r=1e3,n=6e4,a=36e5,i="millisecond",s="second",u="minute",o="hour",l="day",m="week",v="month",f="quarter",h="year",g="date",c="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|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,w={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("_")},A=function(T,$,d){var b=String(T);return!b||b.length>=$?T:""+Array($+1-b.length).join(d)+T},P={s:A,z:function(T){var $=-T.utcOffset(),d=Math.abs($),b=Math.floor(d/60),p=d%60;return($<=0?"+":"-")+A(b,2,"0")+":"+A(p,2,"0")},m:function T($,d){if($.date()<d.date())return-T(d,$);var b=12*(d.year()-$.year())+(d.month()-$.month()),p=$.clone().add(b,v),E=d-p<0,_=$.clone().add(b+(E?-1:1),v);return+(-(b+(d-p)/(E?p-_:_-p))||0)},a:function(T){return T<0?Math.ceil(T)||0:Math.floor(T)},p:function(T){return{M:v,y:h,w:m,d:l,D:g,h:o,m:u,s,ms:i,Q:f}[T]||String(T||"").toLowerCase().replace(/s$/,"")},u:function(T){return T===void 0}},I="en",B={};B[I]=w;var F=function(T){return T instanceof z},Y=function T($,d,b){var p;if(!$)return I;if(typeof $=="string"){var E=$.toLowerCase();B[E]&&(p=E),d&&(B[E]=d,p=E);var _=$.split("-");if(!p&&_.length>1)return T(_[0])}else{var C=$.name;B[C]=$,p=C}return!b&&p&&(I=p),p||!b&&I},D=function(T,$){if(F(T))return T.clone();var d=typeof $=="object"?$:{};return d.date=T,d.args=arguments,new z(d)},S=P;S.l=Y,S.i=F,S.w=function(T,$){return D(T,{locale:$.$L,utc:$.$u,x:$.$x,$offset:$.$offset})};var z=function(){function T(d){this.$L=Y(d.locale,null,!0),this.parse(d)}var $=T.prototype;return $.parse=function(d){this.$d=function(b){var p=b.date,E=b.utc;if(p===null)return new Date(NaN);if(S.u(p))return new Date;if(p instanceof Date)return new Date(p);if(typeof p=="string"&&!/Z$/i.test(p)){var _=p.match(y);if(_){var C=_[2]-1||0,x=(_[7]||"0").substring(0,3);return E?new Date(Date.UTC(_[1],C,_[3]||1,_[4]||0,_[5]||0,_[6]||0,x)):new Date(_[1],C,_[3]||1,_[4]||0,_[5]||0,_[6]||0,x)}}return new Date(p)}(d),this.$x=d.x||{},this.init()},$.init=function(){var d=this.$d;this.$y=d.getFullYear(),this.$M=d.getMonth(),this.$D=d.getDate(),this.$W=d.getDay(),this.$H=d.getHours(),this.$m=d.getMinutes(),this.$s=d.getSeconds(),this.$ms=d.getMilliseconds()},$.$utils=function(){return S},$.isValid=function(){return this.$d.toString()!==c},$.isSame=function(d,b){var p=D(d);return this.startOf(b)<=p&&p<=this.endOf(b)},$.isAfter=function(d,b){return D(d)<this.startOf(b)},$.isBefore=function(d,b){return this.endOf(b)<D(d)},$.$g=function(d,b,p){return S.u(d)?this[b]:this.set(p,d)},$.unix=function(){return Math.floor(this.valueOf()/1e3)},$.valueOf=function(){return this.$d.getTime()},$.startOf=function(d,b){var p=this,E=!!S.u(b)||b,_=S.p(d),C=function(te,H){var J=S.w(p.$u?Date.UTC(p.$y,H,te):new Date(p.$y,H,te),p);return E?J:J.endOf(l)},x=function(te,H){return S.w(p.toDate()[te].apply(p.toDate("s"),(E?[0,0,0,0]:[23,59,59,999]).slice(H)),p)},j=this.$W,M=this.$M,k=this.$D,K="set"+(this.$u?"UTC":"");switch(_){case h:return E?C(1,0):C(31,11);case v:return E?C(1,M):C(0,M+1);case m:var le=this.$locale().weekStart||0,he=(j<le?j+7:j)-le;return C(E?k-he:k+(6-he),M);case l:case g:return x(K+"Hours",0);case o:return x(K+"Minutes",1);case u:return x(K+"Seconds",2);case s:return x(K+"Milliseconds",3);default:return this.clone()}},$.endOf=function(d){return this.startOf(d,!1)},$.$set=function(d,b){var p,E=S.p(d),_="set"+(this.$u?"UTC":""),C=(p={},p[l]=_+"Date",p[g]=_+"Date",p[v]=_+"Month",p[h]=_+"FullYear",p[o]=_+"Hours",p[u]=_+"Minutes",p[s]=_+"Seconds",p[i]=_+"Milliseconds",p)[E],x=E===l?this.$D+(b-this.$W):b;if(E===v||E===h){var j=this.clone().set(g,1);j.$d[C](x),j.init(),this.$d=j.set(g,Math.min(this.$D,j.daysInMonth())).$d}else C&&this.$d[C](x);return this.init(),this},$.set=function(d,b){return this.clone().$set(d,b)},$.get=function(d){return this[S.p(d)]()},$.add=function(d,b){var p,E=this;d=Number(d);var _=S.p(b),C=function(M){var k=D(E);return S.w(k.date(k.date()+Math.round(M*d)),E)};if(_===v)return this.set(v,this.$M+d);if(_===h)return this.set(h,this.$y+d);if(_===l)return C(1);if(_===m)return C(7);var x=(p={},p[u]=n,p[o]=a,p[s]=r,p)[_]||1,j=this.$d.getTime()+d*x;return S.w(j,this)},$.subtract=function(d,b){return this.add(-1*d,b)},$.format=function(d){var b=this,p=this.$locale();if(!this.isValid())return p.invalidDate||c;var E=d||"YYYY-MM-DDTHH:mm:ssZ",_=S.z(this),C=this.$H,x=this.$m,j=this.$M,M=p.weekdays,k=p.months,K=function(H,J,He,me){return H&&(H[J]||H(b,E))||He[J].slice(0,me)},le=function(H){return S.s(C%12||12,H,"0")},he=p.meridiem||function(H,J,He){var me=H<12?"AM":"PM";return He?me.toLowerCase():me},te={YY:String(this.$y).slice(-2),YYYY:this.$y,M:j+1,MM:S.s(j+1,2,"0"),MMM:K(p.monthsShort,j,k,3),MMMM:K(k,j),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:K(p.weekdaysMin,this.$W,M,2),ddd:K(p.weekdaysShort,this.$W,M,3),dddd:M[this.$W],H:String(C),HH:S.s(C,2,"0"),h:le(1),hh:le(2),a:he(C,x,!0),A:he(C,x,!1),m:String(x),mm:S.s(x,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:_};return E.replace(O,function(H,J){return J||te[H]||_.replace(":","")})},$.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},$.diff=function(d,b,p){var E,_=S.p(b),C=D(d),x=(C.utcOffset()-this.utcOffset())*n,j=this-C,M=S.m(this,C);return M=(E={},E[h]=M/12,E[v]=M,E[f]=M/3,E[m]=(j-x)/6048e5,E[l]=(j-x)/864e5,E[o]=j/a,E[u]=j/n,E[s]=j/r,E)[_]||j,p?M:S.a(M)},$.daysInMonth=function(){return this.endOf(v).$D},$.$locale=function(){return B[this.$L]},$.locale=function(d,b){if(!d)return this.$L;var p=this.clone(),E=Y(d,b,!0);return E&&(p.$L=E),p},$.clone=function(){return S.w(this.$d,this)},$.toDate=function(){return new Date(this.valueOf())},$.toJSON=function(){return this.isValid()?this.toISOString():null},$.toISOString=function(){return this.$d.toISOString()},$.toString=function(){return this.$d.toUTCString()},T}(),Tt=z.prototype;return D.prototype=Tt,[["$ms",i],["$s",s],["$m",u],["$H",o],["$W",l],["$M",v],["$y",h],["$D",g]].forEach(function(T){Tt[T[1]]=function($){return this.$g($,T[0],T[1])}}),D.extend=function(T,$){return T.$i||(T($,z,D),T.$i=!0),D},D.locale=Y,D.isDayjs=F,D.unix=function(T){return D(1e3*T)},D.en=B[I],D.Ls=B,D.p={},D})})(Hr);var Se=Hr.exports;Se.extend(ps);Se.extend($s);const gs=["SUN","MON","TUE","WED","THU","FRI","SAT"],Mt=e=>{const[t,r]=e.split(":");return{hour:parseInt(t||"0",10),minutes:parseInt(r||"0",10)}};function et(e,t,r){const{availability:n}=e;if(!n)return!0;if(lt(n))return!1;const a=r?Se(r).tz(t):Se().tz(t),i=a.day(),s=n[gs[i]];if(!Array.isArray(s)||s.length!==2)return!1;const u=a.hour(),o=a.minute(),l=Mt(s[0]),m=Mt(s[1]);return u<l.hour||u===l.hour&&o<l.minutes?!1:!(u>m.hour||u===m.hour&&o>m.minutes)}const tt=(e,t=void 0,r=void 0,n=!1)=>n?e.map(i=>{let s;return Array.isArray(i.items)&&(s=tt(i.items,t,r,n)),{...i,items:s,outsideAvailabilitySlot:!et(i,t,r)||(s==null?void 0:s.every(u=>u.outsideAvailabilitySlot))||!1}}):e.filter(i=>et(i,t,r)).map(i=>Array.isArray(i.items)?{...i,items:tt(i.items,t,r)}:i),Ut=(e,t=void 0,r=void 0,n=!1)=>{let a=[];return e.forEach(i=>{if(!Array.isArray(i.items)){a.push(i);return}const s=tt(i.items,t,r,n);s.length>0&&a.push({...i,items:s})}),n&&(a=a.map(i=>!i.items||!Array.isArray(i.items)?i:{...i,outsideAvailabilitySlot:!et(i,t,r)||i.items.every(s=>s.outsideAvailabilitySlot)})),a};function ys(){this.__data__=[],this.size=0}var ms=ys;function bs(e,t){return e===t||e!==e&&t!==t}var ht=bs,_s=ht;function Es(e,t){for(var r=e.length;r--;)if(_s(e[r][0],t))return r;return-1}var je=Es,As=je,Ts=Array.prototype,Os=Ts.splice;function Ss(e){var t=this.__data__,r=As(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Os.call(t,r,1),--this.size,!0}var ws=Ss,Cs=je;function Is(e){var t=this.__data__,r=Cs(t,e);return r<0?void 0:t[r][1]}var Ds=Is,Ls=je;function Rs(e){return Ls(this.__data__,e)>-1}var js=Rs,Ps=je;function xs(e,t){var r=this.__data__,n=Ps(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Ns=xs,Ms=ms,Us=ws,Bs=Ds,Fs=js,Hs=Ns;function oe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}oe.prototype.clear=Ms;oe.prototype.delete=Us;oe.prototype.get=Bs;oe.prototype.has=Fs;oe.prototype.set=Hs;var Pe=oe,Gs=Pe;function Ys(){this.__data__=new Gs,this.size=0}var Vs=Ys;function qs(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var Ws=qs;function Ks(e){return this.__data__.get(e)}var zs=Ks;function ks(e){return this.__data__.has(e)}var Js=ks,Zs=Q,Xs=Zs(Object,"create"),xe=Xs,Bt=xe;function Qs(){this.__data__=Bt?Bt(null):{},this.size=0}var eo=Qs;function to(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ro=to,no=xe,ao="__lodash_hash_undefined__",io=Object.prototype,so=io.hasOwnProperty;function oo(e){var t=this.__data__;if(no){var r=t[e];return r===ao?void 0:r}return so.call(t,e)?t[e]:void 0}var uo=oo,co=xe,fo=Object.prototype,lo=fo.hasOwnProperty;function ho(e){var t=this.__data__;return co?t[e]!==void 0:lo.call(t,e)}var vo=ho,po=xe,$o="__lodash_hash_undefined__";function go(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=po&&t===void 0?$o:t,this}var yo=go,mo=eo,bo=ro,_o=uo,Eo=vo,Ao=yo;function ue(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ue.prototype.clear=mo;ue.prototype.delete=bo;ue.prototype.get=_o;ue.prototype.has=Eo;ue.prototype.set=Ao;var To=ue,Ft=To,Oo=Pe,So=ot;function wo(){this.size=0,this.__data__={hash:new Ft,map:new(So||Oo),string:new Ft}}var Co=wo;function Io(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Do=Io,Lo=Do;function Ro(e,t){var r=e.__data__;return Lo(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Ne=Ro,jo=Ne;function Po(e){var t=jo(this,e).delete(e);return this.size-=t?1:0,t}var xo=Po,No=Ne;function Mo(e){return No(this,e).get(e)}var Uo=Mo,Bo=Ne;function Fo(e){return Bo(this,e).has(e)}var Ho=Fo,Go=Ne;function Yo(e,t){var r=Go(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Vo=Yo,qo=Co,Wo=xo,Ko=Uo,zo=Ho,ko=Vo;function ce(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ce.prototype.clear=qo;ce.prototype.delete=Wo;ce.prototype.get=Ko;ce.prototype.has=zo;ce.prototype.set=ko;var Gr=ce,Jo=Pe,Zo=ot,Xo=Gr,Qo=200;function eu(e,t){var r=this.__data__;if(r instanceof Jo){var n=r.__data__;if(!Zo||n.length<Qo-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Xo(n)}return r.set(e,t),this.size=r.size,this}var tu=eu,ru=Pe,nu=Vs,au=Ws,iu=zs,su=Js,ou=tu;function fe(e){var t=this.__data__=new ru(e);this.size=t.size}fe.prototype.clear=nu;fe.prototype.delete=au;fe.prototype.get=iu;fe.prototype.has=su;fe.prototype.set=ou;var Yr=fe,uu="__lodash_hash_undefined__";function cu(e){return this.__data__.set(e,uu),this}var fu=cu;function lu(e){return this.__data__.has(e)}var hu=lu,du=Gr,vu=fu,pu=hu;function we(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new du;++t<r;)this.add(e[t])}we.prototype.add=we.prototype.push=vu;we.prototype.has=pu;var $u=we;function gu(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var yu=gu;function mu(e,t){return e.has(t)}var bu=mu,_u=$u,Eu=yu,Au=bu,Tu=1,Ou=2;function Su(e,t,r,n,a,i){var s=r&Tu,u=e.length,o=t.length;if(u!=o&&!(s&&o>u))return!1;var l=i.get(e),m=i.get(t);if(l&&m)return l==t&&m==e;var v=-1,f=!0,h=r&Ou?new _u:void 0;for(i.set(e,t),i.set(t,e);++v<u;){var g=e[v],c=t[v];if(n)var y=s?n(c,g,v,t,e,i):n(g,c,v,e,t,i);if(y!==void 0){if(y)continue;f=!1;break}if(h){if(!Eu(t,function(O,w){if(!Au(h,w)&&(g===O||a(g,O,r,n,i)))return h.push(w)})){f=!1;break}}else if(!(g===c||a(g,c,r,n,i))){f=!1;break}}return i.delete(e),i.delete(t),f}var Vr=Su,wu=W,Cu=wu.Uint8Array,qr=Cu;function Iu(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var Du=Iu;function Lu(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Ru=Lu,Ht=Le,Gt=qr,ju=ht,Pu=Vr,xu=Du,Nu=Ru,Mu=1,Uu=2,Bu="[object Boolean]",Fu="[object Date]",Hu="[object Error]",Gu="[object Map]",Yu="[object Number]",Vu="[object RegExp]",qu="[object Set]",Wu="[object String]",Ku="[object Symbol]",zu="[object ArrayBuffer]",ku="[object DataView]",Yt=Ht?Ht.prototype:void 0,Ye=Yt?Yt.valueOf:void 0;function Ju(e,t,r,n,a,i,s){switch(r){case ku:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case zu:return!(e.byteLength!=t.byteLength||!i(new Gt(e),new Gt(t)));case Bu:case Fu:case Yu:return ju(+e,+t);case Hu:return e.name==t.name&&e.message==t.message;case Vu:case Wu:return e==t+"";case Gu:var u=xu;case qu:var o=nΜif(u||(u=Nu),e.size!=t.size&&!o)return!1;var l=s.get(e);if(l)return l==t;n|=Uu,s.set(e,t);var m=Pu(u(e),u(t),n,a,i,s);return s.delete(e),m;case Ku:if(Ye)return Ye.call(e)==Ye.call(t)}return!1}var Zu=Ju;function Xu(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var Wr=Xu,Qu=Wr,ec=ge;function tc(e,t,r){var n=t(e);return ec(e)?n:Qu(n,r(e))}var Kr=tc;function rc(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[a++]=s)}return i}var nc=rc;function ac(){return[]}var zr=ac,ic=nc,sc=zr,oc=Object.prototype,uc=oc.propertyIsEnumerable,Vt=Object.getOwnPropertySymbols,cc=Vt?function(e){return e==null?[]:(e=Object(e),ic(Vt(e),function(t){return uc.call(e,t)}))}:sc,dt=cc;function fc(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var lc=fc,hc=9007199254740991,dc=/^(?:0|[1-9]\d*)$/;function vc(e,t){var r=typeof e;return t=t==null?hc:t,!!t&&(r=="number"||r!="symbol"&&dc.test(e))&&e>-1&&e%1==0&&e<t}var pc=vc,$c=lc,gc=Mr,yc=ge,mc=ae.exports,bc=pc,_c=ft,Ec=Object.prototype,Ac=Ec.hasOwnProperty;function Tc(e,t){var r=yc(e),n=!r&&gc(e),a=!r&&!n&&mc(e),i=!r&&!n&&!a&&_c(e),s=r||n||a||i,u=s?$c(e.length,String):[],o=u.length;for(var l in e)(t||Ac.call(e,l))&&!(s&&(l=="length"||a&&(l=="offset"||l=="parent")||i&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||bc(l,o)))&&u.push(l);return u}var kr=Tc,Oc=kr,Sc=Dr,wc=ut;function Cc(e){return wc(e)?Oc(e):Sc(e)}var vt=Cc,Ic=Kr,Dc=dt,Lc=vt;function Rc(e){return Ic(e,Lc,Dc)}var Jr=Rc,qt=Jr,jc=1,Pc=Object.prototype,xc=Pc.hasOwnProperty;function Nc(e,t,r,n,a,i){var s=r&jc,u=qt(e),o=u.length,l=qt(t),m=l.length;if(o!=m&&!s)return!1;for(var v=o;v--;){var f=u[v];if(!(s?f in t:xc.call(t,f)))return!1}var h=i.get(e),g=i.get(t);if(h&&g)return h==t&&g==e;var c=!0;i.set(e,t),i.set(t,e);for(var y=s;++v<o;){f=u[v];var O=e[f],w=t[f];if(n)var A=s?n(w,O,f,t,e,i):n(O,w,f,e,t,i);if(!(A===void 0?O===w||a(O,w,r,n,i):A)){c=!1;break}y||(y=f=="constructor")}if(c&&!y){var P=e.constructor,I=t.constructor;P!=I&&"constructor"in e&&"constructor"in t&&!(typeof P=="function"&&P instanceof P&&typeof I=="function"&&I instanceof I)&&(c=!1)}return i.delete(e),i.delete(t),c}var Mc=Nc,Ve=Yr,Uc=Vr,Bc=Zu,Fc=Mc,Wt=$e,Kt=ge,zt=ae.exports,Hc=ft,Gc=1,kt="[object Arguments]",Jt="[object Array]",be="[object Object]",Yc=Object.prototype,Zt=Yc.hasOwnProperty;function Vc(e,t,r,n,a,i){var s=Kt(e),u=Kt(t),o=s?Jt:Wt(e),l=u?Jt:Wt(t);o=o==kt?be:o,l=l==kt?be:l;var m=o==be,v=l==be,f=o==l;if(f&&zt(e)){if(!zt(t))return!1;s=!0,m=!1}if(f&&!m)return i||(i=new Ve),s||Hc(e)?Uc(e,t,r,n,a,i):Bc(e,t,o,r,n,a,i);if(!(r&Gc)){var h=m&&Zt.call(e,"__wrapped__"),g=v&&Zt.call(t,"__wrapped__");if(h||g){var c=h?e.value():e,y=g?t.value():t;return i||(i=new Ve),a(c,y,r,n,i)}}return f?(i||(i=new Ve),Fc(e,t,r,n,a,i)):!1}var qc=Vc,Wc=qc,Xt=se;function Zr(e,t,r,n,a){return e===t?!0:e==null||t==null||!Xt(e)&&!Xt(t)?e!==e&&t!==t:Wc(e,t,r,n,Zr,a)}var Kc=Zr,zc=Kc;function kc(e,t){return zc(e,t)}var Xr=kc;function Jc(e,t=!1,r=void 0,n=60){const[a,i]=V.useState(e&&Ut(e,r,void 0,t));st(s,n*1e3);function s(){const u=e&&Ut(e,r,void 0,t);Xr(u,a)||(console.log("menu has changed",u),i(u))}return V.useEffect(s,[a,e]),a}var Qt;(function(e){e.UNINITIALIZED="UNINITIALIZED",e.PROCESSING="PROCESSING",e.PAID="PAID",e.PRINTING_RECEIPT="PRINTING_RECEIPT",e.PRINTING_RECEIPT_SUCCESS="PRINTING_RECEIPT_SUCCESS",e.SENDING_RECEIPT="SENDING_RECEIPT",e.SENDING_RECEIPT_SUCCESS="SENDING_RECEIPT_SUCCESS",e.ERROR="ERROR"})(Qt||(Qt={}));var er;(function(e){e.CAROUSEL="carousel",e.NORMAL="normal",e.IMAGE="image"})(er||(er={}));var rt;(function(e){e.GROUP="3e/group",e.PRODUCT="3e/product",e.CATEGORY="3e/group/category",e.OPTIONS="3e/group/options",e.CONFIG="3e/group/config",e.STATIC="3e/static",e.REF="3e/ref",e.QUERY="3e/query"})(rt||(rt={}));var tr;(function(e){e.GROUP="group",e.PRODUCT="product"})(tr||(tr={}));var rr;(function(e){e.TAKE_AWAY="TAKE_AWAY",e.DELIVERY="DELIVERY",e.DINE_IN="DINE_IN",e.DINE_IN_OPEN="DINE_IN_OPEN",e.GLOVO_DELIVERY="GLOVO_DELIVERY",e.GLOVO_TAKE_AWAY="GLOVO_TAKE_AWAY",e.JUSTEAT_DELIVERY="JUSTEAT_DELIVERY",e.JUSTEAT_TAKE_AWAY="JUSTEAT_TAKE_AWAY",e.UBER_DELIVERY="UBER_DELIVERY",e.UBER_TAKE_AWAY="UBER_TAKE_AWAY",e.UBER_DINE_IN="UBER_DINE_IN",e.BOLT_DELIVERY="BOLT_DELIVERY",e.BOLT_TAKE_AWAY="BOLT_TAKE_AWAY",e.WOLT_DELIVERY="WOLT_DELIVERY",e.WOLT_TAKE_AWAY="WOLT_TAKE_AWAY",e.WOLT_DINE_IN="WOLT_DINE_IN"})(rr||(rr={}));var nr;(function(e){e.NEW="NEW",e.COMPLETED="COMPLETED",e.VERIFIED="VERIFIED",e.DELIVER="DELIVER",e.DELIVERED="DELIVERED",e.CLOSED="CLOSED",e.ABANDONED="ABANDONED",e.CANCELLED="CANCELLED",e.PICKED="PICKED"})(nr||(nr={}));var ar;(function(e){e.CASH="CASH",e.CARD="CARD",e.COD="COD",e.TERMINAL="TERMINAL",e.EPAYMENT="EPAYMENT",e.COUPON="COUPON",e.WALLET="WALLET",e.PREAUTHORIZED="PREAUTHORIZED",e.RETURN="RETURN",e.EXTERNAL="EXTERNAL"})(ar||(ar={}));var ir;(function(e){e.KIOSK="KIOSK",e.WEB="WEB",e.JUST_EAT_TAKE_AWAY="JUSTEATTAKEAWAY",e.GLOVO="GLOVO",e.PYSZNE="PYSZNE",e.WOLT="WOLT",e.UBER="UBER",e.BOLT="BOLT"})(ir||(ir={}));var sr;(function(e){e.NEW="NEW",e.TECHNICAL="TECHNICAL",e.CONFIRMED="CONFIRMED",e.PROCESSING="PROCESSING",e.PROCESSED="PROCESSED",e.VOID="VOID",e.WASTE="WASTE"})(sr||(sr={}));var or;(function(e){e.GROUP="group",e.PRODUCT="product"})(or||(or={}));var ur;(function(e){e.DINE_IN="DINE_IN",e.TAKE_AWAY="TAKE_AWAY",e.DELIVERY="DELIVERY",e.GLOVO_DELIVERY="GLOVO_DELIVERY",e.JUSTEAT_DELIVERY="JUSTEAT_DELIVERY",e.UBER_DELIVERY="UBER_DELIVERY",e.BOLT_DELIVERY="BOLT_DELIVERY",e.WOLT_DELIVERY="WOLT_DELIVERY"})(ur||(ur={}));function Zc(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var Xc=Zc,Qc=Q,ef=function(){try{var e=Qc(Object,"defineProperty");return e({},"",{}),e}catch{}}(),tf=ef,cr=tf;function rf(e,t,r){t=="__proto__"&&cr?cr(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var Qr=rf,nf=Qr,af=ht,sf=Object.prototype,of=sf.hasOwnProperty;function uf(e,t,r){var n=e[t];(!(of.call(e,t)&&af(n,r))||r===void 0&&!(t in e))&&nf(e,t,r)}var en=uf,cf=en,ff=Qr;function lf(e,t,r,n){var a=!r;r||(r={});for(var i=-1,s=t.length;++i<s;){var u=t[i],o=n?n(r[u],e[u],u,r,e):void 0;o===void 0&&(o=e[u]),a?ff(r,u,o):cf(r,u,o)}return r}var Me=lf,hf=Me,df=vt;function vf(e,t){return e&&hf(t,df(t),e)}var pf=vf;function $f(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var gf=$f,yf=pe,mf=De,bf=gf,_f=Object.prototype,Ef=_f.hasOwnProperty;function Af(e){if(!yf(e))return bf(e);var t=mf(e),r=[];for(var n in e)n=="constructor"&&(t||!Ef.call(e,n))||r.push(n);return r}var Tf=Af,Of=kr,Sf=Tf,wf=ut;function Cf(e){return wf(e)?Of(e,!0):Sf(e)}var pt=Cf,If=Me,Df=pt;function Lf(e,t){return e&&If(t,Df(t),e)}var Rf=Lf,nt={exports:{}};(function(e,t){var r=W,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i?r.Buffer:void 0,u=s?s.allocUnsafe:void 0;function o(l,m){if(m)return l.slice();var v=l.length,f=u?u(v):new l.constructor(v);return l.copy(f),f}e.exports=o})(nt,nt.exports);function jf(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var Pf=jf,xf=Me,Nf=dt;function Mf(e,t){return xf(e,Nf(e),t)}var Uf=Mf,Bf=Ir,Ff=Bf(Object.getPrototypeOf,Object),tn=Ff,Hf=Wr,Gf=tn,Yf=dt,Vf=zr,qf=Object.getOwnPropertySymbols,Wf=qf?function(e){for(var t=[];e;)Hf(t,Yf(e)),e=Gf(e);return t}:Vf,rn=Wf,Kf=Me,zf=rn;function kf(e,t){return Kf(e,zf(e),t)}var Jf=kf,Zf=Kr,Xf=rn,Qf=pt;function el(e){return Zf(e,Qf,Xf)}var tl=el,rl=Object.prototype,nl=rl.hasOwnProperty;function al(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&nl.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var il=al,fr=qr;function sl(e){var t=new e.constructor(e.byteLength);return new fr(t).set(new fr(e)),t}var $t=sl,ol=$t;function ul(e,t){var r=t?ol(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var cl=ul,fl=/\w*$/;function ll(e){var t=new e.constructor(e.source,fl.exec(e));return t.lastIndex=e.lastIndex,t}var hl=ll,lr=Le,hr=lr?lr.prototype:void 0,dr=hr?hr.valueOf:void 0;function dl(e){return dr?Object(dr.call(e)):{}}var vl=dl,pl=$t;function $l(e,t){var r=t?pl(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var gl=$l,yl=$t,ml=cl,bl=hl,_l=vl,El=gl,Al="[object Boolean]",Tl="[object Date]",Ol="[object Map]",Sl="[object Number]",wl="[object RegExp]",Cl="[object Set]",Il="[object String]",Dl="[object Symbol]",Ll="[object ArrayBuffer]",Rl="[object DataView]",jl="[object Float32Array]",Pl="[object Float64Array]",xl="[object Int8Array]",Nl="[object Int16Array]",Ml="[object Int32Array]",Ul="[object Uint8Array]",Bl="[object Uint8ClampedArray]",Fl="[object Uint16Array]",Hl="[object Uint32Array]";function Gl(e,t,r){var n=e.constructor;switch(t){case Ll:return yl(e);case Al:case Tl:return new n(+e);case Rl:return ml(e,r);case jl:case Pl:case xl:case Nl:case Ml:case Ul:case Bl:case Fl:case Hl:return El(e,r);case Ol:return new n;case Sl:case Il:return new n(e);case wl:return bl(e);case Cl:return new n;case Dl:return _l(e)}}var Yl=Gl,Vl=pe,vr=Object.create,ql=function(){function e(){}return function(t){if(!Vl(t))return{};if(vr)return vr(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),Wl=ql,Kl=Wl,zl=tn,kl=De;function Jl(e){return typeof e.constructor=="function"&&!kl(e)?Kl(zl(e)):{}}var Zl=Jl,Xl=$e,Ql=se,eh="[object Map]";function th(e){return Ql(e)&&Xl(e)==eh}var rh=th,nh=rh,ah=ct,pr=ve.exports,$r=pr&&pr.isMap,ih=$r?ah($r):nh,sh=ih,oh=$e,uh=se,ch="[object Set]";function fh(e){return uh(e)&&oh(e)==ch}var lh=fh,hh=lh,dh=ct,gr=ve.exports,yr=gr&&gr.isSet,vh=yr?dh(yr):hh,ph=vh,$h=Yr,gh=Xc,yh=en,mh=pf,bh=Rf,_h=nt.exports,Eh=Pf,Ah=Uf,Th=Jf,Oh=Jr,Sh=tl,wh=$e,Ch=il,Ih=Yl,Dh=Zl,Lh=ge,Rh=ae.exports,jh=sh,Ph=pe,xh=ph,Nh=vt,Mh=pt,Uh=1,Bh=2,Fh=4,nn="[object Arguments]",Hh="[object Array]",Gh="[object Boolean]",Yh="[object Date]",Vh="[object Error]",an="[object Function]",qh="[object GeneratorFunction]",Wh="[object Map]",Kh="[object Number]",sn="[object Object]",zh="[object RegExp]",kh="[object Set]",Jh="[object String]",Zh="[object Symbol]",Xh="[object WeakMap]",Qh="[object ArrayBuffer]",ed="[object DataView]",td="[object Float32Array]",rd="[object Float64Array]",nd="[object Int8Array]",ad="[object Int16Array]",id="[object Int32Array]",sd="[object Uint8Array]",od="[object Uint8ClampedArray]",ud="[object Uint16Array]",cd="[object Uint32Array]",L={};L[nn]=L[Hh]=L[Qh]=L[ed]=L[Gh]=L[Yh]=L[td]=L[rd]=L[nd]=L[ad]=L[id]=L[Wh]=L[Kh]=L[sn]=L[zh]=L[kh]=L[Jh]=L[Zh]=L[sd]=L[od]=L[ud]=L[cd]=!0;L[Vh]=L[an]=L[Xh]=!1;function Ae(e,t,r,n,a,i){var s,u=t&Uh,o=t&Bh,l=t&Fh;if(r&&(s=a?r(e,n,a,i):r(e)),s!==void 0)return s;if(!Ph(e))return e;var m=Lh(e);if(m){if(s=Ch(e),!u)return Eh(e,s)}else{var v=wh(e),f=v==an||v==qh;if(Rh(e))return _h(e,u);if(v==sn||v==nn||f&&!a){if(s=o||f?{}:Dh(e),!u)return o?Th(e,bh(s,e)):Ah(e,mh(s,e))}else{if(!L[v])return a?e:{};s=Ih(e,v,u)}}i||(i=new $h);var h=i.get(e);if(h)return h;i.set(e,s),xh(e)?e.forEach(function(y){s.add(Ae(y,t,r,y,e,i))}):jh(e)&&e.forEach(function(y,O){s.set(O,Ae(y,t,r,O,e,i))});var g=l?o?Sh:Oh:o?Mh:Nh,c=m?void 0:g(e);return gh(c||e,function(y,O){c&&(O=y,y=e[O]),yh(s,O,Ae(y,t,r,O,e,i))}),s}var fd=Ae,ld=fd,hd=1,dd=4;function vd(e){return ld(e,hd|dd)}var pd=vd;function $d(e,t){if(!t||!t.filter||!e||!e.filter||e.kind!==rt.CONFIG)return!0;if(e.filter&&e.items){const r=Object.values(e.filter).flat().filter(n=>{var a,i,s,u;return t.filter[(i=(a=e.items)==null?void 0:a[0])==null?void 0:i.fltCtx]&&Object.values(t.filter[(u=(s=e.items)==null?void 0:s[0])==null?void 0:u.fltCtx]).includes(n)});if(Array.isArray(r)&&r.length===0)return!1}return!0}const Ce=(e,t,r=0)=>{if(!e)return 0;let n=parseFloat(e.price)||0;const{items:a}=e,i=pd(t);return $d(e,i)&&Array.isArray(a)&&a.forEach(s=>{let u=0;if(s.kind!=="3e/product")u=Ce(s,i,r+1);else{const{selected:o={}}=i,{selCtx:l,id:m}=s;l in o&&m in o[l]&&(u=Ce(s,i,r+1)*o[l][m],delete i.selected[l][m])}n+=u}),Math.round(100*n)/100},gd=({product:e,state:t,selected:r,cheapestGroupOptionsProduct:n})=>{var o;const a=t?Ce(e,t):0,i=e.state&&!lt((o=e==null?void 0:e.state)==null?void 0:o.selected)?Ce(e,e.state):0,s=e.minPrice&&parseFloat(e.price)===a;let u=r||!!n||parseFloat(e.price)===0?a||i:parseFloat(e.price);return n!==void 0&&(u-=n),s&&e.minPrice&&(u=parseFloat(e.minPrice)),{displayPrice:u,showAsMinPrice:s,calculatedPriceDefaultProductState:i}};function gt(e){const t=[];return e.reduce((r,n)=>{if(r[n.hash]||(r[n.hash]={...n,quantity:0,discounted:0,discounts:[],firstProductQuantity:n.quantity,itemsToRemove:[]},t.push(r[n.hash])),r[n.hash].quantity+=n.quantity,r[n.hash].itemsToRemove.push(n.id),n.discounts){r[n.hash].discounts||(r[n.hash].discounts=[]),r[n.hash].discounts=r[n.hash].discounts.concat(n.discounts),r[n.hash].discounted=0;for(let a=0;a<r[n.hash].discounts.length;a+=1)r[n.hash].discounts[a]&&(r[n.hash].discounted+=parseFloat(r[n.hash].discounts[a].discountPrice))}return r},{}),t}function yd(e){return gt(e)}function md(e){return!e||e.length===0?null:gt(e.flatMap(t=>t.lines))}var yt={exports:{}},on=function(t,r){return function(){for(var a=new Array(arguments.length),i=0;i<a.length;i++)a[i]=arguments[i];return t.apply(r,a)}},bd=on,ee=Object.prototype.toString;function mt(e){return ee.call(e)==="[object Array]"}function at(e){return typeof e=="undefined"}function _d(e){return e!==null&&!at(e)&&e.constructor!==null&&!at(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function Ed(e){return ee.call(e)==="[object ArrayBuffer]"}function Ad(e){return typeof FormData!="undefined"&&e instanceof FormData}function Td(e){var t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&e.buffer instanceof ArrayBuffer,t}function Od(e){return typeof e=="string"}function Sd(e){return typeof e=="number"}function un(e){return e!==null&&typeof e=="object"}function Te(e){if(ee.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function wd(e){return ee.call(e)==="[object Date]"}function Cd(e){return ee.call(e)==="[object File]"}function Id(e){return ee.call(e)==="[object Blob]"}function cn(e){return ee.call(e)==="[object Function]"}function Dd(e){return un(e)&&cn(e.pipe)}function Ld(e){return typeof URLSearchParams!="undefined"&&e instanceof URLSearchParams}function Rd(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function jd(){return typeof navigator!="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window!="undefined"&&typeof document!="undefined"}function bt(e,t){if(!(e===null||typeof e=="undefined"))if(typeof e!="object"&&(e=[e]),mt(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.call(null,e[a],a,e)}function it(){var e={};function t(a,i){Te(e[i])&&Te(a)?e[i]=it(e[i],a):Te(a)?e[i]=it({},a):mt(a)?e[i]=a.slice():e[i]=a}for(var r=0,n=arguments.length;r<n;r++)bt(arguments[r],t);return e}function Pd(e,t,r){return bt(t,function(a,i){r&&typeof a=="function"?e[i]=bd(a,r):e[i]=a}),e}function xd(e){return e.charCodeAt(0)===65279&&(e=e.slice(1)),e}var G={isArray:mt,isArrayBuffer:Ed,isBuffer:_d,isFormData:Ad,isArrayBufferView:Td,isString:Od,isNumber:Sd,isObject:un,isPlainObject:Te,isUndefined:at,isDate:wd,isFile:Cd,isBlob:Id,isFunction:cn,isStream:Dd,isURLSearchParams:Ld,isStandardBrowserEnv:jd,forEach:bt,merge:it,extend:Pd,trim:Rd,stripBOM:xd},re=G;function mr(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var fn=function(t,r,n){if(!r)return t;var a;if(n)a=n(r);else if(re.isURLSearchParams(r))a=r.toString();else{var i=[];re.forEach(r,function(o,l){o===null||typeof o=="undefined"||(re.isArray(o)?l=l+"[]":o=[o],re.forEach(o,function(v){re.isDate(v)?v=v.toISOString():re.isObject(v)&&(v=JSON.stringify(v)),i.push(mr(l)+"="+mr(v))}))}),a=i.join("&")}if(a){var s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+a}return t},Nd=G;function Ue(){this.handlers=[]}Ue.prototype.use=function(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};Ue.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)};Ue.prototype.forEach=function(t){Nd.forEach(this.handlers,function(n){n!==null&&t(n)})};var Md=Ue,Ud=G,Bd=function(t,r){Ud.forEach(t,function(a,i){i!==r&&i.toUpperCase()===r.toUpperCase()&&(t[r]=a,delete t[i])})},ln=function(t,r,n,a,i){return t.config=r,n&&(t.code=n),t.request=a,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t},Fd=ln,hn=function(t,r,n,a,i){var s=new Error(t);return Fd(s,r,n,a,i)},Hd=hn,Gd=function(t,r,n){var a=n.config.validateStatus;!n.status||!a||a(n.status)?t(n):r(Hd("Request failed with status code "+n.status,n.config,null,n.request,n))},_e=G,Yd=_e.isStandardBrowserEnv()?function(){return{write:function(r,n,a,i,s,u){var o=[];o.push(r+"="+encodeURIComponent(n)),_e.isNumber(a)&&o.push("expires="+new Date(a).toGMTString()),_e.isString(i)&&o.push("path="+i),_e.isString(s)&&o.push("domain="+s),u===!0&&o.push("secure"),document.cookie=o.join("; ")},read:function(r){var n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),Vd=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)},qd=function(t,r){return r?t.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):t},Wd=Vd,Kd=qd,zd=function(t,r){return t&&!Wd(r)?Kd(t,r):r},qe=G,kd=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],Jd=function(t){var r={},n,a,i;return t&&qe.forEach(t.split(`
|
|
2
|
-
`),function(u){if(i=u.indexOf(":"),n=qe.trim(u.substr(0,i)).toLowerCase(),a=qe.trim(u.substr(i+1)),n){if(r[n]&&kd.indexOf(n)>=0)return;n==="set-cookie"?r[n]=(r[n]?r[n]:[]).concat([a]):r[n]=r[n]?r[n]+", "+a:a}}),r},br=G,Zd=br.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function a(i){var s=i;return t&&(r.setAttribute("href",s),s=r.href),r.setAttribute("href",s),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=a(window.location.href),function(s){var u=br.isString(s)?a(s):s;return u.protocol===n.protocol&&u.host===n.host}}():function(){return function(){return!0}}(),Ee=G,Xd=Gd,Qd=Yd,ev=fn,tv=zd,rv=Jd,nv=Zd,We=hn,_r=function(t){return new Promise(function(n,a){var i=t.data,s=t.headers,u=t.responseType;Ee.isFormData(i)&&delete s["Content-Type"];var o=new XMLHttpRequest;if(t.auth){var l=t.auth.username||"",m=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";s.Authorization="Basic "+btoa(l+":"+m)}var v=tv(t.baseURL,t.url);o.open(t.method.toUpperCase(),ev(v,t.params,t.paramsSerializer),!0),o.timeout=t.timeout;function f(){if(!!o){var g="getAllResponseHeaders"in o?rv(o.getAllResponseHeaders()):null,c=!u||u==="text"||u==="json"?o.responseText:o.response,y={data:c,status:o.status,statusText:o.statusText,headers:g,config:t,request:o};Xd(n,a,y),o=null}}if("onloadend"in o?o.onloadend=f:o.onreadystatechange=function(){!o||o.readyState!==4||o.status===0&&!(o.responseURL&&o.responseURL.indexOf("file:")===0)||setTimeout(f)},o.onabort=function(){!o||(a(We("Request aborted",t,"ECONNABORTED",o)),o=null)},o.onerror=function(){a(We("Network Error",t,null,o)),o=null},o.ontimeout=function(){var c="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(c=t.timeoutErrorMessage),a(We(c,t,t.transitional&&t.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",o)),o=null},Ee.isStandardBrowserEnv()){var h=(t.withCredentials||nv(v))&&t.xsrfCookieName?Qd.read(t.xsrfCookieName):void 0;h&&(s[t.xsrfHeaderName]=h)}"setRequestHeader"in o&&Ee.forEach(s,function(c,y){typeof i=="undefined"&&y.toLowerCase()==="content-type"?delete s[y]:o.setRequestHeader(y,c)}),Ee.isUndefined(t.withCredentials)||(o.withCredentials=!!t.withCredentials),u&&u!=="json"&&(o.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&o.addEventListener("progress",t.onDownloadProgress),typeof t.onUploadProgress=="function"&&o.upload&&o.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(c){!o||(o.abort(),a(c),o=null)}),i||(i=null),o.send(i)})},N=G,Er=Bd,av=ln,iv={"Content-Type":"application/x-www-form-urlencoded"};function Ar(e,t){!N.isUndefined(e)&&N.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function sv(){var e;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(e=_r),e}function ov(e,t,r){if(N.isString(e))try{return(t||JSON.parse)(e),N.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}var Be={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:sv(),transformRequest:[function(t,r){return Er(r,"Accept"),Er(r,"Content-Type"),N.isFormData(t)||N.isArrayBuffer(t)||N.isBuffer(t)||N.isStream(t)||N.isFile(t)||N.isBlob(t)?t:N.isArrayBufferView(t)?t.buffer:N.isURLSearchParams(t)?(Ar(r,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):N.isObject(t)||r&&r["Content-Type"]==="application/json"?(Ar(r,"application/json"),ov(t)):t}],transformResponse:[function(t){var r=this.transitional,n=r&&r.silentJSONParsing,a=r&&r.forcedJSONParsing,i=!n&&this.responseType==="json";if(i||a&&N.isString(t)&&t.length)try{return JSON.parse(t)}catch(s){if(i)throw s.name==="SyntaxError"?av(s,this,"E_JSON_PARSE"):s}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300}};Be.headers={common:{Accept:"application/json, text/plain, */*"}};N.forEach(["delete","get","head"],function(t){Be.headers[t]={}});N.forEach(["post","put","patch"],function(t){Be.headers[t]=N.merge(iv)});var _t=Be,uv=G,cv=_t,fv=function(t,r,n){var a=this||cv;return uv.forEach(n,function(s){t=s.call(a,t,r)}),t},dn=function(t){return!!(t&&t.__CANCEL__)},Tr=G,Ke=fv,lv=dn,hv=_t;function ze(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var dv=function(t){ze(t),t.headers=t.headers||{},t.data=Ke.call(t,t.data,t.headers,t.transformRequest),t.headers=Tr.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),Tr.forEach(["delete","get","head","post","put","patch","common"],function(a){delete t.headers[a]});var r=t.adapter||hv.adapter;return r(t).then(function(a){return ze(t),a.data=Ke.call(t,a.data,a.headers,t.transformResponse),a},function(a){return lv(a)||(ze(t),a&&a.response&&(a.response.data=Ke.call(t,a.response.data,a.response.headers,t.transformResponse))),Promise.reject(a)})},U=G,vn=function(t,r){r=r||{};var n={},a=["url","method","data"],i=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],u=["validateStatus"];function o(f,h){return U.isPlainObject(f)&&U.isPlainObject(h)?U.merge(f,h):U.isPlainObject(h)?U.merge({},h):U.isArray(h)?h.slice():h}function l(f){U.isUndefined(r[f])?U.isUndefined(t[f])||(n[f]=o(void 0,t[f])):n[f]=o(t[f],r[f])}U.forEach(a,function(h){U.isUndefined(r[h])||(n[h]=o(void 0,r[h]))}),U.forEach(i,l),U.forEach(s,function(h){U.isUndefined(r[h])?U.isUndefined(t[h])||(n[h]=o(void 0,t[h])):n[h]=o(void 0,r[h])}),U.forEach(u,function(h){h in r?n[h]=o(t[h],r[h]):h in t&&(n[h]=o(void 0,t[h]))});var m=a.concat(i).concat(s).concat(u),v=Object.keys(t).concat(Object.keys(r)).filter(function(h){return m.indexOf(h)===-1});return U.forEach(v,l),n};const vv="axios",pv="0.21.4",$v="Promise based HTTP client for the browser and node.js",gv="index.js",yv={test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},mv={type:"git",url:"https://github.com/axios/axios.git"},bv=["xhr","http","ajax","promise","node"],_v="Matt Zabriskie",Ev="MIT",Av={url:"https://github.com/axios/axios/issues"},Tv="https://axios-http.com",Ov={coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},Sv={"./lib/adapters/http.js":"./lib/adapters/xhr.js"},wv="dist/axios.min.js",Cv="dist/axios.min.js",Iv="./index.d.ts",Dv={"follow-redirects":"^1.14.0"},Lv=[{path:"./dist/axios.min.js",threshold:"5kB"}];var Rv={name:vv,version:pv,description:$v,main:gv,scripts:yv,repository:mv,keywords:bv,author:_v,license:Ev,bugs:Av,homepage:Tv,devDependencies:Ov,browser:Sv,jsdelivr:wv,unpkg:Cv,typings:Iv,dependencies:Dv,bundlesize:Lv},pn=Rv,Et={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){Et[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var Or={},jv=pn.version.split(".");function $n(e,t){for(var r=t?t.split("."):jv,n=e.split("."),a=0;a<3;a++){if(r[a]>n[a])return!0;if(r[a]<n[a])return!1}return!1}Et.transitional=function(t,r,n){var a=r&&$n(r);function i(s,u){return"[Axios v"+pn.version+"] Transitional option '"+s+"'"+u+(n?". "+n:"")}return function(s,u,o){if(t===!1)throw new Error(i(u," has been removed in "+r));return a&&!Or[u]&&(Or[u]=!0,console.warn(i(u," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,u,o):!0}};function Pv(e,t,r){if(typeof e!="object")throw new TypeError("options must be an object");for(var n=Object.keys(e),a=n.length;a-- >0;){var i=n[a],s=t[i];if(s){var u=e[i],o=u===void 0||s(u,i,e);if(o!==!0)throw new TypeError("option "+i+" must be "+o);continue}if(r!==!0)throw Error("Unknown option "+i)}}var xv={isOlderVersion:$n,assertOptions:Pv,validators:Et},gn=G,Nv=fn,Sr=Md,wr=dv,Fe=vn,yn=xv,ne=yn.validators;function ye(e){this.defaults=e,this.interceptors={request:new Sr,response:new Sr}}ye.prototype.request=function(t){typeof t=="string"?(t=arguments[1]||{},t.url=arguments[0]):t=t||{},t=Fe(this.defaults,t),t.method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;r!==void 0&&yn.assertOptions(r,{silentJSONParsing:ne.transitional(ne.boolean,"1.0.0"),forcedJSONParsing:ne.transitional(ne.boolean,"1.0.0"),clarifyTimeoutError:ne.transitional(ne.boolean,"1.0.0")},!1);var n=[],a=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(t)===!1||(a=a&&f.synchronous,n.unshift(f.fulfilled,f.rejected))});var i=[];this.interceptors.response.forEach(function(f){i.push(f.fulfilled,f.rejected)});var s;if(!a){var u=[wr,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(i),s=Promise.resolve(t);u.length;)s=s.then(u.shift(),u.shift());return s}for(var o=t;n.length;){var l=n.shift(),m=n.shift();try{o=l(o)}catch(v){m(v);break}}try{s=wr(o)}catch(v){return Promise.reject(v)}for(;i.length;)s=s.then(i.shift(),i.shift());return s};ye.prototype.getUri=function(t){return t=Fe(this.defaults,t),Nv(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};gn.forEach(["delete","get","head","options"],function(t){ye.prototype[t]=function(r,n){return this.request(Fe(n||{},{method:t,url:r,data:(n||{}).data}))}});gn.forEach(["post","put","patch"],function(t){ye.prototype[t]=function(r,n,a){return this.request(Fe(a||{},{method:t,url:r,data:n}))}});var Mv=ye;function At(e){this.message=e}At.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};At.prototype.__CANCEL__=!0;var mn=At,Uv=mn;function Ie(e){if(typeof e!="function")throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(a){t=a});var r=this;e(function(a){r.reason||(r.reason=new Uv(a),t(r.reason))})}Ie.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};Ie.source=function(){var t,r=new Ie(function(a){t=a});return{token:r,cancel:t}};var Bv=Ie,Fv=function(t){return function(n){return t.apply(null,n)}},Hv=function(t){return typeof t=="object"&&t.isAxiosError===!0},Cr=G,Gv=on,Oe=Mv,Yv=vn,Vv=_t;function bn(e){var t=new Oe(e),r=Gv(Oe.prototype.request,t);return Cr.extend(r,Oe.prototype,t),Cr.extend(r,t),r}var q=bn(Vv);q.Axios=Oe;q.create=function(t){return bn(Yv(q.defaults,t))};q.Cancel=mn;q.CancelToken=Bv;q.isCancel=dn;q.all=function(t){return Promise.all(t)};q.spread=Fv;q.isAxiosError=Hv;yt.exports=q;yt.exports.default=q;var qv=yt.exports;function _n(e,t=600,r=!0,n,a){var O,w;if(!n||!a)throw new Error("baseUrl or tenant was not provided");const i=`${e}_${a}_${n}`,s=`${n.endsWith("/")?n.slice(0,-1):n}/cms-api/content/${a}/${e}`,u=((O=y())==null?void 0:O.value)||null,[o,l]=V.useState(((w=y())==null?void 0:w.timestamp)||0),[m,v]=V.useState(u||null),[f,h]=V.useState(!1);function g(){qv.get(s).then(A=>{if(lt(A.data))throw new Error(`CMS data '${e}' is an empty object`);Xr(A.data,m)||v(A.data),f&&h(!1),r&&c(A.data)}).catch(A=>{console.error(A),h(!0)})}function c(A){const P=new Date().valueOf(),I=JSON.stringify({value:A,timestamp:P});localStorage.setItem(i,I),l(P)}function y(){try{const A=localStorage.getItem(i);if(A)return JSON.parse(A)}catch(A){console.warn(A)}return null}return V.useEffect(()=>{new Date().valueOf()-o>t*1e3&&g()},[]),st(g,t*1e3),{value:m,isError:f}}function En(e,t=600,r=!0,n,a,i){var u,o,l,m;if(!n||!a||!i)throw new Error("baseUrl, tenant or venue was not provided");const s=_n(e,t,r,n,a);return{value:((o=(u=s.value)==null?void 0:u.find)==null?void 0:o.call(u,v=>v.venue===i))||((m=(l=s.value)==null?void 0:l.find)==null?void 0:m.call(l,v=>v.venue==="*"))||null,isError:s.isError}}function Wv(e,t,r,n=300,a=!0){var m,v,f,h;const i=V.useContext(An.ConfigContext);if(!i)throw new Error("Missing config context");const{value:s,isError:u}=En(e,n,a,i.baseUrl,i.tenant,t);let o=null,l=null;return s&&((m=s==null?void 0:s.url)==null?void 0:m.length)>0&&(o=((v=s.url.find(g=>g.locale===r))==null?void 0:v.value)||((f=s.url.find(g=>g.locale==="*"))==null?void 0:f.value)||null),!o&&s&&((h=s==null?void 0:s.url)==null?void 0:h.length)>0&&(l=s.url[0].value),{url:o,fallbackUrl:l,isError:u}}function Kv(e,t){V.useEffect(()=>{const r=n=>{!e.current||e.current.contains(n.target)||t(n)};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[e,t])}exports.getGroupedBucketLines=md;exports.groupOrderLines=gt;exports.useAvailability=Jc;exports.useCms=_n;exports.useDisplayPrice=gd;exports.useGroupOrderLines=yd;exports.useInterval=st;exports.useLocalizedVenueMedia=Wv;exports.useOnClickOutside=Kv;exports.useVenueCms=En;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var F=require("react"),On=require("@orderingstack/ordering-core-react");function Re(e,t){const r=F.useRef(),[n,a]=F.useState(null);return F.useEffect(()=>{r.current=e},[e]),F.useEffect(()=>{function i(){var s;(s=r.current)==null||s.call(r)}if(t!==null){const s=setInterval(i,t);return a(s),()=>{a(null),clearInterval(s)}}},[t]),()=>{n&&clearInterval(n)}}var X=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},Sn=Object.prototype;function wn(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Sn;return e===r}var je=wn;function In(e,t){return function(r){return e(t(r))}}var Cr=In,Dn=Cr,Cn=Dn(Object.keys,Object),Ln=Cn,Rn=je,jn=Ln,Pn=Object.prototype,Nn=Pn.hasOwnProperty;function xn(e){if(!Rn(e))return jn(e);var t=[];for(var r in Object(e))Nn.call(e,r)&&r!="constructor"&&t.push(r);return t}var Lr=xn,Mn=typeof X=="object"&&X&&X.Object===Object&&X,Rr=Mn,Un=Rr,Bn=typeof self=="object"&&self&&self.Object===Object&&self,Fn=Un||Bn||Function("return this")(),K=Fn,Hn=K,Yn=Hn.Symbol,Pe=Yn,wt=Pe,jr=Object.prototype,Gn=jr.hasOwnProperty,Vn=jr.toString,de=wt?wt.toStringTag:void 0;function Wn(e){var t=Gn.call(e,de),r=e[de];try{e[de]=void 0;var n=!0}catch{}var a=Vn.call(e);return n&&(t?e[de]=r:delete e[de]),a}var Kn=Wn,qn=Object.prototype,zn=qn.toString;function kn(e){return zn.call(e)}var Jn=kn,It=Pe,Zn=Kn,Xn=Jn,Qn="[object Null]",ea="[object Undefined]",Dt=It?It.toStringTag:void 0;function ta(e){return e==null?e===void 0?ea:Qn:Dt&&Dt in Object(e)?Zn(e):Xn(e)}var Ne=ta;function ra(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ge=ra,na=Ne,aa=ge,ia="[object AsyncFunction]",sa="[object Function]",oa="[object GeneratorFunction]",ua="[object Proxy]";function fa(e){if(!aa(e))return!1;var t=na(e);return t==sa||t==oa||t==ia||t==ua}var Pr=fa,ca=K,la=ca["__core-js_shared__"],ha=la,We=ha,Ct=function(){var e=/[^.]+$/.exec(We&&We.keys&&We.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function da(e){return!!Ct&&Ct in e}var va=da,pa=Function.prototype,ga=pa.toString;function $a(e){if(e!=null){try{return ga.call(e)}catch{}try{return e+""}catch{}}return""}var Nr=$a,ya=Pr,ma=va,ba=ge,_a=Nr,Ea=/[\\^$.*+?()[\]{}|]/g,Aa=/^\[object .+?Constructor\]$/,Ta=Function.prototype,Oa=Object.prototype,Sa=Ta.toString,wa=Oa.hasOwnProperty,Ia=RegExp("^"+Sa.call(wa).replace(Ea,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Da(e){if(!ba(e)||ma(e))return!1;var t=ya(e)?Ia:Aa;return t.test(_a(e))}var Ca=Da;function La(e,t){return e==null?void 0:e[t]}var Ra=La,ja=Ca,Pa=Ra;function Na(e,t){var r=Pa(e,t);return ja(r)?r:void 0}var Q=Na,xa=Q,Ma=K,Ua=xa(Ma,"DataView"),Ba=Ua,Fa=Q,Ha=K,Ya=Fa(Ha,"Map"),ft=Ya,Ga=Q,Va=K,Wa=Ga(Va,"Promise"),Ka=Wa,qa=Q,za=K,ka=qa(za,"Set"),Ja=ka,Za=Q,Xa=K,Qa=Za(Xa,"WeakMap"),ei=Qa,Xe=Ba,Qe=ft,et=Ka,tt=Ja,rt=ei,xr=Ne,ie=Nr,Lt="[object Map]",ti="[object Object]",Rt="[object Promise]",jt="[object Set]",Pt="[object WeakMap]",Nt="[object DataView]",ri=ie(Xe),ni=ie(Qe),ai=ie(et),ii=ie(tt),si=ie(rt),Z=xr;(Xe&&Z(new Xe(new ArrayBuffer(1)))!=Nt||Qe&&Z(new Qe)!=Lt||et&&Z(et.resolve())!=Rt||tt&&Z(new tt)!=jt||rt&&Z(new rt)!=Pt)&&(Z=function(e){var t=xr(e),r=t==ti?e.constructor:void 0,n=r?ie(r):"";if(n)switch(n){case ri:return Nt;case ni:return Lt;case ai:return Rt;case ii:return jt;case si:return Pt}return t});var $e=Z;function oi(e){return e!=null&&typeof e=="object"}var se=oi,ui=Ne,fi=se,ci="[object Arguments]";function li(e){return fi(e)&&ui(e)==ci}var hi=li,xt=hi,di=se,Mr=Object.prototype,vi=Mr.hasOwnProperty,pi=Mr.propertyIsEnumerable,gi=xt(function(){return arguments}())?xt:function(e){return di(e)&&vi.call(e,"callee")&&!pi.call(e,"callee")},Ur=gi,$i=Array.isArray,ye=$i,yi=9007199254740991;function mi(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=yi}var Br=mi,bi=Pr,_i=Br;function Ei(e){return e!=null&&_i(e.length)&&!bi(e)}var ct=Ei,ae={exports:{}};function Ai(){return!1}var Ti=Ai;(function(e,t){var r=K,n=Ti,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,s=i&&i.exports===a,u=s?r.Buffer:void 0,o=u?u.isBuffer:void 0,l=o||n;e.exports=l})(ae,ae.exports);var Oi=Ne,Si=Br,wi=se,Ii="[object Arguments]",Di="[object Array]",Ci="[object Boolean]",Li="[object Date]",Ri="[object Error]",ji="[object Function]",Pi="[object Map]",Ni="[object Number]",xi="[object Object]",Mi="[object RegExp]",Ui="[object Set]",Bi="[object String]",Fi="[object WeakMap]",Hi="[object ArrayBuffer]",Yi="[object DataView]",Gi="[object Float32Array]",Vi="[object Float64Array]",Wi="[object Int8Array]",Ki="[object Int16Array]",qi="[object Int32Array]",zi="[object Uint8Array]",ki="[object Uint8ClampedArray]",Ji="[object Uint16Array]",Zi="[object Uint32Array]",R={};R[Gi]=R[Vi]=R[Wi]=R[Ki]=R[qi]=R[zi]=R[ki]=R[Ji]=R[Zi]=!0;R[Ii]=R[Di]=R[Hi]=R[Ci]=R[Yi]=R[Li]=R[Ri]=R[ji]=R[Pi]=R[Ni]=R[xi]=R[Mi]=R[Ui]=R[Bi]=R[Fi]=!1;function Xi(e){return wi(e)&&Si(e.length)&&!!R[Oi(e)]}var Qi=Xi;function es(e){return function(t){return e(t)}}var lt=es,ve={exports:{}};(function(e,t){var r=Rr,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i&&r.process,u=function(){try{var o=a&&a.require&&a.require("util").types;return o||s&&s.binding&&s.binding("util")}catch{}}();e.exports=u})(ve,ve.exports);var ts=Qi,rs=lt,Mt=ve.exports,Ut=Mt&&Mt.isTypedArray,ns=Ut?rs(Ut):ts,ht=ns,as=Lr,is=$e,ss=Ur,os=ye,us=ct,fs=ae.exports,cs=je,ls=ht,hs="[object Map]",ds="[object Set]",vs=Object.prototype,ps=vs.hasOwnProperty;function gs(e){if(e==null)return!0;if(us(e)&&(os(e)||typeof e=="string"||typeof e.splice=="function"||fs(e)||ls(e)||ss(e)))return!e.length;var t=is(e);if(t==hs||t==ds)return!e.size;if(cs(e))return!as(e).length;for(var r in e)if(ps.call(e,r))return!1;return!0}var dt=gs,Fr={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(X,function(){var r="minute",n=/[+-]\d\d(?::?\d\d)?/g,a=/([+-]|\d\d)/g;return function(i,s,u){var o=s.prototype;u.utc=function(f){var y={date:f,utc:!0,args:arguments};return new s(y)},o.utc=function(f){var y=u(this.toDate(),{locale:this.$L,utc:!0});return f?y.add(this.utcOffset(),r):y},o.local=function(){return u(this.toDate(),{locale:this.$L,utc:!1})};var l=o.parse;o.parse=function(f){f.utc&&(this.$u=!0),this.$utils().u(f.$offset)||(this.$offset=f.$offset),l.call(this,f)};var m=o.init;o.init=function(){if(this.$u){var f=this.$d;this.$y=f.getUTCFullYear(),this.$M=f.getUTCMonth(),this.$D=f.getUTCDate(),this.$W=f.getUTCDay(),this.$H=f.getUTCHours(),this.$m=f.getUTCMinutes(),this.$s=f.getUTCSeconds(),this.$ms=f.getUTCMilliseconds()}else m.call(this)};var v=o.utcOffset;o.utcOffset=function(f,y){var O=this.$utils().u;if(O(f))return this.$u?0:O(this.$offset)?v.call(this):this.$offset;if(typeof f=="string"&&(f=function(D){D===void 0&&(D="");var B=D.match(n);if(!B)return null;var H=(""+B[0]).match(a)||["-",0,0],V=H[0],C=60*+H[1]+ +H[2];return C===0?0:V==="+"?C:-C}(f),f===null))return this;var w=Math.abs(f)<=16?60*f:f,A=this;if(y)return A.$offset=w,A.$u=f===0,A;if(f!==0){var P=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(A=this.local().add(w+P,r)).$offset=w,A.$x.$localOffset=P}else A=this.utc();return A};var c=o.format;o.format=function(f){var y=f||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,y)},o.valueOf=function(){var f=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*f},o.isUTC=function(){return!!this.$u},o.toISOString=function(){return this.toDate().toISOString()},o.toString=function(){return this.toDate().toUTCString()};var h=o.toDate;o.toDate=function(f){return f==="s"&&this.$offset?u(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():h.call(this)};var $=o.diff;o.diff=function(f,y,O){if(f&&this.$u===f.$u)return $.call(this,f,y,O);var w=this.local(),A=u(f).local();return $.call(w,A,y,O)}}})})(Fr);var $s=Fr.exports,Hr={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(X,function(){var r={year:0,month:1,day:2,hour:3,minute:4,second:5},n={};return function(a,i,s){var u,o=function(c,h,$){$===void 0&&($={});var f=new Date(c),y=function(O,w){w===void 0&&(w={});var A=w.timeZoneName||"short",P=O+"|"+A,D=n[P];return D||(D=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:O,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:A}),n[P]=D),D}(h,$);return y.formatToParts(f)},l=function(c,h){for(var $=o(c,h),f=[],y=0;y<$.length;y+=1){var O=$[y],w=O.type,A=O.value,P=r[w];P>=0&&(f[P]=parseInt(A,10))}var D=f[3],B=D===24?0:D,H=f[0]+"-"+f[1]+"-"+f[2]+" "+B+":"+f[4]+":"+f[5]+":000",V=+c;return(s.utc(H).valueOf()-(V-=V%1e3))/6e4},m=i.prototype;m.tz=function(c,h){c===void 0&&(c=u);var $=this.utcOffset(),f=this.toDate(),y=f.toLocaleString("en-US",{timeZone:c}),O=Math.round((f-new Date(y))/1e3/60),w=s(y).$set("millisecond",this.$ms).utcOffset(15*-Math.round(f.getTimezoneOffset()/15)-O,!0);if(h){var A=w.utcOffset();w=w.add($-A,"minute")}return w.$x.$timezone=c,w},m.offsetName=function(c){var h=this.$x.$timezone||s.tz.guess(),$=o(this.valueOf(),h,{timeZoneName:c}).find(function(f){return f.type.toLowerCase()==="timezonename"});return $&&$.value};var v=m.startOf;m.startOf=function(c,h){if(!this.$x||!this.$x.$timezone)return v.call(this,c,h);var $=s(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return v.call($,c,h).tz(this.$x.$timezone,!0)},s.tz=function(c,h,$){var f=$&&h,y=$||h||u,O=l(+s(),y);if(typeof c!="string")return s(c).tz(y);var w=function(B,H,V){var C=B-60*H*1e3,S=l(C,V);if(H===S)return[C,H];var z=l(C-=60*(S-H)*1e3,V);return S===z?[C,S]:[B-60*Math.min(S,z)*1e3,Math.max(S,z)]}(s.utc(c,f).valueOf(),O,y),A=w[0],P=w[1],D=s(A).utcOffset(P);return D.$x.$timezone=y,D},s.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},s.tz.setDefault=function(c){u=c}}})})(Hr);var ys=Hr.exports,Yr={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(X,function(){var r=1e3,n=6e4,a=36e5,i="millisecond",s="second",u="minute",o="hour",l="day",m="week",v="month",c="quarter",h="year",$="date",f="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|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,w={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("_")},A=function(T,g,d){var b=String(T);return!b||b.length>=g?T:""+Array(g+1-b.length).join(d)+T},P={s:A,z:function(T){var g=-T.utcOffset(),d=Math.abs(g),b=Math.floor(d/60),p=d%60;return(g<=0?"+":"-")+A(b,2,"0")+":"+A(p,2,"0")},m:function T(g,d){if(g.date()<d.date())return-T(d,g);var b=12*(d.year()-g.year())+(d.month()-g.month()),p=g.clone().add(b,v),E=d-p<0,_=g.clone().add(b+(E?-1:1),v);return+(-(b+(d-p)/(E?p-_:_-p))||0)},a:function(T){return T<0?Math.ceil(T)||0:Math.floor(T)},p:function(T){return{M:v,y:h,w:m,d:l,D:$,h:o,m:u,s,ms:i,Q:c}[T]||String(T||"").toLowerCase().replace(/s$/,"")},u:function(T){return T===void 0}},D="en",B={};B[D]=w;var H=function(T){return T instanceof z},V=function T(g,d,b){var p;if(!g)return D;if(typeof g=="string"){var E=g.toLowerCase();B[E]&&(p=E),d&&(B[E]=d,p=E);var _=g.split("-");if(!p&&_.length>1)return T(_[0])}else{var I=g.name;B[I]=g,p=I}return!b&&p&&(D=p),p||!b&&D},C=function(T,g){if(H(T))return T.clone();var d=typeof g=="object"?g:{};return d.date=T,d.args=arguments,new z(d)},S=P;S.l=V,S.i=H,S.w=function(T,g){return C(T,{locale:g.$L,utc:g.$u,x:g.$x,$offset:g.$offset})};var z=function(){function T(d){this.$L=V(d.locale,null,!0),this.parse(d)}var g=T.prototype;return g.parse=function(d){this.$d=function(b){var p=b.date,E=b.utc;if(p===null)return new Date(NaN);if(S.u(p))return new Date;if(p instanceof Date)return new Date(p);if(typeof p=="string"&&!/Z$/i.test(p)){var _=p.match(y);if(_){var I=_[2]-1||0,N=(_[7]||"0").substring(0,3);return E?new Date(Date.UTC(_[1],I,_[3]||1,_[4]||0,_[5]||0,_[6]||0,N)):new Date(_[1],I,_[3]||1,_[4]||0,_[5]||0,_[6]||0,N)}}return new Date(p)}(d),this.$x=d.x||{},this.init()},g.init=function(){var d=this.$d;this.$y=d.getFullYear(),this.$M=d.getMonth(),this.$D=d.getDate(),this.$W=d.getDay(),this.$H=d.getHours(),this.$m=d.getMinutes(),this.$s=d.getSeconds(),this.$ms=d.getMilliseconds()},g.$utils=function(){return S},g.isValid=function(){return this.$d.toString()!==f},g.isSame=function(d,b){var p=C(d);return this.startOf(b)<=p&&p<=this.endOf(b)},g.isAfter=function(d,b){return C(d)<this.startOf(b)},g.isBefore=function(d,b){return this.endOf(b)<C(d)},g.$g=function(d,b,p){return S.u(d)?this[b]:this.set(p,d)},g.unix=function(){return Math.floor(this.valueOf()/1e3)},g.valueOf=function(){return this.$d.getTime()},g.startOf=function(d,b){var p=this,E=!!S.u(b)||b,_=S.p(d),I=function(te,Y){var J=S.w(p.$u?Date.UTC(p.$y,Y,te):new Date(p.$y,Y,te),p);return E?J:J.endOf(l)},N=function(te,Y){return S.w(p.toDate()[te].apply(p.toDate("s"),(E?[0,0,0,0]:[23,59,59,999]).slice(Y)),p)},j=this.$W,M=this.$M,k=this.$D,q="set"+(this.$u?"UTC":"");switch(_){case h:return E?I(1,0):I(31,11);case v:return E?I(1,M):I(0,M+1);case m:var le=this.$locale().weekStart||0,he=(j<le?j+7:j)-le;return I(E?k-he:k+(6-he),M);case l:case $:return N(q+"Hours",0);case o:return N(q+"Minutes",1);case u:return N(q+"Seconds",2);case s:return N(q+"Milliseconds",3);default:return this.clone()}},g.endOf=function(d){return this.startOf(d,!1)},g.$set=function(d,b){var p,E=S.p(d),_="set"+(this.$u?"UTC":""),I=(p={},p[l]=_+"Date",p[$]=_+"Date",p[v]=_+"Month",p[h]=_+"FullYear",p[o]=_+"Hours",p[u]=_+"Minutes",p[s]=_+"Seconds",p[i]=_+"Milliseconds",p)[E],N=E===l?this.$D+(b-this.$W):b;if(E===v||E===h){var j=this.clone().set($,1);j.$d[I](N),j.init(),this.$d=j.set($,Math.min(this.$D,j.daysInMonth())).$d}else I&&this.$d[I](N);return this.init(),this},g.set=function(d,b){return this.clone().$set(d,b)},g.get=function(d){return this[S.p(d)]()},g.add=function(d,b){var p,E=this;d=Number(d);var _=S.p(b),I=function(M){var k=C(E);return S.w(k.date(k.date()+Math.round(M*d)),E)};if(_===v)return this.set(v,this.$M+d);if(_===h)return this.set(h,this.$y+d);if(_===l)return I(1);if(_===m)return I(7);var N=(p={},p[u]=n,p[o]=a,p[s]=r,p)[_]||1,j=this.$d.getTime()+d*N;return S.w(j,this)},g.subtract=function(d,b){return this.add(-1*d,b)},g.format=function(d){var b=this,p=this.$locale();if(!this.isValid())return p.invalidDate||f;var E=d||"YYYY-MM-DDTHH:mm:ssZ",_=S.z(this),I=this.$H,N=this.$m,j=this.$M,M=p.weekdays,k=p.months,q=function(Y,J,Ve,be){return Y&&(Y[J]||Y(b,E))||Ve[J].slice(0,be)},le=function(Y){return S.s(I%12||12,Y,"0")},he=p.meridiem||function(Y,J,Ve){var be=Y<12?"AM":"PM";return Ve?be.toLowerCase():be},te={YY:String(this.$y).slice(-2),YYYY:this.$y,M:j+1,MM:S.s(j+1,2,"0"),MMM:q(p.monthsShort,j,k,3),MMMM:q(k,j),D:this.$D,DD:S.s(this.$D,2,"0"),d:String(this.$W),dd:q(p.weekdaysMin,this.$W,M,2),ddd:q(p.weekdaysShort,this.$W,M,3),dddd:M[this.$W],H:String(I),HH:S.s(I,2,"0"),h:le(1),hh:le(2),a:he(I,N,!0),A:he(I,N,!1),m:String(N),mm:S.s(N,2,"0"),s:String(this.$s),ss:S.s(this.$s,2,"0"),SSS:S.s(this.$ms,3,"0"),Z:_};return E.replace(O,function(Y,J){return J||te[Y]||_.replace(":","")})},g.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},g.diff=function(d,b,p){var E,_=S.p(b),I=C(d),N=(I.utcOffset()-this.utcOffset())*n,j=this-I,M=S.m(this,I);return M=(E={},E[h]=M/12,E[v]=M,E[c]=M/3,E[m]=(j-N)/6048e5,E[l]=(j-N)/864e5,E[o]=j/a,E[u]=j/n,E[s]=j/r,E)[_]||j,p?M:S.a(M)},g.daysInMonth=function(){return this.endOf(v).$D},g.$locale=function(){return B[this.$L]},g.locale=function(d,b){if(!d)return this.$L;var p=this.clone(),E=V(d,b,!0);return E&&(p.$L=E),p},g.clone=function(){return S.w(this.$d,this)},g.toDate=function(){return new Date(this.valueOf())},g.toJSON=function(){return this.isValid()?this.toISOString():null},g.toISOString=function(){return this.$d.toISOString()},g.toString=function(){return this.$d.toUTCString()},T}(),St=z.prototype;return C.prototype=St,[["$ms",i],["$s",s],["$m",u],["$H",o],["$W",l],["$M",v],["$y",h],["$D",$]].forEach(function(T){St[T[1]]=function(g){return this.$g(g,T[0],T[1])}}),C.extend=function(T,g){return T.$i||(T(g,z,C),T.$i=!0),C},C.locale=V,C.isDayjs=H,C.unix=function(T){return C(1e3*T)},C.en=B[D],C.Ls=B,C.p={},C})})(Yr);var pe=Yr.exports;pe.extend($s);pe.extend(ys);const Gr=["SUN","MON","TUE","WED","THU","FRI","SAT"],Ie=e=>{const[t,r]=e.split(":");return{hour:parseInt(t||"0",10),minutes:parseInt(r||"0",10)}};function nt(e,t,r){const{availability:n}=e;if(!n)return!0;if(dt(n))return!1;const a=r?pe(r).tz(t):pe().tz(t),i=a.day(),s=n[Gr[i]];if(!Array.isArray(s)||s.length!==2)return!1;const u=a.hour(),o=a.minute(),l=Ie(s[0]),m=Ie(s[1]);return u<l.hour||u===l.hour&&o<l.minutes?!1:!(u>m.hour||u===m.hour&&o>m.minutes)}const at=(e,t=void 0,r=void 0,n=!1)=>n?e.map(i=>{let s;return Array.isArray(i.items)&&(s=at(i.items,t,r,n)),{...i,items:s,outsideAvailabilitySlot:!nt(i,t,r)||(s==null?void 0:s.every(u=>u.outsideAvailabilitySlot))||!1}}):e.filter(i=>nt(i,t,r)).map(i=>Array.isArray(i.items)?{...i,items:at(i.items,t,r)}:i),Bt=(e,t=void 0,r=void 0,n=!1)=>{let a=[];return e.forEach(i=>{if(!Array.isArray(i.items)){a.push(i);return}const s=at(i.items,t,r,n);s.length>0&&a.push({...i,items:s})}),n&&(a=a.map(i=>!i.items||!Array.isArray(i.items)?i:{...i,outsideAvailabilitySlot:!nt(i,t,r)||i.items.every(s=>s.outsideAvailabilitySlot)})),a};function _e(e){const t=e==null?void 0:e.week;if(!e||!e.active||!t)return!1;const r=pe(),n=r.day(),a=t[Gr[n]];return a?a.some(i=>ms(r,i)):!1}function ms(e,t){const r=e.hour(),n=e.minute(),a=Ie(t.from),i=Ie(t.to);return r<a.hour||r===a.hour&&n<a.minutes?!1:!(r>i.hour||r===i.hour&&n>i.minutes)}function bs(){this.__data__=[],this.size=0}var _s=bs;function Es(e,t){return e===t||e!==e&&t!==t}var vt=Es,As=vt;function Ts(e,t){for(var r=e.length;r--;)if(As(e[r][0],t))return r;return-1}var xe=Ts,Os=xe,Ss=Array.prototype,ws=Ss.splice;function Is(e){var t=this.__data__,r=Os(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():ws.call(t,r,1),--this.size,!0}var Ds=Is,Cs=xe;function Ls(e){var t=this.__data__,r=Cs(t,e);return r<0?void 0:t[r][1]}var Rs=Ls,js=xe;function Ps(e){return js(this.__data__,e)>-1}var Ns=Ps,xs=xe;function Ms(e,t){var r=this.__data__,n=xs(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Us=Ms,Bs=_s,Fs=Ds,Hs=Rs,Ys=Ns,Gs=Us;function oe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}oe.prototype.clear=Bs;oe.prototype.delete=Fs;oe.prototype.get=Hs;oe.prototype.has=Ys;oe.prototype.set=Gs;var Me=oe,Vs=Me;function Ws(){this.__data__=new Vs,this.size=0}var Ks=Ws;function qs(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var zs=qs;function ks(e){return this.__data__.get(e)}var Js=ks;function Zs(e){return this.__data__.has(e)}var Xs=Zs,Qs=Q,eo=Qs(Object,"create"),Ue=eo,Ft=Ue;function to(){this.__data__=Ft?Ft(null):{},this.size=0}var ro=to;function no(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var ao=no,io=Ue,so="__lodash_hash_undefined__",oo=Object.prototype,uo=oo.hasOwnProperty;function fo(e){var t=this.__data__;if(io){var r=t[e];return r===so?void 0:r}return uo.call(t,e)?t[e]:void 0}var co=fo,lo=Ue,ho=Object.prototype,vo=ho.hasOwnProperty;function po(e){var t=this.__data__;return lo?t[e]!==void 0:vo.call(t,e)}var go=po,$o=Ue,yo="__lodash_hash_undefined__";function mo(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=$o&&t===void 0?yo:t,this}var bo=mo,_o=ro,Eo=ao,Ao=co,To=go,Oo=bo;function ue(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ue.prototype.clear=_o;ue.prototype.delete=Eo;ue.prototype.get=Ao;ue.prototype.has=To;ue.prototype.set=Oo;var So=ue,Ht=So,wo=Me,Io=ft;function Do(){this.size=0,this.__data__={hash:new Ht,map:new(Io||wo),string:new Ht}}var Co=Do;function Lo(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Ro=Lo,jo=Ro;function Po(e,t){var r=e.__data__;return jo(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Be=Po,No=Be;function xo(e){var t=No(this,e).delete(e);return this.size-=t?1:0,t}var Mo=xo,Uo=Be;function Bo(e){return Uo(this,e).get(e)}var Fo=Bo,Ho=Be;function Yo(e){return Ho(this,e).has(e)}var Go=Yo,Vo=Be;function Wo(e,t){var r=Vo(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var Ko=Wo,qo=Co,zo=Mo,ko=Fo,Jo=Go,Zo=Ko;function fe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}fe.prototype.clear=qo;fe.prototype.delete=zo;fe.prototype.get=ko;fe.prototype.has=Jo;fe.prototype.set=Zo;var Vr=fe,Xo=Me,Qo=ft,eu=Vr,tu=200;function ru(e,t){var r=this.__data__;if(r instanceof Xo){var n=r.__data__;if(!Qo||n.length<tu-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new eu(n)}return r.set(e,t),this.size=r.size,this}var nu=ru,au=Me,iu=Ks,su=zs,ou=Js,uu=Xs,fu=nu;function ce(e){var t=this.__data__=new au(e);this.size=t.size}ce.prototype.clear=iu;ce.prototype.delete=su;ce.prototype.get=ou;ce.prototype.has=uu;ce.prototype.set=fu;var Wr=ce,cu="__lodash_hash_undefined__";function lu(e){return this.__data__.set(e,cu),this}var hu=lu;function du(e){return this.__data__.has(e)}var vu=du,pu=Vr,gu=hu,$u=vu;function De(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new pu;++t<r;)this.add(e[t])}De.prototype.add=De.prototype.push=gu;De.prototype.has=$u;var yu=De;function mu(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var bu=mu;function _u(e,t){return e.has(t)}var Eu=_u,Au=yu,Tu=bu,Ou=Eu,Su=1,wu=2;function Iu(e,t,r,n,a,i){var s=r&Su,u=e.length,o=t.length;if(u!=o&&!(s&&o>u))return!1;var l=i.get(e),m=i.get(t);if(l&&m)return l==t&&m==e;var v=-1,c=!0,h=r&wu?new Au:void 0;for(i.set(e,t),i.set(t,e);++v<u;){var $=e[v],f=t[v];if(n)var y=s?n(f,$,v,t,e,i):n($,f,v,e,t,i);if(y!==void 0){if(y)continue;c=!1;break}if(h){if(!Tu(t,function(O,w){if(!Ou(h,w)&&($===O||a($,O,r,n,i)))return h.push(w)})){c=!1;break}}else if(!($===f||a($,f,r,n,i))){c=!1;break}}return i.delete(e),i.delete(t),c}var Kr=Iu,Du=K,Cu=Du.Uint8Array,qr=Cu;function Lu(e){var t=-1,r=Array(e.size);return e.forEach(function(n,a){r[++t]=[a,n]}),r}var Ru=Lu;function ju(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Pu=ju,Yt=Pe,Gt=qr,Nu=vt,xu=Kr,Mu=Ru,Uu=Pu,Bu=1,Fu=2,Hu="[object Boolean]",Yu="[object Date]",Gu="[object Error]",Vu="[object Map]",Wu="[object Number]",Ku="[object RegExp]",qu="[object Set]",zu="[object String]",ku="[object Symbol]",Ju="[object ArrayBuffer]",Zu="[object DataView]",Vt=Yt?Yt.prototype:void 0,Ke=Vt?Vt.valueOf:void 0;function Xu(e,t,r,n,a,i,s){switch(r){case Zu:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Ju:return!(e.byteLength!=t.byteLength||!i(new Gt(e),new Gt(t)));case Hu:case Yu:case Wu:return Nu(+e,+t);case Gu:return e.name==t.name&&e.message==t.message;case Ku:case zu:return e==t+"";case Vu:var u=Mu;case qu:var o=n&Bu;if(u||(u=Uu),e.size!=t.size&&!o)return!1;var l=s.get(e);if(l)return l==t;n|=Fu,s.set(e,t);var m=xu(u(e),u(t),n,a,i,s);return s.delete(e),m;case ku:if(Ke)return Ke.call(e)==Ke.call(t)}return!1}var Qu=Xu;function ef(e,t){for(var r=-1,n=t.length,a=e.length;++r<n;)e[a+r]=t[r];return e}var zr=ef,tf=zr,rf=ye;function nf(e,t,r){var n=t(e);return rf(e)?n:tf(n,r(e))}var kr=nf;function af(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[a++]=s)}return i}var sf=af;function of(){return[]}var Jr=of,uf=sf,ff=Jr,cf=Object.prototype,lf=cf.propertyIsEnumerable,Wt=Object.getOwnPropertySymbols,hf=Wt?function(e){return e==null?[]:(e=Object(e),uf(Wt(e),function(t){return lf.call(e,t)}))}:ff,pt=hf;function df(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var vf=df,pf=9007199254740991,gf=/^(?:0|[1-9]\d*)$/;function $f(e,t){var r=typeof e;return t=t==null?pf:t,!!t&&(r=="number"||r!="symbol"&&gf.test(e))&&e>-1&&e%1==0&&e<t}var yf=$f,mf=vf,bf=Ur,_f=ye,Ef=ae.exports,Af=yf,Tf=ht,Of=Object.prototype,Sf=Of.hasOwnProperty;function wf(e,t){var r=_f(e),n=!r&&bf(e),a=!r&&!n&&Ef(e),i=!r&&!n&&!a&&Tf(e),s=r||n||a||i,u=s?mf(e.length,String):[],o=u.length;for(var l in e)(t||Sf.call(e,l))&&!(s&&(l=="length"||a&&(l=="offset"||l=="parent")||i&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Af(l,o)))&&u.push(l);return u}var Zr=wf,If=Zr,Df=Lr,Cf=ct;function Lf(e){return Cf(e)?If(e):Df(e)}var gt=Lf,Rf=kr,jf=pt,Pf=gt;function Nf(e){return Rf(e,Pf,jf)}var Xr=Nf,Kt=Xr,xf=1,Mf=Object.prototype,Uf=Mf.hasOwnProperty;function Bf(e,t,r,n,a,i){var s=r&xf,u=Kt(e),o=u.length,l=Kt(t),m=l.length;if(o!=m&&!s)return!1;for(var v=o;v--;){var c=u[v];if(!(s?c in t:Uf.call(t,c)))return!1}var h=i.get(e),$=i.get(t);if(h&&$)return h==t&&$==e;var f=!0;i.set(e,t),i.set(t,e);for(var y=s;++v<o;){c=u[v];var O=e[c],w=t[c];if(n)var A=s?n(w,O,c,t,e,i):n(O,w,c,e,t,i);if(!(A===void 0?O===w||a(O,w,r,n,i):A)){f=!1;break}y||(y=c=="constructor")}if(f&&!y){var P=e.constructor,D=t.constructor;P!=D&&"constructor"in e&&"constructor"in t&&!(typeof P=="function"&&P instanceof P&&typeof D=="function"&&D instanceof D)&&(f=!1)}return i.delete(e),i.delete(t),f}var Ff=Bf,qe=Wr,Hf=Kr,Yf=Qu,Gf=Ff,qt=$e,zt=ye,kt=ae.exports,Vf=ht,Wf=1,Jt="[object Arguments]",Zt="[object Array]",Ee="[object Object]",Kf=Object.prototype,Xt=Kf.hasOwnProperty;function qf(e,t,r,n,a,i){var s=zt(e),u=zt(t),o=s?Zt:qt(e),l=u?Zt:qt(t);o=o==Jt?Ee:o,l=l==Jt?Ee:l;var m=o==Ee,v=l==Ee,c=o==l;if(c&&kt(e)){if(!kt(t))return!1;s=!0,m=!1}if(c&&!m)return i||(i=new qe),s||Vf(e)?Hf(e,t,r,n,a,i):Yf(e,t,o,r,n,a,i);if(!(r&Wf)){var h=m&&Xt.call(e,"__wrapped__"),$=v&&Xt.call(t,"__wrapped__");if(h||$){var f=h?e.value():e,y=$?t.value():t;return i||(i=new qe),a(f,y,r,n,i)}}return c?(i||(i=new qe),Gf(e,t,r,n,a,i)):!1}var zf=qf,kf=zf,Qt=se;function Qr(e,t,r,n,a){return e===t?!0:e==null||t==null||!Qt(e)&&!Qt(t)?e!==e&&t!==t:kf(e,t,r,n,Qr,a)}var Jf=Qr,Zf=Jf;function Xf(e,t){return Zf(e,t)}var en=Xf;function Qf(e,t=!1,r=void 0,n=60){const[a,i]=F.useState(e&&Bt(e,r,void 0,t));Re(s,n*1e3);function s(){const u=e&&Bt(e,r,void 0,t);en(u,a)||(console.log("menu has changed",u),i(u))}return F.useEffect(s,[a,e]),a}var er;(function(e){e.UNINITIALIZED="UNINITIALIZED",e.PROCESSING="PROCESSING",e.PAID="PAID",e.PRINTING_RECEIPT="PRINTING_RECEIPT",e.PRINTING_RECEIPT_SUCCESS="PRINTING_RECEIPT_SUCCESS",e.SENDING_RECEIPT="SENDING_RECEIPT",e.SENDING_RECEIPT_SUCCESS="SENDING_RECEIPT_SUCCESS",e.ERROR="ERROR"})(er||(er={}));var tr;(function(e){e.CAROUSEL="carousel",e.NORMAL="normal",e.IMAGE="image"})(tr||(tr={}));var it;(function(e){e.GROUP="3e/group",e.PRODUCT="3e/product",e.CATEGORY="3e/group/category",e.OPTIONS="3e/group/options",e.CONFIG="3e/group/config",e.STATIC="3e/static",e.REF="3e/ref",e.QUERY="3e/query"})(it||(it={}));var rr;(function(e){e.GROUP="group",e.PRODUCT="product"})(rr||(rr={}));var nr;(function(e){e.TAKE_AWAY="TAKE_AWAY",e.DELIVERY="DELIVERY",e.DINE_IN="DINE_IN",e.DINE_IN_OPEN="DINE_IN_OPEN",e.GLOVO_DELIVERY="GLOVO_DELIVERY",e.GLOVO_TAKE_AWAY="GLOVO_TAKE_AWAY",e.JUSTEAT_DELIVERY="JUSTEAT_DELIVERY",e.JUSTEAT_TAKE_AWAY="JUSTEAT_TAKE_AWAY",e.UBER_DELIVERY="UBER_DELIVERY",e.UBER_TAKE_AWAY="UBER_TAKE_AWAY",e.UBER_DINE_IN="UBER_DINE_IN",e.BOLT_DELIVERY="BOLT_DELIVERY",e.BOLT_TAKE_AWAY="BOLT_TAKE_AWAY",e.WOLT_DELIVERY="WOLT_DELIVERY",e.WOLT_TAKE_AWAY="WOLT_TAKE_AWAY",e.WOLT_DINE_IN="WOLT_DINE_IN"})(nr||(nr={}));var ar;(function(e){e.NEW="NEW",e.COMPLETED="COMPLETED",e.VERIFIED="VERIFIED",e.DELIVER="DELIVER",e.DELIVERED="DELIVERED",e.CLOSED="CLOSED",e.ABANDONED="ABANDONED",e.CANCELLED="CANCELLED",e.PICKED="PICKED"})(ar||(ar={}));var ir;(function(e){e.CASH="CASH",e.CARD="CARD",e.COD="COD",e.TERMINAL="TERMINAL",e.EPAYMENT="EPAYMENT",e.COUPON="COUPON",e.WALLET="WALLET",e.PREAUTHORIZED="PREAUTHORIZED",e.RETURN="RETURN",e.EXTERNAL="EXTERNAL"})(ir||(ir={}));var sr;(function(e){e.KIOSK="KIOSK",e.WEB="WEB",e.JUST_EAT_TAKE_AWAY="JUSTEATTAKEAWAY",e.GLOVO="GLOVO",e.PYSZNE="PYSZNE",e.WOLT="WOLT",e.UBER="UBER",e.BOLT="BOLT"})(sr||(sr={}));var or;(function(e){e.NEW="NEW",e.TECHNICAL="TECHNICAL",e.CONFIRMED="CONFIRMED",e.PROCESSING="PROCESSING",e.PROCESSED="PROCESSED",e.VOID="VOID",e.WASTE="WASTE"})(or||(or={}));var ur;(function(e){e.GROUP="group",e.PRODUCT="product"})(ur||(ur={}));var fr;(function(e){e.DINE_IN="DINE_IN",e.TAKE_AWAY="TAKE_AWAY",e.DELIVERY="DELIVERY",e.GLOVO_DELIVERY="GLOVO_DELIVERY",e.JUSTEAT_DELIVERY="JUSTEAT_DELIVERY",e.UBER_DELIVERY="UBER_DELIVERY",e.BOLT_DELIVERY="BOLT_DELIVERY",e.WOLT_DELIVERY="WOLT_DELIVERY"})(fr||(fr={}));function ec(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var tc=ec,rc=Q,nc=function(){try{var e=rc(Object,"defineProperty");return e({},"",{}),e}catch{}}(),ac=nc,cr=ac;function ic(e,t,r){t=="__proto__"&&cr?cr(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var tn=ic,sc=tn,oc=vt,uc=Object.prototype,fc=uc.hasOwnProperty;function cc(e,t,r){var n=e[t];(!(fc.call(e,t)&&oc(n,r))||r===void 0&&!(t in e))&&sc(e,t,r)}var rn=cc,lc=rn,hc=tn;function dc(e,t,r,n){var a=!r;r||(r={});for(var i=-1,s=t.length;++i<s;){var u=t[i],o=n?n(r[u],e[u],u,r,e):void 0;o===void 0&&(o=e[u]),a?hc(r,u,o):lc(r,u,o)}return r}var Fe=dc,vc=Fe,pc=gt;function gc(e,t){return e&&vc(t,pc(t),e)}var $c=gc;function yc(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var mc=yc,bc=ge,_c=je,Ec=mc,Ac=Object.prototype,Tc=Ac.hasOwnProperty;function Oc(e){if(!bc(e))return Ec(e);var t=_c(e),r=[];for(var n in e)n=="constructor"&&(t||!Tc.call(e,n))||r.push(n);return r}var Sc=Oc,wc=Zr,Ic=Sc,Dc=ct;function Cc(e){return Dc(e)?wc(e,!0):Ic(e)}var $t=Cc,Lc=Fe,Rc=$t;function jc(e,t){return e&&Lc(t,Rc(t),e)}var Pc=jc,st={exports:{}};(function(e,t){var r=K,n=t&&!t.nodeType&&t,a=n&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===n,s=i?r.Buffer:void 0,u=s?s.allocUnsafe:void 0;function o(l,m){if(m)return l.slice();var v=l.length,c=u?u(v):new l.constructor(v);return l.copy(c),c}e.exports=o})(st,st.exports);function Nc(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var xc=Nc,Mc=Fe,Uc=pt;function Bc(e,t){return Mc(e,Uc(e),t)}var Fc=Bc,Hc=Cr,Yc=Hc(Object.getPrototypeOf,Object),nn=Yc,Gc=zr,Vc=nn,Wc=pt,Kc=Jr,qc=Object.getOwnPropertySymbols,zc=qc?function(e){for(var t=[];e;)Gc(t,Wc(e)),e=Vc(e);return t}:Kc,an=zc,kc=Fe,Jc=an;function Zc(e,t){return kc(e,Jc(e),t)}var Xc=Zc,Qc=kr,el=an,tl=$t;function rl(e){return Qc(e,tl,el)}var nl=rl,al=Object.prototype,il=al.hasOwnProperty;function sl(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&il.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var ol=sl,lr=qr;function ul(e){var t=new e.constructor(e.byteLength);return new lr(t).set(new lr(e)),t}var yt=ul,fl=yt;function cl(e,t){var r=t?fl(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var ll=cl,hl=/\w*$/;function dl(e){var t=new e.constructor(e.source,hl.exec(e));return t.lastIndex=e.lastIndex,t}var vl=dl,hr=Pe,dr=hr?hr.prototype:void 0,vr=dr?dr.valueOf:void 0;function pl(e){return vr?Object(vr.call(e)):{}}var gl=pl,$l=yt;function yl(e,t){var r=t?$l(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var ml=yl,bl=yt,_l=ll,El=vl,Al=gl,Tl=ml,Ol="[object Boolean]",Sl="[object Date]",wl="[object Map]",Il="[object Number]",Dl="[object RegExp]",Cl="[object Set]",Ll="[object String]",Rl="[object Symbol]",jl="[object ArrayBuffer]",Pl="[object DataView]",Nl="[object Float32Array]",xl="[object Float64Array]",Ml="[object Int8Array]",Ul="[object Int16Array]",Bl="[object Int32Array]",Fl="[object Uint8Array]",Hl="[object Uint8ClampedArray]",Yl="[object Uint16Array]",Gl="[object Uint32Array]";function Vl(e,t,r){var n=e.constructor;switch(t){case jl:return bl(e);case Ol:case Sl:return new n(+e);case Pl:return _l(e,r);case Nl:case xl:case Ml:case Ul:case Bl:case Fl:case Hl:case Yl:case Gl:return Tl(e,r);case wl:return new n;case Il:case Ll:return new n(e);case Dl:return El(e);case Cl:return new n;case Rl:return Al(e)}}var Wl=Vl,Kl=ge,pr=Object.create,ql=function(){function e(){}return function(t){if(!Kl(t))return{};if(pr)return pr(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}(),zl=ql,kl=zl,Jl=nn,Zl=je;function Xl(e){return typeof e.constructor=="function"&&!Zl(e)?kl(Jl(e)):{}}var Ql=Xl,eh=$e,th=se,rh="[object Map]";function nh(e){return th(e)&&eh(e)==rh}var ah=nh,ih=ah,sh=lt,gr=ve.exports,$r=gr&&gr.isMap,oh=$r?sh($r):ih,uh=oh,fh=$e,ch=se,lh="[object Set]";function hh(e){return ch(e)&&fh(e)==lh}var dh=hh,vh=dh,ph=lt,yr=ve.exports,mr=yr&&yr.isSet,gh=mr?ph(mr):vh,$h=gh,yh=Wr,mh=tc,bh=rn,_h=$c,Eh=Pc,Ah=st.exports,Th=xc,Oh=Fc,Sh=Xc,wh=Xr,Ih=nl,Dh=$e,Ch=ol,Lh=Wl,Rh=Ql,jh=ye,Ph=ae.exports,Nh=uh,xh=ge,Mh=$h,Uh=gt,Bh=$t,Fh=1,Hh=2,Yh=4,sn="[object Arguments]",Gh="[object Array]",Vh="[object Boolean]",Wh="[object Date]",Kh="[object Error]",on="[object Function]",qh="[object GeneratorFunction]",zh="[object Map]",kh="[object Number]",un="[object Object]",Jh="[object RegExp]",Zh="[object Set]",Xh="[object String]",Qh="[object Symbol]",ed="[object WeakMap]",td="[object ArrayBuffer]",rd="[object DataView]",nd="[object Float32Array]",ad="[object Float64Array]",id="[object Int8Array]",sd="[object Int16Array]",od="[object Int32Array]",ud="[object Uint8Array]",fd="[object Uint8ClampedArray]",cd="[object Uint16Array]",ld="[object Uint32Array]",L={};L[sn]=L[Gh]=L[td]=L[rd]=L[Vh]=L[Wh]=L[nd]=L[ad]=L[id]=L[sd]=L[od]=L[zh]=L[kh]=L[un]=L[Jh]=L[Zh]=L[Xh]=L[Qh]=L[ud]=L[fd]=L[cd]=L[ld]=!0;L[Kh]=L[on]=L[ed]=!1;function Oe(e,t,r,n,a,i){var s,u=t&Fh,o=t&Hh,l=t&Yh;if(r&&(s=a?r(e,n,a,i):r(e)),s!==void 0)return s;if(!xh(e))return e;var m=jh(e);if(m){if(s=Ch(e),!u)return Th(e,s)}else{var v=Dh(e),c=v==on||v==qh;if(Ph(e))return Ah(e,u);if(v==un||v==sn||c&&!a){if(s=o||c?{}:Rh(e),!u)return o?Sh(e,Eh(s,e)):Oh(e,_h(s,e))}else{if(!L[v])return a?e:{};s=Lh(e,v,u)}}i||(i=new yh);var h=i.get(e);if(h)return h;i.set(e,s),Mh(e)?e.forEach(function(y){s.add(Oe(y,t,r,y,e,i))}):Nh(e)&&e.forEach(function(y,O){s.set(O,Oe(y,t,r,O,e,i))});var $=l?o?Ih:wh:o?Bh:Uh,f=m?void 0:$(e);return mh(f||e,function(y,O){f&&(O=y,y=e[O]),bh(s,O,Oe(y,t,r,O,e,i))}),s}var hd=Oe,dd=hd,vd=1,pd=4;function gd(e){return dd(e,vd|pd)}var $d=gd;function yd(e,t){if(!t||!t.filter||!e||!e.filter||e.kind!==it.CONFIG)return!0;if(e.filter&&e.items){const r=Object.values(e.filter).flat().filter(n=>{var a,i,s,u;return t.filter[(i=(a=e.items)==null?void 0:a[0])==null?void 0:i.fltCtx]&&Object.values(t.filter[(u=(s=e.items)==null?void 0:s[0])==null?void 0:u.fltCtx]).includes(n)});if(Array.isArray(r)&&r.length===0)return!1}return!0}const Ce=(e,t,r=0)=>{if(!e)return 0;let n=parseFloat(e.price)||0;const{items:a}=e,i=$d(t);return yd(e,i)&&Array.isArray(a)&&a.forEach(s=>{let u=0;if(s.kind!=="3e/product")u=Ce(s,i,r+1);else{const{selected:o={}}=i,{selCtx:l,id:m}=s;l in o&&m in o[l]&&(u=Ce(s,i,r+1)*o[l][m],delete i.selected[l][m])}n+=u}),Math.round(100*n)/100},md=({product:e,state:t,selected:r,cheapestGroupOptionsProduct:n})=>{var o;const a=t?Ce(e,t):0,i=e.state&&!dt((o=e==null?void 0:e.state)==null?void 0:o.selected)?Ce(e,e.state):0,s=e.minPrice&&parseFloat(e.price)===a;let u=r||!!n||parseFloat(e.price)===0?a||i:parseFloat(e.price);return n!==void 0&&(u-=n),s&&e.minPrice&&(u=parseFloat(e.minPrice)),{displayPrice:u,showAsMinPrice:s,calculatedPriceDefaultProductState:i}};function mt(e){const t=[];return e.reduce((r,n)=>{if(r[n.hash]||(r[n.hash]={...n,quantity:0,discounted:0,discounts:[],firstProductQuantity:n.quantity,itemsToRemove:[]},t.push(r[n.hash])),r[n.hash].quantity+=n.quantity,r[n.hash].itemsToRemove.push(n.id),n.discounts){r[n.hash].discounts||(r[n.hash].discounts=[]),r[n.hash].discounts=r[n.hash].discounts.concat(n.discounts),r[n.hash].discounted=0;for(let a=0;a<r[n.hash].discounts.length;a+=1)r[n.hash].discounts[a]&&(r[n.hash].discounted+=parseFloat(r[n.hash].discounts[a].discountPrice))}return r},{}),t}function bd(e){return mt(e)}function _d(e){return!e||e.length===0?null:mt(e.flatMap(t=>t.lines))}var bt={exports:{}},fn=function(t,r){return function(){for(var a=new Array(arguments.length),i=0;i<a.length;i++)a[i]=arguments[i];return t.apply(r,a)}},Ed=fn,ee=Object.prototype.toString;function _t(e){return ee.call(e)==="[object Array]"}function ot(e){return typeof e=="undefined"}function Ad(e){return e!==null&&!ot(e)&&e.constructor!==null&&!ot(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function Td(e){return ee.call(e)==="[object ArrayBuffer]"}function Od(e){return typeof FormData!="undefined"&&e instanceof FormData}function Sd(e){var t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&e.buffer instanceof ArrayBuffer,t}function wd(e){return typeof e=="string"}function Id(e){return typeof e=="number"}function cn(e){return e!==null&&typeof e=="object"}function Se(e){if(ee.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function Dd(e){return ee.call(e)==="[object Date]"}function Cd(e){return ee.call(e)==="[object File]"}function Ld(e){return ee.call(e)==="[object Blob]"}function ln(e){return ee.call(e)==="[object Function]"}function Rd(e){return cn(e)&&ln(e.pipe)}function jd(e){return typeof URLSearchParams!="undefined"&&e instanceof URLSearchParams}function Pd(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Nd(){return typeof navigator!="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window!="undefined"&&typeof document!="undefined"}function Et(e,t){if(!(e===null||typeof e=="undefined"))if(typeof e!="object"&&(e=[e]),_t(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.call(null,e[a],a,e)}function ut(){var e={};function t(a,i){Se(e[i])&&Se(a)?e[i]=ut(e[i],a):Se(a)?e[i]=ut({},a):_t(a)?e[i]=a.slice():e[i]=a}for(var r=0,n=arguments.length;r<n;r++)Et(arguments[r],t);return e}function xd(e,t,r){return Et(t,function(a,i){r&&typeof a=="function"?e[i]=Ed(a,r):e[i]=a}),e}function Md(e){return e.charCodeAt(0)===65279&&(e=e.slice(1)),e}var G={isArray:_t,isArrayBuffer:Td,isBuffer:Ad,isFormData:Od,isArrayBufferView:Sd,isString:wd,isNumber:Id,isObject:cn,isPlainObject:Se,isUndefined:ot,isDate:Dd,isFile:Cd,isBlob:Ld,isFunction:ln,isStream:Rd,isURLSearchParams:jd,isStandardBrowserEnv:Nd,forEach:Et,merge:ut,extend:xd,trim:Pd,stripBOM:Md},re=G;function br(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var hn=function(t,r,n){if(!r)return t;var a;if(n)a=n(r);else if(re.isURLSearchParams(r))a=r.toString();else{var i=[];re.forEach(r,function(o,l){o===null||typeof o=="undefined"||(re.isArray(o)?l=l+"[]":o=[o],re.forEach(o,function(v){re.isDate(v)?v=v.toISOString():re.isObject(v)&&(v=JSON.stringify(v)),i.push(br(l)+"="+br(v))}))}),a=i.join("&")}if(a){var s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+a}return t},Ud=G;function He(){this.handlers=[]}He.prototype.use=function(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1};He.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)};He.prototype.forEach=function(t){Ud.forEach(this.handlers,function(n){n!==null&&t(n)})};var Bd=He,Fd=G,Hd=function(t,r){Fd.forEach(t,function(a,i){i!==r&&i.toUpperCase()===r.toUpperCase()&&(t[r]=a,delete t[i])})},dn=function(t,r,n,a,i){return t.config=r,n&&(t.code=n),t.request=a,t.response=i,t.isAxiosError=!0,t.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},t},Yd=dn,vn=function(t,r,n,a,i){var s=new Error(t);return Yd(s,r,n,a,i)},Gd=vn,Vd=function(t,r,n){var a=n.config.validateStatus;!n.status||!a||a(n.status)?t(n):r(Gd("Request failed with status code "+n.status,n.config,null,n.request,n))},Ae=G,Wd=Ae.isStandardBrowserEnv()?function(){return{write:function(r,n,a,i,s,u){var o=[];o.push(r+"="+encodeURIComponent(n)),Ae.isNumber(a)&&o.push("expires="+new Date(a).toGMTString()),Ae.isString(i)&&o.push("path="+i),Ae.isString(s)&&o.push("domain="+s),u===!0&&o.push("secure"),document.cookie=o.join("; ")},read:function(r){var n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),Kd=function(t){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(t)},qd=function(t,r){return r?t.replace(/\/+$/,"")+"/"+r.replace(/^\/+/,""):t},zd=Kd,kd=qd,Jd=function(t,r){return t&&!zd(r)?kd(t,r):r},ze=G,Zd=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],Xd=function(t){var r={},n,a,i;return t&&ze.forEach(t.split(`
|
|
2
|
+
`),function(u){if(i=u.indexOf(":"),n=ze.trim(u.substr(0,i)).toLowerCase(),a=ze.trim(u.substr(i+1)),n){if(r[n]&&Zd.indexOf(n)>=0)return;n==="set-cookie"?r[n]=(r[n]?r[n]:[]).concat([a]):r[n]=r[n]?r[n]+", "+a:a}}),r},_r=G,Qd=_r.isStandardBrowserEnv()?function(){var t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a"),n;function a(i){var s=i;return t&&(r.setAttribute("href",s),s=r.href),r.setAttribute("href",s),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=a(window.location.href),function(s){var u=_r.isString(s)?a(s):s;return u.protocol===n.protocol&&u.host===n.host}}():function(){return function(){return!0}}(),Te=G,ev=Vd,tv=Wd,rv=hn,nv=Jd,av=Xd,iv=Qd,ke=vn,Er=function(t){return new Promise(function(n,a){var i=t.data,s=t.headers,u=t.responseType;Te.isFormData(i)&&delete s["Content-Type"];var o=new XMLHttpRequest;if(t.auth){var l=t.auth.username||"",m=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";s.Authorization="Basic "+btoa(l+":"+m)}var v=nv(t.baseURL,t.url);o.open(t.method.toUpperCase(),rv(v,t.params,t.paramsSerializer),!0),o.timeout=t.timeout;function c(){if(!!o){var $="getAllResponseHeaders"in o?av(o.getAllResponseHeaders()):null,f=!u||u==="text"||u==="json"?o.responseText:o.response,y={data:f,status:o.status,statusText:o.statusText,headers:$,config:t,request:o};ev(n,a,y),o=null}}if("onloadend"in o?o.onloadend=c:o.onreadystatechange=function(){!o||o.readyState!==4||o.status===0&&!(o.responseURL&&o.responseURL.indexOf("file:")===0)||setTimeout(c)},o.onabort=function(){!o||(a(ke("Request aborted",t,"ECONNABORTED",o)),o=null)},o.onerror=function(){a(ke("Network Error",t,null,o)),o=null},o.ontimeout=function(){var f="timeout of "+t.timeout+"ms exceeded";t.timeoutErrorMessage&&(f=t.timeoutErrorMessage),a(ke(f,t,t.transitional&&t.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",o)),o=null},Te.isStandardBrowserEnv()){var h=(t.withCredentials||iv(v))&&t.xsrfCookieName?tv.read(t.xsrfCookieName):void 0;h&&(s[t.xsrfHeaderName]=h)}"setRequestHeader"in o&&Te.forEach(s,function(f,y){typeof i=="undefined"&&y.toLowerCase()==="content-type"?delete s[y]:o.setRequestHeader(y,f)}),Te.isUndefined(t.withCredentials)||(o.withCredentials=!!t.withCredentials),u&&u!=="json"&&(o.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&o.addEventListener("progress",t.onDownloadProgress),typeof t.onUploadProgress=="function"&&o.upload&&o.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(f){!o||(o.abort(),a(f),o=null)}),i||(i=null),o.send(i)})},x=G,Ar=Hd,sv=dn,ov={"Content-Type":"application/x-www-form-urlencoded"};function Tr(e,t){!x.isUndefined(e)&&x.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}function uv(){var e;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(e=Er),e}function fv(e,t,r){if(x.isString(e))try{return(t||JSON.parse)(e),x.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}var Ye={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:uv(),transformRequest:[function(t,r){return Ar(r,"Accept"),Ar(r,"Content-Type"),x.isFormData(t)||x.isArrayBuffer(t)||x.isBuffer(t)||x.isStream(t)||x.isFile(t)||x.isBlob(t)?t:x.isArrayBufferView(t)?t.buffer:x.isURLSearchParams(t)?(Tr(r,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):x.isObject(t)||r&&r["Content-Type"]==="application/json"?(Tr(r,"application/json"),fv(t)):t}],transformResponse:[function(t){var r=this.transitional,n=r&&r.silentJSONParsing,a=r&&r.forcedJSONParsing,i=!n&&this.responseType==="json";if(i||a&&x.isString(t)&&t.length)try{return JSON.parse(t)}catch(s){if(i)throw s.name==="SyntaxError"?sv(s,this,"E_JSON_PARSE"):s}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(t){return t>=200&&t<300}};Ye.headers={common:{Accept:"application/json, text/plain, */*"}};x.forEach(["delete","get","head"],function(t){Ye.headers[t]={}});x.forEach(["post","put","patch"],function(t){Ye.headers[t]=x.merge(ov)});var At=Ye,cv=G,lv=At,hv=function(t,r,n){var a=this||lv;return cv.forEach(n,function(s){t=s.call(a,t,r)}),t},pn=function(t){return!!(t&&t.__CANCEL__)},Or=G,Je=hv,dv=pn,vv=At;function Ze(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var pv=function(t){Ze(t),t.headers=t.headers||{},t.data=Je.call(t,t.data,t.headers,t.transformRequest),t.headers=Or.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),Or.forEach(["delete","get","head","post","put","patch","common"],function(a){delete t.headers[a]});var r=t.adapter||vv.adapter;return r(t).then(function(a){return Ze(t),a.data=Je.call(t,a.data,a.headers,t.transformResponse),a},function(a){return dv(a)||(Ze(t),a&&a.response&&(a.response.data=Je.call(t,a.response.data,a.response.headers,t.transformResponse))),Promise.reject(a)})},U=G,gn=function(t,r){r=r||{};var n={},a=["url","method","data"],i=["headers","auth","proxy","params"],s=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],u=["validateStatus"];function o(c,h){return U.isPlainObject(c)&&U.isPlainObject(h)?U.merge(c,h):U.isPlainObject(h)?U.merge({},h):U.isArray(h)?h.slice():h}function l(c){U.isUndefined(r[c])?U.isUndefined(t[c])||(n[c]=o(void 0,t[c])):n[c]=o(t[c],r[c])}U.forEach(a,function(h){U.isUndefined(r[h])||(n[h]=o(void 0,r[h]))}),U.forEach(i,l),U.forEach(s,function(h){U.isUndefined(r[h])?U.isUndefined(t[h])||(n[h]=o(void 0,t[h])):n[h]=o(void 0,r[h])}),U.forEach(u,function(h){h in r?n[h]=o(t[h],r[h]):h in t&&(n[h]=o(void 0,t[h]))});var m=a.concat(i).concat(s).concat(u),v=Object.keys(t).concat(Object.keys(r)).filter(function(h){return m.indexOf(h)===-1});return U.forEach(v,l),n};const gv="axios",$v="0.21.4",yv="Promise based HTTP client for the browser and node.js",mv="index.js",bv={test:"grunt test",start:"node ./sandbox/server.js",build:"NODE_ENV=production grunt build",preversion:"npm test",version:"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json",postversion:"git push && git push --tags",examples:"node ./examples/server.js",coveralls:"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",fix:"eslint --fix lib/**/*.js"},_v={type:"git",url:"https://github.com/axios/axios.git"},Ev=["xhr","http","ajax","promise","node"],Av="Matt Zabriskie",Tv="MIT",Ov={url:"https://github.com/axios/axios/issues"},Sv="https://axios-http.com",wv={coveralls:"^3.0.0","es6-promise":"^4.2.4",grunt:"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1",karma:"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2",minimist:"^1.2.0",mocha:"^8.2.1",sinon:"^4.5.0","terser-webpack-plugin":"^4.2.3",typescript:"^4.0.5","url-search-params":"^0.10.0",webpack:"^4.44.2","webpack-dev-server":"^3.11.0"},Iv={"./lib/adapters/http.js":"./lib/adapters/xhr.js"},Dv="dist/axios.min.js",Cv="dist/axios.min.js",Lv="./index.d.ts",Rv={"follow-redirects":"^1.14.0"},jv=[{path:"./dist/axios.min.js",threshold:"5kB"}];var Pv={name:gv,version:$v,description:yv,main:mv,scripts:bv,repository:_v,keywords:Ev,author:Av,license:Tv,bugs:Ov,homepage:Sv,devDependencies:wv,browser:Iv,jsdelivr:Dv,unpkg:Cv,typings:Lv,dependencies:Rv,bundlesize:jv},$n=Pv,Tt={};["object","boolean","number","function","string","symbol"].forEach(function(e,t){Tt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});var Sr={},Nv=$n.version.split(".");function yn(e,t){for(var r=t?t.split("."):Nv,n=e.split("."),a=0;a<3;a++){if(r[a]>n[a])return!0;if(r[a]<n[a])return!1}return!1}Tt.transitional=function(t,r,n){var a=r&&yn(r);function i(s,u){return"[Axios v"+$n.version+"] Transitional option '"+s+"'"+u+(n?". "+n:"")}return function(s,u,o){if(t===!1)throw new Error(i(u," has been removed in "+r));return a&&!Sr[u]&&(Sr[u]=!0,console.warn(i(u," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,u,o):!0}};function xv(e,t,r){if(typeof e!="object")throw new TypeError("options must be an object");for(var n=Object.keys(e),a=n.length;a-- >0;){var i=n[a],s=t[i];if(s){var u=e[i],o=u===void 0||s(u,i,e);if(o!==!0)throw new TypeError("option "+i+" must be "+o);continue}if(r!==!0)throw Error("Unknown option "+i)}}var Mv={isOlderVersion:yn,assertOptions:xv,validators:Tt},mn=G,Uv=hn,wr=Bd,Ir=pv,Ge=gn,bn=Mv,ne=bn.validators;function me(e){this.defaults=e,this.interceptors={request:new wr,response:new wr}}me.prototype.request=function(t){typeof t=="string"?(t=arguments[1]||{},t.url=arguments[0]):t=t||{},t=Ge(this.defaults,t),t.method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;r!==void 0&&bn.assertOptions(r,{silentJSONParsing:ne.transitional(ne.boolean,"1.0.0"),forcedJSONParsing:ne.transitional(ne.boolean,"1.0.0"),clarifyTimeoutError:ne.transitional(ne.boolean,"1.0.0")},!1);var n=[],a=!0;this.interceptors.request.forEach(function(c){typeof c.runWhen=="function"&&c.runWhen(t)===!1||(a=a&&c.synchronous,n.unshift(c.fulfilled,c.rejected))});var i=[];this.interceptors.response.forEach(function(c){i.push(c.fulfilled,c.rejected)});var s;if(!a){var u=[Ir,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(i),s=Promise.resolve(t);u.length;)s=s.then(u.shift(),u.shift());return s}for(var o=t;n.length;){var l=n.shift(),m=n.shift();try{o=l(o)}catch(v){m(v);break}}try{s=Ir(o)}catch(v){return Promise.reject(v)}for(;i.length;)s=s.then(i.shift(),i.shift());return s};me.prototype.getUri=function(t){return t=Ge(this.defaults,t),Uv(t.url,t.params,t.paramsSerializer).replace(/^\?/,"")};mn.forEach(["delete","get","head","options"],function(t){me.prototype[t]=function(r,n){return this.request(Ge(n||{},{method:t,url:r,data:(n||{}).data}))}});mn.forEach(["post","put","patch"],function(t){me.prototype[t]=function(r,n,a){return this.request(Ge(a||{},{method:t,url:r,data:n}))}});var Bv=me;function Ot(e){this.message=e}Ot.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};Ot.prototype.__CANCEL__=!0;var _n=Ot,Fv=_n;function Le(e){if(typeof e!="function")throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(a){t=a});var r=this;e(function(a){r.reason||(r.reason=new Fv(a),t(r.reason))})}Le.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};Le.source=function(){var t,r=new Le(function(a){t=a});return{token:r,cancel:t}};var Hv=Le,Yv=function(t){return function(n){return t.apply(null,n)}},Gv=function(t){return typeof t=="object"&&t.isAxiosError===!0},Dr=G,Vv=fn,we=Bv,Wv=gn,Kv=At;function En(e){var t=new we(e),r=Vv(we.prototype.request,t);return Dr.extend(r,we.prototype,t),Dr.extend(r,t),r}var W=En(Kv);W.Axios=we;W.create=function(t){return En(Wv(W.defaults,t))};W.Cancel=_n;W.CancelToken=Hv;W.isCancel=pn;W.all=function(t){return Promise.all(t)};W.spread=Yv;W.isAxiosError=Gv;bt.exports=W;bt.exports.default=W;var qv=bt.exports;function An(e,t=600,r=!0,n,a){var O,w;if(!n||!a)throw new Error("baseUrl or tenant was not provided");const i=`${e}_${a}_${n}`,s=`${n.endsWith("/")?n.slice(0,-1):n}/cms-api/content/${a}/${e}`,u=((O=y())==null?void 0:O.value)||null,[o,l]=F.useState(((w=y())==null?void 0:w.timestamp)||0),[m,v]=F.useState(u||null),[c,h]=F.useState(!1);function $(){qv.get(s).then(A=>{if(dt(A.data))throw new Error(`CMS data '${e}' is an empty object`);en(A.data,m)||v(A.data),c&&h(!1),r&&f(A.data)}).catch(A=>{console.error(A),h(!0)})}function f(A){const P=new Date().valueOf(),D=JSON.stringify({value:A,timestamp:P});localStorage.setItem(i,D),l(P)}function y(){try{const A=localStorage.getItem(i);if(A)return JSON.parse(A)}catch(A){console.warn(A)}return null}return F.useEffect(()=>{new Date().valueOf()-o>t*1e3&&$()},[]),Re($,t*1e3),{value:m,isError:c,isLoading:!c&&!m}}function Tn(e,t=600,r=!0,n,a,i){var u,o,l,m;if(!n||!a||!i)throw new Error("baseUrl, tenant or venue was not provided");const s=An(e,t,r,n,a);return{value:((o=(u=s.value)==null?void 0:u.find)==null?void 0:o.call(u,v=>v.venue===i))||((m=(l=s.value)==null?void 0:l.find)==null?void 0:m.call(l,v=>v.venue==="*"))||null,isError:s.isError}}function zv(e,t,r,n=300,a=!0){var m,v,c,h;const i=F.useContext(On.ConfigContext);if(!i)throw new Error("Missing config context");const{value:s,isError:u}=Tn(e,n,a,i.baseUrl,i.tenant,t);let o=null,l=null;return s&&((m=s==null?void 0:s.url)==null?void 0:m.length)>0&&(o=((v=s.url.find($=>$.locale===r))==null?void 0:v.value)||((c=s.url.find($=>$.locale==="*"))==null?void 0:c.value)||null),!o&&s&&((h=s==null?void 0:s.url)==null?void 0:h.length)>0&&(l=s.url[0].value),{url:o,fallbackUrl:l,isError:u}}function kv(e,t){F.useEffect(()=>{const r=n=>{!e.current||e.current.contains(n.target)||t(n)};return document.addEventListener("mousedown",r),document.addEventListener("touchstart",r),()=>{document.removeEventListener("mousedown",r),document.removeEventListener("touchstart",r)}},[e,t])}function Jv(e){const[t,r]=F.useState(_e(e==null?void 0:e.DINE_IN)),[n,a]=F.useState(_e(e==null?void 0:e.TAKE_AWAY));function i(){const s=_e(e==null?void 0:e.DINE_IN),u=_e(e==null?void 0:e.TAKE_AWAY);s!==t&&(console.log("dine in open changed",t,"=>",s),r(s)),u!==n&&(console.log("take away open changed",n,"=>",u),a(u))}return F.useEffect(()=>{i()},[e]),Re(i,6e4),{dineInOpen:t,takeAwayOpen:n}}exports.getGroupedBucketLines=_d;exports.groupOrderLines=mt;exports.useAvailability=Qf;exports.useCms=An;exports.useDisplayPrice=md;exports.useGroupOrderLines=bd;exports.useInterval=Re;exports.useKioskChannelsAvailability=Jv;exports.useLocalizedVenueMedia=zv;exports.useOnClickOutside=kv;exports.useVenueCms=Tn;
|
|
3
3
|
//# sourceMappingURL=index.cjs.js.map
|