@rainte/js 0.0.33 → 0.0.36

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.
@@ -1,8 +1,8 @@
1
- (function(De,ze){typeof exports=="object"&&typeof module<"u"?ze(exports):typeof define=="function"&&define.amd?define(["exports"],ze):(De=typeof globalThis<"u"?globalThis:De||self,ze(De["@rainte/js"]={}))})(this,function(De){"use strict";var Mu=Object.defineProperty;var Nu=(De,ze,Ze)=>ze in De?Mu(De,ze,{enumerable:!0,configurable:!0,writable:!0,value:Ze}):De[ze]=Ze;var oi=(De,ze,Ze)=>Nu(De,typeof ze!="symbol"?ze+"":ze,Ze);var ze=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ze(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ln={exports:{}},as=ln.exports,si;function us(){return si||(si=1,function(r,o){(function(u,a){r.exports=a()})(as,function(){var u=1e3,a=6e4,l=36e5,d="millisecond",h="second",x="minute",$="hour",C="day",D="week",M="month",ae="quarter",ue="year",N="date",j="Invalid Date",E=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,J=/\[([^\]]+)]|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,re={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Q){var H=["th","st","nd","rd"],I=Q%100;return"["+Q+(H[(I-20)%10]||H[I]||H[0])+"]"}},G=function(Q,H,I){var ee=String(Q);return!ee||ee.length>=H?Q:""+Array(H+1-ee.length).join(I)+Q},_e={s:G,z:function(Q){var H=-Q.utcOffset(),I=Math.abs(H),ee=Math.floor(I/60),L=I%60;return(H<=0?"+":"-")+G(ee,2,"0")+":"+G(L,2,"0")},m:function Q(H,I){if(H.date()<I.date())return-Q(I,H);var ee=12*(I.year()-H.year())+(I.month()-H.month()),L=H.clone().add(ee,M),oe=I-L<0,se=H.clone().add(ee+(oe?-1:1),M);return+(-(ee+(I-L)/(oe?L-se:se-L))||0)},a:function(Q){return Q<0?Math.ceil(Q)||0:Math.floor(Q)},p:function(Q){return{M,y:ue,w:D,d:C,D:N,h:$,m:x,s:h,ms:d,Q:ae}[Q]||String(Q||"").toLowerCase().replace(/s$/,"")},u:function(Q){return Q===void 0}},fe="en",te={};te[fe]=re;var U="$isDayjsObject",K=function(Q){return Q instanceof be||!(!Q||!Q[U])},ce=function Q(H,I,ee){var L;if(!H)return fe;if(typeof H=="string"){var oe=H.toLowerCase();te[oe]&&(L=oe),I&&(te[oe]=I,L=oe);var se=H.split("-");if(!L&&se.length>1)return Q(se[0])}else{var de=H.name;te[de]=H,L=de}return!ee&&L&&(fe=L),L||!ee&&fe},le=function(Q,H){if(K(Q))return Q.clone();var I=typeof H=="object"?H:{};return I.date=Q,I.args=arguments,new be(I)},ne=_e;ne.l=ce,ne.i=K,ne.w=function(Q,H){return le(Q,{locale:H.$L,utc:H.$u,x:H.$x,$offset:H.$offset})};var be=function(){function Q(I){this.$L=ce(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[U]=!0}var H=Q.prototype;return H.parse=function(I){this.$d=function(ee){var L=ee.date,oe=ee.utc;if(L===null)return new Date(NaN);if(ne.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var se=L.match(E);if(se){var de=se[2]-1||0,Ee=(se[7]||"0").substring(0,3);return oe?new Date(Date.UTC(se[1],de,se[3]||1,se[4]||0,se[5]||0,se[6]||0,Ee)):new Date(se[1],de,se[3]||1,se[4]||0,se[5]||0,se[6]||0,Ee)}}return new Date(L)}(I),this.init()},H.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()},H.$utils=function(){return ne},H.isValid=function(){return this.$d.toString()!==j},H.isSame=function(I,ee){var L=le(I);return this.startOf(ee)<=L&&L<=this.endOf(ee)},H.isAfter=function(I,ee){return le(I)<this.startOf(ee)},H.isBefore=function(I,ee){return this.endOf(ee)<le(I)},H.$g=function(I,ee,L){return ne.u(I)?this[ee]:this.set(L,I)},H.unix=function(){return Math.floor(this.valueOf()/1e3)},H.valueOf=function(){return this.$d.getTime()},H.startOf=function(I,ee){var L=this,oe=!!ne.u(ee)||ee,se=ne.p(I),de=function(Z,Ce){var Fe=ne.w(L.$u?Date.UTC(L.$y,Ce,Z):new Date(L.$y,Ce,Z),L);return oe?Fe:Fe.endOf(C)},Ee=function(Z,Ce){return ne.w(L.toDate()[Z].apply(L.toDate("s"),(oe?[0,0,0,0]:[23,59,59,999]).slice(Ce)),L)},Oe=this.$W,Ae=this.$M,je=this.$D,Le="set"+(this.$u?"UTC":"");switch(se){case ue:return oe?de(1,0):de(31,11);case M:return oe?de(1,Ae):de(0,Ae+1);case D:var We=this.$locale().weekStart||0,ot=(Oe<We?Oe+7:Oe)-We;return de(oe?je-ot:je+(6-ot),Ae);case C:case N:return Ee(Le+"Hours",0);case $:return Ee(Le+"Minutes",1);case x:return Ee(Le+"Seconds",2);case h:return Ee(Le+"Milliseconds",3);default:return this.clone()}},H.endOf=function(I){return this.startOf(I,!1)},H.$set=function(I,ee){var L,oe=ne.p(I),se="set"+(this.$u?"UTC":""),de=(L={},L[C]=se+"Date",L[N]=se+"Date",L[M]=se+"Month",L[ue]=se+"FullYear",L[$]=se+"Hours",L[x]=se+"Minutes",L[h]=se+"Seconds",L[d]=se+"Milliseconds",L)[oe],Ee=oe===C?this.$D+(ee-this.$W):ee;if(oe===M||oe===ue){var Oe=this.clone().set(N,1);Oe.$d[de](Ee),Oe.init(),this.$d=Oe.set(N,Math.min(this.$D,Oe.daysInMonth())).$d}else de&&this.$d[de](Ee);return this.init(),this},H.set=function(I,ee){return this.clone().$set(I,ee)},H.get=function(I){return this[ne.p(I)]()},H.add=function(I,ee){var L,oe=this;I=Number(I);var se=ne.p(ee),de=function(Ae){var je=le(oe);return ne.w(je.date(je.date()+Math.round(Ae*I)),oe)};if(se===M)return this.set(M,this.$M+I);if(se===ue)return this.set(ue,this.$y+I);if(se===C)return de(1);if(se===D)return de(7);var Ee=(L={},L[x]=a,L[$]=l,L[h]=u,L)[se]||1,Oe=this.$d.getTime()+I*Ee;return ne.w(Oe,this)},H.subtract=function(I,ee){return this.add(-1*I,ee)},H.format=function(I){var ee=this,L=this.$locale();if(!this.isValid())return L.invalidDate||j;var oe=I||"YYYY-MM-DDTHH:mm:ssZ",se=ne.z(this),de=this.$H,Ee=this.$m,Oe=this.$M,Ae=L.weekdays,je=L.months,Le=L.meridiem,We=function(Ce,Fe,ye,He){return Ce&&(Ce[Fe]||Ce(ee,oe))||ye[Fe].slice(0,He)},ot=function(Ce){return ne.s(de%12||12,Ce,"0")},Z=Le||function(Ce,Fe,ye){var He=Ce<12?"AM":"PM";return ye?He.toLowerCase():He};return oe.replace(J,function(Ce,Fe){return Fe||function(ye){switch(ye){case"YY":return String(ee.$y).slice(-2);case"YYYY":return ne.s(ee.$y,4,"0");case"M":return Oe+1;case"MM":return ne.s(Oe+1,2,"0");case"MMM":return We(L.monthsShort,Oe,je,3);case"MMMM":return We(je,Oe);case"D":return ee.$D;case"DD":return ne.s(ee.$D,2,"0");case"d":return String(ee.$W);case"dd":return We(L.weekdaysMin,ee.$W,Ae,2);case"ddd":return We(L.weekdaysShort,ee.$W,Ae,3);case"dddd":return Ae[ee.$W];case"H":return String(de);case"HH":return ne.s(de,2,"0");case"h":return ot(1);case"hh":return ot(2);case"a":return Z(de,Ee,!0);case"A":return Z(de,Ee,!1);case"m":return String(Ee);case"mm":return ne.s(Ee,2,"0");case"s":return String(ee.$s);case"ss":return ne.s(ee.$s,2,"0");case"SSS":return ne.s(ee.$ms,3,"0");case"Z":return se}return null}(Ce)||se.replace(":","")})},H.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},H.diff=function(I,ee,L){var oe,se=this,de=ne.p(ee),Ee=le(I),Oe=(Ee.utcOffset()-this.utcOffset())*a,Ae=this-Ee,je=function(){return ne.m(se,Ee)};switch(de){case ue:oe=je()/12;break;case M:oe=je();break;case ae:oe=je()/3;break;case D:oe=(Ae-Oe)/6048e5;break;case C:oe=(Ae-Oe)/864e5;break;case $:oe=Ae/l;break;case x:oe=Ae/a;break;case h:oe=Ae/u;break;default:oe=Ae}return L?oe:ne.a(oe)},H.daysInMonth=function(){return this.endOf(M).$D},H.$locale=function(){return te[this.$L]},H.locale=function(I,ee){if(!I)return this.$L;var L=this.clone(),oe=ce(I,ee,!0);return oe&&(L.$L=oe),L},H.clone=function(){return ne.w(this.$d,this)},H.toDate=function(){return new Date(this.valueOf())},H.toJSON=function(){return this.isValid()?this.toISOString():null},H.toISOString=function(){return this.$d.toISOString()},H.toString=function(){return this.$d.toUTCString()},Q}(),we=be.prototype;return le.prototype=we,[["$ms",d],["$s",h],["$m",x],["$H",$],["$W",C],["$M",M],["$y",ue],["$D",N]].forEach(function(Q){we[Q[1]]=function(H){return this.$g(H,Q[0],Q[1])}}),le.extend=function(Q,H){return Q.$i||(Q(H,be,le),Q.$i=!0),le},le.locale=ce,le.isDayjs=K,le.unix=function(Q){return le(1e3*Q)},le.en=te[fe],le.Ls=te,le.p={},le})}(ln)),ln.exports}var cs=us();const qt=Ze(cs);var fn={exports:{}},ls=fn.exports,ai;function fs(){return ai||(ai=1,function(r,o){(function(u,a){r.exports=a()})(ls,function(){var u={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},a=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,l=/\d/,d=/\d\d/,h=/\d\d?/,x=/\d*[^-_:/,()\s\d]+/,$={},C=function(E){return(E=+E)+(E>68?1900:2e3)},D=function(E){return function(J){this[E]=+J}},M=[/[+-]\d\d:?(\d\d)?|Z/,function(E){(this.zone||(this.zone={})).offset=function(J){if(!J||J==="Z")return 0;var re=J.match(/([+-]|\d\d)/g),G=60*re[1]+(+re[2]||0);return G===0?0:re[0]==="+"?-G:G}(E)}],ae=function(E){var J=$[E];return J&&(J.indexOf?J:J.s.concat(J.f))},ue=function(E,J){var re,G=$.meridiem;if(G){for(var _e=1;_e<=24;_e+=1)if(E.indexOf(G(_e,0,J))>-1){re=_e>12;break}}else re=E===(J?"pm":"PM");return re},N={A:[x,function(E){this.afternoon=ue(E,!1)}],a:[x,function(E){this.afternoon=ue(E,!0)}],Q:[l,function(E){this.month=3*(E-1)+1}],S:[l,function(E){this.milliseconds=100*+E}],SS:[d,function(E){this.milliseconds=10*+E}],SSS:[/\d{3}/,function(E){this.milliseconds=+E}],s:[h,D("seconds")],ss:[h,D("seconds")],m:[h,D("minutes")],mm:[h,D("minutes")],H:[h,D("hours")],h:[h,D("hours")],HH:[h,D("hours")],hh:[h,D("hours")],D:[h,D("day")],DD:[d,D("day")],Do:[x,function(E){var J=$.ordinal,re=E.match(/\d+/);if(this.day=re[0],J)for(var G=1;G<=31;G+=1)J(G).replace(/\[|\]/g,"")===E&&(this.day=G)}],w:[h,D("week")],ww:[d,D("week")],M:[h,D("month")],MM:[d,D("month")],MMM:[x,function(E){var J=ae("months"),re=(ae("monthsShort")||J.map(function(G){return G.slice(0,3)})).indexOf(E)+1;if(re<1)throw new Error;this.month=re%12||re}],MMMM:[x,function(E){var J=ae("months").indexOf(E)+1;if(J<1)throw new Error;this.month=J%12||J}],Y:[/[+-]?\d+/,D("year")],YY:[d,function(E){this.year=C(E)}],YYYY:[/\d{4}/,D("year")],Z:M,ZZ:M};function j(E){var J,re;J=E,re=$&&$.formats;for(var G=(E=J.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(le,ne,be){var we=be&&be.toUpperCase();return ne||re[be]||u[be]||re[we].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(Q,H,I){return H||I.slice(1)})})).match(a),_e=G.length,fe=0;fe<_e;fe+=1){var te=G[fe],U=N[te],K=U&&U[0],ce=U&&U[1];G[fe]=ce?{regex:K,parser:ce}:te.replace(/^\[|\]$/g,"")}return function(le){for(var ne={},be=0,we=0;be<_e;be+=1){var Q=G[be];if(typeof Q=="string")we+=Q.length;else{var H=Q.regex,I=Q.parser,ee=le.slice(we),L=H.exec(ee)[0];I.call(ne,L),le=le.replace(L,"")}}return function(oe){var se=oe.afternoon;if(se!==void 0){var de=oe.hours;se?de<12&&(oe.hours+=12):de===12&&(oe.hours=0),delete oe.afternoon}}(ne),ne}}return function(E,J,re){re.p.customParseFormat=!0,E&&E.parseTwoDigitYear&&(C=E.parseTwoDigitYear);var G=J.prototype,_e=G.parse;G.parse=function(fe){var te=fe.date,U=fe.utc,K=fe.args;this.$u=U;var ce=K[1];if(typeof ce=="string"){var le=K[2]===!0,ne=K[3]===!0,be=le||ne,we=K[2];ne&&(we=K[2]),$=this.$locale(),!le&&we&&($=re.Ls[we]),this.$d=function(ee,L,oe,se){try{if(["x","X"].indexOf(L)>-1)return new Date((L==="X"?1e3:1)*ee);var de=j(L)(ee),Ee=de.year,Oe=de.month,Ae=de.day,je=de.hours,Le=de.minutes,We=de.seconds,ot=de.milliseconds,Z=de.zone,Ce=de.week,Fe=new Date,ye=Ae||(Ee||Oe?1:Fe.getDate()),He=Ee||Fe.getFullYear(),$t=0;Ee&&!Oe||($t=Oe>0?Oe-1:Fe.getMonth());var Xe,zt=je||0,Vt=Le||0,Wt=We||0,Jt=ot||0;return Z?new Date(Date.UTC(He,$t,ye,zt,Vt,Wt,Jt+60*Z.offset*1e3)):oe?new Date(Date.UTC(He,$t,ye,zt,Vt,Wt,Jt)):(Xe=new Date(He,$t,ye,zt,Vt,Wt,Jt),Ce&&(Xe=se(Xe).week(Ce).toDate()),Xe)}catch{return new Date("")}}(te,ce,U,re),this.init(),we&&we!==!0&&(this.$L=this.locale(we).$L),be&&te!=this.format(ce)&&(this.$d=new Date("")),$={}}else if(ce instanceof Array)for(var Q=ce.length,H=1;H<=Q;H+=1){K[1]=ce[H-1];var I=re.apply(this,K);if(I.isValid()){this.$d=I.$d,this.$L=I.$L,this.init();break}H===Q&&(this.$d=new Date(""))}else _e.call(this,fe)}}})}(fn)),fn.exports}var ds=fs();const hs=Ze(ds);var dn={exports:{}},ps=dn.exports,ui;function ms(){return ui||(ui=1,function(r,o){(function(u,a){r.exports=a()})(ps,function(){var u,a,l=1e3,d=6e4,h=36e5,x=864e5,$=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C=31536e6,D=2628e6,M=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,ae={years:C,months:D,days:x,hours:h,minutes:d,seconds:l,milliseconds:1,weeks:6048e5},ue=function(te){return te instanceof _e},N=function(te,U,K){return new _e(te,K,U.$l)},j=function(te){return a.p(te)+"s"},E=function(te){return te<0},J=function(te){return E(te)?Math.ceil(te):Math.floor(te)},re=function(te){return Math.abs(te)},G=function(te,U){return te?E(te)?{negative:!0,format:""+re(te)+U}:{negative:!1,format:""+te+U}:{negative:!1,format:""}},_e=function(){function te(K,ce,le){var ne=this;if(this.$d={},this.$l=le,K===void 0&&(this.$ms=0,this.parseFromMilliseconds()),ce)return N(K*ae[j(ce)],this);if(typeof K=="number")return this.$ms=K,this.parseFromMilliseconds(),this;if(typeof K=="object")return Object.keys(K).forEach(function(Q){ne.$d[j(Q)]=K[Q]}),this.calMilliseconds(),this;if(typeof K=="string"){var be=K.match(M);if(be){var we=be.slice(2).map(function(Q){return Q!=null?Number(Q):0});return this.$d.years=we[0],this.$d.months=we[1],this.$d.weeks=we[2],this.$d.days=we[3],this.$d.hours=we[4],this.$d.minutes=we[5],this.$d.seconds=we[6],this.calMilliseconds(),this}}return this}var U=te.prototype;return U.calMilliseconds=function(){var K=this;this.$ms=Object.keys(this.$d).reduce(function(ce,le){return ce+(K.$d[le]||0)*ae[le]},0)},U.parseFromMilliseconds=function(){var K=this.$ms;this.$d.years=J(K/C),K%=C,this.$d.months=J(K/D),K%=D,this.$d.days=J(K/x),K%=x,this.$d.hours=J(K/h),K%=h,this.$d.minutes=J(K/d),K%=d,this.$d.seconds=J(K/l),K%=l,this.$d.milliseconds=K},U.toISOString=function(){var K=G(this.$d.years,"Y"),ce=G(this.$d.months,"M"),le=+this.$d.days||0;this.$d.weeks&&(le+=7*this.$d.weeks);var ne=G(le,"D"),be=G(this.$d.hours,"H"),we=G(this.$d.minutes,"M"),Q=this.$d.seconds||0;this.$d.milliseconds&&(Q+=this.$d.milliseconds/1e3,Q=Math.round(1e3*Q)/1e3);var H=G(Q,"S"),I=K.negative||ce.negative||ne.negative||be.negative||we.negative||H.negative,ee=be.format||we.format||H.format?"T":"",L=(I?"-":"")+"P"+K.format+ce.format+ne.format+ee+be.format+we.format+H.format;return L==="P"||L==="-P"?"P0D":L},U.toJSON=function(){return this.toISOString()},U.format=function(K){var ce=K||"YYYY-MM-DDTHH:mm:ss",le={Y:this.$d.years,YY:a.s(this.$d.years,2,"0"),YYYY:a.s(this.$d.years,4,"0"),M:this.$d.months,MM:a.s(this.$d.months,2,"0"),D:this.$d.days,DD:a.s(this.$d.days,2,"0"),H:this.$d.hours,HH:a.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:a.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:a.s(this.$d.seconds,2,"0"),SSS:a.s(this.$d.milliseconds,3,"0")};return ce.replace($,function(ne,be){return be||String(le[ne])})},U.as=function(K){return this.$ms/ae[j(K)]},U.get=function(K){var ce=this.$ms,le=j(K);return le==="milliseconds"?ce%=1e3:ce=le==="weeks"?J(ce/ae[le]):this.$d[le],ce||0},U.add=function(K,ce,le){var ne;return ne=ce?K*ae[j(ce)]:ue(K)?K.$ms:N(K,this).$ms,N(this.$ms+ne*(le?-1:1),this)},U.subtract=function(K,ce){return this.add(K,ce,!0)},U.locale=function(K){var ce=this.clone();return ce.$l=K,ce},U.clone=function(){return N(this.$ms,this)},U.humanize=function(K){return u().add(this.$ms,"ms").locale(this.$l).fromNow(!K)},U.valueOf=function(){return this.asMilliseconds()},U.milliseconds=function(){return this.get("milliseconds")},U.asMilliseconds=function(){return this.as("milliseconds")},U.seconds=function(){return this.get("seconds")},U.asSeconds=function(){return this.as("seconds")},U.minutes=function(){return this.get("minutes")},U.asMinutes=function(){return this.as("minutes")},U.hours=function(){return this.get("hours")},U.asHours=function(){return this.as("hours")},U.days=function(){return this.get("days")},U.asDays=function(){return this.as("days")},U.weeks=function(){return this.get("weeks")},U.asWeeks=function(){return this.as("weeks")},U.months=function(){return this.get("months")},U.asMonths=function(){return this.as("months")},U.years=function(){return this.get("years")},U.asYears=function(){return this.as("years")},te}(),fe=function(te,U,K){return te.add(U.years()*K,"y").add(U.months()*K,"M").add(U.days()*K,"d").add(U.hours()*K,"h").add(U.minutes()*K,"m").add(U.seconds()*K,"s").add(U.milliseconds()*K,"ms")};return function(te,U,K){u=K,a=K().$utils(),K.duration=function(ne,be){var we=K.locale();return N(ne,{$l:we},be)},K.isDuration=ue;var ce=U.prototype.add,le=U.prototype.subtract;U.prototype.add=function(ne,be){return ue(ne)?fe(this,ne,1):ce.bind(this)(ne,be)},U.prototype.subtract=function(ne,be){return ue(ne)?fe(this,ne,-1):le.bind(this)(ne,be)}}})}(dn)),dn.exports}var ys=ms();const vs=Ze(ys);var hn={exports:{}},gs=hn.exports,ci;function bs(){return ci||(ci=1,function(r,o){(function(u,a){r.exports=a()})(gs,function(){var u="minute",a=/[+-]\d\d(?::?\d\d)?/g,l=/([+-]|\d\d)/g;return function(d,h,x){var $=h.prototype;x.utc=function(j){var E={date:j,utc:!0,args:arguments};return new h(E)},$.utc=function(j){var E=x(this.toDate(),{locale:this.$L,utc:!0});return j?E.add(this.utcOffset(),u):E},$.local=function(){return x(this.toDate(),{locale:this.$L,utc:!1})};var C=$.parse;$.parse=function(j){j.utc&&(this.$u=!0),this.$utils().u(j.$offset)||(this.$offset=j.$offset),C.call(this,j)};var D=$.init;$.init=function(){if(this.$u){var j=this.$d;this.$y=j.getUTCFullYear(),this.$M=j.getUTCMonth(),this.$D=j.getUTCDate(),this.$W=j.getUTCDay(),this.$H=j.getUTCHours(),this.$m=j.getUTCMinutes(),this.$s=j.getUTCSeconds(),this.$ms=j.getUTCMilliseconds()}else D.call(this)};var M=$.utcOffset;$.utcOffset=function(j,E){var J=this.$utils().u;if(J(j))return this.$u?0:J(this.$offset)?M.call(this):this.$offset;if(typeof j=="string"&&(j=function(fe){fe===void 0&&(fe="");var te=fe.match(a);if(!te)return null;var U=(""+te[0]).match(l)||["-",0,0],K=U[0],ce=60*+U[1]+ +U[2];return ce===0?0:K==="+"?ce:-ce}(j),j===null))return this;var re=Math.abs(j)<=16?60*j:j,G=this;if(E)return G.$offset=re,G.$u=j===0,G;if(j!==0){var _e=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(G=this.local().add(re+_e,u)).$offset=re,G.$x.$localOffset=_e}else G=this.utc();return G};var ae=$.format;$.format=function(j){var E=j||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return ae.call(this,E)},$.valueOf=function(){var j=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*j},$.isUTC=function(){return!!this.$u},$.toISOString=function(){return this.toDate().toISOString()},$.toString=function(){return this.toDate().toUTCString()};var ue=$.toDate;$.toDate=function(j){return j==="s"&&this.$offset?x(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():ue.call(this)};var N=$.diff;$.diff=function(j,E,J){if(j&&this.$u===j.$u)return N.call(this,j,E,J);var re=this.local(),G=x(j).local();return N.call(re,G,E,J)}}})}(hn)),hn.exports}var ws=bs();const _s=Ze(ws);qt.extend(hs),qt.extend(vs),qt.extend(_s);const li={DATETIME:"YYYY-MM-DD HH:mm:ss",DATE:"YYYY-MM-DD",TIME:"HH:mm:ss",YEAR:"YYYY",MONTH:"YYYY-MM",HOUR:"YYYY-MM-DD HH",MINUTE:"YYYY-MM-DD HH:mm"},xs=Object.freeze(Object.defineProperty({__proto__:null,FORMAT:li,dayjs:qt,default:{dayjs:qt,FORMAT:li}},Symbol.toStringTag,{value:"Module"}));var pn={exports:{}},Ss=pn.exports,fi;function Os(){return fi||(fi=1,function(r,o){(function(u,a){r.exports=a()})(Ss,function(){var u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])})(e,t)},a=function(){return(a=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};function l(e,t,n){for(var i,s=0,c=t.length;s<c;s++)!i&&s in t||((i=i||Array.prototype.slice.call(t,0,s))[s]=t[s]);return e.concat(i||Array.prototype.slice.call(t))}var d=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:ze,h=Object.keys,x=Array.isArray;function $(e,t){return typeof t!="object"||h(t).forEach(function(n){e[n]=t[n]}),e}typeof Promise>"u"||d.Promise||(d.Promise=Promise);var C=Object.getPrototypeOf,D={}.hasOwnProperty;function M(e,t){return D.call(e,t)}function ae(e,t){typeof t=="function"&&(t=t(C(e))),(typeof Reflect>"u"?h:Reflect.ownKeys)(t).forEach(function(n){N(e,n,t[n])})}var ue=Object.defineProperty;function N(e,t,n,i){ue(e,t,$(n&&M(n,"get")&&typeof n.get=="function"?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},i))}function j(e){return{from:function(t){return e.prototype=Object.create(t.prototype),N(e.prototype,"constructor",e),{extend:ae.bind(null,e.prototype)}}}}var E=Object.getOwnPropertyDescriptor,J=[].slice;function re(e,t,n){return J.call(e,t,n)}function G(e,t){return t(e)}function _e(e){if(!e)throw new Error("Assertion Failed")}function fe(e){d.setImmediate?setImmediate(e):setTimeout(e,0)}function te(e,t){if(typeof t=="string"&&M(e,t))return e[t];if(!t)return e;if(typeof t!="string"){for(var n=[],i=0,s=t.length;i<s;++i){var c=te(e,t[i]);n.push(c)}return n}var f=t.indexOf(".");if(f!==-1){var p=e[t.substr(0,f)];return p==null?void 0:te(p,t.substr(f+1))}}function U(e,t,n){if(e&&t!==void 0&&!("isFrozen"in Object&&Object.isFrozen(e)))if(typeof t!="string"&&"length"in t){_e(typeof n!="string"&&"length"in n);for(var i=0,s=t.length;i<s;++i)U(e,t[i],n[i])}else{var c,f,p=t.indexOf(".");p!==-1?(c=t.substr(0,p),(f=t.substr(p+1))===""?n===void 0?x(e)&&!isNaN(parseInt(c))?e.splice(c,1):delete e[c]:e[c]=n:U(p=!(p=e[c])||!M(e,c)?e[c]={}:p,f,n)):n===void 0?x(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function K(e){var t,n={};for(t in e)M(e,t)&&(n[t]=e[t]);return n}var ce=[].concat;function le(e){return ce.apply([],e)}var gt="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(le([8,16,32,64].map(function(e){return["Int","Uint","Float"].map(function(t){return t+e+"Array"})}))).filter(function(e){return d[e]}),ne=new Set(gt.map(function(e){return d[e]})),be=null;function we(e){return be=new WeakMap,e=function t(n){if(!n||typeof n!="object")return n;var i=be.get(n);if(i)return i;if(x(n)){i=[],be.set(n,i);for(var s=0,c=n.length;s<c;++s)i.push(t(n[s]))}else if(ne.has(n.constructor))i=n;else{var f,p=C(n);for(f in i=p===Object.prototype?{}:Object.create(p),be.set(n,i),n)M(n,f)&&(i[f]=t(n[f]))}return i}(e),be=null,e}var Q={}.toString;function H(e){return Q.call(e).slice(8,-1)}var I=typeof Symbol<"u"?Symbol.iterator:"@@iterator",ee=typeof I=="symbol"?function(e){var t;return e!=null&&(t=e[I])&&t.apply(e)}:function(){return null};function L(e,t){return t=e.indexOf(t),0<=t&&e.splice(t,1),0<=t}var oe={};function se(e){var t,n,i,s;if(arguments.length===1){if(x(e))return e.slice();if(this===oe&&typeof e=="string")return[e];if(s=ee(e)){for(n=[];!(i=s.next()).done;)n.push(i.value);return n}if(e==null)return[e];if(typeof(t=e.length)!="number")return[e];for(n=new Array(t);t--;)n[t]=e[t];return n}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}var de=typeof Symbol<"u"?function(e){return e[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},Xt=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Qe=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Xt),Ee={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Oe(e,t){this.name=e,this.message=t}function Ae(e,t){return e+". Errors: "+Object.keys(t).map(function(n){return t[n].toString()}).filter(function(n,i,s){return s.indexOf(n)===i}).join(`
1
+ (function(De,ze){typeof exports=="object"&&typeof module<"u"?ze(exports):typeof define=="function"&&define.amd?define(["exports"],ze):(De=typeof globalThis<"u"?globalThis:De||self,ze(De["@rainte/js"]={}))})(this,function(De){"use strict";var Nu=Object.defineProperty;var Fu=(De,ze,Ze)=>ze in De?Nu(De,ze,{enumerable:!0,configurable:!0,writable:!0,value:Ze}):De[ze]=Ze;var oi=(De,ze,Ze)=>Fu(De,typeof ze!="symbol"?ze+"":ze,Ze);var ze=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ze(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var ln={exports:{}},us=ln.exports,si;function cs(){return si||(si=1,function(r,o){(function(u,a){r.exports=a()})(us,function(){var u=1e3,a=6e4,l=36e5,d="millisecond",h="second",x="minute",$="hour",C="day",D="week",M="month",ae="quarter",ue="year",N="date",j="Invalid Date",E=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,J=/\[([^\]]+)]|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,re={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Q){var H=["th","st","nd","rd"],I=Q%100;return"["+Q+(H[(I-20)%10]||H[I]||H[0])+"]"}},G=function(Q,H,I){var ee=String(Q);return!ee||ee.length>=H?Q:""+Array(H+1-ee.length).join(I)+Q},_e={s:G,z:function(Q){var H=-Q.utcOffset(),I=Math.abs(H),ee=Math.floor(I/60),L=I%60;return(H<=0?"+":"-")+G(ee,2,"0")+":"+G(L,2,"0")},m:function Q(H,I){if(H.date()<I.date())return-Q(I,H);var ee=12*(I.year()-H.year())+(I.month()-H.month()),L=H.clone().add(ee,M),oe=I-L<0,se=H.clone().add(ee+(oe?-1:1),M);return+(-(ee+(I-L)/(oe?L-se:se-L))||0)},a:function(Q){return Q<0?Math.ceil(Q)||0:Math.floor(Q)},p:function(Q){return{M,y:ue,w:D,d:C,D:N,h:$,m:x,s:h,ms:d,Q:ae}[Q]||String(Q||"").toLowerCase().replace(/s$/,"")},u:function(Q){return Q===void 0}},fe="en",te={};te[fe]=re;var U="$isDayjsObject",K=function(Q){return Q instanceof be||!(!Q||!Q[U])},ce=function Q(H,I,ee){var L;if(!H)return fe;if(typeof H=="string"){var oe=H.toLowerCase();te[oe]&&(L=oe),I&&(te[oe]=I,L=oe);var se=H.split("-");if(!L&&se.length>1)return Q(se[0])}else{var de=H.name;te[de]=H,L=de}return!ee&&L&&(fe=L),L||!ee&&fe},le=function(Q,H){if(K(Q))return Q.clone();var I=typeof H=="object"?H:{};return I.date=Q,I.args=arguments,new be(I)},ne=_e;ne.l=ce,ne.i=K,ne.w=function(Q,H){return le(Q,{locale:H.$L,utc:H.$u,x:H.$x,$offset:H.$offset})};var be=function(){function Q(I){this.$L=ce(I.locale,null,!0),this.parse(I),this.$x=this.$x||I.x||{},this[U]=!0}var H=Q.prototype;return H.parse=function(I){this.$d=function(ee){var L=ee.date,oe=ee.utc;if(L===null)return new Date(NaN);if(ne.u(L))return new Date;if(L instanceof Date)return new Date(L);if(typeof L=="string"&&!/Z$/i.test(L)){var se=L.match(E);if(se){var de=se[2]-1||0,Ee=(se[7]||"0").substring(0,3);return oe?new Date(Date.UTC(se[1],de,se[3]||1,se[4]||0,se[5]||0,se[6]||0,Ee)):new Date(se[1],de,se[3]||1,se[4]||0,se[5]||0,se[6]||0,Ee)}}return new Date(L)}(I),this.init()},H.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()},H.$utils=function(){return ne},H.isValid=function(){return this.$d.toString()!==j},H.isSame=function(I,ee){var L=le(I);return this.startOf(ee)<=L&&L<=this.endOf(ee)},H.isAfter=function(I,ee){return le(I)<this.startOf(ee)},H.isBefore=function(I,ee){return this.endOf(ee)<le(I)},H.$g=function(I,ee,L){return ne.u(I)?this[ee]:this.set(L,I)},H.unix=function(){return Math.floor(this.valueOf()/1e3)},H.valueOf=function(){return this.$d.getTime()},H.startOf=function(I,ee){var L=this,oe=!!ne.u(ee)||ee,se=ne.p(I),de=function(Z,Ce){var Fe=ne.w(L.$u?Date.UTC(L.$y,Ce,Z):new Date(L.$y,Ce,Z),L);return oe?Fe:Fe.endOf(C)},Ee=function(Z,Ce){return ne.w(L.toDate()[Z].apply(L.toDate("s"),(oe?[0,0,0,0]:[23,59,59,999]).slice(Ce)),L)},Oe=this.$W,Ae=this.$M,je=this.$D,Le="set"+(this.$u?"UTC":"");switch(se){case ue:return oe?de(1,0):de(31,11);case M:return oe?de(1,Ae):de(0,Ae+1);case D:var We=this.$locale().weekStart||0,ot=(Oe<We?Oe+7:Oe)-We;return de(oe?je-ot:je+(6-ot),Ae);case C:case N:return Ee(Le+"Hours",0);case $:return Ee(Le+"Minutes",1);case x:return Ee(Le+"Seconds",2);case h:return Ee(Le+"Milliseconds",3);default:return this.clone()}},H.endOf=function(I){return this.startOf(I,!1)},H.$set=function(I,ee){var L,oe=ne.p(I),se="set"+(this.$u?"UTC":""),de=(L={},L[C]=se+"Date",L[N]=se+"Date",L[M]=se+"Month",L[ue]=se+"FullYear",L[$]=se+"Hours",L[x]=se+"Minutes",L[h]=se+"Seconds",L[d]=se+"Milliseconds",L)[oe],Ee=oe===C?this.$D+(ee-this.$W):ee;if(oe===M||oe===ue){var Oe=this.clone().set(N,1);Oe.$d[de](Ee),Oe.init(),this.$d=Oe.set(N,Math.min(this.$D,Oe.daysInMonth())).$d}else de&&this.$d[de](Ee);return this.init(),this},H.set=function(I,ee){return this.clone().$set(I,ee)},H.get=function(I){return this[ne.p(I)]()},H.add=function(I,ee){var L,oe=this;I=Number(I);var se=ne.p(ee),de=function(Ae){var je=le(oe);return ne.w(je.date(je.date()+Math.round(Ae*I)),oe)};if(se===M)return this.set(M,this.$M+I);if(se===ue)return this.set(ue,this.$y+I);if(se===C)return de(1);if(se===D)return de(7);var Ee=(L={},L[x]=a,L[$]=l,L[h]=u,L)[se]||1,Oe=this.$d.getTime()+I*Ee;return ne.w(Oe,this)},H.subtract=function(I,ee){return this.add(-1*I,ee)},H.format=function(I){var ee=this,L=this.$locale();if(!this.isValid())return L.invalidDate||j;var oe=I||"YYYY-MM-DDTHH:mm:ssZ",se=ne.z(this),de=this.$H,Ee=this.$m,Oe=this.$M,Ae=L.weekdays,je=L.months,Le=L.meridiem,We=function(Ce,Fe,ye,He){return Ce&&(Ce[Fe]||Ce(ee,oe))||ye[Fe].slice(0,He)},ot=function(Ce){return ne.s(de%12||12,Ce,"0")},Z=Le||function(Ce,Fe,ye){var He=Ce<12?"AM":"PM";return ye?He.toLowerCase():He};return oe.replace(J,function(Ce,Fe){return Fe||function(ye){switch(ye){case"YY":return String(ee.$y).slice(-2);case"YYYY":return ne.s(ee.$y,4,"0");case"M":return Oe+1;case"MM":return ne.s(Oe+1,2,"0");case"MMM":return We(L.monthsShort,Oe,je,3);case"MMMM":return We(je,Oe);case"D":return ee.$D;case"DD":return ne.s(ee.$D,2,"0");case"d":return String(ee.$W);case"dd":return We(L.weekdaysMin,ee.$W,Ae,2);case"ddd":return We(L.weekdaysShort,ee.$W,Ae,3);case"dddd":return Ae[ee.$W];case"H":return String(de);case"HH":return ne.s(de,2,"0");case"h":return ot(1);case"hh":return ot(2);case"a":return Z(de,Ee,!0);case"A":return Z(de,Ee,!1);case"m":return String(Ee);case"mm":return ne.s(Ee,2,"0");case"s":return String(ee.$s);case"ss":return ne.s(ee.$s,2,"0");case"SSS":return ne.s(ee.$ms,3,"0");case"Z":return se}return null}(Ce)||se.replace(":","")})},H.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},H.diff=function(I,ee,L){var oe,se=this,de=ne.p(ee),Ee=le(I),Oe=(Ee.utcOffset()-this.utcOffset())*a,Ae=this-Ee,je=function(){return ne.m(se,Ee)};switch(de){case ue:oe=je()/12;break;case M:oe=je();break;case ae:oe=je()/3;break;case D:oe=(Ae-Oe)/6048e5;break;case C:oe=(Ae-Oe)/864e5;break;case $:oe=Ae/l;break;case x:oe=Ae/a;break;case h:oe=Ae/u;break;default:oe=Ae}return L?oe:ne.a(oe)},H.daysInMonth=function(){return this.endOf(M).$D},H.$locale=function(){return te[this.$L]},H.locale=function(I,ee){if(!I)return this.$L;var L=this.clone(),oe=ce(I,ee,!0);return oe&&(L.$L=oe),L},H.clone=function(){return ne.w(this.$d,this)},H.toDate=function(){return new Date(this.valueOf())},H.toJSON=function(){return this.isValid()?this.toISOString():null},H.toISOString=function(){return this.$d.toISOString()},H.toString=function(){return this.$d.toUTCString()},Q}(),we=be.prototype;return le.prototype=we,[["$ms",d],["$s",h],["$m",x],["$H",$],["$W",C],["$M",M],["$y",ue],["$D",N]].forEach(function(Q){we[Q[1]]=function(H){return this.$g(H,Q[0],Q[1])}}),le.extend=function(Q,H){return Q.$i||(Q(H,be,le),Q.$i=!0),le},le.locale=ce,le.isDayjs=K,le.unix=function(Q){return le(1e3*Q)},le.en=te[fe],le.Ls=te,le.p={},le})}(ln)),ln.exports}var ls=cs();const qt=Ze(ls);var fn={exports:{}},fs=fn.exports,ai;function ds(){return ai||(ai=1,function(r,o){(function(u,a){r.exports=a()})(fs,function(){var u={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},a=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,l=/\d/,d=/\d\d/,h=/\d\d?/,x=/\d*[^-_:/,()\s\d]+/,$={},C=function(E){return(E=+E)+(E>68?1900:2e3)},D=function(E){return function(J){this[E]=+J}},M=[/[+-]\d\d:?(\d\d)?|Z/,function(E){(this.zone||(this.zone={})).offset=function(J){if(!J||J==="Z")return 0;var re=J.match(/([+-]|\d\d)/g),G=60*re[1]+(+re[2]||0);return G===0?0:re[0]==="+"?-G:G}(E)}],ae=function(E){var J=$[E];return J&&(J.indexOf?J:J.s.concat(J.f))},ue=function(E,J){var re,G=$.meridiem;if(G){for(var _e=1;_e<=24;_e+=1)if(E.indexOf(G(_e,0,J))>-1){re=_e>12;break}}else re=E===(J?"pm":"PM");return re},N={A:[x,function(E){this.afternoon=ue(E,!1)}],a:[x,function(E){this.afternoon=ue(E,!0)}],Q:[l,function(E){this.month=3*(E-1)+1}],S:[l,function(E){this.milliseconds=100*+E}],SS:[d,function(E){this.milliseconds=10*+E}],SSS:[/\d{3}/,function(E){this.milliseconds=+E}],s:[h,D("seconds")],ss:[h,D("seconds")],m:[h,D("minutes")],mm:[h,D("minutes")],H:[h,D("hours")],h:[h,D("hours")],HH:[h,D("hours")],hh:[h,D("hours")],D:[h,D("day")],DD:[d,D("day")],Do:[x,function(E){var J=$.ordinal,re=E.match(/\d+/);if(this.day=re[0],J)for(var G=1;G<=31;G+=1)J(G).replace(/\[|\]/g,"")===E&&(this.day=G)}],w:[h,D("week")],ww:[d,D("week")],M:[h,D("month")],MM:[d,D("month")],MMM:[x,function(E){var J=ae("months"),re=(ae("monthsShort")||J.map(function(G){return G.slice(0,3)})).indexOf(E)+1;if(re<1)throw new Error;this.month=re%12||re}],MMMM:[x,function(E){var J=ae("months").indexOf(E)+1;if(J<1)throw new Error;this.month=J%12||J}],Y:[/[+-]?\d+/,D("year")],YY:[d,function(E){this.year=C(E)}],YYYY:[/\d{4}/,D("year")],Z:M,ZZ:M};function j(E){var J,re;J=E,re=$&&$.formats;for(var G=(E=J.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(le,ne,be){var we=be&&be.toUpperCase();return ne||re[be]||u[be]||re[we].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(Q,H,I){return H||I.slice(1)})})).match(a),_e=G.length,fe=0;fe<_e;fe+=1){var te=G[fe],U=N[te],K=U&&U[0],ce=U&&U[1];G[fe]=ce?{regex:K,parser:ce}:te.replace(/^\[|\]$/g,"")}return function(le){for(var ne={},be=0,we=0;be<_e;be+=1){var Q=G[be];if(typeof Q=="string")we+=Q.length;else{var H=Q.regex,I=Q.parser,ee=le.slice(we),L=H.exec(ee)[0];I.call(ne,L),le=le.replace(L,"")}}return function(oe){var se=oe.afternoon;if(se!==void 0){var de=oe.hours;se?de<12&&(oe.hours+=12):de===12&&(oe.hours=0),delete oe.afternoon}}(ne),ne}}return function(E,J,re){re.p.customParseFormat=!0,E&&E.parseTwoDigitYear&&(C=E.parseTwoDigitYear);var G=J.prototype,_e=G.parse;G.parse=function(fe){var te=fe.date,U=fe.utc,K=fe.args;this.$u=U;var ce=K[1];if(typeof ce=="string"){var le=K[2]===!0,ne=K[3]===!0,be=le||ne,we=K[2];ne&&(we=K[2]),$=this.$locale(),!le&&we&&($=re.Ls[we]),this.$d=function(ee,L,oe,se){try{if(["x","X"].indexOf(L)>-1)return new Date((L==="X"?1e3:1)*ee);var de=j(L)(ee),Ee=de.year,Oe=de.month,Ae=de.day,je=de.hours,Le=de.minutes,We=de.seconds,ot=de.milliseconds,Z=de.zone,Ce=de.week,Fe=new Date,ye=Ae||(Ee||Oe?1:Fe.getDate()),He=Ee||Fe.getFullYear(),$t=0;Ee&&!Oe||($t=Oe>0?Oe-1:Fe.getMonth());var Xe,zt=je||0,Vt=Le||0,Wt=We||0,Jt=ot||0;return Z?new Date(Date.UTC(He,$t,ye,zt,Vt,Wt,Jt+60*Z.offset*1e3)):oe?new Date(Date.UTC(He,$t,ye,zt,Vt,Wt,Jt)):(Xe=new Date(He,$t,ye,zt,Vt,Wt,Jt),Ce&&(Xe=se(Xe).week(Ce).toDate()),Xe)}catch{return new Date("")}}(te,ce,U,re),this.init(),we&&we!==!0&&(this.$L=this.locale(we).$L),be&&te!=this.format(ce)&&(this.$d=new Date("")),$={}}else if(ce instanceof Array)for(var Q=ce.length,H=1;H<=Q;H+=1){K[1]=ce[H-1];var I=re.apply(this,K);if(I.isValid()){this.$d=I.$d,this.$L=I.$L,this.init();break}H===Q&&(this.$d=new Date(""))}else _e.call(this,fe)}}})}(fn)),fn.exports}var hs=ds();const ps=Ze(hs);var dn={exports:{}},ms=dn.exports,ui;function ys(){return ui||(ui=1,function(r,o){(function(u,a){r.exports=a()})(ms,function(){var u,a,l=1e3,d=6e4,h=36e5,x=864e5,$=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,C=31536e6,D=2628e6,M=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,ae={years:C,months:D,days:x,hours:h,minutes:d,seconds:l,milliseconds:1,weeks:6048e5},ue=function(te){return te instanceof _e},N=function(te,U,K){return new _e(te,K,U.$l)},j=function(te){return a.p(te)+"s"},E=function(te){return te<0},J=function(te){return E(te)?Math.ceil(te):Math.floor(te)},re=function(te){return Math.abs(te)},G=function(te,U){return te?E(te)?{negative:!0,format:""+re(te)+U}:{negative:!1,format:""+te+U}:{negative:!1,format:""}},_e=function(){function te(K,ce,le){var ne=this;if(this.$d={},this.$l=le,K===void 0&&(this.$ms=0,this.parseFromMilliseconds()),ce)return N(K*ae[j(ce)],this);if(typeof K=="number")return this.$ms=K,this.parseFromMilliseconds(),this;if(typeof K=="object")return Object.keys(K).forEach(function(Q){ne.$d[j(Q)]=K[Q]}),this.calMilliseconds(),this;if(typeof K=="string"){var be=K.match(M);if(be){var we=be.slice(2).map(function(Q){return Q!=null?Number(Q):0});return this.$d.years=we[0],this.$d.months=we[1],this.$d.weeks=we[2],this.$d.days=we[3],this.$d.hours=we[4],this.$d.minutes=we[5],this.$d.seconds=we[6],this.calMilliseconds(),this}}return this}var U=te.prototype;return U.calMilliseconds=function(){var K=this;this.$ms=Object.keys(this.$d).reduce(function(ce,le){return ce+(K.$d[le]||0)*ae[le]},0)},U.parseFromMilliseconds=function(){var K=this.$ms;this.$d.years=J(K/C),K%=C,this.$d.months=J(K/D),K%=D,this.$d.days=J(K/x),K%=x,this.$d.hours=J(K/h),K%=h,this.$d.minutes=J(K/d),K%=d,this.$d.seconds=J(K/l),K%=l,this.$d.milliseconds=K},U.toISOString=function(){var K=G(this.$d.years,"Y"),ce=G(this.$d.months,"M"),le=+this.$d.days||0;this.$d.weeks&&(le+=7*this.$d.weeks);var ne=G(le,"D"),be=G(this.$d.hours,"H"),we=G(this.$d.minutes,"M"),Q=this.$d.seconds||0;this.$d.milliseconds&&(Q+=this.$d.milliseconds/1e3,Q=Math.round(1e3*Q)/1e3);var H=G(Q,"S"),I=K.negative||ce.negative||ne.negative||be.negative||we.negative||H.negative,ee=be.format||we.format||H.format?"T":"",L=(I?"-":"")+"P"+K.format+ce.format+ne.format+ee+be.format+we.format+H.format;return L==="P"||L==="-P"?"P0D":L},U.toJSON=function(){return this.toISOString()},U.format=function(K){var ce=K||"YYYY-MM-DDTHH:mm:ss",le={Y:this.$d.years,YY:a.s(this.$d.years,2,"0"),YYYY:a.s(this.$d.years,4,"0"),M:this.$d.months,MM:a.s(this.$d.months,2,"0"),D:this.$d.days,DD:a.s(this.$d.days,2,"0"),H:this.$d.hours,HH:a.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:a.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:a.s(this.$d.seconds,2,"0"),SSS:a.s(this.$d.milliseconds,3,"0")};return ce.replace($,function(ne,be){return be||String(le[ne])})},U.as=function(K){return this.$ms/ae[j(K)]},U.get=function(K){var ce=this.$ms,le=j(K);return le==="milliseconds"?ce%=1e3:ce=le==="weeks"?J(ce/ae[le]):this.$d[le],ce||0},U.add=function(K,ce,le){var ne;return ne=ce?K*ae[j(ce)]:ue(K)?K.$ms:N(K,this).$ms,N(this.$ms+ne*(le?-1:1),this)},U.subtract=function(K,ce){return this.add(K,ce,!0)},U.locale=function(K){var ce=this.clone();return ce.$l=K,ce},U.clone=function(){return N(this.$ms,this)},U.humanize=function(K){return u().add(this.$ms,"ms").locale(this.$l).fromNow(!K)},U.valueOf=function(){return this.asMilliseconds()},U.milliseconds=function(){return this.get("milliseconds")},U.asMilliseconds=function(){return this.as("milliseconds")},U.seconds=function(){return this.get("seconds")},U.asSeconds=function(){return this.as("seconds")},U.minutes=function(){return this.get("minutes")},U.asMinutes=function(){return this.as("minutes")},U.hours=function(){return this.get("hours")},U.asHours=function(){return this.as("hours")},U.days=function(){return this.get("days")},U.asDays=function(){return this.as("days")},U.weeks=function(){return this.get("weeks")},U.asWeeks=function(){return this.as("weeks")},U.months=function(){return this.get("months")},U.asMonths=function(){return this.as("months")},U.years=function(){return this.get("years")},U.asYears=function(){return this.as("years")},te}(),fe=function(te,U,K){return te.add(U.years()*K,"y").add(U.months()*K,"M").add(U.days()*K,"d").add(U.hours()*K,"h").add(U.minutes()*K,"m").add(U.seconds()*K,"s").add(U.milliseconds()*K,"ms")};return function(te,U,K){u=K,a=K().$utils(),K.duration=function(ne,be){var we=K.locale();return N(ne,{$l:we},be)},K.isDuration=ue;var ce=U.prototype.add,le=U.prototype.subtract;U.prototype.add=function(ne,be){return ue(ne)?fe(this,ne,1):ce.bind(this)(ne,be)},U.prototype.subtract=function(ne,be){return ue(ne)?fe(this,ne,-1):le.bind(this)(ne,be)}}})}(dn)),dn.exports}var vs=ys();const gs=Ze(vs);var hn={exports:{}},bs=hn.exports,ci;function ws(){return ci||(ci=1,function(r,o){(function(u,a){r.exports=a()})(bs,function(){var u="minute",a=/[+-]\d\d(?::?\d\d)?/g,l=/([+-]|\d\d)/g;return function(d,h,x){var $=h.prototype;x.utc=function(j){var E={date:j,utc:!0,args:arguments};return new h(E)},$.utc=function(j){var E=x(this.toDate(),{locale:this.$L,utc:!0});return j?E.add(this.utcOffset(),u):E},$.local=function(){return x(this.toDate(),{locale:this.$L,utc:!1})};var C=$.parse;$.parse=function(j){j.utc&&(this.$u=!0),this.$utils().u(j.$offset)||(this.$offset=j.$offset),C.call(this,j)};var D=$.init;$.init=function(){if(this.$u){var j=this.$d;this.$y=j.getUTCFullYear(),this.$M=j.getUTCMonth(),this.$D=j.getUTCDate(),this.$W=j.getUTCDay(),this.$H=j.getUTCHours(),this.$m=j.getUTCMinutes(),this.$s=j.getUTCSeconds(),this.$ms=j.getUTCMilliseconds()}else D.call(this)};var M=$.utcOffset;$.utcOffset=function(j,E){var J=this.$utils().u;if(J(j))return this.$u?0:J(this.$offset)?M.call(this):this.$offset;if(typeof j=="string"&&(j=function(fe){fe===void 0&&(fe="");var te=fe.match(a);if(!te)return null;var U=(""+te[0]).match(l)||["-",0,0],K=U[0],ce=60*+U[1]+ +U[2];return ce===0?0:K==="+"?ce:-ce}(j),j===null))return this;var re=Math.abs(j)<=16?60*j:j,G=this;if(E)return G.$offset=re,G.$u=j===0,G;if(j!==0){var _e=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(G=this.local().add(re+_e,u)).$offset=re,G.$x.$localOffset=_e}else G=this.utc();return G};var ae=$.format;$.format=function(j){var E=j||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return ae.call(this,E)},$.valueOf=function(){var j=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*j},$.isUTC=function(){return!!this.$u},$.toISOString=function(){return this.toDate().toISOString()},$.toString=function(){return this.toDate().toUTCString()};var ue=$.toDate;$.toDate=function(j){return j==="s"&&this.$offset?x(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():ue.call(this)};var N=$.diff;$.diff=function(j,E,J){if(j&&this.$u===j.$u)return N.call(this,j,E,J);var re=this.local(),G=x(j).local();return N.call(re,G,E,J)}}})}(hn)),hn.exports}var _s=ws();const xs=Ze(_s);qt.extend(ps),qt.extend(gs),qt.extend(xs);const li={DATETIME:"YYYY-MM-DD HH:mm:ss",DATE:"YYYY-MM-DD",TIME:"HH:mm:ss",YEAR:"YYYY",MONTH:"YYYY-MM",HOUR:"YYYY-MM-DD HH",MINUTE:"YYYY-MM-DD HH:mm"},Ss=Object.freeze(Object.defineProperty({__proto__:null,FORMAT:li,dayjs:qt,default:{dayjs:qt,FORMAT:li}},Symbol.toStringTag,{value:"Module"}));var pn={exports:{}},Os=pn.exports,fi;function Es(){return fi||(fi=1,function(r,o){(function(u,a){r.exports=a()})(Os,function(){var u=function(e,t){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])})(e,t)},a=function(){return(a=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};function l(e,t,n){for(var i,s=0,c=t.length;s<c;s++)!i&&s in t||((i=i||Array.prototype.slice.call(t,0,s))[s]=t[s]);return e.concat(i||Array.prototype.slice.call(t))}var d=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:ze,h=Object.keys,x=Array.isArray;function $(e,t){return typeof t!="object"||h(t).forEach(function(n){e[n]=t[n]}),e}typeof Promise>"u"||d.Promise||(d.Promise=Promise);var C=Object.getPrototypeOf,D={}.hasOwnProperty;function M(e,t){return D.call(e,t)}function ae(e,t){typeof t=="function"&&(t=t(C(e))),(typeof Reflect>"u"?h:Reflect.ownKeys)(t).forEach(function(n){N(e,n,t[n])})}var ue=Object.defineProperty;function N(e,t,n,i){ue(e,t,$(n&&M(n,"get")&&typeof n.get=="function"?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},i))}function j(e){return{from:function(t){return e.prototype=Object.create(t.prototype),N(e.prototype,"constructor",e),{extend:ae.bind(null,e.prototype)}}}}var E=Object.getOwnPropertyDescriptor,J=[].slice;function re(e,t,n){return J.call(e,t,n)}function G(e,t){return t(e)}function _e(e){if(!e)throw new Error("Assertion Failed")}function fe(e){d.setImmediate?setImmediate(e):setTimeout(e,0)}function te(e,t){if(typeof t=="string"&&M(e,t))return e[t];if(!t)return e;if(typeof t!="string"){for(var n=[],i=0,s=t.length;i<s;++i){var c=te(e,t[i]);n.push(c)}return n}var f=t.indexOf(".");if(f!==-1){var p=e[t.substr(0,f)];return p==null?void 0:te(p,t.substr(f+1))}}function U(e,t,n){if(e&&t!==void 0&&!("isFrozen"in Object&&Object.isFrozen(e)))if(typeof t!="string"&&"length"in t){_e(typeof n!="string"&&"length"in n);for(var i=0,s=t.length;i<s;++i)U(e,t[i],n[i])}else{var c,f,p=t.indexOf(".");p!==-1?(c=t.substr(0,p),(f=t.substr(p+1))===""?n===void 0?x(e)&&!isNaN(parseInt(c))?e.splice(c,1):delete e[c]:e[c]=n:U(p=!(p=e[c])||!M(e,c)?e[c]={}:p,f,n)):n===void 0?x(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=n}}function K(e){var t,n={};for(t in e)M(e,t)&&(n[t]=e[t]);return n}var ce=[].concat;function le(e){return ce.apply([],e)}var gt="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(le([8,16,32,64].map(function(e){return["Int","Uint","Float"].map(function(t){return t+e+"Array"})}))).filter(function(e){return d[e]}),ne=new Set(gt.map(function(e){return d[e]})),be=null;function we(e){return be=new WeakMap,e=function t(n){if(!n||typeof n!="object")return n;var i=be.get(n);if(i)return i;if(x(n)){i=[],be.set(n,i);for(var s=0,c=n.length;s<c;++s)i.push(t(n[s]))}else if(ne.has(n.constructor))i=n;else{var f,p=C(n);for(f in i=p===Object.prototype?{}:Object.create(p),be.set(n,i),n)M(n,f)&&(i[f]=t(n[f]))}return i}(e),be=null,e}var Q={}.toString;function H(e){return Q.call(e).slice(8,-1)}var I=typeof Symbol<"u"?Symbol.iterator:"@@iterator",ee=typeof I=="symbol"?function(e){var t;return e!=null&&(t=e[I])&&t.apply(e)}:function(){return null};function L(e,t){return t=e.indexOf(t),0<=t&&e.splice(t,1),0<=t}var oe={};function se(e){var t,n,i,s;if(arguments.length===1){if(x(e))return e.slice();if(this===oe&&typeof e=="string")return[e];if(s=ee(e)){for(n=[];!(i=s.next()).done;)n.push(i.value);return n}if(e==null)return[e];if(typeof(t=e.length)!="number")return[e];for(n=new Array(t);t--;)n[t]=e[t];return n}for(t=arguments.length,n=new Array(t);t--;)n[t]=arguments[t];return n}var de=typeof Symbol<"u"?function(e){return e[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},Xt=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],Qe=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Xt),Ee={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Oe(e,t){this.name=e,this.message=t}function Ae(e,t){return e+". Errors: "+Object.keys(t).map(function(n){return t[n].toString()}).filter(function(n,i,s){return s.indexOf(n)===i}).join(`
2
2
  `)}function je(e,t,n,i){this.failures=t,this.failedKeys=i,this.successCount=n,this.message=Ae(e,t)}function Le(e,t){this.name="BulkError",this.failures=Object.keys(t).map(function(n){return t[n]}),this.failuresByPos=t,this.message=Ae(e,this.failures)}j(Oe).from(Error).extend({toString:function(){return this.name+": "+this.message}}),j(je).from(Oe),j(Le).from(Oe);var We=Qe.reduce(function(e,t){return e[t]=t+"Error",e},{}),ot=Oe,Z=Qe.reduce(function(e,t){var n=t+"Error";function i(s,c){this.name=n,s?typeof s=="string"?(this.message="".concat(s).concat(c?`
3
- `+c:""),this.inner=c||null):typeof s=="object"&&(this.message="".concat(s.name," ").concat(s.message),this.inner=s):(this.message=Ee[t]||n,this.inner=null)}return j(i).from(ot),e[t]=i,e},{});Z.Syntax=SyntaxError,Z.Type=TypeError,Z.Range=RangeError;var Ce=Xt.reduce(function(e,t){return e[t+"Error"]=Z[t],e},{}),Fe=Qe.reduce(function(e,t){return["Syntax","Type","Range"].indexOf(t)===-1&&(e[t+"Error"]=Z[t]),e},{});function ye(){}function He(e){return e}function $t(e,t){return e==null||e===He?t:function(n){return t(e(n))}}function Xe(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function zt(e,t){return e===ye?t:function(){var n=e.apply(this,arguments);n!==void 0&&(arguments[0]=n);var i=this.onsuccess,s=this.onerror;this.onsuccess=null,this.onerror=null;var c=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?Xe(i,this.onsuccess):i),s&&(this.onerror=this.onerror?Xe(s,this.onerror):s),c!==void 0?c:n}}function Vt(e,t){return e===ye?t:function(){e.apply(this,arguments);var n=this.onsuccess,i=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?Xe(n,this.onsuccess):n),i&&(this.onerror=this.onerror?Xe(i,this.onerror):i)}}function Wt(e,t){return e===ye?t:function(n){var i=e.apply(this,arguments);$(n,i);var s=this.onsuccess,c=this.onerror;return this.onsuccess=null,this.onerror=null,n=t.apply(this,arguments),s&&(this.onsuccess=this.onsuccess?Xe(s,this.onsuccess):s),c&&(this.onerror=this.onerror?Xe(c,this.onerror):c),i===void 0?n===void 0?void 0:n:$(i,n)}}function Jt(e,t){return e===ye?t:function(){return t.apply(this,arguments)!==!1&&e.apply(this,arguments)}}function Cn(e,t){return e===ye?t:function(){var n=e.apply(this,arguments);if(n&&typeof n.then=="function"){for(var i=this,s=arguments.length,c=new Array(s);s--;)c[s]=arguments[s];return n.then(function(){return t.apply(i,c)})}return t.apply(this,arguments)}}Fe.ModifyError=je,Fe.DexieError=Oe,Fe.BulkError=Le;var nt=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function To(e){nt=e}var Gt={},Ro=100,gt=typeof Promise>"u"?[]:function(){var e=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[e,C(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,C(t),e]}(),Xt=gt[0],Qe=gt[1],gt=gt[2],Qe=Qe&&Qe.then,bt=Xt&&Xt.constructor,Or=!!gt,Qt=function(e,t){Zt.push([e,t]),jn&&(queueMicrotask(fu),jn=!1)},Er=!0,jn=!0,wt=[],Mn=[],kr=He,ut={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:ye,pgp:!1,env:{},finalize:ye},ie=ut,Zt=[],_t=0,Nn=[];function W(e){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var t=this._PSD=ie;if(typeof e!="function"){if(e!==Gt)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&Rr(this,this._value))}this._state=null,this._value=null,++t.ref,function n(i,s){try{s(function(c){if(i._state===null){if(c===i)throw new TypeError("A promise cannot be resolved with itself.");var f=i._lib&&Pt();c&&typeof c.then=="function"?n(i,function(p,y){c instanceof W?c._then(p,y):c.then(p,y)}):(i._state=!0,i._value=c,$o(i)),f&&Dt()}},Rr.bind(null,i))}catch(c){Rr(i,c)}}(this,e)}var Tr={get:function(){var e=ie,t=Kn;function n(i,s){var c=this,f=!e.global&&(e!==ie||t!==Kn),p=f&&!lt(),y=new W(function(g,_){Ar(c,new Ao(Do(i,e,f,p),Do(s,e,f,p),g,_,e))});return this._consoleTask&&(y._consoleTask=this._consoleTask),y}return n.prototype=Gt,n},set:function(e){N(this,"then",e&&e.prototype===Gt?Tr:{get:function(){return e},set:Tr.set})}};function Ao(e,t,n,i,s){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof t=="function"?t:null,this.resolve=n,this.reject=i,this.psd=s}function Rr(e,t){var n,i;Mn.push(t),e._state===null&&(n=e._lib&&Pt(),t=kr(t),e._state=!1,e._value=t,i=e,wt.some(function(s){return s._value===i._value})||wt.push(i),$o(e),n&&Dt())}function $o(e){var t=e._listeners;e._listeners=[];for(var n=0,i=t.length;n<i;++n)Ar(e,t[n]);var s=e._PSD;--s.ref||s.finalize(),_t===0&&(++_t,Qt(function(){--_t==0&&$r()},[]))}function Ar(e,t){if(e._state!==null){var n=e._state?t.onFulfilled:t.onRejected;if(n===null)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++_t,Qt(lu,[n,e,t])}else e._listeners.push(t)}function lu(e,t,n){try{var i,s=t._value;!t._state&&Mn.length&&(Mn=[]),i=nt&&t._consoleTask?t._consoleTask.run(function(){return e(s)}):e(s),t._state||Mn.indexOf(s)!==-1||function(c){for(var f=wt.length;f;)if(wt[--f]._value===c._value)return wt.splice(f,1)}(t),n.resolve(i)}catch(c){n.reject(c)}finally{--_t==0&&$r(),--n.psd.ref||n.psd.finalize()}}function fu(){xt(ut,function(){Pt()&&Dt()})}function Pt(){var e=Er;return jn=Er=!1,e}function Dt(){var e,t,n;do for(;0<Zt.length;)for(e=Zt,Zt=[],n=e.length,t=0;t<n;++t){var i=e[t];i[0].apply(null,i[1])}while(0<Zt.length);jn=Er=!0}function $r(){var e=wt;wt=[],e.forEach(function(i){i._PSD.onunhandled.call(null,i._value,i)});for(var t=Nn.slice(0),n=t.length;n;)t[--n]()}function Fn(e){return new W(Gt,!1,e)}function Te(e,t){var n=ie;return function(){var i=Pt(),s=ie;try{return ft(n,!0),e.apply(this,arguments)}catch(c){t&&t(c)}finally{ft(s,!1),i&&Dt()}}}ae(W.prototype,{then:Tr,_then:function(e,t){Ar(this,new Ao(null,null,e,t,ie))},catch:function(e){if(arguments.length===1)return this.then(null,e);var t=e,n=arguments[1];return typeof t=="function"?this.then(null,function(i){return(i instanceof t?n:Fn)(i)}):this.then(null,function(i){return(i&&i.name===t?n:Fn)(i)})},finally:function(e){return this.then(function(t){return W.resolve(e()).then(function(){return t})},function(t){return W.resolve(e()).then(function(){return Fn(t)})})},timeout:function(e,t){var n=this;return e<1/0?new W(function(i,s){var c=setTimeout(function(){return s(new Z.Timeout(t))},e);n.then(i,s).finally(clearTimeout.bind(null,c))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&N(W.prototype,Symbol.toStringTag,"Dexie.Promise"),ut.env=Po(),ae(W,{all:function(){var e=se.apply(null,arguments).map(In);return new W(function(t,n){e.length===0&&t([]);var i=e.length;e.forEach(function(s,c){return W.resolve(s).then(function(f){e[c]=f,--i||t(e)},n)})})},resolve:function(e){return e instanceof W?e:e&&typeof e.then=="function"?new W(function(t,n){e.then(t,n)}):new W(Gt,!0,e)},reject:Fn,race:function(){var e=se.apply(null,arguments).map(In);return new W(function(t,n){e.map(function(i){return W.resolve(i).then(t,n)})})},PSD:{get:function(){return ie},set:function(e){return ie=e}},totalEchoes:{get:function(){return Kn}},newPSD:ct,usePSD:xt,scheduler:{get:function(){return Qt},set:function(e){Qt=e}},rejectionMapper:{get:function(){return kr},set:function(e){kr=e}},follow:function(e,t){return new W(function(n,i){return ct(function(s,c){var f=ie;f.unhandleds=[],f.onunhandled=c,f.finalize=Xe(function(){var p,y=this;p=function(){y.unhandleds.length===0?s():c(y.unhandleds[0])},Nn.push(function g(){p(),Nn.splice(Nn.indexOf(g),1)}),++_t,Qt(function(){--_t==0&&$r()},[])},f.finalize),e()},t,n,i)})}}),bt&&(bt.allSettled&&N(W,"allSettled",function(){var e=se.apply(null,arguments).map(In);return new W(function(t){e.length===0&&t([]);var n=e.length,i=new Array(n);e.forEach(function(s,c){return W.resolve(s).then(function(f){return i[c]={status:"fulfilled",value:f}},function(f){return i[c]={status:"rejected",reason:f}}).then(function(){return--n||t(i)})})})}),bt.any&&typeof AggregateError<"u"&&N(W,"any",function(){var e=se.apply(null,arguments).map(In);return new W(function(t,n){e.length===0&&n(new AggregateError([]));var i=e.length,s=new Array(i);e.forEach(function(c,f){return W.resolve(c).then(function(p){return t(p)},function(p){s[f]=p,--i||n(new AggregateError(s))})})})}),bt.withResolvers&&(W.withResolvers=bt.withResolvers));var Me={awaits:0,echoes:0,id:0},du=0,qn=[],Bn=0,Kn=0,hu=0;function ct(e,t,n,i){var s=ie,c=Object.create(s);return c.parent=s,c.ref=0,c.global=!1,c.id=++hu,ut.env,c.env=Or?{Promise:W,PromiseProp:{value:W,configurable:!0,writable:!0},all:W.all,race:W.race,allSettled:W.allSettled,any:W.any,resolve:W.resolve,reject:W.reject}:{},t&&$(c,t),++s.ref,c.finalize=function(){--this.parent.ref||this.parent.finalize()},i=xt(c,e,n,i),c.ref===0&&c.finalize(),i}function Ct(){return Me.id||(Me.id=++du),++Me.awaits,Me.echoes+=Ro,Me.id}function lt(){return!!Me.awaits&&(--Me.awaits==0&&(Me.id=0),Me.echoes=Me.awaits*Ro,!0)}function In(e){return Me.echoes&&e&&e.constructor===bt?(Ct(),e.then(function(t){return lt(),t},function(t){return lt(),$e(t)})):e}function pu(){var e=qn[qn.length-1];qn.pop(),ft(e,!1)}function ft(e,t){var n,i=ie;(t?!Me.echoes||Bn++&&e===ie:!Bn||--Bn&&e===ie)||queueMicrotask(t?(function(s){++Kn,Me.echoes&&--Me.echoes!=0||(Me.echoes=Me.awaits=Me.id=0),qn.push(ie),ft(s,!0)}).bind(null,e):pu),e!==ie&&(ie=e,i===ut&&(ut.env=Po()),Or&&(n=ut.env.Promise,t=e.env,(i.global||e.global)&&(Object.defineProperty(d,"Promise",t.PromiseProp),n.all=t.all,n.race=t.race,n.resolve=t.resolve,n.reject=t.reject,t.allSettled&&(n.allSettled=t.allSettled),t.any&&(n.any=t.any))))}function Po(){var e=d.Promise;return Or?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(d,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject}:{}}function xt(e,t,n,i,s){var c=ie;try{return ft(e,!0),t(n,i,s)}finally{ft(c,!1)}}function Do(e,t,n,i){return typeof e!="function"?e:function(){var s=ie;n&&Ct(),ft(t,!0);try{return e.apply(this,arguments)}finally{ft(s,!1),i&&queueMicrotask(lt)}}}function Pr(e){Promise===bt&&Me.echoes===0?Bn===0?e():enqueueNativeMicroTask(e):setTimeout(e,0)}(""+Qe).indexOf("[native code]")===-1&&(Ct=lt=ye);var $e=W.reject,St="￿",st="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Co="String expected.",jt=[],Ln="__dbnames",Dr="readonly",Cr="readwrite";function Ot(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}var jo={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Un(e){return typeof e!="string"||/\./.test(e)?function(t){return t}:function(t){return t[e]===void 0&&e in t&&delete(t=we(t))[e],t}}function Mo(){throw Z.Type()}function xe(e,t){try{var n=No(e),i=No(t);if(n!==i)return n==="Array"?1:i==="Array"?-1:n==="binary"?1:i==="binary"?-1:n==="string"?1:i==="string"?-1:n==="Date"?1:i!=="Date"?NaN:-1;switch(n){case"number":case"Date":case"string":return t<e?1:e<t?-1:0;case"binary":return function(s,c){for(var f=s.length,p=c.length,y=f<p?f:p,g=0;g<y;++g)if(s[g]!==c[g])return s[g]<c[g]?-1:1;return f===p?0:f<p?-1:1}(Fo(e),Fo(t));case"Array":return function(s,c){for(var f=s.length,p=c.length,y=f<p?f:p,g=0;g<y;++g){var _=xe(s[g],c[g]);if(_!==0)return _}return f===p?0:f<p?-1:1}(e,t)}}catch{}return NaN}function No(e){var t=typeof e;return t!="object"?t:ArrayBuffer.isView(e)?"binary":(e=H(e),e==="ArrayBuffer"?"binary":e)}function Fo(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}var qo=(ke.prototype._trans=function(e,t,n){var i=this._tx||ie.trans,s=this.name,c=nt&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(e==="readonly"?"read":"write"," ").concat(this.name));function f(g,_,m){if(!m.schema[s])throw new Z.NotFound("Table "+s+" not part of transaction");return t(m.idbtrans,m)}var p=Pt();try{var y=i&&i.db._novip===this.db._novip?i===ie.trans?i._promise(e,f,n):ct(function(){return i._promise(e,f,n)},{trans:i,transless:ie.transless||ie}):function g(_,m,O,v){if(_.idbdb&&(_._state.openComplete||ie.letThrough||_._vip)){var w=_._createTransaction(m,O,_._dbSchema);try{w.create(),_._state.PR1398_maxLoop=3}catch(S){return S.name===We.InvalidState&&_.isOpen()&&0<--_._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),_.close({disableAutoOpen:!1}),_.open().then(function(){return g(_,m,O,v)})):$e(S)}return w._promise(m,function(S,b){return ct(function(){return ie.trans=w,v(S,b,w)})}).then(function(S){if(m==="readwrite")try{w.idbtrans.commit()}catch{}return m==="readonly"?S:w._completion.then(function(){return S})})}if(_._state.openComplete)return $e(new Z.DatabaseClosed(_._state.dbOpenError));if(!_._state.isBeingOpened){if(!_._state.autoOpen)return $e(new Z.DatabaseClosed);_.open().catch(ye)}return _._state.dbReadyPromise.then(function(){return g(_,m,O,v)})}(this.db,e,[this.name],f);return c&&(y._consoleTask=c,y=y.catch(function(g){return console.trace(g),$e(g)})),y}finally{p&&Dt()}},ke.prototype.get=function(e,t){var n=this;return e&&e.constructor===Object?this.where(e).first(t):e==null?$e(new Z.Type("Invalid argument to Table.get()")):this._trans("readonly",function(i){return n.core.get({trans:i,key:e}).then(function(s){return n.hook.reading.fire(s)})}).then(t)},ke.prototype.where=function(e){if(typeof e=="string")return new this.db.WhereClause(this,e);if(x(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var t=h(e);if(t.length===1)return this.where(t[0]).equals(e[t[0]]);var n=this.schema.indexes.concat(this.schema.primKey).filter(function(p){if(p.compound&&t.every(function(g){return 0<=p.keyPath.indexOf(g)})){for(var y=0;y<t.length;++y)if(t.indexOf(p.keyPath[y])===-1)return!1;return!0}return!1}).sort(function(p,y){return p.keyPath.length-y.keyPath.length})[0];if(n&&this.db._maxKey!==St){var c=n.keyPath.slice(0,t.length);return this.where(c).equals(c.map(function(y){return e[y]}))}!n&&nt&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(t.join("+"),"]"));var i=this.schema.idxByName;function s(p,y){return xe(p,y)===0}var f=t.reduce(function(m,y){var g=m[0],_=m[1],m=i[y],O=e[y];return[g||m,g||!m?Ot(_,m&&m.multi?function(v){return v=te(v,y),x(v)&&v.some(function(w){return s(O,w)})}:function(v){return s(O,te(v,y))}):_]},[null,null]),c=f[0],f=f[1];return c?this.where(c.name).equals(e[c.keyPath]).filter(f):n?this.filter(f):this.where(t).equals("")},ke.prototype.filter=function(e){return this.toCollection().and(e)},ke.prototype.count=function(e){return this.toCollection().count(e)},ke.prototype.offset=function(e){return this.toCollection().offset(e)},ke.prototype.limit=function(e){return this.toCollection().limit(e)},ke.prototype.each=function(e){return this.toCollection().each(e)},ke.prototype.toArray=function(e){return this.toCollection().toArray(e)},ke.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},ke.prototype.orderBy=function(e){return new this.db.Collection(new this.db.WhereClause(this,x(e)?"[".concat(e.join("+"),"]"):e))},ke.prototype.reverse=function(){return this.toCollection().reverse()},ke.prototype.mapToClass=function(e){var t,n=this.db,i=this.name;function s(){return t!==null&&t.apply(this,arguments)||this}(this.schema.mappedClass=e).prototype instanceof Mo&&(function(y,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");function _(){this.constructor=y}u(y,g),y.prototype=g===null?Object.create(g):(_.prototype=g.prototype,new _)}(s,t=e),Object.defineProperty(s.prototype,"db",{get:function(){return n},enumerable:!1,configurable:!0}),s.prototype.table=function(){return i},e=s);for(var c=new Set,f=e.prototype;f;f=C(f))Object.getOwnPropertyNames(f).forEach(function(y){return c.add(y)});function p(y){if(!y)return y;var g,_=Object.create(e.prototype);for(g in y)if(!c.has(g))try{_[g]=y[g]}catch{}return _}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=p,this.hook("reading",p),e},ke.prototype.defineClass=function(){return this.mapToClass(function(e){$(this,e)})},ke.prototype.add=function(e,t){var n=this,i=this.schema.primKey,s=i.auto,c=i.keyPath,f=e;return c&&s&&(f=Un(c)(e)),this._trans("readwrite",function(p){return n.core.mutate({trans:p,type:"add",keys:t!=null?[t]:null,values:[f]})}).then(function(p){return p.numFailures?W.reject(p.failures[0]):p.lastResult}).then(function(p){if(c)try{U(e,c,p)}catch{}return p})},ke.prototype.update=function(e,t){return typeof e!="object"||x(e)?this.where(":id").equals(e).modify(t):(e=te(e,this.schema.primKey.keyPath),e===void 0?$e(new Z.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(e).modify(t))},ke.prototype.put=function(e,t){var n=this,i=this.schema.primKey,s=i.auto,c=i.keyPath,f=e;return c&&s&&(f=Un(c)(e)),this._trans("readwrite",function(p){return n.core.mutate({trans:p,type:"put",values:[f],keys:t!=null?[t]:null})}).then(function(p){return p.numFailures?W.reject(p.failures[0]):p.lastResult}).then(function(p){if(c)try{U(e,c,p)}catch{}return p})},ke.prototype.delete=function(e){var t=this;return this._trans("readwrite",function(n){return t.core.mutate({trans:n,type:"delete",keys:[e]})}).then(function(n){return n.numFailures?W.reject(n.failures[0]):void 0})},ke.prototype.clear=function(){var e=this;return this._trans("readwrite",function(t){return e.core.mutate({trans:t,type:"deleteRange",range:jo})}).then(function(t){return t.numFailures?W.reject(t.failures[0]):void 0})},ke.prototype.bulkGet=function(e){var t=this;return this._trans("readonly",function(n){return t.core.getMany({keys:e,trans:n}).then(function(i){return i.map(function(s){return t.hook.reading.fire(s)})})})},ke.prototype.bulkAdd=function(e,t,n){var i=this,s=Array.isArray(t)?t:void 0,c=(n=n||(s?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",function(f){var g=i.schema.primKey,p=g.auto,g=g.keyPath;if(g&&s)throw new Z.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(s&&s.length!==e.length)throw new Z.InvalidArgument("Arguments objects and keys must have the same length");var y=e.length,g=g&&p?e.map(Un(g)):e;return i.core.mutate({trans:f,type:"add",keys:s,values:g,wantResults:c}).then(function(w){var m=w.numFailures,O=w.results,v=w.lastResult,w=w.failures;if(m===0)return c?O:v;throw new Le("".concat(i.name,".bulkAdd(): ").concat(m," of ").concat(y," operations failed"),w)})})},ke.prototype.bulkPut=function(e,t,n){var i=this,s=Array.isArray(t)?t:void 0,c=(n=n||(s?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",function(f){var g=i.schema.primKey,p=g.auto,g=g.keyPath;if(g&&s)throw new Z.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(s&&s.length!==e.length)throw new Z.InvalidArgument("Arguments objects and keys must have the same length");var y=e.length,g=g&&p?e.map(Un(g)):e;return i.core.mutate({trans:f,type:"put",keys:s,values:g,wantResults:c}).then(function(w){var m=w.numFailures,O=w.results,v=w.lastResult,w=w.failures;if(m===0)return c?O:v;throw new Le("".concat(i.name,".bulkPut(): ").concat(m," of ").concat(y," operations failed"),w)})})},ke.prototype.bulkUpdate=function(e){var t=this,n=this.core,i=e.map(function(f){return f.key}),s=e.map(function(f){return f.changes}),c=[];return this._trans("readwrite",function(f){return n.getMany({trans:f,keys:i,cache:"clone"}).then(function(p){var y=[],g=[];e.forEach(function(m,O){var v=m.key,w=m.changes,S=p[O];if(S){for(var b=0,k=Object.keys(w);b<k.length;b++){var T=k[b],R=w[T];if(T===t.schema.primKey.keyPath){if(xe(R,v)!==0)throw new Z.Constraint("Cannot update primary key in bulkUpdate()")}else U(S,T,R)}c.push(O),y.push(v),g.push(S)}});var _=y.length;return n.mutate({trans:f,type:"put",keys:y,values:g,updates:{keys:i,changeSpecs:s}}).then(function(m){var O=m.numFailures,v=m.failures;if(O===0)return _;for(var w=0,S=Object.keys(v);w<S.length;w++){var b,k=S[w],T=c[Number(k)];T!=null&&(b=v[k],delete v[k],v[T]=b)}throw new Le("".concat(t.name,".bulkUpdate(): ").concat(O," of ").concat(_," operations failed"),v)})})})},ke.prototype.bulkDelete=function(e){var t=this,n=e.length;return this._trans("readwrite",function(i){return t.core.mutate({trans:i,type:"delete",keys:e})}).then(function(f){var s=f.numFailures,c=f.lastResult,f=f.failures;if(s===0)return c;throw new Le("".concat(t.name,".bulkDelete(): ").concat(s," of ").concat(n," operations failed"),f)})},ke);function ke(){}function en(e){function t(f,p){if(p){for(var y=arguments.length,g=new Array(y-1);--y;)g[y-1]=arguments[y];return n[f].subscribe.apply(null,g),e}if(typeof f=="string")return n[f]}var n={};t.addEventType=c;for(var i=1,s=arguments.length;i<s;++i)c(arguments[i]);return t;function c(f,p,y){if(typeof f!="object"){var g;p=p||Jt;var _={subscribers:[],fire:y=y||ye,subscribe:function(m){_.subscribers.indexOf(m)===-1&&(_.subscribers.push(m),_.fire=p(_.fire,m))},unsubscribe:function(m){_.subscribers=_.subscribers.filter(function(O){return O!==m}),_.fire=_.subscribers.reduce(p,y)}};return n[f]=t[f]=_}h(g=f).forEach(function(m){var O=g[m];if(x(O))c(m,g[m][0],g[m][1]);else{if(O!=="asap")throw new Z.InvalidArgument("Invalid event config");var v=c(m,He,function(){for(var w=arguments.length,S=new Array(w);w--;)S[w]=arguments[w];v.subscribers.forEach(function(b){fe(function(){b.apply(null,S)})})})}})}}function tn(e,t){return j(t).from({prototype:e}),t}function Mt(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function jr(e,t){e.filter=Ot(e.filter,t)}function Mr(e,t,n){var i=e.replayFilter;e.replayFilter=i?function(){return Ot(i(),t())}:t,e.justLimit=n&&!i}function Yn(e,t){if(e.isPrimKey)return t.primaryKey;var n=t.getIndexByKeyPath(e.index);if(!n)throw new Z.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function Bo(e,t,n){var i=Yn(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:e.dir==="prev",unique:!!e.unique,query:{index:i,range:e.range}})}function Hn(e,t,n,i){var s=e.replayFilter?Ot(e.filter,e.replayFilter()):e.filter;if(e.or){var c={},f=function(p,y,g){var _,m;s&&!s(y,g,function(O){return y.stop(O)},function(O){return y.fail(O)})||((m=""+(_=y.primaryKey))=="[object ArrayBuffer]"&&(m=""+new Uint8Array(_)),M(c,m)||(c[m]=!0,t(p,y,g)))};return Promise.all([e.or._iterate(f,n),Ko(Bo(e,i,n),e.algorithm,f,!e.keysOnly&&e.valueMapper)])}return Ko(Bo(e,i,n),Ot(e.algorithm,s),t,!e.keysOnly&&e.valueMapper)}function Ko(e,t,n,i){var s=Te(i?function(c,f,p){return n(i(c),f,p)}:n);return e.then(function(c){if(c)return c.start(function(){var f=function(){return c.continue()};t&&!t(c,function(p){return f=p},function(p){c.stop(p),f=ye},function(p){c.fail(p),f=ye})||s(c.value,c,function(p){return f=p}),f()})})}var nn=(Io.prototype.execute=function(e){var t=this["@@propmod"];if(t.add!==void 0){var n=t.add;if(x(n))return l(l([],x(e)?e:[],!0),n).sort();if(typeof n=="number")return(Number(e)||0)+n;if(typeof n=="bigint")try{return BigInt(e)+n}catch{return BigInt(0)+n}throw new TypeError("Invalid term ".concat(n))}if(t.remove!==void 0){var i=t.remove;if(x(i))return x(e)?e.filter(function(s){return!i.includes(s)}).sort():[];if(typeof i=="number")return Number(e)-i;if(typeof i=="bigint")try{return BigInt(e)-i}catch{return BigInt(0)-i}throw new TypeError("Invalid subtrahend ".concat(i))}return n=(n=t.replacePrefix)===null||n===void 0?void 0:n[0],n&&typeof e=="string"&&e.startsWith(n)?t.replacePrefix[1]+e.substring(n.length):e},Io);function Io(e){this["@@propmod"]=e}var mu=(Se.prototype._read=function(e,t){var n=this._ctx;return n.error?n.table._trans(null,$e.bind(null,n.error)):n.table._trans("readonly",e).then(t)},Se.prototype._write=function(e){var t=this._ctx;return t.error?t.table._trans(null,$e.bind(null,t.error)):t.table._trans("readwrite",e,"locked")},Se.prototype._addAlgorithm=function(e){var t=this._ctx;t.algorithm=Ot(t.algorithm,e)},Se.prototype._iterate=function(e,t){return Hn(this._ctx,e,t,this._ctx.table.core)},Se.prototype.clone=function(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&$(n,e),t._ctx=n,t},Se.prototype.raw=function(){return this._ctx.valueMapper=null,this},Se.prototype.each=function(e){var t=this._ctx;return this._read(function(n){return Hn(t,e,n,t.table.core)})},Se.prototype.count=function(e){var t=this;return this._read(function(n){var i=t._ctx,s=i.table.core;if(Mt(i,!0))return s.count({trans:n,query:{index:Yn(i,s.schema),range:i.range}}).then(function(f){return Math.min(f,i.limit)});var c=0;return Hn(i,function(){return++c,!1},n,s).then(function(){return c})}).then(e)},Se.prototype.sortBy=function(e,t){var n=e.split(".").reverse(),i=n[0],s=n.length-1;function c(y,g){return g?c(y[n[g]],g-1):y[i]}var f=this._ctx.dir==="next"?1:-1;function p(y,g){return xe(c(y,s),c(g,s))*f}return this.toArray(function(y){return y.sort(p)}).then(t)},Se.prototype.toArray=function(e){var t=this;return this._read(function(n){var i=t._ctx;if(i.dir==="next"&&Mt(i,!0)&&0<i.limit){var s=i.valueMapper,c=Yn(i,i.table.core.schema);return i.table.core.query({trans:n,limit:i.limit,values:!0,query:{index:c,range:i.range}}).then(function(p){return p=p.result,s?p.map(s):p})}var f=[];return Hn(i,function(p){return f.push(p)},n,i.table.core).then(function(){return f})},e)},Se.prototype.offset=function(e){var t=this._ctx;return e<=0||(t.offset+=e,Mt(t)?Mr(t,function(){var n=e;return function(i,s){return n===0||(n===1?--n:s(function(){i.advance(n),n=0}),!1)}}):Mr(t,function(){var n=e;return function(){return--n<0}})),this},Se.prototype.limit=function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Mr(this._ctx,function(){var t=e;return function(n,i,s){return--t<=0&&i(s),0<=t}},!0),this},Se.prototype.until=function(e,t){return jr(this._ctx,function(n,i,s){return!e(n.value)||(i(s),t)}),this},Se.prototype.first=function(e){return this.limit(1).toArray(function(t){return t[0]}).then(e)},Se.prototype.last=function(e){return this.reverse().first(e)},Se.prototype.filter=function(e){var t;return jr(this._ctx,function(n){return e(n.value)}),(t=this._ctx).isMatch=Ot(t.isMatch,e),this},Se.prototype.and=function(e){return this.filter(e)},Se.prototype.or=function(e){return new this.db.WhereClause(this._ctx.table,e,this)},Se.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},Se.prototype.desc=function(){return this.reverse()},Se.prototype.eachKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(n,i){e(i.key,i)})},Se.prototype.eachUniqueKey=function(e){return this._ctx.unique="unique",this.eachKey(e)},Se.prototype.eachPrimaryKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(n,i){e(i.primaryKey,i)})},Se.prototype.keys=function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each(function(i,s){n.push(s.key)}).then(function(){return n}).then(e)},Se.prototype.primaryKeys=function(e){var t=this._ctx;if(t.dir==="next"&&Mt(t,!0)&&0<t.limit)return this._read(function(i){var s=Yn(t,t.table.core.schema);return t.table.core.query({trans:i,values:!1,limit:t.limit,query:{index:s,range:t.range}})}).then(function(i){return i.result}).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each(function(i,s){n.push(s.primaryKey)}).then(function(){return n}).then(e)},Se.prototype.uniqueKeys=function(e){return this._ctx.unique="unique",this.keys(e)},Se.prototype.firstKey=function(e){return this.limit(1).keys(function(t){return t[0]}).then(e)},Se.prototype.lastKey=function(e){return this.reverse().firstKey(e)},Se.prototype.distinct=function(){var e=this._ctx,e=e.index&&e.table.schema.idxByName[e.index];if(!e||!e.multi)return this;var t={};return jr(this._ctx,function(s){var i=s.primaryKey.toString(),s=M(t,i);return t[i]=!0,!s}),this},Se.prototype.modify=function(e){var t=this,n=this._ctx;return this._write(function(i){var s,c,f;f=typeof e=="function"?e:(s=h(e),c=s.length,function(b){for(var k=!1,T=0;T<c;++T){var R=s[T],P=e[R],F=te(b,R);P instanceof nn?(U(b,R,P.execute(F)),k=!0):F!==P&&(U(b,R,P),k=!0)}return k});var p=n.table.core,m=p.schema.primaryKey,y=m.outbound,g=m.extractKey,_=200,m=t.db._options.modifyChunkSize;m&&(_=typeof m=="object"?m[p.name]||m["*"]||200:m);function O(b,R){var T=R.failures,R=R.numFailures;w+=b-R;for(var P=0,F=h(T);P<F.length;P++){var z=F[P];v.push(T[z])}}var v=[],w=0,S=[];return t.clone().primaryKeys().then(function(b){function k(R){var P=Math.min(_,b.length-R);return p.getMany({trans:i,keys:b.slice(R,R+P),cache:"immutable"}).then(function(F){for(var z=[],q=[],B=y?[]:null,V=[],Y=0;Y<P;++Y){var X=F[Y],me={value:we(X),primKey:b[R+Y]};f.call(me,me.value,me)!==!1&&(me.value==null?V.push(b[R+Y]):y||xe(g(X),g(me.value))===0?(q.push(me.value),y&&B.push(b[R+Y])):(V.push(b[R+Y]),z.push(me.value)))}return Promise.resolve(0<z.length&&p.mutate({trans:i,type:"add",values:z}).then(function(ve){for(var ge in ve.failures)V.splice(parseInt(ge),1);O(z.length,ve)})).then(function(){return(0<q.length||T&&typeof e=="object")&&p.mutate({trans:i,type:"put",keys:B,values:q,criteria:T,changeSpec:typeof e!="function"&&e,isAdditionalChunk:0<R}).then(function(ve){return O(q.length,ve)})}).then(function(){return(0<V.length||T&&e===Nr)&&p.mutate({trans:i,type:"delete",keys:V,criteria:T,isAdditionalChunk:0<R}).then(function(ve){return O(V.length,ve)})}).then(function(){return b.length>R+P&&k(R+_)})})}var T=Mt(n)&&n.limit===1/0&&(typeof e!="function"||e===Nr)&&{index:n.index,range:n.range};return k(0).then(function(){if(0<v.length)throw new je("Error modifying one or more objects",v,w,S);return b.length})})})},Se.prototype.delete=function(){var e=this._ctx,t=e.range;return Mt(e)&&(e.isPrimKey||t.type===3)?this._write(function(n){var i=e.table.core.schema.primaryKey,s=t;return e.table.core.count({trans:n,query:{index:i,range:s}}).then(function(c){return e.table.core.mutate({trans:n,type:"deleteRange",range:s}).then(function(f){var p=f.failures;if(f.lastResult,f.results,f=f.numFailures,f)throw new je("Could not delete some values",Object.keys(p).map(function(y){return p[y]}),c-f);return c-f})})}):this.modify(Nr)},Se);function Se(){}var Nr=function(e,t){return t.value=null};function yu(e,t){return e<t?-1:e===t?0:1}function vu(e,t){return t<e?-1:e===t?0:1}function Je(e,t,n){return e=e instanceof Uo?new e.Collection(e):e,e._ctx.error=new(n||TypeError)(t),e}function Nt(e){return new e.Collection(e,function(){return Lo("")}).limit(0)}function zn(e,t,n,i){var s,c,f,p,y,g,_,m=n.length;if(!n.every(function(w){return typeof w=="string"}))return Je(e,Co);function O(w){s=w==="next"?function(b){return b.toUpperCase()}:function(b){return b.toLowerCase()},c=w==="next"?function(b){return b.toLowerCase()}:function(b){return b.toUpperCase()},f=w==="next"?yu:vu;var S=n.map(function(b){return{lower:c(b),upper:s(b)}}).sort(function(b,k){return f(b.lower,k.lower)});p=S.map(function(b){return b.upper}),y=S.map(function(b){return b.lower}),_=(g=w)==="next"?"":i}O("next"),e=new e.Collection(e,function(){return dt(p[0],y[m-1]+i)}),e._ondirectionchange=function(w){O(w)};var v=0;return e._addAlgorithm(function(w,S,b){var k=w.key;if(typeof k!="string")return!1;var T=c(k);if(t(T,y,v))return!0;for(var R=null,P=v;P<m;++P){var F=function(z,q,B,V,Y,X){for(var me=Math.min(z.length,V.length),ve=-1,ge=0;ge<me;++ge){var Ge=q[ge];if(Ge!==V[ge])return Y(z[ge],B[ge])<0?z.substr(0,ge)+B[ge]+B.substr(ge+1):Y(z[ge],V[ge])<0?z.substr(0,ge)+V[ge]+B.substr(ge+1):0<=ve?z.substr(0,ve)+q[ve]+B.substr(ve+1):null;Y(z[ge],Ge)<0&&(ve=ge)}return me<V.length&&X==="next"?z+B.substr(z.length):me<z.length&&X==="prev"?z.substr(0,B.length):ve<0?null:z.substr(0,ve)+V[ve]+B.substr(ve+1)}(k,T,p[P],y[P],f,g);F===null&&R===null?v=P+1:(R===null||0<f(R,F))&&(R=F)}return S(R!==null?function(){w.continue(R+_)}:b),!1}),e}function dt(e,t,n,i){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:i}}function Lo(e){return{type:1,lower:e,upper:e}}var Uo=(Object.defineProperty(Ne.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),Ne.prototype.between=function(e,t,n,i){n=n!==!1,i=i===!0;try{return 0<this._cmp(e,t)||this._cmp(e,t)===0&&(n||i)&&(!n||!i)?Nt(this):new this.Collection(this,function(){return dt(e,t,!n,!i)})}catch{return Je(this,st)}},Ne.prototype.equals=function(e){return e==null?Je(this,st):new this.Collection(this,function(){return Lo(e)})},Ne.prototype.above=function(e){return e==null?Je(this,st):new this.Collection(this,function(){return dt(e,void 0,!0)})},Ne.prototype.aboveOrEqual=function(e){return e==null?Je(this,st):new this.Collection(this,function(){return dt(e,void 0,!1)})},Ne.prototype.below=function(e){return e==null?Je(this,st):new this.Collection(this,function(){return dt(void 0,e,!1,!0)})},Ne.prototype.belowOrEqual=function(e){return e==null?Je(this,st):new this.Collection(this,function(){return dt(void 0,e)})},Ne.prototype.startsWith=function(e){return typeof e!="string"?Je(this,Co):this.between(e,e+St,!0,!0)},Ne.prototype.startsWithIgnoreCase=function(e){return e===""?this.startsWith(e):zn(this,function(t,n){return t.indexOf(n[0])===0},[e],St)},Ne.prototype.equalsIgnoreCase=function(e){return zn(this,function(t,n){return t===n[0]},[e],"")},Ne.prototype.anyOfIgnoreCase=function(){var e=se.apply(oe,arguments);return e.length===0?Nt(this):zn(this,function(t,n){return n.indexOf(t)!==-1},e,"")},Ne.prototype.startsWithAnyOfIgnoreCase=function(){var e=se.apply(oe,arguments);return e.length===0?Nt(this):zn(this,function(t,n){return n.some(function(i){return t.indexOf(i)===0})},e,St)},Ne.prototype.anyOf=function(){var e=this,t=se.apply(oe,arguments),n=this._cmp;try{t.sort(n)}catch{return Je(this,st)}if(t.length===0)return Nt(this);var i=new this.Collection(this,function(){return dt(t[0],t[t.length-1])});i._ondirectionchange=function(c){n=c==="next"?e._ascending:e._descending,t.sort(n)};var s=0;return i._addAlgorithm(function(c,f,p){for(var y=c.key;0<n(y,t[s]);)if(++s===t.length)return f(p),!1;return n(y,t[s])===0||(f(function(){c.continue(t[s])}),!1)}),i},Ne.prototype.notEqual=function(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},Ne.prototype.noneOf=function(){var e=se.apply(oe,arguments);if(e.length===0)return new this.Collection(this);try{e.sort(this._ascending)}catch{return Je(this,st)}var t=e.reduce(function(n,i){return n?n.concat([[n[n.length-1][1],i]]):[[-1/0,i]]},null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})},Ne.prototype.inAnyRange=function(k,t){var n=this,i=this._cmp,s=this._ascending,c=this._descending,f=this._min,p=this._max;if(k.length===0)return Nt(this);if(!k.every(function(T){return T[0]!==void 0&&T[1]!==void 0&&s(T[0],T[1])<=0}))return Je(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Z.InvalidArgument);var y=!t||t.includeLowers!==!1,g=t&&t.includeUppers===!0,_,m=s;function O(T,R){return m(T[0],R[0])}try{(_=k.reduce(function(T,R){for(var P=0,F=T.length;P<F;++P){var z=T[P];if(i(R[0],z[1])<0&&0<i(R[1],z[0])){z[0]=f(z[0],R[0]),z[1]=p(z[1],R[1]);break}}return P===F&&T.push(R),T},[])).sort(O)}catch{return Je(this,st)}var v=0,w=g?function(T){return 0<s(T,_[v][1])}:function(T){return 0<=s(T,_[v][1])},S=y?function(T){return 0<c(T,_[v][0])}:function(T){return 0<=c(T,_[v][0])},b=w,k=new this.Collection(this,function(){return dt(_[0][0],_[_.length-1][1],!y,!g)});return k._ondirectionchange=function(T){m=T==="next"?(b=w,s):(b=S,c),_.sort(O)},k._addAlgorithm(function(T,R,P){for(var F,z=T.key;b(z);)if(++v===_.length)return R(P),!1;return!w(F=z)&&!S(F)||(n._cmp(z,_[v][1])===0||n._cmp(z,_[v][0])===0||R(function(){m===s?T.continue(_[v][0]):T.continue(_[v][1])}),!1)}),k},Ne.prototype.startsWithAnyOf=function(){var e=se.apply(oe,arguments);return e.every(function(t){return typeof t=="string"})?e.length===0?Nt(this):this.inAnyRange(e.map(function(t){return[t,t+St]})):Je(this,"startsWithAnyOf() only works with strings")},Ne);function Ne(){}function rt(e){return Te(function(t){return rn(t),e(t.target.error),!1})}function rn(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}var on="storagemutated",Fr="x-storagemutated-1",ht=en(null,on),gu=(it.prototype._lock=function(){return _e(!ie.global),++this._reculock,this._reculock!==1||ie.global||(ie.lockOwnerFor=this),this},it.prototype._unlock=function(){if(_e(!ie.global),--this._reculock==0)for(ie.global||(ie.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var e=this._blockedFuncs.shift();try{xt(e[1],e[0])}catch{}}return this},it.prototype._locked=function(){return this._reculock&&ie.lockOwnerFor!==this},it.prototype.create=function(e){var t=this;if(!this.mode)return this;var n=this.db.idbdb,i=this.db._state.dbOpenError;if(_e(!this.idbtrans),!e&&!n)switch(i&&i.name){case"DatabaseClosedError":throw new Z.DatabaseClosed(i);case"MissingAPIError":throw new Z.MissingAPI(i.message,i);default:throw new Z.OpenFailed(i)}if(!this.active)throw new Z.TransactionInactive;return _e(this._completion._state===null),(e=this.idbtrans=e||(this.db.core||n).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=Te(function(s){rn(s),t._reject(e.error)}),e.onabort=Te(function(s){rn(s),t.active&&t._reject(new Z.Abort(e.error)),t.active=!1,t.on("abort").fire(s)}),e.oncomplete=Te(function(){t.active=!1,t._resolve(),"mutatedParts"in e&&ht.storagemutated.fire(e.mutatedParts)}),this},it.prototype._promise=function(e,t,n){var i=this;if(e==="readwrite"&&this.mode!=="readwrite")return $e(new Z.ReadOnly("Transaction is readonly"));if(!this.active)return $e(new Z.TransactionInactive);if(this._locked())return new W(function(c,f){i._blockedFuncs.push([function(){i._promise(e,t,n).then(c,f)},ie])});if(n)return ct(function(){var c=new W(function(f,p){i._lock();var y=t(f,p,i);y&&y.then&&y.then(f,p)});return c.finally(function(){return i._unlock()}),c._lib=!0,c});var s=new W(function(c,f){var p=t(c,f,i);p&&p.then&&p.then(c,f)});return s._lib=!0,s},it.prototype._root=function(){return this.parent?this.parent._root():this},it.prototype.waitFor=function(e){var t,n=this._root(),i=W.resolve(e);n._waitingFor?n._waitingFor=n._waitingFor.then(function(){return i}):(n._waitingFor=i,n._waitingQueue=[],t=n.idbtrans.objectStore(n.storeNames[0]),function c(){for(++n._spinCount;n._waitingQueue.length;)n._waitingQueue.shift()();n._waitingFor&&(t.get(-1/0).onsuccess=c)}());var s=n._waitingFor;return new W(function(c,f){i.then(function(p){return n._waitingQueue.push(Te(c.bind(null,p)))},function(p){return n._waitingQueue.push(Te(f.bind(null,p)))}).finally(function(){n._waitingFor===s&&(n._waitingFor=null)})})},it.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Z.Abort))},it.prototype.table=function(e){var t=this._memoizedTables||(this._memoizedTables={});if(M(t,e))return t[e];var n=this.schema[e];if(!n)throw new Z.NotFound("Table "+e+" not part of transaction");return n=new this.db.Table(e,n,this),n.core=this.db.core.table(e),t[e]=n},it);function it(){}function qr(e,t,n,i,s,c,f){return{name:e,keyPath:t,unique:n,multi:i,auto:s,compound:c,src:(n&&!f?"&":"")+(i?"*":"")+(s?"++":"")+Yo(t)}}function Yo(e){return typeof e=="string"?e:e?"["+[].join.call(e,"+")+"]":""}function Br(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:(i=function(s){return[s.name,s]},n.reduce(function(s,c,f){return f=i(c,f),f&&(s[f[0]]=f[1]),s},{}))};var i}var sn=function(e){try{return e.only([[]]),sn=function(){return[[]]},[[]]}catch{return sn=function(){return St},St}};function Kr(e){return e==null?function(){}:typeof e=="string"?(t=e).split(".").length===1?function(n){return n[t]}:function(n){return te(n,t)}:function(n){return te(n,e)};var t}function Ho(e){return[].slice.call(e)}var bu=0;function an(e){return e==null?":id":typeof e=="string"?e:"[".concat(e.join("+"),"]")}function wu(e,t,y){function i(b){if(b.type===3)return null;if(b.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var v=b.lower,w=b.upper,S=b.lowerOpen,b=b.upperOpen;return v===void 0?w===void 0?null:t.upperBound(w,!!b):w===void 0?t.lowerBound(v,!!S):t.bound(v,w,!!S,!!b)}function s(O){var v,w=O.name;return{name:w,schema:O,mutate:function(S){var b=S.trans,k=S.type,T=S.keys,R=S.values,P=S.range;return new Promise(function(F,z){F=Te(F);var q=b.objectStore(w),B=q.keyPath==null,V=k==="put"||k==="add";if(!V&&k!=="delete"&&k!=="deleteRange")throw new Error("Invalid operation type: "+k);var Y,X=(T||R||{length:1}).length;if(T&&R&&T.length!==R.length)throw new Error("Given keys array must have same length as given values array.");if(X===0)return F({numFailures:0,failures:{},results:[],lastResult:void 0});function me(Ue){++Ge,rn(Ue)}var ve=[],ge=[],Ge=0;if(k==="deleteRange"){if(P.type===4)return F({numFailures:Ge,failures:ge,results:[],lastResult:void 0});P.type===3?ve.push(Y=q.clear()):ve.push(Y=q.delete(i(P)))}else{var B=V?B?[R,T]:[R,null]:[T,null],he=B[0],Ke=B[1];if(V)for(var Ie=0;Ie<X;++Ie)ve.push(Y=Ke&&Ke[Ie]!==void 0?q[k](he[Ie],Ke[Ie]):q[k](he[Ie])),Y.onerror=me;else for(Ie=0;Ie<X;++Ie)ve.push(Y=q[k](he[Ie])),Y.onerror=me}function or(Ue){Ue=Ue.target.result,ve.forEach(function(Tt,ii){return Tt.error!=null&&(ge[ii]=Tt.error)}),F({numFailures:Ge,failures:ge,results:k==="delete"?T:ve.map(function(Tt){return Tt.result}),lastResult:Ue})}Y.onerror=function(Ue){me(Ue),or(Ue)},Y.onsuccess=or})},getMany:function(S){var b=S.trans,k=S.keys;return new Promise(function(T,R){T=Te(T);for(var P,F=b.objectStore(w),z=k.length,q=new Array(z),B=0,V=0,Y=function(ve){ve=ve.target,q[ve._pos]=ve.result,++V===B&&T(q)},X=rt(R),me=0;me<z;++me)k[me]!=null&&((P=F.get(k[me]))._pos=me,P.onsuccess=Y,P.onerror=X,++B);B===0&&T(q)})},get:function(S){var b=S.trans,k=S.key;return new Promise(function(T,R){T=Te(T);var P=b.objectStore(w).get(k);P.onsuccess=function(F){return T(F.target.result)},P.onerror=rt(R)})},query:(v=g,function(S){return new Promise(function(b,k){b=Te(b);var T,R,P,B=S.trans,F=S.values,z=S.limit,Y=S.query,q=z===1/0?void 0:z,V=Y.index,Y=Y.range,B=B.objectStore(w),V=V.isPrimaryKey?B:B.index(V.name),Y=i(Y);if(z===0)return b({result:[]});v?((q=F?V.getAll(Y,q):V.getAllKeys(Y,q)).onsuccess=function(X){return b({result:X.target.result})},q.onerror=rt(k)):(T=0,R=!F&&"openKeyCursor"in V?V.openKeyCursor(Y):V.openCursor(Y),P=[],R.onsuccess=function(X){var me=R.result;return me?(P.push(F?me.value:me.primaryKey),++T===z?b({result:P}):void me.continue()):b({result:P})},R.onerror=rt(k))})}),openCursor:function(S){var b=S.trans,k=S.values,T=S.query,R=S.reverse,P=S.unique;return new Promise(function(F,z){F=Te(F);var V=T.index,q=T.range,B=b.objectStore(w),B=V.isPrimaryKey?B:B.index(V.name),V=R?P?"prevunique":"prev":P?"nextunique":"next",Y=!k&&"openKeyCursor"in B?B.openKeyCursor(i(q),V):B.openCursor(i(q),V);Y.onerror=rt(z),Y.onsuccess=Te(function(X){var me,ve,ge,Ge,he=Y.result;he?(he.___id=++bu,he.done=!1,me=he.continue.bind(he),ve=(ve=he.continuePrimaryKey)&&ve.bind(he),ge=he.advance.bind(he),Ge=function(){throw new Error("Cursor not stopped")},he.trans=b,he.stop=he.continue=he.continuePrimaryKey=he.advance=function(){throw new Error("Cursor not started")},he.fail=Te(z),he.next=function(){var Ke=this,Ie=1;return this.start(function(){return Ie--?Ke.continue():Ke.stop()}).then(function(){return Ke})},he.start=function(Ke){function Ie(){if(Y.result)try{Ke()}catch(Ue){he.fail(Ue)}else he.done=!0,he.start=function(){throw new Error("Cursor behind last entry")},he.stop()}var or=new Promise(function(Ue,Tt){Ue=Te(Ue),Y.onerror=rt(Tt),he.fail=Tt,he.stop=function(ii){he.stop=he.continue=he.continuePrimaryKey=he.advance=Ge,Ue(ii)}});return Y.onsuccess=Te(function(Ue){Y.onsuccess=Ie,Ie()}),he.continue=me,he.continuePrimaryKey=ve,he.advance=ge,Ie(),or},F(he)):F(null)},z)})},count:function(S){var b=S.query,k=S.trans,T=b.index,R=b.range;return new Promise(function(P,F){var z=k.objectStore(w),q=T.isPrimaryKey?z:z.index(T.name),z=i(R),q=z?q.count(z):q.count();q.onsuccess=Te(function(B){return P(B.target.result)}),q.onerror=rt(F)})}}}var c,f,p,_=(f=y,p=Ho((c=e).objectStoreNames),{schema:{name:c.name,tables:p.map(function(O){return f.objectStore(O)}).map(function(O){var v=O.keyPath,b=O.autoIncrement,w=x(v),S={},b={name:O.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:v==null,compound:w,keyPath:v,autoIncrement:b,unique:!0,extractKey:Kr(v)},indexes:Ho(O.indexNames).map(function(k){return O.index(k)}).map(function(P){var T=P.name,R=P.unique,F=P.multiEntry,P=P.keyPath,F={name:T,compound:x(P),keyPath:P,unique:R,multiEntry:F,extractKey:Kr(P)};return S[an(P)]=F}),getIndexByKeyPath:function(k){return S[an(k)]}};return S[":id"]=b.primaryKey,v!=null&&(S[an(v)]=b.primaryKey),b})},hasGetAll:0<p.length&&"getAll"in f.objectStore(p[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),y=_.schema,g=_.hasGetAll,_=y.tables.map(s),m={};return _.forEach(function(O){return m[O.name]=O}),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(O){if(!m[O])throw new Error("Table '".concat(O,"' not found"));return m[O]},MIN_KEY:-1/0,MAX_KEY:sn(t),schema:y}}function _u(e,t,n,i){var s=n.IDBKeyRange;return n.indexedDB,{dbcore:(i=wu(t,s,i),e.dbcore.reduce(function(c,f){return f=f.create,a(a({},c),f(c))},i))}}function Vn(e,i){var n=i.db,i=_u(e._middlewares,n,e._deps,i);e.core=i.dbcore,e.tables.forEach(function(s){var c=s.name;e.core.schema.tables.some(function(f){return f.name===c})&&(s.core=e.core.table(c),e[c]instanceof e.Table&&(e[c].core=s.core))})}function Wn(e,t,n,i){n.forEach(function(s){var c=i[s];t.forEach(function(f){var p=function y(g,_){return E(g,_)||(g=C(g))&&y(g,_)}(f,s);(!p||"value"in p&&p.value===void 0)&&(f===e.Transaction.prototype||f instanceof e.Transaction?N(f,s,{get:function(){return this.table(s)},set:function(y){ue(this,s,{value:y,writable:!0,configurable:!0,enumerable:!0})}}):f[s]=new e.Table(s,c))})})}function Ir(e,t){t.forEach(function(n){for(var i in n)n[i]instanceof e.Table&&delete n[i]})}function xu(e,t){return e._cfg.version-t._cfg.version}function Su(e,t,n,i){var s=e._dbSchema;n.objectStoreNames.contains("$meta")&&!s.$meta&&(s.$meta=Br("$meta",Vo("")[0],[]),e._storeNames.push("$meta"));var c=e._createTransaction("readwrite",e._storeNames,s);c.create(n),c._completion.catch(i);var f=c._reject.bind(c),p=ie.transless||ie;ct(function(){return ie.trans=c,ie.transless=p,t!==0?(Vn(e,n),g=t,((y=c).storeNames.includes("$meta")?y.table("$meta").get("version").then(function(_){return _??g}):W.resolve(g)).then(function(_){return O=_,v=c,w=n,S=[],_=(m=e)._versions,b=m._dbSchema=Gn(0,m.idbdb,w),(_=_.filter(function(k){return k._cfg.version>=O})).length!==0?(_.forEach(function(k){S.push(function(){var T=b,R=k._cfg.dbschema;Xn(m,T,w),Xn(m,R,w),b=m._dbSchema=R;var P=Lr(T,R);P.add.forEach(function(V){Ur(w,V[0],V[1].primKey,V[1].indexes)}),P.change.forEach(function(V){if(V.recreate)throw new Z.Upgrade("Not yet support for changing primary key");var Y=w.objectStore(V.name);V.add.forEach(function(X){return Jn(Y,X)}),V.change.forEach(function(X){Y.deleteIndex(X.name),Jn(Y,X)}),V.del.forEach(function(X){return Y.deleteIndex(X)})});var F=k._cfg.contentUpgrade;if(F&&k._cfg.version>O){Vn(m,w),v._memoizedTables={};var z=K(R);P.del.forEach(function(V){z[V]=T[V]}),Ir(m,[m.Transaction.prototype]),Wn(m,[m.Transaction.prototype],h(z),z),v.schema=z;var q,B=de(F);return B&&Ct(),P=W.follow(function(){var V;(q=F(v))&&B&&(V=lt.bind(null,null),q.then(V,V))}),q&&typeof q.then=="function"?W.resolve(q):P.then(function(){return q})}}),S.push(function(T){var R,P,F=k._cfg.dbschema;R=F,P=T,[].slice.call(P.db.objectStoreNames).forEach(function(z){return R[z]==null&&P.db.deleteObjectStore(z)}),Ir(m,[m.Transaction.prototype]),Wn(m,[m.Transaction.prototype],m._storeNames,m._dbSchema),v.schema=m._dbSchema}),S.push(function(T){m.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(m.idbdb.version/10)===k._cfg.version?(m.idbdb.deleteObjectStore("$meta"),delete m._dbSchema.$meta,m._storeNames=m._storeNames.filter(function(R){return R!=="$meta"})):T.objectStore("$meta").put(k._cfg.version,"version"))})}),function k(){return S.length?W.resolve(S.shift()(v.idbtrans)).then(k):W.resolve()}().then(function(){zo(b,w)})):W.resolve();var m,O,v,w,S,b}).catch(f)):(h(s).forEach(function(_){Ur(n,_,s[_].primKey,s[_].indexes)}),Vn(e,n),void W.follow(function(){return e.on.populate.fire(c)}).catch(f));var y,g})}function Ou(e,t){zo(e._dbSchema,t),t.db.version%10!=0||t.objectStoreNames.contains("$meta")||t.db.createObjectStore("$meta").add(Math.ceil(t.db.version/10-1),"version");var n=Gn(0,e.idbdb,t);Xn(e,e._dbSchema,t);for(var i=0,s=Lr(n,e._dbSchema).change;i<s.length;i++){var c=function(f){if(f.change.length||f.recreate)return console.warn("Unable to patch indexes of table ".concat(f.name," because it has changes on the type of index or primary key.")),{value:void 0};var p=t.objectStore(f.name);f.add.forEach(function(y){nt&&console.debug("Dexie upgrade patch: Creating missing index ".concat(f.name,".").concat(y.src)),Jn(p,y)})}(s[i]);if(typeof c=="object")return c.value}}function Lr(e,t){var n,i={del:[],add:[],change:[]};for(n in e)t[n]||i.del.push(n);for(n in t){var s=e[n],c=t[n];if(s){var f={name:n,def:c,recreate:!1,del:[],add:[],change:[]};if(""+(s.primKey.keyPath||"")!=""+(c.primKey.keyPath||"")||s.primKey.auto!==c.primKey.auto)f.recreate=!0,i.change.push(f);else{var p=s.idxByName,y=c.idxByName,g=void 0;for(g in p)y[g]||f.del.push(g);for(g in y){var _=p[g],m=y[g];_?_.src!==m.src&&f.change.push(m):f.add.push(m)}(0<f.del.length||0<f.add.length||0<f.change.length)&&i.change.push(f)}}else i.add.push([n,c])}return i}function Ur(e,t,n,i){var s=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return i.forEach(function(c){return Jn(s,c)}),s}function zo(e,t){h(e).forEach(function(n){t.db.objectStoreNames.contains(n)||(nt&&console.debug("Dexie: Creating missing table",n),Ur(t,n,e[n].primKey,e[n].indexes))})}function Jn(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function Gn(e,t,n){var i={};return re(t.objectStoreNames,0).forEach(function(s){for(var c=n.objectStore(s),f=qr(Yo(g=c.keyPath),g||"",!0,!1,!!c.autoIncrement,g&&typeof g!="string",!0),p=[],y=0;y<c.indexNames.length;++y){var _=c.index(c.indexNames[y]),g=_.keyPath,_=qr(_.name,g,!!_.unique,!!_.multiEntry,!1,g&&typeof g!="string",!1);p.push(_)}i[s]=Br(s,f,p)}),i}function Xn(e,t,n){for(var i=n.db.objectStoreNames,s=0;s<i.length;++s){var c=i[s],f=n.objectStore(c);e._hasGetAll="getAll"in f;for(var p=0;p<f.indexNames.length;++p){var y=f.indexNames[p],g=f.index(y).keyPath,_=typeof g=="string"?g:"["+re(g).join("+")+"]";!t[c]||(g=t[c].idxByName[_])&&(g.name=y,delete t[c].idxByName[_],t[c].idxByName[y]=g)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&d.WorkerGlobalScope&&d instanceof d.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}function Vo(e){return e.split(",").map(function(t,n){var i=(t=t.trim()).replace(/([&*]|\+\+)/g,""),s=/^\[/.test(i)?i.match(/^\[(.*)\]$/)[1].split("+"):i;return qr(i,s||null,/\&/.test(t),/\*/.test(t),/\+\+/.test(t),x(s),n===0)})}var Eu=(Qn.prototype._parseStoresSpec=function(e,t){h(e).forEach(function(n){if(e[n]!==null){var i=Vo(e[n]),s=i.shift();if(s.unique=!0,s.multi)throw new Z.Schema("Primary key cannot be multi-valued");i.forEach(function(c){if(c.auto)throw new Z.Schema("Only primary key can be marked as autoIncrement (++)");if(!c.keyPath)throw new Z.Schema("Index must have a name and cannot be an empty string")}),t[n]=Br(n,s,i)}})},Qn.prototype.stores=function(n){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?$(this._cfg.storesSource,n):n;var n=t._versions,i={},s={};return n.forEach(function(c){$(i,c._cfg.storesSource),s=c._cfg.dbschema={},c._parseStoresSpec(i,s)}),t._dbSchema=s,Ir(t,[t._allTables,t,t.Transaction.prototype]),Wn(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],h(s),s),t._storeNames=h(s),this},Qn.prototype.upgrade=function(e){return this._cfg.contentUpgrade=Cn(this._cfg.contentUpgrade||ye,e),this},Qn);function Qn(){}function Yr(e,t){var n=e._dbNamesDB;return n||(n=e._dbNamesDB=new at(Ln,{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),n.table("dbnames")}function Hr(e){return e&&typeof e.databases=="function"}function zr(e){return ct(function(){return ie.letThrough=!0,e()})}function Vr(e){return!("from"in e)}var Be=function(e,t){if(!this){var n=new Be;return e&&"d"in e&&$(n,e),n}$(this,arguments.length?{d:1,from:e,to:1<arguments.length?t:e}:{d:0})};function un(e,t,n){var i=xe(t,n);if(!isNaN(i)){if(0<i)throw RangeError();if(Vr(e))return $(e,{from:t,to:n,d:1});var s=e.l,i=e.r;if(xe(n,e.from)<0)return s?un(s,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Jo(e);if(0<xe(t,e.to))return i?un(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Jo(e);xe(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),0<xe(n,e.to)&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1),n=!e.r,s&&!e.l&&cn(e,s),i&&n&&cn(e,i)}}function cn(e,t){Vr(t)||function n(i,y){var c=y.from,f=y.to,p=y.l,y=y.r;un(i,c,f),p&&n(i,p),y&&n(i,y)}(e,t)}function Wo(e,t){var n=Zn(t),i=n.next();if(i.done)return!1;for(var s=i.value,c=Zn(e),f=c.next(s.from),p=f.value;!i.done&&!f.done;){if(xe(p.from,s.to)<=0&&0<=xe(p.to,s.from))return!0;xe(s.from,p.from)<0?s=(i=n.next(p.from)).value:p=(f=c.next(s.from)).value}return!1}function Zn(e){var t=Vr(e)?null:{s:0,n:e};return{next:function(n){for(var i=0<arguments.length;t;)switch(t.s){case 0:if(t.s=1,i)for(;t.n.l&&xe(n,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!i||xe(n,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function Jo(e){var t,n,i=(((t=e.r)===null||t===void 0?void 0:t.d)||0)-(((n=e.l)===null||n===void 0?void 0:n.d)||0),s=1<i?"r":i<-1?"l":"";s&&(t=s=="r"?"l":"r",n=a({},e),i=e[s],e.from=i.from,e.to=i.to,e[s]=i[s],n[s]=i[t],(e[t]=n).d=Go(n)),e.d=Go(e)}function Go(n){var t=n.r,n=n.l;return(t?n?Math.max(t.d,n.d):t.d:n?n.d:0)+1}function er(e,t){return h(t).forEach(function(n){e[n]?cn(e[n],t[n]):e[n]=function i(s){var c,f,p={};for(c in s)M(s,c)&&(f=s[c],p[c]=!f||typeof f!="object"||ne.has(f.constructor)?f:i(f));return p}(t[n])}),e}function Wr(e,t){return e.all||t.all||Object.keys(e).some(function(n){return t[n]&&Wo(t[n],e[n])})}ae(Be.prototype,((Qe={add:function(e){return cn(this,e),this},addKey:function(e){return un(this,e,e),this},addKeys:function(e){var t=this;return e.forEach(function(n){return un(t,n,n)}),this},hasKey:function(e){var t=Zn(this).next(e).value;return t&&xe(t.from,e)<=0&&0<=xe(t.to,e)}})[I]=function(){return Zn(this)},Qe));var Et={},Jr={},Gr=!1;function tr(e){er(Jr,e),Gr||(Gr=!0,setTimeout(function(){Gr=!1,Xr(Jr,!(Jr={}))},0))}function Xr(e,t){t===void 0&&(t=!1);var n=new Set;if(e.all)for(var i=0,s=Object.values(Et);i<s.length;i++)Xo(f=s[i],e,n,t);else for(var c in e){var f,p=/^idb\:\/\/(.*)\/(.*)\//.exec(c);p&&(c=p[1],p=p[2],(f=Et["idb://".concat(c,"/").concat(p)])&&Xo(f,e,n,t))}n.forEach(function(y){return y()})}function Xo(e,t,n,i){for(var s=[],c=0,f=Object.entries(e.queries.query);c<f.length;c++){for(var p=f[c],y=p[0],g=[],_=0,m=p[1];_<m.length;_++){var O=m[_];Wr(t,O.obsSet)?O.subscribers.forEach(function(b){return n.add(b)}):i&&g.push(O)}i&&s.push([y,g])}if(i)for(var v=0,w=s;v<w.length;v++){var S=w[v],y=S[0],g=S[1];e.queries.query[y]=g}}function ku(e){var t=e._state,n=e._deps.indexedDB;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then(function(){return t.dbOpenError?$e(t.dbOpenError):e});t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;var i=t.openCanceller,s=Math.round(10*e.verno),c=!1;function f(){if(t.openCanceller!==i)throw new Z.DatabaseClosed("db.open() was cancelled")}function p(){return new W(function(O,v){if(f(),!n)throw new Z.MissingAPI;var w=e.name,S=t.autoSchema||!s?n.open(w):n.open(w,s);if(!S)throw new Z.MissingAPI;S.onerror=rt(v),S.onblocked=Te(e._fireOnBlocked),S.onupgradeneeded=Te(function(b){var k;_=S.transaction,t.autoSchema&&!e._options.allowEmptyDB?(S.onerror=rn,_.abort(),S.result.close(),(k=n.deleteDatabase(w)).onsuccess=k.onerror=Te(function(){v(new Z.NoSuchDatabase("Database ".concat(w," doesnt exist")))})):(_.onerror=rt(v),b=b.oldVersion>Math.pow(2,62)?0:b.oldVersion,m=b<1,e.idbdb=S.result,c&&Ou(e,_),Su(e,b/10,_,v))},v),S.onsuccess=Te(function(){_=null;var b,k,T,R,P,F=e.idbdb=S.result,z=re(F.objectStoreNames);if(0<z.length)try{var q=F.transaction((R=z).length===1?R[0]:R,"readonly");if(t.autoSchema)k=F,T=q,(b=e).verno=k.version/10,T=b._dbSchema=Gn(0,k,T),b._storeNames=re(k.objectStoreNames,0),Wn(b,[b._allTables],h(T),T);else if(Xn(e,e._dbSchema,q),((P=Lr(Gn(0,(P=e).idbdb,q),P._dbSchema)).add.length||P.change.some(function(B){return B.add.length||B.change.length}))&&!c)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),F.close(),s=F.version+1,c=!0,O(p());Vn(e,q)}catch{}jt.push(e),F.onversionchange=Te(function(B){t.vcFired=!0,e.on("versionchange").fire(B)}),F.onclose=Te(function(B){e.on("close").fire(B)}),m&&(P=e._deps,q=w,F=P.indexedDB,P=P.IDBKeyRange,Hr(F)||q===Ln||Yr(F,P).put({name:q}).catch(ye)),O()},v)}).catch(function(O){switch(O==null?void 0:O.name){case"UnknownError":if(0<t.PR1398_maxLoop)return t.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),p();break;case"VersionError":if(0<s)return s=0,p()}return W.reject(O)})}var y,g=t.dbReadyResolve,_=null,m=!1;return W.race([i,(typeof navigator>"u"?W.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(O){function v(){return indexedDB.databases().finally(O)}y=setInterval(v,100),v()}).finally(function(){return clearInterval(y)}):Promise.resolve()).then(p)]).then(function(){return f(),t.onReadyBeingFired=[],W.resolve(zr(function(){return e.on.ready.fire(e.vip)})).then(function O(){if(0<t.onReadyBeingFired.length){var v=t.onReadyBeingFired.reduce(Cn,ye);return t.onReadyBeingFired=[],W.resolve(zr(function(){return v(e.vip)})).then(O)}})}).finally(function(){t.openCanceller===i&&(t.onReadyBeingFired=null,t.isBeingOpened=!1)}).catch(function(O){t.dbOpenError=O;try{_&&_.abort()}catch{}return i===t.openCanceller&&e._close(),$e(O)}).finally(function(){t.openComplete=!0,g()}).then(function(){var O;return m&&(O={},e.tables.forEach(function(v){v.schema.indexes.forEach(function(w){w.name&&(O["idb://".concat(e.name,"/").concat(v.name,"/").concat(w.name)]=new Be(-1/0,[[[]]]))}),O["idb://".concat(e.name,"/").concat(v.name,"/")]=O["idb://".concat(e.name,"/").concat(v.name,"/:dels")]=new Be(-1/0,[[[]]])}),ht(on).fire(O),Xr(O,!0)),e})}function Qr(e){function t(c){return e.next(c)}var n=s(t),i=s(function(c){return e.throw(c)});function s(c){return function(y){var p=c(y),y=p.value;return p.done?y:y&&typeof y.then=="function"?y.then(n,i):x(y)?Promise.all(y).then(n,i):n(y)}}return s(t)()}function nr(e,t,n){for(var i=x(e)?e.slice():[e],s=0;s<n;++s)i.push(t);return i}var Tu={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return a(a({},e),{table:function(t){var n=e.table(t),i=n.schema,s={},c=[];function f(m,O,v){var w=an(m),S=s[w]=s[w]||[],b=m==null?0:typeof m=="string"?1:m.length,k=0<O,k=a(a({},v),{name:k?"".concat(w,"(virtual-from:").concat(v.name,")"):v.name,lowLevelIndex:v,isVirtual:k,keyTail:O,keyLength:b,extractKey:Kr(m),unique:!k&&v.unique});return S.push(k),k.isPrimaryKey||c.push(k),1<b&&f(b===2?m[0]:m.slice(0,b-1),O+1,v),S.sort(function(T,R){return T.keyTail-R.keyTail}),k}t=f(i.primaryKey.keyPath,0,i.primaryKey),s[":id"]=[t];for(var p=0,y=i.indexes;p<y.length;p++){var g=y[p];f(g.keyPath,0,g)}function _(m){var O,v=m.query.index;return v.isVirtual?a(a({},m),{query:{index:v.lowLevelIndex,range:(O=m.query.range,v=v.keyTail,{type:O.type===1?2:O.type,lower:nr(O.lower,O.lowerOpen?e.MAX_KEY:e.MIN_KEY,v),lowerOpen:!0,upper:nr(O.upper,O.upperOpen?e.MIN_KEY:e.MAX_KEY,v),upperOpen:!0})}}):m}return a(a({},n),{schema:a(a({},i),{primaryKey:t,indexes:c,getIndexByKeyPath:function(m){return(m=s[an(m)])&&m[0]}}),count:function(m){return n.count(_(m))},query:function(m){return n.query(_(m))},openCursor:function(m){var O=m.query.index,v=O.keyTail,w=O.isVirtual,S=O.keyLength;return w?n.openCursor(_(m)).then(function(k){return k&&b(k)}):n.openCursor(m);function b(k){return Object.create(k,{continue:{value:function(T){T!=null?k.continue(nr(T,m.reverse?e.MAX_KEY:e.MIN_KEY,v)):m.unique?k.continue(k.key.slice(0,S).concat(m.reverse?e.MIN_KEY:e.MAX_KEY,v)):k.continue()}},continuePrimaryKey:{value:function(T,R){k.continuePrimaryKey(nr(T,e.MAX_KEY,v),R)}},primaryKey:{get:function(){return k.primaryKey}},key:{get:function(){var T=k.key;return S===1?T[0]:T.slice(0,S)}},value:{get:function(){return k.value}}})}}})}})}};function Zr(e,t,n,i){return n=n||{},i=i||"",h(e).forEach(function(s){var c,f,p;M(t,s)?(c=e[s],f=t[s],typeof c=="object"&&typeof f=="object"&&c&&f?(p=H(c))!==H(f)?n[i+s]=t[s]:p==="Object"?Zr(c,f,n,i+s+"."):c!==f&&(n[i+s]=t[s]):c!==f&&(n[i+s]=t[s])):n[i+s]=void 0}),h(t).forEach(function(s){M(e,s)||(n[i+s]=t[s])}),n}function ei(e,t){return t.type==="delete"?t.keys:t.keys||t.values.map(e.extractKey)}var Ru={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return a(a({},e),{table:function(t){var n=e.table(t),i=n.schema.primaryKey;return a(a({},n),{mutate:function(s){var c=ie.trans,f=c.table(t).hook,p=f.deleting,y=f.creating,g=f.updating;switch(s.type){case"add":if(y.fire===ye)break;return c._promise("readwrite",function(){return _(s)},!0);case"put":if(y.fire===ye&&g.fire===ye)break;return c._promise("readwrite",function(){return _(s)},!0);case"delete":if(p.fire===ye)break;return c._promise("readwrite",function(){return _(s)},!0);case"deleteRange":if(p.fire===ye)break;return c._promise("readwrite",function(){return function m(O,v,w){return n.query({trans:O,values:!1,query:{index:i,range:v},limit:w}).then(function(S){var b=S.result;return _({type:"delete",keys:b,trans:O}).then(function(k){return 0<k.numFailures?Promise.reject(k.failures[0]):b.length<w?{failures:[],numFailures:0,lastResult:void 0}:m(O,a(a({},v),{lower:b[b.length-1],lowerOpen:!0}),w)})})}(s.trans,s.range,1e4)},!0)}return n.mutate(s);function _(m){var O,v,w,S=ie.trans,b=m.keys||ei(i,m);if(!b)throw new Error("Keys missing");return(m=m.type==="add"||m.type==="put"?a(a({},m),{keys:b}):a({},m)).type!=="delete"&&(m.values=l([],m.values)),m.keys&&(m.keys=l([],m.keys)),O=n,w=b,((v=m).type==="add"?Promise.resolve([]):O.getMany({trans:v.trans,keys:w,cache:"immutable"})).then(function(k){var T=b.map(function(R,P){var F,z,q,B=k[P],V={onerror:null,onsuccess:null};return m.type==="delete"?p.fire.call(V,R,B,S):m.type==="add"||B===void 0?(F=y.fire.call(V,R,m.values[P],S),R==null&&F!=null&&(m.keys[P]=R=F,i.outbound||U(m.values[P],i.keyPath,R))):(F=Zr(B,m.values[P]),(z=g.fire.call(V,F,R,B,S))&&(q=m.values[P],Object.keys(z).forEach(function(Y){M(q,Y)?q[Y]=z[Y]:U(q,Y,z[Y])}))),V});return n.mutate(m).then(function(R){for(var P=R.failures,F=R.results,z=R.numFailures,R=R.lastResult,q=0;q<b.length;++q){var B=(F||b)[q],V=T[q];B==null?V.onerror&&V.onerror(P[q]):V.onsuccess&&V.onsuccess(m.type==="put"&&k[q]?m.values[q]:B)}return{failures:P,results:F,numFailures:z,lastResult:R}}).catch(function(R){return T.forEach(function(P){return P.onerror&&P.onerror(R)}),Promise.reject(R)})})}}})}})}};function Qo(e,t,n){try{if(!t||t.keys.length<e.length)return null;for(var i=[],s=0,c=0;s<t.keys.length&&c<e.length;++s)xe(t.keys[s],e[c])===0&&(i.push(n?we(t.values[s]):t.values[s]),++c);return i.length===e.length?i:null}catch{return null}}var Au={stack:"dbcore",level:-1,create:function(e){return{table:function(t){var n=e.table(t);return a(a({},n),{getMany:function(i){if(!i.cache)return n.getMany(i);var s=Qo(i.keys,i.trans._cache,i.cache==="clone");return s?W.resolve(s):n.getMany(i).then(function(c){return i.trans._cache={keys:i.keys,values:i.cache==="clone"?we(c):c},c})},mutate:function(i){return i.type!=="add"&&(i.trans._cache=null),n.mutate(i)}})}}}};function Zo(e,t){return e.trans.mode==="readonly"&&!!e.subscr&&!e.trans.explicit&&e.trans.db._options.cache!=="disabled"&&!t.schema.primaryKey.outbound}function es(e,t){switch(e){case"query":return t.values&&!t.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var $u={stack:"dbcore",level:0,name:"Observability",create:function(e){var t=e.schema.name,n=new Be(e.MIN_KEY,e.MAX_KEY);return a(a({},e),{transaction:function(i,s,c){if(ie.subscr&&s!=="readonly")throw new Z.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(ie.querier));return e.transaction(i,s,c)},table:function(i){var s=e.table(i),c=s.schema,f=c.primaryKey,m=c.indexes,p=f.extractKey,y=f.outbound,g=f.autoIncrement&&m.filter(function(v){return v.compound&&v.keyPath.includes(f.keyPath)}),_=a(a({},s),{mutate:function(v){function w(Y){return Y="idb://".concat(t,"/").concat(i,"/").concat(Y),R[Y]||(R[Y]=new Be)}var S,b,k,T=v.trans,R=v.mutatedParts||(v.mutatedParts={}),P=w(""),F=w(":dels"),z=v.type,V=v.type==="deleteRange"?[v.range]:v.type==="delete"?[v.keys]:v.values.length<50?[ei(f,v).filter(function(Y){return Y}),v.values]:[],q=V[0],B=V[1],V=v.trans._cache;return x(q)?(P.addKeys(q),(V=z==="delete"||q.length===B.length?Qo(q,V):null)||F.addKeys(q),(V||B)&&(S=w,b=V,k=B,c.indexes.forEach(function(Y){var X=S(Y.name||"");function me(ge){return ge!=null?Y.extractKey(ge):null}function ve(ge){return Y.multiEntry&&x(ge)?ge.forEach(function(Ge){return X.addKey(Ge)}):X.addKey(ge)}(b||k).forEach(function(ge,Ke){var he=b&&me(b[Ke]),Ke=k&&me(k[Ke]);xe(he,Ke)!==0&&(he!=null&&ve(he),Ke!=null&&ve(Ke))})}))):q?(B={from:(B=q.lower)!==null&&B!==void 0?B:e.MIN_KEY,to:(B=q.upper)!==null&&B!==void 0?B:e.MAX_KEY},F.add(B),P.add(B)):(P.add(n),F.add(n),c.indexes.forEach(function(Y){return w(Y.name).add(n)})),s.mutate(v).then(function(Y){return!q||v.type!=="add"&&v.type!=="put"||(P.addKeys(Y.results),g&&g.forEach(function(X){for(var me=v.values.map(function(he){return X.extractKey(he)}),ve=X.keyPath.findIndex(function(he){return he===f.keyPath}),ge=0,Ge=Y.results.length;ge<Ge;++ge)me[ge][ve]=Y.results[ge];w(X.name).addKeys(me)})),T.mutatedParts=er(T.mutatedParts||{},R),Y})}}),m=function(w){var S=w.query,w=S.index,S=S.range;return[w,new Be((w=S.lower)!==null&&w!==void 0?w:e.MIN_KEY,(S=S.upper)!==null&&S!==void 0?S:e.MAX_KEY)]},O={get:function(v){return[f,new Be(v.key)]},getMany:function(v){return[f,new Be().addKeys(v.keys)]},count:m,query:m,openCursor:m};return h(O).forEach(function(v){_[v]=function(w){var S=ie.subscr,b=!!S,k=Zo(ie,s)&&es(v,w)?w.obsSet={}:S;if(b){var T=function(B){return B="idb://".concat(t,"/").concat(i,"/").concat(B),k[B]||(k[B]=new Be)},R=T(""),P=T(":dels"),S=O[v](w),b=S[0],S=S[1];if((v==="query"&&b.isPrimaryKey&&!w.values?P:T(b.name||"")).add(S),!b.isPrimaryKey){if(v!=="count"){var F=v==="query"&&y&&w.values&&s.query(a(a({},w),{values:!1}));return s[v].apply(this,arguments).then(function(B){if(v==="query"){if(y&&w.values)return F.then(function(me){return me=me.result,R.addKeys(me),B});var V=w.values?B.result.map(p):B.result;(w.values?R:P).addKeys(V)}else if(v==="openCursor"){var Y=B,X=w.values;return Y&&Object.create(Y,{key:{get:function(){return P.addKey(Y.primaryKey),Y.key}},primaryKey:{get:function(){var me=Y.primaryKey;return P.addKey(me),me}},value:{get:function(){return X&&R.addKey(Y.primaryKey),Y.value}}})}return B})}P.add(n)}}return s[v].apply(this,arguments)}}),_}})}};function ts(e,t,n){if(n.numFailures===0)return t;if(t.type==="deleteRange")return null;var i=t.keys?t.keys.length:"values"in t&&t.values?t.values.length:1;return n.numFailures===i?null:(t=a({},t),x(t.keys)&&(t.keys=t.keys.filter(function(s,c){return!(c in n.failures)})),"values"in t&&x(t.values)&&(t.values=t.values.filter(function(s,c){return!(c in n.failures)})),t)}function ti(e,t){return n=e,((i=t).lower===void 0||(i.lowerOpen?0<xe(n,i.lower):0<=xe(n,i.lower)))&&(e=e,(t=t).upper===void 0||(t.upperOpen?xe(e,t.upper)<0:xe(e,t.upper)<=0));var n,i}function ns(e,t,O,i,s,c){if(!O||O.length===0)return e;var f=t.query.index,p=f.multiEntry,y=t.query.range,g=i.schema.primaryKey.extractKey,_=f.extractKey,m=(f.lowLevelIndex||f).extractKey,O=O.reduce(function(v,w){var S=v,b=[];if(w.type==="add"||w.type==="put")for(var k=new Be,T=w.values.length-1;0<=T;--T){var R,P=w.values[T],F=g(P);k.hasKey(F)||(R=_(P),(p&&x(R)?R.some(function(Y){return ti(Y,y)}):ti(R,y))&&(k.addKey(F),b.push(P)))}switch(w.type){case"add":var z=new Be().addKeys(t.values?v.map(function(X){return g(X)}):v),S=v.concat(t.values?b.filter(function(X){return X=g(X),!z.hasKey(X)&&(z.addKey(X),!0)}):b.map(function(X){return g(X)}).filter(function(X){return!z.hasKey(X)&&(z.addKey(X),!0)}));break;case"put":var q=new Be().addKeys(w.values.map(function(X){return g(X)}));S=v.filter(function(X){return!q.hasKey(t.values?g(X):X)}).concat(t.values?b:b.map(function(X){return g(X)}));break;case"delete":var B=new Be().addKeys(w.keys);S=v.filter(function(X){return!B.hasKey(t.values?g(X):X)});break;case"deleteRange":var V=w.range;S=v.filter(function(X){return!ti(g(X),V)})}return S},e);return O===e?e:(O.sort(function(v,w){return xe(m(v),m(w))||xe(g(v),g(w))}),t.limit&&t.limit<1/0&&(O.length>t.limit?O.length=t.limit:e.length===t.limit&&O.length<t.limit&&(s.dirty=!0)),c?Object.freeze(O):O)}function rs(e,t){return xe(e.lower,t.lower)===0&&xe(e.upper,t.upper)===0&&!!e.lowerOpen==!!t.lowerOpen&&!!e.upperOpen==!!t.upperOpen}function Pu(e,t){return function(n,i,s,c){if(n===void 0)return i!==void 0?-1:0;if(i===void 0)return 1;if((i=xe(n,i))===0){if(s&&c)return 0;if(s)return 1;if(c)return-1}return i}(e.lower,t.lower,e.lowerOpen,t.lowerOpen)<=0&&0<=function(n,i,s,c){if(n===void 0)return i!==void 0?1:0;if(i===void 0)return-1;if((i=xe(n,i))===0){if(s&&c)return 0;if(s)return-1;if(c)return 1}return i}(e.upper,t.upper,e.upperOpen,t.upperOpen)}function Du(e,t,n,i){e.subscribers.add(n),i.addEventListener("abort",function(){var s,c;e.subscribers.delete(n),e.subscribers.size===0&&(s=e,c=t,setTimeout(function(){s.subscribers.size===0&&L(c,s)},3e3))})}var Cu={stack:"dbcore",level:0,name:"Cache",create:function(e){var t=e.schema.name;return a(a({},e),{transaction:function(n,i,s){var c,f,p=e.transaction(n,i,s);return i==="readwrite"&&(f=(c=new AbortController).signal,s=function(y){return function(){if(c.abort(),i==="readwrite"){for(var g=new Set,_=0,m=n;_<m.length;_++){var O=m[_],v=Et["idb://".concat(t,"/").concat(O)];if(v){var w=e.table(O),S=v.optimisticOps.filter(function(X){return X.trans===p});if(p._explicit&&y&&p.mutatedParts)for(var b=0,k=Object.values(v.queries.query);b<k.length;b++)for(var T=0,R=(z=k[b]).slice();T<R.length;T++)Wr((q=R[T]).obsSet,p.mutatedParts)&&(L(z,q),q.subscribers.forEach(function(X){return g.add(X)}));else if(0<S.length){v.optimisticOps=v.optimisticOps.filter(function(X){return X.trans!==p});for(var P=0,F=Object.values(v.queries.query);P<F.length;P++)for(var z,q,B,V=0,Y=(z=F[P]).slice();V<Y.length;V++)(q=Y[V]).res!=null&&p.mutatedParts&&(y&&!q.dirty?(B=Object.isFrozen(q.res),B=ns(q.res,q.req,S,w,q,B),q.dirty?(L(z,q),q.subscribers.forEach(function(X){return g.add(X)})):B!==q.res&&(q.res=B,q.promise=W.resolve({result:B}))):(q.dirty&&L(z,q),q.subscribers.forEach(function(X){return g.add(X)})))}}}g.forEach(function(X){return X()})}}},p.addEventListener("abort",s(!1),{signal:f}),p.addEventListener("error",s(!1),{signal:f}),p.addEventListener("complete",s(!0),{signal:f})),p},table:function(n){var i=e.table(n),s=i.schema.primaryKey;return a(a({},i),{mutate:function(c){var f=ie.trans;if(s.outbound||f.db._options.cache==="disabled"||f.explicit||f.idbtrans.mode!=="readwrite")return i.mutate(c);var p=Et["idb://".concat(t,"/").concat(n)];return p?(f=i.mutate(c),c.type!=="add"&&c.type!=="put"||!(50<=c.values.length||ei(s,c).some(function(y){return y==null}))?(p.optimisticOps.push(c),c.mutatedParts&&tr(c.mutatedParts),f.then(function(y){0<y.numFailures&&(L(p.optimisticOps,c),(y=ts(0,c,y))&&p.optimisticOps.push(y),c.mutatedParts&&tr(c.mutatedParts))}),f.catch(function(){L(p.optimisticOps,c),c.mutatedParts&&tr(c.mutatedParts)})):f.then(function(y){var g=ts(0,a(a({},c),{values:c.values.map(function(_,m){var O;return y.failures[m]?_:(_=(O=s.keyPath)!==null&&O!==void 0&&O.includes(".")?we(_):a({},_),U(_,s.keyPath,y.results[m]),_)})}),y);p.optimisticOps.push(g),queueMicrotask(function(){return c.mutatedParts&&tr(c.mutatedParts)})}),f):i.mutate(c)},query:function(c){if(!Zo(ie,i)||!es("query",c))return i.query(c);var f=((g=ie.trans)===null||g===void 0?void 0:g.db._options.cache)==="immutable",m=ie,p=m.requery,y=m.signal,g=function(w,S,b,k){var T=Et["idb://".concat(w,"/").concat(S)];if(!T)return[];if(!(S=T.queries[b]))return[null,!1,T,null];var R=S[(k.query?k.query.index.name:null)||""];if(!R)return[null,!1,T,null];switch(b){case"query":var P=R.find(function(F){return F.req.limit===k.limit&&F.req.values===k.values&&rs(F.req.query.range,k.query.range)});return P?[P,!0,T,R]:[R.find(function(F){return("limit"in F.req?F.req.limit:1/0)>=k.limit&&(!k.values||F.req.values)&&Pu(F.req.query.range,k.query.range)}),!1,T,R];case"count":return P=R.find(function(F){return rs(F.req.query.range,k.query.range)}),[P,!!P,T,R]}}(t,n,"query",c),_=g[0],m=g[1],O=g[2],v=g[3];return _&&m?_.obsSet=c.obsSet:(m=i.query(c).then(function(w){var S=w.result;if(_&&(_.res=S),f){for(var b=0,k=S.length;b<k;++b)Object.freeze(S[b]);Object.freeze(S)}else w.result=we(S);return w}).catch(function(w){return v&&_&&L(v,_),Promise.reject(w)}),_={obsSet:c.obsSet,promise:m,subscribers:new Set,type:"query",req:c,dirty:!1},v?v.push(_):(v=[_],(O=O||(Et["idb://".concat(t,"/").concat(n)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[c.query.index.name||""]=v)),Du(_,v,p,y),_.promise.then(function(w){return{result:ns(w.result,c,O==null?void 0:O.optimisticOps,i,_,f)}})}})}})}};function rr(e,t){return new Proxy(e,{get:function(n,i,s){return i==="db"?t:Reflect.get(n,i,s)}})}var at=(Pe.prototype.version=function(e){if(isNaN(e)||e<.1)throw new Z.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new Z.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,n=t.filter(function(i){return i._cfg.version===e})[0];return n||(n=new this.Version(e),t.push(n),t.sort(xu),n.stores({}),this._state.autoSchema=!1,n)},Pe.prototype._whenReady=function(e){var t=this;return this.idbdb&&(this._state.openComplete||ie.letThrough||this._vip)?e():new W(function(n,i){if(t._state.openComplete)return i(new Z.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._state.autoOpen)return void i(new Z.DatabaseClosed);t.open().catch(ye)}t._state.dbReadyPromise.then(n,i)}).then(e)},Pe.prototype.use=function(e){var t=e.stack,n=e.create,i=e.level,s=e.name;return s&&this.unuse({stack:t,name:s}),e=this._middlewares[t]||(this._middlewares[t]=[]),e.push({stack:t,create:n,level:i??10,name:s}),e.sort(function(c,f){return c.level-f.level}),this},Pe.prototype.unuse=function(e){var t=e.stack,n=e.name,i=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter(function(s){return i?s.create!==i:!!n&&s.name!==n})),this},Pe.prototype.open=function(){var e=this;return xt(ut,function(){return ku(e)})},Pe.prototype._close=function(){var e=this._state,t=jt.indexOf(this);if(0<=t&&jt.splice(t,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}e.isBeingOpened||(e.dbReadyPromise=new W(function(n){e.dbReadyResolve=n}),e.openCanceller=new W(function(n,i){e.cancelOpen=i}))},Pe.prototype.close=function(n){var t=(n===void 0?{disableAutoOpen:!0}:n).disableAutoOpen,n=this._state;t?(n.isBeingOpened&&n.cancelOpen(new Z.DatabaseClosed),this._close(),n.autoOpen=!1,n.dbOpenError=new Z.DatabaseClosed):(this._close(),n.autoOpen=this._options.autoOpen||n.isBeingOpened,n.openComplete=!1,n.dbOpenError=null)},Pe.prototype.delete=function(e){var t=this;e===void 0&&(e={disableAutoOpen:!0});var n=0<arguments.length&&typeof arguments[0]!="object",i=this._state;return new W(function(s,c){function f(){t.close(e);var p=t._deps.indexedDB.deleteDatabase(t.name);p.onsuccess=Te(function(){var y,g,_;y=t._deps,g=t.name,_=y.indexedDB,y=y.IDBKeyRange,Hr(_)||g===Ln||Yr(_,y).delete(g).catch(ye),s()}),p.onerror=rt(c),p.onblocked=t._fireOnBlocked}if(n)throw new Z.InvalidArgument("Invalid closeOptions argument to db.delete()");i.isBeingOpened?i.dbReadyPromise.then(f):f()})},Pe.prototype.backendDB=function(){return this.idbdb},Pe.prototype.isOpen=function(){return this.idbdb!==null},Pe.prototype.hasBeenClosed=function(){var e=this._state.dbOpenError;return e&&e.name==="DatabaseClosed"},Pe.prototype.hasFailed=function(){return this._state.dbOpenError!==null},Pe.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(Pe.prototype,"tables",{get:function(){var e=this;return h(this._allTables).map(function(t){return e._allTables[t]})},enumerable:!1,configurable:!0}),Pe.prototype.transaction=function(){var e=(function(t,n,i){var s=arguments.length;if(s<2)throw new Z.InvalidArgument("Too few arguments");for(var c=new Array(s-1);--s;)c[s-1]=arguments[s];return i=c.pop(),[t,le(c),i]}).apply(this,arguments);return this._transaction.apply(this,e)},Pe.prototype._transaction=function(e,t,n){var i=this,s=ie.trans;s&&s.db===this&&e.indexOf("!")===-1||(s=null);var c,f,p=e.indexOf("?")!==-1;e=e.replace("!","").replace("?","");try{if(f=t.map(function(g){if(g=g instanceof i.Table?g.name:g,typeof g!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return g}),e=="r"||e===Dr)c=Dr;else{if(e!="rw"&&e!=Cr)throw new Z.InvalidArgument("Invalid transaction mode: "+e);c=Cr}if(s){if(s.mode===Dr&&c===Cr){if(!p)throw new Z.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");s=null}s&&f.forEach(function(g){if(s&&s.storeNames.indexOf(g)===-1){if(!p)throw new Z.SubTransaction("Table "+g+" not included in parent transaction.");s=null}}),p&&s&&!s.active&&(s=null)}}catch(g){return s?s._promise(null,function(_,m){m(g)}):$e(g)}var y=(function g(_,m,O,v,w){return W.resolve().then(function(){var S=ie.transless||ie,b=_._createTransaction(m,O,_._dbSchema,v);if(b.explicit=!0,S={trans:b,transless:S},v)b.idbtrans=v.idbtrans;else try{b.create(),b.idbtrans._explicit=!0,_._state.PR1398_maxLoop=3}catch(R){return R.name===We.InvalidState&&_.isOpen()&&0<--_._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),_.close({disableAutoOpen:!1}),_.open().then(function(){return g(_,m,O,null,w)})):$e(R)}var k,T=de(w);return T&&Ct(),S=W.follow(function(){var R;(k=w.call(b,b))&&(T?(R=lt.bind(null,null),k.then(R,R)):typeof k.next=="function"&&typeof k.throw=="function"&&(k=Qr(k)))},S),(k&&typeof k.then=="function"?W.resolve(k).then(function(R){return b.active?R:$e(new Z.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):S.then(function(){return k})).then(function(R){return v&&b._resolve(),b._completion.then(function(){return R})}).catch(function(R){return b._reject(R),$e(R)})})}).bind(null,this,c,f,s,n);return s?s._promise(c,y,"lock"):ie.trans?xt(ie.transless,function(){return i._whenReady(y)}):this._whenReady(y)},Pe.prototype.table=function(e){if(!M(this._allTables,e))throw new Z.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]},Pe);function Pe(e,t){var n=this;this._middlewares={},this.verno=0;var i=Pe.dependencies;this._options=t=a({addons:Pe.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange,cache:"cloned"},t),this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange},i=t.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var s,c,f,p,y,g={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:ye,dbReadyPromise:null,cancelOpen:ye,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:t.autoOpen};g.dbReadyPromise=new W(function(m){g.dbReadyResolve=m}),g.openCanceller=new W(function(m,O){g.cancelOpen=O}),this._state=g,this.name=e,this.on=en(this,"populate","blocked","versionchange","close",{ready:[Cn,ye]}),this.on.ready.subscribe=G(this.on.ready.subscribe,function(m){return function(O,v){Pe.vip(function(){var w,S=n._state;S.openComplete?(S.dbOpenError||W.resolve().then(O),v&&m(O)):S.onReadyBeingFired?(S.onReadyBeingFired.push(O),v&&m(O)):(m(O),w=n,v||m(function b(){w.on.ready.unsubscribe(O),w.on.ready.unsubscribe(b)}))})}}),this.Collection=(s=this,tn(mu.prototype,function(k,b){this.db=s;var v=jo,w=null;if(b)try{v=b()}catch(T){w=T}var S=k._ctx,b=S.table,k=b.hook.reading.fire;this._ctx={table:b,index:S.index,isPrimKey:!S.index||b.schema.primKey.keyPath&&S.index===b.schema.primKey.name,range:v,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:w,or:S.or,valueMapper:k!==He?k:null}})),this.Table=(c=this,tn(qo.prototype,function(m,O,v){this.db=c,this._tx=v,this.name=m,this.schema=O,this.hook=c._allTables[m]?c._allTables[m].hook:en(null,{creating:[zt,ye],reading:[$t,He],updating:[Wt,ye],deleting:[Vt,ye]})})),this.Transaction=(f=this,tn(gu.prototype,function(m,O,v,w,S){var b=this;this.db=f,this.mode=m,this.storeNames=O,this.schema=v,this.chromeTransactionDurability=w,this.idbtrans=null,this.on=en(this,"complete","error","abort"),this.parent=S||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new W(function(k,T){b._resolve=k,b._reject=T}),this._completion.then(function(){b.active=!1,b.on.complete.fire()},function(k){var T=b.active;return b.active=!1,b.on.error.fire(k),b.parent?b.parent._reject(k):T&&b.idbtrans&&b.idbtrans.abort(),$e(k)})})),this.Version=(p=this,tn(Eu.prototype,function(m){this.db=p,this._cfg={version:m,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(y=this,tn(Uo.prototype,function(m,O,v){if(this.db=y,this._ctx={table:m,index:O===":id"?null:O,or:v},this._cmp=this._ascending=xe,this._descending=function(w,S){return xe(S,w)},this._max=function(w,S){return 0<xe(w,S)?w:S},this._min=function(w,S){return xe(w,S)<0?w:S},this._IDBKeyRange=y._deps.IDBKeyRange,!this._IDBKeyRange)throw new Z.MissingAPI})),this.on("versionchange",function(m){0<m.newVersion?console.warn("Another connection wants to upgrade database '".concat(n.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(n.name,"'. Closing db now to resume the delete request.")),n.close({disableAutoOpen:!1})}),this.on("blocked",function(m){!m.newVersion||m.newVersion<m.oldVersion?console.warn("Dexie.delete('".concat(n.name,"') was blocked")):console.warn("Upgrade '".concat(n.name,"' blocked by other connection holding version ").concat(m.oldVersion/10))}),this._maxKey=sn(t.IDBKeyRange),this._createTransaction=function(m,O,v,w){return new n.Transaction(m,O,v,n._options.chromeTransactionDurability,w)},this._fireOnBlocked=function(m){n.on("blocked").fire(m),jt.filter(function(O){return O.name===n.name&&O!==n&&!O._state.vcFired}).map(function(O){return O.on("versionchange").fire(m)})},this.use(Au),this.use(Cu),this.use($u),this.use(Tu),this.use(Ru);var _=new Proxy(this,{get:function(m,O,v){if(O==="_vip")return!0;if(O==="table")return function(S){return rr(n.table(S),_)};var w=Reflect.get(m,O,v);return w instanceof qo?rr(w,_):O==="tables"?w.map(function(S){return rr(S,_)}):O==="_createTransaction"?function(){return rr(w.apply(this,arguments),_)}:w}});this.vip=_,i.forEach(function(m){return m(n)})}var ir,Qe=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",ju=(ni.prototype.subscribe=function(e,t,n){return this._subscribe(e&&typeof e!="function"?e:{next:e,error:t,complete:n})},ni.prototype[Qe]=function(){return this},ni);function ni(e){this._subscribe=e}try{ir={indexedDB:d.indexedDB||d.mozIndexedDB||d.webkitIndexedDB||d.msIndexedDB,IDBKeyRange:d.IDBKeyRange||d.webkitIDBKeyRange}}catch{ir={indexedDB:null,IDBKeyRange:null}}function is(e){var t,n=!1,i=new ju(function(s){var c=de(e),f,p=!1,y={},g={},_={get closed(){return p},unsubscribe:function(){p||(p=!0,f&&f.abort(),m&&ht.storagemutated.unsubscribe(v))}};s.start&&s.start(_);var m=!1,O=function(){return Pr(w)},v=function(S){er(y,S),Wr(g,y)&&O()},w=function(){var S,b,k;!p&&ir.indexedDB&&(y={},S={},f&&f.abort(),f=new AbortController,k=function(T){var R=Pt();try{c&&Ct();var P=ct(e,T);return P=c?P.finally(lt):P}finally{R&&Dt()}}(b={subscr:S,signal:f.signal,requery:O,querier:e,trans:null}),Promise.resolve(k).then(function(T){n=!0,t=T,p||b.signal.aborted||(y={},function(R){for(var P in R)if(M(R,P))return;return 1}(g=S)||m||(ht(on,v),m=!0),Pr(function(){return!p&&s.next&&s.next(T)}))},function(T){n=!1,["DatabaseClosedError","AbortError"].includes(T==null?void 0:T.name)||p||Pr(function(){p||s.error&&s.error(T)})}))};return setTimeout(O,0),_});return i.hasValue=function(){return n},i.getValue=function(){return t},i}var kt=at;function ri(e){var t=pt;try{pt=!0,ht.storagemutated.fire(e),Xr(e,!0)}finally{pt=t}}ae(kt,a(a({},Fe),{delete:function(e){return new kt(e,{addons:[]}).delete()},exists:function(e){return new kt(e,{addons:[]}).open().then(function(t){return t.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(e){try{return t=kt.dependencies,n=t.indexedDB,t=t.IDBKeyRange,(Hr(n)?Promise.resolve(n.databases()).then(function(i){return i.map(function(s){return s.name}).filter(function(s){return s!==Ln})}):Yr(n,t).toCollection().primaryKeys()).then(e)}catch{return $e(new Z.MissingAPI)}var t,n},defineClass:function(){return function(e){$(this,e)}},ignoreTransaction:function(e){return ie.trans?xt(ie.transless,e):e()},vip:zr,async:function(e){return function(){try{var t=Qr(e.apply(this,arguments));return t&&typeof t.then=="function"?t:W.resolve(t)}catch(n){return $e(n)}}},spawn:function(e,t,n){try{var i=Qr(e.apply(n,t||[]));return i&&typeof i.then=="function"?i:W.resolve(i)}catch(s){return $e(s)}},currentTransaction:{get:function(){return ie.trans||null}},waitFor:function(e,t){return t=W.resolve(typeof e=="function"?kt.ignoreTransaction(e):e).timeout(t||6e4),ie.trans?ie.trans.waitFor(t):t},Promise:W,debug:{get:function(){return nt},set:function(e){To(e)}},derive:j,extend:$,props:ae,override:G,Events:en,on:ht,liveQuery:is,extendObservabilitySet:er,getByKeyPath:te,setByKeyPath:U,delByKeyPath:function(e,t){typeof t=="string"?U(e,t,void 0):"length"in t&&[].map.call(t,function(n){U(e,n,void 0)})},shallowClone:K,deepClone:we,getObjectDiff:Zr,cmp:xe,asap:fe,minKey:-1/0,addons:[],connections:jt,errnames:We,dependencies:ir,cache:Et,semVer:"4.0.11",version:"4.0.11".split(".").map(function(e){return parseInt(e)}).reduce(function(e,t,n){return e+t/Math.pow(10,2*n)})})),kt.maxKey=sn(kt.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(ht(on,function(e){pt||(e=new CustomEvent(Fr,{detail:e}),pt=!0,dispatchEvent(e),pt=!1)}),addEventListener(Fr,function(e){e=e.detail,pt||ri(e)}));var Ft,pt=!1,os=function(){};return typeof BroadcastChannel<"u"&&((os=function(){(Ft=new BroadcastChannel(Fr)).onmessage=function(e){return e.data&&ri(e.data)}})(),typeof Ft.unref=="function"&&Ft.unref(),ht(on,function(e){pt||Ft.postMessage(e)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(e){if(!at.disableBfCache&&e.persisted){nt&&console.debug("Dexie: handling persisted pagehide"),Ft!=null&&Ft.close();for(var t=0,n=jt;t<n.length;t++)n[t].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(e){!at.disableBfCache&&e.persisted&&(nt&&console.debug("Dexie: handling persisted pageshow"),os(),ri({all:new Be(-1/0,[[]])}))})),W.rejectionMapper=function(e,t){return!e||e instanceof Oe||e instanceof TypeError||e instanceof SyntaxError||!e.name||!Ce[e.name]?e:(t=new Ce[e.name](t||e.message,e),"stack"in e&&N(t,"stack",{get:function(){return this.inner.stack}}),t)},To(nt),a(at,Object.freeze({__proto__:null,Dexie:at,liveQuery:is,Entity:Mo,cmp:xe,PropModification:nn,replacePrefix:function(e,t){return new nn({replacePrefix:[e,t]})},add:function(e){return new nn({add:e})},remove:function(e){return new nn({remove:e})},default:at,RangeSet:Be,mergeRanges:cn,rangesOverlap:Wo}),{default:at}),at})}(pn)),pn.exports}var Es=Os();const sr=Ze(Es),di=Symbol.for("Dexie"),mn=globalThis[di]||(globalThis[di]=sr);if(sr.semVer!==mn.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${sr.semVer} and ${mn.semVer}`);const{liveQuery:qu,mergeRanges:Bu,rangesOverlap:Ku,RangeSet:Iu,cmp:Lu,Entity:Uu,PropModification:Yu,replacePrefix:Hu,add:zu,remove:Vu}=mn;class hi extends mn{constructor(){super("db");oi(this,"rows");this.version(1).stores({rows:"++id, key"})}}const yn=new hi,ar=(r,o=!0)=>yn.rows.where({key:r}).first().then(u=>o?u==null?void 0:u.value:u),pi=async(r,o)=>{await ar(r,!1)?await yn.rows.where({key:r}).modify({value:o}):await yn.rows.add({key:r,value:o})},ks=Object.freeze(Object.defineProperty({__proto__:null,SubDexie:hi,db:yn,default:{get:ar,set:pi},get:ar,set:pi},Symbol.toStringTag,{value:"Module"})),mi=(r,o)=>r.find(u=>u.value==(Array.isArray(o)?o[0]:o)),yi=r=>new Promise(o=>setTimeout(o,r)),vi=(r,o)=>{o?console.log(o,r):console.log(r)},gi=r=>{throw new Error(r)},Ts=Object.freeze(Object.defineProperty({__proto__:null,default:{findByValue:mi,sleep:yi,log:vi,fail:gi},fail:gi,findByValue:mi,log:vi,sleep:yi},Symbol.toStringTag,{value:"Module"})),bi=r=>new Promise((o,u)=>{const a=new FileReader;a.onload=l=>{var d;return o((d=l.target)==null?void 0:d.result)},a.onerror=l=>{var d;return u((d=l.target)==null?void 0:d.error)},a.readAsDataURL(r)}).then(o=>o),wi=r=>{const o=atob(r.split(",")[1]||r),u=new Uint8Array(o.length);for(let a=0;a<o.length;a++)u[a]=o.charCodeAt(a);return new Blob([u])},_i=(r,o)=>{const u=document.createElement("a");u.href=URL.createObjectURL(o),u.download=r,u.click(),URL.revokeObjectURL(u.href)},Rs=Object.freeze(Object.defineProperty({__proto__:null,default:{toBase64:bi,toBlob:wi,download:_i},download:_i,toBase64:bi,toBlob:wi},Symbol.toStringTag,{value:"Module"}));var vn={},gn={},ur,xi;function Si(){if(xi)return ur;xi=1,ur=r;function r(u,a){if(a!=="$")for(var l=o(a),d=0;d<l.length;d++)a=l[d].toString().replace(/\\"/g,'"'),!(typeof u[a]>"u"&&d!==l.length-1)&&(u=u[a]);return u}function o(u){for(var a=/(?:\.(\w+))|(?:\[(\d+)\])|(?:\["((?:[^\\"]|\\.)*)"\])/g,l=[],d;d=a.exec(u);)l.push(d[1]||d[2]||d[3]);return l}return ur}var Bt={},Oi;function As(){if(Oi)return Bt;Oi=1;var r=Si(),o=Ti();return Bt.getRegexFlags=function(a){var l="";return a.ignoreCase&&(l+="i"),a.global&&(l+="g"),a.multiline&&(l+="m"),l},Bt.stringifyFunction=function(a,l){if(typeof l=="function")return l(a);var d=a.toString(),h=d.match(/^[^{]*{|^[^=]*=>/),x=h?h[0]:"<function> ",$=d[d.length-1]==="}"?"}":"";return x.replace(/\r\n|\n/g," ").replace(/\s+/g," ")+" /* ... */ "+$},Bt.restore=function(a,l){var d=a[0],h=a.slice(1);switch(d){case"$":return r(l,a);case"r":var x=h.indexOf(","),$=h.slice(0,x),C=h.slice(x+1);return RegExp(C,$);case"d":return new Date(+h);case"f":var D=function(){throw new Error("can't run jsan parsed function")};return D.toString=function(){return h},D;case"u":return;case"e":var M=new Error(h);return M.stack="Stack is unavailable for jsan parsed errors",M;case"s":return Symbol(h);case"g":return Symbol.for(h);case"m":return new Map(o.parse(h));case"l":return new Set(o.parse(h));case"n":return NaN;case"i":return 1/0;case"y":return-1/0;default:return console.warn("unknown type",a),a}},Bt}var Ei;function $s(){if(Ei)return gn;Ei=1,Si();var r=As(),o=typeof WeakMap<"u"?WeakMap:function(){var u=[],a=[];return{set:function(l,d){u.push(l),a.push(d)},get:function(l){for(var d=0;d<u.length;d++)if(u[d]===l)return a[d]}}};return gn.decycle=function u(a,l,d,h){h=h||new o;var x=!Object.prototype.hasOwnProperty.call(l,"circular"),$=l.refs!==!1;return function C(D,M,ae){var ue,N,j,E=typeof d=="function"?d(ae||"",D):D;if(l.date&&E instanceof Date)return{$jsan:"d"+E.getTime()};if(l.regex&&E instanceof RegExp)return{$jsan:"r"+r.getRegexFlags(E)+","+E.source};if(l.function&&typeof E=="function")return{$jsan:"f"+r.stringifyFunction(E,l.function)};if(l.nan&&typeof E=="number"&&isNaN(E))return{$jsan:"n"};if(l.infinity){if(Number.POSITIVE_INFINITY===E)return{$jsan:"i"};if(Number.NEGATIVE_INFINITY===E)return{$jsan:"y"}}if(l.undefined&&E===void 0)return{$jsan:"u"};if(l.error&&E instanceof Error)return{$jsan:"e"+E.message};if(l.symbol&&typeof E=="symbol"){var J=Symbol.keyFor(E);return J!==void 0?{$jsan:"g"+J}:{$jsan:"s"+E.toString().slice(7,-1)}}if(l.map&&typeof Map=="function"&&E instanceof Map&&typeof Array.from=="function")return{$jsan:"m"+JSON.stringify(u(Array.from(E),l,d,h))};if(l.set&&typeof Set=="function"&&E instanceof Set&&typeof Array.from=="function")return{$jsan:"l"+JSON.stringify(u(Array.from(E),l,d,h))};if(E&&typeof E.toJSON=="function")try{E=E.toJSON(ae)}catch{var re=ae||"$";return"toJSON failed for '"+(h.get(E)||re)+"'"}if(typeof E=="object"&&E!==null&&!(E instanceof Boolean)&&!(E instanceof Date)&&!(E instanceof Number)&&!(E instanceof RegExp)&&!(E instanceof String)&&typeof E!="symbol"&&!(E instanceof Error)){if(typeof E=="object"){var G=h.get(E);if(G){if(x&&$)return{$jsan:G};var _e=M.split(".").slice(0,-1).join(".");if(_e.indexOf(G)===0)return x?{$jsan:G}:typeof l.circular=="function"?l.circular(E,M,G):l.circular;if($)return{$jsan:G}}h.set(E,M)}if(Object.prototype.toString.apply(E)==="[object Array]")for(j=[],ue=0;ue<E.length;ue+=1)j[ue]=C(E[ue],M+"["+ue+"]",ue);else{j={};for(N in E)if(Object.prototype.hasOwnProperty.call(E,N)){var fe=/^\w+$/.test(N)?"."+N:"["+JSON.stringify(N)+"]";j[N]=N==="$jsan"?[C(E[N],M+fe)]:C(E[N],M+fe,N)}}return j}return E}(a,"$")},gn.retrocycle=function(a){return function l(d){var h,x,$;if(d&&typeof d=="object")if(Object.prototype.toString.apply(d)==="[object Array]")for(h=0;h<d.length;h+=1)x=d[h],x&&typeof x=="object"&&(x.$jsan?d[h]=r.restore(x.$jsan,a):l(x));else for($ in d){if(typeof d[$]=="string"&&$==="$jsan")return r.restore(d.$jsan,a);$==="$jsan"&&(d[$]=d[$][0]),typeof d[$]=="object"&&(x=d[$],x&&typeof x=="object"&&(x.$jsan?d[$]=r.restore(x.$jsan,a):l(x)))}return d}(a)},gn}var ki;function Ti(){if(ki)return vn;ki=1;var r=$s();return vn.stringify=function(u,a,l,d){if(arguments.length<4)try{return arguments.length===1?JSON.stringify(u):JSON.stringify.apply(JSON,arguments)}catch{}var h=d||!1;typeof h=="boolean"&&(h={date:h,function:h,regex:h,undefined:h,error:h,symbol:h,map:h,set:h,nan:h,infinity:h});var x=r.decycle(u,h,a);return arguments.length===1?JSON.stringify(x):JSON.stringify(x,Array.isArray(a)?a:null,l)},vn.parse=function(u,a){var l=/"\$jsan"/.test(u),d;return arguments.length===1?d=JSON.parse(u):d=JSON.parse(u,a),l&&(d=r.retrocycle(d)),d},vn}var cr,Ri;function Ps(){return Ri||(Ri=1,cr=Ti()),cr}var Ds=Ps();const Ai=Ze(Ds),$i=(r=null,o,u,a=!0)=>Ai.stringify(r,o,u,a),Pi=(r,o)=>Ai.parse(r,o),bn={stringify:$i,parse:Pi},Cs=Object.freeze(Object.defineProperty({__proto__:null,default:bn,parse:Pi,stringify:$i},Symbol.toStringTag,{value:"Module"})),Di=async(r,o=!0)=>{const u=o?bn.stringify(r):r,l=new TextEncoder().encode(u),d=await crypto.subtle.digest("SHA-256",l);return Array.from(new Uint8Array(d)).map(x=>x.toString(16).padStart(2,"0")).join("")},Ci=()=>{const r=new Uint32Array(1);return crypto.getRandomValues(r),r[0]},ji=()=>{const r=Date.now(),o=Math.floor(Math.random()*1e6),u=`${r}${o}`;return parseInt(u).toString(32)},js=Object.freeze(Object.defineProperty({__proto__:null,SHA256:Di,default:{SHA256:Di,random:Ci,id:ji},id:ji,random:Ci},Symbol.toStringTag,{value:"Module"}));function Mi(r,o){return function(){return r.apply(o,arguments)}}const{toString:Ms}=Object.prototype,{getPrototypeOf:lr}=Object,wn=(r=>o=>{const u=Ms.call(o);return r[u]||(r[u]=u.slice(8,-1).toLowerCase())})(Object.create(null)),et=r=>(r=r.toLowerCase(),o=>wn(o)===r),_n=r=>o=>typeof o===r,{isArray:Rt}=Array,Kt=_n("undefined");function Ns(r){return r!==null&&!Kt(r)&&r.constructor!==null&&!Kt(r.constructor)&&Ve(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const Ni=et("ArrayBuffer");function Fs(r){let o;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?o=ArrayBuffer.isView(r):o=r&&r.buffer&&Ni(r.buffer),o}const qs=_n("string"),Ve=_n("function"),Fi=_n("number"),xn=r=>r!==null&&typeof r=="object",Bs=r=>r===!0||r===!1,Sn=r=>{if(wn(r)!=="object")return!1;const o=lr(r);return(o===null||o===Object.prototype||Object.getPrototypeOf(o)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},Ks=et("Date"),Is=et("File"),Ls=et("Blob"),Us=et("FileList"),Ys=r=>xn(r)&&Ve(r.pipe),Hs=r=>{let o;return r&&(typeof FormData=="function"&&r instanceof FormData||Ve(r.append)&&((o=wn(r))==="formdata"||o==="object"&&Ve(r.toString)&&r.toString()==="[object FormData]"))},zs=et("URLSearchParams"),[Vs,Ws,Js,Gs]=["ReadableStream","Request","Response","Headers"].map(et),Xs=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function It(r,o,{allOwnKeys:u=!1}={}){if(r===null||typeof r>"u")return;let a,l;if(typeof r!="object"&&(r=[r]),Rt(r))for(a=0,l=r.length;a<l;a++)o.call(null,r[a],a,r);else{const d=u?Object.getOwnPropertyNames(r):Object.keys(r),h=d.length;let x;for(a=0;a<h;a++)x=d[a],o.call(null,r[x],x,r)}}function qi(r,o){o=o.toLowerCase();const u=Object.keys(r);let a=u.length,l;for(;a-- >0;)if(l=u[a],o===l.toLowerCase())return l;return null}const mt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Bi=r=>!Kt(r)&&r!==mt;function fr(){const{caseless:r}=Bi(this)&&this||{},o={},u=(a,l)=>{const d=r&&qi(o,l)||l;Sn(o[d])&&Sn(a)?o[d]=fr(o[d],a):Sn(a)?o[d]=fr({},a):Rt(a)?o[d]=a.slice():o[d]=a};for(let a=0,l=arguments.length;a<l;a++)arguments[a]&&It(arguments[a],u);return o}const Qs=(r,o,u,{allOwnKeys:a}={})=>(It(o,(l,d)=>{u&&Ve(l)?r[d]=Mi(l,u):r[d]=l},{allOwnKeys:a}),r),Zs=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),ea=(r,o,u,a)=>{r.prototype=Object.create(o.prototype,a),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:o.prototype}),u&&Object.assign(r.prototype,u)},ta=(r,o,u,a)=>{let l,d,h;const x={};if(o=o||{},r==null)return o;do{for(l=Object.getOwnPropertyNames(r),d=l.length;d-- >0;)h=l[d],(!a||a(h,r,o))&&!x[h]&&(o[h]=r[h],x[h]=!0);r=u!==!1&&lr(r)}while(r&&(!u||u(r,o))&&r!==Object.prototype);return o},na=(r,o,u)=>{r=String(r),(u===void 0||u>r.length)&&(u=r.length),u-=o.length;const a=r.indexOf(o,u);return a!==-1&&a===u},ra=r=>{if(!r)return null;if(Rt(r))return r;let o=r.length;if(!Fi(o))return null;const u=new Array(o);for(;o-- >0;)u[o]=r[o];return u},ia=(r=>o=>r&&o instanceof r)(typeof Uint8Array<"u"&&lr(Uint8Array)),oa=(r,o)=>{const a=(r&&r[Symbol.iterator]).call(r);let l;for(;(l=a.next())&&!l.done;){const d=l.value;o.call(r,d[0],d[1])}},sa=(r,o)=>{let u;const a=[];for(;(u=r.exec(o))!==null;)a.push(u);return a},aa=et("HTMLFormElement"),ua=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(u,a,l){return a.toUpperCase()+l}),Ki=(({hasOwnProperty:r})=>(o,u)=>r.call(o,u))(Object.prototype),ca=et("RegExp"),Ii=(r,o)=>{const u=Object.getOwnPropertyDescriptors(r),a={};It(u,(l,d)=>{let h;(h=o(l,d,r))!==!1&&(a[d]=h||l)}),Object.defineProperties(r,a)},la=r=>{Ii(r,(o,u)=>{if(Ve(r)&&["arguments","caller","callee"].indexOf(u)!==-1)return!1;const a=r[u];if(Ve(a)){if(o.enumerable=!1,"writable"in o){o.writable=!1;return}o.set||(o.set=()=>{throw Error("Can not rewrite read-only method '"+u+"'")})}})},fa=(r,o)=>{const u={},a=l=>{l.forEach(d=>{u[d]=!0})};return Rt(r)?a(r):a(String(r).split(o)),u},da=()=>{},ha=(r,o)=>r!=null&&Number.isFinite(r=+r)?r:o;function pa(r){return!!(r&&Ve(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const ma=r=>{const o=new Array(10),u=(a,l)=>{if(xn(a)){if(o.indexOf(a)>=0)return;if(!("toJSON"in a)){o[l]=a;const d=Rt(a)?[]:{};return It(a,(h,x)=>{const $=u(h,l+1);!Kt($)&&(d[x]=$)}),o[l]=void 0,d}}return a};return u(r,0)},ya=et("AsyncFunction"),va=r=>r&&(xn(r)||Ve(r))&&Ve(r.then)&&Ve(r.catch),Li=((r,o)=>r?setImmediate:o?((u,a)=>(mt.addEventListener("message",({source:l,data:d})=>{l===mt&&d===u&&a.length&&a.shift()()},!1),l=>{a.push(l),mt.postMessage(u,"*")}))(`axios@${Math.random()}`,[]):u=>setTimeout(u))(typeof setImmediate=="function",Ve(mt.postMessage)),ga=typeof queueMicrotask<"u"?queueMicrotask.bind(mt):typeof process<"u"&&process.nextTick||Li,A={isArray:Rt,isArrayBuffer:Ni,isBuffer:Ns,isFormData:Hs,isArrayBufferView:Fs,isString:qs,isNumber:Fi,isBoolean:Bs,isObject:xn,isPlainObject:Sn,isReadableStream:Vs,isRequest:Ws,isResponse:Js,isHeaders:Gs,isUndefined:Kt,isDate:Ks,isFile:Is,isBlob:Ls,isRegExp:ca,isFunction:Ve,isStream:Ys,isURLSearchParams:zs,isTypedArray:ia,isFileList:Us,forEach:It,merge:fr,extend:Qs,trim:Xs,stripBOM:Zs,inherits:ea,toFlatObject:ta,kindOf:wn,kindOfTest:et,endsWith:na,toArray:ra,forEachEntry:oa,matchAll:sa,isHTMLForm:aa,hasOwnProperty:Ki,hasOwnProp:Ki,reduceDescriptors:Ii,freezeMethods:la,toObjectSet:fa,toCamelCase:ua,noop:da,toFiniteNumber:ha,findKey:qi,global:mt,isContextDefined:Bi,isSpecCompliantForm:pa,toJSONObject:ma,isAsyncFn:ya,isThenable:va,setImmediate:Li,asap:ga};function pe(r,o,u,a,l){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",o&&(this.code=o),u&&(this.config=u),a&&(this.request=a),l&&(this.response=l,this.status=l.status?l.status:null)}A.inherits(pe,Error,{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:A.toJSONObject(this.config),code:this.code,status:this.status}}});const Ui=pe.prototype,Yi={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{Yi[r]={value:r}}),Object.defineProperties(pe,Yi),Object.defineProperty(Ui,"isAxiosError",{value:!0}),pe.from=(r,o,u,a,l,d)=>{const h=Object.create(Ui);return A.toFlatObject(r,h,function($){return $!==Error.prototype},x=>x!=="isAxiosError"),pe.call(h,r.message,o,u,a,l),h.cause=r,h.name=r.name,d&&Object.assign(h,d),h};const ba=null;function dr(r){return A.isPlainObject(r)||A.isArray(r)}function Hi(r){return A.endsWith(r,"[]")?r.slice(0,-2):r}function zi(r,o,u){return r?r.concat(o).map(function(l,d){return l=Hi(l),!u&&d?"["+l+"]":l}).join(u?".":""):o}function wa(r){return A.isArray(r)&&!r.some(dr)}const _a=A.toFlatObject(A,{},null,function(o){return/^is[A-Z]/.test(o)});function On(r,o,u){if(!A.isObject(r))throw new TypeError("target must be an object");o=o||new FormData,u=A.toFlatObject(u,{metaTokens:!0,dots:!1,indexes:!1},!1,function(j,E){return!A.isUndefined(E[j])});const a=u.metaTokens,l=u.visitor||D,d=u.dots,h=u.indexes,$=(u.Blob||typeof Blob<"u"&&Blob)&&A.isSpecCompliantForm(o);if(!A.isFunction(l))throw new TypeError("visitor must be a function");function C(N){if(N===null)return"";if(A.isDate(N))return N.toISOString();if(!$&&A.isBlob(N))throw new pe("Blob is not supported. Use a Buffer instead.");return A.isArrayBuffer(N)||A.isTypedArray(N)?$&&typeof Blob=="function"?new Blob([N]):Buffer.from(N):N}function D(N,j,E){let J=N;if(N&&!E&&typeof N=="object"){if(A.endsWith(j,"{}"))j=a?j:j.slice(0,-2),N=JSON.stringify(N);else if(A.isArray(N)&&wa(N)||(A.isFileList(N)||A.endsWith(j,"[]"))&&(J=A.toArray(N)))return j=Hi(j),J.forEach(function(G,_e){!(A.isUndefined(G)||G===null)&&o.append(h===!0?zi([j],_e,d):h===null?j:j+"[]",C(G))}),!1}return dr(N)?!0:(o.append(zi(E,j,d),C(N)),!1)}const M=[],ae=Object.assign(_a,{defaultVisitor:D,convertValue:C,isVisitable:dr});function ue(N,j){if(!A.isUndefined(N)){if(M.indexOf(N)!==-1)throw Error("Circular reference detected in "+j.join("."));M.push(N),A.forEach(N,function(J,re){(!(A.isUndefined(J)||J===null)&&l.call(o,J,A.isString(re)?re.trim():re,j,ae))===!0&&ue(J,j?j.concat(re):[re])}),M.pop()}}if(!A.isObject(r))throw new TypeError("data must be an object");return ue(r),o}function Vi(r){const o={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(a){return o[a]})}function hr(r,o){this._pairs=[],r&&On(r,this,o)}const Wi=hr.prototype;Wi.append=function(o,u){this._pairs.push([o,u])},Wi.toString=function(o){const u=o?function(a){return o.call(this,a,Vi)}:Vi;return this._pairs.map(function(l){return u(l[0])+"="+u(l[1])},"").join("&")};function xa(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ji(r,o,u){if(!o)return r;const a=u&&u.encode||xa;A.isFunction(u)&&(u={serialize:u});const l=u&&u.serialize;let d;if(l?d=l(o,u):d=A.isURLSearchParams(o)?o.toString():new hr(o,u).toString(a),d){const h=r.indexOf("#");h!==-1&&(r=r.slice(0,h)),r+=(r.indexOf("?")===-1?"?":"&")+d}return r}class Gi{constructor(){this.handlers=[]}use(o,u,a){return this.handlers.push({fulfilled:o,rejected:u,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(o){this.handlers[o]&&(this.handlers[o]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(o){A.forEach(this.handlers,function(a){a!==null&&o(a)})}}const Xi={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Sa={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:hr,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},pr=typeof window<"u"&&typeof document<"u",mr=typeof navigator=="object"&&navigator||void 0,Oa=pr&&(!mr||["ReactNative","NativeScript","NS"].indexOf(mr.product)<0),Ea=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ka=pr&&window.location.href||"http://localhost",qe={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pr,hasStandardBrowserEnv:Oa,hasStandardBrowserWebWorkerEnv:Ea,navigator:mr,origin:ka},Symbol.toStringTag,{value:"Module"})),...Sa};function Ta(r,o){return On(r,new qe.classes.URLSearchParams,Object.assign({visitor:function(u,a,l,d){return qe.isNode&&A.isBuffer(u)?(this.append(a,u.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)}},o))}function Ra(r){return A.matchAll(/\w+|\[(\w*)]/g,r).map(o=>o[0]==="[]"?"":o[1]||o[0])}function Aa(r){const o={},u=Object.keys(r);let a;const l=u.length;let d;for(a=0;a<l;a++)d=u[a],o[d]=r[d];return o}function Qi(r){function o(u,a,l,d){let h=u[d++];if(h==="__proto__")return!0;const x=Number.isFinite(+h),$=d>=u.length;return h=!h&&A.isArray(l)?l.length:h,$?(A.hasOwnProp(l,h)?l[h]=[l[h],a]:l[h]=a,!x):((!l[h]||!A.isObject(l[h]))&&(l[h]=[]),o(u,a,l[h],d)&&A.isArray(l[h])&&(l[h]=Aa(l[h])),!x)}if(A.isFormData(r)&&A.isFunction(r.entries)){const u={};return A.forEachEntry(r,(a,l)=>{o(Ra(a),l,u,0)}),u}return null}function $a(r,o,u){if(A.isString(r))try{return(o||JSON.parse)(r),A.trim(r)}catch(a){if(a.name!=="SyntaxError")throw a}return(u||JSON.stringify)(r)}const Lt={transitional:Xi,adapter:["xhr","http","fetch"],transformRequest:[function(o,u){const a=u.getContentType()||"",l=a.indexOf("application/json")>-1,d=A.isObject(o);if(d&&A.isHTMLForm(o)&&(o=new FormData(o)),A.isFormData(o))return l?JSON.stringify(Qi(o)):o;if(A.isArrayBuffer(o)||A.isBuffer(o)||A.isStream(o)||A.isFile(o)||A.isBlob(o)||A.isReadableStream(o))return o;if(A.isArrayBufferView(o))return o.buffer;if(A.isURLSearchParams(o))return u.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),o.toString();let x;if(d){if(a.indexOf("application/x-www-form-urlencoded")>-1)return Ta(o,this.formSerializer).toString();if((x=A.isFileList(o))||a.indexOf("multipart/form-data")>-1){const $=this.env&&this.env.FormData;return On(x?{"files[]":o}:o,$&&new $,this.formSerializer)}}return d||l?(u.setContentType("application/json",!1),$a(o)):o}],transformResponse:[function(o){const u=this.transitional||Lt.transitional,a=u&&u.forcedJSONParsing,l=this.responseType==="json";if(A.isResponse(o)||A.isReadableStream(o))return o;if(o&&A.isString(o)&&(a&&!this.responseType||l)){const h=!(u&&u.silentJSONParsing)&&l;try{return JSON.parse(o)}catch(x){if(h)throw x.name==="SyntaxError"?pe.from(x,pe.ERR_BAD_RESPONSE,this,null,this.response):x}}return o}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:qe.classes.FormData,Blob:qe.classes.Blob},validateStatus:function(o){return o>=200&&o<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};A.forEach(["delete","get","head","post","put","patch"],r=>{Lt.headers[r]={}});const Pa=A.toObjectSet(["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"]),Da=r=>{const o={};let u,a,l;return r&&r.split(`
4
- `).forEach(function(h){l=h.indexOf(":"),u=h.substring(0,l).trim().toLowerCase(),a=h.substring(l+1).trim(),!(!u||o[u]&&Pa[u])&&(u==="set-cookie"?o[u]?o[u].push(a):o[u]=[a]:o[u]=o[u]?o[u]+", "+a:a)}),o},Zi=Symbol("internals");function Ut(r){return r&&String(r).trim().toLowerCase()}function En(r){return r===!1||r==null?r:A.isArray(r)?r.map(En):String(r)}function Ca(r){const o=Object.create(null),u=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=u.exec(r);)o[a[1]]=a[2];return o}const ja=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function yr(r,o,u,a,l){if(A.isFunction(a))return a.call(this,o,u);if(l&&(o=u),!!A.isString(o)){if(A.isString(a))return o.indexOf(a)!==-1;if(A.isRegExp(a))return a.test(o)}}function Ma(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(o,u,a)=>u.toUpperCase()+a)}function Na(r,o){const u=A.toCamelCase(" "+o);["get","set","has"].forEach(a=>{Object.defineProperty(r,a+u,{value:function(l,d,h){return this[a].call(this,o,l,d,h)},configurable:!0})})}let Ye=class{constructor(o){o&&this.set(o)}set(o,u,a){const l=this;function d(x,$,C){const D=Ut($);if(!D)throw new Error("header name must be a non-empty string");const M=A.findKey(l,D);(!M||l[M]===void 0||C===!0||C===void 0&&l[M]!==!1)&&(l[M||$]=En(x))}const h=(x,$)=>A.forEach(x,(C,D)=>d(C,D,$));if(A.isPlainObject(o)||o instanceof this.constructor)h(o,u);else if(A.isString(o)&&(o=o.trim())&&!ja(o))h(Da(o),u);else if(A.isHeaders(o))for(const[x,$]of o.entries())d($,x,a);else o!=null&&d(u,o,a);return this}get(o,u){if(o=Ut(o),o){const a=A.findKey(this,o);if(a){const l=this[a];if(!u)return l;if(u===!0)return Ca(l);if(A.isFunction(u))return u.call(this,l,a);if(A.isRegExp(u))return u.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(o,u){if(o=Ut(o),o){const a=A.findKey(this,o);return!!(a&&this[a]!==void 0&&(!u||yr(this,this[a],a,u)))}return!1}delete(o,u){const a=this;let l=!1;function d(h){if(h=Ut(h),h){const x=A.findKey(a,h);x&&(!u||yr(a,a[x],x,u))&&(delete a[x],l=!0)}}return A.isArray(o)?o.forEach(d):d(o),l}clear(o){const u=Object.keys(this);let a=u.length,l=!1;for(;a--;){const d=u[a];(!o||yr(this,this[d],d,o,!0))&&(delete this[d],l=!0)}return l}normalize(o){const u=this,a={};return A.forEach(this,(l,d)=>{const h=A.findKey(a,d);if(h){u[h]=En(l),delete u[d];return}const x=o?Ma(d):String(d).trim();x!==d&&delete u[d],u[x]=En(l),a[x]=!0}),this}concat(...o){return this.constructor.concat(this,...o)}toJSON(o){const u=Object.create(null);return A.forEach(this,(a,l)=>{a!=null&&a!==!1&&(u[l]=o&&A.isArray(a)?a.join(", "):a)}),u}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([o,u])=>o+": "+u).join(`
5
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(o){return o instanceof this?o:new this(o)}static concat(o,...u){const a=new this(o);return u.forEach(l=>a.set(l)),a}static accessor(o){const a=(this[Zi]=this[Zi]={accessors:{}}).accessors,l=this.prototype;function d(h){const x=Ut(h);a[x]||(Na(l,h),a[x]=!0)}return A.isArray(o)?o.forEach(d):d(o),this}};Ye.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),A.reduceDescriptors(Ye.prototype,({value:r},o)=>{let u=o[0].toUpperCase()+o.slice(1);return{get:()=>r,set(a){this[u]=a}}}),A.freezeMethods(Ye);function vr(r,o){const u=this||Lt,a=o||u,l=Ye.from(a.headers);let d=a.data;return A.forEach(r,function(x){d=x.call(u,d,l.normalize(),o?o.status:void 0)}),l.normalize(),d}function eo(r){return!!(r&&r.__CANCEL__)}function At(r,o,u){pe.call(this,r??"canceled",pe.ERR_CANCELED,o,u),this.name="CanceledError"}A.inherits(At,pe,{__CANCEL__:!0});function to(r,o,u){const a=u.config.validateStatus;!u.status||!a||a(u.status)?r(u):o(new pe("Request failed with status code "+u.status,[pe.ERR_BAD_REQUEST,pe.ERR_BAD_RESPONSE][Math.floor(u.status/100)-4],u.config,u.request,u))}function Fa(r){const o=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return o&&o[1]||""}function qa(r,o){r=r||10;const u=new Array(r),a=new Array(r);let l=0,d=0,h;return o=o!==void 0?o:1e3,function($){const C=Date.now(),D=a[d];h||(h=C),u[l]=$,a[l]=C;let M=d,ae=0;for(;M!==l;)ae+=u[M++],M=M%r;if(l=(l+1)%r,l===d&&(d=(d+1)%r),C-h<o)return;const ue=D&&C-D;return ue?Math.round(ae*1e3/ue):void 0}}function Ba(r,o){let u=0,a=1e3/o,l,d;const h=(C,D=Date.now())=>{u=D,l=null,d&&(clearTimeout(d),d=null),r.apply(null,C)};return[(...C)=>{const D=Date.now(),M=D-u;M>=a?h(C,D):(l=C,d||(d=setTimeout(()=>{d=null,h(l)},a-M)))},()=>l&&h(l)]}const kn=(r,o,u=3)=>{let a=0;const l=qa(50,250);return Ba(d=>{const h=d.loaded,x=d.lengthComputable?d.total:void 0,$=h-a,C=l($),D=h<=x;a=h;const M={loaded:h,total:x,progress:x?h/x:void 0,bytes:$,rate:C||void 0,estimated:C&&x&&D?(x-h)/C:void 0,event:d,lengthComputable:x!=null,[o?"download":"upload"]:!0};r(M)},u)},no=(r,o)=>{const u=r!=null;return[a=>o[0]({lengthComputable:u,total:r,loaded:a}),o[1]]},ro=r=>(...o)=>A.asap(()=>r(...o)),Ka=qe.hasStandardBrowserEnv?((r,o)=>u=>(u=new URL(u,qe.origin),r.protocol===u.protocol&&r.host===u.host&&(o||r.port===u.port)))(new URL(qe.origin),qe.navigator&&/(msie|trident)/i.test(qe.navigator.userAgent)):()=>!0,Ia=qe.hasStandardBrowserEnv?{write(r,o,u,a,l,d){const h=[r+"="+encodeURIComponent(o)];A.isNumber(u)&&h.push("expires="+new Date(u).toGMTString()),A.isString(a)&&h.push("path="+a),A.isString(l)&&h.push("domain="+l),d===!0&&h.push("secure"),document.cookie=h.join("; ")},read(r){const o=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function La(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function Ua(r,o){return o?r.replace(/\/?\/$/,"")+"/"+o.replace(/^\/+/,""):r}function io(r,o,u){let a=!La(o);return r&&a||u==!1?Ua(r,o):o}const oo=r=>r instanceof Ye?{...r}:r;function yt(r,o){o=o||{};const u={};function a(C,D,M,ae){return A.isPlainObject(C)&&A.isPlainObject(D)?A.merge.call({caseless:ae},C,D):A.isPlainObject(D)?A.merge({},D):A.isArray(D)?D.slice():D}function l(C,D,M,ae){if(A.isUndefined(D)){if(!A.isUndefined(C))return a(void 0,C,M,ae)}else return a(C,D,M,ae)}function d(C,D){if(!A.isUndefined(D))return a(void 0,D)}function h(C,D){if(A.isUndefined(D)){if(!A.isUndefined(C))return a(void 0,C)}else return a(void 0,D)}function x(C,D,M){if(M in o)return a(C,D);if(M in r)return a(void 0,C)}const $={url:d,method:d,data:d,baseURL:h,transformRequest:h,transformResponse:h,paramsSerializer:h,timeout:h,timeoutMessage:h,withCredentials:h,withXSRFToken:h,adapter:h,responseType:h,xsrfCookieName:h,xsrfHeaderName:h,onUploadProgress:h,onDownloadProgress:h,decompress:h,maxContentLength:h,maxBodyLength:h,beforeRedirect:h,transport:h,httpAgent:h,httpsAgent:h,cancelToken:h,socketPath:h,responseEncoding:h,validateStatus:x,headers:(C,D,M)=>l(oo(C),oo(D),M,!0)};return A.forEach(Object.keys(Object.assign({},r,o)),function(D){const M=$[D]||l,ae=M(r[D],o[D],D);A.isUndefined(ae)&&M!==x||(u[D]=ae)}),u}const so=r=>{const o=yt({},r);let{data:u,withXSRFToken:a,xsrfHeaderName:l,xsrfCookieName:d,headers:h,auth:x}=o;o.headers=h=Ye.from(h),o.url=Ji(io(o.baseURL,o.url,o.allowAbsoluteUrls),r.params,r.paramsSerializer),x&&h.set("Authorization","Basic "+btoa((x.username||"")+":"+(x.password?unescape(encodeURIComponent(x.password)):"")));let $;if(A.isFormData(u)){if(qe.hasStandardBrowserEnv||qe.hasStandardBrowserWebWorkerEnv)h.setContentType(void 0);else if(($=h.getContentType())!==!1){const[C,...D]=$?$.split(";").map(M=>M.trim()).filter(Boolean):[];h.setContentType([C||"multipart/form-data",...D].join("; "))}}if(qe.hasStandardBrowserEnv&&(a&&A.isFunction(a)&&(a=a(o)),a||a!==!1&&Ka(o.url))){const C=l&&d&&Ia.read(d);C&&h.set(l,C)}return o},Ya=typeof XMLHttpRequest<"u"&&function(r){return new Promise(function(u,a){const l=so(r);let d=l.data;const h=Ye.from(l.headers).normalize();let{responseType:x,onUploadProgress:$,onDownloadProgress:C}=l,D,M,ae,ue,N;function j(){ue&&ue(),N&&N(),l.cancelToken&&l.cancelToken.unsubscribe(D),l.signal&&l.signal.removeEventListener("abort",D)}let E=new XMLHttpRequest;E.open(l.method.toUpperCase(),l.url,!0),E.timeout=l.timeout;function J(){if(!E)return;const G=Ye.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),fe={data:!x||x==="text"||x==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:G,config:r,request:E};to(function(U){u(U),j()},function(U){a(U),j()},fe),E=null}"onloadend"in E?E.onloadend=J:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(J)},E.onabort=function(){E&&(a(new pe("Request aborted",pe.ECONNABORTED,r,E)),E=null)},E.onerror=function(){a(new pe("Network Error",pe.ERR_NETWORK,r,E)),E=null},E.ontimeout=function(){let _e=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const fe=l.transitional||Xi;l.timeoutErrorMessage&&(_e=l.timeoutErrorMessage),a(new pe(_e,fe.clarifyTimeoutError?pe.ETIMEDOUT:pe.ECONNABORTED,r,E)),E=null},d===void 0&&h.setContentType(null),"setRequestHeader"in E&&A.forEach(h.toJSON(),function(_e,fe){E.setRequestHeader(fe,_e)}),A.isUndefined(l.withCredentials)||(E.withCredentials=!!l.withCredentials),x&&x!=="json"&&(E.responseType=l.responseType),C&&([ae,N]=kn(C,!0),E.addEventListener("progress",ae)),$&&E.upload&&([M,ue]=kn($),E.upload.addEventListener("progress",M),E.upload.addEventListener("loadend",ue)),(l.cancelToken||l.signal)&&(D=G=>{E&&(a(!G||G.type?new At(null,r,E):G),E.abort(),E=null)},l.cancelToken&&l.cancelToken.subscribe(D),l.signal&&(l.signal.aborted?D():l.signal.addEventListener("abort",D)));const re=Fa(l.url);if(re&&qe.protocols.indexOf(re)===-1){a(new pe("Unsupported protocol "+re+":",pe.ERR_BAD_REQUEST,r));return}E.send(d||null)})},Ha=(r,o)=>{const{length:u}=r=r?r.filter(Boolean):[];if(o||u){let a=new AbortController,l;const d=function(C){if(!l){l=!0,x();const D=C instanceof Error?C:this.reason;a.abort(D instanceof pe?D:new At(D instanceof Error?D.message:D))}};let h=o&&setTimeout(()=>{h=null,d(new pe(`timeout ${o} of ms exceeded`,pe.ETIMEDOUT))},o);const x=()=>{r&&(h&&clearTimeout(h),h=null,r.forEach(C=>{C.unsubscribe?C.unsubscribe(d):C.removeEventListener("abort",d)}),r=null)};r.forEach(C=>C.addEventListener("abort",d));const{signal:$}=a;return $.unsubscribe=()=>A.asap(x),$}},za=function*(r,o){let u=r.byteLength;if(u<o){yield r;return}let a=0,l;for(;a<u;)l=a+o,yield r.slice(a,l),a=l},Va=async function*(r,o){for await(const u of Wa(r))yield*za(u,o)},Wa=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const o=r.getReader();try{for(;;){const{done:u,value:a}=await o.read();if(u)break;yield a}}finally{await o.cancel()}},ao=(r,o,u,a)=>{const l=Va(r,o);let d=0,h,x=$=>{h||(h=!0,a&&a($))};return new ReadableStream({async pull($){try{const{done:C,value:D}=await l.next();if(C){x(),$.close();return}let M=D.byteLength;if(u){let ae=d+=M;u(ae)}$.enqueue(new Uint8Array(D))}catch(C){throw x(C),C}},cancel($){return x($),l.return()}},{highWaterMark:2})},Tn=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",uo=Tn&&typeof ReadableStream=="function",Ja=Tn&&(typeof TextEncoder=="function"?(r=>o=>r.encode(o))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),co=(r,...o)=>{try{return!!r(...o)}catch{return!1}},Ga=uo&&co(()=>{let r=!1;const o=new Request(qe.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!o}),lo=64*1024,gr=uo&&co(()=>A.isReadableStream(new Response("").body)),Rn={stream:gr&&(r=>r.body)};Tn&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(o=>{!Rn[o]&&(Rn[o]=A.isFunction(r[o])?u=>u[o]():(u,a)=>{throw new pe(`Response type '${o}' is not supported`,pe.ERR_NOT_SUPPORT,a)})})})(new Response);const Xa=async r=>{if(r==null)return 0;if(A.isBlob(r))return r.size;if(A.isSpecCompliantForm(r))return(await new Request(qe.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(A.isArrayBufferView(r)||A.isArrayBuffer(r))return r.byteLength;if(A.isURLSearchParams(r)&&(r=r+""),A.isString(r))return(await Ja(r)).byteLength},Qa=async(r,o)=>{const u=A.toFiniteNumber(r.getContentLength());return u??Xa(o)},br={http:ba,xhr:Ya,fetch:Tn&&(async r=>{let{url:o,method:u,data:a,signal:l,cancelToken:d,timeout:h,onDownloadProgress:x,onUploadProgress:$,responseType:C,headers:D,withCredentials:M="same-origin",fetchOptions:ae}=so(r);C=C?(C+"").toLowerCase():"text";let ue=Ha([l,d&&d.toAbortSignal()],h),N;const j=ue&&ue.unsubscribe&&(()=>{ue.unsubscribe()});let E;try{if($&&Ga&&u!=="get"&&u!=="head"&&(E=await Qa(D,a))!==0){let fe=new Request(o,{method:"POST",body:a,duplex:"half"}),te;if(A.isFormData(a)&&(te=fe.headers.get("content-type"))&&D.setContentType(te),fe.body){const[U,K]=no(E,kn(ro($)));a=ao(fe.body,lo,U,K)}}A.isString(M)||(M=M?"include":"omit");const J="credentials"in Request.prototype;N=new Request(o,{...ae,signal:ue,method:u.toUpperCase(),headers:D.normalize().toJSON(),body:a,duplex:"half",credentials:J?M:void 0});let re=await fetch(N);const G=gr&&(C==="stream"||C==="response");if(gr&&(x||G&&j)){const fe={};["status","statusText","headers"].forEach(ce=>{fe[ce]=re[ce]});const te=A.toFiniteNumber(re.headers.get("content-length")),[U,K]=x&&no(te,kn(ro(x),!0))||[];re=new Response(ao(re.body,lo,U,()=>{K&&K(),j&&j()}),fe)}C=C||"text";let _e=await Rn[A.findKey(Rn,C)||"text"](re,r);return!G&&j&&j(),await new Promise((fe,te)=>{to(fe,te,{data:_e,headers:Ye.from(re.headers),status:re.status,statusText:re.statusText,config:r,request:N})})}catch(J){throw j&&j(),J&&J.name==="TypeError"&&/fetch/i.test(J.message)?Object.assign(new pe("Network Error",pe.ERR_NETWORK,r,N),{cause:J.cause||J}):pe.from(J,J&&J.code,r,N)}})};A.forEach(br,(r,o)=>{if(r){try{Object.defineProperty(r,"name",{value:o})}catch{}Object.defineProperty(r,"adapterName",{value:o})}});const fo=r=>`- ${r}`,Za=r=>A.isFunction(r)||r===null||r===!1,ho={getAdapter:r=>{r=A.isArray(r)?r:[r];const{length:o}=r;let u,a;const l={};for(let d=0;d<o;d++){u=r[d];let h;if(a=u,!Za(u)&&(a=br[(h=String(u)).toLowerCase()],a===void 0))throw new pe(`Unknown adapter '${h}'`);if(a)break;l[h||"#"+d]=a}if(!a){const d=Object.entries(l).map(([x,$])=>`adapter ${x} `+($===!1?"is not supported by the environment":"is not available in the build"));let h=o?d.length>1?`since :
6
- `+d.map(fo).join(`
7
- `):" "+fo(d[0]):"as no adapter specified";throw new pe("There is no suitable adapter to dispatch the request "+h,"ERR_NOT_SUPPORT")}return a},adapters:br};function wr(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new At(null,r)}function po(r){return wr(r),r.headers=Ye.from(r.headers),r.data=vr.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),ho.getAdapter(r.adapter||Lt.adapter)(r).then(function(a){return wr(r),a.data=vr.call(r,r.transformResponse,a),a.headers=Ye.from(a.headers),a},function(a){return eo(a)||(wr(r),a&&a.response&&(a.response.data=vr.call(r,r.transformResponse,a.response),a.response.headers=Ye.from(a.response.headers))),Promise.reject(a)})}const mo="1.8.3",An={};["object","boolean","number","function","string","symbol"].forEach((r,o)=>{An[r]=function(a){return typeof a===r||"a"+(o<1?"n ":" ")+r}});const yo={};An.transitional=function(o,u,a){function l(d,h){return"[Axios v"+mo+"] Transitional option '"+d+"'"+h+(a?". "+a:"")}return(d,h,x)=>{if(o===!1)throw new pe(l(h," has been removed"+(u?" in "+u:"")),pe.ERR_DEPRECATED);return u&&!yo[h]&&(yo[h]=!0,console.warn(l(h," has been deprecated since v"+u+" and will be removed in the near future"))),o?o(d,h,x):!0}},An.spelling=function(o){return(u,a)=>(console.warn(`${a} is likely a misspelling of ${o}`),!0)};function eu(r,o,u){if(typeof r!="object")throw new pe("options must be an object",pe.ERR_BAD_OPTION_VALUE);const a=Object.keys(r);let l=a.length;for(;l-- >0;){const d=a[l],h=o[d];if(h){const x=r[d],$=x===void 0||h(x,d,r);if($!==!0)throw new pe("option "+d+" must be "+$,pe.ERR_BAD_OPTION_VALUE);continue}if(u!==!0)throw new pe("Unknown option "+d,pe.ERR_BAD_OPTION)}}const $n={assertOptions:eu,validators:An},tt=$n.validators;let vt=class{constructor(o){this.defaults=o,this.interceptors={request:new Gi,response:new Gi}}async request(o,u){try{return await this._request(o,u)}catch(a){if(a instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const d=l.stack?l.stack.replace(/^.+\n/,""):"";try{a.stack?d&&!String(a.stack).endsWith(d.replace(/^.+\n.+\n/,""))&&(a.stack+=`
8
- `+d):a.stack=d}catch{}}throw a}}_request(o,u){typeof o=="string"?(u=u||{},u.url=o):u=o||{},u=yt(this.defaults,u);const{transitional:a,paramsSerializer:l,headers:d}=u;a!==void 0&&$n.assertOptions(a,{silentJSONParsing:tt.transitional(tt.boolean),forcedJSONParsing:tt.transitional(tt.boolean),clarifyTimeoutError:tt.transitional(tt.boolean)},!1),l!=null&&(A.isFunction(l)?u.paramsSerializer={serialize:l}:$n.assertOptions(l,{encode:tt.function,serialize:tt.function},!0)),u.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?u.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:u.allowAbsoluteUrls=!0),$n.assertOptions(u,{baseUrl:tt.spelling("baseURL"),withXsrfToken:tt.spelling("withXSRFToken")},!0),u.method=(u.method||this.defaults.method||"get").toLowerCase();let h=d&&A.merge(d.common,d[u.method]);d&&A.forEach(["delete","get","head","post","put","patch","common"],N=>{delete d[N]}),u.headers=Ye.concat(h,d);const x=[];let $=!0;this.interceptors.request.forEach(function(j){typeof j.runWhen=="function"&&j.runWhen(u)===!1||($=$&&j.synchronous,x.unshift(j.fulfilled,j.rejected))});const C=[];this.interceptors.response.forEach(function(j){C.push(j.fulfilled,j.rejected)});let D,M=0,ae;if(!$){const N=[po.bind(this),void 0];for(N.unshift.apply(N,x),N.push.apply(N,C),ae=N.length,D=Promise.resolve(u);M<ae;)D=D.then(N[M++],N[M++]);return D}ae=x.length;let ue=u;for(M=0;M<ae;){const N=x[M++],j=x[M++];try{ue=N(ue)}catch(E){j.call(this,E);break}}try{D=po.call(this,ue)}catch(N){return Promise.reject(N)}for(M=0,ae=C.length;M<ae;)D=D.then(C[M++],C[M++]);return D}getUri(o){o=yt(this.defaults,o);const u=io(o.baseURL,o.url,o.allowAbsoluteUrls);return Ji(u,o.params,o.paramsSerializer)}};A.forEach(["delete","get","head","options"],function(o){vt.prototype[o]=function(u,a){return this.request(yt(a||{},{method:o,url:u,data:(a||{}).data}))}}),A.forEach(["post","put","patch"],function(o){function u(a){return function(d,h,x){return this.request(yt(x||{},{method:o,headers:a?{"Content-Type":"multipart/form-data"}:{},url:d,data:h}))}}vt.prototype[o]=u(),vt.prototype[o+"Form"]=u(!0)});let tu=class ss{constructor(o){if(typeof o!="function")throw new TypeError("executor must be a function.");let u;this.promise=new Promise(function(d){u=d});const a=this;this.promise.then(l=>{if(!a._listeners)return;let d=a._listeners.length;for(;d-- >0;)a._listeners[d](l);a._listeners=null}),this.promise.then=l=>{let d;const h=new Promise(x=>{a.subscribe(x),d=x}).then(l);return h.cancel=function(){a.unsubscribe(d)},h},o(function(d,h,x){a.reason||(a.reason=new At(d,h,x),u(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(o){if(this.reason){o(this.reason);return}this._listeners?this._listeners.push(o):this._listeners=[o]}unsubscribe(o){if(!this._listeners)return;const u=this._listeners.indexOf(o);u!==-1&&this._listeners.splice(u,1)}toAbortSignal(){const o=new AbortController,u=a=>{o.abort(a)};return this.subscribe(u),o.signal.unsubscribe=()=>this.unsubscribe(u),o.signal}static source(){let o;return{token:new ss(function(l){o=l}),cancel:o}}};function nu(r){return function(u){return r.apply(null,u)}}function ru(r){return A.isObject(r)&&r.isAxiosError===!0}const _r={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(_r).forEach(([r,o])=>{_r[o]=r});function vo(r){const o=new vt(r),u=Mi(vt.prototype.request,o);return A.extend(u,vt.prototype,o,{allOwnKeys:!0}),A.extend(u,o,null,{allOwnKeys:!0}),u.create=function(l){return vo(yt(r,l))},u}const Re=vo(Lt);Re.Axios=vt,Re.CanceledError=At,Re.CancelToken=tu,Re.isCancel=eo,Re.VERSION=mo,Re.toFormData=On,Re.AxiosError=pe,Re.Cancel=Re.CanceledError,Re.all=function(o){return Promise.all(o)},Re.spread=nu,Re.isAxiosError=ru,Re.mergeConfig=yt,Re.AxiosHeaders=Ye,Re.formToJSON=r=>Qi(A.isHTMLForm(r)?new FormData(r):r),Re.getAdapter=ho.getAdapter,Re.HttpStatusCode=_r,Re.default=Re;const{Axios:ic,AxiosError:oc,CanceledError:sc,isCancel:ac,CancelToken:uc,VERSION:cc,all:lc,Cancel:fc,isAxiosError:dc,spread:hc,toFormData:pc,AxiosHeaders:mc,HttpStatusCode:yc,formToJSON:vc,getAdapter:gc,mergeConfig:bc}=Re;class go{constructor(o){oi(this,"storage");this.storage=o}getRaw(o,u=null){return this.storage.getItem(o)??u}setRaw(o,u){this.storage.setItem(o,u)}get(o,u=null){const a=this.getRaw(o);return a?bn.parse(a):u}set(o,u){this.setRaw(o,bn.stringify(u))}del(o){this.storage.removeItem(o)}clear(){this.storage.clear()}}const xr=new go(localStorage),bo=new go(sessionStorage),iu=Object.freeze(Object.defineProperty({__proto__:null,default:{local:xr,session:bo},local:xr,session:bo},Symbol.toStringTag,{value:"Module"})),wo="access_token",_o=(r,o="请求异常.")=>r.message??r.msg??o,Yt=Re.create({baseURL:"",timeout:3e3}),ou=()=>Yt.interceptors.request.use(r=>{const o=xr.get(wo);return o&&(r.headers.Authorization=`Bearer ${o}`),r}),su=r=>Yt.interceptors.response.use(o=>{const u=o.data;if(o.status===200)return u.data;const a=new Error(_o(u));return r?r(a):Promise.reject(a)},o=>r?r(o):Promise.reject(o));let Pn=!1,Dn=[];const au=(r,o,u)=>{const{response:a}=r;return a.config.url==o?(Pn=!1,Dn=[],Promise.reject(r)):(Pn||(Pn=!0,u().then(()=>Dn.forEach(l=>l())).finally(()=>{Pn=!1,Dn=[]})),new Promise(l=>{Dn.push(()=>l(Yt(a.config)))}))},xo=(r,o)=>Ht({url:r,method:"GET",params:o}),So=(r,o)=>Ht({url:r,method:"POST",data:o}),Oo=r=>(r.responseType??(r.responseType="blob"),Ht(r)),Ht=r=>(r.headers={...r.headers,"Content-Type":"application/json"},Yt.request(r)),uu=Object.freeze(Object.defineProperty({__proto__:null,ACCESS_TOKEN:wo,axios:Yt,default:{get:xo,post:So,download:Oo,request:Ht},download:Oo,get:xo,message:_o,post:So,request:Ht,responseInterceptor:su,retry:au,tokenRequestInterceptor:ou},Symbol.toStringTag,{value:"Module"})),Sr=()=>{const r=decodeURIComponent(location.search);return new URLSearchParams(r)},Eo=()=>{let r={};for(let[o,u]of Sr().entries())r[o]=u;return r},ko=(r,o,u)=>{o??(o="_blank"),window.open(r,o,u)},cu=Object.freeze(Object.defineProperty({__proto__:null,all:Eo,default:{search:Sr,all:Eo,open:ko},open:ko,search:Sr},Symbol.toStringTag,{value:"Module"}));De.date=xs,De.db=ks,De.fast=Ts,De.file=Rs,De.hash=js,De.http=uu,De.json=Cs,De.storage=iu,De.url=cu,Object.defineProperty(De,Symbol.toStringTag,{value:"Module"})});
3
+ `+c:""),this.inner=c||null):typeof s=="object"&&(this.message="".concat(s.name," ").concat(s.message),this.inner=s):(this.message=Ee[t]||n,this.inner=null)}return j(i).from(ot),e[t]=i,e},{});Z.Syntax=SyntaxError,Z.Type=TypeError,Z.Range=RangeError;var Ce=Xt.reduce(function(e,t){return e[t+"Error"]=Z[t],e},{}),Fe=Qe.reduce(function(e,t){return["Syntax","Type","Range"].indexOf(t)===-1&&(e[t+"Error"]=Z[t]),e},{});function ye(){}function He(e){return e}function $t(e,t){return e==null||e===He?t:function(n){return t(e(n))}}function Xe(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function zt(e,t){return e===ye?t:function(){var n=e.apply(this,arguments);n!==void 0&&(arguments[0]=n);var i=this.onsuccess,s=this.onerror;this.onsuccess=null,this.onerror=null;var c=t.apply(this,arguments);return i&&(this.onsuccess=this.onsuccess?Xe(i,this.onsuccess):i),s&&(this.onerror=this.onerror?Xe(s,this.onerror):s),c!==void 0?c:n}}function Vt(e,t){return e===ye?t:function(){e.apply(this,arguments);var n=this.onsuccess,i=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),n&&(this.onsuccess=this.onsuccess?Xe(n,this.onsuccess):n),i&&(this.onerror=this.onerror?Xe(i,this.onerror):i)}}function Wt(e,t){return e===ye?t:function(n){var i=e.apply(this,arguments);$(n,i);var s=this.onsuccess,c=this.onerror;return this.onsuccess=null,this.onerror=null,n=t.apply(this,arguments),s&&(this.onsuccess=this.onsuccess?Xe(s,this.onsuccess):s),c&&(this.onerror=this.onerror?Xe(c,this.onerror):c),i===void 0?n===void 0?void 0:n:$(i,n)}}function Jt(e,t){return e===ye?t:function(){return t.apply(this,arguments)!==!1&&e.apply(this,arguments)}}function Cn(e,t){return e===ye?t:function(){var n=e.apply(this,arguments);if(n&&typeof n.then=="function"){for(var i=this,s=arguments.length,c=new Array(s);s--;)c[s]=arguments[s];return n.then(function(){return t.apply(i,c)})}return t.apply(this,arguments)}}Fe.ModifyError=je,Fe.DexieError=Oe,Fe.BulkError=Le;var nt=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Ro(e){nt=e}var Gt={},Ao=100,gt=typeof Promise>"u"?[]:function(){var e=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[e,C(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,C(t),e]}(),Xt=gt[0],Qe=gt[1],gt=gt[2],Qe=Qe&&Qe.then,bt=Xt&&Xt.constructor,Or=!!gt,Qt=function(e,t){Zt.push([e,t]),jn&&(queueMicrotask(du),jn=!1)},Er=!0,jn=!0,wt=[],Mn=[],kr=He,ut={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:ye,pgp:!1,env:{},finalize:ye},ie=ut,Zt=[],_t=0,Nn=[];function W(e){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var t=this._PSD=ie;if(typeof e!="function"){if(e!==Gt)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&Rr(this,this._value))}this._state=null,this._value=null,++t.ref,function n(i,s){try{s(function(c){if(i._state===null){if(c===i)throw new TypeError("A promise cannot be resolved with itself.");var f=i._lib&&Pt();c&&typeof c.then=="function"?n(i,function(p,y){c instanceof W?c._then(p,y):c.then(p,y)}):(i._state=!0,i._value=c,Po(i)),f&&Dt()}},Rr.bind(null,i))}catch(c){Rr(i,c)}}(this,e)}var Tr={get:function(){var e=ie,t=Kn;function n(i,s){var c=this,f=!e.global&&(e!==ie||t!==Kn),p=f&&!lt(),y=new W(function(g,_){Ar(c,new $o(Co(i,e,f,p),Co(s,e,f,p),g,_,e))});return this._consoleTask&&(y._consoleTask=this._consoleTask),y}return n.prototype=Gt,n},set:function(e){N(this,"then",e&&e.prototype===Gt?Tr:{get:function(){return e},set:Tr.set})}};function $o(e,t,n,i,s){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof t=="function"?t:null,this.resolve=n,this.reject=i,this.psd=s}function Rr(e,t){var n,i;Mn.push(t),e._state===null&&(n=e._lib&&Pt(),t=kr(t),e._state=!1,e._value=t,i=e,wt.some(function(s){return s._value===i._value})||wt.push(i),Po(e),n&&Dt())}function Po(e){var t=e._listeners;e._listeners=[];for(var n=0,i=t.length;n<i;++n)Ar(e,t[n]);var s=e._PSD;--s.ref||s.finalize(),_t===0&&(++_t,Qt(function(){--_t==0&&$r()},[]))}function Ar(e,t){if(e._state!==null){var n=e._state?t.onFulfilled:t.onRejected;if(n===null)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++_t,Qt(fu,[n,e,t])}else e._listeners.push(t)}function fu(e,t,n){try{var i,s=t._value;!t._state&&Mn.length&&(Mn=[]),i=nt&&t._consoleTask?t._consoleTask.run(function(){return e(s)}):e(s),t._state||Mn.indexOf(s)!==-1||function(c){for(var f=wt.length;f;)if(wt[--f]._value===c._value)return wt.splice(f,1)}(t),n.resolve(i)}catch(c){n.reject(c)}finally{--_t==0&&$r(),--n.psd.ref||n.psd.finalize()}}function du(){xt(ut,function(){Pt()&&Dt()})}function Pt(){var e=Er;return jn=Er=!1,e}function Dt(){var e,t,n;do for(;0<Zt.length;)for(e=Zt,Zt=[],n=e.length,t=0;t<n;++t){var i=e[t];i[0].apply(null,i[1])}while(0<Zt.length);jn=Er=!0}function $r(){var e=wt;wt=[],e.forEach(function(i){i._PSD.onunhandled.call(null,i._value,i)});for(var t=Nn.slice(0),n=t.length;n;)t[--n]()}function Fn(e){return new W(Gt,!1,e)}function Te(e,t){var n=ie;return function(){var i=Pt(),s=ie;try{return ft(n,!0),e.apply(this,arguments)}catch(c){t&&t(c)}finally{ft(s,!1),i&&Dt()}}}ae(W.prototype,{then:Tr,_then:function(e,t){Ar(this,new $o(null,null,e,t,ie))},catch:function(e){if(arguments.length===1)return this.then(null,e);var t=e,n=arguments[1];return typeof t=="function"?this.then(null,function(i){return(i instanceof t?n:Fn)(i)}):this.then(null,function(i){return(i&&i.name===t?n:Fn)(i)})},finally:function(e){return this.then(function(t){return W.resolve(e()).then(function(){return t})},function(t){return W.resolve(e()).then(function(){return Fn(t)})})},timeout:function(e,t){var n=this;return e<1/0?new W(function(i,s){var c=setTimeout(function(){return s(new Z.Timeout(t))},e);n.then(i,s).finally(clearTimeout.bind(null,c))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&N(W.prototype,Symbol.toStringTag,"Dexie.Promise"),ut.env=Do(),ae(W,{all:function(){var e=se.apply(null,arguments).map(In);return new W(function(t,n){e.length===0&&t([]);var i=e.length;e.forEach(function(s,c){return W.resolve(s).then(function(f){e[c]=f,--i||t(e)},n)})})},resolve:function(e){return e instanceof W?e:e&&typeof e.then=="function"?new W(function(t,n){e.then(t,n)}):new W(Gt,!0,e)},reject:Fn,race:function(){var e=se.apply(null,arguments).map(In);return new W(function(t,n){e.map(function(i){return W.resolve(i).then(t,n)})})},PSD:{get:function(){return ie},set:function(e){return ie=e}},totalEchoes:{get:function(){return Kn}},newPSD:ct,usePSD:xt,scheduler:{get:function(){return Qt},set:function(e){Qt=e}},rejectionMapper:{get:function(){return kr},set:function(e){kr=e}},follow:function(e,t){return new W(function(n,i){return ct(function(s,c){var f=ie;f.unhandleds=[],f.onunhandled=c,f.finalize=Xe(function(){var p,y=this;p=function(){y.unhandleds.length===0?s():c(y.unhandleds[0])},Nn.push(function g(){p(),Nn.splice(Nn.indexOf(g),1)}),++_t,Qt(function(){--_t==0&&$r()},[])},f.finalize),e()},t,n,i)})}}),bt&&(bt.allSettled&&N(W,"allSettled",function(){var e=se.apply(null,arguments).map(In);return new W(function(t){e.length===0&&t([]);var n=e.length,i=new Array(n);e.forEach(function(s,c){return W.resolve(s).then(function(f){return i[c]={status:"fulfilled",value:f}},function(f){return i[c]={status:"rejected",reason:f}}).then(function(){return--n||t(i)})})})}),bt.any&&typeof AggregateError<"u"&&N(W,"any",function(){var e=se.apply(null,arguments).map(In);return new W(function(t,n){e.length===0&&n(new AggregateError([]));var i=e.length,s=new Array(i);e.forEach(function(c,f){return W.resolve(c).then(function(p){return t(p)},function(p){s[f]=p,--i||n(new AggregateError(s))})})})}),bt.withResolvers&&(W.withResolvers=bt.withResolvers));var Me={awaits:0,echoes:0,id:0},hu=0,qn=[],Bn=0,Kn=0,pu=0;function ct(e,t,n,i){var s=ie,c=Object.create(s);return c.parent=s,c.ref=0,c.global=!1,c.id=++pu,ut.env,c.env=Or?{Promise:W,PromiseProp:{value:W,configurable:!0,writable:!0},all:W.all,race:W.race,allSettled:W.allSettled,any:W.any,resolve:W.resolve,reject:W.reject}:{},t&&$(c,t),++s.ref,c.finalize=function(){--this.parent.ref||this.parent.finalize()},i=xt(c,e,n,i),c.ref===0&&c.finalize(),i}function Ct(){return Me.id||(Me.id=++hu),++Me.awaits,Me.echoes+=Ao,Me.id}function lt(){return!!Me.awaits&&(--Me.awaits==0&&(Me.id=0),Me.echoes=Me.awaits*Ao,!0)}function In(e){return Me.echoes&&e&&e.constructor===bt?(Ct(),e.then(function(t){return lt(),t},function(t){return lt(),$e(t)})):e}function mu(){var e=qn[qn.length-1];qn.pop(),ft(e,!1)}function ft(e,t){var n,i=ie;(t?!Me.echoes||Bn++&&e===ie:!Bn||--Bn&&e===ie)||queueMicrotask(t?(function(s){++Kn,Me.echoes&&--Me.echoes!=0||(Me.echoes=Me.awaits=Me.id=0),qn.push(ie),ft(s,!0)}).bind(null,e):mu),e!==ie&&(ie=e,i===ut&&(ut.env=Do()),Or&&(n=ut.env.Promise,t=e.env,(i.global||e.global)&&(Object.defineProperty(d,"Promise",t.PromiseProp),n.all=t.all,n.race=t.race,n.resolve=t.resolve,n.reject=t.reject,t.allSettled&&(n.allSettled=t.allSettled),t.any&&(n.any=t.any))))}function Do(){var e=d.Promise;return Or?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(d,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject}:{}}function xt(e,t,n,i,s){var c=ie;try{return ft(e,!0),t(n,i,s)}finally{ft(c,!1)}}function Co(e,t,n,i){return typeof e!="function"?e:function(){var s=ie;n&&Ct(),ft(t,!0);try{return e.apply(this,arguments)}finally{ft(s,!1),i&&queueMicrotask(lt)}}}function Pr(e){Promise===bt&&Me.echoes===0?Bn===0?e():enqueueNativeMicroTask(e):setTimeout(e,0)}(""+Qe).indexOf("[native code]")===-1&&(Ct=lt=ye);var $e=W.reject,St="￿",st="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",jo="String expected.",jt=[],Ln="__dbnames",Dr="readonly",Cr="readwrite";function Ot(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}var Mo={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Un(e){return typeof e!="string"||/\./.test(e)?function(t){return t}:function(t){return t[e]===void 0&&e in t&&delete(t=we(t))[e],t}}function No(){throw Z.Type()}function xe(e,t){try{var n=Fo(e),i=Fo(t);if(n!==i)return n==="Array"?1:i==="Array"?-1:n==="binary"?1:i==="binary"?-1:n==="string"?1:i==="string"?-1:n==="Date"?1:i!=="Date"?NaN:-1;switch(n){case"number":case"Date":case"string":return t<e?1:e<t?-1:0;case"binary":return function(s,c){for(var f=s.length,p=c.length,y=f<p?f:p,g=0;g<y;++g)if(s[g]!==c[g])return s[g]<c[g]?-1:1;return f===p?0:f<p?-1:1}(qo(e),qo(t));case"Array":return function(s,c){for(var f=s.length,p=c.length,y=f<p?f:p,g=0;g<y;++g){var _=xe(s[g],c[g]);if(_!==0)return _}return f===p?0:f<p?-1:1}(e,t)}}catch{}return NaN}function Fo(e){var t=typeof e;return t!="object"?t:ArrayBuffer.isView(e)?"binary":(e=H(e),e==="ArrayBuffer"?"binary":e)}function qo(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}var Bo=(ke.prototype._trans=function(e,t,n){var i=this._tx||ie.trans,s=this.name,c=nt&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(e==="readonly"?"read":"write"," ").concat(this.name));function f(g,_,m){if(!m.schema[s])throw new Z.NotFound("Table "+s+" not part of transaction");return t(m.idbtrans,m)}var p=Pt();try{var y=i&&i.db._novip===this.db._novip?i===ie.trans?i._promise(e,f,n):ct(function(){return i._promise(e,f,n)},{trans:i,transless:ie.transless||ie}):function g(_,m,O,v){if(_.idbdb&&(_._state.openComplete||ie.letThrough||_._vip)){var w=_._createTransaction(m,O,_._dbSchema);try{w.create(),_._state.PR1398_maxLoop=3}catch(S){return S.name===We.InvalidState&&_.isOpen()&&0<--_._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),_.close({disableAutoOpen:!1}),_.open().then(function(){return g(_,m,O,v)})):$e(S)}return w._promise(m,function(S,b){return ct(function(){return ie.trans=w,v(S,b,w)})}).then(function(S){if(m==="readwrite")try{w.idbtrans.commit()}catch{}return m==="readonly"?S:w._completion.then(function(){return S})})}if(_._state.openComplete)return $e(new Z.DatabaseClosed(_._state.dbOpenError));if(!_._state.isBeingOpened){if(!_._state.autoOpen)return $e(new Z.DatabaseClosed);_.open().catch(ye)}return _._state.dbReadyPromise.then(function(){return g(_,m,O,v)})}(this.db,e,[this.name],f);return c&&(y._consoleTask=c,y=y.catch(function(g){return console.trace(g),$e(g)})),y}finally{p&&Dt()}},ke.prototype.get=function(e,t){var n=this;return e&&e.constructor===Object?this.where(e).first(t):e==null?$e(new Z.Type("Invalid argument to Table.get()")):this._trans("readonly",function(i){return n.core.get({trans:i,key:e}).then(function(s){return n.hook.reading.fire(s)})}).then(t)},ke.prototype.where=function(e){if(typeof e=="string")return new this.db.WhereClause(this,e);if(x(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var t=h(e);if(t.length===1)return this.where(t[0]).equals(e[t[0]]);var n=this.schema.indexes.concat(this.schema.primKey).filter(function(p){if(p.compound&&t.every(function(g){return 0<=p.keyPath.indexOf(g)})){for(var y=0;y<t.length;++y)if(t.indexOf(p.keyPath[y])===-1)return!1;return!0}return!1}).sort(function(p,y){return p.keyPath.length-y.keyPath.length})[0];if(n&&this.db._maxKey!==St){var c=n.keyPath.slice(0,t.length);return this.where(c).equals(c.map(function(y){return e[y]}))}!n&&nt&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(t.join("+"),"]"));var i=this.schema.idxByName;function s(p,y){return xe(p,y)===0}var f=t.reduce(function(m,y){var g=m[0],_=m[1],m=i[y],O=e[y];return[g||m,g||!m?Ot(_,m&&m.multi?function(v){return v=te(v,y),x(v)&&v.some(function(w){return s(O,w)})}:function(v){return s(O,te(v,y))}):_]},[null,null]),c=f[0],f=f[1];return c?this.where(c.name).equals(e[c.keyPath]).filter(f):n?this.filter(f):this.where(t).equals("")},ke.prototype.filter=function(e){return this.toCollection().and(e)},ke.prototype.count=function(e){return this.toCollection().count(e)},ke.prototype.offset=function(e){return this.toCollection().offset(e)},ke.prototype.limit=function(e){return this.toCollection().limit(e)},ke.prototype.each=function(e){return this.toCollection().each(e)},ke.prototype.toArray=function(e){return this.toCollection().toArray(e)},ke.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},ke.prototype.orderBy=function(e){return new this.db.Collection(new this.db.WhereClause(this,x(e)?"[".concat(e.join("+"),"]"):e))},ke.prototype.reverse=function(){return this.toCollection().reverse()},ke.prototype.mapToClass=function(e){var t,n=this.db,i=this.name;function s(){return t!==null&&t.apply(this,arguments)||this}(this.schema.mappedClass=e).prototype instanceof No&&(function(y,g){if(typeof g!="function"&&g!==null)throw new TypeError("Class extends value "+String(g)+" is not a constructor or null");function _(){this.constructor=y}u(y,g),y.prototype=g===null?Object.create(g):(_.prototype=g.prototype,new _)}(s,t=e),Object.defineProperty(s.prototype,"db",{get:function(){return n},enumerable:!1,configurable:!0}),s.prototype.table=function(){return i},e=s);for(var c=new Set,f=e.prototype;f;f=C(f))Object.getOwnPropertyNames(f).forEach(function(y){return c.add(y)});function p(y){if(!y)return y;var g,_=Object.create(e.prototype);for(g in y)if(!c.has(g))try{_[g]=y[g]}catch{}return _}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=p,this.hook("reading",p),e},ke.prototype.defineClass=function(){return this.mapToClass(function(e){$(this,e)})},ke.prototype.add=function(e,t){var n=this,i=this.schema.primKey,s=i.auto,c=i.keyPath,f=e;return c&&s&&(f=Un(c)(e)),this._trans("readwrite",function(p){return n.core.mutate({trans:p,type:"add",keys:t!=null?[t]:null,values:[f]})}).then(function(p){return p.numFailures?W.reject(p.failures[0]):p.lastResult}).then(function(p){if(c)try{U(e,c,p)}catch{}return p})},ke.prototype.update=function(e,t){return typeof e!="object"||x(e)?this.where(":id").equals(e).modify(t):(e=te(e,this.schema.primKey.keyPath),e===void 0?$e(new Z.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(e).modify(t))},ke.prototype.put=function(e,t){var n=this,i=this.schema.primKey,s=i.auto,c=i.keyPath,f=e;return c&&s&&(f=Un(c)(e)),this._trans("readwrite",function(p){return n.core.mutate({trans:p,type:"put",values:[f],keys:t!=null?[t]:null})}).then(function(p){return p.numFailures?W.reject(p.failures[0]):p.lastResult}).then(function(p){if(c)try{U(e,c,p)}catch{}return p})},ke.prototype.delete=function(e){var t=this;return this._trans("readwrite",function(n){return t.core.mutate({trans:n,type:"delete",keys:[e]})}).then(function(n){return n.numFailures?W.reject(n.failures[0]):void 0})},ke.prototype.clear=function(){var e=this;return this._trans("readwrite",function(t){return e.core.mutate({trans:t,type:"deleteRange",range:Mo})}).then(function(t){return t.numFailures?W.reject(t.failures[0]):void 0})},ke.prototype.bulkGet=function(e){var t=this;return this._trans("readonly",function(n){return t.core.getMany({keys:e,trans:n}).then(function(i){return i.map(function(s){return t.hook.reading.fire(s)})})})},ke.prototype.bulkAdd=function(e,t,n){var i=this,s=Array.isArray(t)?t:void 0,c=(n=n||(s?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",function(f){var g=i.schema.primKey,p=g.auto,g=g.keyPath;if(g&&s)throw new Z.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(s&&s.length!==e.length)throw new Z.InvalidArgument("Arguments objects and keys must have the same length");var y=e.length,g=g&&p?e.map(Un(g)):e;return i.core.mutate({trans:f,type:"add",keys:s,values:g,wantResults:c}).then(function(w){var m=w.numFailures,O=w.results,v=w.lastResult,w=w.failures;if(m===0)return c?O:v;throw new Le("".concat(i.name,".bulkAdd(): ").concat(m," of ").concat(y," operations failed"),w)})})},ke.prototype.bulkPut=function(e,t,n){var i=this,s=Array.isArray(t)?t:void 0,c=(n=n||(s?void 0:t))?n.allKeys:void 0;return this._trans("readwrite",function(f){var g=i.schema.primKey,p=g.auto,g=g.keyPath;if(g&&s)throw new Z.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(s&&s.length!==e.length)throw new Z.InvalidArgument("Arguments objects and keys must have the same length");var y=e.length,g=g&&p?e.map(Un(g)):e;return i.core.mutate({trans:f,type:"put",keys:s,values:g,wantResults:c}).then(function(w){var m=w.numFailures,O=w.results,v=w.lastResult,w=w.failures;if(m===0)return c?O:v;throw new Le("".concat(i.name,".bulkPut(): ").concat(m," of ").concat(y," operations failed"),w)})})},ke.prototype.bulkUpdate=function(e){var t=this,n=this.core,i=e.map(function(f){return f.key}),s=e.map(function(f){return f.changes}),c=[];return this._trans("readwrite",function(f){return n.getMany({trans:f,keys:i,cache:"clone"}).then(function(p){var y=[],g=[];e.forEach(function(m,O){var v=m.key,w=m.changes,S=p[O];if(S){for(var b=0,k=Object.keys(w);b<k.length;b++){var T=k[b],R=w[T];if(T===t.schema.primKey.keyPath){if(xe(R,v)!==0)throw new Z.Constraint("Cannot update primary key in bulkUpdate()")}else U(S,T,R)}c.push(O),y.push(v),g.push(S)}});var _=y.length;return n.mutate({trans:f,type:"put",keys:y,values:g,updates:{keys:i,changeSpecs:s}}).then(function(m){var O=m.numFailures,v=m.failures;if(O===0)return _;for(var w=0,S=Object.keys(v);w<S.length;w++){var b,k=S[w],T=c[Number(k)];T!=null&&(b=v[k],delete v[k],v[T]=b)}throw new Le("".concat(t.name,".bulkUpdate(): ").concat(O," of ").concat(_," operations failed"),v)})})})},ke.prototype.bulkDelete=function(e){var t=this,n=e.length;return this._trans("readwrite",function(i){return t.core.mutate({trans:i,type:"delete",keys:e})}).then(function(f){var s=f.numFailures,c=f.lastResult,f=f.failures;if(s===0)return c;throw new Le("".concat(t.name,".bulkDelete(): ").concat(s," of ").concat(n," operations failed"),f)})},ke);function ke(){}function en(e){function t(f,p){if(p){for(var y=arguments.length,g=new Array(y-1);--y;)g[y-1]=arguments[y];return n[f].subscribe.apply(null,g),e}if(typeof f=="string")return n[f]}var n={};t.addEventType=c;for(var i=1,s=arguments.length;i<s;++i)c(arguments[i]);return t;function c(f,p,y){if(typeof f!="object"){var g;p=p||Jt;var _={subscribers:[],fire:y=y||ye,subscribe:function(m){_.subscribers.indexOf(m)===-1&&(_.subscribers.push(m),_.fire=p(_.fire,m))},unsubscribe:function(m){_.subscribers=_.subscribers.filter(function(O){return O!==m}),_.fire=_.subscribers.reduce(p,y)}};return n[f]=t[f]=_}h(g=f).forEach(function(m){var O=g[m];if(x(O))c(m,g[m][0],g[m][1]);else{if(O!=="asap")throw new Z.InvalidArgument("Invalid event config");var v=c(m,He,function(){for(var w=arguments.length,S=new Array(w);w--;)S[w]=arguments[w];v.subscribers.forEach(function(b){fe(function(){b.apply(null,S)})})})}})}}function tn(e,t){return j(t).from({prototype:e}),t}function Mt(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function jr(e,t){e.filter=Ot(e.filter,t)}function Mr(e,t,n){var i=e.replayFilter;e.replayFilter=i?function(){return Ot(i(),t())}:t,e.justLimit=n&&!i}function Yn(e,t){if(e.isPrimKey)return t.primaryKey;var n=t.getIndexByKeyPath(e.index);if(!n)throw new Z.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return n}function Ko(e,t,n){var i=Yn(e,t.schema);return t.openCursor({trans:n,values:!e.keysOnly,reverse:e.dir==="prev",unique:!!e.unique,query:{index:i,range:e.range}})}function Hn(e,t,n,i){var s=e.replayFilter?Ot(e.filter,e.replayFilter()):e.filter;if(e.or){var c={},f=function(p,y,g){var _,m;s&&!s(y,g,function(O){return y.stop(O)},function(O){return y.fail(O)})||((m=""+(_=y.primaryKey))=="[object ArrayBuffer]"&&(m=""+new Uint8Array(_)),M(c,m)||(c[m]=!0,t(p,y,g)))};return Promise.all([e.or._iterate(f,n),Io(Ko(e,i,n),e.algorithm,f,!e.keysOnly&&e.valueMapper)])}return Io(Ko(e,i,n),Ot(e.algorithm,s),t,!e.keysOnly&&e.valueMapper)}function Io(e,t,n,i){var s=Te(i?function(c,f,p){return n(i(c),f,p)}:n);return e.then(function(c){if(c)return c.start(function(){var f=function(){return c.continue()};t&&!t(c,function(p){return f=p},function(p){c.stop(p),f=ye},function(p){c.fail(p),f=ye})||s(c.value,c,function(p){return f=p}),f()})})}var nn=(Lo.prototype.execute=function(e){var t=this["@@propmod"];if(t.add!==void 0){var n=t.add;if(x(n))return l(l([],x(e)?e:[],!0),n).sort();if(typeof n=="number")return(Number(e)||0)+n;if(typeof n=="bigint")try{return BigInt(e)+n}catch{return BigInt(0)+n}throw new TypeError("Invalid term ".concat(n))}if(t.remove!==void 0){var i=t.remove;if(x(i))return x(e)?e.filter(function(s){return!i.includes(s)}).sort():[];if(typeof i=="number")return Number(e)-i;if(typeof i=="bigint")try{return BigInt(e)-i}catch{return BigInt(0)-i}throw new TypeError("Invalid subtrahend ".concat(i))}return n=(n=t.replacePrefix)===null||n===void 0?void 0:n[0],n&&typeof e=="string"&&e.startsWith(n)?t.replacePrefix[1]+e.substring(n.length):e},Lo);function Lo(e){this["@@propmod"]=e}var yu=(Se.prototype._read=function(e,t){var n=this._ctx;return n.error?n.table._trans(null,$e.bind(null,n.error)):n.table._trans("readonly",e).then(t)},Se.prototype._write=function(e){var t=this._ctx;return t.error?t.table._trans(null,$e.bind(null,t.error)):t.table._trans("readwrite",e,"locked")},Se.prototype._addAlgorithm=function(e){var t=this._ctx;t.algorithm=Ot(t.algorithm,e)},Se.prototype._iterate=function(e,t){return Hn(this._ctx,e,t,this._ctx.table.core)},Se.prototype.clone=function(e){var t=Object.create(this.constructor.prototype),n=Object.create(this._ctx);return e&&$(n,e),t._ctx=n,t},Se.prototype.raw=function(){return this._ctx.valueMapper=null,this},Se.prototype.each=function(e){var t=this._ctx;return this._read(function(n){return Hn(t,e,n,t.table.core)})},Se.prototype.count=function(e){var t=this;return this._read(function(n){var i=t._ctx,s=i.table.core;if(Mt(i,!0))return s.count({trans:n,query:{index:Yn(i,s.schema),range:i.range}}).then(function(f){return Math.min(f,i.limit)});var c=0;return Hn(i,function(){return++c,!1},n,s).then(function(){return c})}).then(e)},Se.prototype.sortBy=function(e,t){var n=e.split(".").reverse(),i=n[0],s=n.length-1;function c(y,g){return g?c(y[n[g]],g-1):y[i]}var f=this._ctx.dir==="next"?1:-1;function p(y,g){return xe(c(y,s),c(g,s))*f}return this.toArray(function(y){return y.sort(p)}).then(t)},Se.prototype.toArray=function(e){var t=this;return this._read(function(n){var i=t._ctx;if(i.dir==="next"&&Mt(i,!0)&&0<i.limit){var s=i.valueMapper,c=Yn(i,i.table.core.schema);return i.table.core.query({trans:n,limit:i.limit,values:!0,query:{index:c,range:i.range}}).then(function(p){return p=p.result,s?p.map(s):p})}var f=[];return Hn(i,function(p){return f.push(p)},n,i.table.core).then(function(){return f})},e)},Se.prototype.offset=function(e){var t=this._ctx;return e<=0||(t.offset+=e,Mt(t)?Mr(t,function(){var n=e;return function(i,s){return n===0||(n===1?--n:s(function(){i.advance(n),n=0}),!1)}}):Mr(t,function(){var n=e;return function(){return--n<0}})),this},Se.prototype.limit=function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Mr(this._ctx,function(){var t=e;return function(n,i,s){return--t<=0&&i(s),0<=t}},!0),this},Se.prototype.until=function(e,t){return jr(this._ctx,function(n,i,s){return!e(n.value)||(i(s),t)}),this},Se.prototype.first=function(e){return this.limit(1).toArray(function(t){return t[0]}).then(e)},Se.prototype.last=function(e){return this.reverse().first(e)},Se.prototype.filter=function(e){var t;return jr(this._ctx,function(n){return e(n.value)}),(t=this._ctx).isMatch=Ot(t.isMatch,e),this},Se.prototype.and=function(e){return this.filter(e)},Se.prototype.or=function(e){return new this.db.WhereClause(this._ctx.table,e,this)},Se.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},Se.prototype.desc=function(){return this.reverse()},Se.prototype.eachKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(n,i){e(i.key,i)})},Se.prototype.eachUniqueKey=function(e){return this._ctx.unique="unique",this.eachKey(e)},Se.prototype.eachPrimaryKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(n,i){e(i.primaryKey,i)})},Se.prototype.keys=function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var n=[];return this.each(function(i,s){n.push(s.key)}).then(function(){return n}).then(e)},Se.prototype.primaryKeys=function(e){var t=this._ctx;if(t.dir==="next"&&Mt(t,!0)&&0<t.limit)return this._read(function(i){var s=Yn(t,t.table.core.schema);return t.table.core.query({trans:i,values:!1,limit:t.limit,query:{index:s,range:t.range}})}).then(function(i){return i.result}).then(e);t.keysOnly=!t.isMatch;var n=[];return this.each(function(i,s){n.push(s.primaryKey)}).then(function(){return n}).then(e)},Se.prototype.uniqueKeys=function(e){return this._ctx.unique="unique",this.keys(e)},Se.prototype.firstKey=function(e){return this.limit(1).keys(function(t){return t[0]}).then(e)},Se.prototype.lastKey=function(e){return this.reverse().firstKey(e)},Se.prototype.distinct=function(){var e=this._ctx,e=e.index&&e.table.schema.idxByName[e.index];if(!e||!e.multi)return this;var t={};return jr(this._ctx,function(s){var i=s.primaryKey.toString(),s=M(t,i);return t[i]=!0,!s}),this},Se.prototype.modify=function(e){var t=this,n=this._ctx;return this._write(function(i){var s,c,f;f=typeof e=="function"?e:(s=h(e),c=s.length,function(b){for(var k=!1,T=0;T<c;++T){var R=s[T],P=e[R],F=te(b,R);P instanceof nn?(U(b,R,P.execute(F)),k=!0):F!==P&&(U(b,R,P),k=!0)}return k});var p=n.table.core,m=p.schema.primaryKey,y=m.outbound,g=m.extractKey,_=200,m=t.db._options.modifyChunkSize;m&&(_=typeof m=="object"?m[p.name]||m["*"]||200:m);function O(b,R){var T=R.failures,R=R.numFailures;w+=b-R;for(var P=0,F=h(T);P<F.length;P++){var z=F[P];v.push(T[z])}}var v=[],w=0,S=[];return t.clone().primaryKeys().then(function(b){function k(R){var P=Math.min(_,b.length-R);return p.getMany({trans:i,keys:b.slice(R,R+P),cache:"immutable"}).then(function(F){for(var z=[],q=[],B=y?[]:null,V=[],Y=0;Y<P;++Y){var X=F[Y],me={value:we(X),primKey:b[R+Y]};f.call(me,me.value,me)!==!1&&(me.value==null?V.push(b[R+Y]):y||xe(g(X),g(me.value))===0?(q.push(me.value),y&&B.push(b[R+Y])):(V.push(b[R+Y]),z.push(me.value)))}return Promise.resolve(0<z.length&&p.mutate({trans:i,type:"add",values:z}).then(function(ve){for(var ge in ve.failures)V.splice(parseInt(ge),1);O(z.length,ve)})).then(function(){return(0<q.length||T&&typeof e=="object")&&p.mutate({trans:i,type:"put",keys:B,values:q,criteria:T,changeSpec:typeof e!="function"&&e,isAdditionalChunk:0<R}).then(function(ve){return O(q.length,ve)})}).then(function(){return(0<V.length||T&&e===Nr)&&p.mutate({trans:i,type:"delete",keys:V,criteria:T,isAdditionalChunk:0<R}).then(function(ve){return O(V.length,ve)})}).then(function(){return b.length>R+P&&k(R+_)})})}var T=Mt(n)&&n.limit===1/0&&(typeof e!="function"||e===Nr)&&{index:n.index,range:n.range};return k(0).then(function(){if(0<v.length)throw new je("Error modifying one or more objects",v,w,S);return b.length})})})},Se.prototype.delete=function(){var e=this._ctx,t=e.range;return Mt(e)&&(e.isPrimKey||t.type===3)?this._write(function(n){var i=e.table.core.schema.primaryKey,s=t;return e.table.core.count({trans:n,query:{index:i,range:s}}).then(function(c){return e.table.core.mutate({trans:n,type:"deleteRange",range:s}).then(function(f){var p=f.failures;if(f.lastResult,f.results,f=f.numFailures,f)throw new je("Could not delete some values",Object.keys(p).map(function(y){return p[y]}),c-f);return c-f})})}):this.modify(Nr)},Se);function Se(){}var Nr=function(e,t){return t.value=null};function vu(e,t){return e<t?-1:e===t?0:1}function gu(e,t){return t<e?-1:e===t?0:1}function Je(e,t,n){return e=e instanceof Yo?new e.Collection(e):e,e._ctx.error=new(n||TypeError)(t),e}function Nt(e){return new e.Collection(e,function(){return Uo("")}).limit(0)}function zn(e,t,n,i){var s,c,f,p,y,g,_,m=n.length;if(!n.every(function(w){return typeof w=="string"}))return Je(e,jo);function O(w){s=w==="next"?function(b){return b.toUpperCase()}:function(b){return b.toLowerCase()},c=w==="next"?function(b){return b.toLowerCase()}:function(b){return b.toUpperCase()},f=w==="next"?vu:gu;var S=n.map(function(b){return{lower:c(b),upper:s(b)}}).sort(function(b,k){return f(b.lower,k.lower)});p=S.map(function(b){return b.upper}),y=S.map(function(b){return b.lower}),_=(g=w)==="next"?"":i}O("next"),e=new e.Collection(e,function(){return dt(p[0],y[m-1]+i)}),e._ondirectionchange=function(w){O(w)};var v=0;return e._addAlgorithm(function(w,S,b){var k=w.key;if(typeof k!="string")return!1;var T=c(k);if(t(T,y,v))return!0;for(var R=null,P=v;P<m;++P){var F=function(z,q,B,V,Y,X){for(var me=Math.min(z.length,V.length),ve=-1,ge=0;ge<me;++ge){var Ge=q[ge];if(Ge!==V[ge])return Y(z[ge],B[ge])<0?z.substr(0,ge)+B[ge]+B.substr(ge+1):Y(z[ge],V[ge])<0?z.substr(0,ge)+V[ge]+B.substr(ge+1):0<=ve?z.substr(0,ve)+q[ve]+B.substr(ve+1):null;Y(z[ge],Ge)<0&&(ve=ge)}return me<V.length&&X==="next"?z+B.substr(z.length):me<z.length&&X==="prev"?z.substr(0,B.length):ve<0?null:z.substr(0,ve)+V[ve]+B.substr(ve+1)}(k,T,p[P],y[P],f,g);F===null&&R===null?v=P+1:(R===null||0<f(R,F))&&(R=F)}return S(R!==null?function(){w.continue(R+_)}:b),!1}),e}function dt(e,t,n,i){return{type:2,lower:e,upper:t,lowerOpen:n,upperOpen:i}}function Uo(e){return{type:1,lower:e,upper:e}}var Yo=(Object.defineProperty(Ne.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),Ne.prototype.between=function(e,t,n,i){n=n!==!1,i=i===!0;try{return 0<this._cmp(e,t)||this._cmp(e,t)===0&&(n||i)&&(!n||!i)?Nt(this):new this.Collection(this,function(){return dt(e,t,!n,!i)})}catch{return Je(this,st)}},Ne.prototype.equals=function(e){return e==null?Je(this,st):new this.Collection(this,function(){return Uo(e)})},Ne.prototype.above=function(e){return e==null?Je(this,st):new this.Collection(this,function(){return dt(e,void 0,!0)})},Ne.prototype.aboveOrEqual=function(e){return e==null?Je(this,st):new this.Collection(this,function(){return dt(e,void 0,!1)})},Ne.prototype.below=function(e){return e==null?Je(this,st):new this.Collection(this,function(){return dt(void 0,e,!1,!0)})},Ne.prototype.belowOrEqual=function(e){return e==null?Je(this,st):new this.Collection(this,function(){return dt(void 0,e)})},Ne.prototype.startsWith=function(e){return typeof e!="string"?Je(this,jo):this.between(e,e+St,!0,!0)},Ne.prototype.startsWithIgnoreCase=function(e){return e===""?this.startsWith(e):zn(this,function(t,n){return t.indexOf(n[0])===0},[e],St)},Ne.prototype.equalsIgnoreCase=function(e){return zn(this,function(t,n){return t===n[0]},[e],"")},Ne.prototype.anyOfIgnoreCase=function(){var e=se.apply(oe,arguments);return e.length===0?Nt(this):zn(this,function(t,n){return n.indexOf(t)!==-1},e,"")},Ne.prototype.startsWithAnyOfIgnoreCase=function(){var e=se.apply(oe,arguments);return e.length===0?Nt(this):zn(this,function(t,n){return n.some(function(i){return t.indexOf(i)===0})},e,St)},Ne.prototype.anyOf=function(){var e=this,t=se.apply(oe,arguments),n=this._cmp;try{t.sort(n)}catch{return Je(this,st)}if(t.length===0)return Nt(this);var i=new this.Collection(this,function(){return dt(t[0],t[t.length-1])});i._ondirectionchange=function(c){n=c==="next"?e._ascending:e._descending,t.sort(n)};var s=0;return i._addAlgorithm(function(c,f,p){for(var y=c.key;0<n(y,t[s]);)if(++s===t.length)return f(p),!1;return n(y,t[s])===0||(f(function(){c.continue(t[s])}),!1)}),i},Ne.prototype.notEqual=function(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},Ne.prototype.noneOf=function(){var e=se.apply(oe,arguments);if(e.length===0)return new this.Collection(this);try{e.sort(this._ascending)}catch{return Je(this,st)}var t=e.reduce(function(n,i){return n?n.concat([[n[n.length-1][1],i]]):[[-1/0,i]]},null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})},Ne.prototype.inAnyRange=function(k,t){var n=this,i=this._cmp,s=this._ascending,c=this._descending,f=this._min,p=this._max;if(k.length===0)return Nt(this);if(!k.every(function(T){return T[0]!==void 0&&T[1]!==void 0&&s(T[0],T[1])<=0}))return Je(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Z.InvalidArgument);var y=!t||t.includeLowers!==!1,g=t&&t.includeUppers===!0,_,m=s;function O(T,R){return m(T[0],R[0])}try{(_=k.reduce(function(T,R){for(var P=0,F=T.length;P<F;++P){var z=T[P];if(i(R[0],z[1])<0&&0<i(R[1],z[0])){z[0]=f(z[0],R[0]),z[1]=p(z[1],R[1]);break}}return P===F&&T.push(R),T},[])).sort(O)}catch{return Je(this,st)}var v=0,w=g?function(T){return 0<s(T,_[v][1])}:function(T){return 0<=s(T,_[v][1])},S=y?function(T){return 0<c(T,_[v][0])}:function(T){return 0<=c(T,_[v][0])},b=w,k=new this.Collection(this,function(){return dt(_[0][0],_[_.length-1][1],!y,!g)});return k._ondirectionchange=function(T){m=T==="next"?(b=w,s):(b=S,c),_.sort(O)},k._addAlgorithm(function(T,R,P){for(var F,z=T.key;b(z);)if(++v===_.length)return R(P),!1;return!w(F=z)&&!S(F)||(n._cmp(z,_[v][1])===0||n._cmp(z,_[v][0])===0||R(function(){m===s?T.continue(_[v][0]):T.continue(_[v][1])}),!1)}),k},Ne.prototype.startsWithAnyOf=function(){var e=se.apply(oe,arguments);return e.every(function(t){return typeof t=="string"})?e.length===0?Nt(this):this.inAnyRange(e.map(function(t){return[t,t+St]})):Je(this,"startsWithAnyOf() only works with strings")},Ne);function Ne(){}function rt(e){return Te(function(t){return rn(t),e(t.target.error),!1})}function rn(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}var on="storagemutated",Fr="x-storagemutated-1",ht=en(null,on),bu=(it.prototype._lock=function(){return _e(!ie.global),++this._reculock,this._reculock!==1||ie.global||(ie.lockOwnerFor=this),this},it.prototype._unlock=function(){if(_e(!ie.global),--this._reculock==0)for(ie.global||(ie.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var e=this._blockedFuncs.shift();try{xt(e[1],e[0])}catch{}}return this},it.prototype._locked=function(){return this._reculock&&ie.lockOwnerFor!==this},it.prototype.create=function(e){var t=this;if(!this.mode)return this;var n=this.db.idbdb,i=this.db._state.dbOpenError;if(_e(!this.idbtrans),!e&&!n)switch(i&&i.name){case"DatabaseClosedError":throw new Z.DatabaseClosed(i);case"MissingAPIError":throw new Z.MissingAPI(i.message,i);default:throw new Z.OpenFailed(i)}if(!this.active)throw new Z.TransactionInactive;return _e(this._completion._state===null),(e=this.idbtrans=e||(this.db.core||n).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=Te(function(s){rn(s),t._reject(e.error)}),e.onabort=Te(function(s){rn(s),t.active&&t._reject(new Z.Abort(e.error)),t.active=!1,t.on("abort").fire(s)}),e.oncomplete=Te(function(){t.active=!1,t._resolve(),"mutatedParts"in e&&ht.storagemutated.fire(e.mutatedParts)}),this},it.prototype._promise=function(e,t,n){var i=this;if(e==="readwrite"&&this.mode!=="readwrite")return $e(new Z.ReadOnly("Transaction is readonly"));if(!this.active)return $e(new Z.TransactionInactive);if(this._locked())return new W(function(c,f){i._blockedFuncs.push([function(){i._promise(e,t,n).then(c,f)},ie])});if(n)return ct(function(){var c=new W(function(f,p){i._lock();var y=t(f,p,i);y&&y.then&&y.then(f,p)});return c.finally(function(){return i._unlock()}),c._lib=!0,c});var s=new W(function(c,f){var p=t(c,f,i);p&&p.then&&p.then(c,f)});return s._lib=!0,s},it.prototype._root=function(){return this.parent?this.parent._root():this},it.prototype.waitFor=function(e){var t,n=this._root(),i=W.resolve(e);n._waitingFor?n._waitingFor=n._waitingFor.then(function(){return i}):(n._waitingFor=i,n._waitingQueue=[],t=n.idbtrans.objectStore(n.storeNames[0]),function c(){for(++n._spinCount;n._waitingQueue.length;)n._waitingQueue.shift()();n._waitingFor&&(t.get(-1/0).onsuccess=c)}());var s=n._waitingFor;return new W(function(c,f){i.then(function(p){return n._waitingQueue.push(Te(c.bind(null,p)))},function(p){return n._waitingQueue.push(Te(f.bind(null,p)))}).finally(function(){n._waitingFor===s&&(n._waitingFor=null)})})},it.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Z.Abort))},it.prototype.table=function(e){var t=this._memoizedTables||(this._memoizedTables={});if(M(t,e))return t[e];var n=this.schema[e];if(!n)throw new Z.NotFound("Table "+e+" not part of transaction");return n=new this.db.Table(e,n,this),n.core=this.db.core.table(e),t[e]=n},it);function it(){}function qr(e,t,n,i,s,c,f){return{name:e,keyPath:t,unique:n,multi:i,auto:s,compound:c,src:(n&&!f?"&":"")+(i?"*":"")+(s?"++":"")+Ho(t)}}function Ho(e){return typeof e=="string"?e:e?"["+[].join.call(e,"+")+"]":""}function Br(e,t,n){return{name:e,primKey:t,indexes:n,mappedClass:null,idxByName:(i=function(s){return[s.name,s]},n.reduce(function(s,c,f){return f=i(c,f),f&&(s[f[0]]=f[1]),s},{}))};var i}var sn=function(e){try{return e.only([[]]),sn=function(){return[[]]},[[]]}catch{return sn=function(){return St},St}};function Kr(e){return e==null?function(){}:typeof e=="string"?(t=e).split(".").length===1?function(n){return n[t]}:function(n){return te(n,t)}:function(n){return te(n,e)};var t}function zo(e){return[].slice.call(e)}var wu=0;function an(e){return e==null?":id":typeof e=="string"?e:"[".concat(e.join("+"),"]")}function _u(e,t,y){function i(b){if(b.type===3)return null;if(b.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var v=b.lower,w=b.upper,S=b.lowerOpen,b=b.upperOpen;return v===void 0?w===void 0?null:t.upperBound(w,!!b):w===void 0?t.lowerBound(v,!!S):t.bound(v,w,!!S,!!b)}function s(O){var v,w=O.name;return{name:w,schema:O,mutate:function(S){var b=S.trans,k=S.type,T=S.keys,R=S.values,P=S.range;return new Promise(function(F,z){F=Te(F);var q=b.objectStore(w),B=q.keyPath==null,V=k==="put"||k==="add";if(!V&&k!=="delete"&&k!=="deleteRange")throw new Error("Invalid operation type: "+k);var Y,X=(T||R||{length:1}).length;if(T&&R&&T.length!==R.length)throw new Error("Given keys array must have same length as given values array.");if(X===0)return F({numFailures:0,failures:{},results:[],lastResult:void 0});function me(Ue){++Ge,rn(Ue)}var ve=[],ge=[],Ge=0;if(k==="deleteRange"){if(P.type===4)return F({numFailures:Ge,failures:ge,results:[],lastResult:void 0});P.type===3?ve.push(Y=q.clear()):ve.push(Y=q.delete(i(P)))}else{var B=V?B?[R,T]:[R,null]:[T,null],he=B[0],Ke=B[1];if(V)for(var Ie=0;Ie<X;++Ie)ve.push(Y=Ke&&Ke[Ie]!==void 0?q[k](he[Ie],Ke[Ie]):q[k](he[Ie])),Y.onerror=me;else for(Ie=0;Ie<X;++Ie)ve.push(Y=q[k](he[Ie])),Y.onerror=me}function or(Ue){Ue=Ue.target.result,ve.forEach(function(Tt,ii){return Tt.error!=null&&(ge[ii]=Tt.error)}),F({numFailures:Ge,failures:ge,results:k==="delete"?T:ve.map(function(Tt){return Tt.result}),lastResult:Ue})}Y.onerror=function(Ue){me(Ue),or(Ue)},Y.onsuccess=or})},getMany:function(S){var b=S.trans,k=S.keys;return new Promise(function(T,R){T=Te(T);for(var P,F=b.objectStore(w),z=k.length,q=new Array(z),B=0,V=0,Y=function(ve){ve=ve.target,q[ve._pos]=ve.result,++V===B&&T(q)},X=rt(R),me=0;me<z;++me)k[me]!=null&&((P=F.get(k[me]))._pos=me,P.onsuccess=Y,P.onerror=X,++B);B===0&&T(q)})},get:function(S){var b=S.trans,k=S.key;return new Promise(function(T,R){T=Te(T);var P=b.objectStore(w).get(k);P.onsuccess=function(F){return T(F.target.result)},P.onerror=rt(R)})},query:(v=g,function(S){return new Promise(function(b,k){b=Te(b);var T,R,P,B=S.trans,F=S.values,z=S.limit,Y=S.query,q=z===1/0?void 0:z,V=Y.index,Y=Y.range,B=B.objectStore(w),V=V.isPrimaryKey?B:B.index(V.name),Y=i(Y);if(z===0)return b({result:[]});v?((q=F?V.getAll(Y,q):V.getAllKeys(Y,q)).onsuccess=function(X){return b({result:X.target.result})},q.onerror=rt(k)):(T=0,R=!F&&"openKeyCursor"in V?V.openKeyCursor(Y):V.openCursor(Y),P=[],R.onsuccess=function(X){var me=R.result;return me?(P.push(F?me.value:me.primaryKey),++T===z?b({result:P}):void me.continue()):b({result:P})},R.onerror=rt(k))})}),openCursor:function(S){var b=S.trans,k=S.values,T=S.query,R=S.reverse,P=S.unique;return new Promise(function(F,z){F=Te(F);var V=T.index,q=T.range,B=b.objectStore(w),B=V.isPrimaryKey?B:B.index(V.name),V=R?P?"prevunique":"prev":P?"nextunique":"next",Y=!k&&"openKeyCursor"in B?B.openKeyCursor(i(q),V):B.openCursor(i(q),V);Y.onerror=rt(z),Y.onsuccess=Te(function(X){var me,ve,ge,Ge,he=Y.result;he?(he.___id=++wu,he.done=!1,me=he.continue.bind(he),ve=(ve=he.continuePrimaryKey)&&ve.bind(he),ge=he.advance.bind(he),Ge=function(){throw new Error("Cursor not stopped")},he.trans=b,he.stop=he.continue=he.continuePrimaryKey=he.advance=function(){throw new Error("Cursor not started")},he.fail=Te(z),he.next=function(){var Ke=this,Ie=1;return this.start(function(){return Ie--?Ke.continue():Ke.stop()}).then(function(){return Ke})},he.start=function(Ke){function Ie(){if(Y.result)try{Ke()}catch(Ue){he.fail(Ue)}else he.done=!0,he.start=function(){throw new Error("Cursor behind last entry")},he.stop()}var or=new Promise(function(Ue,Tt){Ue=Te(Ue),Y.onerror=rt(Tt),he.fail=Tt,he.stop=function(ii){he.stop=he.continue=he.continuePrimaryKey=he.advance=Ge,Ue(ii)}});return Y.onsuccess=Te(function(Ue){Y.onsuccess=Ie,Ie()}),he.continue=me,he.continuePrimaryKey=ve,he.advance=ge,Ie(),or},F(he)):F(null)},z)})},count:function(S){var b=S.query,k=S.trans,T=b.index,R=b.range;return new Promise(function(P,F){var z=k.objectStore(w),q=T.isPrimaryKey?z:z.index(T.name),z=i(R),q=z?q.count(z):q.count();q.onsuccess=Te(function(B){return P(B.target.result)}),q.onerror=rt(F)})}}}var c,f,p,_=(f=y,p=zo((c=e).objectStoreNames),{schema:{name:c.name,tables:p.map(function(O){return f.objectStore(O)}).map(function(O){var v=O.keyPath,b=O.autoIncrement,w=x(v),S={},b={name:O.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:v==null,compound:w,keyPath:v,autoIncrement:b,unique:!0,extractKey:Kr(v)},indexes:zo(O.indexNames).map(function(k){return O.index(k)}).map(function(P){var T=P.name,R=P.unique,F=P.multiEntry,P=P.keyPath,F={name:T,compound:x(P),keyPath:P,unique:R,multiEntry:F,extractKey:Kr(P)};return S[an(P)]=F}),getIndexByKeyPath:function(k){return S[an(k)]}};return S[":id"]=b.primaryKey,v!=null&&(S[an(v)]=b.primaryKey),b})},hasGetAll:0<p.length&&"getAll"in f.objectStore(p[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),y=_.schema,g=_.hasGetAll,_=y.tables.map(s),m={};return _.forEach(function(O){return m[O.name]=O}),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(O){if(!m[O])throw new Error("Table '".concat(O,"' not found"));return m[O]},MIN_KEY:-1/0,MAX_KEY:sn(t),schema:y}}function xu(e,t,n,i){var s=n.IDBKeyRange;return n.indexedDB,{dbcore:(i=_u(t,s,i),e.dbcore.reduce(function(c,f){return f=f.create,a(a({},c),f(c))},i))}}function Vn(e,i){var n=i.db,i=xu(e._middlewares,n,e._deps,i);e.core=i.dbcore,e.tables.forEach(function(s){var c=s.name;e.core.schema.tables.some(function(f){return f.name===c})&&(s.core=e.core.table(c),e[c]instanceof e.Table&&(e[c].core=s.core))})}function Wn(e,t,n,i){n.forEach(function(s){var c=i[s];t.forEach(function(f){var p=function y(g,_){return E(g,_)||(g=C(g))&&y(g,_)}(f,s);(!p||"value"in p&&p.value===void 0)&&(f===e.Transaction.prototype||f instanceof e.Transaction?N(f,s,{get:function(){return this.table(s)},set:function(y){ue(this,s,{value:y,writable:!0,configurable:!0,enumerable:!0})}}):f[s]=new e.Table(s,c))})})}function Ir(e,t){t.forEach(function(n){for(var i in n)n[i]instanceof e.Table&&delete n[i]})}function Su(e,t){return e._cfg.version-t._cfg.version}function Ou(e,t,n,i){var s=e._dbSchema;n.objectStoreNames.contains("$meta")&&!s.$meta&&(s.$meta=Br("$meta",Wo("")[0],[]),e._storeNames.push("$meta"));var c=e._createTransaction("readwrite",e._storeNames,s);c.create(n),c._completion.catch(i);var f=c._reject.bind(c),p=ie.transless||ie;ct(function(){return ie.trans=c,ie.transless=p,t!==0?(Vn(e,n),g=t,((y=c).storeNames.includes("$meta")?y.table("$meta").get("version").then(function(_){return _??g}):W.resolve(g)).then(function(_){return O=_,v=c,w=n,S=[],_=(m=e)._versions,b=m._dbSchema=Gn(0,m.idbdb,w),(_=_.filter(function(k){return k._cfg.version>=O})).length!==0?(_.forEach(function(k){S.push(function(){var T=b,R=k._cfg.dbschema;Xn(m,T,w),Xn(m,R,w),b=m._dbSchema=R;var P=Lr(T,R);P.add.forEach(function(V){Ur(w,V[0],V[1].primKey,V[1].indexes)}),P.change.forEach(function(V){if(V.recreate)throw new Z.Upgrade("Not yet support for changing primary key");var Y=w.objectStore(V.name);V.add.forEach(function(X){return Jn(Y,X)}),V.change.forEach(function(X){Y.deleteIndex(X.name),Jn(Y,X)}),V.del.forEach(function(X){return Y.deleteIndex(X)})});var F=k._cfg.contentUpgrade;if(F&&k._cfg.version>O){Vn(m,w),v._memoizedTables={};var z=K(R);P.del.forEach(function(V){z[V]=T[V]}),Ir(m,[m.Transaction.prototype]),Wn(m,[m.Transaction.prototype],h(z),z),v.schema=z;var q,B=de(F);return B&&Ct(),P=W.follow(function(){var V;(q=F(v))&&B&&(V=lt.bind(null,null),q.then(V,V))}),q&&typeof q.then=="function"?W.resolve(q):P.then(function(){return q})}}),S.push(function(T){var R,P,F=k._cfg.dbschema;R=F,P=T,[].slice.call(P.db.objectStoreNames).forEach(function(z){return R[z]==null&&P.db.deleteObjectStore(z)}),Ir(m,[m.Transaction.prototype]),Wn(m,[m.Transaction.prototype],m._storeNames,m._dbSchema),v.schema=m._dbSchema}),S.push(function(T){m.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(m.idbdb.version/10)===k._cfg.version?(m.idbdb.deleteObjectStore("$meta"),delete m._dbSchema.$meta,m._storeNames=m._storeNames.filter(function(R){return R!=="$meta"})):T.objectStore("$meta").put(k._cfg.version,"version"))})}),function k(){return S.length?W.resolve(S.shift()(v.idbtrans)).then(k):W.resolve()}().then(function(){Vo(b,w)})):W.resolve();var m,O,v,w,S,b}).catch(f)):(h(s).forEach(function(_){Ur(n,_,s[_].primKey,s[_].indexes)}),Vn(e,n),void W.follow(function(){return e.on.populate.fire(c)}).catch(f));var y,g})}function Eu(e,t){Vo(e._dbSchema,t),t.db.version%10!=0||t.objectStoreNames.contains("$meta")||t.db.createObjectStore("$meta").add(Math.ceil(t.db.version/10-1),"version");var n=Gn(0,e.idbdb,t);Xn(e,e._dbSchema,t);for(var i=0,s=Lr(n,e._dbSchema).change;i<s.length;i++){var c=function(f){if(f.change.length||f.recreate)return console.warn("Unable to patch indexes of table ".concat(f.name," because it has changes on the type of index or primary key.")),{value:void 0};var p=t.objectStore(f.name);f.add.forEach(function(y){nt&&console.debug("Dexie upgrade patch: Creating missing index ".concat(f.name,".").concat(y.src)),Jn(p,y)})}(s[i]);if(typeof c=="object")return c.value}}function Lr(e,t){var n,i={del:[],add:[],change:[]};for(n in e)t[n]||i.del.push(n);for(n in t){var s=e[n],c=t[n];if(s){var f={name:n,def:c,recreate:!1,del:[],add:[],change:[]};if(""+(s.primKey.keyPath||"")!=""+(c.primKey.keyPath||"")||s.primKey.auto!==c.primKey.auto)f.recreate=!0,i.change.push(f);else{var p=s.idxByName,y=c.idxByName,g=void 0;for(g in p)y[g]||f.del.push(g);for(g in y){var _=p[g],m=y[g];_?_.src!==m.src&&f.change.push(m):f.add.push(m)}(0<f.del.length||0<f.add.length||0<f.change.length)&&i.change.push(f)}}else i.add.push([n,c])}return i}function Ur(e,t,n,i){var s=e.db.createObjectStore(t,n.keyPath?{keyPath:n.keyPath,autoIncrement:n.auto}:{autoIncrement:n.auto});return i.forEach(function(c){return Jn(s,c)}),s}function Vo(e,t){h(e).forEach(function(n){t.db.objectStoreNames.contains(n)||(nt&&console.debug("Dexie: Creating missing table",n),Ur(t,n,e[n].primKey,e[n].indexes))})}function Jn(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function Gn(e,t,n){var i={};return re(t.objectStoreNames,0).forEach(function(s){for(var c=n.objectStore(s),f=qr(Ho(g=c.keyPath),g||"",!0,!1,!!c.autoIncrement,g&&typeof g!="string",!0),p=[],y=0;y<c.indexNames.length;++y){var _=c.index(c.indexNames[y]),g=_.keyPath,_=qr(_.name,g,!!_.unique,!!_.multiEntry,!1,g&&typeof g!="string",!1);p.push(_)}i[s]=Br(s,f,p)}),i}function Xn(e,t,n){for(var i=n.db.objectStoreNames,s=0;s<i.length;++s){var c=i[s],f=n.objectStore(c);e._hasGetAll="getAll"in f;for(var p=0;p<f.indexNames.length;++p){var y=f.indexNames[p],g=f.index(y).keyPath,_=typeof g=="string"?g:"["+re(g).join("+")+"]";!t[c]||(g=t[c].idxByName[_])&&(g.name=y,delete t[c].idxByName[_],t[c].idxByName[y]=g)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&d.WorkerGlobalScope&&d instanceof d.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}function Wo(e){return e.split(",").map(function(t,n){var i=(t=t.trim()).replace(/([&*]|\+\+)/g,""),s=/^\[/.test(i)?i.match(/^\[(.*)\]$/)[1].split("+"):i;return qr(i,s||null,/\&/.test(t),/\*/.test(t),/\+\+/.test(t),x(s),n===0)})}var ku=(Qn.prototype._parseStoresSpec=function(e,t){h(e).forEach(function(n){if(e[n]!==null){var i=Wo(e[n]),s=i.shift();if(s.unique=!0,s.multi)throw new Z.Schema("Primary key cannot be multi-valued");i.forEach(function(c){if(c.auto)throw new Z.Schema("Only primary key can be marked as autoIncrement (++)");if(!c.keyPath)throw new Z.Schema("Index must have a name and cannot be an empty string")}),t[n]=Br(n,s,i)}})},Qn.prototype.stores=function(n){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?$(this._cfg.storesSource,n):n;var n=t._versions,i={},s={};return n.forEach(function(c){$(i,c._cfg.storesSource),s=c._cfg.dbschema={},c._parseStoresSpec(i,s)}),t._dbSchema=s,Ir(t,[t._allTables,t,t.Transaction.prototype]),Wn(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],h(s),s),t._storeNames=h(s),this},Qn.prototype.upgrade=function(e){return this._cfg.contentUpgrade=Cn(this._cfg.contentUpgrade||ye,e),this},Qn);function Qn(){}function Yr(e,t){var n=e._dbNamesDB;return n||(n=e._dbNamesDB=new at(Ln,{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),n.table("dbnames")}function Hr(e){return e&&typeof e.databases=="function"}function zr(e){return ct(function(){return ie.letThrough=!0,e()})}function Vr(e){return!("from"in e)}var Be=function(e,t){if(!this){var n=new Be;return e&&"d"in e&&$(n,e),n}$(this,arguments.length?{d:1,from:e,to:1<arguments.length?t:e}:{d:0})};function un(e,t,n){var i=xe(t,n);if(!isNaN(i)){if(0<i)throw RangeError();if(Vr(e))return $(e,{from:t,to:n,d:1});var s=e.l,i=e.r;if(xe(n,e.from)<0)return s?un(s,t,n):e.l={from:t,to:n,d:1,l:null,r:null},Go(e);if(0<xe(t,e.to))return i?un(i,t,n):e.r={from:t,to:n,d:1,l:null,r:null},Go(e);xe(t,e.from)<0&&(e.from=t,e.l=null,e.d=i?i.d+1:1),0<xe(n,e.to)&&(e.to=n,e.r=null,e.d=e.l?e.l.d+1:1),n=!e.r,s&&!e.l&&cn(e,s),i&&n&&cn(e,i)}}function cn(e,t){Vr(t)||function n(i,y){var c=y.from,f=y.to,p=y.l,y=y.r;un(i,c,f),p&&n(i,p),y&&n(i,y)}(e,t)}function Jo(e,t){var n=Zn(t),i=n.next();if(i.done)return!1;for(var s=i.value,c=Zn(e),f=c.next(s.from),p=f.value;!i.done&&!f.done;){if(xe(p.from,s.to)<=0&&0<=xe(p.to,s.from))return!0;xe(s.from,p.from)<0?s=(i=n.next(p.from)).value:p=(f=c.next(s.from)).value}return!1}function Zn(e){var t=Vr(e)?null:{s:0,n:e};return{next:function(n){for(var i=0<arguments.length;t;)switch(t.s){case 0:if(t.s=1,i)for(;t.n.l&&xe(n,t.n.from)<0;)t={up:t,n:t.n.l,s:1};else for(;t.n.l;)t={up:t,n:t.n.l,s:1};case 1:if(t.s=2,!i||xe(n,t.n.to)<=0)return{value:t.n,done:!1};case 2:if(t.n.r){t.s=3,t={up:t,n:t.n.r,s:0};continue}case 3:t=t.up}return{done:!0}}}}function Go(e){var t,n,i=(((t=e.r)===null||t===void 0?void 0:t.d)||0)-(((n=e.l)===null||n===void 0?void 0:n.d)||0),s=1<i?"r":i<-1?"l":"";s&&(t=s=="r"?"l":"r",n=a({},e),i=e[s],e.from=i.from,e.to=i.to,e[s]=i[s],n[s]=i[t],(e[t]=n).d=Xo(n)),e.d=Xo(e)}function Xo(n){var t=n.r,n=n.l;return(t?n?Math.max(t.d,n.d):t.d:n?n.d:0)+1}function er(e,t){return h(t).forEach(function(n){e[n]?cn(e[n],t[n]):e[n]=function i(s){var c,f,p={};for(c in s)M(s,c)&&(f=s[c],p[c]=!f||typeof f!="object"||ne.has(f.constructor)?f:i(f));return p}(t[n])}),e}function Wr(e,t){return e.all||t.all||Object.keys(e).some(function(n){return t[n]&&Jo(t[n],e[n])})}ae(Be.prototype,((Qe={add:function(e){return cn(this,e),this},addKey:function(e){return un(this,e,e),this},addKeys:function(e){var t=this;return e.forEach(function(n){return un(t,n,n)}),this},hasKey:function(e){var t=Zn(this).next(e).value;return t&&xe(t.from,e)<=0&&0<=xe(t.to,e)}})[I]=function(){return Zn(this)},Qe));var Et={},Jr={},Gr=!1;function tr(e){er(Jr,e),Gr||(Gr=!0,setTimeout(function(){Gr=!1,Xr(Jr,!(Jr={}))},0))}function Xr(e,t){t===void 0&&(t=!1);var n=new Set;if(e.all)for(var i=0,s=Object.values(Et);i<s.length;i++)Qo(f=s[i],e,n,t);else for(var c in e){var f,p=/^idb\:\/\/(.*)\/(.*)\//.exec(c);p&&(c=p[1],p=p[2],(f=Et["idb://".concat(c,"/").concat(p)])&&Qo(f,e,n,t))}n.forEach(function(y){return y()})}function Qo(e,t,n,i){for(var s=[],c=0,f=Object.entries(e.queries.query);c<f.length;c++){for(var p=f[c],y=p[0],g=[],_=0,m=p[1];_<m.length;_++){var O=m[_];Wr(t,O.obsSet)?O.subscribers.forEach(function(b){return n.add(b)}):i&&g.push(O)}i&&s.push([y,g])}if(i)for(var v=0,w=s;v<w.length;v++){var S=w[v],y=S[0],g=S[1];e.queries.query[y]=g}}function Tu(e){var t=e._state,n=e._deps.indexedDB;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then(function(){return t.dbOpenError?$e(t.dbOpenError):e});t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;var i=t.openCanceller,s=Math.round(10*e.verno),c=!1;function f(){if(t.openCanceller!==i)throw new Z.DatabaseClosed("db.open() was cancelled")}function p(){return new W(function(O,v){if(f(),!n)throw new Z.MissingAPI;var w=e.name,S=t.autoSchema||!s?n.open(w):n.open(w,s);if(!S)throw new Z.MissingAPI;S.onerror=rt(v),S.onblocked=Te(e._fireOnBlocked),S.onupgradeneeded=Te(function(b){var k;_=S.transaction,t.autoSchema&&!e._options.allowEmptyDB?(S.onerror=rn,_.abort(),S.result.close(),(k=n.deleteDatabase(w)).onsuccess=k.onerror=Te(function(){v(new Z.NoSuchDatabase("Database ".concat(w," doesnt exist")))})):(_.onerror=rt(v),b=b.oldVersion>Math.pow(2,62)?0:b.oldVersion,m=b<1,e.idbdb=S.result,c&&Eu(e,_),Ou(e,b/10,_,v))},v),S.onsuccess=Te(function(){_=null;var b,k,T,R,P,F=e.idbdb=S.result,z=re(F.objectStoreNames);if(0<z.length)try{var q=F.transaction((R=z).length===1?R[0]:R,"readonly");if(t.autoSchema)k=F,T=q,(b=e).verno=k.version/10,T=b._dbSchema=Gn(0,k,T),b._storeNames=re(k.objectStoreNames,0),Wn(b,[b._allTables],h(T),T);else if(Xn(e,e._dbSchema,q),((P=Lr(Gn(0,(P=e).idbdb,q),P._dbSchema)).add.length||P.change.some(function(B){return B.add.length||B.change.length}))&&!c)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),F.close(),s=F.version+1,c=!0,O(p());Vn(e,q)}catch{}jt.push(e),F.onversionchange=Te(function(B){t.vcFired=!0,e.on("versionchange").fire(B)}),F.onclose=Te(function(B){e.on("close").fire(B)}),m&&(P=e._deps,q=w,F=P.indexedDB,P=P.IDBKeyRange,Hr(F)||q===Ln||Yr(F,P).put({name:q}).catch(ye)),O()},v)}).catch(function(O){switch(O==null?void 0:O.name){case"UnknownError":if(0<t.PR1398_maxLoop)return t.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),p();break;case"VersionError":if(0<s)return s=0,p()}return W.reject(O)})}var y,g=t.dbReadyResolve,_=null,m=!1;return W.race([i,(typeof navigator>"u"?W.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(O){function v(){return indexedDB.databases().finally(O)}y=setInterval(v,100),v()}).finally(function(){return clearInterval(y)}):Promise.resolve()).then(p)]).then(function(){return f(),t.onReadyBeingFired=[],W.resolve(zr(function(){return e.on.ready.fire(e.vip)})).then(function O(){if(0<t.onReadyBeingFired.length){var v=t.onReadyBeingFired.reduce(Cn,ye);return t.onReadyBeingFired=[],W.resolve(zr(function(){return v(e.vip)})).then(O)}})}).finally(function(){t.openCanceller===i&&(t.onReadyBeingFired=null,t.isBeingOpened=!1)}).catch(function(O){t.dbOpenError=O;try{_&&_.abort()}catch{}return i===t.openCanceller&&e._close(),$e(O)}).finally(function(){t.openComplete=!0,g()}).then(function(){var O;return m&&(O={},e.tables.forEach(function(v){v.schema.indexes.forEach(function(w){w.name&&(O["idb://".concat(e.name,"/").concat(v.name,"/").concat(w.name)]=new Be(-1/0,[[[]]]))}),O["idb://".concat(e.name,"/").concat(v.name,"/")]=O["idb://".concat(e.name,"/").concat(v.name,"/:dels")]=new Be(-1/0,[[[]]])}),ht(on).fire(O),Xr(O,!0)),e})}function Qr(e){function t(c){return e.next(c)}var n=s(t),i=s(function(c){return e.throw(c)});function s(c){return function(y){var p=c(y),y=p.value;return p.done?y:y&&typeof y.then=="function"?y.then(n,i):x(y)?Promise.all(y).then(n,i):n(y)}}return s(t)()}function nr(e,t,n){for(var i=x(e)?e.slice():[e],s=0;s<n;++s)i.push(t);return i}var Ru={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return a(a({},e),{table:function(t){var n=e.table(t),i=n.schema,s={},c=[];function f(m,O,v){var w=an(m),S=s[w]=s[w]||[],b=m==null?0:typeof m=="string"?1:m.length,k=0<O,k=a(a({},v),{name:k?"".concat(w,"(virtual-from:").concat(v.name,")"):v.name,lowLevelIndex:v,isVirtual:k,keyTail:O,keyLength:b,extractKey:Kr(m),unique:!k&&v.unique});return S.push(k),k.isPrimaryKey||c.push(k),1<b&&f(b===2?m[0]:m.slice(0,b-1),O+1,v),S.sort(function(T,R){return T.keyTail-R.keyTail}),k}t=f(i.primaryKey.keyPath,0,i.primaryKey),s[":id"]=[t];for(var p=0,y=i.indexes;p<y.length;p++){var g=y[p];f(g.keyPath,0,g)}function _(m){var O,v=m.query.index;return v.isVirtual?a(a({},m),{query:{index:v.lowLevelIndex,range:(O=m.query.range,v=v.keyTail,{type:O.type===1?2:O.type,lower:nr(O.lower,O.lowerOpen?e.MAX_KEY:e.MIN_KEY,v),lowerOpen:!0,upper:nr(O.upper,O.upperOpen?e.MIN_KEY:e.MAX_KEY,v),upperOpen:!0})}}):m}return a(a({},n),{schema:a(a({},i),{primaryKey:t,indexes:c,getIndexByKeyPath:function(m){return(m=s[an(m)])&&m[0]}}),count:function(m){return n.count(_(m))},query:function(m){return n.query(_(m))},openCursor:function(m){var O=m.query.index,v=O.keyTail,w=O.isVirtual,S=O.keyLength;return w?n.openCursor(_(m)).then(function(k){return k&&b(k)}):n.openCursor(m);function b(k){return Object.create(k,{continue:{value:function(T){T!=null?k.continue(nr(T,m.reverse?e.MAX_KEY:e.MIN_KEY,v)):m.unique?k.continue(k.key.slice(0,S).concat(m.reverse?e.MIN_KEY:e.MAX_KEY,v)):k.continue()}},continuePrimaryKey:{value:function(T,R){k.continuePrimaryKey(nr(T,e.MAX_KEY,v),R)}},primaryKey:{get:function(){return k.primaryKey}},key:{get:function(){var T=k.key;return S===1?T[0]:T.slice(0,S)}},value:{get:function(){return k.value}}})}}})}})}};function Zr(e,t,n,i){return n=n||{},i=i||"",h(e).forEach(function(s){var c,f,p;M(t,s)?(c=e[s],f=t[s],typeof c=="object"&&typeof f=="object"&&c&&f?(p=H(c))!==H(f)?n[i+s]=t[s]:p==="Object"?Zr(c,f,n,i+s+"."):c!==f&&(n[i+s]=t[s]):c!==f&&(n[i+s]=t[s])):n[i+s]=void 0}),h(t).forEach(function(s){M(e,s)||(n[i+s]=t[s])}),n}function ei(e,t){return t.type==="delete"?t.keys:t.keys||t.values.map(e.extractKey)}var Au={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return a(a({},e),{table:function(t){var n=e.table(t),i=n.schema.primaryKey;return a(a({},n),{mutate:function(s){var c=ie.trans,f=c.table(t).hook,p=f.deleting,y=f.creating,g=f.updating;switch(s.type){case"add":if(y.fire===ye)break;return c._promise("readwrite",function(){return _(s)},!0);case"put":if(y.fire===ye&&g.fire===ye)break;return c._promise("readwrite",function(){return _(s)},!0);case"delete":if(p.fire===ye)break;return c._promise("readwrite",function(){return _(s)},!0);case"deleteRange":if(p.fire===ye)break;return c._promise("readwrite",function(){return function m(O,v,w){return n.query({trans:O,values:!1,query:{index:i,range:v},limit:w}).then(function(S){var b=S.result;return _({type:"delete",keys:b,trans:O}).then(function(k){return 0<k.numFailures?Promise.reject(k.failures[0]):b.length<w?{failures:[],numFailures:0,lastResult:void 0}:m(O,a(a({},v),{lower:b[b.length-1],lowerOpen:!0}),w)})})}(s.trans,s.range,1e4)},!0)}return n.mutate(s);function _(m){var O,v,w,S=ie.trans,b=m.keys||ei(i,m);if(!b)throw new Error("Keys missing");return(m=m.type==="add"||m.type==="put"?a(a({},m),{keys:b}):a({},m)).type!=="delete"&&(m.values=l([],m.values)),m.keys&&(m.keys=l([],m.keys)),O=n,w=b,((v=m).type==="add"?Promise.resolve([]):O.getMany({trans:v.trans,keys:w,cache:"immutable"})).then(function(k){var T=b.map(function(R,P){var F,z,q,B=k[P],V={onerror:null,onsuccess:null};return m.type==="delete"?p.fire.call(V,R,B,S):m.type==="add"||B===void 0?(F=y.fire.call(V,R,m.values[P],S),R==null&&F!=null&&(m.keys[P]=R=F,i.outbound||U(m.values[P],i.keyPath,R))):(F=Zr(B,m.values[P]),(z=g.fire.call(V,F,R,B,S))&&(q=m.values[P],Object.keys(z).forEach(function(Y){M(q,Y)?q[Y]=z[Y]:U(q,Y,z[Y])}))),V});return n.mutate(m).then(function(R){for(var P=R.failures,F=R.results,z=R.numFailures,R=R.lastResult,q=0;q<b.length;++q){var B=(F||b)[q],V=T[q];B==null?V.onerror&&V.onerror(P[q]):V.onsuccess&&V.onsuccess(m.type==="put"&&k[q]?m.values[q]:B)}return{failures:P,results:F,numFailures:z,lastResult:R}}).catch(function(R){return T.forEach(function(P){return P.onerror&&P.onerror(R)}),Promise.reject(R)})})}}})}})}};function Zo(e,t,n){try{if(!t||t.keys.length<e.length)return null;for(var i=[],s=0,c=0;s<t.keys.length&&c<e.length;++s)xe(t.keys[s],e[c])===0&&(i.push(n?we(t.values[s]):t.values[s]),++c);return i.length===e.length?i:null}catch{return null}}var $u={stack:"dbcore",level:-1,create:function(e){return{table:function(t){var n=e.table(t);return a(a({},n),{getMany:function(i){if(!i.cache)return n.getMany(i);var s=Zo(i.keys,i.trans._cache,i.cache==="clone");return s?W.resolve(s):n.getMany(i).then(function(c){return i.trans._cache={keys:i.keys,values:i.cache==="clone"?we(c):c},c})},mutate:function(i){return i.type!=="add"&&(i.trans._cache=null),n.mutate(i)}})}}}};function es(e,t){return e.trans.mode==="readonly"&&!!e.subscr&&!e.trans.explicit&&e.trans.db._options.cache!=="disabled"&&!t.schema.primaryKey.outbound}function ts(e,t){switch(e){case"query":return t.values&&!t.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var Pu={stack:"dbcore",level:0,name:"Observability",create:function(e){var t=e.schema.name,n=new Be(e.MIN_KEY,e.MAX_KEY);return a(a({},e),{transaction:function(i,s,c){if(ie.subscr&&s!=="readonly")throw new Z.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(ie.querier));return e.transaction(i,s,c)},table:function(i){var s=e.table(i),c=s.schema,f=c.primaryKey,m=c.indexes,p=f.extractKey,y=f.outbound,g=f.autoIncrement&&m.filter(function(v){return v.compound&&v.keyPath.includes(f.keyPath)}),_=a(a({},s),{mutate:function(v){function w(Y){return Y="idb://".concat(t,"/").concat(i,"/").concat(Y),R[Y]||(R[Y]=new Be)}var S,b,k,T=v.trans,R=v.mutatedParts||(v.mutatedParts={}),P=w(""),F=w(":dels"),z=v.type,V=v.type==="deleteRange"?[v.range]:v.type==="delete"?[v.keys]:v.values.length<50?[ei(f,v).filter(function(Y){return Y}),v.values]:[],q=V[0],B=V[1],V=v.trans._cache;return x(q)?(P.addKeys(q),(V=z==="delete"||q.length===B.length?Zo(q,V):null)||F.addKeys(q),(V||B)&&(S=w,b=V,k=B,c.indexes.forEach(function(Y){var X=S(Y.name||"");function me(ge){return ge!=null?Y.extractKey(ge):null}function ve(ge){return Y.multiEntry&&x(ge)?ge.forEach(function(Ge){return X.addKey(Ge)}):X.addKey(ge)}(b||k).forEach(function(ge,Ke){var he=b&&me(b[Ke]),Ke=k&&me(k[Ke]);xe(he,Ke)!==0&&(he!=null&&ve(he),Ke!=null&&ve(Ke))})}))):q?(B={from:(B=q.lower)!==null&&B!==void 0?B:e.MIN_KEY,to:(B=q.upper)!==null&&B!==void 0?B:e.MAX_KEY},F.add(B),P.add(B)):(P.add(n),F.add(n),c.indexes.forEach(function(Y){return w(Y.name).add(n)})),s.mutate(v).then(function(Y){return!q||v.type!=="add"&&v.type!=="put"||(P.addKeys(Y.results),g&&g.forEach(function(X){for(var me=v.values.map(function(he){return X.extractKey(he)}),ve=X.keyPath.findIndex(function(he){return he===f.keyPath}),ge=0,Ge=Y.results.length;ge<Ge;++ge)me[ge][ve]=Y.results[ge];w(X.name).addKeys(me)})),T.mutatedParts=er(T.mutatedParts||{},R),Y})}}),m=function(w){var S=w.query,w=S.index,S=S.range;return[w,new Be((w=S.lower)!==null&&w!==void 0?w:e.MIN_KEY,(S=S.upper)!==null&&S!==void 0?S:e.MAX_KEY)]},O={get:function(v){return[f,new Be(v.key)]},getMany:function(v){return[f,new Be().addKeys(v.keys)]},count:m,query:m,openCursor:m};return h(O).forEach(function(v){_[v]=function(w){var S=ie.subscr,b=!!S,k=es(ie,s)&&ts(v,w)?w.obsSet={}:S;if(b){var T=function(B){return B="idb://".concat(t,"/").concat(i,"/").concat(B),k[B]||(k[B]=new Be)},R=T(""),P=T(":dels"),S=O[v](w),b=S[0],S=S[1];if((v==="query"&&b.isPrimaryKey&&!w.values?P:T(b.name||"")).add(S),!b.isPrimaryKey){if(v!=="count"){var F=v==="query"&&y&&w.values&&s.query(a(a({},w),{values:!1}));return s[v].apply(this,arguments).then(function(B){if(v==="query"){if(y&&w.values)return F.then(function(me){return me=me.result,R.addKeys(me),B});var V=w.values?B.result.map(p):B.result;(w.values?R:P).addKeys(V)}else if(v==="openCursor"){var Y=B,X=w.values;return Y&&Object.create(Y,{key:{get:function(){return P.addKey(Y.primaryKey),Y.key}},primaryKey:{get:function(){var me=Y.primaryKey;return P.addKey(me),me}},value:{get:function(){return X&&R.addKey(Y.primaryKey),Y.value}}})}return B})}P.add(n)}}return s[v].apply(this,arguments)}}),_}})}};function ns(e,t,n){if(n.numFailures===0)return t;if(t.type==="deleteRange")return null;var i=t.keys?t.keys.length:"values"in t&&t.values?t.values.length:1;return n.numFailures===i?null:(t=a({},t),x(t.keys)&&(t.keys=t.keys.filter(function(s,c){return!(c in n.failures)})),"values"in t&&x(t.values)&&(t.values=t.values.filter(function(s,c){return!(c in n.failures)})),t)}function ti(e,t){return n=e,((i=t).lower===void 0||(i.lowerOpen?0<xe(n,i.lower):0<=xe(n,i.lower)))&&(e=e,(t=t).upper===void 0||(t.upperOpen?xe(e,t.upper)<0:xe(e,t.upper)<=0));var n,i}function rs(e,t,O,i,s,c){if(!O||O.length===0)return e;var f=t.query.index,p=f.multiEntry,y=t.query.range,g=i.schema.primaryKey.extractKey,_=f.extractKey,m=(f.lowLevelIndex||f).extractKey,O=O.reduce(function(v,w){var S=v,b=[];if(w.type==="add"||w.type==="put")for(var k=new Be,T=w.values.length-1;0<=T;--T){var R,P=w.values[T],F=g(P);k.hasKey(F)||(R=_(P),(p&&x(R)?R.some(function(Y){return ti(Y,y)}):ti(R,y))&&(k.addKey(F),b.push(P)))}switch(w.type){case"add":var z=new Be().addKeys(t.values?v.map(function(X){return g(X)}):v),S=v.concat(t.values?b.filter(function(X){return X=g(X),!z.hasKey(X)&&(z.addKey(X),!0)}):b.map(function(X){return g(X)}).filter(function(X){return!z.hasKey(X)&&(z.addKey(X),!0)}));break;case"put":var q=new Be().addKeys(w.values.map(function(X){return g(X)}));S=v.filter(function(X){return!q.hasKey(t.values?g(X):X)}).concat(t.values?b:b.map(function(X){return g(X)}));break;case"delete":var B=new Be().addKeys(w.keys);S=v.filter(function(X){return!B.hasKey(t.values?g(X):X)});break;case"deleteRange":var V=w.range;S=v.filter(function(X){return!ti(g(X),V)})}return S},e);return O===e?e:(O.sort(function(v,w){return xe(m(v),m(w))||xe(g(v),g(w))}),t.limit&&t.limit<1/0&&(O.length>t.limit?O.length=t.limit:e.length===t.limit&&O.length<t.limit&&(s.dirty=!0)),c?Object.freeze(O):O)}function is(e,t){return xe(e.lower,t.lower)===0&&xe(e.upper,t.upper)===0&&!!e.lowerOpen==!!t.lowerOpen&&!!e.upperOpen==!!t.upperOpen}function Du(e,t){return function(n,i,s,c){if(n===void 0)return i!==void 0?-1:0;if(i===void 0)return 1;if((i=xe(n,i))===0){if(s&&c)return 0;if(s)return 1;if(c)return-1}return i}(e.lower,t.lower,e.lowerOpen,t.lowerOpen)<=0&&0<=function(n,i,s,c){if(n===void 0)return i!==void 0?1:0;if(i===void 0)return-1;if((i=xe(n,i))===0){if(s&&c)return 0;if(s)return-1;if(c)return 1}return i}(e.upper,t.upper,e.upperOpen,t.upperOpen)}function Cu(e,t,n,i){e.subscribers.add(n),i.addEventListener("abort",function(){var s,c;e.subscribers.delete(n),e.subscribers.size===0&&(s=e,c=t,setTimeout(function(){s.subscribers.size===0&&L(c,s)},3e3))})}var ju={stack:"dbcore",level:0,name:"Cache",create:function(e){var t=e.schema.name;return a(a({},e),{transaction:function(n,i,s){var c,f,p=e.transaction(n,i,s);return i==="readwrite"&&(f=(c=new AbortController).signal,s=function(y){return function(){if(c.abort(),i==="readwrite"){for(var g=new Set,_=0,m=n;_<m.length;_++){var O=m[_],v=Et["idb://".concat(t,"/").concat(O)];if(v){var w=e.table(O),S=v.optimisticOps.filter(function(X){return X.trans===p});if(p._explicit&&y&&p.mutatedParts)for(var b=0,k=Object.values(v.queries.query);b<k.length;b++)for(var T=0,R=(z=k[b]).slice();T<R.length;T++)Wr((q=R[T]).obsSet,p.mutatedParts)&&(L(z,q),q.subscribers.forEach(function(X){return g.add(X)}));else if(0<S.length){v.optimisticOps=v.optimisticOps.filter(function(X){return X.trans!==p});for(var P=0,F=Object.values(v.queries.query);P<F.length;P++)for(var z,q,B,V=0,Y=(z=F[P]).slice();V<Y.length;V++)(q=Y[V]).res!=null&&p.mutatedParts&&(y&&!q.dirty?(B=Object.isFrozen(q.res),B=rs(q.res,q.req,S,w,q,B),q.dirty?(L(z,q),q.subscribers.forEach(function(X){return g.add(X)})):B!==q.res&&(q.res=B,q.promise=W.resolve({result:B}))):(q.dirty&&L(z,q),q.subscribers.forEach(function(X){return g.add(X)})))}}}g.forEach(function(X){return X()})}}},p.addEventListener("abort",s(!1),{signal:f}),p.addEventListener("error",s(!1),{signal:f}),p.addEventListener("complete",s(!0),{signal:f})),p},table:function(n){var i=e.table(n),s=i.schema.primaryKey;return a(a({},i),{mutate:function(c){var f=ie.trans;if(s.outbound||f.db._options.cache==="disabled"||f.explicit||f.idbtrans.mode!=="readwrite")return i.mutate(c);var p=Et["idb://".concat(t,"/").concat(n)];return p?(f=i.mutate(c),c.type!=="add"&&c.type!=="put"||!(50<=c.values.length||ei(s,c).some(function(y){return y==null}))?(p.optimisticOps.push(c),c.mutatedParts&&tr(c.mutatedParts),f.then(function(y){0<y.numFailures&&(L(p.optimisticOps,c),(y=ns(0,c,y))&&p.optimisticOps.push(y),c.mutatedParts&&tr(c.mutatedParts))}),f.catch(function(){L(p.optimisticOps,c),c.mutatedParts&&tr(c.mutatedParts)})):f.then(function(y){var g=ns(0,a(a({},c),{values:c.values.map(function(_,m){var O;return y.failures[m]?_:(_=(O=s.keyPath)!==null&&O!==void 0&&O.includes(".")?we(_):a({},_),U(_,s.keyPath,y.results[m]),_)})}),y);p.optimisticOps.push(g),queueMicrotask(function(){return c.mutatedParts&&tr(c.mutatedParts)})}),f):i.mutate(c)},query:function(c){if(!es(ie,i)||!ts("query",c))return i.query(c);var f=((g=ie.trans)===null||g===void 0?void 0:g.db._options.cache)==="immutable",m=ie,p=m.requery,y=m.signal,g=function(w,S,b,k){var T=Et["idb://".concat(w,"/").concat(S)];if(!T)return[];if(!(S=T.queries[b]))return[null,!1,T,null];var R=S[(k.query?k.query.index.name:null)||""];if(!R)return[null,!1,T,null];switch(b){case"query":var P=R.find(function(F){return F.req.limit===k.limit&&F.req.values===k.values&&is(F.req.query.range,k.query.range)});return P?[P,!0,T,R]:[R.find(function(F){return("limit"in F.req?F.req.limit:1/0)>=k.limit&&(!k.values||F.req.values)&&Du(F.req.query.range,k.query.range)}),!1,T,R];case"count":return P=R.find(function(F){return is(F.req.query.range,k.query.range)}),[P,!!P,T,R]}}(t,n,"query",c),_=g[0],m=g[1],O=g[2],v=g[3];return _&&m?_.obsSet=c.obsSet:(m=i.query(c).then(function(w){var S=w.result;if(_&&(_.res=S),f){for(var b=0,k=S.length;b<k;++b)Object.freeze(S[b]);Object.freeze(S)}else w.result=we(S);return w}).catch(function(w){return v&&_&&L(v,_),Promise.reject(w)}),_={obsSet:c.obsSet,promise:m,subscribers:new Set,type:"query",req:c,dirty:!1},v?v.push(_):(v=[_],(O=O||(Et["idb://".concat(t,"/").concat(n)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[c.query.index.name||""]=v)),Cu(_,v,p,y),_.promise.then(function(w){return{result:rs(w.result,c,O==null?void 0:O.optimisticOps,i,_,f)}})}})}})}};function rr(e,t){return new Proxy(e,{get:function(n,i,s){return i==="db"?t:Reflect.get(n,i,s)}})}var at=(Pe.prototype.version=function(e){if(isNaN(e)||e<.1)throw new Z.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new Z.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,n=t.filter(function(i){return i._cfg.version===e})[0];return n||(n=new this.Version(e),t.push(n),t.sort(Su),n.stores({}),this._state.autoSchema=!1,n)},Pe.prototype._whenReady=function(e){var t=this;return this.idbdb&&(this._state.openComplete||ie.letThrough||this._vip)?e():new W(function(n,i){if(t._state.openComplete)return i(new Z.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._state.autoOpen)return void i(new Z.DatabaseClosed);t.open().catch(ye)}t._state.dbReadyPromise.then(n,i)}).then(e)},Pe.prototype.use=function(e){var t=e.stack,n=e.create,i=e.level,s=e.name;return s&&this.unuse({stack:t,name:s}),e=this._middlewares[t]||(this._middlewares[t]=[]),e.push({stack:t,create:n,level:i??10,name:s}),e.sort(function(c,f){return c.level-f.level}),this},Pe.prototype.unuse=function(e){var t=e.stack,n=e.name,i=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter(function(s){return i?s.create!==i:!!n&&s.name!==n})),this},Pe.prototype.open=function(){var e=this;return xt(ut,function(){return Tu(e)})},Pe.prototype._close=function(){var e=this._state,t=jt.indexOf(this);if(0<=t&&jt.splice(t,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}e.isBeingOpened||(e.dbReadyPromise=new W(function(n){e.dbReadyResolve=n}),e.openCanceller=new W(function(n,i){e.cancelOpen=i}))},Pe.prototype.close=function(n){var t=(n===void 0?{disableAutoOpen:!0}:n).disableAutoOpen,n=this._state;t?(n.isBeingOpened&&n.cancelOpen(new Z.DatabaseClosed),this._close(),n.autoOpen=!1,n.dbOpenError=new Z.DatabaseClosed):(this._close(),n.autoOpen=this._options.autoOpen||n.isBeingOpened,n.openComplete=!1,n.dbOpenError=null)},Pe.prototype.delete=function(e){var t=this;e===void 0&&(e={disableAutoOpen:!0});var n=0<arguments.length&&typeof arguments[0]!="object",i=this._state;return new W(function(s,c){function f(){t.close(e);var p=t._deps.indexedDB.deleteDatabase(t.name);p.onsuccess=Te(function(){var y,g,_;y=t._deps,g=t.name,_=y.indexedDB,y=y.IDBKeyRange,Hr(_)||g===Ln||Yr(_,y).delete(g).catch(ye),s()}),p.onerror=rt(c),p.onblocked=t._fireOnBlocked}if(n)throw new Z.InvalidArgument("Invalid closeOptions argument to db.delete()");i.isBeingOpened?i.dbReadyPromise.then(f):f()})},Pe.prototype.backendDB=function(){return this.idbdb},Pe.prototype.isOpen=function(){return this.idbdb!==null},Pe.prototype.hasBeenClosed=function(){var e=this._state.dbOpenError;return e&&e.name==="DatabaseClosed"},Pe.prototype.hasFailed=function(){return this._state.dbOpenError!==null},Pe.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(Pe.prototype,"tables",{get:function(){var e=this;return h(this._allTables).map(function(t){return e._allTables[t]})},enumerable:!1,configurable:!0}),Pe.prototype.transaction=function(){var e=(function(t,n,i){var s=arguments.length;if(s<2)throw new Z.InvalidArgument("Too few arguments");for(var c=new Array(s-1);--s;)c[s-1]=arguments[s];return i=c.pop(),[t,le(c),i]}).apply(this,arguments);return this._transaction.apply(this,e)},Pe.prototype._transaction=function(e,t,n){var i=this,s=ie.trans;s&&s.db===this&&e.indexOf("!")===-1||(s=null);var c,f,p=e.indexOf("?")!==-1;e=e.replace("!","").replace("?","");try{if(f=t.map(function(g){if(g=g instanceof i.Table?g.name:g,typeof g!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return g}),e=="r"||e===Dr)c=Dr;else{if(e!="rw"&&e!=Cr)throw new Z.InvalidArgument("Invalid transaction mode: "+e);c=Cr}if(s){if(s.mode===Dr&&c===Cr){if(!p)throw new Z.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");s=null}s&&f.forEach(function(g){if(s&&s.storeNames.indexOf(g)===-1){if(!p)throw new Z.SubTransaction("Table "+g+" not included in parent transaction.");s=null}}),p&&s&&!s.active&&(s=null)}}catch(g){return s?s._promise(null,function(_,m){m(g)}):$e(g)}var y=(function g(_,m,O,v,w){return W.resolve().then(function(){var S=ie.transless||ie,b=_._createTransaction(m,O,_._dbSchema,v);if(b.explicit=!0,S={trans:b,transless:S},v)b.idbtrans=v.idbtrans;else try{b.create(),b.idbtrans._explicit=!0,_._state.PR1398_maxLoop=3}catch(R){return R.name===We.InvalidState&&_.isOpen()&&0<--_._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),_.close({disableAutoOpen:!1}),_.open().then(function(){return g(_,m,O,null,w)})):$e(R)}var k,T=de(w);return T&&Ct(),S=W.follow(function(){var R;(k=w.call(b,b))&&(T?(R=lt.bind(null,null),k.then(R,R)):typeof k.next=="function"&&typeof k.throw=="function"&&(k=Qr(k)))},S),(k&&typeof k.then=="function"?W.resolve(k).then(function(R){return b.active?R:$e(new Z.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):S.then(function(){return k})).then(function(R){return v&&b._resolve(),b._completion.then(function(){return R})}).catch(function(R){return b._reject(R),$e(R)})})}).bind(null,this,c,f,s,n);return s?s._promise(c,y,"lock"):ie.trans?xt(ie.transless,function(){return i._whenReady(y)}):this._whenReady(y)},Pe.prototype.table=function(e){if(!M(this._allTables,e))throw new Z.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]},Pe);function Pe(e,t){var n=this;this._middlewares={},this.verno=0;var i=Pe.dependencies;this._options=t=a({addons:Pe.addons,autoOpen:!0,indexedDB:i.indexedDB,IDBKeyRange:i.IDBKeyRange,cache:"cloned"},t),this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange},i=t.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var s,c,f,p,y,g={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:ye,dbReadyPromise:null,cancelOpen:ye,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:t.autoOpen};g.dbReadyPromise=new W(function(m){g.dbReadyResolve=m}),g.openCanceller=new W(function(m,O){g.cancelOpen=O}),this._state=g,this.name=e,this.on=en(this,"populate","blocked","versionchange","close",{ready:[Cn,ye]}),this.on.ready.subscribe=G(this.on.ready.subscribe,function(m){return function(O,v){Pe.vip(function(){var w,S=n._state;S.openComplete?(S.dbOpenError||W.resolve().then(O),v&&m(O)):S.onReadyBeingFired?(S.onReadyBeingFired.push(O),v&&m(O)):(m(O),w=n,v||m(function b(){w.on.ready.unsubscribe(O),w.on.ready.unsubscribe(b)}))})}}),this.Collection=(s=this,tn(yu.prototype,function(k,b){this.db=s;var v=Mo,w=null;if(b)try{v=b()}catch(T){w=T}var S=k._ctx,b=S.table,k=b.hook.reading.fire;this._ctx={table:b,index:S.index,isPrimKey:!S.index||b.schema.primKey.keyPath&&S.index===b.schema.primKey.name,range:v,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:w,or:S.or,valueMapper:k!==He?k:null}})),this.Table=(c=this,tn(Bo.prototype,function(m,O,v){this.db=c,this._tx=v,this.name=m,this.schema=O,this.hook=c._allTables[m]?c._allTables[m].hook:en(null,{creating:[zt,ye],reading:[$t,He],updating:[Wt,ye],deleting:[Vt,ye]})})),this.Transaction=(f=this,tn(bu.prototype,function(m,O,v,w,S){var b=this;this.db=f,this.mode=m,this.storeNames=O,this.schema=v,this.chromeTransactionDurability=w,this.idbtrans=null,this.on=en(this,"complete","error","abort"),this.parent=S||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new W(function(k,T){b._resolve=k,b._reject=T}),this._completion.then(function(){b.active=!1,b.on.complete.fire()},function(k){var T=b.active;return b.active=!1,b.on.error.fire(k),b.parent?b.parent._reject(k):T&&b.idbtrans&&b.idbtrans.abort(),$e(k)})})),this.Version=(p=this,tn(ku.prototype,function(m){this.db=p,this._cfg={version:m,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(y=this,tn(Yo.prototype,function(m,O,v){if(this.db=y,this._ctx={table:m,index:O===":id"?null:O,or:v},this._cmp=this._ascending=xe,this._descending=function(w,S){return xe(S,w)},this._max=function(w,S){return 0<xe(w,S)?w:S},this._min=function(w,S){return xe(w,S)<0?w:S},this._IDBKeyRange=y._deps.IDBKeyRange,!this._IDBKeyRange)throw new Z.MissingAPI})),this.on("versionchange",function(m){0<m.newVersion?console.warn("Another connection wants to upgrade database '".concat(n.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(n.name,"'. Closing db now to resume the delete request.")),n.close({disableAutoOpen:!1})}),this.on("blocked",function(m){!m.newVersion||m.newVersion<m.oldVersion?console.warn("Dexie.delete('".concat(n.name,"') was blocked")):console.warn("Upgrade '".concat(n.name,"' blocked by other connection holding version ").concat(m.oldVersion/10))}),this._maxKey=sn(t.IDBKeyRange),this._createTransaction=function(m,O,v,w){return new n.Transaction(m,O,v,n._options.chromeTransactionDurability,w)},this._fireOnBlocked=function(m){n.on("blocked").fire(m),jt.filter(function(O){return O.name===n.name&&O!==n&&!O._state.vcFired}).map(function(O){return O.on("versionchange").fire(m)})},this.use($u),this.use(ju),this.use(Pu),this.use(Ru),this.use(Au);var _=new Proxy(this,{get:function(m,O,v){if(O==="_vip")return!0;if(O==="table")return function(S){return rr(n.table(S),_)};var w=Reflect.get(m,O,v);return w instanceof Bo?rr(w,_):O==="tables"?w.map(function(S){return rr(S,_)}):O==="_createTransaction"?function(){return rr(w.apply(this,arguments),_)}:w}});this.vip=_,i.forEach(function(m){return m(n)})}var ir,Qe=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",Mu=(ni.prototype.subscribe=function(e,t,n){return this._subscribe(e&&typeof e!="function"?e:{next:e,error:t,complete:n})},ni.prototype[Qe]=function(){return this},ni);function ni(e){this._subscribe=e}try{ir={indexedDB:d.indexedDB||d.mozIndexedDB||d.webkitIndexedDB||d.msIndexedDB,IDBKeyRange:d.IDBKeyRange||d.webkitIDBKeyRange}}catch{ir={indexedDB:null,IDBKeyRange:null}}function os(e){var t,n=!1,i=new Mu(function(s){var c=de(e),f,p=!1,y={},g={},_={get closed(){return p},unsubscribe:function(){p||(p=!0,f&&f.abort(),m&&ht.storagemutated.unsubscribe(v))}};s.start&&s.start(_);var m=!1,O=function(){return Pr(w)},v=function(S){er(y,S),Wr(g,y)&&O()},w=function(){var S,b,k;!p&&ir.indexedDB&&(y={},S={},f&&f.abort(),f=new AbortController,k=function(T){var R=Pt();try{c&&Ct();var P=ct(e,T);return P=c?P.finally(lt):P}finally{R&&Dt()}}(b={subscr:S,signal:f.signal,requery:O,querier:e,trans:null}),Promise.resolve(k).then(function(T){n=!0,t=T,p||b.signal.aborted||(y={},function(R){for(var P in R)if(M(R,P))return;return 1}(g=S)||m||(ht(on,v),m=!0),Pr(function(){return!p&&s.next&&s.next(T)}))},function(T){n=!1,["DatabaseClosedError","AbortError"].includes(T==null?void 0:T.name)||p||Pr(function(){p||s.error&&s.error(T)})}))};return setTimeout(O,0),_});return i.hasValue=function(){return n},i.getValue=function(){return t},i}var kt=at;function ri(e){var t=pt;try{pt=!0,ht.storagemutated.fire(e),Xr(e,!0)}finally{pt=t}}ae(kt,a(a({},Fe),{delete:function(e){return new kt(e,{addons:[]}).delete()},exists:function(e){return new kt(e,{addons:[]}).open().then(function(t){return t.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(e){try{return t=kt.dependencies,n=t.indexedDB,t=t.IDBKeyRange,(Hr(n)?Promise.resolve(n.databases()).then(function(i){return i.map(function(s){return s.name}).filter(function(s){return s!==Ln})}):Yr(n,t).toCollection().primaryKeys()).then(e)}catch{return $e(new Z.MissingAPI)}var t,n},defineClass:function(){return function(e){$(this,e)}},ignoreTransaction:function(e){return ie.trans?xt(ie.transless,e):e()},vip:zr,async:function(e){return function(){try{var t=Qr(e.apply(this,arguments));return t&&typeof t.then=="function"?t:W.resolve(t)}catch(n){return $e(n)}}},spawn:function(e,t,n){try{var i=Qr(e.apply(n,t||[]));return i&&typeof i.then=="function"?i:W.resolve(i)}catch(s){return $e(s)}},currentTransaction:{get:function(){return ie.trans||null}},waitFor:function(e,t){return t=W.resolve(typeof e=="function"?kt.ignoreTransaction(e):e).timeout(t||6e4),ie.trans?ie.trans.waitFor(t):t},Promise:W,debug:{get:function(){return nt},set:function(e){Ro(e)}},derive:j,extend:$,props:ae,override:G,Events:en,on:ht,liveQuery:os,extendObservabilitySet:er,getByKeyPath:te,setByKeyPath:U,delByKeyPath:function(e,t){typeof t=="string"?U(e,t,void 0):"length"in t&&[].map.call(t,function(n){U(e,n,void 0)})},shallowClone:K,deepClone:we,getObjectDiff:Zr,cmp:xe,asap:fe,minKey:-1/0,addons:[],connections:jt,errnames:We,dependencies:ir,cache:Et,semVer:"4.0.11",version:"4.0.11".split(".").map(function(e){return parseInt(e)}).reduce(function(e,t,n){return e+t/Math.pow(10,2*n)})})),kt.maxKey=sn(kt.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(ht(on,function(e){pt||(e=new CustomEvent(Fr,{detail:e}),pt=!0,dispatchEvent(e),pt=!1)}),addEventListener(Fr,function(e){e=e.detail,pt||ri(e)}));var Ft,pt=!1,ss=function(){};return typeof BroadcastChannel<"u"&&((ss=function(){(Ft=new BroadcastChannel(Fr)).onmessage=function(e){return e.data&&ri(e.data)}})(),typeof Ft.unref=="function"&&Ft.unref(),ht(on,function(e){pt||Ft.postMessage(e)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(e){if(!at.disableBfCache&&e.persisted){nt&&console.debug("Dexie: handling persisted pagehide"),Ft!=null&&Ft.close();for(var t=0,n=jt;t<n.length;t++)n[t].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(e){!at.disableBfCache&&e.persisted&&(nt&&console.debug("Dexie: handling persisted pageshow"),ss(),ri({all:new Be(-1/0,[[]])}))})),W.rejectionMapper=function(e,t){return!e||e instanceof Oe||e instanceof TypeError||e instanceof SyntaxError||!e.name||!Ce[e.name]?e:(t=new Ce[e.name](t||e.message,e),"stack"in e&&N(t,"stack",{get:function(){return this.inner.stack}}),t)},Ro(nt),a(at,Object.freeze({__proto__:null,Dexie:at,liveQuery:os,Entity:No,cmp:xe,PropModification:nn,replacePrefix:function(e,t){return new nn({replacePrefix:[e,t]})},add:function(e){return new nn({add:e})},remove:function(e){return new nn({remove:e})},default:at,RangeSet:Be,mergeRanges:cn,rangesOverlap:Jo}),{default:at}),at})}(pn)),pn.exports}var ks=Es();const sr=Ze(ks),di=Symbol.for("Dexie"),mn=globalThis[di]||(globalThis[di]=sr);if(sr.semVer!==mn.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${sr.semVer} and ${mn.semVer}`);const{liveQuery:Bu,mergeRanges:Ku,rangesOverlap:Iu,RangeSet:Lu,cmp:Uu,Entity:Yu,PropModification:Hu,replacePrefix:zu,add:Vu,remove:Wu}=mn;class hi extends mn{constructor(){super("db");oi(this,"rows");this.version(1).stores({rows:"++id, key"})}}const yn=new hi,ar=(r,o=!0)=>yn.rows.where({key:r}).first().then(u=>o?u==null?void 0:u.value:u),pi=async(r,o)=>{await ar(r,!1)?await yn.rows.where({key:r}).modify({value:o}):await yn.rows.add({key:r,value:o})},Ts=Object.freeze(Object.defineProperty({__proto__:null,SubDexie:hi,db:yn,default:{get:ar,set:pi},get:ar,set:pi},Symbol.toStringTag,{value:"Module"})),mi=(r,o="children")=>r.reduce((u,a)=>{const{[o]:l,...d}=a;return u.push(d),l&&l.length>0&&u.push(...mi(l)),u},[]),yi=(r,o,u="value")=>r.find(a=>a[u]==(Array.isArray(o)?o[0]:o)),vi=r=>new Promise(o=>setTimeout(o,r)),gi=(r,o)=>{o?console.log(o,r):console.log(r)},bi=r=>{throw new Error(r)},Rs=Object.freeze(Object.defineProperty({__proto__:null,default:{findByValue:yi,sleep:vi,log:gi,fail:bi},fail:bi,findByValue:yi,flattenTree:mi,log:gi,sleep:vi},Symbol.toStringTag,{value:"Module"})),wi=r=>new Promise((o,u)=>{const a=new FileReader;a.onload=l=>{var d;return o((d=l.target)==null?void 0:d.result)},a.onerror=l=>{var d;return u((d=l.target)==null?void 0:d.error)},a.readAsDataURL(r)}).then(o=>o),_i=r=>{const o=atob(r.split(",")[1]||r),u=new Uint8Array(o.length);for(let a=0;a<o.length;a++)u[a]=o.charCodeAt(a);return new Blob([u])},xi=(r,o)=>{const u=document.createElement("a");u.href=URL.createObjectURL(o),u.download=r,u.click(),URL.revokeObjectURL(u.href)},As=Object.freeze(Object.defineProperty({__proto__:null,default:{toBase64:wi,toBlob:_i,download:xi},download:xi,toBase64:wi,toBlob:_i},Symbol.toStringTag,{value:"Module"}));var vn={},gn={},ur,Si;function Oi(){if(Si)return ur;Si=1,ur=r;function r(u,a){if(a!=="$")for(var l=o(a),d=0;d<l.length;d++)a=l[d].toString().replace(/\\"/g,'"'),!(typeof u[a]>"u"&&d!==l.length-1)&&(u=u[a]);return u}function o(u){for(var a=/(?:\.(\w+))|(?:\[(\d+)\])|(?:\["((?:[^\\"]|\\.)*)"\])/g,l=[],d;d=a.exec(u);)l.push(d[1]||d[2]||d[3]);return l}return ur}var Bt={},Ei;function $s(){if(Ei)return Bt;Ei=1;var r=Oi(),o=Ri();return Bt.getRegexFlags=function(a){var l="";return a.ignoreCase&&(l+="i"),a.global&&(l+="g"),a.multiline&&(l+="m"),l},Bt.stringifyFunction=function(a,l){if(typeof l=="function")return l(a);var d=a.toString(),h=d.match(/^[^{]*{|^[^=]*=>/),x=h?h[0]:"<function> ",$=d[d.length-1]==="}"?"}":"";return x.replace(/\r\n|\n/g," ").replace(/\s+/g," ")+" /* ... */ "+$},Bt.restore=function(a,l){var d=a[0],h=a.slice(1);switch(d){case"$":return r(l,a);case"r":var x=h.indexOf(","),$=h.slice(0,x),C=h.slice(x+1);return RegExp(C,$);case"d":return new Date(+h);case"f":var D=function(){throw new Error("can't run jsan parsed function")};return D.toString=function(){return h},D;case"u":return;case"e":var M=new Error(h);return M.stack="Stack is unavailable for jsan parsed errors",M;case"s":return Symbol(h);case"g":return Symbol.for(h);case"m":return new Map(o.parse(h));case"l":return new Set(o.parse(h));case"n":return NaN;case"i":return 1/0;case"y":return-1/0;default:return console.warn("unknown type",a),a}},Bt}var ki;function Ps(){if(ki)return gn;ki=1,Oi();var r=$s(),o=typeof WeakMap<"u"?WeakMap:function(){var u=[],a=[];return{set:function(l,d){u.push(l),a.push(d)},get:function(l){for(var d=0;d<u.length;d++)if(u[d]===l)return a[d]}}};return gn.decycle=function u(a,l,d,h){h=h||new o;var x=!Object.prototype.hasOwnProperty.call(l,"circular"),$=l.refs!==!1;return function C(D,M,ae){var ue,N,j,E=typeof d=="function"?d(ae||"",D):D;if(l.date&&E instanceof Date)return{$jsan:"d"+E.getTime()};if(l.regex&&E instanceof RegExp)return{$jsan:"r"+r.getRegexFlags(E)+","+E.source};if(l.function&&typeof E=="function")return{$jsan:"f"+r.stringifyFunction(E,l.function)};if(l.nan&&typeof E=="number"&&isNaN(E))return{$jsan:"n"};if(l.infinity){if(Number.POSITIVE_INFINITY===E)return{$jsan:"i"};if(Number.NEGATIVE_INFINITY===E)return{$jsan:"y"}}if(l.undefined&&E===void 0)return{$jsan:"u"};if(l.error&&E instanceof Error)return{$jsan:"e"+E.message};if(l.symbol&&typeof E=="symbol"){var J=Symbol.keyFor(E);return J!==void 0?{$jsan:"g"+J}:{$jsan:"s"+E.toString().slice(7,-1)}}if(l.map&&typeof Map=="function"&&E instanceof Map&&typeof Array.from=="function")return{$jsan:"m"+JSON.stringify(u(Array.from(E),l,d,h))};if(l.set&&typeof Set=="function"&&E instanceof Set&&typeof Array.from=="function")return{$jsan:"l"+JSON.stringify(u(Array.from(E),l,d,h))};if(E&&typeof E.toJSON=="function")try{E=E.toJSON(ae)}catch{var re=ae||"$";return"toJSON failed for '"+(h.get(E)||re)+"'"}if(typeof E=="object"&&E!==null&&!(E instanceof Boolean)&&!(E instanceof Date)&&!(E instanceof Number)&&!(E instanceof RegExp)&&!(E instanceof String)&&typeof E!="symbol"&&!(E instanceof Error)){if(typeof E=="object"){var G=h.get(E);if(G){if(x&&$)return{$jsan:G};var _e=M.split(".").slice(0,-1).join(".");if(_e.indexOf(G)===0)return x?{$jsan:G}:typeof l.circular=="function"?l.circular(E,M,G):l.circular;if($)return{$jsan:G}}h.set(E,M)}if(Object.prototype.toString.apply(E)==="[object Array]")for(j=[],ue=0;ue<E.length;ue+=1)j[ue]=C(E[ue],M+"["+ue+"]",ue);else{j={};for(N in E)if(Object.prototype.hasOwnProperty.call(E,N)){var fe=/^\w+$/.test(N)?"."+N:"["+JSON.stringify(N)+"]";j[N]=N==="$jsan"?[C(E[N],M+fe)]:C(E[N],M+fe,N)}}return j}return E}(a,"$")},gn.retrocycle=function(a){return function l(d){var h,x,$;if(d&&typeof d=="object")if(Object.prototype.toString.apply(d)==="[object Array]")for(h=0;h<d.length;h+=1)x=d[h],x&&typeof x=="object"&&(x.$jsan?d[h]=r.restore(x.$jsan,a):l(x));else for($ in d){if(typeof d[$]=="string"&&$==="$jsan")return r.restore(d.$jsan,a);$==="$jsan"&&(d[$]=d[$][0]),typeof d[$]=="object"&&(x=d[$],x&&typeof x=="object"&&(x.$jsan?d[$]=r.restore(x.$jsan,a):l(x)))}return d}(a)},gn}var Ti;function Ri(){if(Ti)return vn;Ti=1;var r=Ps();return vn.stringify=function(u,a,l,d){if(arguments.length<4)try{return arguments.length===1?JSON.stringify(u):JSON.stringify.apply(JSON,arguments)}catch{}var h=d||!1;typeof h=="boolean"&&(h={date:h,function:h,regex:h,undefined:h,error:h,symbol:h,map:h,set:h,nan:h,infinity:h});var x=r.decycle(u,h,a);return arguments.length===1?JSON.stringify(x):JSON.stringify(x,Array.isArray(a)?a:null,l)},vn.parse=function(u,a){var l=/"\$jsan"/.test(u),d;return arguments.length===1?d=JSON.parse(u):d=JSON.parse(u,a),l&&(d=r.retrocycle(d)),d},vn}var cr,Ai;function Ds(){return Ai||(Ai=1,cr=Ri()),cr}var Cs=Ds();const $i=Ze(Cs),Pi=(r=null,o,u,a=!0)=>$i.stringify(r,o,u,a),Di=(r,o)=>$i.parse(r,o),bn={stringify:Pi,parse:Di},js=Object.freeze(Object.defineProperty({__proto__:null,default:bn,parse:Di,stringify:Pi},Symbol.toStringTag,{value:"Module"})),Ci=async(r,o=!0)=>{const u=o?bn.stringify(r):r,l=new TextEncoder().encode(u),d=await crypto.subtle.digest("SHA-256",l);return Array.from(new Uint8Array(d)).map(x=>x.toString(16).padStart(2,"0")).join("")},ji=()=>{const r=new Uint32Array(1);return crypto.getRandomValues(r),r[0]},Mi=()=>{const r=Date.now(),o=Math.floor(Math.random()*1e6),u=`${r}${o}`;return parseInt(u).toString(32)},Ms=Object.freeze(Object.defineProperty({__proto__:null,SHA256:Ci,default:{SHA256:Ci,random:ji,id:Mi},id:Mi,random:ji},Symbol.toStringTag,{value:"Module"}));function Ni(r,o){return function(){return r.apply(o,arguments)}}const{toString:Ns}=Object.prototype,{getPrototypeOf:lr}=Object,wn=(r=>o=>{const u=Ns.call(o);return r[u]||(r[u]=u.slice(8,-1).toLowerCase())})(Object.create(null)),et=r=>(r=r.toLowerCase(),o=>wn(o)===r),_n=r=>o=>typeof o===r,{isArray:Rt}=Array,Kt=_n("undefined");function Fs(r){return r!==null&&!Kt(r)&&r.constructor!==null&&!Kt(r.constructor)&&Ve(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const Fi=et("ArrayBuffer");function qs(r){let o;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?o=ArrayBuffer.isView(r):o=r&&r.buffer&&Fi(r.buffer),o}const Bs=_n("string"),Ve=_n("function"),qi=_n("number"),xn=r=>r!==null&&typeof r=="object",Ks=r=>r===!0||r===!1,Sn=r=>{if(wn(r)!=="object")return!1;const o=lr(r);return(o===null||o===Object.prototype||Object.getPrototypeOf(o)===null)&&!(Symbol.toStringTag in r)&&!(Symbol.iterator in r)},Is=et("Date"),Ls=et("File"),Us=et("Blob"),Ys=et("FileList"),Hs=r=>xn(r)&&Ve(r.pipe),zs=r=>{let o;return r&&(typeof FormData=="function"&&r instanceof FormData||Ve(r.append)&&((o=wn(r))==="formdata"||o==="object"&&Ve(r.toString)&&r.toString()==="[object FormData]"))},Vs=et("URLSearchParams"),[Ws,Js,Gs,Xs]=["ReadableStream","Request","Response","Headers"].map(et),Qs=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function It(r,o,{allOwnKeys:u=!1}={}){if(r===null||typeof r>"u")return;let a,l;if(typeof r!="object"&&(r=[r]),Rt(r))for(a=0,l=r.length;a<l;a++)o.call(null,r[a],a,r);else{const d=u?Object.getOwnPropertyNames(r):Object.keys(r),h=d.length;let x;for(a=0;a<h;a++)x=d[a],o.call(null,r[x],x,r)}}function Bi(r,o){o=o.toLowerCase();const u=Object.keys(r);let a=u.length,l;for(;a-- >0;)if(l=u[a],o===l.toLowerCase())return l;return null}const mt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ki=r=>!Kt(r)&&r!==mt;function fr(){const{caseless:r}=Ki(this)&&this||{},o={},u=(a,l)=>{const d=r&&Bi(o,l)||l;Sn(o[d])&&Sn(a)?o[d]=fr(o[d],a):Sn(a)?o[d]=fr({},a):Rt(a)?o[d]=a.slice():o[d]=a};for(let a=0,l=arguments.length;a<l;a++)arguments[a]&&It(arguments[a],u);return o}const Zs=(r,o,u,{allOwnKeys:a}={})=>(It(o,(l,d)=>{u&&Ve(l)?r[d]=Ni(l,u):r[d]=l},{allOwnKeys:a}),r),ea=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),ta=(r,o,u,a)=>{r.prototype=Object.create(o.prototype,a),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:o.prototype}),u&&Object.assign(r.prototype,u)},na=(r,o,u,a)=>{let l,d,h;const x={};if(o=o||{},r==null)return o;do{for(l=Object.getOwnPropertyNames(r),d=l.length;d-- >0;)h=l[d],(!a||a(h,r,o))&&!x[h]&&(o[h]=r[h],x[h]=!0);r=u!==!1&&lr(r)}while(r&&(!u||u(r,o))&&r!==Object.prototype);return o},ra=(r,o,u)=>{r=String(r),(u===void 0||u>r.length)&&(u=r.length),u-=o.length;const a=r.indexOf(o,u);return a!==-1&&a===u},ia=r=>{if(!r)return null;if(Rt(r))return r;let o=r.length;if(!qi(o))return null;const u=new Array(o);for(;o-- >0;)u[o]=r[o];return u},oa=(r=>o=>r&&o instanceof r)(typeof Uint8Array<"u"&&lr(Uint8Array)),sa=(r,o)=>{const a=(r&&r[Symbol.iterator]).call(r);let l;for(;(l=a.next())&&!l.done;){const d=l.value;o.call(r,d[0],d[1])}},aa=(r,o)=>{let u;const a=[];for(;(u=r.exec(o))!==null;)a.push(u);return a},ua=et("HTMLFormElement"),ca=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(u,a,l){return a.toUpperCase()+l}),Ii=(({hasOwnProperty:r})=>(o,u)=>r.call(o,u))(Object.prototype),la=et("RegExp"),Li=(r,o)=>{const u=Object.getOwnPropertyDescriptors(r),a={};It(u,(l,d)=>{let h;(h=o(l,d,r))!==!1&&(a[d]=h||l)}),Object.defineProperties(r,a)},fa=r=>{Li(r,(o,u)=>{if(Ve(r)&&["arguments","caller","callee"].indexOf(u)!==-1)return!1;const a=r[u];if(Ve(a)){if(o.enumerable=!1,"writable"in o){o.writable=!1;return}o.set||(o.set=()=>{throw Error("Can not rewrite read-only method '"+u+"'")})}})},da=(r,o)=>{const u={},a=l=>{l.forEach(d=>{u[d]=!0})};return Rt(r)?a(r):a(String(r).split(o)),u},ha=()=>{},pa=(r,o)=>r!=null&&Number.isFinite(r=+r)?r:o;function ma(r){return!!(r&&Ve(r.append)&&r[Symbol.toStringTag]==="FormData"&&r[Symbol.iterator])}const ya=r=>{const o=new Array(10),u=(a,l)=>{if(xn(a)){if(o.indexOf(a)>=0)return;if(!("toJSON"in a)){o[l]=a;const d=Rt(a)?[]:{};return It(a,(h,x)=>{const $=u(h,l+1);!Kt($)&&(d[x]=$)}),o[l]=void 0,d}}return a};return u(r,0)},va=et("AsyncFunction"),ga=r=>r&&(xn(r)||Ve(r))&&Ve(r.then)&&Ve(r.catch),Ui=((r,o)=>r?setImmediate:o?((u,a)=>(mt.addEventListener("message",({source:l,data:d})=>{l===mt&&d===u&&a.length&&a.shift()()},!1),l=>{a.push(l),mt.postMessage(u,"*")}))(`axios@${Math.random()}`,[]):u=>setTimeout(u))(typeof setImmediate=="function",Ve(mt.postMessage)),ba=typeof queueMicrotask<"u"?queueMicrotask.bind(mt):typeof process<"u"&&process.nextTick||Ui,A={isArray:Rt,isArrayBuffer:Fi,isBuffer:Fs,isFormData:zs,isArrayBufferView:qs,isString:Bs,isNumber:qi,isBoolean:Ks,isObject:xn,isPlainObject:Sn,isReadableStream:Ws,isRequest:Js,isResponse:Gs,isHeaders:Xs,isUndefined:Kt,isDate:Is,isFile:Ls,isBlob:Us,isRegExp:la,isFunction:Ve,isStream:Hs,isURLSearchParams:Vs,isTypedArray:oa,isFileList:Ys,forEach:It,merge:fr,extend:Zs,trim:Qs,stripBOM:ea,inherits:ta,toFlatObject:na,kindOf:wn,kindOfTest:et,endsWith:ra,toArray:ia,forEachEntry:sa,matchAll:aa,isHTMLForm:ua,hasOwnProperty:Ii,hasOwnProp:Ii,reduceDescriptors:Li,freezeMethods:fa,toObjectSet:da,toCamelCase:ca,noop:ha,toFiniteNumber:pa,findKey:Bi,global:mt,isContextDefined:Ki,isSpecCompliantForm:ma,toJSONObject:ya,isAsyncFn:va,isThenable:ga,setImmediate:Ui,asap:ba};function pe(r,o,u,a,l){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",o&&(this.code=o),u&&(this.config=u),a&&(this.request=a),l&&(this.response=l,this.status=l.status?l.status:null)}A.inherits(pe,Error,{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:A.toJSONObject(this.config),code:this.code,status:this.status}}});const Yi=pe.prototype,Hi={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{Hi[r]={value:r}}),Object.defineProperties(pe,Hi),Object.defineProperty(Yi,"isAxiosError",{value:!0}),pe.from=(r,o,u,a,l,d)=>{const h=Object.create(Yi);return A.toFlatObject(r,h,function($){return $!==Error.prototype},x=>x!=="isAxiosError"),pe.call(h,r.message,o,u,a,l),h.cause=r,h.name=r.name,d&&Object.assign(h,d),h};const wa=null;function dr(r){return A.isPlainObject(r)||A.isArray(r)}function zi(r){return A.endsWith(r,"[]")?r.slice(0,-2):r}function Vi(r,o,u){return r?r.concat(o).map(function(l,d){return l=zi(l),!u&&d?"["+l+"]":l}).join(u?".":""):o}function _a(r){return A.isArray(r)&&!r.some(dr)}const xa=A.toFlatObject(A,{},null,function(o){return/^is[A-Z]/.test(o)});function On(r,o,u){if(!A.isObject(r))throw new TypeError("target must be an object");o=o||new FormData,u=A.toFlatObject(u,{metaTokens:!0,dots:!1,indexes:!1},!1,function(j,E){return!A.isUndefined(E[j])});const a=u.metaTokens,l=u.visitor||D,d=u.dots,h=u.indexes,$=(u.Blob||typeof Blob<"u"&&Blob)&&A.isSpecCompliantForm(o);if(!A.isFunction(l))throw new TypeError("visitor must be a function");function C(N){if(N===null)return"";if(A.isDate(N))return N.toISOString();if(!$&&A.isBlob(N))throw new pe("Blob is not supported. Use a Buffer instead.");return A.isArrayBuffer(N)||A.isTypedArray(N)?$&&typeof Blob=="function"?new Blob([N]):Buffer.from(N):N}function D(N,j,E){let J=N;if(N&&!E&&typeof N=="object"){if(A.endsWith(j,"{}"))j=a?j:j.slice(0,-2),N=JSON.stringify(N);else if(A.isArray(N)&&_a(N)||(A.isFileList(N)||A.endsWith(j,"[]"))&&(J=A.toArray(N)))return j=zi(j),J.forEach(function(G,_e){!(A.isUndefined(G)||G===null)&&o.append(h===!0?Vi([j],_e,d):h===null?j:j+"[]",C(G))}),!1}return dr(N)?!0:(o.append(Vi(E,j,d),C(N)),!1)}const M=[],ae=Object.assign(xa,{defaultVisitor:D,convertValue:C,isVisitable:dr});function ue(N,j){if(!A.isUndefined(N)){if(M.indexOf(N)!==-1)throw Error("Circular reference detected in "+j.join("."));M.push(N),A.forEach(N,function(J,re){(!(A.isUndefined(J)||J===null)&&l.call(o,J,A.isString(re)?re.trim():re,j,ae))===!0&&ue(J,j?j.concat(re):[re])}),M.pop()}}if(!A.isObject(r))throw new TypeError("data must be an object");return ue(r),o}function Wi(r){const o={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(a){return o[a]})}function hr(r,o){this._pairs=[],r&&On(r,this,o)}const Ji=hr.prototype;Ji.append=function(o,u){this._pairs.push([o,u])},Ji.toString=function(o){const u=o?function(a){return o.call(this,a,Wi)}:Wi;return this._pairs.map(function(l){return u(l[0])+"="+u(l[1])},"").join("&")};function Sa(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Gi(r,o,u){if(!o)return r;const a=u&&u.encode||Sa;A.isFunction(u)&&(u={serialize:u});const l=u&&u.serialize;let d;if(l?d=l(o,u):d=A.isURLSearchParams(o)?o.toString():new hr(o,u).toString(a),d){const h=r.indexOf("#");h!==-1&&(r=r.slice(0,h)),r+=(r.indexOf("?")===-1?"?":"&")+d}return r}class Xi{constructor(){this.handlers=[]}use(o,u,a){return this.handlers.push({fulfilled:o,rejected:u,synchronous:a?a.synchronous:!1,runWhen:a?a.runWhen:null}),this.handlers.length-1}eject(o){this.handlers[o]&&(this.handlers[o]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(o){A.forEach(this.handlers,function(a){a!==null&&o(a)})}}const Qi={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Oa={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:hr,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},pr=typeof window<"u"&&typeof document<"u",mr=typeof navigator=="object"&&navigator||void 0,Ea=pr&&(!mr||["ReactNative","NativeScript","NS"].indexOf(mr.product)<0),ka=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ta=pr&&window.location.href||"http://localhost",qe={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:pr,hasStandardBrowserEnv:Ea,hasStandardBrowserWebWorkerEnv:ka,navigator:mr,origin:Ta},Symbol.toStringTag,{value:"Module"})),...Oa};function Ra(r,o){return On(r,new qe.classes.URLSearchParams,Object.assign({visitor:function(u,a,l,d){return qe.isNode&&A.isBuffer(u)?(this.append(a,u.toString("base64")),!1):d.defaultVisitor.apply(this,arguments)}},o))}function Aa(r){return A.matchAll(/\w+|\[(\w*)]/g,r).map(o=>o[0]==="[]"?"":o[1]||o[0])}function $a(r){const o={},u=Object.keys(r);let a;const l=u.length;let d;for(a=0;a<l;a++)d=u[a],o[d]=r[d];return o}function Zi(r){function o(u,a,l,d){let h=u[d++];if(h==="__proto__")return!0;const x=Number.isFinite(+h),$=d>=u.length;return h=!h&&A.isArray(l)?l.length:h,$?(A.hasOwnProp(l,h)?l[h]=[l[h],a]:l[h]=a,!x):((!l[h]||!A.isObject(l[h]))&&(l[h]=[]),o(u,a,l[h],d)&&A.isArray(l[h])&&(l[h]=$a(l[h])),!x)}if(A.isFormData(r)&&A.isFunction(r.entries)){const u={};return A.forEachEntry(r,(a,l)=>{o(Aa(a),l,u,0)}),u}return null}function Pa(r,o,u){if(A.isString(r))try{return(o||JSON.parse)(r),A.trim(r)}catch(a){if(a.name!=="SyntaxError")throw a}return(u||JSON.stringify)(r)}const Lt={transitional:Qi,adapter:["xhr","http","fetch"],transformRequest:[function(o,u){const a=u.getContentType()||"",l=a.indexOf("application/json")>-1,d=A.isObject(o);if(d&&A.isHTMLForm(o)&&(o=new FormData(o)),A.isFormData(o))return l?JSON.stringify(Zi(o)):o;if(A.isArrayBuffer(o)||A.isBuffer(o)||A.isStream(o)||A.isFile(o)||A.isBlob(o)||A.isReadableStream(o))return o;if(A.isArrayBufferView(o))return o.buffer;if(A.isURLSearchParams(o))return u.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),o.toString();let x;if(d){if(a.indexOf("application/x-www-form-urlencoded")>-1)return Ra(o,this.formSerializer).toString();if((x=A.isFileList(o))||a.indexOf("multipart/form-data")>-1){const $=this.env&&this.env.FormData;return On(x?{"files[]":o}:o,$&&new $,this.formSerializer)}}return d||l?(u.setContentType("application/json",!1),Pa(o)):o}],transformResponse:[function(o){const u=this.transitional||Lt.transitional,a=u&&u.forcedJSONParsing,l=this.responseType==="json";if(A.isResponse(o)||A.isReadableStream(o))return o;if(o&&A.isString(o)&&(a&&!this.responseType||l)){const h=!(u&&u.silentJSONParsing)&&l;try{return JSON.parse(o)}catch(x){if(h)throw x.name==="SyntaxError"?pe.from(x,pe.ERR_BAD_RESPONSE,this,null,this.response):x}}return o}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:qe.classes.FormData,Blob:qe.classes.Blob},validateStatus:function(o){return o>=200&&o<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};A.forEach(["delete","get","head","post","put","patch"],r=>{Lt.headers[r]={}});const Da=A.toObjectSet(["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"]),Ca=r=>{const o={};let u,a,l;return r&&r.split(`
4
+ `).forEach(function(h){l=h.indexOf(":"),u=h.substring(0,l).trim().toLowerCase(),a=h.substring(l+1).trim(),!(!u||o[u]&&Da[u])&&(u==="set-cookie"?o[u]?o[u].push(a):o[u]=[a]:o[u]=o[u]?o[u]+", "+a:a)}),o},eo=Symbol("internals");function Ut(r){return r&&String(r).trim().toLowerCase()}function En(r){return r===!1||r==null?r:A.isArray(r)?r.map(En):String(r)}function ja(r){const o=Object.create(null),u=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let a;for(;a=u.exec(r);)o[a[1]]=a[2];return o}const Ma=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function yr(r,o,u,a,l){if(A.isFunction(a))return a.call(this,o,u);if(l&&(o=u),!!A.isString(o)){if(A.isString(a))return o.indexOf(a)!==-1;if(A.isRegExp(a))return a.test(o)}}function Na(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(o,u,a)=>u.toUpperCase()+a)}function Fa(r,o){const u=A.toCamelCase(" "+o);["get","set","has"].forEach(a=>{Object.defineProperty(r,a+u,{value:function(l,d,h){return this[a].call(this,o,l,d,h)},configurable:!0})})}let Ye=class{constructor(o){o&&this.set(o)}set(o,u,a){const l=this;function d(x,$,C){const D=Ut($);if(!D)throw new Error("header name must be a non-empty string");const M=A.findKey(l,D);(!M||l[M]===void 0||C===!0||C===void 0&&l[M]!==!1)&&(l[M||$]=En(x))}const h=(x,$)=>A.forEach(x,(C,D)=>d(C,D,$));if(A.isPlainObject(o)||o instanceof this.constructor)h(o,u);else if(A.isString(o)&&(o=o.trim())&&!Ma(o))h(Ca(o),u);else if(A.isHeaders(o))for(const[x,$]of o.entries())d($,x,a);else o!=null&&d(u,o,a);return this}get(o,u){if(o=Ut(o),o){const a=A.findKey(this,o);if(a){const l=this[a];if(!u)return l;if(u===!0)return ja(l);if(A.isFunction(u))return u.call(this,l,a);if(A.isRegExp(u))return u.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(o,u){if(o=Ut(o),o){const a=A.findKey(this,o);return!!(a&&this[a]!==void 0&&(!u||yr(this,this[a],a,u)))}return!1}delete(o,u){const a=this;let l=!1;function d(h){if(h=Ut(h),h){const x=A.findKey(a,h);x&&(!u||yr(a,a[x],x,u))&&(delete a[x],l=!0)}}return A.isArray(o)?o.forEach(d):d(o),l}clear(o){const u=Object.keys(this);let a=u.length,l=!1;for(;a--;){const d=u[a];(!o||yr(this,this[d],d,o,!0))&&(delete this[d],l=!0)}return l}normalize(o){const u=this,a={};return A.forEach(this,(l,d)=>{const h=A.findKey(a,d);if(h){u[h]=En(l),delete u[d];return}const x=o?Na(d):String(d).trim();x!==d&&delete u[d],u[x]=En(l),a[x]=!0}),this}concat(...o){return this.constructor.concat(this,...o)}toJSON(o){const u=Object.create(null);return A.forEach(this,(a,l)=>{a!=null&&a!==!1&&(u[l]=o&&A.isArray(a)?a.join(", "):a)}),u}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([o,u])=>o+": "+u).join(`
5
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(o){return o instanceof this?o:new this(o)}static concat(o,...u){const a=new this(o);return u.forEach(l=>a.set(l)),a}static accessor(o){const a=(this[eo]=this[eo]={accessors:{}}).accessors,l=this.prototype;function d(h){const x=Ut(h);a[x]||(Fa(l,h),a[x]=!0)}return A.isArray(o)?o.forEach(d):d(o),this}};Ye.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),A.reduceDescriptors(Ye.prototype,({value:r},o)=>{let u=o[0].toUpperCase()+o.slice(1);return{get:()=>r,set(a){this[u]=a}}}),A.freezeMethods(Ye);function vr(r,o){const u=this||Lt,a=o||u,l=Ye.from(a.headers);let d=a.data;return A.forEach(r,function(x){d=x.call(u,d,l.normalize(),o?o.status:void 0)}),l.normalize(),d}function to(r){return!!(r&&r.__CANCEL__)}function At(r,o,u){pe.call(this,r??"canceled",pe.ERR_CANCELED,o,u),this.name="CanceledError"}A.inherits(At,pe,{__CANCEL__:!0});function no(r,o,u){const a=u.config.validateStatus;!u.status||!a||a(u.status)?r(u):o(new pe("Request failed with status code "+u.status,[pe.ERR_BAD_REQUEST,pe.ERR_BAD_RESPONSE][Math.floor(u.status/100)-4],u.config,u.request,u))}function qa(r){const o=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return o&&o[1]||""}function Ba(r,o){r=r||10;const u=new Array(r),a=new Array(r);let l=0,d=0,h;return o=o!==void 0?o:1e3,function($){const C=Date.now(),D=a[d];h||(h=C),u[l]=$,a[l]=C;let M=d,ae=0;for(;M!==l;)ae+=u[M++],M=M%r;if(l=(l+1)%r,l===d&&(d=(d+1)%r),C-h<o)return;const ue=D&&C-D;return ue?Math.round(ae*1e3/ue):void 0}}function Ka(r,o){let u=0,a=1e3/o,l,d;const h=(C,D=Date.now())=>{u=D,l=null,d&&(clearTimeout(d),d=null),r.apply(null,C)};return[(...C)=>{const D=Date.now(),M=D-u;M>=a?h(C,D):(l=C,d||(d=setTimeout(()=>{d=null,h(l)},a-M)))},()=>l&&h(l)]}const kn=(r,o,u=3)=>{let a=0;const l=Ba(50,250);return Ka(d=>{const h=d.loaded,x=d.lengthComputable?d.total:void 0,$=h-a,C=l($),D=h<=x;a=h;const M={loaded:h,total:x,progress:x?h/x:void 0,bytes:$,rate:C||void 0,estimated:C&&x&&D?(x-h)/C:void 0,event:d,lengthComputable:x!=null,[o?"download":"upload"]:!0};r(M)},u)},ro=(r,o)=>{const u=r!=null;return[a=>o[0]({lengthComputable:u,total:r,loaded:a}),o[1]]},io=r=>(...o)=>A.asap(()=>r(...o)),Ia=qe.hasStandardBrowserEnv?((r,o)=>u=>(u=new URL(u,qe.origin),r.protocol===u.protocol&&r.host===u.host&&(o||r.port===u.port)))(new URL(qe.origin),qe.navigator&&/(msie|trident)/i.test(qe.navigator.userAgent)):()=>!0,La=qe.hasStandardBrowserEnv?{write(r,o,u,a,l,d){const h=[r+"="+encodeURIComponent(o)];A.isNumber(u)&&h.push("expires="+new Date(u).toGMTString()),A.isString(a)&&h.push("path="+a),A.isString(l)&&h.push("domain="+l),d===!0&&h.push("secure"),document.cookie=h.join("; ")},read(r){const o=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return o?decodeURIComponent(o[3]):null},remove(r){this.write(r,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ua(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function Ya(r,o){return o?r.replace(/\/?\/$/,"")+"/"+o.replace(/^\/+/,""):r}function oo(r,o,u){let a=!Ua(o);return r&&(a||u==!1)?Ya(r,o):o}const so=r=>r instanceof Ye?{...r}:r;function yt(r,o){o=o||{};const u={};function a(C,D,M,ae){return A.isPlainObject(C)&&A.isPlainObject(D)?A.merge.call({caseless:ae},C,D):A.isPlainObject(D)?A.merge({},D):A.isArray(D)?D.slice():D}function l(C,D,M,ae){if(A.isUndefined(D)){if(!A.isUndefined(C))return a(void 0,C,M,ae)}else return a(C,D,M,ae)}function d(C,D){if(!A.isUndefined(D))return a(void 0,D)}function h(C,D){if(A.isUndefined(D)){if(!A.isUndefined(C))return a(void 0,C)}else return a(void 0,D)}function x(C,D,M){if(M in o)return a(C,D);if(M in r)return a(void 0,C)}const $={url:d,method:d,data:d,baseURL:h,transformRequest:h,transformResponse:h,paramsSerializer:h,timeout:h,timeoutMessage:h,withCredentials:h,withXSRFToken:h,adapter:h,responseType:h,xsrfCookieName:h,xsrfHeaderName:h,onUploadProgress:h,onDownloadProgress:h,decompress:h,maxContentLength:h,maxBodyLength:h,beforeRedirect:h,transport:h,httpAgent:h,httpsAgent:h,cancelToken:h,socketPath:h,responseEncoding:h,validateStatus:x,headers:(C,D,M)=>l(so(C),so(D),M,!0)};return A.forEach(Object.keys(Object.assign({},r,o)),function(D){const M=$[D]||l,ae=M(r[D],o[D],D);A.isUndefined(ae)&&M!==x||(u[D]=ae)}),u}const ao=r=>{const o=yt({},r);let{data:u,withXSRFToken:a,xsrfHeaderName:l,xsrfCookieName:d,headers:h,auth:x}=o;o.headers=h=Ye.from(h),o.url=Gi(oo(o.baseURL,o.url,o.allowAbsoluteUrls),r.params,r.paramsSerializer),x&&h.set("Authorization","Basic "+btoa((x.username||"")+":"+(x.password?unescape(encodeURIComponent(x.password)):"")));let $;if(A.isFormData(u)){if(qe.hasStandardBrowserEnv||qe.hasStandardBrowserWebWorkerEnv)h.setContentType(void 0);else if(($=h.getContentType())!==!1){const[C,...D]=$?$.split(";").map(M=>M.trim()).filter(Boolean):[];h.setContentType([C||"multipart/form-data",...D].join("; "))}}if(qe.hasStandardBrowserEnv&&(a&&A.isFunction(a)&&(a=a(o)),a||a!==!1&&Ia(o.url))){const C=l&&d&&La.read(d);C&&h.set(l,C)}return o},Ha=typeof XMLHttpRequest<"u"&&function(r){return new Promise(function(u,a){const l=ao(r);let d=l.data;const h=Ye.from(l.headers).normalize();let{responseType:x,onUploadProgress:$,onDownloadProgress:C}=l,D,M,ae,ue,N;function j(){ue&&ue(),N&&N(),l.cancelToken&&l.cancelToken.unsubscribe(D),l.signal&&l.signal.removeEventListener("abort",D)}let E=new XMLHttpRequest;E.open(l.method.toUpperCase(),l.url,!0),E.timeout=l.timeout;function J(){if(!E)return;const G=Ye.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),fe={data:!x||x==="text"||x==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:G,config:r,request:E};no(function(U){u(U),j()},function(U){a(U),j()},fe),E=null}"onloadend"in E?E.onloadend=J:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(J)},E.onabort=function(){E&&(a(new pe("Request aborted",pe.ECONNABORTED,r,E)),E=null)},E.onerror=function(){a(new pe("Network Error",pe.ERR_NETWORK,r,E)),E=null},E.ontimeout=function(){let _e=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const fe=l.transitional||Qi;l.timeoutErrorMessage&&(_e=l.timeoutErrorMessage),a(new pe(_e,fe.clarifyTimeoutError?pe.ETIMEDOUT:pe.ECONNABORTED,r,E)),E=null},d===void 0&&h.setContentType(null),"setRequestHeader"in E&&A.forEach(h.toJSON(),function(_e,fe){E.setRequestHeader(fe,_e)}),A.isUndefined(l.withCredentials)||(E.withCredentials=!!l.withCredentials),x&&x!=="json"&&(E.responseType=l.responseType),C&&([ae,N]=kn(C,!0),E.addEventListener("progress",ae)),$&&E.upload&&([M,ue]=kn($),E.upload.addEventListener("progress",M),E.upload.addEventListener("loadend",ue)),(l.cancelToken||l.signal)&&(D=G=>{E&&(a(!G||G.type?new At(null,r,E):G),E.abort(),E=null)},l.cancelToken&&l.cancelToken.subscribe(D),l.signal&&(l.signal.aborted?D():l.signal.addEventListener("abort",D)));const re=qa(l.url);if(re&&qe.protocols.indexOf(re)===-1){a(new pe("Unsupported protocol "+re+":",pe.ERR_BAD_REQUEST,r));return}E.send(d||null)})},za=(r,o)=>{const{length:u}=r=r?r.filter(Boolean):[];if(o||u){let a=new AbortController,l;const d=function(C){if(!l){l=!0,x();const D=C instanceof Error?C:this.reason;a.abort(D instanceof pe?D:new At(D instanceof Error?D.message:D))}};let h=o&&setTimeout(()=>{h=null,d(new pe(`timeout ${o} of ms exceeded`,pe.ETIMEDOUT))},o);const x=()=>{r&&(h&&clearTimeout(h),h=null,r.forEach(C=>{C.unsubscribe?C.unsubscribe(d):C.removeEventListener("abort",d)}),r=null)};r.forEach(C=>C.addEventListener("abort",d));const{signal:$}=a;return $.unsubscribe=()=>A.asap(x),$}},Va=function*(r,o){let u=r.byteLength;if(u<o){yield r;return}let a=0,l;for(;a<u;)l=a+o,yield r.slice(a,l),a=l},Wa=async function*(r,o){for await(const u of Ja(r))yield*Va(u,o)},Ja=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const o=r.getReader();try{for(;;){const{done:u,value:a}=await o.read();if(u)break;yield a}}finally{await o.cancel()}},uo=(r,o,u,a)=>{const l=Wa(r,o);let d=0,h,x=$=>{h||(h=!0,a&&a($))};return new ReadableStream({async pull($){try{const{done:C,value:D}=await l.next();if(C){x(),$.close();return}let M=D.byteLength;if(u){let ae=d+=M;u(ae)}$.enqueue(new Uint8Array(D))}catch(C){throw x(C),C}},cancel($){return x($),l.return()}},{highWaterMark:2})},Tn=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",co=Tn&&typeof ReadableStream=="function",Ga=Tn&&(typeof TextEncoder=="function"?(r=>o=>r.encode(o))(new TextEncoder):async r=>new Uint8Array(await new Response(r).arrayBuffer())),lo=(r,...o)=>{try{return!!r(...o)}catch{return!1}},Xa=co&&lo(()=>{let r=!1;const o=new Request(qe.origin,{body:new ReadableStream,method:"POST",get duplex(){return r=!0,"half"}}).headers.has("Content-Type");return r&&!o}),fo=64*1024,gr=co&&lo(()=>A.isReadableStream(new Response("").body)),Rn={stream:gr&&(r=>r.body)};Tn&&(r=>{["text","arrayBuffer","blob","formData","stream"].forEach(o=>{!Rn[o]&&(Rn[o]=A.isFunction(r[o])?u=>u[o]():(u,a)=>{throw new pe(`Response type '${o}' is not supported`,pe.ERR_NOT_SUPPORT,a)})})})(new Response);const Qa=async r=>{if(r==null)return 0;if(A.isBlob(r))return r.size;if(A.isSpecCompliantForm(r))return(await new Request(qe.origin,{method:"POST",body:r}).arrayBuffer()).byteLength;if(A.isArrayBufferView(r)||A.isArrayBuffer(r))return r.byteLength;if(A.isURLSearchParams(r)&&(r=r+""),A.isString(r))return(await Ga(r)).byteLength},Za=async(r,o)=>{const u=A.toFiniteNumber(r.getContentLength());return u??Qa(o)},br={http:wa,xhr:Ha,fetch:Tn&&(async r=>{let{url:o,method:u,data:a,signal:l,cancelToken:d,timeout:h,onDownloadProgress:x,onUploadProgress:$,responseType:C,headers:D,withCredentials:M="same-origin",fetchOptions:ae}=ao(r);C=C?(C+"").toLowerCase():"text";let ue=za([l,d&&d.toAbortSignal()],h),N;const j=ue&&ue.unsubscribe&&(()=>{ue.unsubscribe()});let E;try{if($&&Xa&&u!=="get"&&u!=="head"&&(E=await Za(D,a))!==0){let fe=new Request(o,{method:"POST",body:a,duplex:"half"}),te;if(A.isFormData(a)&&(te=fe.headers.get("content-type"))&&D.setContentType(te),fe.body){const[U,K]=ro(E,kn(io($)));a=uo(fe.body,fo,U,K)}}A.isString(M)||(M=M?"include":"omit");const J="credentials"in Request.prototype;N=new Request(o,{...ae,signal:ue,method:u.toUpperCase(),headers:D.normalize().toJSON(),body:a,duplex:"half",credentials:J?M:void 0});let re=await fetch(N);const G=gr&&(C==="stream"||C==="response");if(gr&&(x||G&&j)){const fe={};["status","statusText","headers"].forEach(ce=>{fe[ce]=re[ce]});const te=A.toFiniteNumber(re.headers.get("content-length")),[U,K]=x&&ro(te,kn(io(x),!0))||[];re=new Response(uo(re.body,fo,U,()=>{K&&K(),j&&j()}),fe)}C=C||"text";let _e=await Rn[A.findKey(Rn,C)||"text"](re,r);return!G&&j&&j(),await new Promise((fe,te)=>{no(fe,te,{data:_e,headers:Ye.from(re.headers),status:re.status,statusText:re.statusText,config:r,request:N})})}catch(J){throw j&&j(),J&&J.name==="TypeError"&&/fetch/i.test(J.message)?Object.assign(new pe("Network Error",pe.ERR_NETWORK,r,N),{cause:J.cause||J}):pe.from(J,J&&J.code,r,N)}})};A.forEach(br,(r,o)=>{if(r){try{Object.defineProperty(r,"name",{value:o})}catch{}Object.defineProperty(r,"adapterName",{value:o})}});const ho=r=>`- ${r}`,eu=r=>A.isFunction(r)||r===null||r===!1,po={getAdapter:r=>{r=A.isArray(r)?r:[r];const{length:o}=r;let u,a;const l={};for(let d=0;d<o;d++){u=r[d];let h;if(a=u,!eu(u)&&(a=br[(h=String(u)).toLowerCase()],a===void 0))throw new pe(`Unknown adapter '${h}'`);if(a)break;l[h||"#"+d]=a}if(!a){const d=Object.entries(l).map(([x,$])=>`adapter ${x} `+($===!1?"is not supported by the environment":"is not available in the build"));let h=o?d.length>1?`since :
6
+ `+d.map(ho).join(`
7
+ `):" "+ho(d[0]):"as no adapter specified";throw new pe("There is no suitable adapter to dispatch the request "+h,"ERR_NOT_SUPPORT")}return a},adapters:br};function wr(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new At(null,r)}function mo(r){return wr(r),r.headers=Ye.from(r.headers),r.data=vr.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),po.getAdapter(r.adapter||Lt.adapter)(r).then(function(a){return wr(r),a.data=vr.call(r,r.transformResponse,a),a.headers=Ye.from(a.headers),a},function(a){return to(a)||(wr(r),a&&a.response&&(a.response.data=vr.call(r,r.transformResponse,a.response),a.response.headers=Ye.from(a.response.headers))),Promise.reject(a)})}const yo="1.8.4",An={};["object","boolean","number","function","string","symbol"].forEach((r,o)=>{An[r]=function(a){return typeof a===r||"a"+(o<1?"n ":" ")+r}});const vo={};An.transitional=function(o,u,a){function l(d,h){return"[Axios v"+yo+"] Transitional option '"+d+"'"+h+(a?". "+a:"")}return(d,h,x)=>{if(o===!1)throw new pe(l(h," has been removed"+(u?" in "+u:"")),pe.ERR_DEPRECATED);return u&&!vo[h]&&(vo[h]=!0,console.warn(l(h," has been deprecated since v"+u+" and will be removed in the near future"))),o?o(d,h,x):!0}},An.spelling=function(o){return(u,a)=>(console.warn(`${a} is likely a misspelling of ${o}`),!0)};function tu(r,o,u){if(typeof r!="object")throw new pe("options must be an object",pe.ERR_BAD_OPTION_VALUE);const a=Object.keys(r);let l=a.length;for(;l-- >0;){const d=a[l],h=o[d];if(h){const x=r[d],$=x===void 0||h(x,d,r);if($!==!0)throw new pe("option "+d+" must be "+$,pe.ERR_BAD_OPTION_VALUE);continue}if(u!==!0)throw new pe("Unknown option "+d,pe.ERR_BAD_OPTION)}}const $n={assertOptions:tu,validators:An},tt=$n.validators;let vt=class{constructor(o){this.defaults=o,this.interceptors={request:new Xi,response:new Xi}}async request(o,u){try{return await this._request(o,u)}catch(a){if(a instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const d=l.stack?l.stack.replace(/^.+\n/,""):"";try{a.stack?d&&!String(a.stack).endsWith(d.replace(/^.+\n.+\n/,""))&&(a.stack+=`
8
+ `+d):a.stack=d}catch{}}throw a}}_request(o,u){typeof o=="string"?(u=u||{},u.url=o):u=o||{},u=yt(this.defaults,u);const{transitional:a,paramsSerializer:l,headers:d}=u;a!==void 0&&$n.assertOptions(a,{silentJSONParsing:tt.transitional(tt.boolean),forcedJSONParsing:tt.transitional(tt.boolean),clarifyTimeoutError:tt.transitional(tt.boolean)},!1),l!=null&&(A.isFunction(l)?u.paramsSerializer={serialize:l}:$n.assertOptions(l,{encode:tt.function,serialize:tt.function},!0)),u.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?u.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:u.allowAbsoluteUrls=!0),$n.assertOptions(u,{baseUrl:tt.spelling("baseURL"),withXsrfToken:tt.spelling("withXSRFToken")},!0),u.method=(u.method||this.defaults.method||"get").toLowerCase();let h=d&&A.merge(d.common,d[u.method]);d&&A.forEach(["delete","get","head","post","put","patch","common"],N=>{delete d[N]}),u.headers=Ye.concat(h,d);const x=[];let $=!0;this.interceptors.request.forEach(function(j){typeof j.runWhen=="function"&&j.runWhen(u)===!1||($=$&&j.synchronous,x.unshift(j.fulfilled,j.rejected))});const C=[];this.interceptors.response.forEach(function(j){C.push(j.fulfilled,j.rejected)});let D,M=0,ae;if(!$){const N=[mo.bind(this),void 0];for(N.unshift.apply(N,x),N.push.apply(N,C),ae=N.length,D=Promise.resolve(u);M<ae;)D=D.then(N[M++],N[M++]);return D}ae=x.length;let ue=u;for(M=0;M<ae;){const N=x[M++],j=x[M++];try{ue=N(ue)}catch(E){j.call(this,E);break}}try{D=mo.call(this,ue)}catch(N){return Promise.reject(N)}for(M=0,ae=C.length;M<ae;)D=D.then(C[M++],C[M++]);return D}getUri(o){o=yt(this.defaults,o);const u=oo(o.baseURL,o.url,o.allowAbsoluteUrls);return Gi(u,o.params,o.paramsSerializer)}};A.forEach(["delete","get","head","options"],function(o){vt.prototype[o]=function(u,a){return this.request(yt(a||{},{method:o,url:u,data:(a||{}).data}))}}),A.forEach(["post","put","patch"],function(o){function u(a){return function(d,h,x){return this.request(yt(x||{},{method:o,headers:a?{"Content-Type":"multipart/form-data"}:{},url:d,data:h}))}}vt.prototype[o]=u(),vt.prototype[o+"Form"]=u(!0)});let nu=class as{constructor(o){if(typeof o!="function")throw new TypeError("executor must be a function.");let u;this.promise=new Promise(function(d){u=d});const a=this;this.promise.then(l=>{if(!a._listeners)return;let d=a._listeners.length;for(;d-- >0;)a._listeners[d](l);a._listeners=null}),this.promise.then=l=>{let d;const h=new Promise(x=>{a.subscribe(x),d=x}).then(l);return h.cancel=function(){a.unsubscribe(d)},h},o(function(d,h,x){a.reason||(a.reason=new At(d,h,x),u(a.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(o){if(this.reason){o(this.reason);return}this._listeners?this._listeners.push(o):this._listeners=[o]}unsubscribe(o){if(!this._listeners)return;const u=this._listeners.indexOf(o);u!==-1&&this._listeners.splice(u,1)}toAbortSignal(){const o=new AbortController,u=a=>{o.abort(a)};return this.subscribe(u),o.signal.unsubscribe=()=>this.unsubscribe(u),o.signal}static source(){let o;return{token:new as(function(l){o=l}),cancel:o}}};function ru(r){return function(u){return r.apply(null,u)}}function iu(r){return A.isObject(r)&&r.isAxiosError===!0}const _r={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(_r).forEach(([r,o])=>{_r[o]=r});function go(r){const o=new vt(r),u=Ni(vt.prototype.request,o);return A.extend(u,vt.prototype,o,{allOwnKeys:!0}),A.extend(u,o,null,{allOwnKeys:!0}),u.create=function(l){return go(yt(r,l))},u}const Re=go(Lt);Re.Axios=vt,Re.CanceledError=At,Re.CancelToken=nu,Re.isCancel=to,Re.VERSION=yo,Re.toFormData=On,Re.AxiosError=pe,Re.Cancel=Re.CanceledError,Re.all=function(o){return Promise.all(o)},Re.spread=ru,Re.isAxiosError=iu,Re.mergeConfig=yt,Re.AxiosHeaders=Ye,Re.formToJSON=r=>Zi(A.isHTMLForm(r)?new FormData(r):r),Re.getAdapter=po.getAdapter,Re.HttpStatusCode=_r,Re.default=Re;const{Axios:oc,AxiosError:sc,CanceledError:ac,isCancel:uc,CancelToken:cc,VERSION:lc,all:fc,Cancel:dc,isAxiosError:hc,spread:pc,toFormData:mc,AxiosHeaders:yc,HttpStatusCode:vc,formToJSON:gc,getAdapter:bc,mergeConfig:wc}=Re;class bo{constructor(o){oi(this,"storage");this.storage=o}getRaw(o,u=null){var a;return((a=this.storage)==null?void 0:a.getItem(o))??u}setRaw(o,u){var a;(a=this.storage)==null||a.setItem(o,u)}get(o,u=null){const a=this.getRaw(o);return a?bn.parse(a):u}set(o,u){this.setRaw(o,bn.stringify(u))}del(o){var u;(u=this.storage)==null||u.removeItem(o)}clear(){var o;(o=this.storage)==null||o.clear()}}const xr=new bo(typeof localStorage>"u"?void 0:localStorage),wo=new bo(typeof sessionStorage>"u"?void 0:sessionStorage),ou=Object.freeze(Object.defineProperty({__proto__:null,default:{local:xr,session:wo},local:xr,session:wo},Symbol.toStringTag,{value:"Module"})),_o="access_token",xo=(r,o="请求异常.")=>r.message??r.msg??o,Yt=Re.create({baseURL:"",timeout:3e3}),su=()=>Yt.interceptors.request.use(r=>{const o=xr.get(_o);return o&&(r.headers.Authorization=`Bearer ${o}`),r}),au=r=>Yt.interceptors.response.use(o=>{const u=o.data;if(o.status===200)return u.data;const a=new Error(xo(u));return r?r(a):Promise.reject(a)},o=>r?r(o):Promise.reject(o));let Pn=!1,Dn=[];const uu=(r,o,u)=>{const{response:a}=r;return a.config.url==o?(Pn=!1,Dn=[],Promise.reject(r)):(Pn||(Pn=!0,u().then(()=>Dn.forEach(l=>l())).finally(()=>{Pn=!1,Dn=[]})),new Promise(l=>{Dn.push(()=>l(Yt(a.config)))}))},So=(r,o)=>Ht({url:r,method:"GET",params:o}),Oo=(r,o)=>Ht({url:r,method:"POST",data:o}),Eo=r=>(r.responseType??(r.responseType="blob"),Ht(r)),Ht=r=>(r.headers={...r.headers,"Content-Type":"application/json"},Yt.request(r)),cu=Object.freeze(Object.defineProperty({__proto__:null,ACCESS_TOKEN:_o,axios:Yt,default:{get:So,post:Oo,download:Eo,request:Ht},download:Eo,get:So,message:xo,post:Oo,request:Ht,responseInterceptor:au,retry:uu,tokenRequestInterceptor:su},Symbol.toStringTag,{value:"Module"})),Sr=()=>{const r=decodeURIComponent(location.search);return new URLSearchParams(r)},ko=()=>{let r={};for(let[o,u]of Sr().entries())r[o]=u;return r},To=(r,o,u)=>{o??(o="_blank"),window.open(r,o,u)},lu=Object.freeze(Object.defineProperty({__proto__:null,all:ko,default:{search:Sr,all:ko,open:To},open:To,search:Sr},Symbol.toStringTag,{value:"Module"}));De.date=Ss,De.db=Ts,De.fast=Rs,De.file=As,De.hash=Ms,De.http=cu,De.json=js,De.storage=ou,De.url=lu,Object.defineProperty(De,Symbol.toStringTag,{value:"Module"})});