@zk-tech/rrt-core 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- var vc=Object.defineProperty;var bc=(It,Pe,Xt)=>Pe in It?vc(It,Pe,{enumerable:!0,configurable:!0,writable:!0,value:Xt}):It[Pe]=Xt;var at=(It,Pe,Xt)=>bc(It,typeof Pe!="symbol"?Pe+"":Pe,Xt);(function(){"use strict";const It="padding: 2px 4px; border-radius: 4px; font-weight: 600;",Pe={welcome:()=>{console.log("%cperf-monitor","background-color: #1e1e1e; color: #58c4dc; padding: 5px 10px; margin: 4px 0 6px 0; border-radius: 8px; font-weight: bold; font-size: 18px;")},log:(...n)=>{const i=`background-color: #087ea4; ${It}`;console.log("%c[perf-monitor]",i,...n)},warn:(...n)=>{const i=`background-color: #fc8800; ${It}`;console.log("%c[perf-monitor]",i,...n)},error:(...n)=>{const i=`background-color: #f93920; ${It}`;console.log("%c[perf-monitor]",i,...n)}},Xt=6e4;function Oo(n){return n}const gs=Oo,{clearTimeout:vs,setTimeout:bs}=globalThis,ws=Math.random.bind(Math);function Es(n,i){const{post:a,on:c,eventNames:d=[],serialize:m=Oo,deserialize:T=gs,resolver:N,timeout:_=Xt}=i,w=new Map;let $;const P=new Proxy({},{get(Y,G){if(G==="$functions")return n;if(G==="then"&&!d.includes("then")&&!("then"in n))return;const j=(...fe)=>{a(m({m:G,a:fe,t:"q"}))};if(d.includes(G))return j.asEvent=j,j;const te=async(...fe)=>(await $,new Promise((ue,me)=>{var Te;const se=Os();let M;_>=0&&(M=bs(()=>{var Q;try{throw(Q=i.onTimeoutError)==null||Q.call(i,G,fe),new Error(`[birpc] timeout on calling "${G}"`)}catch(U){me(U)}w.delete(se)},_),typeof M=="object"&&(M=(Te=M.unref)==null?void 0:Te.call(M))),w.set(se,{resolve:ue,reject:me,timeoutId:M}),a(m({m:G,a:fe,i:se,t:"q"}))}));return te.asEvent=j,te}});return $=c(async(Y,...G)=>{const j=T(Y);if(j.t==="q"){const{m:te,a:fe}=j;let ue,me;const Te=N?N(te,n[te]):n[te];if(!Te)me=new Error(`[birpc] function "${te}" not found`);else try{ue=await Te.apply(P,fe)}catch(se){me=se}j.i&&(me&&i.onError&&i.onError(me,te,fe),a(m({t:"s",i:j.i,r:ue,e:me}),...G))}else{const{i:te,r:fe,e:ue}=j,me=w.get(te);me&&(vs(me.timeoutId),ue?me.reject(ue):me.resolve(fe)),w.delete(te)}}),P}const _s="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";function Os(n=21){let i="",a=n;for(;a--;)i+=_s[ws()*64|0];return i}class Is{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(i,a){this.keyToValue.set(i,a),this.valueToKey.set(a,i)}getByKey(i){return this.keyToValue.get(i)}getByValue(i){return this.valueToKey.get(i)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}}class Io{constructor(i){this.generateIdentifier=i,this.kv=new Is}register(i,a){this.kv.getByValue(i)||(a||(a=this.generateIdentifier(i)),this.kv.set(a,i))}clear(){this.kv.clear()}getIdentifier(i){return this.kv.getByValue(i)}getValue(i){return this.kv.getByKey(i)}}class Cs extends Io{constructor(){super(i=>i.name),this.classToAllowedProps=new Map}register(i,a){typeof a=="object"?(a.allowProps&&this.classToAllowedProps.set(i,a.allowProps),super.register(i,a.identifier)):super.register(i,a)}getAllowedProps(i){return this.classToAllowedProps.get(i)}}function Ss(n){if("values"in Object)return Object.values(n);const i=[];for(const a in n)n.hasOwnProperty(a)&&i.push(n[a]);return i}function Rs(n,i){const a=Ss(n);if("find"in a)return a.find(i);const c=a;for(let d=0;d<c.length;d++){const m=c[d];if(i(m))return m}}function Yt(n,i){Object.entries(n).forEach(([a,c])=>i(c,a))}function Pn(n,i){return n.indexOf(i)!==-1}function Co(n,i){for(let a=0;a<n.length;a++){const c=n[a];if(i(c))return c}}class Ts{constructor(){this.transfomers={}}register(i){this.transfomers[i.name]=i}findApplicable(i){return Rs(this.transfomers,a=>a.isApplicable(i))}findByName(i){return this.transfomers[i]}}const ks=n=>Object.prototype.toString.call(n).slice(8,-1),So=n=>typeof n>"u",xs=n=>n===null,un=n=>typeof n!="object"||n===null||n===Object.prototype?!1:Object.getPrototypeOf(n)===null?!0:Object.getPrototypeOf(n)===Object.prototype,vr=n=>un(n)&&Object.keys(n).length===0,At=n=>Array.isArray(n),Ns=n=>typeof n=="string",Ps=n=>typeof n=="number"&&!isNaN(n),Ls=n=>typeof n=="boolean",As=n=>n instanceof RegExp,cn=n=>n instanceof Map,ln=n=>n instanceof Set,Ro=n=>ks(n)==="Symbol",Ds=n=>n instanceof Date&&!isNaN(n.valueOf()),Ms=n=>n instanceof Error,To=n=>typeof n=="number"&&isNaN(n),js=n=>Ls(n)||xs(n)||So(n)||Ps(n)||Ns(n)||Ro(n),Fs=n=>typeof n=="bigint",$s=n=>n===1/0||n===-1/0,Bs=n=>ArrayBuffer.isView(n)&&!(n instanceof DataView),Ks=n=>n instanceof URL,ko=n=>n.replace(/\./g,"\\."),br=n=>n.map(String).map(ko).join("."),fn=n=>{const i=[];let a="";for(let d=0;d<n.length;d++){let m=n.charAt(d);if(m==="\\"&&n.charAt(d+1)==="."){a+=".",d++;continue}if(m==="."){i.push(a),a="";continue}a+=m}const c=a;return i.push(c),i};function wt(n,i,a,c){return{isApplicable:n,annotation:i,transform:a,untransform:c}}const xo=[wt(So,"undefined",()=>null,()=>{}),wt(Fs,"bigint",n=>n.toString(),n=>typeof BigInt<"u"?BigInt(n):(console.error("Please add a BigInt polyfill."),n)),wt(Ds,"Date",n=>n.toISOString(),n=>new Date(n)),wt(Ms,"Error",(n,i)=>{const a={name:n.name,message:n.message};return i.allowedErrorProps.forEach(c=>{a[c]=n[c]}),a},(n,i)=>{const a=new Error(n.message);return a.name=n.name,a.stack=n.stack,i.allowedErrorProps.forEach(c=>{a[c]=n[c]}),a}),wt(As,"regexp",n=>""+n,n=>{const i=n.slice(1,n.lastIndexOf("/")),a=n.slice(n.lastIndexOf("/")+1);return new RegExp(i,a)}),wt(ln,"set",n=>[...n.values()],n=>new Set(n)),wt(cn,"map",n=>[...n.entries()],n=>new Map(n)),wt(n=>To(n)||$s(n),"number",n=>To(n)?"NaN":n>0?"Infinity":"-Infinity",Number),wt(n=>n===0&&1/n===-1/0,"number",()=>"-0",Number),wt(Ks,"URL",n=>n.toString(),n=>new URL(n))];function Ln(n,i,a,c){return{isApplicable:n,annotation:i,transform:a,untransform:c}}const No=Ln((n,i)=>Ro(n)?!!i.symbolRegistry.getIdentifier(n):!1,(n,i)=>["symbol",i.symbolRegistry.getIdentifier(n)],n=>n.description,(n,i,a)=>{const c=a.symbolRegistry.getValue(i[1]);if(!c)throw new Error("Trying to deserialize unknown symbol");return c}),qs=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((n,i)=>(n[i.name]=i,n),{}),Po=Ln(Bs,n=>["typed-array",n.constructor.name],n=>[...n],(n,i)=>{const a=qs[i[1]];if(!a)throw new Error("Trying to deserialize unknown typed array");return new a(n)});function Lo(n,i){return n!=null&&n.constructor?!!i.classRegistry.getIdentifier(n.constructor):!1}const Ao=Ln(Lo,(n,i)=>["class",i.classRegistry.getIdentifier(n.constructor)],(n,i)=>{const a=i.classRegistry.getAllowedProps(n.constructor);if(!a)return{...n};const c={};return a.forEach(d=>{c[d]=n[d]}),c},(n,i,a)=>{const c=a.classRegistry.getValue(i[1]);if(!c)throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(c.prototype),n)}),Do=Ln((n,i)=>!!i.customTransformerRegistry.findApplicable(n),(n,i)=>["custom",i.customTransformerRegistry.findApplicable(n).name],(n,i)=>i.customTransformerRegistry.findApplicable(n).serialize(n),(n,i,a)=>{const c=a.customTransformerRegistry.findByName(i[1]);if(!c)throw new Error("Trying to deserialize unknown custom value");return c.deserialize(n)}),Us=[Ao,No,Do,Po],Mo=(n,i)=>{const a=Co(Us,d=>d.isApplicable(n,i));if(a)return{value:a.transform(n,i),type:a.annotation(n,i)};const c=Co(xo,d=>d.isApplicable(n,i));if(c)return{value:c.transform(n,i),type:c.annotation}},jo={};xo.forEach(n=>{jo[n.annotation]=n});const Hs=(n,i,a)=>{if(At(i))switch(i[0]){case"symbol":return No.untransform(n,i,a);case"class":return Ao.untransform(n,i,a);case"custom":return Do.untransform(n,i,a);case"typed-array":return Po.untransform(n,i,a);default:throw new Error("Unknown transformation: "+i)}else{const c=jo[i];if(!c)throw new Error("Unknown transformation: "+i);return c.untransform(n,a)}},Qt=(n,i)=>{const a=n.keys();for(;i>0;)a.next(),i--;return a.next().value};function Fo(n){if(Pn(n,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Pn(n,"prototype"))throw new Error("prototype is not allowed as a property");if(Pn(n,"constructor"))throw new Error("constructor is not allowed as a property")}const zs=(n,i)=>{Fo(i);for(let a=0;a<i.length;a++){const c=i[a];if(ln(n))n=Qt(n,+c);else if(cn(n)){const d=+c,m=+i[++a]==0?"key":"value",T=Qt(n,d);switch(m){case"key":n=T;break;case"value":n=n.get(T);break}}else n=n[c]}return n},wr=(n,i,a)=>{if(Fo(i),i.length===0)return a(n);let c=n;for(let m=0;m<i.length-1;m++){const T=i[m];if(At(c)){const N=+T;c=c[N]}else if(un(c))c=c[T];else if(ln(c)){const N=+T;c=Qt(c,N)}else if(cn(c)){if(m===i.length-2)break;const _=+T,w=+i[++m]==0?"key":"value",$=Qt(c,_);switch(w){case"key":c=$;break;case"value":c=c.get($);break}}}const d=i[i.length-1];if(At(c)?c[+d]=a(c[+d]):un(c)&&(c[d]=a(c[d])),ln(c)){const m=Qt(c,+d),T=a(m);m!==T&&(c.delete(m),c.add(T))}if(cn(c)){const m=+i[i.length-2],T=Qt(c,m);switch(+d==0?"key":"value"){case"key":{const _=a(T);c.set(_,c.get(T)),_!==T&&c.delete(T);break}case"value":{c.set(T,a(c.get(T)));break}}}return n};function Er(n,i,a=[]){if(!n)return;if(!At(n)){Yt(n,(m,T)=>Er(m,i,[...a,...fn(T)]));return}const[c,d]=n;d&&Yt(d,(m,T)=>{Er(m,i,[...a,...fn(T)])}),i(c,a)}function Vs(n,i,a){return Er(i,(c,d)=>{n=wr(n,d,m=>Hs(m,c,a))}),n}function Gs(n,i){function a(c,d){const m=zs(n,fn(d));c.map(fn).forEach(T=>{n=wr(n,T,()=>m)})}if(At(i)){const[c,d]=i;c.forEach(m=>{n=wr(n,fn(m),()=>n)}),d&&Yt(d,a)}else Yt(i,a);return n}const Ws=(n,i)=>un(n)||At(n)||cn(n)||ln(n)||Lo(n,i);function Xs(n,i,a){const c=a.get(n);c?c.push(i):a.set(n,[i])}function Ys(n,i){const a={};let c;return n.forEach(d=>{if(d.length<=1)return;i||(d=d.map(N=>N.map(String)).sort((N,_)=>N.length-_.length));const[m,...T]=d;m.length===0?c=T.map(br):a[br(m)]=T.map(br)}),c?vr(a)?[c]:[c,a]:vr(a)?void 0:a}const $o=(n,i,a,c,d=[],m=[],T=new Map)=>{const N=js(n);if(!N){Xs(n,d,i);const G=T.get(n);if(G)return c?{transformedValue:null}:G}if(!Ws(n,a)){const G=Mo(n,a),j=G?{transformedValue:G.value,annotations:[G.type]}:{transformedValue:n};return N||T.set(n,j),j}if(Pn(m,n))return{transformedValue:null};const _=Mo(n,a),w=(_==null?void 0:_.value)??n,$=At(w)?[]:{},P={};Yt(w,(G,j)=>{if(j==="__proto__"||j==="constructor"||j==="prototype")throw new Error(`Detected property ${j}. This is a prototype pollution risk, please remove it from your object.`);const te=$o(G,i,a,c,[...d,j],[...m,n],T);$[j]=te.transformedValue,At(te.annotations)?P[j]=te.annotations:un(te.annotations)&&Yt(te.annotations,(fe,ue)=>{P[ko(j)+"."+ue]=fe})});const Y=vr(P)?{transformedValue:$,annotations:_?[_.type]:void 0}:{transformedValue:$,annotations:_?[_.type,P]:P};return N||T.set(n,Y),Y};function Bo(n){return Object.prototype.toString.call(n).slice(8,-1)}function Ko(n){return Bo(n)==="Array"}function Qs(n){if(Bo(n)!=="Object")return!1;const i=Object.getPrototypeOf(n);return!!i&&i.constructor===Object&&i===Object.prototype}function Zs(n,i,a,c,d){const m={}.propertyIsEnumerable.call(c,i)?"enumerable":"nonenumerable";m==="enumerable"&&(n[i]=a),d&&m==="nonenumerable"&&Object.defineProperty(n,i,{value:a,enumerable:!1,writable:!0,configurable:!0})}function _r(n,i={}){if(Ko(n))return n.map(d=>_r(d,i));if(!Qs(n))return n;const a=Object.getOwnPropertyNames(n),c=Object.getOwnPropertySymbols(n);return[...a,...c].reduce((d,m)=>{if(Ko(i.props)&&!i.props.includes(m))return d;const T=n[m],N=_r(T,i);return Zs(d,m,N,n,i.nonenumerable),d},{})}class xe{constructor({dedupe:i=!1}={}){this.classRegistry=new Cs,this.symbolRegistry=new Io(a=>a.description??""),this.customTransformerRegistry=new Ts,this.allowedErrorProps=[],this.dedupe=i}serialize(i){const a=new Map,c=$o(i,a,this,this.dedupe),d={json:c.transformedValue};c.annotations&&(d.meta={...d.meta,values:c.annotations});const m=Ys(a,this.dedupe);return m&&(d.meta={...d.meta,referentialEqualities:m}),d}deserialize(i){const{json:a,meta:c}=i;let d=_r(a);return c!=null&&c.values&&(d=Vs(d,c.values,this)),c!=null&&c.referentialEqualities&&(d=Gs(d,c.referentialEqualities)),d}stringify(i){return JSON.stringify(this.serialize(i))}parse(i){return this.deserialize(JSON.parse(i))}registerClass(i,a){this.classRegistry.register(i,a)}registerSymbol(i,a){this.symbolRegistry.register(i,a)}registerCustom(i,a){this.customTransformerRegistry.register({name:a,...i})}allowErrorProps(...i){this.allowedErrorProps.push(...i)}}xe.defaultInstance=new xe,xe.serialize=xe.defaultInstance.serialize.bind(xe.defaultInstance),xe.deserialize=xe.defaultInstance.deserialize.bind(xe.defaultInstance),xe.stringify=xe.defaultInstance.stringify.bind(xe.defaultInstance),xe.parse=xe.defaultInstance.parse.bind(xe.defaultInstance),xe.registerClass=xe.defaultInstance.registerClass.bind(xe.defaultInstance),xe.registerSymbol=xe.defaultInstance.registerSymbol.bind(xe.defaultInstance),xe.registerCustom=xe.defaultInstance.registerCustom.bind(xe.defaultInstance),xe.allowErrorProps=xe.defaultInstance.allowErrorProps.bind(xe.defaultInstance),xe.serialize,xe.deserialize,xe.stringify,xe.parse,xe.registerClass,xe.registerCustom,xe.registerSymbol,xe.allowErrorProps;const Js="__devtools-bridge:broadcast-channel__",qo=()=>{const n=new BroadcastChannel(Js),i=Mn.broadcast;return{post:a=>{n.postMessage(xe.stringify({event:i,data:a}))},on:a=>{n.onmessage=c=>{const d=xe.parse(c.data);d.event===i&&a(d.data)}}}},Uo=()=>{const n=Mn.native;return{post:i=>{const a=new CustomEvent(n,{detail:i});window.dispatchEvent(a)},on:i=>{const a=c=>{console.log(c.detail),i(c.detail)};window.addEventListener(n,a)}}};function ea(){window.__PERF_MONITOR_DEVTOOLS_MESSAGE_CHANNEL_CONTEXT__??(window.__PERF_MONITOR_DEVTOOLS_MESSAGE_CHANNEL_CONTEXT__=new MessageChannel)}function Ho(){return window.__PERF_MONITOR_DEVTOOLS_MESSAGE_CHANNEL_CONTEXT__||null}var An=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Or,zo;function ta(){if(zo)return Or;zo=1;var n="Expected a function",i=NaN,a="[object Symbol]",c=/^\s+|\s+$/g,d=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,T=/^0o[0-7]+$/i,N=parseInt,_=typeof An=="object"&&An&&An.Object===Object&&An,w=typeof self=="object"&&self&&self.Object===Object&&self,$=_||w||Function("return this")(),P=Object.prototype,Y=P.toString,G=Math.max,j=Math.min,te=function(){return $.Date.now()};function fe(M,Q,U){var de,_e,H,D,K,q,ve=0,B=!1,ae=!1,ie=!0;if(typeof M!="function")throw new TypeError(n);Q=se(Q)||0,ue(U)&&(B=!!U.leading,ae="maxWait"in U,H=ae?G(se(U.maxWait)||0,Q):H,ie="trailing"in U?!!U.trailing:ie);function ge(ye){var Ue=de,ne=_e;return de=_e=void 0,ve=ye,D=M.apply(ne,Ue),D}function Ie(ye){return ve=ye,K=setTimeout(Ve,Q),B?ge(ye):D}function Ce(ye){var Ue=ye-q,ne=ye-ve,mt=Q-Ue;return ae?j(mt,H-ne):mt}function Ae(ye){var Ue=ye-q,ne=ye-ve;return q===void 0||Ue>=Q||Ue<0||ae&&ne>=H}function Ve(){var ye=te();if(Ae(ye))return We(ye);K=setTimeout(Ve,Ce(ye))}function We(ye){return K=void 0,ie&&de?ge(ye):(de=_e=void 0,D)}function tt(){K!==void 0&&clearTimeout(K),ve=0,de=q=_e=K=void 0}function ut(){return K===void 0?D:We(te())}function Xe(){var ye=te(),Ue=Ae(ye);if(de=arguments,_e=this,q=ye,Ue){if(K===void 0)return Ie(q);if(ae)return K=setTimeout(Ve,Q),ge(q)}return K===void 0&&(K=setTimeout(Ve,Q)),D}return Xe.cancel=tt,Xe.flush=ut,Xe}function ue(M){var Q=typeof M;return!!M&&(Q=="object"||Q=="function")}function me(M){return!!M&&typeof M=="object"}function Te(M){return typeof M=="symbol"||me(M)&&Y.call(M)==a}function se(M){if(typeof M=="number")return M;if(Te(M))return i;if(ue(M)){var Q=typeof M.valueOf=="function"?M.valueOf():M;M=ue(Q)?Q+"":Q}if(typeof M!="string")return M===0?M:+M;M=M.replace(c,"");var U=m.test(M);return U||T.test(M)?N(M.slice(2),U?2:8):d.test(M)?i:+M}return Or=fe,Or}ta();const Dn=()=>null,na=()=>{const n=Mn.message,i=Ho();return i?{post:a=>{i.port1.postMessage({event:n,data:a})},on:a=>{i.port1.onmessage=({data:c})=>{c.event===n&&a(c.data)}}}:{post:Dn,on:Dn}},ra=()=>{const n=Mn.message,i=Ho();return i?{post:a=>{i.port2.postMessage({event:n,data:a})},on:a=>{i.port2.onmessage=({data:c})=>{c.event===n&&a(c.data)}}}:{post:Dn,on:Dn}},Mn={native:"__devtools-bridge-event-native",message:"__devtools-bridge-event-message",broadcast:"__devtools-bridge-event-broadcast"},oa=(n,i)=>{const a={native:{client:Uo,backend:Uo},message:{client:na,backend:ra},broadcast:{client:qo,backend:qo}};return n==="message"&&ea(),a[n][i]()},ia=(n,i)=>{const a=oa(i,"backend");return Es(n,{...a,timeout:-1,eventNames:["activedRenderers","highlighting","memoryLeaks","reactRenderers","eventsState"]})},sa="0.0.2",jn="__PERF_MONITOR_DEVTOOLS_STORAGE__",aa=crypto.randomUUID();let pt={},Ct={};function ua(){if(typeof document<"u"){const n=localStorage.getItem(jn);if(n)try{const a=JSON.parse(n||"{}");typeof a=="object"&&a!==null&&(pt={...pt,...a})}catch{localStorage.removeItem(jn),Pe.error(`config parse error
1
+ var vc=Object.defineProperty;var bc=(It,Pe,Xt)=>Pe in It?vc(It,Pe,{enumerable:!0,configurable:!0,writable:!0,value:Xt}):It[Pe]=Xt;var at=(It,Pe,Xt)=>bc(It,typeof Pe!="symbol"?Pe+"":Pe,Xt);(function(){"use strict";const It="padding: 2px 4px; border-radius: 4px; font-weight: 600;",Pe={welcome:()=>{console.log("%cperf-monitor","background-color: #1e1e1e; color: #58c4dc; padding: 5px 10px; margin: 4px 0 6px 0; border-radius: 8px; font-weight: bold; font-size: 18px;")},log:(...n)=>{const i=`background-color: #087ea4; ${It}`;console.log("%c[perf-monitor]",i,...n)},warn:(...n)=>{const i=`background-color: #fc8800; ${It}`;console.log("%c[perf-monitor]",i,...n)},error:(...n)=>{const i=`background-color: #f93920; ${It}`;console.log("%c[perf-monitor]",i,...n)}},Xt=6e4;function Oo(n){return n}const gs=Oo,{clearTimeout:vs,setTimeout:bs}=globalThis,ws=Math.random.bind(Math);function Es(n,i){const{post:a,on:c,eventNames:d=[],serialize:m=Oo,deserialize:T=gs,resolver:N,timeout:_=Xt}=i,w=new Map;let $;const P=new Proxy({},{get(Y,G){if(G==="$functions")return n;if(G==="then"&&!d.includes("then")&&!("then"in n))return;const j=(...fe)=>{a(m({m:G,a:fe,t:"q"}))};if(d.includes(G))return j.asEvent=j,j;const te=async(...fe)=>(await $,new Promise((ue,me)=>{var Te;const se=Os();let M;_>=0&&(M=bs(()=>{var Q;try{throw(Q=i.onTimeoutError)==null||Q.call(i,G,fe),new Error(`[birpc] timeout on calling "${G}"`)}catch(U){me(U)}w.delete(se)},_),typeof M=="object"&&(M=(Te=M.unref)==null?void 0:Te.call(M))),w.set(se,{resolve:ue,reject:me,timeoutId:M}),a(m({m:G,a:fe,i:se,t:"q"}))}));return te.asEvent=j,te}});return $=c(async(Y,...G)=>{const j=T(Y);if(j.t==="q"){const{m:te,a:fe}=j;let ue,me;const Te=N?N(te,n[te]):n[te];if(!Te)me=new Error(`[birpc] function "${te}" not found`);else try{ue=await Te.apply(P,fe)}catch(se){me=se}j.i&&(me&&i.onError&&i.onError(me,te,fe),a(m({t:"s",i:j.i,r:ue,e:me}),...G))}else{const{i:te,r:fe,e:ue}=j,me=w.get(te);me&&(vs(me.timeoutId),ue?me.reject(ue):me.resolve(fe)),w.delete(te)}}),P}const _s="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";function Os(n=21){let i="",a=n;for(;a--;)i+=_s[ws()*64|0];return i}class Is{constructor(){this.keyToValue=new Map,this.valueToKey=new Map}set(i,a){this.keyToValue.set(i,a),this.valueToKey.set(a,i)}getByKey(i){return this.keyToValue.get(i)}getByValue(i){return this.valueToKey.get(i)}clear(){this.keyToValue.clear(),this.valueToKey.clear()}}class Io{constructor(i){this.generateIdentifier=i,this.kv=new Is}register(i,a){this.kv.getByValue(i)||(a||(a=this.generateIdentifier(i)),this.kv.set(a,i))}clear(){this.kv.clear()}getIdentifier(i){return this.kv.getByValue(i)}getValue(i){return this.kv.getByKey(i)}}class Cs extends Io{constructor(){super(i=>i.name),this.classToAllowedProps=new Map}register(i,a){typeof a=="object"?(a.allowProps&&this.classToAllowedProps.set(i,a.allowProps),super.register(i,a.identifier)):super.register(i,a)}getAllowedProps(i){return this.classToAllowedProps.get(i)}}function Ss(n){if("values"in Object)return Object.values(n);const i=[];for(const a in n)n.hasOwnProperty(a)&&i.push(n[a]);return i}function Rs(n,i){const a=Ss(n);if("find"in a)return a.find(i);const c=a;for(let d=0;d<c.length;d++){const m=c[d];if(i(m))return m}}function Yt(n,i){Object.entries(n).forEach(([a,c])=>i(c,a))}function Pn(n,i){return n.indexOf(i)!==-1}function Co(n,i){for(let a=0;a<n.length;a++){const c=n[a];if(i(c))return c}}class Ts{constructor(){this.transfomers={}}register(i){this.transfomers[i.name]=i}findApplicable(i){return Rs(this.transfomers,a=>a.isApplicable(i))}findByName(i){return this.transfomers[i]}}const ks=n=>Object.prototype.toString.call(n).slice(8,-1),So=n=>typeof n>"u",xs=n=>n===null,un=n=>typeof n!="object"||n===null||n===Object.prototype?!1:Object.getPrototypeOf(n)===null?!0:Object.getPrototypeOf(n)===Object.prototype,vr=n=>un(n)&&Object.keys(n).length===0,At=n=>Array.isArray(n),Ns=n=>typeof n=="string",Ps=n=>typeof n=="number"&&!isNaN(n),Ls=n=>typeof n=="boolean",As=n=>n instanceof RegExp,cn=n=>n instanceof Map,ln=n=>n instanceof Set,Ro=n=>ks(n)==="Symbol",Ds=n=>n instanceof Date&&!isNaN(n.valueOf()),Ms=n=>n instanceof Error,To=n=>typeof n=="number"&&isNaN(n),js=n=>Ls(n)||xs(n)||So(n)||Ps(n)||Ns(n)||Ro(n),Fs=n=>typeof n=="bigint",$s=n=>n===1/0||n===-1/0,Bs=n=>ArrayBuffer.isView(n)&&!(n instanceof DataView),Ks=n=>n instanceof URL,ko=n=>n.replace(/\./g,"\\."),br=n=>n.map(String).map(ko).join("."),fn=n=>{const i=[];let a="";for(let d=0;d<n.length;d++){let m=n.charAt(d);if(m==="\\"&&n.charAt(d+1)==="."){a+=".",d++;continue}if(m==="."){i.push(a),a="";continue}a+=m}const c=a;return i.push(c),i};function wt(n,i,a,c){return{isApplicable:n,annotation:i,transform:a,untransform:c}}const xo=[wt(So,"undefined",()=>null,()=>{}),wt(Fs,"bigint",n=>n.toString(),n=>typeof BigInt<"u"?BigInt(n):(console.error("Please add a BigInt polyfill."),n)),wt(Ds,"Date",n=>n.toISOString(),n=>new Date(n)),wt(Ms,"Error",(n,i)=>{const a={name:n.name,message:n.message};return i.allowedErrorProps.forEach(c=>{a[c]=n[c]}),a},(n,i)=>{const a=new Error(n.message);return a.name=n.name,a.stack=n.stack,i.allowedErrorProps.forEach(c=>{a[c]=n[c]}),a}),wt(As,"regexp",n=>""+n,n=>{const i=n.slice(1,n.lastIndexOf("/")),a=n.slice(n.lastIndexOf("/")+1);return new RegExp(i,a)}),wt(ln,"set",n=>[...n.values()],n=>new Set(n)),wt(cn,"map",n=>[...n.entries()],n=>new Map(n)),wt(n=>To(n)||$s(n),"number",n=>To(n)?"NaN":n>0?"Infinity":"-Infinity",Number),wt(n=>n===0&&1/n===-1/0,"number",()=>"-0",Number),wt(Ks,"URL",n=>n.toString(),n=>new URL(n))];function Ln(n,i,a,c){return{isApplicable:n,annotation:i,transform:a,untransform:c}}const No=Ln((n,i)=>Ro(n)?!!i.symbolRegistry.getIdentifier(n):!1,(n,i)=>["symbol",i.symbolRegistry.getIdentifier(n)],n=>n.description,(n,i,a)=>{const c=a.symbolRegistry.getValue(i[1]);if(!c)throw new Error("Trying to deserialize unknown symbol");return c}),qs=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,Uint8ClampedArray].reduce((n,i)=>(n[i.name]=i,n),{}),Po=Ln(Bs,n=>["typed-array",n.constructor.name],n=>[...n],(n,i)=>{const a=qs[i[1]];if(!a)throw new Error("Trying to deserialize unknown typed array");return new a(n)});function Lo(n,i){return n!=null&&n.constructor?!!i.classRegistry.getIdentifier(n.constructor):!1}const Ao=Ln(Lo,(n,i)=>["class",i.classRegistry.getIdentifier(n.constructor)],(n,i)=>{const a=i.classRegistry.getAllowedProps(n.constructor);if(!a)return{...n};const c={};return a.forEach(d=>{c[d]=n[d]}),c},(n,i,a)=>{const c=a.classRegistry.getValue(i[1]);if(!c)throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");return Object.assign(Object.create(c.prototype),n)}),Do=Ln((n,i)=>!!i.customTransformerRegistry.findApplicable(n),(n,i)=>["custom",i.customTransformerRegistry.findApplicable(n).name],(n,i)=>i.customTransformerRegistry.findApplicable(n).serialize(n),(n,i,a)=>{const c=a.customTransformerRegistry.findByName(i[1]);if(!c)throw new Error("Trying to deserialize unknown custom value");return c.deserialize(n)}),Us=[Ao,No,Do,Po],Mo=(n,i)=>{const a=Co(Us,d=>d.isApplicable(n,i));if(a)return{value:a.transform(n,i),type:a.annotation(n,i)};const c=Co(xo,d=>d.isApplicable(n,i));if(c)return{value:c.transform(n,i),type:c.annotation}},jo={};xo.forEach(n=>{jo[n.annotation]=n});const Hs=(n,i,a)=>{if(At(i))switch(i[0]){case"symbol":return No.untransform(n,i,a);case"class":return Ao.untransform(n,i,a);case"custom":return Do.untransform(n,i,a);case"typed-array":return Po.untransform(n,i,a);default:throw new Error("Unknown transformation: "+i)}else{const c=jo[i];if(!c)throw new Error("Unknown transformation: "+i);return c.untransform(n,a)}},Qt=(n,i)=>{const a=n.keys();for(;i>0;)a.next(),i--;return a.next().value};function Fo(n){if(Pn(n,"__proto__"))throw new Error("__proto__ is not allowed as a property");if(Pn(n,"prototype"))throw new Error("prototype is not allowed as a property");if(Pn(n,"constructor"))throw new Error("constructor is not allowed as a property")}const zs=(n,i)=>{Fo(i);for(let a=0;a<i.length;a++){const c=i[a];if(ln(n))n=Qt(n,+c);else if(cn(n)){const d=+c,m=+i[++a]==0?"key":"value",T=Qt(n,d);switch(m){case"key":n=T;break;case"value":n=n.get(T);break}}else n=n[c]}return n},wr=(n,i,a)=>{if(Fo(i),i.length===0)return a(n);let c=n;for(let m=0;m<i.length-1;m++){const T=i[m];if(At(c)){const N=+T;c=c[N]}else if(un(c))c=c[T];else if(ln(c)){const N=+T;c=Qt(c,N)}else if(cn(c)){if(m===i.length-2)break;const _=+T,w=+i[++m]==0?"key":"value",$=Qt(c,_);switch(w){case"key":c=$;break;case"value":c=c.get($);break}}}const d=i[i.length-1];if(At(c)?c[+d]=a(c[+d]):un(c)&&(c[d]=a(c[d])),ln(c)){const m=Qt(c,+d),T=a(m);m!==T&&(c.delete(m),c.add(T))}if(cn(c)){const m=+i[i.length-2],T=Qt(c,m);switch(+d==0?"key":"value"){case"key":{const _=a(T);c.set(_,c.get(T)),_!==T&&c.delete(T);break}case"value":{c.set(T,a(c.get(T)));break}}}return n};function Er(n,i,a=[]){if(!n)return;if(!At(n)){Yt(n,(m,T)=>Er(m,i,[...a,...fn(T)]));return}const[c,d]=n;d&&Yt(d,(m,T)=>{Er(m,i,[...a,...fn(T)])}),i(c,a)}function Vs(n,i,a){return Er(i,(c,d)=>{n=wr(n,d,m=>Hs(m,c,a))}),n}function Gs(n,i){function a(c,d){const m=zs(n,fn(d));c.map(fn).forEach(T=>{n=wr(n,T,()=>m)})}if(At(i)){const[c,d]=i;c.forEach(m=>{n=wr(n,fn(m),()=>n)}),d&&Yt(d,a)}else Yt(i,a);return n}const Ws=(n,i)=>un(n)||At(n)||cn(n)||ln(n)||Lo(n,i);function Xs(n,i,a){const c=a.get(n);c?c.push(i):a.set(n,[i])}function Ys(n,i){const a={};let c;return n.forEach(d=>{if(d.length<=1)return;i||(d=d.map(N=>N.map(String)).sort((N,_)=>N.length-_.length));const[m,...T]=d;m.length===0?c=T.map(br):a[br(m)]=T.map(br)}),c?vr(a)?[c]:[c,a]:vr(a)?void 0:a}const $o=(n,i,a,c,d=[],m=[],T=new Map)=>{const N=js(n);if(!N){Xs(n,d,i);const G=T.get(n);if(G)return c?{transformedValue:null}:G}if(!Ws(n,a)){const G=Mo(n,a),j=G?{transformedValue:G.value,annotations:[G.type]}:{transformedValue:n};return N||T.set(n,j),j}if(Pn(m,n))return{transformedValue:null};const _=Mo(n,a),w=(_==null?void 0:_.value)??n,$=At(w)?[]:{},P={};Yt(w,(G,j)=>{if(j==="__proto__"||j==="constructor"||j==="prototype")throw new Error(`Detected property ${j}. This is a prototype pollution risk, please remove it from your object.`);const te=$o(G,i,a,c,[...d,j],[...m,n],T);$[j]=te.transformedValue,At(te.annotations)?P[j]=te.annotations:un(te.annotations)&&Yt(te.annotations,(fe,ue)=>{P[ko(j)+"."+ue]=fe})});const Y=vr(P)?{transformedValue:$,annotations:_?[_.type]:void 0}:{transformedValue:$,annotations:_?[_.type,P]:P};return N||T.set(n,Y),Y};function Bo(n){return Object.prototype.toString.call(n).slice(8,-1)}function Ko(n){return Bo(n)==="Array"}function Qs(n){if(Bo(n)!=="Object")return!1;const i=Object.getPrototypeOf(n);return!!i&&i.constructor===Object&&i===Object.prototype}function Zs(n,i,a,c,d){const m={}.propertyIsEnumerable.call(c,i)?"enumerable":"nonenumerable";m==="enumerable"&&(n[i]=a),d&&m==="nonenumerable"&&Object.defineProperty(n,i,{value:a,enumerable:!1,writable:!0,configurable:!0})}function _r(n,i={}){if(Ko(n))return n.map(d=>_r(d,i));if(!Qs(n))return n;const a=Object.getOwnPropertyNames(n),c=Object.getOwnPropertySymbols(n);return[...a,...c].reduce((d,m)=>{if(Ko(i.props)&&!i.props.includes(m))return d;const T=n[m],N=_r(T,i);return Zs(d,m,N,n,i.nonenumerable),d},{})}class xe{constructor({dedupe:i=!1}={}){this.classRegistry=new Cs,this.symbolRegistry=new Io(a=>a.description??""),this.customTransformerRegistry=new Ts,this.allowedErrorProps=[],this.dedupe=i}serialize(i){const a=new Map,c=$o(i,a,this,this.dedupe),d={json:c.transformedValue};c.annotations&&(d.meta={...d.meta,values:c.annotations});const m=Ys(a,this.dedupe);return m&&(d.meta={...d.meta,referentialEqualities:m}),d}deserialize(i){const{json:a,meta:c}=i;let d=_r(a);return c!=null&&c.values&&(d=Vs(d,c.values,this)),c!=null&&c.referentialEqualities&&(d=Gs(d,c.referentialEqualities)),d}stringify(i){return JSON.stringify(this.serialize(i))}parse(i){return this.deserialize(JSON.parse(i))}registerClass(i,a){this.classRegistry.register(i,a)}registerSymbol(i,a){this.symbolRegistry.register(i,a)}registerCustom(i,a){this.customTransformerRegistry.register({name:a,...i})}allowErrorProps(...i){this.allowedErrorProps.push(...i)}}xe.defaultInstance=new xe,xe.serialize=xe.defaultInstance.serialize.bind(xe.defaultInstance),xe.deserialize=xe.defaultInstance.deserialize.bind(xe.defaultInstance),xe.stringify=xe.defaultInstance.stringify.bind(xe.defaultInstance),xe.parse=xe.defaultInstance.parse.bind(xe.defaultInstance),xe.registerClass=xe.defaultInstance.registerClass.bind(xe.defaultInstance),xe.registerSymbol=xe.defaultInstance.registerSymbol.bind(xe.defaultInstance),xe.registerCustom=xe.defaultInstance.registerCustom.bind(xe.defaultInstance),xe.allowErrorProps=xe.defaultInstance.allowErrorProps.bind(xe.defaultInstance),xe.serialize,xe.deserialize,xe.stringify,xe.parse,xe.registerClass,xe.registerCustom,xe.registerSymbol,xe.allowErrorProps;const Js="__devtools-bridge:broadcast-channel__",qo=()=>{const n=new BroadcastChannel(Js),i=Mn.broadcast;return{post:a=>{n.postMessage(xe.stringify({event:i,data:a}))},on:a=>{n.onmessage=c=>{const d=xe.parse(c.data);d.event===i&&a(d.data)}}}},Uo=()=>{const n=Mn.native;return{post:i=>{const a=new CustomEvent(n,{detail:i});window.dispatchEvent(a)},on:i=>{const a=c=>{console.log(c.detail),i(c.detail)};window.addEventListener(n,a)}}};function ea(){window.__PERF_MONITOR_DEVTOOLS_MESSAGE_CHANNEL_CONTEXT__??(window.__PERF_MONITOR_DEVTOOLS_MESSAGE_CHANNEL_CONTEXT__=new MessageChannel)}function Ho(){return window.__PERF_MONITOR_DEVTOOLS_MESSAGE_CHANNEL_CONTEXT__||null}var An=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Or,zo;function ta(){if(zo)return Or;zo=1;var n="Expected a function",i=NaN,a="[object Symbol]",c=/^\s+|\s+$/g,d=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,T=/^0o[0-7]+$/i,N=parseInt,_=typeof An=="object"&&An&&An.Object===Object&&An,w=typeof self=="object"&&self&&self.Object===Object&&self,$=_||w||Function("return this")(),P=Object.prototype,Y=P.toString,G=Math.max,j=Math.min,te=function(){return $.Date.now()};function fe(M,Q,U){var de,_e,H,D,K,q,ve=0,B=!1,ae=!1,ie=!0;if(typeof M!="function")throw new TypeError(n);Q=se(Q)||0,ue(U)&&(B=!!U.leading,ae="maxWait"in U,H=ae?G(se(U.maxWait)||0,Q):H,ie="trailing"in U?!!U.trailing:ie);function ge(ye){var Ue=de,ne=_e;return de=_e=void 0,ve=ye,D=M.apply(ne,Ue),D}function Ie(ye){return ve=ye,K=setTimeout(Ve,Q),B?ge(ye):D}function Ce(ye){var Ue=ye-q,ne=ye-ve,mt=Q-Ue;return ae?j(mt,H-ne):mt}function Ae(ye){var Ue=ye-q,ne=ye-ve;return q===void 0||Ue>=Q||Ue<0||ae&&ne>=H}function Ve(){var ye=te();if(Ae(ye))return We(ye);K=setTimeout(Ve,Ce(ye))}function We(ye){return K=void 0,ie&&de?ge(ye):(de=_e=void 0,D)}function tt(){K!==void 0&&clearTimeout(K),ve=0,de=q=_e=K=void 0}function ut(){return K===void 0?D:We(te())}function Xe(){var ye=te(),Ue=Ae(ye);if(de=arguments,_e=this,q=ye,Ue){if(K===void 0)return Ie(q);if(ae)return K=setTimeout(Ve,Q),ge(q)}return K===void 0&&(K=setTimeout(Ve,Q)),D}return Xe.cancel=tt,Xe.flush=ut,Xe}function ue(M){var Q=typeof M;return!!M&&(Q=="object"||Q=="function")}function me(M){return!!M&&typeof M=="object"}function Te(M){return typeof M=="symbol"||me(M)&&Y.call(M)==a}function se(M){if(typeof M=="number")return M;if(Te(M))return i;if(ue(M)){var Q=typeof M.valueOf=="function"?M.valueOf():M;M=ue(Q)?Q+"":Q}if(typeof M!="string")return M===0?M:+M;M=M.replace(c,"");var U=m.test(M);return U||T.test(M)?N(M.slice(2),U?2:8):d.test(M)?i:+M}return Or=fe,Or}ta();const Dn=()=>null,na=()=>{const n=Mn.message,i=Ho();return i?{post:a=>{i.port1.postMessage({event:n,data:a})},on:a=>{i.port1.onmessage=({data:c})=>{c.event===n&&a(c.data)}}}:{post:Dn,on:Dn}},ra=()=>{const n=Mn.message,i=Ho();return i?{post:a=>{i.port2.postMessage({event:n,data:a})},on:a=>{i.port2.onmessage=({data:c})=>{c.event===n&&a(c.data)}}}:{post:Dn,on:Dn}},Mn={native:"__devtools-bridge-event-native",message:"__devtools-bridge-event-message",broadcast:"__devtools-bridge-event-broadcast"},oa=(n,i)=>{const a={native:{client:Uo,backend:Uo},message:{client:na,backend:ra},broadcast:{client:qo,backend:qo}};return n==="message"&&ea(),a[n][i]()},ia=(n,i)=>{const a=oa(i,"backend");return Es(n,{...a,timeout:-1,eventNames:["activedRenderers","highlighting","memoryLeaks","reactRenderers","eventsState"]})},sa="0.0.4",jn="__PERF_MONITOR_DEVTOOLS_STORAGE__",aa=crypto.randomUUID();let pt={},Ct={};function ua(){if(typeof document<"u"){const n=localStorage.getItem(jn);if(n)try{const a=JSON.parse(n||"{}");typeof a=="object"&&a!==null&&(pt={...pt,...a})}catch{localStorage.removeItem(jn),Pe.error(`config parse error
2
2
  Config: ${n}
3
- `)}const i=window.__PERF_MONITOR_DEVTOOLS_CONTEXT__;typeof i=="object"&&i!==null&&(pt={...pt,...i}),Pe.log("config registered, current config",{...pt})}}function ca(){var n,i,a;if(typeof document<"u"){const c=window.__PERF_MONITOR_DEVTOOLS_ENV__;(typeof c!="object"||c===null)&&(window.__PERF_MONITOR_DEVTOOLS_ENV__={}),(n=window.__PERF_MONITOR_DEVTOOLS_ENV__).diffMode??(n.diffMode="lite"),(i=window.__PERF_MONITOR_DEVTOOLS_ENV__).updateTrace??(i.updateTrace=!0),(a=window.__PERF_MONITOR_DEVTOOLS_ENV__).commitTrace??(a.commitTrace=!0),window.__PERF_MONITOR_DEVTOOLS_ENV__.coreId=aa,window.__PERF_MONITOR_DEVTOOLS_ENV__.coreVersion=sa,window.__PERF_MONITOR_DEVTOOLS_ENV__.pageUrl=location.href,Ct=window.__PERF_MONITOR_DEVTOOLS_ENV__,Pe.log("env registered, current env",{...Ct})}}function la(){const n=window.__PERF_MONITOR_DEVTOOLS_HOOK__;n?(n.getEnv=()=>Ct,n.getConfig=()=>pt):window.__PERF_MONITOR_DEVTOOLS_HOOK__={getEnv:()=>Ct,getConfig:()=>pt},Pe.log("hook registered",{...window.__PERF_MONITOR_DEVTOOLS_HOOK__})}function fa(){return pt}function da(n){const i={...pt,...n};Pe.log(`update config, old: ${JSON.stringify(pt)}, new: ${JSON.stringify(i)}`),localStorage.setItem(jn,JSON.stringify(i))}function pa(){Pe.log("config removed"),localStorage.removeItem(jn)}function Fn(){return Ct}function ha(n){window.__PERF_MONITOR_DEVTOOLS_ENV__={...window.__PERF_MONITOR_DEVTOOLS_ENV__,...n},Ct=window.__PERF_MONITOR_DEVTOOLS_ENV__}function ma(){ca(),ua(),la()}var $n=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ya(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ir,Vo;function ga(){if(Vo)return Ir;Vo=1;var n="Expected a function",i=NaN,a="[object Symbol]",c=/^\s+|\s+$/g,d=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,T=/^0o[0-7]+$/i,N=parseInt,_=typeof $n=="object"&&$n&&$n.Object===Object&&$n,w=typeof self=="object"&&self&&self.Object===Object&&self,$=_||w||Function("return this")(),P=Object.prototype,Y=P.toString,G=Math.max,j=Math.min,te=function(){return $.Date.now()};function fe(M,Q,U){var de,_e,H,D,K,q,ve=0,B=!1,ae=!1,ie=!0;if(typeof M!="function")throw new TypeError(n);Q=se(Q)||0,ue(U)&&(B=!!U.leading,ae="maxWait"in U,H=ae?G(se(U.maxWait)||0,Q):H,ie="trailing"in U?!!U.trailing:ie);function ge(ye){var Ue=de,ne=_e;return de=_e=void 0,ve=ye,D=M.apply(ne,Ue),D}function Ie(ye){return ve=ye,K=setTimeout(Ve,Q),B?ge(ye):D}function Ce(ye){var Ue=ye-q,ne=ye-ve,mt=Q-Ue;return ae?j(mt,H-ne):mt}function Ae(ye){var Ue=ye-q,ne=ye-ve;return q===void 0||Ue>=Q||Ue<0||ae&&ne>=H}function Ve(){var ye=te();if(Ae(ye))return We(ye);K=setTimeout(Ve,Ce(ye))}function We(ye){return K=void 0,ie&&de?ge(ye):(de=_e=void 0,D)}function tt(){K!==void 0&&clearTimeout(K),ve=0,de=q=_e=K=void 0}function ut(){return K===void 0?D:We(te())}function Xe(){var ye=te(),Ue=Ae(ye);if(de=arguments,_e=this,q=ye,Ue){if(K===void 0)return Ie(q);if(ae)return K=setTimeout(Ve,Q),ge(q)}return K===void 0&&(K=setTimeout(Ve,Q)),D}return Xe.cancel=tt,Xe.flush=ut,Xe}function ue(M){var Q=typeof M;return!!M&&(Q=="object"||Q=="function")}function me(M){return!!M&&typeof M=="object"}function Te(M){return typeof M=="symbol"||me(M)&&Y.call(M)==a}function se(M){if(typeof M=="number")return M;if(Te(M))return i;if(ue(M)){var Q=typeof M.valueOf=="function"?M.valueOf():M;M=ue(Q)?Q+"":Q}if(typeof M!="string")return M===0?M:+M;M=M.replace(c,"");var U=m.test(M);return U||T.test(M)?N(M.slice(2),U?2:8):d.test(M)?i:+M}return Ir=fe,Ir}var va=ga();const ba=ya(va),Go="__perf-monitor-devtools-container__",wa="/__perf-monitor-devtools__/open",dn=1,Cr=2,pn=3,Bn=4,Sr=5,Rr=6,Wo=7,Xo=8,Tr=9,Ea=10,_a=11,Oa=12,Yo=13,Qo=14,Ia=0,Ca=1,Sa=2,Zo=3,Jo=n=>{fetch(`${wa}?filename=${n.fileName}&line=${n.lineNumber}&col=${n.columnNumber}`)};let he;const Ra={reloadPage:()=>location.reload(),openFile:Jo,getConfig:fa,updateConfig:da,resetConfig:pa,updateEnv:ha,getEnv:Fn};function Ta(){const n=Fn();he=ia(Ra,n.clientHost==="separate"?"broadcast":"message")}function ka({breakLeakedObjectRefs:n,getExposedToGlobalLeaksState:i,subscribeToExposedToGlobalLeaksState:a,cancelExposingLeakedObjectsToGlobal:c,exposeLeakedObjectsToGlobal:d,highlightApi:m,locationApi:T}){var G;Pe.log("remote commands registered"),(G=he.memoryLeaks)==null||G.call(he,i()),a(j=>{var te;return(te=he.memoryLeaks)==null?void 0:te.call(he,j)}),he.$functions.breakLeakedObjectRefs=n,he.$functions.exposeLeakedObjectsToGlobal=d,he.$functions.cancelExposingLeakedObjectsToGlobal=c;const{startHighlight:N,stopHighlight:_,startInspect:w,stopInspect:$,inspect:P}=m;m.subscribe(j=>{var te;return(te=he.highlighting)==null?void 0:te.call(he,j)}),he.$functions.startHighlight=N,he.$functions.stopHighlight=_,he.$functions.startInspect=w,he.$functions.stopInspect=$,he.$functions.highlightRenderer=j=>{var fe,ue;const te=(ue=(fe=window.__REACT_DEVTOOLS_GLOBAL_HOOK__)==null?void 0:fe.getFiberRoot)==null?void 0:ue.call(fe,j);if(te){const me=te.containerInfo;me&&P([me])}else Pe.warn(`failed to inspect renderer: ${j}, inspect renderer needs to be in the development environment.`)};const{resolveFiberLoc:Y}=T;he.$functions.resolveFiberLoc=Y}function xa({highlightApi:n}){Pe.log("remote shortcuts registered");const{toggleFileOpen:i}=n;addEventListener("keydown",a=>{var c;a.code==="KeyD"&&a.altKey&&a.shiftKey&&(Pe.log("panel shortcut pressed"),(c=he.togglePanelOpen)==null||c.call(he))}),addEventListener("keydown",a=>{var c;a.code==="KeyX"&&a.altKey&&a.shiftKey&&(Pe.log("inspect shortcut pressed"),(c=he.toggleInspectMode)==null||c.call(he))}),addEventListener("keydown",a=>{a.altKey&&(Pe.log("highlight file shortcut pressed"),i(!0))}),addEventListener("keyup",a=>{a.key==="Alt"&&(Pe.log("highlight file shortcut released"),i(!1))})}const Kn=Symbol();var Na=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kr(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var xr,ei;function ti(){return ei||(ei=1,xr=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...i)=>console.error("SEMVER",...i):()=>{}),xr}var Nr,ni;function ri(){if(ni)return Nr;ni=1;const n="2.0.0",i=256,a=Number.MAX_SAFE_INTEGER||9007199254740991,c=16,d=i-6;return Nr={MAX_LENGTH:i,MAX_SAFE_COMPONENT_LENGTH:c,MAX_SAFE_BUILD_LENGTH:d,MAX_SAFE_INTEGER:a,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:n,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Nr}var qn={exports:{}},oi;function Pa(){return oi||(oi=1,(function(n,i){const{MAX_SAFE_COMPONENT_LENGTH:a,MAX_SAFE_BUILD_LENGTH:c,MAX_LENGTH:d}=ri(),m=ti();i=n.exports={};const T=i.re=[],N=i.safeRe=[],_=i.src=[],w=i.t={};let $=0;const P="[a-zA-Z0-9-]",Y=[["\\s",1],["\\d",d],[P,c]],G=te=>{for(const[fe,ue]of Y)te=te.split(`${fe}*`).join(`${fe}{0,${ue}}`).split(`${fe}+`).join(`${fe}{1,${ue}}`);return te},j=(te,fe,ue)=>{const me=G(fe),Te=$++;m(te,Te,fe),w[te]=Te,_[Te]=fe,T[Te]=new RegExp(fe,ue?"g":void 0),N[Te]=new RegExp(me,ue?"g":void 0)};j("NUMERICIDENTIFIER","0|[1-9]\\d*"),j("NUMERICIDENTIFIERLOOSE","\\d+"),j("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${P}*`),j("MAINVERSION",`(${_[w.NUMERICIDENTIFIER]})\\.(${_[w.NUMERICIDENTIFIER]})\\.(${_[w.NUMERICIDENTIFIER]})`),j("MAINVERSIONLOOSE",`(${_[w.NUMERICIDENTIFIERLOOSE]})\\.(${_[w.NUMERICIDENTIFIERLOOSE]})\\.(${_[w.NUMERICIDENTIFIERLOOSE]})`),j("PRERELEASEIDENTIFIER",`(?:${_[w.NUMERICIDENTIFIER]}|${_[w.NONNUMERICIDENTIFIER]})`),j("PRERELEASEIDENTIFIERLOOSE",`(?:${_[w.NUMERICIDENTIFIERLOOSE]}|${_[w.NONNUMERICIDENTIFIER]})`),j("PRERELEASE",`(?:-(${_[w.PRERELEASEIDENTIFIER]}(?:\\.${_[w.PRERELEASEIDENTIFIER]})*))`),j("PRERELEASELOOSE",`(?:-?(${_[w.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${_[w.PRERELEASEIDENTIFIERLOOSE]})*))`),j("BUILDIDENTIFIER",`${P}+`),j("BUILD",`(?:\\+(${_[w.BUILDIDENTIFIER]}(?:\\.${_[w.BUILDIDENTIFIER]})*))`),j("FULLPLAIN",`v?${_[w.MAINVERSION]}${_[w.PRERELEASE]}?${_[w.BUILD]}?`),j("FULL",`^${_[w.FULLPLAIN]}$`),j("LOOSEPLAIN",`[v=\\s]*${_[w.MAINVERSIONLOOSE]}${_[w.PRERELEASELOOSE]}?${_[w.BUILD]}?`),j("LOOSE",`^${_[w.LOOSEPLAIN]}$`),j("GTLT","((?:<|>)?=?)"),j("XRANGEIDENTIFIERLOOSE",`${_[w.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),j("XRANGEIDENTIFIER",`${_[w.NUMERICIDENTIFIER]}|x|X|\\*`),j("XRANGEPLAIN",`[v=\\s]*(${_[w.XRANGEIDENTIFIER]})(?:\\.(${_[w.XRANGEIDENTIFIER]})(?:\\.(${_[w.XRANGEIDENTIFIER]})(?:${_[w.PRERELEASE]})?${_[w.BUILD]}?)?)?`),j("XRANGEPLAINLOOSE",`[v=\\s]*(${_[w.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_[w.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_[w.XRANGEIDENTIFIERLOOSE]})(?:${_[w.PRERELEASELOOSE]})?${_[w.BUILD]}?)?)?`),j("XRANGE",`^${_[w.GTLT]}\\s*${_[w.XRANGEPLAIN]}$`),j("XRANGELOOSE",`^${_[w.GTLT]}\\s*${_[w.XRANGEPLAINLOOSE]}$`),j("COERCEPLAIN",`(^|[^\\d])(\\d{1,${a}})(?:\\.(\\d{1,${a}}))?(?:\\.(\\d{1,${a}}))?`),j("COERCE",`${_[w.COERCEPLAIN]}(?:$|[^\\d])`),j("COERCEFULL",_[w.COERCEPLAIN]+`(?:${_[w.PRERELEASE]})?(?:${_[w.BUILD]})?(?:$|[^\\d])`),j("COERCERTL",_[w.COERCE],!0),j("COERCERTLFULL",_[w.COERCEFULL],!0),j("LONETILDE","(?:~>?)"),j("TILDETRIM",`(\\s*)${_[w.LONETILDE]}\\s+`,!0),i.tildeTrimReplace="$1~",j("TILDE",`^${_[w.LONETILDE]}${_[w.XRANGEPLAIN]}$`),j("TILDELOOSE",`^${_[w.LONETILDE]}${_[w.XRANGEPLAINLOOSE]}$`),j("LONECARET","(?:\\^)"),j("CARETTRIM",`(\\s*)${_[w.LONECARET]}\\s+`,!0),i.caretTrimReplace="$1^",j("CARET",`^${_[w.LONECARET]}${_[w.XRANGEPLAIN]}$`),j("CARETLOOSE",`^${_[w.LONECARET]}${_[w.XRANGEPLAINLOOSE]}$`),j("COMPARATORLOOSE",`^${_[w.GTLT]}\\s*(${_[w.LOOSEPLAIN]})$|^$`),j("COMPARATOR",`^${_[w.GTLT]}\\s*(${_[w.FULLPLAIN]})$|^$`),j("COMPARATORTRIM",`(\\s*)${_[w.GTLT]}\\s*(${_[w.LOOSEPLAIN]}|${_[w.XRANGEPLAIN]})`,!0),i.comparatorTrimReplace="$1$2$3",j("HYPHENRANGE",`^\\s*(${_[w.XRANGEPLAIN]})\\s+-\\s+(${_[w.XRANGEPLAIN]})\\s*$`),j("HYPHENRANGELOOSE",`^\\s*(${_[w.XRANGEPLAINLOOSE]})\\s+-\\s+(${_[w.XRANGEPLAINLOOSE]})\\s*$`),j("STAR","(<|>)?=?\\s*\\*"),j("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),j("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(qn,qn.exports)),qn.exports}var Pr,ii;function La(){if(ii)return Pr;ii=1;const n=Object.freeze({loose:!0}),i=Object.freeze({});return Pr=c=>c?typeof c!="object"?n:c:i,Pr}var Lr,si;function Aa(){if(si)return Lr;si=1;const n=/^[0-9]+$/,i=(c,d)=>{const m=n.test(c),T=n.test(d);return m&&T&&(c=+c,d=+d),c===d?0:m&&!T?-1:T&&!m?1:c<d?-1:1};return Lr={compareIdentifiers:i,rcompareIdentifiers:(c,d)=>i(d,c)},Lr}var Ar,ai;function Da(){if(ai)return Ar;ai=1;const n=ti(),{MAX_LENGTH:i,MAX_SAFE_INTEGER:a}=ri(),{safeRe:c,t:d}=Pa(),m=La(),{compareIdentifiers:T}=Aa();class N{constructor(w,$){if($=m($),w instanceof N){if(w.loose===!!$.loose&&w.includePrerelease===!!$.includePrerelease)return w;w=w.version}else if(typeof w!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof w}".`);if(w.length>i)throw new TypeError(`version is longer than ${i} characters`);n("SemVer",w,$),this.options=$,this.loose=!!$.loose,this.includePrerelease=!!$.includePrerelease;const P=w.trim().match($.loose?c[d.LOOSE]:c[d.FULL]);if(!P)throw new TypeError(`Invalid Version: ${w}`);if(this.raw=w,this.major=+P[1],this.minor=+P[2],this.patch=+P[3],this.major>a||this.major<0)throw new TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw new TypeError("Invalid patch version");P[4]?this.prerelease=P[4].split(".").map(Y=>{if(/^[0-9]+$/.test(Y)){const G=+Y;if(G>=0&&G<a)return G}return Y}):this.prerelease=[],this.build=P[5]?P[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(w){if(n("SemVer.compare",this.version,this.options,w),!(w instanceof N)){if(typeof w=="string"&&w===this.version)return 0;w=new N(w,this.options)}return w.version===this.version?0:this.compareMain(w)||this.comparePre(w)}compareMain(w){return w instanceof N||(w=new N(w,this.options)),T(this.major,w.major)||T(this.minor,w.minor)||T(this.patch,w.patch)}comparePre(w){if(w instanceof N||(w=new N(w,this.options)),this.prerelease.length&&!w.prerelease.length)return-1;if(!this.prerelease.length&&w.prerelease.length)return 1;if(!this.prerelease.length&&!w.prerelease.length)return 0;let $=0;do{const P=this.prerelease[$],Y=w.prerelease[$];if(n("prerelease compare",$,P,Y),P===void 0&&Y===void 0)return 0;if(Y===void 0)return 1;if(P===void 0)return-1;if(P===Y)continue;return T(P,Y)}while(++$)}compareBuild(w){w instanceof N||(w=new N(w,this.options));let $=0;do{const P=this.build[$],Y=w.build[$];if(n("build compare",$,P,Y),P===void 0&&Y===void 0)return 0;if(Y===void 0)return 1;if(P===void 0)return-1;if(P===Y)continue;return T(P,Y)}while(++$)}inc(w,$,P){switch(w){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",$,P);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",$,P);break;case"prepatch":this.prerelease.length=0,this.inc("patch",$,P),this.inc("pre",$,P);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",$,P),this.inc("pre",$,P);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const Y=Number(P)?1:0;if(!$&&P===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[Y];else{let G=this.prerelease.length;for(;--G>=0;)typeof this.prerelease[G]=="number"&&(this.prerelease[G]++,G=-2);if(G===-1){if($===this.prerelease.join(".")&&P===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(Y)}}if($){let G=[$,Y];P===!1&&(G=[$]),T(this.prerelease[0],$)===0?isNaN(this.prerelease[1])&&(this.prerelease=G):this.prerelease=G}break}default:throw new Error(`invalid increment argument: ${w}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Ar=N,Ar}var Dr,ui;function ci(){if(ui)return Dr;ui=1;const n=Da();return Dr=(a,c,d)=>new n(a,d).compare(new n(c,d)),Dr}var Mr,li;function Ma(){if(li)return Mr;li=1;const n=ci();return Mr=(a,c,d)=>n(a,c,d)>=0,Mr}var ja=Ma();const hn=kr(ja),fi="16.9.0",Fa=0,$a=1;function Ba(n,i,a){return n===$a?"development":n===Fa?i!=="unknown"&&hn(i,"18.0.0")&&typeof a=="function"?"profiling":"production":"unknown"}function jr({rendererPackageName:n,version:i,bundleType:a,injectProfilingHooks:c}){return(typeof i!="string"||!/^\d+\.\d+\.\d+(-\S+)?$/.test(i))&&(i="unknown"),{name:n||"unknown",version:i,bundleType:Ba(a,i,c)}}function Ka(n){const i=jr(n);return i.name!=="react-dom"&&i.name!=="react-native-renderer"?{reason:'Unsupported renderer name, only "react-dom" is supported',info:i}:i.version==="unknown"||!hn(i.version,fi)?{reason:`Unsupported renderer version, only v${fi}+ is supported`,info:i}:!1}function qa(n){const{attachRenderer:i,existingHook:a,onUnsupportedRenderer:c,onActivedRenderer:d}=n,m=new Map,T=new Map;let N=0;const _=new Map;return{supportsFiber:!0,renderers:_,inject($){let P=++N;if(Ct.clientHost==="playground"&&P===1)return P;typeof a.inject=="function"&&(P=a.inject($)),_.set(P,$);const Y=Ka($);return Y?(Pe.warn({reason:Y.reason,info:Y.info}),c({id:P,...Y.info,reason:Y.reason})):pt.rendererId?P===pt.rendererId&&T.set(P,i(P,$,!0)):T.set(P,i(P,$)),P},onCommitFiberUnmount($,P){typeof a.onCommitFiberUnmount=="function"&&a.onCommitFiberUnmount($,P);const Y=T.get($);if(Y)try{Y.handleCommitFiberUnmount(P)}catch(G){Pe.error(G)}},onCommitFiberRoot($,P,Y){typeof a.onCommitFiberRoot=="function"&&a.onCommitFiberRoot($,P,Y);const G=T.get($);if(G){const j=_.get($);if(!m.get($)&&j){m.set($,P);const te=P.containerInfo;d({id:$,...jr(j),rootId:te.id,rootTagName:te.nodeName.toLowerCase()})}try{G.handleCommitFiberRoot(P,Y)}catch(te){Pe.error(te)}}},onPostCommitFiberRoot($,P){typeof a.onPostCommitFiberRoot=="function"&&a.onPostCommitFiberRoot($,P);const Y=T.get($);if(Y)try{Y.handlePostCommitFiberRoot(P)}catch(G){Pe.error(G)}},getFiberRoot($){return m.get($)}}}function Ua(n){const{target:i,attachRenderer:a,onUnsupportedRenderer:c,onActivedRenderer:d}=n,m=i.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(i.hasOwnProperty("__REACT_DEVTOOLS_GLOBAL_HOOK__")&&m[Kn]===Kn)return i.__REACT_DEVTOOLS_GLOBAL_HOOK__;const T=qa({attachRenderer:a,existingHook:{...m},onUnsupportedRenderer:c,onActivedRenderer:d});if(m){m[Kn]=Kn;for(const[N,_]of Object.entries(T)){const w=N;typeof _=="function"&&(delete m[w],m[w]=_)}}else Object.defineProperty(i,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!1,enumerable:!1,get(){return T}});return i.__REACT_DEVTOOLS_GLOBAL_HOOK__}var Fr,di;function Ha(){if(di)return Fr;di=1;const n=ci();return Fr=(a,c,d)=>n(a,c,d)>0,Fr}var za=Ha();const pi=kr(za),hi=new WeakMap,Un=new Map;function ht(n,i=""){const a=hi.get(n);if(typeof a=="string")return a;let c;if(n&&(typeof n.displayName=="string"?c=n.displayName:typeof n.name=="string"&&n.name!==""&&(c=n.name)),c||(c=`Anonymous${i}`),Un.has(c)){const d=Un.get(c)||2;Un.set(c,d+1),c+=`\`${String(d)}`}else Un.set(c,2);return hi.set(n,c),c}const $r=60111,Br="Symbol(react.concurrent_mode)",mi=60110,Kr="Symbol(react.context)",qr="Symbol(react.async_mode)",Va=60112,yi="Symbol(react.forward_ref)",gi="Symbol(react.fragment)",Ga="Symbol(react.lazy)",Wa=60115,vi="Symbol(react.memo)",bi=60114,wi="Symbol(react.profiler)",Ei=60109,Ur="Symbol(react.provider)",Xa=60119,Ya="Symbol(react.scope)",_i=60108,Oi="Symbol(react.strict_mode)";function Qa(n){const i={DidCapture:128,NoFlags:0,PerformedWork:1,Placement:2,Incomplete:8192};let a={ImmediatePriority:99,UserBlockingPriority:98,NormalPriority:97,LowPriority:96,IdlePriority:95,NoPriority:90};pi(n,"17.0.2")&&(a={ImmediatePriority:1,UserBlockingPriority:2,NormalPriority:3,LowPriority:4,IdlePriority:5,NoPriority:0});let c=null;pi(n,"17.0.1")?c={CacheComponent:24,ClassComponent:1,ContextConsumer:9,ContextProvider:10,CoroutineComponent:-1,CoroutineHandlerPhase:-1,DehydratedSuspenseComponent:18,ForwardRef:11,Fragment:7,FunctionComponent:0,HostComponent:5,HostPortal:4,HostRoot:3,HostText:6,IncompleteClassComponent:17,IndeterminateComponent:2,LazyComponent:16,LegacyHiddenComponent:23,MemoComponent:14,Mode:8,OffscreenComponent:22,Profiler:12,ScopeComponent:21,SimpleMemoComponent:15,SuspenseComponent:13,SuspenseListComponent:19,YieldComponent:-1}:hn(n,"17.0.0-alpha")?c={CacheComponent:-1,ClassComponent:1,ContextConsumer:9,ContextProvider:10,CoroutineComponent:-1,CoroutineHandlerPhase:-1,DehydratedSuspenseComponent:18,ForwardRef:11,Fragment:7,FunctionComponent:0,HostComponent:5,HostPortal:4,HostRoot:3,HostText:6,IncompleteClassComponent:17,IndeterminateComponent:2,LazyComponent:16,LegacyHiddenComponent:24,MemoComponent:14,Mode:8,OffscreenComponent:23,Profiler:12,ScopeComponent:21,SimpleMemoComponent:15,SuspenseComponent:13,SuspenseListComponent:19,YieldComponent:-1}:hn(n,"16.6.0-beta.0")?c={CacheComponent:-1,ClassComponent:1,ContextConsumer:9,ContextProvider:10,CoroutineComponent:-1,CoroutineHandlerPhase:-1,DehydratedSuspenseComponent:18,ForwardRef:11,Fragment:7,FunctionComponent:0,HostComponent:5,HostPortal:4,HostRoot:3,HostText:6,IncompleteClassComponent:17,IndeterminateComponent:2,LazyComponent:16,LegacyHiddenComponent:-1,MemoComponent:14,Mode:8,OffscreenComponent:-1,Profiler:12,ScopeComponent:-1,SimpleMemoComponent:15,SuspenseComponent:13,SuspenseListComponent:19,YieldComponent:-1}:hn(n,"16.4.3-alpha")?c={CacheComponent:-1,ClassComponent:2,ContextConsumer:11,ContextProvider:12,CoroutineComponent:-1,CoroutineHandlerPhase:-1,DehydratedSuspenseComponent:-1,ForwardRef:13,Fragment:9,FunctionComponent:0,HostComponent:7,HostPortal:6,HostRoot:5,HostText:8,IncompleteClassComponent:-1,IndeterminateComponent:4,LazyComponent:-1,LegacyHiddenComponent:-1,MemoComponent:-1,Mode:10,OffscreenComponent:-1,Profiler:15,ScopeComponent:-1,SimpleMemoComponent:-1,SuspenseComponent:16,SuspenseListComponent:-1,YieldComponent:-1}:c={CacheComponent:-1,ClassComponent:2,ContextConsumer:12,ContextProvider:13,CoroutineComponent:7,CoroutineHandlerPhase:8,DehydratedSuspenseComponent:-1,ForwardRef:14,Fragment:10,FunctionComponent:1,HostComponent:5,HostPortal:4,HostRoot:3,HostText:6,IncompleteClassComponent:-1,IndeterminateComponent:0,LazyComponent:-1,LegacyHiddenComponent:-1,MemoComponent:-1,Mode:11,OffscreenComponent:-1,Profiler:15,ScopeComponent:-1,SimpleMemoComponent:-1,SuspenseComponent:16,SuspenseListComponent:-1,YieldComponent:9};function d(D){const K=typeof D=="object"&&D!==null?D.$$typeof:D;return typeof K=="symbol"?K.toString():K}const{CacheComponent:m,ClassComponent:T,IncompleteClassComponent:N,FunctionComponent:_,IndeterminateComponent:w,ForwardRef:$,HostRoot:P,HostComponent:Y,HostPortal:G,HostText:j,Fragment:te,LazyComponent:fe,LegacyHiddenComponent:ue,MemoComponent:me,OffscreenComponent:Te,Profiler:se,ScopeComponent:M,SimpleMemoComponent:Q,SuspenseComponent:U,SuspenseListComponent:de}=c;function _e(D){switch(d(D)){case Wa:case vi:return _e(D.type);case Va:case yi:return D.render;default:return D}}function H(D){const{elementType:K,type:q,tag:ve}=D;let B=q;switch(typeof q=="object"&&q!==null&&(B=_e(q)),ve){case m:return"Cache";case T:case N:case _:case w:return ht(B);case $:return(q==null?void 0:q.displayName)||ht(B);case P:return"HostRoot";case Y:return`<${q}>`;case G:return"#portal";case j:return"#text";case te:return"Fragment";case fe:return"Lazy";case me:case Q:return(K==null?void 0:K.displayName)||(q==null?void 0:q.displayName)||ht(B);case U:return"Suspense";case ue:return"LegacyHidden";case Te:return"Offscreen";case M:return"Scope";case de:return"SuspenseList";case se:return"Profiler";default:switch(d(q)){case $r:case Br:case qr:return null;case Ei:case Ur:{const ie=D.type._context||D.type.context;return`${ht(ie,"Context")}.Provider`}case mi:case Kr:{const ie=D.type._context||D.type;return`${ht(ie,"Context")}.Consumer`}case _i:case Oi:return"StrictMode";case bi:case wi:return`Profiler(${D.memoizedProps.id})`;case Xa:case Ya:return"Scope";default:return null}}}return{getDisplayNameForFiber:H,getTypeSymbol:d,ReactPriorityLevels:a,ReactTypeOfWork:c,ReactTypeOfSideEffect:i}}function Za(n){return(n.flags!==void 0?n.flags:n.effectTag)??0}const Ja=["alternate","child","sibling","return","current","dependencies","stateNode","_debugOwner","firstEffect","lastEffect","nextEffect","updateQueue","memoizedState","memoizedProps","pendingProps"],eu=["_reactInternals","_reactInternalInstance"],tu=class{constructor(n){this.objects=n}};function nu(n,i,a){const c=new Set,d=new Set,m=new Set,T=new Set,N={candidates:0,leaks:0};let _=null,w=null;new FinalizationRegistry(B=>{c.delete(B);for(const ae of B){const ie=ae.deref();ie!==void 0&&($.register(ie,ae),d.add(ae),m.add(ae))}te()});const $=new FinalizationRegistry(B=>{d.delete(B),m.has(B)?m.delete(B):T.add(B),te()});function P(B){const ae=Array.isArray(B)?new Set(B):!1;let ie=new tu(Object.create(null));for(const ge of[...d].sort((Ie,Ce)=>Ie.tag<Ce.tag?-1:1))ge.deref()!==void 0&&(!ae||ae.has(ge.fiberId))&&(ie.objects[ge.tag]=ge);return{get objects(){return(ie==null?void 0:ie.objects)||null},get markedObjects(){return ie},release(){ie=null}}}function Y(){const B=[],ae=[...d].map(ie=>ie.tag);w!==null&&(clearTimeout(w),w=null);for(const ie of c)for(const ge of ie)ge.alive&&B.push(ge.tag);Pe.log(`track React objects for memory leaks (candidates: ${N.candidates!==B.length?`${N.candidates} → ${B.length}`:B.length}, leaks: ${N.leaks!==d.size?`${N.leaks} → ${d.size}`:d.size}):`,{candidates:B,leaks:ae}),N.candidates=B.length,N.leaks=d.size}function G(){w===null&&(w=setTimeout(Y,10))}function j(){_!==null&&(clearTimeout(_),_=null),(m.size||T.size)&&(n({op:"maybe-leaks",commitId:-1,added:[...m].map(B=>B.descriptor),removed:[...T].map(B=>B.descriptor)}),m.clear(),T.clear()),G()}function te(){_===null&&(_=setTimeout(j,100))}function fe(B,ae,ie,ge=null,Ie=null){}function ue(B,ae){for(const ie of ae)B[ie]&&(B[ie]=null)}function me(B){for(const ae of B){const ie=ae.deref();if(ie!==void 0)switch(ae.type){case Ia:case Ca:{ue(ie,Ja);break}case Sa:{if(ie instanceof HTMLElement){for(const ge of Object.getOwnPropertyNames(ie)){const Ie=ie[ge];Ie!==null&&typeof Ie=="object"&&(ie[ge]=null)}ie.remove()}ue(ie,eu);break}}}}function Te(B){B.firstEffect&&!a.has(B.firstEffect)&&(B.firstEffect=null),B.lastEffect&&!a.has(B.lastEffect)&&(B.lastEffect=null),B.child&&!a.has(B.child)&&(B.child=null),B.sibling&&!a.has(B.sibling)&&(B.sibling=null)}function se(B){Te(B),B.alternate&&Te(B.alternate),B.child&&se(B.child),B.sibling&&se(B.sibling)}function M(){me(d);for(const B of c)me(B);for(const B of i.values())se(B)}const Q="LeakedObjectsRRTMarker";let U=[],de=null,_e=null;function H(B){const ae={fn:B};return U.push(ae),()=>{U=U.filter(ie=>ie!==ae)}}function D(){for(const{fn:B}of U)B(de)}function K(){const B=window;_e!==null&&(_e.release(),_e=null),de!==null&&(delete B[de.globalName],de=null)}function q(){de!==null&&(K(),D())}function ve(B){const ae=window,ie=de;K();let ge=0,Ie=Q;for(;Ie in ae;)ge++,Ie=Q+ge;const Ce=P(B),Ae=Object.keys(Ce.objects||{}).length,Ve=[...new Set(Object.values(Ce.objects||{}).map(We=>We.fiberId))];return Ae>0&&(ae[Ie]=Ce.markedObjects,_e=Ce,de={globalName:Ie,objectRefsCount:Ae,fiberIds:Ve}),de!==ie&&D(),de}return{trackObjectForLeaking:fe,getLeakedObjectsProbe:P,breakLeakedObjectRefs:M,getExposedToGlobalLeaksState:()=>de,subscribeToExposedToGlobalLeaksState:H,exposeLeakedObjectsToGlobal:ve,cancelExposingLeakedObjectsToGlobal:q}}function ru(n,i){const a=n.reconcilerVersion||n.version||"",{getDisplayNameForFiber:c,getTypeSymbol:d,ReactPriorityLevels:m,ReactTypeOfWork:T,ReactTypeOfSideEffect:N}=Qa(a),{PerformedWork:_}=N,{ClassComponent:w,DehydratedSuspenseComponent:$,ForwardRef:P,Fragment:Y,FunctionComponent:G,HostRoot:j,HostPortal:te,HostComponent:fe,HostText:ue,IncompleteClassComponent:me,IndeterminateComponent:Te,LegacyHiddenComponent:se,MemoComponent:M,OffscreenComponent:Q,Profiler:U,SimpleMemoComponent:de,SuspenseComponent:_e,SuspenseListComponent:H,ContextConsumer:D,LazyComponent:K}=T,q=new WeakMap;let ve=0;const B=new Map;let ae=1;const ie=new WeakMap,ge=new Map,Ie=new Map,Ce=new Map,Ae=new Map,{trackObjectForLeaking:Ve,...We}=nu(i,Ae,q);function tt(oe,ce){switch(oe.tag){case $:return!0;case te:case fe:if(ce)return!0;break;case ue:case Y:case se:case Q:return!0;case j:return!1;default:switch(d(oe.type)){case $r:case Br:case qr:return!0;default:return!1}}}function ut(oe){switch(oe.tag){case w:case me:return dn;case G:case Te:return Cr;case M:case de:return pn;case P:return Bn;case j:return Wo;case fe:return Xo;case ue:return Tr;case te:return Ea;case U:return Yo;case _e:return _a;case H:return Oa;case Y:return Qo;default:switch(d(oe.type)){case Ei:case Ur:return Sr;case mi:case Kr:return Rr;case bi:case wi:return Yo;case $r:case Br:case qr:case _i:case Oi:default:return Qo}}}function Xe(oe,ce){if(oe===null)switch(ce){case ue:oe="#text";break;default:return-1}if(typeof oe!="object"&&typeof oe!="function"){const Be=ge.get(oe);Be===void 0?ge.set(oe,oe={}):oe=Be}let be=ie.get(oe);return be===void 0&&ie.set(oe,be=ae++),be}function ye(oe){let ce=null,be=null,{child:Be}=oe;for(let gt=0;gt<3&&Be!==null;gt++){const nt=c(Be);if(nt!==null&&(typeof Be.type=="function"?ce=nt:be===null&&(be=nt)),ce!==null)break;Be=Be.child}return ce||be||"Anonymous"}function Ue(oe){let ce;const{alternate:be}=oe;return q.has(oe)?ce=q.get(oe):be!==null&&q.has(be)&&(ce=q.get(be)),typeof ce>"u"&&(ce=++ve),q.has(oe)||(q.set(oe,ce),B.set(ce,oe)),be!==null&&!q.has(be)&&q.set(be,ce),ce}function ne(oe){if(q.has(oe))return q.get(oe)||null;const{alternate:ce}=oe;return ce!==null&&q.has(ce)&&q.get(ce)||null}function mt(oe){const ce=ne(oe);if(ce===null)throw Error(`Could not find ID for Fiber "${c(oe)||""}"`);return ce}function Rt(oe){const{_debugOwner:ce=null}=oe;if(ce!==null)return Ue(ce);let{return:be=null}=oe;for(;be!==null;){if(tt(be)){be=be.return;continue}if(be._debugOwner)return Ue(be);if(be.tag===P||be.tag===M||be.tag===K)return Rt(be);break}return-1}function De(oe){return B.get(oe)||null}function Tt(oe){return n.findFiberByHostInstance(oe)}function Dt(oe,ce){var kt,bt;const be=c(oe),{stateNode:Be,alternate:gt,memoizedState:nt}=ce||oe,Ze=ne(oe);if(typeof Ze!="number"){console.error("[React Render Tracker] removeFiber can't resolve an id by a given fiber");return}if(B.delete(Ze),q.delete(oe),gt&&q.delete(gt),nt&&"next"in nt){let ct=nt;for(;ct!==null;)typeof((kt=ct.queue)==null?void 0:kt.dispatch)=="function"?Ve(ct.queue.dispatch,Ze,Zo,be,ct.queue.dispatch.hookIdx):typeof((bt=ct.memoizedState)==null?void 0:bt.create)=="function"&&Ve(ct.memoizedState.create,Ze,Zo,be,ct.memoizedState.create.hookIdx),ct=ct.next}}function yt(oe){return oe.tag===j}function vn(oe,ce){const be=ye(ce),Be=Ce.get(be)||0,gt=`${be}:${Be}`;Ce.set(be,Be+1),Ie.set(oe,gt),Ae.set(oe,ce)}function bn(oe){return Ie.get(oe)||null}function wn(oe){Ae.delete(oe);const ce=Ie.get(oe);if(ce===void 0)throw new Error("Expected root pseudo key to be known.");const be=ce.substring(0,ce.lastIndexOf(":")),Be=Ce.get(be);if(Be===void 0)throw new Error("Expected counter to be known.");Be>1?Ce.set(be,Be-1):Ce.delete(be),Ie.delete(oe)}function En(oe,ce){switch(ce.tag){case w:case G:case D:case M:case de:return(Za(ce)&_)===_;default:return oe.memoizedProps!==ce.memoizedProps||oe.memoizedState!==ce.memoizedState||oe.ref!==ce.ref}}return{ReactTypeOfSideEffect:N,ReactTypeOfWork:T,ReactPriorityLevels:m,getElementTypeForFiber:ut,getFiberTypeId:Xe,getOrGenerateFiberId:Ue,getFiberIdThrows:mt,getFiberIdUnsafe:ne,getFiberById:De,getFiberOwnerId:Rt,removeFiber:Dt,getDisplayNameForFiber:c,getDisplayNameForRoot:ye,isFiberRoot:yt,setRootPseudoKey:vn,getRootPseudoKey:bn,removeRootPseudoKey:wn,didFiberRender:En,shouldFilterFiber:tt,findFiberByHostInstance:Tt,memoryLeaksApi:We}}function ou(n,i){if(Array.isArray(n)&&Array.isArray(i)){let a=0,c=0;for(let d=0;d<n.length&&Object.is(n[d],i[d]);d++,a++);for(let d=n.length-1;d>a&&Object.is(n[d],i[d]);d--,c++);return n.length!==i.length||a!==n.length?{prevLength:n.length,nextLength:i.length,eqLeft:a,eqRight:c}:!1}}function Ii(n){if(n)switch(typeof n){case"string":return n;case"function":return ht(n);case"symbol":if(String(n)===gi)return"";default:if(n.$$typeof)switch(String(n.$$typeof)){case gi:return"";case vi:case yi:case Ga:return ht(n);case Ur:{const i=n._context||n.context;return`${ht(i,"Context")}.Provider`}case Kr:{const i=n._context||n.context;return`${ht(i,"Context")}.Provider`}default:return String(n.$$typeof)}}return"Unknown"}const{hasOwnProperty:iu,toString:Ci}=Object.prototype;function Si(n){return typeof n=="object"&&n!==null&&n.constructor===Object}function su(n){return typeof(n==null?void 0:n.$$typeof)=="symbol"}function Zt(n){var i;switch(typeof n){case"boolean":case"undefined":case"number":case"bigint":case"symbol":return String(n);case"function":return"ƒn";case"string":return JSON.stringify(n.length>20?`${n.slice(0,20)}…`:n);case"object":if(n===null)return"null";if(Array.isArray(n))return n.length?"[…]":"[]";if(typeof n.$$typeof=="symbol"&&String(n.$$typeof)==="Symbol(react.element)")return`<${Ii(n.type)}${Object.keys(n.props).length>0?" …":""}/>`;if(Si(n)){for(const c in n)if(iu.call(n,c))return"{…}";return"{}"}const a=Ci.call(n).slice(8,-1);if(a==="Object"){const c=(i=Object.getPrototypeOf(n))==null?void 0:i.constructor;if(typeof c=="function")return`${c.displayName||c.name||""}{…}`}return`${a}{…}`;default:return""}}function mn(n,i=!0,a=0){var c;if(a>30)return"...";switch(typeof n){case"string":return n.length>50?`"${String(n).slice(0,50)}..."`:`"${String(n)}"`;case"symbol":case"undefined":case"boolean":case"number":case"bigint":return i?`"${String(n)}"`:String(n);case"function":return"ƒn";case"object":if(n===null)return"null";if(n&&su(n))return`<${Ii(n.type)||"UnknowComponent"} ${n.props?" …":""} />${mn(n.props,!1,a++)}`;if(Array.isArray(n))return n.length>10?`Array<${n.length}>`:`[${n.map(m=>mn(m,!1,a++)).join(",")}]`;if(Si(n)){let m=Object.keys(n),T=!1;return m.length>20&&(m=m.slice(0,20),T=!0),`{${m.map(N=>`"${N}": ${mn(n[N],!1,a++)}`)}${T?",【more keys hidden】:...":""}}`}const d=Ci.call(n).slice(8,-1);if(d==="Object"){const m=(c=Object.getPrototypeOf(n))==null?void 0:c.constructor;if(typeof m=="function")return`"${m.displayName||m.name||""}{…}"`}return`${d}{…}`;default:return""}}function au(n,i){if(Ct.diffMode==="full")return{prev:mn(n),next:mn(i)}}function Ri(n){return n!==null&&typeof n=="object"&&n.constructor===Object&&typeof n.$$typeof!="symbol"}const{hasOwnProperty:Hn}=Object.prototype;function uu(n,i){if(Ri(n)&&Ri(i)){const a=[];let c=0,d=0;for(const m in n)Hn.call(n,m)&&(c++,Hn.call(i,m)?Object.is(n[m],i[m])||d++<3&&a.push({name:m,prev:Zt(n[m]),next:Zt(i[m])}):d++<3&&a.push({name:m,prev:Zt(n[m])}));for(const m in i)Hn.call(i,m)&&(Hn.call(n,m)||(c++,d++<3&&a.push({name:m,next:Zt(i[m])})));return d>0?{keys:c,diffKeys:d,sample:a}:!1}}function cu(n,i){if(n===null)return{displayName:n,hocDisplayNames:null};let a=[];if((i===dn||i===Cr||i===Bn||i===pn)&&n.includes("(")){const c=n.match(/[^()]+/g);c!==null&&(n=c.pop()||"",a=c)}return i===pn?a.unshift("Memo"):i===Bn&&a.unshift("ForwardRef"),{displayName:n,hocDisplayNames:a.length>0?a:null}}const zn="<unknown>",lu=Object.hasOwn||((n,i)=>Object.prototype.hasOwnProperty.call(n,i));function Ti(n,i){const a=[];return new Proxy(n,{get(c,d){if(typeof d=="string"){const m=Number(d);if(isFinite(m)&&lu(n,d))return typeof a[m]>"u"&&(a[m]=i(n[m])),a[m]}return c[d]}})}function yn(n){const i=ki()[n+2];return i!=null&&i.loc?i.loc:null}function ki(n=1,i=25){const a=Error.prepareStackTrace,c=Error.stackTraceLimit;try{Error.stackTraceLimit=i,Error.prepareStackTrace=(T,N)=>(d=Ti(N.slice(n),fu),"");let d=null;const m=new Error().stack;if(d===null&&m){const T=m.trim().split(`
3
+ `)}const i=window.__PERF_MONITOR_DEVTOOLS_CONTEXT__;typeof i=="object"&&i!==null&&(pt={...pt,...i}),Pe.log("config registered, current config",{...pt})}}function ca(){var n,i,a;if(typeof document<"u"){const c=window.__PERF_MONITOR_DEVTOOLS_ENV__;(typeof c!="object"||c===null)&&(window.__PERF_MONITOR_DEVTOOLS_ENV__={}),(n=window.__PERF_MONITOR_DEVTOOLS_ENV__).diffMode??(n.diffMode="lite"),(i=window.__PERF_MONITOR_DEVTOOLS_ENV__).updateTrace??(i.updateTrace=!0),(a=window.__PERF_MONITOR_DEVTOOLS_ENV__).commitTrace??(a.commitTrace=!0),window.__PERF_MONITOR_DEVTOOLS_ENV__.coreId=aa,window.__PERF_MONITOR_DEVTOOLS_ENV__.coreVersion=sa,window.__PERF_MONITOR_DEVTOOLS_ENV__.pageUrl=location.href,Ct=window.__PERF_MONITOR_DEVTOOLS_ENV__,Pe.log("env registered, current env",{...Ct})}}function la(){const n=window.__PERF_MONITOR_DEVTOOLS_HOOK__;n?(n.getEnv=()=>Ct,n.getConfig=()=>pt):window.__PERF_MONITOR_DEVTOOLS_HOOK__={getEnv:()=>Ct,getConfig:()=>pt},Pe.log("hook registered",{...window.__PERF_MONITOR_DEVTOOLS_HOOK__})}function fa(){return pt}function da(n){const i={...pt,...n};Pe.log(`update config, old: ${JSON.stringify(pt)}, new: ${JSON.stringify(i)}`),localStorage.setItem(jn,JSON.stringify(i))}function pa(){Pe.log("config removed"),localStorage.removeItem(jn)}function Fn(){return Ct}function ha(n){window.__PERF_MONITOR_DEVTOOLS_ENV__={...window.__PERF_MONITOR_DEVTOOLS_ENV__,...n},Ct=window.__PERF_MONITOR_DEVTOOLS_ENV__}function ma(){ca(),ua(),la()}var $n=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ya(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ir,Vo;function ga(){if(Vo)return Ir;Vo=1;var n="Expected a function",i=NaN,a="[object Symbol]",c=/^\s+|\s+$/g,d=/^[-+]0x[0-9a-f]+$/i,m=/^0b[01]+$/i,T=/^0o[0-7]+$/i,N=parseInt,_=typeof $n=="object"&&$n&&$n.Object===Object&&$n,w=typeof self=="object"&&self&&self.Object===Object&&self,$=_||w||Function("return this")(),P=Object.prototype,Y=P.toString,G=Math.max,j=Math.min,te=function(){return $.Date.now()};function fe(M,Q,U){var de,_e,H,D,K,q,ve=0,B=!1,ae=!1,ie=!0;if(typeof M!="function")throw new TypeError(n);Q=se(Q)||0,ue(U)&&(B=!!U.leading,ae="maxWait"in U,H=ae?G(se(U.maxWait)||0,Q):H,ie="trailing"in U?!!U.trailing:ie);function ge(ye){var Ue=de,ne=_e;return de=_e=void 0,ve=ye,D=M.apply(ne,Ue),D}function Ie(ye){return ve=ye,K=setTimeout(Ve,Q),B?ge(ye):D}function Ce(ye){var Ue=ye-q,ne=ye-ve,mt=Q-Ue;return ae?j(mt,H-ne):mt}function Ae(ye){var Ue=ye-q,ne=ye-ve;return q===void 0||Ue>=Q||Ue<0||ae&&ne>=H}function Ve(){var ye=te();if(Ae(ye))return We(ye);K=setTimeout(Ve,Ce(ye))}function We(ye){return K=void 0,ie&&de?ge(ye):(de=_e=void 0,D)}function tt(){K!==void 0&&clearTimeout(K),ve=0,de=q=_e=K=void 0}function ut(){return K===void 0?D:We(te())}function Xe(){var ye=te(),Ue=Ae(ye);if(de=arguments,_e=this,q=ye,Ue){if(K===void 0)return Ie(q);if(ae)return K=setTimeout(Ve,Q),ge(q)}return K===void 0&&(K=setTimeout(Ve,Q)),D}return Xe.cancel=tt,Xe.flush=ut,Xe}function ue(M){var Q=typeof M;return!!M&&(Q=="object"||Q=="function")}function me(M){return!!M&&typeof M=="object"}function Te(M){return typeof M=="symbol"||me(M)&&Y.call(M)==a}function se(M){if(typeof M=="number")return M;if(Te(M))return i;if(ue(M)){var Q=typeof M.valueOf=="function"?M.valueOf():M;M=ue(Q)?Q+"":Q}if(typeof M!="string")return M===0?M:+M;M=M.replace(c,"");var U=m.test(M);return U||T.test(M)?N(M.slice(2),U?2:8):d.test(M)?i:+M}return Ir=fe,Ir}var va=ga();const ba=ya(va),Go="__perf-monitor-devtools-container__",wa="/__react-render-tracker__/open",dn=1,Cr=2,pn=3,Bn=4,Sr=5,Rr=6,Wo=7,Xo=8,Tr=9,Ea=10,_a=11,Oa=12,Yo=13,Qo=14,Ia=0,Ca=1,Sa=2,Zo=3,Jo=n=>{fetch(`${wa}?filename=${n.fileName}&line=${n.lineNumber}&col=${n.columnNumber}`)};let he;const Ra={reloadPage:()=>location.reload(),openFile:Jo,getConfig:fa,updateConfig:da,resetConfig:pa,updateEnv:ha,getEnv:Fn};function Ta(){const n=Fn();he=ia(Ra,n.clientHost==="separate"?"broadcast":"message")}function ka({breakLeakedObjectRefs:n,getExposedToGlobalLeaksState:i,subscribeToExposedToGlobalLeaksState:a,cancelExposingLeakedObjectsToGlobal:c,exposeLeakedObjectsToGlobal:d,highlightApi:m,locationApi:T}){var G;Pe.log("remote commands registered"),(G=he.memoryLeaks)==null||G.call(he,i()),a(j=>{var te;return(te=he.memoryLeaks)==null?void 0:te.call(he,j)}),he.$functions.breakLeakedObjectRefs=n,he.$functions.exposeLeakedObjectsToGlobal=d,he.$functions.cancelExposingLeakedObjectsToGlobal=c;const{startHighlight:N,stopHighlight:_,startInspect:w,stopInspect:$,inspect:P}=m;m.subscribe(j=>{var te;return(te=he.highlighting)==null?void 0:te.call(he,j)}),he.$functions.startHighlight=N,he.$functions.stopHighlight=_,he.$functions.startInspect=w,he.$functions.stopInspect=$,he.$functions.highlightRenderer=j=>{var fe,ue;const te=(ue=(fe=window.__REACT_DEVTOOLS_GLOBAL_HOOK__)==null?void 0:fe.getFiberRoot)==null?void 0:ue.call(fe,j);if(te){const me=te.containerInfo;me&&P([me])}else Pe.warn(`failed to inspect renderer: ${j}, inspect renderer needs to be in the development environment.`)};const{resolveFiberLoc:Y}=T;he.$functions.resolveFiberLoc=Y}function xa({highlightApi:n}){Pe.log("remote shortcuts registered");const{toggleFileOpen:i}=n;addEventListener("keydown",a=>{var c;a.code==="KeyD"&&a.altKey&&a.shiftKey&&(Pe.log("panel shortcut pressed"),(c=he.togglePanelOpen)==null||c.call(he))}),addEventListener("keydown",a=>{var c;a.code==="KeyX"&&a.altKey&&a.shiftKey&&(Pe.log("inspect shortcut pressed"),(c=he.toggleInspectMode)==null||c.call(he))}),addEventListener("keydown",a=>{a.altKey&&(Pe.log("highlight file shortcut pressed"),i(!0))}),addEventListener("keyup",a=>{a.key==="Alt"&&(Pe.log("highlight file shortcut released"),i(!1))})}const Kn=Symbol();var Na=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function kr(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var xr,ei;function ti(){return ei||(ei=1,xr=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...i)=>console.error("SEMVER",...i):()=>{}),xr}var Nr,ni;function ri(){if(ni)return Nr;ni=1;const n="2.0.0",i=256,a=Number.MAX_SAFE_INTEGER||9007199254740991,c=16,d=i-6;return Nr={MAX_LENGTH:i,MAX_SAFE_COMPONENT_LENGTH:c,MAX_SAFE_BUILD_LENGTH:d,MAX_SAFE_INTEGER:a,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:n,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Nr}var qn={exports:{}},oi;function Pa(){return oi||(oi=1,(function(n,i){const{MAX_SAFE_COMPONENT_LENGTH:a,MAX_SAFE_BUILD_LENGTH:c,MAX_LENGTH:d}=ri(),m=ti();i=n.exports={};const T=i.re=[],N=i.safeRe=[],_=i.src=[],w=i.t={};let $=0;const P="[a-zA-Z0-9-]",Y=[["\\s",1],["\\d",d],[P,c]],G=te=>{for(const[fe,ue]of Y)te=te.split(`${fe}*`).join(`${fe}{0,${ue}}`).split(`${fe}+`).join(`${fe}{1,${ue}}`);return te},j=(te,fe,ue)=>{const me=G(fe),Te=$++;m(te,Te,fe),w[te]=Te,_[Te]=fe,T[Te]=new RegExp(fe,ue?"g":void 0),N[Te]=new RegExp(me,ue?"g":void 0)};j("NUMERICIDENTIFIER","0|[1-9]\\d*"),j("NUMERICIDENTIFIERLOOSE","\\d+"),j("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${P}*`),j("MAINVERSION",`(${_[w.NUMERICIDENTIFIER]})\\.(${_[w.NUMERICIDENTIFIER]})\\.(${_[w.NUMERICIDENTIFIER]})`),j("MAINVERSIONLOOSE",`(${_[w.NUMERICIDENTIFIERLOOSE]})\\.(${_[w.NUMERICIDENTIFIERLOOSE]})\\.(${_[w.NUMERICIDENTIFIERLOOSE]})`),j("PRERELEASEIDENTIFIER",`(?:${_[w.NUMERICIDENTIFIER]}|${_[w.NONNUMERICIDENTIFIER]})`),j("PRERELEASEIDENTIFIERLOOSE",`(?:${_[w.NUMERICIDENTIFIERLOOSE]}|${_[w.NONNUMERICIDENTIFIER]})`),j("PRERELEASE",`(?:-(${_[w.PRERELEASEIDENTIFIER]}(?:\\.${_[w.PRERELEASEIDENTIFIER]})*))`),j("PRERELEASELOOSE",`(?:-?(${_[w.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${_[w.PRERELEASEIDENTIFIERLOOSE]})*))`),j("BUILDIDENTIFIER",`${P}+`),j("BUILD",`(?:\\+(${_[w.BUILDIDENTIFIER]}(?:\\.${_[w.BUILDIDENTIFIER]})*))`),j("FULLPLAIN",`v?${_[w.MAINVERSION]}${_[w.PRERELEASE]}?${_[w.BUILD]}?`),j("FULL",`^${_[w.FULLPLAIN]}$`),j("LOOSEPLAIN",`[v=\\s]*${_[w.MAINVERSIONLOOSE]}${_[w.PRERELEASELOOSE]}?${_[w.BUILD]}?`),j("LOOSE",`^${_[w.LOOSEPLAIN]}$`),j("GTLT","((?:<|>)?=?)"),j("XRANGEIDENTIFIERLOOSE",`${_[w.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),j("XRANGEIDENTIFIER",`${_[w.NUMERICIDENTIFIER]}|x|X|\\*`),j("XRANGEPLAIN",`[v=\\s]*(${_[w.XRANGEIDENTIFIER]})(?:\\.(${_[w.XRANGEIDENTIFIER]})(?:\\.(${_[w.XRANGEIDENTIFIER]})(?:${_[w.PRERELEASE]})?${_[w.BUILD]}?)?)?`),j("XRANGEPLAINLOOSE",`[v=\\s]*(${_[w.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_[w.XRANGEIDENTIFIERLOOSE]})(?:\\.(${_[w.XRANGEIDENTIFIERLOOSE]})(?:${_[w.PRERELEASELOOSE]})?${_[w.BUILD]}?)?)?`),j("XRANGE",`^${_[w.GTLT]}\\s*${_[w.XRANGEPLAIN]}$`),j("XRANGELOOSE",`^${_[w.GTLT]}\\s*${_[w.XRANGEPLAINLOOSE]}$`),j("COERCEPLAIN",`(^|[^\\d])(\\d{1,${a}})(?:\\.(\\d{1,${a}}))?(?:\\.(\\d{1,${a}}))?`),j("COERCE",`${_[w.COERCEPLAIN]}(?:$|[^\\d])`),j("COERCEFULL",_[w.COERCEPLAIN]+`(?:${_[w.PRERELEASE]})?(?:${_[w.BUILD]})?(?:$|[^\\d])`),j("COERCERTL",_[w.COERCE],!0),j("COERCERTLFULL",_[w.COERCEFULL],!0),j("LONETILDE","(?:~>?)"),j("TILDETRIM",`(\\s*)${_[w.LONETILDE]}\\s+`,!0),i.tildeTrimReplace="$1~",j("TILDE",`^${_[w.LONETILDE]}${_[w.XRANGEPLAIN]}$`),j("TILDELOOSE",`^${_[w.LONETILDE]}${_[w.XRANGEPLAINLOOSE]}$`),j("LONECARET","(?:\\^)"),j("CARETTRIM",`(\\s*)${_[w.LONECARET]}\\s+`,!0),i.caretTrimReplace="$1^",j("CARET",`^${_[w.LONECARET]}${_[w.XRANGEPLAIN]}$`),j("CARETLOOSE",`^${_[w.LONECARET]}${_[w.XRANGEPLAINLOOSE]}$`),j("COMPARATORLOOSE",`^${_[w.GTLT]}\\s*(${_[w.LOOSEPLAIN]})$|^$`),j("COMPARATOR",`^${_[w.GTLT]}\\s*(${_[w.FULLPLAIN]})$|^$`),j("COMPARATORTRIM",`(\\s*)${_[w.GTLT]}\\s*(${_[w.LOOSEPLAIN]}|${_[w.XRANGEPLAIN]})`,!0),i.comparatorTrimReplace="$1$2$3",j("HYPHENRANGE",`^\\s*(${_[w.XRANGEPLAIN]})\\s+-\\s+(${_[w.XRANGEPLAIN]})\\s*$`),j("HYPHENRANGELOOSE",`^\\s*(${_[w.XRANGEPLAINLOOSE]})\\s+-\\s+(${_[w.XRANGEPLAINLOOSE]})\\s*$`),j("STAR","(<|>)?=?\\s*\\*"),j("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),j("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(qn,qn.exports)),qn.exports}var Pr,ii;function La(){if(ii)return Pr;ii=1;const n=Object.freeze({loose:!0}),i=Object.freeze({});return Pr=c=>c?typeof c!="object"?n:c:i,Pr}var Lr,si;function Aa(){if(si)return Lr;si=1;const n=/^[0-9]+$/,i=(c,d)=>{const m=n.test(c),T=n.test(d);return m&&T&&(c=+c,d=+d),c===d?0:m&&!T?-1:T&&!m?1:c<d?-1:1};return Lr={compareIdentifiers:i,rcompareIdentifiers:(c,d)=>i(d,c)},Lr}var Ar,ai;function Da(){if(ai)return Ar;ai=1;const n=ti(),{MAX_LENGTH:i,MAX_SAFE_INTEGER:a}=ri(),{safeRe:c,t:d}=Pa(),m=La(),{compareIdentifiers:T}=Aa();class N{constructor(w,$){if($=m($),w instanceof N){if(w.loose===!!$.loose&&w.includePrerelease===!!$.includePrerelease)return w;w=w.version}else if(typeof w!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof w}".`);if(w.length>i)throw new TypeError(`version is longer than ${i} characters`);n("SemVer",w,$),this.options=$,this.loose=!!$.loose,this.includePrerelease=!!$.includePrerelease;const P=w.trim().match($.loose?c[d.LOOSE]:c[d.FULL]);if(!P)throw new TypeError(`Invalid Version: ${w}`);if(this.raw=w,this.major=+P[1],this.minor=+P[2],this.patch=+P[3],this.major>a||this.major<0)throw new TypeError("Invalid major version");if(this.minor>a||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>a||this.patch<0)throw new TypeError("Invalid patch version");P[4]?this.prerelease=P[4].split(".").map(Y=>{if(/^[0-9]+$/.test(Y)){const G=+Y;if(G>=0&&G<a)return G}return Y}):this.prerelease=[],this.build=P[5]?P[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(w){if(n("SemVer.compare",this.version,this.options,w),!(w instanceof N)){if(typeof w=="string"&&w===this.version)return 0;w=new N(w,this.options)}return w.version===this.version?0:this.compareMain(w)||this.comparePre(w)}compareMain(w){return w instanceof N||(w=new N(w,this.options)),T(this.major,w.major)||T(this.minor,w.minor)||T(this.patch,w.patch)}comparePre(w){if(w instanceof N||(w=new N(w,this.options)),this.prerelease.length&&!w.prerelease.length)return-1;if(!this.prerelease.length&&w.prerelease.length)return 1;if(!this.prerelease.length&&!w.prerelease.length)return 0;let $=0;do{const P=this.prerelease[$],Y=w.prerelease[$];if(n("prerelease compare",$,P,Y),P===void 0&&Y===void 0)return 0;if(Y===void 0)return 1;if(P===void 0)return-1;if(P===Y)continue;return T(P,Y)}while(++$)}compareBuild(w){w instanceof N||(w=new N(w,this.options));let $=0;do{const P=this.build[$],Y=w.build[$];if(n("build compare",$,P,Y),P===void 0&&Y===void 0)return 0;if(Y===void 0)return 1;if(P===void 0)return-1;if(P===Y)continue;return T(P,Y)}while(++$)}inc(w,$,P){switch(w){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",$,P);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",$,P);break;case"prepatch":this.prerelease.length=0,this.inc("patch",$,P),this.inc("pre",$,P);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",$,P),this.inc("pre",$,P);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const Y=Number(P)?1:0;if(!$&&P===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[Y];else{let G=this.prerelease.length;for(;--G>=0;)typeof this.prerelease[G]=="number"&&(this.prerelease[G]++,G=-2);if(G===-1){if($===this.prerelease.join(".")&&P===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(Y)}}if($){let G=[$,Y];P===!1&&(G=[$]),T(this.prerelease[0],$)===0?isNaN(this.prerelease[1])&&(this.prerelease=G):this.prerelease=G}break}default:throw new Error(`invalid increment argument: ${w}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return Ar=N,Ar}var Dr,ui;function ci(){if(ui)return Dr;ui=1;const n=Da();return Dr=(a,c,d)=>new n(a,d).compare(new n(c,d)),Dr}var Mr,li;function Ma(){if(li)return Mr;li=1;const n=ci();return Mr=(a,c,d)=>n(a,c,d)>=0,Mr}var ja=Ma();const hn=kr(ja),fi="16.9.0",Fa=0,$a=1;function Ba(n,i,a){return n===$a?"development":n===Fa?i!=="unknown"&&hn(i,"18.0.0")&&typeof a=="function"?"profiling":"production":"unknown"}function jr({rendererPackageName:n,version:i,bundleType:a,injectProfilingHooks:c}){return(typeof i!="string"||!/^\d+\.\d+\.\d+(-\S+)?$/.test(i))&&(i="unknown"),{name:n||"unknown",version:i,bundleType:Ba(a,i,c)}}function Ka(n){const i=jr(n);return i.name!=="react-dom"&&i.name!=="react-native-renderer"?{reason:'Unsupported renderer name, only "react-dom" is supported',info:i}:i.version==="unknown"||!hn(i.version,fi)?{reason:`Unsupported renderer version, only v${fi}+ is supported`,info:i}:!1}function qa(n){const{attachRenderer:i,existingHook:a,onUnsupportedRenderer:c,onActivedRenderer:d}=n,m=new Map,T=new Map;let N=0;const _=new Map;return{supportsFiber:!0,renderers:_,inject($){let P=++N;if(Ct.clientHost==="playground"&&P===1)return P;typeof a.inject=="function"&&(P=a.inject($)),_.set(P,$);const Y=Ka($);return Y?(Pe.warn({reason:Y.reason,info:Y.info}),c({id:P,...Y.info,reason:Y.reason})):pt.rendererId?P===pt.rendererId&&T.set(P,i(P,$,!0)):T.set(P,i(P,$)),P},onCommitFiberUnmount($,P){typeof a.onCommitFiberUnmount=="function"&&a.onCommitFiberUnmount($,P);const Y=T.get($);if(Y)try{Y.handleCommitFiberUnmount(P)}catch(G){Pe.error(G)}},onCommitFiberRoot($,P,Y){typeof a.onCommitFiberRoot=="function"&&a.onCommitFiberRoot($,P,Y);const G=T.get($);if(G){const j=_.get($);if(!m.get($)&&j){m.set($,P);const te=P.containerInfo;d({id:$,...jr(j),rootId:te.id,rootTagName:te.nodeName.toLowerCase()})}try{G.handleCommitFiberRoot(P,Y)}catch(te){Pe.error(te)}}},onPostCommitFiberRoot($,P){typeof a.onPostCommitFiberRoot=="function"&&a.onPostCommitFiberRoot($,P);const Y=T.get($);if(Y)try{Y.handlePostCommitFiberRoot(P)}catch(G){Pe.error(G)}},getFiberRoot($){return m.get($)}}}function Ua(n){const{target:i,attachRenderer:a,onUnsupportedRenderer:c,onActivedRenderer:d}=n,m=i.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(i.hasOwnProperty("__REACT_DEVTOOLS_GLOBAL_HOOK__")&&m[Kn]===Kn)return i.__REACT_DEVTOOLS_GLOBAL_HOOK__;const T=qa({attachRenderer:a,existingHook:{...m},onUnsupportedRenderer:c,onActivedRenderer:d});if(m){m[Kn]=Kn;for(const[N,_]of Object.entries(T)){const w=N;typeof _=="function"&&(delete m[w],m[w]=_)}}else Object.defineProperty(i,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!1,enumerable:!1,get(){return T}});return i.__REACT_DEVTOOLS_GLOBAL_HOOK__}var Fr,di;function Ha(){if(di)return Fr;di=1;const n=ci();return Fr=(a,c,d)=>n(a,c,d)>0,Fr}var za=Ha();const pi=kr(za),hi=new WeakMap,Un=new Map;function ht(n,i=""){const a=hi.get(n);if(typeof a=="string")return a;let c;if(n&&(typeof n.displayName=="string"?c=n.displayName:typeof n.name=="string"&&n.name!==""&&(c=n.name)),c||(c=`Anonymous${i}`),Un.has(c)){const d=Un.get(c)||2;Un.set(c,d+1),c+=`\`${String(d)}`}else Un.set(c,2);return hi.set(n,c),c}const $r=60111,Br="Symbol(react.concurrent_mode)",mi=60110,Kr="Symbol(react.context)",qr="Symbol(react.async_mode)",Va=60112,yi="Symbol(react.forward_ref)",gi="Symbol(react.fragment)",Ga="Symbol(react.lazy)",Wa=60115,vi="Symbol(react.memo)",bi=60114,wi="Symbol(react.profiler)",Ei=60109,Ur="Symbol(react.provider)",Xa=60119,Ya="Symbol(react.scope)",_i=60108,Oi="Symbol(react.strict_mode)";function Qa(n){const i={DidCapture:128,NoFlags:0,PerformedWork:1,Placement:2,Incomplete:8192};let a={ImmediatePriority:99,UserBlockingPriority:98,NormalPriority:97,LowPriority:96,IdlePriority:95,NoPriority:90};pi(n,"17.0.2")&&(a={ImmediatePriority:1,UserBlockingPriority:2,NormalPriority:3,LowPriority:4,IdlePriority:5,NoPriority:0});let c=null;pi(n,"17.0.1")?c={CacheComponent:24,ClassComponent:1,ContextConsumer:9,ContextProvider:10,CoroutineComponent:-1,CoroutineHandlerPhase:-1,DehydratedSuspenseComponent:18,ForwardRef:11,Fragment:7,FunctionComponent:0,HostComponent:5,HostPortal:4,HostRoot:3,HostText:6,IncompleteClassComponent:17,IndeterminateComponent:2,LazyComponent:16,LegacyHiddenComponent:23,MemoComponent:14,Mode:8,OffscreenComponent:22,Profiler:12,ScopeComponent:21,SimpleMemoComponent:15,SuspenseComponent:13,SuspenseListComponent:19,YieldComponent:-1}:hn(n,"17.0.0-alpha")?c={CacheComponent:-1,ClassComponent:1,ContextConsumer:9,ContextProvider:10,CoroutineComponent:-1,CoroutineHandlerPhase:-1,DehydratedSuspenseComponent:18,ForwardRef:11,Fragment:7,FunctionComponent:0,HostComponent:5,HostPortal:4,HostRoot:3,HostText:6,IncompleteClassComponent:17,IndeterminateComponent:2,LazyComponent:16,LegacyHiddenComponent:24,MemoComponent:14,Mode:8,OffscreenComponent:23,Profiler:12,ScopeComponent:21,SimpleMemoComponent:15,SuspenseComponent:13,SuspenseListComponent:19,YieldComponent:-1}:hn(n,"16.6.0-beta.0")?c={CacheComponent:-1,ClassComponent:1,ContextConsumer:9,ContextProvider:10,CoroutineComponent:-1,CoroutineHandlerPhase:-1,DehydratedSuspenseComponent:18,ForwardRef:11,Fragment:7,FunctionComponent:0,HostComponent:5,HostPortal:4,HostRoot:3,HostText:6,IncompleteClassComponent:17,IndeterminateComponent:2,LazyComponent:16,LegacyHiddenComponent:-1,MemoComponent:14,Mode:8,OffscreenComponent:-1,Profiler:12,ScopeComponent:-1,SimpleMemoComponent:15,SuspenseComponent:13,SuspenseListComponent:19,YieldComponent:-1}:hn(n,"16.4.3-alpha")?c={CacheComponent:-1,ClassComponent:2,ContextConsumer:11,ContextProvider:12,CoroutineComponent:-1,CoroutineHandlerPhase:-1,DehydratedSuspenseComponent:-1,ForwardRef:13,Fragment:9,FunctionComponent:0,HostComponent:7,HostPortal:6,HostRoot:5,HostText:8,IncompleteClassComponent:-1,IndeterminateComponent:4,LazyComponent:-1,LegacyHiddenComponent:-1,MemoComponent:-1,Mode:10,OffscreenComponent:-1,Profiler:15,ScopeComponent:-1,SimpleMemoComponent:-1,SuspenseComponent:16,SuspenseListComponent:-1,YieldComponent:-1}:c={CacheComponent:-1,ClassComponent:2,ContextConsumer:12,ContextProvider:13,CoroutineComponent:7,CoroutineHandlerPhase:8,DehydratedSuspenseComponent:-1,ForwardRef:14,Fragment:10,FunctionComponent:1,HostComponent:5,HostPortal:4,HostRoot:3,HostText:6,IncompleteClassComponent:-1,IndeterminateComponent:0,LazyComponent:-1,LegacyHiddenComponent:-1,MemoComponent:-1,Mode:11,OffscreenComponent:-1,Profiler:15,ScopeComponent:-1,SimpleMemoComponent:-1,SuspenseComponent:16,SuspenseListComponent:-1,YieldComponent:9};function d(D){const K=typeof D=="object"&&D!==null?D.$$typeof:D;return typeof K=="symbol"?K.toString():K}const{CacheComponent:m,ClassComponent:T,IncompleteClassComponent:N,FunctionComponent:_,IndeterminateComponent:w,ForwardRef:$,HostRoot:P,HostComponent:Y,HostPortal:G,HostText:j,Fragment:te,LazyComponent:fe,LegacyHiddenComponent:ue,MemoComponent:me,OffscreenComponent:Te,Profiler:se,ScopeComponent:M,SimpleMemoComponent:Q,SuspenseComponent:U,SuspenseListComponent:de}=c;function _e(D){switch(d(D)){case Wa:case vi:return _e(D.type);case Va:case yi:return D.render;default:return D}}function H(D){const{elementType:K,type:q,tag:ve}=D;let B=q;switch(typeof q=="object"&&q!==null&&(B=_e(q)),ve){case m:return"Cache";case T:case N:case _:case w:return ht(B);case $:return(q==null?void 0:q.displayName)||ht(B);case P:return"HostRoot";case Y:return`<${q}>`;case G:return"#portal";case j:return"#text";case te:return"Fragment";case fe:return"Lazy";case me:case Q:return(K==null?void 0:K.displayName)||(q==null?void 0:q.displayName)||ht(B);case U:return"Suspense";case ue:return"LegacyHidden";case Te:return"Offscreen";case M:return"Scope";case de:return"SuspenseList";case se:return"Profiler";default:switch(d(q)){case $r:case Br:case qr:return null;case Ei:case Ur:{const ie=D.type._context||D.type.context;return`${ht(ie,"Context")}.Provider`}case mi:case Kr:{const ie=D.type._context||D.type;return`${ht(ie,"Context")}.Consumer`}case _i:case Oi:return"StrictMode";case bi:case wi:return`Profiler(${D.memoizedProps.id})`;case Xa:case Ya:return"Scope";default:return null}}}return{getDisplayNameForFiber:H,getTypeSymbol:d,ReactPriorityLevels:a,ReactTypeOfWork:c,ReactTypeOfSideEffect:i}}function Za(n){return(n.flags!==void 0?n.flags:n.effectTag)??0}const Ja=["alternate","child","sibling","return","current","dependencies","stateNode","_debugOwner","firstEffect","lastEffect","nextEffect","updateQueue","memoizedState","memoizedProps","pendingProps"],eu=["_reactInternals","_reactInternalInstance"],tu=class{constructor(n){this.objects=n}};function nu(n,i,a){const c=new Set,d=new Set,m=new Set,T=new Set,N={candidates:0,leaks:0};let _=null,w=null;new FinalizationRegistry(B=>{c.delete(B);for(const ae of B){const ie=ae.deref();ie!==void 0&&($.register(ie,ae),d.add(ae),m.add(ae))}te()});const $=new FinalizationRegistry(B=>{d.delete(B),m.has(B)?m.delete(B):T.add(B),te()});function P(B){const ae=Array.isArray(B)?new Set(B):!1;let ie=new tu(Object.create(null));for(const ge of[...d].sort((Ie,Ce)=>Ie.tag<Ce.tag?-1:1))ge.deref()!==void 0&&(!ae||ae.has(ge.fiberId))&&(ie.objects[ge.tag]=ge);return{get objects(){return(ie==null?void 0:ie.objects)||null},get markedObjects(){return ie},release(){ie=null}}}function Y(){const B=[],ae=[...d].map(ie=>ie.tag);w!==null&&(clearTimeout(w),w=null);for(const ie of c)for(const ge of ie)ge.alive&&B.push(ge.tag);Pe.log(`track React objects for memory leaks (candidates: ${N.candidates!==B.length?`${N.candidates} → ${B.length}`:B.length}, leaks: ${N.leaks!==d.size?`${N.leaks} → ${d.size}`:d.size}):`,{candidates:B,leaks:ae}),N.candidates=B.length,N.leaks=d.size}function G(){w===null&&(w=setTimeout(Y,10))}function j(){_!==null&&(clearTimeout(_),_=null),(m.size||T.size)&&(n({op:"maybe-leaks",commitId:-1,added:[...m].map(B=>B.descriptor),removed:[...T].map(B=>B.descriptor)}),m.clear(),T.clear()),G()}function te(){_===null&&(_=setTimeout(j,100))}function fe(B,ae,ie,ge=null,Ie=null){}function ue(B,ae){for(const ie of ae)B[ie]&&(B[ie]=null)}function me(B){for(const ae of B){const ie=ae.deref();if(ie!==void 0)switch(ae.type){case Ia:case Ca:{ue(ie,Ja);break}case Sa:{if(ie instanceof HTMLElement){for(const ge of Object.getOwnPropertyNames(ie)){const Ie=ie[ge];Ie!==null&&typeof Ie=="object"&&(ie[ge]=null)}ie.remove()}ue(ie,eu);break}}}}function Te(B){B.firstEffect&&!a.has(B.firstEffect)&&(B.firstEffect=null),B.lastEffect&&!a.has(B.lastEffect)&&(B.lastEffect=null),B.child&&!a.has(B.child)&&(B.child=null),B.sibling&&!a.has(B.sibling)&&(B.sibling=null)}function se(B){Te(B),B.alternate&&Te(B.alternate),B.child&&se(B.child),B.sibling&&se(B.sibling)}function M(){me(d);for(const B of c)me(B);for(const B of i.values())se(B)}const Q="LeakedObjectsRRTMarker";let U=[],de=null,_e=null;function H(B){const ae={fn:B};return U.push(ae),()=>{U=U.filter(ie=>ie!==ae)}}function D(){for(const{fn:B}of U)B(de)}function K(){const B=window;_e!==null&&(_e.release(),_e=null),de!==null&&(delete B[de.globalName],de=null)}function q(){de!==null&&(K(),D())}function ve(B){const ae=window,ie=de;K();let ge=0,Ie=Q;for(;Ie in ae;)ge++,Ie=Q+ge;const Ce=P(B),Ae=Object.keys(Ce.objects||{}).length,Ve=[...new Set(Object.values(Ce.objects||{}).map(We=>We.fiberId))];return Ae>0&&(ae[Ie]=Ce.markedObjects,_e=Ce,de={globalName:Ie,objectRefsCount:Ae,fiberIds:Ve}),de!==ie&&D(),de}return{trackObjectForLeaking:fe,getLeakedObjectsProbe:P,breakLeakedObjectRefs:M,getExposedToGlobalLeaksState:()=>de,subscribeToExposedToGlobalLeaksState:H,exposeLeakedObjectsToGlobal:ve,cancelExposingLeakedObjectsToGlobal:q}}function ru(n,i){const a=n.reconcilerVersion||n.version||"",{getDisplayNameForFiber:c,getTypeSymbol:d,ReactPriorityLevels:m,ReactTypeOfWork:T,ReactTypeOfSideEffect:N}=Qa(a),{PerformedWork:_}=N,{ClassComponent:w,DehydratedSuspenseComponent:$,ForwardRef:P,Fragment:Y,FunctionComponent:G,HostRoot:j,HostPortal:te,HostComponent:fe,HostText:ue,IncompleteClassComponent:me,IndeterminateComponent:Te,LegacyHiddenComponent:se,MemoComponent:M,OffscreenComponent:Q,Profiler:U,SimpleMemoComponent:de,SuspenseComponent:_e,SuspenseListComponent:H,ContextConsumer:D,LazyComponent:K}=T,q=new WeakMap;let ve=0;const B=new Map;let ae=1;const ie=new WeakMap,ge=new Map,Ie=new Map,Ce=new Map,Ae=new Map,{trackObjectForLeaking:Ve,...We}=nu(i,Ae,q);function tt(oe,ce){switch(oe.tag){case $:return!0;case te:case fe:if(ce)return!0;break;case ue:case Y:case se:case Q:return!0;case j:return!1;default:switch(d(oe.type)){case $r:case Br:case qr:return!0;default:return!1}}}function ut(oe){switch(oe.tag){case w:case me:return dn;case G:case Te:return Cr;case M:case de:return pn;case P:return Bn;case j:return Wo;case fe:return Xo;case ue:return Tr;case te:return Ea;case U:return Yo;case _e:return _a;case H:return Oa;case Y:return Qo;default:switch(d(oe.type)){case Ei:case Ur:return Sr;case mi:case Kr:return Rr;case bi:case wi:return Yo;case $r:case Br:case qr:case _i:case Oi:default:return Qo}}}function Xe(oe,ce){if(oe===null)switch(ce){case ue:oe="#text";break;default:return-1}if(typeof oe!="object"&&typeof oe!="function"){const Be=ge.get(oe);Be===void 0?ge.set(oe,oe={}):oe=Be}let be=ie.get(oe);return be===void 0&&ie.set(oe,be=ae++),be}function ye(oe){let ce=null,be=null,{child:Be}=oe;for(let gt=0;gt<3&&Be!==null;gt++){const nt=c(Be);if(nt!==null&&(typeof Be.type=="function"?ce=nt:be===null&&(be=nt)),ce!==null)break;Be=Be.child}return ce||be||"Anonymous"}function Ue(oe){let ce;const{alternate:be}=oe;return q.has(oe)?ce=q.get(oe):be!==null&&q.has(be)&&(ce=q.get(be)),typeof ce>"u"&&(ce=++ve),q.has(oe)||(q.set(oe,ce),B.set(ce,oe)),be!==null&&!q.has(be)&&q.set(be,ce),ce}function ne(oe){if(q.has(oe))return q.get(oe)||null;const{alternate:ce}=oe;return ce!==null&&q.has(ce)&&q.get(ce)||null}function mt(oe){const ce=ne(oe);if(ce===null)throw Error(`Could not find ID for Fiber "${c(oe)||""}"`);return ce}function Rt(oe){const{_debugOwner:ce=null}=oe;if(ce!==null)return Ue(ce);let{return:be=null}=oe;for(;be!==null;){if(tt(be)){be=be.return;continue}if(be._debugOwner)return Ue(be);if(be.tag===P||be.tag===M||be.tag===K)return Rt(be);break}return-1}function De(oe){return B.get(oe)||null}function Tt(oe){return n.findFiberByHostInstance(oe)}function Dt(oe,ce){var kt,bt;const be=c(oe),{stateNode:Be,alternate:gt,memoizedState:nt}=ce||oe,Ze=ne(oe);if(typeof Ze!="number"){console.error("[React Render Tracker] removeFiber can't resolve an id by a given fiber");return}if(B.delete(Ze),q.delete(oe),gt&&q.delete(gt),nt&&"next"in nt){let ct=nt;for(;ct!==null;)typeof((kt=ct.queue)==null?void 0:kt.dispatch)=="function"?Ve(ct.queue.dispatch,Ze,Zo,be,ct.queue.dispatch.hookIdx):typeof((bt=ct.memoizedState)==null?void 0:bt.create)=="function"&&Ve(ct.memoizedState.create,Ze,Zo,be,ct.memoizedState.create.hookIdx),ct=ct.next}}function yt(oe){return oe.tag===j}function vn(oe,ce){const be=ye(ce),Be=Ce.get(be)||0,gt=`${be}:${Be}`;Ce.set(be,Be+1),Ie.set(oe,gt),Ae.set(oe,ce)}function bn(oe){return Ie.get(oe)||null}function wn(oe){Ae.delete(oe);const ce=Ie.get(oe);if(ce===void 0)throw new Error("Expected root pseudo key to be known.");const be=ce.substring(0,ce.lastIndexOf(":")),Be=Ce.get(be);if(Be===void 0)throw new Error("Expected counter to be known.");Be>1?Ce.set(be,Be-1):Ce.delete(be),Ie.delete(oe)}function En(oe,ce){switch(ce.tag){case w:case G:case D:case M:case de:return(Za(ce)&_)===_;default:return oe.memoizedProps!==ce.memoizedProps||oe.memoizedState!==ce.memoizedState||oe.ref!==ce.ref}}return{ReactTypeOfSideEffect:N,ReactTypeOfWork:T,ReactPriorityLevels:m,getElementTypeForFiber:ut,getFiberTypeId:Xe,getOrGenerateFiberId:Ue,getFiberIdThrows:mt,getFiberIdUnsafe:ne,getFiberById:De,getFiberOwnerId:Rt,removeFiber:Dt,getDisplayNameForFiber:c,getDisplayNameForRoot:ye,isFiberRoot:yt,setRootPseudoKey:vn,getRootPseudoKey:bn,removeRootPseudoKey:wn,didFiberRender:En,shouldFilterFiber:tt,findFiberByHostInstance:Tt,memoryLeaksApi:We}}function ou(n,i){if(Array.isArray(n)&&Array.isArray(i)){let a=0,c=0;for(let d=0;d<n.length&&Object.is(n[d],i[d]);d++,a++);for(let d=n.length-1;d>a&&Object.is(n[d],i[d]);d--,c++);return n.length!==i.length||a!==n.length?{prevLength:n.length,nextLength:i.length,eqLeft:a,eqRight:c}:!1}}function Ii(n){if(n)switch(typeof n){case"string":return n;case"function":return ht(n);case"symbol":if(String(n)===gi)return"";default:if(n.$$typeof)switch(String(n.$$typeof)){case gi:return"";case vi:case yi:case Ga:return ht(n);case Ur:{const i=n._context||n.context;return`${ht(i,"Context")}.Provider`}case Kr:{const i=n._context||n.context;return`${ht(i,"Context")}.Provider`}default:return String(n.$$typeof)}}return"Unknown"}const{hasOwnProperty:iu,toString:Ci}=Object.prototype;function Si(n){return typeof n=="object"&&n!==null&&n.constructor===Object}function su(n){return typeof(n==null?void 0:n.$$typeof)=="symbol"}function Zt(n){var i;switch(typeof n){case"boolean":case"undefined":case"number":case"bigint":case"symbol":return String(n);case"function":return"ƒn";case"string":return JSON.stringify(n.length>20?`${n.slice(0,20)}…`:n);case"object":if(n===null)return"null";if(Array.isArray(n))return n.length?"[…]":"[]";if(typeof n.$$typeof=="symbol"&&String(n.$$typeof)==="Symbol(react.element)")return`<${Ii(n.type)}${Object.keys(n.props).length>0?" …":""}/>`;if(Si(n)){for(const c in n)if(iu.call(n,c))return"{…}";return"{}"}const a=Ci.call(n).slice(8,-1);if(a==="Object"){const c=(i=Object.getPrototypeOf(n))==null?void 0:i.constructor;if(typeof c=="function")return`${c.displayName||c.name||""}{…}`}return`${a}{…}`;default:return""}}function mn(n,i=!0,a=0){var c;if(a>30)return"...";switch(typeof n){case"string":return n.length>50?`"${String(n).slice(0,50)}..."`:`"${String(n)}"`;case"symbol":case"undefined":case"boolean":case"number":case"bigint":return i?`"${String(n)}"`:String(n);case"function":return"ƒn";case"object":if(n===null)return"null";if(n&&su(n))return`<${Ii(n.type)||"UnknowComponent"} ${n.props?" …":""} />${mn(n.props,!1,a++)}`;if(Array.isArray(n))return n.length>10?`Array<${n.length}>`:`[${n.map(m=>mn(m,!1,a++)).join(",")}]`;if(Si(n)){let m=Object.keys(n),T=!1;return m.length>20&&(m=m.slice(0,20),T=!0),`{${m.map(N=>`"${N}": ${mn(n[N],!1,a++)}`)}${T?",【more keys hidden】:...":""}}`}const d=Ci.call(n).slice(8,-1);if(d==="Object"){const m=(c=Object.getPrototypeOf(n))==null?void 0:c.constructor;if(typeof m=="function")return`"${m.displayName||m.name||""}{…}"`}return`${d}{…}`;default:return""}}function au(n,i){if(Ct.diffMode==="full")return{prev:mn(n),next:mn(i)}}function Ri(n){return n!==null&&typeof n=="object"&&n.constructor===Object&&typeof n.$$typeof!="symbol"}const{hasOwnProperty:Hn}=Object.prototype;function uu(n,i){if(Ri(n)&&Ri(i)){const a=[];let c=0,d=0;for(const m in n)Hn.call(n,m)&&(c++,Hn.call(i,m)?Object.is(n[m],i[m])||d++<3&&a.push({name:m,prev:Zt(n[m]),next:Zt(i[m])}):d++<3&&a.push({name:m,prev:Zt(n[m])}));for(const m in i)Hn.call(i,m)&&(Hn.call(n,m)||(c++,d++<3&&a.push({name:m,next:Zt(i[m])})));return d>0?{keys:c,diffKeys:d,sample:a}:!1}}function cu(n,i){if(n===null)return{displayName:n,hocDisplayNames:null};let a=[];if((i===dn||i===Cr||i===Bn||i===pn)&&n.includes("(")){const c=n.match(/[^()]+/g);c!==null&&(n=c.pop()||"",a=c)}return i===pn?a.unshift("Memo"):i===Bn&&a.unshift("ForwardRef"),{displayName:n,hocDisplayNames:a.length>0?a:null}}const zn="<unknown>",lu=Object.hasOwn||((n,i)=>Object.prototype.hasOwnProperty.call(n,i));function Ti(n,i){const a=[];return new Proxy(n,{get(c,d){if(typeof d=="string"){const m=Number(d);if(isFinite(m)&&lu(n,d))return typeof a[m]>"u"&&(a[m]=i(n[m])),a[m]}return c[d]}})}function yn(n){const i=ki()[n+2];return i!=null&&i.loc?i.loc:null}function ki(n=1,i=25){const a=Error.prepareStackTrace,c=Error.stackTraceLimit;try{Error.stackTraceLimit=i,Error.prepareStackTrace=(T,N)=>(d=Ti(N.slice(n),fu),"");let d=null;const m=new Error().stack;if(d===null&&m){const T=m.trim().split(`
4
4
  `);d=Ti(T.slice(T[0]==="Error"?n+1:n),du)}return d||[]}finally{Error.stackTraceLimit=c,Error.prepareStackTrace=a}}function fu(n){const i=typeof n.getScriptNameOrSourceURL=="function"?n.getScriptNameOrSourceURL():n.getFileName();let a=n.getFunctionName();if(a!==null&&a.includes(".")){const c=n.getTypeName(),d=n.getMethodName();c&&d?a=`${c}#${d}`:a=a.replace(/.*?\.([^\.]+(?:\.[^\.]+)?)$/,"$1")}return{loc:i?`${i}:${n.getLineNumber()}:${n.getColumnNumber()}`:null,name:a||zn}}function du(n){return yu(n)||bu(n)||Eu(n)}const pu=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)?\)?\s*$/i,hu=/^\s*at ()((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)\s*$/i,mu=/\((\S*)\)/;function yu(n){const i=pu.exec(n)||hu.exec(n);if(!i)return null;let a=i[2];const c=a&&a.startsWith("native"),d=a&&a.startsWith("eval"),m=mu.exec(a);return d&&m!=null&&(a=m[1]),{loc:c?null:i[2],name:i[1]||zn}}const gu=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)\s*$/i,vu=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function bu(n){const i=gu.exec(n);if(!i)return null;let a=i[1],c=i[3];const d=c&&c.indexOf(" > eval")>-1,m=vu.exec(c);return d&&m!=null&&(c=m[1]),a&&a.includes("/")&&(a=a.replace(/^.*\/([^\/]+)$/,"$1").replace(/\.prototype\./,"#")),{loc:i[3],name:a||zn}}const wu=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?)\s*$/i;function Eu(n){const i=wu.exec(n);return i?{loc:i[3],name:i[1]||zn}:null}function gn(n,i){return Fn().diffMode!=="off"?{prev:Zt(n),next:Zt(i),diff:Array.isArray(n)?ou(n,i):uu(n,i),raw:au(n,i)}:{}}const xi=Symbol("react-render-tracker-patched-updater");function _u({ReactTypeOfWork:n,getFiberTypeId:i,getOrGenerateFiberId:a,getFiberIdThrows:c,getFiberIdUnsafe:d,getFiberOwnerId:m,getFiberById:T,removeFiber:N,getElementTypeForFiber:_,getDisplayNameForFiber:w,setRootPseudoKey:$,didFiberRender:P,removeRootPseudoKey:Y,shouldFilterFiber:G},{getDispatchHookIndex:j,getFiberTypeHookInfo:te,flushDispatchCalls:fe},ue){const{HostRoot:me,SuspenseComponent:Te,OffscreenComponent:se,ContextProvider:M}=n,Q=new Map,U=new Map,de=new Set,_e=new Map,H=new Map,D=new Map;let K=-1,q=-1,ve=0,B=[];const ae=new WeakMap,ie=new Map,ge=new Set,Ie=new Map,Ce=new Map,Ae=new Map,Ve=new WeakMap,We=new Set;let tt=null;const ut=Fn();function Xe(h){We.add(h),tt===null&&(tt=setTimeout(ye,900))}function ye(){tt!==null&&(clearTimeout(tt),tt=null);for(const h of We)N(h,Ve.get(h)),Ve.delete(h);We.clear()}function Ue(h,L){const W=_(L);if(W===Xo)return{props:Dt(h.memoizedProps,L.memoizedProps)};if(W===Tr)return h.memoizedProps===L.memoizedProps?null:{props:Dt({"#text":h.memoizedProps},{"#text":L.memoizedProps})};if(W!==dn&&W!==Cr&&W!==pn&&W!==Bn&&W!==Sr&&W!==Rr)return null;const F=h.stateNode!==null;return{props:Dt(h.memoizedProps,L.memoizedProps),...F?{context:mt(L),state:yt(h.memoizedState,L.memoizedState,h)}:{context:De(L),state:Tt(h.memoizedState,L.memoizedState),memos:vn(L)}}}function ne(h){var W;const L=h.stateNode||null;return L!==null&&((W=L.constructor)==null?void 0:W.contextType)||null}function mt(h){var W;const L=ne(h);if(L!==null){const F=((W=D.get(L))==null?void 0:W.valueChangedEventId)||null;if(F!==null)return[{context:0,valueChangedEventId:F}]}}function Rt(h){var W,F;let L=((W=h.dependencies)==null?void 0:W.firstContext)||((F=h.contextDependencies)==null?void 0:F.first)||null;if(L!==null){const S=[];for(;L!==null;)S.push(L.context),L=L.next;return S}return null}function De(h){var W,F;const L=Rt(h);if(L!==null){const S=new Set,le=[],pe=i(h.type,h.tag),we=(W=ie.get(pe))==null?void 0:W.hookContextIndecies;for(const Fe of L){const Ne=we==null?void 0:we.get(Fe),He=((F=D.get(Fe))==null?void 0:F.valueChangedEventId)||null;typeof Ne=="number"&&He!==null&&!S.has(Ne)&&(S.add(Ne),le.push({context:Ne,valueChangedEventId:He}))}if(le.length>0)return le}}function Tt(h=null,L=null){if(h===null||L===null||h===L)return;const W=[];for(;L!==null&&h!==null;){if(L.queue){const F=h.memoizedState,S=L.memoizedState;if(!Object.is(F,S)){let le=L.queue.dispatch||L.queue.getSnapshot,pe=j(le);pe===null&&L.next&&typeof L.next.memoizedState=="function"&&(L=L.next,h=h.next,le=L.memoizedState,pe=j(le));const we=H.get(le);W.push({hook:pe,...gn(F,S),calls:we==null?void 0:we.map(Fe=>({name:Fe.dispatchName,loc:Fe.loc}))})}}L=L.next,h=h.next}return W.length>0?W:void 0}function Dt(h,L){if(h==null||L==null||h===L)return;const W=new Set([...Object.keys(h),...Object.keys(L)]),F=[];for(const S of W)Object.is(h[S],L[S])||F.push({name:S,...gn(h[S],L[S])});return F}function yt(h,L,W){if(h==null||L==null||Object.is(h,L))return;const F=d(W),S=F!==null?_e.get(F):null,le=S==null?void 0:S.find(we=>we.type==="setState");return[{hook:null,...gn(h,L),calls:le?[{name:"setState",loc:le.loc}]:null}]}function vn(h){var pe,we;const L=((pe=ie.get(i(h.type,h.tag)))==null?void 0:pe.hookMemoIndecies)||[],W=[];let F=h.memoizedState||null,S=((we=h.alternate)==null?void 0:we.memoizedState)||null,le=0;for(;F!==null&&S!==null;){if(F.queue===null&&Array.isArray(F.memoizedState)){const[Fe,Ne]=S.memoizedState,[He,Ke]=F.memoizedState,$e=L[le++],qe=[];if(Ne!==Ke){if(Ne!==null&&Ke!==null)for(let ke=0;ke<Ne.length;ke++)Object.is(Ne[ke],Ke[ke])||qe.push({index:ke,...gn(Ne[ke],Ke[ke])});W.push({hook:$e,...gn(Fe,He),deps:qe})}}F=F.next||null,S=S.next||null}return W.length>0?W:void 0}function bn(h,L,W){var S,le;if(h.stateNode!==null){const pe=ne(h);return pe===null?null:[{name:ht(pe,"Context"),providerId:(S=D.get(pe))==null?void 0:S.providerId}]}if(L===Rr){const pe=h.type._context||h.type.context||h.type;return[{name:ht(pe,"Context"),providerId:(le=D.get(pe))==null?void 0:le.providerId}]}const F=W.reduce((pe,we)=>we.context!=null?pe.add(we.context):pe,new Set);return F.size?[...F].map(pe=>{var we;return{name:ht(pe,"Context"),providerId:(we=D.get(pe))==null?void 0:we.providerId}}):null}function wn(h,L,W,F){if(ie.has(L))return;const S=te(L),le=bn(h,W,S),pe=new Map,we=[],Fe=[];for(const Ne of S){let He=null;Ne.context&&(He=pe.get(Ne.context),He===void 0&&pe.set(Ne.context,He=pe.size)),(Ne.name==="useMemo"||Ne.name==="useCallback")&&we.push(Fe.length),Fe.push({...Ne,context:He})}if(W===dn){const{updater:Ne}=h.stateNode;if(Ne.enqueueForceUpdate.patched!==xi){const{enqueueForceUpdate:He,enqueueSetState:Ke}=Ne;Object.defineProperties(Ne,{enqueueForceUpdate:{value:Object.assign(function($e,qe){const ke=ae.get($e);if(ke!==void 0){const{fiberId:rt,rootId:je}=ke;B.push({type:"forceUpdate",fiberId:rt,rootId:je,loc:yn(2)})}return He($e,qe)},{patched:xi})},enqueueSetState:{value($e,qe,ke){const rt=ae.get($e);if(rt!==void 0){const{fiberId:je,rootId:Ge}=rt;B.push({type:"setState",fiberId:je,rootId:Ge,loc:yn(1)})}return Ke($e,qe,ke)}}})}}ie.set(L,{hookContextIndecies:pe,hookMemoIndecies:we,hooks:Fe}),ue({op:"fiber-type-def",commitId:q,typeId:L,displayName:F,definition:{contexts:le,hooks:Fe}})}function En({fileName:h,lineNumber:L,columnNumber:W}){return typeof h=="string"&&typeof L=="number"&&L>0?`${h}:${L}${typeof W=="number"&&W>0?`:${W}`:""}`:null}function oe(h,L){const W=h.tag===me,F=a(h);let S=[],le,pe,we=null;if(W)le={id:F,type:Wo,typeId:0,rootMode:h.stateNode.tag||0,key:h.stateNode.containerInfo.id||null,ownerId:0,parentId:0,displayName:null,hocDisplayNames:null,loc:null};else{const{key:Ke,type:$e,tag:qe}=h,ke=_(h),rt=L?c(L):0,je=m(h),Ge=je!==-1?je:K,{displayName:Yn,hocDisplayNames:tn}=cu(w(h),ke);we=Yn,pe=U.get(Ge),le={id:F,type:ke,typeId:i($e,qe),key:Ke===null?null:String(Ke),ownerId:Ge,parentId:rt,displayName:Yn,hocDisplayNames:tn,loc:h._debugSource?En(h._debugSource):null},S=Object.keys(ke!==Tr?h.memoizedProps:{"#text":h.memoizedProps})}wn(h,le.typeId,le.type,we);const{selfTime:Fe,totalTime:Ne}=bt(h),He=ue({op:"mount",commitId:q,fiberId:F,fiber:le,props:S,selfTime:Fe,totalTime:Ne,trigger:pe});Q.set(F,le.ownerId),U.set(F,pe??He),le.type===dn&&ae.set(h.stateNode,{rootId:K,fiberId:F})}function ce(h){const L=Q.get(h),W=U.get(L),F=T(h);F!==null&&(Xe(F),(F.stateNode||F.alternate)&&Ve.set(F,{stateNode:F.stateNode,alternate:F.alternate,memoizedState:F.memoizedState}));const S=ue({op:"unmount",commitId:q,fiberId:h,trigger:W});U.set(h,W??S),Q.delete(h)}function be(h){ge.delete(h),ce(h);const L=Ie.get(h);if(L!==void 0){Ie.delete(h);for(const W of L)be(W)}}function Be(h){const L=Ce.get(h);L!==void 0&&(Be(L),be(L))}function gt(h){const L=Ae.get(h);L!==void 0&&(Be(L),be(L))}function nt(h){var F;const L=d(h);if(L===null)return;if(h.tag===me||!G(h))if(q!==-1)be(L);else{const S=Q.get(L)||0,le=h.sibling?d(h.sibling):null;if(le!==null)Ce.set(le,L);else{const pe=h.return?d(h.return):null;pe!==null&&Ae.set(pe,L)}Ie.has(S)?(F=Ie.get(S))==null||F.add(L):Ie.set(S,new Set([L])),ge.add(L),(h.stateNode||h.alternate)&&Ve.set(h,{stateNode:h.stateNode,alternate:h.alternate,memoizedState:h.memoizedState})}else N(h),Ve.delete(h);h._debugNeedsRemount}function Ze(h,L,W){let F=h;for(;F!==null;){const S=!G(F),le=F.tag===Te,we=F.tag===M?F.type._context||F.type.context:null;let Fe;const Ne=a(F);if(we!==null&&(Fe=D.get(we),D.set(we,{providerId:Ne,valueChangedEventId:null})),S&&oe(F,L),le)if(F.memoizedState!==null){const Ke=F.child,$e=Ke==null?void 0:Ke.sibling,qe=($e==null?void 0:$e.child)||null;qe!==null&&Ze(qe,S?F:L,!0)}else{let Ke=null;se===-1?Ke=F.child:F.child!==null&&(Ke=F.child.child),Ke!==null&&Ze(Ke,S?F:L,!0)}else F.child!==null&&Ze(F.child,S?F:L,!0);we!==null&&D.set(we,Fe),F=W?F.sibling:null}}function kt(h){const L=h.tag===Te&&h.memoizedState!==null;let W=h.child;if(L){const F=h.child,S=(F==null?void 0:F.sibling)||null;W=(S==null?void 0:S.child)||null}for(;W!==null;)W.return!==null&&(nt(W),kt(W)),W=W.sibling}function bt(h){const L=h.actualDuration??0;let W=L,F=h.child;for(;L>0&&F!==null;)W-=F.actualDuration||0,F=F.sibling;return{totalTime:L,selfTime:W}}function ct(h){var le;if(!ut.updateTrace)return;const{alternate:L=null}=h;if(L===null)return;const W=c(h),F=m(h),S=h.memoizedProps!==L.memoizedProps?U.get(F):void 0;if(P(L,h)){const{selfTime:pe,totalTime:we}=bt(h),Fe=Ue(L,h),Ne=_e.get(W),He=[];if(Ne!==void 0)for(const $e of Ne)$e.type==="forceUpdate"&&He.push({name:"forceUpdate",loc:$e.loc});Fe===null&&U.has(F)&&He.push({name:"ownerUpdate",loc:null});const Ke=ue({op:"update",commitId:q,fiberId:W,selfTime:pe,totalTime:we,changes:Fe,specialReasons:He.length?He:null,trigger:S});if(U.set(W,S||Ke),Fe!==null&&_(h)===Sr&&((le=Fe.props)==null?void 0:le.find(qe=>qe.name==="value"))!==void 0){const qe=D.get(h.type._context||h.type.context);qe!==void 0&&(qe.valueChangedEventId=Ke)}}else h.stateNode&&h.updateQueue!==L.updateQueue?ue({op:"update-bailout-scu",commitId:q,fiberId:W,changes:{props:Dt(h.memoizedProps,L.memoizedProps),state:yt(h.memoizedState,L.memoizedState,h)},trigger:S}):de.has(W)?ue({op:"update-bailout-state",commitId:q,fiberId:W,trigger:S}):U.has(F)&&_(h)===pn&&ue({op:"update-bailout-memo",commitId:q,fiberId:W,trigger:S})}function Mt(h,L,W){var Ke,$e,qe;const F=a(h),S=!G(h),le=h.tag===Te,we=h.tag===M?h.type._context||h.type.context:null;let Fe;Be(F),we!==null&&(Fe=D.get(we),D.set(we,{providerId:F,valueChangedEventId:null})),S&&ct(h);const Ne=le&&L.memoizedState!==null,He=le&&h.memoizedState!==null;if(Ne&&He){const ke=((Ke=h.child)==null?void 0:Ke.sibling)||null,rt=(($e=L.child)==null?void 0:$e.sibling)||null;ke!==null&&rt!==null&&Mt(ke,rt,h)}else if(Ne&&!He){const ke=h.child;ke!==null&&Ze(ke,S?h:W,!0)}else if(!Ne&&He){kt(L);const ke=((qe=h.child)==null?void 0:qe.sibling)||null;ke!==null&&Ze(ke,S?h:W,!0)}else if(h.child!==L.child){let ke=h.child;for(;ke;){if(ke.alternate){const rt=ke.alternate;Mt(ke,rt,S?h:W)}else Ze(ke,S?h:W,!1);ke=ke.sibling}}we!==null&&D.set(we,Fe),gt(F)}function xt(h,L){if(!ut.commitTrace)return;const W=fe(h),F=[];L&&F.push({type:"initial-mount",kind:"mount",fiberId:K,loc:null});for(const S of W){const le=a(S.fiber);let pe=H.get(S.dispatch);pe===void 0&&H.set(S.dispatch,pe=[]),pe.push(S),de.add(le),S.effectFiber?F.push({type:S.effectName||"unknown",kind:S.dispatchName==="setState"?"useState":"useReducer",fiberId:le,relatedFiberId:a(S.effectFiber),loc:S.loc}):S.event?F.push({type:"event",kind:S.dispatchName==="setState"?"useState":"useReducer",fiberId:le,event:S.event,loc:S.loc}):S.renderFiber||F.push({type:"unknown",kind:S.dispatchName==="setState"?"useState":"useReducer",fiberId:le,loc:S.loc})}B=B.filter(S=>{const le=S.fiberId;if(le&&S.rootId===K){let pe=_e.get(le);return pe===void 0&&_e.set(le,pe=[]),pe.push(S),de.add(le),F.push({type:"unknown",kind:S.type,fiberId:le,loc:S.loc}),!1}return!0}),ue({op:"commit-start",commitId:q,triggers:F})}function en(h){nt(h)}function _n(){}function Et(h){var le,pe;const{current:L}=h,{alternate:W}=L;ye(),q=ve++,K=a(L);const F=W!==null&&!!((le=W.memoizedState)!=null&&le.element)&&W.memoizedState.isDehydrated!==!0,S=!!((pe=L.memoizedState)!=null&&pe.element);xt(h,!F&&S),!F&&S?($(K,L),Ze(L,null,!1)):F&&S?Mt(L,W,null):F&&!S&&(Y(K),nt(L));for(const we of ge)ce(we);q=-1,de.clear(),U.clear(),H.clear(),D.clear(),ge.clear(),Ie.clear(),Ce.clear(),Ae.clear()}return{handleCommitFiberRoot:Et,handlePostCommitFiberRoot:_n,handleCommitFiberUnmount:en}}function Ou(n=0,i){const a=ki(n+4),c=[],d={path:void 0,loc:null};let m=d;for(const T of a){if(!T)break;if(T.loc===i){c.shift(),c.shift();break}m.loc=T.loc,c.unshift(m={name:T.name,loc:null})}return c.length&&(d.path=c),d}function Iu(n,{getFiberTypeId:i,isFiberRoot:a}){let c=null,d=null,m=null,T=null,N=null,_=null,w=0,$=[],P=null;const Y=new Set,G=new Set,j=new Map,te=new WeakMap,fe=new WeakMap,ue=new WeakMap;function me(H,D=null,K=null){return T!==null&&T.hooks.push({name:H,deps:D,context:K,trace:Ou(1,P)}),w++}function Te(H,D){const K=D[H];D[H]=(q,ve)=>(me(H,Array.isArray(ve)?ve.length:null),K(q,ve))}function se(H,D){const K=D[H];typeof K=="function"&&(D[H]=function(q,ve){const B=me(H),ae=m,ie=()=>{N=ae,_=H==="useEffect"?"effect":H==="useLayoutEffect"?"layout-effect":"insertion-effect";const ge=q();return N=null,_=null,typeof ge=="function"?()=>ge():ge};return ie.hookIdx=B,K(ie,ve)})}function M(H,D){const K=D[H],q=H==="useState"?"setState":H==="useTransition"?"startTransition":"dispatch";typeof K=="function"&&(D[H]=(...ve)=>{const B=me(H),[ae,ie]=K(...ve);if(typeof ie.wrapper!="function"){const ge=m,Ie=d;ie.hookIdx=B,ie.wrapper=Ce=>{var Ae;return $.push({dispatch:ie,dispatchName:q,root:Ie,fiber:ge,renderFiber:m,effectFiber:N,effectName:_,event:!m&&!N&&((Ae=window.event)==null?void 0:Ae.type)||null,loc:yn(0)}),ie(Ce)}}return[ae,ie.wrapper]})}function Q(H,D){const K=D.useContext;D[H]=(q,...ve)=>(me(H,null,q),K(q,...ve))}function U(H,D){const K=D.useSyncExternalStore;typeof K=="function"&&(D[H]=(q,ve,B)=>{const ae=me(H);if(m===null)return K(q,ve,B);const ie=m,ge=d,Ie=m.alternate;let Ce=ue.get(m)||(Ie!==null?ue.get(Ie):void 0);Ce===void 0&&ue.set(m,Ce=[]),Ce.length<ae+1&&(Ce[ae]={subscribe:void 0,getSnapshot:void 0,wrappedSubscribe:()=>{},wrappedGetSnapshot:()=>{}});const Ae=Ce[ae];return Ae.subscribe!==q&&(Ae.subscribe=q,Ae.wrappedSubscribe=function(We){return q((tt,ut)=>{var Xe;$.push({dispatch:Ae.wrappedGetSnapshot,dispatchName:"externalStorageSync",root:ge,fiber:ie,renderFiber:m,effectFiber:N,effectName:_,event:!m&&!N&&((Xe=window.event)==null?void 0:Xe.type)||null,loc:yn(0)}),We(tt,ut)})}),Ae.getSnapshot!==ve&&(Ae.getSnapshot=ve,Ae.wrappedGetSnapshot=Object.assign(()=>ve(),{hookIdx:ae})),K(Ae.wrappedSubscribe,Ae.wrappedGetSnapshot,B)})}function de(H,D){const K=D[H];typeof K=="function"&&(D[H]=(...q)=>(me(H),K(...q)))}function _e(H){return H&&!Y.has(H)&&(Y.add(H),(H.useRef===H.useImperativeHandle||/warnInvalidContextAccess\(\)/.test(H.readContext.toString()))&&G.add(H),M("useState",H),M("useReducer",H),M("useTransition",H),Te("useMemo",H),Te("useCallback",H),se("useEffect",H),se("useLayoutEffect",H),se("useInsertionEffect",H),Q("useContext",H),U("useSyncExternalStore",H),de("useDebugValue",H),de("useImperativeHandle",H),de("useRef",H),de("useDeferredValue",H),de("useId",H)),H}return typeof n.getCurrentFiber=="function"&&Object.defineProperty(n.currentDispatcherRef,"current",{get:()=>c,set(H){const D=n.getCurrentFiber(),K=c;if(c=_e(H),D!==m){if(m=D,T=null,w=0,d=null,m!==null){const q=m.alternate;if(q===null){const B=i(m.type,m.tag);j.has(B)||(P=yn(1),j.set(B,T={hooks:[]}))}let ve=te.get(m)||q!==null&&te.get(q)||null;if(ve===null){let B=m.return;for(;B!==null;){const ae=te.get(m);if(ae!==void 0){ve=ae;break}if(a(B)){ve=B.stateNode;break}B=B.return}ve!==null&&te.set(m,ve)}d=ve}}else(m!==null&&K!==null&&H!==null&&!G.has(K)&&!G.has(H)||H!==null&&H.useRef===H.useImperativeHandle)&&(T=null,w=0)}}),{getDispatchHookIndex(H){return H.hookIdx??null},getFiberTypeHookInfo(H){var D;return((D=j.get(H))==null?void 0:D.hooks)||[]},getFiberRerenders(H){return fe.get(H)},flushDispatchCalls(H){const D=[],K=[];for(const q of $)q.root===H?D.push(q):K.push(q);return $=K,D}}}function Cu({ReactTypeOfWork:n,getFiberIdThrows:i,getFiberById:a,getElementTypeForFiber:c,getDisplayNameForFiber:d,getRootPseudoKey:m,shouldFilterFiber:T,findFiberByHostInstance:N}){const{HostRoot:_,HostComponent:w,HostText:$,SuspenseComponent:P}=n;function Y(se){const M=[],Q=a(se);if(!Q)return M;let U=Q;for(;;){if(U.tag===w||U.tag===$)M.push(U);else if(U.child){U.child.return=U,U=U.child;continue}if(U===Q)return M;for(;!U.sibling;){if(!U.return||U.return===Q)return M;U=U.return}U.sibling.return=U.return,U=U.sibling}}function G(se){var M;try{let Q=a(se);if(Q===null)return null;if(Q.tag===P&&Q.memoizedState!==null){const _e=(M=Q.child)==null?void 0:M.sibling;_e!=null&&(Q=_e)}return Y(se).map(_e=>_e.stateNode).filter(Boolean)}catch{return null}}function j(se){const M=a(se);return M!==null?d(M):null}function te(se,M=!1,Q=!1){let U=N(se);if(U===null)return null;if(M)for(;U!==null&&T(U,Q);)U=U.return;return U&&i(U)}function fe(se){return{displayName:d(se)||"Anonymous",id:i(se),key:se.key,type:c(se)}}function ue(se){const M=a(se);if(M===null)return null;const{_debugOwner:Q=null}=M,U=[fe(M)];if(Q){let de=Q;for(;de!==null;)U.unshift(fe(de)),de=de._debugOwner||null}return U}function me(se){const{key:M}=se,Q=se.index;let U=d(se);switch(se.tag){case _:const de=i(se),_e=m(de);if(_e===null)throw new Error("Expected mounted root to have known pseudo key.");U=_e;break;case w:U=se.type;break}return{displayName:U,key:M,index:Q}}function Te(se){let M=a(se);if(M===null)return null;const Q=[];for(;M!==null;)Q.push(me(M)),M=M.return;return Q.reverse()}return{findNativeNodesForFiberId:G,getDisplayNameForFiberId:j,getFiberIdForNative:te,getOwnersList:ue,getPathForElement:Te}}const Su=n=>{if(n)return`${n.fileName}:${n.lineNumber}:${n.columnNumber}`},Vn={background:"rgba(120, 170, 210, 0.7)",padding:"rgba(77, 200, 0, 0.3)",margin:"rgba(255, 155, 0, 0.3)",border:"rgba(255, 200, 50, 0.3)"},Jt={container:{display:"flex",flexFlow:"row nowrap",alignItems:"center",backgroundColor:"#333740",borderRadius:"4px",fontFamily:'"SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace',fontWeight:"bold",padding:"6px 7px",pointerEvents:"none",position:"fixed",fontSize:"12px",whiteSpace:"nowrap"},content:{display:"flex",flexDirection:"column",borderRight:"2px solid #575757",gap:"0.25rem",paddingRight:"0.5rem",marginRight:"0.5rem"},name:{color:"#58c4dc"},tip:{display:"none",fontWeight:"500",fontSize:"11px",color:"white"},dim:{color:"#ffffff"}},Hr=(n,i,a)=>{Object.assign(a.style,{borderTopWidth:`${n[`${i}Top`]}px`,borderLeftWidth:`${n[`${i}Left`]}px`,borderRightWidth:`${n[`${i}Right`]}px`,borderBottomWidth:`${n[`${i}Bottom`]}px`,borderStyle:"solid"})},Ru=(n,i,a)=>{const c=Math.max(a.height,20),d=Math.max(a.width,60),m=5;let T;n.top+n.height+c<=i.top+i.height?n.top+n.height<i.top+0?T=i.top+m:T=n.top+n.height+m:n.top-c<=i.top+i.height?n.top-c-m<i.top+m?T=i.top+m:T=n.top-c-m:T=i.top+i.height-c-m;let N=n.left+m;return n.left<i.left&&(N=i.left+m),n.left+d>i.left+i.width&&(N=i.left+i.width-d-m),{style:{top:`${T}px`,left:`${N}px`}}},Ni=n=>{var i;return((i=n.ownerDocument)==null?void 0:i.defaultView)||null},Pi=n=>{var i;return((i=Ni(n))==null?void 0:i.frameElement)||null},Tu=n=>{const i=Di(n);return Li([n.getBoundingClientRect(),{top:i.borderTop,left:i.borderLeft,bottom:i.borderBottom,right:i.borderRight,width:0,height:0}])},Li=n=>n.reduce((i,a)=>i==null?a:{top:i.top+a.top,left:i.left+a.left,width:i.width,height:i.height,bottom:i.bottom+a.bottom,right:i.right+a.right}),ku=n=>{if((n==null?void 0:n.tagName)!=="IFRAME")return!1;const i=n;if(!i.contentDocument)return Pe.warn("iframe content document is not accessible."),!1;const c=i.contentDocument.getElementById(Go);if(c){let d=c.parentElement;for(;d;){if(d.tagName.toLowerCase()==="iframe")return!1;d=d.parentElement}return!0}return!1},Ai=(n,i)=>{const a=Pi(n);if(!a||ku(a))return n.getBoundingClientRect();const c=[n.getBoundingClientRect()];let d=a,m=!1;for(;d;){const T=Tu(d);if(c.push(T),d=Pi(d),m)break;d&&Ni(d)===i&&(m=!0)}return Li(c)},Di=n=>{const i=window.getComputedStyle(n);return{borderLeft:parseInt(i.borderLeftWidth,10),borderRight:parseInt(i.borderRightWidth,10),borderTop:parseInt(i.borderTopWidth,10),borderBottom:parseInt(i.borderBottomWidth,10),marginLeft:parseInt(i.marginLeft,10),marginRight:parseInt(i.marginRight,10),marginTop:parseInt(i.marginTop,10),marginBottom:parseInt(i.marginBottom,10),paddingLeft:parseInt(i.paddingLeft,10),paddingRight:parseInt(i.paddingRight,10),paddingTop:parseInt(i.paddingTop,10),paddingBottom:parseInt(i.paddingBottom,10)}};class xu{constructor(i,a){at(this,"node");at(this,"border");at(this,"padding");at(this,"content");this.node=i.createElement("div"),this.border=i.createElement("div"),this.padding=i.createElement("div"),this.content=i.createElement("div"),this.border.style.borderColor=Vn.border,this.padding.style.borderColor=Vn.padding,this.content.style.backgroundColor=Vn.background,Object.assign(this.node.style,{borderColor:Vn.margin,pointerEvents:"none",position:"fixed"}),this.node.style.zIndex="9999",this.node.appendChild(this.border),this.border.appendChild(this.padding),this.padding.appendChild(this.content),a.appendChild(this.node)}remove(){this.node.remove()}update(i,a){Hr(a,"margin",this.node),Hr(a,"border",this.border),Hr(a,"padding",this.padding),Object.assign(this.content.style,{height:`${i.height-a.borderTop-a.borderBottom-a.paddingTop-a.paddingBottom}px`,width:`${i.width-a.borderLeft-a.borderRight-a.paddingLeft-a.paddingRight}px`}),Object.assign(this.node.style,{top:`${i.top-a.marginTop}px`,left:`${i.left-a.marginLeft}px`})}}class Nu{constructor(i,a){at(this,"el");at(this,"contentEl");at(this,"nameEl");at(this,"fileEl");at(this,"fileOpenTipEl");at(this,"dimEl");this.el=i.createElement("div"),Object.assign(this.el.style,Jt.container),this.contentEl=i.createElement("div"),Object.assign(this.contentEl.style,Jt.content),this.nameEl=i.createElement("span"),this.contentEl.appendChild(this.nameEl),Object.assign(this.nameEl.style,Jt.name),this.fileEl=i.createElement("span"),this.contentEl.appendChild(this.fileEl),Object.assign(this.fileEl.style,Jt.name),this.fileOpenTipEl=i.createElement("span"),this.contentEl.appendChild(this.fileOpenTipEl),Object.assign(this.fileOpenTipEl.style,Jt.tip),this.el.appendChild(this.contentEl),this.dimEl=i.createElement("span"),this.el.appendChild(this.dimEl),Object.assign(this.dimEl.style,Jt.dim),this.el.style.zIndex="9999",a.appendChild(this.el)}remove(){this.el.remove()}updateText(i,a,c,d){this.nameEl.textContent=i,a?(this.fileEl.textContent=a,this.fileEl.style.display="block",this.fileOpenTipEl.style.display="block"):(this.fileEl.textContent=null,this.fileEl.style.display="none",this.fileOpenTipEl.style.display="none"),this.dimEl.textContent=`${Math.round(c)}px × ${Math.round(d)}px`}updateBlock(i){const{awaitingFileOpen:a}=i;a?this.fileOpenTipEl.innerHTML="<b>Click</b> to go to the file":this.fileOpenTipEl.innerHTML="Press <b>Alt(⌥)</b> then <b>Click</b> to go to the file"}updatePosition(i,a){const c=this.el.getBoundingClientRect(),d=Ru(i,a,{width:c.width,height:c.height});Object.assign(this.el.style,d.style)}}class Pu{constructor(){at(this,"window");at(this,"tipBoundsWindow");at(this,"container");at(this,"tip");at(this,"rects");const i=window.__REACT_DEVTOOLS_TARGET_WINDOW__||window;this.window=i;const a=window.__REACT_DEVTOOLS_TARGET_WINDOW__||window;this.tipBoundsWindow=a;const c=i.document;this.container=c.createElement("div"),this.container.style.zIndex="9999",this.tip=new Nu(c,this.container),this.rects=[]}remove(){this.tip.remove(),this.rects.forEach(i=>{i.remove()}),this.rects.length=0,this.container.remove()}inspect(i,a,c){var $;const{ownerName:d,fileName:m,awaitingFileOpen:T}=c||{},N=i.filter(P=>P.nodeType===Node.ELEMENT_NODE);for(;this.rects.length>N.length;)($=this.rects.pop())==null||$.remove();if(N.length===0)return;for(;this.rects.length<N.length;)this.rects.push(new xu(this.window.document,this.container));const _={top:Number.POSITIVE_INFINITY,right:Number.NEGATIVE_INFINITY,bottom:Number.NEGATIVE_INFINITY,left:Number.POSITIVE_INFINITY};N.forEach((P,Y)=>{const G=Ai(P,this.window),j=Di(P);_.top=Math.min(_.top,G.top-j.marginTop),_.right=Math.max(_.right,G.left+G.width+j.marginRight),_.bottom=Math.max(_.bottom,G.top+G.height+j.marginBottom),_.left=Math.min(_.left,G.left-j.marginLeft),this.rects[Y].update(G,j)}),a||(a=N[0].nodeName.toLowerCase(),d&&(a+=` (in ${d})`)),this.tip.updateText(a,m,_.right-_.left,_.bottom-_.top),this.tip.updateBlock({awaitingFileOpen:T});const w=Ai(this.tipBoundsWindow.document.documentElement,this.window);this.tip.updatePosition({top:_.top,left:_.left,height:_.bottom-_.top,width:_.right-_.left},{top:w.top+this.tipBoundsWindow.scrollY,left:w.left+this.tipBoundsWindow.scrollX,height:this.tipBoundsWindow.innerHeight,width:this.tipBoundsWindow.innerWidth}),this.container.appendChild(this.tip.el),this.window.document.body.appendChild(this.container)}updateTipBlock(i){this.tip.updateBlock(i)}}function Lu({getFiberIdForNative:n,findNativeNodesForFiberId:i,getDisplayNameForFiberId:a},{resolveElementLoc:c}){const d=new Pu;let m=[],T=!1,N=!1,_=!1,w=null,$=null,P=null;function Y(D){let K={fn:D};return m.push(K),function(){m=m.filter(q=>q.fn!==D),K=null}}function G(){for(const{fn:D}of m)D({inspecting:T,hoveredFiberId:w,trigger:$})}function j(D){return P=c(D),P}function te(D){const K=D.target;K instanceof HTMLDivElement&&K.id===Go||($="click",D.preventDefault(),D.stopPropagation(),_&&P&&Jo(P),_e(),se(K,!0),G(),$=null)}function fe(D){D.preventDefault(),D.stopPropagation()}function ue(D){D.preventDefault(),D.stopPropagation()}function me(D){if(D.preventDefault(),D.stopPropagation(),D.target){const K=D.target,q=n(K,!0,N),ve=q&&a(q)||void 0,B=j(K);d.inspect([K],void 0,{ownerName:ve,fileName:Su(B),awaitingFileOpen:_}),se(K)}}function Te(D){D.preventDefault(),D.stopPropagation()}function se(D,K=!1){const q=n(D,!0,N);q!==w&&(w=q,K?_e():G())}function M(D,K){D.length?d.inspect(D,K?a(K)||"Unknown":""):d.remove()}function Q(D){let K=i(D);K!=null&&K.length&&(K=K.filter(q=>q.nodeType===1),M(K,D))}function U(){d.remove()}function de(D){T||(N=!!D,window.addEventListener("click",te,!0),window.addEventListener("mousedown",fe,!0),window.addEventListener("mouseover",fe,!0),window.addEventListener("mouseup",fe,!0),window.addEventListener("pointerdown",ue,!0),window.addEventListener("pointerover",me,!0),window.addEventListener("pointerup",Te,!0),T=!0,w=null,G())}function _e(){window.removeEventListener("click",te,!0),window.removeEventListener("mousedown",fe,!0),window.removeEventListener("mouseover",fe,!0),window.removeEventListener("mouseup",fe,!0),window.removeEventListener("pointerdown",ue,!0),window.removeEventListener("pointerover",me,!0),window.removeEventListener("pointerup",Te,!0),d.remove(),P=null,T=!1,N=!1,G()}function H(D){T&&(_=D,d.updateTipBlock({awaitingFileOpen:D}))}return{subscribe:Y,startHighlight:Q,stopHighlight:U,startInspect:de,stopInspect:_e,inspect:M,toggleFileOpen:H}}const Au=n=>typeof(n==null?void 0:n.type)=="string",Du=n=>{var i;return typeof((i=n==null?void 0:n.type)==null?void 0:i.$$typeof)=="symbol"},Mu=n=>{let i=n.return;for(;i;){if(!Du(i))return i;i=i.return}return null};function ju({findFiberByHostInstance:n,getFiberById:i}){function a(N){var Y,G,j;if(!N)return null;const _=N._debugSource??((Y=N._debugOwner)==null?void 0:Y._debugSource)??((j=(G=N._debugOwner)==null?void 0:G._debugOwner)==null?void 0:j._debugSource);if(!_)return null;const{fileName:w,lineNumber:$,columnNumber:P}=_;return w&&$?{lineNumber:$,columnNumber:P??1,fileName:w.replace(/</g,"").replace(/>/g,"")}:null}function c(N){if(!N)return;const _=n(N);return _||c(N.parentElement)}function d(N){var G;if(!N)return;const _=Mu(N);if(!_)return;const w=Au(_),$=!((G=_.child)!=null&&G.sibling);let P=!w&&$?_:N;const Y=P;for(;P;){if(a(P))return P;P=P.return}return Y}function m(N){const _=c(N),w=d(_);return a(w)}function T(N){const _=i(N);if(!_)return null;const w=d(_);return a(w)}return{resolveElementLoc:m,resolveFiberLoc:T}}function Fu(n,i,a,c){const d=ru(n,i),m=Iu(n,d),T=Cu(d),N=ju(d),_=Lu(T,N);return a({highlightApi:_,locationApi:N,...d.memoryLeaksApi}),c({highlightApi:_}),{..._u(d,m,i),...T,...d.memoryLeaksApi}}var Gn={exports:{}},$u=Gn.exports,Mi;function Bu(){return Mi||(Mi=1,(function(n,i){(function(a,c){n.exports=c()})($u,function(){var a=function(e,t){return(a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(r[s]=o[s])})(e,t)},c=function(){return(c=Object.assign||function(e){for(var t,r=1,o=arguments.length;r<o;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};function d(e,t,r){for(var o,s=0,u=t.length;s<u;s++)!o&&s in t||((o=o||Array.prototype.slice.call(t,0,s))[s]=t[s]);return e.concat(o||Array.prototype.slice.call(t))}var m=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Na,T=Object.keys,N=Array.isArray;function _(e,t){return typeof t!="object"||T(t).forEach(function(r){e[r]=t[r]}),e}typeof Promise>"u"||m.Promise||(m.Promise=Promise);var w=Object.getPrototypeOf,$={}.hasOwnProperty;function P(e,t){return $.call(e,t)}function Y(e,t){typeof t=="function"&&(t=t(w(e))),(typeof Reflect>"u"?T:Reflect.ownKeys)(t).forEach(function(r){j(e,r,t[r])})}var G=Object.defineProperty;function j(e,t,r,o){G(e,t,_(r&&P(r,"get")&&typeof r.get=="function"?{get:r.get,set:r.set,configurable:!0}:{value:r,configurable:!0,writable:!0},o))}function te(e){return{from:function(t){return e.prototype=Object.create(t.prototype),j(e.prototype,"constructor",e),{extend:Y.bind(null,e.prototype)}}}}var fe=Object.getOwnPropertyDescriptor,ue=[].slice;function me(e,t,r){return ue.call(e,t,r)}function Te(e,t){return t(e)}function se(e){if(!e)throw new Error("Assertion Failed")}function M(e){m.setImmediate?setImmediate(e):setTimeout(e,0)}function Q(e,t){if(typeof t=="string"&&P(e,t))return e[t];if(!t)return e;if(typeof t!="string"){for(var r=[],o=0,s=t.length;o<s;++o){var u=Q(e,t[o]);r.push(u)}return r}var l=t.indexOf(".");if(l!==-1){var f=e[t.substr(0,l)];return f==null?void 0:Q(f,t.substr(l+1))}}function U(e,t,r){if(e&&t!==void 0&&!("isFrozen"in Object&&Object.isFrozen(e)))if(typeof t!="string"&&"length"in t){se(typeof r!="string"&&"length"in r);for(var o=0,s=t.length;o<s;++o)U(e,t[o],r[o])}else{var u,l,f=t.indexOf(".");f!==-1?(u=t.substr(0,f),(l=t.substr(f+1))===""?r===void 0?N(e)&&!isNaN(parseInt(u))?e.splice(u,1):delete e[u]:e[u]=r:U(f=!(f=e[u])||!P(e,u)?e[u]={}:f,l,r)):r===void 0?N(e)&&!isNaN(parseInt(t))?e.splice(t,1):delete e[t]:e[t]=r}}function de(e){var t,r={};for(t in e)P(e,t)&&(r[t]=e[t]);return r}var _e=[].concat;function H(e){return _e.apply([],e)}var Pt="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(H([8,16,32,64].map(function(e){return["Int","Uint","Float"].map(function(t){return t+e+"Array"})}))).filter(function(e){return m[e]}),D=new Set(Pt.map(function(e){return m[e]})),K=null;function q(e){return K=new WeakMap,e=(function t(r){if(!r||typeof r!="object")return r;var o=K.get(r);if(o)return o;if(N(r)){o=[],K.set(r,o);for(var s=0,u=r.length;s<u;++s)o.push(t(r[s]))}else if(D.has(r.constructor))o=r;else{var l,f=w(r);for(l in o=f===Object.prototype?{}:Object.create(f),K.set(r,o),r)P(r,l)&&(o[l]=t(r[l]))}return o})(e),K=null,e}var ve={}.toString;function B(e){return ve.call(e).slice(8,-1)}var ae=typeof Symbol<"u"?Symbol.iterator:"@@iterator",ie=typeof ae=="symbol"?function(e){var t;return e!=null&&(t=e[ae])&&t.apply(e)}:function(){return null};function ge(e,t){return t=e.indexOf(t),0<=t&&e.splice(t,1),0<=t}var Ie={};function Ce(e){var t,r,o,s;if(arguments.length===1){if(N(e))return e.slice();if(this===Ie&&typeof e=="string")return[e];if(s=ie(e)){for(r=[];!(o=s.next()).done;)r.push(o.value);return r}if(e==null)return[e];if(typeof(t=e.length)!="number")return[e];for(r=new Array(t);t--;)r[t]=e[t];return r}for(t=arguments.length,r=new Array(t);t--;)r[t]=arguments[t];return r}var Ae=typeof Symbol<"u"?function(e){return e[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},nt=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],vt=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(nt),Ve={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 We(e,t){this.name=e,this.message=t}function tt(e,t){return e+". Errors: "+Object.keys(t).map(function(r){return t[r].toString()}).filter(function(r,o,s){return s.indexOf(r)===o}).join(`
5
5
  `)}function ut(e,t,r,o){this.failures=t,this.failedKeys=o,this.successCount=r,this.message=tt(e,t)}function Xe(e,t){this.name="BulkError",this.failures=Object.keys(t).map(function(r){return t[r]}),this.failuresByPos=t,this.message=tt(e,this.failures)}te(We).from(Error).extend({toString:function(){return this.name+": "+this.message}}),te(ut).from(We),te(Xe).from(We);var ye=vt.reduce(function(e,t){return e[t]=t+"Error",e},{}),Ue=We,ne=vt.reduce(function(e,t){var r=t+"Error";function o(s,u){this.name=r,s?typeof s=="string"?(this.message="".concat(s).concat(u?`
6
6
  `+u:""),this.inner=u||null):typeof s=="object"&&(this.message="".concat(s.name," ").concat(s.message),this.inner=s):(this.message=Ve[t]||r,this.inner=null)}return te(o).from(Ue),e[t]=o,e},{});ne.Syntax=SyntaxError,ne.Type=TypeError,ne.Range=RangeError;var mt=nt.reduce(function(e,t){return e[t+"Error"]=ne[t],e},{}),Rt=vt.reduce(function(e,t){return["Syntax","Type","Range"].indexOf(t)===-1&&(e[t+"Error"]=ne[t]),e},{});function De(){}function Tt(e){return e}function Dt(e,t){return e==null||e===Tt?t:function(r){return t(e(r))}}function yt(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function vn(e,t){return e===De?t:function(){var r=e.apply(this,arguments);r!==void 0&&(arguments[0]=r);var o=this.onsuccess,s=this.onerror;this.onsuccess=null,this.onerror=null;var u=t.apply(this,arguments);return o&&(this.onsuccess=this.onsuccess?yt(o,this.onsuccess):o),s&&(this.onerror=this.onerror?yt(s,this.onerror):s),u!==void 0?u:r}}function bn(e,t){return e===De?t:function(){e.apply(this,arguments);var r=this.onsuccess,o=this.onerror;this.onsuccess=this.onerror=null,t.apply(this,arguments),r&&(this.onsuccess=this.onsuccess?yt(r,this.onsuccess):r),o&&(this.onerror=this.onerror?yt(o,this.onerror):o)}}function wn(e,t){return e===De?t:function(r){var o=e.apply(this,arguments);_(r,o);var s=this.onsuccess,u=this.onerror;return this.onsuccess=null,this.onerror=null,r=t.apply(this,arguments),s&&(this.onsuccess=this.onsuccess?yt(s,this.onsuccess):s),u&&(this.onerror=this.onerror?yt(u,this.onerror):u),o===void 0?r===void 0?void 0:r:_(o,r)}}function En(e,t){return e===De?t:function(){return t.apply(this,arguments)!==!1&&e.apply(this,arguments)}}function oe(e,t){return e===De?t:function(){var r=e.apply(this,arguments);if(r&&typeof r.then=="function"){for(var o=this,s=arguments.length,u=new Array(s);s--;)u[s]=arguments[s];return r.then(function(){return t.apply(o,u)})}return t.apply(this,arguments)}}Rt.ModifyError=ut,Rt.DexieError=We,Rt.BulkError=Xe;var ce=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function be(e){ce=e}var Be={},gt=100,Pt=typeof Promise>"u"?[]:(function(){var e=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[e,w(e),e];var t=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t,w(t),e]})(),nt=Pt[0],vt=Pt[1],Pt=Pt[2],vt=vt&&vt.then,Ze=nt&&nt.constructor,kt=!!Pt,bt=function(e,t){L.push([e,t]),Mt&&(queueMicrotask(Ke),Mt=!1)},ct=!0,Mt=!0,xt=[],en=[],_n=Tt,Et={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:De,pgp:!1,env:{},finalize:De},h=Et,L=[],W=0,F=[];function S(e){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var t=this._PSD=h;if(typeof e!="function"){if(e!==Be)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&we(this,this._value))}this._state=null,this._value=null,++t.ref,(function r(o,s){try{s(function(u){if(o._state===null){if(u===o)throw new TypeError("A promise cannot be resolved with itself.");var l=o._lib&&$e();u&&typeof u.then=="function"?r(o,function(f,y){u instanceof S?u._then(f,y):u.then(f,y)}):(o._state=!0,o._value=u,Fe(o)),l&&qe()}},we.bind(null,o))}catch(u){we(o,u)}})(this,e)}var le={get:function(){var e=h,t=Zn;function r(o,s){var u=this,l=!e.global&&(e!==h||t!==Zn),f=l&&!Ft(),y=new S(function(v,O){Ne(u,new pe(Ui(o,e,l,f),Ui(s,e,l,f),v,O,e))});return this._consoleTask&&(y._consoleTask=this._consoleTask),y}return r.prototype=Be,r},set:function(e){j(this,"then",e&&e.prototype===Be?le:{get:function(){return e},set:le.set})}};function pe(e,t,r,o,s){this.onFulfilled=typeof e=="function"?e:null,this.onRejected=typeof t=="function"?t:null,this.resolve=r,this.reject=o,this.psd=s}function we(e,t){var r,o;en.push(t),e._state===null&&(r=e._lib&&$e(),t=_n(t),e._state=!1,e._value=t,o=e,xt.some(function(s){return s._value===o._value})||xt.push(o),Fe(e),r&&qe())}function Fe(e){var t=e._listeners;e._listeners=[];for(var r=0,o=t.length;r<o;++r)Ne(e,t[r]);var s=e._PSD;--s.ref||s.finalize(),W===0&&(++W,bt(function(){--W==0&&ke()},[]))}function Ne(e,t){if(e._state!==null){var r=e._state?t.onFulfilled:t.onRejected;if(r===null)return(e._state?t.resolve:t.reject)(e._value);++t.psd.ref,++W,bt(He,[r,e,t])}else e._listeners.push(t)}function He(e,t,r){try{var o,s=t._value;!t._state&&en.length&&(en=[]),o=ce&&t._consoleTask?t._consoleTask.run(function(){return e(s)}):e(s),t._state||en.indexOf(s)!==-1||(function(u){for(var l=xt.length;l;)if(xt[--l]._value===u._value)return xt.splice(l,1)})(t),r.resolve(o)}catch(u){r.reject(u)}finally{--W==0&&ke(),--r.psd.ref||r.psd.finalize()}}function Ke(){Ut(Et,function(){$e()&&qe()})}function $e(){var e=ct;return Mt=ct=!1,e}function qe(){var e,t,r;do for(;0<L.length;)for(e=L,L=[],r=e.length,t=0;t<r;++t){var o=e[t];o[0].apply(null,o[1])}while(0<L.length);Mt=ct=!0}function ke(){var e=xt;xt=[],e.forEach(function(o){o._PSD.onunhandled.call(null,o._value,o)});for(var t=F.slice(0),r=t.length;r;)t[--r]()}function rt(e){return new S(Be,!1,e)}function je(e,t){var r=h;return function(){var o=$e(),s=h;try{return $t(r,!0),e.apply(this,arguments)}catch(u){t&&t(u)}finally{$t(s,!1),o&&qe()}}}Y(S.prototype,{then:le,_then:function(e,t){Ne(this,new pe(null,null,e,t,h))},catch:function(e){if(arguments.length===1)return this.then(null,e);var t=e,r=arguments[1];return typeof t=="function"?this.then(null,function(o){return(o instanceof t?r:rt)(o)}):this.then(null,function(o){return(o&&o.name===t?r:rt)(o)})},finally:function(e){return this.then(function(t){return S.resolve(e()).then(function(){return t})},function(t){return S.resolve(e()).then(function(){return rt(t)})})},timeout:function(e,t){var r=this;return e<1/0?new S(function(o,s){var u=setTimeout(function(){return s(new ne.Timeout(t))},e);r.then(o,s).finally(clearTimeout.bind(null,u))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&j(S.prototype,Symbol.toStringTag,"Dexie.Promise"),Et.env=qi(),Y(S,{all:function(){var e=Ce.apply(null,arguments).map(Jn);return new S(function(t,r){e.length===0&&t([]);var o=e.length;e.forEach(function(s,u){return S.resolve(s).then(function(l){e[u]=l,--o||t(e)},r)})})},resolve:function(e){return e instanceof S?e:e&&typeof e.then=="function"?new S(function(t,r){e.then(t,r)}):new S(Be,!0,e)},reject:rt,race:function(){var e=Ce.apply(null,arguments).map(Jn);return new S(function(t,r){e.map(function(o){return S.resolve(o).then(t,r)})})},PSD:{get:function(){return h},set:function(e){return h=e}},totalEchoes:{get:function(){return Zn}},newPSD:jt,usePSD:Ut,scheduler:{get:function(){return bt},set:function(e){bt=e}},rejectionMapper:{get:function(){return _n},set:function(e){_n=e}},follow:function(e,t){return new S(function(r,o){return jt(function(s,u){var l=h;l.unhandleds=[],l.onunhandled=u,l.finalize=yt(function(){var f,y=this;f=function(){y.unhandleds.length===0?s():u(y.unhandleds[0])},F.push(function v(){f(),F.splice(F.indexOf(v),1)}),++W,bt(function(){--W==0&&ke()},[])},l.finalize),e()},t,r,o)})}}),Ze&&(Ze.allSettled&&j(S,"allSettled",function(){var e=Ce.apply(null,arguments).map(Jn);return new S(function(t){e.length===0&&t([]);var r=e.length,o=new Array(r);e.forEach(function(s,u){return S.resolve(s).then(function(l){return o[u]={status:"fulfilled",value:l}},function(l){return o[u]={status:"rejected",reason:l}}).then(function(){return--r||t(o)})})})}),Ze.any&&typeof AggregateError<"u"&&j(S,"any",function(){var e=Ce.apply(null,arguments).map(Jn);return new S(function(t,r){e.length===0&&r(new AggregateError([]));var o=e.length,s=new Array(o);e.forEach(function(u,l){return S.resolve(u).then(function(f){return t(f)},function(f){s[l]=f,--o||r(new AggregateError(s))})})})}),Ze.withResolvers&&(S.withResolvers=Ze.withResolvers));var Ge={awaits:0,echoes:0,id:0},Yn=0,tn=[],Qn=0,Zn=0,Yu=0;function jt(e,t,r,o){var s=h,u=Object.create(s);return u.parent=s,u.ref=0,u.global=!1,u.id=++Yu,Et.env,u.env=kt?{Promise:S,PromiseProp:{value:S,configurable:!0,writable:!0},all:S.all,race:S.race,allSettled:S.allSettled,any:S.any,resolve:S.resolve,reject:S.reject}:{},t&&_(u,t),++s.ref,u.finalize=function(){--this.parent.ref||this.parent.finalize()},o=Ut(u,e,r,o),u.ref===0&&u.finalize(),o}function nn(){return Ge.id||(Ge.id=++Yn),++Ge.awaits,Ge.echoes+=gt,Ge.id}function Ft(){return!!Ge.awaits&&(--Ge.awaits==0&&(Ge.id=0),Ge.echoes=Ge.awaits*gt,!0)}function Jn(e){return Ge.echoes&&e&&e.constructor===Ze?(nn(),e.then(function(t){return Ft(),t},function(t){return Ft(),Ye(t)})):e}function Qu(){var e=tn[tn.length-1];tn.pop(),$t(e,!1)}function $t(e,t){var r,o=h;(t?!Ge.echoes||Qn++&&e===h:!Qn||--Qn&&e===h)||queueMicrotask(t?(function(s){++Zn,Ge.echoes&&--Ge.echoes!=0||(Ge.echoes=Ge.awaits=Ge.id=0),tn.push(h),$t(s,!0)}).bind(null,e):Qu),e!==h&&(h=e,o===Et&&(Et.env=qi()),kt&&(r=Et.env.Promise,t=e.env,(o.global||e.global)&&(Object.defineProperty(m,"Promise",t.PromiseProp),r.all=t.all,r.race=t.race,r.resolve=t.resolve,r.reject=t.reject,t.allSettled&&(r.allSettled=t.allSettled),t.any&&(r.any=t.any))))}function qi(){var e=m.Promise;return kt?{Promise:e,PromiseProp:Object.getOwnPropertyDescriptor(m,"Promise"),all:e.all,race:e.race,allSettled:e.allSettled,any:e.any,resolve:e.resolve,reject:e.reject}:{}}function Ut(e,t,r,o,s){var u=h;try{return $t(e,!0),t(r,o,s)}finally{$t(u,!1)}}function Ui(e,t,r,o){return typeof e!="function"?e:function(){var s=h;r&&nn(),$t(t,!0);try{return e.apply(this,arguments)}finally{$t(s,!1),o&&queueMicrotask(Ft)}}}function Wr(e){Promise===Ze&&Ge.echoes===0?Qn===0?e():enqueueNativeMicroTask(e):setTimeout(e,0)}(""+vt).indexOf("[native code]")===-1&&(nn=Ft=De);var Ye=S.reject,Ht="￿",Nt="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Hi="String expected.",rn=[],er="__dbnames",Xr="readonly",Yr="readwrite";function zt(e,t){return e?t?function(){return e.apply(this,arguments)&&t.apply(this,arguments)}:e:t}var zi={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function tr(e){return typeof e!="string"||/\./.test(e)?function(t){return t}:function(t){return t[e]===void 0&&e in t&&delete(t=q(t))[e],t}}function Vi(){throw ne.Type()}function Le(e,t){try{var r=Gi(e),o=Gi(t);if(r!==o)return r==="Array"?1:o==="Array"?-1:r==="binary"?1:o==="binary"?-1:r==="string"?1:o==="string"?-1:r==="Date"?1:o!=="Date"?NaN:-1;switch(r){case"number":case"Date":case"string":return t<e?1:e<t?-1:0;case"binary":return(function(s,u){for(var l=s.length,f=u.length,y=l<f?l:f,v=0;v<y;++v)if(s[v]!==u[v])return s[v]<u[v]?-1:1;return l===f?0:l<f?-1:1})(Wi(e),Wi(t));case"Array":return(function(s,u){for(var l=s.length,f=u.length,y=l<f?l:f,v=0;v<y;++v){var O=Le(s[v],u[v]);if(O!==0)return O}return l===f?0:l<f?-1:1})(e,t)}}catch{}return NaN}function Gi(e){var t=typeof e;return t!="object"?t:ArrayBuffer.isView(e)?"binary":(e=B(e),e==="ArrayBuffer"?"binary":e)}function Wi(e){return e instanceof Uint8Array?e:ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}var Xi=(ze.prototype._trans=function(e,t,r){var o=this._tx||h.trans,s=this.name,u=ce&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(e==="readonly"?"read":"write"," ").concat(this.name));function l(v,O,p){if(!p.schema[s])throw new ne.NotFound("Table "+s+" not part of transaction");return t(p.idbtrans,p)}var f=$e();try{var y=o&&o.db._novip===this.db._novip?o===h.trans?o._promise(e,l,r):jt(function(){return o._promise(e,l,r)},{trans:o,transless:h.transless||h}):(function v(O,p,C,g){if(O.idbdb&&(O._state.openComplete||h.letThrough||O._vip)){var E=O._createTransaction(p,C,O._dbSchema);try{E.create(),O._state.PR1398_maxLoop=3}catch(I){return I.name===ye.InvalidState&&O.isOpen()&&0<--O._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),O.close({disableAutoOpen:!1}),O.open().then(function(){return v(O,p,C,g)})):Ye(I)}return E._promise(p,function(I,b){return jt(function(){return h.trans=E,g(I,b,E)})}).then(function(I){if(p==="readwrite")try{E.idbtrans.commit()}catch{}return p==="readonly"?I:E._completion.then(function(){return I})})}if(O._state.openComplete)return Ye(new ne.DatabaseClosed(O._state.dbOpenError));if(!O._state.isBeingOpened){if(!O._state.autoOpen)return Ye(new ne.DatabaseClosed);O.open().catch(De)}return O._state.dbReadyPromise.then(function(){return v(O,p,C,g)})})(this.db,e,[this.name],l);return u&&(y._consoleTask=u,y=y.catch(function(v){return console.trace(v),Ye(v)})),y}finally{f&&qe()}},ze.prototype.get=function(e,t){var r=this;return e&&e.constructor===Object?this.where(e).first(t):e==null?Ye(new ne.Type("Invalid argument to Table.get()")):this._trans("readonly",function(o){return r.core.get({trans:o,key:e}).then(function(s){return r.hook.reading.fire(s)})}).then(t)},ze.prototype.where=function(e){if(typeof e=="string")return new this.db.WhereClause(this,e);if(N(e))return new this.db.WhereClause(this,"[".concat(e.join("+"),"]"));var t=T(e);if(t.length===1)return this.where(t[0]).equals(e[t[0]]);var r=this.schema.indexes.concat(this.schema.primKey).filter(function(f){if(f.compound&&t.every(function(v){return 0<=f.keyPath.indexOf(v)})){for(var y=0;y<t.length;++y)if(t.indexOf(f.keyPath[y])===-1)return!1;return!0}return!1}).sort(function(f,y){return f.keyPath.length-y.keyPath.length})[0];if(r&&this.db._maxKey!==Ht){var u=r.keyPath.slice(0,t.length);return this.where(u).equals(u.map(function(y){return e[y]}))}!r&&ce&&console.warn("The query ".concat(JSON.stringify(e)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(t.join("+"),"]"));var o=this.schema.idxByName;function s(f,y){return Le(f,y)===0}var l=t.reduce(function(p,y){var v=p[0],O=p[1],p=o[y],C=e[y];return[v||p,v||!p?zt(O,p&&p.multi?function(g){return g=Q(g,y),N(g)&&g.some(function(E){return s(C,E)})}:function(g){return s(C,Q(g,y))}):O]},[null,null]),u=l[0],l=l[1];return u?this.where(u.name).equals(e[u.keyPath]).filter(l):r?this.filter(l):this.where(t).equals("")},ze.prototype.filter=function(e){return this.toCollection().and(e)},ze.prototype.count=function(e){return this.toCollection().count(e)},ze.prototype.offset=function(e){return this.toCollection().offset(e)},ze.prototype.limit=function(e){return this.toCollection().limit(e)},ze.prototype.each=function(e){return this.toCollection().each(e)},ze.prototype.toArray=function(e){return this.toCollection().toArray(e)},ze.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},ze.prototype.orderBy=function(e){return new this.db.Collection(new this.db.WhereClause(this,N(e)?"[".concat(e.join("+"),"]"):e))},ze.prototype.reverse=function(){return this.toCollection().reverse()},ze.prototype.mapToClass=function(e){var t,r=this.db,o=this.name;function s(){return t!==null&&t.apply(this,arguments)||this}(this.schema.mappedClass=e).prototype instanceof Vi&&((function(y,v){if(typeof v!="function"&&v!==null)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");function O(){this.constructor=y}a(y,v),y.prototype=v===null?Object.create(v):(O.prototype=v.prototype,new O)})(s,t=e),Object.defineProperty(s.prototype,"db",{get:function(){return r},enumerable:!1,configurable:!0}),s.prototype.table=function(){return o},e=s);for(var u=new Set,l=e.prototype;l;l=w(l))Object.getOwnPropertyNames(l).forEach(function(y){return u.add(y)});function f(y){if(!y)return y;var v,O=Object.create(e.prototype);for(v in y)if(!u.has(v))try{O[v]=y[v]}catch{}return O}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=f,this.hook("reading",f),e},ze.prototype.defineClass=function(){return this.mapToClass(function(e){_(this,e)})},ze.prototype.add=function(e,t){var r=this,o=this.schema.primKey,s=o.auto,u=o.keyPath,l=e;return u&&s&&(l=tr(u)(e)),this._trans("readwrite",function(f){return r.core.mutate({trans:f,type:"add",keys:t!=null?[t]:null,values:[l]})}).then(function(f){return f.numFailures?S.reject(f.failures[0]):f.lastResult}).then(function(f){if(u)try{U(e,u,f)}catch{}return f})},ze.prototype.update=function(e,t){return typeof e!="object"||N(e)?this.where(":id").equals(e).modify(t):(e=Q(e,this.schema.primKey.keyPath),e===void 0?Ye(new ne.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(e).modify(t))},ze.prototype.put=function(e,t){var r=this,o=this.schema.primKey,s=o.auto,u=o.keyPath,l=e;return u&&s&&(l=tr(u)(e)),this._trans("readwrite",function(f){return r.core.mutate({trans:f,type:"put",values:[l],keys:t!=null?[t]:null})}).then(function(f){return f.numFailures?S.reject(f.failures[0]):f.lastResult}).then(function(f){if(u)try{U(e,u,f)}catch{}return f})},ze.prototype.delete=function(e){var t=this;return this._trans("readwrite",function(r){return t.core.mutate({trans:r,type:"delete",keys:[e]})}).then(function(r){return r.numFailures?S.reject(r.failures[0]):void 0})},ze.prototype.clear=function(){var e=this;return this._trans("readwrite",function(t){return e.core.mutate({trans:t,type:"deleteRange",range:zi})}).then(function(t){return t.numFailures?S.reject(t.failures[0]):void 0})},ze.prototype.bulkGet=function(e){var t=this;return this._trans("readonly",function(r){return t.core.getMany({keys:e,trans:r}).then(function(o){return o.map(function(s){return t.hook.reading.fire(s)})})})},ze.prototype.bulkAdd=function(e,t,r){var o=this,s=Array.isArray(t)?t:void 0,u=(r=r||(s?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",function(l){var v=o.schema.primKey,f=v.auto,v=v.keyPath;if(v&&s)throw new ne.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(s&&s.length!==e.length)throw new ne.InvalidArgument("Arguments objects and keys must have the same length");var y=e.length,v=v&&f?e.map(tr(v)):e;return o.core.mutate({trans:l,type:"add",keys:s,values:v,wantResults:u}).then(function(E){var p=E.numFailures,C=E.results,g=E.lastResult,E=E.failures;if(p===0)return u?C:g;throw new Xe("".concat(o.name,".bulkAdd(): ").concat(p," of ").concat(y," operations failed"),E)})})},ze.prototype.bulkPut=function(e,t,r){var o=this,s=Array.isArray(t)?t:void 0,u=(r=r||(s?void 0:t))?r.allKeys:void 0;return this._trans("readwrite",function(l){var v=o.schema.primKey,f=v.auto,v=v.keyPath;if(v&&s)throw new ne.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(s&&s.length!==e.length)throw new ne.InvalidArgument("Arguments objects and keys must have the same length");var y=e.length,v=v&&f?e.map(tr(v)):e;return o.core.mutate({trans:l,type:"put",keys:s,values:v,wantResults:u}).then(function(E){var p=E.numFailures,C=E.results,g=E.lastResult,E=E.failures;if(p===0)return u?C:g;throw new Xe("".concat(o.name,".bulkPut(): ").concat(p," of ").concat(y," operations failed"),E)})})},ze.prototype.bulkUpdate=function(e){var t=this,r=this.core,o=e.map(function(l){return l.key}),s=e.map(function(l){return l.changes}),u=[];return this._trans("readwrite",function(l){return r.getMany({trans:l,keys:o,cache:"clone"}).then(function(f){var y=[],v=[];e.forEach(function(p,C){var g=p.key,E=p.changes,I=f[C];if(I){for(var b=0,R=Object.keys(E);b<R.length;b++){var k=R[b],x=E[k];if(k===t.schema.primKey.keyPath){if(Le(x,g)!==0)throw new ne.Constraint("Cannot update primary key in bulkUpdate()")}else U(I,k,x)}u.push(C),y.push(g),v.push(I)}});var O=y.length;return r.mutate({trans:l,type:"put",keys:y,values:v,updates:{keys:o,changeSpecs:s}}).then(function(p){var C=p.numFailures,g=p.failures;if(C===0)return O;for(var E=0,I=Object.keys(g);E<I.length;E++){var b,R=I[E],k=u[Number(R)];k!=null&&(b=g[R],delete g[R],g[k]=b)}throw new Xe("".concat(t.name,".bulkUpdate(): ").concat(C," of ").concat(O," operations failed"),g)})})})},ze.prototype.bulkDelete=function(e){var t=this,r=e.length;return this._trans("readwrite",function(o){return t.core.mutate({trans:o,type:"delete",keys:e})}).then(function(l){var s=l.numFailures,u=l.lastResult,l=l.failures;if(s===0)return u;throw new Xe("".concat(t.name,".bulkDelete(): ").concat(s," of ").concat(r," operations failed"),l)})},ze);function ze(){}function On(e){function t(l,f){if(f){for(var y=arguments.length,v=new Array(y-1);--y;)v[y-1]=arguments[y];return r[l].subscribe.apply(null,v),e}if(typeof l=="string")return r[l]}var r={};t.addEventType=u;for(var o=1,s=arguments.length;o<s;++o)u(arguments[o]);return t;function u(l,f,y){if(typeof l!="object"){var v;f=f||En;var O={subscribers:[],fire:y=y||De,subscribe:function(p){O.subscribers.indexOf(p)===-1&&(O.subscribers.push(p),O.fire=f(O.fire,p))},unsubscribe:function(p){O.subscribers=O.subscribers.filter(function(C){return C!==p}),O.fire=O.subscribers.reduce(f,y)}};return r[l]=t[l]=O}T(v=l).forEach(function(p){var C=v[p];if(N(C))u(p,v[p][0],v[p][1]);else{if(C!=="asap")throw new ne.InvalidArgument("Invalid event config");var g=u(p,Tt,function(){for(var E=arguments.length,I=new Array(E);E--;)I[E]=arguments[E];g.subscribers.forEach(function(b){M(function(){b.apply(null,I)})})})}})}}function In(e,t){return te(t).from({prototype:e}),t}function on(e,t){return!(e.filter||e.algorithm||e.or)&&(t?e.justLimit:!e.replayFilter)}function Qr(e,t){e.filter=zt(e.filter,t)}function Zr(e,t,r){var o=e.replayFilter;e.replayFilter=o?function(){return zt(o(),t())}:t,e.justLimit=r&&!o}function nr(e,t){if(e.isPrimKey)return t.primaryKey;var r=t.getIndexByKeyPath(e.index);if(!r)throw new ne.Schema("KeyPath "+e.index+" on object store "+t.name+" is not indexed");return r}function Yi(e,t,r){var o=nr(e,t.schema);return t.openCursor({trans:r,values:!e.keysOnly,reverse:e.dir==="prev",unique:!!e.unique,query:{index:o,range:e.range}})}function rr(e,t,r,o){var s=e.replayFilter?zt(e.filter,e.replayFilter()):e.filter;if(e.or){var u={},l=function(f,y,v){var O,p;s&&!s(y,v,function(C){return y.stop(C)},function(C){return y.fail(C)})||((p=""+(O=y.primaryKey))=="[object ArrayBuffer]"&&(p=""+new Uint8Array(O)),P(u,p)||(u[p]=!0,t(f,y,v)))};return Promise.all([e.or._iterate(l,r),Qi(Yi(e,o,r),e.algorithm,l,!e.keysOnly&&e.valueMapper)])}return Qi(Yi(e,o,r),zt(e.algorithm,s),t,!e.keysOnly&&e.valueMapper)}function Qi(e,t,r,o){var s=je(o?function(u,l,f){return r(o(u),l,f)}:r);return e.then(function(u){if(u)return u.start(function(){var l=function(){return u.continue()};t&&!t(u,function(f){return l=f},function(f){u.stop(f),l=De},function(f){u.fail(f),l=De})||s(u.value,u,function(f){return l=f}),l()})})}var Pt=Symbol(),Cn=(Zi.prototype.execute=function(e){if(this.add!==void 0){var t=this.add;if(N(t))return d(d([],N(e)?e:[],!0),t).sort();if(typeof t=="number")return(Number(e)||0)+t;if(typeof t=="bigint")try{return BigInt(e)+t}catch{return BigInt(0)+t}throw new TypeError("Invalid term ".concat(t))}if(this.remove!==void 0){var r=this.remove;if(N(r))return N(e)?e.filter(function(o){return!r.includes(o)}).sort():[];if(typeof r=="number")return Number(e)-r;if(typeof r=="bigint")try{return BigInt(e)-r}catch{return BigInt(0)-r}throw new TypeError("Invalid subtrahend ".concat(r))}return t=(t=this.replacePrefix)===null||t===void 0?void 0:t[0],t&&typeof e=="string"&&e.startsWith(t)?this.replacePrefix[1]+e.substring(t.length):e},Zi);function Zi(e){Object.assign(this,e)}var Zu=(Me.prototype._read=function(e,t){var r=this._ctx;return r.error?r.table._trans(null,Ye.bind(null,r.error)):r.table._trans("readonly",e).then(t)},Me.prototype._write=function(e){var t=this._ctx;return t.error?t.table._trans(null,Ye.bind(null,t.error)):t.table._trans("readwrite",e,"locked")},Me.prototype._addAlgorithm=function(e){var t=this._ctx;t.algorithm=zt(t.algorithm,e)},Me.prototype._iterate=function(e,t){return rr(this._ctx,e,t,this._ctx.table.core)},Me.prototype.clone=function(e){var t=Object.create(this.constructor.prototype),r=Object.create(this._ctx);return e&&_(r,e),t._ctx=r,t},Me.prototype.raw=function(){return this._ctx.valueMapper=null,this},Me.prototype.each=function(e){var t=this._ctx;return this._read(function(r){return rr(t,e,r,t.table.core)})},Me.prototype.count=function(e){var t=this;return this._read(function(r){var o=t._ctx,s=o.table.core;if(on(o,!0))return s.count({trans:r,query:{index:nr(o,s.schema),range:o.range}}).then(function(l){return Math.min(l,o.limit)});var u=0;return rr(o,function(){return++u,!1},r,s).then(function(){return u})}).then(e)},Me.prototype.sortBy=function(e,t){var r=e.split(".").reverse(),o=r[0],s=r.length-1;function u(y,v){return v?u(y[r[v]],v-1):y[o]}var l=this._ctx.dir==="next"?1:-1;function f(y,v){return Le(u(y,s),u(v,s))*l}return this.toArray(function(y){return y.sort(f)}).then(t)},Me.prototype.toArray=function(e){var t=this;return this._read(function(r){var o=t._ctx;if(o.dir==="next"&&on(o,!0)&&0<o.limit){var s=o.valueMapper,u=nr(o,o.table.core.schema);return o.table.core.query({trans:r,limit:o.limit,values:!0,query:{index:u,range:o.range}}).then(function(f){return f=f.result,s?f.map(s):f})}var l=[];return rr(o,function(f){return l.push(f)},r,o.table.core).then(function(){return l})},e)},Me.prototype.offset=function(e){var t=this._ctx;return e<=0||(t.offset+=e,on(t)?Zr(t,function(){var r=e;return function(o,s){return r===0||(r===1?--r:s(function(){o.advance(r),r=0}),!1)}}):Zr(t,function(){var r=e;return function(){return--r<0}})),this},Me.prototype.limit=function(e){return this._ctx.limit=Math.min(this._ctx.limit,e),Zr(this._ctx,function(){var t=e;return function(r,o,s){return--t<=0&&o(s),0<=t}},!0),this},Me.prototype.until=function(e,t){return Qr(this._ctx,function(r,o,s){return!e(r.value)||(o(s),t)}),this},Me.prototype.first=function(e){return this.limit(1).toArray(function(t){return t[0]}).then(e)},Me.prototype.last=function(e){return this.reverse().first(e)},Me.prototype.filter=function(e){var t;return Qr(this._ctx,function(r){return e(r.value)}),(t=this._ctx).isMatch=zt(t.isMatch,e),this},Me.prototype.and=function(e){return this.filter(e)},Me.prototype.or=function(e){return new this.db.WhereClause(this._ctx.table,e,this)},Me.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},Me.prototype.desc=function(){return this.reverse()},Me.prototype.eachKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(r,o){e(o.key,o)})},Me.prototype.eachUniqueKey=function(e){return this._ctx.unique="unique",this.eachKey(e)},Me.prototype.eachPrimaryKey=function(e){var t=this._ctx;return t.keysOnly=!t.isMatch,this.each(function(r,o){e(o.primaryKey,o)})},Me.prototype.keys=function(e){var t=this._ctx;t.keysOnly=!t.isMatch;var r=[];return this.each(function(o,s){r.push(s.key)}).then(function(){return r}).then(e)},Me.prototype.primaryKeys=function(e){var t=this._ctx;if(t.dir==="next"&&on(t,!0)&&0<t.limit)return this._read(function(o){var s=nr(t,t.table.core.schema);return t.table.core.query({trans:o,values:!1,limit:t.limit,query:{index:s,range:t.range}})}).then(function(o){return o.result}).then(e);t.keysOnly=!t.isMatch;var r=[];return this.each(function(o,s){r.push(s.primaryKey)}).then(function(){return r}).then(e)},Me.prototype.uniqueKeys=function(e){return this._ctx.unique="unique",this.keys(e)},Me.prototype.firstKey=function(e){return this.limit(1).keys(function(t){return t[0]}).then(e)},Me.prototype.lastKey=function(e){return this.reverse().firstKey(e)},Me.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 Qr(this._ctx,function(s){var o=s.primaryKey.toString(),s=P(t,o);return t[o]=!0,!s}),this},Me.prototype.modify=function(e){var t=this,r=this._ctx;return this._write(function(o){var s,u,l;l=typeof e=="function"?e:(s=T(e),u=s.length,function(b){for(var R=!1,k=0;k<u;++k){var x=s[k],A=e[x],z=Q(b,x);A instanceof Cn?(U(b,x,A.execute(z)),R=!0):z!==A&&(U(b,x,A),R=!0)}return R});var f=r.table.core,p=f.schema.primaryKey,y=p.outbound,v=p.extractKey,O=200,p=t.db._options.modifyChunkSize;p&&(O=typeof p=="object"?p[f.name]||p["*"]||200:p);function C(b,x){var k=x.failures,x=x.numFailures;E+=b-x;for(var A=0,z=T(k);A<z.length;A++){var J=z[A];g.push(k[J])}}var g=[],E=0,I=[];return t.clone().primaryKeys().then(function(b){function R(x){var A=Math.min(O,b.length-x);return f.getMany({trans:o,keys:b.slice(x,x+A),cache:"immutable"}).then(function(z){for(var J=[],V=[],X=y?[]:null,ee=[],Z=0;Z<A;++Z){var re=z[Z],Oe={value:q(re),primKey:b[x+Z]};l.call(Oe,Oe.value,Oe)!==!1&&(Oe.value==null?ee.push(b[x+Z]):y||Le(v(re),v(Oe.value))===0?(V.push(Oe.value),y&&X.push(b[x+Z])):(ee.push(b[x+Z]),J.push(Oe.value)))}return Promise.resolve(0<J.length&&f.mutate({trans:o,type:"add",values:J}).then(function(Se){for(var Re in Se.failures)ee.splice(parseInt(Re),1);C(J.length,Se)})).then(function(){return(0<V.length||k&&typeof e=="object")&&f.mutate({trans:o,type:"put",keys:X,values:V,criteria:k,changeSpec:typeof e!="function"&&e,isAdditionalChunk:0<x}).then(function(Se){return C(V.length,Se)})}).then(function(){return(0<ee.length||k&&e===Jr)&&f.mutate({trans:o,type:"delete",keys:ee,criteria:k,isAdditionalChunk:0<x}).then(function(Se){return C(ee.length,Se)})}).then(function(){return b.length>x+A&&R(x+O)})})}var k=on(r)&&r.limit===1/0&&(typeof e!="function"||e===Jr)&&{index:r.index,range:r.range};return R(0).then(function(){if(0<g.length)throw new ut("Error modifying one or more objects",g,E,I);return b.length})})})},Me.prototype.delete=function(){var e=this._ctx,t=e.range;return on(e)&&(e.isPrimKey||t.type===3)?this._write(function(r){var o=e.table.core.schema.primaryKey,s=t;return e.table.core.count({trans:r,query:{index:o,range:s}}).then(function(u){return e.table.core.mutate({trans:r,type:"deleteRange",range:s}).then(function(l){var f=l.failures;if(l.lastResult,l.results,l=l.numFailures,l)throw new ut("Could not delete some values",Object.keys(f).map(function(y){return f[y]}),u-l);return u-l})})}):this.modify(Jr)},Me);function Me(){}var Jr=function(e,t){return t.value=null};function Ju(e,t){return e<t?-1:e===t?0:1}function ec(e,t){return t<e?-1:e===t?0:1}function ft(e,t,r){return e=e instanceof es?new e.Collection(e):e,e._ctx.error=new(r||TypeError)(t),e}function sn(e){return new e.Collection(e,function(){return Ji("")}).limit(0)}function or(e,t,r,o){var s,u,l,f,y,v,O,p=r.length;if(!r.every(function(E){return typeof E=="string"}))return ft(e,Hi);function C(E){s=E==="next"?function(b){return b.toUpperCase()}:function(b){return b.toLowerCase()},u=E==="next"?function(b){return b.toLowerCase()}:function(b){return b.toUpperCase()},l=E==="next"?Ju:ec;var I=r.map(function(b){return{lower:u(b),upper:s(b)}}).sort(function(b,R){return l(b.lower,R.lower)});f=I.map(function(b){return b.upper}),y=I.map(function(b){return b.lower}),O=(v=E)==="next"?"":o}C("next"),e=new e.Collection(e,function(){return Bt(f[0],y[p-1]+o)}),e._ondirectionchange=function(E){C(E)};var g=0;return e._addAlgorithm(function(E,I,b){var R=E.key;if(typeof R!="string")return!1;var k=u(R);if(t(k,y,g))return!0;for(var x=null,A=g;A<p;++A){var z=(function(J,V,X,ee,Z,re){for(var Oe=Math.min(J.length,ee.length),Se=-1,Re=0;Re<Oe;++Re){var dt=V[Re];if(dt!==ee[Re])return Z(J[Re],X[Re])<0?J.substr(0,Re)+X[Re]+X.substr(Re+1):Z(J[Re],ee[Re])<0?J.substr(0,Re)+ee[Re]+X.substr(Re+1):0<=Se?J.substr(0,Se)+V[Se]+X.substr(Se+1):null;Z(J[Re],dt)<0&&(Se=Re)}return Oe<ee.length&&re==="next"?J+X.substr(J.length):Oe<J.length&&re==="prev"?J.substr(0,X.length):Se<0?null:J.substr(0,Se)+ee[Se]+X.substr(Se+1)})(R,k,f[A],y[A],l,v);z===null&&x===null?g=A+1:(x===null||0<l(x,z))&&(x=z)}return I(x!==null?function(){E.continue(x+O)}:b),!1}),e}function Bt(e,t,r,o){return{type:2,lower:e,upper:t,lowerOpen:r,upperOpen:o}}function Ji(e){return{type:1,lower:e,upper:e}}var es=(Object.defineProperty(Je.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),Je.prototype.between=function(e,t,r,o){r=r!==!1,o=o===!0;try{return 0<this._cmp(e,t)||this._cmp(e,t)===0&&(r||o)&&(!r||!o)?sn(this):new this.Collection(this,function(){return Bt(e,t,!r,!o)})}catch{return ft(this,Nt)}},Je.prototype.equals=function(e){return e==null?ft(this,Nt):new this.Collection(this,function(){return Ji(e)})},Je.prototype.above=function(e){return e==null?ft(this,Nt):new this.Collection(this,function(){return Bt(e,void 0,!0)})},Je.prototype.aboveOrEqual=function(e){return e==null?ft(this,Nt):new this.Collection(this,function(){return Bt(e,void 0,!1)})},Je.prototype.below=function(e){return e==null?ft(this,Nt):new this.Collection(this,function(){return Bt(void 0,e,!1,!0)})},Je.prototype.belowOrEqual=function(e){return e==null?ft(this,Nt):new this.Collection(this,function(){return Bt(void 0,e)})},Je.prototype.startsWith=function(e){return typeof e!="string"?ft(this,Hi):this.between(e,e+Ht,!0,!0)},Je.prototype.startsWithIgnoreCase=function(e){return e===""?this.startsWith(e):or(this,function(t,r){return t.indexOf(r[0])===0},[e],Ht)},Je.prototype.equalsIgnoreCase=function(e){return or(this,function(t,r){return t===r[0]},[e],"")},Je.prototype.anyOfIgnoreCase=function(){var e=Ce.apply(Ie,arguments);return e.length===0?sn(this):or(this,function(t,r){return r.indexOf(t)!==-1},e,"")},Je.prototype.startsWithAnyOfIgnoreCase=function(){var e=Ce.apply(Ie,arguments);return e.length===0?sn(this):or(this,function(t,r){return r.some(function(o){return t.indexOf(o)===0})},e,Ht)},Je.prototype.anyOf=function(){var e=this,t=Ce.apply(Ie,arguments),r=this._cmp;try{t.sort(r)}catch{return ft(this,Nt)}if(t.length===0)return sn(this);var o=new this.Collection(this,function(){return Bt(t[0],t[t.length-1])});o._ondirectionchange=function(u){r=u==="next"?e._ascending:e._descending,t.sort(r)};var s=0;return o._addAlgorithm(function(u,l,f){for(var y=u.key;0<r(y,t[s]);)if(++s===t.length)return l(f),!1;return r(y,t[s])===0||(l(function(){u.continue(t[s])}),!1)}),o},Je.prototype.notEqual=function(e){return this.inAnyRange([[-1/0,e],[e,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},Je.prototype.noneOf=function(){var e=Ce.apply(Ie,arguments);if(e.length===0)return new this.Collection(this);try{e.sort(this._ascending)}catch{return ft(this,Nt)}var t=e.reduce(function(r,o){return r?r.concat([[r[r.length-1][1],o]]):[[-1/0,o]]},null);return t.push([e[e.length-1],this.db._maxKey]),this.inAnyRange(t,{includeLowers:!1,includeUppers:!1})},Je.prototype.inAnyRange=function(R,t){var r=this,o=this._cmp,s=this._ascending,u=this._descending,l=this._min,f=this._max;if(R.length===0)return sn(this);if(!R.every(function(k){return k[0]!==void 0&&k[1]!==void 0&&s(k[0],k[1])<=0}))return ft(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",ne.InvalidArgument);var y=!t||t.includeLowers!==!1,v=t&&t.includeUppers===!0,O,p=s;function C(k,x){return p(k[0],x[0])}try{(O=R.reduce(function(k,x){for(var A=0,z=k.length;A<z;++A){var J=k[A];if(o(x[0],J[1])<0&&0<o(x[1],J[0])){J[0]=l(J[0],x[0]),J[1]=f(J[1],x[1]);break}}return A===z&&k.push(x),k},[])).sort(C)}catch{return ft(this,Nt)}var g=0,E=v?function(k){return 0<s(k,O[g][1])}:function(k){return 0<=s(k,O[g][1])},I=y?function(k){return 0<u(k,O[g][0])}:function(k){return 0<=u(k,O[g][0])},b=E,R=new this.Collection(this,function(){return Bt(O[0][0],O[O.length-1][1],!y,!v)});return R._ondirectionchange=function(k){p=k==="next"?(b=E,s):(b=I,u),O.sort(C)},R._addAlgorithm(function(k,x,A){for(var z,J=k.key;b(J);)if(++g===O.length)return x(A),!1;return!E(z=J)&&!I(z)||(r._cmp(J,O[g][1])===0||r._cmp(J,O[g][0])===0||x(function(){p===s?k.continue(O[g][0]):k.continue(O[g][1])}),!1)}),R},Je.prototype.startsWithAnyOf=function(){var e=Ce.apply(Ie,arguments);return e.every(function(t){return typeof t=="string"})?e.length===0?sn(this):this.inAnyRange(e.map(function(t){return[t,t+Ht]})):ft(this,"startsWithAnyOf() only works with strings")},Je);function Je(){}function _t(e){return je(function(t){return Sn(t),e(t.target.error),!1})}function Sn(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault()}var Rn="storagemutated",eo="x-storagemutated-1",Kt=On(null,Rn),tc=(Ot.prototype._lock=function(){return se(!h.global),++this._reculock,this._reculock!==1||h.global||(h.lockOwnerFor=this),this},Ot.prototype._unlock=function(){if(se(!h.global),--this._reculock==0)for(h.global||(h.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var e=this._blockedFuncs.shift();try{Ut(e[1],e[0])}catch{}}return this},Ot.prototype._locked=function(){return this._reculock&&h.lockOwnerFor!==this},Ot.prototype.create=function(e){var t=this;if(!this.mode)return this;var r=this.db.idbdb,o=this.db._state.dbOpenError;if(se(!this.idbtrans),!e&&!r)switch(o&&o.name){case"DatabaseClosedError":throw new ne.DatabaseClosed(o);case"MissingAPIError":throw new ne.MissingAPI(o.message,o);default:throw new ne.OpenFailed(o)}if(!this.active)throw new ne.TransactionInactive;return se(this._completion._state===null),(e=this.idbtrans=e||(this.db.core||r).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=je(function(s){Sn(s),t._reject(e.error)}),e.onabort=je(function(s){Sn(s),t.active&&t._reject(new ne.Abort(e.error)),t.active=!1,t.on("abort").fire(s)}),e.oncomplete=je(function(){t.active=!1,t._resolve(),"mutatedParts"in e&&Kt.storagemutated.fire(e.mutatedParts)}),this},Ot.prototype._promise=function(e,t,r){var o=this;if(e==="readwrite"&&this.mode!=="readwrite")return Ye(new ne.ReadOnly("Transaction is readonly"));if(!this.active)return Ye(new ne.TransactionInactive);if(this._locked())return new S(function(u,l){o._blockedFuncs.push([function(){o._promise(e,t,r).then(u,l)},h])});if(r)return jt(function(){var u=new S(function(l,f){o._lock();var y=t(l,f,o);y&&y.then&&y.then(l,f)});return u.finally(function(){return o._unlock()}),u._lib=!0,u});var s=new S(function(u,l){var f=t(u,l,o);f&&f.then&&f.then(u,l)});return s._lib=!0,s},Ot.prototype._root=function(){return this.parent?this.parent._root():this},Ot.prototype.waitFor=function(e){var t,r=this._root(),o=S.resolve(e);r._waitingFor?r._waitingFor=r._waitingFor.then(function(){return o}):(r._waitingFor=o,r._waitingQueue=[],t=r.idbtrans.objectStore(r.storeNames[0]),(function u(){for(++r._spinCount;r._waitingQueue.length;)r._waitingQueue.shift()();r._waitingFor&&(t.get(-1/0).onsuccess=u)})());var s=r._waitingFor;return new S(function(u,l){o.then(function(f){return r._waitingQueue.push(je(u.bind(null,f)))},function(f){return r._waitingQueue.push(je(l.bind(null,f)))}).finally(function(){r._waitingFor===s&&(r._waitingFor=null)})})},Ot.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new ne.Abort))},Ot.prototype.table=function(e){var t=this._memoizedTables||(this._memoizedTables={});if(P(t,e))return t[e];var r=this.schema[e];if(!r)throw new ne.NotFound("Table "+e+" not part of transaction");return r=new this.db.Table(e,r,this),r.core=this.db.core.table(e),t[e]=r},Ot);function Ot(){}function to(e,t,r,o,s,u,l){return{name:e,keyPath:t,unique:r,multi:o,auto:s,compound:u,src:(r&&!l?"&":"")+(o?"*":"")+(s?"++":"")+ts(t)}}function ts(e){return typeof e=="string"?e:e?"["+[].join.call(e,"+")+"]":""}function no(e,t,r){return{name:e,primKey:t,indexes:r,mappedClass:null,idxByName:(o=function(s){return[s.name,s]},r.reduce(function(s,u,l){return l=o(u,l),l&&(s[l[0]]=l[1]),s},{}))};var o}var Tn=function(e){try{return e.only([[]]),Tn=function(){return[[]]},[[]]}catch{return Tn=function(){return Ht},Ht}};function ro(e){return e==null?function(){}:typeof e=="string"?(t=e).split(".").length===1?function(r){return r[t]}:function(r){return Q(r,t)}:function(r){return Q(r,e)};var t}function ns(e){return[].slice.call(e)}var nc=0;function kn(e){return e==null?":id":typeof e=="string"?e:"[".concat(e.join("+"),"]")}function rc(e,t,y){function o(b){if(b.type===3)return null;if(b.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var g=b.lower,E=b.upper,I=b.lowerOpen,b=b.upperOpen;return g===void 0?E===void 0?null:t.upperBound(E,!!b):E===void 0?t.lowerBound(g,!!I):t.bound(g,E,!!I,!!b)}function s(C){var g,E=C.name;return{name:E,schema:C,mutate:function(I){var b=I.trans,R=I.type,k=I.keys,x=I.values,A=I.range;return new Promise(function(z,J){z=je(z);var V=b.objectStore(E),X=V.keyPath==null,ee=R==="put"||R==="add";if(!ee&&R!=="delete"&&R!=="deleteRange")throw new Error("Invalid operation type: "+R);var Z,re=(k||x||{length:1}).length;if(k&&x&&k.length!==x.length)throw new Error("Given keys array must have same length as given values array.");if(re===0)return z({numFailures:0,failures:{},results:[],lastResult:void 0});function Oe(lt){++dt,Sn(lt)}var Se=[],Re=[],dt=0;if(R==="deleteRange"){if(A.type===4)return z({numFailures:dt,failures:Re,results:[],lastResult:void 0});A.type===3?Se.push(Z=V.clear()):Se.push(Z=V.delete(o(A)))}else{var X=ee?X?[x,k]:[x,null]:[k,null],Ee=X[0],it=X[1];if(ee)for(var st=0;st<re;++st)Se.push(Z=it&&it[st]!==void 0?V[R](Ee[st],it[st]):V[R](Ee[st])),Z.onerror=Oe;else for(st=0;st<re;++st)Se.push(Z=V[R](Ee[st])),Z.onerror=Oe}function gr(lt){lt=lt.target.result,Se.forEach(function(Wt,_o){return Wt.error!=null&&(Re[_o]=Wt.error)}),z({numFailures:dt,failures:Re,results:R==="delete"?k:Se.map(function(Wt){return Wt.result}),lastResult:lt})}Z.onerror=function(lt){Oe(lt),gr(lt)},Z.onsuccess=gr})},getMany:function(I){var b=I.trans,R=I.keys;return new Promise(function(k,x){k=je(k);for(var A,z=b.objectStore(E),J=R.length,V=new Array(J),X=0,ee=0,Z=function(Se){Se=Se.target,V[Se._pos]=Se.result,++ee===X&&k(V)},re=_t(x),Oe=0;Oe<J;++Oe)R[Oe]!=null&&((A=z.get(R[Oe]))._pos=Oe,A.onsuccess=Z,A.onerror=re,++X);X===0&&k(V)})},get:function(I){var b=I.trans,R=I.key;return new Promise(function(k,x){k=je(k);var A=b.objectStore(E).get(R);A.onsuccess=function(z){return k(z.target.result)},A.onerror=_t(x)})},query:(g=v,function(I){return new Promise(function(b,R){b=je(b);var k,x,A,X=I.trans,z=I.values,J=I.limit,Z=I.query,V=J===1/0?void 0:J,ee=Z.index,Z=Z.range,X=X.objectStore(E),ee=ee.isPrimaryKey?X:X.index(ee.name),Z=o(Z);if(J===0)return b({result:[]});g?((V=z?ee.getAll(Z,V):ee.getAllKeys(Z,V)).onsuccess=function(re){return b({result:re.target.result})},V.onerror=_t(R)):(k=0,x=!z&&"openKeyCursor"in ee?ee.openKeyCursor(Z):ee.openCursor(Z),A=[],x.onsuccess=function(re){var Oe=x.result;return Oe?(A.push(z?Oe.value:Oe.primaryKey),++k===J?b({result:A}):void Oe.continue()):b({result:A})},x.onerror=_t(R))})}),openCursor:function(I){var b=I.trans,R=I.values,k=I.query,x=I.reverse,A=I.unique;return new Promise(function(z,J){z=je(z);var ee=k.index,V=k.range,X=b.objectStore(E),X=ee.isPrimaryKey?X:X.index(ee.name),ee=x?A?"prevunique":"prev":A?"nextunique":"next",Z=!R&&"openKeyCursor"in X?X.openKeyCursor(o(V),ee):X.openCursor(o(V),ee);Z.onerror=_t(J),Z.onsuccess=je(function(re){var Oe,Se,Re,dt,Ee=Z.result;Ee?(Ee.___id=++nc,Ee.done=!1,Oe=Ee.continue.bind(Ee),Se=(Se=Ee.continuePrimaryKey)&&Se.bind(Ee),Re=Ee.advance.bind(Ee),dt=function(){throw new Error("Cursor not stopped")},Ee.trans=b,Ee.stop=Ee.continue=Ee.continuePrimaryKey=Ee.advance=function(){throw new Error("Cursor not started")},Ee.fail=je(J),Ee.next=function(){var it=this,st=1;return this.start(function(){return st--?it.continue():it.stop()}).then(function(){return it})},Ee.start=function(it){function st(){if(Z.result)try{it()}catch(lt){Ee.fail(lt)}else Ee.done=!0,Ee.start=function(){throw new Error("Cursor behind last entry")},Ee.stop()}var gr=new Promise(function(lt,Wt){lt=je(lt),Z.onerror=_t(Wt),Ee.fail=Wt,Ee.stop=function(_o){Ee.stop=Ee.continue=Ee.continuePrimaryKey=Ee.advance=dt,lt(_o)}});return Z.onsuccess=je(function(lt){Z.onsuccess=st,st()}),Ee.continue=Oe,Ee.continuePrimaryKey=Se,Ee.advance=Re,st(),gr},z(Ee)):z(null)},J)})},count:function(I){var b=I.query,R=I.trans,k=b.index,x=b.range;return new Promise(function(A,z){var J=R.objectStore(E),V=k.isPrimaryKey?J:J.index(k.name),J=o(x),V=J?V.count(J):V.count();V.onsuccess=je(function(X){return A(X.target.result)}),V.onerror=_t(z)})}}}var u,l,f,O=(l=y,f=ns((u=e).objectStoreNames),{schema:{name:u.name,tables:f.map(function(C){return l.objectStore(C)}).map(function(C){var g=C.keyPath,b=C.autoIncrement,E=N(g),I={},b={name:C.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:g==null,compound:E,keyPath:g,autoIncrement:b,unique:!0,extractKey:ro(g)},indexes:ns(C.indexNames).map(function(R){return C.index(R)}).map(function(A){var k=A.name,x=A.unique,z=A.multiEntry,A=A.keyPath,z={name:k,compound:N(A),keyPath:A,unique:x,multiEntry:z,extractKey:ro(A)};return I[kn(A)]=z}),getIndexByKeyPath:function(R){return I[kn(R)]}};return I[":id"]=b.primaryKey,g!=null&&(I[kn(g)]=b.primaryKey),b})},hasGetAll:0<f.length&&"getAll"in l.objectStore(f[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),y=O.schema,v=O.hasGetAll,O=y.tables.map(s),p={};return O.forEach(function(C){return p[C.name]=C}),{stack:"dbcore",transaction:e.transaction.bind(e),table:function(C){if(!p[C])throw new Error("Table '".concat(C,"' not found"));return p[C]},MIN_KEY:-1/0,MAX_KEY:Tn(t),schema:y}}function oc(e,t,r,o){var s=r.IDBKeyRange;return r.indexedDB,{dbcore:(o=rc(t,s,o),e.dbcore.reduce(function(u,l){return l=l.create,c(c({},u),l(u))},o))}}function ir(e,o){var r=o.db,o=oc(e._middlewares,r,e._deps,o);e.core=o.dbcore,e.tables.forEach(function(s){var u=s.name;e.core.schema.tables.some(function(l){return l.name===u})&&(s.core=e.core.table(u),e[u]instanceof e.Table&&(e[u].core=s.core))})}function sr(e,t,r,o){r.forEach(function(s){var u=o[s];t.forEach(function(l){var f=(function y(v,O){return fe(v,O)||(v=w(v))&&y(v,O)})(l,s);(!f||"value"in f&&f.value===void 0)&&(l===e.Transaction.prototype||l instanceof e.Transaction?j(l,s,{get:function(){return this.table(s)},set:function(y){G(this,s,{value:y,writable:!0,configurable:!0,enumerable:!0})}}):l[s]=new e.Table(s,u))})})}function oo(e,t){t.forEach(function(r){for(var o in r)r[o]instanceof e.Table&&delete r[o]})}function ic(e,t){return e._cfg.version-t._cfg.version}function sc(e,t,r,o){var s=e._dbSchema;r.objectStoreNames.contains("$meta")&&!s.$meta&&(s.$meta=no("$meta",os("")[0],[]),e._storeNames.push("$meta"));var u=e._createTransaction("readwrite",e._storeNames,s);u.create(r),u._completion.catch(o);var l=u._reject.bind(u),f=h.transless||h;jt(function(){return h.trans=u,h.transless=f,t!==0?(ir(e,r),v=t,((y=u).storeNames.includes("$meta")?y.table("$meta").get("version").then(function(O){return O??v}):S.resolve(v)).then(function(O){return C=O,g=u,E=r,I=[],O=(p=e)._versions,b=p._dbSchema=ur(0,p.idbdb,E),(O=O.filter(function(R){return R._cfg.version>=C})).length!==0?(O.forEach(function(R){I.push(function(){var k=b,x=R._cfg.dbschema;cr(p,k,E),cr(p,x,E),b=p._dbSchema=x;var A=io(k,x);A.add.forEach(function(ee){so(E,ee[0],ee[1].primKey,ee[1].indexes)}),A.change.forEach(function(ee){if(ee.recreate)throw new ne.Upgrade("Not yet support for changing primary key");var Z=E.objectStore(ee.name);ee.add.forEach(function(re){return ar(Z,re)}),ee.change.forEach(function(re){Z.deleteIndex(re.name),ar(Z,re)}),ee.del.forEach(function(re){return Z.deleteIndex(re)})});var z=R._cfg.contentUpgrade;if(z&&R._cfg.version>C){ir(p,E),g._memoizedTables={};var J=de(x);A.del.forEach(function(ee){J[ee]=k[ee]}),oo(p,[p.Transaction.prototype]),sr(p,[p.Transaction.prototype],T(J),J),g.schema=J;var V,X=Ae(z);return X&&nn(),A=S.follow(function(){var ee;(V=z(g))&&X&&(ee=Ft.bind(null,null),V.then(ee,ee))}),V&&typeof V.then=="function"?S.resolve(V):A.then(function(){return V})}}),I.push(function(k){var x,A,z=R._cfg.dbschema;x=z,A=k,[].slice.call(A.db.objectStoreNames).forEach(function(J){return x[J]==null&&A.db.deleteObjectStore(J)}),oo(p,[p.Transaction.prototype]),sr(p,[p.Transaction.prototype],p._storeNames,p._dbSchema),g.schema=p._dbSchema}),I.push(function(k){p.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(p.idbdb.version/10)===R._cfg.version?(p.idbdb.deleteObjectStore("$meta"),delete p._dbSchema.$meta,p._storeNames=p._storeNames.filter(function(x){return x!=="$meta"})):k.objectStore("$meta").put(R._cfg.version,"version"))})}),(function R(){return I.length?S.resolve(I.shift()(g.idbtrans)).then(R):S.resolve()})().then(function(){rs(b,E)})):S.resolve();var p,C,g,E,I,b}).catch(l)):(T(s).forEach(function(O){so(r,O,s[O].primKey,s[O].indexes)}),ir(e,r),void S.follow(function(){return e.on.populate.fire(u)}).catch(l));var y,v})}function ac(e,t){rs(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 r=ur(0,e.idbdb,t);cr(e,e._dbSchema,t);for(var o=0,s=io(r,e._dbSchema).change;o<s.length;o++){var u=(function(l){if(l.change.length||l.recreate)return console.warn("Unable to patch indexes of table ".concat(l.name," because it has changes on the type of index or primary key.")),{value:void 0};var f=t.objectStore(l.name);l.add.forEach(function(y){ce&&console.debug("Dexie upgrade patch: Creating missing index ".concat(l.name,".").concat(y.src)),ar(f,y)})})(s[o]);if(typeof u=="object")return u.value}}function io(e,t){var r,o={del:[],add:[],change:[]};for(r in e)t[r]||o.del.push(r);for(r in t){var s=e[r],u=t[r];if(s){var l={name:r,def:u,recreate:!1,del:[],add:[],change:[]};if(""+(s.primKey.keyPath||"")!=""+(u.primKey.keyPath||"")||s.primKey.auto!==u.primKey.auto)l.recreate=!0,o.change.push(l);else{var f=s.idxByName,y=u.idxByName,v=void 0;for(v in f)y[v]||l.del.push(v);for(v in y){var O=f[v],p=y[v];O?O.src!==p.src&&l.change.push(p):l.add.push(p)}(0<l.del.length||0<l.add.length||0<l.change.length)&&o.change.push(l)}}else o.add.push([r,u])}return o}function so(e,t,r,o){var s=e.db.createObjectStore(t,r.keyPath?{keyPath:r.keyPath,autoIncrement:r.auto}:{autoIncrement:r.auto});return o.forEach(function(u){return ar(s,u)}),s}function rs(e,t){T(e).forEach(function(r){t.db.objectStoreNames.contains(r)||(ce&&console.debug("Dexie: Creating missing table",r),so(t,r,e[r].primKey,e[r].indexes))})}function ar(e,t){e.createIndex(t.name,t.keyPath,{unique:t.unique,multiEntry:t.multi})}function ur(e,t,r){var o={};return me(t.objectStoreNames,0).forEach(function(s){for(var u=r.objectStore(s),l=to(ts(v=u.keyPath),v||"",!0,!1,!!u.autoIncrement,v&&typeof v!="string",!0),f=[],y=0;y<u.indexNames.length;++y){var O=u.index(u.indexNames[y]),v=O.keyPath,O=to(O.name,v,!!O.unique,!!O.multiEntry,!1,v&&typeof v!="string",!1);f.push(O)}o[s]=no(s,l,f)}),o}function cr(e,t,r){for(var o=r.db.objectStoreNames,s=0;s<o.length;++s){var u=o[s],l=r.objectStore(u);e._hasGetAll="getAll"in l;for(var f=0;f<l.indexNames.length;++f){var y=l.indexNames[f],v=l.index(y).keyPath,O=typeof v=="string"?v:"["+me(v).join("+")+"]";!t[u]||(v=t[u].idxByName[O])&&(v.name=y,delete t[u].idxByName[O],t[u].idxByName[y]=v)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&m.WorkerGlobalScope&&m instanceof m.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e._hasGetAll=!1)}function os(e){return e.split(",").map(function(t,r){var o=(t=t.trim()).replace(/([&*]|\+\+)/g,""),s=/^\[/.test(o)?o.match(/^\[(.*)\]$/)[1].split("+"):o;return to(o,s||null,/\&/.test(t),/\*/.test(t),/\+\+/.test(t),N(s),r===0)})}var uc=(lr.prototype._parseStoresSpec=function(e,t){T(e).forEach(function(r){if(e[r]!==null){var o=os(e[r]),s=o.shift();if(s.unique=!0,s.multi)throw new ne.Schema("Primary key cannot be multi-valued");o.forEach(function(u){if(u.auto)throw new ne.Schema("Only primary key can be marked as autoIncrement (++)");if(!u.keyPath)throw new ne.Schema("Index must have a name and cannot be an empty string")}),t[r]=no(r,s,o)}})},lr.prototype.stores=function(r){var t=this.db;this._cfg.storesSource=this._cfg.storesSource?_(this._cfg.storesSource,r):r;var r=t._versions,o={},s={};return r.forEach(function(u){_(o,u._cfg.storesSource),s=u._cfg.dbschema={},u._parseStoresSpec(o,s)}),t._dbSchema=s,oo(t,[t._allTables,t,t.Transaction.prototype]),sr(t,[t._allTables,t,t.Transaction.prototype,this._cfg.tables],T(s),s),t._storeNames=T(s),this},lr.prototype.upgrade=function(e){return this._cfg.contentUpgrade=oe(this._cfg.contentUpgrade||De,e),this},lr);function lr(){}function ao(e,t){var r=e._dbNamesDB;return r||(r=e._dbNamesDB=new Lt(er,{addons:[],indexedDB:e,IDBKeyRange:t})).version(1).stores({dbnames:"name"}),r.table("dbnames")}function uo(e){return e&&typeof e.databases=="function"}function co(e){return jt(function(){return h.letThrough=!0,e()})}function lo(e){return!("from"in e)}var ot=function(e,t){if(!this){var r=new ot;return e&&"d"in e&&_(r,e),r}_(this,arguments.length?{d:1,from:e,to:1<arguments.length?t:e}:{d:0})};function xn(e,t,r){var o=Le(t,r);if(!isNaN(o)){if(0<o)throw RangeError();if(lo(e))return _(e,{from:t,to:r,d:1});var s=e.l,o=e.r;if(Le(r,e.from)<0)return s?xn(s,t,r):e.l={from:t,to:r,d:1,l:null,r:null},ss(e);if(0<Le(t,e.to))return o?xn(o,t,r):e.r={from:t,to:r,d:1,l:null,r:null},ss(e);Le(t,e.from)<0&&(e.from=t,e.l=null,e.d=o?o.d+1:1),0<Le(r,e.to)&&(e.to=r,e.r=null,e.d=e.l?e.l.d+1:1),r=!e.r,s&&!e.l&&Nn(e,s),o&&r&&Nn(e,o)}}function Nn(e,t){lo(t)||(function r(o,y){var u=y.from,l=y.to,f=y.l,y=y.r;xn(o,u,l),f&&r(o,f),y&&r(o,y)})(e,t)}function is(e,t){var r=fr(t),o=r.next();if(o.done)return!1;for(var s=o.value,u=fr(e),l=u.next(s.from),f=l.value;!o.done&&!l.done;){if(Le(f.from,s.to)<=0&&0<=Le(f.to,s.from))return!0;Le(s.from,f.from)<0?s=(o=r.next(f.from)).value:f=(l=u.next(s.from)).value}return!1}function fr(e){var t=lo(e)?null:{s:0,n:e};return{next:function(r){for(var o=0<arguments.length;t;)switch(t.s){case 0:if(t.s=1,o)for(;t.n.l&&Le(r,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,!o||Le(r,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 ss(e){var t,r,o=(((t=e.r)===null||t===void 0?void 0:t.d)||0)-(((r=e.l)===null||r===void 0?void 0:r.d)||0),s=1<o?"r":o<-1?"l":"";s&&(t=s=="r"?"l":"r",r=c({},e),o=e[s],e.from=o.from,e.to=o.to,e[s]=o[s],r[s]=o[t],(e[t]=r).d=as(r)),e.d=as(e)}function as(r){var t=r.r,r=r.l;return(t?r?Math.max(t.d,r.d):t.d:r?r.d:0)+1}function dr(e,t){return T(t).forEach(function(r){e[r]?Nn(e[r],t[r]):e[r]=(function o(s){var u,l,f={};for(u in s)P(s,u)&&(l=s[u],f[u]=!l||typeof l!="object"||D.has(l.constructor)?l:o(l));return f})(t[r])}),e}function fo(e,t){return e.all||t.all||Object.keys(e).some(function(r){return t[r]&&is(t[r],e[r])})}Y(ot.prototype,((vt={add:function(e){return Nn(this,e),this},addKey:function(e){return xn(this,e,e),this},addKeys:function(e){var t=this;return e.forEach(function(r){return xn(t,r,r)}),this},hasKey:function(e){var t=fr(this).next(e).value;return t&&Le(t.from,e)<=0&&0<=Le(t.to,e)}})[ae]=function(){return fr(this)},vt));var Vt={},po={},ho=!1;function pr(e){dr(po,e),ho||(ho=!0,setTimeout(function(){ho=!1,mo(po,!(po={}))},0))}function mo(e,t){t===void 0&&(t=!1);var r=new Set;if(e.all)for(var o=0,s=Object.values(Vt);o<s.length;o++)us(l=s[o],e,r,t);else for(var u in e){var l,f=/^idb\:\/\/(.*)\/(.*)\//.exec(u);f&&(u=f[1],f=f[2],(l=Vt["idb://".concat(u,"/").concat(f)])&&us(l,e,r,t))}r.forEach(function(y){return y()})}function us(e,t,r,o){for(var s=[],u=0,l=Object.entries(e.queries.query);u<l.length;u++){for(var f=l[u],y=f[0],v=[],O=0,p=f[1];O<p.length;O++){var C=p[O];fo(t,C.obsSet)?C.subscribers.forEach(function(b){return r.add(b)}):o&&v.push(C)}o&&s.push([y,v])}if(o)for(var g=0,E=s;g<E.length;g++){var I=E[g],y=I[0],v=I[1];e.queries.query[y]=v}}function cc(e){var t=e._state,r=e._deps.indexedDB;if(t.isBeingOpened||e.idbdb)return t.dbReadyPromise.then(function(){return t.dbOpenError?Ye(t.dbOpenError):e});t.isBeingOpened=!0,t.dbOpenError=null,t.openComplete=!1;var o=t.openCanceller,s=Math.round(10*e.verno),u=!1;function l(){if(t.openCanceller!==o)throw new ne.DatabaseClosed("db.open() was cancelled")}function f(){return new S(function(C,g){if(l(),!r)throw new ne.MissingAPI;var E=e.name,I=t.autoSchema||!s?r.open(E):r.open(E,s);if(!I)throw new ne.MissingAPI;I.onerror=_t(g),I.onblocked=je(e._fireOnBlocked),I.onupgradeneeded=je(function(b){var R;O=I.transaction,t.autoSchema&&!e._options.allowEmptyDB?(I.onerror=Sn,O.abort(),I.result.close(),(R=r.deleteDatabase(E)).onsuccess=R.onerror=je(function(){g(new ne.NoSuchDatabase("Database ".concat(E," doesnt exist")))})):(O.onerror=_t(g),b=b.oldVersion>Math.pow(2,62)?0:b.oldVersion,p=b<1,e.idbdb=I.result,u&&ac(e,O),sc(e,b/10,O,g))},g),I.onsuccess=je(function(){O=null;var b,R,k,x,A,z=e.idbdb=I.result,J=me(z.objectStoreNames);if(0<J.length)try{var V=z.transaction((x=J).length===1?x[0]:x,"readonly");if(t.autoSchema)R=z,k=V,(b=e).verno=R.version/10,k=b._dbSchema=ur(0,R,k),b._storeNames=me(R.objectStoreNames,0),sr(b,[b._allTables],T(k),k);else if(cr(e,e._dbSchema,V),((A=io(ur(0,(A=e).idbdb,V),A._dbSchema)).add.length||A.change.some(function(X){return X.add.length||X.change.length}))&&!u)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."),z.close(),s=z.version+1,u=!0,C(f());ir(e,V)}catch{}rn.push(e),z.onversionchange=je(function(X){t.vcFired=!0,e.on("versionchange").fire(X)}),z.onclose=je(function(X){e.on("close").fire(X)}),p&&(A=e._deps,V=E,z=A.indexedDB,A=A.IDBKeyRange,uo(z)||V===er||ao(z,A).put({name:V}).catch(De)),C()},g)}).catch(function(C){switch(C==null?void 0:C.name){case"UnknownError":if(0<t.PR1398_maxLoop)return t.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),f();break;case"VersionError":if(0<s)return s=0,f()}return S.reject(C)})}var y,v=t.dbReadyResolve,O=null,p=!1;return S.race([o,(typeof navigator>"u"?S.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(C){function g(){return indexedDB.databases().finally(C)}y=setInterval(g,100),g()}).finally(function(){return clearInterval(y)}):Promise.resolve()).then(f)]).then(function(){return l(),t.onReadyBeingFired=[],S.resolve(co(function(){return e.on.ready.fire(e.vip)})).then(function C(){if(0<t.onReadyBeingFired.length){var g=t.onReadyBeingFired.reduce(oe,De);return t.onReadyBeingFired=[],S.resolve(co(function(){return g(e.vip)})).then(C)}})}).finally(function(){t.openCanceller===o&&(t.onReadyBeingFired=null,t.isBeingOpened=!1)}).catch(function(C){t.dbOpenError=C;try{O&&O.abort()}catch{}return o===t.openCanceller&&e._close(),Ye(C)}).finally(function(){t.openComplete=!0,v()}).then(function(){var C;return p&&(C={},e.tables.forEach(function(g){g.schema.indexes.forEach(function(E){E.name&&(C["idb://".concat(e.name,"/").concat(g.name,"/").concat(E.name)]=new ot(-1/0,[[[]]]))}),C["idb://".concat(e.name,"/").concat(g.name,"/")]=C["idb://".concat(e.name,"/").concat(g.name,"/:dels")]=new ot(-1/0,[[[]]])}),Kt(Rn).fire(C),mo(C,!0)),e})}function yo(e){function t(u){return e.next(u)}var r=s(t),o=s(function(u){return e.throw(u)});function s(u){return function(y){var f=u(y),y=f.value;return f.done?y:y&&typeof y.then=="function"?y.then(r,o):N(y)?Promise.all(y).then(r,o):r(y)}}return s(t)()}function hr(e,t,r){for(var o=N(e)?e.slice():[e],s=0;s<r;++s)o.push(t);return o}var lc={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(e){return c(c({},e),{table:function(t){var r=e.table(t),o=r.schema,s={},u=[];function l(p,C,g){var E=kn(p),I=s[E]=s[E]||[],b=p==null?0:typeof p=="string"?1:p.length,R=0<C,R=c(c({},g),{name:R?"".concat(E,"(virtual-from:").concat(g.name,")"):g.name,lowLevelIndex:g,isVirtual:R,keyTail:C,keyLength:b,extractKey:ro(p),unique:!R&&g.unique});return I.push(R),R.isPrimaryKey||u.push(R),1<b&&l(b===2?p[0]:p.slice(0,b-1),C+1,g),I.sort(function(k,x){return k.keyTail-x.keyTail}),R}t=l(o.primaryKey.keyPath,0,o.primaryKey),s[":id"]=[t];for(var f=0,y=o.indexes;f<y.length;f++){var v=y[f];l(v.keyPath,0,v)}function O(p){var C,g=p.query.index;return g.isVirtual?c(c({},p),{query:{index:g.lowLevelIndex,range:(C=p.query.range,g=g.keyTail,{type:C.type===1?2:C.type,lower:hr(C.lower,C.lowerOpen?e.MAX_KEY:e.MIN_KEY,g),lowerOpen:!0,upper:hr(C.upper,C.upperOpen?e.MIN_KEY:e.MAX_KEY,g),upperOpen:!0})}}):p}return c(c({},r),{schema:c(c({},o),{primaryKey:t,indexes:u,getIndexByKeyPath:function(p){return(p=s[kn(p)])&&p[0]}}),count:function(p){return r.count(O(p))},query:function(p){return r.query(O(p))},openCursor:function(p){var C=p.query.index,g=C.keyTail,E=C.isVirtual,I=C.keyLength;return E?r.openCursor(O(p)).then(function(R){return R&&b(R)}):r.openCursor(p);function b(R){return Object.create(R,{continue:{value:function(k){k!=null?R.continue(hr(k,p.reverse?e.MAX_KEY:e.MIN_KEY,g)):p.unique?R.continue(R.key.slice(0,I).concat(p.reverse?e.MIN_KEY:e.MAX_KEY,g)):R.continue()}},continuePrimaryKey:{value:function(k,x){R.continuePrimaryKey(hr(k,e.MAX_KEY,g),x)}},primaryKey:{get:function(){return R.primaryKey}},key:{get:function(){var k=R.key;return I===1?k[0]:k.slice(0,I)}},value:{get:function(){return R.value}}})}}})}})}};function go(e,t,r,o){return r=r||{},o=o||"",T(e).forEach(function(s){var u,l,f;P(t,s)?(u=e[s],l=t[s],typeof u=="object"&&typeof l=="object"&&u&&l?(f=B(u))!==B(l)?r[o+s]=t[s]:f==="Object"?go(u,l,r,o+s+"."):u!==l&&(r[o+s]=t[s]):u!==l&&(r[o+s]=t[s])):r[o+s]=void 0}),T(t).forEach(function(s){P(e,s)||(r[o+s]=t[s])}),r}function vo(e,t){return t.type==="delete"?t.keys:t.keys||t.values.map(e.extractKey)}var fc={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(e){return c(c({},e),{table:function(t){var r=e.table(t),o=r.schema.primaryKey;return c(c({},r),{mutate:function(s){var u=h.trans,l=u.table(t).hook,f=l.deleting,y=l.creating,v=l.updating;switch(s.type){case"add":if(y.fire===De)break;return u._promise("readwrite",function(){return O(s)},!0);case"put":if(y.fire===De&&v.fire===De)break;return u._promise("readwrite",function(){return O(s)},!0);case"delete":if(f.fire===De)break;return u._promise("readwrite",function(){return O(s)},!0);case"deleteRange":if(f.fire===De)break;return u._promise("readwrite",function(){return(function p(C,g,E){return r.query({trans:C,values:!1,query:{index:o,range:g},limit:E}).then(function(I){var b=I.result;return O({type:"delete",keys:b,trans:C}).then(function(R){return 0<R.numFailures?Promise.reject(R.failures[0]):b.length<E?{failures:[],numFailures:0,lastResult:void 0}:p(C,c(c({},g),{lower:b[b.length-1],lowerOpen:!0}),E)})})})(s.trans,s.range,1e4)},!0)}return r.mutate(s);function O(p){var C,g,E,I=h.trans,b=p.keys||vo(o,p);if(!b)throw new Error("Keys missing");return(p=p.type==="add"||p.type==="put"?c(c({},p),{keys:b}):c({},p)).type!=="delete"&&(p.values=d([],p.values)),p.keys&&(p.keys=d([],p.keys)),C=r,E=b,((g=p).type==="add"?Promise.resolve([]):C.getMany({trans:g.trans,keys:E,cache:"immutable"})).then(function(R){var k=b.map(function(x,A){var z,J,V,X=R[A],ee={onerror:null,onsuccess:null};return p.type==="delete"?f.fire.call(ee,x,X,I):p.type==="add"||X===void 0?(z=y.fire.call(ee,x,p.values[A],I),x==null&&z!=null&&(p.keys[A]=x=z,o.outbound||U(p.values[A],o.keyPath,x))):(z=go(X,p.values[A]),(J=v.fire.call(ee,z,x,X,I))&&(V=p.values[A],Object.keys(J).forEach(function(Z){P(V,Z)?V[Z]=J[Z]:U(V,Z,J[Z])}))),ee});return r.mutate(p).then(function(x){for(var A=x.failures,z=x.results,J=x.numFailures,x=x.lastResult,V=0;V<b.length;++V){var X=(z||b)[V],ee=k[V];X==null?ee.onerror&&ee.onerror(A[V]):ee.onsuccess&&ee.onsuccess(p.type==="put"&&R[V]?p.values[V]:X)}return{failures:A,results:z,numFailures:J,lastResult:x}}).catch(function(x){return k.forEach(function(A){return A.onerror&&A.onerror(x)}),Promise.reject(x)})})}}})}})}};function cs(e,t,r){try{if(!t||t.keys.length<e.length)return null;for(var o=[],s=0,u=0;s<t.keys.length&&u<e.length;++s)Le(t.keys[s],e[u])===0&&(o.push(r?q(t.values[s]):t.values[s]),++u);return o.length===e.length?o:null}catch{return null}}var dc={stack:"dbcore",level:-1,create:function(e){return{table:function(t){var r=e.table(t);return c(c({},r),{getMany:function(o){if(!o.cache)return r.getMany(o);var s=cs(o.keys,o.trans._cache,o.cache==="clone");return s?S.resolve(s):r.getMany(o).then(function(u){return o.trans._cache={keys:o.keys,values:o.cache==="clone"?q(u):u},u})},mutate:function(o){return o.type!=="add"&&(o.trans._cache=null),r.mutate(o)}})}}}};function ls(e,t){return e.trans.mode==="readonly"&&!!e.subscr&&!e.trans.explicit&&e.trans.db._options.cache!=="disabled"&&!t.schema.primaryKey.outbound}function fs(e,t){switch(e){case"query":return t.values&&!t.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var pc={stack:"dbcore",level:0,name:"Observability",create:function(e){var t=e.schema.name,r=new ot(e.MIN_KEY,e.MAX_KEY);return c(c({},e),{transaction:function(o,s,u){if(h.subscr&&s!=="readonly")throw new ne.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(h.querier));return e.transaction(o,s,u)},table:function(o){var s=e.table(o),u=s.schema,l=u.primaryKey,p=u.indexes,f=l.extractKey,y=l.outbound,v=l.autoIncrement&&p.filter(function(g){return g.compound&&g.keyPath.includes(l.keyPath)}),O=c(c({},s),{mutate:function(g){function E(Z){return Z="idb://".concat(t,"/").concat(o,"/").concat(Z),x[Z]||(x[Z]=new ot)}var I,b,R,k=g.trans,x=g.mutatedParts||(g.mutatedParts={}),A=E(""),z=E(":dels"),J=g.type,ee=g.type==="deleteRange"?[g.range]:g.type==="delete"?[g.keys]:g.values.length<50?[vo(l,g).filter(function(Z){return Z}),g.values]:[],V=ee[0],X=ee[1],ee=g.trans._cache;return N(V)?(A.addKeys(V),(ee=J==="delete"||V.length===X.length?cs(V,ee):null)||z.addKeys(V),(ee||X)&&(I=E,b=ee,R=X,u.indexes.forEach(function(Z){var re=I(Z.name||"");function Oe(Re){return Re!=null?Z.extractKey(Re):null}function Se(Re){return Z.multiEntry&&N(Re)?Re.forEach(function(dt){return re.addKey(dt)}):re.addKey(Re)}(b||R).forEach(function(Re,it){var Ee=b&&Oe(b[it]),it=R&&Oe(R[it]);Le(Ee,it)!==0&&(Ee!=null&&Se(Ee),it!=null&&Se(it))})}))):V?(X={from:(X=V.lower)!==null&&X!==void 0?X:e.MIN_KEY,to:(X=V.upper)!==null&&X!==void 0?X:e.MAX_KEY},z.add(X),A.add(X)):(A.add(r),z.add(r),u.indexes.forEach(function(Z){return E(Z.name).add(r)})),s.mutate(g).then(function(Z){return!V||g.type!=="add"&&g.type!=="put"||(A.addKeys(Z.results),v&&v.forEach(function(re){for(var Oe=g.values.map(function(Ee){return re.extractKey(Ee)}),Se=re.keyPath.findIndex(function(Ee){return Ee===l.keyPath}),Re=0,dt=Z.results.length;Re<dt;++Re)Oe[Re][Se]=Z.results[Re];E(re.name).addKeys(Oe)})),k.mutatedParts=dr(k.mutatedParts||{},x),Z})}}),p=function(E){var I=E.query,E=I.index,I=I.range;return[E,new ot((E=I.lower)!==null&&E!==void 0?E:e.MIN_KEY,(I=I.upper)!==null&&I!==void 0?I:e.MAX_KEY)]},C={get:function(g){return[l,new ot(g.key)]},getMany:function(g){return[l,new ot().addKeys(g.keys)]},count:p,query:p,openCursor:p};return T(C).forEach(function(g){O[g]=function(E){var I=h.subscr,b=!!I,R=ls(h,s)&&fs(g,E)?E.obsSet={}:I;if(b){var k=function(X){return X="idb://".concat(t,"/").concat(o,"/").concat(X),R[X]||(R[X]=new ot)},x=k(""),A=k(":dels"),I=C[g](E),b=I[0],I=I[1];if((g==="query"&&b.isPrimaryKey&&!E.values?A:k(b.name||"")).add(I),!b.isPrimaryKey){if(g!=="count"){var z=g==="query"&&y&&E.values&&s.query(c(c({},E),{values:!1}));return s[g].apply(this,arguments).then(function(X){if(g==="query"){if(y&&E.values)return z.then(function(Oe){return Oe=Oe.result,x.addKeys(Oe),X});var ee=E.values?X.result.map(f):X.result;(E.values?x:A).addKeys(ee)}else if(g==="openCursor"){var Z=X,re=E.values;return Z&&Object.create(Z,{key:{get:function(){return A.addKey(Z.primaryKey),Z.key}},primaryKey:{get:function(){var Oe=Z.primaryKey;return A.addKey(Oe),Oe}},value:{get:function(){return re&&x.addKey(Z.primaryKey),Z.value}}})}return X})}A.add(r)}}return s[g].apply(this,arguments)}}),O}})}};function ds(e,t,r){if(r.numFailures===0)return t;if(t.type==="deleteRange")return null;var o=t.keys?t.keys.length:"values"in t&&t.values?t.values.length:1;return r.numFailures===o?null:(t=c({},t),N(t.keys)&&(t.keys=t.keys.filter(function(s,u){return!(u in r.failures)})),"values"in t&&N(t.values)&&(t.values=t.values.filter(function(s,u){return!(u in r.failures)})),t)}function bo(e,t){return r=e,((o=t).lower===void 0||(o.lowerOpen?0<Le(r,o.lower):0<=Le(r,o.lower)))&&(e=e,(t=t).upper===void 0||(t.upperOpen?Le(e,t.upper)<0:Le(e,t.upper)<=0));var r,o}function ps(e,t,C,o,s,u){if(!C||C.length===0)return e;var l=t.query.index,f=l.multiEntry,y=t.query.range,v=o.schema.primaryKey.extractKey,O=l.extractKey,p=(l.lowLevelIndex||l).extractKey,C=C.reduce(function(g,E){var I=g,b=[];if(E.type==="add"||E.type==="put")for(var R=new ot,k=E.values.length-1;0<=k;--k){var x,A=E.values[k],z=v(A);R.hasKey(z)||(x=O(A),(f&&N(x)?x.some(function(Z){return bo(Z,y)}):bo(x,y))&&(R.addKey(z),b.push(A)))}switch(E.type){case"add":var J=new ot().addKeys(t.values?g.map(function(re){return v(re)}):g),I=g.concat(t.values?b.filter(function(re){return re=v(re),!J.hasKey(re)&&(J.addKey(re),!0)}):b.map(function(re){return v(re)}).filter(function(re){return!J.hasKey(re)&&(J.addKey(re),!0)}));break;case"put":var V=new ot().addKeys(E.values.map(function(re){return v(re)}));I=g.filter(function(re){return!V.hasKey(t.values?v(re):re)}).concat(t.values?b:b.map(function(re){return v(re)}));break;case"delete":var X=new ot().addKeys(E.keys);I=g.filter(function(re){return!X.hasKey(t.values?v(re):re)});break;case"deleteRange":var ee=E.range;I=g.filter(function(re){return!bo(v(re),ee)})}return I},e);return C===e?e:(C.sort(function(g,E){return Le(p(g),p(E))||Le(v(g),v(E))}),t.limit&&t.limit<1/0&&(C.length>t.limit?C.length=t.limit:e.length===t.limit&&C.length<t.limit&&(s.dirty=!0)),u?Object.freeze(C):C)}function hs(e,t){return Le(e.lower,t.lower)===0&&Le(e.upper,t.upper)===0&&!!e.lowerOpen==!!t.lowerOpen&&!!e.upperOpen==!!t.upperOpen}function hc(e,t){return(function(r,o,s,u){if(r===void 0)return o!==void 0?-1:0;if(o===void 0)return 1;if((o=Le(r,o))===0){if(s&&u)return 0;if(s)return 1;if(u)return-1}return o})(e.lower,t.lower,e.lowerOpen,t.lowerOpen)<=0&&0<=(function(r,o,s,u){if(r===void 0)return o!==void 0?1:0;if(o===void 0)return-1;if((o=Le(r,o))===0){if(s&&u)return 0;if(s)return-1;if(u)return 1}return o})(e.upper,t.upper,e.upperOpen,t.upperOpen)}function mc(e,t,r,o){e.subscribers.add(r),o.addEventListener("abort",function(){var s,u;e.subscribers.delete(r),e.subscribers.size===0&&(s=e,u=t,setTimeout(function(){s.subscribers.size===0&&ge(u,s)},3e3))})}var yc={stack:"dbcore",level:0,name:"Cache",create:function(e){var t=e.schema.name;return c(c({},e),{transaction:function(r,o,s){var u,l,f=e.transaction(r,o,s);return o==="readwrite"&&(l=(u=new AbortController).signal,s=function(y){return function(){if(u.abort(),o==="readwrite"){for(var v=new Set,O=0,p=r;O<p.length;O++){var C=p[O],g=Vt["idb://".concat(t,"/").concat(C)];if(g){var E=e.table(C),I=g.optimisticOps.filter(function(re){return re.trans===f});if(f._explicit&&y&&f.mutatedParts)for(var b=0,R=Object.values(g.queries.query);b<R.length;b++)for(var k=0,x=(J=R[b]).slice();k<x.length;k++)fo((V=x[k]).obsSet,f.mutatedParts)&&(ge(J,V),V.subscribers.forEach(function(re){return v.add(re)}));else if(0<I.length){g.optimisticOps=g.optimisticOps.filter(function(re){return re.trans!==f});for(var A=0,z=Object.values(g.queries.query);A<z.length;A++)for(var J,V,X,ee=0,Z=(J=z[A]).slice();ee<Z.length;ee++)(V=Z[ee]).res!=null&&f.mutatedParts&&(y&&!V.dirty?(X=Object.isFrozen(V.res),X=ps(V.res,V.req,I,E,V,X),V.dirty?(ge(J,V),V.subscribers.forEach(function(re){return v.add(re)})):X!==V.res&&(V.res=X,V.promise=S.resolve({result:X}))):(V.dirty&&ge(J,V),V.subscribers.forEach(function(re){return v.add(re)})))}}}v.forEach(function(re){return re()})}}},f.addEventListener("abort",s(!1),{signal:l}),f.addEventListener("error",s(!1),{signal:l}),f.addEventListener("complete",s(!0),{signal:l})),f},table:function(r){var o=e.table(r),s=o.schema.primaryKey;return c(c({},o),{mutate:function(u){var l=h.trans;if(s.outbound||l.db._options.cache==="disabled"||l.explicit||l.idbtrans.mode!=="readwrite")return o.mutate(u);var f=Vt["idb://".concat(t,"/").concat(r)];return f?(l=o.mutate(u),u.type!=="add"&&u.type!=="put"||!(50<=u.values.length||vo(s,u).some(function(y){return y==null}))?(f.optimisticOps.push(u),u.mutatedParts&&pr(u.mutatedParts),l.then(function(y){0<y.numFailures&&(ge(f.optimisticOps,u),(y=ds(0,u,y))&&f.optimisticOps.push(y),u.mutatedParts&&pr(u.mutatedParts))}),l.catch(function(){ge(f.optimisticOps,u),u.mutatedParts&&pr(u.mutatedParts)})):l.then(function(y){var v=ds(0,c(c({},u),{values:u.values.map(function(O,p){var C;return y.failures[p]?O:(O=(C=s.keyPath)!==null&&C!==void 0&&C.includes(".")?q(O):c({},O),U(O,s.keyPath,y.results[p]),O)})}),y);f.optimisticOps.push(v),queueMicrotask(function(){return u.mutatedParts&&pr(u.mutatedParts)})}),l):o.mutate(u)},query:function(u){if(!ls(h,o)||!fs("query",u))return o.query(u);var l=((v=h.trans)===null||v===void 0?void 0:v.db._options.cache)==="immutable",p=h,f=p.requery,y=p.signal,v=(function(E,I,b,R){var k=Vt["idb://".concat(E,"/").concat(I)];if(!k)return[];if(!(I=k.queries[b]))return[null,!1,k,null];var x=I[(R.query?R.query.index.name:null)||""];if(!x)return[null,!1,k,null];switch(b){case"query":var A=x.find(function(z){return z.req.limit===R.limit&&z.req.values===R.values&&hs(z.req.query.range,R.query.range)});return A?[A,!0,k,x]:[x.find(function(z){return("limit"in z.req?z.req.limit:1/0)>=R.limit&&(!R.values||z.req.values)&&hc(z.req.query.range,R.query.range)}),!1,k,x];case"count":return A=x.find(function(z){return hs(z.req.query.range,R.query.range)}),[A,!!A,k,x]}})(t,r,"query",u),O=v[0],p=v[1],C=v[2],g=v[3];return O&&p?O.obsSet=u.obsSet:(p=o.query(u).then(function(E){var I=E.result;if(O&&(O.res=I),l){for(var b=0,R=I.length;b<R;++b)Object.freeze(I[b]);Object.freeze(I)}else E.result=q(I);return E}).catch(function(E){return g&&O&&ge(g,O),Promise.reject(E)}),O={obsSet:u.obsSet,promise:p,subscribers:new Set,type:"query",req:u,dirty:!1},g?g.push(O):(g=[O],(C=C||(Vt["idb://".concat(t,"/").concat(r)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[u.query.index.name||""]=g)),mc(O,g,f,y),O.promise.then(function(E){return{result:ps(E.result,u,C==null?void 0:C.optimisticOps,o,O,l)}})}})}})}};function mr(e,t){return new Proxy(e,{get:function(r,o,s){return o==="db"?t:Reflect.get(r,o,s)}})}var Lt=(Qe.prototype.version=function(e){if(isNaN(e)||e<.1)throw new ne.Type("Given version is not a positive number");if(e=Math.round(10*e)/10,this.idbdb||this._state.isBeingOpened)throw new ne.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,e);var t=this._versions,r=t.filter(function(o){return o._cfg.version===e})[0];return r||(r=new this.Version(e),t.push(r),t.sort(ic),r.stores({}),this._state.autoSchema=!1,r)},Qe.prototype._whenReady=function(e){var t=this;return this.idbdb&&(this._state.openComplete||h.letThrough||this._vip)?e():new S(function(r,o){if(t._state.openComplete)return o(new ne.DatabaseClosed(t._state.dbOpenError));if(!t._state.isBeingOpened){if(!t._state.autoOpen)return void o(new ne.DatabaseClosed);t.open().catch(De)}t._state.dbReadyPromise.then(r,o)}).then(e)},Qe.prototype.use=function(e){var t=e.stack,r=e.create,o=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:r,level:o??10,name:s}),e.sort(function(u,l){return u.level-l.level}),this},Qe.prototype.unuse=function(e){var t=e.stack,r=e.name,o=e.create;return t&&this._middlewares[t]&&(this._middlewares[t]=this._middlewares[t].filter(function(s){return o?s.create!==o:!!r&&s.name!==r})),this},Qe.prototype.open=function(){var e=this;return Ut(Et,function(){return cc(e)})},Qe.prototype._close=function(){var e=this._state,t=rn.indexOf(this);if(0<=t&&rn.splice(t,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}e.isBeingOpened||(e.dbReadyPromise=new S(function(r){e.dbReadyResolve=r}),e.openCanceller=new S(function(r,o){e.cancelOpen=o}))},Qe.prototype.close=function(r){var t=(r===void 0?{disableAutoOpen:!0}:r).disableAutoOpen,r=this._state;t?(r.isBeingOpened&&r.cancelOpen(new ne.DatabaseClosed),this._close(),r.autoOpen=!1,r.dbOpenError=new ne.DatabaseClosed):(this._close(),r.autoOpen=this._options.autoOpen||r.isBeingOpened,r.openComplete=!1,r.dbOpenError=null)},Qe.prototype.delete=function(e){var t=this;e===void 0&&(e={disableAutoOpen:!0});var r=0<arguments.length&&typeof arguments[0]!="object",o=this._state;return new S(function(s,u){function l(){t.close(e);var f=t._deps.indexedDB.deleteDatabase(t.name);f.onsuccess=je(function(){var y,v,O;y=t._deps,v=t.name,O=y.indexedDB,y=y.IDBKeyRange,uo(O)||v===er||ao(O,y).delete(v).catch(De),s()}),f.onerror=_t(u),f.onblocked=t._fireOnBlocked}if(r)throw new ne.InvalidArgument("Invalid closeOptions argument to db.delete()");o.isBeingOpened?o.dbReadyPromise.then(l):l()})},Qe.prototype.backendDB=function(){return this.idbdb},Qe.prototype.isOpen=function(){return this.idbdb!==null},Qe.prototype.hasBeenClosed=function(){var e=this._state.dbOpenError;return e&&e.name==="DatabaseClosed"},Qe.prototype.hasFailed=function(){return this._state.dbOpenError!==null},Qe.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(Qe.prototype,"tables",{get:function(){var e=this;return T(this._allTables).map(function(t){return e._allTables[t]})},enumerable:!1,configurable:!0}),Qe.prototype.transaction=function(){var e=(function(t,r,o){var s=arguments.length;if(s<2)throw new ne.InvalidArgument("Too few arguments");for(var u=new Array(s-1);--s;)u[s-1]=arguments[s];return o=u.pop(),[t,H(u),o]}).apply(this,arguments);return this._transaction.apply(this,e)},Qe.prototype._transaction=function(e,t,r){var o=this,s=h.trans;s&&s.db===this&&e.indexOf("!")===-1||(s=null);var u,l,f=e.indexOf("?")!==-1;e=e.replace("!","").replace("?","");try{if(l=t.map(function(v){if(v=v instanceof o.Table?v.name:v,typeof v!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return v}),e=="r"||e===Xr)u=Xr;else{if(e!="rw"&&e!=Yr)throw new ne.InvalidArgument("Invalid transaction mode: "+e);u=Yr}if(s){if(s.mode===Xr&&u===Yr){if(!f)throw new ne.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");s=null}s&&l.forEach(function(v){if(s&&s.storeNames.indexOf(v)===-1){if(!f)throw new ne.SubTransaction("Table "+v+" not included in parent transaction.");s=null}}),f&&s&&!s.active&&(s=null)}}catch(v){return s?s._promise(null,function(O,p){p(v)}):Ye(v)}var y=(function v(O,p,C,g,E){return S.resolve().then(function(){var I=h.transless||h,b=O._createTransaction(p,C,O._dbSchema,g);if(b.explicit=!0,I={trans:b,transless:I},g)b.idbtrans=g.idbtrans;else try{b.create(),b.idbtrans._explicit=!0,O._state.PR1398_maxLoop=3}catch(x){return x.name===ye.InvalidState&&O.isOpen()&&0<--O._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),O.close({disableAutoOpen:!1}),O.open().then(function(){return v(O,p,C,null,E)})):Ye(x)}var R,k=Ae(E);return k&&nn(),I=S.follow(function(){var x;(R=E.call(b,b))&&(k?(x=Ft.bind(null,null),R.then(x,x)):typeof R.next=="function"&&typeof R.throw=="function"&&(R=yo(R)))},I),(R&&typeof R.then=="function"?S.resolve(R).then(function(x){return b.active?x:Ye(new ne.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):I.then(function(){return R})).then(function(x){return g&&b._resolve(),b._completion.then(function(){return x})}).catch(function(x){return b._reject(x),Ye(x)})})}).bind(null,this,u,l,s,r);return s?s._promise(u,y,"lock"):h.trans?Ut(h.transless,function(){return o._whenReady(y)}):this._whenReady(y)},Qe.prototype.table=function(e){if(!P(this._allTables,e))throw new ne.InvalidTable("Table ".concat(e," does not exist"));return this._allTables[e]},Qe);function Qe(e,t){var r=this;this._middlewares={},this.verno=0;var o=Qe.dependencies;this._options=t=c({addons:Qe.addons,autoOpen:!0,indexedDB:o.indexedDB,IDBKeyRange:o.IDBKeyRange,cache:"cloned"},t),this._deps={indexedDB:t.indexedDB,IDBKeyRange:t.IDBKeyRange},o=t.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var s,u,l,f,y,v={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:De,dbReadyPromise:null,cancelOpen:De,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:t.autoOpen};v.dbReadyPromise=new S(function(p){v.dbReadyResolve=p}),v.openCanceller=new S(function(p,C){v.cancelOpen=C}),this._state=v,this.name=e,this.on=On(this,"populate","blocked","versionchange","close",{ready:[oe,De]}),this.on.ready.subscribe=Te(this.on.ready.subscribe,function(p){return function(C,g){Qe.vip(function(){var E,I=r._state;I.openComplete?(I.dbOpenError||S.resolve().then(C),g&&p(C)):I.onReadyBeingFired?(I.onReadyBeingFired.push(C),g&&p(C)):(p(C),E=r,g||p(function b(){E.on.ready.unsubscribe(C),E.on.ready.unsubscribe(b)}))})}}),this.Collection=(s=this,In(Zu.prototype,function(R,b){this.db=s;var g=zi,E=null;if(b)try{g=b()}catch(k){E=k}var I=R._ctx,b=I.table,R=b.hook.reading.fire;this._ctx={table:b,index:I.index,isPrimKey:!I.index||b.schema.primKey.keyPath&&I.index===b.schema.primKey.name,range:g,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:E,or:I.or,valueMapper:R!==Tt?R:null}})),this.Table=(u=this,In(Xi.prototype,function(p,C,g){this.db=u,this._tx=g,this.name=p,this.schema=C,this.hook=u._allTables[p]?u._allTables[p].hook:On(null,{creating:[vn,De],reading:[Dt,Tt],updating:[wn,De],deleting:[bn,De]})})),this.Transaction=(l=this,In(tc.prototype,function(p,C,g,E,I){var b=this;this.db=l,this.mode=p,this.storeNames=C,this.schema=g,this.chromeTransactionDurability=E,this.idbtrans=null,this.on=On(this,"complete","error","abort"),this.parent=I||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 S(function(R,k){b._resolve=R,b._reject=k}),this._completion.then(function(){b.active=!1,b.on.complete.fire()},function(R){var k=b.active;return b.active=!1,b.on.error.fire(R),b.parent?b.parent._reject(R):k&&b.idbtrans&&b.idbtrans.abort(),Ye(R)})})),this.Version=(f=this,In(uc.prototype,function(p){this.db=f,this._cfg={version:p,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(y=this,In(es.prototype,function(p,C,g){if(this.db=y,this._ctx={table:p,index:C===":id"?null:C,or:g},this._cmp=this._ascending=Le,this._descending=function(E,I){return Le(I,E)},this._max=function(E,I){return 0<Le(E,I)?E:I},this._min=function(E,I){return Le(E,I)<0?E:I},this._IDBKeyRange=y._deps.IDBKeyRange,!this._IDBKeyRange)throw new ne.MissingAPI})),this.on("versionchange",function(p){0<p.newVersion?console.warn("Another connection wants to upgrade database '".concat(r.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(r.name,"'. Closing db now to resume the delete request.")),r.close({disableAutoOpen:!1})}),this.on("blocked",function(p){!p.newVersion||p.newVersion<p.oldVersion?console.warn("Dexie.delete('".concat(r.name,"') was blocked")):console.warn("Upgrade '".concat(r.name,"' blocked by other connection holding version ").concat(p.oldVersion/10))}),this._maxKey=Tn(t.IDBKeyRange),this._createTransaction=function(p,C,g,E){return new r.Transaction(p,C,g,r._options.chromeTransactionDurability,E)},this._fireOnBlocked=function(p){r.on("blocked").fire(p),rn.filter(function(C){return C.name===r.name&&C!==r&&!C._state.vcFired}).map(function(C){return C.on("versionchange").fire(p)})},this.use(dc),this.use(yc),this.use(pc),this.use(lc),this.use(fc);var O=new Proxy(this,{get:function(p,C,g){if(C==="_vip")return!0;if(C==="table")return function(I){return mr(r.table(I),O)};var E=Reflect.get(p,C,g);return E instanceof Xi?mr(E,O):C==="tables"?E.map(function(I){return mr(I,O)}):C==="_createTransaction"?function(){return mr(E.apply(this,arguments),O)}:E}});this.vip=O,o.forEach(function(p){return p(r)})}var yr,vt=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",gc=(wo.prototype.subscribe=function(e,t,r){return this._subscribe(e&&typeof e!="function"?e:{next:e,error:t,complete:r})},wo.prototype[vt]=function(){return this},wo);function wo(e){this._subscribe=e}try{yr={indexedDB:m.indexedDB||m.mozIndexedDB||m.webkitIndexedDB||m.msIndexedDB,IDBKeyRange:m.IDBKeyRange||m.webkitIDBKeyRange}}catch{yr={indexedDB:null,IDBKeyRange:null}}function ms(e){var t,r=!1,o=new gc(function(s){var u=Ae(e),l,f=!1,y={},v={},O={get closed(){return f},unsubscribe:function(){f||(f=!0,l&&l.abort(),p&&Kt.storagemutated.unsubscribe(g))}};s.start&&s.start(O);var p=!1,C=function(){return Wr(E)},g=function(I){dr(y,I),fo(v,y)&&C()},E=function(){var I,b,R;!f&&yr.indexedDB&&(y={},I={},l&&l.abort(),l=new AbortController,R=(function(k){var x=$e();try{u&&nn();var A=jt(e,k);return A=u?A.finally(Ft):A}finally{x&&qe()}})(b={subscr:I,signal:l.signal,requery:C,querier:e,trans:null}),Promise.resolve(R).then(function(k){r=!0,t=k,f||b.signal.aborted||(y={},(function(x){for(var A in x)if(P(x,A))return;return 1})(v=I)||p||(Kt(Rn,g),p=!0),Wr(function(){return!f&&s.next&&s.next(k)}))},function(k){r=!1,["DatabaseClosedError","AbortError"].includes(k==null?void 0:k.name)||f||Wr(function(){f||s.error&&s.error(k)})}))};return setTimeout(C,0),O});return o.hasValue=function(){return r},o.getValue=function(){return t},o}var Gt=Lt;function Eo(e){var t=qt;try{qt=!0,Kt.storagemutated.fire(e),mo(e,!0)}finally{qt=t}}Y(Gt,c(c({},Rt),{delete:function(e){return new Gt(e,{addons:[]}).delete()},exists:function(e){return new Gt(e,{addons:[]}).open().then(function(t){return t.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(e){try{return t=Gt.dependencies,r=t.indexedDB,t=t.IDBKeyRange,(uo(r)?Promise.resolve(r.databases()).then(function(o){return o.map(function(s){return s.name}).filter(function(s){return s!==er})}):ao(r,t).toCollection().primaryKeys()).then(e)}catch{return Ye(new ne.MissingAPI)}var t,r},defineClass:function(){return function(e){_(this,e)}},ignoreTransaction:function(e){return h.trans?Ut(h.transless,e):e()},vip:co,async:function(e){return function(){try{var t=yo(e.apply(this,arguments));return t&&typeof t.then=="function"?t:S.resolve(t)}catch(r){return Ye(r)}}},spawn:function(e,t,r){try{var o=yo(e.apply(r,t||[]));return o&&typeof o.then=="function"?o:S.resolve(o)}catch(s){return Ye(s)}},currentTransaction:{get:function(){return h.trans||null}},waitFor:function(e,t){return t=S.resolve(typeof e=="function"?Gt.ignoreTransaction(e):e).timeout(t||6e4),h.trans?h.trans.waitFor(t):t},Promise:S,debug:{get:function(){return ce},set:function(e){be(e)}},derive:te,extend:_,props:Y,override:Te,Events:On,on:Kt,liveQuery:ms,extendObservabilitySet:dr,getByKeyPath:Q,setByKeyPath:U,delByKeyPath:function(e,t){typeof t=="string"?U(e,t,void 0):"length"in t&&[].map.call(t,function(r){U(e,r,void 0)})},shallowClone:de,deepClone:q,getObjectDiff:go,cmp:Le,asap:M,minKey:-1/0,addons:[],connections:rn,errnames:ye,dependencies:yr,cache:Vt,semVer:"4.0.10",version:"4.0.10".split(".").map(function(e){return parseInt(e)}).reduce(function(e,t,r){return e+t/Math.pow(10,2*r)})})),Gt.maxKey=Tn(Gt.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Kt(Rn,function(e){qt||(e=new CustomEvent(eo,{detail:e}),qt=!0,dispatchEvent(e),qt=!1)}),addEventListener(eo,function(e){e=e.detail,qt||Eo(e)}));var an,qt=!1,ys=function(){};return typeof BroadcastChannel<"u"&&((ys=function(){(an=new BroadcastChannel(eo)).onmessage=function(e){return e.data&&Eo(e.data)}})(),typeof an.unref=="function"&&an.unref(),Kt(Rn,function(e){qt||an.postMessage(e)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(e){if(!Lt.disableBfCache&&e.persisted){ce&&console.debug("Dexie: handling persisted pagehide"),an!=null&&an.close();for(var t=0,r=rn;t<r.length;t++)r[t].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(e){!Lt.disableBfCache&&e.persisted&&(ce&&console.debug("Dexie: handling persisted pageshow"),ys(),Eo({all:new ot(-1/0,[[]])}))})),S.rejectionMapper=function(e,t){return!e||e instanceof We||e instanceof TypeError||e instanceof SyntaxError||!e.name||!mt[e.name]?e:(t=new mt[e.name](t||e.message,e),"stack"in e&&j(t,"stack",{get:function(){return this.inner.stack}}),t)},be(ce),c(Lt,Object.freeze({__proto__:null,Dexie:Lt,liveQuery:ms,Entity:Vi,cmp:Le,PropModSymbol:Pt,PropModification:Cn,replacePrefix:function(e,t){return new Cn({replacePrefix:[e,t]})},add:function(e){return new Cn({add:e})},remove:function(e){return new Cn({remove:e})},default:Lt,RangeSet:ot,mergeRanges:Nn,rangesOverlap:is}),{default:Lt}),Lt})})(Gn)),Gn.exports}var Ku=Bu();const zr=kr(Ku),ji=Symbol.for("Dexie"),Wn=globalThis[ji]||(globalThis[ji]=zr);if(zr.semVer!==Wn.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${zr.semVer} and ${Wn.semVer}`);const{liveQuery:wc,mergeRanges:Ec,rangesOverlap:_c,RangeSet:Oc,cmp:Ic,Entity:Cc,PropModSymbol:Sc,PropModification:Rc,replacePrefix:Tc,add:kc,remove:xc}=Wn;let et,Vr=!1;const Fi={writeStart:0};function qu(n){var c;if(!et)return;const i=n.length,a=n.slice(Fi.writeStart,i);Fi.writeStart=i,(c=et.perfMonitor)==null||c.bulkPut(a)}function Uu(n){var i;return(i=et==null?void 0:et.perfMonitor)==null?void 0:i.get(n)}function Hu(){Ct.diffMode==="full"?(et=new Wn("perf-monitor"),et.version(1).stores({perfMonitor:"id"}),et.open().then(()=>{var i;(i=et==null?void 0:et.perfMonitor)==null||i.clear()}),window.addEventListener("close",()=>{var i;(i=et==null?void 0:et.perfMonitor)==null||i.clear()}),window.addEventListener("load",()=>{var i;(i=et==null?void 0:et.perfMonitor)==null||i.clear(),Vr=!0})):Vr=!0}let Xn=!1,zu=0;const St=[],$i=[],Bi=[],Ki=[],Gr=()=>{var n;Xn&&((n=he.reactRenderers)==null||n.call(he,{renderers:$i,unsupportedRenderers:Bi}))};function Vu(n){Bi.push(n),Gr()}function Gu(n){var i;Ki.push(n),(i=he.activedRenderers)==null||i.call(he,Ki),Pe.log("found new actived renderer",n)}function Wu(n,i,a){a&&$i.push({id:n,...jr(i)});const c=()=>({count:St.length}),d=ba(()=>{var T;(T=he.eventsState)==null||T.call(he,c()),qu(St)},50,{maxWait:50}),m=T=>{var _;const N=zu++;return St.push({id:N,...T}),a&&(Vr&&d(),(_=he.eventsState)==null||_.call(he,c()),he.$functions.getEventsState=()=>(d.flush(),c()),he.$functions.getEvents=(w,$)=>{if(isNaN(w)||isNaN($))return[];d.flush();const P=Math.max(0,Math.floor(w));let Y=P+Math.min(Math.max(0,Math.floor($)),St.length-P);if(Y>P){const{commitId:G}=St[Y-1];for(;Y<St.length&&St[Y].commitId===G;Y++);}return St.slice(P,Y)},he.$functions.getEventFromDexie=Uu),N};return Gr(),m}function Xu(){const n=d=>{var m;Xn||(d==="client"?Pe.log("[connection]: client connected to core"):Pe.log("[connection]: core connected to client"),Xn=!0,Gr(),(m=he.eventsState)==null||m.call(he,{count:St.length}))},i=d=>{d==="client"?Pe.log("[connection]: client disconnected"):Pe.log("[connection]: core disconnected"),Xn=!1};he.$functions.connect=()=>{n("client")},he.$functions.disconnect=()=>{i("client")};const a=async()=>{var d;try{await((d=he.connect)==null?void 0:d.call(he)),n("core")}catch(m){Pe.error(m)}},c=async()=>{var d;try{await((d=he.disconnect)==null?void 0:d.call(he)),i("core")}catch(m){Pe.error(m)}};a(),window.addEventListener("beforeunload",c)}Pe.welcome(),ma(),Ta(),Xu(),Hu(),Ua({target:window,attachRenderer:(n,i,a)=>Fu(i,Wu(n,i,a),ka,xa),onUnsupportedRenderer:Vu,onActivedRenderer:Gu})})();