zeed 0.15.21 → 0.15.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-QFQ4KOUP.js → chunk-CIYYASAP.js} +7 -7
- package/dist/chunk-CIYYASAP.js.map +1 -0
- package/dist/index.all.d.cts +8 -7
- package/dist/index.all.d.ts +8 -7
- package/dist/index.browser.cjs +18 -18
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.d.cts +2 -2
- package/dist/index.browser.d.ts +2 -2
- package/dist/index.browser.js +2 -2
- package/dist/index.node.cjs.map +1 -1
- package/dist/index.node.d.cts +2 -2
- package/dist/index.node.d.ts +2 -2
- package/dist/index.node.js +2 -2
- package/dist/{uuid-eGHUkDkl.d.cts → uuid-hrV27HRW.d.cts} +8 -7
- package/dist/{uuid-eGHUkDkl.d.ts → uuid-hrV27HRW.d.ts} +8 -7
- package/package.json +6 -6
- package/dist/chunk-QFQ4KOUP.js.map +0 -1
package/dist/index.browser.cjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var fr=Object.defineProperty;var r=(e,t)=>fr(e,"name",{value:t,configurable:!0});function pr(){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(pr,"_global");function Z(e={}){let t=pr();return t._zeedGlobal==null&&(t._zeedGlobal=e),t._zeedGlobal}r(Z,"getGlobalContext");var K=-1,Y=0,ae=1,ue=2,ce=3,le=4,we=9007199254740991,qt={"*":-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:9007199254740991,"-":9007199254740991};function dr(){return crypto.getRandomValues(new Uint32Array(1))[0]/4294967295}r(dr,"getSecureRandom");function k(){return typeof crypto<"u"?dr():Math.random()}r(k,"getSecureRandomIfPossible");function ci(e=.25){return k()<e}r(ci,"randomBoolean");function li(e=100,t=0){return t+Math.floor(k()*(e-t))}r(li,"randomInt");function fi(e=100,t=0){return t+k()*(e-t)}r(fi,"randomFloat");function pi(e,t,n){return Math.max(e,Math.min(n,t))}r(pi,"between");function gr(e){return e.reduce((t,n)=>t+n,0)}r(gr,"sum");function di(e){return gr(e)/e.length}r(di,"avg");function gi(e){return !/^1?$|^(11+?)\1+$/.test("1".repeat(e))}r(gi,"isPrimeRX");function mi(e){for(let t=2;t<e;t++)if(e%t===0)return !1;return e>1}r(mi,"isPrime");var Ze=6;function yi(e=0,t=1,n){Ze=((n??Ze)*9301+49297)%233280;let o=Ze/233280;return t+o*(e-t)}r(yi,"seededRandom");function mr(e=""){let[t="",n="asc"]=e.split(" ");return n=n.toLowerCase(),{field:t,orderby:n,asc:n!=="desc",desc:n==="desc"}}r(mr,"parseOrderby");function xi(e,t=!0){return `${e} ${t?"asc":"desc"}`}r(xi,"composeOrderby");function Ke(e,t,n=!0){let o=e||0,i=t||0;return o>i?n?1:-1:o<i?n?-1:1:0}r(Ke,"cmp");function wi(e,...t){if(t.length>0){let n=t.map(mr),o=Array.from(e);return o.sort((i,s)=>{for(let{field:a,asc:l}of n){let u=Ke(i[a],s[a],l);if(u!==0)return u}return 0}),o}return e}r(wi,"sortedOrderby");function Ye(e){return e.filter((t,n)=>e.indexOf(t)===n)}r(Ye,"arrayUnique");function yr(e,t){return Ye(e.filter(n=>!t.includes(n)))}r(yr,"arrayMinus");function hr(...e){return Ye(e.reduce((t=[],n)=>t.concat(n),[]))}r(hr,"arrayUnion");function Q(...e){return e.flat(Number.POSITIVE_INFINITY)}r(Q,"arrayFlatten");function br(e,t){return Ye(e).filter(n=>t.includes(n))}r(br,"arrayIntersection");function Ci(e,t){return yr(hr(e,t),br(e,t))}r(Ci,"arraySymmetricDifference");function Wt(e,t){if(e&&Array.isArray(e)){let n;for(;(n=e.indexOf(t))!==-1;)e.splice(n,1);return e}return []}r(Wt,"arrayRemoveElement");function Ui(e,t){return e.includes(t)||e.push(t),e}r(Ui,"arraySetElement");function Qe(e,t){return e.splice(0,e.length,...e.filter(t)),e}r(Qe,"arrayFilterInPlace");function Di(e,t){let n=e.findIndex(o=>o===t);return n>=0?e.splice(n,1):e.push(t),e}r(Di,"arrayToggleInPlace");function
|
|
4
|
-
`)}r(en,"Uint8ArrayToHexDump");var Cr={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 Ur(e){let t=Cr[String(e)];if(!t)if(typeof e=="string")t=e;else throw new Error(`Unknown base ${e}`);if(t.length>=255)throw new TypeError("Alphabet too long");let n=new Uint8Array(256);for(let y=0;y<n.length;y++)n[y]=255;for(let y=0;y<t.length;y++){let h=t.charAt(y),x=h.charCodeAt(0);if(n[x]!==255)throw new TypeError(`${h} is ambiguous`);n[x]=y;}let o=t.length,i=t.charAt(0),s=Math.log(o)/Math.log(256),a=Math.log(256)/Math.log(o);function l(y,h=-1){let x=U(y);if(x.byteLength===0)return "";let v=0,w=0,b=x.byteLength;for(;w!==b&&x[w]===0;)w++;let T=(b-w)*a+1>>>0,L=new Uint8Array(T);for(;w!==b;){let d=x[w],g=0;for(let f=T-1;(d!==0||g<v)&&f!==-1;f--,g++)d+=256*L[f]>>>0,L[f]=d%o>>>0,d=d/o>>>0;if(d!==0)throw new Error("Non-zero carry");v=g,w++;}let m=T-v;for(;m!==T&&L[m]===0;)m++;let c="";for(;m<T;++m)c+=t.charAt(L[m]);return h>0?c.padStart(h,i):c}r(l,"encode");function u(y,h=-1){if(typeof y!="string")throw new TypeError("Expected String");if(y.length===0)return new Uint8Array;y=y.replace(/\s+/gi,"");let x=0,v=0;for(;y[x]===i;)x++;let w=(y.length-x)*s+1>>>0,b=new Uint8Array(w);for(;y[x];){let L=n[y.charCodeAt(x)];if(L===255)throw new Error(`Unsupported character "${y[x]}"`);let m=0;for(let c=w-1;(L!==0||m<v)&&c!==-1;c--,m++)L+=o*b[c]>>>0,b[c]=L%256>>>0,L=L/256>>>0;if(L!==0)throw new Error("Non-zero carry");v=m,x++;}let T=w-v;for(;T!==w&&b[T]===0;)T++;return h>0?new Uint8Array([...new Uint8Array(h-b.length+T),...b.slice(T)]):b.slice(T)}return r(u,"decode"),{encode:l,decode:u}}r(Ur,"_useBase");var Ae;function V(e){Ae==null&&(Ae=new Map);function t(){let i=Ae.get(e);return i==null&&(i=Ur(e),Ae.set(e,i)),i}r(t,"getFromCache");function n(i,s=-1){return t().encode(i,s)}r(n,"encode");function o(i,s=-1){return t().decode(i,s)}return r(o,"decode"),{encode:n,decode:o}}r(V,"useBase");function tt(e,t=-1){return V(32).encode(e,t)}r(tt,"encodeBase32");function tn(e,t=-1){return V(32).decode(e.toLocaleLowerCase().replaceAll("l","1").replaceAll("s","5").replaceAll("o","0").replaceAll("i","1"),t)}r(tn,"decodeBase32");function Xi(e,t=-1){return V(16).encode(e,t)}r(Xi,"encodeBase16");function es(e,t=-1){return V(16).decode(e,t)}r(es,"decodeBase16");function ts(e,t=-1){return V(58).encode(e,t)}r(ts,"encodeBase58");function ns(e,t=-1){return V(58).decode(e,t)}r(ns,"decodeBase58");function nt(e,t=-1){return V(62).encode(e,t)}r(nt,"encodeBase62");function nn(e,t=-1){return V(62).decode(e,t)}r(nn,"decodeBase62");function rs(e,t){return Math.ceil(e*(Math.log(256)/Math.log(t)))}r(rs,"estimateSizeForBase");function ss(e){return 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}r(ss,"toCamelCase");function Dr(e){return e.charAt(0).toUpperCase()+e.toLowerCase().slice(1)}r(Dr,"toCapitalize");function as(e){return e.replace(/\w\S*/g,Dr)}r(as,"toCapitalizeWords");function us(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(us,"fromCamelCase");var rn=["1","true","yes","y","on"];function ps(e,t=!1){return e==null||typeof e!="string"?t:rn.includes(String(e).trim().toLowerCase())}r(ps,"stringToBoolean");function ds(e,t=0){return e==null||typeof e!="string"?t:Number.parseInt(e.trim(),10)??t}r(ds,"stringToInteger");function gs(e,t=0){return e==null||typeof e!="string"?t:Number.parseFloat(e.trim())??t}r(gs,"stringToFloat");function
|
|
3
|
+
var fr=Object.defineProperty;var r=(e,t)=>fr(e,"name",{value:t,configurable:!0});function pr(){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(pr,"_global");function Z(e={}){let t=pr();return t._zeedGlobal==null&&(t._zeedGlobal=e),t._zeedGlobal}r(Z,"getGlobalContext");var K=-1,Y=0,ae=1,ue=2,ce=3,le=4,we=9007199254740991,qt={"*":-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:9007199254740991,"-":9007199254740991};function dr(){return crypto.getRandomValues(new Uint32Array(1))[0]/4294967295}r(dr,"getSecureRandom");function k(){return typeof crypto<"u"?dr():Math.random()}r(k,"getSecureRandomIfPossible");function ci(e=.25){return k()<e}r(ci,"randomBoolean");function li(e=100,t=0){return t+Math.floor(k()*(e-t))}r(li,"randomInt");function fi(e=100,t=0){return t+k()*(e-t)}r(fi,"randomFloat");function pi(e,t,n){return Math.max(e,Math.min(n,t))}r(pi,"between");function gr(e){return e.reduce((t,n)=>t+n,0)}r(gr,"sum");function di(e){return gr(e)/e.length}r(di,"avg");function gi(e){return !/^1?$|^(11+?)\1+$/.test("1".repeat(e))}r(gi,"isPrimeRX");function mi(e){for(let t=2;t<e;t++)if(e%t===0)return !1;return e>1}r(mi,"isPrime");var Ze=6;function yi(e=0,t=1,n){Ze=((n??Ze)*9301+49297)%233280;let o=Ze/233280;return t+o*(e-t)}r(yi,"seededRandom");function mr(e=""){let[t="",n="asc"]=e.split(" ");return n=n.toLowerCase(),{field:t,orderby:n,asc:n!=="desc",desc:n==="desc"}}r(mr,"parseOrderby");function xi(e,t=!0){return `${e} ${t?"asc":"desc"}`}r(xi,"composeOrderby");function Ke(e,t,n=!0){let o=e||0,i=t||0;return o>i?n?1:-1:o<i?n?-1:1:0}r(Ke,"cmp");function wi(e,...t){if(t.length>0){let n=t.map(mr),o=Array.from(e);return o.sort((i,s)=>{for(let{field:a,asc:l}of n){let u=Ke(i[a],s[a],l);if(u!==0)return u}return 0}),o}return e}r(wi,"sortedOrderby");function Ye(e){return e.filter((t,n)=>e.indexOf(t)===n)}r(Ye,"arrayUnique");function yr(e,t){return Ye(e.filter(n=>!t.includes(n)))}r(yr,"arrayMinus");function hr(...e){return Ye(e.reduce((t=[],n)=>t.concat(n),[]))}r(hr,"arrayUnion");function Q(...e){return e.flat(Number.POSITIVE_INFINITY)}r(Q,"arrayFlatten");function br(e,t){return Ye(e).filter(n=>t.includes(n))}r(br,"arrayIntersection");function Ci(e,t){return yr(hr(e,t),br(e,t))}r(Ci,"arraySymmetricDifference");function Wt(e,t){if(e&&Array.isArray(e)){let n;for(;(n=e.indexOf(t))!==-1;)e.splice(n,1);return e}return []}r(Wt,"arrayRemoveElement");function Ui(e,t){return e.includes(t)||e.push(t),e}r(Ui,"arraySetElement");function Qe(e,t){return e.splice(0,e.length,...e.filter(t)),e}r(Qe,"arrayFilterInPlace");function Di(e,t){let n=e.findIndex(o=>o===t);return n>=0?e.splice(n,1):e.push(t),e}r(Di,"arrayToggleInPlace");function Ei(e){return e.splice(0,e.length),e}r(Ei,"arrayEmptyInPlace");function Fi(e,t){return e.splice(0,e.length,...t),e}r(Fi,"arraySetArrayInPlace");function xr(e,t=Ke){return Array.from(e).sort(t)}r(xr,"arraySorted");function Si(e){return xr(e,(t,n)=>t-n)}r(Si,"arraySortedNumbers");function wr(e,t){return e.length===t.length&&e.every((n,o)=>n===t[o])}r(wr,"arrayIsEqual");function Jt(e){return e.sort(()=>k()>.5?1:-1),e}r(Jt,"arrayShuffleInPlace");function Ii(e){return Jt(Array.from(e))}r(Ii,"arrayShuffle");function ki(e){for(;e.length>1;){let t=Array.from(e);if(Jt(t),!wr(e,t))return t}return e}r(ki,"arrayShuffleForce");function Pi(e){return e[Math.floor(k()*e.length)]}r(Pi,"arrayRandomElement");function Ri(...e){return Q(e).reduce((t,n)=>t!=null?n>t?n:t:n,void 0)}r(Ri,"arrayMax");function Mi(...e){return Q(e).reduce((t,n)=>t!=null?n<t?n:t:n,void 0)}r(Mi,"arrayMin");function Bi(...e){return Q(e).reduce((t,n)=>t+n,0)}r(Bi,"arraySum");function Oi(...e){let t=Q(e);return t.reduce((n,o)=>n+o,0)/t.length}r(Oi,"arrayAvg");function $i(e,t){let n=[],o=0,i=e.length;for(;o<i;)n.push(e.slice(o,o+=t));return n}r($i,"arrayBatches");function _i(e=0,t){if(e<=0)return [];let n=Array.from({length:e});for(let o=0;o<e;o++)n[o]=t instanceof Function?t(o):t;return n}r(_i,"createArray");var Tr=r((e,t)=>t instanceof Object&&!Array.isArray(t)?Object.keys(t).sort().reduce((n,o)=>(n[o]=t[o],n),{}):t,"_sortedReplacer");function Vi(e,t=void 0){return JSON.stringify(e,Tr,t)}r(Vi,"jsonStringifySorted");function Lr(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 a=n.indexOf(this);~a?n.splice(a+1):n.push(this),~a?o.splice(a,Number.POSITIVE_INFINITY,i):o.push(i),~n.indexOf(s)&&(s=t?.call(this,i,s));}else n.push(s);try{return e==null?s:e.call(this,i,s)}catch{}return String(s)}}r(Lr,"serializer");function M(e,t,n,o){return JSON.stringify(e,Lr(t??void 0,o),n??void 0)}r(M,"jsonStringifySafe");var Hi=M;function vr(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(vr,"_encodeUtf8Polyfill");function Ar(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(Ar,"_decodeUtf8Polyfill");var Te;function Zt(e){if(Te==null&&(Te=vr,typeof TextEncoder<"u")){let t=new TextEncoder;Te=r(n=>t.encode(n),"_textEncoder");}return Te(e.normalize("NFC"))}r(Zt,"stringToUInt8Array");var Le;function Kt(e){if(Le==null&&(Le=Ar,typeof TextDecoder<"u")){let t=new TextDecoder("utf-8",{ignoreBOM:!0});Le=r(n=>t.decode(n),"_textDecoder");}return Le(e).normalize("NFC")}r(Kt,"Uint8ArrayToString");function U(e){return e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?Zt(e):e.length?new Uint8Array(e):e}r(U,"toUint8Array");function Wi(...e){let t=0,n=e.flat(1).map(s=>{let a=U(s);return t+=a.length,a}),o=new Uint8Array(t),i=0;for(let s of n)o.set(s,i),i+=s.length;return o}r(Wi,"joinToUint8Array");function Yt(e){if(typeof Buffer<"u")return Buffer.from(U(e)).toString("hex");let t="0123456789abcdef",n="";for(let o of [...U(e)])n+=t[o>>4]+t[o&15];return n}r(Yt,"toHex");function Qt(e){return Uint8Array.from(e.match(/.{1,2}/g).map(t=>Number.parseInt(t,16)))}r(Qt,"fromHex");function fe(e,t=!1){let n=U(e),o="";if(typeof Buffer<"u")o=Buffer.from(n).toString("base64");else {let i="";for(let s=0;s<n.byteLength;s++)i+=String.fromCharCode(n[s]);o=btoa(i);}return t?o.replaceAll("=",""):o}r(fe,"toBase64");function Ji(e){let t=U(e);if(typeof Buffer<"u")return Buffer.from(t).toString("base64url").replaceAll("=","");let n="";for(let o=0;o<t.byteLength;o++)n+=String.fromCharCode(t[o]);return btoa(n).replaceAll("+","-").replaceAll("/","_").replaceAll("=","")}r(Ji,"toBase64Url");function ve(e){if(e=e.replaceAll("-","+").replaceAll("_","/"),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(ve,"fromBase64");function Zi(e){return Kt(ve(e))}r(Zi,"fromBase64String");function Xt(e,t){if(e.byteLength!==t.byteLength)return !1;let n=U(e),o=U(t);for(let i=0;i<n.length;i++)if(n[i]!==o[i])return !1;return !0}r(Xt,"equalBinary");function Xe(e){return Zt(M(e))}r(Xe,"jsonToUint8Array");function et(e){return JSON.parse(Kt(e))}r(et,"Uint8ArrayToJson");function en(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)),a=`0000${i.toString(16)}`.slice(-4),l=s.split("").map(y=>{let h=y.charCodeAt(0);return ` ${o[(240&h)>>4]}${o[15&h]}`}).join("");l+=" ".repeat(t-s.length);let u=s.replace(/[\x00-\x1F\x20\x7F-\xA0\xAD]/g,".");u+=" ".repeat(t-s.length),n.push(`${a} ${l} ${u}`);}return n.join(`
|
|
4
|
+
`)}r(en,"Uint8ArrayToHexDump");var Cr={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 Ur(e){let t=Cr[String(e)];if(!t)if(typeof e=="string")t=e;else throw new Error(`Unknown base ${e}`);if(t.length>=255)throw new TypeError("Alphabet too long");let n=new Uint8Array(256);for(let y=0;y<n.length;y++)n[y]=255;for(let y=0;y<t.length;y++){let h=t.charAt(y),x=h.charCodeAt(0);if(n[x]!==255)throw new TypeError(`${h} is ambiguous`);n[x]=y;}let o=t.length,i=t.charAt(0),s=Math.log(o)/Math.log(256),a=Math.log(256)/Math.log(o);function l(y,h=-1){let x=U(y);if(x.byteLength===0)return "";let v=0,w=0,b=x.byteLength;for(;w!==b&&x[w]===0;)w++;let T=(b-w)*a+1>>>0,L=new Uint8Array(T);for(;w!==b;){let d=x[w],g=0;for(let f=T-1;(d!==0||g<v)&&f!==-1;f--,g++)d+=256*L[f]>>>0,L[f]=d%o>>>0,d=d/o>>>0;if(d!==0)throw new Error("Non-zero carry");v=g,w++;}let m=T-v;for(;m!==T&&L[m]===0;)m++;let c="";for(;m<T;++m)c+=t.charAt(L[m]);return h>0?c.padStart(h,i):c}r(l,"encode");function u(y,h=-1){if(typeof y!="string")throw new TypeError("Expected String");if(y.length===0)return new Uint8Array;y=y.replace(/\s+/gi,"");let x=0,v=0;for(;y[x]===i;)x++;let w=(y.length-x)*s+1>>>0,b=new Uint8Array(w);for(;y[x];){let L=n[y.charCodeAt(x)];if(L===255)throw new Error(`Unsupported character "${y[x]}"`);let m=0;for(let c=w-1;(L!==0||m<v)&&c!==-1;c--,m++)L+=o*b[c]>>>0,b[c]=L%256>>>0,L=L/256>>>0;if(L!==0)throw new Error("Non-zero carry");v=m,x++;}let T=w-v;for(;T!==w&&b[T]===0;)T++;return h>0?new Uint8Array([...new Uint8Array(h-b.length+T),...b.slice(T)]):b.slice(T)}return r(u,"decode"),{encode:l,decode:u}}r(Ur,"_useBase");var Ae;function V(e){Ae==null&&(Ae=new Map);function t(){let i=Ae.get(e);return i==null&&(i=Ur(e),Ae.set(e,i)),i}r(t,"getFromCache");function n(i,s=-1){return t().encode(i,s)}r(n,"encode");function o(i,s=-1){return t().decode(i,s)}return r(o,"decode"),{encode:n,decode:o}}r(V,"useBase");function tt(e,t=-1){return V(32).encode(e,t)}r(tt,"encodeBase32");function tn(e,t=-1){return V(32).decode(e.toLocaleLowerCase().replaceAll("l","1").replaceAll("s","5").replaceAll("o","0").replaceAll("i","1"),t)}r(tn,"decodeBase32");function Xi(e,t=-1){return V(16).encode(e,t)}r(Xi,"encodeBase16");function es(e,t=-1){return V(16).decode(e,t)}r(es,"decodeBase16");function ts(e,t=-1){return V(58).encode(e,t)}r(ts,"encodeBase58");function ns(e,t=-1){return V(58).decode(e,t)}r(ns,"decodeBase58");function nt(e,t=-1){return V(62).encode(e,t)}r(nt,"encodeBase62");function nn(e,t=-1){return V(62).decode(e,t)}r(nn,"decodeBase62");function rs(e,t){return Math.ceil(e*(Math.log(256)/Math.log(t)))}r(rs,"estimateSizeForBase");function ss(e){return 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}r(ss,"toCamelCase");function Dr(e){return e.charAt(0).toUpperCase()+e.toLowerCase().slice(1)}r(Dr,"toCapitalize");function as(e){return e.replace(/\w\S*/g,Dr)}r(as,"toCapitalizeWords");function us(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(us,"fromCamelCase");var rn=["1","true","yes","y","on"];function ps(e,t=!1){return e==null||typeof e!="string"?t:rn.includes(String(e).trim().toLowerCase())}r(ps,"stringToBoolean");function ds(e,t=0){return e==null||typeof e!="string"?t:Number.parseInt(e.trim(),10)??t}r(ds,"stringToInteger");function gs(e,t=0){return e==null||typeof e!="string"?t:Number.parseFloat(e.trim())??t}r(gs,"stringToFloat");function Er(e,t=!1){return e==null?t:typeof e=="boolean"?e:typeof e=="number"?e!==0:rn.includes(String(e).trim().toLowerCase())}r(Er,"valueToBoolean");function Fr(e,t=0){return e==null?t:typeof e=="boolean"?e?1:0:typeof e=="number"?Math.floor(e):Number.parseInt(String(e).trim(),10)??t}r(Fr,"valueToInteger");function Sr(e,t=0){return e==null?t:typeof e=="boolean"?e?1:0:typeof e=="number"?Math.floor(e):Number.parseFloat(String(e).trim())??t}r(Sr,"valueToFloat");function rt(e,t=""){return e==null?t:String(e)??t}r(rt,"valueToString");var ms=Sr,ys=Fr,hs=rt,bs=Er;function Ir(e,t={}){let{trace:n=!0,pretty:o=!0}=t;return e.map(i=>{if(i&&typeof i=="object"){if(o&&(i instanceof Uint8Array||i instanceof ArrayBuffer))return `
|
|
5
5
|
${en(i)}
|
|
6
6
|
`;if(i instanceof Error)return n?`${i.name||"Error"}: ${i.message}
|
|
7
|
-
${i.stack}`:`${i.name||"Error"}: ${i.message}`;try{return o?JSON.stringify(i,null,2):JSON.stringify(i)}catch{}}return String(i)})}r(Ir,"formatMessages");function xs(e,t={}){return Ir(e,t).join(" ")}r(xs,"renderMessages");function ws(e){try{return decodeURIComponent(escape(e))}catch{}return e}r(ws,"fixBrokenUth8String");function As(e){if(e.startsWith("data:"))return ve(e.split(",",2)[1])}r(As,"dataUriToUint8Array");function Cs(e){if(e.startsWith("data:"))return e.slice(5).split(",",2)[0]}r(Cs,"dataUriToMimeType");function Us(e){if(e.startsWith("data:")){let[t,n]=e.slice(5).split(",",2);return new Blob([ve(n)],{type:t})}}r(Us,"dataUriToBlob");async function Ds(e){let t=await e.arrayBuffer();if(t)return `data:${e.type},${fe(t)}`}r(Ds,"blobToDataUri");function Fs(e,t="application/octet-stream"){return `data:${t},${fe(e)}`}r(Fs,"Uint8ArrayToDataUri");function on(){let e,t;return [new Promise((o,i)=>{e=o,t=i;}),e,t]}r(on,"createPromise");async function Is(e){return new Promise(t=>setTimeout(t,e))}r(Is,"sleep");async function ks(){return new Promise(e=>setTimeout(e,0))}r(ks,"immediate");async function Ps(e,t,n="timeoutReached"){return new Promise(async(o,i)=>{let s=!1,a=setTimeout(()=>{s=!0,o(n);},t);try{let l=await e;clearTimeout(a),s||o(l);}catch(l){clearTimeout(a),s||i(l);}})}r(Ps,"timeout");function Rs(e){return e==="timeoutReached"||e?.name==="Timeout reached"}r(Rs,"isTimeout");async function sn(e,t){return t<=0?await e:new Promise(async(n,o)=>{let i=!1,s=setTimeout(()=>{i=!0,o(new Error("Timeout reached"));},t);try{let a=await e;clearTimeout(s),i||n(a);}catch(a){clearTimeout(s),i||o(a);}})}r(sn,"tryTimeout");function Ms(e,t,n=1e3){return new Promise((o,i)=>{let s=r(u=>{l&&(clearTimeout(l),a(),o(u));},"fn"),a=r(()=>{l=null,e.off?e.off(t,s):e.removeEventListener&&e.removeEventListener(t,s);},"done"),l=setTimeout(()=>{a(),i(new Error("Did not response in time"));},n);e.on?e.on(t,s):e.addEventListener&&e.addEventListener(t,s);})}r(Ms,"waitOn");function P(e){return !!(e&&(e instanceof Promise||typeof e.then=="function"))}r(P,"isPromise");function z(e){return Promise.resolve(e)}r(z,"promisify");var an=864e5;function it(e){return Math.floor(e/1e4)}r(it,"dayYear");function un(e){return Math.floor(e/100%100)}r(un,"dayMonth");function kr(e){return Math.floor(e%100)}r(kr,"dayDay");function $s(e){return [it(e),un(e),kr(e)]}r($s,"dayToParts");function cn(e,t=!1){return t?new Date(`${Rr(e)}T00:00:00.000Z`):new Date(e/1e4,e/100%100-1,e%100)}r(cn,"dayToDate");function ln(){return Ue(new Date)}r(ln,"dayFromToday");function _s(e,t=!1){if(typeof e=="number")return e<100?void 0:e;if(typeof e=="string")return fn(e);if(Array.isArray(e)&&e.length===3){let[n,o,i]=e;return st(n,o,i)}else if(e instanceof Date)return Ue(e,t)}r(_s,"dayFromAny");function Ns(e){return cn(e,!0)}r(Ns,"dayToDateGMT");function Ue(e,t=!1){return t?fn(e.toISOString()):e.getFullYear()*1e4+(e.getMonth()+1)*100+e.getDate()}r(Ue,"dayFromDate");function js(e){return Ue(e,!0)}r(js,"dayFromDateGMT");function ot(e,t=!0){return cn(e,t).getTime()}r(ot,"dayToTimestamp");function Pr(e,t=!0){return Ue(new Date(e),t)}r(Pr,"dayFromTimestamp");function Rr(e,t="-"){let n=String(e);return n.slice(0,4)+t+n.slice(4,6)+t+n.slice(6,8)}r(Rr,"dayToString");function st(e,t=1,n=1){if(!(t<1||t>12||n<1||n>31))return e*1e4+t*100+n}r(st,"dayFromParts");function fn(e){let t=String(e).replace(/[^0-9]/g,"").slice(0,8);if(t.length===8)return +t}r(fn,"dayFromString");function Vs(e,t=0){let n=it(e),o=un(e);return t!==0&&(o+=t,n+=Math.floor((o-1)/12),o=Math.floor((o-1)%12)+1,o===0&&(o=12)),st(n,o,1)}r(Vs,"dayMonthStart");function Hs(e,t=0){let n=it(e);return st(n+t,1,1)}r(Hs,"dayYearStart");function Ce(e,t){return Pr(ot(e)+t*864e5)}r(Ce,"dayOffset");function zs(e,t){return Math.round((ot(t)-ot(e))/864e5)}r(zs,"dayDiff");function Gs(e,t){let n=[];for(t==null&&(t=ln()),e<0&&(e=Ce(t,e+1));e<=t;)n.push(e),e=Ce(e,1);return n}r(Gs,"dayRange");function*qs(e,t){let n=[];for(t==null&&(t=ln()),e<0&&(e=Ce(t,e+1));e<=t;)yield e,e=Ce(e,1);return n}r(qs,"dayIterator");var E=class E{get value(){return this.days}constructor(t){if(typeof t=="number"){this.days=t;return}if(t!=null&&(t=E.from(t)?.days),t==null){let n=new Date;this.days=n.getFullYear()*1e4+(n.getMonth()+1)*100+n.getDate();}else this.days=t;}static fromNumber(t){return new E(t)}static fromString(t){return E.from(+t.replace(/[^0-9]/g,"").slice(0,8))}static fromDate(t,n=!1){return n?E.fromString(t.toISOString().substr(0,10)):E.from(t.getFullYear()*1e4+(t.getMonth()+1)*100+t.getDate())}static fromDateGMT(t){return E.fromDate(t,!0)}static from(t,n=!1){if(typeof t=="number")return t<100?void 0:new E(t);if(typeof t=="string")return E.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 E(o*1e4+i*100+s)}else {if(t instanceof Date)return E.fromDate(t,n);if(t instanceof E)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 E.fromDateGMT(new Date(this.toDateGMT().getTime()+t*864e5))}monthStart(){return E.from([this.year,this.month,1])}yearStart(){return E.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 E.from([this.year+i,o,this.day])}daysUntil(t){return Math.round((new E(t)?.toDateGMT().getTime()-this.toDateGMT().getTime())/864e5)}yesterday(){return this.dayOffset(-1)}tomorrow(){return this.dayOffset(1)}};r(E,"Day");var G=E;async function Ks(e,t,n){let o=G.from(e),i=G.from(t);for(;o&&i&&o?.days<=i?.days;){let s=n(o);P(s)&&await s,o=o.dayOffset(1);}}r(Ks,"forEachDay");function Ys(){return new G}r(Ys,"today");function Qs(e){return new G(e)}r(Qs,"day");function Xs(e){return G.fromDate(new Date(e)).days}r(Xs,"dateStringToDays");function Mr(e,t=2){return +(+e).toFixed(t)}r(Mr,"decimal");function na(e,t=2){return +(+e/10**t).toFixed(t)}r(na,"decimalFromCents");function ra(e,t=2){return Math.round(+e*10**t)}r(ra,"decimalToCents");function oa(e,t=2){return t*(Mr(e,t)%1)}r(oa,"decimalCentsPart");function ua(e,t,n){let o=e[t];return o===void 0&&(o=n(t,e),e[t]=o),o}r(ua,"ensureKey");async function ca(e,t,n){let o=e[t];return o===void 0&&(o=await n(t,e),e[t]=o),o}r(ca,"ensureKeyAsync");function pn(e){return e!=null?e.size!=null?e.size:e.length!=null?e.length:Object.keys(e).length:0}r(pn,"size");function la(e){return e!=null&&e.length>0?e[0]:void 0}r(la,"first");function fa(e){return e!=null&&e.length>0?e[e.length-1]:void 0}r(fa,"last");function pa(e){try{if(e!=null)return Array.isArray(e)||typeof e=="string"?e.length<=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(pa,"empty");function at(e){return Object(e)!==e?e:JSON.parse(M(e))}r(at,"cloneObject");function da(e){return Object(e)!==e?e:JSON.parse(M(e))}r(da,"cloneJsonObject");function ga(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(ga,"memoize");function ma(e){let t=new Map;return async(...n)=>{let o=M(n);if(t.has(o))return t.get(o);let i=await e(...n);return t.set(o,i),i}}r(ma,"memoizeAsync");function ya(e,t){let n=[];for(let o=0;o<e;o++)n.push(t(o,e));return n}r(ya,"forTimes");function $(e){return e!=null&&typeof e=="object"}r($,"isObject");function ut(e){return Object(e)!==e}r(ut,"isPrimitive");function N(e){return Array.isArray(e)}r(N,"isArray");function De(e){return $(e)&&!N(e)}r(De,"isRecord");function wa(e){return e?.constructor===Object}r(wa,"isRecordPlain");function Fe(e){return typeof e=="string"}r(Fe,"isString");function dn(e){return typeof e=="number"&&!Number.isNaN(e)}r(dn,"isNumber");function Ta(e){return dn(e)&&Number.isInteger(e)}r(Ta,"isInteger");function La(e){return dn(e)&&Number.isSafeInteger(e)}r(La,"isSafeInteger");function gn(e){return typeof e=="boolean"}r(gn,"isBoolean");function va(e){return e==null}r(va,"isNullOrUndefined");function Aa(e){return e==null}r(Aa,"isNull");function Ca(e){return $(e)&&e.constructor.name==="Uint8Array"}r(Ca,"isUint8Array");function Ua(e){return e!=null}r(Ua,"isNotNull");function ct(e){return e==null||e===""||$(e)&&pn(e)<=0}r(ct,"isEmpty");function Da(e){return !ct(e)}r(Da,"isNotEmpty");function Fa(e){return e!=null&&e!==!1&&e!==!0}r(Fa,"isValue");function Ea(e){return e!=null&&e!==!1&&e!==0&&e!==""}r(Ea,"isTruthy");function Br(e,t,n=new WeakSet){if(e===t)return !0;if(n.has(t)||(ut(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(!Br(i,s,n))return !1}for(let o in t)if(t.hasOwnProperty(o)&&!e.hasOwnProperty(o))return !1;return !0}r(Br,"deepEqual");function Or(e,t=new WeakSet){if(t.has(e))return "[Circular ~]";if(ut(e)||t.add(e),De(e)){for(let n in e)if(e.hasOwnProperty(n)){if(e[n]===void 0){delete e[n];continue}Or(e[n],t);}}else if(N(e))for(let n=e.length-1;n>=0;n--)e[n]===void 0&&e.splice(n,1);return e}r(Or,"deepStripUndefinedInPlace");function Ee(e,...t){for(let n of t)$(e)||(e={}),!(n==null||!$(n))&&Object.keys(n).forEach(o=>{let i=e[o],s=n[o];Array.isArray(i)&&Array.isArray(s)?e[o]=i.concat(s):$(i)&&$(s)?e[o]=Ee(Object.assign({},i),s):e[o]=s;});return e}r(Ee,"deepMerge");function $r(e,t,n={cyclesFix:!0},o=[]){let i=[],s=Array.isArray(e);for(let l in e){let u=e[l],y=s?+l:l;if(!(l in t)){i.push({type:"del",path:[y]});continue}let h=t[l],x=typeof u=="object"&&typeof h=="object";if(u&&h&&x&&!["Date","RegExp","String","Number"].includes(Object.getPrototypeOf(u).constructor.name)&&(!n.cyclesFix||!o.includes(u))){let v=$r(u,h,n,n.cyclesFix?o.concat([u]):[]);i=[...i,...v.map(w=>(w.path.unshift(y),w))];}else u!==h&&!(x&&(Number.isNaN(u)?`${u}`==`${h}`:+u==+h))&&i.push({path:[y],type:"upd",value:h});}let a=Array.isArray(t);for(let l in t)l in e||i.push({type:"new",path:[a?+l:l],value:t[l]});return i}r($r,"diffObjects");function mn(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""")}r(mn,"escapeHTML");function Oa(e){return e.replace(/</gi,"<").replace(/>/gi,">").replace(/"/gi,'"').replace(/'/gi,"'").replace(/&/gi,"&")}r(Oa,"unescapeHTML");function Na(e,t,n=[]){return e.filter(o=>!t.some(i=>!i(o))).map(o=>{for(let i of n)o=i(o);return o}).filter(o=>o!=null)}r(Na,"listQuery");function ja(e,t){return e.reduce((n,o)=>{let i=String(o[t]);return (n[i]=n[i]||[]).push(o),n},{})}r(ja,"listGroupBy");function Va(e,t){return Array.from(e.reduce((n,o)=>n.add(o[t]),new Set))}r(Va,"listDistinctUnion");function Ha(e,t){return e.map(n=>n[t])}r(Ha,"listOfKey");function Wa(e,t){return $(e)?Object.fromEntries(Object.entries(e).map(([n,o])=>{let i=t(n,o);return N(i)&&i.length===2?i:[n,i]}).filter(n=>n!=null)):{}}r(Wa,"objectMap");function Ja(e,t){return t.dispose&&e.dispose&&t.dispose.add(e.dispose),Object.assign(e,t)}r(Ja,"objectMergeDisposable");function Za(e){return Object.keys(e).length<=0}r(Za,"objectIsEmpty");var _r=/[\\\-\[\]\/{}()*+?.^$|]/g;function Se(e){return e?e instanceof RegExp?e.source:e.replace(_r,"\\$&"):""}r(Se,"escapeRegExp");var Nr=100,jr=/^\.+/,Vr=/\.+$/,Hr=/[<>:\"/\\|?*\u0000-\u001F\u0080-\u009F]+/gm;function yn(){return Hr}r(yn,"filenameReservedRegex");function zr(){return /^(con|prn|aux|nul|com\d|lpt\d)$/i}r(zr,"windowsReservedNameRegex");function tu(e,t="_"){if(typeof e!="string")throw new TypeError("Expected a string");if(yn().test(t))throw new Error("Replacement string cannot contain reserved filename characters");let n=`(${Se(t)})+`;return e=e.replace(yn(),t).replace(jr,t).replace(Vr,"").replace(new RegExp(n,"gm"),t).trim(),e=zr().test(e)?e+t:e,e.slice(0,Nr)}r(tu,"toValidFilename");function pe(e){return Math.abs(e)%1===.5}r(pe,"isHalf");function hn(e){return e%2===0}r(hn,"isEven");var ou=r(e=>Math.ceil(e),"roundUp"),iu=r(e=>Math.floor(e),"roundDown"),su=r(e=>Math.round(e),"roundHalfUp"),au=r(e=>{let t=Math.round(e);return pe(e)&&hn(t)?t-1:t},"roundHalfOdd"),uu=r(e=>pe(e)?Math.sign(e)*Math.ceil(Math.abs(e)):Math.round(e),"roundHalfAwayFromZero"),cu=r(e=>pe(e)?Math.floor(e):Math.round(e),"roundHalfDown"),lu=r(e=>{let t=Math.round(e);return pe(e)?hn(t)?t:t-1:t},"roundHalfEven"),fu=r(e=>pe(e)?Math.sign(e)*Math.floor(Math.abs(e)):Math.round(e),"roundHalfTowardsZero");function bn(e){return e.reduce((t,n)=>Math.min(t,n.sort_weight||0),0)-1-k()}r(bn,"startSortWeight");function xn(e){return e.reduce((t,n)=>Math.max(t,n.sort_weight||0),0)+1+k()}r(xn,"endSortWeight");function mu(e,t,n){let o=n.length,i=e<t;if(o<=0||e>=o-1)return xn(n);if(e<=0)return bn(n);n=Gr([...n]);let s=i?-1:0,a=n[e+s].sort_weight||0,u=(n[e+s+1].sort_weight||0)-a;if(u===0)return i?bn(n):xn(n);let y=a+u/2,h=u*.01*(k()-.5);return y+h}r(mu,"moveSortWeight");function Gr(e){return e.sort((t,n)=>(t.sort_weight||0)-(n.sort_weight||0)),e}r(Gr,"sortedItems");function xu(e={}){let{getter:t=r(l=>l.sort,"getter")}=e;function n(l){return l.sort((u,y)=>(t(u)||0)-(t(y)||0)),l}r(n,"items");function o(l){return l.reduce((u,y)=>Math.min(u,t(y)||0),0)-1-k()}r(o,"start");function i(l){return l.reduce((u,y)=>Math.max(u,t(y)||0),0)+1+k()}r(i,"end");function s(l,u){l==null&&(l=(u??0)-1),u==null&&(u=(l??0)+1);let y=u-l,h=l+y/2,x=y*.01*(k()-.5);return h+x}r(s,"between");function a(l,u,y){let h=y.length,x=l<u;if(h<=0||l>=h-1)return i(y);if(l<=0)return o(y);y=n([...y]);let v=x?-1:0,w=t(y[l+v])||0,T=(t(y[l+v+1])||0)-w;if(T===0)return x?o(y):i(y);let L=w+T/2,m=T*.01*(k()-.5);return L+m}return r(a,"move"),{start:o,end:i,between:s,move:a,items:n}}r(xu,"useSorted");function qr(e){return t=>e?.[t]}r(qr,"basePropertyOf");var Wr={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Jr=qr(Wr),Zr=/[\xC0-\xD6\xD8-\xF6\xF8-\xFF\u0100-\u017F]/g,Kr="\\u0300-\\u036f",Yr="\\ufe20-\\ufe2f",Qr="\\u20d0-\\u20ff",Xr="\\u1ab0-\\u1aff",eo="\\u1dc0-\\u1dff",to=Kr+Yr+Qr+Xr+eo,no=`[${to}]`,ro=RegExp(no,"g");function wn(e){return e&&e.replace(Zr,Jr).replace(ro,"")}r(wn,"deburr");var oo=/((?:(?:(?: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 Cu(e){return e.split(oo).map((t,n)=>{let o=mn(t);return n%2?`<a target="_blank" href="${o}">${io(o)}</a>`:o}).join("")}r(Cu,"linkifyPlainText");function io(e){return e.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")}r(io,"toHumanReadableUrl");function Tn(e,t){let n=[];for(let[o,i]of Object.entries(e))if(i!=null){Array.isArray(i)||(i=[i]);for(let s of i)t&&!t(s)||s!=null&&n.push(`${encodeURIComponent(o)}=${encodeURIComponent(String(s))}`);}return n.join("&")}r(Tn,"encodeQuery");function Uu(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]),a=decodeURIComponent(i[1]||"");t[s]!=null?(Array.isArray(t[s])||(t[s]=[t[s]]),t[s].push(a)):t[s]=a;}return t}r(Uu,"parseQuery");var Ln=["aardvark","absurd","accrue","acme","adrift","adult","afflict","ahead","aimless","Algol","allow","alone","ammo","ancient","apple","artist","assume","Athens","atlas","Aztec","baboon","backfield","backward","basalt","beaming","bedlamp","beehive","beeswax","befriend","Belfast","berserk","billiard","bison","blackjack","blockade","blowtorch","bluebird","bombast","bookshelf","brackish","breadline","breakup","brickyard","briefcase","Burbank","button","buzzard","cement","chairlift","chatter","checkup","chisel","choking","chopper","Christmas","clamshell","classic","classroom","cleanup","clockwork","cobra","commence","concert","cowbell","crackdown","cranky","crowfoot","crucial","crumpled","crusade","cubic","deadbolt","deckhand","dogsled","dosage","dragnet","drainage","dreadful","drifter","dropper","drumbeat","drunken","Dupont","dwelling","eating","edict","egghead","eightball","endorse","endow","enlist","erase","escape","exceed","eyeglass","eyetooth","facial","fallout","flagpole","flatfoot","flytrap","fracture","fragile","framework","freedom","frighten","gazelle","Geiger","Glasgow","glitter","glucose","goggles","goldfish","gremlin","guidance","hamlet","highchair","hockey","hotdog","indoors","indulge","inverse","involve","island","Janus","jawbone","keyboard","kickoff","kiwi","klaxon","lockup","merit","minnow","miser","Mohawk","mural","music","Neptune","newborn","nightbird","obtuse","offload","oilfield","optic","orca","payday","peachy","pheasant","physique","playhouse","Pluto","preclude","prefer","preshrunk","printer","profile","prowler","pupil","puppy","python","quadrant","quiver","quota","ragtime","ratchet","rebirth","reform","regain","reindeer","rematch","repay","retouch","revenge","reward","rhythm","ringbolt","robust","rocker","ruffled","sawdust","scallion","scenic","scorecard","Scotland","seabird","select","sentence","shadow","showgirl","skullcap","skydive","slingshot","slothful","slowdown","snapline","snapshot","snowcap","snowslide","solo","spaniel","spearhead","spellbind","spheroid","spigot","spindle","spoilage","spyglass","stagehand","stagnate","stairway","standard","stapler","steamship","stepchild","sterling","stockman","stopwatch","stormy","sugar","surmount","suspense","swelter","tactics","talon","tapeworm","tempest","tiger","tissue","tonic","tracker","transit","trauma","treadmill","Trojan","trouble","tumor","tunnel","tycoon","umpire","uncut","unearth","unwind","uproot","upset","upshot","vapor","village","virus","Vulcan","waffle","wallet","watchword","wayside","willow","woodlark","Zulu"],vn=["adroitness","adviser","aggregate","alkali","almighty","amulet","amusement","antenna","applicant","Apollo","armistice","article","asteroid","Atlantic","atmosphere","autopsy","Babylon","backwater","barbecue","belowground","bifocals","bodyguard","borderline","bottomless","Bradbury","Brazilian","breakaway","Burlington","businessman","butterfat","Camelot","candidate","cannonball","Capricorn","caravan","caretaker","celebrate","cellulose","certify","chambermaid","Cherokee","Chicago","clergyman","coherence","combustion","commando","company","component","concurrent","confidence","conformist","congregate","consensus","consulting","corporate","corrosion","councilman","crossover","cumbersome","customer","Dakota","decadence","December","decimal","designing","detector","detergent","determine","dictator","dinosaur","direction","disable","disbelief","disruptive","distortion","divisive","document","embezzle","enchanting","enrollment","enterprise","equation","equipment","escapade","Eskimo","everyday","examine","existence","exodus","fascinate","filament","finicky","forever","fortitude","frequency","gadgetry","Galveston","getaway","glossary","gossamer","graduate","gravity","guitarist","hamburger","Hamilton","handiwork","hazardous","headwaters","hemisphere","hesitate","hideaway","holiness","hurricane","hydraulic","impartial","impetus","inception","indigo","inertia","infancy","inferno","informant","insincere","insurgent","integrate","intention","inventive","Istanbul","Jamaica","Jupiter","leprosy","letterhead","liberty","maritime","matchmaker","maverick","Medusa","megaton","microscope","microwave","midsummer","millionaire","miracle","misnomer","molasses","molecule","Montana","monument","mosquito","narrative","nebula","newsletter","Norwegian","October","Ohio","onlooker","opulent","Orlando","outfielder","Pacific","pandemic","pandora","paperweight","paragon","paragraph","paramount","passenger","pedigree","Pegasus","penetrate","perceptive","performance","pharmacy","phonetic","photograph","pioneer","pocketful","politeness","positive","potato","processor","prophecy","provincial","proximate","puberty","publisher","pyramid","quantity","racketeer","rebellion","recipe","recover","repellent","replica","reproduce","resistor","responsive","retraction","retrieval","retrospect","revenue","revival","revolver","Sahara","sandalwood","sardonic","Saturday","savagery","scavenger","sensation","sociable","souvenir","specialist","speculate","stethoscope","stupendous","supportive","surrender","suspicious","sympathy","tambourine","telephone","therapist","tobacco","tolerance","tomorrow","torpedo","tradition","travesty","trombonist","truncated","typewriter","ultimate","undaunted","underfoot","unicorn","unify","universe","unravel","upcoming","vacancy","vagabond","versatile","vertigo","Virginia","visitor","vocalist","voyager","warranty","Waterloo","whimsical","Wichita","Wilmington","Wyoming","yesteryear","Yucatan"];function Iu(e,t=" ",n=" "){return Array.from(e).map((o,i)=>i%2?vn[o]+n:Ln[o]+t).join("").slice(0,-(e.length%2?t:n).length)}r(Iu,"Uint8ArrayToWords");function ku(e){return U(e.map((t,n)=>(n%2?vn:Ln).findIndex(o=>o.toLocaleLowerCase()===wn(t).toLocaleLowerCase().trim())))}r(ku,"wordsToUint8Array");var so=/\\\s|\s+|#[^\n]*\n?/gm,ao=/\(\?P?<(\w[\w\d_]+)>|\((?!\?(:|\!|=|<=|<\!))/gm,An=/^((?:\(\?[\w$]+\))?)\(\?<([=!])([\s\S]*?)\)/gm;function uo(e){return typeof e=="string"?e:e.source||""}r(uo,"regExpString");function Mu(e){return e.replace(/[-\[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}r(Mu,"regExpEscape");var lt=class lt{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(so,l=>l[0]==="\\"?l:"")),!(t instanceof RegExp)){let l=0;i=i.replace(ao,(u,y)=>(l+=1,y?(y!=="index"&&y!=="length"&&!this.namedGroups[y]&&(this.namedGroups[y]=l),"("):u)),this.names=Object.keys(this.namedGroups);}i=uo(i),An.lastIndex=0;let a=An.exec(i);a&&(this.lookBehind={rx:new RegExp(`${a[3]}$(?!\\s)`),expect:a?a[2]==="=":!a},i=i.substr(a[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(lt,"XRX");var Cn=lt;function co(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(co,"getNamespaceFilterString");function lo(){return co(typeof process<"u"?process.env.ZEED??process.env.DEBUG:typeof localStorage<"u"?localStorage.zeed??localStorage.debug:"*")}r(lo,"getDefaultNamespaceFilter");function _(e=lo()){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,]+/),a=s.length;for(i=0;i<a;i++){if(!s[i])continue;let l=s[i].replace(/\*/g,".*?");l[0]==="-"?n.push(new RegExp(`^${l.substr(1)}`)):o.push(new RegExp(`^${l}`));}t=r(function(l){if(n.length===0&&o.length===0)return !0;let u,y;for(u=0,y=n.length;u<y;u++)if(n[u].test(l))return !1;for(u=0,y=o.length;u<y;u++)if(o[u].test(l))return !0;return !1},"fn");}return t.accept=o,t.reject=n,t.filter=e,t}r(_,"useNamespaceFilter");function fo(){return 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}r(fo,"getDefaultLevelFilter");function de(e){if(e===!1)return 9007199254740991;if(typeof e=="number")return e;if(typeof e=="string"){let t=qt[e.toLocaleLowerCase().trim()];if(t!=null)return t}return -1}r(de,"parseLogLevel");function X(e=fo()){let t=de(e);return n=>n>=t}r(X,"useLevelFilter");function ge(...e){return Fe(e[1])?[`${String(e[0])} ${String(e[1])}`,...e.slice(2)]:e}r(ge,"joinLogStrings");function Ie(e={}){let{level:t=void 0,filter:n=void 0}=e,o=_(n),i=X(t);return s=>{if(!i(s.level)||!o(s.name))return;let a=s.name?`[${s.name}]`:"";switch(s.level){case 1:console.info(...ge(`I|* ${a}`,...s.messages));break;case 2:console.warn(...ge(`W|** ${a}`,...s.messages));break;case 3:console.error(...ge(`E|*** ${a}`,...s.messages));break;default:console.debug(...ge(`D| ${a}`,...s.messages));break}}}r(Ie,"LoggerConsoleHandler");function Un(e=""){let t=[Ie()],n=r(u=>!0,"logCheckNamespace"),o=!1,i=a,s=!1;function a(u="",y){let h=de(y??-1);function x(b,T){return h<=b?T:()=>{}}r(x,"defineForLogLevel");let v=r(b=>{if(n(u))for(let T of t)T&&T(b);},"emit"),w=x(0,(...b)=>{v({name:u,messages:b,level:0});});return w.label=u,w.extend=function(b){return i(u?`${u}:${b}`:b)},w.debug=x(0,(...b)=>{v({name:u,messages:b,level:0});}),w.info=x(1,(...b)=>{v({name:u,messages:b,level:1});}),w.warn=x(2,(...b)=>{v({name:u,messages:b,level:2});}),w.error=x(3,(...b)=>{v({name:u,messages:b,level:3});}),w.fatal=x(4,(...b)=>{throw v({name:u,messages:b,level:4}),new Error(`${b.map(String).join(" ")}`)}),w.assert=x(4,(b,...T)=>{(b==null||typeof b=="number"&&Number.isNaN(b)||!b)&&w.fatal(...T);}),w}r(a,"LoggerBaseFactory");function l(u="",y){let h=i(u,y);return s&&h.debug(`+++ init of logger "${u}" on level "${h.level}".`),h}return r(l,"Logger"),l.registerHandler=function(u){t.push(u);},l.setFilter=function(u){n=_(u);},l.setLock=(u=!0)=>o=u,l.setDebug=(u=!0)=>s=u,l.setHandlers=function(u=[]){i!==a&&(i=a),!o&&(t=[...u].filter(y=>typeof y=="function"));},l.level=-1,l.setLogLevel=function(u=-1){o||(l.level=u);},l.setFactory=function(u){o||(i=u);},l}r(Un,"LoggerContext");var j;function ft(e){let t=Un();return e?e(t):t.setHandlers([Ie()]),t}r(ft,"getLoggerContext");function pt(e){if(j==null)try{let t=Z();t!=null?t?.logger==null?(j=ft(e),t.logger=j):j=t.logger:j=ft(e);}catch{j=ft(e);}return j}r(pt,"getGlobalLogger");function Dn(){if(j!=null)return j;try{let e=Z();if(e?.logger!=null)return e.logger}catch{}}r(Dn,"getGlobalLoggerIfExists");function R(e,t){return pt()(e,t)}r(R,"DefaultLogger");var Fn=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function ke(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return Fn[Math.abs(t)%Fn.length]}r(ke,"browserSelectColorByName");function q(){return Date.now()}r(q,"getTimestamp");function dt(e){return e>999?`${(e/1e3).toFixed(1)} s`:`${e.toFixed(2)} ms`}r(dt,"formatMilliseconds");function nc(...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(nc,"parseDate");function En(){return typeof performance<"u"?performance.now():Date.now()}r(En,"getPerformanceTimestamp");function rc(){let e=En();return function(){let t=En()-e;return dt(t)}}r(rc,"duration");function uc(e){let{level:t=void 0,filter:n=void 0,messages:o=[]}=e,i=_(n),s=X(t);return a=>{s(a.level)&&i(a.name)&&(a.timestamp=q(),o.push(a));}}r(uc,"LoggerMemoryHandler");function po(...e){throw Dn()?.("assert")?.fatal(...e),new Error(`${e.map(String).join(" ")}`)}r(po,"fatal");function go(e,...t){(e==null||typeof e=="number"&&Number.isNaN(e)||!e)&&po(...t);}r(go,"assert");function Sn(e,...t){go(e,...t);}r(Sn,"assertCondition");function me(e,t,n){return new Uint8Array(e,t,n)}r(me,"createUint8ArrayViewFromArrayBuffer");function mo(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);return o}r(mo,"_encodeUtf8Polyfill");var Pe;function Re(){return Pe===void 0&&(Pe=typeof TextEncoder<"u"?new TextEncoder:null),Pe}r(Re,"getUtf8TextEncoder");function In(e){return Re()?Pe.encode(e):mo(e)}r(In,"encodeUtf8");var ee;function kn(){return ee===void 0&&(ee=(typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0}))??null,ee&&ee.decode(new Uint8Array).length===1&&(ee=null)),ee}r(kn,"getUtf8TextDecoder");var xt=class xt{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[];}};r(xt,"Encoder");var gt=xt;function Oe(){return new gt}r(Oe,"createEncoder");function mt(e){let t=e.cpos;for(let n=0;n<e.bufs.length;n++)t+=e.bufs[n].length;return t}r(mt,"length");function $e(e){let t=new Uint8Array(mt(e)),n=0;for(let o=0;o<e.bufs.length;o++){let i=e.bufs[o];t.set(i,n),n+=i.length;}return t.set(me(e.cbuf.buffer,0,e.cpos),n),t}r($e,"encodeToUint8Array");function ho(e,t){let n=e.cbuf.length;n-e.cpos<t&&(e.bufs.push(me(e.cbuf.buffer,0,e.cpos)),e.cbuf=new Uint8Array(Math.max(n,t)*2),e.cpos=0);}r(ho,"verifyLen");function F(e,t){let n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(n*2),e.cpos=0),e.cbuf[e.cpos++]=t;}r(F,"write");var Bn=F;function On(e,t){F(e,t&255),F(e,t>>>8&255);}r(On,"writeUint16");function $n(e,t){for(let n=0;n<4;n++)F(e,t&255),t>>>=8;}r($n,"writeUint32");function W(e,t){for(;t>127;)F(e,128|127&t),t=Math.floor(t/128);F(e,127&t);}r(W,"writeVarUint");function bo(e){return e!==0?e<0:1/e<0}r(bo,"isNegativeZero");function yt(e,t){let n=bo(t);for(n&&(t=-t),F(e,(t>63?128:0)|(n?64:0)|63&t),t=Math.floor(t/64);t>0;)F(e,(t>127?128:0)|127&t),t=Math.floor(t/128);}r(yt,"writeVarInt");function _e(e,t){let n=e.cbuf.length,o=e.cpos,i=Math.min(n-o,t.length),s=t.length-i;e.cbuf.set(t.subarray(0,i),o),e.cpos+=i,s>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(Math.max(n*2,s)),e.cbuf.set(t.subarray(i)),e.cpos=s);}r(_e,"writeUint8Array");function Ne(e,t){W(e,t.byteLength),_e(e,t);}r(Ne,"writeVarUint8Array");var ye,Mn;function xo(e,t){if(ye==null&&(ye=new Uint8Array(3e4),Mn=ye.length/3),t.length<Mn){let n=Re().encodeInto(t,ye).written||0;W(e,n);for(let o=0;o<n;o++)F(e,ye[o]);}else Ne(e,In(t));}r(xo,"_writeVarStringNative");function wo(e,t){let n=unescape(encodeURIComponent(t)),o=n.length;W(e,o);for(let i=0;i<o;i++)F(e,n.codePointAt(i));}r(wo,"_writeVarStringPolyfill");function Be(e,t){return Re()?.encodeInto?xo(e,t):wo(e,t)}r(Be,"writeVarString");function ht(e,t){ho(e,t);let n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n}r(ht,"writeOnDataView");function bt(e,t){return ht(e,4).setFloat32(0,t,!1)}r(bt,"writeFloat32");function To(e,t){return ht(e,8).setFloat64(0,t,!1)}r(To,"writeFloat64");function Lo(e,t){return ht(e,8).setBigInt64(0,t,!1)}r(Lo,"writeBigInt64");var Me;function vo(e){return Me==null&&(Me=new DataView(new ArrayBuffer(4))),Me.setFloat32(0,e),Me.getFloat32(0)===e}r(vo,"isFloat32");function ne(e,t){switch(typeof t){case"string":F(e,119),Be(e,t);break;case"number":Number.isInteger(t)&&Math.abs(t)<=2147483647?(F(e,125),yt(e,t)):vo(t)?(F(e,124),bt(e,t)):(F(e,123),To(e,t));break;case"bigint":F(e,122),Lo(e,t);break;case"object":if(t===null)F(e,126);else if(Array.isArray(t)){F(e,117),W(e,t.length);for(let n=0;n<t.length;n++)ne(e,t[n]);}else if(t instanceof Uint8Array)F(e,116),Ne(e,t);else {F(e,118);let n=Object.keys(t);W(e,n.length);for(let o=0;o<n.length;o++){let i=n[o];Be(e,i),ne(e,t[i]);}}break;case"boolean":F(e,t?120:121);break;default:F(e,127);}}r(ne,"writeAny");var _n="Unexpected end of array",Nn="Integer out of Range",Ct=class Ct{constructor(t){this.arr=t,this.pos=0;}};r(Ct,"Decoder");var wt=Ct;function Ve(e){return new wt(e)}r(Ve,"createDecoder");function Tt(e,t){let n=me(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n}r(Tt,"readUint8Array");function re(e){let t=0,n=1,o=e.arr.length;for(;e.pos<o;){let i=e.arr[e.pos++];if(t=t+(i&127)*n,n*=128,i<128)return t;if(t>Number.MAX_SAFE_INTEGER)throw new Error(Nn)}throw new Error(_n)}r(re,"readVarUint");function He(e){return Tt(e,re(e))}r(He,"readVarUint8Array");function be(e){return e.arr[e.pos++]}r(be,"readUint8");function jn(e){let t=e.arr[e.pos]+(e.arr[e.pos+1]<<8);return e.pos+=2,t}r(jn,"readUint16");function Vn(e){let t=e.arr[e.pos]+(e.arr[e.pos+1]<<8)+(e.arr[e.pos+2]<<16)+(e.arr[e.pos+3]<<24)>>>0;return e.pos+=4,t}r(Vn,"readUint32");function Lt(e){let t=e.arr[e.pos++],n=t&63,o=64,i=(t&64)>0?-1:1;if(!(t&128))return i*n;let s=e.arr.length;for(;e.pos<s;){if(t=e.arr[e.pos++],n=n+(t&127)*o,o*=128,t<128)return i*n;if(n>Number.MAX_SAFE_INTEGER)throw new Error(Nn)}throw new Error(_n)}r(Lt,"readVarInt");function Ao(e){let t=re(e);if(t===0)return "";{let n=String.fromCodePoint(be(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(be(e));else for(;t>0;){let o=t<1e4?t:1e4,i=e.arr.subarray(e.pos,e.pos+o);e.pos+=o,n+=String.fromCodePoint.apply(null,i),t-=o;}return decodeURIComponent(escape(n))}}r(Ao,"_readVarStringPolyfill");function je(e){let t=kn();return t?t.decode(He(e)):Ao(e)}r(je,"readVarString");function vt(e,t){let n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n}r(vt,"readFromDataView");function At(e){return vt(e,4).getFloat32(0,!1)}r(At,"readFloat32");function Co(e){return vt(e,8).getFloat64(0,!1)}r(Co,"readFloat64");function Uo(e){return vt(e,8).getBigInt64(0,!1)}r(Uo,"readBigInt64");var Do=[e=>{},e=>null,Lt,At,Co,Uo,e=>!1,e=>!0,je,e=>{let t=re(e),n={};for(let o=0;o<t;o++){let i=je(e);n[i]=oe(e);}return n},e=>{let t=re(e),n=[];for(let o=0;o<t;o++)n.push(oe(e));return n},He];function oe(e){return Do[127-be(e)](e)}r(oe,"readAny");var Ut=class Ut{async encode(t){let n=Oe();return ne(n,t),$e(n)}async decode(t){return oe(Ve(U(t)))}};r(Ut,"BinaryEncoder");var Hn=Ut;function Pc(e){let t=Oe();return ne(t,e),$e(t)}r(Pc,"encodeJson");function Rc(e){return oe(Ve(U(e)))}r(Rc,"decodeJson");function Mc(e){let t=Oe();return e!=null&&_e(t,U(e)),{writeBytes:(n,o)=>{let i=U(n);Sn(!(o!=null&&i.length!==o),`Expected ${o} bytes, got ${i.length}`),_e(t,i);},writeBytesVar:n=>Ne(t,U(n)),writeUintVar:n=>W(t,n),writeUint8:n=>Bn(t,n),writeUint16:n=>On(t,n),writeUint32:n=>$n(t,n),writeIntVar:n=>yt(t,n),writeFloat:n=>bt(t,n),writeStringVar:n=>Be(t,n),write:n=>ne(t,n),getUint8Array:()=>$e(t),getLength:()=>mt(t)}}r(Mc,"createBinaryStreamEncoder");function Bc(e){let t=Ve(U(e));return {readBytes:n=>Tt(t,n),readBytesVar:()=>He(t),readUintVar:()=>re(t),readUint8:()=>be(t),readUint16:()=>jn(t),readUint32:()=>Vn(t),readIntVar:()=>Lt(t),readFloat:()=>At(t),readStringVar:()=>je(t),read:()=>oe(t),getOffset:()=>t.pos||0}}r(Bc,"createBinaryStreamDecoder");function Oc(e=0){return {setBit:(t,n=!0)=>n?e|=1<<t:e&=~(1<<t),unsetBit:t=>e&=1<<t,toggleBit:t=>e^=1<<t,getBit:t=>(e&1<<t)!==0,getValue:()=>e}}r(Oc,"bitfield");async function Fo(e){return await e.arrayBuffer()}r(Fo,"blobToArrayBuffer");async function $c(e){let t=await Fo(e);if(t!=null)return U(t)}r($c,"blobToUint8Array");function ie(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(ie,"randomUint8Array");var Gn="SHA-256",Dt="AES-GCM",zn="PBKDF2",Eo=1e5;async function Vc(e,t=Gn){return U(await crypto.subtle.digest(t,U(e)))}r(Vc,"digest");async function Hc(e,t={}){let n=U(e),o=await crypto.subtle.importKey("raw",n,zn,!1,["deriveKey"]);return await crypto.subtle.deriveKey({name:zn,salt:t.salt?U(t.salt):new Uint8Array(0),iterations:t.iterations??Eo,hash:Gn},o,{name:Dt,length:256},!0,["encrypt","decrypt"])}r(Hc,"deriveKeyPbkdf2");function qn(){return new Uint8Array([1,1])}r(qn,"getMagicId");async function Wn(e,t){let n=qn(),o=ie(12),i=await crypto.subtle.encrypt({name:Dt,iv:o},t,e),s=new Uint8Array(i),a=n.length+o.length+s.length,l=new Uint8Array(a),u=0;return l.set(n,u),u+=n.length,l.set(o,u),u+=o.length,l.set(s,u),l}r(Wn,"encrypt");async function Jn(e,t){let n=e.subarray(0,2);if(!Xt(n,qn()))return Promise.reject(new Error(`Unknown magic ${n}`));let o=e.subarray(2,14),i=e.subarray(14,e.length),s=await crypto.subtle.decrypt({name:Dt,iv:o},t,i);return new Uint8Array(s)}r(Jn,"decrypt");var So=",";function Wc(e,t={}){let{separator:n=So}=t,o="";for(let i=0;i<e.length;i++)o+=`${e[i].map(s=>{if(s==null||s==="")return "";if(gn(s))return s?1:0;let a=String(s);return (De(s)||N(s))&&(a=M(s)),a.includes('"')||a.includes(`
|
|
7
|
+
${i.stack}`:`${i.name||"Error"}: ${i.message}`;try{return o?JSON.stringify(i,null,2):JSON.stringify(i)}catch{}}return String(i)})}r(Ir,"formatMessages");function xs(e,t={}){return Ir(e,t).join(" ")}r(xs,"renderMessages");function ws(e){try{return decodeURIComponent(escape(e))}catch{}return e}r(ws,"fixBrokenUth8String");function As(e){if(e.startsWith("data:"))return ve(e.split(",",2)[1])}r(As,"dataUriToUint8Array");function Cs(e){if(e.startsWith("data:"))return e.slice(5).split(",",2)[0]}r(Cs,"dataUriToMimeType");function Us(e){if(e.startsWith("data:")){let[t,n]=e.slice(5).split(",",2);return new Blob([ve(n)],{type:t})}}r(Us,"dataUriToBlob");async function Ds(e){let t=await e.arrayBuffer();if(t)return `data:${e.type},${fe(t)}`}r(Ds,"blobToDataUri");function Es(e,t="application/octet-stream"){return `data:${t},${fe(e)}`}r(Es,"Uint8ArrayToDataUri");function on(){let e,t;return [new Promise((o,i)=>{e=o,t=i;}),e,t]}r(on,"createPromise");async function Is(e){return new Promise(t=>setTimeout(t,e))}r(Is,"sleep");async function ks(){return new Promise(e=>setTimeout(e,0))}r(ks,"immediate");async function Ps(e,t,n="timeoutReached"){return new Promise(async(o,i)=>{let s=!1,a=setTimeout(()=>{s=!0,o(n);},t);try{let l=await e;clearTimeout(a),s||o(l);}catch(l){clearTimeout(a),s||i(l);}})}r(Ps,"timeout");function Rs(e){return e==="timeoutReached"||e?.name==="Timeout reached"}r(Rs,"isTimeout");async function sn(e,t){return t<=0?await e:new Promise(async(n,o)=>{let i=!1,s=setTimeout(()=>{i=!0,o(new Error("Timeout reached"));},t);try{let a=await e;clearTimeout(s),i||n(a);}catch(a){clearTimeout(s),i||o(a);}})}r(sn,"tryTimeout");function Ms(e,t,n=1e3){return new Promise((o,i)=>{let s=r(u=>{l&&(clearTimeout(l),a(),o(u));},"fn"),a=r(()=>{l=null,e.off?e.off(t,s):e.removeEventListener&&e.removeEventListener(t,s);},"done"),l=setTimeout(()=>{a(),i(new Error("Did not response in time"));},n);e.on?e.on(t,s):e.addEventListener&&e.addEventListener(t,s);})}r(Ms,"waitOn");function P(e){return !!(e&&(e instanceof Promise||typeof e.then=="function"))}r(P,"isPromise");function z(e){return Promise.resolve(e)}r(z,"promisify");var an=864e5;function it(e){return Math.floor(e/1e4)}r(it,"dayYear");function un(e){return Math.floor(e/100%100)}r(un,"dayMonth");function kr(e){return Math.floor(e%100)}r(kr,"dayDay");function $s(e){return [it(e),un(e),kr(e)]}r($s,"dayToParts");function cn(e,t=!1){return t?new Date(`${Rr(e)}T00:00:00.000Z`):new Date(e/1e4,e/100%100-1,e%100)}r(cn,"dayToDate");function ln(){return Ue(new Date)}r(ln,"dayFromToday");function _s(e,t=!1){if(typeof e=="number")return e<100?void 0:e;if(typeof e=="string")return fn(e);if(Array.isArray(e)&&e.length===3){let[n,o,i]=e;return st(n,o,i)}else if(e instanceof Date)return Ue(e,t)}r(_s,"dayFromAny");function Ns(e){return cn(e,!0)}r(Ns,"dayToDateGMT");function Ue(e,t=!1){return t?fn(e.toISOString()):e.getFullYear()*1e4+(e.getMonth()+1)*100+e.getDate()}r(Ue,"dayFromDate");function js(e){return Ue(e,!0)}r(js,"dayFromDateGMT");function ot(e,t=!0){return cn(e,t).getTime()}r(ot,"dayToTimestamp");function Pr(e,t=!0){return Ue(new Date(e),t)}r(Pr,"dayFromTimestamp");function Rr(e,t="-"){let n=String(e);return n.slice(0,4)+t+n.slice(4,6)+t+n.slice(6,8)}r(Rr,"dayToString");function st(e,t=1,n=1){if(!(t<1||t>12||n<1||n>31))return e*1e4+t*100+n}r(st,"dayFromParts");function fn(e){let t=String(e).replace(/[^0-9]/g,"").slice(0,8);if(t.length===8)return +t}r(fn,"dayFromString");function Vs(e,t=0){let n=it(e),o=un(e);return t!==0&&(o+=t,n+=Math.floor((o-1)/12),o=Math.floor((o-1)%12)+1,o===0&&(o=12)),st(n,o,1)}r(Vs,"dayMonthStart");function Hs(e,t=0){let n=it(e);return st(n+t,1,1)}r(Hs,"dayYearStart");function Ce(e,t){return Pr(ot(e)+t*864e5)}r(Ce,"dayOffset");function zs(e,t){return Math.round((ot(t)-ot(e))/864e5)}r(zs,"dayDiff");function Gs(e,t){let n=[];for(t==null&&(t=ln()),e<0&&(e=Ce(t,e+1));e<=t;)n.push(e),e=Ce(e,1);return n}r(Gs,"dayRange");function*qs(e,t){let n=[];for(t==null&&(t=ln()),e<0&&(e=Ce(t,e+1));e<=t;)yield e,e=Ce(e,1);return n}r(qs,"dayIterator");var F=class F{get value(){return this.days}constructor(t){if(typeof t=="number"){this.days=t;return}if(t!=null&&(t=F.from(t)?.days),t==null){let n=new Date;this.days=n.getFullYear()*1e4+(n.getMonth()+1)*100+n.getDate();}else this.days=t;}static fromNumber(t){return new F(t)}static fromString(t){return F.from(+t.replace(/[^0-9]/g,"").slice(0,8))}static fromDate(t,n=!1){return n?F.fromString(t.toISOString().substr(0,10)):F.from(t.getFullYear()*1e4+(t.getMonth()+1)*100+t.getDate())}static fromDateGMT(t){return F.fromDate(t,!0)}static from(t,n=!1){if(typeof t=="number")return t<100?void 0:new F(t);if(typeof t=="string")return F.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 F(o*1e4+i*100+s)}else {if(t instanceof Date)return F.fromDate(t,n);if(t instanceof F)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 F.fromDateGMT(new Date(this.toDateGMT().getTime()+t*864e5))}monthStart(){return F.from([this.year,this.month,1])}yearStart(){return F.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 F.from([this.year+i,o,this.day])}daysUntil(t){return Math.round((new F(t)?.toDateGMT().getTime()-this.toDateGMT().getTime())/864e5)}yesterday(){return this.dayOffset(-1)}tomorrow(){return this.dayOffset(1)}};r(F,"Day");var G=F;async function Ks(e,t,n){let o=G.from(e),i=G.from(t);for(;o&&i&&o?.days<=i?.days;){let s=n(o);P(s)&&await s,o=o.dayOffset(1);}}r(Ks,"forEachDay");function Ys(){return new G}r(Ys,"today");function Qs(e){return new G(e)}r(Qs,"day");function Xs(e){return G.fromDate(new Date(e)).days}r(Xs,"dateStringToDays");function Mr(e,t=2){return +(+e).toFixed(t)}r(Mr,"decimal");function na(e,t=2){return +(+e/10**t).toFixed(t)}r(na,"decimalFromCents");function ra(e,t=2){return Math.round(+e*10**t)}r(ra,"decimalToCents");function oa(e,t=2){return t*(Mr(e,t)%1)}r(oa,"decimalCentsPart");function ua(e,t,n){let o=e[t];return o===void 0&&(o=n(t,e),e[t]=o),o}r(ua,"ensureKey");async function ca(e,t,n){let o=e[t];return o===void 0&&(o=await n(t,e),e[t]=o),o}r(ca,"ensureKeyAsync");function pn(e){return e!=null?e.size!=null?e.size:e.length!=null?e.length:Object.keys(e).length:0}r(pn,"size");function la(e){return e!=null&&e.length>0?e[0]:void 0}r(la,"first");function fa(e){return e!=null&&e.length>0?e[e.length-1]:void 0}r(fa,"last");function pa(e){try{if(e!=null)return Array.isArray(e)||typeof e=="string"?e.length<=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(pa,"empty");function at(e){return Object(e)!==e?e:JSON.parse(M(e))}r(at,"cloneObject");function da(e){return Object(e)!==e?e:JSON.parse(M(e))}r(da,"cloneJsonObject");function ga(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(ga,"memoize");function ma(e){let t=new Map;return async(...n)=>{let o=M(n);if(t.has(o))return t.get(o);let i=await e(...n);return t.set(o,i),i}}r(ma,"memoizeAsync");function ya(e,t){let n=[];for(let o=0;o<e;o++)n.push(t(o,e));return n}r(ya,"forTimes");function $(e){return e!=null&&typeof e=="object"}r($,"isObject");function ut(e){return Object(e)!==e}r(ut,"isPrimitive");function N(e){return Array.isArray(e)}r(N,"isArray");function De(e){return $(e)&&!N(e)}r(De,"isRecord");function wa(e){return e?.constructor===Object}r(wa,"isRecordPlain");function Ee(e){return typeof e=="string"}r(Ee,"isString");function dn(e){return typeof e=="number"&&!Number.isNaN(e)}r(dn,"isNumber");function Ta(e){return dn(e)&&Number.isInteger(e)}r(Ta,"isInteger");function La(e){return dn(e)&&Number.isSafeInteger(e)}r(La,"isSafeInteger");function gn(e){return typeof e=="boolean"}r(gn,"isBoolean");function va(e){return e==null}r(va,"isNullOrUndefined");function Aa(e){return e==null}r(Aa,"isNull");function Ca(e){return $(e)&&e.constructor.name==="Uint8Array"}r(Ca,"isUint8Array");function Ua(e){return e!=null}r(Ua,"isNotNull");function ct(e){return e==null||e===""||$(e)&&pn(e)<=0}r(ct,"isEmpty");function Da(e){return !ct(e)}r(Da,"isNotEmpty");function Ea(e){return e!=null&&e!==!1&&e!==!0}r(Ea,"isValue");function Fa(e){return e!=null&&e!==!1&&e!==0&&e!==""}r(Fa,"isTruthy");function Br(e,t,n=new WeakSet){if(e===t)return !0;if(n.has(t)||(ut(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(!Br(i,s,n))return !1}for(let o in t)if(t.hasOwnProperty(o)&&!e.hasOwnProperty(o))return !1;return !0}r(Br,"deepEqual");function Or(e,t=new WeakSet){if(t.has(e))return "[Circular ~]";if(ut(e)||t.add(e),De(e)){for(let n in e)if(e.hasOwnProperty(n)){if(e[n]===void 0){delete e[n];continue}Or(e[n],t);}}else if(N(e))for(let n=e.length-1;n>=0;n--)e[n]===void 0&&e.splice(n,1);return e}r(Or,"deepStripUndefinedInPlace");function Fe(e,...t){for(let n of t)$(e)||(e={}),!(n==null||!$(n))&&Object.keys(n).forEach(o=>{let i=e[o],s=n[o];Array.isArray(i)&&Array.isArray(s)?e[o]=i.concat(s):$(i)&&$(s)?e[o]=Fe(Object.assign({},i),s):e[o]=s;});return e}r(Fe,"deepMerge");function $r(e,t,n={cyclesFix:!0},o=[]){let i=[],s=Array.isArray(e);for(let l in e){let u=e[l],y=s?+l:l;if(!(l in t)){i.push({type:"del",path:[y]});continue}let h=t[l],x=typeof u=="object"&&typeof h=="object";if(u&&h&&x&&!["Date","RegExp","String","Number"].includes(Object.getPrototypeOf(u).constructor.name)&&(!n.cyclesFix||!o.includes(u))){let v=$r(u,h,n,n.cyclesFix?o.concat([u]):[]);i=[...i,...v.map(w=>(w.path.unshift(y),w))];}else u!==h&&!(x&&(Number.isNaN(u)?`${u}`==`${h}`:+u==+h))&&i.push({path:[y],type:"upd",value:h});}let a=Array.isArray(t);for(let l in t)l in e||i.push({type:"new",path:[a?+l:l],value:t[l]});return i}r($r,"diffObjects");function mn(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""")}r(mn,"escapeHTML");function Oa(e){return e.replace(/</gi,"<").replace(/>/gi,">").replace(/"/gi,'"').replace(/'/gi,"'").replace(/&/gi,"&")}r(Oa,"unescapeHTML");function Na(e,t,n=[]){return e.filter(o=>!t.some(i=>!i(o))).map(o=>{for(let i of n)o=i(o);return o}).filter(o=>o!=null)}r(Na,"listQuery");function ja(e,t){return e.reduce((n,o)=>{let i=String(o[t]);return (n[i]=n[i]||[]).push(o),n},{})}r(ja,"listGroupBy");function Va(e,t){return Array.from(e.reduce((n,o)=>n.add(o[t]),new Set))}r(Va,"listDistinctUnion");function Ha(e,t){return e.map(n=>n[t])}r(Ha,"listOfKey");function Wa(e,t){return $(e)?Object.fromEntries(Object.entries(e).map(([n,o])=>{let i=t(n,o);return N(i)&&i.length===2?i:[n,i]}).filter(n=>n!=null)):{}}r(Wa,"objectMap");function Ja(e,t){return t.dispose&&e.dispose&&t.dispose.add(e.dispose),Object.assign(e,t)}r(Ja,"objectMergeDisposable");function Za(e){return Object.keys(e).length<=0}r(Za,"objectIsEmpty");var _r=/[\\\-\[\]\/{}()*+?.^$|]/g;function Se(e){return e?e instanceof RegExp?e.source:e.replace(_r,"\\$&"):""}r(Se,"escapeRegExp");var Nr=100,jr=/^\.+/,Vr=/\.+$/,Hr=/[<>:\"/\\|?*\u0000-\u001F\u0080-\u009F]+/gm;function yn(){return Hr}r(yn,"filenameReservedRegex");function zr(){return /^(con|prn|aux|nul|com\d|lpt\d)$/i}r(zr,"windowsReservedNameRegex");function tu(e,t="_"){if(typeof e!="string")throw new TypeError("Expected a string");if(yn().test(t))throw new Error("Replacement string cannot contain reserved filename characters");let n=`(${Se(t)})+`;return e=e.replace(yn(),t).replace(jr,t).replace(Vr,"").replace(new RegExp(n,"gm"),t).trim(),e=zr().test(e)?e+t:e,e.slice(0,Nr)}r(tu,"toValidFilename");function pe(e){return Math.abs(e)%1===.5}r(pe,"isHalf");function hn(e){return e%2===0}r(hn,"isEven");var ou=r(e=>Math.ceil(e),"roundUp"),iu=r(e=>Math.floor(e),"roundDown"),su=r(e=>Math.round(e),"roundHalfUp"),au=r(e=>{let t=Math.round(e);return pe(e)&&hn(t)?t-1:t},"roundHalfOdd"),uu=r(e=>pe(e)?Math.sign(e)*Math.ceil(Math.abs(e)):Math.round(e),"roundHalfAwayFromZero"),cu=r(e=>pe(e)?Math.floor(e):Math.round(e),"roundHalfDown"),lu=r(e=>{let t=Math.round(e);return pe(e)?hn(t)?t:t-1:t},"roundHalfEven"),fu=r(e=>pe(e)?Math.sign(e)*Math.floor(Math.abs(e)):Math.round(e),"roundHalfTowardsZero");function bn(e){return e.reduce((t,n)=>Math.min(t,n.sort_weight||0),0)-1-k()}r(bn,"startSortWeight");function xn(e){return e.reduce((t,n)=>Math.max(t,n.sort_weight||0),0)+1+k()}r(xn,"endSortWeight");function mu(e,t,n){let o=n.length,i=e<t;if(o<=0||e>=o-1)return xn(n);if(e<=0)return bn(n);n=Gr([...n]);let s=i?-1:0,a=n[e+s].sort_weight||0,u=(n[e+s+1].sort_weight||0)-a;if(u===0)return i?bn(n):xn(n);let y=a+u/2,h=u*.01*(k()-.5);return y+h}r(mu,"moveSortWeight");function Gr(e){return e.sort((t,n)=>(t.sort_weight||0)-(n.sort_weight||0)),e}r(Gr,"sortedItems");function xu(e={}){let{getter:t=r(l=>l.sort,"getter")}=e;function n(l){return l.sort((u,y)=>(t(u)||0)-(t(y)||0)),l}r(n,"items");function o(l){return l.reduce((u,y)=>Math.min(u,t(y)||0),0)-1-k()}r(o,"start");function i(l){return l.reduce((u,y)=>Math.max(u,t(y)||0),0)+1+k()}r(i,"end");function s(l,u){l==null&&(l=(u??0)-1),u==null&&(u=(l??0)+1);let y=u-l,h=l+y/2,x=y*.01*(k()-.5);return h+x}r(s,"between");function a(l,u,y){let h=y.length,x=l<u;if(h<=0||l>=h-1)return i(y);if(l<=0)return o(y);y=n([...y]);let v=x?-1:0,w=t(y[l+v])||0,T=(t(y[l+v+1])||0)-w;if(T===0)return x?o(y):i(y);let L=w+T/2,m=T*.01*(k()-.5);return L+m}return r(a,"move"),{start:o,end:i,between:s,move:a,items:n}}r(xu,"useSorted");function qr(e){return t=>e?.[t]}r(qr,"basePropertyOf");var Wr={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Jr=qr(Wr),Zr=/[\xC0-\xD6\xD8-\xF6\xF8-\xFF\u0100-\u017F]/g,Kr="\\u0300-\\u036f",Yr="\\ufe20-\\ufe2f",Qr="\\u20d0-\\u20ff",Xr="\\u1ab0-\\u1aff",eo="\\u1dc0-\\u1dff",to=Kr+Yr+Qr+Xr+eo,no=`[${to}]`,ro=RegExp(no,"g");function wn(e){return e&&e.replace(Zr,Jr).replace(ro,"")}r(wn,"deburr");var oo=/((?:(?:(?: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 Cu(e){return e.split(oo).map((t,n)=>{let o=mn(t);return n%2?`<a target="_blank" href="${o}">${io(o)}</a>`:o}).join("")}r(Cu,"linkifyPlainText");function io(e){return e.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")}r(io,"toHumanReadableUrl");function Tn(e,t){let n=[];for(let[o,i]of Object.entries(e))if(i!=null){Array.isArray(i)||(i=[i]);for(let s of i)t&&!t(s)||s!=null&&n.push(`${encodeURIComponent(o)}=${encodeURIComponent(String(s))}`);}return n.join("&")}r(Tn,"encodeQuery");function Uu(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]),a=decodeURIComponent(i[1]||"");t[s]!=null?(Array.isArray(t[s])||(t[s]=[t[s]]),t[s].push(a)):t[s]=a;}return t}r(Uu,"parseQuery");var Ln=["aardvark","absurd","accrue","acme","adrift","adult","afflict","ahead","aimless","Algol","allow","alone","ammo","ancient","apple","artist","assume","Athens","atlas","Aztec","baboon","backfield","backward","basalt","beaming","bedlamp","beehive","beeswax","befriend","Belfast","berserk","billiard","bison","blackjack","blockade","blowtorch","bluebird","bombast","bookshelf","brackish","breadline","breakup","brickyard","briefcase","Burbank","button","buzzard","cement","chairlift","chatter","checkup","chisel","choking","chopper","Christmas","clamshell","classic","classroom","cleanup","clockwork","cobra","commence","concert","cowbell","crackdown","cranky","crowfoot","crucial","crumpled","crusade","cubic","deadbolt","deckhand","dogsled","dosage","dragnet","drainage","dreadful","drifter","dropper","drumbeat","drunken","Dupont","dwelling","eating","edict","egghead","eightball","endorse","endow","enlist","erase","escape","exceed","eyeglass","eyetooth","facial","fallout","flagpole","flatfoot","flytrap","fracture","fragile","framework","freedom","frighten","gazelle","Geiger","Glasgow","glitter","glucose","goggles","goldfish","gremlin","guidance","hamlet","highchair","hockey","hotdog","indoors","indulge","inverse","involve","island","Janus","jawbone","keyboard","kickoff","kiwi","klaxon","lockup","merit","minnow","miser","Mohawk","mural","music","Neptune","newborn","nightbird","obtuse","offload","oilfield","optic","orca","payday","peachy","pheasant","physique","playhouse","Pluto","preclude","prefer","preshrunk","printer","profile","prowler","pupil","puppy","python","quadrant","quiver","quota","ragtime","ratchet","rebirth","reform","regain","reindeer","rematch","repay","retouch","revenge","reward","rhythm","ringbolt","robust","rocker","ruffled","sawdust","scallion","scenic","scorecard","Scotland","seabird","select","sentence","shadow","showgirl","skullcap","skydive","slingshot","slothful","slowdown","snapline","snapshot","snowcap","snowslide","solo","spaniel","spearhead","spellbind","spheroid","spigot","spindle","spoilage","spyglass","stagehand","stagnate","stairway","standard","stapler","steamship","stepchild","sterling","stockman","stopwatch","stormy","sugar","surmount","suspense","swelter","tactics","talon","tapeworm","tempest","tiger","tissue","tonic","tracker","transit","trauma","treadmill","Trojan","trouble","tumor","tunnel","tycoon","umpire","uncut","unearth","unwind","uproot","upset","upshot","vapor","village","virus","Vulcan","waffle","wallet","watchword","wayside","willow","woodlark","Zulu"],vn=["adroitness","adviser","aggregate","alkali","almighty","amulet","amusement","antenna","applicant","Apollo","armistice","article","asteroid","Atlantic","atmosphere","autopsy","Babylon","backwater","barbecue","belowground","bifocals","bodyguard","borderline","bottomless","Bradbury","Brazilian","breakaway","Burlington","businessman","butterfat","Camelot","candidate","cannonball","Capricorn","caravan","caretaker","celebrate","cellulose","certify","chambermaid","Cherokee","Chicago","clergyman","coherence","combustion","commando","company","component","concurrent","confidence","conformist","congregate","consensus","consulting","corporate","corrosion","councilman","crossover","cumbersome","customer","Dakota","decadence","December","decimal","designing","detector","detergent","determine","dictator","dinosaur","direction","disable","disbelief","disruptive","distortion","divisive","document","embezzle","enchanting","enrollment","enterprise","equation","equipment","escapade","Eskimo","everyday","examine","existence","exodus","fascinate","filament","finicky","forever","fortitude","frequency","gadgetry","Galveston","getaway","glossary","gossamer","graduate","gravity","guitarist","hamburger","Hamilton","handiwork","hazardous","headwaters","hemisphere","hesitate","hideaway","holiness","hurricane","hydraulic","impartial","impetus","inception","indigo","inertia","infancy","inferno","informant","insincere","insurgent","integrate","intention","inventive","Istanbul","Jamaica","Jupiter","leprosy","letterhead","liberty","maritime","matchmaker","maverick","Medusa","megaton","microscope","microwave","midsummer","millionaire","miracle","misnomer","molasses","molecule","Montana","monument","mosquito","narrative","nebula","newsletter","Norwegian","October","Ohio","onlooker","opulent","Orlando","outfielder","Pacific","pandemic","pandora","paperweight","paragon","paragraph","paramount","passenger","pedigree","Pegasus","penetrate","perceptive","performance","pharmacy","phonetic","photograph","pioneer","pocketful","politeness","positive","potato","processor","prophecy","provincial","proximate","puberty","publisher","pyramid","quantity","racketeer","rebellion","recipe","recover","repellent","replica","reproduce","resistor","responsive","retraction","retrieval","retrospect","revenue","revival","revolver","Sahara","sandalwood","sardonic","Saturday","savagery","scavenger","sensation","sociable","souvenir","specialist","speculate","stethoscope","stupendous","supportive","surrender","suspicious","sympathy","tambourine","telephone","therapist","tobacco","tolerance","tomorrow","torpedo","tradition","travesty","trombonist","truncated","typewriter","ultimate","undaunted","underfoot","unicorn","unify","universe","unravel","upcoming","vacancy","vagabond","versatile","vertigo","Virginia","visitor","vocalist","voyager","warranty","Waterloo","whimsical","Wichita","Wilmington","Wyoming","yesteryear","Yucatan"];function Iu(e,t=" ",n=" "){return Array.from(e).map((o,i)=>i%2?vn[o]+n:Ln[o]+t).join("").slice(0,-(e.length%2?t:n).length)}r(Iu,"Uint8ArrayToWords");function ku(e){return U(e.map((t,n)=>(n%2?vn:Ln).findIndex(o=>o.toLocaleLowerCase()===wn(t).toLocaleLowerCase().trim())))}r(ku,"wordsToUint8Array");var so=/\\\s|\s+|#[^\n]*\n?/gm,ao=/\(\?P?<(\w[\w\d_]+)>|\((?!\?(:|\!|=|<=|<\!))/gm,An=/^((?:\(\?[\w$]+\))?)\(\?<([=!])([\s\S]*?)\)/gm;function uo(e){return typeof e=="string"?e:e.source||""}r(uo,"regExpString");function Mu(e){return e.replace(/[-\[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}r(Mu,"regExpEscape");var lt=class lt{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(so,l=>l[0]==="\\"?l:"")),!(t instanceof RegExp)){let l=0;i=i.replace(ao,(u,y)=>(l+=1,y?(y!=="index"&&y!=="length"&&!this.namedGroups[y]&&(this.namedGroups[y]=l),"("):u)),this.names=Object.keys(this.namedGroups);}i=uo(i),An.lastIndex=0;let a=An.exec(i);a&&(this.lookBehind={rx:new RegExp(`${a[3]}$(?!\\s)`),expect:a?a[2]==="=":!a},i=i.substr(a[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(lt,"XRX");var Cn=lt;function co(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(co,"getNamespaceFilterString");function lo(){return co(typeof process<"u"?process.env.ZEED??process.env.DEBUG:typeof localStorage<"u"?localStorage.zeed??localStorage.debug:"*")}r(lo,"getDefaultNamespaceFilter");function _(e=lo()){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,]+/),a=s.length;for(i=0;i<a;i++){if(!s[i])continue;let l=s[i].replace(/\*/g,".*?");l[0]==="-"?n.push(new RegExp(`^${l.substr(1)}`)):o.push(new RegExp(`^${l}`));}t=r(function(l){if(n.length===0&&o.length===0)return !0;let u,y;for(u=0,y=n.length;u<y;u++)if(n[u].test(l))return !1;for(u=0,y=o.length;u<y;u++)if(o[u].test(l))return !0;return !1},"fn");}return t.accept=o,t.reject=n,t.filter=e,t}r(_,"useNamespaceFilter");function fo(){return 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}r(fo,"getDefaultLevelFilter");function de(e){if(e===!1)return 9007199254740991;if(typeof e=="number")return e;if(typeof e=="string"){let t=qt[e.toLocaleLowerCase().trim()];if(t!=null)return t}return -1}r(de,"parseLogLevel");function X(e=fo()){let t=de(e);return n=>n>=t}r(X,"useLevelFilter");function ge(...e){return Ee(e[1])?[`${String(e[0])} ${String(e[1])}`,...e.slice(2)]:e}r(ge,"joinLogStrings");function Ie(e={}){let{level:t=void 0,filter:n=void 0}=e,o=_(n),i=X(t);return s=>{if(!i(s.level)||!o(s.name))return;let a=s.name?`[${s.name}]`:"";switch(s.level){case 1:console.info(...ge(`I|* ${a}`,...s.messages));break;case 2:console.warn(...ge(`W|** ${a}`,...s.messages));break;case 3:console.error(...ge(`E|*** ${a}`,...s.messages));break;default:console.debug(...ge(`D| ${a}`,...s.messages));break}}}r(Ie,"LoggerConsoleHandler");function Un(e=""){let t=[Ie()],n=r(u=>!0,"logCheckNamespace"),o=!1,i=a,s=!1;function a(u="",y){let h=de(y??-1);function x(b,T){return h<=b?T:()=>{}}r(x,"defineForLogLevel");let v=r(b=>{if(n(u))for(let T of t)T&&T(b);},"emit"),w=x(0,(...b)=>{v({name:u,messages:b,level:0});});return w.label=u,w.extend=function(b){return i(u?`${u}:${b}`:b)},w.debug=x(0,(...b)=>{v({name:u,messages:b,level:0});}),w.info=x(1,(...b)=>{v({name:u,messages:b,level:1});}),w.warn=x(2,(...b)=>{v({name:u,messages:b,level:2});}),w.error=x(3,(...b)=>{v({name:u,messages:b,level:3});}),w.fatal=x(4,(...b)=>{throw v({name:u,messages:b,level:4}),new Error(`${b.map(String).join(" ")}`)}),w.assert=x(4,(b,...T)=>{(b==null||typeof b=="number"&&Number.isNaN(b)||!b)&&w.fatal(...T);}),w}r(a,"LoggerBaseFactory");function l(u="",y){let h=i(u,y);return s&&h.debug(`+++ init of logger "${u}" on level "${h.level}".`),h}return r(l,"Logger"),l.registerHandler=function(u){t.push(u);},l.setFilter=function(u){n=_(u);},l.setLock=(u=!0)=>o=u,l.setDebug=(u=!0)=>s=u,l.setHandlers=function(u=[]){i!==a&&(i=a),!o&&(t=[...u].filter(y=>typeof y=="function"));},l.level=-1,l.setLogLevel=function(u=-1){o||(l.level=u);},l.setFactory=function(u){o||(i=u);},l}r(Un,"LoggerContext");var j;function ft(e){let t=Un();return e?e(t):t.setHandlers([Ie()]),t}r(ft,"getLoggerContext");function pt(e){if(j==null)try{let t=Z();t!=null?t?.logger==null?(j=ft(e),t.logger=j):j=t.logger:j=ft(e);}catch{j=ft(e);}return j}r(pt,"getGlobalLogger");function Dn(){if(j!=null)return j;try{let e=Z();if(e?.logger!=null)return e.logger}catch{}}r(Dn,"getGlobalLoggerIfExists");function R(e,t){return pt()(e,t)}r(R,"DefaultLogger");var En=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function ke(e){let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return En[Math.abs(t)%En.length]}r(ke,"browserSelectColorByName");function q(){return Date.now()}r(q,"getTimestamp");function dt(e){return e>999?`${(e/1e3).toFixed(1)} s`:`${e.toFixed(2)} ms`}r(dt,"formatMilliseconds");function nc(...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(nc,"parseDate");function Fn(){return typeof performance<"u"?performance.now():Date.now()}r(Fn,"getPerformanceTimestamp");function rc(){let e=Fn();return function(){let t=Fn()-e;return dt(t)}}r(rc,"duration");function uc(e){let{level:t=void 0,filter:n=void 0,messages:o=[]}=e,i=_(n),s=X(t);return a=>{s(a.level)&&i(a.name)&&(a.timestamp=q(),o.push(a));}}r(uc,"LoggerMemoryHandler");function po(...e){throw Dn()?.("assert")?.fatal(...e),new Error(`${e.map(String).join(" ")}`)}r(po,"fatal");function go(e,...t){(e==null||typeof e=="number"&&Number.isNaN(e)||!e)&&po(...t);}r(go,"assert");function Sn(e,...t){go(e,...t);}r(Sn,"assertCondition");function me(e,t,n){return new Uint8Array(e,t,n)}r(me,"createUint8ArrayViewFromArrayBuffer");function mo(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);return o}r(mo,"_encodeUtf8Polyfill");var Pe;function Re(){return Pe===void 0&&(Pe=typeof TextEncoder<"u"?new TextEncoder:null),Pe}r(Re,"getUtf8TextEncoder");function In(e){return Re()?Pe.encode(e):mo(e)}r(In,"encodeUtf8");var ee;function kn(){return ee===void 0&&(ee=(typeof TextDecoder>"u"?null:new TextDecoder("utf-8",{fatal:!0,ignoreBOM:!0}))??null,ee&&ee.decode(new Uint8Array).length===1&&(ee=null)),ee}r(kn,"getUtf8TextDecoder");var xt=class xt{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[];}};r(xt,"Encoder");var gt=xt;function Oe(){return new gt}r(Oe,"createEncoder");function mt(e){let t=e.cpos;for(let n=0;n<e.bufs.length;n++)t+=e.bufs[n].length;return t}r(mt,"length");function $e(e){let t=new Uint8Array(mt(e)),n=0;for(let o=0;o<e.bufs.length;o++){let i=e.bufs[o];t.set(i,n),n+=i.length;}return t.set(me(e.cbuf.buffer,0,e.cpos),n),t}r($e,"encodeToUint8Array");function ho(e,t){let n=e.cbuf.length;n-e.cpos<t&&(e.bufs.push(me(e.cbuf.buffer,0,e.cpos)),e.cbuf=new Uint8Array(Math.max(n,t)*2),e.cpos=0);}r(ho,"verifyLen");function E(e,t){let n=e.cbuf.length;e.cpos===n&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(n*2),e.cpos=0),e.cbuf[e.cpos++]=t;}r(E,"write");var Bn=E;function On(e,t){E(e,t&255),E(e,t>>>8&255);}r(On,"writeUint16");function $n(e,t){for(let n=0;n<4;n++)E(e,t&255),t>>>=8;}r($n,"writeUint32");function W(e,t){for(;t>127;)E(e,128|127&t),t=Math.floor(t/128);E(e,127&t);}r(W,"writeVarUint");function bo(e){return e!==0?e<0:1/e<0}r(bo,"isNegativeZero");function yt(e,t){let n=bo(t);for(n&&(t=-t),E(e,(t>63?128:0)|(n?64:0)|63&t),t=Math.floor(t/64);t>0;)E(e,(t>127?128:0)|127&t),t=Math.floor(t/128);}r(yt,"writeVarInt");function _e(e,t){let n=e.cbuf.length,o=e.cpos,i=Math.min(n-o,t.length),s=t.length-i;e.cbuf.set(t.subarray(0,i),o),e.cpos+=i,s>0&&(e.bufs.push(e.cbuf),e.cbuf=new Uint8Array(Math.max(n*2,s)),e.cbuf.set(t.subarray(i)),e.cpos=s);}r(_e,"writeUint8Array");function Ne(e,t){W(e,t.byteLength),_e(e,t);}r(Ne,"writeVarUint8Array");var ye,Mn;function xo(e,t){if(ye==null&&(ye=new Uint8Array(3e4),Mn=ye.length/3),t.length<Mn){let n=Re().encodeInto(t,ye).written||0;W(e,n);for(let o=0;o<n;o++)E(e,ye[o]);}else Ne(e,In(t));}r(xo,"_writeVarStringNative");function wo(e,t){let n=unescape(encodeURIComponent(t)),o=n.length;W(e,o);for(let i=0;i<o;i++)E(e,n.codePointAt(i));}r(wo,"_writeVarStringPolyfill");function Be(e,t){return Re()?.encodeInto?xo(e,t):wo(e,t)}r(Be,"writeVarString");function ht(e,t){ho(e,t);let n=new DataView(e.cbuf.buffer,e.cpos,t);return e.cpos+=t,n}r(ht,"writeOnDataView");function bt(e,t){return ht(e,4).setFloat32(0,t,!1)}r(bt,"writeFloat32");function To(e,t){return ht(e,8).setFloat64(0,t,!1)}r(To,"writeFloat64");function Lo(e,t){return ht(e,8).setBigInt64(0,t,!1)}r(Lo,"writeBigInt64");var Me;function vo(e){return Me==null&&(Me=new DataView(new ArrayBuffer(4))),Me.setFloat32(0,e),Me.getFloat32(0)===e}r(vo,"isFloat32");function ne(e,t){switch(typeof t){case"string":E(e,119),Be(e,t);break;case"number":Number.isInteger(t)&&Math.abs(t)<=2147483647?(E(e,125),yt(e,t)):vo(t)?(E(e,124),bt(e,t)):(E(e,123),To(e,t));break;case"bigint":E(e,122),Lo(e,t);break;case"object":if(t===null)E(e,126);else if(Array.isArray(t)){E(e,117),W(e,t.length);for(let n=0;n<t.length;n++)ne(e,t[n]);}else if(t instanceof Uint8Array)E(e,116),Ne(e,t);else {E(e,118);let n=Object.keys(t);W(e,n.length);for(let o=0;o<n.length;o++){let i=n[o];Be(e,i),ne(e,t[i]);}}break;case"boolean":E(e,t?120:121);break;default:E(e,127);}}r(ne,"writeAny");var _n="Unexpected end of array",Nn="Integer out of Range",Ct=class Ct{constructor(t){this.arr=t,this.pos=0;}};r(Ct,"Decoder");var wt=Ct;function Ve(e){return new wt(e)}r(Ve,"createDecoder");function Tt(e,t){let n=me(e.arr.buffer,e.pos+e.arr.byteOffset,t);return e.pos+=t,n}r(Tt,"readUint8Array");function re(e){let t=0,n=1,o=e.arr.length;for(;e.pos<o;){let i=e.arr[e.pos++];if(t=t+(i&127)*n,n*=128,i<128)return t;if(t>Number.MAX_SAFE_INTEGER)throw new Error(Nn)}throw new Error(_n)}r(re,"readVarUint");function He(e){return Tt(e,re(e))}r(He,"readVarUint8Array");function be(e){return e.arr[e.pos++]}r(be,"readUint8");function jn(e){let t=e.arr[e.pos]+(e.arr[e.pos+1]<<8);return e.pos+=2,t}r(jn,"readUint16");function Vn(e){let t=e.arr[e.pos]+(e.arr[e.pos+1]<<8)+(e.arr[e.pos+2]<<16)+(e.arr[e.pos+3]<<24)>>>0;return e.pos+=4,t}r(Vn,"readUint32");function Lt(e){let t=e.arr[e.pos++],n=t&63,o=64,i=(t&64)>0?-1:1;if(!(t&128))return i*n;let s=e.arr.length;for(;e.pos<s;){if(t=e.arr[e.pos++],n=n+(t&127)*o,o*=128,t<128)return i*n;if(n>Number.MAX_SAFE_INTEGER)throw new Error(Nn)}throw new Error(_n)}r(Lt,"readVarInt");function Ao(e){let t=re(e);if(t===0)return "";{let n=String.fromCodePoint(be(e));if(--t<100)for(;t--;)n+=String.fromCodePoint(be(e));else for(;t>0;){let o=t<1e4?t:1e4,i=e.arr.subarray(e.pos,e.pos+o);e.pos+=o,n+=String.fromCodePoint.apply(null,i),t-=o;}return decodeURIComponent(escape(n))}}r(Ao,"_readVarStringPolyfill");function je(e){let t=kn();return t?t.decode(He(e)):Ao(e)}r(je,"readVarString");function vt(e,t){let n=new DataView(e.arr.buffer,e.arr.byteOffset+e.pos,t);return e.pos+=t,n}r(vt,"readFromDataView");function At(e){return vt(e,4).getFloat32(0,!1)}r(At,"readFloat32");function Co(e){return vt(e,8).getFloat64(0,!1)}r(Co,"readFloat64");function Uo(e){return vt(e,8).getBigInt64(0,!1)}r(Uo,"readBigInt64");var Do=[e=>{},e=>null,Lt,At,Co,Uo,e=>!1,e=>!0,je,e=>{let t=re(e),n={};for(let o=0;o<t;o++){let i=je(e);n[i]=oe(e);}return n},e=>{let t=re(e),n=[];for(let o=0;o<t;o++)n.push(oe(e));return n},He];function oe(e){return Do[127-be(e)](e)}r(oe,"readAny");var Ut=class Ut{async encode(t){let n=Oe();return ne(n,t),$e(n)}async decode(t){return oe(Ve(U(t)))}};r(Ut,"BinaryEncoder");var Hn=Ut;function Pc(e){let t=Oe();return ne(t,e),$e(t)}r(Pc,"encodeJson");function Rc(e){return oe(Ve(U(e)))}r(Rc,"decodeJson");function Mc(e){let t=Oe();return e!=null&&_e(t,U(e)),{writeBytes:(n,o)=>{let i=U(n);Sn(!(o!=null&&i.length!==o),`Expected ${o} bytes, got ${i.length}`),_e(t,i);},writeBytesVar:n=>Ne(t,U(n)),writeUintVar:n=>W(t,n),writeUint8:n=>Bn(t,n),writeUint16:n=>On(t,n),writeUint32:n=>$n(t,n),writeIntVar:n=>yt(t,n),writeFloat:n=>bt(t,n),writeStringVar:n=>Be(t,n),write:n=>ne(t,n),getUint8Array:()=>$e(t),getLength:()=>mt(t)}}r(Mc,"createBinaryStreamEncoder");function Bc(e){let t=Ve(U(e));return {readBytes:n=>Tt(t,n),readBytesVar:()=>He(t),readUintVar:()=>re(t),readUint8:()=>be(t),readUint16:()=>jn(t),readUint32:()=>Vn(t),readIntVar:()=>Lt(t),readFloat:()=>At(t),readStringVar:()=>je(t),read:()=>oe(t),getOffset:()=>t.pos||0}}r(Bc,"createBinaryStreamDecoder");function Oc(e=0){return {setBit:(t,n=!0)=>n?e|=1<<t:e&=~(1<<t),unsetBit:t=>e&=1<<t,toggleBit:t=>e^=1<<t,getBit:t=>(e&1<<t)!==0,getValue:()=>e}}r(Oc,"bitfield");async function Eo(e){return await e.arrayBuffer()}r(Eo,"blobToArrayBuffer");async function $c(e){let t=await Eo(e);if(t!=null)return U(t)}r($c,"blobToUint8Array");function ie(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(ie,"randomUint8Array");var Gn="SHA-256",Dt="AES-GCM",zn="PBKDF2",Fo=1e5;async function Vc(e,t=Gn){return U(await crypto.subtle.digest(t,U(e)))}r(Vc,"digest");async function Hc(e,t={}){let n=U(e),o=await crypto.subtle.importKey("raw",n,zn,!1,["deriveKey"]);return await crypto.subtle.deriveKey({name:zn,salt:t.salt?U(t.salt):new Uint8Array(0),iterations:t.iterations??Fo,hash:Gn},o,{name:Dt,length:256},!0,["encrypt","decrypt"])}r(Hc,"deriveKeyPbkdf2");function qn(){return new Uint8Array([1,1])}r(qn,"getMagicId");async function Wn(e,t){let n=qn(),o=ie(12),i=await crypto.subtle.encrypt({name:Dt,iv:o},t,e),s=new Uint8Array(i),a=n.length+o.length+s.length,l=new Uint8Array(a),u=0;return l.set(n,u),u+=n.length,l.set(o,u),u+=o.length,l.set(s,u),l}r(Wn,"encrypt");async function Jn(e,t){let n=e.subarray(0,2);if(!Xt(n,qn()))return Promise.reject(new Error(`Unknown magic ${n}`));let o=e.subarray(2,14),i=e.subarray(14,e.length),s=await crypto.subtle.decrypt({name:Dt,iv:o},t,i);return new Uint8Array(s)}r(Jn,"decrypt");var So=",";function Wc(e,t={}){let{separator:n=So}=t,o="";for(let i=0;i<e.length;i++)o+=`${e[i].map(s=>{if(s==null||s==="")return "";if(gn(s))return s?1:0;let a=String(s);return (De(s)||N(s))&&(a=M(s)),a.includes('"')||a.includes(`
|
|
8
8
|
`)||a.includes(n)?`"${a.replace(/"/g,'""')}"`:a}).join(n)}
|
|
9
9
|
`;return o}r(Wc,"csvStringify");function Io(e,t={}){let n=/("((?:(?:[^"]*?)(?:"")?)*)"|([^,;\t\n]*))([,;\t]|\n|\r\n)/g;t.separator&&(n=new RegExp(n.source.replaceAll(",;\\t",Se(t.separator)),n.flags));let o=[],i=[],s,a=`${e.replaceAll(`\r
|
|
10
10
|
`,`
|
|
11
11
|
`).trim()}
|
|
12
12
|
`;for(;s=n.exec(a);){let l=s[2]??s[3]??"";l=l.replaceAll('""','"'),i.push(l),s[4]===`
|
|
13
|
-
`&&(o.push(i),i=[]);}return o}r(Io,"csvParse");function Jc(e,t={}){let n=Io(e,t),o=n[0];return n.slice(1).map(i=>Object.fromEntries(i.map((s,a)=>[o[a],s])))}r(Jc,"csvParseToObjects");function ko(e){let t;if(typeof e=="function"?t=e():P(e)?t=e:typeof e.dispose=="function"?t=e.dispose():P(e.dispose)&&(t=e.dispose),P(t))return t}r(ko,"callDisposer");function H(e){let t=e;t!=null&&(Fe(t)?t={name:t}:"debug"in t&&"label"in t&&(t={name:t.label,log:t}));let n=t?.name,o=t?.log??R("zeed:dispose"),i=0,s=[];function a(h){if(h!=null&&s.includes(h)){Qe(s,v=>v!==h);let x=ko(h);if(P(x))return x}}r(a,"untrack");function l(h){if(h!=null)return s.unshift(h),()=>a(h)}r(l,"track");function u(h=!1){n&&o.debug(`dispose "${n}": ${s.length} entries`),i+=1;let x=[];for(;s.length>0;){let v=s[0],w=a(v);if(P(w)){if(h)throw new Error(`Async disposable found: ${v} -> ${w}`);x.push(w);}}if(x.length>0)return Promise.all(x)}r(u,"dispose");function y(){u(!0);}return r(y,"disposeSync"),Object.assign(u,{disposed:i,add:l,remove:a,track:l,untrack:a,dispose:u,disposeSync:y,sync:y,exec:u,getSize(){return s.length},isDisposed(){return s.length<=0}})}r(H,"useDispose");function tl(e={}){let{mode:t="fifo"}=e,n=[],o=r(async(s=!1)=>{for(;n.length>0;){let a=n[0];if(Qe(n,l=>l!==a),typeof a=="function"){let l=a();if(P(l)){if(s)throw new Error(`Expected sync only function, but found async: ${a}`);await l;}}else if(P(a)){if(s)throw new Error(`Expected sync only function, but found async: ${a}`);await a;}else throw new Error(`Unhandled disposable: ${a}`)}},"exec");return Object.assign(o,{add:r(s=>{t==="lifo"?n.unshift(s):n.push(s);},"add"),exec:o,getSize(){return n.length}})}r(tl,"useDefer");function il(){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(il,"useMutex");function sl(){let e=!0;return async(t,n)=>{let o=!1;if(e){e=!1;try{let i=t();P(i)&&await i,o=!0;}finally{e=!0;}}else if(n!==void 0){let i=n();P(i)&&await i;}return o}}r(sl,"useAsyncMutex");var Ft=class Ft{constructor(){this.subscribers={};this.subscribersOnAny=[];this._logEmitter=R("zeed:emitter","warn");this.call=new Proxy({},{get:(t,n)=>async(...o)=>await this.emit(n,...o)});}async emit(t,...n){let o=!1;try{let i=this.subscribers[t]||[];if(this._logEmitter.debug("emit",this?.constructor?.name,t,...n,i),this.subscribersOnAny.forEach(s=>s(t,...n)),i.length>0){let s=i.map(({fn:a})=>{try{return z(a(...n))}catch(l){this._logEmitter.warn("emit warning:",l);}return null}).filter(a=>a!=null);o=!0,await Promise.all(s);}}catch(i){this._logEmitter.error("emit exception",i);}return o}onAny(t){this.subscribersOnAny.push(t);}on(t,n,o={}){let{priority:i=0}=o,s=this.subscribers[t]||[],a=s.length,l={fn:n,priority:i};if(a<=0)this.subscribers[t]=[l];else {let u=a;for(let y=s.length-1;y>=0;y--){let h=s[y];if(i<=h.priority)break;u-=1;}s.splice(u,0,l);}return ()=>{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 z(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.fn!==n),this}removeAllListeners(){return this.subscribers={},this}};r(Ft,"Emitter");var B=Ft;function pl(){let e=Z().emitter;return e||(e=new B,Z().emitter=e),e}r(pl,"getGlobalEmitter");var ze=16;function St(){return ie(ze)}r(St,"uuidBytes");function Po(e=St()){return nt(e,22)}r(Po,"uuidB62");function Ro(e){return nt(e,22)}r(Ro,"uuidEncodeB62");function Mo(e){return nn(e,ze)}r(Mo,"uuidDecodeB62");function Bo(e=St()){return tt(e,26)}r(Bo,"uuidB32");function Oo(e){return tt(e,26)}r(Oo,"uuidEncodeB32");function $o(e){return tn(e,ze)}r($o,"uuidDecodeB32");var _o="10000000-1000-4000-8000-100000000000",No=r(function(){return typeof crypto<"u"&&crypto.randomUUID!=null?crypto.randomUUID():_o.replace(/[018]/g,e=>(e^ie(1)[0]&15>>e/4).toString(16))},"uuidv4");function jo(e){let t=Yt(e);return `${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16)}`}r(jo,"uuidEncodeV4");function Vo(e){return Qt(e.replaceAll("-",""))}r(Vo,"uuidDecodeV4");var Zn=16e11;function Ho(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(Ho,"longToByteArray");function Kn(){let e=q()-Zn;return new Uint8Array([...Ho(e),...ie(10)])}r(Kn,"suidBytes");function xl(){return Go(Kn())}r(xl,"suid");function wl(e){return zo(Qn(e))}r(wl,"suidDate");function zo(e){return new Date(Zn+e.slice(0,6).reduce((t,n)=>t*256+n,0))}r(zo,"suidBytesDate");function Tl(){return new Uint32Array(ie(4))[0]}r(Tl,"uuid32bit");var It={base62:{uuid:Po,uuidDecode:Mo,uuidEncode:Ro},base32:{uuid:Bo,uuidDecode:$o,uuidEncode:Oo},uuidv4:{uuid:No,uuidDecode:Vo,uuidEncode:jo}},Ge="base62",Yn=!1;function Ll(e,t=!1){Ge=e,Yn=t;}r(Ll,"setUuidDefaultEncoding");function J(){return It[Ge].uuid(Yn?Kn():St())}r(J,"uuid");function Qn(e){return It[Ge].uuidDecode(e)}r(Qn,"uuidDecode");function Go(e){return It[Ge].uuidEncode(e)}r(Go,"uuidEncode");function vl(e){try{return Qn(e).length===ze}catch{}return !1}r(vl,"uuidIsValid");var Et={};function O(e="id"){return Et[e]==null&&(Et[e]=0),`${e}-${Et[e]++}`}r(O,"uname");var qo=0;function Al(){return `id-${qo++}`}r(Al,"qid");var Pt=class Pt extends B{constructor(){super(...arguments);this.id=J();this.dispose=H();}close(){this.dispose();}};r(Pt,"Channel");var kt=Pt,Rt=class Rt extends kt{constructor(){super(...arguments);this.isConnected=!0;}postMessage(n){this.other?.emit("message",{data:n,origin:"local",lastEventId:J()});}};r(Rt,"LocalChannel");var qe=Rt;function Sl(){let e=new qe,t=new qe;return e.other=t,t.other=e,[e,t]}r(Sl,"createLocalChannelPair");var Mt=class Mt{async encode(t){return t}async decode(t){return t}};r(Mt,"NoopEncoder");var Xn=Mt,Bt=class Bt{async encode(t){return Xe(t)}async decode(t){return et(t)}};r(Bt,"JsonEncoder");var se=Bt,Ot=class Ot{constructor(t){this.key=t;}async encode(t){let n=Xe(t);return await Wn(n,this.key)}async decode(t){let n=await Jn(t,this.key);return et(n)}};r(Ot,"CryptoEncoder");var er=Ot;function tr(e,t,n={}){return new Proxy(n,{get:(o,i)=>i in o?o[i]:(...s)=>e(i,s,t)})}r(tr,"createPromiseProxy");function Vl(e={}){let{name:t=O("hub"),encoder:n=new se,retryAfter:o=1e3,ignoreUnhandled:i=!0,logLevel:s=!1}=e,a=R(t,s),l={},u,y=[],h,x={},v=r(()=>{clearTimeout(h);},"dispose"),w=r(async()=>{if(clearTimeout(h),u){if(u.isConnected)for(;y.length;){let m=y[0];try{u.postMessage(await n.encode(m)),y.shift();}catch(c){a.warn("postMessage",c);break}}y.length>0&&o>0&&(h=setTimeout(w,o));}},"postNext"),b=r(async m=>{a("enqueue postMessage",m),y.push(m),await w();},"postMessage"),T=r(async m=>{u=m,u.on("connect",w),u.on("message",async c=>{a("onmessage",typeof c);let{name:d,args:g,id:f,result:p,error:A}=await n.decode(c.data);if(d){a(`name ${d} id ${f}`);try{if(l[d]==null)throw new Error(`handler for ${d} was not found`);let D=l[d](...g);P(D)&&(D=await D),a(`result ${D}`),f&&await b({id:f,result:D});}catch(D){let C=D instanceof Error?D:new Error(rt(D));a.warn("execution error",C.name),await b({id:f,error:{message:C.message,stack:C.stack,name:C.name}});}}else if(f)if(a(`response for id=${f}: result=${p}, error=${A}`),x[f]==null)p===void 0?a(`skip response for ${f}`):a.warn(`no response hook for ${f}`);else {let[D,C]=x[f];if(D&&C)if(delete x[f],A){let S=new Error(A.message);S.stack=A.stack,S.name=A.name,a.warn("reject",S.name),C(S);}else a("resolve",p),D(p);}else i||a.warn("Unhandled message",c);}),await w();},"connect"),L=r(async(m,c,d={})=>{let{timeout:g=5e3}=d,f=J();return await b({name:m,args:c,id:f}),sn(new Promise((p,A)=>x[f]=[p,A]),g)},"fetchMessage");return e.channel&&T(e.channel),{dispose:v,connect:T,listen(m){Object.assign(l,m);},send(){return tr(L,{},{options(m){return tr(L,{...m})}})}}}r(Vl,"useMessageHub");var _t=class _t extends B{constructor(n){super();this.publish=this.emit.bind(this);this.subscribe=this.on.bind(this);let{name:o,encoder:i=new se,channel:s,debug:a=!1}=n;this.channel=s,this.encoder=i,this.debug=a,this.name=o??this.channel.id??O("pubsub"),this.log=R(`${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:l})=>{let u=await this.encoder.decode(l);if(this.debug?this.log(`channel message, event=${u?.event}, info=`,u):this.log(`channel message, event=${u?.event}`),u){let{event:y,args:h}=u;await this.emitSuper(y,...h);}});}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(_t,"PubSub");var $t=_t;function Zl(e){return new $t(e)}r(Zl,"usePubSub");var Wo=1;var nr=r(e=>e,"defaultSerialize"),Jo=nr;function rr(e,t,n=[]){let{post:o,on:i,serialize:s=nr,deserialize:a=Jo,log:l}=e,u=new Map;return i(async h=>{try{let x=a(h),[v,w,b,T]=x;if(v===1||v===2){let L,m;if(T!=null)try{let c=t[T];L=await c(...w);}catch(c){m=String(c);}else m="Method implementation missing";m&&l?.warn("error",x,m),v===1&&b&&o(s(m?[4,m,b]:[3,L,b]));}else if(b){let L=u.get(b);L!=null&&(v===4?L.reject(w):L.resolve(w)),u.delete(b);}}catch(x){l?.warn("Error on handling RPC data. Invalid?",x,h);}}),{post:o,serialize:s,rpcPromiseMap:u,proxyHandler:{get(h,x){let v=r((...b)=>{o(s([2,b,null,x]));},"sendEvent");if(e.onlyEvents||n.includes(x))return v.asEvent=v,v;let w=r((...b)=>new Promise((T,L)=>{let m=Wo++;u.set(m,{resolve:T,reject:L}),o(s([1,b,m,x]));}),"sendCall");return w.asEvent=v,w}}}}r(rr,"setupRPCBasic");function Ql(e,t){let{eventNames:n=[]}=t,{proxyHandler:o}=rr(t,e,n);return new Proxy({},o)}r(Ql,"useRPC");function Xl(e){let t=[],n={},{proxyHandler:o}=rr(e,n);function i(){return new Proxy({},o)}return r(i,"createRPCProxy"),function(s,a=[]){return Object.assign(n,s??{}),t.push(...a),i()}}r(Xl,"useRPCHub");var We=class We extends B{constructor(n={}){super();this._isCancelled=!1;this._resetWhenFinished=!0;this._children=[];this.dispose=H();this._totalUnits=n.totalUnits??0,this._completedUnits=n.completeUnits??0,this._resetWhenFinished=n.resetWhenFinished??!0,this.name=n.name??O("progress"),this.dispose.add(async()=>{for(let o of this._children)await o.dispose();await this.emit("progressDispose",this);});}update(){this.emit("progressChanged",this),this._isCancelled&&this._resetWhenFinished&&this.getTotalUnits()<=this.getCompletedUnits()&&this.reset();}reset(){if(this._isCancelled){this._isCancelled=!1;for(let n of this._children)n.reset();this.update();}}async cancel(){if(!this._isCancelled){this._isCancelled=!0,await this.emit("progressCancelled",this);for(let n of this._children)await n.cancel();this.update();}}addChild(n){n.on("progressDispose",()=>this.removeChild(n)),n.on("progressChanged",()=>this.update()),this._children.includes(n)||this._children.push(n),this.update();}createChildProgress(n){let o=new We(n);return this.addChild(o),o}removeChild(n){Wt(this._children,n),this.update();}getTotalUnits(){if(this.isIndeterminate())return 0;let n=this._totalUnits;for(let o of this._children)n+=o.getTotalUnits();return n}getCompletedUnits(){if(this.isIndeterminate())return 0;let n=this._completedUnits;for(let o of this._children)n+=o.getCompletedUnits();return n}isIndeterminate(){return this._totalUnits<=0&&this._children.length<=0}isCancelled(){return this._isCancelled}isFinished(){return this.dispose.isDisposed()||!this.isIndeterminate()&&this.getTotalUnits()<=this.getCompletedUnits()}getFraction(){if(this.isIndeterminate())return 0;let n=this.getCompletedUnits()/this.getTotalUnits();return Number.isNaN(n)&&(n=0),Math.min(1,Math.max(0,n))}getChildrenCount(){return this._children.length}setTotalUnits(n,o){this._totalUnits=n,o!=null&&(this._completedUnits=o),this.update();}incTotalUnits(n=1){this._totalUnits+=n,this.update();}setCompletetedUnits(n){this._completedUnits=n,this.update();}setCompleted(){this._completedUnits=this._totalUnits,this.update();}incCompletedUnits(n=1){this._completedUnits+=n,this.update();}toString(n=0){let o=`${" ".repeat(n)}${this.name}: ${this._completedUnits} of ${this._totalUnits} units, ${Math.floor(this.getFraction()*100)} %, cancel=${this._isCancelled}
|
|
14
|
-
`;for(let i of this._children)o+=i.toString(n+1);return n===0?o.trim():o}};r(We,"Progress");var xe=We;function gf(e={}){let{maxParallel:t=3,name:n=O("pool"),idConflictResolution:o="memoize"}=e,i=new B,s=H();s.add(c);let a=new xe({name:n});a.on("progressCancelled",c);let l=0,u=0,y=0,h=0,x={};async function v(){if(l>0){let[f,p]=on();return i.once("didFinish",p),f}}r(v,"waitFinishAll");async function w(){for(let f of Object.keys(x))x[f].state==="finished"&&(await x[f].progress.dispose(),delete x[f]);}r(w,"cleanupFinished");function b(){i.emit("didFinish"),l=0,u=0,w(),a.reset();}r(b,"didFinish");function T(){let f=0,p=0;for(let{max:A,resolved:D,state:C}of Object.values(x))f+=A,p+=C==="finished"?A:Math.min(A,D);i.emit("didUpdate",l,u,f,p);}r(T,"didUpdate");function L(){if(T(),l>0&&l===u&&b(),y>=t)return;let f=Object.values(x).filter(p=>p.state==="waiting");if(f.length>0){let p;for(let A of f)A.group!=null&&Object.values(x).some(D=>D.state==="running"&&D.id!==A.id&&D.group===A.group)||(p==null||A.priority<p.priority)&&(p=A);if(p!=null){let A=p.id,D=p.done;p.state="running",++y,i.emit("didStart",A);let C=r(S=>{p&&(p.result=S,p.state="finished",p.resolved=p.max,p.progress?.setCompleted()),--y,++u,L();},"taskFinished");p.task(p).then(S=>{D(S),i.emit("didResolve",A,S),C(S);}).catch(S=>{D(),i.emit("didReject",A,S),C();});}}}r(L,"performNext");function m(f){let p=x[f];p&&p.state==="waiting"&&(x[f].state="finished",++u,i.emit("didCancel",f),x[f].progress.dispose(),T());}r(m,"cancel");function c(){Object.keys(x).forEach(m);}r(c,"cancelAll");function d(f){return x[f]!=null}r(d,"hasById");function g(f,p={}){let A,D=new Promise(I=>A=I),C=p.id??J();if(x[C]!=null){let I=p.idConflictResolution??o;if(I==="replace")m(C);else if(I==="memoize"||I==="prioritize"){let Gt=x[C];return I==="prioritize"&&(Gt.priority=++h),{id:C,promise:(async()=>{if(Gt.state==="finished")return x[C].result})(),dispose:()=>m(C),cancel:()=>m(C)}}else throw new Error(`Pool task with id=${C} already exists!`)}let S=new xe({name:C,totalUnits:p.max??1,completeUnits:p.resolved??0});return a.addChild(S),x[C]={id:C,task:f,priority:++h,group:p.group,state:"waiting",max:p.max??1,resolved:p.resolved??0,done:A,payload:p.payload,progress:S,setMax(I){S.setTotalUnits(I),x[C].max=I,T();},setResolved(I){S.setCompletetedUnits(I),x[C].resolved=I,T();},incResolved(I=1){S.incCompletedUnits(I),x[C].resolved+=I,T();}},++l,L(),{id:C,promise:D,dispose:()=>m(C),cancel:()=>m(C)}}return r(g,"enqueue"),{events:i,cancel:m,cancelAll:c,hasById:d,progress:a,enqueue:g,dispose:s,waitFinishAll:v}}r(gf,"usePool");var Nt=class Nt extends B{constructor(n={}){super();this.queue=[];this.waitToFinish=[];this.countMax=0;this.countResolved=0;this.paused=!1;let{name:o=O("queue"),logLevel:i}=n;this.name=o,this.log=R(`zeed:queue:${o}`,i??9007199254740991);}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?.name}`),n==null)break;this.countResolved===0&&this.emit("didStart",this.countMax);let{name:o,task:i,resolve:s}=n;this.currentTask=i();let a;try{this.log.info(`start task ${o}`),a=await this.currentTask,this.log(`finished task ${o} with result =`,a);}catch(l){this.log.warn("Error performing task",l);}s(a),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=O(this.name)}=o;return i?(this.log.info(`immediate execution ${s}`),await n()):(this.log(`enqueue ${s}`),new Promise(a=>{this.queue.push({name:s,task:n,resolve:a}),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(Nt,"SerialQueue");var or=Nt;function vf(e,t={}){let{delay:n=100,trailing:o=!0,leading:i=!0}=t,s=0,a=0,l=0,u;function y(){return s?(clearTimeout(s),s=void 0,!0):!1}r(y,"clearExistingTimeout");function h(...x){let v=Date.now(),w=v-a,b=r(()=>{l=0,a=Date.now(),e.apply(this,x);},"exec");if(u=b,w>n||!s){i&&(w>n?b():++l);let T=w>n?n:n-w;y(),a=v,s=setTimeout(()=>{s=0,o&&(!i||l>0)&&u?.();},T);}else ++l;}return r(h,"wrapper"),h.cancel=y,h.stop=()=>{y()&&u&&u();},h.immediate=r(async function(...v){y(),a=Date.now(),e.apply(this,v);},"immediate"),h.dispose=()=>h.stop(),h}r(vf,"throttle");function Af(e,t={}){let{delay:n=100}=t,o=0,i=!1,s;function a(){o&&(clearTimeout(o),o=0);}r(a,"clearExistingTimeout");async function l(){try{if(a(),s!=null){let h=[...s];s=void 0,i=!0,await z(e(...h)),i=!1,s!=null&&(a(),o=setTimeout(l,n));}}catch{}}r(l,"exec");function u(...h){s=[...h],a(),i===!1&&(o=setTimeout(l,n));}r(u,"wrapper");async function y(...h){a(),s=[...h],await l();}return r(y,"immediate"),u.cancel=a,u.dispose=a,u.immediate=y,u}r(Af,"debounce");function Zo(e,t=0){let n=setTimeout(e,t);return ()=>{n&&(clearTimeout(n),n=void 0);}}r(Zo,"useTimeout");function Ko(e,t){let n=setInterval(e,t);return ()=>{n&&(clearInterval(n),n=void 0);}}r(Ko,"useInterval");function Yo(e,t,n=!1){let o,i=!1;async function s(a=!1){a&&await z(e()),i||(o=setTimeout(()=>s(!0),t));}return r(s,"loop"),s(n),()=>{o&&(i=!0,clearInterval(o),o=void 0);}}r(Yo,"useIntervalPause");function Qo(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(Qo,"useEventListener");function Xo(e,t,n,...o){return e==null?()=>{}:(e.on?e.once(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(Xo,"useEventListenerOnce");function Ef(e){let t=H(e);return Object.assign(t,{timeout:(n,o=0)=>t.add(Zo(n,o)),interval:(n,o=0)=>t.add(Ko(n,o)),intervalPause:(n,o=0)=>t.add(Yo(n,o)),on:(n,o,i,...s)=>t.add(Qo(n,o,i,...s)),once:(n,o,i,...s)=>t.add(Xo(n,o,i,...s))})}r(Ef,"useDisposeWithUtils");function kf(e=globalThis?.location?.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(kf,"isLocalHost");var jt={cache:"no-cache",redirect:"follow",headers:{}};function ei(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(ei,"parseBasicAuth");async function ir(e,t={},n=fetch){try{N(t)&&(t=Ee({},...Q(t)));let o=ei(String(e));o&&(e=o.url,t=Ee({},t,ti(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;let s=R("zeed:network");try{s.warn(`Fetch of ${String(e)} returned status=${i.status}. Options:`,t),s.warn(`Response: ${await i.text()}`);}catch(a){s.error("Exception:",a);}}catch(o){R("zeed:network").error("fetchBasic",o);}}r(ir,"fetchBasic");async function $f(e,t={},n=fetch){try{let o=await ir(e,[{method:"GET",headers:{Accept:"application/json"}},t],n);if(o)return await o.json()}catch(o){R("zeed:network").error("fetchJSON error:",o);}}r($f,"fetchJson");async function _f(e,t={},n=fetch){try{let o=await ir(e,[jt,{method:"GET"},t],n);if(o)return await o.text()}catch(o){R("zeed:network").error("fetchHTML error:",o);}}r(_f,"fetchText");function Nf(e,t="POST"){return {method:t,...jt,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:Tn(e)}}r(Nf,"fetchOptionsFormURLEncoded");function jf(e,t="POST"){return {method:t,...jt,headers:{"Content-Type":"application/json; charset=utf-8"},body:M(e)}}r(jf,"fetchOptionsJson");function ti(e,t){return {headers:{Authorization:`Basic ${fe(`${e}:${t}`)}`}}}r(ti,"fetchOptionsBasicAuth");function sr(){if(typeof window<"u")return window}r(sr,"getWindow");function ni(){if(typeof navigator<"u")return navigator}r(ni,"getNavigator");function zf(){return sr()??typeof WorkerGlobalScope<"u"?self:typeof global<"u"?global:Function("return this;")()}r(zf,"getGlobal");function Gf(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}){let t=ni(),n=sr();return e.ios=t?.platform?.match(/(iPhone|iPod|iPad)/i)!=null,e.macos=!!t?.platform?.startsWith("Mac"),e.windows=!!t?.platform?.startsWith("Win"),e.beaker=n?.beaker!=null,e.electron=(t?.userAgent?.toLowerCase()?.indexOf(" electron/")||-1)>-1&&!e.beaker,e.wkwebview=n?.webkit?.messageHandlers!=null,e.pwa=t?.serviceWorker!=null,e.pwaInstalled=t?.standalone||n?.matchMedia?.("(display-mode: standalone)")?.matches,e.node=typeof process<"u"&&process?.release?.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=n&&"ontouchstart"in n||(t?.maxTouchPoints||0)>1||t?.msPointerEnabled&&n?.MSGesture||n?.DocumentTouch&&document instanceof DocumentTouch,e}r(Gf,"detect");function Vt(){return typeof window<"u"&&globalThis===window}r(Vt,"isBrowser");function qf(e){Vt()?window.addEventListener("beforeunload",e):typeof process<"u"&&process.on("exit",()=>e);}r(qf,"useExitHandler");var Ht=class Ht{constructor(t={}){this.store={};}setItem(t,n){this.store[t]=at(n);}getItem(t){return at(this.store[t])}removeItem(t){delete this.store[t];}clear(){this.store={};}allKeys(){return Object.keys(this.store)}};r(Ht,"MemStorage");var ar=Ht;function Qf(){}r(Qf,"noop");function tp(e){let t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),o=window.atob(n),i=new Uint8Array(o.length);for(let s=0;s<o.length;++s)i[s]=o.charCodeAt(s);return i}r(tp,"urlBase64ToUint8Array");function ri(e,t){let n="0123456789abcdef".split("");function o(m,c){let d=m[0],g=m[1],f=m[2],p=m[3];d=s(d,g,f,p,c[0],7,-680876936),p=s(p,d,g,f,c[1],12,-389564586),f=s(f,p,d,g,c[2],17,606105819),g=s(g,f,p,d,c[3],22,-1044525330),d=s(d,g,f,p,c[4],7,-176418897),p=s(p,d,g,f,c[5],12,1200080426),f=s(f,p,d,g,c[6],17,-1473231341),g=s(g,f,p,d,c[7],22,-45705983),d=s(d,g,f,p,c[8],7,1770035416),p=s(p,d,g,f,c[9],12,-1958414417),f=s(f,p,d,g,c[10],17,-42063),g=s(g,f,p,d,c[11],22,-1990404162),d=s(d,g,f,p,c[12],7,1804603682),p=s(p,d,g,f,c[13],12,-40341101),f=s(f,p,d,g,c[14],17,-1502002290),g=s(g,f,p,d,c[15],22,1236535329),d=a(d,g,f,p,c[1],5,-165796510),p=a(p,d,g,f,c[6],9,-1069501632),f=a(f,p,d,g,c[11],14,643717713),g=a(g,f,p,d,c[0],20,-373897302),d=a(d,g,f,p,c[5],5,-701558691),p=a(p,d,g,f,c[10],9,38016083),f=a(f,p,d,g,c[15],14,-660478335),g=a(g,f,p,d,c[4],20,-405537848),d=a(d,g,f,p,c[9],5,568446438),p=a(p,d,g,f,c[14],9,-1019803690),f=a(f,p,d,g,c[3],14,-187363961),g=a(g,f,p,d,c[8],20,1163531501),d=a(d,g,f,p,c[13],5,-1444681467),p=a(p,d,g,f,c[2],9,-51403784),f=a(f,p,d,g,c[7],14,1735328473),g=a(g,f,p,d,c[12],20,-1926607734),d=l(d,g,f,p,c[5],4,-378558),p=l(p,d,g,f,c[8],11,-2022574463),f=l(f,p,d,g,c[11],16,1839030562),g=l(g,f,p,d,c[14],23,-35309556),d=l(d,g,f,p,c[1],4,-1530992060),p=l(p,d,g,f,c[4],11,1272893353),f=l(f,p,d,g,c[7],16,-155497632),g=l(g,f,p,d,c[10],23,-1094730640),d=l(d,g,f,p,c[13],4,681279174),p=l(p,d,g,f,c[0],11,-358537222),f=l(f,p,d,g,c[3],16,-722521979),g=l(g,f,p,d,c[6],23,76029189),d=l(d,g,f,p,c[9],4,-640364487),p=l(p,d,g,f,c[12],11,-421815835),f=l(f,p,d,g,c[15],16,530742520),g=l(g,f,p,d,c[2],23,-995338651),d=u(d,g,f,p,c[0],6,-198630844),p=u(p,d,g,f,c[7],10,1126891415),f=u(f,p,d,g,c[14],15,-1416354905),g=u(g,f,p,d,c[5],21,-57434055),d=u(d,g,f,p,c[12],6,1700485571),p=u(p,d,g,f,c[3],10,-1894986606),f=u(f,p,d,g,c[10],15,-1051523),g=u(g,f,p,d,c[1],21,-2054922799),d=u(d,g,f,p,c[8],6,1873313359),p=u(p,d,g,f,c[15],10,-30611744),f=u(f,p,d,g,c[6],15,-1560198380),g=u(g,f,p,d,c[13],21,1309151649),d=u(d,g,f,p,c[4],6,-145523070),p=u(p,d,g,f,c[11],10,-1120210379),f=u(f,p,d,g,c[2],15,718787259),g=u(g,f,p,d,c[9],21,-343485551),m[0]=b(d,m[0]),m[1]=b(g,m[1]),m[2]=b(f,m[2]),m[3]=b(p,m[3]);}r(o,"md5cycle");function i(m,c,d,g,f,p){return c=b(b(c,m),b(g,p)),b(c<<f|c>>>32-f,d)}r(i,"cmn");function s(m,c,d,g,f,p,A){return i(c&d|~c&g,m,c,f,p,A)}r(s,"ff");function a(m,c,d,g,f,p,A){return i(c&g|d&~g,m,c,f,p,A)}r(a,"gg");function l(m,c,d,g,f,p,A){return i(c^d^g,m,c,f,p,A)}r(l,"hh");function u(m,c,d,g,f,p,A){return i(d^(c|~g),m,c,f,p,A)}r(u,"ii");function y(m){let c=m.length,d=[1732584193,-271733879,-1732584194,271733878],g;for(g=64;g<=m.length;g+=64)o(d,h(m.substring(g-64,g)));m=m.substring(g-64);let f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(g=0;g<m.length;g++)f[g>>2]|=m.charCodeAt(g)<<(g%4<<3);if(f[g>>2]|=128<<(g%4<<3),g>55)for(o(d,f),g=0;g<16;g++)f[g]=0;return f[14]=c*8,o(d,f),d}r(y,"md51");function h(m){let c=[],d;for(d=0;d<64;d+=4)c[d>>2]=m.charCodeAt(d)+(m.charCodeAt(d+1)<<8)+(m.charCodeAt(d+2)<<16)+(m.charCodeAt(d+3)<<24);return c}r(h,"md5blk");function x(m){let c="",d=0;for(;d<4;d++)c+=n[m>>d*8+4&15]+n[m>>d*8&15];return c}r(x,"rhex");function v(m){for(let c=0;c<m.length;c++)m[c]=x(m[c]);return m.join("")}r(v,"hex");function w(m){return v(y(m))}r(w,"md5");function b(m,c){return m+c&4294967295}r(b,"add32"),t=t||{};let T=[];t={size:t.size||"50",rating:t.rating||"g",secure:t.secure||location.protocol==="https:",backup:t.backup||""},e=e.trim().toLowerCase();let L=t.secure?"https://secure.gravatar.com/avatar/":"http://www.gravatar.com/avatar/";return t.rating&&T.push(`r=${t.rating}`),t.backup&&T.push(`d=${encodeURIComponent(t.backup)}`),t.size&&T.push(`s=${t.size}`),`${L+w(e)}?${T.join("&")}`}r(ri,"gravatar");function op(e,t=""){try{return ri(e,{size:256,backup:"monsterid",secure:!0})}catch{return t}}r(op,"gravatarURLByEmail");var zt=class zt{constructor(t){this.pretty=!1;this.name=t.name??"zeed",this.prefix=`${t.name}$`,this.objectToString=t.objectToString??(n=>this.pretty?M(n,null,2):M(n)),this.objectFromString=t.objectFromString??(n=>{try{return JSON.parse(n)}catch{}});}setItem(t,n){let o=this.objectToString(n);localStorage.setItem(`${this.prefix}${t}`,o);}getItem(t){let n=localStorage.getItem(`${this.prefix}${t}`);if(n!=null)return this.objectFromString(n)}removeItem(t){localStorage.removeItem(`${this.prefix}${t}`);}clear(){Object.keys(localStorage).filter(t=>t.startsWith(this.prefix)).forEach(t=>{localStorage.removeItem(t);});}allKeys(){let t=this.prefix.length;return Object.keys(localStorage).filter(n=>n.startsWith(this.prefix)).map(n=>n.substr(t))}};r(zt,"LocalStorage");var ur=zt;function Je(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&Number.parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}r(Je,"browserSupportsColors");function cr(e={}){let t='font-family: "JetBrains Mono", Menlo; font-size: 11px;',n=`${t}`,o=`font-weight: 600; ${t}`,i=Je(),s={},a=q(),{filter:l=void 0,level:u=void 0,colors:y=!0,padding:h=16,time:x=!0}=e,v=_(l),w=X(u);return b=>{if(!w(b.level)||!v(b.name))return;let T=x?`+${dt(q()-a)}`:"",L=b.name||"",m=s[L||""];m==null&&(m={color:ke(L)},s[L]=m);let c;switch(h>0&&(L=L.padEnd(16," ")),y&&i?(c=[`%c${L}%c %s %c${T}`],c.push(`color:${m.color}; ${o}`),c.push(n),c.push(b.messages?.[0]??""),c.push(`color:${m.color};`),c.push(...b.messages.slice(1))):c=[L,...b.messages,`+${T}`],c=c.map(d=>d instanceof Uint8Array?`<Uint8Array size=${d.length}>`:d),b.level){case 1:e.levelHelper&&(c[0]=`I|* ${c[0]}`),console.info(...c);break;case 2:e.levelHelper&&(c[0]=`W|** ${c[0]}`),console.warn(...c);break;case 3:e.levelHelper&&(c[0]=`E|*** ${c[0]}`),console.error(...c);break;default:e.levelHelper&&(c[0]=`D| ${c[0]}`),console.debug(...c);break}}}r(cr,"LoggerBrowserHandler");function lr(e={}){let t=e.filter??localStorage.zeed??localStorage.debug,n='font-family: "JetBrains Mono", Menlo; font-size: 11px;',o=`${n}`,i=`font-weight: 600; ${n}`,s=Je(),a=r(()=>{},"noop");return r(function l(u="",y){let h,x=_(t),v=de(y??-1);if(x(u)&&v!==9007199254740991){let T=function(L,m){return v<=L?m:()=>{}};r(T,"defineForLogLevel");let b=[];if(s){let L=ke(u);b.push(`%c${u.padEnd(16," ")}%c %s`),b.push(`color:${L}; ${i}`),b.push(o);}else b.push(`[${u}] %s`);h=T(0,console.debug.bind(console,...b)),h.debug=T(0,console.debug.bind(console,...b)),h.info=T(1,console.info.bind(console,...b)),h.warn=T(2,console.warn.bind(console,...b)),h.error=T(3,console.error.bind(console,...b)),h.fatal=T(4,(...L)=>{throw h.error(...L),new Error(`${L.map(String).join(" ")}`)}),h.assert=T(4,(L,...m)=>{(L==null||typeof L=="number"&&Number.isNaN(L)||!L)&&h.fatal(...m);});}else h=r(()=>{},"log"),h.debug=a,h.info=a,h.warn=a,h.error=a,h.assert=a,h.fatal=a;return h.extend=b=>l(u?`${u}:${b}`:b),h.label=u,h},"LoggerBrowserDebugFactory")}r(lr,"LoggerBrowserSetupDebugFactory");function Tp(e={}){console.info("activateConsoleDebug is activated by default in browsers");}r(Tp,"activateConsoleDebug");function oi(e,t){return pt(n=>{Vt()&&!ct(localStorage.getItem("zeed"))&&(n.setHandlers([cr()]),n.setFactory(lr({})));})(e,t)}r(oi,"Logger");
|
|
13
|
+
`&&(o.push(i),i=[]);}return o}r(Io,"csvParse");function Jc(e,t={}){let n=Io(e,t),o=n[0];return n.slice(1).map(i=>Object.fromEntries(i.map((s,a)=>[o[a],s])))}r(Jc,"csvParseToObjects");function ko(e){let t;if(typeof e=="function"?t=e():P(e)?t=e:typeof e.dispose=="function"?t=e.dispose():P(e.dispose)&&(t=e.dispose),P(t))return t}r(ko,"callDisposer");function H(e){let t=e;t!=null&&(Ee(t)?t={name:t}:"debug"in t&&"label"in t&&(t={name:t.label,log:t}));let n=t?.name,o=t?.log??R("zeed:dispose"),i=0,s=[];function a(h){if(h!=null&&s.includes(h)){Qe(s,v=>v!==h);let x=ko(h);if(P(x))return x}}r(a,"untrack");function l(h){if(h!=null)return s.unshift(h),()=>a(h)}r(l,"track");function u(h=!1){n&&o.debug(`dispose "${n}": ${s.length} entries`),i+=1;let x=[];for(;s.length>0;){let v=s[0],w=a(v);if(P(w)){if(h)throw new Error(`Async disposable found: ${v} -> ${w}`);x.push(w);}}if(x.length>0)return Promise.all(x)}r(u,"dispose");function y(){u(!0);}return r(y,"disposeSync"),Object.assign(u,{disposed:i,add:l,remove:a,track:l,untrack:a,dispose:u,disposeSync:y,sync:y,exec:u,getSize(){return s.length},isDisposed(){return s.length<=0}})}r(H,"useDispose");function tl(e={}){let{mode:t="fifo"}=e,n=[],o=r(async(s=!1)=>{for(;n.length>0;){let a=n[0];if(Qe(n,l=>l!==a),typeof a=="function"){let l=a();if(P(l)){if(s)throw new Error(`Expected sync only function, but found async: ${a}`);await l;}}else if(P(a)){if(s)throw new Error(`Expected sync only function, but found async: ${a}`);await a;}else throw new Error(`Unhandled disposable: ${a}`)}},"exec");return Object.assign(o,{add:r(s=>{t==="lifo"?n.unshift(s):n.push(s);},"add"),exec:o,getSize(){return n.length}})}r(tl,"useDefer");function il(){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(il,"useMutex");function sl(){let e=!0;return async(t,n)=>{let o=!1;if(e){e=!1;try{let i=t();P(i)&&await i,o=!0;}finally{e=!0;}}else if(n!==void 0){let i=n();P(i)&&await i;}return o}}r(sl,"useAsyncMutex");var Et=class Et{constructor(){this.subscribers={};this.subscribersOnAny=[];this._logEmitter=R("zeed:emitter","warn");this.call=new Proxy({},{get:(t,n)=>async(...o)=>await this.emit(n,...o)});}async emit(t,...n){let o=!1;try{let i=this.subscribers[t]||[];if(this._logEmitter.debug("emit",this?.constructor?.name,t,...n,i),this.subscribersOnAny.forEach(s=>s(t,...n)),i.length>0){let s=i.map(({fn:a})=>{try{return z(a(...n))}catch(l){this._logEmitter.warn("emit warning:",l);}return null}).filter(a=>a!=null);o=!0,await Promise.all(s);}}catch(i){this._logEmitter.error("emit exception",i);}return o}onAny(t){this.subscribersOnAny.push(t);}on(t,n,o={}){let{priority:i=0}=o,s=this.subscribers[t]||[],a=s.length,l={fn:n,priority:i};if(a<=0)this.subscribers[t]=[l];else {let u=a;for(let y=s.length-1;y>=0;y--){let h=s[y];if(i<=h.priority)break;u-=1;}s.splice(u,0,l);}return ()=>{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 z(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.fn!==n),this}removeAllListeners(){return this.subscribers={},this}};r(Et,"Emitter");var B=Et;function pl(){let e=Z().emitter;return e||(e=new B,Z().emitter=e),e}r(pl,"getGlobalEmitter");var ze=16;function St(){return ie(ze)}r(St,"uuidBytes");function Po(e=St()){return nt(e,22)}r(Po,"uuidB62");function Ro(e){return nt(e,22)}r(Ro,"uuidEncodeB62");function Mo(e){return nn(e,ze)}r(Mo,"uuidDecodeB62");function Bo(e=St()){return tt(e,26)}r(Bo,"uuidB32");function Oo(e){return tt(e,26)}r(Oo,"uuidEncodeB32");function $o(e){return tn(e,ze)}r($o,"uuidDecodeB32");var _o="10000000-1000-4000-8000-100000000000",No=r(function(){return typeof crypto<"u"&&crypto.randomUUID!=null?crypto.randomUUID():_o.replace(/[018]/g,e=>(e^ie(1)[0]&15>>e/4).toString(16))},"uuidv4");function jo(e){let t=Yt(e);return `${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16)}`}r(jo,"uuidEncodeV4");function Vo(e){return Qt(e.replaceAll("-",""))}r(Vo,"uuidDecodeV4");var Zn=16e11;function Ho(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(Ho,"longToByteArray");function Kn(){let e=q()-Zn;return new Uint8Array([...Ho(e),...ie(10)])}r(Kn,"suidBytes");function xl(){return Go(Kn())}r(xl,"suid");function wl(e){return zo(Qn(e))}r(wl,"suidDate");function zo(e){return new Date(Zn+e.slice(0,6).reduce((t,n)=>t*256+n,0))}r(zo,"suidBytesDate");function Tl(){return new Uint32Array(ie(4))[0]}r(Tl,"uuid32bit");var It={base62:{uuid:Po,uuidDecode:Mo,uuidEncode:Ro},base32:{uuid:Bo,uuidDecode:$o,uuidEncode:Oo},uuidv4:{uuid:No,uuidDecode:Vo,uuidEncode:jo}},Ge="base62",Yn=!1;function Ll(e,t=!1){Ge=e,Yn=t;}r(Ll,"setUuidDefaultEncoding");function J(){return It[Ge].uuid(Yn?Kn():St())}r(J,"uuid");function Qn(e){return It[Ge].uuidDecode(e)}r(Qn,"uuidDecode");function Go(e){return It[Ge].uuidEncode(e)}r(Go,"uuidEncode");function vl(e){try{return Qn(e).length===ze}catch{}return !1}r(vl,"uuidIsValid");var Ft={};function O(e="id"){return Ft[e]==null&&(Ft[e]=0),`${e}-${Ft[e]++}`}r(O,"uname");var qo=0;function Al(){return `id-${qo++}`}r(Al,"qid");var Pt=class Pt extends B{constructor(){super(...arguments);this.id=J();this.dispose=H();}close(){this.dispose();}};r(Pt,"Channel");var kt=Pt,Rt=class Rt extends kt{constructor(){super(...arguments);this.isConnected=!0;}postMessage(n){this.other?.emit("message",{data:n,origin:"local",lastEventId:J()});}};r(Rt,"LocalChannel");var qe=Rt;function Sl(){let e=new qe,t=new qe;return e.other=t,t.other=e,[e,t]}r(Sl,"createLocalChannelPair");var Mt=class Mt{async encode(t){return t}async decode(t){return t}};r(Mt,"NoopEncoder");var Xn=Mt,Bt=class Bt{async encode(t){return Xe(t)}async decode(t){return et(t)}};r(Bt,"JsonEncoder");var se=Bt,Ot=class Ot{constructor(t){this.key=t;}async encode(t){let n=Xe(t);return await Wn(n,this.key)}async decode(t){let n=await Jn(t,this.key);return et(n)}};r(Ot,"CryptoEncoder");var er=Ot;function tr(e,t,n={}){return new Proxy(n,{get:(o,i)=>i in o?o[i]:(...s)=>e(i,s,t)})}r(tr,"createPromiseProxy");function Vl(e={}){let{name:t=O("hub"),encoder:n=new se,retryAfter:o=1e3,ignoreUnhandled:i=!0,logLevel:s=!1}=e,a=R(t,s),l={},u,y=[],h,x={},v=r(()=>{clearTimeout(h);},"dispose"),w=r(async()=>{if(clearTimeout(h),u){if(u.isConnected)for(;y.length;){let m=y[0];try{u.postMessage(await n.encode(m)),y.shift();}catch(c){a.warn("postMessage",c);break}}y.length>0&&o>0&&(h=setTimeout(w,o));}},"postNext"),b=r(async m=>{a("enqueue postMessage",m),y.push(m),await w();},"postMessage"),T=r(async m=>{u=m,u.on("connect",w),u.on("message",async c=>{a("onmessage",typeof c);let{name:d,args:g,id:f,result:p,error:A}=await n.decode(c.data);if(d){a(`name ${d} id ${f}`);try{if(l[d]==null)throw new Error(`handler for ${d} was not found`);let D=l[d](...g);P(D)&&(D=await D),a(`result ${D}`),f&&await b({id:f,result:D});}catch(D){let C=D instanceof Error?D:new Error(rt(D));a.warn("execution error",C.name),await b({id:f,error:{message:C.message,stack:C.stack,name:C.name}});}}else if(f)if(a(`response for id=${f}: result=${p}, error=${A}`),x[f]==null)p===void 0?a(`skip response for ${f}`):a.warn(`no response hook for ${f}`);else {let[D,C]=x[f];if(D&&C)if(delete x[f],A){let S=new Error(A.message);S.stack=A.stack,S.name=A.name,a.warn("reject",S.name),C(S);}else a("resolve",p),D(p);}else i||a.warn("Unhandled message",c);}),await w();},"connect"),L=r(async(m,c,d={})=>{let{timeout:g=5e3}=d,f=J();return await b({name:m,args:c,id:f}),sn(new Promise((p,A)=>x[f]=[p,A]),g)},"fetchMessage");return e.channel&&T(e.channel),{dispose:v,connect:T,listen(m){Object.assign(l,m);},send(){return tr(L,{},{options(m){return tr(L,{...m})}})}}}r(Vl,"useMessageHub");var _t=class _t extends B{constructor(n){super();this.publish=this.emit.bind(this);this.subscribe=this.on.bind(this);let{name:o,encoder:i=new se,channel:s,debug:a=!1}=n;this.channel=s,this.encoder=i,this.debug=a,this.name=o??this.channel.id??O("pubsub"),this.log=R(`${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:l})=>{let u=await this.encoder.decode(l);if(this.debug?this.log(`channel message, event=${u?.event}, info=`,u):this.log(`channel message, event=${u?.event}`),u){let{event:y,args:h}=u;await this.emitSuper(y,...h);}});}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(_t,"PubSub");var $t=_t;function Zl(e){return new $t(e)}r(Zl,"usePubSub");var Wo=1;var nr=r(e=>e,"defaultSerialize"),Jo=nr;function rr(e,t,n=[]){let{post:o,on:i,serialize:s=nr,deserialize:a=Jo,log:l}=e,u=new Map;return i(async h=>{try{let x=a(h),[v,w,b,T]=x;if(v===1||v===2){let L,m;if(T!=null)try{let c=t[T];L=await c(...w);}catch(c){m=String(c);}else m="Method implementation missing";m&&l?.warn("error",x,m),v===1&&b&&o(s(m?[4,m,b]:[3,L,b]));}else if(b){let L=u.get(b);L!=null&&(v===4?L.reject(w):L.resolve(w)),u.delete(b);}}catch(x){l?.warn("Error on handling RPC data. Invalid?",x,h);}}),{post:o,serialize:s,rpcPromiseMap:u,proxyHandler:{get(h,x){let v=r((...b)=>{o(s([2,b,null,x]));},"sendEvent");if(e.onlyEvents||n.includes(x))return v.asEvent=v,v;let w=r((...b)=>new Promise((T,L)=>{let m=Wo++;u.set(m,{resolve:T,reject:L}),o(s([1,b,m,x]));}),"sendCall");return w.asEvent=v,w}}}}r(rr,"setupRPCBasic");function Ql(e,t){let{eventNames:n=[]}=t,{proxyHandler:o}=rr(t,e,n);return new Proxy({},o)}r(Ql,"useRPC");function Xl(e){let t=[],n={},{proxyHandler:o}=rr(e,n);function i(){return new Proxy({},o)}return r(i,"createRPCProxy"),function(s,a=[]){return Object.assign(n,s??{}),t.push(...a),i()}}r(Xl,"useRPCHub");var We=class We extends B{constructor(n={}){super();this._isCancelled=!1;this._resetWhenFinished=!0;this._children=[];this.dispose=H();this._totalUnits=n.totalUnits??0,this._completedUnits=n.completeUnits??0,this._resetWhenFinished=n.resetWhenFinished??!0,this.name=n.name??O("progress"),this.dispose.add(async()=>{for(let o of this._children)await o.dispose();await this.emit("progressDispose",this);});}update(){this.emit("progressChanged",this),this._isCancelled&&this._resetWhenFinished&&this.getTotalUnits()<=this.getCompletedUnits()&&this.reset();}reset(){if(this._isCancelled){this._isCancelled=!1;for(let n of this._children)n.reset();this.update();}}async cancel(){if(!this._isCancelled){this._isCancelled=!0,await this.emit("progressCancelled",this);for(let n of this._children)await n.cancel();this.update();}}addChild(n){n.on("progressDispose",()=>this.removeChild(n)),n.on("progressChanged",()=>this.update()),this._children.includes(n)||this._children.push(n),this.update();}createChildProgress(n){let o=new We(n);return this.addChild(o),o}removeChild(n){Wt(this._children,n),this.update();}getTotalUnits(){if(this.isIndeterminate())return 0;let n=this._totalUnits;for(let o of this._children)n+=o.getTotalUnits();return n}getCompletedUnits(){if(this.isIndeterminate())return 0;let n=this._completedUnits;for(let o of this._children)n+=o.getCompletedUnits();return n}isIndeterminate(){return this._totalUnits<=0&&this._children.length<=0}isCancelled(){return this._isCancelled}isFinished(){return this.dispose.isDisposed()||!this.isIndeterminate()&&this.getTotalUnits()<=this.getCompletedUnits()}getFraction(){if(this.isIndeterminate())return 0;let n=this.getCompletedUnits()/this.getTotalUnits();return Number.isNaN(n)&&(n=0),Math.min(1,Math.max(0,n))}getChildrenCount(){return this._children.length}setTotalUnits(n,o){this._totalUnits=n,o!=null&&(this._completedUnits=o),this.update();}incTotalUnits(n=1){this._totalUnits+=n,this.update();}setCompletetedUnits(n){this._completedUnits=n,this.update();}setCompleted(){this._completedUnits=this._totalUnits,this.update();}incCompletedUnits(n=1){this._completedUnits+=n,this.update();}toString(n=0){let o=`${" ".repeat(n)}${this.name}: ${this._completedUnits} of ${this._totalUnits} units, ${Math.floor(this.getFraction()*100)} %, cancel=${this._isCancelled}
|
|
14
|
+
`;for(let i of this._children)o+=i.toString(n+1);return n===0?o.trim():o}};r(We,"Progress");var xe=We;function gf(e={}){let{maxParallel:t=3,name:n=O("pool"),idConflictResolution:o="memoize"}=e,i=new B,s=H();s.add(c);let a=new xe({name:n});a.on("progressCancelled",c);let l=0,u=0,y=0,h=0,x={};async function v(){if(l>0){let[f,p]=on();return i.once("didFinish",p),f}}r(v,"waitFinishAll");async function w(){for(let f of Object.keys(x))x[f].state==="finished"&&(await x[f].progress.dispose(),delete x[f]);}r(w,"cleanupFinished");function b(){i.emit("didFinish"),l=0,u=0,w(),a.reset();}r(b,"didFinish");function T(){let f=0,p=0;for(let{max:A,resolved:D,state:C}of Object.values(x))f+=A,p+=C==="finished"?A:Math.min(A,D);i.emit("didUpdate",l,u,f,p);}r(T,"didUpdate");function L(){if(T(),l>0&&l===u&&b(),y>=t)return;let f=Object.values(x).filter(p=>p.state==="waiting");if(f.length>0){let p;for(let A of f)A.group!=null&&Object.values(x).some(D=>D.state==="running"&&D.id!==A.id&&D.group===A.group)||(p==null||A.priority<p.priority)&&(p=A);if(p!=null){let A=p.id,D=p.done;p.state="running",++y,i.emit("didStart",A);let C=r(S=>{p&&(p.result=S,p.state="finished",p.resolved=p.max,p.progress?.setCompleted()),--y,++u,L();},"taskFinished");p.task(p).then(S=>{D(S),i.emit("didResolve",A,S),C(S);}).catch(S=>{D(),i.emit("didReject",A,S),C();});}}}r(L,"performNext");function m(f){let p=x[f];p&&p.state==="waiting"&&(x[f].state="finished",++u,i.emit("didCancel",f),x[f].progress.dispose(),T());}r(m,"cancel");function c(){Object.keys(x).forEach(m);}r(c,"cancelAll");function d(f){return x[f]!=null}r(d,"hasById");function g(f,p={}){let A,D=new Promise(I=>A=I),C=p.id??J();if(x[C]!=null){let I=p.idConflictResolution??o;if(I==="replace")m(C);else if(I==="memoize"||I==="prioritize"){let Gt=x[C];return I==="prioritize"&&(Gt.priority=++h),{id:C,promise:(async()=>{if(Gt.state==="finished")return x[C].result})(),dispose:()=>m(C),cancel:()=>m(C)}}else throw new Error(`Pool task with id=${C} already exists!`)}let S=new xe({name:C,totalUnits:p.max??1,completeUnits:p.resolved??0});return a.addChild(S),x[C]={id:C,task:f,priority:++h,group:p.group,state:"waiting",max:p.max??1,resolved:p.resolved??0,done:A,payload:p.payload,progress:S,setMax(I){S.setTotalUnits(I),x[C].max=I,T();},setResolved(I){S.setCompletetedUnits(I),x[C].resolved=I,T();},incResolved(I=1){S.incCompletedUnits(I),x[C].resolved+=I,T();}},++l,L(),{id:C,promise:D,dispose:()=>m(C),cancel:()=>m(C)}}return r(g,"enqueue"),{events:i,cancel:m,cancelAll:c,hasById:d,progress:a,enqueue:g,dispose:s,waitFinishAll:v}}r(gf,"usePool");var Nt=class Nt extends B{constructor(n={}){super();this.queue=[];this.waitToFinish=[];this.countMax=0;this.countResolved=0;this.paused=!1;let{name:o=O("queue"),logLevel:i}=n;this.name=o,this.log=R(`zeed:queue:${o}`,i??9007199254740991);}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?.name}`),n==null)break;this.countResolved===0&&this.emit("didStart",this.countMax);let{name:o,task:i,resolve:s}=n;this.currentTask=i();let a;try{this.log.info(`start task ${o}`),a=await this.currentTask,this.log(`finished task ${o} with result =`,a);}catch(l){this.log.warn("Error performing task",l);}s(a),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=O(this.name)}=o;return i?(this.log.info(`immediate execution ${s}`),await n()):(this.log(`enqueue ${s}`),new Promise(a=>{this.queue.push({name:s,task:n,resolve:a}),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(Nt,"SerialQueue");var or=Nt;function vf(e,t={}){let{delay:n=100,trailing:o=!0,leading:i=!0}=t,s=0,a=0,l=0,u;function y(){return s?(clearTimeout(s),s=void 0,!0):!1}r(y,"clearExistingTimeout");function h(...x){let v=Date.now(),w=v-a,b=r(()=>{l=0,a=Date.now(),e.apply(this,x);},"exec");if(u=b,w>n||!s){i&&(w>n?b():++l);let T=w>n?n:n-w;y(),a=v,s=setTimeout(()=>{s=0,o&&(!i||l>0)&&u?.();},T);}else ++l;}return r(h,"wrapper"),h.cancel=y,h.stop=()=>{y()&&u&&u();},h.immediate=r(async function(...v){y(),a=Date.now(),e.apply(this,v);},"immediate"),h.dispose=()=>h.stop(),h}r(vf,"throttle");function Af(e,t={}){let{delay:n=100}=t,o=0,i=!1,s;function a(){o&&(clearTimeout(o),o=0);}r(a,"clearExistingTimeout");async function l(){try{if(a(),s!=null){let h=[...s];s=void 0,i=!0,await z(e(...h)),i=!1,s!=null&&(a(),o=setTimeout(l,n));}}catch{}}r(l,"exec");function u(...h){s=[...h],a(),i===!1&&(o=setTimeout(l,n));}r(u,"wrapper");async function y(...h){a(),s=[...h],await l();}return r(y,"immediate"),u.cancel=a,u.dispose=a,u.immediate=y,u}r(Af,"debounce");function Zo(e,t=0){let n=setTimeout(e,t);return ()=>{n&&(clearTimeout(n),n=void 0);}}r(Zo,"useTimeout");function Ko(e,t){let n=setInterval(e,t);return ()=>{n&&(clearInterval(n),n=void 0);}}r(Ko,"useInterval");function Yo(e,t,n=!1){let o,i=!1;async function s(a=!1){a&&await z(e()),i||(o=setTimeout(()=>s(!0),t));}return r(s,"loop"),s(n),()=>{o&&(i=!0,clearInterval(o),o=void 0);}}r(Yo,"useIntervalPause");function Qo(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(Qo,"useEventListener");function Xo(e,t,n,...o){return e==null?()=>{}:(e.on?e.once(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(Xo,"useEventListenerOnce");function Ff(e){let t=H(e);return Object.assign(t,{timeout:(n,o=0)=>t.add(Zo(n,o)),interval:(n,o=0)=>t.add(Ko(n,o)),intervalPause:(n,o=0)=>t.add(Yo(n,o)),on:(n,o,i,...s)=>t.add(Qo(n,o,i,...s)),once:(n,o,i,...s)=>t.add(Xo(n,o,i,...s))})}r(Ff,"useDisposeWithUtils");function kf(e=globalThis?.location?.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(kf,"isLocalHost");var jt={cache:"no-cache",redirect:"follow",headers:{}};function ei(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(ei,"parseBasicAuth");async function ir(e,t={},n=fetch){try{N(t)&&(t=Fe({},...Q(t)));let o=ei(String(e));o&&(e=o.url,t=Fe({},t,ti(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;let s=R("zeed:network");try{s.warn(`Fetch of ${String(e)} returned status=${i.status}. Options:`,t),s.warn(`Response: ${await i.text()}`);}catch(a){s.error("Exception:",a);}}catch(o){R("zeed:network").error("fetchBasic",o);}}r(ir,"fetchBasic");async function $f(e,t={},n=fetch){try{let o=await ir(e,[{method:"GET",headers:{Accept:"application/json"}},t],n);if(o)return await o.json()}catch(o){R("zeed:network").error("fetchJSON error:",o);}}r($f,"fetchJson");async function _f(e,t={},n=fetch){try{let o=await ir(e,[jt,{method:"GET"},t],n);if(o)return await o.text()}catch(o){R("zeed:network").error("fetchHTML error:",o);}}r(_f,"fetchText");function Nf(e,t="POST"){return {method:t,...jt,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:Tn(e)}}r(Nf,"fetchOptionsFormURLEncoded");function jf(e,t="POST"){return {method:t,...jt,headers:{"Content-Type":"application/json; charset=utf-8"},body:M(e)}}r(jf,"fetchOptionsJson");function ti(e,t){return {headers:{Authorization:`Basic ${fe(`${e}:${t}`)}`}}}r(ti,"fetchOptionsBasicAuth");function sr(){if(typeof window<"u")return window}r(sr,"getWindow");function ni(){if(typeof navigator<"u")return navigator}r(ni,"getNavigator");function zf(){return sr()??typeof WorkerGlobalScope<"u"?self:typeof global<"u"?global:Function("return this;")()}r(zf,"getGlobal");function Gf(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}){let t=ni(),n=sr();return e.ios=t?.platform?.match(/(iPhone|iPod|iPad)/i)!=null,e.macos=!!t?.platform?.startsWith("Mac"),e.windows=!!t?.platform?.startsWith("Win"),e.beaker=n?.beaker!=null,e.electron=(t?.userAgent?.toLowerCase()?.indexOf(" electron/")||-1)>-1&&!e.beaker,e.wkwebview=n?.webkit?.messageHandlers!=null,e.pwa=t?.serviceWorker!=null,e.pwaInstalled=t?.standalone||n?.matchMedia?.("(display-mode: standalone)")?.matches,e.node=typeof process<"u"&&process?.release?.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=n&&"ontouchstart"in n||(t?.maxTouchPoints||0)>1||t?.msPointerEnabled&&n?.MSGesture||n?.DocumentTouch&&document instanceof DocumentTouch,e}r(Gf,"detect");function Vt(){return typeof window<"u"&&globalThis===window}r(Vt,"isBrowser");function qf(e){Vt()?window.addEventListener("beforeunload",e):typeof process<"u"&&process.on("exit",()=>e);}r(qf,"useExitHandler");var Ht=class Ht{constructor(t={}){this.store={};}setItem(t,n){this.store[t]=at(n);}getItem(t){return at(this.store[t])}removeItem(t){delete this.store[t];}clear(){this.store={};}allKeys(){return Object.keys(this.store)}};r(Ht,"MemStorage");var ar=Ht;function Qf(){}r(Qf,"noop");function tp(e){let t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/-/g,"+").replace(/_/g,"/"),o=window.atob(n),i=new Uint8Array(o.length);for(let s=0;s<o.length;++s)i[s]=o.charCodeAt(s);return i}r(tp,"urlBase64ToUint8Array");function ri(e,t){let n="0123456789abcdef".split("");function o(m,c){let d=m[0],g=m[1],f=m[2],p=m[3];d=s(d,g,f,p,c[0],7,-680876936),p=s(p,d,g,f,c[1],12,-389564586),f=s(f,p,d,g,c[2],17,606105819),g=s(g,f,p,d,c[3],22,-1044525330),d=s(d,g,f,p,c[4],7,-176418897),p=s(p,d,g,f,c[5],12,1200080426),f=s(f,p,d,g,c[6],17,-1473231341),g=s(g,f,p,d,c[7],22,-45705983),d=s(d,g,f,p,c[8],7,1770035416),p=s(p,d,g,f,c[9],12,-1958414417),f=s(f,p,d,g,c[10],17,-42063),g=s(g,f,p,d,c[11],22,-1990404162),d=s(d,g,f,p,c[12],7,1804603682),p=s(p,d,g,f,c[13],12,-40341101),f=s(f,p,d,g,c[14],17,-1502002290),g=s(g,f,p,d,c[15],22,1236535329),d=a(d,g,f,p,c[1],5,-165796510),p=a(p,d,g,f,c[6],9,-1069501632),f=a(f,p,d,g,c[11],14,643717713),g=a(g,f,p,d,c[0],20,-373897302),d=a(d,g,f,p,c[5],5,-701558691),p=a(p,d,g,f,c[10],9,38016083),f=a(f,p,d,g,c[15],14,-660478335),g=a(g,f,p,d,c[4],20,-405537848),d=a(d,g,f,p,c[9],5,568446438),p=a(p,d,g,f,c[14],9,-1019803690),f=a(f,p,d,g,c[3],14,-187363961),g=a(g,f,p,d,c[8],20,1163531501),d=a(d,g,f,p,c[13],5,-1444681467),p=a(p,d,g,f,c[2],9,-51403784),f=a(f,p,d,g,c[7],14,1735328473),g=a(g,f,p,d,c[12],20,-1926607734),d=l(d,g,f,p,c[5],4,-378558),p=l(p,d,g,f,c[8],11,-2022574463),f=l(f,p,d,g,c[11],16,1839030562),g=l(g,f,p,d,c[14],23,-35309556),d=l(d,g,f,p,c[1],4,-1530992060),p=l(p,d,g,f,c[4],11,1272893353),f=l(f,p,d,g,c[7],16,-155497632),g=l(g,f,p,d,c[10],23,-1094730640),d=l(d,g,f,p,c[13],4,681279174),p=l(p,d,g,f,c[0],11,-358537222),f=l(f,p,d,g,c[3],16,-722521979),g=l(g,f,p,d,c[6],23,76029189),d=l(d,g,f,p,c[9],4,-640364487),p=l(p,d,g,f,c[12],11,-421815835),f=l(f,p,d,g,c[15],16,530742520),g=l(g,f,p,d,c[2],23,-995338651),d=u(d,g,f,p,c[0],6,-198630844),p=u(p,d,g,f,c[7],10,1126891415),f=u(f,p,d,g,c[14],15,-1416354905),g=u(g,f,p,d,c[5],21,-57434055),d=u(d,g,f,p,c[12],6,1700485571),p=u(p,d,g,f,c[3],10,-1894986606),f=u(f,p,d,g,c[10],15,-1051523),g=u(g,f,p,d,c[1],21,-2054922799),d=u(d,g,f,p,c[8],6,1873313359),p=u(p,d,g,f,c[15],10,-30611744),f=u(f,p,d,g,c[6],15,-1560198380),g=u(g,f,p,d,c[13],21,1309151649),d=u(d,g,f,p,c[4],6,-145523070),p=u(p,d,g,f,c[11],10,-1120210379),f=u(f,p,d,g,c[2],15,718787259),g=u(g,f,p,d,c[9],21,-343485551),m[0]=b(d,m[0]),m[1]=b(g,m[1]),m[2]=b(f,m[2]),m[3]=b(p,m[3]);}r(o,"md5cycle");function i(m,c,d,g,f,p){return c=b(b(c,m),b(g,p)),b(c<<f|c>>>32-f,d)}r(i,"cmn");function s(m,c,d,g,f,p,A){return i(c&d|~c&g,m,c,f,p,A)}r(s,"ff");function a(m,c,d,g,f,p,A){return i(c&g|d&~g,m,c,f,p,A)}r(a,"gg");function l(m,c,d,g,f,p,A){return i(c^d^g,m,c,f,p,A)}r(l,"hh");function u(m,c,d,g,f,p,A){return i(d^(c|~g),m,c,f,p,A)}r(u,"ii");function y(m){let c=m.length,d=[1732584193,-271733879,-1732584194,271733878],g;for(g=64;g<=m.length;g+=64)o(d,h(m.substring(g-64,g)));m=m.substring(g-64);let f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(g=0;g<m.length;g++)f[g>>2]|=m.charCodeAt(g)<<(g%4<<3);if(f[g>>2]|=128<<(g%4<<3),g>55)for(o(d,f),g=0;g<16;g++)f[g]=0;return f[14]=c*8,o(d,f),d}r(y,"md51");function h(m){let c=[],d;for(d=0;d<64;d+=4)c[d>>2]=m.charCodeAt(d)+(m.charCodeAt(d+1)<<8)+(m.charCodeAt(d+2)<<16)+(m.charCodeAt(d+3)<<24);return c}r(h,"md5blk");function x(m){let c="",d=0;for(;d<4;d++)c+=n[m>>d*8+4&15]+n[m>>d*8&15];return c}r(x,"rhex");function v(m){for(let c=0;c<m.length;c++)m[c]=x(m[c]);return m.join("")}r(v,"hex");function w(m){return v(y(m))}r(w,"md5");function b(m,c){return m+c&4294967295}r(b,"add32"),t=t||{};let T=[];t={size:t.size||"50",rating:t.rating||"g",secure:t.secure||location.protocol==="https:",backup:t.backup||""},e=e.trim().toLowerCase();let L=t.secure?"https://secure.gravatar.com/avatar/":"http://www.gravatar.com/avatar/";return t.rating&&T.push(`r=${t.rating}`),t.backup&&T.push(`d=${encodeURIComponent(t.backup)}`),t.size&&T.push(`s=${t.size}`),`${L+w(e)}?${T.join("&")}`}r(ri,"gravatar");function op(e,t=""){try{return ri(e,{size:256,backup:"monsterid",secure:!0})}catch{return t}}r(op,"gravatarURLByEmail");var zt=class zt{constructor(t){this.pretty=!1;this.name=t.name??"zeed",this.prefix=`${t.name}$`,this.objectToString=t.objectToString??(n=>this.pretty?M(n,null,2):M(n)),this.objectFromString=t.objectFromString??(n=>{try{return JSON.parse(n)}catch{}});}setItem(t,n){let o=this.objectToString(n);localStorage.setItem(`${this.prefix}${t}`,o);}getItem(t){let n=localStorage.getItem(`${this.prefix}${t}`);if(n!=null)return this.objectFromString(n)}removeItem(t){localStorage.removeItem(`${this.prefix}${t}`);}clear(){Object.keys(localStorage).filter(t=>t.startsWith(this.prefix)).forEach(t=>{localStorage.removeItem(t);});}allKeys(){let t=this.prefix.length;return Object.keys(localStorage).filter(n=>n.startsWith(this.prefix)).map(n=>n.substr(t))}};r(zt,"LocalStorage");var ur=zt;function Je(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&Number.parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}r(Je,"browserSupportsColors");function cr(e={}){let t='font-family: "JetBrains Mono", Menlo; font-size: 11px;',n=`${t}`,o=`font-weight: 600; ${t}`,i=Je(),s={},a=q(),{filter:l=void 0,level:u=void 0,colors:y=!0,padding:h=16,time:x=!0}=e,v=_(l),w=X(u);return b=>{if(!w(b.level)||!v(b.name))return;let T=x?`+${dt(q()-a)}`:"",L=b.name||"",m=s[L||""];m==null&&(m={color:ke(L)},s[L]=m);let c;switch(h>0&&(L=L.padEnd(16," ")),y&&i?(c=[`%c${L}%c %s %c${T}`],c.push(`color:${m.color}; ${o}`),c.push(n),c.push(b.messages?.[0]??""),c.push(`color:${m.color};`),c.push(...b.messages.slice(1))):c=[L,...b.messages,`+${T}`],c=c.map(d=>d instanceof Uint8Array?`<Uint8Array size=${d.length}>`:d),b.level){case 1:e.levelHelper&&(c[0]=`I|* ${c[0]}`),console.info(...c);break;case 2:e.levelHelper&&(c[0]=`W|** ${c[0]}`),console.warn(...c);break;case 3:e.levelHelper&&(c[0]=`E|*** ${c[0]}`),console.error(...c);break;default:e.levelHelper&&(c[0]=`D| ${c[0]}`),console.debug(...c);break}}}r(cr,"LoggerBrowserHandler");function lr(e={}){let t=e.filter??localStorage.zeed??localStorage.debug,n='font-family: "JetBrains Mono", Menlo; font-size: 11px;',o=`${n}`,i=`font-weight: 600; ${n}`,s=Je(),a=r(()=>{},"noop");return r(function l(u="",y){let h,x=_(t),v=de(y??-1);if(x(u)&&v!==9007199254740991){let T=function(L,m){return v<=L?m:()=>{}};r(T,"defineForLogLevel");let b=[];if(s){let L=ke(u);b.push(`%c${u.padEnd(16," ")}%c %s`),b.push(`color:${L}; ${i}`),b.push(o);}else b.push(`[${u}] %s`);h=T(0,console.debug.bind(console,...b)),h.debug=T(0,console.debug.bind(console,...b)),h.info=T(1,console.info.bind(console,...b)),h.warn=T(2,console.warn.bind(console,...b)),h.error=T(3,console.error.bind(console,...b)),h.fatal=T(4,(...L)=>{throw h.error(...L),new Error(`${L.map(String).join(" ")}`)}),h.assert=T(4,(L,...m)=>{(L==null||typeof L=="number"&&Number.isNaN(L)||!L)&&h.fatal(...m);});}else h=r(()=>{},"log"),h.debug=a,h.info=a,h.warn=a,h.error=a,h.assert=a,h.fatal=a;return h.extend=b=>l(u?`${u}:${b}`:b),h.label=u,h},"LoggerBrowserDebugFactory")}r(lr,"LoggerBrowserSetupDebugFactory");function Tp(e={}){console.info("activateConsoleDebug is activated by default in browsers");}r(Tp,"activateConsoleDebug");function oi(e,t){return pt(n=>{Vt()&&!ct(localStorage.getItem("zeed"))&&(n.setHandlers([cr()]),n.setFactory(lr({})));})(e,t)}r(oi,"Logger");
|
|
15
15
|
|
|
16
16
|
exports.BinaryEncoder = Hn;
|
|
17
17
|
exports.CRYPTO_DEFAULT_ALG = Dt;
|
|
18
18
|
exports.CRYPTO_DEFAULT_DERIVE_ALG = zn;
|
|
19
|
-
exports.CRYPTO_DEFAULT_DERIVE_ITERATIONS =
|
|
19
|
+
exports.CRYPTO_DEFAULT_DERIVE_ITERATIONS = Fo;
|
|
20
20
|
exports.CRYPTO_DEFAULT_HASH_ALG = Gn;
|
|
21
21
|
exports.Channel = kt;
|
|
22
22
|
exports.CryptoEncoder = er;
|
|
@@ -46,7 +46,7 @@ exports.NoopEncoder = Xn;
|
|
|
46
46
|
exports.Progress = xe;
|
|
47
47
|
exports.PubSub = $t;
|
|
48
48
|
exports.SerialQueue = or;
|
|
49
|
-
exports.Uint8ArrayToDataUri =
|
|
49
|
+
exports.Uint8ArrayToDataUri = Es;
|
|
50
50
|
exports.Uint8ArrayToHexDump = en;
|
|
51
51
|
exports.Uint8ArrayToJson = et;
|
|
52
52
|
exports.Uint8ArrayToString = Kt;
|
|
@@ -58,7 +58,7 @@ exports._useBase = Ur;
|
|
|
58
58
|
exports.activateConsoleDebug = Tp;
|
|
59
59
|
exports.arrayAvg = Oi;
|
|
60
60
|
exports.arrayBatches = $i;
|
|
61
|
-
exports.arrayEmptyInPlace =
|
|
61
|
+
exports.arrayEmptyInPlace = Ei;
|
|
62
62
|
exports.arrayFilterInPlace = Qe;
|
|
63
63
|
exports.arrayFlatten = Q;
|
|
64
64
|
exports.arrayIntersection = br;
|
|
@@ -68,7 +68,7 @@ exports.arrayMin = Mi;
|
|
|
68
68
|
exports.arrayMinus = yr;
|
|
69
69
|
exports.arrayRandomElement = Pi;
|
|
70
70
|
exports.arrayRemoveElement = Wt;
|
|
71
|
-
exports.arraySetArrayInPlace =
|
|
71
|
+
exports.arraySetArrayInPlace = Fi;
|
|
72
72
|
exports.arraySetElement = Ui;
|
|
73
73
|
exports.arrayShuffle = Ii;
|
|
74
74
|
exports.arrayShuffleForce = ki;
|
|
@@ -85,7 +85,7 @@ exports.assertCondition = Sn;
|
|
|
85
85
|
exports.avg = di;
|
|
86
86
|
exports.between = pi;
|
|
87
87
|
exports.bitfield = Oc;
|
|
88
|
-
exports.blobToArrayBuffer =
|
|
88
|
+
exports.blobToArrayBuffer = Eo;
|
|
89
89
|
exports.blobToDataUri = Ds;
|
|
90
90
|
exports.blobToUint8Array = $c;
|
|
91
91
|
exports.browserSelectColorByName = ke;
|
|
@@ -142,7 +142,7 @@ exports.decodeBase62 = nn;
|
|
|
142
142
|
exports.decodeJson = Rc;
|
|
143
143
|
exports.decrypt = Jn;
|
|
144
144
|
exports.deepEqual = Br;
|
|
145
|
-
exports.deepMerge =
|
|
145
|
+
exports.deepMerge = Fe;
|
|
146
146
|
exports.deepStripUndefinedInPlace = Or;
|
|
147
147
|
exports.deriveKeyPbkdf2 = Hc;
|
|
148
148
|
exports.detect = Gf;
|
|
@@ -188,7 +188,7 @@ exports.getGlobalLogger = pt;
|
|
|
188
188
|
exports.getGlobalLoggerIfExists = Dn;
|
|
189
189
|
exports.getNamespaceFilterString = co;
|
|
190
190
|
exports.getNavigator = ni;
|
|
191
|
-
exports.getPerformanceTimestamp =
|
|
191
|
+
exports.getPerformanceTimestamp = Fn;
|
|
192
192
|
exports.getSecureRandom = dr;
|
|
193
193
|
exports.getSecureRandomIfPossible = k;
|
|
194
194
|
exports.getTimestamp = q;
|
|
@@ -216,11 +216,11 @@ exports.isPromise = P;
|
|
|
216
216
|
exports.isRecord = De;
|
|
217
217
|
exports.isRecordPlain = wa;
|
|
218
218
|
exports.isSafeInteger = La;
|
|
219
|
-
exports.isString =
|
|
219
|
+
exports.isString = Ee;
|
|
220
220
|
exports.isTimeout = Rs;
|
|
221
|
-
exports.isTruthy =
|
|
221
|
+
exports.isTruthy = Fa;
|
|
222
222
|
exports.isUint8Array = Ca;
|
|
223
|
-
exports.isValue =
|
|
223
|
+
exports.isValue = Ea;
|
|
224
224
|
exports.joinLogStrings = ge;
|
|
225
225
|
exports.joinToUint8Array = Wi;
|
|
226
226
|
exports.jsonStringify = Hi;
|
|
@@ -302,7 +302,7 @@ exports.useAsyncMutex = sl;
|
|
|
302
302
|
exports.useBase = V;
|
|
303
303
|
exports.useDefer = tl;
|
|
304
304
|
exports.useDispose = H;
|
|
305
|
-
exports.useDisposeWithUtils =
|
|
305
|
+
exports.useDisposeWithUtils = Ff;
|
|
306
306
|
exports.useEventListener = Qo;
|
|
307
307
|
exports.useEventListenerOnce = Xo;
|
|
308
308
|
exports.useExitHandler = qf;
|
|
@@ -333,9 +333,9 @@ exports.uuidEncodeB62 = Ro;
|
|
|
333
333
|
exports.uuidEncodeV4 = jo;
|
|
334
334
|
exports.uuidIsValid = vl;
|
|
335
335
|
exports.uuidv4 = No;
|
|
336
|
-
exports.valueToBoolean =
|
|
336
|
+
exports.valueToBoolean = Er;
|
|
337
337
|
exports.valueToFloat = Sr;
|
|
338
|
-
exports.valueToInteger =
|
|
338
|
+
exports.valueToInteger = Fr;
|
|
339
339
|
exports.valueToString = rt;
|
|
340
340
|
exports.waitOn = Ms;
|
|
341
341
|
exports.wordsToUint8Array = ku;
|