@orderingstack/front-hooks 3.12.0 → 3.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index-09c930a6.mjs +9585 -0
- package/dist/index-09c930a6.mjs.map +1 -0
- package/dist/index-61278580.js +43 -0
- package/dist/index-61278580.js.map +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +46 -1
- package/dist/index.es.js.map +1 -1
- package/dist/types/auth/AuthContext.d.ts +39 -0
- package/dist/types/auth/AuthContext.d.ts.map +1 -0
- package/dist/types/auth/AuthProvider.d.ts +78 -0
- package/dist/types/auth/AuthProvider.d.ts.map +1 -0
- package/dist/types/auth/ConfigContext.d.ts +13 -0
- package/dist/types/auth/ConfigContext.d.ts.map +1 -0
- package/dist/types/auth/index.d.ts +4 -0
- package/dist/types/auth/index.d.ts.map +1 -0
- package/dist/{src → types}/index.d.ts +2 -1
- package/dist/{src → types}/index.d.ts.map +1 -1
- package/dist/{src/storage.d.ts → types/secureStorage.d.ts} +2 -3
- package/dist/types/secureStorage.d.ts.map +1 -0
- package/dist/web-5132f230.js +6 -0
- package/dist/web-5132f230.js.map +1 -0
- package/dist/web-6d1846e3.js +2 -0
- package/dist/web-6d1846e3.js.map +1 -0
- package/dist/web-71df6a96.mjs +91 -0
- package/dist/web-71df6a96.mjs.map +1 -0
- package/dist/web-7aa1c1aa.js +2 -0
- package/dist/web-7aa1c1aa.js.map +1 -0
- package/dist/web-9e04d552.js +2 -0
- package/dist/web-9e04d552.js.map +1 -0
- package/dist/web-baa6c9c4.mjs +135 -0
- package/dist/web-baa6c9c4.mjs.map +1 -0
- package/dist/web-d7c04fc0.mjs +38 -0
- package/dist/web-d7c04fc0.mjs.map +1 -0
- package/dist/web-ee21016a.mjs +105 -0
- package/dist/web-ee21016a.mjs.map +1 -0
- package/package.json +12 -6
- package/dist/index.js +0 -16
- package/dist/index.js.map +0 -1
- package/dist/src/storage.d.ts.map +0 -1
- package/dist/web.js +0 -2
- package/dist/web.js.map +0 -1
- /package/dist/{src → types}/pkce.d.ts +0 -0
- /package/dist/{src → types}/pkce.d.ts.map +0 -0
- /package/dist/{src → types}/useAvailability.d.ts +0 -0
- /package/dist/{src → types}/useAvailability.d.ts.map +0 -0
- /package/dist/{src → types}/useChannelAvailability.d.ts +0 -0
- /package/dist/{src → types}/useChannelAvailability.d.ts.map +0 -0
- /package/dist/{src → types}/useCms.d.ts +0 -0
- /package/dist/{src → types}/useCms.d.ts.map +0 -0
- /package/dist/{src → types}/useDisplayPrice.d.ts +0 -0
- /package/dist/{src → types}/useDisplayPrice.d.ts.map +0 -0
- /package/dist/{src → types}/useGroupOrderLines.d.ts +0 -0
- /package/dist/{src → types}/useGroupOrderLines.d.ts.map +0 -0
- /package/dist/{src → types}/useInterval.d.ts +0 -0
- /package/dist/{src → types}/useInterval.d.ts.map +0 -0
- /package/dist/{src → types}/useMediaUrl.d.ts +0 -0
- /package/dist/{src → types}/useMediaUrl.d.ts.map +0 -0
- /package/dist/{src → types}/useOnClickOutside.d.ts +0 -0
- /package/dist/{src → types}/useOnClickOutside.d.ts.map +0 -0
- /package/dist/{src → types}/utils/cms.d.ts +0 -0
- /package/dist/{src → types}/utils/cms.d.ts.map +0 -0
- /package/dist/{src → types}/utils/timeAvailabilityFilter.d.ts +0 -0
- /package/dist/{src → types}/utils/timeAvailabilityFilter.d.ts.map +0 -0
- /package/dist/{src → types}/utils.d.ts +0 -0
- /package/dist/{src → types}/utils.d.ts.map +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";const re=require("react"),Dr=require("@orderingstack/ordering-core-react"),Qs=require("react-i18next"),Ka=require("react-router-dom");function Wt(e,r){const n=re.useRef(),[t,i]=re.useState(null);return re.useEffect(()=>{n.current=e},[e]),re.useEffect(()=>{function a(){var s;(s=n.current)==null||s.call(n)}if(r!==null){const s=setInterval(a,r);return i(s),()=>{i(null),clearInterval(s)}}},[r]),()=>{t&&clearInterval(t)}}var K=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Po(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ec(e){if(e.__esModule)return e;var r=e.default;if(typeof r=="function"){var n=function t(){if(this instanceof t){var i=[null];i.push.apply(i,arguments);var a=Function.bind.apply(r,i);return new a}return r.apply(this,arguments)};n.prototype=r.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})}),n}var rc=Object.prototype;function tc(e){var r=e&&e.constructor,n=typeof r=="function"&&r.prototype||rc;return e===n}var zt=tc;function nc(e,r){return function(n){return e(r(n))}}var Io=nc,ac=Io,ic=ac(Object.keys,Object),oc=ic,sc=zt,cc=oc,uc=Object.prototype,fc=uc.hasOwnProperty;function lc(e){if(!sc(e))return cc(e);var r=[];for(var n in Object(e))fc.call(e,n)&&n!="constructor"&&r.push(n);return r}var Do=lc,dc=typeof K=="object"&&K&&K.Object===Object&&K,Bo=dc,hc=Bo,vc=typeof self=="object"&&self&&self.Object===Object&&self,xc=hc||vc||Function("return this")(),Ue=xc,pc=Ue,gc=pc.Symbol,Gt=gc,Ya=Gt,ko=Object.prototype,mc=ko.hasOwnProperty,yc=ko.toString,Cr=Ya?Ya.toStringTag:void 0;function bc(e){var r=mc.call(e,Cr),n=e[Cr];try{e[Cr]=void 0;var t=!0}catch{}var i=yc.call(e);return t&&(r?e[Cr]=n:delete e[Cr]),i}var _c=bc,Ec=Object.prototype,$c=Ec.toString;function wc(e){return $c.call(e)}var Ac=wc,Va=Gt,Cc=_c,Sc=Ac,Tc="[object Null]",Rc="[object Undefined]",Xa=Va?Va.toStringTag:void 0;function Oc(e){return e==null?e===void 0?Rc:Tc:Xa&&Xa in Object(e)?Cc(e):Sc(e)}var Kt=Oc;function Pc(e){var r=typeof e;return e!=null&&(r=="object"||r=="function")}var Br=Pc,Ic=Kt,Dc=Br,Bc="[object AsyncFunction]",kc="[object Function]",Lc="[object GeneratorFunction]",Uc="[object Proxy]";function Nc(e){if(!Dc(e))return!1;var r=Ic(e);return r==kc||r==Lc||r==Bc||r==Uc}var Lo=Nc,jc=Ue,Fc=jc["__core-js_shared__"],Hc=Fc,gn=Hc,Ja=function(){var e=/[^.]+$/.exec(gn&&gn.keys&&gn.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function qc(e){return!!Ja&&Ja in e}var Mc=qc,Wc=Function.prototype,zc=Wc.toString;function Gc(e){if(e!=null){try{return zc.call(e)}catch{}try{return e+""}catch{}}return""}var Uo=Gc,Kc=Lo,Yc=Mc,Vc=Br,Xc=Uo,Jc=/[\\^$.*+?()[\]{}|]/g,Zc=/^\[object .+?Constructor\]$/,Qc=Function.prototype,eu=Object.prototype,ru=Qc.toString,tu=eu.hasOwnProperty,nu=RegExp("^"+ru.call(tu).replace(Jc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function au(e){if(!Vc(e)||Yc(e))return!1;var r=Kc(e)?nu:Zc;return r.test(Xc(e))}var iu=au;function ou(e,r){return e==null?void 0:e[r]}var su=ou,cu=iu,uu=su;function fu(e,r){var n=uu(e,r);return cu(n)?n:void 0}var Ke=fu,lu=Ke,du=Ue,hu=lu(du,"DataView"),vu=hu,xu=Ke,pu=Ue,gu=xu(pu,"Map"),ba=gu,mu=Ke,yu=Ue,bu=mu(yu,"Promise"),_u=bu,Eu=Ke,$u=Ue,wu=Eu($u,"Set"),Au=wu,Cu=Ke,Su=Ue,Tu=Cu(Su,"WeakMap"),Ru=Tu,Qn=vu,ea=ba,ra=_u,ta=Au,na=Ru,No=Kt,cr=Uo,Za="[object Map]",Ou="[object Object]",Qa="[object Promise]",e0="[object Set]",r0="[object WeakMap]",t0="[object DataView]",Pu=cr(Qn),Iu=cr(ea),Du=cr(ra),Bu=cr(ta),ku=cr(na),We=No;(Qn&&We(new Qn(new ArrayBuffer(1)))!=t0||ea&&We(new ea)!=Za||ra&&We(ra.resolve())!=Qa||ta&&We(new ta)!=e0||na&&We(new na)!=r0)&&(We=function(e){var r=No(e),n=r==Ou?e.constructor:void 0,t=n?cr(n):"";if(t)switch(t){case Pu:return t0;case Iu:return Za;case Du:return Qa;case Bu:return e0;case ku:return r0}return r});var kr=We;function Lu(e){return e!=null&&typeof e=="object"}var ur=Lu,Uu=Kt,Nu=ur,ju="[object Arguments]";function Fu(e){return Nu(e)&&Uu(e)==ju}var Hu=Fu,n0=Hu,qu=ur,jo=Object.prototype,Mu=jo.hasOwnProperty,Wu=jo.propertyIsEnumerable,zu=n0(function(){return arguments}())?n0:function(e){return qu(e)&&Mu.call(e,"callee")&&!Wu.call(e,"callee")},Fo=zu,Gu=Array.isArray,Lr=Gu,Ku=9007199254740991;function Yu(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ku}var Ho=Yu,Vu=Lo,Xu=Ho;function Ju(e){return e!=null&&Xu(e.length)&&!Vu(e)}var _a=Ju,Ge={},Zu={get exports(){return Ge},set exports(e){Ge=e}};function Qu(){return!1}var ef=Qu;(function(e,r){var n=Ue,t=ef,i=r&&!r.nodeType&&r,a=i&&!0&&e&&!e.nodeType&&e,s=a&&a.exports===i,c=s?n.Buffer:void 0,d=c?c.isBuffer:void 0,o=d||t;e.exports=o})(Zu,Ge);var rf=Kt,tf=Ho,nf=ur,af="[object Arguments]",of="[object Array]",sf="[object Boolean]",cf="[object Date]",uf="[object Error]",ff="[object Function]",lf="[object Map]",df="[object Number]",hf="[object Object]",vf="[object RegExp]",xf="[object Set]",pf="[object String]",gf="[object WeakMap]",mf="[object ArrayBuffer]",yf="[object DataView]",bf="[object Float32Array]",_f="[object Float64Array]",Ef="[object Int8Array]",$f="[object Int16Array]",wf="[object Int32Array]",Af="[object Uint8Array]",Cf="[object Uint8ClampedArray]",Sf="[object Uint16Array]",Tf="[object Uint32Array]",ce={};ce[bf]=ce[_f]=ce[Ef]=ce[$f]=ce[wf]=ce[Af]=ce[Cf]=ce[Sf]=ce[Tf]=!0;ce[af]=ce[of]=ce[mf]=ce[sf]=ce[yf]=ce[cf]=ce[uf]=ce[ff]=ce[lf]=ce[df]=ce[hf]=ce[vf]=ce[xf]=ce[pf]=ce[gf]=!1;function Rf(e){return nf(e)&&tf(e.length)&&!!ce[rf(e)]}var Of=Rf;function Pf(e){return function(r){return e(r)}}var Ea=Pf,or={},If={get exports(){return or},set exports(e){or=e}};(function(e,r){var n=Bo,t=r&&!r.nodeType&&r,i=t&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===t,s=a&&n.process,c=function(){try{var d=i&&i.require&&i.require("util").types;return d||s&&s.binding&&s.binding("util")}catch{}}();e.exports=c})(If,or);var Df=Of,Bf=Ea,a0=or,i0=a0&&a0.isTypedArray,kf=i0?Bf(i0):Df,$a=kf,Lf=Do,Uf=kr,Nf=Fo,jf=Lr,Ff=_a,Hf=Ge,qf=zt,Mf=$a,Wf="[object Map]",zf="[object Set]",Gf=Object.prototype,Kf=Gf.hasOwnProperty;function Yf(e){if(e==null)return!0;if(Ff(e)&&(jf(e)||typeof e=="string"||typeof e.splice=="function"||Hf(e)||Mf(e)||Nf(e)))return!e.length;var r=Uf(e);if(r==Wf||r==zf)return!e.size;if(qf(e))return!Lf(e).length;for(var n in e)if(Kf.call(e,n))return!1;return!0}var wa=Yf,aa={},Vf={get exports(){return aa},set exports(e){aa=e}};(function(e,r){(function(n,t){e.exports=t()})(K,function(){var n="minute",t=/[+-]\d\d(?::?\d\d)?/g,i=/([+-]|\d\d)/g;return function(a,s,c){var d=s.prototype;c.utc=function(m){var p={date:m,utc:!0,args:arguments};return new s(p)},d.utc=function(m){var p=c(this.toDate(),{locale:this.$L,utc:!0});return m?p.add(this.utcOffset(),n):p},d.local=function(){return c(this.toDate(),{locale:this.$L,utc:!1})};var o=d.parse;d.parse=function(m){m.utc&&(this.$u=!0),this.$utils().u(m.$offset)||(this.$offset=m.$offset),o.call(this,m)};var l=d.init;d.init=function(){if(this.$u){var m=this.$d;this.$y=m.getUTCFullYear(),this.$M=m.getUTCMonth(),this.$D=m.getUTCDate(),this.$W=m.getUTCDay(),this.$H=m.getUTCHours(),this.$m=m.getUTCMinutes(),this.$s=m.getUTCSeconds(),this.$ms=m.getUTCMilliseconds()}else l.call(this)};var g=d.utcOffset;d.utcOffset=function(m,p){var C=this.$utils().u;if(C(m))return this.$u?0:C(this.$offset)?g.call(this):this.$offset;if(typeof m=="string"&&(m=function(b){b===void 0&&(b="");var E=b.match(t);if(!E)return null;var w=(""+E[0]).match(i)||["-",0,0],A=w[0],T=60*+w[1]+ +w[2];return T===0?0:A==="+"?T:-T}(m),m===null))return this;var u=Math.abs(m)<=16?60*m:m,h=this;if(p)return h.$offset=u,h.$u=m===0,h;if(m!==0){var x=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(h=this.local().add(u+x,n)).$offset=u,h.$x.$localOffset=x}else h=this.utc();return h};var f=d.format;d.format=function(m){var p=m||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return f.call(this,p)},d.valueOf=function(){var m=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*m},d.isUTC=function(){return!!this.$u},d.toISOString=function(){return this.toDate().toISOString()},d.toString=function(){return this.toDate().toUTCString()};var v=d.toDate;d.toDate=function(m){return m==="s"&&this.$offset?c(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():v.call(this)};var y=d.diff;d.diff=function(m,p,C){if(m&&this.$u===m.$u)return y.call(this,m,p,C);var u=this.local(),h=c(m).local();return y.call(u,h,p,C)}}})})(Vf);const Xf=aa;var ia={},Jf={get exports(){return ia},set exports(e){ia=e}};(function(e,r){(function(n,t){e.exports=t()})(K,function(){var n={year:0,month:1,day:2,hour:3,minute:4,second:5},t={};return function(i,a,s){var c,d=function(f,v,y){y===void 0&&(y={});var m=new Date(f),p=function(C,u){u===void 0&&(u={});var h=u.timeZoneName||"short",x=C+"|"+h,b=t[x];return b||(b=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:C,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:h}),t[x]=b),b}(v,y);return p.formatToParts(m)},o=function(f,v){for(var y=d(f,v),m=[],p=0;p<y.length;p+=1){var C=y[p],u=C.type,h=C.value,x=n[u];x>=0&&(m[x]=parseInt(h,10))}var b=m[3],E=b===24?0:b,w=m[0]+"-"+m[1]+"-"+m[2]+" "+E+":"+m[4]+":"+m[5]+":000",A=+f;return(s.utc(w).valueOf()-(A-=A%1e3))/6e4},l=a.prototype;l.tz=function(f,v){f===void 0&&(f=c);var y=this.utcOffset(),m=this.toDate(),p=m.toLocaleString("en-US",{timeZone:f}),C=Math.round((m-new Date(p))/1e3/60),u=s(p).$set("millisecond",this.$ms).utcOffset(15*-Math.round(m.getTimezoneOffset()/15)-C,!0);if(v){var h=u.utcOffset();u=u.add(y-h,"minute")}return u.$x.$timezone=f,u},l.offsetName=function(f){var v=this.$x.$timezone||s.tz.guess(),y=d(this.valueOf(),v,{timeZoneName:f}).find(function(m){return m.type.toLowerCase()==="timezonename"});return y&&y.value};var g=l.startOf;l.startOf=function(f,v){if(!this.$x||!this.$x.$timezone)return g.call(this,f,v);var y=s(this.format("YYYY-MM-DD HH:mm:ss:SSS"));return g.call(y,f,v).tz(this.$x.$timezone,!0)},s.tz=function(f,v,y){var m=y&&v,p=y||v||c,C=o(+s(),p);if(typeof f!="string")return s(f).tz(p);var u=function(E,w,A){var T=E-60*w*1e3,_=o(T,A);if(w===_)return[T,w];var S=o(T-=60*(_-w)*1e3,A);return _===S?[T,_]:[E-60*Math.min(_,S)*1e3,Math.max(_,S)]}(s.utc(f,m).valueOf(),C,p),h=u[0],x=u[1],b=s(h).utcOffset(x);return b.$x.$timezone=p,b},s.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},s.tz.setDefault=function(f){c=f}}})})(Jf);const Zf=ia;var oa={},Qf={get exports(){return oa},set exports(e){oa=e}};(function(e,r){(function(n,t){e.exports=t()})(K,function(){var n=1e3,t=6e4,i=36e5,a="millisecond",s="second",c="minute",d="hour",o="day",l="week",g="month",f="quarter",v="year",y="date",m="Invalid Date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u={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("_")},h=function(R,P,I){var N=String(R);return!N||N.length>=P?R:""+Array(P+1-N.length).join(I)+R},x={s:h,z:function(R){var P=-R.utcOffset(),I=Math.abs(P),N=Math.floor(I/60),U=I%60;return(P<=0?"+":"-")+h(N,2,"0")+":"+h(U,2,"0")},m:function R(P,I){if(P.date()<I.date())return-R(I,P);var N=12*(I.year()-P.year())+(I.month()-P.month()),U=P.clone().add(N,g),j=I-U<0,H=P.clone().add(N+(j?-1:1),g);return+(-(N+(I-U)/(j?U-H:H-U))||0)},a:function(R){return R<0?Math.ceil(R)||0:Math.floor(R)},p:function(R){return{M:g,y:v,w:l,d:o,D:y,h:d,m:c,s,ms:a,Q:f}[R]||String(R||"").toLowerCase().replace(/s$/,"")},u:function(R){return R===void 0}},b="en",E={};E[b]=u;var w=function(R){return R instanceof S},A=function R(P,I,N){var U;if(!P)return b;if(typeof P=="string"){var j=P.toLowerCase();E[j]&&(U=j),I&&(E[j]=I,U=j);var H=P.split("-");if(!U&&H.length>1)return R(H[0])}else{var q=P.name;E[q]=P,U=q}return!N&&U&&(b=U),U||!N&&b},T=function(R,P){if(w(R))return R.clone();var I=typeof P=="object"?P:{};return I.date=R,I.args=arguments,new S(I)},_=x;_.l=A,_.i=w,_.w=function(R,P){return T(R,{locale:P.$L,utc:P.$u,x:P.$x,$offset:P.$offset})};var S=function(){function R(I){this.$L=A(I.locale,null,!0),this.parse(I)}var P=R.prototype;return P.parse=function(I){this.$d=function(N){var U=N.date,j=N.utc;if(U===null)return new Date(NaN);if(_.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var H=U.match(p);if(H){var q=H[2]-1||0,O=(H[7]||"0").substring(0,3);return j?new Date(Date.UTC(H[1],q,H[3]||1,H[4]||0,H[5]||0,H[6]||0,O)):new Date(H[1],q,H[3]||1,H[4]||0,H[5]||0,H[6]||0,O)}}return new Date(U)}(I),this.$x=I.x||{},this.init()},P.init=function(){var I=this.$d;this.$y=I.getFullYear(),this.$M=I.getMonth(),this.$D=I.getDate(),this.$W=I.getDay(),this.$H=I.getHours(),this.$m=I.getMinutes(),this.$s=I.getSeconds(),this.$ms=I.getMilliseconds()},P.$utils=function(){return _},P.isValid=function(){return this.$d.toString()!==m},P.isSame=function(I,N){var U=T(I);return this.startOf(N)<=U&&U<=this.endOf(N)},P.isAfter=function(I,N){return T(I)<this.startOf(N)},P.isBefore=function(I,N){return this.endOf(N)<T(I)},P.$g=function(I,N,U){return _.u(I)?this[N]:this.set(U,I)},P.unix=function(){return Math.floor(this.valueOf()/1e3)},P.valueOf=function(){return this.$d.getTime()},P.startOf=function(I,N){var U=this,j=!!_.u(N)||N,H=_.p(I),q=function(W,J){var ne=_.w(U.$u?Date.UTC(U.$y,J,W):new Date(U.$y,J,W),U);return j?ne:ne.endOf(o)},O=function(W,J){return _.w(U.toDate()[W].apply(U.toDate("s"),(j?[0,0,0,0]:[23,59,59,999]).slice(J)),U)},D=this.$W,k=this.$M,L=this.$D,z="set"+(this.$u?"UTC":"");switch(H){case v:return j?q(1,0):q(31,11);case g:return j?q(1,k):q(0,k+1);case l:var Y=this.$locale().weekStart||0,te=(D<Y?D+7:D)-Y;return q(j?L-te:L+(6-te),k);case o:case y:return O(z+"Hours",0);case d:return O(z+"Minutes",1);case c:return O(z+"Seconds",2);case s:return O(z+"Milliseconds",3);default:return this.clone()}},P.endOf=function(I){return this.startOf(I,!1)},P.$set=function(I,N){var U,j=_.p(I),H="set"+(this.$u?"UTC":""),q=(U={},U[o]=H+"Date",U[y]=H+"Date",U[g]=H+"Month",U[v]=H+"FullYear",U[d]=H+"Hours",U[c]=H+"Minutes",U[s]=H+"Seconds",U[a]=H+"Milliseconds",U)[j],O=j===o?this.$D+(N-this.$W):N;if(j===g||j===v){var D=this.clone().set(y,1);D.$d[q](O),D.init(),this.$d=D.set(y,Math.min(this.$D,D.daysInMonth())).$d}else q&&this.$d[q](O);return this.init(),this},P.set=function(I,N){return this.clone().$set(I,N)},P.get=function(I){return this[_.p(I)]()},P.add=function(I,N){var U,j=this;I=Number(I);var H=_.p(N),q=function(k){var L=T(j);return _.w(L.date(L.date()+Math.round(k*I)),j)};if(H===g)return this.set(g,this.$M+I);if(H===v)return this.set(v,this.$y+I);if(H===o)return q(1);if(H===l)return q(7);var O=(U={},U[c]=t,U[d]=i,U[s]=n,U)[H]||1,D=this.$d.getTime()+I*O;return _.w(D,this)},P.subtract=function(I,N){return this.add(-1*I,N)},P.format=function(I){var N=this,U=this.$locale();if(!this.isValid())return U.invalidDate||m;var j=I||"YYYY-MM-DDTHH:mm:ssZ",H=_.z(this),q=this.$H,O=this.$m,D=this.$M,k=U.weekdays,L=U.months,z=function(J,ne,ie,ue){return J&&(J[ne]||J(N,j))||ie[ne].slice(0,ue)},Y=function(J){return _.s(q%12||12,J,"0")},te=U.meridiem||function(J,ne,ie){var ue=J<12?"AM":"PM";return ie?ue.toLowerCase():ue},W={YY:String(this.$y).slice(-2),YYYY:this.$y,M:D+1,MM:_.s(D+1,2,"0"),MMM:z(U.monthsShort,D,L,3),MMMM:z(L,D),D:this.$D,DD:_.s(this.$D,2,"0"),d:String(this.$W),dd:z(U.weekdaysMin,this.$W,k,2),ddd:z(U.weekdaysShort,this.$W,k,3),dddd:k[this.$W],H:String(q),HH:_.s(q,2,"0"),h:Y(1),hh:Y(2),a:te(q,O,!0),A:te(q,O,!1),m:String(O),mm:_.s(O,2,"0"),s:String(this.$s),ss:_.s(this.$s,2,"0"),SSS:_.s(this.$ms,3,"0"),Z:H};return j.replace(C,function(J,ne){return ne||W[J]||H.replace(":","")})},P.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},P.diff=function(I,N,U){var j,H=_.p(N),q=T(I),O=(q.utcOffset()-this.utcOffset())*t,D=this-q,k=_.m(this,q);return k=(j={},j[v]=k/12,j[g]=k,j[f]=k/3,j[l]=(D-O)/6048e5,j[o]=(D-O)/864e5,j[d]=D/i,j[c]=D/t,j[s]=D/n,j)[H]||D,U?k:_.a(k)},P.daysInMonth=function(){return this.endOf(g).$D},P.$locale=function(){return E[this.$L]},P.locale=function(I,N){if(!I)return this.$L;var U=this.clone(),j=A(I,N,!0);return j&&(U.$L=j),U},P.clone=function(){return _.w(this.$d,this)},P.toDate=function(){return new Date(this.valueOf())},P.toJSON=function(){return this.isValid()?this.toISOString():null},P.toISOString=function(){return this.$d.toISOString()},P.toString=function(){return this.$d.toUTCString()},R}(),B=S.prototype;return T.prototype=B,[["$ms",a],["$s",s],["$m",c],["$H",d],["$W",o],["$M",g],["$y",v],["$D",y]].forEach(function(R){B[R[1]]=function(P){return this.$g(P,R[0],R[1])}}),T.extend=function(R,P){return R.$i||(R(P,S,T),R.$i=!0),T},T.locale=A,T.isDayjs=w,T.unix=function(R){return T(1e3*R)},T.en=E[b],T.Ls=E,T.p={},T})})(Qf);const Ir=oa;Ir.extend(Xf);Ir.extend(Zf);const qo=["SUN","MON","TUE","WED","THU","FRI","SAT"],et=e=>{const[r,n]=e.split(":");return{hour:parseInt(r||"0",10),minutes:parseInt(n||"0",10)}};function sa(e,r,n){const{availability:t}=e;if(!t)return!0;if(wa(t))return!1;const i=n?Ir(n).tz(r):Ir().tz(r),a=i.day(),s=t[qo[a]];if(!Array.isArray(s)||s.length!==2)return!1;const c=i.hour(),d=i.minute(),o=et(s[0]),l=et(s[1]);return c<o.hour||c===o.hour&&d<o.minutes?!1:!(c>l.hour||c===l.hour&&d>l.minutes)}const ca=(e,r=void 0,n=void 0,t=!1)=>t?e.map(a=>{let s;return Array.isArray(a.items)&&(s=ca(a.items,r,n,t)),{...a,items:s,outsideAvailabilitySlot:!sa(a,r,n)||(s==null?void 0:s.every(c=>c.outsideAvailabilitySlot))||!1}}):e.filter(a=>sa(a,r,n)).map(a=>Array.isArray(a.items)?{...a,items:ca(a.items,r,n)}:a),o0=(e,r=void 0,n=void 0,t=!1)=>{let i=[];return e.forEach(a=>{if(!Array.isArray(a.items)){i.push(a);return}const s=ca(a.items,r,n,t);s.length>0&&i.push({...a,items:s})}),t&&(i=i.map(a=>!a.items||!Array.isArray(a.items)?a:{...a,outsideAvailabilitySlot:!sa(a,r,n)||a.items.every(s=>s.outsideAvailabilitySlot)})),i};function Rr(e,r){const n=e==null?void 0:e.week;if(!e||!e.active||!n)return!1;const t=Ir().tz(r),i=t.day(),a=n[qo[i]];return a?a.some(s=>el(t,s)):!1}function el(e,r){const n=e.hour(),t=e.minute(),i=et(r.from),a=et(r.to);return n<i.hour||n===i.hour&&t<i.minutes?!1:!(n>a.hour||n===a.hour&&t>a.minutes)}function rl(){this.__data__=[],this.size=0}var tl=rl;function nl(e,r){return e===r||e!==e&&r!==r}var Aa=nl,al=Aa;function il(e,r){for(var n=e.length;n--;)if(al(e[n][0],r))return n;return-1}var Yt=il,ol=Yt,sl=Array.prototype,cl=sl.splice;function ul(e){var r=this.__data__,n=ol(r,e);if(n<0)return!1;var t=r.length-1;return n==t?r.pop():cl.call(r,n,1),--this.size,!0}var fl=ul,ll=Yt;function dl(e){var r=this.__data__,n=ll(r,e);return n<0?void 0:r[n][1]}var hl=dl,vl=Yt;function xl(e){return vl(this.__data__,e)>-1}var pl=xl,gl=Yt;function ml(e,r){var n=this.__data__,t=gl(n,e);return t<0?(++this.size,n.push([e,r])):n[t][1]=r,this}var yl=ml,bl=tl,_l=fl,El=hl,$l=pl,wl=yl;function fr(e){var r=-1,n=e==null?0:e.length;for(this.clear();++r<n;){var t=e[r];this.set(t[0],t[1])}}fr.prototype.clear=bl;fr.prototype.delete=_l;fr.prototype.get=El;fr.prototype.has=$l;fr.prototype.set=wl;var Vt=fr,Al=Vt;function Cl(){this.__data__=new Al,this.size=0}var Sl=Cl;function Tl(e){var r=this.__data__,n=r.delete(e);return this.size=r.size,n}var Rl=Tl;function Ol(e){return this.__data__.get(e)}var Pl=Ol;function Il(e){return this.__data__.has(e)}var Dl=Il,Bl=Ke,kl=Bl(Object,"create"),Xt=kl,s0=Xt;function Ll(){this.__data__=s0?s0(null):{},this.size=0}var Ul=Ll;function Nl(e){var r=this.has(e)&&delete this.__data__[e];return this.size-=r?1:0,r}var jl=Nl,Fl=Xt,Hl="__lodash_hash_undefined__",ql=Object.prototype,Ml=ql.hasOwnProperty;function Wl(e){var r=this.__data__;if(Fl){var n=r[e];return n===Hl?void 0:n}return Ml.call(r,e)?r[e]:void 0}var zl=Wl,Gl=Xt,Kl=Object.prototype,Yl=Kl.hasOwnProperty;function Vl(e){var r=this.__data__;return Gl?r[e]!==void 0:Yl.call(r,e)}var Xl=Vl,Jl=Xt,Zl="__lodash_hash_undefined__";function Ql(e,r){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Jl&&r===void 0?Zl:r,this}var ed=Ql,rd=Ul,td=jl,nd=zl,ad=Xl,id=ed;function lr(e){var r=-1,n=e==null?0:e.length;for(this.clear();++r<n;){var t=e[r];this.set(t[0],t[1])}}lr.prototype.clear=rd;lr.prototype.delete=td;lr.prototype.get=nd;lr.prototype.has=ad;lr.prototype.set=id;var od=lr,c0=od,sd=Vt,cd=ba;function ud(){this.size=0,this.__data__={hash:new c0,map:new(cd||sd),string:new c0}}var fd=ud;function ld(e){var r=typeof e;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?e!=="__proto__":e===null}var dd=ld,hd=dd;function vd(e,r){var n=e.__data__;return hd(r)?n[typeof r=="string"?"string":"hash"]:n.map}var Jt=vd,xd=Jt;function pd(e){var r=xd(this,e).delete(e);return this.size-=r?1:0,r}var gd=pd,md=Jt;function yd(e){return md(this,e).get(e)}var bd=yd,_d=Jt;function Ed(e){return _d(this,e).has(e)}var $d=Ed,wd=Jt;function Ad(e,r){var n=wd(this,e),t=n.size;return n.set(e,r),this.size+=n.size==t?0:1,this}var Cd=Ad,Sd=fd,Td=gd,Rd=bd,Od=$d,Pd=Cd;function dr(e){var r=-1,n=e==null?0:e.length;for(this.clear();++r<n;){var t=e[r];this.set(t[0],t[1])}}dr.prototype.clear=Sd;dr.prototype.delete=Td;dr.prototype.get=Rd;dr.prototype.has=Od;dr.prototype.set=Pd;var Mo=dr,Id=Vt,Dd=ba,Bd=Mo,kd=200;function Ld(e,r){var n=this.__data__;if(n instanceof Id){var t=n.__data__;if(!Dd||t.length<kd-1)return t.push([e,r]),this.size=++n.size,this;n=this.__data__=new Bd(t)}return n.set(e,r),this.size=n.size,this}var Ud=Ld,Nd=Vt,jd=Sl,Fd=Rl,Hd=Pl,qd=Dl,Md=Ud;function hr(e){var r=this.__data__=new Nd(e);this.size=r.size}hr.prototype.clear=jd;hr.prototype.delete=Fd;hr.prototype.get=Hd;hr.prototype.has=qd;hr.prototype.set=Md;var Wo=hr,Wd="__lodash_hash_undefined__";function zd(e){return this.__data__.set(e,Wd),this}var Gd=zd;function Kd(e){return this.__data__.has(e)}var Yd=Kd,Vd=Mo,Xd=Gd,Jd=Yd;function rt(e){var r=-1,n=e==null?0:e.length;for(this.__data__=new Vd;++r<n;)this.add(e[r])}rt.prototype.add=rt.prototype.push=Xd;rt.prototype.has=Jd;var Zd=rt;function Qd(e,r){for(var n=-1,t=e==null?0:e.length;++n<t;)if(r(e[n],n,e))return!0;return!1}var eh=Qd;function rh(e,r){return e.has(r)}var th=rh,nh=Zd,ah=eh,ih=th,oh=1,sh=2;function ch(e,r,n,t,i,a){var s=n&oh,c=e.length,d=r.length;if(c!=d&&!(s&&d>c))return!1;var o=a.get(e),l=a.get(r);if(o&&l)return o==r&&l==e;var g=-1,f=!0,v=n&sh?new nh:void 0;for(a.set(e,r),a.set(r,e);++g<c;){var y=e[g],m=r[g];if(t)var p=s?t(m,y,g,r,e,a):t(y,m,g,e,r,a);if(p!==void 0){if(p)continue;f=!1;break}if(v){if(!ah(r,function(C,u){if(!ih(v,u)&&(y===C||i(y,C,n,t,a)))return v.push(u)})){f=!1;break}}else if(!(y===m||i(y,m,n,t,a))){f=!1;break}}return a.delete(e),a.delete(r),f}var zo=ch,uh=Ue,fh=uh.Uint8Array,Go=fh;function lh(e){var r=-1,n=Array(e.size);return e.forEach(function(t,i){n[++r]=[i,t]}),n}var dh=lh;function hh(e){var r=-1,n=Array(e.size);return e.forEach(function(t){n[++r]=t}),n}var vh=hh,u0=Gt,f0=Go,xh=Aa,ph=zo,gh=dh,mh=vh,yh=1,bh=2,_h="[object Boolean]",Eh="[object Date]",$h="[object Error]",wh="[object Map]",Ah="[object Number]",Ch="[object RegExp]",Sh="[object Set]",Th="[object String]",Rh="[object Symbol]",Oh="[object ArrayBuffer]",Ph="[object DataView]",l0=u0?u0.prototype:void 0,mn=l0?l0.valueOf:void 0;function Ih(e,r,n,t,i,a,s){switch(n){case Ph:if(e.byteLength!=r.byteLength||e.byteOffset!=r.byteOffset)return!1;e=e.buffer,r=r.buffer;case Oh:return!(e.byteLength!=r.byteLength||!a(new f0(e),new f0(r)));case _h:case Eh:case Ah:return xh(+e,+r);case $h:return e.name==r.name&&e.message==r.message;case Ch:case Th:return e==r+"";case wh:var c=gh;case Sh:var d=t&yh;if(c||(c=mh),e.size!=r.size&&!d)return!1;var o=s.get(e);if(o)return o==r;t|=bh,s.set(e,r);var l=ph(c(e),c(r),t,i,a,s);return s.delete(e),l;case Rh:if(mn)return mn.call(e)==mn.call(r)}return!1}var Dh=Ih;function Bh(e,r){for(var n=-1,t=r.length,i=e.length;++n<t;)e[i+n]=r[n];return e}var Ko=Bh,kh=Ko,Lh=Lr;function Uh(e,r,n){var t=r(e);return Lh(e)?t:kh(t,n(e))}var Yo=Uh;function Nh(e,r){for(var n=-1,t=e==null?0:e.length,i=0,a=[];++n<t;){var s=e[n];r(s,n,e)&&(a[i++]=s)}return a}var jh=Nh;function Fh(){return[]}var Vo=Fh,Hh=jh,qh=Vo,Mh=Object.prototype,Wh=Mh.propertyIsEnumerable,d0=Object.getOwnPropertySymbols,zh=d0?function(e){return e==null?[]:(e=Object(e),Hh(d0(e),function(r){return Wh.call(e,r)}))}:qh,Ca=zh;function Gh(e,r){for(var n=-1,t=Array(e);++n<e;)t[n]=r(n);return t}var Kh=Gh,Yh=9007199254740991,Vh=/^(?:0|[1-9]\d*)$/;function Xh(e,r){var n=typeof e;return r=r??Yh,!!r&&(n=="number"||n!="symbol"&&Vh.test(e))&&e>-1&&e%1==0&&e<r}var Jh=Xh,Zh=Kh,Qh=Fo,ev=Lr,rv=Ge,tv=Jh,nv=$a,av=Object.prototype,iv=av.hasOwnProperty;function ov(e,r){var n=ev(e),t=!n&&Qh(e),i=!n&&!t&&rv(e),a=!n&&!t&&!i&&nv(e),s=n||t||i||a,c=s?Zh(e.length,String):[],d=c.length;for(var o in e)(r||iv.call(e,o))&&!(s&&(o=="length"||i&&(o=="offset"||o=="parent")||a&&(o=="buffer"||o=="byteLength"||o=="byteOffset")||tv(o,d)))&&c.push(o);return c}var Xo=ov,sv=Xo,cv=Do,uv=_a;function fv(e){return uv(e)?sv(e):cv(e)}var Sa=fv,lv=Yo,dv=Ca,hv=Sa;function vv(e){return lv(e,hv,dv)}var Jo=vv,h0=Jo,xv=1,pv=Object.prototype,gv=pv.hasOwnProperty;function mv(e,r,n,t,i,a){var s=n&xv,c=h0(e),d=c.length,o=h0(r),l=o.length;if(d!=l&&!s)return!1;for(var g=d;g--;){var f=c[g];if(!(s?f in r:gv.call(r,f)))return!1}var v=a.get(e),y=a.get(r);if(v&&y)return v==r&&y==e;var m=!0;a.set(e,r),a.set(r,e);for(var p=s;++g<d;){f=c[g];var C=e[f],u=r[f];if(t)var h=s?t(u,C,f,r,e,a):t(C,u,f,e,r,a);if(!(h===void 0?C===u||i(C,u,n,t,a):h)){m=!1;break}p||(p=f=="constructor")}if(m&&!p){var x=e.constructor,b=r.constructor;x!=b&&"constructor"in e&&"constructor"in r&&!(typeof x=="function"&&x instanceof x&&typeof b=="function"&&b instanceof b)&&(m=!1)}return a.delete(e),a.delete(r),m}var yv=mv,yn=Wo,bv=zo,_v=Dh,Ev=yv,v0=kr,x0=Lr,p0=Ge,$v=$a,wv=1,g0="[object Arguments]",m0="[object Array]",Kr="[object Object]",Av=Object.prototype,y0=Av.hasOwnProperty;function Cv(e,r,n,t,i,a){var s=x0(e),c=x0(r),d=s?m0:v0(e),o=c?m0:v0(r);d=d==g0?Kr:d,o=o==g0?Kr:o;var l=d==Kr,g=o==Kr,f=d==o;if(f&&p0(e)){if(!p0(r))return!1;s=!0,l=!1}if(f&&!l)return a||(a=new yn),s||$v(e)?bv(e,r,n,t,i,a):_v(e,r,d,n,t,i,a);if(!(n&wv)){var v=l&&y0.call(e,"__wrapped__"),y=g&&y0.call(r,"__wrapped__");if(v||y){var m=v?e.value():e,p=y?r.value():r;return a||(a=new yn),i(m,p,n,t,a)}}return f?(a||(a=new yn),Ev(e,r,n,t,i,a)):!1}var Sv=Cv,Tv=Sv,b0=ur;function Zo(e,r,n,t,i){return e===r?!0:e==null||r==null||!b0(e)&&!b0(r)?e!==e&&r!==r:Tv(e,r,n,t,Zo,i)}var Rv=Zo,Ov=Rv;function Pv(e,r){return Ov(e,r)}var Qo=Pv;function es(e){let r=0;return e==null||e.forEach(n=>r+=Number(n.discountPrice)),r}function Iv(e){return es(e.discounts)}function Dv(e,r,n=",",t=2){return`${Number(e).toFixed(t).replace(".",n)}${r?" "+r:""}`}function rs(e,r){var i;const n=(i=e._)==null?void 0:i.enableKey;return n?!r||!Array.isArray(r)||r.length===0?!1:n.replace(/\s/g,"").split(",").some(a=>r.includes(a)):!0}function Bv(e){var n,t,i,a,s,c;const r=(t=(n=e.details)==null?void 0:n.literals)==null?void 0:t.name.split(" ").filter(d=>d!=="");return r?r.length===1?((c=(s=(a=(i=e.details)==null?void 0:i.literals)==null?void 0:a.name)==null?void 0:s.slice)==null?void 0:c.call(s,0,2))||"":r.length>1?`${r[0][0]}${r[1][0]}`:"":""}function ts(e,r=!1,n=void 0,t=60){const[i,a]=re.useState(e&&o0(e,n,void 0,r));Wt(s,t*1e3);function s(){const c=e&&o0(e,n,void 0,r);Qo(c,i)||(console.log("menu has changed",c),a(c))}return re.useEffect(s,[i,e]),i}function ns(e,r){return e.__||(e.__={}),e.__.isHiddenByEnableKey=!rs(e,r),e.items&&e.items.length>0&&(e.items=e.items.map(n=>ns(n,r))),e}function kv(e,r){if(e)return e.map(n=>ns(n,r))}function Lv({originalMenu:e,markOnly:r=!1,timeZone:n,interval:t=60,enableKeys:i=[]}){const a=ts(e,r,n,t);return kv(a,i)}var _0;(function(e){e.UNINITIALIZED="UNINITIALIZED",e.PROCESSING="PROCESSING",e.PAID="PAID",e.FAILED="FAILED",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"})(_0||(_0={}));var E0;(function(e){e.CAROUSEL="carousel",e.NORMAL="normal",e.IMAGE="image"})(E0||(E0={}));var ua;(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"})(ua||(ua={}));var $0;(function(e){e.GROUP="group",e.PRODUCT="product"})($0||($0={}));var w0;(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"})(w0||(w0={}));var A0;(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"})(A0||(A0={}));var C0;(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"})(C0||(C0={}));var S0;(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"})(S0||(S0={}));var T0;(function(e){e.NEW="NEW",e.TECHNICAL="TECHNICAL",e.CONFIRMED="CONFIRMED",e.PROCESSING="PROCESSING",e.PROCESSED="PROCESSED",e.VOID="VOID",e.WASTE="WASTE"})(T0||(T0={}));var R0;(function(e){e.GROUP="group",e.PRODUCT="product"})(R0||(R0={}));var O0;(function(e){e.DINE_IN="DINE_IN",e.TAKE_AWAY="TAKE_AWAY",e.DELIVERY="DELIVERY",e.GLOVO="GLOVO",e.JUSTEAT="JUSTEAT",e.UBER="UBER",e.BOLT="BOLT",e.WOLT="WOLT"})(O0||(O0={}));var P0;(function(e){e.ORDER_EVENT_ERROR="OrderEventError",e.ORDER_APPLIED_EVENTS="OrderAppliedEvents",e.ORDER_EVENT_FISCAL="OrderEventFiscal",e.ORDER_UPSELL="OrderUpsell"})(P0||(P0={}));function Uv(e,r){for(var n=-1,t=e==null?0:e.length;++n<t&&r(e[n],n,e)!==!1;);return e}var Nv=Uv,jv=Ke,Fv=function(){try{var e=jv(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Hv=Fv,I0=Hv;function qv(e,r,n){r=="__proto__"&&I0?I0(e,r,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[r]=n}var as=qv,Mv=as,Wv=Aa,zv=Object.prototype,Gv=zv.hasOwnProperty;function Kv(e,r,n){var t=e[r];(!(Gv.call(e,r)&&Wv(t,n))||n===void 0&&!(r in e))&&Mv(e,r,n)}var is=Kv,Yv=is,Vv=as;function Xv(e,r,n,t){var i=!n;n||(n={});for(var a=-1,s=r.length;++a<s;){var c=r[a],d=t?t(n[c],e[c],c,n,e):void 0;d===void 0&&(d=e[c]),i?Vv(n,c,d):Yv(n,c,d)}return n}var Zt=Xv,Jv=Zt,Zv=Sa;function Qv(e,r){return e&&Jv(r,Zv(r),e)}var ex=Qv;function rx(e){var r=[];if(e!=null)for(var n in Object(e))r.push(n);return r}var tx=rx,nx=Br,ax=zt,ix=tx,ox=Object.prototype,sx=ox.hasOwnProperty;function cx(e){if(!nx(e))return ix(e);var r=ax(e),n=[];for(var t in e)t=="constructor"&&(r||!sx.call(e,t))||n.push(t);return n}var ux=cx,fx=Xo,lx=ux,dx=_a;function hx(e){return dx(e)?fx(e,!0):lx(e)}var Ta=hx,vx=Zt,xx=Ta;function px(e,r){return e&&vx(r,xx(r),e)}var gx=px,tt={},mx={get exports(){return tt},set exports(e){tt=e}};(function(e,r){var n=Ue,t=r&&!r.nodeType&&r,i=t&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===t,s=a?n.Buffer:void 0,c=s?s.allocUnsafe:void 0;function d(o,l){if(l)return o.slice();var g=o.length,f=c?c(g):new o.constructor(g);return o.copy(f),f}e.exports=d})(mx,tt);function yx(e,r){var n=-1,t=e.length;for(r||(r=Array(t));++n<t;)r[n]=e[n];return r}var bx=yx,_x=Zt,Ex=Ca;function $x(e,r){return _x(e,Ex(e),r)}var wx=$x,Ax=Io,Cx=Ax(Object.getPrototypeOf,Object),os=Cx,Sx=Ko,Tx=os,Rx=Ca,Ox=Vo,Px=Object.getOwnPropertySymbols,Ix=Px?function(e){for(var r=[];e;)Sx(r,Rx(e)),e=Tx(e);return r}:Ox,ss=Ix,Dx=Zt,Bx=ss;function kx(e,r){return Dx(e,Bx(e),r)}var Lx=kx,Ux=Yo,Nx=ss,jx=Ta;function Fx(e){return Ux(e,jx,Nx)}var Hx=Fx,qx=Object.prototype,Mx=qx.hasOwnProperty;function Wx(e){var r=e.length,n=new e.constructor(r);return r&&typeof e[0]=="string"&&Mx.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var zx=Wx,D0=Go;function Gx(e){var r=new e.constructor(e.byteLength);return new D0(r).set(new D0(e)),r}var Ra=Gx,Kx=Ra;function Yx(e,r){var n=r?Kx(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var Vx=Yx,Xx=/\w*$/;function Jx(e){var r=new e.constructor(e.source,Xx.exec(e));return r.lastIndex=e.lastIndex,r}var Zx=Jx,B0=Gt,k0=B0?B0.prototype:void 0,L0=k0?k0.valueOf:void 0;function Qx(e){return L0?Object(L0.call(e)):{}}var e1=Qx,r1=Ra;function t1(e,r){var n=r?r1(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var n1=t1,a1=Ra,i1=Vx,o1=Zx,s1=e1,c1=n1,u1="[object Boolean]",f1="[object Date]",l1="[object Map]",d1="[object Number]",h1="[object RegExp]",v1="[object Set]",x1="[object String]",p1="[object Symbol]",g1="[object ArrayBuffer]",m1="[object DataView]",y1="[object Float32Array]",b1="[object Float64Array]",_1="[object Int8Array]",E1="[object Int16Array]",$1="[object Int32Array]",w1="[object Uint8Array]",A1="[object Uint8ClampedArray]",C1="[object Uint16Array]",S1="[object Uint32Array]";function T1(e,r,n){var t=e.constructor;switch(r){case g1:return a1(e);case u1:case f1:return new t(+e);case m1:return i1(e,n);case y1:case b1:case _1:case E1:case $1:case w1:case A1:case C1:case S1:return c1(e,n);case l1:return new t;case d1:case x1:return new t(e);case h1:return o1(e);case v1:return new t;case p1:return s1(e)}}var R1=T1,O1=Br,U0=Object.create,P1=function(){function e(){}return function(r){if(!O1(r))return{};if(U0)return U0(r);e.prototype=r;var n=new e;return e.prototype=void 0,n}}(),I1=P1,D1=I1,B1=os,k1=zt;function L1(e){return typeof e.constructor=="function"&&!k1(e)?D1(B1(e)):{}}var U1=L1,N1=kr,j1=ur,F1="[object Map]";function H1(e){return j1(e)&&N1(e)==F1}var q1=H1,M1=q1,W1=Ea,N0=or,j0=N0&&N0.isMap,z1=j0?W1(j0):M1,G1=z1,K1=kr,Y1=ur,V1="[object Set]";function X1(e){return Y1(e)&&K1(e)==V1}var J1=X1,Z1=J1,Q1=Ea,F0=or,H0=F0&&F0.isSet,ep=H0?Q1(H0):Z1,rp=ep,tp=Wo,np=Nv,ap=is,ip=ex,op=gx,sp=tt,cp=bx,up=wx,fp=Lx,lp=Jo,dp=Hx,hp=kr,vp=zx,xp=R1,pp=U1,gp=Lr,mp=Ge,yp=G1,bp=Br,_p=rp,Ep=Sa,$p=Ta,wp=1,Ap=2,Cp=4,cs="[object Arguments]",Sp="[object Array]",Tp="[object Boolean]",Rp="[object Date]",Op="[object Error]",us="[object Function]",Pp="[object GeneratorFunction]",Ip="[object Map]",Dp="[object Number]",fs="[object Object]",Bp="[object RegExp]",kp="[object Set]",Lp="[object String]",Up="[object Symbol]",Np="[object WeakMap]",jp="[object ArrayBuffer]",Fp="[object DataView]",Hp="[object Float32Array]",qp="[object Float64Array]",Mp="[object Int8Array]",Wp="[object Int16Array]",zp="[object Int32Array]",Gp="[object Uint8Array]",Kp="[object Uint8ClampedArray]",Yp="[object Uint16Array]",Vp="[object Uint32Array]",se={};se[cs]=se[Sp]=se[jp]=se[Fp]=se[Tp]=se[Rp]=se[Hp]=se[qp]=se[Mp]=se[Wp]=se[zp]=se[Ip]=se[Dp]=se[fs]=se[Bp]=se[kp]=se[Lp]=se[Up]=se[Gp]=se[Kp]=se[Yp]=se[Vp]=!0;se[Op]=se[us]=se[Np]=!1;function Vr(e,r,n,t,i,a){var s,c=r&wp,d=r&Ap,o=r&Cp;if(n&&(s=i?n(e,t,i,a):n(e)),s!==void 0)return s;if(!bp(e))return e;var l=gp(e);if(l){if(s=vp(e),!c)return cp(e,s)}else{var g=hp(e),f=g==us||g==Pp;if(mp(e))return sp(e,c);if(g==fs||g==cs||f&&!i){if(s=d||f?{}:pp(e),!c)return d?fp(e,op(s,e)):up(e,ip(s,e))}else{if(!se[g])return i?e:{};s=xp(e,g,c)}}a||(a=new tp);var v=a.get(e);if(v)return v;a.set(e,s),_p(e)?e.forEach(function(p){s.add(Vr(p,r,n,p,e,a))}):yp(e)&&e.forEach(function(p,C){s.set(C,Vr(p,r,n,C,e,a))});var y=o?d?dp:lp:d?$p:Ep,m=l?void 0:y(e);return np(m||e,function(p,C){m&&(C=p,p=e[C]),ap(s,C,Vr(p,r,n,C,e,a))}),s}var Xp=Vr,Jp=Xp,Zp=1,Qp=4;function eg(e){return Jp(e,Zp|Qp)}var rg=eg;function tg(e,r){if(!r||!r.filter||!e||!e.filter||e.kind!==ua.CONFIG)return!0;if(e.filter&&e.items){const n=Object.values(e.filter).flat().filter(t=>{var i,a,s,c;return r.filter[(a=(i=e.items)==null?void 0:i[0])==null?void 0:a.fltCtx]&&Object.values(r.filter[(c=(s=e.items)==null?void 0:s[0])==null?void 0:c.fltCtx]).includes(t)});if(Array.isArray(n)&&n.length===0)return!1}return!0}const nt=(e,r,n=0)=>{if(!e)return 0;let t=parseFloat(e.price)||0;const{items:i}=e,a=rg(r);return tg(e,a)&&Array.isArray(i)&&i.forEach(s=>{let c=0;if(s.kind!=="3e/product")c=nt(s,a,n+1);else{const{selected:d={}}=a,{selCtx:o,id:l}=s;o in d&&l in d[o]&&(c=nt(s,a,n+1)*d[o][l],delete a.selected[o][l])}t+=c}),Math.round(100*t)/100},ng=({product:e,state:r,selected:n,cheapestGroupOptionsProduct:t})=>{var d;const i=r?nt(e,r):0,a=e.state&&!wa((d=e==null?void 0:e.state)==null?void 0:d.selected)?nt(e,e.state):0,s=e.minPrice&&parseFloat(e.price)===i;let c=n||t||parseFloat(e.price)===0?i||a:parseFloat(e.price);return t!==void 0&&(c-=t),s&&e.minPrice&&(c=parseFloat(e.minPrice)),{displayPrice:c,showAsMinPrice:s,calculatedPriceDefaultProductState:a}};function Oa(e){const r=[];return e.reduce((n,t)=>{if(n[t.hash]||(n[t.hash]={...t,quantity:0,discounted:0,discounts:[],firstProductQuantity:t.quantity,itemsToRemove:[]},r.push(n[t.hash])),n[t.hash].quantity+=t.quantity,n[t.hash].itemsToRemove.push(t.id),t.discounts){n[t.hash].discounts||(n[t.hash].discounts=[]),n[t.hash].discounts=n[t.hash].discounts.concat(t.discounts),n[t.hash].discounted=0;for(let i=0;i<n[t.hash].discounts.length;i+=1)n[t.hash].discounts[i]&&(n[t.hash].discounted+=parseFloat(n[t.hash].discounts[i].discountPrice))}return n},{}),r}function ag(e){return Oa(e)}function ig(e){return!e||e.length===0?null:Oa(e.flatMap(r=>r.lines))}var fa={},og={get exports(){return fa},set exports(e){fa=e}},at={},sg={get exports(){return at},set exports(e){at=e}},ls=function(r,n){return function(){for(var i=new Array(arguments.length),a=0;a<i.length;a++)i[a]=arguments[a];return r.apply(n,i)}},cg=ls,Ye=Object.prototype.toString;function Pa(e){return Ye.call(e)==="[object Array]"}function la(e){return typeof e>"u"}function ug(e){return e!==null&&!la(e)&&e.constructor!==null&&!la(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function fg(e){return Ye.call(e)==="[object ArrayBuffer]"}function lg(e){return typeof FormData<"u"&&e instanceof FormData}function dg(e){var r;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?r=ArrayBuffer.isView(e):r=e&&e.buffer&&e.buffer instanceof ArrayBuffer,r}function hg(e){return typeof e=="string"}function vg(e){return typeof e=="number"}function ds(e){return e!==null&&typeof e=="object"}function Xr(e){if(Ye.call(e)!=="[object Object]")return!1;var r=Object.getPrototypeOf(e);return r===null||r===Object.prototype}function xg(e){return Ye.call(e)==="[object Date]"}function pg(e){return Ye.call(e)==="[object File]"}function gg(e){return Ye.call(e)==="[object Blob]"}function hs(e){return Ye.call(e)==="[object Function]"}function mg(e){return ds(e)&&hs(e.pipe)}function yg(e){return typeof URLSearchParams<"u"&&e instanceof URLSearchParams}function bg(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function _g(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Ia(e,r){if(!(e===null||typeof e>"u"))if(typeof e!="object"&&(e=[e]),Pa(e))for(var n=0,t=e.length;n<t;n++)r.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.call(null,e[i],i,e)}function da(){var e={};function r(i,a){Xr(e[a])&&Xr(i)?e[a]=da(e[a],i):Xr(i)?e[a]=da({},i):Pa(i)?e[a]=i.slice():e[a]=i}for(var n=0,t=arguments.length;n<t;n++)Ia(arguments[n],r);return e}function Eg(e,r,n){return Ia(r,function(i,a){n&&typeof i=="function"?e[a]=cg(i,n):e[a]=i}),e}function $g(e){return e.charCodeAt(0)===65279&&(e=e.slice(1)),e}var $e={isArray:Pa,isArrayBuffer:fg,isBuffer:ug,isFormData:lg,isArrayBufferView:dg,isString:hg,isNumber:vg,isObject:ds,isPlainObject:Xr,isUndefined:la,isDate:xg,isFile:pg,isBlob:gg,isFunction:hs,isStream:mg,isURLSearchParams:yg,isStandardBrowserEnv:_g,forEach:Ia,merge:da,extend:Eg,trim:bg,stripBOM:$g},er=$e;function q0(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var vs=function(r,n,t){if(!n)return r;var i;if(t)i=t(n);else if(er.isURLSearchParams(n))i=n.toString();else{var a=[];er.forEach(n,function(d,o){d===null||typeof d>"u"||(er.isArray(d)?o=o+"[]":d=[d],er.forEach(d,function(g){er.isDate(g)?g=g.toISOString():er.isObject(g)&&(g=JSON.stringify(g)),a.push(q0(o)+"="+q0(g))}))}),i=a.join("&")}if(i){var s=r.indexOf("#");s!==-1&&(r=r.slice(0,s)),r+=(r.indexOf("?")===-1?"?":"&")+i}return r},wg=$e;function Qt(){this.handlers=[]}Qt.prototype.use=function(r,n,t){return this.handlers.push({fulfilled:r,rejected:n,synchronous:t?t.synchronous:!1,runWhen:t?t.runWhen:null}),this.handlers.length-1};Qt.prototype.eject=function(r){this.handlers[r]&&(this.handlers[r]=null)};Qt.prototype.forEach=function(r){wg.forEach(this.handlers,function(t){t!==null&&r(t)})};var Ag=Qt,Cg=$e,Sg=function(r,n){Cg.forEach(r,function(i,a){a!==n&&a.toUpperCase()===n.toUpperCase()&&(r[n]=i,delete r[a])})},xs=function(r,n,t,i,a){return r.config=n,t&&(r.code=t),r.request=i,r.response=a,r.isAxiosError=!0,r.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}},r},bn,M0;function ps(){if(M0)return bn;M0=1;var e=xs;return bn=function(n,t,i,a,s){var c=new Error(n);return e(c,t,i,a,s)},bn}var _n,W0;function Tg(){if(W0)return _n;W0=1;var e=ps();return _n=function(n,t,i){var a=i.config.validateStatus;!i.status||!a||a(i.status)?n(i):t(e("Request failed with status code "+i.status,i.config,null,i.request,i))},_n}var En,z0;function Rg(){if(z0)return En;z0=1;var e=$e;return En=e.isStandardBrowserEnv()?function(){return{write:function(t,i,a,s,c,d){var o=[];o.push(t+"="+encodeURIComponent(i)),e.isNumber(a)&&o.push("expires="+new Date(a).toGMTString()),e.isString(s)&&o.push("path="+s),e.isString(c)&&o.push("domain="+c),d===!0&&o.push("secure"),document.cookie=o.join("; ")},read:function(t){var i=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),En}var $n,G0;function Og(){return G0||(G0=1,$n=function(r){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(r)}),$n}var wn,K0;function Pg(){return K0||(K0=1,wn=function(r,n){return n?r.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):r}),wn}var An,Y0;function Ig(){if(Y0)return An;Y0=1;var e=Og(),r=Pg();return An=function(t,i){return t&&!e(i)?r(t,i):i},An}var Cn,V0;function Dg(){if(V0)return Cn;V0=1;var e=$e,r=["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"];return Cn=function(t){var i={},a,s,c;return t&&e.forEach(t.split(`
|
|
2
|
+
`),function(o){if(c=o.indexOf(":"),a=e.trim(o.substr(0,c)).toLowerCase(),s=e.trim(o.substr(c+1)),a){if(i[a]&&r.indexOf(a)>=0)return;a==="set-cookie"?i[a]=(i[a]?i[a]:[]).concat([s]):i[a]=i[a]?i[a]+", "+s:s}}),i},Cn}var Sn,X0;function Bg(){if(X0)return Sn;X0=1;var e=$e;return Sn=e.isStandardBrowserEnv()?function(){var n=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a"),i;function a(s){var c=s;return n&&(t.setAttribute("href",c),c=t.href),t.setAttribute("href",c),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return i=a(window.location.href),function(c){var d=e.isString(c)?a(c):c;return d.protocol===i.protocol&&d.host===i.host}}():function(){return function(){return!0}}(),Sn}var Tn,J0;function Z0(){if(J0)return Tn;J0=1;var e=$e,r=Tg(),n=Rg(),t=vs,i=Ig(),a=Dg(),s=Bg(),c=ps();return Tn=function(o){return new Promise(function(g,f){var v=o.data,y=o.headers,m=o.responseType;e.isFormData(v)&&delete y["Content-Type"];var p=new XMLHttpRequest;if(o.auth){var C=o.auth.username||"",u=o.auth.password?unescape(encodeURIComponent(o.auth.password)):"";y.Authorization="Basic "+btoa(C+":"+u)}var h=i(o.baseURL,o.url);p.open(o.method.toUpperCase(),t(h,o.params,o.paramsSerializer),!0),p.timeout=o.timeout;function x(){if(p){var E="getAllResponseHeaders"in p?a(p.getAllResponseHeaders()):null,w=!m||m==="text"||m==="json"?p.responseText:p.response,A={data:w,status:p.status,statusText:p.statusText,headers:E,config:o,request:p};r(g,f,A),p=null}}if("onloadend"in p?p.onloadend=x:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(x)},p.onabort=function(){p&&(f(c("Request aborted",o,"ECONNABORTED",p)),p=null)},p.onerror=function(){f(c("Network Error",o,null,p)),p=null},p.ontimeout=function(){var w="timeout of "+o.timeout+"ms exceeded";o.timeoutErrorMessage&&(w=o.timeoutErrorMessage),f(c(w,o,o.transitional&&o.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},e.isStandardBrowserEnv()){var b=(o.withCredentials||s(h))&&o.xsrfCookieName?n.read(o.xsrfCookieName):void 0;b&&(y[o.xsrfHeaderName]=b)}"setRequestHeader"in p&&e.forEach(y,function(w,A){typeof v>"u"&&A.toLowerCase()==="content-type"?delete y[A]:p.setRequestHeader(A,w)}),e.isUndefined(o.withCredentials)||(p.withCredentials=!!o.withCredentials),m&&m!=="json"&&(p.responseType=o.responseType),typeof o.onDownloadProgress=="function"&&p.addEventListener("progress",o.onDownloadProgress),typeof o.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",o.onUploadProgress),o.cancelToken&&o.cancelToken.promise.then(function(w){p&&(p.abort(),f(w),p=null)}),v||(v=null),p.send(v)})},Tn}var ve=$e,Q0=Sg,kg=xs,Lg={"Content-Type":"application/x-www-form-urlencoded"};function ei(e,r){!ve.isUndefined(e)&&ve.isUndefined(e["Content-Type"])&&(e["Content-Type"]=r)}function Ug(){var e;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(e=Z0()),e}function Ng(e,r,n){if(ve.isString(e))try{return(r||JSON.parse)(e),ve.trim(e)}catch(t){if(t.name!=="SyntaxError")throw t}return(n||JSON.stringify)(e)}var en={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:Ug(),transformRequest:[function(r,n){return Q0(n,"Accept"),Q0(n,"Content-Type"),ve.isFormData(r)||ve.isArrayBuffer(r)||ve.isBuffer(r)||ve.isStream(r)||ve.isFile(r)||ve.isBlob(r)?r:ve.isArrayBufferView(r)?r.buffer:ve.isURLSearchParams(r)?(ei(n,"application/x-www-form-urlencoded;charset=utf-8"),r.toString()):ve.isObject(r)||n&&n["Content-Type"]==="application/json"?(ei(n,"application/json"),Ng(r)):r}],transformResponse:[function(r){var n=this.transitional,t=n&&n.silentJSONParsing,i=n&&n.forcedJSONParsing,a=!t&&this.responseType==="json";if(a||i&&ve.isString(r)&&r.length)try{return JSON.parse(r)}catch(s){if(a)throw s.name==="SyntaxError"?kg(s,this,"E_JSON_PARSE"):s}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(r){return r>=200&&r<300}};en.headers={common:{Accept:"application/json, text/plain, */*"}};ve.forEach(["delete","get","head"],function(r){en.headers[r]={}});ve.forEach(["post","put","patch"],function(r){en.headers[r]=ve.merge(Lg)});var Da=en,jg=$e,Fg=Da,Hg=function(r,n,t){var i=this||Fg;return jg.forEach(t,function(s){r=s.call(i,r,n)}),r},Rn,ri;function gs(){return ri||(ri=1,Rn=function(r){return!!(r&&r.__CANCEL__)}),Rn}var ti=$e,On=Hg,qg=gs(),Mg=Da;function Pn(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var Wg=function(r){Pn(r),r.headers=r.headers||{},r.data=On.call(r,r.data,r.headers,r.transformRequest),r.headers=ti.merge(r.headers.common||{},r.headers[r.method]||{},r.headers),ti.forEach(["delete","get","head","post","put","patch","common"],function(i){delete r.headers[i]});var n=r.adapter||Mg.adapter;return n(r).then(function(i){return Pn(r),i.data=On.call(r,i.data,i.headers,r.transformResponse),i},function(i){return qg(i)||(Pn(r),i&&i.response&&(i.response.data=On.call(r,i.response.data,i.response.headers,r.transformResponse))),Promise.reject(i)})},me=$e,ms=function(r,n){n=n||{};var t={},i=["url","method","data"],a=["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"],c=["validateStatus"];function d(f,v){return me.isPlainObject(f)&&me.isPlainObject(v)?me.merge(f,v):me.isPlainObject(v)?me.merge({},v):me.isArray(v)?v.slice():v}function o(f){me.isUndefined(n[f])?me.isUndefined(r[f])||(t[f]=d(void 0,r[f])):t[f]=d(r[f],n[f])}me.forEach(i,function(v){me.isUndefined(n[v])||(t[v]=d(void 0,n[v]))}),me.forEach(a,o),me.forEach(s,function(v){me.isUndefined(n[v])?me.isUndefined(r[v])||(t[v]=d(void 0,r[v])):t[v]=d(void 0,n[v])}),me.forEach(c,function(v){v in n?t[v]=d(r[v],n[v]):v in r&&(t[v]=d(void 0,r[v]))});var l=i.concat(a).concat(s).concat(c),g=Object.keys(r).concat(Object.keys(n)).filter(function(v){return l.indexOf(v)===-1});return me.forEach(g,o),t};const zg="axios",Gg="0.21.4",Kg="Promise based HTTP client for the browser and node.js",Yg="index.js",Vg={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"},Xg={type:"git",url:"https://github.com/axios/axios.git"},Jg=["xhr","http","ajax","promise","node"],Zg="Matt Zabriskie",Qg="MIT",em={url:"https://github.com/axios/axios/issues"},rm="https://axios-http.com",tm={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"},nm={"./lib/adapters/http.js":"./lib/adapters/xhr.js"},am="dist/axios.min.js",im="dist/axios.min.js",om="./index.d.ts",sm={"follow-redirects":"^1.14.0"},cm=[{path:"./dist/axios.min.js",threshold:"5kB"}],um={name:zg,version:Gg,description:Kg,main:Yg,scripts:Vg,repository:Xg,keywords:Jg,author:Zg,license:Qg,bugs:em,homepage:rm,devDependencies:tm,browser:nm,jsdelivr:am,unpkg:im,typings:om,dependencies:sm,bundlesize:cm};var ys=um,Ba={};["object","boolean","number","function","string","symbol"].forEach(function(e,r){Ba[e]=function(t){return typeof t===e||"a"+(r<1?"n ":" ")+e}});var ni={},fm=ys.version.split(".");function bs(e,r){for(var n=r?r.split("."):fm,t=e.split("."),i=0;i<3;i++){if(n[i]>t[i])return!0;if(n[i]<t[i])return!1}return!1}Ba.transitional=function(r,n,t){var i=n&&bs(n);function a(s,c){return"[Axios v"+ys.version+"] Transitional option '"+s+"'"+c+(t?". "+t:"")}return function(s,c,d){if(r===!1)throw new Error(a(c," has been removed in "+n));return i&&!ni[c]&&(ni[c]=!0,console.warn(a(c," has been deprecated since v"+n+" and will be removed in the near future"))),r?r(s,c,d):!0}};function lm(e,r,n){if(typeof e!="object")throw new TypeError("options must be an object");for(var t=Object.keys(e),i=t.length;i-- >0;){var a=t[i],s=r[a];if(s){var c=e[a],d=c===void 0||s(c,a,e);if(d!==!0)throw new TypeError("option "+a+" must be "+d);continue}if(n!==!0)throw Error("Unknown option "+a)}}var dm={isOlderVersion:bs,assertOptions:lm,validators:Ba},_s=$e,hm=vs,ai=Ag,ii=Wg,rn=ms,Es=dm,rr=Es.validators;function Ur(e){this.defaults=e,this.interceptors={request:new ai,response:new ai}}Ur.prototype.request=function(r){typeof r=="string"?(r=arguments[1]||{},r.url=arguments[0]):r=r||{},r=rn(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var n=r.transitional;n!==void 0&&Es.assertOptions(n,{silentJSONParsing:rr.transitional(rr.boolean,"1.0.0"),forcedJSONParsing:rr.transitional(rr.boolean,"1.0.0"),clarifyTimeoutError:rr.transitional(rr.boolean,"1.0.0")},!1);var t=[],i=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(r)===!1||(i=i&&f.synchronous,t.unshift(f.fulfilled,f.rejected))});var a=[];this.interceptors.response.forEach(function(f){a.push(f.fulfilled,f.rejected)});var s;if(!i){var c=[ii,void 0];for(Array.prototype.unshift.apply(c,t),c=c.concat(a),s=Promise.resolve(r);c.length;)s=s.then(c.shift(),c.shift());return s}for(var d=r;t.length;){var o=t.shift(),l=t.shift();try{d=o(d)}catch(g){l(g);break}}try{s=ii(d)}catch(g){return Promise.reject(g)}for(;a.length;)s=s.then(a.shift(),a.shift());return s};Ur.prototype.getUri=function(r){return r=rn(this.defaults,r),hm(r.url,r.params,r.paramsSerializer).replace(/^\?/,"")};_s.forEach(["delete","get","head","options"],function(r){Ur.prototype[r]=function(n,t){return this.request(rn(t||{},{method:r,url:n,data:(t||{}).data}))}});_s.forEach(["post","put","patch"],function(r){Ur.prototype[r]=function(n,t,i){return this.request(rn(i||{},{method:r,url:n,data:t}))}});var vm=Ur,In,oi;function $s(){if(oi)return In;oi=1;function e(r){this.message=r}return e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,In=e,In}var Dn,si;function xm(){if(si)return Dn;si=1;var e=$s();function r(n){if(typeof n!="function")throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(s){t=s});var i=this;n(function(s){i.reason||(i.reason=new e(s),t(i.reason))})}return r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var t,i=new r(function(s){t=s});return{token:i,cancel:t}},Dn=r,Dn}var Bn,ci;function pm(){return ci||(ci=1,Bn=function(r){return function(t){return r.apply(null,t)}}),Bn}var kn,ui;function gm(){return ui||(ui=1,kn=function(r){return typeof r=="object"&&r.isAxiosError===!0}),kn}var fi=$e,mm=ls,Jr=vm,ym=ms,bm=Da;function ws(e){var r=new Jr(e),n=mm(Jr.prototype.request,r);return fi.extend(n,Jr.prototype,r),fi.extend(n,r),n}var Pe=ws(bm);Pe.Axios=Jr;Pe.create=function(r){return ws(ym(Pe.defaults,r))};Pe.Cancel=$s();Pe.CancelToken=xm();Pe.isCancel=gs();Pe.all=function(r){return Promise.all(r)};Pe.spread=pm();Pe.isAxiosError=gm();sg.exports=Pe;at.default=Pe;(function(e){e.exports=at})(og);const Or=Po(fa),_m=(e,r)=>{var n,t,i;return e&&((n=e==null?void 0:e.url)==null?void 0:n.length)>0&&(((t=e.url.find(a=>a.locale===r))==null?void 0:t.value)||((i=e.url.find(a=>a.locale==="*"))==null?void 0:i.value))||null},Em=(e,r)=>{var n,t;return((n=e==null?void 0:e.find)==null?void 0:n.call(e,i=>i.venue===r))||((t=e==null?void 0:e.find)==null?void 0:t.call(e,i=>i.venue==="*"))};function tn(e,r=600,n=!0,t,i){var C,u;if(!t||!i)throw new Error("baseUrl or tenant was not provided");const a=`${e}_${i}_${t}`,s=`${t.endsWith("/")?t.slice(0,-1):t}/cms-api/content/${i}/${e}`,c=((C=p())==null?void 0:C.value)||null,[d,o]=re.useState(((u=p())==null?void 0:u.timestamp)||0),[l,g]=re.useState(c||null),[f,v]=re.useState(!1);async function y(h){return Or.get(s,{signal:h}).then(x=>{if(wa(x.data))throw new Error(`CMS data '${e}' is an empty object`);Qo(x.data,l)||g(x.data),f&&v(!1),n&&m(x.data)}).catch(x=>{x.code!=="ERR_CANCELED"&&(console.error(x),v(!0))})}function m(h){const x=new Date().valueOf(),b=JSON.stringify({value:h,timestamp:x});localStorage.setItem(a,b),o(x)}function p(){try{const h=localStorage.getItem(a);if(h)return JSON.parse(h)}catch(h){console.warn(h)}return null}return re.useEffect(()=>{if(console.log("CMS ID",e),new Date().valueOf()-d>r*1e3){const x=new AbortController;return y(x.signal),()=>x.abort()}const h=p();if(h!=null&&h.value)g(h.value),o(h.timestamp);else{const x=new AbortController;return y(x.signal),()=>x.abort()}},[e]),Wt(y,r*1e3),{value:l,isError:f,isLoading:!f&&!l}}function $m({id:e,intervalSeconds:r,withLocalStorage:n}){const t=re.useContext(Dr.ConfigContext);if(!t)throw new Error("Hook was used outside config context");return tn(e,r,n,t.baseUrl,t.tenant)}function As(e,r=600,n=!0,t,i,a){var c,d,o,l;if(!t||!i||!a)throw new Error("baseUrl, tenant or venue was not provided");const s=tn(e,r,n,t,i);return{value:((d=(c=s.value)==null?void 0:c.find)==null?void 0:d.call(c,g=>g.venue===a))||((l=(o=s.value)==null?void 0:o.find)==null?void 0:l.call(o,g=>g.venue==="*"))||null,isError:s.isError}}function wm(e,r,n,t=300,i=!0){var l,g,f,v;const a=re.useContext(Dr.ConfigContext);if(!a)throw new Error("Hook was used outside config context");const{value:s,isError:c}=As(e,t,i,a.baseUrl,a.tenant,r);let d=null,o=null;return s&&((l=s==null?void 0:s.url)==null?void 0:l.length)>0&&(d=((g=s.url.find(y=>y.locale===n))==null?void 0:g.value)||((f=s.url.find(y=>y.locale==="*"))==null?void 0:f.value)||null),!d&&s&&((v=s==null?void 0:s.url)==null?void 0:v.length)>0&&(o=s.url[0].value),{url:d,fallbackUrl:o,isError:c,mediaType:s==null?void 0:s.mediaType}}function Cs({kioskMediaId:e,kioskMediaType:r,intervalSeconds:n=600,withLocalStorage:t=!0,baseUrl:i,tenant:a,venue:s,locale:c}){var m;const{value:d,isError:o,isLoading:l}=tn(e,n,t,i,a),g=(d==null?void 0:d[r])||[],f=Em(g,s),v=_m(f,c),y=!v&&f&&((m=f==null?void 0:f.url)==null?void 0:m.length)>0?f.url[0].value:null;return{url:v,fallbackUrl:y,mediaType:f==null?void 0:f.mediaType,isError:o,isLoading:l}}function Am({kioskMediaId:e,kioskMediaType:r,venue:n,intervalSeconds:t=600,withLocalStorage:i=!0}){const a=re.useContext(Dr.ConfigContext);if(!a)throw new Error("Missing config context");const{i18n:{language:s}}=Qs.useTranslation();return Cs({kioskMediaId:e,kioskMediaType:r,intervalSeconds:t,withLocalStorage:i,venue:n,baseUrl:a.baseUrl,tenant:a.tenant,locale:s})}function Cm(e,r){re.useEffect(()=>{const n=t=>{!e.current||e.current.contains(t.target)||r(t)};return document.addEventListener("mousedown",n),document.addEventListener("touchstart",n),()=>{document.removeEventListener("mousedown",n),document.removeEventListener("touchstart",n)}},[e,r])}function Sm(e){const[r,n]=re.useState(Rr(e==null?void 0:e.DINE_IN)),[t,i]=re.useState(Rr(e==null?void 0:e.TAKE_AWAY));function a(){const s=Rr(e==null?void 0:e.DINE_IN),c=Rr(e==null?void 0:e.TAKE_AWAY);s!==r&&(console.log("dine in open changed",r,"=>",s),n(s)),c!==t&&(console.log("take away open changed",t,"=>",c),i(c))}return re.useEffect(()=>{a()},[e]),Wt(a,6e4),{dineInOpen:r,takeAwayOpen:t,loaded:!!e}}var Le={},Tm=e=>encodeURIComponent(e).replace(/[!'()*]/g,r=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`),Ss="%[a-f0-9]{2}",li=new RegExp("("+Ss+")|([^%]+?)","gi"),di=new RegExp("("+Ss+")+","gi");function ha(e,r){try{return[decodeURIComponent(e.join(""))]}catch{}if(e.length===1)return e;r=r||1;var n=e.slice(0,r),t=e.slice(r);return Array.prototype.concat.call([],ha(n),ha(t))}function Rm(e){try{return decodeURIComponent(e)}catch{for(var r=e.match(li)||[],n=1;n<r.length;n++)e=ha(r,n).join(""),r=e.match(li)||[];return e}}function Om(e){for(var r={"%FE%FF":"��","%FF%FE":"��"},n=di.exec(e);n;){try{r[n[0]]=decodeURIComponent(n[0])}catch{var t=Rm(n[0]);t!==n[0]&&(r[n[0]]=t)}n=di.exec(e)}r["%C2"]="�";for(var i=Object.keys(r),a=0;a<i.length;a++){var s=i[a];e=e.replace(new RegExp(s,"g"),r[s])}return e}var Pm=function(e){if(typeof e!="string")throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch{return Om(e)}},Im=(e,r)=>{if(!(typeof e=="string"&&typeof r=="string"))throw new TypeError("Expected the arguments to be of type `string`");if(r==="")return[e];const n=e.indexOf(r);return n===-1?[e]:[e.slice(0,n),e.slice(n+r.length)]},Dm=function(e,r){for(var n={},t=Object.keys(e),i=Array.isArray(r),a=0;a<t.length;a++){var s=t[a],c=e[s];(i?r.indexOf(s)!==-1:r(s,c,e))&&(n[s]=c)}return n};(function(e){const r=Tm,n=Pm,t=Im,i=Dm,a=u=>u==null,s=Symbol("encodeFragmentIdentifier");function c(u){switch(u.arrayFormat){case"index":return h=>(x,b)=>{const E=x.length;return b===void 0||u.skipNull&&b===null||u.skipEmptyString&&b===""?x:b===null?[...x,[l(h,u),"[",E,"]"].join("")]:[...x,[l(h,u),"[",l(E,u),"]=",l(b,u)].join("")]};case"bracket":return h=>(x,b)=>b===void 0||u.skipNull&&b===null||u.skipEmptyString&&b===""?x:b===null?[...x,[l(h,u),"[]"].join("")]:[...x,[l(h,u),"[]=",l(b,u)].join("")];case"colon-list-separator":return h=>(x,b)=>b===void 0||u.skipNull&&b===null||u.skipEmptyString&&b===""?x:b===null?[...x,[l(h,u),":list="].join("")]:[...x,[l(h,u),":list=",l(b,u)].join("")];case"comma":case"separator":case"bracket-separator":{const h=u.arrayFormat==="bracket-separator"?"[]=":"=";return x=>(b,E)=>E===void 0||u.skipNull&&E===null||u.skipEmptyString&&E===""?b:(E=E===null?"":E,b.length===0?[[l(x,u),h,l(E,u)].join("")]:[[b,l(E,u)].join(u.arrayFormatSeparator)])}default:return h=>(x,b)=>b===void 0||u.skipNull&&b===null||u.skipEmptyString&&b===""?x:b===null?[...x,l(h,u)]:[...x,[l(h,u),"=",l(b,u)].join("")]}}function d(u){let h;switch(u.arrayFormat){case"index":return(x,b,E)=>{if(h=/\[(\d*)\]$/.exec(x),x=x.replace(/\[\d*\]$/,""),!h){E[x]=b;return}E[x]===void 0&&(E[x]={}),E[x][h[1]]=b};case"bracket":return(x,b,E)=>{if(h=/(\[\])$/.exec(x),x=x.replace(/\[\]$/,""),!h){E[x]=b;return}if(E[x]===void 0){E[x]=[b];return}E[x]=[].concat(E[x],b)};case"colon-list-separator":return(x,b,E)=>{if(h=/(:list)$/.exec(x),x=x.replace(/:list$/,""),!h){E[x]=b;return}if(E[x]===void 0){E[x]=[b];return}E[x]=[].concat(E[x],b)};case"comma":case"separator":return(x,b,E)=>{const w=typeof b=="string"&&b.includes(u.arrayFormatSeparator),A=typeof b=="string"&&!w&&g(b,u).includes(u.arrayFormatSeparator);b=A?g(b,u):b;const T=w||A?b.split(u.arrayFormatSeparator).map(_=>g(_,u)):b===null?b:g(b,u);E[x]=T};case"bracket-separator":return(x,b,E)=>{const w=/(\[\])$/.test(x);if(x=x.replace(/\[\]$/,""),!w){E[x]=b&&g(b,u);return}const A=b===null?[]:b.split(u.arrayFormatSeparator).map(T=>g(T,u));if(E[x]===void 0){E[x]=A;return}E[x]=[].concat(E[x],A)};default:return(x,b,E)=>{if(E[x]===void 0){E[x]=b;return}E[x]=[].concat(E[x],b)}}}function o(u){if(typeof u!="string"||u.length!==1)throw new TypeError("arrayFormatSeparator must be single character string")}function l(u,h){return h.encode?h.strict?r(u):encodeURIComponent(u):u}function g(u,h){return h.decode?n(u):u}function f(u){return Array.isArray(u)?u.sort():typeof u=="object"?f(Object.keys(u)).sort((h,x)=>Number(h)-Number(x)).map(h=>u[h]):u}function v(u){const h=u.indexOf("#");return h!==-1&&(u=u.slice(0,h)),u}function y(u){let h="";const x=u.indexOf("#");return x!==-1&&(h=u.slice(x)),h}function m(u){u=v(u);const h=u.indexOf("?");return h===-1?"":u.slice(h+1)}function p(u,h){return h.parseNumbers&&!Number.isNaN(Number(u))&&typeof u=="string"&&u.trim()!==""?u=Number(u):h.parseBooleans&&u!==null&&(u.toLowerCase()==="true"||u.toLowerCase()==="false")&&(u=u.toLowerCase()==="true"),u}function C(u,h){h=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},h),o(h.arrayFormatSeparator);const x=d(h),b=Object.create(null);if(typeof u!="string"||(u=u.trim().replace(/^[?#&]/,""),!u))return b;for(const E of u.split("&")){if(E==="")continue;let[w,A]=t(h.decode?E.replace(/\+/g," "):E,"=");A=A===void 0?null:["comma","separator","bracket-separator"].includes(h.arrayFormat)?A:g(A,h),x(g(w,h),A,b)}for(const E of Object.keys(b)){const w=b[E];if(typeof w=="object"&&w!==null)for(const A of Object.keys(w))w[A]=p(w[A],h);else b[E]=p(w,h)}return h.sort===!1?b:(h.sort===!0?Object.keys(b).sort():Object.keys(b).sort(h.sort)).reduce((E,w)=>{const A=b[w];return A&&typeof A=="object"&&!Array.isArray(A)?E[w]=f(A):E[w]=A,E},Object.create(null))}e.extract=m,e.parse=C,e.stringify=(u,h)=>{if(!u)return"";h=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},h),o(h.arrayFormatSeparator);const x=A=>h.skipNull&&a(u[A])||h.skipEmptyString&&u[A]==="",b=c(h),E={};for(const A of Object.keys(u))x(A)||(E[A]=u[A]);const w=Object.keys(E);return h.sort!==!1&&w.sort(h.sort),w.map(A=>{const T=u[A];return T===void 0?"":T===null?l(A,h):Array.isArray(T)?T.length===0&&h.arrayFormat==="bracket-separator"?l(A,h)+"[]":T.reduce(b(A),[]).join("&"):l(A,h)+"="+l(T,h)}).filter(A=>A.length>0).join("&")},e.parseUrl=(u,h)=>{h=Object.assign({decode:!0},h);const[x,b]=t(u,"#");return Object.assign({url:x.split("?")[0]||"",query:C(m(u),h)},h&&h.parseFragmentIdentifier&&b?{fragmentIdentifier:g(b,h)}:{})},e.stringifyUrl=(u,h)=>{h=Object.assign({encode:!0,strict:!0,[s]:!0},h);const x=v(u.url).split("?")[0]||"",b=e.extract(u.url),E=e.parse(b,{sort:!1}),w=Object.assign(E,u.query);let A=e.stringify(w,h);A&&(A=`?${A}`);let T=y(u.url);return u.fragmentIdentifier&&(T=`#${h[s]?l(u.fragmentIdentifier,h):u.fragmentIdentifier}`),`${x}${A}${T}`},e.pick=(u,h,x)=>{x=Object.assign({parseFragmentIdentifier:!0,[s]:!1},x);const{url:b,query:E,fragmentIdentifier:w}=e.parseUrl(u,x);return e.stringifyUrl({url:b,query:i(E,h),fragmentIdentifier:w},x)},e.exclude=(u,h,x)=>{const b=Array.isArray(h)?E=>!h.includes(E):(E,w)=>!h(E,w);return e.pick(u,b,x)}})(Le);const Bm=[".png",".jpg",".jpeg",".webp",".bmp",".tiff"];function Ts(e,r=500){const n=Le.parseUrl(e);if(!(e.startsWith("https://orderingstackmedia.blob.core.windows.net/pictures")||e.startsWith("https://orderingstack-mmedia-tools.azurewebsites.net/api/img/")))return e;const t=n.url.substring(n.url.lastIndexOf("."));return Bm.includes(t)?Le.stringifyUrl({url:n.url.replace("https://orderingstackmedia.blob.core.windows.net/pictures/","https://orderingstack-mmedia-tools.azurewebsites.net/api/img/"),query:{...n.query,w:r}}):e}function km(e,r=500){return Ts(e,r)}var ze={},Lm={get exports(){return ze},set exports(e){ze=e}};function Um(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var it={},Nm={get exports(){return it},set exports(e){it=e}};const jm={},Fm=Object.freeze(Object.defineProperty({__proto__:null,default:jm},Symbol.toStringTag,{value:"Module"})),Hm=ec(Fm);var hi;function ee(){return hi||(hi=1,function(e,r){(function(n,t){e.exports=t()})(K,function(){var n=n||function(t,i){var a;if(typeof window<"u"&&window.crypto&&(a=window.crypto),typeof self<"u"&&self.crypto&&(a=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(a=globalThis.crypto),!a&&typeof window<"u"&&window.msCrypto&&(a=window.msCrypto),!a&&typeof K<"u"&&K.crypto&&(a=K.crypto),!a&&typeof Um=="function")try{a=Hm}catch{}var s=function(){if(a){if(typeof a.getRandomValues=="function")try{return a.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof a.randomBytes=="function")try{return a.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},c=Object.create||function(){function u(){}return function(h){var x;return u.prototype=h,x=new u,u.prototype=null,x}}(),d={},o=d.lib={},l=o.Base=function(){return{extend:function(u){var h=c(this);return u&&h.mixIn(u),(!h.hasOwnProperty("init")||this.init===h.init)&&(h.init=function(){h.$super.init.apply(this,arguments)}),h.init.prototype=h,h.$super=this,h},create:function(){var u=this.extend();return u.init.apply(u,arguments),u},init:function(){},mixIn:function(u){for(var h in u)u.hasOwnProperty(h)&&(this[h]=u[h]);u.hasOwnProperty("toString")&&(this.toString=u.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),g=o.WordArray=l.extend({init:function(u,h){u=this.words=u||[],h!=i?this.sigBytes=h:this.sigBytes=u.length*4},toString:function(u){return(u||v).stringify(this)},concat:function(u){var h=this.words,x=u.words,b=this.sigBytes,E=u.sigBytes;if(this.clamp(),b%4)for(var w=0;w<E;w++){var A=x[w>>>2]>>>24-w%4*8&255;h[b+w>>>2]|=A<<24-(b+w)%4*8}else for(var T=0;T<E;T+=4)h[b+T>>>2]=x[T>>>2];return this.sigBytes+=E,this},clamp:function(){var u=this.words,h=this.sigBytes;u[h>>>2]&=4294967295<<32-h%4*8,u.length=t.ceil(h/4)},clone:function(){var u=l.clone.call(this);return u.words=this.words.slice(0),u},random:function(u){for(var h=[],x=0;x<u;x+=4)h.push(s());return new g.init(h,u)}}),f=d.enc={},v=f.Hex={stringify:function(u){for(var h=u.words,x=u.sigBytes,b=[],E=0;E<x;E++){var w=h[E>>>2]>>>24-E%4*8&255;b.push((w>>>4).toString(16)),b.push((w&15).toString(16))}return b.join("")},parse:function(u){for(var h=u.length,x=[],b=0;b<h;b+=2)x[b>>>3]|=parseInt(u.substr(b,2),16)<<24-b%8*4;return new g.init(x,h/2)}},y=f.Latin1={stringify:function(u){for(var h=u.words,x=u.sigBytes,b=[],E=0;E<x;E++){var w=h[E>>>2]>>>24-E%4*8&255;b.push(String.fromCharCode(w))}return b.join("")},parse:function(u){for(var h=u.length,x=[],b=0;b<h;b++)x[b>>>2]|=(u.charCodeAt(b)&255)<<24-b%4*8;return new g.init(x,h)}},m=f.Utf8={stringify:function(u){try{return decodeURIComponent(escape(y.stringify(u)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(u){return y.parse(unescape(encodeURIComponent(u)))}},p=o.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new g.init,this._nDataBytes=0},_append:function(u){typeof u=="string"&&(u=m.parse(u)),this._data.concat(u),this._nDataBytes+=u.sigBytes},_process:function(u){var h,x=this._data,b=x.words,E=x.sigBytes,w=this.blockSize,A=w*4,T=E/A;u?T=t.ceil(T):T=t.max((T|0)-this._minBufferSize,0);var _=T*w,S=t.min(_*4,E);if(_){for(var B=0;B<_;B+=w)this._doProcessBlock(b,B);h=b.splice(0,_),x.sigBytes-=S}return new g.init(h,S)},clone:function(){var u=l.clone.call(this);return u._data=this._data.clone(),u},_minBufferSize:0});o.Hasher=p.extend({cfg:l.extend(),init:function(u){this.cfg=this.cfg.extend(u),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(u){return this._append(u),this._process(),this},finalize:function(u){u&&this._append(u);var h=this._doFinalize();return h},blockSize:16,_createHelper:function(u){return function(h,x){return new u.init(x).finalize(h)}},_createHmacHelper:function(u){return function(h,x){return new C.HMAC.init(u,x).finalize(h)}}});var C=d.algo={};return d}(Math);return n})}(Nm)),it}var ot={},qm={get exports(){return ot},set exports(e){ot=e}},vi;function nn(){return vi||(vi=1,function(e,r){(function(n,t){e.exports=t(ee())})(K,function(n){return function(t){var i=n,a=i.lib,s=a.Base,c=a.WordArray,d=i.x64={};d.Word=s.extend({init:function(o,l){this.high=o,this.low=l}}),d.WordArray=s.extend({init:function(o,l){o=this.words=o||[],l!=t?this.sigBytes=l:this.sigBytes=o.length*8},toX32:function(){for(var o=this.words,l=o.length,g=[],f=0;f<l;f++){var v=o[f];g.push(v.high),g.push(v.low)}return c.create(g,this.sigBytes)},clone:function(){for(var o=s.clone.call(this),l=o.words=this.words.slice(0),g=l.length,f=0;f<g;f++)l[f]=l[f].clone();return o}})}(),n})}(qm)),ot}var st={},Mm={get exports(){return st},set exports(e){st=e}},xi;function Wm(){return xi||(xi=1,function(e,r){(function(n,t){e.exports=t(ee())})(K,function(n){return function(){if(typeof ArrayBuffer=="function"){var t=n,i=t.lib,a=i.WordArray,s=a.init,c=a.init=function(d){if(d instanceof ArrayBuffer&&(d=new Uint8Array(d)),(d instanceof Int8Array||typeof Uint8ClampedArray<"u"&&d instanceof Uint8ClampedArray||d instanceof Int16Array||d instanceof Uint16Array||d instanceof Int32Array||d instanceof Uint32Array||d instanceof Float32Array||d instanceof Float64Array)&&(d=new Uint8Array(d.buffer,d.byteOffset,d.byteLength)),d instanceof Uint8Array){for(var o=d.byteLength,l=[],g=0;g<o;g++)l[g>>>2]|=d[g]<<24-g%4*8;s.call(this,l,o)}else s.apply(this,arguments)};c.prototype=a}}(),n.lib.WordArray})}(Mm)),st}var ct={},zm={get exports(){return ct},set exports(e){ct=e}},pi;function Gm(){return pi||(pi=1,function(e,r){(function(n,t){e.exports=t(ee())})(K,function(n){return function(){var t=n,i=t.lib,a=i.WordArray,s=t.enc;s.Utf16=s.Utf16BE={stringify:function(d){for(var o=d.words,l=d.sigBytes,g=[],f=0;f<l;f+=2){var v=o[f>>>2]>>>16-f%4*8&65535;g.push(String.fromCharCode(v))}return g.join("")},parse:function(d){for(var o=d.length,l=[],g=0;g<o;g++)l[g>>>1]|=d.charCodeAt(g)<<16-g%2*16;return a.create(l,o*2)}},s.Utf16LE={stringify:function(d){for(var o=d.words,l=d.sigBytes,g=[],f=0;f<l;f+=2){var v=c(o[f>>>2]>>>16-f%4*8&65535);g.push(String.fromCharCode(v))}return g.join("")},parse:function(d){for(var o=d.length,l=[],g=0;g<o;g++)l[g>>>1]|=c(d.charCodeAt(g)<<16-g%2*16);return a.create(l,o*2)}};function c(d){return d<<8&4278255360|d>>>8&16711935}}(),n.enc.Utf16})}(zm)),ct}var ut={},Km={get exports(){return ut},set exports(e){ut=e}},gi;function vr(){return gi||(gi=1,function(e,r){(function(n,t){e.exports=t(ee())})(K,function(n){return function(){var t=n,i=t.lib,a=i.WordArray,s=t.enc;s.Base64={stringify:function(d){var o=d.words,l=d.sigBytes,g=this._map;d.clamp();for(var f=[],v=0;v<l;v+=3)for(var y=o[v>>>2]>>>24-v%4*8&255,m=o[v+1>>>2]>>>24-(v+1)%4*8&255,p=o[v+2>>>2]>>>24-(v+2)%4*8&255,C=y<<16|m<<8|p,u=0;u<4&&v+u*.75<l;u++)f.push(g.charAt(C>>>6*(3-u)&63));var h=g.charAt(64);if(h)for(;f.length%4;)f.push(h);return f.join("")},parse:function(d){var o=d.length,l=this._map,g=this._reverseMap;if(!g){g=this._reverseMap=[];for(var f=0;f<l.length;f++)g[l.charCodeAt(f)]=f}var v=l.charAt(64);if(v){var y=d.indexOf(v);y!==-1&&(o=y)}return c(d,o,g)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function c(d,o,l){for(var g=[],f=0,v=0;v<o;v++)if(v%4){var y=l[d.charCodeAt(v-1)]<<v%4*2,m=l[d.charCodeAt(v)]>>>6-v%4*2,p=y|m;g[f>>>2]|=p<<24-f%4*8,f++}return a.create(g,f)}}(),n.enc.Base64})}(Km)),ut}var ft={},Ym={get exports(){return ft},set exports(e){ft=e}},mi;function Vm(){return mi||(mi=1,function(e,r){(function(n,t){e.exports=t(ee())})(K,function(n){return function(){var t=n,i=t.lib,a=i.WordArray,s=t.enc;s.Base64url={stringify:function(d,o=!0){var l=d.words,g=d.sigBytes,f=o?this._safe_map:this._map;d.clamp();for(var v=[],y=0;y<g;y+=3)for(var m=l[y>>>2]>>>24-y%4*8&255,p=l[y+1>>>2]>>>24-(y+1)%4*8&255,C=l[y+2>>>2]>>>24-(y+2)%4*8&255,u=m<<16|p<<8|C,h=0;h<4&&y+h*.75<g;h++)v.push(f.charAt(u>>>6*(3-h)&63));var x=f.charAt(64);if(x)for(;v.length%4;)v.push(x);return v.join("")},parse:function(d,o=!0){var l=d.length,g=o?this._safe_map:this._map,f=this._reverseMap;if(!f){f=this._reverseMap=[];for(var v=0;v<g.length;v++)f[g.charCodeAt(v)]=v}var y=g.charAt(64);if(y){var m=d.indexOf(y);m!==-1&&(l=m)}return c(d,l,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"};function c(d,o,l){for(var g=[],f=0,v=0;v<o;v++)if(v%4){var y=l[d.charCodeAt(v-1)]<<v%4*2,m=l[d.charCodeAt(v)]>>>6-v%4*2,p=y|m;g[f>>>2]|=p<<24-f%4*8,f++}return a.create(g,f)}}(),n.enc.Base64url})}(Ym)),ft}var lt={},Xm={get exports(){return lt},set exports(e){lt=e}},yi;function xr(){return yi||(yi=1,function(e,r){(function(n,t){e.exports=t(ee())})(K,function(n){return function(t){var i=n,a=i.lib,s=a.WordArray,c=a.Hasher,d=i.algo,o=[];(function(){for(var m=0;m<64;m++)o[m]=t.abs(t.sin(m+1))*4294967296|0})();var l=d.MD5=c.extend({_doReset:function(){this._hash=new s.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(m,p){for(var C=0;C<16;C++){var u=p+C,h=m[u];m[u]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360}var x=this._hash.words,b=m[p+0],E=m[p+1],w=m[p+2],A=m[p+3],T=m[p+4],_=m[p+5],S=m[p+6],B=m[p+7],R=m[p+8],P=m[p+9],I=m[p+10],N=m[p+11],U=m[p+12],j=m[p+13],H=m[p+14],q=m[p+15],O=x[0],D=x[1],k=x[2],L=x[3];O=g(O,D,k,L,b,7,o[0]),L=g(L,O,D,k,E,12,o[1]),k=g(k,L,O,D,w,17,o[2]),D=g(D,k,L,O,A,22,o[3]),O=g(O,D,k,L,T,7,o[4]),L=g(L,O,D,k,_,12,o[5]),k=g(k,L,O,D,S,17,o[6]),D=g(D,k,L,O,B,22,o[7]),O=g(O,D,k,L,R,7,o[8]),L=g(L,O,D,k,P,12,o[9]),k=g(k,L,O,D,I,17,o[10]),D=g(D,k,L,O,N,22,o[11]),O=g(O,D,k,L,U,7,o[12]),L=g(L,O,D,k,j,12,o[13]),k=g(k,L,O,D,H,17,o[14]),D=g(D,k,L,O,q,22,o[15]),O=f(O,D,k,L,E,5,o[16]),L=f(L,O,D,k,S,9,o[17]),k=f(k,L,O,D,N,14,o[18]),D=f(D,k,L,O,b,20,o[19]),O=f(O,D,k,L,_,5,o[20]),L=f(L,O,D,k,I,9,o[21]),k=f(k,L,O,D,q,14,o[22]),D=f(D,k,L,O,T,20,o[23]),O=f(O,D,k,L,P,5,o[24]),L=f(L,O,D,k,H,9,o[25]),k=f(k,L,O,D,A,14,o[26]),D=f(D,k,L,O,R,20,o[27]),O=f(O,D,k,L,j,5,o[28]),L=f(L,O,D,k,w,9,o[29]),k=f(k,L,O,D,B,14,o[30]),D=f(D,k,L,O,U,20,o[31]),O=v(O,D,k,L,_,4,o[32]),L=v(L,O,D,k,R,11,o[33]),k=v(k,L,O,D,N,16,o[34]),D=v(D,k,L,O,H,23,o[35]),O=v(O,D,k,L,E,4,o[36]),L=v(L,O,D,k,T,11,o[37]),k=v(k,L,O,D,B,16,o[38]),D=v(D,k,L,O,I,23,o[39]),O=v(O,D,k,L,j,4,o[40]),L=v(L,O,D,k,b,11,o[41]),k=v(k,L,O,D,A,16,o[42]),D=v(D,k,L,O,S,23,o[43]),O=v(O,D,k,L,P,4,o[44]),L=v(L,O,D,k,U,11,o[45]),k=v(k,L,O,D,q,16,o[46]),D=v(D,k,L,O,w,23,o[47]),O=y(O,D,k,L,b,6,o[48]),L=y(L,O,D,k,B,10,o[49]),k=y(k,L,O,D,H,15,o[50]),D=y(D,k,L,O,_,21,o[51]),O=y(O,D,k,L,U,6,o[52]),L=y(L,O,D,k,A,10,o[53]),k=y(k,L,O,D,I,15,o[54]),D=y(D,k,L,O,E,21,o[55]),O=y(O,D,k,L,R,6,o[56]),L=y(L,O,D,k,q,10,o[57]),k=y(k,L,O,D,S,15,o[58]),D=y(D,k,L,O,j,21,o[59]),O=y(O,D,k,L,T,6,o[60]),L=y(L,O,D,k,N,10,o[61]),k=y(k,L,O,D,w,15,o[62]),D=y(D,k,L,O,P,21,o[63]),x[0]=x[0]+O|0,x[1]=x[1]+D|0,x[2]=x[2]+k|0,x[3]=x[3]+L|0},_doFinalize:function(){var m=this._data,p=m.words,C=this._nDataBytes*8,u=m.sigBytes*8;p[u>>>5]|=128<<24-u%32;var h=t.floor(C/4294967296),x=C;p[(u+64>>>9<<4)+15]=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,p[(u+64>>>9<<4)+14]=(x<<8|x>>>24)&16711935|(x<<24|x>>>8)&4278255360,m.sigBytes=(p.length+1)*4,this._process();for(var b=this._hash,E=b.words,w=0;w<4;w++){var A=E[w];E[w]=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360}return b},clone:function(){var m=c.clone.call(this);return m._hash=this._hash.clone(),m}});function g(m,p,C,u,h,x,b){var E=m+(p&C|~p&u)+h+b;return(E<<x|E>>>32-x)+p}function f(m,p,C,u,h,x,b){var E=m+(p&u|C&~u)+h+b;return(E<<x|E>>>32-x)+p}function v(m,p,C,u,h,x,b){var E=m+(p^C^u)+h+b;return(E<<x|E>>>32-x)+p}function y(m,p,C,u,h,x,b){var E=m+(C^(p|~u))+h+b;return(E<<x|E>>>32-x)+p}i.MD5=c._createHelper(l),i.HmacMD5=c._createHmacHelper(l)}(Math),n.MD5})}(Xm)),lt}var dt={},Jm={get exports(){return dt},set exports(e){dt=e}},bi;function ka(){return bi||(bi=1,function(e,r){(function(n,t){e.exports=t(ee())})(K,function(n){return function(){var t=n,i=t.lib,a=i.WordArray,s=i.Hasher,c=t.algo,d=[],o=c.SHA1=s.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(l,g){for(var f=this._hash.words,v=f[0],y=f[1],m=f[2],p=f[3],C=f[4],u=0;u<80;u++){if(u<16)d[u]=l[g+u]|0;else{var h=d[u-3]^d[u-8]^d[u-14]^d[u-16];d[u]=h<<1|h>>>31}var x=(v<<5|v>>>27)+C+d[u];u<20?x+=(y&m|~y&p)+1518500249:u<40?x+=(y^m^p)+1859775393:u<60?x+=(y&m|y&p|m&p)-1894007588:x+=(y^m^p)-899497514,C=p,p=m,m=y<<30|y>>>2,y=v,v=x}f[0]=f[0]+v|0,f[1]=f[1]+y|0,f[2]=f[2]+m|0,f[3]=f[3]+p|0,f[4]=f[4]+C|0},_doFinalize:function(){var l=this._data,g=l.words,f=this._nDataBytes*8,v=l.sigBytes*8;return g[v>>>5]|=128<<24-v%32,g[(v+64>>>9<<4)+14]=Math.floor(f/4294967296),g[(v+64>>>9<<4)+15]=f,l.sigBytes=g.length*4,this._process(),this._hash},clone:function(){var l=s.clone.call(this);return l._hash=this._hash.clone(),l}});t.SHA1=s._createHelper(o),t.HmacSHA1=s._createHmacHelper(o)}(),n.SHA1})}(Jm)),dt}var ht={},Zm={get exports(){return ht},set exports(e){ht=e}},_i;function Rs(){return _i||(_i=1,function(e,r){(function(n,t){e.exports=t(ee())})(K,function(n){return function(t){var i=n,a=i.lib,s=a.WordArray,c=a.Hasher,d=i.algo,o=[],l=[];(function(){function v(C){for(var u=t.sqrt(C),h=2;h<=u;h++)if(!(C%h))return!1;return!0}function y(C){return(C-(C|0))*4294967296|0}for(var m=2,p=0;p<64;)v(m)&&(p<8&&(o[p]=y(t.pow(m,1/2))),l[p]=y(t.pow(m,1/3)),p++),m++})();var g=[],f=d.SHA256=c.extend({_doReset:function(){this._hash=new s.init(o.slice(0))},_doProcessBlock:function(v,y){for(var m=this._hash.words,p=m[0],C=m[1],u=m[2],h=m[3],x=m[4],b=m[5],E=m[6],w=m[7],A=0;A<64;A++){if(A<16)g[A]=v[y+A]|0;else{var T=g[A-15],_=(T<<25|T>>>7)^(T<<14|T>>>18)^T>>>3,S=g[A-2],B=(S<<15|S>>>17)^(S<<13|S>>>19)^S>>>10;g[A]=_+g[A-7]+B+g[A-16]}var R=x&b^~x&E,P=p&C^p&u^C&u,I=(p<<30|p>>>2)^(p<<19|p>>>13)^(p<<10|p>>>22),N=(x<<26|x>>>6)^(x<<21|x>>>11)^(x<<7|x>>>25),U=w+N+R+l[A]+g[A],j=I+P;w=E,E=b,b=x,x=h+U|0,h=u,u=C,C=p,p=U+j|0}m[0]=m[0]+p|0,m[1]=m[1]+C|0,m[2]=m[2]+u|0,m[3]=m[3]+h|0,m[4]=m[4]+x|0,m[5]=m[5]+b|0,m[6]=m[6]+E|0,m[7]=m[7]+w|0},_doFinalize:function(){var v=this._data,y=v.words,m=this._nDataBytes*8,p=v.sigBytes*8;return y[p>>>5]|=128<<24-p%32,y[(p+64>>>9<<4)+14]=t.floor(m/4294967296),y[(p+64>>>9<<4)+15]=m,v.sigBytes=y.length*4,this._process(),this._hash},clone:function(){var v=c.clone.call(this);return v._hash=this._hash.clone(),v}});i.SHA256=c._createHelper(f),i.HmacSHA256=c._createHmacHelper(f)}(Math),n.SHA256})}(Zm)),ht}var vt={},Qm={get exports(){return vt},set exports(e){vt=e}},Ei;function ey(){return Ei||(Ei=1,function(e,r){(function(n,t,i){e.exports=t(ee(),Rs())})(K,function(n){return function(){var t=n,i=t.lib,a=i.WordArray,s=t.algo,c=s.SHA256,d=s.SHA224=c.extend({_doReset:function(){this._hash=new a.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var o=c._doFinalize.call(this);return o.sigBytes-=4,o}});t.SHA224=c._createHelper(d),t.HmacSHA224=c._createHmacHelper(d)}(),n.SHA224})}(Qm)),vt}var xt={},ry={get exports(){return xt},set exports(e){xt=e}},$i;function Os(){return $i||($i=1,function(e,r){(function(n,t,i){e.exports=t(ee(),nn())})(K,function(n){return function(){var t=n,i=t.lib,a=i.Hasher,s=t.x64,c=s.Word,d=s.WordArray,o=t.algo;function l(){return c.create.apply(c,arguments)}var g=[l(1116352408,3609767458),l(1899447441,602891725),l(3049323471,3964484399),l(3921009573,2173295548),l(961987163,4081628472),l(1508970993,3053834265),l(2453635748,2937671579),l(2870763221,3664609560),l(3624381080,2734883394),l(310598401,1164996542),l(607225278,1323610764),l(1426881987,3590304994),l(1925078388,4068182383),l(2162078206,991336113),l(2614888103,633803317),l(3248222580,3479774868),l(3835390401,2666613458),l(4022224774,944711139),l(264347078,2341262773),l(604807628,2007800933),l(770255983,1495990901),l(1249150122,1856431235),l(1555081692,3175218132),l(1996064986,2198950837),l(2554220882,3999719339),l(2821834349,766784016),l(2952996808,2566594879),l(3210313671,3203337956),l(3336571891,1034457026),l(3584528711,2466948901),l(113926993,3758326383),l(338241895,168717936),l(666307205,1188179964),l(773529912,1546045734),l(1294757372,1522805485),l(1396182291,2643833823),l(1695183700,2343527390),l(1986661051,1014477480),l(2177026350,1206759142),l(2456956037,344077627),l(2730485921,1290863460),l(2820302411,3158454273),l(3259730800,3505952657),l(3345764771,106217008),l(3516065817,3606008344),l(3600352804,1432725776),l(4094571909,1467031594),l(275423344,851169720),l(430227734,3100823752),l(506948616,1363258195),l(659060556,3750685593),l(883997877,3785050280),l(958139571,3318307427),l(1322822218,3812723403),l(1537002063,2003034995),l(1747873779,3602036899),l(1955562222,1575990012),l(2024104815,1125592928),l(2227730452,2716904306),l(2361852424,442776044),l(2428436474,593698344),l(2756734187,3733110249),l(3204031479,2999351573),l(3329325298,3815920427),l(3391569614,3928383900),l(3515267271,566280711),l(3940187606,3454069534),l(4118630271,4000239992),l(116418474,1914138554),l(174292421,2731055270),l(289380356,3203993006),l(460393269,320620315),l(685471733,587496836),l(852142971,1086792851),l(1017036298,365543100),l(1126000580,2618297676),l(1288033470,3409855158),l(1501505948,4234509866),l(1607167915,987167468),l(1816402316,1246189591)],f=[];(function(){for(var y=0;y<80;y++)f[y]=l()})();var v=o.SHA512=a.extend({_doReset:function(){this._hash=new d.init([new c.init(1779033703,4089235720),new c.init(3144134277,2227873595),new c.init(1013904242,4271175723),new c.init(2773480762,1595750129),new c.init(1359893119,2917565137),new c.init(2600822924,725511199),new c.init(528734635,4215389547),new c.init(1541459225,327033209)])},_doProcessBlock:function(y,m){for(var p=this._hash.words,C=p[0],u=p[1],h=p[2],x=p[3],b=p[4],E=p[5],w=p[6],A=p[7],T=C.high,_=C.low,S=u.high,B=u.low,R=h.high,P=h.low,I=x.high,N=x.low,U=b.high,j=b.low,H=E.high,q=E.low,O=w.high,D=w.low,k=A.high,L=A.low,z=T,Y=_,te=S,W=B,J=R,ne=P,ie=I,ue=N,fe=U,he=j,De=H,Ee=q,Fe=O,Se=D,Te=k,Re=L,Z=0;Z<80;Z++){var V,Ae,Je=f[Z];if(Z<16)Ae=Je.high=y[m+Z*2]|0,V=Je.low=y[m+Z*2+1]|0;else{var mr=f[Z-15],Ne=mr.high,Oe=mr.low,un=(Ne>>>1|Oe<<31)^(Ne>>>8|Oe<<24)^Ne>>>7,yr=(Oe>>>1|Ne<<31)^(Oe>>>8|Ne<<24)^(Oe>>>7|Ne<<25),br=f[Z-2],Be=br.high,Me=br.low,fn=(Be>>>19|Me<<13)^(Be<<3|Me>>>29)^Be>>>6,Fr=(Me>>>19|Be<<13)^(Me<<3|Be>>>29)^(Me>>>6|Be<<26),Hr=f[Z-7],ln=Hr.high,dn=Hr.low,qr=f[Z-16],_r=qr.high,Er=qr.low;V=yr+dn,Ae=un+ln+(V>>>0<yr>>>0?1:0),V=V+Fr,Ae=Ae+fn+(V>>>0<Fr>>>0?1:0),V=V+Er,Ae=Ae+_r+(V>>>0<Er>>>0?1:0),Je.high=Ae,Je.low=V}var He=fe&De^~fe&Fe,Ze=he&Ee^~he&Se,$r=z&te^z&J^te&J,Mr=Y&W^Y&ne^W&ne,hn=(z>>>28|Y<<4)^(z<<30|Y>>>2)^(z<<25|Y>>>7),wr=(Y>>>28|z<<4)^(Y<<30|z>>>2)^(Y<<25|z>>>7),vn=(fe>>>14|he<<18)^(fe>>>18|he<<14)^(fe<<23|he>>>9),Wr=(he>>>14|fe<<18)^(he>>>18|fe<<14)^(he<<23|fe>>>9),Ar=g[Z],xn=Ar.high,zr=Ar.low,ge=Re+Wr,ke=Te+vn+(ge>>>0<Re>>>0?1:0),ge=ge+Ze,ke=ke+He+(ge>>>0<Ze>>>0?1:0),ge=ge+zr,ke=ke+xn+(ge>>>0<zr>>>0?1:0),ge=ge+V,ke=ke+Ae+(ge>>>0<V>>>0?1:0),Gr=wr+Mr,pn=hn+$r+(Gr>>>0<wr>>>0?1:0);Te=Fe,Re=Se,Fe=De,Se=Ee,De=fe,Ee=he,he=ue+ge|0,fe=ie+ke+(he>>>0<ue>>>0?1:0)|0,ie=J,ue=ne,J=te,ne=W,te=z,W=Y,Y=ge+Gr|0,z=ke+pn+(Y>>>0<ge>>>0?1:0)|0}_=C.low=_+Y,C.high=T+z+(_>>>0<Y>>>0?1:0),B=u.low=B+W,u.high=S+te+(B>>>0<W>>>0?1:0),P=h.low=P+ne,h.high=R+J+(P>>>0<ne>>>0?1:0),N=x.low=N+ue,x.high=I+ie+(N>>>0<ue>>>0?1:0),j=b.low=j+he,b.high=U+fe+(j>>>0<he>>>0?1:0),q=E.low=q+Ee,E.high=H+De+(q>>>0<Ee>>>0?1:0),D=w.low=D+Se,w.high=O+Fe+(D>>>0<Se>>>0?1:0),L=A.low=L+Re,A.high=k+Te+(L>>>0<Re>>>0?1:0)},_doFinalize:function(){var y=this._data,m=y.words,p=this._nDataBytes*8,C=y.sigBytes*8;m[C>>>5]|=128<<24-C%32,m[(C+128>>>10<<5)+30]=Math.floor(p/4294967296),m[(C+128>>>10<<5)+31]=p,y.sigBytes=m.length*4,this._process();var u=this._hash.toX32();return u},clone:function(){var y=a.clone.call(this);return y._hash=this._hash.clone(),y},blockSize:1024/32});t.SHA512=a._createHelper(v),t.HmacSHA512=a._createHmacHelper(v)}(),n.SHA512})}(ry)),xt}var pt={},ty={get exports(){return pt},set exports(e){pt=e}},wi;function ny(){return wi||(wi=1,function(e,r){(function(n,t,i){e.exports=t(ee(),nn(),Os())})(K,function(n){return function(){var t=n,i=t.x64,a=i.Word,s=i.WordArray,c=t.algo,d=c.SHA512,o=c.SHA384=d.extend({_doReset:function(){this._hash=new s.init([new a.init(3418070365,3238371032),new a.init(1654270250,914150663),new a.init(2438529370,812702999),new a.init(355462360,4144912697),new a.init(1731405415,4290775857),new a.init(2394180231,1750603025),new a.init(3675008525,1694076839),new a.init(1203062813,3204075428)])},_doFinalize:function(){var l=d._doFinalize.call(this);return l.sigBytes-=16,l}});t.SHA384=d._createHelper(o),t.HmacSHA384=d._createHmacHelper(o)}(),n.SHA384})}(ty)),pt}var gt={},ay={get exports(){return gt},set exports(e){gt=e}},Ai;function iy(){return Ai||(Ai=1,function(e,r){(function(n,t,i){e.exports=t(ee(),nn())})(K,function(n){return function(t){var i=n,a=i.lib,s=a.WordArray,c=a.Hasher,d=i.x64,o=d.Word,l=i.algo,g=[],f=[],v=[];(function(){for(var p=1,C=0,u=0;u<24;u++){g[p+5*C]=(u+1)*(u+2)/2%64;var h=C%5,x=(2*p+3*C)%5;p=h,C=x}for(var p=0;p<5;p++)for(var C=0;C<5;C++)f[p+5*C]=C+(2*p+3*C)%5*5;for(var b=1,E=0;E<24;E++){for(var w=0,A=0,T=0;T<7;T++){if(b&1){var _=(1<<T)-1;_<32?A^=1<<_:w^=1<<_-32}b&128?b=b<<1^113:b<<=1}v[E]=o.create(w,A)}})();var y=[];(function(){for(var p=0;p<25;p++)y[p]=o.create()})();var m=l.SHA3=c.extend({cfg:c.cfg.extend({outputLength:512}),_doReset:function(){for(var p=this._state=[],C=0;C<25;C++)p[C]=new o.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(p,C){for(var u=this._state,h=this.blockSize/2,x=0;x<h;x++){var b=p[C+2*x],E=p[C+2*x+1];b=(b<<8|b>>>24)&16711935|(b<<24|b>>>8)&4278255360,E=(E<<8|E>>>24)&16711935|(E<<24|E>>>8)&4278255360;var w=u[x];w.high^=E,w.low^=b}for(var A=0;A<24;A++){for(var T=0;T<5;T++){for(var _=0,S=0,B=0;B<5;B++){var w=u[T+5*B];_^=w.high,S^=w.low}var R=y[T];R.high=_,R.low=S}for(var T=0;T<5;T++)for(var P=y[(T+4)%5],I=y[(T+1)%5],N=I.high,U=I.low,_=P.high^(N<<1|U>>>31),S=P.low^(U<<1|N>>>31),B=0;B<5;B++){var w=u[T+5*B];w.high^=_,w.low^=S}for(var j=1;j<25;j++){var _,S,w=u[j],H=w.high,q=w.low,O=g[j];O<32?(_=H<<O|q>>>32-O,S=q<<O|H>>>32-O):(_=q<<O-32|H>>>64-O,S=H<<O-32|q>>>64-O);var D=y[f[j]];D.high=_,D.low=S}var k=y[0],L=u[0];k.high=L.high,k.low=L.low;for(var T=0;T<5;T++)for(var B=0;B<5;B++){var j=T+5*B,w=u[j],z=y[j],Y=y[(T+1)%5+5*B],te=y[(T+2)%5+5*B];w.high=z.high^~Y.high&te.high,w.low=z.low^~Y.low&te.low}var w=u[0],W=v[A];w.high^=W.high,w.low^=W.low}},_doFinalize:function(){var p=this._data,C=p.words;this._nDataBytes*8;var u=p.sigBytes*8,h=this.blockSize*32;C[u>>>5]|=1<<24-u%32,C[(t.ceil((u+1)/h)*h>>>5)-1]|=128,p.sigBytes=C.length*4,this._process();for(var x=this._state,b=this.cfg.outputLength/8,E=b/8,w=[],A=0;A<E;A++){var T=x[A],_=T.high,S=T.low;_=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360,S=(S<<8|S>>>24)&16711935|(S<<24|S>>>8)&4278255360,w.push(S),w.push(_)}return new s.init(w,b)},clone:function(){for(var p=c.clone.call(this),C=p._state=this._state.slice(0),u=0;u<25;u++)C[u]=C[u].clone();return p}});i.SHA3=c._createHelper(m),i.HmacSHA3=c._createHmacHelper(m)}(Math),n.SHA3})}(ay)),gt}var mt={},oy={get exports(){return mt},set exports(e){mt=e}},Ci;function sy(){return Ci||(Ci=1,function(e,r){(function(n,t){e.exports=t(ee())})(K,function(n){/** @preserve
|
|
3
|
+
(c) 2012 by Cédric Mesnil. All rights reserved.
|
|
4
|
+
|
|
5
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
6
|
+
|
|
7
|
+
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
8
|
+
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
9
|
+
|
|
10
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
11
|
+
*/return function(t){var i=n,a=i.lib,s=a.WordArray,c=a.Hasher,d=i.algo,o=s.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=s.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),g=s.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),f=s.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),v=s.create([0,1518500249,1859775393,2400959708,2840853838]),y=s.create([1352829926,1548603684,1836072691,2053994217,0]),m=d.RIPEMD160=c.extend({_doReset:function(){this._hash=s.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(E,w){for(var A=0;A<16;A++){var T=w+A,_=E[T];E[T]=(_<<8|_>>>24)&16711935|(_<<24|_>>>8)&4278255360}var S=this._hash.words,B=v.words,R=y.words,P=o.words,I=l.words,N=g.words,U=f.words,j,H,q,O,D,k,L,z,Y,te;k=j=S[0],L=H=S[1],z=q=S[2],Y=O=S[3],te=D=S[4];for(var W,A=0;A<80;A+=1)W=j+E[w+P[A]]|0,A<16?W+=p(H,q,O)+B[0]:A<32?W+=C(H,q,O)+B[1]:A<48?W+=u(H,q,O)+B[2]:A<64?W+=h(H,q,O)+B[3]:W+=x(H,q,O)+B[4],W=W|0,W=b(W,N[A]),W=W+D|0,j=D,D=O,O=b(q,10),q=H,H=W,W=k+E[w+I[A]]|0,A<16?W+=x(L,z,Y)+R[0]:A<32?W+=h(L,z,Y)+R[1]:A<48?W+=u(L,z,Y)+R[2]:A<64?W+=C(L,z,Y)+R[3]:W+=p(L,z,Y)+R[4],W=W|0,W=b(W,U[A]),W=W+te|0,k=te,te=Y,Y=b(z,10),z=L,L=W;W=S[1]+q+Y|0,S[1]=S[2]+O+te|0,S[2]=S[3]+D+k|0,S[3]=S[4]+j+L|0,S[4]=S[0]+H+z|0,S[0]=W},_doFinalize:function(){var E=this._data,w=E.words,A=this._nDataBytes*8,T=E.sigBytes*8;w[T>>>5]|=128<<24-T%32,w[(T+64>>>9<<4)+14]=(A<<8|A>>>24)&16711935|(A<<24|A>>>8)&4278255360,E.sigBytes=(w.length+1)*4,this._process();for(var _=this._hash,S=_.words,B=0;B<5;B++){var R=S[B];S[B]=(R<<8|R>>>24)&16711935|(R<<24|R>>>8)&4278255360}return _},clone:function(){var E=c.clone.call(this);return E._hash=this._hash.clone(),E}});function p(E,w,A){return E^w^A}function C(E,w,A){return E&w|~E&A}function u(E,w,A){return(E|~w)^A}function h(E,w,A){return E&A|w&~A}function x(E,w,A){return E^(w|~A)}function b(E,w){return E<<w|E>>>32-w}i.RIPEMD160=c._createHelper(m),i.HmacRIPEMD160=c._createHmacHelper(m)}(),n.RIPEMD160})}(oy)),mt}var yt={},cy={get exports(){return yt},set exports(e){yt=e}},Si;function La(){return Si||(Si=1,function(e,r){(function(n,t){e.exports=t(ee())})(K,function(n){(function(){var t=n,i=t.lib,a=i.Base,s=t.enc,c=s.Utf8,d=t.algo;d.HMAC=a.extend({init:function(o,l){o=this._hasher=new o.init,typeof l=="string"&&(l=c.parse(l));var g=o.blockSize,f=g*4;l.sigBytes>f&&(l=o.finalize(l)),l.clamp();for(var v=this._oKey=l.clone(),y=this._iKey=l.clone(),m=v.words,p=y.words,C=0;C<g;C++)m[C]^=1549556828,p[C]^=909522486;v.sigBytes=y.sigBytes=f,this.reset()},reset:function(){var o=this._hasher;o.reset(),o.update(this._iKey)},update:function(o){return this._hasher.update(o),this},finalize:function(o){var l=this._hasher,g=l.finalize(o);l.reset();var f=l.finalize(this._oKey.clone().concat(g));return f}})})()})}(cy)),yt}var bt={},uy={get exports(){return bt},set exports(e){bt=e}},Ti;function fy(){return Ti||(Ti=1,function(e,r){(function(n,t,i){e.exports=t(ee(),ka(),La())})(K,function(n){return function(){var t=n,i=t.lib,a=i.Base,s=i.WordArray,c=t.algo,d=c.SHA1,o=c.HMAC,l=c.PBKDF2=a.extend({cfg:a.extend({keySize:128/32,hasher:d,iterations:1}),init:function(g){this.cfg=this.cfg.extend(g)},compute:function(g,f){for(var v=this.cfg,y=o.create(v.hasher,g),m=s.create(),p=s.create([1]),C=m.words,u=p.words,h=v.keySize,x=v.iterations;C.length<h;){var b=y.update(f).finalize(p);y.reset();for(var E=b.words,w=E.length,A=b,T=1;T<x;T++){A=y.finalize(A),y.reset();for(var _=A.words,S=0;S<w;S++)E[S]^=_[S]}m.concat(b),u[0]++}return m.sigBytes=h*4,m}});t.PBKDF2=function(g,f,v){return l.create(v).compute(g,f)}}(),n.PBKDF2})}(uy)),bt}var _t={},ly={get exports(){return _t},set exports(e){_t=e}},Ri;function Ve(){return Ri||(Ri=1,function(e,r){(function(n,t,i){e.exports=t(ee(),ka(),La())})(K,function(n){return function(){var t=n,i=t.lib,a=i.Base,s=i.WordArray,c=t.algo,d=c.MD5,o=c.EvpKDF=a.extend({cfg:a.extend({keySize:128/32,hasher:d,iterations:1}),init:function(l){this.cfg=this.cfg.extend(l)},compute:function(l,g){for(var f,v=this.cfg,y=v.hasher.create(),m=s.create(),p=m.words,C=v.keySize,u=v.iterations;p.length<C;){f&&y.update(f),f=y.update(l).finalize(g),y.reset();for(var h=1;h<u;h++)f=y.finalize(f),y.reset();m.concat(f)}return m.sigBytes=C*4,m}});t.EvpKDF=function(l,g,f){return o.create(f).compute(l,g)}}(),n.EvpKDF})}(ly)),_t}var Et={},dy={get exports(){return Et},set exports(e){Et=e}},Oi;function pe(){return Oi||(Oi=1,function(e,r){(function(n,t,i){e.exports=t(ee(),Ve())})(K,function(n){n.lib.Cipher||function(t){var i=n,a=i.lib,s=a.Base,c=a.WordArray,d=a.BufferedBlockAlgorithm,o=i.enc;o.Utf8;var l=o.Base64,g=i.algo,f=g.EvpKDF,v=a.Cipher=d.extend({cfg:s.extend(),createEncryptor:function(_,S){return this.create(this._ENC_XFORM_MODE,_,S)},createDecryptor:function(_,S){return this.create(this._DEC_XFORM_MODE,_,S)},init:function(_,S,B){this.cfg=this.cfg.extend(B),this._xformMode=_,this._key=S,this.reset()},reset:function(){d.reset.call(this),this._doReset()},process:function(_){return this._append(_),this._process()},finalize:function(_){_&&this._append(_);var S=this._doFinalize();return S},keySize:128/32,ivSize:128/32,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function _(S){return typeof S=="string"?T:E}return function(S){return{encrypt:function(B,R,P){return _(R).encrypt(S,B,R,P)},decrypt:function(B,R,P){return _(R).decrypt(S,B,R,P)}}}}()});a.StreamCipher=v.extend({_doFinalize:function(){var _=this._process(!0);return _},blockSize:1});var y=i.mode={},m=a.BlockCipherMode=s.extend({createEncryptor:function(_,S){return this.Encryptor.create(_,S)},createDecryptor:function(_,S){return this.Decryptor.create(_,S)},init:function(_,S){this._cipher=_,this._iv=S}}),p=y.CBC=function(){var _=m.extend();_.Encryptor=_.extend({processBlock:function(B,R){var P=this._cipher,I=P.blockSize;S.call(this,B,R,I),P.encryptBlock(B,R),this._prevBlock=B.slice(R,R+I)}}),_.Decryptor=_.extend({processBlock:function(B,R){var P=this._cipher,I=P.blockSize,N=B.slice(R,R+I);P.decryptBlock(B,R),S.call(this,B,R,I),this._prevBlock=N}});function S(B,R,P){var I,N=this._iv;N?(I=N,this._iv=t):I=this._prevBlock;for(var U=0;U<P;U++)B[R+U]^=I[U]}return _}(),C=i.pad={},u=C.Pkcs7={pad:function(_,S){for(var B=S*4,R=B-_.sigBytes%B,P=R<<24|R<<16|R<<8|R,I=[],N=0;N<R;N+=4)I.push(P);var U=c.create(I,R);_.concat(U)},unpad:function(_){var S=_.words[_.sigBytes-1>>>2]&255;_.sigBytes-=S}};a.BlockCipher=v.extend({cfg:v.cfg.extend({mode:p,padding:u}),reset:function(){var _;v.reset.call(this);var S=this.cfg,B=S.iv,R=S.mode;this._xformMode==this._ENC_XFORM_MODE?_=R.createEncryptor:(_=R.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==_?this._mode.init(this,B&&B.words):(this._mode=_.call(R,this,B&&B.words),this._mode.__creator=_)},_doProcessBlock:function(_,S){this._mode.processBlock(_,S)},_doFinalize:function(){var _,S=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(S.pad(this._data,this.blockSize),_=this._process(!0)):(_=this._process(!0),S.unpad(_)),_},blockSize:128/32});var h=a.CipherParams=s.extend({init:function(_){this.mixIn(_)},toString:function(_){return(_||this.formatter).stringify(this)}}),x=i.format={},b=x.OpenSSL={stringify:function(_){var S,B=_.ciphertext,R=_.salt;return R?S=c.create([1398893684,1701076831]).concat(R).concat(B):S=B,S.toString(l)},parse:function(_){var S,B=l.parse(_),R=B.words;return R[0]==1398893684&&R[1]==1701076831&&(S=c.create(R.slice(2,4)),R.splice(0,4),B.sigBytes-=16),h.create({ciphertext:B,salt:S})}},E=a.SerializableCipher=s.extend({cfg:s.extend({format:b}),encrypt:function(_,S,B,R){R=this.cfg.extend(R);var P=_.createEncryptor(B,R),I=P.finalize(S),N=P.cfg;return h.create({ciphertext:I,key:B,iv:N.iv,algorithm:_,mode:N.mode,padding:N.padding,blockSize:_.blockSize,formatter:R.format})},decrypt:function(_,S,B,R){R=this.cfg.extend(R),S=this._parse(S,R.format);var P=_.createDecryptor(B,R).finalize(S.ciphertext);return P},_parse:function(_,S){return typeof _=="string"?S.parse(_,this):_}}),w=i.kdf={},A=w.OpenSSL={execute:function(_,S,B,R){R||(R=c.random(64/8));var P=f.create({keySize:S+B}).compute(_,R),I=c.create(P.words.slice(S),B*4);return P.sigBytes=S*4,h.create({key:P,iv:I,salt:R})}},T=a.PasswordBasedCipher=E.extend({cfg:E.cfg.extend({kdf:A}),encrypt:function(_,S,B,R){R=this.cfg.extend(R);var P=R.kdf.execute(B,_.keySize,_.ivSize);R.iv=P.iv;var I=E.encrypt.call(this,_,S,P.key,R);return I.mixIn(P),I},decrypt:function(_,S,B,R){R=this.cfg.extend(R),S=this._parse(S,R.format);var P=R.kdf.execute(B,_.keySize,_.ivSize,S.salt);R.iv=P.iv;var I=E.decrypt.call(this,_,S,P.key,R);return I}})}()})}(dy)),Et}var $t={},hy={get exports(){return $t},set exports(e){$t=e}},Pi;function vy(){return Pi||(Pi=1,function(e,r){(function(n,t,i){e.exports=t(ee(),pe())})(K,function(n){return n.mode.CFB=function(){var t=n.lib.BlockCipherMode.extend();t.Encryptor=t.extend({processBlock:function(a,s){var c=this._cipher,d=c.blockSize;i.call(this,a,s,d,c),this._prevBlock=a.slice(s,s+d)}}),t.Decryptor=t.extend({processBlock:function(a,s){var c=this._cipher,d=c.blockSize,o=a.slice(s,s+d);i.call(this,a,s,d,c),this._prevBlock=o}});function i(a,s,c,d){var o,l=this._iv;l?(o=l.slice(0),this._iv=void 0):o=this._prevBlock,d.encryptBlock(o,0);for(var g=0;g<c;g++)a[s+g]^=o[g]}return t}(),n.mode.CFB})}(hy)),$t}var wt={},xy={get exports(){return wt},set exports(e){wt=e}},Ii;function py(){return Ii||(Ii=1,function(e,r){(function(n,t,i){e.exports=t(ee(),pe())})(K,function(n){return n.mode.CTR=function(){var t=n.lib.BlockCipherMode.extend(),i=t.Encryptor=t.extend({processBlock:function(a,s){var c=this._cipher,d=c.blockSize,o=this._iv,l=this._counter;o&&(l=this._counter=o.slice(0),this._iv=void 0);var g=l.slice(0);c.encryptBlock(g,0),l[d-1]=l[d-1]+1|0;for(var f=0;f<d;f++)a[s+f]^=g[f]}});return t.Decryptor=i,t}(),n.mode.CTR})}(xy)),wt}var At={},gy={get exports(){return At},set exports(e){At=e}},Di;function my(){return Di||(Di=1,function(e,r){(function(n,t,i){e.exports=t(ee(),pe())})(K,function(n){/** @preserve
|
|
12
|
+
* Counter block mode compatible with Dr Brian Gladman fileenc.c
|
|
13
|
+
* derived from CryptoJS.mode.CTR
|
|
14
|
+
* Jan Hruby jhruby.web@gmail.com
|
|
15
|
+
*/return n.mode.CTRGladman=function(){var t=n.lib.BlockCipherMode.extend();function i(c){if((c>>24&255)===255){var d=c>>16&255,o=c>>8&255,l=c&255;d===255?(d=0,o===255?(o=0,l===255?l=0:++l):++o):++d,c=0,c+=d<<16,c+=o<<8,c+=l}else c+=1<<24;return c}function a(c){return(c[0]=i(c[0]))===0&&(c[1]=i(c[1])),c}var s=t.Encryptor=t.extend({processBlock:function(c,d){var o=this._cipher,l=o.blockSize,g=this._iv,f=this._counter;g&&(f=this._counter=g.slice(0),this._iv=void 0),a(f);var v=f.slice(0);o.encryptBlock(v,0);for(var y=0;y<l;y++)c[d+y]^=v[y]}});return t.Decryptor=s,t}(),n.mode.CTRGladman})}(gy)),At}var Ct={},yy={get exports(){return Ct},set exports(e){Ct=e}},Bi;function by(){return Bi||(Bi=1,function(e,r){(function(n,t,i){e.exports=t(ee(),pe())})(K,function(n){return n.mode.OFB=function(){var t=n.lib.BlockCipherMode.extend(),i=t.Encryptor=t.extend({processBlock:function(a,s){var c=this._cipher,d=c.blockSize,o=this._iv,l=this._keystream;o&&(l=this._keystream=o.slice(0),this._iv=void 0),c.encryptBlock(l,0);for(var g=0;g<d;g++)a[s+g]^=l[g]}});return t.Decryptor=i,t}(),n.mode.OFB})}(yy)),Ct}var St={},_y={get exports(){return St},set exports(e){St=e}},ki;function Ey(){return ki||(ki=1,function(e,r){(function(n,t,i){e.exports=t(ee(),pe())})(K,function(n){return n.mode.ECB=function(){var t=n.lib.BlockCipherMode.extend();return t.Encryptor=t.extend({processBlock:function(i,a){this._cipher.encryptBlock(i,a)}}),t.Decryptor=t.extend({processBlock:function(i,a){this._cipher.decryptBlock(i,a)}}),t}(),n.mode.ECB})}(_y)),St}var Tt={},$y={get exports(){return Tt},set exports(e){Tt=e}},Li;function wy(){return Li||(Li=1,function(e,r){(function(n,t,i){e.exports=t(ee(),pe())})(K,function(n){return n.pad.AnsiX923={pad:function(t,i){var a=t.sigBytes,s=i*4,c=s-a%s,d=a+c-1;t.clamp(),t.words[d>>>2]|=c<<24-d%4*8,t.sigBytes+=c},unpad:function(t){var i=t.words[t.sigBytes-1>>>2]&255;t.sigBytes-=i}},n.pad.Ansix923})}($y)),Tt}var Rt={},Ay={get exports(){return Rt},set exports(e){Rt=e}},Ui;function Cy(){return Ui||(Ui=1,function(e,r){(function(n,t,i){e.exports=t(ee(),pe())})(K,function(n){return n.pad.Iso10126={pad:function(t,i){var a=i*4,s=a-t.sigBytes%a;t.concat(n.lib.WordArray.random(s-1)).concat(n.lib.WordArray.create([s<<24],1))},unpad:function(t){var i=t.words[t.sigBytes-1>>>2]&255;t.sigBytes-=i}},n.pad.Iso10126})}(Ay)),Rt}var Ot={},Sy={get exports(){return Ot},set exports(e){Ot=e}},Ni;function Ty(){return Ni||(Ni=1,function(e,r){(function(n,t,i){e.exports=t(ee(),pe())})(K,function(n){return n.pad.Iso97971={pad:function(t,i){t.concat(n.lib.WordArray.create([2147483648],1)),n.pad.ZeroPadding.pad(t,i)},unpad:function(t){n.pad.ZeroPadding.unpad(t),t.sigBytes--}},n.pad.Iso97971})}(Sy)),Ot}var Pt={},Ry={get exports(){return Pt},set exports(e){Pt=e}},ji;function Oy(){return ji||(ji=1,function(e,r){(function(n,t,i){e.exports=t(ee(),pe())})(K,function(n){return n.pad.ZeroPadding={pad:function(t,i){var a=i*4;t.clamp(),t.sigBytes+=a-(t.sigBytes%a||a)},unpad:function(t){for(var i=t.words,a=t.sigBytes-1,a=t.sigBytes-1;a>=0;a--)if(i[a>>>2]>>>24-a%4*8&255){t.sigBytes=a+1;break}}},n.pad.ZeroPadding})}(Ry)),Pt}var It={},Py={get exports(){return It},set exports(e){It=e}},Fi;function Iy(){return Fi||(Fi=1,function(e,r){(function(n,t,i){e.exports=t(ee(),pe())})(K,function(n){return n.pad.NoPadding={pad:function(){},unpad:function(){}},n.pad.NoPadding})}(Py)),It}var Dt={},Dy={get exports(){return Dt},set exports(e){Dt=e}},Hi;function By(){return Hi||(Hi=1,function(e,r){(function(n,t,i){e.exports=t(ee(),pe())})(K,function(n){return function(t){var i=n,a=i.lib,s=a.CipherParams,c=i.enc,d=c.Hex,o=i.format;o.Hex={stringify:function(l){return l.ciphertext.toString(d)},parse:function(l){var g=d.parse(l);return s.create({ciphertext:g})}}}(),n.format.Hex})}(Dy)),Dt}var Bt={},ky={get exports(){return Bt},set exports(e){Bt=e}},qi;function Ly(){return qi||(qi=1,function(e,r){(function(n,t,i){e.exports=t(ee(),vr(),xr(),Ve(),pe())})(K,function(n){return function(){var t=n,i=t.lib,a=i.BlockCipher,s=t.algo,c=[],d=[],o=[],l=[],g=[],f=[],v=[],y=[],m=[],p=[];(function(){for(var h=[],x=0;x<256;x++)x<128?h[x]=x<<1:h[x]=x<<1^283;for(var b=0,E=0,x=0;x<256;x++){var w=E^E<<1^E<<2^E<<3^E<<4;w=w>>>8^w&255^99,c[b]=w,d[w]=b;var A=h[b],T=h[A],_=h[T],S=h[w]*257^w*16843008;o[b]=S<<24|S>>>8,l[b]=S<<16|S>>>16,g[b]=S<<8|S>>>24,f[b]=S;var S=_*16843009^T*65537^A*257^b*16843008;v[w]=S<<24|S>>>8,y[w]=S<<16|S>>>16,m[w]=S<<8|S>>>24,p[w]=S,b?(b=A^h[h[h[_^A]]],E^=h[h[E]]):b=E=1}})();var C=[0,1,2,4,8,16,32,64,128,27,54],u=s.AES=a.extend({_doReset:function(){var h;if(!(this._nRounds&&this._keyPriorReset===this._key)){for(var x=this._keyPriorReset=this._key,b=x.words,E=x.sigBytes/4,w=this._nRounds=E+6,A=(w+1)*4,T=this._keySchedule=[],_=0;_<A;_++)_<E?T[_]=b[_]:(h=T[_-1],_%E?E>6&&_%E==4&&(h=c[h>>>24]<<24|c[h>>>16&255]<<16|c[h>>>8&255]<<8|c[h&255]):(h=h<<8|h>>>24,h=c[h>>>24]<<24|c[h>>>16&255]<<16|c[h>>>8&255]<<8|c[h&255],h^=C[_/E|0]<<24),T[_]=T[_-E]^h);for(var S=this._invKeySchedule=[],B=0;B<A;B++){var _=A-B;if(B%4)var h=T[_];else var h=T[_-4];B<4||_<=4?S[B]=h:S[B]=v[c[h>>>24]]^y[c[h>>>16&255]]^m[c[h>>>8&255]]^p[c[h&255]]}}},encryptBlock:function(h,x){this._doCryptBlock(h,x,this._keySchedule,o,l,g,f,c)},decryptBlock:function(h,x){var b=h[x+1];h[x+1]=h[x+3],h[x+3]=b,this._doCryptBlock(h,x,this._invKeySchedule,v,y,m,p,d);var b=h[x+1];h[x+1]=h[x+3],h[x+3]=b},_doCryptBlock:function(h,x,b,E,w,A,T,_){for(var S=this._nRounds,B=h[x]^b[0],R=h[x+1]^b[1],P=h[x+2]^b[2],I=h[x+3]^b[3],N=4,U=1;U<S;U++){var j=E[B>>>24]^w[R>>>16&255]^A[P>>>8&255]^T[I&255]^b[N++],H=E[R>>>24]^w[P>>>16&255]^A[I>>>8&255]^T[B&255]^b[N++],q=E[P>>>24]^w[I>>>16&255]^A[B>>>8&255]^T[R&255]^b[N++],O=E[I>>>24]^w[B>>>16&255]^A[R>>>8&255]^T[P&255]^b[N++];B=j,R=H,P=q,I=O}var j=(_[B>>>24]<<24|_[R>>>16&255]<<16|_[P>>>8&255]<<8|_[I&255])^b[N++],H=(_[R>>>24]<<24|_[P>>>16&255]<<16|_[I>>>8&255]<<8|_[B&255])^b[N++],q=(_[P>>>24]<<24|_[I>>>16&255]<<16|_[B>>>8&255]<<8|_[R&255])^b[N++],O=(_[I>>>24]<<24|_[B>>>16&255]<<16|_[R>>>8&255]<<8|_[P&255])^b[N++];h[x]=j,h[x+1]=H,h[x+2]=q,h[x+3]=O},keySize:256/32});t.AES=a._createHelper(u)}(),n.AES})}(ky)),Bt}var kt={},Uy={get exports(){return kt},set exports(e){kt=e}},Mi;function Ny(){return Mi||(Mi=1,function(e,r){(function(n,t,i){e.exports=t(ee(),vr(),xr(),Ve(),pe())})(K,function(n){return function(){var t=n,i=t.lib,a=i.WordArray,s=i.BlockCipher,c=t.algo,d=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],o=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],g=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],f=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],v=c.DES=s.extend({_doReset:function(){for(var C=this._key,u=C.words,h=[],x=0;x<56;x++){var b=d[x]-1;h[x]=u[b>>>5]>>>31-b%32&1}for(var E=this._subKeys=[],w=0;w<16;w++){for(var A=E[w]=[],T=l[w],x=0;x<24;x++)A[x/6|0]|=h[(o[x]-1+T)%28]<<31-x%6,A[4+(x/6|0)]|=h[28+(o[x+24]-1+T)%28]<<31-x%6;A[0]=A[0]<<1|A[0]>>>31;for(var x=1;x<7;x++)A[x]=A[x]>>>(x-1)*4+3;A[7]=A[7]<<5|A[7]>>>27}for(var _=this._invSubKeys=[],x=0;x<16;x++)_[x]=E[15-x]},encryptBlock:function(C,u){this._doCryptBlock(C,u,this._subKeys)},decryptBlock:function(C,u){this._doCryptBlock(C,u,this._invSubKeys)},_doCryptBlock:function(C,u,h){this._lBlock=C[u],this._rBlock=C[u+1],y.call(this,4,252645135),y.call(this,16,65535),m.call(this,2,858993459),m.call(this,8,16711935),y.call(this,1,1431655765);for(var x=0;x<16;x++){for(var b=h[x],E=this._lBlock,w=this._rBlock,A=0,T=0;T<8;T++)A|=g[T][((w^b[T])&f[T])>>>0];this._lBlock=w,this._rBlock=E^A}var _=this._lBlock;this._lBlock=this._rBlock,this._rBlock=_,y.call(this,1,1431655765),m.call(this,8,16711935),m.call(this,2,858993459),y.call(this,16,65535),y.call(this,4,252645135),C[u]=this._lBlock,C[u+1]=this._rBlock},keySize:64/32,ivSize:64/32,blockSize:64/32});function y(C,u){var h=(this._lBlock>>>C^this._rBlock)&u;this._rBlock^=h,this._lBlock^=h<<C}function m(C,u){var h=(this._rBlock>>>C^this._lBlock)&u;this._lBlock^=h,this._rBlock^=h<<C}t.DES=s._createHelper(v);var p=c.TripleDES=s.extend({_doReset:function(){var C=this._key,u=C.words;if(u.length!==2&&u.length!==4&&u.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var h=u.slice(0,2),x=u.length<4?u.slice(0,2):u.slice(2,4),b=u.length<6?u.slice(0,2):u.slice(4,6);this._des1=v.createEncryptor(a.create(h)),this._des2=v.createEncryptor(a.create(x)),this._des3=v.createEncryptor(a.create(b))},encryptBlock:function(C,u){this._des1.encryptBlock(C,u),this._des2.decryptBlock(C,u),this._des3.encryptBlock(C,u)},decryptBlock:function(C,u){this._des3.decryptBlock(C,u),this._des2.encryptBlock(C,u),this._des1.decryptBlock(C,u)},keySize:192/32,ivSize:64/32,blockSize:64/32});t.TripleDES=s._createHelper(p)}(),n.TripleDES})}(Uy)),kt}var Lt={},jy={get exports(){return Lt},set exports(e){Lt=e}},Wi;function Fy(){return Wi||(Wi=1,function(e,r){(function(n,t,i){e.exports=t(ee(),vr(),xr(),Ve(),pe())})(K,function(n){return function(){var t=n,i=t.lib,a=i.StreamCipher,s=t.algo,c=s.RC4=a.extend({_doReset:function(){for(var l=this._key,g=l.words,f=l.sigBytes,v=this._S=[],y=0;y<256;y++)v[y]=y;for(var y=0,m=0;y<256;y++){var p=y%f,C=g[p>>>2]>>>24-p%4*8&255;m=(m+v[y]+C)%256;var u=v[y];v[y]=v[m],v[m]=u}this._i=this._j=0},_doProcessBlock:function(l,g){l[g]^=d.call(this)},keySize:256/32,ivSize:0});function d(){for(var l=this._S,g=this._i,f=this._j,v=0,y=0;y<4;y++){g=(g+1)%256,f=(f+l[g])%256;var m=l[g];l[g]=l[f],l[f]=m,v|=l[(l[g]+l[f])%256]<<24-y*8}return this._i=g,this._j=f,v}t.RC4=a._createHelper(c);var o=s.RC4Drop=c.extend({cfg:c.cfg.extend({drop:192}),_doReset:function(){c._doReset.call(this);for(var l=this.cfg.drop;l>0;l--)d.call(this)}});t.RC4Drop=a._createHelper(o)}(),n.RC4})}(jy)),Lt}var Ut={},Hy={get exports(){return Ut},set exports(e){Ut=e}},zi;function qy(){return zi||(zi=1,function(e,r){(function(n,t,i){e.exports=t(ee(),vr(),xr(),Ve(),pe())})(K,function(n){return function(){var t=n,i=t.lib,a=i.StreamCipher,s=t.algo,c=[],d=[],o=[],l=s.Rabbit=a.extend({_doReset:function(){for(var f=this._key.words,v=this.cfg.iv,y=0;y<4;y++)f[y]=(f[y]<<8|f[y]>>>24)&16711935|(f[y]<<24|f[y]>>>8)&4278255360;var m=this._X=[f[0],f[3]<<16|f[2]>>>16,f[1],f[0]<<16|f[3]>>>16,f[2],f[1]<<16|f[0]>>>16,f[3],f[2]<<16|f[1]>>>16],p=this._C=[f[2]<<16|f[2]>>>16,f[0]&4294901760|f[1]&65535,f[3]<<16|f[3]>>>16,f[1]&4294901760|f[2]&65535,f[0]<<16|f[0]>>>16,f[2]&4294901760|f[3]&65535,f[1]<<16|f[1]>>>16,f[3]&4294901760|f[0]&65535];this._b=0;for(var y=0;y<4;y++)g.call(this);for(var y=0;y<8;y++)p[y]^=m[y+4&7];if(v){var C=v.words,u=C[0],h=C[1],x=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,b=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,E=x>>>16|b&4294901760,w=b<<16|x&65535;p[0]^=x,p[1]^=E,p[2]^=b,p[3]^=w,p[4]^=x,p[5]^=E,p[6]^=b,p[7]^=w;for(var y=0;y<4;y++)g.call(this)}},_doProcessBlock:function(f,v){var y=this._X;g.call(this),c[0]=y[0]^y[5]>>>16^y[3]<<16,c[1]=y[2]^y[7]>>>16^y[5]<<16,c[2]=y[4]^y[1]>>>16^y[7]<<16,c[3]=y[6]^y[3]>>>16^y[1]<<16;for(var m=0;m<4;m++)c[m]=(c[m]<<8|c[m]>>>24)&16711935|(c[m]<<24|c[m]>>>8)&4278255360,f[v+m]^=c[m]},blockSize:128/32,ivSize:64/32});function g(){for(var f=this._X,v=this._C,y=0;y<8;y++)d[y]=v[y];v[0]=v[0]+1295307597+this._b|0,v[1]=v[1]+3545052371+(v[0]>>>0<d[0]>>>0?1:0)|0,v[2]=v[2]+886263092+(v[1]>>>0<d[1]>>>0?1:0)|0,v[3]=v[3]+1295307597+(v[2]>>>0<d[2]>>>0?1:0)|0,v[4]=v[4]+3545052371+(v[3]>>>0<d[3]>>>0?1:0)|0,v[5]=v[5]+886263092+(v[4]>>>0<d[4]>>>0?1:0)|0,v[6]=v[6]+1295307597+(v[5]>>>0<d[5]>>>0?1:0)|0,v[7]=v[7]+3545052371+(v[6]>>>0<d[6]>>>0?1:0)|0,this._b=v[7]>>>0<d[7]>>>0?1:0;for(var y=0;y<8;y++){var m=f[y]+v[y],p=m&65535,C=m>>>16,u=((p*p>>>17)+p*C>>>15)+C*C,h=((m&4294901760)*m|0)+((m&65535)*m|0);o[y]=u^h}f[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,f[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,f[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,f[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,f[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,f[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,f[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,f[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}t.Rabbit=a._createHelper(l)}(),n.Rabbit})}(Hy)),Ut}var Nt={},My={get exports(){return Nt},set exports(e){Nt=e}},Gi;function Wy(){return Gi||(Gi=1,function(e,r){(function(n,t,i){e.exports=t(ee(),vr(),xr(),Ve(),pe())})(K,function(n){return function(){var t=n,i=t.lib,a=i.StreamCipher,s=t.algo,c=[],d=[],o=[],l=s.RabbitLegacy=a.extend({_doReset:function(){var f=this._key.words,v=this.cfg.iv,y=this._X=[f[0],f[3]<<16|f[2]>>>16,f[1],f[0]<<16|f[3]>>>16,f[2],f[1]<<16|f[0]>>>16,f[3],f[2]<<16|f[1]>>>16],m=this._C=[f[2]<<16|f[2]>>>16,f[0]&4294901760|f[1]&65535,f[3]<<16|f[3]>>>16,f[1]&4294901760|f[2]&65535,f[0]<<16|f[0]>>>16,f[2]&4294901760|f[3]&65535,f[1]<<16|f[1]>>>16,f[3]&4294901760|f[0]&65535];this._b=0;for(var p=0;p<4;p++)g.call(this);for(var p=0;p<8;p++)m[p]^=y[p+4&7];if(v){var C=v.words,u=C[0],h=C[1],x=(u<<8|u>>>24)&16711935|(u<<24|u>>>8)&4278255360,b=(h<<8|h>>>24)&16711935|(h<<24|h>>>8)&4278255360,E=x>>>16|b&4294901760,w=b<<16|x&65535;m[0]^=x,m[1]^=E,m[2]^=b,m[3]^=w,m[4]^=x,m[5]^=E,m[6]^=b,m[7]^=w;for(var p=0;p<4;p++)g.call(this)}},_doProcessBlock:function(f,v){var y=this._X;g.call(this),c[0]=y[0]^y[5]>>>16^y[3]<<16,c[1]=y[2]^y[7]>>>16^y[5]<<16,c[2]=y[4]^y[1]>>>16^y[7]<<16,c[3]=y[6]^y[3]>>>16^y[1]<<16;for(var m=0;m<4;m++)c[m]=(c[m]<<8|c[m]>>>24)&16711935|(c[m]<<24|c[m]>>>8)&4278255360,f[v+m]^=c[m]},blockSize:128/32,ivSize:64/32});function g(){for(var f=this._X,v=this._C,y=0;y<8;y++)d[y]=v[y];v[0]=v[0]+1295307597+this._b|0,v[1]=v[1]+3545052371+(v[0]>>>0<d[0]>>>0?1:0)|0,v[2]=v[2]+886263092+(v[1]>>>0<d[1]>>>0?1:0)|0,v[3]=v[3]+1295307597+(v[2]>>>0<d[2]>>>0?1:0)|0,v[4]=v[4]+3545052371+(v[3]>>>0<d[3]>>>0?1:0)|0,v[5]=v[5]+886263092+(v[4]>>>0<d[4]>>>0?1:0)|0,v[6]=v[6]+1295307597+(v[5]>>>0<d[5]>>>0?1:0)|0,v[7]=v[7]+3545052371+(v[6]>>>0<d[6]>>>0?1:0)|0,this._b=v[7]>>>0<d[7]>>>0?1:0;for(var y=0;y<8;y++){var m=f[y]+v[y],p=m&65535,C=m>>>16,u=((p*p>>>17)+p*C>>>15)+C*C,h=((m&4294901760)*m|0)+((m&65535)*m|0);o[y]=u^h}f[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,f[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,f[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,f[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,f[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,f[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,f[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,f[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}t.RabbitLegacy=a._createHelper(l)}(),n.RabbitLegacy})}(My)),Nt}(function(e,r){(function(n,t,i){e.exports=t(ee(),nn(),Wm(),Gm(),vr(),Vm(),xr(),ka(),Rs(),ey(),Os(),ny(),iy(),sy(),La(),fy(),Ve(),pe(),vy(),py(),my(),by(),Ey(),wy(),Cy(),Ty(),Oy(),Iy(),By(),Ly(),Ny(),Fy(),qy(),Wy())})(K,function(n){return n})})(Lm);const Ki="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~";function zy(e){const r=new ArrayBuffer(4);return new DataView(r).setUint32(0,e,!1),r}function Ps(e){const r=ze.lib.WordArray.random(e).words,n=[];return r.forEach(t=>{new Uint8Array(zy(t)).forEach(i=>n.push(i))}),n}function Pr(e){return Ps(e).map(r=>Ki[r%Ki.length]).reduce((r,n)=>r.concat(n),"")}var jt=(e=>(e[e.Base64Url=0]="Base64Url",e[e.UriEncodedBase64=1]="UriEncodedBase64",e))(jt||{});function Ua(e,r){return encodeURIComponent(r===0?ze.SHA256(e).toString(ze.enc.Base64url):ze.SHA256(e).toString(ze.enc.Base64))}function va(e=0,r=128){if(r<43||r>128)throw`Length must be between 43 and 128 (received ${r})`;const n=Pr(r),t=Ua(n,e);return{code_verifier:n,code_challenge:t}}function Gy(e,r,n){return Ua(e,n)===r}/*! Capacitor: https://capacitorjs.com/ - MIT License */const Ky=e=>{const r=new Map;r.set("web",{name:"web"});const n=e.CapacitorPlatforms||{currentPlatform:{name:"web"},platforms:r},t=(a,s)=>{n.platforms.set(a,s)},i=a=>{n.platforms.has(a)&&(n.currentPlatform=n.platforms.get(a))};return n.addPlatform=t,n.setPlatform=i,n},Yy=e=>e.CapacitorPlatforms=Ky(e),Is=Yy(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});Is.addPlatform;Is.setPlatform;var sr;(function(e){e.Unimplemented="UNIMPLEMENTED",e.Unavailable="UNAVAILABLE"})(sr||(sr={}));class Ln extends Error{constructor(r,n,t){super(r),this.message=r,this.code=n,this.data=t}}const Vy=e=>{var r,n;return e!=null&&e.androidBridge?"android":!((n=(r=e==null?void 0:e.webkit)===null||r===void 0?void 0:r.messageHandlers)===null||n===void 0)&&n.bridge?"ios":"web"},Xy=e=>{var r,n,t,i,a;const s=e.CapacitorCustomPlatform||null,c=e.Capacitor||{},d=c.Plugins=c.Plugins||{},o=e.CapacitorPlatforms,l=()=>s!==null?s.name:Vy(e),g=((r=o==null?void 0:o.currentPlatform)===null||r===void 0?void 0:r.getPlatform)||l,f=()=>g()!=="web",v=((n=o==null?void 0:o.currentPlatform)===null||n===void 0?void 0:n.isNativePlatform)||f,y=w=>{const A=x.get(w);return!!(A!=null&&A.platforms.has(g())||C(w))},m=((t=o==null?void 0:o.currentPlatform)===null||t===void 0?void 0:t.isPluginAvailable)||y,p=w=>{var A;return(A=c.PluginHeaders)===null||A===void 0?void 0:A.find(T=>T.name===w)},C=((i=o==null?void 0:o.currentPlatform)===null||i===void 0?void 0:i.getPluginHeader)||p,u=w=>e.console.error(w),h=(w,A,T)=>Promise.reject(`${T} does not have an implementation of "${A}".`),x=new Map,b=(w,A={})=>{const T=x.get(w);if(T)return console.warn(`Capacitor plugin "${w}" already registered. Cannot register plugins twice.`),T.proxy;const _=g(),S=C(w);let B;const R=async()=>(!B&&_ in A?B=typeof A[_]=="function"?B=await A[_]():B=A[_]:s!==null&&!B&&"web"in A&&(B=typeof A.web=="function"?B=await A.web():B=A.web),B),P=(q,O)=>{var D,k;if(S){const L=S==null?void 0:S.methods.find(z=>O===z.name);if(L)return L.rtype==="promise"?z=>c.nativePromise(w,O.toString(),z):(z,Y)=>c.nativeCallback(w,O.toString(),z,Y);if(q)return(D=q[O])===null||D===void 0?void 0:D.bind(q)}else{if(q)return(k=q[O])===null||k===void 0?void 0:k.bind(q);throw new Ln(`"${w}" plugin is not implemented on ${_}`,sr.Unimplemented)}},I=q=>{let O;const D=(...k)=>{const L=R().then(z=>{const Y=P(z,q);if(Y){const te=Y(...k);return O=te==null?void 0:te.remove,te}else throw new Ln(`"${w}.${q}()" is not implemented on ${_}`,sr.Unimplemented)});return q==="addListener"&&(L.remove=async()=>O()),L};return D.toString=()=>`${q.toString()}() { [capacitor code] }`,Object.defineProperty(D,"name",{value:q,writable:!1,configurable:!1}),D},N=I("addListener"),U=I("removeListener"),j=(q,O)=>{const D=N({eventName:q},O),k=async()=>{const z=await D;U({eventName:q,callbackId:z},O)},L=new Promise(z=>D.then(()=>z({remove:k})));return L.remove=async()=>{console.warn("Using addListener() without 'await' is deprecated."),await k()},L},H=new Proxy({},{get(q,O){switch(O){case"$$typeof":return;case"toJSON":return()=>({});case"addListener":return S?j:N;case"removeListener":return U;default:return I(O)}}});return d[w]=H,x.set(w,{name:w,proxy:H,platforms:new Set([...Object.keys(A),...S?[_]:[]])}),H},E=((a=o==null?void 0:o.currentPlatform)===null||a===void 0?void 0:a.registerPlugin)||b;return c.convertFileSrc||(c.convertFileSrc=w=>w),c.getPlatform=g,c.handleError=u,c.isNativePlatform=v,c.isPluginAvailable=m,c.pluginMethodNoop=h,c.registerPlugin=E,c.Exception=Ln,c.DEBUG=!!c.DEBUG,c.isLoggingEnabled=!!c.isLoggingEnabled,c.platform=c.getPlatform(),c.isNative=c.isNativePlatform(),c},Jy=e=>e.Capacitor=Xy(e),Ft=Jy(typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),pr=Ft.registerPlugin;Ft.Plugins;class Na{constructor(r){this.listeners={},this.windowListeners={},r&&(console.warn(`Capacitor WebPlugin "${r.name}" config object was deprecated in v3 and will be removed in v4.`),this.config=r)}addListener(r,n){this.listeners[r]||(this.listeners[r]=[]),this.listeners[r].push(n);const i=this.windowListeners[r];i&&!i.registered&&this.addWindowListener(i);const a=async()=>this.removeListener(r,n),s=Promise.resolve({remove:a});return Object.defineProperty(s,"remove",{value:async()=>{console.warn("Using addListener() without 'await' is deprecated."),await a()}}),s}async removeAllListeners(){this.listeners={};for(const r in this.windowListeners)this.removeWindowListener(this.windowListeners[r]);this.windowListeners={}}notifyListeners(r,n){const t=this.listeners[r];t&&t.forEach(i=>i(n))}hasListeners(r){return!!this.listeners[r].length}registerWindowListener(r,n){this.windowListeners[n]={registered:!1,windowEventName:r,pluginEventName:n,handler:t=>{this.notifyListeners(n,t)}}}unimplemented(r="not implemented"){return new Ft.Exception(r,sr.Unimplemented)}unavailable(r="not available"){return new Ft.Exception(r,sr.Unavailable)}async removeListener(r,n){const t=this.listeners[r];if(!t)return;const i=t.indexOf(n);this.listeners[r].splice(i,1),this.listeners[r].length||this.removeWindowListener(this.windowListeners[r])}addWindowListener(r){window.addEventListener(r.windowEventName,r.handler),r.registered=!0}removeWindowListener(r){r&&(window.removeEventListener(r.windowEventName,r.handler),r.registered=!1)}}const Yi=e=>encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),Vi=e=>e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent);class Zy extends Na{async getCookies(){const r=document.cookie,n={};return r.split(";").forEach(t=>{if(t.length<=0)return;let[i,a]=t.replace(/=/,"CAP_COOKIE").split("CAP_COOKIE");i=Vi(i).trim(),a=Vi(a).trim(),n[i]=a}),n}async setCookie(r){try{const n=Yi(r.key),t=Yi(r.value),i=`; expires=${(r.expires||"").replace("expires=","")}`,a=(r.path||"/").replace("path=",""),s=r.url!=null&&r.url.length>0?`domain=${r.url}`:"";document.cookie=`${n}=${t||""}${i}; path=${a}; ${s};`}catch(n){return Promise.reject(n)}}async deleteCookie(r){try{document.cookie=`${r.key}=; Max-Age=0`}catch(n){return Promise.reject(n)}}async clearCookies(){try{const r=document.cookie.split(";")||[];for(const n of r)document.cookie=n.replace(/^ +/,"").replace(/=.*/,`=;expires=${new Date().toUTCString()};path=/`)}catch(r){return Promise.reject(r)}}async clearAllCookies(){try{await this.clearCookies()}catch(r){return Promise.reject(r)}}}pr("CapacitorCookies",{web:()=>new Zy});const Qy=async e=>new Promise((r,n)=>{const t=new FileReader;t.onload=()=>{const i=t.result;r(i.indexOf(",")>=0?i.split(",")[1]:i)},t.onerror=i=>n(i),t.readAsDataURL(e)}),eb=(e={})=>{const r=Object.keys(e);return Object.keys(e).map(i=>i.toLocaleLowerCase()).reduce((i,a,s)=>(i[a]=e[r[s]],i),{})},rb=(e,r=!0)=>e?Object.entries(e).reduce((t,i)=>{const[a,s]=i;let c,d;return Array.isArray(s)?(d="",s.forEach(o=>{c=r?encodeURIComponent(o):o,d+=`${a}=${c}&`}),d.slice(0,-1)):(c=r?encodeURIComponent(s):s,d=`${a}=${c}`),`${t}&${d}`},"").substr(1):null,tb=(e,r={})=>{const n=Object.assign({method:e.method||"GET",headers:e.headers},r),i=eb(e.headers)["content-type"]||"";if(typeof e.data=="string")n.body=e.data;else if(i.includes("application/x-www-form-urlencoded")){const a=new URLSearchParams;for(const[s,c]of Object.entries(e.data||{}))a.set(s,c);n.body=a.toString()}else if(i.includes("multipart/form-data")){const a=new FormData;if(e.data instanceof FormData)e.data.forEach((c,d)=>{a.append(d,c)});else for(const c of Object.keys(e.data))a.append(c,e.data[c]);n.body=a;const s=new Headers(n.headers);s.delete("content-type"),n.headers=s}else(i.includes("application/json")||typeof e.data=="object")&&(n.body=JSON.stringify(e.data));return n};class nb extends Na{async request(r){const n=tb(r,r.webFetchExtra),t=rb(r.params,r.shouldEncodeUrlParams),i=t?`${r.url}?${t}`:r.url,a=await fetch(i,n),s=a.headers.get("content-type")||"";let{responseType:c="text"}=a.ok?r:{};s.includes("application/json")&&(c="json");let d,o;switch(c){case"arraybuffer":case"blob":o=await a.blob(),d=await Qy(o);break;case"json":d=await a.json();break;case"document":case"text":default:d=await a.text()}const l={};return a.headers.forEach((g,f)=>{l[f]=g}),{data:d,headers:l,status:a.status,url:a.url}}async get(r){return this.request(Object.assign(Object.assign({},r),{method:"GET"}))}async post(r){return this.request(Object.assign(Object.assign({},r),{method:"POST"}))}async put(r){return this.request(Object.assign(Object.assign({},r),{method:"PUT"}))}async patch(r){return this.request(Object.assign(Object.assign({},r),{method:"PATCH"}))}async delete(r){return this.request(Object.assign(Object.assign({},r),{method:"DELETE"}))}}pr("CapacitorHttp",{web:()=>new nb});const ir=pr("SecureStoragePlugin",{web:()=>Promise.resolve().then(()=>require("./web-7aa1c1aa.js")).then(e=>new e.SecureStoragePluginWeb)}),ab=async e=>ir.get({key:`refresh_token_${e}`}).then(r=>r.value).catch(()=>""),ib=async(e,r)=>ir.set({key:`refresh_token_${e}`,value:r}).then(()=>{}),ob=async e=>ir.remove({key:`refresh_token_${e}`}).then(()=>{}),Ds={get:e=>ir.get({key:e}).then(r=>r.value).catch(r=>(console.warn(`Error getting from SecureStorage key '${e}': ${r}`),null)),set:(e,r)=>ir.set({key:e,value:r}),remove:e=>ir.remove({key:e})},ar={getRefreshToken:ab,setRefreshToken:ib,clearRefreshToken:ob},sb=pr("SignInWithApple",{web:()=>Promise.resolve().then(()=>require("./web-5132f230.js")).then(e=>new e.SignInWithAppleWeb)}),cb=pr("FacebookLogin",{web:()=>Promise.resolve().then(()=>require("./web-9e04d552.js")).then(e=>new e.FacebookLoginWeb)}),ub=pr("GoogleAuth",{web:()=>Promise.resolve().then(()=>require("./web-6d1846e3.js")).then(e=>new e.GoogleAuthWeb)});var Xi;(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"})(Xi||(Xi={}));var Ji;(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"})(Ji||(Ji={}));var Zi;(function(e){e.NEW="NEW",e.TECHNICAL="TECHNICAL",e.CONFIRMED="CONFIRMED",e.PROCESSING="PROCESSING",e.PROCESSED="PROCESSED",e.VOID="VOID",e.WASTE="WASTE"})(Zi||(Zi={}));var Qi;(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"})(Qi||(Qi={}));var eo;(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"})(eo||(eo={}));var ro;(function(e){e.GROUP="group",e.PRODUCT="product"})(ro||(ro={}));var to;(function(e){e[e.INITIALIZING=0]="INITIALIZING",e[e.INVALID=1]="INVALID",e[e.VALID=2]="VALID"})(to||(to={}));var xa={},fb={get exports(){return xa},set exports(e){xa=e}},Ht={},lb={get exports(){return Ht},set exports(e){Ht=e}},Bs=function(r,n){return function(){for(var i=new Array(arguments.length),a=0;a<i.length;a++)i[a]=arguments[a];return r.apply(n,i)}},db=Bs,Xe=Object.prototype.toString;function ja(e){return Xe.call(e)==="[object Array]"}function pa(e){return typeof e>"u"}function hb(e){return e!==null&&!pa(e)&&e.constructor!==null&&!pa(e.constructor)&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e)}function vb(e){return Xe.call(e)==="[object ArrayBuffer]"}function xb(e){return typeof FormData<"u"&&e instanceof FormData}function pb(e){var r;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?r=ArrayBuffer.isView(e):r=e&&e.buffer&&e.buffer instanceof ArrayBuffer,r}function gb(e){return typeof e=="string"}function mb(e){return typeof e=="number"}function ks(e){return e!==null&&typeof e=="object"}function Zr(e){if(Xe.call(e)!=="[object Object]")return!1;var r=Object.getPrototypeOf(e);return r===null||r===Object.prototype}function yb(e){return Xe.call(e)==="[object Date]"}function bb(e){return Xe.call(e)==="[object File]"}function _b(e){return Xe.call(e)==="[object Blob]"}function Ls(e){return Xe.call(e)==="[object Function]"}function Eb(e){return ks(e)&&Ls(e.pipe)}function $b(e){return typeof URLSearchParams<"u"&&e instanceof URLSearchParams}function wb(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function Ab(){return typeof navigator<"u"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window<"u"&&typeof document<"u"}function Fa(e,r){if(!(e===null||typeof e>"u"))if(typeof e!="object"&&(e=[e]),ja(e))for(var n=0,t=e.length;n<t;n++)r.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&r.call(null,e[i],i,e)}function ga(){var e={};function r(i,a){Zr(e[a])&&Zr(i)?e[a]=ga(e[a],i):Zr(i)?e[a]=ga({},i):ja(i)?e[a]=i.slice():e[a]=i}for(var n=0,t=arguments.length;n<t;n++)Fa(arguments[n],r);return e}function Cb(e,r,n){return Fa(r,function(i,a){n&&typeof i=="function"?e[a]=db(i,n):e[a]=i}),e}function Sb(e){return e.charCodeAt(0)===65279&&(e=e.slice(1)),e}var we={isArray:ja,isArrayBuffer:vb,isBuffer:hb,isFormData:xb,isArrayBufferView:pb,isString:gb,isNumber:mb,isObject:ks,isPlainObject:Zr,isUndefined:pa,isDate:yb,isFile:bb,isBlob:_b,isFunction:Ls,isStream:Eb,isURLSearchParams:$b,isStandardBrowserEnv:Ab,forEach:Fa,merge:ga,extend:Cb,trim:wb,stripBOM:Sb},tr=we;function no(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Us=function(r,n,t){if(!n)return r;var i;if(t)i=t(n);else if(tr.isURLSearchParams(n))i=n.toString();else{var a=[];tr.forEach(n,function(d,o){d===null||typeof d>"u"||(tr.isArray(d)?o=o+"[]":d=[d],tr.forEach(d,function(g){tr.isDate(g)?g=g.toISOString():tr.isObject(g)&&(g=JSON.stringify(g)),a.push(no(o)+"="+no(g))}))}),i=a.join("&")}if(i){var s=r.indexOf("#");s!==-1&&(r=r.slice(0,s)),r+=(r.indexOf("?")===-1?"?":"&")+i}return r},Tb=we;function an(){this.handlers=[]}an.prototype.use=function(r,n,t){return this.handlers.push({fulfilled:r,rejected:n,synchronous:t?t.synchronous:!1,runWhen:t?t.runWhen:null}),this.handlers.length-1};an.prototype.eject=function(r){this.handlers[r]&&(this.handlers[r]=null)};an.prototype.forEach=function(r){Tb.forEach(this.handlers,function(t){t!==null&&r(t)})};var Rb=an,Ob=we,Pb=function(r,n){Ob.forEach(r,function(i,a){a!==n&&a.toUpperCase()===n.toUpperCase()&&(r[n]=i,delete r[a])})},Ns=function(r,n,t,i,a){return r.config=n,t&&(r.code=t),r.request=i,r.response=a,r.isAxiosError=!0,r.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}},r},Un,ao;function js(){if(ao)return Un;ao=1;var e=Ns;return Un=function(n,t,i,a,s){var c=new Error(n);return e(c,t,i,a,s)},Un}var Nn,io;function Ib(){if(io)return Nn;io=1;var e=js();return Nn=function(n,t,i){var a=i.config.validateStatus;!i.status||!a||a(i.status)?n(i):t(e("Request failed with status code "+i.status,i.config,null,i.request,i))},Nn}var jn,oo;function Db(){if(oo)return jn;oo=1;var e=we;return jn=e.isStandardBrowserEnv()?function(){return{write:function(t,i,a,s,c,d){var o=[];o.push(t+"="+encodeURIComponent(i)),e.isNumber(a)&&o.push("expires="+new Date(a).toGMTString()),e.isString(s)&&o.push("path="+s),e.isString(c)&&o.push("domain="+c),d===!0&&o.push("secure"),document.cookie=o.join("; ")},read:function(t){var i=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}(),jn}var Fn,so;function Bb(){return so||(so=1,Fn=function(r){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(r)}),Fn}var Hn,co;function kb(){return co||(co=1,Hn=function(r,n){return n?r.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):r}),Hn}var qn,uo;function Lb(){if(uo)return qn;uo=1;var e=Bb(),r=kb();return qn=function(t,i){return t&&!e(i)?r(t,i):i},qn}var Mn,fo;function Ub(){if(fo)return Mn;fo=1;var e=we,r=["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"];return Mn=function(t){var i={},a,s,c;return t&&e.forEach(t.split(`
|
|
16
|
+
`),function(o){if(c=o.indexOf(":"),a=e.trim(o.substr(0,c)).toLowerCase(),s=e.trim(o.substr(c+1)),a){if(i[a]&&r.indexOf(a)>=0)return;a==="set-cookie"?i[a]=(i[a]?i[a]:[]).concat([s]):i[a]=i[a]?i[a]+", "+s:s}}),i},Mn}var Wn,lo;function Nb(){if(lo)return Wn;lo=1;var e=we;return Wn=e.isStandardBrowserEnv()?function(){var n=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a"),i;function a(s){var c=s;return n&&(t.setAttribute("href",c),c=t.href),t.setAttribute("href",c),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return i=a(window.location.href),function(c){var d=e.isString(c)?a(c):c;return d.protocol===i.protocol&&d.host===i.host}}():function(){return function(){return!0}}(),Wn}var zn,ho;function vo(){if(ho)return zn;ho=1;var e=we,r=Ib(),n=Db(),t=Us,i=Lb(),a=Ub(),s=Nb(),c=js();return zn=function(o){return new Promise(function(g,f){var v=o.data,y=o.headers,m=o.responseType;e.isFormData(v)&&delete y["Content-Type"];var p=new XMLHttpRequest;if(o.auth){var C=o.auth.username||"",u=o.auth.password?unescape(encodeURIComponent(o.auth.password)):"";y.Authorization="Basic "+btoa(C+":"+u)}var h=i(o.baseURL,o.url);p.open(o.method.toUpperCase(),t(h,o.params,o.paramsSerializer),!0),p.timeout=o.timeout;function x(){if(p){var E="getAllResponseHeaders"in p?a(p.getAllResponseHeaders()):null,w=!m||m==="text"||m==="json"?p.responseText:p.response,A={data:w,status:p.status,statusText:p.statusText,headers:E,config:o,request:p};r(g,f,A),p=null}}if("onloadend"in p?p.onloadend=x:p.onreadystatechange=function(){!p||p.readyState!==4||p.status===0&&!(p.responseURL&&p.responseURL.indexOf("file:")===0)||setTimeout(x)},p.onabort=function(){p&&(f(c("Request aborted",o,"ECONNABORTED",p)),p=null)},p.onerror=function(){f(c("Network Error",o,null,p)),p=null},p.ontimeout=function(){var w="timeout of "+o.timeout+"ms exceeded";o.timeoutErrorMessage&&(w=o.timeoutErrorMessage),f(c(w,o,o.transitional&&o.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",p)),p=null},e.isStandardBrowserEnv()){var b=(o.withCredentials||s(h))&&o.xsrfCookieName?n.read(o.xsrfCookieName):void 0;b&&(y[o.xsrfHeaderName]=b)}"setRequestHeader"in p&&e.forEach(y,function(w,A){typeof v>"u"&&A.toLowerCase()==="content-type"?delete y[A]:p.setRequestHeader(A,w)}),e.isUndefined(o.withCredentials)||(p.withCredentials=!!o.withCredentials),m&&m!=="json"&&(p.responseType=o.responseType),typeof o.onDownloadProgress=="function"&&p.addEventListener("progress",o.onDownloadProgress),typeof o.onUploadProgress=="function"&&p.upload&&p.upload.addEventListener("progress",o.onUploadProgress),o.cancelToken&&o.cancelToken.promise.then(function(w){p&&(p.abort(),f(w),p=null)}),v||(v=null),p.send(v)})},zn}var xe=we,xo=Pb,jb=Ns,Fb={"Content-Type":"application/x-www-form-urlencoded"};function po(e,r){!xe.isUndefined(e)&&xe.isUndefined(e["Content-Type"])&&(e["Content-Type"]=r)}function Hb(){var e;return(typeof XMLHttpRequest<"u"||typeof process<"u"&&Object.prototype.toString.call(process)==="[object process]")&&(e=vo()),e}function qb(e,r,n){if(xe.isString(e))try{return(r||JSON.parse)(e),xe.trim(e)}catch(t){if(t.name!=="SyntaxError")throw t}return(n||JSON.stringify)(e)}var on={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:Hb(),transformRequest:[function(r,n){return xo(n,"Accept"),xo(n,"Content-Type"),xe.isFormData(r)||xe.isArrayBuffer(r)||xe.isBuffer(r)||xe.isStream(r)||xe.isFile(r)||xe.isBlob(r)?r:xe.isArrayBufferView(r)?r.buffer:xe.isURLSearchParams(r)?(po(n,"application/x-www-form-urlencoded;charset=utf-8"),r.toString()):xe.isObject(r)||n&&n["Content-Type"]==="application/json"?(po(n,"application/json"),qb(r)):r}],transformResponse:[function(r){var n=this.transitional,t=n&&n.silentJSONParsing,i=n&&n.forcedJSONParsing,a=!t&&this.responseType==="json";if(a||i&&xe.isString(r)&&r.length)try{return JSON.parse(r)}catch(s){if(a)throw s.name==="SyntaxError"?jb(s,this,"E_JSON_PARSE"):s}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(r){return r>=200&&r<300}};on.headers={common:{Accept:"application/json, text/plain, */*"}};xe.forEach(["delete","get","head"],function(r){on.headers[r]={}});xe.forEach(["post","put","patch"],function(r){on.headers[r]=xe.merge(Fb)});var Ha=on,Mb=we,Wb=Ha,zb=function(r,n,t){var i=this||Wb;return Mb.forEach(t,function(s){r=s.call(i,r,n)}),r},Gn,go;function Fs(){return go||(go=1,Gn=function(r){return!!(r&&r.__CANCEL__)}),Gn}var mo=we,Kn=zb,Gb=Fs(),Kb=Ha;function Yn(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var Yb=function(r){Yn(r),r.headers=r.headers||{},r.data=Kn.call(r,r.data,r.headers,r.transformRequest),r.headers=mo.merge(r.headers.common||{},r.headers[r.method]||{},r.headers),mo.forEach(["delete","get","head","post","put","patch","common"],function(i){delete r.headers[i]});var n=r.adapter||Kb.adapter;return n(r).then(function(i){return Yn(r),i.data=Kn.call(r,i.data,i.headers,r.transformResponse),i},function(i){return Gb(i)||(Yn(r),i&&i.response&&(i.response.data=Kn.call(r,i.response.data,i.response.headers,r.transformResponse))),Promise.reject(i)})},ye=we,Hs=function(r,n){n=n||{};var t={},i=["url","method","data"],a=["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"],c=["validateStatus"];function d(f,v){return ye.isPlainObject(f)&&ye.isPlainObject(v)?ye.merge(f,v):ye.isPlainObject(v)?ye.merge({},v):ye.isArray(v)?v.slice():v}function o(f){ye.isUndefined(n[f])?ye.isUndefined(r[f])||(t[f]=d(void 0,r[f])):t[f]=d(r[f],n[f])}ye.forEach(i,function(v){ye.isUndefined(n[v])||(t[v]=d(void 0,n[v]))}),ye.forEach(a,o),ye.forEach(s,function(v){ye.isUndefined(n[v])?ye.isUndefined(r[v])||(t[v]=d(void 0,r[v])):t[v]=d(void 0,n[v])}),ye.forEach(c,function(v){v in n?t[v]=d(r[v],n[v]):v in r&&(t[v]=d(void 0,r[v]))});var l=i.concat(a).concat(s).concat(c),g=Object.keys(r).concat(Object.keys(n)).filter(function(v){return l.indexOf(v)===-1});return ye.forEach(g,o),t};const Vb="axios",Xb="0.21.4",Jb="Promise based HTTP client for the browser and node.js",Zb="index.js",Qb={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"},e2={type:"git",url:"https://github.com/axios/axios.git"},r2=["xhr","http","ajax","promise","node"],t2="Matt Zabriskie",n2="MIT",a2={url:"https://github.com/axios/axios/issues"},i2="https://axios-http.com",o2={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"},s2={"./lib/adapters/http.js":"./lib/adapters/xhr.js"},c2="dist/axios.min.js",u2="dist/axios.min.js",f2="./index.d.ts",l2={"follow-redirects":"^1.14.0"},d2=[{path:"./dist/axios.min.js",threshold:"5kB"}],h2={name:Vb,version:Xb,description:Jb,main:Zb,scripts:Qb,repository:e2,keywords:r2,author:t2,license:n2,bugs:a2,homepage:i2,devDependencies:o2,browser:s2,jsdelivr:c2,unpkg:u2,typings:f2,dependencies:l2,bundlesize:d2};var qs=h2,qa={};["object","boolean","number","function","string","symbol"].forEach(function(e,r){qa[e]=function(t){return typeof t===e||"a"+(r<1?"n ":" ")+e}});var yo={},v2=qs.version.split(".");function Ms(e,r){for(var n=r?r.split("."):v2,t=e.split("."),i=0;i<3;i++){if(n[i]>t[i])return!0;if(n[i]<t[i])return!1}return!1}qa.transitional=function(r,n,t){var i=n&&Ms(n);function a(s,c){return"[Axios v"+qs.version+"] Transitional option '"+s+"'"+c+(t?". "+t:"")}return function(s,c,d){if(r===!1)throw new Error(a(c," has been removed in "+n));return i&&!yo[c]&&(yo[c]=!0,console.warn(a(c," has been deprecated since v"+n+" and will be removed in the near future"))),r?r(s,c,d):!0}};function x2(e,r,n){if(typeof e!="object")throw new TypeError("options must be an object");for(var t=Object.keys(e),i=t.length;i-- >0;){var a=t[i],s=r[a];if(s){var c=e[a],d=c===void 0||s(c,a,e);if(d!==!0)throw new TypeError("option "+a+" must be "+d);continue}if(n!==!0)throw Error("Unknown option "+a)}}var p2={isOlderVersion:Ms,assertOptions:x2,validators:qa},Ws=we,g2=Us,bo=Rb,_o=Yb,sn=Hs,zs=p2,nr=zs.validators;function Nr(e){this.defaults=e,this.interceptors={request:new bo,response:new bo}}Nr.prototype.request=function(r){typeof r=="string"?(r=arguments[1]||{},r.url=arguments[0]):r=r||{},r=sn(this.defaults,r),r.method?r.method=r.method.toLowerCase():this.defaults.method?r.method=this.defaults.method.toLowerCase():r.method="get";var n=r.transitional;n!==void 0&&zs.assertOptions(n,{silentJSONParsing:nr.transitional(nr.boolean,"1.0.0"),forcedJSONParsing:nr.transitional(nr.boolean,"1.0.0"),clarifyTimeoutError:nr.transitional(nr.boolean,"1.0.0")},!1);var t=[],i=!0;this.interceptors.request.forEach(function(f){typeof f.runWhen=="function"&&f.runWhen(r)===!1||(i=i&&f.synchronous,t.unshift(f.fulfilled,f.rejected))});var a=[];this.interceptors.response.forEach(function(f){a.push(f.fulfilled,f.rejected)});var s;if(!i){var c=[_o,void 0];for(Array.prototype.unshift.apply(c,t),c=c.concat(a),s=Promise.resolve(r);c.length;)s=s.then(c.shift(),c.shift());return s}for(var d=r;t.length;){var o=t.shift(),l=t.shift();try{d=o(d)}catch(g){l(g);break}}try{s=_o(d)}catch(g){return Promise.reject(g)}for(;a.length;)s=s.then(a.shift(),a.shift());return s};Nr.prototype.getUri=function(r){return r=sn(this.defaults,r),g2(r.url,r.params,r.paramsSerializer).replace(/^\?/,"")};Ws.forEach(["delete","get","head","options"],function(r){Nr.prototype[r]=function(n,t){return this.request(sn(t||{},{method:r,url:n,data:(t||{}).data}))}});Ws.forEach(["post","put","patch"],function(r){Nr.prototype[r]=function(n,t,i){return this.request(sn(i||{},{method:r,url:n,data:t}))}});var m2=Nr,Vn,Eo;function Gs(){if(Eo)return Vn;Eo=1;function e(r){this.message=r}return e.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},e.prototype.__CANCEL__=!0,Vn=e,Vn}var Xn,$o;function y2(){if($o)return Xn;$o=1;var e=Gs();function r(n){if(typeof n!="function")throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(s){t=s});var i=this;n(function(s){i.reason||(i.reason=new e(s),t(i.reason))})}return r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var t,i=new r(function(s){t=s});return{token:i,cancel:t}},Xn=r,Xn}var Jn,wo;function b2(){return wo||(wo=1,Jn=function(r){return function(t){return r.apply(null,t)}}),Jn}var Zn,Ao;function _2(){return Ao||(Ao=1,Zn=function(r){return typeof r=="object"&&r.isAxiosError===!0}),Zn}var Co=we,E2=Bs,Qr=m2,$2=Hs,w2=Ha;function Ks(e){var r=new Qr(e),n=E2(Qr.prototype.request,r);return Co.extend(n,Qr.prototype,r),Co.extend(n,r),n}var Ie=Ks(w2);Ie.Axios=Qr;Ie.create=function(r){return Ks($2(Ie.defaults,r))};Ie.Cancel=Gs();Ie.CancelToken=y2();Ie.isCancel=Fs();Ie.all=function(r){return Promise.all(r)};Ie.spread=b2();Ie.isAxiosError=_2();lb.exports=Ie;Ht.default=Ie;(function(e){e.exports=Ht})(fb);const jr=Po(xa);function Ma(e){const{status:r,data:n}=e.response;switch(r){case 400:console.log("Error: invalid request");break;case 401:console.log("Error: not authenticated");break;case 500:console.log("Error: server problems");break}throw n&&console.log(n),e}globalThis&&globalThis.__awaiter;globalThis&&globalThis.__awaiter;var gr=globalThis&&globalThis.__awaiter||function(e,r,n,t){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function c(l){try{o(t.next(l))}catch(g){s(g)}}function d(l){try{o(t.throw(l))}catch(g){s(g)}}function o(l){l.done?a(l.value):i(l.value).then(c,d)}o((t=t.apply(e,r||[])).next())})};let _e=null,cn=-1;function A2(e,r,n,t,i){return gr(this,void 0,void 0,function*(){let a=null;try{return a=yield jr({method:"post",url:`${e}/auth-oauth2/oauth/token`,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8",Authorization:`Basic ${n}`,"X-Tenant":r},data:`username=${t}&password=${i}&grant_type=password&scope=read`}),_e=a.data,cn=new Date().getTime(),!0}catch{return!1}})}function C2(e,r,n,t){return gr(this,void 0,void 0,function*(){let i=null;try{const a={method:"post",url:`${e}/auth-oauth2/oauth/token`,headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8",Authorization:`Basic ${n}`,"X-Tenant":r},data:`refresh_token=${t}&grant_type=refresh_token`};return i=yield jr(a),_e=i.data,cn=new Date().getTime(),!0}catch{return!1}})}const S2=(e,r,n=!1)=>gr(void 0,void 0,void 0,function*(){if(!n&&_e&&_e.access_token){const a=new Date().getTime()-cn,s=parseInt(_e.expires_in)*1e3*.95;if(a<s)return{token:_e.access_token,UUID:_e.UUID}}let t=!1;const i=yield r.getRefreshToken(e.TENANT);return i&&(t=yield C2(e.BASE_URL,e.TENANT,e.BASIC_AUTH,i)),!t&&e.anonymousAuth&&(t=yield A2(e.BASE_URL,e.TENANT,e.BASIC_AUTH,"anonymous","")),!t||!_e?{token:"",UUID:""}:(r.setRefreshToken(e.TENANT,_e.refresh_token),{token:_e.access_token,UUID:_e.UUID})});function T2(e,r,n=!1){return()=>S2(e,r,n)}function R2(e,r,n,t=new Date().getTime()){_e=r,cn=t,n.setRefreshToken(e,_e.refresh_token)}function O2(e,r){r.clearRefreshToken(e),_e=null}function ma(e,r){return gr(this,void 0,void 0,function*(){const n=yield jr({method:"get",url:`${e}/auth-api/api/me`,headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}}).catch(Ma);return n?n.data:null})}function P2(e,r,n){return gr(this,void 0,void 0,function*(){const t=yield jr.post(`${e}/auth-api/api/me`,n,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`}}).catch(Ma);return t&&t.data||!1})}function I2(e,r){return gr(this,void 0,void 0,function*(){const{login:n}=yield ma(e,r),t=yield jr.request({url:`${e}/auth-api/api/me`,method:"DELETE",headers:{"Content-Type":"application/json",Authorization:`Bearer ${r}`},data:{login:n}}).catch(Ma);return t&&t.data||!1})}globalThis&&globalThis.__awaiter;if(typeof TextEncoder!="function"){const e=require("text-encoding");global.TextEncoder=e.TextEncoder,global.TextDecoder=e.TextDecoder}globalThis&&globalThis.__awaiter;function ya(e){this.message=e}ya.prototype=new Error,ya.prototype.name="InvalidCharacterError";var So=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var r=String(e).replace(/=+$/,"");if(r.length%4==1)throw new ya("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,t,i=0,a=0,s="";t=r.charAt(a++);~t&&(n=i%4?64*n+t:t,i++%4)?s+=String.fromCharCode(255&n>>(-2*i&6)):0)t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(t);return s};function D2(e){var r=e.replace(/-/g,"+").replace(/_/g,"/");switch(r.length%4){case 0:break;case 2:r+="==";break;case 3:r+="=";break;default:throw"Illegal base64url string!"}try{return function(n){return decodeURIComponent(So(n).replace(/(.)/g,function(t,i){var a=i.charCodeAt(0).toString(16).toUpperCase();return a.length<2&&(a="0"+a),"%"+a}))}(r)}catch{return So(r)}}function qt(e){this.message=e}function B2(e,r){if(typeof e!="string")throw new qt("Invalid token specified");var n=(r=r||{}).header===!0?0:1;try{return JSON.parse(D2(e.split(".")[n]))}catch(t){throw new qt("Invalid token specified: "+t.message)}}qt.prototype=new Error,qt.prototype.name="InvalidTokenError";var qe=(e=>(e.GOOGLE="google",e.APPLE="apple",e.FACEBOOK="facebook",e))(qe||{});const Ys={loggedIn:!1,UUID:"",resolved:!1},Wa=Dr.AuthContext,k2=()=>re.useContext(Wa),Vs=Dr.ConfigContext,Xs=()=>re.useContext(Vs);var Mt={},L2={get exports(){return Mt},set exports(e){Mt=e}},Sr={};/**
|
|
17
|
+
* @license React
|
|
18
|
+
* react-jsx-runtime.production.min.js
|
|
19
|
+
*
|
|
20
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
21
|
+
*
|
|
22
|
+
* This source code is licensed under the MIT license found in the
|
|
23
|
+
* LICENSE file in the root directory of this source tree.
|
|
24
|
+
*/var To;function U2(){if(To)return Sr;To=1;var e=re,r=Symbol.for("react.element"),n=Symbol.for("react.fragment"),t=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(c,d,o){var l,g={},f=null,v=null;o!==void 0&&(f=""+o),d.key!==void 0&&(f=""+d.key),d.ref!==void 0&&(v=d.ref);for(l in d)t.call(d,l)&&!a.hasOwnProperty(l)&&(g[l]=d[l]);if(c&&c.defaultProps)for(l in d=c.defaultProps,d)g[l]===void 0&&(g[l]=d[l]);return{$$typeof:r,type:c,key:f,ref:v,props:g,_owner:i.current}}return Sr.Fragment=n,Sr.jsx=s,Sr.jsxs=s,Sr}var Tr={};/**
|
|
25
|
+
* @license React
|
|
26
|
+
* react-jsx-runtime.development.js
|
|
27
|
+
*
|
|
28
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
29
|
+
*
|
|
30
|
+
* This source code is licensed under the MIT license found in the
|
|
31
|
+
* LICENSE file in the root directory of this source tree.
|
|
32
|
+
*/var Ro;function N2(){return Ro||(Ro=1,process.env.NODE_ENV!=="production"&&function(){var e=re,r=Symbol.for("react.element"),n=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),o=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),y=Symbol.iterator,m="@@iterator";function p($){if($===null||typeof $!="object")return null;var F=y&&$[y]||$[m];return typeof F=="function"?F:null}var C=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function u($){{for(var F=arguments.length,M=new Array(F>1?F-1:0),G=1;G<F;G++)M[G-1]=arguments[G];h("error",$,M)}}function h($,F,M){{var G=C.ReactDebugCurrentFrame,ae=G.getStackAddendum();ae!==""&&(F+="%s",M=M.concat([ae]));var oe=M.map(function(Q){return String(Q)});oe.unshift("Warning: "+F),Function.prototype.apply.call(console[$],console,oe)}}var x=!1,b=!1,E=!1,w=!1,A=!1,T;T=Symbol.for("react.module.reference");function _($){return!!(typeof $=="string"||typeof $=="function"||$===t||$===a||A||$===i||$===o||$===l||w||$===v||x||b||E||typeof $=="object"&&$!==null&&($.$$typeof===f||$.$$typeof===g||$.$$typeof===s||$.$$typeof===c||$.$$typeof===d||$.$$typeof===T||$.getModuleId!==void 0))}function S($,F,M){var G=$.displayName;if(G)return G;var ae=F.displayName||F.name||"";return ae!==""?M+"("+ae+")":M}function B($){return $.displayName||"Context"}function R($){if($==null)return null;if(typeof $.tag=="number"&&u("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof $=="function")return $.displayName||$.name||null;if(typeof $=="string")return $;switch($){case t:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case o:return"Suspense";case l:return"SuspenseList"}if(typeof $=="object")switch($.$$typeof){case c:var F=$;return B(F)+".Consumer";case s:var M=$;return B(M._context)+".Provider";case d:return S($,$.render,"ForwardRef");case g:var G=$.displayName||null;return G!==null?G:R($.type)||"Memo";case f:{var ae=$,oe=ae._payload,Q=ae._init;try{return R(Q(oe))}catch{return null}}}return null}var P=Object.assign,I=0,N,U,j,H,q,O,D;function k(){}k.__reactDisabledLog=!0;function L(){{if(I===0){N=console.log,U=console.info,j=console.warn,H=console.error,q=console.group,O=console.groupCollapsed,D=console.groupEnd;var $={configurable:!0,enumerable:!0,value:k,writable:!0};Object.defineProperties(console,{info:$,log:$,warn:$,error:$,group:$,groupCollapsed:$,groupEnd:$})}I++}}function z(){{if(I--,I===0){var $={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:P({},$,{value:N}),info:P({},$,{value:U}),warn:P({},$,{value:j}),error:P({},$,{value:H}),group:P({},$,{value:q}),groupCollapsed:P({},$,{value:O}),groupEnd:P({},$,{value:D})})}I<0&&u("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var Y=C.ReactCurrentDispatcher,te;function W($,F,M){{if(te===void 0)try{throw Error()}catch(ae){var G=ae.stack.trim().match(/\n( *(at )?)/);te=G&&G[1]||""}return`
|
|
33
|
+
`+te+$}}var J=!1,ne;{var ie=typeof WeakMap=="function"?WeakMap:Map;ne=new ie}function ue($,F){if(!$||J)return"";{var M=ne.get($);if(M!==void 0)return M}var G;J=!0;var ae=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var oe;oe=Y.current,Y.current=null,L();try{if(F){var Q=function(){throw Error()};if(Object.defineProperty(Q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Q,[])}catch(je){G=je}Reflect.construct($,[],Q)}else{try{Q.call()}catch(je){G=je}$.call(Q.prototype)}}else{try{throw Error()}catch(je){G=je}$()}}catch(je){if(je&&G&&typeof je.stack=="string"){for(var X=je.stack.split(`
|
|
34
|
+
`),be=G.stack.split(`
|
|
35
|
+
`),le=X.length-1,de=be.length-1;le>=1&&de>=0&&X[le]!==be[de];)de--;for(;le>=1&&de>=0;le--,de--)if(X[le]!==be[de]){if(le!==1||de!==1)do if(le--,de--,de<0||X[le]!==be[de]){var Ce=`
|
|
36
|
+
`+X[le].replace(" at new "," at ");return $.displayName&&Ce.includes("<anonymous>")&&(Ce=Ce.replace("<anonymous>",$.displayName)),typeof $=="function"&&ne.set($,Ce),Ce}while(le>=1&&de>=0);break}}}finally{J=!1,Y.current=oe,z(),Error.prepareStackTrace=ae}var Qe=$?$.displayName||$.name:"",Ga=Qe?W(Qe):"";return typeof $=="function"&&ne.set($,Ga),Ga}function fe($,F,M){return ue($,!1)}function he($){var F=$.prototype;return!!(F&&F.isReactComponent)}function De($,F,M){if($==null)return"";if(typeof $=="function")return ue($,he($));if(typeof $=="string")return W($);switch($){case o:return W("Suspense");case l:return W("SuspenseList")}if(typeof $=="object")switch($.$$typeof){case d:return fe($.render);case g:return De($.type,F,M);case f:{var G=$,ae=G._payload,oe=G._init;try{return De(oe(ae),F,M)}catch{}}}return""}var Ee=Object.prototype.hasOwnProperty,Fe={},Se=C.ReactDebugCurrentFrame;function Te($){if($){var F=$._owner,M=De($.type,$._source,F?F.type:null);Se.setExtraStackFrame(M)}else Se.setExtraStackFrame(null)}function Re($,F,M,G,ae){{var oe=Function.call.bind(Ee);for(var Q in $)if(oe($,Q)){var X=void 0;try{if(typeof $[Q]!="function"){var be=Error((G||"React class")+": "+M+" type `"+Q+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof $[Q]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw be.name="Invariant Violation",be}X=$[Q](F,Q,G,M,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(le){X=le}X&&!(X instanceof Error)&&(Te(ae),u("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",G||"React class",M,Q,typeof X),Te(null)),X instanceof Error&&!(X.message in Fe)&&(Fe[X.message]=!0,Te(ae),u("Failed %s type: %s",M,X.message),Te(null))}}}var Z=Array.isArray;function V($){return Z($)}function Ae($){{var F=typeof Symbol=="function"&&Symbol.toStringTag,M=F&&$[Symbol.toStringTag]||$.constructor.name||"Object";return M}}function Je($){try{return mr($),!1}catch{return!0}}function mr($){return""+$}function Ne($){if(Je($))return u("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ae($)),mr($)}var Oe=C.ReactCurrentOwner,un={key:!0,ref:!0,__self:!0,__source:!0},yr,br,Be;Be={};function Me($){if(Ee.call($,"ref")){var F=Object.getOwnPropertyDescriptor($,"ref").get;if(F&&F.isReactWarning)return!1}return $.ref!==void 0}function fn($){if(Ee.call($,"key")){var F=Object.getOwnPropertyDescriptor($,"key").get;if(F&&F.isReactWarning)return!1}return $.key!==void 0}function Fr($,F){if(typeof $.ref=="string"&&Oe.current&&F&&Oe.current.stateNode!==F){var M=R(Oe.current.type);Be[M]||(u('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',R(Oe.current.type),$.ref),Be[M]=!0)}}function Hr($,F){{var M=function(){yr||(yr=!0,u("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",F))};M.isReactWarning=!0,Object.defineProperty($,"key",{get:M,configurable:!0})}}function ln($,F){{var M=function(){br||(br=!0,u("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",F))};M.isReactWarning=!0,Object.defineProperty($,"ref",{get:M,configurable:!0})}}var dn=function($,F,M,G,ae,oe,Q){var X={$$typeof:r,type:$,key:F,ref:M,props:Q,_owner:oe};return X._store={},Object.defineProperty(X._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(X,"_self",{configurable:!1,enumerable:!1,writable:!1,value:G}),Object.defineProperty(X,"_source",{configurable:!1,enumerable:!1,writable:!1,value:ae}),Object.freeze&&(Object.freeze(X.props),Object.freeze(X)),X};function qr($,F,M,G,ae){{var oe,Q={},X=null,be=null;M!==void 0&&(Ne(M),X=""+M),fn(F)&&(Ne(F.key),X=""+F.key),Me(F)&&(be=F.ref,Fr(F,ae));for(oe in F)Ee.call(F,oe)&&!un.hasOwnProperty(oe)&&(Q[oe]=F[oe]);if($&&$.defaultProps){var le=$.defaultProps;for(oe in le)Q[oe]===void 0&&(Q[oe]=le[oe])}if(X||be){var de=typeof $=="function"?$.displayName||$.name||"Unknown":$;X&&Hr(Q,de),be&&ln(Q,de)}return dn($,X,be,ae,G,Oe.current,Q)}}var _r=C.ReactCurrentOwner,Er=C.ReactDebugCurrentFrame;function He($){if($){var F=$._owner,M=De($.type,$._source,F?F.type:null);Er.setExtraStackFrame(M)}else Er.setExtraStackFrame(null)}var Ze;Ze=!1;function $r($){return typeof $=="object"&&$!==null&&$.$$typeof===r}function Mr(){{if(_r.current){var $=R(_r.current.type);if($)return`
|
|
37
|
+
|
|
38
|
+
Check the render method of \``+$+"`."}return""}}function hn($){{if($!==void 0){var F=$.fileName.replace(/^.*[\\\/]/,""),M=$.lineNumber;return`
|
|
39
|
+
|
|
40
|
+
Check your code at `+F+":"+M+"."}return""}}var wr={};function vn($){{var F=Mr();if(!F){var M=typeof $=="string"?$:$.displayName||$.name;M&&(F=`
|
|
41
|
+
|
|
42
|
+
Check the top-level render call using <`+M+">.")}return F}}function Wr($,F){{if(!$._store||$._store.validated||$.key!=null)return;$._store.validated=!0;var M=vn(F);if(wr[M])return;wr[M]=!0;var G="";$&&$._owner&&$._owner!==_r.current&&(G=" It was passed a child from "+R($._owner.type)+"."),He($),u('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',M,G),He(null)}}function Ar($,F){{if(typeof $!="object")return;if(V($))for(var M=0;M<$.length;M++){var G=$[M];$r(G)&&Wr(G,F)}else if($r($))$._store&&($._store.validated=!0);else if($){var ae=p($);if(typeof ae=="function"&&ae!==$.entries)for(var oe=ae.call($),Q;!(Q=oe.next()).done;)$r(Q.value)&&Wr(Q.value,F)}}}function xn($){{var F=$.type;if(F==null||typeof F=="string")return;var M;if(typeof F=="function")M=F.propTypes;else if(typeof F=="object"&&(F.$$typeof===d||F.$$typeof===g))M=F.propTypes;else return;if(M){var G=R(F);Re(M,$.props,"prop",G,$)}else if(F.PropTypes!==void 0&&!Ze){Ze=!0;var ae=R(F);u("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",ae||"Unknown")}typeof F.getDefaultProps=="function"&&!F.getDefaultProps.isReactClassApproved&&u("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function zr($){{for(var F=Object.keys($.props),M=0;M<F.length;M++){var G=F[M];if(G!=="children"&&G!=="key"){He($),u("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",G),He(null);break}}$.ref!==null&&(He($),u("Invalid attribute `ref` supplied to `React.Fragment`."),He(null))}}function ge($,F,M,G,ae,oe){{var Q=_($);if(!Q){var X="";($===void 0||typeof $=="object"&&$!==null&&Object.keys($).length===0)&&(X+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var be=hn(ae);be?X+=be:X+=Mr();var le;$===null?le="null":V($)?le="array":$!==void 0&&$.$$typeof===r?(le="<"+(R($.type)||"Unknown")+" />",X=" Did you accidentally export a JSX literal instead of a component?"):le=typeof $,u("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",le,X)}var de=qr($,F,M,ae,oe);if(de==null)return de;if(Q){var Ce=F.children;if(Ce!==void 0)if(G)if(V(Ce)){for(var Qe=0;Qe<Ce.length;Qe++)Ar(Ce[Qe],$);Object.freeze&&Object.freeze(Ce)}else u("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ar(Ce,$)}return $===t?zr(de):xn(de),de}}function ke($,F,M){return ge($,F,M,!0)}function Gr($,F,M){return ge($,F,M,!1)}var pn=Gr,Zs=ke;Tr.Fragment=t,Tr.jsx=pn,Tr.jsxs=Zs}()),Tr}(function(e){process.env.NODE_ENV==="production"?e.exports=U2():e.exports=N2()})(L2);const Yr=Mt.jsx,Oo=Mt.Fragment;exports.authProviderGlobal=void 0;var Js=(e=>(e.UNINITIALIZED="uninitialized",e.INITIALIZED="index",e.EMAIL_REGISTER_VERIFY="email-register-verify",e.EMAIL_REGISTER_FINAL="email-register-final",e.EMAIL_SIGN_IN="email-sign-in",e.EMAIL_REGISTER_INIT="email-register-init",e.EMAIL_PASSWORD_RESET="email-password-reset",e.EMAIL_PASSWORD_RESET_VERIFY="email-password-reset-verify",e.EMAIL_PASSWORD_RESET_FINAL="email-password-reset-final",e.MERGE_ACCOUNTS="merge-accounts",e.MERGE_ACCOUNT="merge-account",e.EMAIL_CONNECT_VERIFY="email-connect-verify",e.EMAIL_CONNECT_FINAL="email-connect-final",e.EXT_AUTH_REGISTER="ext-auth-register",e.PKCE_SUCCESS="success-pkce",e.SUCCESS="success",e.ERROR="error",e))(Js||{});const j2={stage:"uninitialized"},za=re.createContext(j2),F2=()=>re.useContext(za);function H2(e,r){if(!e||e.length===0)return!0;const n=r.map(i=>i.role);return e.filter(i=>n.includes(i)).length>0}function q2(e){const r=Math.min(window.innerWidth,500),n=Math.min(window.innerHeight,700),t=Math.round((window.innerWidth-r)/2),i=Math.round((window.innerHeight-n)/2);window.open(e,"_blank",`popup=true,width=${r},height=${n},top=${i},left=${t}`)}function M2({setShowWelcomeScreen:e,platform:r,language:n,...t}){const i=Ds,a=Xs(),s=Ka.useLocation(),c=Ka.useHistory(),[d,o]=re.useState(!1);if(!a)return Yr(Oo,{children:"Configuration context should be provided"});if(!s)return Yr(Oo,{children:"React-router location context should be provided"});const l=T2({BASE_URL:a.baseUrl,TENANT:a.tenant,BASIC_AUTH:a.basicAuth,anonymousAuth:d},ar,!1);exports.authProviderGlobal=l,re.useEffect(()=>{async function T(){d&&(await exports.authProviderGlobal(),await A())}T()},[d]);const[g,f]=re.useState({...Ys,authProvider:l,deleteUser:x}),[v,y]=re.useState(t.successPath),m=re.useRef(v),[p,C]=re.useState({stage:"uninitialized",continueLogin:u,initSession:w});async function u(T,_){var R,P,I,N,U,j,H,q,O,D,k,L,z,Y,te,W;console.log("STAGE",T),console.log("params",_);let S=T,B="post";switch(T){case"uninitialized":console.log("GENERATING PKCE");const{code_verifier:J,code_challenge:ne}=va(jt.UriEncodedBase64);i.set("codeVerifier",J),S=`auth-init/${a==null?void 0:a.tenantAuthConfig}-${r}?&codeChallenge=${ne}`,B="get";break;case"index":S="email-start";break;case"ext-auth-register":S="register";break;case"merge-account":(R=t.onProcessing)==null||R.call(t);break;case"email-password-reset":B="get";break;case qe.APPLE:const ue=(P=(await w()).data.data)==null?void 0:P.strategies,fe=ue==null?void 0:ue.find(Z=>Z.name==="apple");if(!fe)throw new Error('Strategy "apple" not found server side');const he=Pr(32);if(await i.set("oauthState-apple",he),r==="ios"){const Z={clientId:fe.clientId,redirectURI:`${a==null?void 0:a.baseUrl}/user-service/auth/apple/callback/${a==null?void 0:a.tenantAuthConfig}-${r}`,scopes:"email",state:he};try{const V=await sb.authorize(Z);console.log("sign in with apple result",V),S=`auth/apple/callback?code=${V.response.authorizationCode}&id_token=${V.response.identityToken}`}catch(V){(I=t.onError)==null||I.call(t,V);return}B="get"}if(["android","web"].includes(r)){const Z="https://appleid.apple.com/auth/authorize",V=`${a==null?void 0:a.baseUrl}/user-service/auth/apple/callback/${a==null?void 0:a.tenantAuthConfig}-${r}`;_={scope:"email",response_type:"code id_token",response_mode:"form_post"};const Ae=Le.stringifyUrl({url:Z,query:{client_id:fe.clientId,redirect_uri:V,state:he,..._}});q2(Ae);return}break;case qe.GOOGLE:const Ee=(j=(U=(N=(await w()).data.data)==null?void 0:N.strategies)==null?void 0:U.find)==null?void 0:j.call(U,Z=>Z.name==="google");if(!Ee)throw new Error('Strategy "google" not found server side');if(r==="web"){const Z=Pr(32);await i.set("oauthState-google",Z);const V=Le.stringifyUrl({url:"https://accounts.google.com/o/oauth2/v2/auth",query:{client_id:Ee.clientId,redirect_uri:`${a==null?void 0:a.host}${t.authPath}/google-callback`,response_type:"code",state:Z,scope:"email",prompt:"consent"}});window.location.replace(V);return}(r==="ios"||r==="android")&&await ub.signIn().then(async Z=>{console.log("google user",JSON.stringify(Z,null,4)),S=`auth/google/callback?code=${Z.serverAuthCode}&id_token=${Z.authentication.idToken}`,B="get"}).catch(Z=>{var V;(V=t.onError)==null||V.call(t,Z),console.warn("google sign in error",JSON.stringify(Z,null,4))});break;case qe.FACEBOOK:if(r==="ios"){const Z=["email"],V=await cb.login({permissions:Z});if(V!=null&&V.accessToken)console.log(`Facebook access token is ${V.accessToken.token}`),S="auth/facebook/after-login",_={access_token:V.accessToken.token,user_id:V.accessToken.userId},B="POST";else{(H=t.onError)==null||H.call(t,new Error("Facebook login did not return accessToken"));return}}const Se=(D=(O=(q=(await w()).data.data)==null?void 0:q.strategies)==null?void 0:O.find)==null?void 0:D.call(O,Z=>Z.name==="facebook");if(!Se)throw new Error('Strategy "facebook" not found server side');const Te=Pr(32);await i.set("oauthState-facebook",Te);const Re=Le.stringifyUrl({url:"https://www.facebook.com/v14.0/dialog/oauth",query:{redirect_uri:`${a==null?void 0:a.host}${t.authPath}/facebook-callback`,client_id:Se.clientId,display:"popup",response_type:"code",scope:"email",stateFb:Te}});if(console.log(Re),r==="web"){window.location.replace(Re);return}window.open(Re,"_blank","popup=true");return}try{const J=await Or({method:B,url:`${a==null?void 0:a.baseUrl}/user-service/${S}`,headers:{accept:"application/json","content-type":"application/x-www-form-urlencoded","Accept-Language":n},data:Le.stringify(_),withCredentials:!0});console.log("RES",JSON.stringify(J,null,4));const{stage:ne,data:ie}=J.data;let ue=ne;switch(ne){case"error":ue="uninitialized";break;case"success":ue="uninitialized";break}if((T=="ext-auth-register"||T=="email-register-final")&&(ne==="success"||ne==="success-pkce")&&((k=t.onUserRegistered)==null||k.call(t)),C(fe=>({...fe,stage:ue,email:ie==null?void 0:ie.email,message:ie==null?void 0:ie.message,firstName:ie==null?void 0:ie.firstName,consents:ie==null?void 0:ie.consents})),[qe.APPLE,qe.FACEBOOK,qe.GOOGLE].includes(T)&&c.replace(t.loginPath),ie!=null&&ie.message&&((L=t.onError)==null||L.call(t,ie.message)),ne==="email-connect-verify"&&T==="email-connect-verify"&&((z=t.onError)==null||z.call(t,"Invalid code")),T==="email-register-init"&&((Y=t.onEmailSent)==null||Y.call(t)),ne==="error"&&((te=t.onError)==null||te.call(t,{})),ne==="success-pkce"){const{requestId:fe}=J.data;c.replace(`${t.authPath}?requestId=${fe}`)}ne==="success"&&(console.log("EMAIL LOGIN SUCCESS"),await ar.setRefreshToken(J.data.data.authData.TENANT,J.data.data.authData.refresh_token),await A())}catch(J){console.log(JSON.stringify(J,null,4)),(W=t.onError)==null||W.call(t,J)}}function h(T){console.log("--- sign out ---"),T||c.push("/"),C(_=>({..._,stage:"uninitialized"})),a&&O2(a.tenant,ar),f({loggedIn:!1,UUID:"",resolved:!0,authProvider:l,deleteUser:x}),o(!1)}async function x(){const{token:T}=await l();if(!a)throw new Error("Missing config context");return I2(a==null?void 0:a.baseUrl,T)}async function b(T){const{token:_}=await l();if(_&&a)try{const B={...await ma(a==null?void 0:a.baseUrl,_),...T},R=await P2(a==null?void 0:a.baseUrl,_,B);return R&&f(P=>({...P,userData:B})),R}catch(S){return console.error(S),!1}return!1}async function E(){const{code_verifier:T,code_challenge:_}=va(jt.UriEncodedBase64);return await i.set("codeVerifier",T),`${a==null?void 0:a.baseUrl}/user-service/auth-init/${a==null?void 0:a.tenantAuthConfig}-${r}?codeChallenge=${_}`}async function w(){var R;console.log("--INIT USER-SERVICE SESSION");const T=await E(),_=await Or.get(T,{withCredentials:!0,headers:{accept:"application/json","Accept-Language":n}}),S=(R=_.data.data)==null?void 0:R.strategies,B=_.data.stage;return C(P=>({...P,strategies:S,stage:B||"uninitialized"})),_}async function A(T){var S,B,R;console.log("GET USER DATA");const{isOnInit:_=!1}=T||{};try{const{UUID:P,token:I}=await l();if(I&&(a!=null&&a.baseUrl)){const{user_name:N}=B2(I),U=N==="anonymous";if(_&&U)return h(),!1;(S=t.onProcessing)==null||S.call(t,void 0,U);const j=await ma(a==null?void 0:a.baseUrl,I);return t.roles&&!H2(t.roles,j.roles)?(console.log("--- USER HAS NO REQUIRED ROLES ----- "),h(),!1):((B=t.onSuccess)==null||B.call(t,U),m.current&&(console.log("successPathRef.current",m.current),c.replace(m.current)),f({loggedIn:!0,isAnonymousUser:U,email:j.login,UUID:P,authProvider:l,signOut:h,resolved:!0,userData:j,updateUserData:b,deleteUser:x}),!0)}else return f(N=>({...N,resolved:!0})),!1}catch(P){return h(),(R=t.onError)==null||R.call(t,P),!1}}return re.useEffect(()=>{g.loggedIn?y(t.successPath):m.current=v},[v,g.loggedIn]),re.useEffect(()=>{console.log("STAGE",p.stage)},[p.stage]),re.useEffect(()=>{console.log("AUTH WRAPPER init",s.pathname),C(T=>({...T,stage:"uninitialized",continueLogin:u,initSession:w,resolved:!1})),A({isOnInit:!0}).then(T=>T?!0:i.get("onboarding_complete").then(_=>_==="true")).then(T=>{var _;T||e==null||e(!0),console.log("AUTH RESOLVED"),(_=t.onAuthResolved)==null||_.call(t)})},[]),re.useEffect(()=>{var S,B,R;if(console.log("AuthWrapper LOCATION PATHNAME",s.pathname),s.pathname===t.authPath){console.log("PKCE detected");const{search:P}=s,{query:{requestId:I,stage:N}}=Le.parseUrl(P);console.log("PKCE stage",N),(S=t.onProcessing)==null||S.call(t),i.get("codeVerifier").then(U=>{const j={requestId:I,codeVerifier:U},H=`${a.baseUrl}/user-service/get-token/${a.tenantAuthConfig}-${r}`;return Or.post(H,j)}).then(U=>{const{data:j}=U;return console.log("AXIOS RESPONSE DATA",j),R2(a.tenant,j,ar),A()}).catch(U=>{var j;console.error("PKCE ERROR",JSON.stringify(U)),c.replace("/"),(j=t.onError)==null||j.call(t,U),f({loggedIn:!1,UUID:"",resolved:!0,authProvider:l,deleteUser:x})})}const T=new RegExp("^"+t.authPath+/\/[a-z]+-callback\/?$/.source),_=s.pathname.match(T);if(_){(B=t.onProcessing)==null||B.call(t),console.log(_);const P=_[0].replace("-callback","").replace(t.authPath+"/","");console.log("PROVIDER",P);try{const{error:I}=Le.parse(s.search);console.log("SEARCH",s.search);const N=async()=>{var O;const U=`${a.baseUrl}/user-service/auth/${P}/callback${s.search}`,j=await Or.get(U,{withCredentials:!0,headers:{accept:"application/json","Accept-Language":n}});console.log("User-service social provider res",JSON.stringify(j,null,4));const{stage:H,requestId:q}=j.data;if(H==="success-pkce"){c.replace(`${t.authPath}?requestId=${q}`);return}if(["merge-accounts","ext-auth-register"].includes(H)){c.replace(`${t.loginPath}`),C(D=>({...D,stage:H,...j.data.data})),(O=t.onProcessing)==null||O.call(t,!1);return}throw new Error(`Login failure - unknown stage "${H}"`)};if(I)throw new Error(Array.isArray(I)?I.join("-"):I);N().catch(U=>{var j;console.error(U),(j=t.onError)==null||j.call(t,U)})}catch(I){console.error(JSON.stringify(I,null,4)),(R=t.onError)==null||R.call(t,I)}}if(!g.loggedIn&&s.pathname===t.tokenLoginPath){const{search:P}=s,{query:{refreshToken:I}}=Le.parseUrl(P);I&&ar.setRefreshToken(a.tenant,I).then(()=>{A()})}},[s.pathname]),Yr(Wa.Provider,{value:g,children:Yr(za.Provider,{value:{...p,setSuccessPath:y,setIsAnonymousUser:o},children:t.children})})}exports.AuthContext=Wa;exports.AuthProvider=M2;exports.CodeChallengeEncoding=jt;exports.ConfigContext=Vs;exports.LoginContext=za;exports.LoginProvider=qe;exports.LoginStage=Js;exports.WebPlugin=Na;exports.addDiscounts=es;exports.defaultAuth=Ys;exports.formatPrice=Dv;exports.generateCodeChallenge=Ua;exports.generateCodeVerifier=Pr;exports.generatePkceChallenge=va;exports.getGroupedBucketLines=ig;exports.getMediaUrl=Ts;exports.getProductAcronym=Bv;exports.getRandomValues=Ps;exports.groupOrderLines=Oa;exports.isChannelOpen=Rr;exports.isProductEnabled=rs;exports.secureStorage=Ds;exports.summarizeLineDiscounts=Iv;exports.tokenStorageHandler=ar;exports.useAuthContext=k2;exports.useAvailability=ts;exports.useCms=tn;exports.useCmsInConfigContext=$m;exports.useConfigContext=Xs;exports.useDisplayPrice=ng;exports.useGroupOrderLines=ag;exports.useInterval=Wt;exports.useKioskChannelsAvailability=Sm;exports.useKioskMediaCms=Cs;exports.useKioskMediaCmsWithContext=Am;exports.useLocalizedVenueMedia=wm;exports.useLoginContext=F2;exports.useMediaUrl=km;exports.useMenu=Lv;exports.useOnClickOutside=Cm;exports.useVenueCms=As;exports.verifyChallenge=Gy;
|
|
43
|
+
//# sourceMappingURL=index-61278580.js.map
|