zeed 0.8.37 → 0.8.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- var St=Object.defineProperty;var r=(e,t)=>St(e,"name",{value:t,configurable:!0});function Rt(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;if(typeof globalThis<"u")return globalThis;throw new Error("unable to locate global object")}r(Rt,"_global");function Y(){let e=Rt();return e._zeedGlobal==null&&(e._zeedGlobal={}),e._zeedGlobal}r(Y,"getGlobalContext");function k(e){return e!=null&&typeof e=="object"}r(k,"isObject");function de(e){return Object(e)!==e}r(de,"isPrimitive");function O(e){return Array.isArray(e)}r(O,"isArray");function je(e){return k(e)&&!O(e)}r(je,"isRecord");function Qn(e){return typeof e=="string"}r(Qn,"isString");function Xn(e){return typeof e=="number"}r(Xn,"isNumber");function er(e){return typeof e=="number"&&Number.isInteger(e)}r(er,"isInteger");function tr(e){return typeof e=="number"&&Number.isSafeInteger(e)}r(tr,"isSafeInteger");function nr(e){return typeof e=="boolean"}r(nr,"isBoolean");function rr(e){return e==null}r(rr,"isNullOrUndefined");function or(e){return k(e)&&e.constructor.name==="Uint8Array"}r(or,"isUint8Array");function ne(e,t,n=new WeakSet){if(e===t)return!0;if(n.has(t)||(de(t)||n.add(t),!(e instanceof Object)||!(t instanceof Object))||e.constructor!==t.constructor||e.length!==t.length)return!1;for(let o in e){if(!e.hasOwnProperty(o))continue;if(!t.hasOwnProperty(o))return!1;let i=e[o],s=t[o];if(!ne(i,s,n))return!1}for(let o in t)if(t.hasOwnProperty(o)&&!e.hasOwnProperty(o))return!1;return!0}r(ne,"deepEqual");function kt(e,t=new WeakSet){if(t.has(e))return"[Circular ~]";if(de(e)||t.add(e),je(e)){for(let n in e)if(!!e.hasOwnProperty(n)){if(e[n]===void 0){delete e[n];continue}kt(e[n],t)}}else if(O(e))for(let n=e.length-1;n>=0;n--)e[n]===void 0&&e.splice(n,1);return e}r(kt,"deepStripUndefinedInPlace");function re(e,...t){for(let n of t)k(e)||(e={}),!(n==null||!k(n))&&Object.keys(n).forEach(o=>{let i=e[o],s=n[o];Array.isArray(i)&&Array.isArray(s)?e[o]=i.concat(s):k(i)&&k(s)?e[o]=re(Object.assign({},i),s):e[o]=s});return e}r(re,"deepMerge");function ie(e={}){let{level:t=void 0,filter:n=void 0}=e,o=G(n),i=oe(t);return s=>{if(!i(s.level)||!o(s.name))return;let u=s.name?`[${s.name}]`:"";switch(s.level){case 1:console.info(`I|* ${u}`,...s.messages);break;case 2:console.warn(`W|** ${u}`,...s.messages);break;case 3:console.error(`E|*** ${u}`,...s.messages);break;default:console.debug(`D| ${u}`,...s.messages);break}}}r(ie,"LoggerConsoleHandler");var Q=(a=>(a[a.all=-1]="all",a[a.debug=0]="debug",a[a.info=1]="info",a[a.warn=2]="warn",a[a.error=3]="error",a[a.fatal=4]="fatal",a[a.off=1/0]="off",a))(Q||{}),ze={"*":-1,a:-1,all:-1,d:0,dbg:0,debug:0,i:1,inf:1,info:1,w:2,warn:2,warning:2,e:3,err:3,error:3,fatal:4,off:1/0,"-":1/0};function Ne(e=""){let t=[ie()],n=2,o=r(c=>!0,"logCheckNamespace"),i=!1,s=a,u=!1;function a(c="",g){function f(...p){x({name:c,messages:p,level:0})}r(f,"log"),f.label=c,f.active=!0,f.level=ge(g??-1),f.extend=function(p){return s(c?`${c}:${p}`:p)};let x=r(p=>{if(f.active===!0&&p.level>=l.level&&p.level>=f.level&&o(c))for(let h of t)h&&h(p)},"emit");return f.debug=function(...p){x({name:c,messages:p,level:0})},f.info=function(...p){x({name:c,messages:p,level:1})},f.warn=function(...p){x({name:c,messages:p,level:2})},f.error=function(...p){x({name:c,messages:p,level:3})},f.assert=function(p,...h){p||(typeof console!==void 0&&(console.assert?console.assert(p,...h):console.error(`Assert did fail with: ${p}`,...h)),x({name:c,messages:h||[`Assert did fail with: ${p}`],level:n}))},f.assertEqual=function(p,h,...m){let d=ne(p,h);d||f.assert(d,`Assert did fail. Expected ${h} got ${p}`,h,p,...m)},f.assertNotEqual=function(p,h,...m){let d=ne(p,h);d&&f.assert(d,`Assert did fail. Expected ${h} not to be equal with ${p}`,h,p,...m)},f}r(a,"LoggerBaseFactory");function l(c="",g){let f=s(c,g);return u&&f.debug(`+++ init of logger "${c}" on level "${Q[f.level]}".`),f}return r(l,"Logger"),l.registerHandler=function(c){t.push(c)},l.setFilter=function(c){o=G(c)},l.setLock=(c=!0)=>i=c,l.setDebug=(c=!0)=>u=c,l.setHandlers=function(c=[]){s!==a&&(s=a),!i&&(t=[...c].filter(g=>typeof g=="function"))},l.level=-1,l.setLogLevel=function(c=-1){i||(l.level=c)},l.setFactory=function(c){i||(s=c)},l}r(Ne,"LoggerContext");function Ft(e){return e===!0||e==="true"||e==="1"||typeof e=="number"&&e!==0?e="*":e===!1||e==="false"||e===0||e==="0"||e==null||e==="null"||e==="undefined"?e="":e=String(e),e}r(Ft,"getNamespaceFilterString");var It=Ft(typeof process<"u"?process.env.ZEED??process.env.DEBUG:typeof localStorage<"u"?localStorage.zeed??localStorage.debug:"*");function G(e=It){let t,n=[],o=[];if(!e)t=r(function(i){return!1},"fn");else if(e==="*")t=r(function(i){return!0},"fn");else{let i,s=e.split(/[\s,]+/),u=s.length;for(i=0;i<u;i++){if(!s[i])continue;let a=s[i].replace(/\*/g,".*?");a[0]==="-"?n.push(new RegExp(`^${a.substr(1)}$`)):o.push(new RegExp(`^${a}$`))}t=r(function(a){if(n.length===0&&o.length===0)return!0;let l,c;for(l=0,c=n.length;l<c;l++)if(n[l].test(a))return!1;for(l=0,c=o.length;l<c;l++)if(o[l].test(a))return!0;return!1},"fn")}return t.accept=o,t.reject=n,t.filter=e,t}r(G,"useNamespaceFilter");var Ct=typeof process<"u"?process.env.ZEED_LEVEL??process.env.LEVEL??process.env.DEBUG_LEVEL:typeof localStorage<"u"?localStorage.zeed_level??localStorage.level??localStorage.debug_level:void 0;function ge(e){if(e===!1)return 1/0;if(typeof e=="number")return e;if(typeof e=="string"){let t=ze[e.toLocaleLowerCase().trim()];if(t!=null)return t}return-1}r(ge,"parseLogLevel");function oe(e=Ct){let t=ge(e);return n=>n>=t}r(oe,"useLevelFilter");var $;function me(){let e=Ne();return e.setHandlers([ie()]),e}r(me,"getLoggerContext");function Ot(){if($==null)try{let e=Y();e!=null?(e==null?void 0:e.logger)==null?($=me(),e.logger=$):$=e.logger:$=me()}catch{$=me()}return $}r(Ot,"getGlobalLogger");var v=Ot();var qe=r((e,t)=>t instanceof Object&&!Array.isArray(t)?Object.keys(t).sort().reduce((n,o)=>(n[o]=t[o],n),{}):t,"_sortedReplacer");function Pr(e,t=void 0){return JSON.stringify(e,qe,t)}r(Pr,"jsonStringifySorted");function $t(e,t){let n=[],o=[];return t==null&&(t=r(function(i,s){return n[0]===s?"[Circular ~]":`[Circular ~.${o.slice(0,n.indexOf(s)).join(".")}]`},"cycleReplacer")),function(i,s){if(n.length>0){let u=n.indexOf(this);~u?n.splice(u+1):n.push(this),~u?o.splice(u,1/0,i):o.push(i),~n.indexOf(s)&&(s=t==null?void 0:t.call(this,i,s))}else n.push(s);return s=qe(i,s),e==null?s:e.call(this,i,s)}}r($t,"serializer");function F(e,t,n,o){return JSON.stringify(e,$t(t,o),n)}r(F,"jsonStringifySafe");var ye=F;var Ge=v("zeed:bin");function Bt(e){let t=unescape(encodeURIComponent(e)),n=t.length,o=new Uint8Array(n);for(let i=0;i<n;i++)o[i]=t.codePointAt(i)||0;return o}r(Bt,"_encodeUtf8Polyfill");function Ht(e){let t=e.length,n="",o=0;for(;t>0;){let i=t<1e4?t:1e4,s=e.subarray(o,o+i);o+=i,n+=String.fromCodePoint.apply(null,s),t-=i}return decodeURIComponent(escape(n))}r(Ht,"_decodeUtf8Polyfill");var se;function Ve(e){if(se==null&&(se=Bt,typeof TextEncoder<"u")){let t=new TextEncoder;se=r(n=>t.encode(n),"_textEncoder")}return se(e.normalize("NFC"))}r(Ve,"stringToUInt8Array");var ae;function jt(e){if(ae==null&&(ae=Ht,typeof TextDecoder<"u")){let t=new TextDecoder("utf-8",{ignoreBOM:!0});ae=r(n=>t.decode(n),"_textDecoder")}return ae(e).normalize("NFC")}r(jt,"Uint8ArrayToString");function M(e){return e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?Ve(e):e.length?new Uint8Array(e):e}r(M,"toUint8Array");function kr(...e){let t=0,n=e.flat(1).map(s=>{let u=M(s);return t+=u.length,u}),o=new Uint8Array(t),i=0;for(let s of n)o.set(s,i),i+=s.length;return o}r(kr,"joinToUint8Array");function _e(e){if(typeof Buffer<"u")return Buffer.from(M(e)).toString("hex");let t="0123456789abcdef",n="";for(let o of[...M(e)])n+=t[o>>4]+t[o&15];return n}r(_e,"toHex");function Je(e){return Uint8Array.from(e.match(/.{1,2}/g).map(t=>parseInt(t,16)))}r(Je,"fromHex");function Ze(e){let t=M(e);if(typeof Buffer<"u")return Buffer.from(t).toString("base64");let n="";for(let o=0;o<t.byteLength;o++)n+=String.fromCharCode(t[o]);return btoa(n)}r(Ze,"toBase64");function Fr(e){let t=M(e);if(typeof Buffer<"u")return Buffer.from(t).toString("base64url");let n="";for(let o=0;o<t.byteLength;o++)n+=String.fromCharCode(t[o]);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_")}r(Fr,"toBase64Url");function Ir(e){if(typeof Buffer<"u"){let o=Buffer.from(e,"base64");return new Uint8Array(o.buffer,o.byteOffset,o.byteLength)}let t=atob(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}r(Ir,"fromBase64");function We(e,t){if(e.byteLength!==t.byteLength)return!1;let n=M(e),o=M(t);for(let i=0;i<n.length;i++)if(n[i]!==o[i])return!1;return!0}r(We,"equalBinary");function he(e){try{return Ve(F(e))}catch(t){throw Ge.warn("jsonToUint8Array",e),t}}r(he,"jsonToUint8Array");function xe(e){try{return JSON.parse(jt(e))}catch(t){throw Ge.warn("Uint8ArrayToJson",e),t}}r(xe,"Uint8ArrayToJson");function Ke(e,t){if(typeof e!="string")if(e instanceof ArrayBuffer&&e.byteLength!==void 0)e=String.fromCharCode.apply(String,[].slice.call(new Uint8Array(e)));else if(Array.isArray(e))e=String.fromCharCode.apply(String,e);else if(e.constructor===Uint8Array)e=String.fromCharCode.apply(String,[].slice.call(e));else return!1;t=t||16;let n=[],o="0123456789ABCDEF";for(let i=0;i<e.length;i+=t){let s=e.slice(i,Math.min(i+t,e.length)),u=`0000${i.toString(16)}`.slice(-4),a=s.split("").map(c=>{let g=c.charCodeAt(0);return` ${o[(240&g)>>4]}${o[15&g]}`}).join("");a+=" ".repeat(t-s.length);let l=s.replace(/[\x00-\x1F\x20]/g,".");l+=" ".repeat(t-s.length),n.push(`${u} ${a} ${l}`)}return n.join(`
2
- `)}r(Ke,"Uint8ArrayToHexDump");function V(e=16){let t=new Uint8Array(e);if(typeof crypto<"u"&&crypto.getRandomValues)crypto.getRandomValues(t);else for(let n=0;n<e;n++)t[n]=Math.floor(Math.random()*256);return t}r(V,"randomUint8Array");var Qe="SHA-256",be="AES-GCM",Ye="PBKDF2";async function Br(e,t=Qe){return M(await crypto.subtle.digest(t,M(e)))}r(Br,"digest");async function Hr(e,t={}){let n=M(e),o=await crypto.subtle.importKey("raw",n,Ye,!1,["deriveKey"]);return await crypto.subtle.deriveKey({name:Ye,salt:t.salt?M(t.salt):new Uint8Array(0),iterations:t.iterations??1e5,hash:Qe},o,{name:be,length:256},!0,["encrypt","decrypt"])}r(Hr,"deriveKeyPbkdf2");var ue=new Uint8Array([1,1]);async function Xe(e,t){let n=V(12),o=await crypto.subtle.encrypt({name:be,iv:n},t,e),i=new Uint8Array(o),s=ue.length+n.length+i.length,u=new Uint8Array(s),a=0;return u.set(ue,a),a+=ue.length,u.set(n,a),a+=n.length,u.set(i,a),u}r(Xe,"encrypt");async function et(e,t){let n=e.subarray(0,2);if(!We(n,ue))return Promise.reject(new Error(`Unknown magic ${n}`));let o=e.subarray(2,2+12),i=e.subarray(2+12,e.length),s=await crypto.subtle.decrypt({name:be,iv:o},t,i);return new Uint8Array(s)}r(et,"decrypt");var tt=",";function zt(e){return/^([-+])?([0-9]+(\.[0-9]+)?|Infinity)$/.test(e)?Number(e):NaN}r(zt,"filterFloat");function Nt(e){return e==null?"":!isNaN(zt(e))&&isFinite(e)?parseFloat(e):`"${String(e).replace(/"/g,'""')}"`}r(Nt,"escape");function Nr(e,t){let n="";t&&(n=`${t.join(tt)}\r
3
- `);for(let o=0;o<e.length;o++)n+=`${e[o].map(Nt).join(tt)}\r
4
- `;return n}r(Nr,"csv");function qt(){return crypto.getRandomValues(new Uint32Array(1))[0]/4294967295}r(qt,"getSecureRandom");function P(){return typeof crypto<"u"?qt():Math.random()}r(P,"getSecureRandomIfPossible");function Vr(e=.25){return P()<e}r(Vr,"randomBoolean");function _r(e=100,t=0){return t+Math.floor(P()*(e-t))}r(_r,"randomInt");function Jr(e=100,t=0){return t+P()*(e-t)}r(Jr,"randomFloat");function Zr(e,t,n){return Math.max(e,Math.min(n,t))}r(Zr,"between");function Gt(e){return e.reduce((t,n)=>t+n,0)}r(Gt,"sum");function Wr(e){return Gt(e)/e.length}r(Wr,"avg");function Kr(e){return!/^1?$|^(11+?)\1+$/.test("1".repeat(e))}r(Kr,"isPrimeRX");function Yr(e){for(let t=2;t<e;t++)if(e%t===0)return!1;return e>1}r(Yr,"isPrime");var Te=6;function Qr(e=0,t=1,n){Te=((n??Te)*9301+49297)%233280;let o=Te/233280;return t+o*(e-t)}r(Qr,"seededRandom");function Vt(e=""){let[t="",n="asc"]=e.split(" ");return n=n.toLowerCase(),{field:t,orderby:n,asc:n!=="desc",desc:n==="desc"}}r(Vt,"parseOrderby");function to(e,t=!0){return`${e} ${t?"asc":"desc"}`}r(to,"composeOrderby");function we(e,t,n=!0){let o=e||0,i=t||0;return o>i?n?1:-1:o<i?n?-1:1:0}r(we,"cmp");function no(e,...t){if(t.length>0){let n=t.map(Vt),o=Array.from(e);return o.sort((i,s)=>{for(let{field:u,asc:a}of n){let l=we(i[u],s[u],a);if(l!==0)return l}return 0}),o}return e}r(no,"sortedOrderby");function Le(e){return e.filter((t,n)=>e.indexOf(t)===n)}r(Le,"arrayUnique");function _t(e,t){return Le(e.filter(n=>!t.includes(n)))}r(_t,"arrayMinus");function Jt(...e){return Le(e.reduce((t=[],n)=>t.concat(n),[]))}r(Jt,"arrayUnion");function _(...e){return e.flat(1/0)}r(_,"arrayFlatten");function Zt(e,t){return Le(e).filter(n=>t.includes(n))}r(Zt,"arrayIntersection");function ao(e,t){return _t(Jt(e,t),Zt(e,t))}r(ao,"arraySymmetricDifference");function uo(e,t){if(e&&Array.isArray(e)){let n;for(;(n=e.indexOf(t))!==-1;)e.splice(n,1);return e}return[]}r(uo,"arrayRemoveElement");function co(e,t){return e.includes(t)||e.push(t),e}r(co,"arraySetElement");function Ae(e,t){return e.splice(0,e.length,...e.filter(t)),e}r(Ae,"arrayFilterInPlace");function lo(e,t){let n=e.findIndex(o=>o===t);return n>=0?e.splice(n,1):e.push(t),e}r(lo,"arrayToggleInPlace");function fo(e){return e.splice(0,e.length),e}r(fo,"arrayEmptyInPlace");function Wt(e,t=we){return Array.from(e).sort(t)}r(Wt,"arraySorted");function po(e){return Wt(e,(t,n)=>t-n)}r(po,"arraySortedNumbers");function Kt(e,t){return e.length===t.length&&e.every((n,o)=>n===t[o])}r(Kt,"arrayIsEqual");function nt(e){return e.sort(()=>P()>.5?1:-1),e}r(nt,"arrayShuffleInPlace");function go(e){return nt(Array.from(e))}r(go,"arrayShuffle");function mo(e){for(;e.length>1;){let t=Array.from(e);if(nt(t),!Kt(e,t))return t}return e}r(mo,"arrayShuffleForce");function yo(e){return e[Math.floor(P()*e.length)]}r(yo,"arrayRandomElement");function ho(...e){return _(e).reduce((t,n)=>t!=null?n>t?n:t:n,void 0)}r(ho,"arrayMax");function xo(...e){return _(e).reduce((t,n)=>t!=null?n<t?n:t:n,void 0)}r(xo,"arrayMin");function bo(...e){return _(e).reduce((t,n)=>t+n,0)}r(bo,"arraySum");function To(...e){let t=_(e);return t.reduce((n,o)=>n+o,0)/t.length}r(To,"arrayAvg");function wo(e,t){let n=[],o=0,i=e.length;for(;o<i;)n.push(e.slice(o,o+=t));return n}r(wo,"arrayBatches");function Lo(e=0,t){if(e<=0)return[];let n=new Array(e);for(let o=0;o<e;o++)n[o]=t instanceof Function?t(o):t;return n}r(Lo,"createArray");var Yt=v("zeed:basex"),Qt={2:"01",8:"01234567",11:"0123456789a",16:"0123456789abcdef",32:"0123456789abcdefghjkmnpqrtuvwxyz","32-crockford":"0123456789ABCDEFGHJKMNPQRSTVWXYZ","32-geohash":"0123456789bcdefghjkmnpqrstuvwxyz","32-agnoster":"0123456789abcdefghjkmnpqrtuvwxyz","32-rfc":"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567","32-hex":"0123456789ABCDEFGHIJKLMNOPQRSTUV","32-zbase":"ybndrfg8ejkmcpqxot1uwisza345h769",36:"0123456789abcdefghijklmnopqrstuvwxyz",58:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",62:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",64:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/","64-url":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",66:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.!~",85:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~"};function B(e){let t;if(typeof e=="string")t=e;else if(t=Qt[String(e)],t==null)throw new Error(`Unknown base ${e}`);if(t.length>=255)throw new TypeError("Alphabet too long");let n=new Uint8Array(256);for(let c=0;c<n.length;c++)n[c]=255;for(let c=0;c<t.length;c++){let g=t.charAt(c),f=g.charCodeAt(0);if(n[f]!==255)throw new TypeError(`${g} is ambiguous`);n[f]=c}let o=t.length,i=t.charAt(0),s=Math.log(o)/Math.log(256),u=Math.log(256)/Math.log(o);function a(c,g=-1){let f=M(c);if(f.byteLength===0)return"";let x=0,p=0,h=f.byteLength;for(;p!==h&&f[p]===0;)p++;let m=(h-p)*u+1>>>0,d=new Uint8Array(m);for(;p!==h;){let b=f[p],w=0;for(let D=m-1;(b!==0||w<x)&&D!==-1;D--,w++)b+=256*d[D]>>>0,d[D]=b%o>>>0,b=b/o>>>0;if(b!==0)throw Yt.warn("Non-zero carry",f,g,w,m),new Error("Non-zero carry");x=w,p++}let y=m-x;for(;y!==m&&d[y]===0;)y++;let T="";for(;y<m;++y)T+=t.charAt(d[y]);return g>0?T.padStart(g,i):T}r(a,"encode");function l(c,g=-1){if(typeof c!="string")throw new TypeError("Expected String");if(c.length===0)return new Uint8Array;c=c.replace(/\s+/gi,"");let f=0,x=0;for(;c[f]===i;)f++;let p=(c.length-f)*s+1>>>0,h=new Uint8Array(p);for(;c[f];){let d=n[c.charCodeAt(f)];if(d===255)throw new Error(`Unsupported character "${c[f]}"`);let y=0;for(let T=p-1;(d!==0||y<x)&&T!==-1;T--,y++)d+=o*h[T]>>>0,h[T]=d%256>>>0,d=d/256>>>0;if(d!==0)throw new Error("Non-zero carry");x=y,f++}let m=p-x;for(;m!==p&&h[m]===0;)m++;return g>0?new Uint8Array([...new Uint8Array(g-h.length+m),...h.slice(m)]):h.slice(m)}return r(l,"decode"),{encode:a,decode:l}}r(B,"useBase");var{encode:Po,decode:Xt}=B(32);function Mo(e){return Xt(e.toLocaleLowerCase().replaceAll("l","1").replaceAll("s","5").replaceAll("o","0").replaceAll("i","1"))}r(Mo,"decodeBase32");var{encode:Uo,decode:So}=B(16),{encode:Ro,decode:ko}=B(58),{encode:Fo,decode:Io}=B(62);function Co(e,t){return Math.ceil(e*(Math.log(256)/Math.log(t)))}r(Co,"estimateSizeForBase");var Bo=r(e=>(e.length>0&&(/^[A-Z0-9_\-\ ]*$/g.test(e)&&(e=e.toLowerCase()),e=e.replace(/^[-_\ ]+/gi,"").replace(/[-_\ ]+$/gi,"").replace(/[-_\ ]+([a-z0-9])/gi,(t,n)=>n.toUpperCase()),e=e[0].toLowerCase()+e.substring(1)),e),"toCamelCase");function en(e){return e.charAt(0).toUpperCase()+e.toLowerCase().slice(1)}r(en,"toCapitalize");function Ho(e){return e.replace(/\w\S*/g,en)}r(Ho,"toCapitalizeWords");function jo(e,t="-"){return t=typeof t>"u"?"_":t,e.replace(/([a-z\d])([A-Z])/g,`$1${t}$2`).replace(/([A-Z]+)([A-Z][a-z\d]+)/g,`$1${t}$2`).toLowerCase()}r(jo,"fromCamelCase");var rt=["1","true","yes","y","on"];function Vo(e,t=!1){return e==null||typeof e!="string"?t:rt.includes(String(e).trim().toLowerCase())}r(Vo,"stringToBoolean");function _o(e,t=0){return e==null||typeof e!="string"?t:parseInt(e.trim(),10)??t}r(_o,"stringToInteger");function Jo(e,t=0){return e==null||typeof e!="string"?t:parseFloat(e.trim())??t}r(Jo,"stringToFloat");function tn(e,t=!1){return e==null?t:typeof e=="boolean"?e:typeof e=="number"?e!==0:rt.includes(String(e).trim().toLowerCase())}r(tn,"valueToBoolean");function nn(e,t=0){return e==null?t:typeof e=="boolean"?e?1:0:typeof e=="number"?Math.floor(e):parseInt(String(e).trim(),10)??t}r(nn,"valueToInteger");function rn(e,t=0){return e==null?t:typeof e=="boolean"?e?1:0:typeof e=="number"?Math.floor(e):parseFloat(String(e).trim())??t}r(rn,"valueToFloat");function ve(e,t=""){return e==null?t:String(e)??t}r(ve,"valueToString");var Zo=rn,Wo=nn,Ko=ve,Yo=tn;function on(e,t={}){let{trace:n=!0,pretty:o=!0}=t;return e.map(i=>i&&typeof i=="object"?o&&(i instanceof Uint8Array||i instanceof ArrayBuffer)?`
1
+ var Rt=Object.defineProperty;var r=(e,t)=>Rt(e,"name",{value:t,configurable:!0});function St(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;if(typeof globalThis<"u")return globalThis;throw new Error("unable to locate global object")}r(St,"_global");function Y(){let e=St();return e._zeedGlobal==null&&(e._zeedGlobal={}),e._zeedGlobal}r(Y,"getGlobalContext");function F(e){return e!=null&&typeof e=="object"}r(F,"isObject");function de(e){return Object(e)!==e}r(de,"isPrimitive");function O(e){return Array.isArray(e)}r(O,"isArray");function je(e){return F(e)&&!O(e)}r(je,"isRecord");function Xn(e){return typeof e=="string"}r(Xn,"isString");function er(e){return typeof e=="number"}r(er,"isNumber");function tr(e){return typeof e=="number"&&Number.isInteger(e)}r(tr,"isInteger");function nr(e){return typeof e=="number"&&Number.isSafeInteger(e)}r(nr,"isSafeInteger");function rr(e){return typeof e=="boolean"}r(rr,"isBoolean");function or(e){return e==null}r(or,"isNullOrUndefined");function ir(e){return F(e)&&e.constructor.name==="Uint8Array"}r(ir,"isUint8Array");function ne(e,t,n=new WeakSet){if(e===t)return!0;if(n.has(t)||(de(t)||n.add(t),!(e instanceof Object)||!(t instanceof Object))||e.constructor!==t.constructor||e.length!==t.length)return!1;for(let o in e){if(!e.hasOwnProperty(o))continue;if(!t.hasOwnProperty(o))return!1;let i=e[o],s=t[o];if(!ne(i,s,n))return!1}for(let o in t)if(t.hasOwnProperty(o)&&!e.hasOwnProperty(o))return!1;return!0}r(ne,"deepEqual");function Ft(e,t=new WeakSet){if(t.has(e))return"[Circular ~]";if(de(e)||t.add(e),je(e)){for(let n in e)if(!!e.hasOwnProperty(n)){if(e[n]===void 0){delete e[n];continue}Ft(e[n],t)}}else if(O(e))for(let n=e.length-1;n>=0;n--)e[n]===void 0&&e.splice(n,1);return e}r(Ft,"deepStripUndefinedInPlace");function re(e,...t){for(let n of t)F(e)||(e={}),!(n==null||!F(n))&&Object.keys(n).forEach(o=>{let i=e[o],s=n[o];Array.isArray(i)&&Array.isArray(s)?e[o]=i.concat(s):F(i)&&F(s)?e[o]=re(Object.assign({},i),s):e[o]=s});return e}r(re,"deepMerge");function ie(e={}){let{level:t=void 0,filter:n=void 0}=e,o=G(n),i=oe(t);return s=>{if(!i(s.level)||!o(s.name))return;let u=s.name?`[${s.name}]`:"";switch(s.level){case 1:console.info(`I|* ${u}`,...s.messages);break;case 2:console.warn(`W|** ${u}`,...s.messages);break;case 3:console.error(`E|*** ${u}`,...s.messages);break;default:console.debug(`D| ${u}`,...s.messages);break}}}r(ie,"LoggerConsoleHandler");var Q=(a=>(a[a.all=-1]="all",a[a.debug=0]="debug",a[a.info=1]="info",a[a.warn=2]="warn",a[a.error=3]="error",a[a.fatal=4]="fatal",a[a.off=1/0]="off",a))(Q||{}),ze={"*":-1,a:-1,all:-1,d:0,dbg:0,debug:0,i:1,inf:1,info:1,w:2,warn:2,warning:2,e:3,err:3,error:3,fatal:4,off:1/0,"-":1/0};function Ne(e=""){let t=[ie()],n=2,o=r(c=>!0,"logCheckNamespace"),i=!1,s=a,u=!1;function a(c="",g){function f(...p){x({name:c,messages:p,level:0})}r(f,"log"),f.label=c,f.active=!0,f.level=ge(g??-1),f.extend=function(p){return s(c?`${c}:${p}`:p)};let x=r(p=>{if(f.active===!0&&p.level>=l.level&&p.level>=f.level&&o(c))for(let h of t)h&&h(p)},"emit");return f.debug=function(...p){x({name:c,messages:p,level:0})},f.info=function(...p){x({name:c,messages:p,level:1})},f.warn=function(...p){x({name:c,messages:p,level:2})},f.error=function(...p){x({name:c,messages:p,level:3})},f.assert=function(p,...h){p||(typeof console!==void 0&&(console.assert?console.assert(p,...h):console.error(`Assert did fail with: ${p}`,...h)),x({name:c,messages:h||[`Assert did fail with: ${p}`],level:n}))},f.assertEqual=function(p,h,...m){let d=ne(p,h);d||f.assert(d,`Assert did fail. Expected ${h} got ${p}`,h,p,...m)},f.assertNotEqual=function(p,h,...m){let d=ne(p,h);d&&f.assert(d,`Assert did fail. Expected ${h} not to be equal with ${p}`,h,p,...m)},f}r(a,"LoggerBaseFactory");function l(c="",g){let f=s(c,g);return u&&f.debug(`+++ init of logger "${c}" on level "${Q[f.level]}".`),f}return r(l,"Logger"),l.registerHandler=function(c){t.push(c)},l.setFilter=function(c){o=G(c)},l.setLock=(c=!0)=>i=c,l.setDebug=(c=!0)=>u=c,l.setHandlers=function(c=[]){s!==a&&(s=a),!i&&(t=[...c].filter(g=>typeof g=="function"))},l.level=-1,l.setLogLevel=function(c=-1){i||(l.level=c)},l.setFactory=function(c){i||(s=c)},l}r(Ne,"LoggerContext");function kt(e){return e===!0||e==="true"||e==="1"||typeof e=="number"&&e!==0?e="*":e===!1||e==="false"||e===0||e==="0"||e==null||e==="null"||e==="undefined"?e="":e=String(e),e}r(kt,"getNamespaceFilterString");var It=kt(typeof process<"u"?process.env.ZEED??process.env.DEBUG:typeof localStorage<"u"?localStorage.zeed??localStorage.debug:"*");function G(e=It){let t,n=[],o=[];if(!e)t=r(function(i){return!1},"fn");else if(e==="*")t=r(function(i){return!0},"fn");else{let i,s=e.split(/[\s,]+/),u=s.length;for(i=0;i<u;i++){if(!s[i])continue;let a=s[i].replace(/\*/g,".*?");a[0]==="-"?n.push(new RegExp(`^${a.substr(1)}$`)):o.push(new RegExp(`^${a}$`))}t=r(function(a){if(n.length===0&&o.length===0)return!0;let l,c;for(l=0,c=n.length;l<c;l++)if(n[l].test(a))return!1;for(l=0,c=o.length;l<c;l++)if(o[l].test(a))return!0;return!1},"fn")}return t.accept=o,t.reject=n,t.filter=e,t}r(G,"useNamespaceFilter");var Ct=typeof process<"u"?process.env.ZEED_LEVEL??process.env.LEVEL??process.env.DEBUG_LEVEL:typeof localStorage<"u"?localStorage.zeed_level??localStorage.level??localStorage.debug_level:void 0;function ge(e){if(e===!1)return 1/0;if(typeof e=="number")return e;if(typeof e=="string"){let t=ze[e.toLocaleLowerCase().trim()];if(t!=null)return t}return-1}r(ge,"parseLogLevel");function oe(e=Ct){let t=ge(e);return n=>n>=t}r(oe,"useLevelFilter");var $;function me(){let e=Ne();return e.setHandlers([ie()]),e}r(me,"getLoggerContext");function Ot(){if($==null)try{let e=Y();e!=null?(e==null?void 0:e.logger)==null?($=me(),e.logger=$):$=e.logger:$=me()}catch{$=me()}return $}r(Ot,"getGlobalLogger");var v=Ot();var qe=r((e,t)=>t instanceof Object&&!Array.isArray(t)?Object.keys(t).sort().reduce((n,o)=>(n[o]=t[o],n),{}):t,"_sortedReplacer");function Mr(e,t=void 0){return JSON.stringify(e,qe,t)}r(Mr,"jsonStringifySorted");function $t(e,t){let n=[],o=[];return t==null&&(t=r(function(i,s){return n[0]===s?"[Circular ~]":`[Circular ~.${o.slice(0,n.indexOf(s)).join(".")}]`},"cycleReplacer")),function(i,s){if(n.length>0){let u=n.indexOf(this);~u?n.splice(u+1):n.push(this),~u?o.splice(u,1/0,i):o.push(i),~n.indexOf(s)&&(s=t==null?void 0:t.call(this,i,s))}else n.push(s);return s=qe(i,s),e==null?s:e.call(this,i,s)}}r($t,"serializer");function k(e,t,n,o){return JSON.stringify(e,$t(t,o),n)}r(k,"jsonStringifySafe");var ye=k;var Ge=v("zeed:bin");function Bt(e){let t=unescape(encodeURIComponent(e)),n=t.length,o=new Uint8Array(n);for(let i=0;i<n;i++)o[i]=t.codePointAt(i)||0;return o}r(Bt,"_encodeUtf8Polyfill");function Ht(e){let t=e.length,n="",o=0;for(;t>0;){let i=t<1e4?t:1e4,s=e.subarray(o,o+i);o+=i,n+=String.fromCodePoint.apply(null,s),t-=i}return decodeURIComponent(escape(n))}r(Ht,"_decodeUtf8Polyfill");var se;function Ve(e){if(se==null&&(se=Bt,typeof TextEncoder<"u")){let t=new TextEncoder;se=r(n=>t.encode(n),"_textEncoder")}return se(e.normalize("NFC"))}r(Ve,"stringToUInt8Array");var ae;function jt(e){if(ae==null&&(ae=Ht,typeof TextDecoder<"u")){let t=new TextDecoder("utf-8",{ignoreBOM:!0});ae=r(n=>t.decode(n),"_textDecoder")}return ae(e).normalize("NFC")}r(jt,"Uint8ArrayToString");function M(e){return e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?Ve(e):e.length?new Uint8Array(e):e}r(M,"toUint8Array");function kr(...e){let t=0,n=e.flat(1).map(s=>{let u=M(s);return t+=u.length,u}),o=new Uint8Array(t),i=0;for(let s of n)o.set(s,i),i+=s.length;return o}r(kr,"joinToUint8Array");function _e(e){if(typeof Buffer<"u")return Buffer.from(M(e)).toString("hex");let t="0123456789abcdef",n="";for(let o of[...M(e)])n+=t[o>>4]+t[o&15];return n}r(_e,"toHex");function Je(e){return Uint8Array.from(e.match(/.{1,2}/g).map(t=>parseInt(t,16)))}r(Je,"fromHex");function Ze(e){let t=M(e);if(typeof Buffer<"u")return Buffer.from(t).toString("base64");let n="";for(let o=0;o<t.byteLength;o++)n+=String.fromCharCode(t[o]);return btoa(n)}r(Ze,"toBase64");function Ir(e){let t=M(e);if(typeof Buffer<"u")return Buffer.from(t).toString("base64url");let n="";for(let o=0;o<t.byteLength;o++)n+=String.fromCharCode(t[o]);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_")}r(Ir,"toBase64Url");function Cr(e){if(typeof Buffer<"u"){let o=Buffer.from(e,"base64");return new Uint8Array(o.buffer,o.byteOffset,o.byteLength)}let t=atob(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}r(Cr,"fromBase64");function We(e,t){if(e.byteLength!==t.byteLength)return!1;let n=M(e),o=M(t);for(let i=0;i<n.length;i++)if(n[i]!==o[i])return!1;return!0}r(We,"equalBinary");function he(e){try{return Ve(k(e))}catch(t){throw Ge.warn("jsonToUint8Array",e),t}}r(he,"jsonToUint8Array");function xe(e){try{return JSON.parse(jt(e))}catch(t){throw Ge.warn("Uint8ArrayToJson",e),t}}r(xe,"Uint8ArrayToJson");function Ke(e,t){if(typeof e!="string")if(e instanceof ArrayBuffer&&e.byteLength!==void 0)e=String.fromCharCode.apply(String,[].slice.call(new Uint8Array(e)));else if(Array.isArray(e))e=String.fromCharCode.apply(String,e);else if(e.constructor===Uint8Array)e=String.fromCharCode.apply(String,[].slice.call(e));else return!1;t=t||16;let n=[],o="0123456789ABCDEF";for(let i=0;i<e.length;i+=t){let s=e.slice(i,Math.min(i+t,e.length)),u=`0000${i.toString(16)}`.slice(-4),a=s.split("").map(c=>{let g=c.charCodeAt(0);return` ${o[(240&g)>>4]}${o[15&g]}`}).join("");a+=" ".repeat(t-s.length);let l=s.replace(/[\x00-\x1F\x20]/g,".");l+=" ".repeat(t-s.length),n.push(`${u} ${a} ${l}`)}return n.join(`
2
+ `)}r(Ke,"Uint8ArrayToHexDump");function V(e=16){let t=new Uint8Array(e);if(typeof crypto<"u"&&crypto.getRandomValues)crypto.getRandomValues(t);else for(let n=0;n<e;n++)t[n]=Math.floor(Math.random()*256);return t}r(V,"randomUint8Array");var Qe="SHA-256",be="AES-GCM",Ye="PBKDF2",zt=1e5;async function Hr(e,t=Qe){return M(await crypto.subtle.digest(t,M(e)))}r(Hr,"digest");async function jr(e,t={}){let n=M(e),o=await crypto.subtle.importKey("raw",n,Ye,!1,["deriveKey"]);return await crypto.subtle.deriveKey({name:Ye,salt:t.salt?M(t.salt):new Uint8Array(0),iterations:t.iterations??zt,hash:Qe},o,{name:be,length:256},!0,["encrypt","decrypt"])}r(jr,"deriveKeyPbkdf2");var ue=new Uint8Array([1,1]);async function Xe(e,t){let n=V(12),o=await crypto.subtle.encrypt({name:be,iv:n},t,e),i=new Uint8Array(o),s=ue.length+n.length+i.length,u=new Uint8Array(s),a=0;return u.set(ue,a),a+=ue.length,u.set(n,a),a+=n.length,u.set(i,a),u}r(Xe,"encrypt");async function et(e,t){let n=e.subarray(0,2);if(!We(n,ue))return Promise.reject(new Error(`Unknown magic ${n}`));let o=e.subarray(2,2+12),i=e.subarray(2+12,e.length),s=await crypto.subtle.decrypt({name:be,iv:o},t,i);return new Uint8Array(s)}r(et,"decrypt");var tt=",";function Nt(e){return/^([-+])?([0-9]+(\.[0-9]+)?|Infinity)$/.test(e)?Number(e):NaN}r(Nt,"filterFloat");function qt(e){return e==null?"":!isNaN(Nt(e))&&isFinite(e)?parseFloat(e):`"${String(e).replace(/"/g,'""')}"`}r(qt,"escape");function qr(e,t){let n="";t&&(n=`${t.join(tt)}\r
3
+ `);for(let o=0;o<e.length;o++)n+=`${e[o].map(qt).join(tt)}\r
4
+ `;return n}r(qr,"csv");function Gt(){return crypto.getRandomValues(new Uint32Array(1))[0]/4294967295}r(Gt,"getSecureRandom");function P(){return typeof crypto<"u"?Gt():Math.random()}r(P,"getSecureRandomIfPossible");function _r(e=.25){return P()<e}r(_r,"randomBoolean");function Jr(e=100,t=0){return t+Math.floor(P()*(e-t))}r(Jr,"randomInt");function Zr(e=100,t=0){return t+P()*(e-t)}r(Zr,"randomFloat");function Wr(e,t,n){return Math.max(e,Math.min(n,t))}r(Wr,"between");function Vt(e){return e.reduce((t,n)=>t+n,0)}r(Vt,"sum");function Kr(e){return Vt(e)/e.length}r(Kr,"avg");function Yr(e){return!/^1?$|^(11+?)\1+$/.test("1".repeat(e))}r(Yr,"isPrimeRX");function Qr(e){for(let t=2;t<e;t++)if(e%t===0)return!1;return e>1}r(Qr,"isPrime");var Te=6;function Xr(e=0,t=1,n){Te=((n??Te)*9301+49297)%233280;let o=Te/233280;return t+o*(e-t)}r(Xr,"seededRandom");function _t(e=""){let[t="",n="asc"]=e.split(" ");return n=n.toLowerCase(),{field:t,orderby:n,asc:n!=="desc",desc:n==="desc"}}r(_t,"parseOrderby");function no(e,t=!0){return`${e} ${t?"asc":"desc"}`}r(no,"composeOrderby");function we(e,t,n=!0){let o=e||0,i=t||0;return o>i?n?1:-1:o<i?n?-1:1:0}r(we,"cmp");function ro(e,...t){if(t.length>0){let n=t.map(_t),o=Array.from(e);return o.sort((i,s)=>{for(let{field:u,asc:a}of n){let l=we(i[u],s[u],a);if(l!==0)return l}return 0}),o}return e}r(ro,"sortedOrderby");function Le(e){return e.filter((t,n)=>e.indexOf(t)===n)}r(Le,"arrayUnique");function Jt(e,t){return Le(e.filter(n=>!t.includes(n)))}r(Jt,"arrayMinus");function Zt(...e){return Le(e.reduce((t=[],n)=>t.concat(n),[]))}r(Zt,"arrayUnion");function _(...e){return e.flat(1/0)}r(_,"arrayFlatten");function Wt(e,t){return Le(e).filter(n=>t.includes(n))}r(Wt,"arrayIntersection");function uo(e,t){return Jt(Zt(e,t),Wt(e,t))}r(uo,"arraySymmetricDifference");function co(e,t){if(e&&Array.isArray(e)){let n;for(;(n=e.indexOf(t))!==-1;)e.splice(n,1);return e}return[]}r(co,"arrayRemoveElement");function lo(e,t){return e.includes(t)||e.push(t),e}r(lo,"arraySetElement");function Ae(e,t){return e.splice(0,e.length,...e.filter(t)),e}r(Ae,"arrayFilterInPlace");function fo(e,t){let n=e.findIndex(o=>o===t);return n>=0?e.splice(n,1):e.push(t),e}r(fo,"arrayToggleInPlace");function po(e){return e.splice(0,e.length),e}r(po,"arrayEmptyInPlace");function Kt(e,t=we){return Array.from(e).sort(t)}r(Kt,"arraySorted");function go(e){return Kt(e,(t,n)=>t-n)}r(go,"arraySortedNumbers");function Yt(e,t){return e.length===t.length&&e.every((n,o)=>n===t[o])}r(Yt,"arrayIsEqual");function nt(e){return e.sort(()=>P()>.5?1:-1),e}r(nt,"arrayShuffleInPlace");function mo(e){return nt(Array.from(e))}r(mo,"arrayShuffle");function yo(e){for(;e.length>1;){let t=Array.from(e);if(nt(t),!Yt(e,t))return t}return e}r(yo,"arrayShuffleForce");function ho(e){return e[Math.floor(P()*e.length)]}r(ho,"arrayRandomElement");function xo(...e){return _(e).reduce((t,n)=>t!=null?n>t?n:t:n,void 0)}r(xo,"arrayMax");function bo(...e){return _(e).reduce((t,n)=>t!=null?n<t?n:t:n,void 0)}r(bo,"arrayMin");function To(...e){return _(e).reduce((t,n)=>t+n,0)}r(To,"arraySum");function wo(...e){let t=_(e);return t.reduce((n,o)=>n+o,0)/t.length}r(wo,"arrayAvg");function Lo(e,t){let n=[],o=0,i=e.length;for(;o<i;)n.push(e.slice(o,o+=t));return n}r(Lo,"arrayBatches");function Ao(e=0,t){if(e<=0)return[];let n=new Array(e);for(let o=0;o<e;o++)n[o]=t instanceof Function?t(o):t;return n}r(Ao,"createArray");var Qt=v("zeed:basex"),Xt={2:"01",8:"01234567",11:"0123456789a",16:"0123456789abcdef",32:"0123456789abcdefghjkmnpqrtuvwxyz","32-crockford":"0123456789ABCDEFGHJKMNPQRSTVWXYZ","32-geohash":"0123456789bcdefghjkmnpqrstuvwxyz","32-agnoster":"0123456789abcdefghjkmnpqrtuvwxyz","32-rfc":"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567","32-hex":"0123456789ABCDEFGHIJKLMNOPQRSTUV","32-zbase":"ybndrfg8ejkmcpqxot1uwisza345h769",36:"0123456789abcdefghijklmnopqrstuvwxyz",58:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",62:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",64:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/","64-url":"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",66:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.!~",85:"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>?@^_`{|}~"};function B(e){let t;if(typeof e=="string")t=e;else if(t=Xt[String(e)],t==null)throw new Error(`Unknown base ${e}`);if(t.length>=255)throw new TypeError("Alphabet too long");let n=new Uint8Array(256);for(let c=0;c<n.length;c++)n[c]=255;for(let c=0;c<t.length;c++){let g=t.charAt(c),f=g.charCodeAt(0);if(n[f]!==255)throw new TypeError(`${g} is ambiguous`);n[f]=c}let o=t.length,i=t.charAt(0),s=Math.log(o)/Math.log(256),u=Math.log(256)/Math.log(o);function a(c,g=-1){let f=M(c);if(f.byteLength===0)return"";let x=0,p=0,h=f.byteLength;for(;p!==h&&f[p]===0;)p++;let m=(h-p)*u+1>>>0,d=new Uint8Array(m);for(;p!==h;){let b=f[p],w=0;for(let D=m-1;(b!==0||w<x)&&D!==-1;D--,w++)b+=256*d[D]>>>0,d[D]=b%o>>>0,b=b/o>>>0;if(b!==0)throw Qt.warn("Non-zero carry",f,g,w,m),new Error("Non-zero carry");x=w,p++}let y=m-x;for(;y!==m&&d[y]===0;)y++;let T="";for(;y<m;++y)T+=t.charAt(d[y]);return g>0?T.padStart(g,i):T}r(a,"encode");function l(c,g=-1){if(typeof c!="string")throw new TypeError("Expected String");if(c.length===0)return new Uint8Array;c=c.replace(/\s+/gi,"");let f=0,x=0;for(;c[f]===i;)f++;let p=(c.length-f)*s+1>>>0,h=new Uint8Array(p);for(;c[f];){let d=n[c.charCodeAt(f)];if(d===255)throw new Error(`Unsupported character "${c[f]}"`);let y=0;for(let T=p-1;(d!==0||y<x)&&T!==-1;T--,y++)d+=o*h[T]>>>0,h[T]=d%256>>>0,d=d/256>>>0;if(d!==0)throw new Error("Non-zero carry");x=y,f++}let m=p-x;for(;m!==p&&h[m]===0;)m++;return g>0?new Uint8Array([...new Uint8Array(g-h.length+m),...h.slice(m)]):h.slice(m)}return r(l,"decode"),{encode:a,decode:l}}r(B,"useBase");var{encode:Mo,decode:en}=B(32);function Uo(e){return en(e.toLocaleLowerCase().replaceAll("l","1").replaceAll("s","5").replaceAll("o","0").replaceAll("i","1"))}r(Uo,"decodeBase32");var{encode:Ro,decode:So}=B(16),{encode:Fo,decode:ko}=B(58),{encode:Io,decode:Co}=B(62);function Oo(e,t){return Math.ceil(e*(Math.log(256)/Math.log(t)))}r(Oo,"estimateSizeForBase");var Ho=r(e=>(e.length>0&&(/^[A-Z0-9_\-\ ]*$/g.test(e)&&(e=e.toLowerCase()),e=e.replace(/^[-_\ ]+/gi,"").replace(/[-_\ ]+$/gi,"").replace(/[-_\ ]+([a-z0-9])/gi,(t,n)=>n.toUpperCase()),e=e[0].toLowerCase()+e.substring(1)),e),"toCamelCase");function tn(e){return e.charAt(0).toUpperCase()+e.toLowerCase().slice(1)}r(tn,"toCapitalize");function jo(e){return e.replace(/\w\S*/g,tn)}r(jo,"toCapitalizeWords");function zo(e,t="-"){return t=typeof t>"u"?"_":t,e.replace(/([a-z\d])([A-Z])/g,`$1${t}$2`).replace(/([A-Z]+)([A-Z][a-z\d]+)/g,`$1${t}$2`).toLowerCase()}r(zo,"fromCamelCase");var rt=["1","true","yes","y","on"];function _o(e,t=!1){return e==null||typeof e!="string"?t:rt.includes(String(e).trim().toLowerCase())}r(_o,"stringToBoolean");function Jo(e,t=0){return e==null||typeof e!="string"?t:parseInt(e.trim(),10)??t}r(Jo,"stringToInteger");function Zo(e,t=0){return e==null||typeof e!="string"?t:parseFloat(e.trim())??t}r(Zo,"stringToFloat");function nn(e,t=!1){return e==null?t:typeof e=="boolean"?e:typeof e=="number"?e!==0:rt.includes(String(e).trim().toLowerCase())}r(nn,"valueToBoolean");function rn(e,t=0){return e==null?t:typeof e=="boolean"?e?1:0:typeof e=="number"?Math.floor(e):parseInt(String(e).trim(),10)??t}r(rn,"valueToInteger");function on(e,t=0){return e==null?t:typeof e=="boolean"?e?1:0:typeof e=="number"?Math.floor(e):parseFloat(String(e).trim())??t}r(on,"valueToFloat");function ve(e,t=""){return e==null?t:String(e)??t}r(ve,"valueToString");var Wo=on,Ko=rn,Yo=ve,Qo=nn;function sn(e,t={}){let{trace:n=!0,pretty:o=!0}=t;return e.map(i=>i&&typeof i=="object"?o&&(i instanceof Uint8Array||i instanceof ArrayBuffer)?`
5
5
  ${Ke(i)}
6
6
  `:i instanceof Error?n?`${i.name||"Error"}: ${i.message}
7
- ${i.stack}`:`${i.name||"Error"}: ${i.message}`:o?ye(i,null,2):ye(i):String(i))}r(on,"formatMessages");function Qo(e,t={}){return on(e,t).join(" ")}r(Qo,"renderMessages");function Xo(e){try{return decodeURIComponent(escape(e))}catch{}return e}r(Xo,"fixBrokenUth8String");var Ee=864e5;function Pe(e){return Math.floor(e/1e4)}r(Pe,"dayYear");function ot(e){return Math.floor(e/100%100)}r(ot,"dayMonth");function sn(e){return Math.floor(e%100)}r(sn,"dayDay");function ni(e){return[Pe(e),ot(e),sn(e)]}r(ni,"dayToParts");function it(e,t=!1){return t?new Date(`${un(e)}T00:00:00.000Z`):new Date(e/1e4,e/100%100-1,e%100)}r(it,"dayToDate");function ri(){return ce(new Date)}r(ri,"dayFromToday");function oi(e,t=!1){if(typeof e=="number")return e<100?void 0:e;if(typeof e=="string")return st(e);if(Array.isArray(e)&&e.length===3){let[n,o,i]=e;return Me(n,o,i)}else if(e instanceof Date)return ce(e,t)}r(oi,"dayFromAny");function ii(e){return it(e,!0)}r(ii,"dayToDateGMT");function ce(e,t=!1){return t?st(e.toISOString()):e.getFullYear()*1e4+(e.getMonth()+1)*100+e.getDate()}r(ce,"dayFromDate");function si(e){return ce(e,!0)}r(si,"dayFromDateGMT");function De(e,t=!0){return it(e,t).getTime()}r(De,"dayToTimestamp");function an(e,t=!0){return ce(new Date(e),t)}r(an,"dayFromTimestamp");function un(e,t="-"){let n=String(e);return n.slice(0,4)+t+n.slice(4,6)+t+n.slice(6,8)}r(un,"dayToString");function Me(e,t=1,n=1){if(!(t<1||t>12||n<1||n>31))return e*1e4+t*100+n}r(Me,"dayFromParts");function st(e){let t=String(e).replace(/[^0-9]/g,"").slice(0,8);if(t.length===8)return+t}r(st,"dayFromString");function ai(e,t=0){let n=Pe(e),o=ot(e);return t!==0&&(o+=t,n+=Math.floor((o-1)/12),o=Math.floor((o-1)%12)+1,o===0&&(o=12)),Me(n,o,1)}r(ai,"dayMonthStart");function ui(e,t=0){let n=Pe(e);return Me(n+t,1,1)}r(ui,"dayYearStart");function ci(e,t){return an(De(e)+t*864e5)}r(ci,"dayOffset");function li(e,t){return Math.round((De(t)-De(e))/864e5)}r(li,"dayDiff");var{warn:at}=v("zeed:promise");function ut(){let e,t;return[new Promise((o,i)=>{e=o,t=i}),e,t]}r(ut,"createPromise");async function gi(e){return new Promise(t=>setTimeout(t,e))}r(gi,"sleep");async function mi(){return new Promise(e=>setTimeout(e,0))}r(mi,"immediate");var ct=Symbol("timeout");async function yi(e,t,n=ct){return new Promise(async(o,i)=>{let s=!1,u=setTimeout(()=>{s=!0,o(n)},t);try{let a=await e;clearTimeout(u),s||o(a)}catch(a){clearTimeout(u),s||i(a)}})}r(yi,"timeout");var lt=new Error("Timeout reached");function hi(e){return e===ct||e===lt}r(hi,"isTimeout");async function ft(e,t){return t<=0?await e:new Promise(async(n,o)=>{let i=!1,s=setTimeout(()=>{i=!0,o(lt)},t);try{let u=await e;clearTimeout(s),i||n(u)}catch(u){clearTimeout(s),i||o(u)}})}r(ft,"tryTimeout");function xi(e,t,n=1e3){return new Promise((o,i)=>{let s=r(l=>{a&&(clearTimeout(a),u(),o(l))},"fn"),u=r(()=>{a=null,e.off?e.off(t,s):e.removeEventListener?e.removeEventListener(t,s):at("No remove listener method found for",e,t)},"done"),a=setTimeout(()=>{u(),i(new Error("Did not response in time"))},n);e.on?e.on(t,s):e.addEventListener?e.addEventListener(t,s):at("No listener method found for",e)})}r(xi,"waitOn");function U(e){return Boolean(e&&(e instanceof Promise||typeof e.then=="function"))}r(U,"isPromise");function H(e){return Promise.resolve(e)}r(H,"promisify");var L=class{get value(){return this.days}constructor(t){var n;if(typeof t=="number"){this.days=t;return}if(t!=null&&(t=(n=L.from(t))==null?void 0:n.days),t==null){let o=new Date;this.days=o.getFullYear()*1e4+(o.getMonth()+1)*100+o.getDate()}else this.days=t}static fromNumber(t){return new L(t)}static fromString(t){return L.from(+t.replace(/[^0-9]/g,"").slice(0,8))}static fromDate(t,n=!1){return n?L.fromString(t.toISOString().substr(0,10)):L.from(t.getFullYear()*1e4+(t.getMonth()+1)*100+t.getDate())}static fromDateGMT(t){return L.fromDate(t,!0)}static from(t,n=!1){if(typeof t=="number")return t<100?void 0:new L(t);if(typeof t=="string")return L.fromString(t);if(Array.isArray(t)&&t.length===3){let[o,i=1,s=1]=t;return i<1||i>12||s<1||s>31?void 0:new L(o*1e4+i*100+s)}else{if(t instanceof Date)return L.fromDate(t,n);if(t instanceof L)return t}}toNumber(){return this.days}toJson(){return this.days}toString(t="-"){let n=String(this.days);return n.slice(0,4)+t+n.slice(4,6)+t+n.slice(6,8)}toDate(t=!1){return t?new Date(`${this.toString()}T00:00:00.000Z`):new Date(this.days/1e4,this.days/100%100-1,this.days%100)}toDateGMT(){return this.toDate(!0)}get year(){return Math.floor(this.days/1e4)}get month(){return Math.floor(this.days/100%100)}get day(){return Math.floor(this.days%100)}dayOffset(t){return L.fromDateGMT(new Date(this.toDateGMT().getTime()+t*864e5))}monthStart(){return L.from([this.year,this.month,1])}yearStart(){return L.from([this.year,1,1])}monthOffset(t){let n=this.month+t,o=Math.floor((n-1)%12)+1;o===0&&(o=12);let i=Math.floor((n-1)/12);return L.from([this.year+i,o,this.day])}daysUntil(t){var n;return Math.round((((n=new L(t))==null?void 0:n.toDateGMT().getTime())-this.toDateGMT().getTime())/864e5)}yesterday(){return this.dayOffset(-1)}tomorrow(){return this.dayOffset(1)}};r(L,"Day");async function Ai(e,t,n){let o=L.from(e),i=L.from(t);for(;o&&i&&(o==null?void 0:o.days)<=(i==null?void 0:i.days);){let s=n(o);U(s)&&await s,o=o.dayOffset(1)}}r(Ai,"forEachDay");function vi(){return new L}r(vi,"today");function Di(e){return new L(e)}r(Di,"day");function Ei(e){return L.fromDate(new Date(e)).days}r(Ei,"dateStringToDays");function cn(e,t=2){return+(+e).toFixed(t)}r(cn,"decimal");function Ui(e,t=2){return+(+e/10**t).toFixed(t)}r(Ui,"decimalFromCents");function Si(e,t=2){return Math.round(+e*10**t)}r(Si,"decimalToCents");function Ri(e,t=2){return t*(cn(e,t)%1)}r(Ri,"decimalCentsPart");var pt=r(e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&apos;").replace(/"/g,"&quot;"),"escapeHTML"),Ii=r(e=>e.replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&apos;/gi,"'").replace(/&amp;/gi,"&"),"unescapeHTML");function Bi(e,t){return k(e)?Object.fromEntries(Object.entries(e).map(([n,o])=>{let i=t(n,o);return O(i)&&i.length===2?i:[n,i]}).filter(n=>n!=null)):{}}r(Bi,"objectMap");function Hi(e,t){return t.dispose&&e.dispose&&t.dispose.add(e.dispose),Object.assign(e,t)}r(Hi,"objectMergeDisposable");function ji(e){return Object.keys(e).length<=0}r(ji,"objectIsEmpty");var dt=/[\u0000-\u001F\u0080-\u009F]/g,ln=/^\.+/,fn=/\.+$/;function gt(){return/[<>:"/\\|?*\u0000-\u001F]/g}r(gt,"filenameReservedRegex");function pn(){return/^(con|prn|aux|nul|com\d|lpt\d)$/i}r(pn,"windowsReservedNameRegex");function qi(e,t="_"){if(typeof e!="string")throw new TypeError("Expected a string");if(gt().test(t)&&dt.test(t))throw new Error("Replacement string cannot contain reserved filename characters");return e=e.replace(gt(),t).replace(dt,t).replace(ln,t).replace(fn,""),e=pn().test(e)?e+t:e,e.slice(0,100)}r(qi,"toValidFilename");var dn=/[\\\-\[\]\/{}()*+?.^$|]/g;function _i(e){return e?e instanceof RegExp?e.source:e.replace(dn,"\\$&"):""}r(_i,"escapeRegExp");var X=r(e=>Math.abs(e)%1===.5,"isHalf"),mt=r(e=>e%2===0,"isEven"),Wi=r(e=>Math.ceil(e),"roundUp"),Ki=r(e=>Math.floor(e),"roundDown"),Yi=r(e=>Math.round(e),"roundHalfUp"),Qi=r(e=>{let t=Math.round(e);return X(e)&&mt(t)?t-1:t},"roundHalfOdd"),Xi=r(e=>X(e)?Math.sign(e)*Math.ceil(Math.abs(e)):Math.round(e),"roundHalfAwayFromZero"),es=r(e=>X(e)?Math.floor(e):Math.round(e),"roundHalfDown"),ts=r(e=>{let t=Math.round(e);return X(e)?mt(t)?t:t-1:t},"roundHalfEven"),ns=r(e=>X(e)?Math.sign(e)*Math.floor(Math.abs(e)):Math.round(e),"roundHalfTowardsZero");function yt(e){return e.reduce((t,n)=>Math.min(t,n.sort_weight||0),0)-1-P()}r(yt,"startSortWeight");function ht(e){return e.reduce((t,n)=>Math.max(t,n.sort_weight||0),0)+1+P()}r(ht,"endSortWeight");function ss(e,t,n){let o=n.length,i=e<t;if(o<=0||e>=o-1)return ht(n);if(e<=0)return yt(n);n=gn([...n]);let s=i?-1:0,u=n[e+s].sort_weight||0,l=(n[e+s+1].sort_weight||0)-u;if(l===0)return i?yt(n):ht(n);let c=u+l/2,g=l*.01*(P()-.5);return c+g}r(ss,"moveSortWeight");function gn(e){return e.sort((t,n)=>(t.sort_weight||0)-(n.sort_weight||0)),e}r(gn,"sortedItems");function ls(e={}){let{getter:t=r(a=>a.sort,"getter")}=e;function n(a){return a.sort((l,c)=>(t(l)||0)-(t(c)||0)),a}r(n,"items");function o(a){return a.reduce((l,c)=>Math.min(l,t(c)||0),0)-1-P()}r(o,"start");function i(a){return a.reduce((l,c)=>Math.max(l,t(c)||0),0)+1+P()}r(i,"end");function s(a,l){a==null&&(a=(l??0)-1),l==null&&(l=(a??0)+1);let c=l-a,g=a+c/2,f=c*.01*(P()-.5);return g+f}r(s,"between");function u(a,l,c){let g=c.length,f=a<l;if(g<=0||a>=g-1)return i(c);if(a<=0)return o(c);c=n([...c]);let x=f?-1:0,p=t(c[a+x])||0,m=(t(c[a+x+1])||0)-p;if(m===0)return f?o(c):i(c);let d=p+m/2,y=m*.01*(P()-.5);return d+y}return r(u,"move"),{start:o,end:i,between:s,move:u,items:n}}r(ls,"useSorted");var mn=/((?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00A1-\uFFFF][a-z0-9\u00A1-\uFFFF_-]{0,62})?[a-z0-9\u00A1-\uFFFF]\.)+(?:[a-z\u00A1-\uFFFF]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?)/gim;function gs(e){return e.split(mn).map((t,n)=>{let o=pt(t);return n%2?`<a target="_blank" href="${o}">${yn(o)}</a>`:o}).join("")}r(gs,"linkifyPlainText");function yn(e){return e.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")}r(yn,"toHumanReadableUrl");function xt(e){let t=[];for(let[n,o]of Object.entries(e))if(o!=null){Array.isArray(o)||(o=[o]);for(let i of o)i!=null&&t.push(`${encodeURIComponent(n)}=${encodeURIComponent(String(i))}`)}return t.join("&")}r(xt,"encodeQuery");function ms(e){let t={},n=(e[0]==="?"?e.substr(1):e).split("&");for(let o=0;o<n.length;o++){let i=n[o].split("="),s=decodeURIComponent(i[0]),u=decodeURIComponent(i[1]||"");t[s]!=null?(Array.isArray(t[s])||(t[s]=[t[s]]),t[s].push(u)):t[s]=u}return t}r(ms,"parseQuery");function bs(e,t,n){let o=e[t];return o===void 0&&(o=n(t,e),e[t]=o),o}r(bs,"ensureKey");async function Ts(e,t,n){let o=e[t];return o===void 0&&(o=await n(t,e),e[t]=o),o}r(Ts,"ensureKeyAsync");function ws(e){return e!=null?e.size!=null?e.size:e.length!=null?e.length:Object.keys(e).length:0}r(ws,"size");function Ls(e){return e!=null&&e.length>0?e[e.length-1]:void 0}r(Ls,"last");function As(e){try{if(e!=null)return Array.isArray(e)||typeof e=="string"?e.length<=0:(e==null?void 0:e.size)!=null?e.size<=0:Object.keys(e).length<=0}catch(t){console.warn("Failed to check if empty for",e,t)}return!0}r(As,"empty");function Ue(e){return Object(e)!==e?e:JSON.parse(F(e))}r(Ue,"cloneObject");function vs(e){return Object(e)!==e?e:JSON.parse(F(e))}r(vs,"cloneJsonObject");function Ds(e){let t=new Map;return n=>{if(t.has(n))return t.get(n);let o=e(n);return t.set(n,o),o}}r(Ds,"memoize");function Es(e){let t=new Map;return async(...n)=>{let o=F(n);if(t.has(o))return t.get(o);let i=await e(...n);return t.set(o,i),i}}r(Es,"memoizeAsync");function Ps(e,t){let n=[];for(let o=0;o<e;o++)n.push(t(o,e));return n}r(Ps,"forTimes");var hn=/\\\s|\s+|#[^\n]*\n?/gm,xn=/\(\?P?<(\w[\w\d_]+)>|\((?!\?(:|\!|=|<=|<\!))/gm,bt=/^((?:\(\?[\w$]+\))?)\(\?<([=!])([\s\S]*?)\)/gm,bn=v("zeed:xrx");function Tn(e){return typeof e=="string"?e:e.source||""}r(Tn,"regExpString");function Rs(e){return e.replace(/[-\[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}r(Rs,"regExpEscape");var Se=class{constructor(t,n){this.namedGroups={};this.names=[];let o=n??"",i;if(t instanceof RegExp?(n==null&&(o=t.flags),i=t.source):i=t,o&&o.includes("x")&&(o=o.replace("x",""),i=i.replace(hn,a=>a[0]==="\\"?a:"")),!(t instanceof RegExp)){let a=0;i=i.replace(xn,(l,c)=>(a+=1,c?(c!=="index"&&c!=="length"&&!this.namedGroups[c]?this.namedGroups[c]=a:bn.error(`Unallowed or duplicate group name: ${c}`),"("):l)),this.names=Object.keys(this.namedGroups)}i=Tn(i),bt.lastIndex=0;let u=bt.exec(i);u&&(this.lookBehind={rx:new RegExp(`${u[3]}$(?!\\s)`),expect:u?u[2]==="=":!u},i=i.substr(u[0].length)),this.rx=new RegExp(i,o)}get lastIndex(){return this.rx.lastIndex}set lastIndex(t){this.rx.lastIndex=t}_handleMatch(t){if(this.lookBehind){let n=t.input.slice(0,t.index);if(this.lookBehind.expect!==this.lookBehind.rx.test(n))return null}for(let n of this.names)t[n]=t[this.namedGroups[n]];return t}exec(t){let n;for(;n=this.rx.exec(t);)if(this.rx.lastIndex===n.index&&this.rx.lastIndex++,n=this._handleMatch(n),n!=null)return n}execAll(t){let n=[],o;for(this.rx.lastIndex=0;o=this.exec(t);)n.push(o);return this.rx.lastIndex=0,n}replace(t,n){let o=typeof n=="function"?n:()=>n;return t.replace(this.rx,i=>o(i))}};r(Se,"XRX");var wn=v("zeed:dispose");async function Ln(e){typeof e=="function"?await H(e()):U(e)?await e:typeof e.dispose=="function"?await H(e.dispose()):U(e.dispose)?await e.dispose:typeof e.cleanup=="function"?await H(e.cleanup()):U(e.cleanup)&&await e.cleanup}r(Ln,"callDisposer");function Re(e){let{name:t}=typeof e=="string"?{name:e}:e??{},n=[],o=r(async u=>{u!=null&&n.includes(u)&&(Ae(n,a=>a!==u),await Ln(u))},"untrack"),i=r(async()=>{for(t&&wn.debug(`dispose ${t}: ${n.length} entries`);n.length>0;)await o(n[0])},"dispose"),s=r(u=>{if(u!=null)return n.unshift(u),()=>o(u)},"track");return Object.assign(i,{track:s,add:s,untrack:o,dispose:i,exec:i,getSize(){return n.length}})}r(Re,"useDispose");var $s=Re;function Bs(e={}){let{mode:t="fifo"}=e,n=[],o=r(async(s=!1)=>{for(;n.length>0;){let u=n[0];if(Ae(n,a=>a!==u),typeof u=="function"){let a=u();if(U(a)){if(s)throw new Error(`Expected sync only function, but found async: ${u}`);await a}}else if(U(u)){if(s)throw new Error(`Expected sync only function, but found async: ${u}`);await u}else throw new Error(`Unhandled disposable: ${u}`)}},"exec");return Object.assign(o,{add:r(s=>{t==="lifo"?n.unshift(s):n.push(s)},"add"),exec:o,getSize(){return n.length}})}r(Bs,"useDefer");function Hs(e,t=0){let n=setTimeout(e,t);return()=>{n&&(clearTimeout(n),n=void 0)}}r(Hs,"useTimeout");function js(e,t){let n=setInterval(e,t);return()=>{n&&(clearInterval(n),n=void 0)}}r(js,"useInterval");function zs(e,t,n,...o){return e==null?()=>{}:(e.on?e.on(t,n,...o):e.addEventListener&&e.addEventListener(t,n,...o),()=>{e.off?e.off(t,n,...o):e.removeEventListener&&e.removeEventListener(t,n,...o)})}r(zs,"useEventListener");function Vs(){let e=!0;return(t,n)=>{let o=!1;if(e){e=!1;try{t(),o=!0}finally{e=!0}}else n!==void 0&&n();return o}}r(Vs,"useMutex");function _s(){let e=!0;return async(t,n)=>{let o=!1;if(e){e=!1;try{let i=t();U(i)&&await i,o=!0}finally{e=!0}}else if(n!==void 0){let i=n();U(i)&&await i}return o}}r(_s,"useAsyncMutex");var J=v("zeed:emitter"),S=class{constructor(){this.subscribers={};this.subscribersOnAny=[];this.dispose=Re();this.call=new Proxy({},{get:(t,n)=>(...o)=>this.emit(n,...o)})}async emit(t,...n){let o=!1;this.dispose.add(()=>{this.subscribers={},this.subscribersOnAny=[]});try{let i=this.subscribers[t]||[];if(this.subscribersOnAny.forEach(s=>s(t,...n)),i.length>0){let s=i.map(u=>{try{return H(u(...n))}catch(a){J.warn("emit warning:",a)}return null}).filter(u=>u!=null);o=!0,await Promise.all(s)}}catch(i){J.error("emit exception",i)}return o}onAny(t){this.subscribersOnAny.push(t)}on(t,n){let o=this.subscribers[t]||[];return o.push(n),this.subscribers[t]=o,()=>{this.off(t,n)}}onCall(t){for(let[n,o]of Object.entries(t))this.on(n,o)}once(t,n){let o=r(async(...i)=>(this.off(t,o),await H(n(...i))),"onceListener");return this.on(t,o),()=>{this.off(t,n)}}off(t,n){return this.subscribers[t]=(this.subscribers[t]||[]).filter(o=>n&&o!==n),this}removeAllListeners(){return this.subscribers={},this}};r(S,"Emitter");function ea(){let e=Y().emitter;return e||(e=new S,Y().emitter=e),e}r(ea,"getGlobalEmitter");var ta=new S;function na(e,t){let n=Math.round(P()*100),o=[],i,s=r((a,l)=>{let c={key:a,obj:l};o.push(c),i&&i()},"incoming");return t?e.on?e.on(t,a=>{s(t,a)}):e.addEventListener?e.addEventListener(t,a=>{s(t,a)}):J.error(n,"Cannot listen to key"):e.onAny?e.onAny((a,l)=>{s(a,l)}):J.error(n,"cannot listen to all for",e),r((a,l=!0)=>new Promise((c,g)=>{a||(a=t,a||o.length&&(a=o[0].key)),i=r(()=>{for(;o.length>0;){let f=o.shift();if(f.key===a)i=void 0,c(f.obj);else{if(l){J.warn(n,`Unhandled event ${a} with value: ${f.obj}`);continue}g(new Error(`Expected ${a}, but found ${f.key} with value=${f.obj}`)),J.error(n,`Unhandled event ${a} with value: ${f.obj}`)}break}},"lazyResolve"),i()}),"on")}r(na,"lazyListener");var Tt=r(()=>Date.now(),"getTimestamp");function ia(e){return e>999?`${(e/1e3).toFixed(1)}s`:`${e.toFixed(2)}ms`}r(ia,"formatMilliseconds");function sa(...e){for(let t of e){if(t instanceof Date)return t;if(typeof t=="string"){let n=null;if(t.includes(":"))try{n=new Date(t)}catch{}if(!(n instanceof Date)){let o=/(\d\d\d\d)-(\d\d)-(\d\d)/.exec(t);o&&(n=new Date(+o[1],+o[2]-1,+o[3],12,0))}if(n instanceof Date)return n}}}r(sa,"parseDate");var{encode:wt,decode:An}=B(62),{encode:Lt,decode:vn}=B(32);function Fe(){return V(16)}r(Fe,"uuidBytes");function Dn(e=Fe()){return wt(e,22)}r(Dn,"uuidB62");function En(e){return wt(e,22)}r(En,"uuidEncodeB62");function Pn(e){return An(e,16)}r(Pn,"uuidDecodeB62");function Mn(e=Fe()){return Lt(e,26)}r(Mn,"uuidB32");function Un(e){return Lt(e,26)}r(Un,"uuidEncodeB32");function Sn(e){return vn(e,16)}r(Sn,"uuidDecodeB32");var Rn="10000000-1000-4000-8000-100000000000",kn=typeof crypto<"u"&&crypto.randomUUID!=null?crypto.randomUUID.bind(crypto):()=>Rn.replace(/[018]/g,e=>(e^V(1)[0]&15>>e/4).toString(16));function Fn(e){let t=_e(e);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16)}`}r(Fn,"uuidEncodeV4");function In(e){return Je(e.replaceAll("-",""))}r(In,"uuidDecodeV4");var At=16e11;function Cn(e){let t=new Uint8Array([0,0,0,0,0,0]),n=t.length-1;for(let o=0;o<t.length;o++){let i=e&255;t[n-o]=i,e=(e-i)/256}return t}r(Cn,"longToByteArray");function vt(){let e=Tt()-At;return new Uint8Array([...Cn(e),...V(10)])}r(vt,"suidBytes");function $a(){return Bn(vt())}r($a,"suid");function Ba(e){return On($n(e))}r(Ba,"suidDate");function On(e){return new Date(At+e.slice(0,6).reduce((t,n)=>t*256+n,0))}r(On,"suidBytesDate");var Ha=r(()=>new Uint32Array(V(4))[0],"uuid32bit"),Ie={base62:{uuid:Dn,uuidDecode:Pn,uuidEncode:En},base32:{uuid:Mn,uuidDecode:Sn,uuidEncode:Un},uuidv4:{uuid:kn,uuidDecode:In,uuidEncode:Fn}},le="base62",Dt=!1;function ja(e,t=!1){le=e,Dt=t}r(ja,"setUuidDefaultEncoding");function j(){return Ie[le].uuid(Dt?vt():Fe())}r(j,"uuid");function $n(e){return Ie[le].uuidDecode(e)}r($n,"uuidDecode");function Bn(e){return Ie[le].uuidEncode(e)}r(Bn,"uuidEncode");var ke={};function z(e="id"){return ke[e]==null&&(ke[e]=0),`${e}-${ke[e]++}`}r(z,"uname");var Hn=0;function za(){return`id-${Hn++}`}r(za,"qid");var jn=(o=>(o[o.waiting=0]="waiting",o[o.running=1]="running",o[o.finished=2]="finished",o))(jn||{}),zn=(o=>(o[o.replace=0]="replace",o[o.memoize=1]="memoize",o[o.error=2]="error",o))(zn||{});function Ja(e={}){let{maxParallel:t=3}=e,n=new S,o=0,i=0,s=0,u=0,a={};async function l(){if(o>0){let[m,d]=ut();return n.once("didFinish",d),m}}r(l,"waitFinishAll");function c(){n.emit("didFinish"),o=0,i=0}r(c,"didFinish");function g(){let m=0,d=0;for(let{max:y,resolved:T,state:b}of Object.values(a))m+=y,d+=b===2?y:Math.min(y,T);n.emit("didUpdate",o,i,m,d)}r(g,"didUpdate");function f(){if(g(),o>0&&o===i&&c(),s>=t)return;let m=Object.values(a).filter(d=>d.state===0);if(m.length>0){let d;for(let y of m)y.group!=null&&Object.values(a).some(T=>T.state===1&&T.id!==y.id&&T.group===y.group)||(d==null||y.priority<d.priority)&&(d=y);if(d!=null){let y=d.id,T=d.done;d.state=1,++s,n.emit("didStart",y);let b=r(w=>{d&&(d.result=w,d.state=2,d.resolved=d.max),--s,++i,f()},"taskFinished");d.task(d).then(w=>{T(w),n.emit("didResolve",y,w),b(w)}).catch(w=>{T(),n.emit("didReject",y,w),b()})}}}r(f,"performNext");function x(m){let d=a[m];d&&d.state===0&&(a[m].state=2,++i,n.emit("didCancel",m),g())}r(x,"cancel");function p(){Object.keys(a).forEach(x)}r(p,"cancelAll");function h(m,d={}){let y,T=new Promise(w=>y=w),b=d.id??j();if(a[b]!=null){let w=d.idConflictResolution??1;if(w===0)x(b);else if(w===1){let D=a[b];return{id:b,promise:(async()=>{if(D.state===2)return a[b].result})(),dispose:()=>x(b),cancel:()=>x(b)}}else throw new Error(`Pool task with id=${b} already exists!`)}return a[b]={id:b,task:m,priority:++u,group:d.group,state:0,max:d.max??1,resolved:d.resolved??0,done:y,payload:d.payload,setMax(w){a[b].max=w,g()},setResolved(w){a[b].resolved=w,g()},incResolved(w=1){a[b].resolved+=w,g()}},++o,f(),{id:b,promise:T,dispose:()=>x(b),cancel:()=>x(b)}}return r(h,"enqueue"),{events:n,cancel:x,cancelAll:p,enqueue:h,dispose:p,waitFinishAll:l}}r(Ja,"usePool");var Ce=class extends S{constructor(n={}){super();this.queue=[];this.waitToFinish=[];this.countMax=0;this.countResolved=0;this.paused=!1;let{name:o=z("queue"),logLevel:i}=n;this.name=o,this.log=v(`zeed:queue:${o}`,i??1/0)}async performNext(){if(this.log("performNext, queue.length =",this.queue.length),this.currentTask!=null){this.log("performNext => skip while another task is running");return}if(this.paused){this.log("performNext => skip while is paused");return}for(;this.currentTask==null&&!this.paused;){let n=this.queue.shift();if(this.log(`performNext => ${n==null?void 0:n.name}`),n==null)break;this.countResolved===0&&this.emit("didStart",this.countMax);let{name:o,task:i,resolve:s}=n;this.currentTask=i();let u;try{this.log.info(`start task ${o}`),u=await this.currentTask,this.log(`finished task ${o} with result =`,u)}catch(a){this.log.warn("Error performing task",a)}s(u),this.currentTask=void 0,this.countResolved+=1,this.emit("didUpdate",this.countMax,this.countResolved)}for(this.queue.length===0&&(this.emit("didFinish"),this.countMax=0,this.countResolved=0);this.waitToFinish.length>0;)this.waitToFinish.shift()()}async enqueue(n,o={}){let{immediate:i=!1,name:s=z(this.name)}=o;return i?(this.log.info(`immediate execution ${s}`),await n()):(this.log(`enqueue ${s}`),new Promise(u=>{this.queue.push({name:s,task:n,resolve:u}),this.countMax+=1,this.emit("didUpdate",this.countMax,this.countResolved),this.performNext()}))}async enqueueReentrant(n,o={}){return this.enqueue(n,{immediate:this.currentTask!=null,name:o.name})}async cancelAll(n=!0){this.log("cancelAll"),this.emit("didCancel");let o=this.queue.map(i=>i.resolve);this.queue=[],o.forEach(i=>i(void 0)),await this.wait()}async pause(){this.log("pause"),this.paused=!0,await this.wait()}resume(){this.log("resume"),this.paused=!1,this.performNext()}async wait(){if(this.log("wait"),!(this.currentTask==null&&(this.queue.length===0||this.paused)))return new Promise(n=>{this.waitToFinish.push(n)})}get isPaused(){return this.paused}get hasTasks(){return this.queue.length!==0}};r(Ce,"SerialQueue");var W=!1,Z=W?v("zeed:throttle"):()=>{};function ru(e,t={}){let{delay:n=100,trailing:o=!0,leading:i=!0}=t,s=0,u=0,a=0,l,c=Date.now();function g(){s&&(clearTimeout(s),s=void 0)}r(g,"clearExistingTimeout");function f(...x){let p=Date.now(),h=p-u;function m(){let y=Date.now();return`total ${(y-c).toFixed(1)}ms - elapsed ${(y-u).toFixed(1)}ms - visited ${a}x`}r(m,"debugElapsed");let d=r(()=>{a=0,u=Date.now(),e.apply(this,x)},"exec");if(l=d,h>n||!s){W&&Z("elapsed",m()),i&&(h>n?(W&&Z("\u{1F680} leading",m()),d()):++a);let y=h>n?n:n-h;Z(`\u23F1 start timeout with ${y.toFixed(1)}ms`,m()),g(),u=p,s=setTimeout(()=>{W&&Z("\u23F1 reached timeout",m()),s=0,o&&(!i||a>0)&&(W&&Z("\u{1F680} trailing",m()),l==null||l())},y)}else++a,W&&Z("visited",m())}return r(f,"wrapper"),f.cancel=g,f.dispose=g,f}r(ru,"throttle");function ou(e,t={}){let{delay:n=100}=t,o=0;function i(){o&&(clearTimeout(o),o=0)}r(i,"clearExistingTimeout");function s(...u){i(),o=setTimeout(()=>{o=0,e.apply(this,u)},n)}return r(s,"wrapper"),s.cancel=i,s.dispose=i,s}r(ou,"debounce");function au(e=(t=>(t=globalThis==null?void 0:globalThis.location)==null?void 0:t.hostname)()??""){return["::ffff:127.0.0.1","localhost","127.0.0.1","","::1","::"].includes(e)||e.startsWith("192.168.")||e.startsWith("10.0.")||e.endsWith(".local")}r(au,"isLocalHost");function fu(e){let{level:t=void 0,filter:n=void 0,messages:o=[]}=e,i=G(n),s=oe(t);return u=>{!s(u.level)||!i(u.name)||o.push(u)}}r(fu,"LoggerMemoryHandler");var fe=class extends S{constructor(){super(...arguments);this.id=j()}close(){this.dispose()}};r(fe,"Channel");var ee=class extends fe{constructor(){super(...arguments);this.isConnected=!0}postMessage(n){var o;(o=this.other)==null||o.emit("message",{data:n,origin:"local",lastEventId:j()})}};r(ee,"LocalChannel");function yu(){let e=new ee,t=new ee;return e.other=t,t.other=e,[e,t]}r(yu,"createLocalChannelPair");var Oe=class{async encode(t){return t}async decode(t){return t}};r(Oe,"NoopEncoder");var N=class{async encode(t){return he(t)}async decode(t){return xe(t)}};r(N,"JsonEncoder");var $e=class{constructor(t){this.key=t}async encode(t){let n=he(t);return await Xe(n,this.key)}async decode(t){let n=await et(t,this.key);return xe(n)}};r($e,"CryptoEncoder");var Et=r((e,t,n={})=>new Proxy(n,{get:(o,i)=>i in o?o[i]:(...s)=>e(i,s,t)}),"createPromiseProxy");function Mu(e={}){let{name:t=z("hub"),encoder:n=new N,retryAfter:o=1e3,ignoreUnhandled:i=!0,logLevel:s=!1}=e,u=v(t,s),a={},l,c=[],g,f={},x=r(()=>{clearTimeout(g)},"dispose"),p=r(async()=>{if(clearTimeout(g),l){if(l.isConnected)for(;c.length;){let y=c[0];try{l.postMessage(await n.encode(y)),c.shift()}catch(T){u.warn("postMessage",T);break}}c.length>0&&o>0&&(g=setTimeout(p,o))}},"postNext"),h=r(async y=>{u("enqueue postMessage",y),c.push(y),await p()},"postMessage"),m=r(async y=>{l=y,l.on("connect",p),l.on("message",async T=>{u("onmessage",typeof T);let{name:b,args:w,id:D,result:q,error:I}=await n.decode(T.data);if(b){u(`name ${b} id ${D}`);try{if(a[b]==null)throw new Error(`handler for ${b} was not found`);let R=a[b](...w);U(R)&&(R=await R),u(`result ${R}`),D&&h({id:D,result:R})}catch(R){let C=R instanceof Error?R:new Error(ve(R));u.warn("execution error",C.name),h({id:D,error:{message:C.message,stack:C.stack,name:C.name}})}}else if(D)if(u(`response for id=${D}: result=${q}, error=${I}`),f[D]==null)q===void 0?u(`skip response for ${D}`):u.warn(`no response hook for ${D}`);else{let[R,C]=f[D];if(R&&C)if(delete f[D],I){let te=new Error(I.message);te.stack=I.stack,te.name=I.name,u.warn("reject",te.name),C(te)}else u("resolve",q),R(q)}else i||u.warn("Unhandled message",T)}),p()},"connect"),d=r(async(y,T,b={})=>{let{timeout:w=5e3}=b,D=j();return h({name:y,args:T,id:D}),ft(new Promise((q,I)=>f[D]=[q,I]),w)},"fetchMessage");return e.channel&&m(e.channel),{dispose:x,connect:m,listen(y){Object.assign(a,y)},send(){return Et(d,{},{options(y){return Et(d,{...y})}})}}}r(Mu,"useMessageHub");var pe=class extends S{constructor(n){super();this.publish=this.emit;this.subscribe=this.on;let{name:o,encoder:i=new N,channel:s,debug:u=!1}=n;this.channel=s,this.encoder=i,this.debug=u,this.name=o??this.channel.id??z("pubsub"),this.log=v(`${this.shortId}`),this.debug&&(this.channel.on("connect",()=>{this.log("channel connected")}),this.channel.on("disconnect",()=>{this.log("channel disconnected")})),this.channel.on("message",async({data:a})=>{let l=await this.encoder.decode(a);if(this.debug?this.log(`channel message, event=${l==null?void 0:l.event}, info=`,l):this.log(`channel message, event=${l==null?void 0:l.event}`),l){let{event:c,args:g}=l;await this.emitSuper(c,...g)}})}get shortId(){return this.name.substr(0,6)}async emitSuper(n,...o){return await super.emit(n,...o)}async emit(n,...o){try{if(this.debug?this.log(`emit(${String(n)})`,n):this.log(`emit(${String(n)})`,o.length),!this.channel.isConnected)return this.log.warn("channel not connected"),!1;let i=await this.encoder.encode({event:n,args:o});return this.channel.postMessage(i),!0}catch(i){this.log.warn(`emit(${String(n)})`,i)}return!1}};r(pe,"PubSub");function Cu(e){return new pe(e)}r(Cu,"usePubSub");var Nn=1;var Pt=r(e=>e,"defaultSerialize"),qn=Pt;function Bu(e,t){let{post:n,on:o,eventNames:i=[],serialize:s=Pt,deserialize:u=qn}=t,a=new Map;return o(async l=>{let c=u(l),[g,f,x,p]=c;if(g===1||g===2){let h,m;if(p!=null)try{h=await e[p](...f)}catch(d){m=String(d)}else m="Method implementation missing";g===1&&x&&n(s(m?[4,m,x]:[3,h,x]))}else if(x){let h=a.get(x);h!=null&&(g===4?h.reject(f):h.resolve(f)),a.delete(x)}}),new Proxy({},{get(l,c){let g=r((...x)=>{n(s([2,x,null,c]))},"sendEvent");if(t.onlyEvents||i.includes(c))return g.asEvent=g,g;let f=r((...x)=>new Promise((p,h)=>{let m=Nn++;a.set(m,{resolve:p,reject:h}),n(s([1,x,m,c]))}),"sendCall");return f.asEvent=g,f}})}r(Bu,"useRPC");var K=v("zeed:network"),Be={cache:"no-cache",redirect:"follow",headers:{}};function Gn(e){let t=/:\/\/([^@]*)@/gi.exec(e);if(t&&t[1]){let[n,o]=t[1].split(":",2);return{url:e.replace(`${t[1]}@`,""),username:n,password:o}}}r(Gn,"parseBasicAuth");async function Mt(e,t={},n=fetch){try{O(t)&&(t=re({},..._(t)));let o=Gn(String(e));o&&(e=o.url,t=re({},t,Vn(o.username,o.password))),t.headers!=null&&!(t.headers instanceof Headers)&&(t.headers=new Headers(t.headers));let i=await n(String(e),t);if(i.status<400)return i;try{K.warn(`Fetch of ${e} with ${t} returned status=${i.status}`),K.warn(`Response: ${await i.text()}`)}catch(s){K.error("Exception:",s)}}catch(o){K.error("fetchBasic",o)}}r(Mt,"fetchBasic");async function Gu(e,t={},n=fetch){try{let o=await Mt(e,[{method:"GET",headers:{Accept:"application/json"}},t],n);if(o)return await o.json()}catch(o){K.error("fetchJSON error:",o)}}r(Gu,"fetchJson");async function Vu(e,t={},n=fetch){try{let o=await Mt(e,[Be,{method:"GET"},t],n);if(o)return await o.text()}catch(o){K.error("fetchHTML error:",o)}}r(Vu,"fetchText");function _u(e,t="POST"){return{method:t,...Be,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:xt(e)}}r(_u,"fetchOptionsFormURLEncoded");function Ju(e,t="POST"){return{method:t,...Be,headers:{"Content-Type":"application/json; charset=utf-8"},body:F(e)}}r(Ju,"fetchOptionsJson");function Vn(e,t){return{headers:{Authorization:`Basic ${Ze(`${e}:${t}`)}`}}}r(Vn,"fetchOptionsBasicAuth");function Ut(){if(typeof window<"u")return window}r(Ut,"getWindow");function _n(){if(typeof navigator<"u")return navigator}r(_n,"getNavigator");function Ku(){return Ut()??typeof WorkerGlobalScope<"u"?self:typeof global<"u"?global:Function("return this;")()}r(Ku,"getGlobal");var A=_n(),E=Ut();function Jn(e={ios:!1,macos:!1,windows:!1,beaker:!1,electron:!1,wkwebview:!1,pwa:!1,pwaInstalled:!1,browser:!1,node:!1,worker:!1,test:!1,jest:!1,macosNative:!1,iosNative:!1,appleNative:!1,touch:!1}){var t,n,o,i,s,u,a,l,c;return e.ios=((t=A==null?void 0:A.platform)==null?void 0:t.match(/(iPhone|iPod|iPad)/i))!=null,e.macos=!!((n=A==null?void 0:A.platform)!=null&&n.startsWith("Mac")),e.windows=!!((o=A==null?void 0:A.platform)!=null&&o.startsWith("Win")),e.beaker=(E==null?void 0:E.beaker)!=null,e.electron=(((s=(i=A==null?void 0:A.userAgent)==null?void 0:i.toLowerCase())==null?void 0:s.indexOf(" electron/"))||-1)>-1&&!e.beaker,e.wkwebview=((u=E==null?void 0:E.webkit)==null?void 0:u.messageHandlers)!=null,e.pwa=(A==null?void 0:A.serviceWorker)!=null,e.pwaInstalled=(A==null?void 0:A.standalone)||((l=(a=E==null?void 0:E.matchMedia)==null?void 0:a.call(E,"(display-mode: standalone)"))==null?void 0:l.matches),e.node=typeof process<"u"&&((c=process==null?void 0:process.release)==null?void 0:c.name)==="node",e.browser=!e.electron&&!e.wkwebview&&!e.node,e.worker=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,e.jest=typeof jest<"u"||typeof vitest<"u",e.test=e.jest,e.macosNative=e.wkwebview&&e.macos,e.iosNative=e.wkwebview&&e.ios,e.appleNative=e.wkwebview,e.touch=E&&"ontouchstart"in E||((A==null?void 0:A.maxTouchPoints)||0)>1||(A==null?void 0:A.msPointerEnabled)&&(E==null?void 0:E.MSGesture)||(E==null?void 0:E.DocumentTouch)&&document instanceof DocumentTouch,e}r(Jn,"detect");var Zn=r(()=>typeof window<"u"&&globalThis===window,"isBrowser"),Yu=Jn();function Qu(e){Zn()?window.addEventListener("beforeunload",e):typeof process<"u"&&process.on("exit",()=>e)}r(Qu,"useExitHandler");var He=class{constructor(t={}){this.store={}}setItem(t,n){this.store[t]=Ue(n)}getItem(t){return Ue(this.store[t])}removeItem(t){delete this.store[t]}clear(){this.store={}}allKeys(){return Object.keys(this.store)}};r(He,"MemStorage");export{r as a,Y as b,k as c,de as d,O as e,je as f,Qn as g,Xn as h,er as i,tr as j,nr as k,rr as l,or as m,ne as n,kt as o,re as p,Ft as q,G as r,ge as s,oe as t,ie as u,Q as v,ze as w,Ne as x,Ot as y,v as z,Pr as A,F as B,ye as C,Bt as D,Ht as E,Ve as F,jt as G,M as H,kr as I,_e as J,Je as K,Ze as L,Fr as M,Ir as N,We as O,he as P,xe as Q,Ke as R,V as S,Br as T,Hr as U,Xe as V,et as W,Nr as X,qt as Y,P as Z,Vr as _,_r as $,Jr as aa,Zr as ba,Gt as ca,Wr as da,Kr as ea,Yr as fa,Qr as ga,Vt as ha,to as ia,we as ja,no as ka,Le as la,_t as ma,Jt as na,_ as oa,Zt as pa,ao as qa,uo as ra,co as sa,Ae as ta,lo as ua,fo as va,Wt as wa,po as xa,Kt as ya,nt as za,go as Aa,mo as Ba,yo as Ca,ho as Da,xo as Ea,bo as Fa,To as Ga,wo as Ha,Lo as Ia,B as Ja,Po as Ka,Mo as La,Uo as Ma,So as Na,Ro as Oa,ko as Pa,Fo as Qa,Io as Ra,Co as Sa,Bo as Ta,en as Ua,Ho as Va,jo as Wa,Vo as Xa,_o as Ya,Jo as Za,tn as _a,nn as $a,rn as ab,ve as bb,Zo as cb,Wo as db,Ko as eb,Yo as fb,on as gb,Qo as hb,Xo as ib,Ee as jb,Pe as kb,ot as lb,sn as mb,ni as nb,it as ob,ri as pb,oi as qb,ii as rb,ce as sb,si as tb,De as ub,an as vb,un as wb,Me as xb,st as yb,ai as zb,ui as Ab,ci as Bb,li as Cb,ut as Db,gi as Eb,mi as Fb,ct as Gb,yi as Hb,lt as Ib,hi as Jb,ft as Kb,xi as Lb,U as Mb,H as Nb,L as Ob,Ai as Pb,vi as Qb,Di as Rb,Ei as Sb,cn as Tb,Ui as Ub,Si as Vb,Ri as Wb,pt as Xb,Ii as Yb,Bi as Zb,Hi as _b,ji as $b,qi as ac,_i as bc,X as cc,mt as dc,Wi as ec,Ki as fc,Yi as gc,Qi as hc,Xi as ic,es as jc,ts as kc,ns as lc,yt as mc,ht as nc,ss as oc,gn as pc,ls as qc,gs as rc,yn as sc,xt as tc,ms as uc,bs as vc,Ts as wc,ws as xc,Ls as yc,As as zc,Ue as Ac,vs as Bc,Ds as Cc,Es as Dc,Ps as Ec,Tn as Fc,Rs as Gc,Se as Hc,Re as Ic,$s as Jc,Bs as Kc,Hs as Lc,js as Mc,zs as Nc,Vs as Oc,_s as Pc,S as Qc,ea as Rc,ta as Sc,na as Tc,Tt as Uc,ia as Vc,sa as Wc,Fe as Xc,Dn as Yc,En as Zc,Pn as _c,Mn as $c,Un as ad,Sn as bd,kn as cd,Fn as dd,In as ed,vt as fd,$a as gd,Ba as hd,On as id,Ha as jd,ja as kd,j as ld,$n as md,Bn as nd,z as od,za as pd,jn as qd,zn as rd,Ja as sd,Ce as td,ru as ud,ou as vd,au as wd,fu as xd,fe as yd,ee as zd,yu as Ad,Oe as Bd,N as Cd,$e as Dd,Et as Ed,Mu as Fd,pe as Gd,Cu as Hd,Bu as Id,Gn as Jd,Mt as Kd,Gu as Ld,Vu as Md,_u as Nd,Ju as Od,Vn as Pd,Ut as Qd,_n as Rd,Ku as Sd,Jn as Td,Zn as Ud,Yu as Vd,Qu as Wd,He as Xd};
8
- //# sourceMappingURL=chunk-MIMXDMSX.js.map
7
+ ${i.stack}`:`${i.name||"Error"}: ${i.message}`:o?ye(i,null,2):ye(i):String(i))}r(sn,"formatMessages");function Xo(e,t={}){return sn(e,t).join(" ")}r(Xo,"renderMessages");function ei(e){try{return decodeURIComponent(escape(e))}catch{}return e}r(ei,"fixBrokenUth8String");var Ee=864e5;function Pe(e){return Math.floor(e/1e4)}r(Pe,"dayYear");function ot(e){return Math.floor(e/100%100)}r(ot,"dayMonth");function an(e){return Math.floor(e%100)}r(an,"dayDay");function ri(e){return[Pe(e),ot(e),an(e)]}r(ri,"dayToParts");function it(e,t=!1){return t?new Date(`${cn(e)}T00:00:00.000Z`):new Date(e/1e4,e/100%100-1,e%100)}r(it,"dayToDate");function oi(){return ce(new Date)}r(oi,"dayFromToday");function ii(e,t=!1){if(typeof e=="number")return e<100?void 0:e;if(typeof e=="string")return st(e);if(Array.isArray(e)&&e.length===3){let[n,o,i]=e;return Me(n,o,i)}else if(e instanceof Date)return ce(e,t)}r(ii,"dayFromAny");function si(e){return it(e,!0)}r(si,"dayToDateGMT");function ce(e,t=!1){return t?st(e.toISOString()):e.getFullYear()*1e4+(e.getMonth()+1)*100+e.getDate()}r(ce,"dayFromDate");function ai(e){return ce(e,!0)}r(ai,"dayFromDateGMT");function De(e,t=!0){return it(e,t).getTime()}r(De,"dayToTimestamp");function un(e,t=!0){return ce(new Date(e),t)}r(un,"dayFromTimestamp");function cn(e,t="-"){let n=String(e);return n.slice(0,4)+t+n.slice(4,6)+t+n.slice(6,8)}r(cn,"dayToString");function Me(e,t=1,n=1){if(!(t<1||t>12||n<1||n>31))return e*1e4+t*100+n}r(Me,"dayFromParts");function st(e){let t=String(e).replace(/[^0-9]/g,"").slice(0,8);if(t.length===8)return+t}r(st,"dayFromString");function ui(e,t=0){let n=Pe(e),o=ot(e);return t!==0&&(o+=t,n+=Math.floor((o-1)/12),o=Math.floor((o-1)%12)+1,o===0&&(o=12)),Me(n,o,1)}r(ui,"dayMonthStart");function ci(e,t=0){let n=Pe(e);return Me(n+t,1,1)}r(ci,"dayYearStart");function li(e,t){return un(De(e)+t*864e5)}r(li,"dayOffset");function fi(e,t){return Math.round((De(t)-De(e))/864e5)}r(fi,"dayDiff");var{warn:at}=v("zeed:promise");function ut(){let e,t;return[new Promise((o,i)=>{e=o,t=i}),e,t]}r(ut,"createPromise");async function mi(e){return new Promise(t=>setTimeout(t,e))}r(mi,"sleep");async function yi(){return new Promise(e=>setTimeout(e,0))}r(yi,"immediate");var ct=Symbol("timeout");async function hi(e,t,n=ct){return new Promise(async(o,i)=>{let s=!1,u=setTimeout(()=>{s=!0,o(n)},t);try{let a=await e;clearTimeout(u),s||o(a)}catch(a){clearTimeout(u),s||i(a)}})}r(hi,"timeout");var lt=new Error("Timeout reached");function xi(e){return e===ct||e===lt}r(xi,"isTimeout");async function ft(e,t){return t<=0?await e:new Promise(async(n,o)=>{let i=!1,s=setTimeout(()=>{i=!0,o(lt)},t);try{let u=await e;clearTimeout(s),i||n(u)}catch(u){clearTimeout(s),i||o(u)}})}r(ft,"tryTimeout");function bi(e,t,n=1e3){return new Promise((o,i)=>{let s=r(l=>{a&&(clearTimeout(a),u(),o(l))},"fn"),u=r(()=>{a=null,e.off?e.off(t,s):e.removeEventListener?e.removeEventListener(t,s):at("No remove listener method found for",e,t)},"done"),a=setTimeout(()=>{u(),i(new Error("Did not response in time"))},n);e.on?e.on(t,s):e.addEventListener?e.addEventListener(t,s):at("No listener method found for",e)})}r(bi,"waitOn");function U(e){return Boolean(e&&(e instanceof Promise||typeof e.then=="function"))}r(U,"isPromise");function H(e){return Promise.resolve(e)}r(H,"promisify");var L=class{get value(){return this.days}constructor(t){var n;if(typeof t=="number"){this.days=t;return}if(t!=null&&(t=(n=L.from(t))==null?void 0:n.days),t==null){let o=new Date;this.days=o.getFullYear()*1e4+(o.getMonth()+1)*100+o.getDate()}else this.days=t}static fromNumber(t){return new L(t)}static fromString(t){return L.from(+t.replace(/[^0-9]/g,"").slice(0,8))}static fromDate(t,n=!1){return n?L.fromString(t.toISOString().substr(0,10)):L.from(t.getFullYear()*1e4+(t.getMonth()+1)*100+t.getDate())}static fromDateGMT(t){return L.fromDate(t,!0)}static from(t,n=!1){if(typeof t=="number")return t<100?void 0:new L(t);if(typeof t=="string")return L.fromString(t);if(Array.isArray(t)&&t.length===3){let[o,i=1,s=1]=t;return i<1||i>12||s<1||s>31?void 0:new L(o*1e4+i*100+s)}else{if(t instanceof Date)return L.fromDate(t,n);if(t instanceof L)return t}}toNumber(){return this.days}toJson(){return this.days}toString(t="-"){let n=String(this.days);return n.slice(0,4)+t+n.slice(4,6)+t+n.slice(6,8)}toDate(t=!1){return t?new Date(`${this.toString()}T00:00:00.000Z`):new Date(this.days/1e4,this.days/100%100-1,this.days%100)}toDateGMT(){return this.toDate(!0)}get year(){return Math.floor(this.days/1e4)}get month(){return Math.floor(this.days/100%100)}get day(){return Math.floor(this.days%100)}dayOffset(t){return L.fromDateGMT(new Date(this.toDateGMT().getTime()+t*864e5))}monthStart(){return L.from([this.year,this.month,1])}yearStart(){return L.from([this.year,1,1])}monthOffset(t){let n=this.month+t,o=Math.floor((n-1)%12)+1;o===0&&(o=12);let i=Math.floor((n-1)/12);return L.from([this.year+i,o,this.day])}daysUntil(t){var n;return Math.round((((n=new L(t))==null?void 0:n.toDateGMT().getTime())-this.toDateGMT().getTime())/864e5)}yesterday(){return this.dayOffset(-1)}tomorrow(){return this.dayOffset(1)}};r(L,"Day");async function vi(e,t,n){let o=L.from(e),i=L.from(t);for(;o&&i&&(o==null?void 0:o.days)<=(i==null?void 0:i.days);){let s=n(o);U(s)&&await s,o=o.dayOffset(1)}}r(vi,"forEachDay");function Di(){return new L}r(Di,"today");function Ei(e){return new L(e)}r(Ei,"day");function Pi(e){return L.fromDate(new Date(e)).days}r(Pi,"dateStringToDays");function ln(e,t=2){return+(+e).toFixed(t)}r(ln,"decimal");function Ri(e,t=2){return+(+e/10**t).toFixed(t)}r(Ri,"decimalFromCents");function Si(e,t=2){return Math.round(+e*10**t)}r(Si,"decimalToCents");function Fi(e,t=2){return t*(ln(e,t)%1)}r(Fi,"decimalCentsPart");var pt=r(e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&apos;").replace(/"/g,"&quot;"),"escapeHTML"),Ci=r(e=>e.replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&apos;/gi,"'").replace(/&amp;/gi,"&"),"unescapeHTML");function Hi(e,t){return F(e)?Object.fromEntries(Object.entries(e).map(([n,o])=>{let i=t(n,o);return O(i)&&i.length===2?i:[n,i]}).filter(n=>n!=null)):{}}r(Hi,"objectMap");function ji(e,t){return t.dispose&&e.dispose&&t.dispose.add(e.dispose),Object.assign(e,t)}r(ji,"objectMergeDisposable");function zi(e){return Object.keys(e).length<=0}r(zi,"objectIsEmpty");var dt=/[\u0000-\u001F\u0080-\u009F]/g,fn=/^\.+/,pn=/\.+$/;function gt(){return/[<>:"/\\|?*\u0000-\u001F]/g}r(gt,"filenameReservedRegex");function dn(){return/^(con|prn|aux|nul|com\d|lpt\d)$/i}r(dn,"windowsReservedNameRegex");function Gi(e,t="_"){if(typeof e!="string")throw new TypeError("Expected a string");if(gt().test(t)&&dt.test(t))throw new Error("Replacement string cannot contain reserved filename characters");return e=e.replace(gt(),t).replace(dt,t).replace(fn,t).replace(pn,""),e=dn().test(e)?e+t:e,e.slice(0,100)}r(Gi,"toValidFilename");var gn=/[\\\-\[\]\/{}()*+?.^$|]/g;function Ji(e){return e?e instanceof RegExp?e.source:e.replace(gn,"\\$&"):""}r(Ji,"escapeRegExp");var X=r(e=>Math.abs(e)%1===.5,"isHalf"),mt=r(e=>e%2===0,"isEven"),Ki=r(e=>Math.ceil(e),"roundUp"),Yi=r(e=>Math.floor(e),"roundDown"),Qi=r(e=>Math.round(e),"roundHalfUp"),Xi=r(e=>{let t=Math.round(e);return X(e)&&mt(t)?t-1:t},"roundHalfOdd"),es=r(e=>X(e)?Math.sign(e)*Math.ceil(Math.abs(e)):Math.round(e),"roundHalfAwayFromZero"),ts=r(e=>X(e)?Math.floor(e):Math.round(e),"roundHalfDown"),ns=r(e=>{let t=Math.round(e);return X(e)?mt(t)?t:t-1:t},"roundHalfEven"),rs=r(e=>X(e)?Math.sign(e)*Math.floor(Math.abs(e)):Math.round(e),"roundHalfTowardsZero");function yt(e){return e.reduce((t,n)=>Math.min(t,n.sort_weight||0),0)-1-P()}r(yt,"startSortWeight");function ht(e){return e.reduce((t,n)=>Math.max(t,n.sort_weight||0),0)+1+P()}r(ht,"endSortWeight");function as(e,t,n){let o=n.length,i=e<t;if(o<=0||e>=o-1)return ht(n);if(e<=0)return yt(n);n=mn([...n]);let s=i?-1:0,u=n[e+s].sort_weight||0,l=(n[e+s+1].sort_weight||0)-u;if(l===0)return i?yt(n):ht(n);let c=u+l/2,g=l*.01*(P()-.5);return c+g}r(as,"moveSortWeight");function mn(e){return e.sort((t,n)=>(t.sort_weight||0)-(n.sort_weight||0)),e}r(mn,"sortedItems");function fs(e={}){let{getter:t=r(a=>a.sort,"getter")}=e;function n(a){return a.sort((l,c)=>(t(l)||0)-(t(c)||0)),a}r(n,"items");function o(a){return a.reduce((l,c)=>Math.min(l,t(c)||0),0)-1-P()}r(o,"start");function i(a){return a.reduce((l,c)=>Math.max(l,t(c)||0),0)+1+P()}r(i,"end");function s(a,l){a==null&&(a=(l??0)-1),l==null&&(l=(a??0)+1);let c=l-a,g=a+c/2,f=c*.01*(P()-.5);return g+f}r(s,"between");function u(a,l,c){let g=c.length,f=a<l;if(g<=0||a>=g-1)return i(c);if(a<=0)return o(c);c=n([...c]);let x=f?-1:0,p=t(c[a+x])||0,m=(t(c[a+x+1])||0)-p;if(m===0)return f?o(c):i(c);let d=p+m/2,y=m*.01*(P()-.5);return d+y}return r(u,"move"),{start:o,end:i,between:s,move:u,items:n}}r(fs,"useSorted");var yn=/((?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00A1-\uFFFF][a-z0-9\u00A1-\uFFFF_-]{0,62})?[a-z0-9\u00A1-\uFFFF]\.)+(?:[a-z\u00A1-\uFFFF]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?)/gim;function ms(e){return e.split(yn).map((t,n)=>{let o=pt(t);return n%2?`<a target="_blank" href="${o}">${hn(o)}</a>`:o}).join("")}r(ms,"linkifyPlainText");function hn(e){return e.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")}r(hn,"toHumanReadableUrl");function xt(e){let t=[];for(let[n,o]of Object.entries(e))if(o!=null){Array.isArray(o)||(o=[o]);for(let i of o)i!=null&&t.push(`${encodeURIComponent(n)}=${encodeURIComponent(String(i))}`)}return t.join("&")}r(xt,"encodeQuery");function ys(e){let t={},n=(e[0]==="?"?e.substr(1):e).split("&");for(let o=0;o<n.length;o++){let i=n[o].split("="),s=decodeURIComponent(i[0]),u=decodeURIComponent(i[1]||"");t[s]!=null?(Array.isArray(t[s])||(t[s]=[t[s]]),t[s].push(u)):t[s]=u}return t}r(ys,"parseQuery");function Ts(e,t,n){let o=e[t];return o===void 0&&(o=n(t,e),e[t]=o),o}r(Ts,"ensureKey");async function ws(e,t,n){let o=e[t];return o===void 0&&(o=await n(t,e),e[t]=o),o}r(ws,"ensureKeyAsync");function Ls(e){return e!=null?e.size!=null?e.size:e.length!=null?e.length:Object.keys(e).length:0}r(Ls,"size");function As(e){return e!=null&&e.length>0?e[e.length-1]:void 0}r(As,"last");function vs(e){try{if(e!=null)return Array.isArray(e)||typeof e=="string"?e.length<=0:(e==null?void 0:e.size)!=null?e.size<=0:Object.keys(e).length<=0}catch(t){console.warn("Failed to check if empty for",e,t)}return!0}r(vs,"empty");function Ue(e){return Object(e)!==e?e:JSON.parse(k(e))}r(Ue,"cloneObject");function Ds(e){return Object(e)!==e?e:JSON.parse(k(e))}r(Ds,"cloneJsonObject");function Es(e){let t=new Map;return n=>{if(t.has(n))return t.get(n);let o=e(n);return t.set(n,o),o}}r(Es,"memoize");function Ps(e){let t=new Map;return async(...n)=>{let o=k(n);if(t.has(o))return t.get(o);let i=await e(...n);return t.set(o,i),i}}r(Ps,"memoizeAsync");function Ms(e,t){let n=[];for(let o=0;o<e;o++)n.push(t(o,e));return n}r(Ms,"forTimes");var xn=/\\\s|\s+|#[^\n]*\n?/gm,bn=/\(\?P?<(\w[\w\d_]+)>|\((?!\?(:|\!|=|<=|<\!))/gm,bt=/^((?:\(\?[\w$]+\))?)\(\?<([=!])([\s\S]*?)\)/gm,Tn=v("zeed:xrx");function wn(e){return typeof e=="string"?e:e.source||""}r(wn,"regExpString");function Fs(e){return e.replace(/[-\[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}r(Fs,"regExpEscape");var Re=class{constructor(t,n){this.namedGroups={};this.names=[];let o=n??"",i;if(t instanceof RegExp?(n==null&&(o=t.flags),i=t.source):i=t,o&&o.includes("x")&&(o=o.replace("x",""),i=i.replace(xn,a=>a[0]==="\\"?a:"")),!(t instanceof RegExp)){let a=0;i=i.replace(bn,(l,c)=>(a+=1,c?(c!=="index"&&c!=="length"&&!this.namedGroups[c]?this.namedGroups[c]=a:Tn.error(`Unallowed or duplicate group name: ${c}`),"("):l)),this.names=Object.keys(this.namedGroups)}i=wn(i),bt.lastIndex=0;let u=bt.exec(i);u&&(this.lookBehind={rx:new RegExp(`${u[3]}$(?!\\s)`),expect:u?u[2]==="=":!u},i=i.substr(u[0].length)),this.rx=new RegExp(i,o)}get lastIndex(){return this.rx.lastIndex}set lastIndex(t){this.rx.lastIndex=t}_handleMatch(t){if(this.lookBehind){let n=t.input.slice(0,t.index);if(this.lookBehind.expect!==this.lookBehind.rx.test(n))return null}for(let n of this.names)t[n]=t[this.namedGroups[n]];return t}exec(t){let n;for(;n=this.rx.exec(t);)if(this.rx.lastIndex===n.index&&this.rx.lastIndex++,n=this._handleMatch(n),n!=null)return n}execAll(t){let n=[],o;for(this.rx.lastIndex=0;o=this.exec(t);)n.push(o);return this.rx.lastIndex=0,n}replace(t,n){let o=typeof n=="function"?n:()=>n;return t.replace(this.rx,i=>o(i))}};r(Re,"XRX");var Ln=v("zeed:dispose");async function An(e){typeof e=="function"?await H(e()):U(e)?await e:typeof e.dispose=="function"?await H(e.dispose()):U(e.dispose)?await e.dispose:typeof e.cleanup=="function"?await H(e.cleanup()):U(e.cleanup)&&await e.cleanup}r(An,"callDisposer");function Se(e){let{name:t}=typeof e=="string"?{name:e}:e??{},n=[],o=r(async u=>{u!=null&&n.includes(u)&&(Ae(n,a=>a!==u),await An(u))},"untrack"),i=r(async()=>{for(t&&Ln.debug(`dispose ${t}: ${n.length} entries`);n.length>0;)await o(n[0])},"dispose"),s=r(u=>{if(u!=null)return n.unshift(u),()=>o(u)},"track");return Object.assign(i,{track:s,add:s,untrack:o,dispose:i,exec:i,getSize(){return n.length}})}r(Se,"useDispose");var Bs=Se;function Hs(e={}){let{mode:t="fifo"}=e,n=[],o=r(async(s=!1)=>{for(;n.length>0;){let u=n[0];if(Ae(n,a=>a!==u),typeof u=="function"){let a=u();if(U(a)){if(s)throw new Error(`Expected sync only function, but found async: ${u}`);await a}}else if(U(u)){if(s)throw new Error(`Expected sync only function, but found async: ${u}`);await u}else throw new Error(`Unhandled disposable: ${u}`)}},"exec");return Object.assign(o,{add:r(s=>{t==="lifo"?n.unshift(s):n.push(s)},"add"),exec:o,getSize(){return n.length}})}r(Hs,"useDefer");function js(e,t=0){let n=setTimeout(e,t);return()=>{n&&(clearTimeout(n),n=void 0)}}r(js,"useTimeout");function zs(e,t){let n=setInterval(e,t);return()=>{n&&(clearInterval(n),n=void 0)}}r(zs,"useInterval");function Ns(e,t,n,...o){return e==null?()=>{}:(e.on?e.on(t,n,...o):e.addEventListener&&e.addEventListener(t,n,...o),()=>{e.off?e.off(t,n,...o):e.removeEventListener&&e.removeEventListener(t,n,...o)})}r(Ns,"useEventListener");function _s(){let e=!0;return(t,n)=>{let o=!1;if(e){e=!1;try{t(),o=!0}finally{e=!0}}else n!==void 0&&n();return o}}r(_s,"useMutex");function Js(){let e=!0;return async(t,n)=>{let o=!1;if(e){e=!1;try{let i=t();U(i)&&await i,o=!0}finally{e=!0}}else if(n!==void 0){let i=n();U(i)&&await i}return o}}r(Js,"useAsyncMutex");var J=v("zeed:emitter"),R=class{constructor(){this.subscribers={};this.subscribersOnAny=[];this.dispose=Se();this.call=new Proxy({},{get:(t,n)=>(...o)=>this.emit(n,...o)})}async emit(t,...n){let o=!1;this.dispose.add(()=>{this.subscribers={},this.subscribersOnAny=[]});try{let i=this.subscribers[t]||[];if(this.subscribersOnAny.forEach(s=>s(t,...n)),i.length>0){let s=i.map(u=>{try{return H(u(...n))}catch(a){J.warn("emit warning:",a)}return null}).filter(u=>u!=null);o=!0,await Promise.all(s)}}catch(i){J.error("emit exception",i)}return o}onAny(t){this.subscribersOnAny.push(t)}on(t,n){let o=this.subscribers[t]||[];return o.push(n),this.subscribers[t]=o,()=>{this.off(t,n)}}onCall(t){for(let[n,o]of Object.entries(t))this.on(n,o)}once(t,n){let o=r(async(...i)=>(this.off(t,o),await H(n(...i))),"onceListener");return this.on(t,o),()=>{this.off(t,n)}}off(t,n){return this.subscribers[t]=(this.subscribers[t]||[]).filter(o=>n&&o!==n),this}removeAllListeners(){return this.subscribers={},this}};r(R,"Emitter");function ta(){let e=Y().emitter;return e||(e=new R,Y().emitter=e),e}r(ta,"getGlobalEmitter");var na=new R;function ra(e,t){let n=Math.round(P()*100),o=[],i,s=r((a,l)=>{let c={key:a,obj:l};o.push(c),i&&i()},"incoming");return t?e.on?e.on(t,a=>{s(t,a)}):e.addEventListener?e.addEventListener(t,a=>{s(t,a)}):J.error(n,"Cannot listen to key"):e.onAny?e.onAny((a,l)=>{s(a,l)}):J.error(n,"cannot listen to all for",e),r((a,l=!0)=>new Promise((c,g)=>{a||(a=t,a||o.length&&(a=o[0].key)),i=r(()=>{for(;o.length>0;){let f=o.shift();if(f.key===a)i=void 0,c(f.obj);else{if(l){J.warn(n,`Unhandled event ${a} with value: ${f.obj}`);continue}g(new Error(`Expected ${a}, but found ${f.key} with value=${f.obj}`)),J.error(n,`Unhandled event ${a} with value: ${f.obj}`)}break}},"lazyResolve"),i()}),"on")}r(ra,"lazyListener");var Tt=r(()=>Date.now(),"getTimestamp");function sa(e){return e>999?`${(e/1e3).toFixed(1)}s`:`${e.toFixed(2)}ms`}r(sa,"formatMilliseconds");function aa(...e){for(let t of e){if(t instanceof Date)return t;if(typeof t=="string"){let n=null;if(t.includes(":"))try{n=new Date(t)}catch{}if(!(n instanceof Date)){let o=/(\d\d\d\d)-(\d\d)-(\d\d)/.exec(t);o&&(n=new Date(+o[1],+o[2]-1,+o[3],12,0))}if(n instanceof Date)return n}}}r(aa,"parseDate");var{encode:wt,decode:vn}=B(62),{encode:Lt,decode:Dn}=B(32);function ke(){return V(16)}r(ke,"uuidBytes");function En(e=ke()){return wt(e,22)}r(En,"uuidB62");function Pn(e){return wt(e,22)}r(Pn,"uuidEncodeB62");function Mn(e){return vn(e,16)}r(Mn,"uuidDecodeB62");function Un(e=ke()){return Lt(e,26)}r(Un,"uuidB32");function Rn(e){return Lt(e,26)}r(Rn,"uuidEncodeB32");function Sn(e){return Dn(e,16)}r(Sn,"uuidDecodeB32");var Fn="10000000-1000-4000-8000-100000000000",kn=typeof crypto<"u"&&crypto.randomUUID!=null?crypto.randomUUID.bind(crypto):()=>Fn.replace(/[018]/g,e=>(e^V(1)[0]&15>>e/4).toString(16));function In(e){let t=_e(e);return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16)}`}r(In,"uuidEncodeV4");function Cn(e){return Je(e.replaceAll("-",""))}r(Cn,"uuidDecodeV4");var At=16e11;function On(e){let t=new Uint8Array([0,0,0,0,0,0]),n=t.length-1;for(let o=0;o<t.length;o++){let i=e&255;t[n-o]=i,e=(e-i)/256}return t}r(On,"longToByteArray");function vt(){let e=Tt()-At;return new Uint8Array([...On(e),...V(10)])}r(vt,"suidBytes");function Ba(){return Hn(vt())}r(Ba,"suid");function Ha(e){return $n(Bn(e))}r(Ha,"suidDate");function $n(e){return new Date(At+e.slice(0,6).reduce((t,n)=>t*256+n,0))}r($n,"suidBytesDate");var ja=r(()=>new Uint32Array(V(4))[0],"uuid32bit"),Ie={base62:{uuid:En,uuidDecode:Mn,uuidEncode:Pn},base32:{uuid:Un,uuidDecode:Sn,uuidEncode:Rn},uuidv4:{uuid:kn,uuidDecode:Cn,uuidEncode:In}},le="base62",Dt=!1;function za(e,t=!1){le=e,Dt=t}r(za,"setUuidDefaultEncoding");function j(){return Ie[le].uuid(Dt?vt():ke())}r(j,"uuid");function Bn(e){return Ie[le].uuidDecode(e)}r(Bn,"uuidDecode");function Hn(e){return Ie[le].uuidEncode(e)}r(Hn,"uuidEncode");var Fe={};function z(e="id"){return Fe[e]==null&&(Fe[e]=0),`${e}-${Fe[e]++}`}r(z,"uname");var jn=0;function Na(){return`id-${jn++}`}r(Na,"qid");var zn=(o=>(o[o.waiting=0]="waiting",o[o.running=1]="running",o[o.finished=2]="finished",o))(zn||{}),Nn=(o=>(o[o.replace=0]="replace",o[o.memoize=1]="memoize",o[o.error=2]="error",o))(Nn||{});function Za(e={}){let{maxParallel:t=3}=e,n=new R,o=0,i=0,s=0,u=0,a={};async function l(){if(o>0){let[m,d]=ut();return n.once("didFinish",d),m}}r(l,"waitFinishAll");function c(){n.emit("didFinish"),o=0,i=0}r(c,"didFinish");function g(){let m=0,d=0;for(let{max:y,resolved:T,state:b}of Object.values(a))m+=y,d+=b===2?y:Math.min(y,T);n.emit("didUpdate",o,i,m,d)}r(g,"didUpdate");function f(){if(g(),o>0&&o===i&&c(),s>=t)return;let m=Object.values(a).filter(d=>d.state===0);if(m.length>0){let d;for(let y of m)y.group!=null&&Object.values(a).some(T=>T.state===1&&T.id!==y.id&&T.group===y.group)||(d==null||y.priority<d.priority)&&(d=y);if(d!=null){let y=d.id,T=d.done;d.state=1,++s,n.emit("didStart",y);let b=r(w=>{d&&(d.result=w,d.state=2,d.resolved=d.max),--s,++i,f()},"taskFinished");d.task(d).then(w=>{T(w),n.emit("didResolve",y,w),b(w)}).catch(w=>{T(),n.emit("didReject",y,w),b()})}}}r(f,"performNext");function x(m){let d=a[m];d&&d.state===0&&(a[m].state=2,++i,n.emit("didCancel",m),g())}r(x,"cancel");function p(){Object.keys(a).forEach(x)}r(p,"cancelAll");function h(m,d={}){let y,T=new Promise(w=>y=w),b=d.id??j();if(a[b]!=null){let w=d.idConflictResolution??1;if(w===0)x(b);else if(w===1){let D=a[b];return{id:b,promise:(async()=>{if(D.state===2)return a[b].result})(),dispose:()=>x(b),cancel:()=>x(b)}}else throw new Error(`Pool task with id=${b} already exists!`)}return a[b]={id:b,task:m,priority:++u,group:d.group,state:0,max:d.max??1,resolved:d.resolved??0,done:y,payload:d.payload,setMax(w){a[b].max=w,g()},setResolved(w){a[b].resolved=w,g()},incResolved(w=1){a[b].resolved+=w,g()}},++o,f(),{id:b,promise:T,dispose:()=>x(b),cancel:()=>x(b)}}return r(h,"enqueue"),{events:n,cancel:x,cancelAll:p,enqueue:h,dispose:p,waitFinishAll:l}}r(Za,"usePool");var Ce=class extends R{constructor(n={}){super();this.queue=[];this.waitToFinish=[];this.countMax=0;this.countResolved=0;this.paused=!1;let{name:o=z("queue"),logLevel:i}=n;this.name=o,this.log=v(`zeed:queue:${o}`,i??1/0)}async performNext(){if(this.log("performNext, queue.length =",this.queue.length),this.currentTask!=null){this.log("performNext => skip while another task is running");return}if(this.paused){this.log("performNext => skip while is paused");return}for(;this.currentTask==null&&!this.paused;){let n=this.queue.shift();if(this.log(`performNext => ${n==null?void 0:n.name}`),n==null)break;this.countResolved===0&&this.emit("didStart",this.countMax);let{name:o,task:i,resolve:s}=n;this.currentTask=i();let u;try{this.log.info(`start task ${o}`),u=await this.currentTask,this.log(`finished task ${o} with result =`,u)}catch(a){this.log.warn("Error performing task",a)}s(u),this.currentTask=void 0,this.countResolved+=1,this.emit("didUpdate",this.countMax,this.countResolved)}for(this.queue.length===0&&(this.emit("didFinish"),this.countMax=0,this.countResolved=0);this.waitToFinish.length>0;)this.waitToFinish.shift()()}async enqueue(n,o={}){let{immediate:i=!1,name:s=z(this.name)}=o;return i?(this.log.info(`immediate execution ${s}`),await n()):(this.log(`enqueue ${s}`),new Promise(u=>{this.queue.push({name:s,task:n,resolve:u}),this.countMax+=1,this.emit("didUpdate",this.countMax,this.countResolved),this.performNext()}))}async enqueueReentrant(n,o={}){return this.enqueue(n,{immediate:this.currentTask!=null,name:o.name})}async cancelAll(n=!0){this.log("cancelAll"),this.emit("didCancel");let o=this.queue.map(i=>i.resolve);this.queue=[],o.forEach(i=>i(void 0)),await this.wait()}async pause(){this.log("pause"),this.paused=!0,await this.wait()}resume(){this.log("resume"),this.paused=!1,this.performNext()}async wait(){if(this.log("wait"),!(this.currentTask==null&&(this.queue.length===0||this.paused)))return new Promise(n=>{this.waitToFinish.push(n)})}get isPaused(){return this.paused}get hasTasks(){return this.queue.length!==0}};r(Ce,"SerialQueue");var W=!1,Z=W?v("zeed:throttle"):()=>{};function ou(e,t={}){let{delay:n=100,trailing:o=!0,leading:i=!0}=t,s=0,u=0,a=0,l,c=Date.now();function g(){s&&(clearTimeout(s),s=void 0)}r(g,"clearExistingTimeout");function f(...x){let p=Date.now(),h=p-u;function m(){let y=Date.now();return`total ${(y-c).toFixed(1)}ms - elapsed ${(y-u).toFixed(1)}ms - visited ${a}x`}r(m,"debugElapsed");let d=r(()=>{a=0,u=Date.now(),e.apply(this,x)},"exec");if(l=d,h>n||!s){W&&Z("elapsed",m()),i&&(h>n?(W&&Z("\u{1F680} leading",m()),d()):++a);let y=h>n?n:n-h;Z(`\u23F1 start timeout with ${y.toFixed(1)}ms`,m()),g(),u=p,s=setTimeout(()=>{W&&Z("\u23F1 reached timeout",m()),s=0,o&&(!i||a>0)&&(W&&Z("\u{1F680} trailing",m()),l==null||l())},y)}else++a,W&&Z("visited",m())}return r(f,"wrapper"),f.cancel=g,f.dispose=g,f}r(ou,"throttle");function iu(e,t={}){let{delay:n=100}=t,o=0;function i(){o&&(clearTimeout(o),o=0)}r(i,"clearExistingTimeout");function s(...u){i(),o=setTimeout(()=>{o=0,e.apply(this,u)},n)}return r(s,"wrapper"),s.cancel=i,s.dispose=i,s}r(iu,"debounce");function uu(e=(t=>(t=globalThis==null?void 0:globalThis.location)==null?void 0:t.hostname)()??""){return["::ffff:127.0.0.1","localhost","127.0.0.1","","::1","::"].includes(e)||e.startsWith("192.168.")||e.startsWith("10.0.")||e.endsWith(".local")}r(uu,"isLocalHost");function pu(e){let{level:t=void 0,filter:n=void 0,messages:o=[]}=e,i=G(n),s=oe(t);return u=>{!s(u.level)||!i(u.name)||o.push(u)}}r(pu,"LoggerMemoryHandler");var fe=class extends R{constructor(){super(...arguments);this.id=j()}close(){this.dispose()}};r(fe,"Channel");var ee=class extends fe{constructor(){super(...arguments);this.isConnected=!0}postMessage(n){var o;(o=this.other)==null||o.emit("message",{data:n,origin:"local",lastEventId:j()})}};r(ee,"LocalChannel");function hu(){let e=new ee,t=new ee;return e.other=t,t.other=e,[e,t]}r(hu,"createLocalChannelPair");var Oe=class{async encode(t){return t}async decode(t){return t}};r(Oe,"NoopEncoder");var N=class{async encode(t){return he(t)}async decode(t){return xe(t)}};r(N,"JsonEncoder");var $e=class{constructor(t){this.key=t}async encode(t){let n=he(t);return await Xe(n,this.key)}async decode(t){let n=await et(t,this.key);return xe(n)}};r($e,"CryptoEncoder");var Et=r((e,t,n={})=>new Proxy(n,{get:(o,i)=>i in o?o[i]:(...s)=>e(i,s,t)}),"createPromiseProxy");function Uu(e={}){let{name:t=z("hub"),encoder:n=new N,retryAfter:o=1e3,ignoreUnhandled:i=!0,logLevel:s=!1}=e,u=v(t,s),a={},l,c=[],g,f={},x=r(()=>{clearTimeout(g)},"dispose"),p=r(async()=>{if(clearTimeout(g),l){if(l.isConnected)for(;c.length;){let y=c[0];try{l.postMessage(await n.encode(y)),c.shift()}catch(T){u.warn("postMessage",T);break}}c.length>0&&o>0&&(g=setTimeout(p,o))}},"postNext"),h=r(async y=>{u("enqueue postMessage",y),c.push(y),await p()},"postMessage"),m=r(async y=>{l=y,l.on("connect",p),l.on("message",async T=>{u("onmessage",typeof T);let{name:b,args:w,id:D,result:q,error:I}=await n.decode(T.data);if(b){u(`name ${b} id ${D}`);try{if(a[b]==null)throw new Error(`handler for ${b} was not found`);let S=a[b](...w);U(S)&&(S=await S),u(`result ${S}`),D&&h({id:D,result:S})}catch(S){let C=S instanceof Error?S:new Error(ve(S));u.warn("execution error",C.name),h({id:D,error:{message:C.message,stack:C.stack,name:C.name}})}}else if(D)if(u(`response for id=${D}: result=${q}, error=${I}`),f[D]==null)q===void 0?u(`skip response for ${D}`):u.warn(`no response hook for ${D}`);else{let[S,C]=f[D];if(S&&C)if(delete f[D],I){let te=new Error(I.message);te.stack=I.stack,te.name=I.name,u.warn("reject",te.name),C(te)}else u("resolve",q),S(q)}else i||u.warn("Unhandled message",T)}),p()},"connect"),d=r(async(y,T,b={})=>{let{timeout:w=5e3}=b,D=j();return h({name:y,args:T,id:D}),ft(new Promise((q,I)=>f[D]=[q,I]),w)},"fetchMessage");return e.channel&&m(e.channel),{dispose:x,connect:m,listen(y){Object.assign(a,y)},send(){return Et(d,{},{options(y){return Et(d,{...y})}})}}}r(Uu,"useMessageHub");var pe=class extends R{constructor(n){super();this.publish=this.emit;this.subscribe=this.on;let{name:o,encoder:i=new N,channel:s,debug:u=!1}=n;this.channel=s,this.encoder=i,this.debug=u,this.name=o??this.channel.id??z("pubsub"),this.log=v(`${this.shortId}`),this.debug&&(this.channel.on("connect",()=>{this.log("channel connected")}),this.channel.on("disconnect",()=>{this.log("channel disconnected")})),this.channel.on("message",async({data:a})=>{let l=await this.encoder.decode(a);if(this.debug?this.log(`channel message, event=${l==null?void 0:l.event}, info=`,l):this.log(`channel message, event=${l==null?void 0:l.event}`),l){let{event:c,args:g}=l;await this.emitSuper(c,...g)}})}get shortId(){return this.name.substr(0,6)}async emitSuper(n,...o){return await super.emit(n,...o)}async emit(n,...o){try{if(this.debug?this.log(`emit(${String(n)})`,n):this.log(`emit(${String(n)})`,o.length),!this.channel.isConnected)return this.log.warn("channel not connected"),!1;let i=await this.encoder.encode({event:n,args:o});return this.channel.postMessage(i),!0}catch(i){this.log.warn(`emit(${String(n)})`,i)}return!1}};r(pe,"PubSub");function Ou(e){return new pe(e)}r(Ou,"usePubSub");var qn=1;var Pt=r(e=>e,"defaultSerialize"),Gn=Pt;function Hu(e,t){let{post:n,on:o,eventNames:i=[],serialize:s=Pt,deserialize:u=Gn}=t,a=new Map;return o(async l=>{let c=u(l),[g,f,x,p]=c;if(g===1||g===2){let h,m;if(p!=null)try{h=await e[p](...f)}catch(d){m=String(d)}else m="Method implementation missing";g===1&&x&&n(s(m?[4,m,x]:[3,h,x]))}else if(x){let h=a.get(x);h!=null&&(g===4?h.reject(f):h.resolve(f)),a.delete(x)}}),new Proxy({},{get(l,c){let g=r((...x)=>{n(s([2,x,null,c]))},"sendEvent");if(t.onlyEvents||i.includes(c))return g.asEvent=g,g;let f=r((...x)=>new Promise((p,h)=>{let m=qn++;a.set(m,{resolve:p,reject:h}),n(s([1,x,m,c]))}),"sendCall");return f.asEvent=g,f}})}r(Hu,"useRPC");var K=v("zeed:network"),Be={cache:"no-cache",redirect:"follow",headers:{}};function Vn(e){let t=/:\/\/([^@]*)@/gi.exec(e);if(t&&t[1]){let[n,o]=t[1].split(":",2);return{url:e.replace(`${t[1]}@`,""),username:n,password:o}}}r(Vn,"parseBasicAuth");async function Mt(e,t={},n=fetch){try{O(t)&&(t=re({},..._(t)));let o=Vn(String(e));o&&(e=o.url,t=re({},t,_n(o.username,o.password))),t.headers!=null&&!(t.headers instanceof Headers)&&(t.headers=new Headers(t.headers));let i=await n(String(e),t);if(i.status<400)return i;try{K.warn(`Fetch of ${e} with ${t} returned status=${i.status}`),K.warn(`Response: ${await i.text()}`)}catch(s){K.error("Exception:",s)}}catch(o){K.error("fetchBasic",o)}}r(Mt,"fetchBasic");async function Vu(e,t={},n=fetch){try{let o=await Mt(e,[{method:"GET",headers:{Accept:"application/json"}},t],n);if(o)return await o.json()}catch(o){K.error("fetchJSON error:",o)}}r(Vu,"fetchJson");async function _u(e,t={},n=fetch){try{let o=await Mt(e,[Be,{method:"GET"},t],n);if(o)return await o.text()}catch(o){K.error("fetchHTML error:",o)}}r(_u,"fetchText");function Ju(e,t="POST"){return{method:t,...Be,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:xt(e)}}r(Ju,"fetchOptionsFormURLEncoded");function Zu(e,t="POST"){return{method:t,...Be,headers:{"Content-Type":"application/json; charset=utf-8"},body:k(e)}}r(Zu,"fetchOptionsJson");function _n(e,t){return{headers:{Authorization:`Basic ${Ze(`${e}:${t}`)}`}}}r(_n,"fetchOptionsBasicAuth");function Ut(){if(typeof window<"u")return window}r(Ut,"getWindow");function Jn(){if(typeof navigator<"u")return navigator}r(Jn,"getNavigator");function Yu(){return Ut()??typeof WorkerGlobalScope<"u"?self:typeof global<"u"?global:Function("return this;")()}r(Yu,"getGlobal");var A=Jn(),E=Ut();function Zn(e={ios:!1,macos:!1,windows:!1,beaker:!1,electron:!1,wkwebview:!1,pwa:!1,pwaInstalled:!1,browser:!1,node:!1,worker:!1,test:!1,jest:!1,macosNative:!1,iosNative:!1,appleNative:!1,touch:!1}){var t,n,o,i,s,u,a,l,c;return e.ios=((t=A==null?void 0:A.platform)==null?void 0:t.match(/(iPhone|iPod|iPad)/i))!=null,e.macos=!!((n=A==null?void 0:A.platform)!=null&&n.startsWith("Mac")),e.windows=!!((o=A==null?void 0:A.platform)!=null&&o.startsWith("Win")),e.beaker=(E==null?void 0:E.beaker)!=null,e.electron=(((s=(i=A==null?void 0:A.userAgent)==null?void 0:i.toLowerCase())==null?void 0:s.indexOf(" electron/"))||-1)>-1&&!e.beaker,e.wkwebview=((u=E==null?void 0:E.webkit)==null?void 0:u.messageHandlers)!=null,e.pwa=(A==null?void 0:A.serviceWorker)!=null,e.pwaInstalled=(A==null?void 0:A.standalone)||((l=(a=E==null?void 0:E.matchMedia)==null?void 0:a.call(E,"(display-mode: standalone)"))==null?void 0:l.matches),e.node=typeof process<"u"&&((c=process==null?void 0:process.release)==null?void 0:c.name)==="node",e.browser=!e.electron&&!e.wkwebview&&!e.node,e.worker=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,e.jest=typeof jest<"u"||typeof vitest<"u",e.test=e.jest,e.macosNative=e.wkwebview&&e.macos,e.iosNative=e.wkwebview&&e.ios,e.appleNative=e.wkwebview,e.touch=E&&"ontouchstart"in E||((A==null?void 0:A.maxTouchPoints)||0)>1||(A==null?void 0:A.msPointerEnabled)&&(E==null?void 0:E.MSGesture)||(E==null?void 0:E.DocumentTouch)&&document instanceof DocumentTouch,e}r(Zn,"detect");var Wn=r(()=>typeof window<"u"&&globalThis===window,"isBrowser"),Qu=Zn();function Xu(e){Wn()?window.addEventListener("beforeunload",e):typeof process<"u"&&process.on("exit",()=>e)}r(Xu,"useExitHandler");var He=class{constructor(t={}){this.store={}}setItem(t,n){this.store[t]=Ue(n)}getItem(t){return Ue(this.store[t])}removeItem(t){delete this.store[t]}clear(){this.store={}}allKeys(){return Object.keys(this.store)}};r(He,"MemStorage");export{r as a,Y as b,F as c,de as d,O as e,je as f,Xn as g,er as h,tr as i,nr as j,rr as k,or as l,ir as m,ne as n,Ft as o,re as p,kt as q,G as r,ge as s,oe as t,ie as u,Q as v,ze as w,Ne as x,Ot as y,v as z,Mr as A,k as B,ye as C,Bt as D,Ht as E,Ve as F,jt as G,M as H,kr as I,_e as J,Je as K,Ze as L,Ir as M,Cr as N,We as O,he as P,xe as Q,Ke as R,V as S,Qe as T,be as U,Ye as V,zt as W,Hr as X,jr as Y,Xe as Z,et as _,qr as $,Gt as aa,P as ba,_r as ca,Jr as da,Zr as ea,Wr as fa,Vt as ga,Kr as ha,Yr as ia,Qr as ja,Xr as ka,_t as la,no as ma,we as na,ro as oa,Le as pa,Jt as qa,Zt as ra,_ as sa,Wt as ta,uo as ua,co as va,lo as wa,Ae as xa,fo as ya,po as za,Kt as Aa,go as Ba,Yt as Ca,nt as Da,mo as Ea,yo as Fa,ho as Ga,xo as Ha,bo as Ia,To as Ja,wo as Ka,Lo as La,Ao as Ma,B as Na,Mo as Oa,Uo as Pa,Ro as Qa,So as Ra,Fo as Sa,ko as Ta,Io as Ua,Co as Va,Oo as Wa,Ho as Xa,tn as Ya,jo as Za,zo as _a,_o as $a,Jo as ab,Zo as bb,nn as cb,rn as db,on as eb,ve as fb,Wo as gb,Ko as hb,Yo as ib,Qo as jb,sn as kb,Xo as lb,ei as mb,Ee as nb,Pe as ob,ot as pb,an as qb,ri as rb,it as sb,oi as tb,ii as ub,si as vb,ce as wb,ai as xb,De as yb,un as zb,cn as Ab,Me as Bb,st as Cb,ui as Db,ci as Eb,li as Fb,fi as Gb,ut as Hb,mi as Ib,yi as Jb,ct as Kb,hi as Lb,lt as Mb,xi as Nb,ft as Ob,bi as Pb,U as Qb,H as Rb,L as Sb,vi as Tb,Di as Ub,Ei as Vb,Pi as Wb,ln as Xb,Ri as Yb,Si as Zb,Fi as _b,pt as $b,Ci as ac,Hi as bc,ji as cc,zi as dc,Gi as ec,Ji as fc,X as gc,mt as hc,Ki as ic,Yi as jc,Qi as kc,Xi as lc,es as mc,ts as nc,ns as oc,rs as pc,yt as qc,ht as rc,as as sc,mn as tc,fs as uc,ms as vc,hn as wc,xt as xc,ys as yc,Ts as zc,ws as Ac,Ls as Bc,As as Cc,vs as Dc,Ue as Ec,Ds as Fc,Es as Gc,Ps as Hc,Ms as Ic,wn as Jc,Fs as Kc,Re as Lc,Se as Mc,Bs as Nc,Hs as Oc,js as Pc,zs as Qc,Ns as Rc,_s as Sc,Js as Tc,R as Uc,ta as Vc,na as Wc,ra as Xc,Tt as Yc,sa as Zc,aa as _c,ke as $c,En as ad,Pn as bd,Mn as cd,Un as dd,Rn as ed,Sn as fd,kn as gd,In as hd,Cn as id,vt as jd,Ba as kd,Ha as ld,$n as md,ja as nd,za as od,j as pd,Bn as qd,Hn as rd,z as sd,Na as td,zn as ud,Nn as vd,Za as wd,Ce as xd,ou as yd,iu as zd,uu as Ad,pu as Bd,fe as Cd,ee as Dd,hu as Ed,Oe as Fd,N as Gd,$e as Hd,Et as Id,Uu as Jd,pe as Kd,Ou as Ld,Hu as Md,Vn as Nd,Mt as Od,Vu as Pd,_u as Qd,Ju as Rd,Zu as Sd,_n as Td,Ut as Ud,Jn as Vd,Yu as Wd,Zn as Xd,Wn as Yd,Qu as Zd,Xu as _d,He as $d};
8
+ //# sourceMappingURL=chunk-23UUOI6J.js.map