zeed 0.7.95 → 0.7.99

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- export { bS as AsyncMutex, M as BinInput, br as Channel, bq as ChannelMessageEvent, bE as CryptoEncoder, af as Currency, ad as CurrencyInput, ar as DAY_MS, at as Day, as as DayInput, bx as DefaultListener, bb as Disposable, ba as Disposer, b9 as DisposerFunction, by as Emitter, bv as EmitterAllHandler, bu as EmitterHandler, bC as Encoder, cr as Json, bD as JsonEncoder, bw as ListenerSignature, bs as LocalChannel, bm as LoggerConsoleHandler, cl as MemStorage, ck as MemStorageOptions, bH as Message, bF as MessageAction, bL as MessageDefinitions, bM as MessageHub, bG as MessageResult, bJ as MessagesDefaultMethods, bK as MessagesMethods, bI as MessagesOptions, bR as Mutex, ct as NestedArray, cs as ObjectStorage, c7 as Pool, aB as Primitive, bP as PubSub, ci as QueueTask, a9 as RenderMessagesOptions, ag as RoundingMode, cj as SerialQueue, aX as SortableItem, V as Uint8ArrayToJson, U as Uint8ArrayToString, bg as UseDefer, bd as UseDispose, p as arrayEmptyInPlace, n as arrayFilterInPlace, i as arrayFlatten, j as arrayIntersection, t as arrayIsEqual, y as arrayMax, z as arrayMin, g as arrayMinus, x as arrayRandomElement, l as arrayRemoveElement, m as arraySetElement, v as arrayShuffle, w as arrayShuffleForce, u as arrayShuffleInPlace, q as arraySorted, s as arraySortedNumbers, k as arraySymmetricDifference, o as arrayToggleInPlace, h as arrayUnion, f as arrayUnique, aQ as between, b8 as cloneJsonObject, b7 as cloneObject, aT as cmp, aS as composeOrderby, A as createArray, bN as createPromiseProxy, c as csv, ae as currency, aw as day, cn as debounce, D as decodeBase16, F as decodeBase32, H as decodeBase58, J as decodeBase62, L as decodeBase64, b as decrypt, ax as deepEqual, ay as deepMerge, a as deriveKeyPbkdf2, c2 as detect, d as digest, b6 as empty, C as encodeBase16, E as encodeBase32, G as encodeBase58, I as encodeBase62, K as encodeBase64, b2 as encodeQuery, e as encrypt, aZ as endSortWeight, S as equalBinary, az as escapeHTML, aW as escapeRegExp, bt as fakeWorkerPair, bW as fetchBasic, bX as fetchJson, bY as fetchOptionsFormURLEncoded, bZ as fetchOptionsJson, b_ as fetchText, ac as fixBrokenUth8String, au as forEachDay, aa as formatMessages, cp as formatMilliseconds, Z as fromCamelCase, c1 as getGlobal, bk as getGlobalContext, bz as getGlobalEmitter, bn as getNamespaceFilterString, c0 as getNavigator, co as getTimestamp, b$ as getWindow, bV as httpMethod, c9 as immediate, aE as isArray, aK as isBoolean, c3 as isBrowser, ai as isEven, ah as isHalf, aI as isInteger, bl as isLocalHost, aL as isNullOrUndefined, aH as isNumber, aC as isObject, aD as isPrimitive, cg as isPromise, aF as isRecord, aJ as isSafeInteger, aG as isString, cd as isTimeout, aM as jsonStringify, T as jsonToUint8Array, b5 as last, bB as lazyListener, b0 as linkifyPlainText, bA as messages, a_ as moveSortWeight, cq as parseDate, aR as parseOrderby, b3 as parseQuery, c4 as platform, ch as promisify, cy as qid, aN as randomBoolean, aP as randomFloat, aO as randomInt, r as randomUint8Array, ab as renderMessages, ak as roundDown, an as roundHalfAwayFromZero, ao as roundHalfDown, ap as roundHalfEven, am as roundHalfOdd, aq as roundHalfTowardsZero, al as roundHalfUp, aj as roundUp, b4 as size, c8 as sleep, a$ as sortedItems, aU as sortedOrderby, aY as startSortWeight, _ as stringToBoolean, a0 as stringToFloat, $ as stringToInteger, N as stringToUInt8Array, cB as suid, cA as suidBytes, cD as suidBytesDate, cC as suidDate, cm as throttle, cb as timeout, ca as timeoutReached, cc as timoutError, Q as toBase64, R as toBase64Url, a8 as toBool, W as toCamelCase, X as toCapitalize, Y as toCapitalizeWords, a5 as toFloat, P as toHex, b1 as toHumanReadableUrl, a6 as toInt, a7 as toString, O as toUint8Array, aV as toValidFilename, av as today, ce as tryTimeout, cx as uname, aA as unescapeHTML, bU as useAsyncMutex, B as useBase, bf as useDefer, bc as useDispose, be as useDisposer, bj as useEventListener, c5 as useExitHandler, bi as useInterval, bp as useLevelFilter, bO as useMessageHub, bT as useMutex, bo as useNamespaceFilter, c6 as usePool, bQ as usePubSub, bh as useTimeout, cv as uuid, cw as uuidB32, cu as uuidBytes, cz as uuidv4, a1 as valueToBoolean, a3 as valueToFloat, a2 as valueToInteger, a4 as valueToString, cf as waitOn } from './uuid-1e3016ec';
1
+ export { bS as AsyncMutex, M as BinInput, br as Channel, bq as ChannelMessageEvent, bE as CryptoEncoder, af as Currency, ad as CurrencyInput, ar as DAY_MS, at as Day, as as DayInput, bx as DefaultListener, bb as Disposable, ba as Disposer, b9 as DisposerFunction, by as Emitter, bv as EmitterAllHandler, bu as EmitterHandler, bC as Encoder, cr as Json, bD as JsonEncoder, bw as ListenerSignature, bs as LocalChannel, bm as LoggerConsoleHandler, cl as MemStorage, ck as MemStorageOptions, bH as Message, bF as MessageAction, bL as MessageDefinitions, bM as MessageHub, bG as MessageResult, bJ as MessagesDefaultMethods, bK as MessagesMethods, bI as MessagesOptions, bR as Mutex, ct as NestedArray, cs as ObjectStorage, c7 as Pool, aB as Primitive, bP as PubSub, ci as QueueTask, a9 as RenderMessagesOptions, ag as RoundingMode, cj as SerialQueue, aX as SortableItem, V as Uint8ArrayToJson, U as Uint8ArrayToString, bg as UseDefer, bd as UseDispose, p as arrayEmptyInPlace, n as arrayFilterInPlace, i as arrayFlatten, j as arrayIntersection, t as arrayIsEqual, y as arrayMax, z as arrayMin, g as arrayMinus, x as arrayRandomElement, l as arrayRemoveElement, m as arraySetElement, v as arrayShuffle, w as arrayShuffleForce, u as arrayShuffleInPlace, q as arraySorted, s as arraySortedNumbers, k as arraySymmetricDifference, o as arrayToggleInPlace, h as arrayUnion, f as arrayUnique, aQ as between, b8 as cloneJsonObject, b7 as cloneObject, aT as cmp, aS as composeOrderby, A as createArray, bN as createPromiseProxy, c as csv, ae as currency, aw as day, cn as debounce, D as decodeBase16, F as decodeBase32, H as decodeBase58, J as decodeBase62, L as decodeBase64, b as decrypt, ax as deepEqual, ay as deepMerge, a as deriveKeyPbkdf2, c2 as detect, d as digest, b6 as empty, C as encodeBase16, E as encodeBase32, G as encodeBase58, I as encodeBase62, K as encodeBase64, b2 as encodeQuery, e as encrypt, aZ as endSortWeight, S as equalBinary, az as escapeHTML, aW as escapeRegExp, bt as fakeWorkerPair, bW as fetchBasic, bX as fetchJson, bY as fetchOptionsFormURLEncoded, bZ as fetchOptionsJson, b_ as fetchText, ac as fixBrokenUth8String, au as forEachDay, aa as formatMessages, cp as formatMilliseconds, Z as fromCamelCase, c1 as getGlobal, bk as getGlobalContext, bz as getGlobalEmitter, bn as getNamespaceFilterString, c0 as getNavigator, co as getTimestamp, b$ as getWindow, bV as httpMethod, c9 as immediate, aE as isArray, aK as isBoolean, c3 as isBrowser, ai as isEven, ah as isHalf, aI as isInteger, bl as isLocalHost, aL as isNullOrUndefined, aH as isNumber, aC as isObject, aD as isPrimitive, cg as isPromise, aF as isRecord, aJ as isSafeInteger, aG as isString, cd as isTimeout, aM as jsonStringify, T as jsonToUint8Array, b5 as last, bB as lazyListener, b0 as linkifyPlainText, bA as messages, a_ as moveSortWeight, cq as parseDate, aR as parseOrderby, b3 as parseQuery, c4 as platform, ch as promisify, cB as qid, aN as randomBoolean, aP as randomFloat, aO as randomInt, r as randomUint8Array, ab as renderMessages, ak as roundDown, an as roundHalfAwayFromZero, ao as roundHalfDown, ap as roundHalfEven, am as roundHalfOdd, aq as roundHalfTowardsZero, al as roundHalfUp, aj as roundUp, b4 as size, c8 as sleep, a$ as sortedItems, aU as sortedOrderby, aY as startSortWeight, _ as stringToBoolean, a0 as stringToFloat, $ as stringToInteger, N as stringToUInt8Array, cE as suid, cD as suidBytes, cG as suidBytesDate, cF as suidDate, cm as throttle, cb as timeout, ca as timeoutReached, cc as timoutError, Q as toBase64, R as toBase64Url, a8 as toBool, W as toCamelCase, X as toCapitalize, Y as toCapitalizeWords, a5 as toFloat, P as toHex, b1 as toHumanReadableUrl, a6 as toInt, a7 as toString, O as toUint8Array, aV as toValidFilename, av as today, ce as tryTimeout, cA as uname, aA as unescapeHTML, bU as useAsyncMutex, B as useBase, bf as useDefer, bc as useDispose, be as useDisposer, bj as useEventListener, c5 as useExitHandler, bi as useInterval, bp as useLevelFilter, bO as useMessageHub, bT as useMutex, bo as useNamespaceFilter, c6 as usePool, bQ as usePubSub, bh as useTimeout, cw as uuid, cv as uuid32bit, cz as uuidB32, cu as uuidBytes, cy as uuidDecode, cx as uuidEncode, cC as uuidv4, a1 as valueToBoolean, a3 as valueToFloat, a2 as valueToInteger, a4 as valueToString, cf as waitOn } from './uuid-7e83c0e5';
2
2
  export { d as LogHandler, g as LogHandlerOptions, a as LogLevel, b as LogLevelAlias, c as LogMessage, L as Logger, h as LoggerContext, f as LoggerContextInterface, e as LoggerInterface } from './log-7206a2fe';
3
- export { b as FileStorage, F as FileStorageOptions, L as LoggerFileHandler, e as LoggerNodeHandler, c as colorString, d as colorStringList, f as getSourceLocation, j as getSourceLocationByPrecedingPattern, h as getStack, g as getStackLlocationList, i as isTTY, l as loggerStackTraceDebug, a as setupEnv, s as stringToPath, t as toPath, v as valueToPath } from './log-util-1e8a9b16';
4
- export { a as LocalStorage, L as LocalStorageOptions, b as LoggerBrowserClassicHandler, g as gravatarURLByEmail, c as selectColor, s as supportsColors, u as urlBase64ToUint8Array } from './log-colors-5cf23b92';
3
+ export { b as FileStorage, F as FileStorageOptions, L as LoggerFileHandler, e as LoggerNodeHandler, c as colorString, d as colorStringList, f as getSourceLocation, j as getSourceLocationByPrecedingPattern, h as getStack, g as getStackLlocationList, i as isTTY, l as loggerStackTraceDebug, a as setupEnv, s as stringToPath, t as toPath, v as valueToPath } from './log-util-4c3eadbf';
4
+ export { a as LocalStorage, L as LocalStorageOptions, b as LoggerBrowserClassicHandler, g as gravatarURLByEmail, c as selectColor, s as supportsColors, u as urlBase64ToUint8Array } from './log-colors-a7617733';
5
5
  export { L as LoggerBrowserHandler, a as LoggerBrowserSetupDebugFactory, b as activateConsoleDebug } from './log-browser-e3329d01';
package/dist/index.all.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a as Te,b as Ue,c as Ve,d as $e}from"./chunk-M7T7UAH7.js";import{a as We,b as Xe,c as Ye,d as Ze,e as _e}from"./chunk-JL5GA55T.js";import{a as Ee,b as Fe,c as Ge,d as He,e as Ie,f as Je,g as Ke,h as Le,i as Me,j as Ne,k as Oe,l as Pe,m as Qe,n as Re,o as Se}from"./chunk-PRTZGAJJ.js";import{$ as uo,$a as ur,$b as ye,A as V,Aa as Wo,Ab as Zr,B as W,Ba as Xo,Bb as _r,C as X,Ca as Yo,Cb as $r,D as Y,Da as Zo,Db as oe,E as Z,Ea as _o,Eb as re,F as _,Fa as $o,Fb as ee,G as $,Ga as or,Gb as fe,H as oo,Ha as rr,Hb as me,I as ro,Ia as er,Ib as pe,J as eo,Ja as fr,Jb as te,K as fo,Ka as mr,Kb as xe,L as mo,La as pr,Lb as ae,M as po,Ma as tr,Mb as be,N as to,Na as xr,Nb as ce,O as xo,Oa as ar,Ob as de,P as ao,Pa as br,Pb as ge,Q as bo,Qa as cr,Qb as he,R as co,Ra as dr,Rb as ie,S as go,Sa as gr,Sb as je,T as ho,Ta as hr,Tb as ke,U as io,Ua as ir,Ub as le,V as jo,Va as jr,Vb as ne,W as ko,Wa as kr,Wb as qe,X as lo,Xa as lr,Xb as se,Y as no,Ya as nr,Yb as ue,Z as qo,Za as qr,Zb as ve,_ as so,_a as sr,_b as we,a as u,aa as vo,ab as vr,ac as ze,b as v,ba as wo,bb as wr,bc as Ae,c as w,ca as yo,cb as yr,cc as Be,d as y,da as zo,db as zr,dc as Ce,e as z,ea as Ao,eb as Ar,ec as De,f as A,fa as Bo,fb as Br,g as B,ga as Co,gb as Cr,h as C,ha as Do,hb as Dr,i as D,ia as Eo,ib as Er,j as E,ja as Fo,jb as Fr,k as F,ka as Go,kb as Gr,l as G,la as Ho,lb as Hr,m as H,ma as Io,mb as Ir,n as I,na as Jo,nb as Jr,o as J,oa as Ko,ob as Kr,p as K,pa as Lo,pb as Lr,q as L,qa as Mo,qb as Mr,r as M,ra as No,rb as Qr,s as N,sa as Oo,sb as Rr,t as O,ta as Po,tb as Sr,u as P,ua as Qo,ub as Tr,v as Q,va as Ro,vb as Ur,w as R,wa as So,wb as Vr,x as S,xa as To,xb as Wr,y as T,ya as Uo,yb as Xr,z as U,za as Vo,zb as Yr}from"./chunk-M7FCO5WL.js";import{A as Pr,d as o,e as r,f as e,g as f,h as m,i as p,j as t,k as x,l as a,m as b,n as c,o as d,p as g,q as h,r as i,s as j,t as k,u as l,v as n,w as q,x as s,y as Nr,z as Or}from"./chunk-LNZLD7Y3.js";export{ee as Channel,te as CryptoEncoder,No as Currency,tr as DAY_MS,xr as Day,_r as Emitter,Ie as FileStorage,pe as JsonEncoder,fe as LocalChannel,Ve as LocalStorage,j as LogLevel,k as LogLevelAlias,s as Logger,$e as LoggerBrowserClassicHandler,Ye as LoggerBrowserHandler,Ze as LoggerBrowserSetupDebugFactory,n as LoggerConsoleHandler,l as LoggerContext,Je as LoggerFileHandler,Se as LoggerNodeHandler,Be as MemStorage,be as PubSub,Ae as SerialQueue,D as Uint8ArrayToJson,v as Uint8ArrayToString,_e as activateConsoleDebug,Y as arrayEmptyInPlace,W as arrayFilterInPlace,R as arrayFlatten,S as arrayIntersection,$ as arrayIsEqual,mo as arrayMax,po as arrayMin,P as arrayMinus,fo as arrayRandomElement,U as arrayRemoveElement,V as arraySetElement,ro as arrayShuffle,eo as arrayShuffleForce,oo as arrayShuffleInPlace,Z as arraySorted,_ as arraySortedNumbers,T as arraySymmetricDifference,X as arrayToggleInPlace,Q as arrayUnion,O as arrayUnique,kr as between,Fr as cloneJsonObject,Er as cloneObject,M as cmp,Pe as colorString,Qe as colorStringList,L as composeOrderby,to as createArray,xe as createPromiseProxy,J as csv,Mo as currency,cr as day,De as debounce,bo as decodeBase16,go as decodeBase32,io as decodeBase58,ko as decodeBase62,no as decodeBase64,I as decrypt,c as deepEqual,d as deepMerge,G as deriveKeyPbkdf2,ue as detect,F as digest,Dr as empty,ao as encodeBase16,co as encodeBase32,ho as encodeBase58,jo as encodeBase62,lo as encodeBase64,zr as encodeQuery,H as encrypt,sr as endSortWeight,B as equalBinary,dr as escapeHTML,nr as escapeRegExp,me as fakeWorkerPair,he as fetchBasic,ie as fetchJson,je as fetchOptionsFormURLEncoded,ke as fetchOptionsJson,le as fetchText,Lo as fixBrokenUth8String,ar as forEachDay,Jo as formatMessages,Or as formatMilliseconds,vo as fromCamelCase,se as getGlobal,q as getGlobalContext,$r as getGlobalEmitter,g as getNamespaceFilterString,qe as getNavigator,Le as getSourceLocation,Ne as getSourceLocationByPrecedingPattern,Me as getStack,Ke as getStackLlocationList,Nr as getTimestamp,ne as getWindow,Ue as gravatarURLByEmail,Zo as immediate,e as isArray,a as isBoolean,ve as isBrowser,Po as isEven,Oo as isHalf,t as isInteger,Mr as isLocalHost,b as isNullOrUndefined,p as isNumber,o as isObject,r as isPrimitive,mr as isPromise,f as isRecord,x as isSafeInteger,m as isString,Oe as isTTY,rr as isTimeout,wo as jsonStringify,C as jsonToUint8Array,Cr as last,re as lazyListener,wr as linkifyPlainText,Re as loggerStackTraceDebug,oe as messages,ur as moveSortWeight,Pr as parseDate,K as parseOrderby,Ar as parseQuery,we as platform,pr as promisify,Ur as qid,hr as randomBoolean,jr as randomFloat,ir as randomInt,E as randomUint8Array,Ko as renderMessages,Ro as roundDown,Uo as roundHalfAwayFromZero,Vo as roundHalfDown,Wo as roundHalfEven,To as roundHalfOdd,Xo as roundHalfTowardsZero,So as roundHalfUp,Qo as roundUp,Xe as selectColor,He as setupEnv,Br as size,Yo as sleep,vr as sortedItems,N as sortedOrderby,qr as startSortWeight,yo as stringToBoolean,Ao as stringToFloat,zo as stringToInteger,Ee as stringToPath,u as stringToUInt8Array,Xr as suid,Wr as suidBytes,Zr as suidBytesDate,Yr as suidDate,We as supportsColors,Ce as throttle,$o as timeout,_o as timeoutReached,or as timoutError,z as toBase64,A as toBase64Url,Io as toBool,qo as toCamelCase,so as toCapitalize,uo as toCapitalizeWords,Fo as toFloat,y as toHex,yr as toHumanReadableUrl,Go as toInt,Ge as toPath,Ho as toString,w as toUint8Array,lr as toValidFilename,br as today,er as tryTimeout,Tr as uname,gr as unescapeHTML,Te as urlBase64ToUint8Array,ge as useAsyncMutex,xo as useBase,Ir as useDefer,Gr as useDispose,Hr as useDisposer,Lr as useEventListener,ye as useExitHandler,Kr as useInterval,i as useLevelFilter,ae as useMessageHub,de as useMutex,h as useNamespaceFilter,ze as usePool,ce as usePubSub,Jr as useTimeout,Rr as uuid,Sr as uuidB32,Qr as uuidBytes,Vr as uuidv4,Bo as valueToBoolean,Do as valueToFloat,Co as valueToInteger,Fe as valueToPath,Eo as valueToString,fr as waitOn};
1
+ import{a as We,b as Xe,c as Ye,d as ef}from"./chunk-DTCT2M2D.js";import{a as Ze,b as _e,c as $e,d as of,e as rf}from"./chunk-GLNZJHZB.js";import{a as He,b as Ie,c as Je,d as Ke,e as Le,f as Me,g as Ne,h as Oe,i as Pe,j as Qe,k as Re,l as Se,m as Te,n as Ue,o as Ve}from"./chunk-Z5D3PV5I.js";import{$ as uo,$a as ur,$b as ye,A as V,Aa as Wo,Ab as Zr,B as W,Ba as Xo,Bb as _r,C as X,Ca as Yo,Cb as $r,D as Y,Da as Zo,Db as oe,E as Z,Ea as _o,Eb as re,F as _,Fa as $o,Fb as ee,G as $,Ga as or,Gb as fe,H as oo,Ha as rr,Hb as me,I as ro,Ia as er,Ib as pe,J as eo,Ja as fr,Jb as te,K as fo,Ka as mr,Kb as xe,L as mo,La as pr,Lb as ae,M as po,Ma as tr,Mb as be,N as to,Na as xr,Nb as ce,O as xo,Oa as ar,Ob as de,P as ao,Pa as br,Pb as ge,Q as bo,Qa as cr,Qb as he,R as co,Ra as dr,Rb as ie,S as go,Sa as gr,Sb as je,T as ho,Ta as hr,Tb as ke,U as io,Ua as ir,Ub as le,V as jo,Va as jr,Vb as ne,W as ko,Wa as kr,Wb as qe,X as lo,Xa as lr,Xb as se,Y as no,Ya as nr,Yb as ue,Z as qo,Za as qr,Zb as ve,_ as so,_a as sr,_b as we,a as u,aa as vo,ab as vr,ac as ze,b as v,ba as wo,bb as wr,bc as Ae,c as w,ca as yo,cb as yr,cc as Be,d as y,da as zo,db as zr,dc as Ce,e as z,ea as Ao,eb as Ar,ec as De,f as A,fa as Bo,fb as Br,fc as Ee,g as B,ga as Co,gb as Cr,gc as Fe,h as C,ha as Do,hb as Dr,hc as Ge,i as D,ia as Eo,ib as Er,j as E,ja as Fo,jb as Fr,k as F,ka as Go,kb as Gr,l as G,la as Ho,lb as Hr,m as H,ma as Io,mb as Ir,n as I,na as Jo,nb as Jr,o as J,oa as Ko,ob as Kr,p as K,pa as Lo,pb as Lr,q as L,qa as Mo,qb as Mr,r as M,ra as No,rb as Qr,s as N,sa as Oo,sb as Rr,t as O,ta as Po,tb as Sr,u as P,ua as Qo,ub as Tr,v as Q,va as Ro,vb as Ur,w as R,wa as So,wb as Vr,x as S,xa as To,xb as Wr,y as T,ya as Uo,yb as Xr,z as U,za as Vo,zb as Yr}from"./chunk-G7UNQQAN.js";import{A as Pr,d as o,e as r,f as e,g as f,h as m,i as p,j as t,k as x,l as a,m as b,n as c,o as d,p as g,q as h,r as i,s as j,t as k,u as l,v as n,w as q,x as s,y as Nr,z as Or}from"./chunk-JGD3KNXY.js";export{pe as Channel,be as CryptoEncoder,No as Currency,tr as DAY_MS,xr as Day,re as Emitter,Le as FileStorage,ae as JsonEncoder,te as LocalChannel,Ye as LocalStorage,j as LogLevel,k as LogLevelAlias,s as Logger,ef as LoggerBrowserClassicHandler,$e as LoggerBrowserHandler,of as LoggerBrowserSetupDebugFactory,n as LoggerConsoleHandler,l as LoggerContext,Me as LoggerFileHandler,Ve as LoggerNodeHandler,Ee as MemStorage,ge as PubSub,De as SerialQueue,D as Uint8ArrayToJson,v as Uint8ArrayToString,rf as activateConsoleDebug,Y as arrayEmptyInPlace,W as arrayFilterInPlace,R as arrayFlatten,S as arrayIntersection,$ as arrayIsEqual,mo as arrayMax,po as arrayMin,P as arrayMinus,fo as arrayRandomElement,U as arrayRemoveElement,V as arraySetElement,ro as arrayShuffle,eo as arrayShuffleForce,oo as arrayShuffleInPlace,Z as arraySorted,_ as arraySortedNumbers,T as arraySymmetricDifference,X as arrayToggleInPlace,Q as arrayUnion,O as arrayUnique,kr as between,Fr as cloneJsonObject,Er as cloneObject,M as cmp,Se as colorString,Te as colorStringList,L as composeOrderby,to as createArray,ce as createPromiseProxy,J as csv,Mo as currency,cr as day,Ge as debounce,bo as decodeBase16,go as decodeBase32,io as decodeBase58,ko as decodeBase62,no as decodeBase64,I as decrypt,c as deepEqual,d as deepMerge,G as deriveKeyPbkdf2,ye as detect,F as digest,Dr as empty,ao as encodeBase16,co as encodeBase32,ho as encodeBase58,jo as encodeBase62,lo as encodeBase64,zr as encodeQuery,H as encrypt,sr as endSortWeight,B as equalBinary,dr as escapeHTML,nr as escapeRegExp,xe as fakeWorkerPair,ke as fetchBasic,le as fetchJson,ne as fetchOptionsFormURLEncoded,qe as fetchOptionsJson,se as fetchText,Lo as fixBrokenUth8String,ar as forEachDay,Jo as formatMessages,Or as formatMilliseconds,vo as fromCamelCase,we as getGlobal,q as getGlobalContext,ee as getGlobalEmitter,g as getNamespaceFilterString,ve as getNavigator,Oe as getSourceLocation,Qe as getSourceLocationByPrecedingPattern,Pe as getStack,Ne as getStackLlocationList,Nr as getTimestamp,ue as getWindow,Xe as gravatarURLByEmail,Zo as immediate,e as isArray,a as isBoolean,ze as isBrowser,Po as isEven,Oo as isHalf,t as isInteger,Mr as isLocalHost,b as isNullOrUndefined,p as isNumber,o as isObject,r as isPrimitive,mr as isPromise,f as isRecord,x as isSafeInteger,m as isString,Re as isTTY,rr as isTimeout,wo as jsonStringify,C as jsonToUint8Array,Cr as last,me as lazyListener,wr as linkifyPlainText,Ue as loggerStackTraceDebug,fe as messages,ur as moveSortWeight,Pr as parseDate,K as parseOrderby,Ar as parseQuery,Ae as platform,pr as promisify,Xr as qid,hr as randomBoolean,jr as randomFloat,ir as randomInt,E as randomUint8Array,Ko as renderMessages,Ro as roundDown,Uo as roundHalfAwayFromZero,Vo as roundHalfDown,Wo as roundHalfEven,To as roundHalfOdd,Xo as roundHalfTowardsZero,So as roundHalfUp,Qo as roundUp,_e as selectColor,Ke as setupEnv,Br as size,Yo as sleep,vr as sortedItems,N as sortedOrderby,qr as startSortWeight,yo as stringToBoolean,Ao as stringToFloat,zo as stringToInteger,He as stringToPath,u as stringToUInt8Array,_r as suid,Zr as suidBytes,oe as suidBytesDate,$r as suidDate,Ze as supportsColors,Fe as throttle,$o as timeout,_o as timeoutReached,or as timoutError,z as toBase64,A as toBase64Url,Io as toBool,qo as toCamelCase,so as toCapitalize,uo as toCapitalizeWords,Fo as toFloat,y as toHex,yr as toHumanReadableUrl,Go as toInt,Je as toPath,Ho as toString,w as toUint8Array,lr as toValidFilename,br as today,er as tryTimeout,Wr as uname,gr as unescapeHTML,We as urlBase64ToUint8Array,je as useAsyncMutex,xo as useBase,Ir as useDefer,Gr as useDispose,Hr as useDisposer,Lr as useEventListener,Be as useExitHandler,Kr as useInterval,i as useLevelFilter,de as useMessageHub,ie as useMutex,h as useNamespaceFilter,Ce as usePool,he as usePubSub,Jr as useTimeout,Sr as uuid,Rr as uuid32bit,Vr as uuidB32,Qr as uuidBytes,Ur as uuidDecode,Tr as uuidEncode,Yr as uuidv4,Bo as valueToBoolean,Do as valueToFloat,Co as valueToInteger,Ie as valueToPath,Eo as valueToString,fr as waitOn};
2
2
  //# sourceMappingURL=index.all.js.map
@@ -1,5 +1,5 @@
1
- var or=Object.create;var W=Object.defineProperty,ir=Object.defineProperties,sr=Object.getOwnPropertyDescriptor,ar=Object.getOwnPropertyDescriptors,ur=Object.getOwnPropertyNames,st=Object.getOwnPropertySymbols,lr=Object.getPrototypeOf,at=Object.prototype.hasOwnProperty,cr=Object.prototype.propertyIsEnumerable;var ut=(e,t,r)=>t in e?W(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,U=(e,t)=>{for(var r in t||(t={}))at.call(t,r)&&ut(e,r,t[r]);if(st)for(var r of st(t))cr.call(t,r)&&ut(e,r,t[r]);return e},ie=(e,t)=>ir(e,ar(t)),lt=e=>W(e,"__esModule",{value:!0}),n=(e,t)=>W(e,"name",{value:t,configurable:!0});var fr=(e,t)=>{for(var r in t)W(e,r,{get:t[r],enumerable:!0})},ct=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ur(t))!at.call(e,i)&&(r||i!=="default")&&W(e,i,{get:()=>t[i],enumerable:!(o=sr(t,i))||o.enumerable});return e},pr=(e,t)=>ct(lt(W(e!=null?or(lr(e)):{},"default",!t&&e&&e.__esModule?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e),dr=(e=>(t,r)=>e&&e.get(t)||(r=ct(lt({}),t,1),e&&e.set(t,r),r))(typeof WeakMap!="undefined"?new WeakMap:0);var ti={};fr(ti,{Channel:()=>ve,CryptoEncoder:()=>Qe,Currency:()=>$,DAY_MS:()=>qe,Day:()=>M,Emitter:()=>H,JsonEncoder:()=>J,LocalChannel:()=>ue,LocalStorage:()=>nt,LogLevel:()=>P,LogLevelAlias:()=>ke,Logger:()=>v,LoggerBrowserClassicHandler:()=>ei,LoggerBrowserHandler:()=>ot,LoggerBrowserSetupDebugFactory:()=>it,LoggerConsoleHandler:()=>se,LoggerContext:()=>Pe,MemStorage:()=>rt,PubSub:()=>Ee,SerialQueue:()=>tt,Uint8ArrayToJson:()=>ge,Uint8ArrayToString:()=>Tt,activateConsoleDebug:()=>Ko,arrayEmptyInPlace:()=>Nr,arrayFilterInPlace:()=>be,arrayFlatten:()=>K,arrayIntersection:()=>Mt,arrayIsEqual:()=>Pt,arrayMax:()=>Jr,arrayMin:()=>Wr,arrayMinus:()=>At,arrayRandomElement:()=>Gr,arrayRemoveElement:()=>Rr,arraySetElement:()=>Hr,arrayShuffle:()=>zr,arrayShuffleForce:()=>qr,arrayShuffleInPlace:()=>Re,arraySorted:()=>kt,arraySortedNumbers:()=>jr,arraySymmetricDifference:()=>$r,arrayToggleInPlace:()=>Br,arrayUnion:()=>Ft,arrayUnique:()=>he,between:()=>Jn,cloneJsonObject:()=>so,cloneObject:()=>Ce,cmp:()=>ye,composeOrderby:()=>Ur,createArray:()=>_r,createPromiseProxy:()=>Ke,csv:()=>Dr,currency:()=>N,day:()=>Nn,debounce:()=>Go,decodeBase16:()=>Kr,decodeBase32:()=>Xr,decodeBase58:()=>tn,decodeBase62:()=>nn,decodeBase64:()=>sn,decrypt:()=>$e,deepEqual:()=>B,deepMerge:()=>pt,deriveKeyPbkdf2:()=>Mr,detect:()=>Vt,digest:()=>Fr,empty:()=>io,encodeBase16:()=>Qr,encodeBase32:()=>Yr,encodeBase58:()=>en,encodeBase62:()=>rn,encodeBase64:()=>on,encodeQuery:()=>_e,encrypt:()=>Oe,endSortWeight:()=>We,equalBinary:()=>De,escapeHTML:()=>Ge,escapeRegExp:()=>Yn,fakeWorkerPair:()=>ko,fetchBasic:()=>Xe,fetchJson:()=>Uo,fetchOptionsFormURLEncoded:()=>Oo,fetchOptionsJson:()=>$o,fetchText:()=>Ro,fixBrokenUth8String:()=>xn,forEachDay:()=>Hn,formatMessages:()=>$t,formatMilliseconds:()=>ae,fromCamelCase:()=>ln,getGlobal:()=>Ho,getGlobalContext:()=>Z,getGlobalEmitter:()=>Ao,getNamespaceFilterString:()=>dt,getNavigator:()=>Zt,getTimestamp:()=>R,getWindow:()=>et,gravatarURLByEmail:()=>Vo,immediate:()=>Un,isArray:()=>ft,isBoolean:()=>xr,isBrowser:()=>Fe,isEven:()=>Be,isHalf:()=>Y,isInteger:()=>hr,isLocalHost:()=>go,isNullOrUndefined:()=>wr,isNumber:()=>yr,isObject:()=>_,isPrimitive:()=>Me,isPromise:()=>I,isRecord:()=>gr,isSafeInteger:()=>br,isString:()=>mr,isTimeout:()=>$n,jsonStringify:()=>xe,jsonToUint8Array:()=>de,last:()=>oo,lazyListener:()=>Mo,linkifyPlainText:()=>to,messages:()=>Fo,moveSortWeight:()=>Xn,parseDate:()=>mo,parseOrderby:()=>Et,parseQuery:()=>ro,platform:()=>Bo,promisify:()=>j,qid:()=>wo,randomBoolean:()=>zn,randomFloat:()=>Gn,randomInt:()=>qn,randomUint8Array:()=>Q,renderMessages:()=>bn,roundDown:()=>An,roundHalfAwayFromZero:()=>kn,roundHalfDown:()=>Pn,roundHalfEven:()=>Sn,roundHalfOdd:()=>Mn,roundHalfTowardsZero:()=>In,roundHalfUp:()=>Fn,roundUp:()=>En,selectColor:()=>oe,size:()=>no,sleep:()=>Dn,sortedItems:()=>jt,sortedOrderby:()=>Or,startSortWeight:()=>Je,stringToBoolean:()=>fn,stringToFloat:()=>dn,stringToInteger:()=>pn,stringToUInt8Array:()=>Ie,suid:()=>vo,suidBytes:()=>Wt,suidBytesDate:()=>_t,suidDate:()=>Eo,supportsColors:()=>le,throttle:()=>qo,timeout:()=>On,timeoutReached:()=>Ne,timoutError:()=>je,toBase64:()=>Er,toBase64Url:()=>Ar,toBool:()=>hn,toCamelCase:()=>an,toCapitalize:()=>St,toCapitalizeWords:()=>un,toFloat:()=>gn,toHex:()=>vr,toHumanReadableUrl:()=>zt,toInt:()=>mn,toString:()=>yn,toUint8Array:()=>S,toValidFilename:()=>Qn,today:()=>Bn,tryTimeout:()=>ze,uname:()=>z,unescapeHTML:()=>jn,urlBase64ToUint8Array:()=>Wo,useAsyncMutex:()=>Do,useBase:()=>O,useDefer:()=>lo,useDispose:()=>qt,useDisposer:()=>uo,useEventListener:()=>po,useExitHandler:()=>No,useInterval:()=>fo,useLevelFilter:()=>G,useMessageHub:()=>Po,useMutex:()=>Io,useNamespaceFilter:()=>D,usePool:()=>jo,usePubSub:()=>So,useTimeout:()=>co,uuid:()=>X,uuidB32:()=>bo,uuidBytes:()=>Ze,uuidv4:()=>Lo,valueToBoolean:()=>Dt,valueToFloat:()=>Ot,valueToInteger:()=>Ut,valueToString:()=>we,waitOn:()=>Rn});function _(e){return e!=null&&typeof e=="object"}n(_,"isObject");function Me(e){return Object(e)!==e}n(Me,"isPrimitive");function ft(e){return Array.isArray(e)}n(ft,"isArray");function gr(e){return _(e)&&!ft(e)}n(gr,"isRecord");function mr(e){return typeof e=="string"}n(mr,"isString");function yr(e){return typeof e=="number"}n(yr,"isNumber");function hr(e){return typeof e=="number"&&Number.isInteger(e)}n(hr,"isInteger");function br(e){return typeof e=="number"&&Number.isSafeInteger(e)}n(br,"isSafeInteger");function xr(e){return typeof e=="boolean"}n(xr,"isBoolean");function wr(e){return e==null}n(wr,"isNullOrUndefined");function B(e,t,r=new WeakSet){if(e===t||r.has(t))return!0;if(Me(t)||r.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(!B(i,s,r))return!1}for(let o in t)if(t.hasOwnProperty(o)&&!e.hasOwnProperty(o))return!1;return!0}n(B,"deepEqual");function pt(e,...t){for(let r of t)_(e)||(e={}),r!=null&&Object.keys(r).forEach(o=>{let i=e[o],s=r[o];Array.isArray(i)&&Array.isArray(s)?e[o]=i.concat(s):_(i)&&_(s)?e[o]=pt(Object.assign({},i),s):e[o]=s});return e}n(pt,"deepMerge");function dt(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}n(dt,"getNamespaceFilterString");var gt,mt,Tr=dt(typeof process!="undefined"?(gt=process.env.ZEED)!=null?gt:process.env.DEBUG:typeof localStorage!="undefined"?(mt=localStorage.zeed)!=null?mt:localStorage.debug:"*");function D(e=Tr){let t,r=[],o=[];if(!e)t=n(function(i){return!1},"fn");else if(e==="*")t=n(function(i){return!0},"fn");else{let i,s=e.split(/[\s,]+/),c=s.length;for(i=0;i<c;i++){if(!s[i])continue;let a=s[i].replace(/\*/g,".*?");a[0]==="-"?r.push(new RegExp("^"+a.substr(1)+"$")):o.push(new RegExp("^"+a+"$"))}t=n(function(a){if(r.length===0&&o.length===0)return!0;let u,m;for(u=0,m=r.length;u<m;u++)if(r[u].test(a))return!1;for(u=0,m=o.length;u<m;u++)if(o[u].test(a))return!0;return!1},"fn")}return t.accept=o,t.reject=r,t.filter=e,t}n(D,"useNamespaceFilter");var yt,ht,bt,xt,Lr=typeof process!="undefined"?(ht=(yt=process.env.ZEED_LEVEL)!=null?yt:process.env.LEVEL)!=null?ht:process.env.DEBUG_LEVEL:typeof localStorage!="undefined"?(xt=(bt=localStorage.zeed_level)!=null?bt:localStorage.level)!=null?xt:localStorage.debug_level:void 0;function G(e=Lr){let t=P.all;if(typeof e=="string"){let r=ke[e.toLocaleLowerCase().trim()];r!=null&&(t=r)}else typeof e=="number"&&(t=e);return r=>r>=t}n(G,"useLevelFilter");var P=(a=>(a[a.all=-1]="all",a[a.debug=0]="debug",a[a.info=1]="info",a[a.warn=2]="warn",a[a.error=3]="error",a[a.fatal=4]="fatal",a[a.off=1/0]="off",a))(P||{}),ke={"*":-1,a:-1,all:-1,d:0,dbg:0,debug:0,i:1,inf:1,info:1,w:2,warn:2,warning:2,e:3,err:3,error:3,fatal:4,off:1/0,"-":1/0};function Pe(e=""){let t=[se()],r=2,o=n(u=>!0,"logCheckNamespace"),i=!1,s=c;function c(u=""){y.extend=function(h){return s(u?`${u}:${h}`:h)};let m=n(h=>{if(y.active===!0&&h.level>=a.level&&h.level>=y.level&&o(u))for(let T of t)T&&T(h)},"emit");function y(...h){m({name:u,messages:h,level:0})}return n(y,"log"),y.active=!0,y.level=-1,y.debug=function(...h){m({name:u,messages:h,level:0})},y.info=function(...h){m({name:u,messages:h,level:1})},y.warn=function(...h){m({name:u,messages:h,level:2})},y.error=function(...h){m({name:u,messages:h,level:3})},y.assert=function(h,...T){h||(typeof console!==void 0&&(console.assert?console.assert(h,...T):console.error(`Assert did fail with: ${h}`,...T)),m({name:u,messages:T||[`Assert did fail with: ${h}`],level:r}))},y.assertEqual=function(h,T,...C){let w=B(h,T);w||y.assert(w,`Assert did fail. Expected ${T} got ${h}`,T,h,...C)},y.assertNotEqual=function(h,T,...C){let w=B(h,T);w&&y.assert(w,`Assert did fail. Expected ${T} not to be equal with ${h}`,T,h,...C)},y}n(c,"LoggerBaseFactory");function a(u=""){return s(u)}return n(a,"Logger"),a.registerHandler=function(u){t.push(u)},a.setFilter=function(u){o=D(u)},a.setLock=(u=!0)=>i=u,a.setHandlers=function(u=[]){s!==c&&(s=c),!i&&(t=[...u].filter(m=>typeof m=="function"))},a.level=-1,a.setLogLevel=function(u=-1){i||(a.level=u)},a.setFactory=function(u){i||(s=u)},a}n(Pe,"LoggerContext");function se(e={}){let{level:t=void 0,filter:r=void 0,colors:o=!0,levelHelper:i=!1,nameBrackets:s=!0,padding:c=16}=e,a=D(r),u=G(t);return m=>{if(!u(m.level)||!a(m.name))return;let y=m.name?`[${m.name}]`:"";switch(m.level){case P.info:console.info(`I|* ${y}`,...m.messages);break;case P.warn:console.warn(`W|** ${y}`,...m.messages);break;case P.error:console.error(`E|*** ${y}`,...m.messages);break;default:console.debug(`D| ${y}`,...m.messages);break}}}n(se,"LoggerConsoleHandler");function Cr(){if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global;if(typeof globalThis!="undefined")return globalThis;throw new Error("unable to locate global object")}n(Cr,"_global");function Z(){let e=Cr();return e._zeedGlobal==null&&(e._zeedGlobal={}),e._zeedGlobal}n(Z,"getGlobalContext");var V;function Se(){let e=Pe();return e.setHandlers([se()]),e}n(Se,"getLoggerContext");try{let e=Z();e!=null?(e==null?void 0:e.logger)==null?(V=Se(),e.logger=V):V=e.logger:V=Se()}catch{V=Se()}var v=V;var wt=v("bin"),fe;function Ie(e){return typeof TextEncoder=="undefined"?new Uint8Array:(fe!=null?fe:fe=new TextEncoder).encode(e.normalize("NFC"))}n(Ie,"stringToUInt8Array");var pe;function Tt(e){return typeof TextDecoder=="undefined"?"":(pe!=null?pe:pe=new TextDecoder("utf-8",{ignoreBOM:!0})).decode(e).normalize("NFC")}n(Tt,"Uint8ArrayToString");function S(e){return e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?Ie(e):e.length?new Uint8Array(e):e}n(S,"toUint8Array");function vr(e){if(typeof Buffer!="undefined")return Buffer.from(S(e)).toString("hex");let t="0123456789abcdef",r="";for(let o of[...S(e)])r+=t[o>>4]+t[o&15];return r}n(vr,"toHex");function Er(e){let t=S(e);if(typeof Buffer!="undefined")return Buffer.from(t).toString("base64");let r="";for(let o=0;o<t.byteLength;o++)r+=String.fromCharCode(t[o]);return btoa(r)}n(Er,"toBase64");function Ar(e){let t=S(e);if(typeof Buffer!="undefined")return Buffer.from(t).toString("base64url");let r="";for(let o=0;o<t.byteLength;o++)r+=String.fromCharCode(t[o]);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_")}n(Ar,"toBase64Url");function De(e,t){if(e.byteLength!==t.byteLength)return!1;let r=S(e),o=S(t);for(let i=0;i<r.length;i++)if(r[i]!==o[i])return!1;return!0}n(De,"equalBinary");function de(e){try{return Ie(JSON.stringify(e))}catch(t){throw wt.warn("jsonToUint8Array",e),t}}n(de,"jsonToUint8Array");function ge(e){try{return JSON.parse(Tt(e))}catch(t){throw wt.warn("Uint8ArrayToJson",e),t}}n(ge,"Uint8ArrayToJson");function Q(e=16){let t=new Uint8Array(e);if(typeof crypto!="undefined"&&crypto.getRandomValues)crypto.getRandomValues(t);else for(let r=0;r<e;r++)t[r]=Math.floor(Math.random()*256);return t}n(Q,"randomUint8Array");var Lt="SHA-256",Ue="AES-GCM",Ct="PBKDF2";async function Fr(e,t=Lt){return await crypto.subtle.digest(t,S(e))}n(Fr,"digest");async function Mr(e,t={}){var i;let r=S(e),o=await crypto.subtle.importKey("raw",r,Ct,!1,["deriveKey"]);return await crypto.subtle.deriveKey({name:Ct,salt:t.salt?S(t.salt):new Uint8Array(0),iterations:(i=t.iterations)!=null?i:1e5,hash:Lt},o,{name:Ue,length:256},!0,["encrypt","decrypt"])}n(Mr,"deriveKeyPbkdf2");var me=new Uint8Array([1,1]);async function Oe(e,t){let r=Q(12),o=await crypto.subtle.encrypt({name:Ue,iv:r},t,e),i=new Uint8Array(o),s=me.length+r.length+i.length,c=new Uint8Array(s),a=0;return c.set(me,a),a+=me.length,c.set(r,a),a+=r.length,c.set(i,a),c}n(Oe,"encrypt");async function $e(e,t){let r=e.subarray(0,2);if(!De(r,me))return Promise.reject(`Unknown magic ${r}`);let o=e.subarray(2,2+12),i=e.subarray(2+12,e.length),s=await crypto.subtle.decrypt({name:Ue,iv:o},t,i);return new Uint8Array(s)}n($e,"decrypt");var vt=",",kr=!1,Pr=!0;function Sr(e){return/^([-+])?([0-9]+(\.[0-9]+)?|Infinity)$/.test(e)?Number(e):NaN}n(Sr,"filterFloat");function Ir(e){return Pr&&e==null?"":kr?'="'+String(e).replace(/"/g,'""')+'"':!isNaN(Sr(e))&&isFinite(e)?parseFloat(e):'"'+String(e).replace(/"/g,'""')+'"'}n(Ir,"escape");function Dr(e,t){let r="";t&&(r=t.join(vt)+`\r
2
- `);for(let o=0;o<e.length;o++)r+=e[o].map(Ir).join(vt)+`\r
3
- `;return r}n(Dr,"csv");function Et(e=""){let[t="",r="asc"]=e.split(" ");return r=r.toLowerCase(),{field:t,orderby:r,asc:r!=="desc",desc:r==="desc"}}n(Et,"parseOrderby");function Ur(e,t=!0){return`${e} ${t?"asc":"desc"}`}n(Ur,"composeOrderby");function ye(e,t,r=!0){let o=e||0,i=t||0;return o>i?r?1:-1:o<i?r?-1:1:0}n(ye,"cmp");function Or(e,...t){if(t.length>0){let r=t.map(Et),o=Array.from(e);return o.sort((i,s)=>{for(let{field:c,asc:a}of r){let u=ye(i[c],s[c],a);if(u!==0)return u}return 0}),o}return e}n(Or,"sortedOrderby");function he(e){return e.filter((t,r)=>e.indexOf(t)===r)}n(he,"arrayUnique");function At(e,t){return he(e.filter(r=>!t.includes(r)))}n(At,"arrayMinus");function Ft(...e){return he(e.reduce((t=[],r)=>t.concat(r),[]))}n(Ft,"arrayUnion");function K(...e){return e.flat(1/0)}n(K,"arrayFlatten");function Mt(e,t){return he(e).filter(r=>t.includes(r))}n(Mt,"arrayIntersection");function $r(e,t){return At(Ft(e,t),Mt(e,t))}n($r,"arraySymmetricDifference");function Rr(e,t){if(e&&Array.isArray(e)){let r;for(;(r=e.indexOf(t))!==-1;)e.splice(r,1);return e}return[]}n(Rr,"arrayRemoveElement");function Hr(e,t){return e.includes(t)||e.push(t),e}n(Hr,"arraySetElement");function be(e,t){return e.splice(0,e.length,...e.filter(t)),e}n(be,"arrayFilterInPlace");function Br(e,t){let r=e.findIndex(o=>o===t);return r>=0?e.splice(r,1):e.push(t),e}n(Br,"arrayToggleInPlace");function Nr(e){return e.splice(0,e.length),e}n(Nr,"arrayEmptyInPlace");function kt(e,t=ye){return Array.from(e).sort(t)}n(kt,"arraySorted");function jr(e){return kt(e,(t,r)=>t-r)}n(jr,"arraySortedNumbers");function Pt(e,t){return e.length===t.length&&e.every((r,o)=>r===t[o])}n(Pt,"arrayIsEqual");function Re(e){return e.sort(()=>Math.random()>.5?1:-1),e}n(Re,"arrayShuffleInPlace");function zr(e){return Re(Array.from(e))}n(zr,"arrayShuffle");function qr(e){for(;e.length>1;){let t=Array.from(e);if(Re(t),!Pt(e,t))return t}return e}n(qr,"arrayShuffleForce");function Gr(e){return e[Math.floor(Math.random()*e.length)]}n(Gr,"arrayRandomElement");function Jr(...e){return K(e).reduce((t,r)=>t!=null?r>t?r:t:r,void 0)}n(Jr,"arrayMax");function Wr(...e){return K(e).reduce((t,r)=>t!=null?r<t?r:t:r,void 0)}n(Wr,"arrayMin");function _r(e=0,t){if(e<=0)return[];let r=new Array(e);for(let o=0;o<e;o++)r[o]=t instanceof Function?t(o):t;return r}n(_r,"createArray");var Zr=v("zeed:basex"),Vr={"2":"01","8":"01234567","11":"0123456789a","16":"0123456789abcdef","32":"0123456789ABCDEFGHJKMNPQRSTVWXYZ","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 O(e){let t;if(typeof e=="string")t=e;else if(t=Vr[e.toString()],t==null)throw new Error(`Unknown base ${e}`);if(t.length>=255)throw new TypeError("Alphabet too long");let r=new Uint8Array(256);for(let m=0;m<r.length;m++)r[m]=255;for(let m=0;m<t.length;m++){let y=t.charAt(m),h=y.charCodeAt(0);if(r[h]!==255)throw new TypeError(y+" is ambiguous");r[h]=m}let o=t.length,i=t.charAt(0),s=Math.log(o)/Math.log(256),c=Math.log(256)/Math.log(o);function a(m,y=-1){let h=S(m);if(h.byteLength===0)return"";let T=0,C=0,w=h.byteLength;for(;C!==w&&h[C]===0;)C++;let E=(w-C)*c+1>>>0,L=new Uint8Array(E);for(;C!==w;){let f=h[C],l=0;for(let d=E-1;(f!==0||l<T)&&d!==-1;d--,l++)f+=256*L[d]>>>0,L[d]=f%o>>>0,f=f/o>>>0;if(f!==0)throw Zr.warn("Non-zero carry",h,y,l,E),new Error("Non-zero carry");T=l,C++}let b=E-T;for(;b!==E&&L[b]===0;)b++;let p="";for(;b<E;++b)p+=t.charAt(L[b]);return y>0?p.padStart(y,i):p}n(a,"encode");function u(m,y=-1){if(typeof m!="string")throw new TypeError("Expected String");if(m.length===0)return new Uint8Array;m=m.replace(/\s+/gi,"");let h=0,T=0;for(;m[h]===i;)h++;let C=(m.length-h)*s+1>>>0,w=new Uint8Array(C);for(;m[h];){let L=r[m.charCodeAt(h)];if(L===255)throw new Error(`Unsupported character "${m[h]}"`);let b=0;for(let p=C-1;(L!==0||b<T)&&p!==-1;p--,b++)L+=o*w[p]>>>0,w[p]=L%256>>>0,L=L/256>>>0;if(L!==0)throw new Error("Non-zero carry");T=b,h++}let E=C-T;for(;E!==C&&w[E]===0;)E++;return y>0?new Uint8Array([...new Uint8Array(y-w.length+E),...w.slice(E)]):w.slice(E)}return n(u,"decode"),{encode:a,decode:u}}n(O,"useBase");var{encode:Qr,decode:Kr}=O(16),{encode:Yr,decode:Xr}=O(32),{encode:en,decode:tn}=O(58),{encode:rn,decode:nn}=O(62),{encode:on,decode:sn}=O(62);var an=n(e=>(e.length>0&&(/^[A-Z0-9_\-\ ]*$/g.test(e)&&(e=e.toLowerCase()),e=e.replace(/^[-_\ ]+/gi,"").replace(/[-_\ ]+$/gi,"").replace(/[-_\ ]+([a-z0-9])/gi,(t,r)=>r.toUpperCase()),e=e[0].toLowerCase()+e.substring(1)),e),"toCamelCase");function St(e){return e.charAt(0).toUpperCase()+e.toLowerCase().slice(1)}n(St,"toCapitalize");function un(e){return e.replace(/\w\S*/g,St)}n(un,"toCapitalizeWords");function ln(e,t="-"){return t=typeof t=="undefined"?"_":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()}n(ln,"fromCamelCase");function cn(e,t){var r=[],o=[];return t==null&&(t=n(function(i,s){return r[0]===s?"[Circular ~]":"[Circular ~."+o.slice(0,r.indexOf(s)).join(".")+"]"},"cycleReplacer")),function(i,s){if(r.length>0){var c=r.indexOf(this);~c?r.splice(c+1):r.push(this),~c?o.splice(c,1/0,i):o.push(i),~r.indexOf(s)&&(s=t==null?void 0:t.call(this,i,s))}else r.push(s);return e==null?s:e.call(this,i,s)}}n(cn,"serializer");function xe(e,t,r,o){return JSON.stringify(e,cn(t,o),r)}n(xe,"jsonStringify");var It=["1","true","yes","y","on"];function fn(e,t=!1){return e==null||typeof e!="string"?t:It.includes(String(e).trim().toLowerCase())}n(fn,"stringToBoolean");function pn(e,t=0){var r;return e==null||typeof e!="string"?t:(r=parseInt(e.trim(),10))!=null?r:t}n(pn,"stringToInteger");function dn(e,t=0){var r;return e==null||typeof e!="string"?t:(r=parseFloat(e.trim()))!=null?r:t}n(dn,"stringToFloat");function Dt(e,t=!1){return e==null?t:typeof e=="boolean"?e:typeof e=="number"?e!==0:It.includes(String(e).trim().toLowerCase())}n(Dt,"valueToBoolean");function Ut(e,t=0){var r;return e==null?t:typeof e=="boolean"?e?1:0:typeof e=="number"?Math.floor(e):(r=parseInt(String(e).trim(),10))!=null?r:t}n(Ut,"valueToInteger");function Ot(e,t=0){var r;return e==null?t:typeof e=="boolean"?e?1:0:typeof e=="number"?Math.floor(e):(r=parseFloat(String(e).trim()))!=null?r:t}n(Ot,"valueToFloat");function we(e,t=""){var r;return e==null?t:(r=String(e))!=null?r:t}n(we,"valueToString");var gn=Ot,mn=Ut,yn=we,hn=Dt;function $t(e,t={}){let{trace:r=!0,pretty:o=!0}=t;return e.map(i=>i&&typeof i=="object"?i instanceof Error?r?`${i.name||"Error"}: ${i.message}
4
- ${i.stack}`:`${i.name||"Error"}: ${i.message}`:o?xe(i,null,2):xe(i):String(i))}n($t,"formatMessages");function bn(e,t={}){return $t(e,t).join(" ")}n(bn,"renderMessages");function xn(e){try{return decodeURIComponent(escape(e))}catch{}return e}n(xn,"fixBrokenUth8String");var wn={symbol:"$",separator:",",decimal:".",errorOnInvalid:!1,precision:2,pattern:"!#",negativePattern:"-!#",format:vn,fromCents:!1},Rt=n(e=>Math.round(e),"round"),He=n(e=>Math.pow(10,e),"pow"),Tn=n((e,t)=>Rt(e/t)*t,"rounding"),Ln=/(\d)(?=(\d{3})+\b)/g,Cn=/(\d)(?=(\d\d)+\d\b)/g;function N(e,t={}){return new $(e,t)}n(N,"currency");var Le=class{constructor(t,r={}){var c;let o=Object.assign({},wn,r),i=He((c=o.precision)!=null?c:2),s=Te(t,o);this.intValue=s,this.value=s/i,o.increment=o.increment||1/i,o.useVedic?o.groups=Cn:o.groups=Ln,this._settings=o,this._precision=i}add(t){let{intValue:r,_settings:o,_precision:i}=this;return N((r+=Te(t,o))/(o.fromCents?1:i),o)}subtract(t){let{intValue:r,_settings:o,_precision:i}=this;return N((r-=Te(t,o))/(o.fromCents?1:i),o)}multiply(t){let{intValue:r,_settings:o,_precision:i}=this;return N((r*=t)/(o.fromCents?1:He(i)),o)}divide(t){let{intValue:r,_settings:o}=this;return N(r/=Te(t,o,!1),o)}distribute(t){let{intValue:r,_precision:o,_settings:i}=this,s=[],c=Math[r>=0?"floor":"ceil"](r/t),a=Math.abs(r-c*t),u=i.fromCents?1:o;for(;t!==0;t--){let m=N(c/u,i);a-- >0&&(m=m[r>=0?"add":"subtract"](1/u)),s.push(m)}return s}dollars(){return~~this.value}cents(){let{intValue:t,_precision:r}=this;return~~(t%r)}format(t){let{_settings:r}=this;return typeof t=="function"?t(this,r):r.format(this,Object.assign({},r,t))}toString(){let{intValue:t,_precision:r,_settings:o}=this;return Tn(t/r,o.increment).toFixed(o.precision)}toJSON(){return this.value}static sum(...t){return K(t).reduce((r,o)=>N(r).add(o),this.zero)}static avg(...t){let r=K(t);return r.reduce((o,i)=>N(o).add(i),this.zero).divide(r.length)}},$=Le;n($,"Currency"),$.zero=new Le(0),$.one=new Le(1);function Te(e,t,r=!0){let o=0,{decimal:i,errorOnInvalid:s,precision:c,fromCents:a}=t,u=He(c),m=typeof e=="number";if(e instanceof $&&a)return e.intValue;if(m||e instanceof $)o=e instanceof $?e.value:e;else if(typeof e=="string"){let y=new RegExp("[^-\\d"+i+"]","g"),h=new RegExp("\\"+i,"g");o=e.replace(/\((.*)\)/,"-$1").replace(y,"").replace(h,"."),o=o||0}else{if(s)throw Error("Invalid Input");o=0}return a||(o*=u,o=o.toFixed(4)),r?Rt(o):o}n(Te,"parse");function vn(e,t){let{pattern:r,negativePattern:o,symbol:i,separator:s,decimal:c,groups:a}=t,u=(""+e).replace(/^-/,"").split("."),m=u[0],y=u[1];return(e.value>=0?r:o).replace("!",i).replace("#",m.replace(a,"$1"+s)+(y?c+y:""))}n(vn,"format");var Y=n(e=>Math.abs(e)%1===.5,"isHalf"),Be=n(e=>e%2===0,"isEven"),En=n(e=>Math.ceil(e),"roundUp"),An=n(e=>Math.floor(e),"roundDown"),Fn=n(e=>Math.round(e),"roundHalfUp"),Mn=n(e=>{let t=Math.round(e);return Y(e)&&Be(t)?t-1:t},"roundHalfOdd"),kn=n(e=>Y(e)?Math.sign(e)*Math.ceil(Math.abs(e)):Math.round(e),"roundHalfAwayFromZero"),Pn=n(e=>Y(e)?Math.floor(e):Math.round(e),"roundHalfDown"),Sn=n(e=>{let t=Math.round(e);return Y(e)?Be(t)?t:t-1:t},"roundHalfEven"),In=n(e=>Y(e)?Math.sign(e)*Math.floor(Math.abs(e)):Math.round(e),"roundHalfTowardsZero");var{warn:Ht}=v("zeed:promise");async function Dn(e){return new Promise(t=>setTimeout(t,e))}n(Dn,"sleep");async function Un(){return new Promise(e=>setTimeout(e,0))}n(Un,"immediate");var Ne=Symbol("timeout");async function On(e,t,r=Ne){return new Promise(async(o,i)=>{let s=!1,c=setTimeout(()=>{s=!0,o(r)},t);try{let a=await e;clearTimeout(c),s||o(a)}catch(a){clearTimeout(c),s||i(a)}})}n(On,"timeout");var je=new Error("Timeout reached");function $n(e){return e===Ne||e===je}n($n,"isTimeout");async function ze(e,t){return t<=0?await e:new Promise(async(r,o)=>{let i=!1,s=setTimeout(()=>{i=!0,o(je)},t);try{let c=await e;clearTimeout(s),i||r(c)}catch(c){clearTimeout(s),i||o(c)}})}n(ze,"tryTimeout");function Rn(e,t,r=1e3){return new Promise((o,i)=>{let s=n(u=>{a&&(clearTimeout(a),c(),o(u))},"fn"),c=n(()=>{a=null,e.off?e.off(t,s):e.removeEventListener?e.removeEventListener(t,s):Ht("No remove listener method found for",e,t)},"done"),a=setTimeout(()=>{c(),i(new Error("Did not response in time"))},r);e.on?e.on(t,s):e.addEventListener?e.addEventListener(t,s):Ht("No listener method found for",e)})}n(Rn,"waitOn");function I(e){return Boolean(e&&(e instanceof Promise||typeof e.then=="function"))}n(I,"isPromise");function j(e){return Promise.resolve(e)}n(j,"promisify");var qe=1e3*60*60*24,M=class{constructor(t){var r;if(typeof t=="number"){this.days=t;return}if(t!=null&&(t=(r=M.from(t))==null?void 0:r.days),t==null){let o=new Date;this.days=o.getFullYear()*1e4+(o.getMonth()+1)*100+o.getDate()}else this.days=t}static fromNumber(t){return new M(t)}static fromString(t){return new M(+t.replace(/[^0-9]/g,""))}static fromDate(t,r=!1){return r?M.fromString(t.toISOString().substr(0,10)):new M(t.getFullYear()*1e4+(t.getMonth()+1)*100+t.getDate())}static fromDateGMT(t){return M.fromDate(t,!0)}static from(t,r=!1){if(typeof t=="number")return new M(t);if(typeof t=="string")return M.fromString(t);if(t instanceof Date)return M.fromDate(t,r);if(t instanceof M)return t}toNumber(){return this.days}toJson(){return this.days}toString(t="-"){let r=String(this.days);return r.slice(0,4)+t+r.slice(4,6)+t+r.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)}dayOffset(t){return M.fromDateGMT(new Date(this.toDateGMT().getTime()+t*qe))}daysUntil(t){var r;return Math.round((((r=new M(t))==null?void 0:r.toDateGMT().getTime())-this.toDateGMT().getTime())/qe)}yesterday(){return this.dayOffset(-1)}tomorrow(){return this.dayOffset(1)}};n(M,"Day");async function Hn(e,t,r){let o=M.from(e),i=M.from(t);for(;o&&i&&(o==null?void 0:o.days)<=(i==null?void 0:i.days);){let s=r(o);I(s)&&await s,o=o.dayOffset(1)}}n(Hn,"forEachDay");function Bn(){return new M}n(Bn,"today");function Nn(e){return new M(e)}n(Nn,"day");var Ge=n(e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&apos;").replace(/"/g,"&quot;"),"escapeHTML"),jn=n(e=>e.replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&apos;/gi,"'").replace(/&amp;/gi,"&"),"unescapeHTML");function zn(e=.25){return Math.random()<e}n(zn,"randomBoolean");function qn(e=100,t=0){return t+Math.floor(Math.random()*(e-t))}n(qn,"randomInt");function Gn(e=100,t=0){return t+Math.random()*(e-t)}n(Gn,"randomFloat");function Jn(e,t,r){return Math.max(e,Math.min(r,t))}n(Jn,"between");var Wn=100,Bt=/[\u0000-\u001F\u0080-\u009F]/g,_n=/^\.+/,Zn=/\.+$/;function Nt(){return/[<>:"/\\|?*\u0000-\u001F]/g}n(Nt,"filenameReservedRegex");function Vn(){return/^(con|prn|aux|nul|com\d|lpt\d)$/i}n(Vn,"windowsReservedNameRegex");function Qn(e){if(typeof e!="string")throw new TypeError("Expected a string");let t="_";if(Nt().test(t)&&Bt.test(t))throw new Error("Replacement string cannot contain reserved filename characters");return e=e.replace(Nt(),t).replace(Bt,t).replace(_n,t).replace(Zn,""),e=Vn().test(e)?e+t:e,e.slice(0,Wn)}n(Qn,"toValidFilename");var Kn=/[\\\-\[\]\/{}()*+?.^$|]/g;function Yn(e){return e?e instanceof RegExp?e.source:e.replace(Kn,"\\$&"):""}n(Yn,"escapeRegExp");function Je(e){return e.reduce((t,r)=>Math.min(t,r.sort_weight||0),0)-1-Math.random()}n(Je,"startSortWeight");function We(e){return e.reduce((t,r)=>Math.max(t,r.sort_weight||0),0)+1+Math.random()}n(We,"endSortWeight");function Xn(e,t,r){let o=r.length,i=e<t;if(o<=0||e>=o-1)return We(r);if(e<=0)return Je(r);r=jt([...r]);let s=i?-1:0,c=r[e+s].sort_weight||0,u=(r[e+s+1].sort_weight||0)-c;if(u===0)return i?Je(r):We(r);let m=c+u/2,y=u*.01*(Math.random()-.5);return m+y}n(Xn,"moveSortWeight");function jt(e){return e.sort((t,r)=>(t.sort_weight||0)-(r.sort_weight||0)),e}n(jt,"sortedItems");var eo=/((?:(?:(?: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 to(e){return e.split(eo).map((t,r)=>{let o=Ge(t);return r%2?`<a target="_blank" href="${o}">${zt(o)}</a>`:o}).join("")}n(to,"linkifyPlainText");function zt(e){return e.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")}n(zt,"toHumanReadableUrl");function _e(e){let t=[];for(let[r,o]of Object.entries(e))if(o!=null){Array.isArray(o)||(o=[o]);for(let i of o)i!=null&&t.push(encodeURIComponent(r)+"="+encodeURIComponent(i.toString()||""))}return t.join("&")}n(_e,"encodeQuery");function ro(e){let t={},r=(e[0]==="?"?e.substr(1):e).split("&");for(let o=0;o<r.length;o++){let i=r[o].split("="),s=decodeURIComponent(i[0]),c=decodeURIComponent(i[1]||"");t[s]!=null?(Array.isArray(t[s])||(t[s]=[t[s]]),t[s].push(c)):t[s]=c}return t}n(ro,"parseQuery");function no(e){return e!=null?e.size!=null?e.size:e.length!=null?e.length:Object.keys(e).length:0}n(no,"size");function oo(e){return e!=null&&e.length>0?e[e.length-1]:void 0}n(oo,"last");function io(e){try{if(e!=null)return Array.isArray(e)||typeof e=="string"?e.length<=0:(e==null?void 0:e.size)!=null?e.size<=0:Object.keys(e).length<=0}catch(t){console.error("Failed to check if empty for",e,t)}return!0}n(io,"empty");function Ce(e){return Object(e)!==e?e:JSON.parse(JSON.stringify(e))}n(Ce,"cloneObject");function so(e){return Object(e)!==e?e:JSON.parse(JSON.stringify(e))}n(so,"cloneJsonObject");async function ao(e){typeof e=="function"?await j(e()):I(e)?await e:typeof e.dispose=="function"?await j(e.dispose()):I(e.dispose)?await e.dispose:typeof e.cleanup=="function"?await j(e.cleanup()):I(e.cleanup)&&await e.cleanup}n(ao,"callDisposer");function qt(){let e=[],t=n(async i=>{e.includes(i)&&(be(e,s=>s!==i),await ao(i))},"untrack"),r=n(async()=>{for(;e.length>0;)await t(e[0])},"dispose"),o=n(i=>(e.unshift(i),()=>t(i)),"track");return Object.assign(r,{track:o,add:o,untrack:t,dispose:r,exec:r,getSize(){return e.length}})}n(qt,"useDispose");var uo=qt;function lo(e={}){let{mode:t="fifo"}=e,r=[],o=n(async(s=!1)=>{for(;r.length>0;){let c=r[0];if(be(r,a=>a!==c),typeof c=="function"){let a=c();if(I(a)){if(s)throw new Error(`Expected sync only function, but found async: ${c}`);await a}}else if(I(c)){if(s)throw new Error(`Expected sync only function, but found async: ${c}`);await c}else throw new Error(`Unhandled disposable: ${c}`)}},"exec");return Object.assign(o,{add:n(s=>{t==="lifo"?r.unshift(s):r.push(s)},"add"),exec:o,getSize(){return r.length}})}n(lo,"useDefer");function co(e,t=0){let r=setTimeout(e,t);return()=>{r&&(clearTimeout(r),r=void 0)}}n(co,"useTimeout");function fo(e,t){let r=setInterval(e,t);return()=>{r&&(clearInterval(r),r=void 0)}}n(fo,"useInterval");function po(e,t,r,...o){return e==null?()=>{}:(e.on?e.on(t,r,...o):e.addEventListener&&e.addEventListener(t,r,...o),()=>{e.off?e.off(t,r,...o):e.removeEventListener&&e.removeEventListener(t,r,...o)})}n(po,"useEventListener");function go(e=window.location.hostname){return["localhost","127.0.0.1","","::1","::"].includes(e)||e.startsWith("192.168.")||e.startsWith("10.0.")||e.endsWith(".local")}n(go,"isLocalHost");var R=n(()=>typeof performance!="undefined"?performance.now():new Date().getTime(),"getTimestamp");function ae(e){return e>999?(e/1e3).toFixed(1)+"s":e.toFixed(2)+"ms"}n(ae,"formatMilliseconds");function mo(...e){for(let t of e){if(t instanceof Date)return t;if(typeof t=="string"){let r=null;if(t.includes(":"))try{r=new Date(t)}catch{}if(!(r instanceof Date)){let o=/(\d\d\d\d)-(\d\d)-(\d\d)/.exec(t);o&&(r=new Date(+o[1],+o[2]-1,+o[3],12,0))}if(r instanceof Date)return r}}}n(mo,"parseDate");var{encode:Gt,decode:yo}=O(62),{encode:ho}=O(32);function Ze(){return Q(16)}n(Ze,"uuidBytes");function X(){return Gt(Ze(),22)}n(X,"uuid");function bo(){return ho(Ze(),26)}n(bo,"uuidB32");var Ve={};function z(e="id"){return Ve[e]==null&&(Ve[e]=0),`${e}-${Ve[e]++}`}n(z,"uname");var xo=0;function wo(){return`id-${xo++}`}n(wo,"qid");var To="10000000-1000-4000-8000-100000000000",Lo=n(()=>To.replace(/[018]/g,e=>(e^Q(1)[0]&15>>e/4).toString(16)),"uuidv4"),Jt=16e11;function Co(e){var t=new Uint8Array([0,0,0,0,0,0]);let r=t.length-1;for(var o=0;o<t.length;o++){var i=e&255;t[r-o]=i,e=(e-i)/256}return t}n(Co,"longToByteArray");function Wt(){let e=R()-Jt;return new Uint8Array([...Co(e),...Q(10)])}n(Wt,"suidBytes");function vo(){return Gt(Wt(),22)}n(vo,"suid");function Eo(e){return _t(yo(e,16))}n(Eo,"suidDate");function _t(e){return new Date(Jt+e.slice(0,6).reduce((t,r)=>t*256+r,0))}n(_t,"suidBytesDate");var ee=v("zeed:emitter"),H=class{constructor(){this.subscribers={};this.subscribersOnAny=[];this.call=new Proxy({},{get:(t,r)=>(...o)=>this.emit(r,...o)})}async emit(t,...r){let o=!1;try{let i=this.subscribers[t]||[];if(this.subscribersOnAny.forEach(s=>s(t,...r)),i.length>0){let s=i.map(c=>{try{return j(c(...r))}catch(a){ee.warn("emit warning:",a)}});o=!0,await Promise.all(s)}}catch(i){ee.error("emit exception",i)}return o}onAny(t){this.subscribersOnAny.push(t)}on(t,r){let o=this.subscribers[t]||[];return o.push(r),this.subscribers[t]=o,()=>{this.off(t,r)}}onCall(t){for(let[r,o]of Object.entries(t))this.on(r,o)}once(t,r){let o=n(async(...i)=>(this.off(t,o),await j(r(...i))),"onceListener");return this.on(t,o),()=>{this.off(t,r)}}off(t,r){return this.subscribers[t]=(this.subscribers[t]||[]).filter(o=>r&&o!==r),this}removeAllListeners(t){return this.subscribers={},this}dispose(){this.subscribers={},this.subscribersOnAny=[]}};n(H,"Emitter");function Ao(){let e=Z().emitter;return e||(e=new H,Z().emitter=e),e}n(Ao,"getGlobalEmitter");var Fo=new H;function Mo(e,t){let r=Math.round(Math.random()*100);var o=[],i;let s=n((a,u)=>{let m={key:a,obj:u};o.push(m),i&&i()},"incoming");return t?e.on?e.on(t,a=>{s(t,a)}):e.addEventListener?e.addEventListener(t,a=>{s(t,a)}):ee.error(r,"Cannot listen to key"):e.onAny?e.onAny((a,u)=>{s(a,u)}):ee.error(r,"cannot listen to all for",e),n((a,u=!0)=>new Promise((m,y)=>{a||(a=t,a||o.length&&(a=o[0].key)),i=n(()=>{for(;o.length>0;){let h=o.shift();if(h.key===a)i=void 0,m(h.obj);else{if(u){ee.warn(r,`Unhandled event ${a} with value: ${h.obj}`);continue}y(`Expected ${a}, but found ${h.key} with value=${h.obj}`),ee.error(r,`Unhandled event ${a} with value: ${h.obj}`)}break}},"lazyResolve"),i()}),"on")}n(Mo,"lazyListener");var ve=class extends H{constructor(){super(...arguments);this.id=X()}close(){}};n(ve,"Channel");var ue=class extends ve{constructor(){super(...arguments);this.isConnected=!0}postMessage(t){var r;(r=this.other)==null||r.emit("message",{data:t,origin:"local",lastEventId:X()})}};n(ue,"LocalChannel");function ko(){let e=new ue,t=new ue;return e.other=t,t.other=e,[e,t]}n(ko,"fakeWorkerPair");var J=class{async encode(t){return de(t)}async decode(t){return ge(t)}};n(J,"JsonEncoder");var Qe=class{constructor(t){this.key=t}async encode(t){let r=de(t);return await Oe(r,this.key)}async decode(t){let r=await $e(t,this.key);return ge(r)}};n(Qe,"CryptoEncoder");var Ke=n((e,t,r={})=>new Proxy(r,{get:(o,i)=>i in o?o[i]:(...s)=>e(i,s,t)}),"createPromiseProxy");function Po(e={}){let{name:t=z("hub"),encoder:r=new J,retryAfter:o=1e3,ignoreUnhandled:i=!0}=e,s=v(t),c={},a,u=[],m,y={},h=n(()=>{clearTimeout(m)},"dispose"),T=n(async()=>{if(clearTimeout(m),a){if(a.isConnected)for(;u.length;){let L=u[0];try{a.postMessage(await r.encode(L)),u.shift()}catch(b){s.warn("postMessage",b);break}}u.length>0&&o>0&&(m=setTimeout(T,o))}},"postNext"),C=n(async L=>{s("enqueue postMessage",L),u.push(L),await T()},"postMessage"),w=n(async L=>{a=L,a.on("connect",T),a.on("message",async b=>{s("onmessage",typeof b);let{name:p,args:f,id:l,result:d,error:g}=await r.decode(b.data);if(p){s(`name ${p} id ${l}`);try{if(c[p]==null)throw new Error(`handler for ${p} was not found`);let F=c[p](...f);I(F)&&(F=await F),s(`result ${F}`),l&&C({id:l,result:F})}catch(F){let q=F instanceof Error?F:new Error(we(F));s.warn("execution error",q.name),C({id:l,error:{message:q.message,stack:q.stack,name:q.name}})}}else if(l)if(s(`response for id=${l}: result=${d}, error=${g}`),y[l]==null)d===void 0?s(`skip response for ${l}`):s.warn(`no response hook for ${l}`);else{let[F,q]=y[l];if(F&&q)if(delete y[l],g){let ce=new Error(g.message);ce.stack=g.stack,ce.name=g.name,s.warn("reject",ce.name),q(ce)}else s("resolve",d),F(d)}else i||s.warn("Unhandled message",b)}),T()},"connect"),E=n(async(L,b,p={})=>{let{timeout:f=5e3}=p,l=X();return C({name:L,args:b,id:l}),ze(new Promise((d,g)=>y[l]=[d,g]),f)},"fetchMessage");return e.channel&&w(e.channel),{dispose:h,connect:w,listen(L){Object.assign(c,L)},send(){return Ke(E,{},{options(L){return Ke(E,U({},L))}})}}}n(Po,"useMessageHub");var Ee=class extends H{constructor(t){super();this.publish=this.emit;this.subscribe=this.on;var c;let{name:r,encoder:o=new J,channel:i,debug:s=!1}=t;this.channel=i,this.encoder=o,this.debug=s,this.name=(c=r!=null?r:this.channel.id)!=null?c:z("pubsub"),this.log=v(`${this.shortId}`),this.debug&&(this.channel.on("connect",()=>{this.log("channel connected")}),this.channel.on("disconnect",()=>{this.log("channel disconnected")})),this.channel.on("message",async({data:a})=>{let u=await this.encoder.decode(a);if(this.debug?this.log(`channel message, event=${u==null?void 0:u.event}, info=`,u):this.log(`channel message, event=${u==null?void 0:u.event}`),u){let{event:m,args:y}=u;await this.emitSuper(m,...y)}})}get shortId(){return this.name.substr(0,6)}async emitSuper(t,...r){return await super.emit(t,...r)}async emit(t,...r){try{if(this.debug?this.log(`emit(${t})`,t):this.log(`emit(${t})`,r.length),!this.channel.isConnected)return this.log.warn("channel not connected"),!1;let o=await this.encoder.encode({event:t,args:r});return this.channel.postMessage(o),!0}catch(o){this.log.warn(`emit(${t})`,o)}return!1}};n(Ee,"PubSub");function So(e){return new Ee(e)}n(So,"usePubSub");var Ye=pr(require("util/types"),1);function Io(){let e=!0;return(t,r)=>{let o=!1;if(e){e=!1;try{t(),o=!0}finally{e=!0}}else r!==void 0&&r();return o}}n(Io,"useMutex");function Do(){let e=!0;return async(t,r)=>{let o=!1;if(e){e=!1;try{let i=t();(0,Ye.isPromise)(i)&&await i,o=!0}finally{e=!0}}else if(r!==void 0){let i=r();(0,Ye.isPromise)(i)&&await i}return o}}n(Do,"useAsyncMutex");var te=v("network"),Ae={cache:"no-cache",redirect:"follow"};async function Xe(e,t={},r=fetch){try{let o=await r(e,t);if(o.status<400)return o;try{te.warn(`Fetch of ${e} with ${t} returned status=${o.status}`),te.warn(`Response: ${await o.text()}`)}catch(i){te.error("Exception:",i)}}catch(o){te.error("fetchBasic",o)}}n(Xe,"fetchBasic");async function Uo(e,t={},r=fetch){try{let o=await Xe(e,U(ie(U({method:"GET"},Ae),{headers:{}}),t),r);if(o)return await o.json()}catch(o){te.error("fetchJSON error:",o)}}n(Uo,"fetchJson");function Oo(e,t="POST"){return ie(U({method:t},Ae),{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:_e(e)})}n(Oo,"fetchOptionsFormURLEncoded");function $o(e,t="POST"){return ie(U({method:t},Ae),{headers:{"Content-Type":"application/json; charset=utf-8",Accept:"application/json"},body:JSON.stringify(e)})}n($o,"fetchOptionsJson");async function Ro(e,t={},r=fetch){try{let o=await Xe(e,U(ie(U({method:"GET"},Ae),{headers:{}}),t),r);if(o)return await o.text()}catch(o){te.error("fetchHTML error:",o)}}n(Ro,"fetchText");function et(){if(typeof window!="undefined")return window}n(et,"getWindow");function Zt(){if(typeof navigator!="undefined")return navigator}n(Zt,"getNavigator");function Ho(){var e;return((e=et())!=null?e:typeof WorkerGlobalScope!="undefined")?self:typeof global!="undefined"?global:Function("return this;")()}n(Ho,"getGlobal");var A=Zt(),k=et();function Vt(e={ios:!1,macos:!1,windows:!1,beaker:!1,electron:!1,wkwebview:!1,pwa:!1,pwaInstalled:!1,browser:!1,node:!1,worker:!1,jest:!1,macosNative:!1,iosNative:!1,appleNative:!1,touch:!1}){var t,r,o,i,s,c,a,u,m;return e.ios=((t=A==null?void 0:A.platform)==null?void 0:t.match(/(iPhone|iPod|iPad)/i))!=null,e.macos=!!((r=A==null?void 0:A.platform)==null?void 0:r.startsWith("Mac")),e.windows=!!((o=A==null?void 0:A.platform)==null?void 0:o.startsWith("Win")),e.beaker=(k==null?void 0:k.beaker)!=null,e.electron=(((s=(i=A==null?void 0:A.userAgent)==null?void 0:i.toLowerCase())==null?void 0:s.indexOf(" electron/"))||-1)>-1&&!e.beaker,e.wkwebview=((c=k==null?void 0:k.webkit)==null?void 0:c.messageHandlers)!=null,e.pwa=(A==null?void 0:A.serviceWorker)!=null,e.pwaInstalled=(A==null?void 0:A.standalone)||((u=(a=k==null?void 0:k.matchMedia)==null?void 0:a.call(k,"(display-mode: standalone)"))==null?void 0:u.matches),e.node=typeof process!="undefined"&&((m=process==null?void 0:process.release)==null?void 0:m.name)==="node",e.browser=!e.electron&&!e.wkwebview&&!e.node,e.worker=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope,e.jest=typeof jest!="undefined",e.macosNative=e.wkwebview&&e.macos,e.iosNative=e.wkwebview&&e.ios,e.appleNative=e.wkwebview,e.touch=k&&"ontouchstart"in k||((A==null?void 0:A.maxTouchPoints)||0)>1||(A==null?void 0:A.msPointerEnabled)&&(k==null?void 0:k.MSGesture)||(k==null?void 0:k.DocumentTouch)&&document instanceof DocumentTouch,e}n(Vt,"detect");var Fe=n(()=>typeof window!="undefined"&&globalThis===window,"isBrowser"),Bo=Vt();function No(e){Fe()?window.addEventListener("beforeunload",e):typeof process!="undefined"&&process.on("exit",()=>e)}n(No,"useExitHandler");function jo(e={}){let{maxParallel:t=3}=e,r=0,o=0,i={};function s(){if(r>=t)return;let a=Object.values(i).filter(u=>!u.running);if(a.length>0){let u;for(let m of a)(u==null||m.priority<u.priority)&&(u=m);u&&(u.running=!0,++r,u.task().then(m=>{(u==null?void 0:u.id)&&delete i[u.id],--r,s()}).catch(m=>{(u==null?void 0:u.id)&&delete i[u.id],--r,s()}))}}n(s,"performNext");function c(a){let u=i[a];u&&u.running!==!0&&delete i[a]}return n(c,"cancel"),{cancel:c,enqueue(a,u){return i[a]==null&&(i[a]={id:a,task:u,priority:++o,running:!1},s()),()=>c(a)}}}n(jo,"usePool");var zo=v("zeed:queue"),tt=class{constructor(t={}){this.queue=[];this.isPaused=!1;this.waitToFinish=[];let{name:r=z("queue"),logLevel:o}=t;this.name=r,this.log=v(`zeed:queue:${r}`),this.log.level=o!=null?o:P.off}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.isPaused){this.log("performNext => skip while is paused");return}for(;this.currentTask==null&&!this.isPaused;){let t=this.queue.shift();if(this.log(`performNext => ${t==null?void 0:t.name}`),t==null)break;let{name:r,task:o,resolve:i}=t;this.currentTask=o();let s;try{this.log.info(`start task ${r}`),s=await this.currentTask,this.log(`finished task ${r} with result =`,s)}catch(c){zo.warn("Error performing task",c)}i(s),this.currentTask=void 0}for(;this.waitToFinish.length>0;)this.waitToFinish.shift()()}async enqueue(t,r={}){let{immediate:o=!1,name:i=z(this.name)}=r;return o?(this.log.info(`immediate execution ${i}`),await t()):(this.log(`enqueue ${i}`),new Promise(s=>{this.queue.push({name:i,task:t,resolve:s}),this.performNext()}))}async enqueueReentrant(t,r={}){return this.enqueue(t,{immediate:this.currentTask!=null,name:r.name})}async cancelAll(t=!0){this.log("cancelAll");let r=this.queue.map(o=>o.resolve);this.queue=[],r.forEach(o=>o(void 0)),await this.wait()}async pause(){this.log("pause"),this.isPaused=!0,await this.wait()}resume(){this.log("resume"),this.isPaused=!1,this.performNext()}async wait(){if(this.log("wait"),!(this.currentTask==null&&(this.queue.length===0||this.isPaused)))return new Promise(t=>{this.waitToFinish.push(t)})}};n(tt,"SerialQueue");var xa=v("zeed:memstorage"),rt=class{constructor(t={}){this.store={}}setItem(t,r){this.store[t]=Ce(r)}getItem(t){if(this.store.hasOwnProperty(t))return Ce(this.store[t])}removeItem(t){delete this.store[t]}clear(){this.store={}}allKeys(){return Object.keys(this.store)}};n(rt,"MemStorage");var re=!1,ne=re?v("zeed:throttle"):()=>{};function qo(e,t={}){let{delay:r=100,trailing:o=!0,leading:i=!0}=t,s=0,c=0,a=0,u=Date.now();function m(){s&&(clearTimeout(s),s=void 0)}n(m,"clearExistingTimeout");function y(...h){let T=Date.now(),C=this,w=T-c;function E(){let b=Date.now();return`total ${(b-u).toFixed(1)}ms - elapsed ${(b-c).toFixed(1)}ms - visited ${a}x`}n(E,"debugElapsed");function L(){a=0,c=Date.now(),e.apply(C,h)}if(n(L,"exec"),w>r||!s){re&&ne("elapsed",E()),i&&(w>r?(re&&ne("\u{1F680} leading",E()),L()):++a);let b=w>r?r:r-w;ne(`\u23F1 start timeout with ${b.toFixed(1)}ms}`,E()),m(),c=T,s=setTimeout(()=>{re&&ne("\u23F1 reached timeout",E()),s=0,o&&(!i||a>0)&&(re&&ne("\u{1F680} trailing",E()),L())},b)}else++a,re&&ne("visited",E())}return n(y,"wrapper"),y.cancel=m,y.dispose=m,y}n(qo,"throttle");function Go(e,t={}){let{delay:r=100}=t,o=0;function i(){o&&(clearTimeout(o),o=0)}n(i,"clearExistingTimeout");function s(...c){let a=this;i(),o=setTimeout(()=>{o=0,e.apply(a,c)},r)}return n(s,"wrapper"),s.cancel=i,s.dispose=i,s}n(Go,"debounce");var{error:Jo}=v("zeed:base64");function Wo(e){try{let t="=".repeat((4-e.length%4)%4),r=(e+t).replace(/-/g,"+").replace(/_/g,"/"),o=window.atob(r),i=new Uint8Array(o.length);for(let s=0;s<o.length;++s)i[s]=o.charCodeAt(s);return i}catch(t){Jo(t,e)}}n(Wo,"urlBase64ToUint8Array");var _o=v("zeed:gravatar");function Zo(e,t){function r(b,p){var f=b[0],l=b[1],d=b[2],g=b[3];f=i(f,l,d,g,p[0],7,-680876936),g=i(g,f,l,d,p[1],12,-389564586),d=i(d,g,f,l,p[2],17,606105819),l=i(l,d,g,f,p[3],22,-1044525330),f=i(f,l,d,g,p[4],7,-176418897),g=i(g,f,l,d,p[5],12,1200080426),d=i(d,g,f,l,p[6],17,-1473231341),l=i(l,d,g,f,p[7],22,-45705983),f=i(f,l,d,g,p[8],7,1770035416),g=i(g,f,l,d,p[9],12,-1958414417),d=i(d,g,f,l,p[10],17,-42063),l=i(l,d,g,f,p[11],22,-1990404162),f=i(f,l,d,g,p[12],7,1804603682),g=i(g,f,l,d,p[13],12,-40341101),d=i(d,g,f,l,p[14],17,-1502002290),l=i(l,d,g,f,p[15],22,1236535329),f=s(f,l,d,g,p[1],5,-165796510),g=s(g,f,l,d,p[6],9,-1069501632),d=s(d,g,f,l,p[11],14,643717713),l=s(l,d,g,f,p[0],20,-373897302),f=s(f,l,d,g,p[5],5,-701558691),g=s(g,f,l,d,p[10],9,38016083),d=s(d,g,f,l,p[15],14,-660478335),l=s(l,d,g,f,p[4],20,-405537848),f=s(f,l,d,g,p[9],5,568446438),g=s(g,f,l,d,p[14],9,-1019803690),d=s(d,g,f,l,p[3],14,-187363961),l=s(l,d,g,f,p[8],20,1163531501),f=s(f,l,d,g,p[13],5,-1444681467),g=s(g,f,l,d,p[2],9,-51403784),d=s(d,g,f,l,p[7],14,1735328473),l=s(l,d,g,f,p[12],20,-1926607734),f=c(f,l,d,g,p[5],4,-378558),g=c(g,f,l,d,p[8],11,-2022574463),d=c(d,g,f,l,p[11],16,1839030562),l=c(l,d,g,f,p[14],23,-35309556),f=c(f,l,d,g,p[1],4,-1530992060),g=c(g,f,l,d,p[4],11,1272893353),d=c(d,g,f,l,p[7],16,-155497632),l=c(l,d,g,f,p[10],23,-1094730640),f=c(f,l,d,g,p[13],4,681279174),g=c(g,f,l,d,p[0],11,-358537222),d=c(d,g,f,l,p[3],16,-722521979),l=c(l,d,g,f,p[6],23,76029189),f=c(f,l,d,g,p[9],4,-640364487),g=c(g,f,l,d,p[12],11,-421815835),d=c(d,g,f,l,p[15],16,530742520),l=c(l,d,g,f,p[2],23,-995338651),f=a(f,l,d,g,p[0],6,-198630844),g=a(g,f,l,d,p[7],10,1126891415),d=a(d,g,f,l,p[14],15,-1416354905),l=a(l,d,g,f,p[5],21,-57434055),f=a(f,l,d,g,p[12],6,1700485571),g=a(g,f,l,d,p[3],10,-1894986606),d=a(d,g,f,l,p[10],15,-1051523),l=a(l,d,g,f,p[1],21,-2054922799),f=a(f,l,d,g,p[8],6,1873313359),g=a(g,f,l,d,p[15],10,-30611744),d=a(d,g,f,l,p[6],15,-1560198380),l=a(l,d,g,f,p[13],21,1309151649),f=a(f,l,d,g,p[4],6,-145523070),g=a(g,f,l,d,p[11],10,-1120210379),d=a(d,g,f,l,p[2],15,718787259),l=a(l,d,g,f,p[9],21,-343485551),b[0]=C(f,b[0]),b[1]=C(l,b[1]),b[2]=C(d,b[2]),b[3]=C(g,b[3])}n(r,"md5cycle");function o(b,p,f,l,d,g){return p=C(C(p,b),C(l,g)),C(p<<d|p>>>32-d,f)}n(o,"cmn");function i(b,p,f,l,d,g,F){return o(p&f|~p&l,b,p,d,g,F)}n(i,"ff");function s(b,p,f,l,d,g,F){return o(p&l|f&~l,b,p,d,g,F)}n(s,"gg");function c(b,p,f,l,d,g,F){return o(p^f^l,b,p,d,g,F)}n(c,"hh");function a(b,p,f,l,d,g,F){return o(f^(p|~l),b,p,d,g,F)}n(a,"ii");function u(b){var p=b.length,f=[1732584193,-271733879,-1732584194,271733878],l;for(l=64;l<=b.length;l+=64)r(f,m(b.substring(l-64,l)));b=b.substring(l-64);var d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(l=0;l<b.length;l++)d[l>>2]|=b.charCodeAt(l)<<(l%4<<3);if(d[l>>2]|=128<<(l%4<<3),l>55)for(r(f,d),l=0;l<16;l++)d[l]=0;return d[14]=p*8,r(f,d),f}n(u,"md51");function m(b){var p=[],f;for(f=0;f<64;f+=4)p[f>>2]=b.charCodeAt(f)+(b.charCodeAt(f+1)<<8)+(b.charCodeAt(f+2)<<16)+(b.charCodeAt(f+3)<<24);return p}n(m,"md5blk");function y(b){for(var p="",f=0;f<4;f++)p+=w[b>>f*8+4&15]+w[b>>f*8&15];return p}n(y,"rhex");function h(b){for(var p=0;p<b.length;p++)b[p]=y(b[p]);return b.join("")}n(h,"hex");function T(b){return h(u(b))}n(T,"md5");function C(b,p){return b+p&4294967295}n(C,"add32");var w="0123456789abcdef".split(""),t=t||{},E,L=[];return t={size:t.size||"50",rating:t.rating||"g",secure:t.secure||location.protocol==="https:",backup:t.backup||""},e=e.trim().toLowerCase(),E=t.secure?"https://secure.gravatar.com/avatar/":"http://www.gravatar.com/avatar/",t.rating&&L.push("r="+t.rating),t.backup&&L.push("d="+encodeURIComponent(t.backup)),t.size&&L.push("s="+t.size),E+T(e)+"?"+L.join("&")}n(Zo,"gravatar");function Vo(e,t=""){try{return Zo(e,{size:256,backup:"monsterid",secure:!0})}catch{return _o("Gravatar issue: Did not find an image for "+e),t}}n(Vo,"gravatarURLByEmail");var Qt=v("zeed:localstorage"),nt=class{constructor(t){this.pretty=!1;var r,o;Qt.assert(t.name,"name required"),this.name=t.name,this.prefix=`${t.name}$`,this.objectToString=(r=t.objectToString)!=null?r:i=>this.pretty?JSON.stringify(i,null,2):JSON.stringify(i),this.objectFromString=(o=t.objectFromString)!=null?o:i=>{try{return JSON.parse(i)}catch(s){Qt.warn(`LocalStorage parse error '${s}' in`,i)}}}setItem(t,r){let o=this.objectToString(r);localStorage.setItem(`${this.prefix}${t}`,o)}getItem(t){let r=localStorage.getItem(`${this.prefix}${t}`);if(r!=null)return this.objectFromString(r)}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(r=>r.startsWith(this.prefix)).map(r=>r.substr(t))}};n(nt,"LocalStorage");var Kt=["#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 le(){return typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}n(le,"supportsColors");function oe(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return Kt[Math.abs(t)%Kt.length]}n(oe,"selectColor");var Yt='font-family: "JetBrains Mono", Menlo; font-size: 11px;',Xt=`${Yt}`,er=`font-weight: 600; ${Yt}`,tr=le(),rr={},Qo=R();function ot(e={}){let{filter:t=void 0,level:r=void 0,colors:o=!0,levelHelper:i=!1,nameBrackets:s=!0,padding:c=16}=e,a=D(t),u=G(r);return m=>{var E,L;if(!u(m.level)||!a(m.name))return;let y=R(),h=m.name||"",T=rr[h||""];T==null&&(T={color:oe(h)},rr[h]=T);let C=ae(y-Qo),w;switch(c>0&&(h=h.padEnd(16," ")),o&&tr?(w=[`%c${h}%c %s %c+${C}`],w.push(`color:${T.color}; ${er}`),w.push(Xt),w.push((L=(E=m.messages)==null?void 0:E[0])!=null?L:""),w.push(`color:${T.color};`),w.push(...m.messages.slice(1))):w=[h,...m.messages,`+${C}`],m.level){case P.info:e.levelHelper&&(w[0]="I|* "+w[0]),console.info(...w);break;case P.warn:e.levelHelper&&(w[0]="W|** "+w[0]),console.warn(...w);break;case P.error:e.levelHelper&&(w[0]="E|*** "+w[0]),console.error(...w);break;default:e.levelHelper&&(w[0]="D| "+w[0]),console.debug(...w);break}}}n(ot,"LoggerBrowserHandler");function it(e={}){var r,o;let t=(o=(r=e.filter)!=null?r:localStorage.zeed)!=null?o:localStorage.debug;return n(function i(s=""){let c;if(D(t)(s)){let u=[];if(tr){let m=oe(s);u.push(`%c${s.padEnd(16," ")}%c %s`),u.push(`color:${m}; ${er}`),u.push(Xt)}else u.push(`[${s}] %s`);c=console.debug.bind(console,...u),c.debug=console.debug.bind(console,...u),c.info=console.info.bind(console,...u),c.warn=console.warn.bind(console,...u),c.error=console.error.bind(console,...u),c.assert=console.assert.bind(console),c.assertEqual=function(m,y,...h){let T=B(m,y);T||c.assert(T,`Assert did fail. Expected ${y} got ${m}`,y,m,...h)},c.assertNotEqual=function(m,y,...h){let T=B(m,y);T&&c.assert(T,`Assert did fail. Expected ${y} not to be equal with ${m}`,y,m,...h)}}else{let u=n(()=>{},"noop");c=u,c.debug=u,c.info=u,c.warn=u,c.error=u,c.assert=u,c.assertEqual=u,c.assertNotEqual=u}return c.extend=u=>i(s?`${s}:${u}`:u),c},"LoggerBrowserDebugFactory")}n(it,"LoggerBrowserSetupDebugFactory");function Ko(e={}){console.info("activateConsoleDebug is activated by default in browsers")}n(Ko,"activateConsoleDebug");var nr={},Yo=R(),Xo=le();function ei(e,t={}){let{filter:r=void 0}=t,o=D(r),i=G(e);return s=>{if(!i(s.level)||!o(s.name))return;let c=R(),a=s.name||"",u=nr[a||""];u==null&&(u={color:oe(a)},nr[a]=u);let m=ae(c-Yo),y;switch(t.colors&&Xo?(y=t.nameBrackets?[`%c[${a}]`]:[`%c${a}`],y.push(`color:${u.color}`),y.push(...s.messages)):y=[a,...s.messages],y.push(`+${m}`),s.level){case P.info:t.levelHelper&&(y[0]="I|* "+y[0]),console.info(...y);break;case P.warn:t.levelHelper&&(y[0]="W|** "+y[0]),console.warn(...y);break;case P.error:t.levelHelper&&(y[0]="E|*** "+y[0]),console.error(...y);break;default:t.levelHelper&&(y[0]="D| "+y[0]),console.debug(...y);break}}}n(ei,"LoggerBrowserClassicHandler");Fe()&&(v.setHandlers([ot()]),v.setFactory(it({})));module.exports=dr(ti);0&&(module.exports={Channel,CryptoEncoder,Currency,DAY_MS,Day,Emitter,JsonEncoder,LocalChannel,LocalStorage,LogLevel,LogLevelAlias,Logger,LoggerBrowserClassicHandler,LoggerBrowserHandler,LoggerBrowserSetupDebugFactory,LoggerConsoleHandler,LoggerContext,MemStorage,PubSub,SerialQueue,Uint8ArrayToJson,Uint8ArrayToString,activateConsoleDebug,arrayEmptyInPlace,arrayFilterInPlace,arrayFlatten,arrayIntersection,arrayIsEqual,arrayMax,arrayMin,arrayMinus,arrayRandomElement,arrayRemoveElement,arraySetElement,arrayShuffle,arrayShuffleForce,arrayShuffleInPlace,arraySorted,arraySortedNumbers,arraySymmetricDifference,arrayToggleInPlace,arrayUnion,arrayUnique,between,cloneJsonObject,cloneObject,cmp,composeOrderby,createArray,createPromiseProxy,csv,currency,day,debounce,decodeBase16,decodeBase32,decodeBase58,decodeBase62,decodeBase64,decrypt,deepEqual,deepMerge,deriveKeyPbkdf2,detect,digest,empty,encodeBase16,encodeBase32,encodeBase58,encodeBase62,encodeBase64,encodeQuery,encrypt,endSortWeight,equalBinary,escapeHTML,escapeRegExp,fakeWorkerPair,fetchBasic,fetchJson,fetchOptionsFormURLEncoded,fetchOptionsJson,fetchText,fixBrokenUth8String,forEachDay,formatMessages,formatMilliseconds,fromCamelCase,getGlobal,getGlobalContext,getGlobalEmitter,getNamespaceFilterString,getNavigator,getTimestamp,getWindow,gravatarURLByEmail,immediate,isArray,isBoolean,isBrowser,isEven,isHalf,isInteger,isLocalHost,isNullOrUndefined,isNumber,isObject,isPrimitive,isPromise,isRecord,isSafeInteger,isString,isTimeout,jsonStringify,jsonToUint8Array,last,lazyListener,linkifyPlainText,messages,moveSortWeight,parseDate,parseOrderby,parseQuery,platform,promisify,qid,randomBoolean,randomFloat,randomInt,randomUint8Array,renderMessages,roundDown,roundHalfAwayFromZero,roundHalfDown,roundHalfEven,roundHalfOdd,roundHalfTowardsZero,roundHalfUp,roundUp,selectColor,size,sleep,sortedItems,sortedOrderby,startSortWeight,stringToBoolean,stringToFloat,stringToInteger,stringToUInt8Array,suid,suidBytes,suidBytesDate,suidDate,supportsColors,throttle,timeout,timeoutReached,timoutError,toBase64,toBase64Url,toBool,toCamelCase,toCapitalize,toCapitalizeWords,toFloat,toHex,toHumanReadableUrl,toInt,toString,toUint8Array,toValidFilename,today,tryTimeout,uname,unescapeHTML,urlBase64ToUint8Array,useAsyncMutex,useBase,useDefer,useDispose,useDisposer,useEventListener,useExitHandler,useInterval,useLevelFilter,useMessageHub,useMutex,useNamespaceFilter,usePool,usePubSub,useTimeout,uuid,uuidB32,uuidBytes,uuidv4,valueToBoolean,valueToFloat,valueToInteger,valueToString,waitOn});
1
+ var oe=Object.defineProperty,rr=Object.defineProperties,nr=Object.getOwnPropertyDescriptor,or=Object.getOwnPropertyDescriptors,ir=Object.getOwnPropertyNames,st=Object.getOwnPropertySymbols;var at=Object.prototype.hasOwnProperty,sr=Object.prototype.propertyIsEnumerable;var ut=(e,t,r)=>t in e?oe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,U=(e,t)=>{for(var r in t||(t={}))at.call(t,r)&&ut(e,r,t[r]);if(st)for(var r of st(t))sr.call(t,r)&&ut(e,r,t[r]);return e},ie=(e,t)=>rr(e,or(t)),ar=e=>oe(e,"__esModule",{value:!0}),n=(e,t)=>oe(e,"name",{value:t,configurable:!0});var ur=(e,t)=>{for(var r in t)oe(e,r,{get:t[r],enumerable:!0})},lr=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of ir(t))!at.call(e,i)&&(r||i!=="default")&&oe(e,i,{get:()=>t[i],enumerable:!(o=nr(t,i))||o.enumerable});return e};var cr=(e=>(t,r)=>e&&e.get(t)||(r=lr(ar({}),t,1),e&&e.set(t,r),r))(typeof WeakMap!="undefined"?new WeakMap:0);var ei={};ur(ei,{Channel:()=>ve,CryptoEncoder:()=>Ke,Currency:()=>$,DAY_MS:()=>qe,Day:()=>M,Emitter:()=>H,JsonEncoder:()=>W,LocalChannel:()=>ue,LocalStorage:()=>nt,LogLevel:()=>P,LogLevelAlias:()=>ke,Logger:()=>v,LoggerBrowserClassicHandler:()=>Xo,LoggerBrowserHandler:()=>ot,LoggerBrowserSetupDebugFactory:()=>it,LoggerConsoleHandler:()=>se,LoggerContext:()=>Pe,MemStorage:()=>rt,PubSub:()=>Ae,SerialQueue:()=>tt,Uint8ArrayToJson:()=>ge,Uint8ArrayToString:()=>xt,activateConsoleDebug:()=>Qo,arrayEmptyInPlace:()=>Rr,arrayFilterInPlace:()=>be,arrayFlatten:()=>Q,arrayIntersection:()=>Et,arrayIsEqual:()=>Mt,arrayMax:()=>zr,arrayMin:()=>qr,arrayMinus:()=>vt,arrayRandomElement:()=>jr,arrayRemoveElement:()=>Ur,arraySetElement:()=>Or,arrayShuffle:()=>Br,arrayShuffleForce:()=>Nr,arrayShuffleInPlace:()=>Re,arraySorted:()=>Ft,arraySortedNumbers:()=>Hr,arraySymmetricDifference:()=>Dr,arrayToggleInPlace:()=>$r,arrayUnion:()=>At,arrayUnique:()=>he,between:()=>zn,cloneJsonObject:()=>no,cloneObject:()=>Ce,cmp:()=>ye,composeOrderby:()=>Sr,createArray:()=>Gr,createPromiseProxy:()=>Ye,csv:()=>Pr,currency:()=>N,day:()=>Rn,debounce:()=>qo,decodeBase16:()=>Zr,decodeBase32:()=>Qr,decodeBase58:()=>Yr,decodeBase62:()=>en,decodeBase64:()=>rn,decrypt:()=>$e,deepEqual:()=>B,deepMerge:()=>ct,deriveKeyPbkdf2:()=>Ar,detect:()=>_t,digest:()=>vr,empty:()=>ro,encodeBase16:()=>_r,encodeBase32:()=>Vr,encodeBase58:()=>Kr,encodeBase62:()=>Xr,encodeBase64:()=>tn,encodeQuery:()=>_e,encrypt:()=>Oe,endSortWeight:()=>We,equalBinary:()=>De,escapeHTML:()=>Ge,escapeRegExp:()=>Vn,fakeWorkerPair:()=>Mo,fetchBasic:()=>Xe,fetchJson:()=>Do,fetchOptionsFormURLEncoded:()=>Uo,fetchOptionsJson:()=>Oo,fetchText:()=>$o,fixBrokenUth8String:()=>yn,forEachDay:()=>On,formatMessages:()=>Ut,formatMilliseconds:()=>ae,fromCamelCase:()=>sn,getGlobal:()=>Ro,getGlobalContext:()=>Z,getGlobalEmitter:()=>Ao,getNamespaceFilterString:()=>ft,getNavigator:()=>Wt,getTimestamp:()=>R,getWindow:()=>et,gravatarURLByEmail:()=>Zo,immediate:()=>Sn,isArray:()=>lt,isBoolean:()=>yr,isBrowser:()=>Fe,isEven:()=>Be,isHalf:()=>K,isInteger:()=>gr,isLocalHost:()=>co,isNullOrUndefined:()=>hr,isNumber:()=>dr,isObject:()=>_,isPrimitive:()=>Me,isPromise:()=>I,isRecord:()=>fr,isSafeInteger:()=>mr,isString:()=>pr,isTimeout:()=>Dn,jsonStringify:()=>xe,jsonToUint8Array:()=>de,last:()=>to,lazyListener:()=>Fo,linkifyPlainText:()=>Yn,messages:()=>Eo,moveSortWeight:()=>Qn,parseDate:()=>fo,parseOrderby:()=>Ct,parseQuery:()=>Xn,platform:()=>Ho,promisify:()=>j,qid:()=>xo,randomBoolean:()=>Bn,randomFloat:()=>jn,randomInt:()=>Nn,randomUint8Array:()=>J,renderMessages:()=>mn,roundDown:()=>Cn,roundHalfAwayFromZero:()=>En,roundHalfDown:()=>Fn,roundHalfEven:()=>Mn,roundHalfOdd:()=>An,roundHalfTowardsZero:()=>kn,roundHalfUp:()=>vn,roundUp:()=>Ln,selectColor:()=>ne,size:()=>eo,sleep:()=>Pn,sortedItems:()=>Bt,sortedOrderby:()=>Ir,startSortWeight:()=>Je,stringToBoolean:()=>un,stringToFloat:()=>cn,stringToInteger:()=>ln,stringToUInt8Array:()=>Ie,suid:()=>Co,suidBytes:()=>Gt,suidBytesDate:()=>Jt,suidDate:()=>vo,supportsColors:()=>le,throttle:()=>zo,timeout:()=>In,timeoutReached:()=>Ne,timoutError:()=>je,toBase64:()=>Lr,toBase64Url:()=>Cr,toBool:()=>gn,toCamelCase:()=>nn,toCapitalize:()=>kt,toCapitalizeWords:()=>on,toFloat:()=>fn,toHex:()=>Tr,toHumanReadableUrl:()=>Nt,toInt:()=>pn,toString:()=>dn,toUint8Array:()=>S,toValidFilename:()=>_n,today:()=>$n,tryTimeout:()=>ze,uname:()=>z,unescapeHTML:()=>Hn,urlBase64ToUint8Array:()=>Jo,useAsyncMutex:()=>Io,useBase:()=>O,useDefer:()=>so,useDispose:()=>jt,useDisposer:()=>io,useEventListener:()=>lo,useExitHandler:()=>Bo,useInterval:()=>uo,useLevelFilter:()=>G,useMessageHub:()=>ko,useMutex:()=>So,useNamespaceFilter:()=>D,usePool:()=>No,usePubSub:()=>Po,useTimeout:()=>ao,uuid:()=>Y,uuid32bit:()=>go,uuidB32:()=>ho,uuidBytes:()=>Ve,uuidDecode:()=>yo,uuidEncode:()=>mo,uuidv4:()=>To,valueToBoolean:()=>St,valueToFloat:()=>Dt,valueToInteger:()=>It,valueToString:()=>we,waitOn:()=>Un});function _(e){return e!=null&&typeof e=="object"}n(_,"isObject");function Me(e){return Object(e)!==e}n(Me,"isPrimitive");function lt(e){return Array.isArray(e)}n(lt,"isArray");function fr(e){return _(e)&&!lt(e)}n(fr,"isRecord");function pr(e){return typeof e=="string"}n(pr,"isString");function dr(e){return typeof e=="number"}n(dr,"isNumber");function gr(e){return typeof e=="number"&&Number.isInteger(e)}n(gr,"isInteger");function mr(e){return typeof e=="number"&&Number.isSafeInteger(e)}n(mr,"isSafeInteger");function yr(e){return typeof e=="boolean"}n(yr,"isBoolean");function hr(e){return e==null}n(hr,"isNullOrUndefined");function B(e,t,r=new WeakSet){if(e===t||r.has(t))return!0;if(Me(t)||r.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(!B(i,s,r))return!1}for(let o in t)if(t.hasOwnProperty(o)&&!e.hasOwnProperty(o))return!1;return!0}n(B,"deepEqual");function ct(e,...t){for(let r of t)_(e)||(e={}),r!=null&&Object.keys(r).forEach(o=>{let i=e[o],s=r[o];Array.isArray(i)&&Array.isArray(s)?e[o]=i.concat(s):_(i)&&_(s)?e[o]=ct(Object.assign({},i),s):e[o]=s});return e}n(ct,"deepMerge");function ft(e){return e===!0||e==="true"||e==="1"||typeof e=="number"&&e!==0?e="*":e===!1||e==="false"||e===0||e==="0"||e==null||e==="null"||e==="undefined"?e="":e=String(e),e}n(ft,"getNamespaceFilterString");var pt,dt,br=ft(typeof process!="undefined"?(pt=process.env.ZEED)!=null?pt:process.env.DEBUG:typeof localStorage!="undefined"?(dt=localStorage.zeed)!=null?dt:localStorage.debug:"*");function D(e=br){let t,r=[],o=[];if(!e)t=n(function(i){return!1},"fn");else if(e==="*")t=n(function(i){return!0},"fn");else{let i,s=e.split(/[\s,]+/),c=s.length;for(i=0;i<c;i++){if(!s[i])continue;let a=s[i].replace(/\*/g,".*?");a[0]==="-"?r.push(new RegExp("^"+a.substr(1)+"$")):o.push(new RegExp("^"+a+"$"))}t=n(function(a){if(r.length===0&&o.length===0)return!0;let u,m;for(u=0,m=r.length;u<m;u++)if(r[u].test(a))return!1;for(u=0,m=o.length;u<m;u++)if(o[u].test(a))return!0;return!1},"fn")}return t.accept=o,t.reject=r,t.filter=e,t}n(D,"useNamespaceFilter");var gt,mt,yt,ht,xr=typeof process!="undefined"?(mt=(gt=process.env.ZEED_LEVEL)!=null?gt:process.env.LEVEL)!=null?mt:process.env.DEBUG_LEVEL:typeof localStorage!="undefined"?(ht=(yt=localStorage.zeed_level)!=null?yt:localStorage.level)!=null?ht:localStorage.debug_level:void 0;function G(e=xr){let t=-1;if(typeof e=="string"){let r=ke[e.toLocaleLowerCase().trim()];r!=null&&(t=r)}else typeof e=="number"&&(t=e);return r=>r>=t}n(G,"useLevelFilter");var P=(a=>(a[a.all=-1]="all",a[a.debug=0]="debug",a[a.info=1]="info",a[a.warn=2]="warn",a[a.error=3]="error",a[a.fatal=4]="fatal",a[a.off=1/0]="off",a))(P||{}),ke={"*":-1,a:-1,all:-1,d:0,dbg:0,debug:0,i:1,inf:1,info:1,w:2,warn:2,warning:2,e:3,err:3,error:3,fatal:4,off:1/0,"-":1/0};function Pe(e=""){let t=[se()],r=2,o=n(u=>!0,"logCheckNamespace"),i=!1,s=c;function c(u=""){y.extend=function(h){return s(u?`${u}:${h}`:h)};let m=n(h=>{if(y.active===!0&&h.level>=a.level&&h.level>=y.level&&o(u))for(let T of t)T&&T(h)},"emit");function y(...h){m({name:u,messages:h,level:0})}return n(y,"log"),y.active=!0,y.level=-1,y.debug=function(...h){m({name:u,messages:h,level:0})},y.info=function(...h){m({name:u,messages:h,level:1})},y.warn=function(...h){m({name:u,messages:h,level:2})},y.error=function(...h){m({name:u,messages:h,level:3})},y.assert=function(h,...T){h||(typeof console!==void 0&&(console.assert?console.assert(h,...T):console.error(`Assert did fail with: ${h}`,...T)),m({name:u,messages:T||[`Assert did fail with: ${h}`],level:r}))},y.assertEqual=function(h,T,...C){let w=B(h,T);w||y.assert(w,`Assert did fail. Expected ${T} got ${h}`,T,h,...C)},y.assertNotEqual=function(h,T,...C){let w=B(h,T);w&&y.assert(w,`Assert did fail. Expected ${T} not to be equal with ${h}`,T,h,...C)},y}n(c,"LoggerBaseFactory");function a(u=""){return s(u)}return n(a,"Logger"),a.registerHandler=function(u){t.push(u)},a.setFilter=function(u){o=D(u)},a.setLock=(u=!0)=>i=u,a.setHandlers=function(u=[]){s!==c&&(s=c),!i&&(t=[...u].filter(m=>typeof m=="function"))},a.level=-1,a.setLogLevel=function(u=-1){i||(a.level=u)},a.setFactory=function(u){i||(s=u)},a}n(Pe,"LoggerContext");function se(e={}){let{level:t=void 0,filter:r=void 0,colors:o=!0,levelHelper:i=!1,nameBrackets:s=!0,padding:c=16}=e,a=D(r),u=G(t);return m=>{if(!u(m.level)||!a(m.name))return;let y=m.name?`[${m.name}]`:"";switch(m.level){case 1:console.info(`I|* ${y}`,...m.messages);break;case 2:console.warn(`W|** ${y}`,...m.messages);break;case 3:console.error(`E|*** ${y}`,...m.messages);break;default:console.debug(`D| ${y}`,...m.messages);break}}}n(se,"LoggerConsoleHandler");function wr(){if(typeof self!="undefined")return self;if(typeof window!="undefined")return window;if(typeof global!="undefined")return global;if(typeof globalThis!="undefined")return globalThis;throw new Error("unable to locate global object")}n(wr,"_global");function Z(){let e=wr();return e._zeedGlobal==null&&(e._zeedGlobal={}),e._zeedGlobal}n(Z,"getGlobalContext");var V;function Se(){let e=Pe();return e.setHandlers([se()]),e}n(Se,"getLoggerContext");try{let e=Z();e!=null?(e==null?void 0:e.logger)==null?(V=Se(),e.logger=V):V=e.logger:V=Se()}catch{V=Se()}var v=V;var bt=v("bin"),fe;function Ie(e){return typeof TextEncoder=="undefined"?new Uint8Array:(fe!=null?fe:fe=new TextEncoder).encode(e.normalize("NFC"))}n(Ie,"stringToUInt8Array");var pe;function xt(e){return typeof TextDecoder=="undefined"?"":(pe!=null?pe:pe=new TextDecoder("utf-8",{ignoreBOM:!0})).decode(e).normalize("NFC")}n(xt,"Uint8ArrayToString");function S(e){return e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?Ie(e):e.length?new Uint8Array(e):e}n(S,"toUint8Array");function Tr(e){if(typeof Buffer!="undefined")return Buffer.from(S(e)).toString("hex");let t="0123456789abcdef",r="";for(let o of[...S(e)])r+=t[o>>4]+t[o&15];return r}n(Tr,"toHex");function Lr(e){let t=S(e);if(typeof Buffer!="undefined")return Buffer.from(t).toString("base64");let r="";for(let o=0;o<t.byteLength;o++)r+=String.fromCharCode(t[o]);return btoa(r)}n(Lr,"toBase64");function Cr(e){let t=S(e);if(typeof Buffer!="undefined")return Buffer.from(t).toString("base64url");let r="";for(let o=0;o<t.byteLength;o++)r+=String.fromCharCode(t[o]);return btoa(r).replace(/\+/g,"-").replace(/\//g,"_")}n(Cr,"toBase64Url");function De(e,t){if(e.byteLength!==t.byteLength)return!1;let r=S(e),o=S(t);for(let i=0;i<r.length;i++)if(r[i]!==o[i])return!1;return!0}n(De,"equalBinary");function de(e){try{return Ie(JSON.stringify(e))}catch(t){throw bt.warn("jsonToUint8Array",e),t}}n(de,"jsonToUint8Array");function ge(e){try{return JSON.parse(xt(e))}catch(t){throw bt.warn("Uint8ArrayToJson",e),t}}n(ge,"Uint8ArrayToJson");function J(e=16){let t=new Uint8Array(e);if(typeof crypto!="undefined"&&crypto.getRandomValues)crypto.getRandomValues(t);else for(let r=0;r<e;r++)t[r]=Math.floor(Math.random()*256);return t}n(J,"randomUint8Array");var wt="SHA-256",Ue="AES-GCM",Tt="PBKDF2";async function vr(e,t=wt){return S(await crypto.subtle.digest(t,S(e)))}n(vr,"digest");async function Ar(e,t={}){var i;let r=S(e),o=await crypto.subtle.importKey("raw",r,Tt,!1,["deriveKey"]);return await crypto.subtle.deriveKey({name:Tt,salt:t.salt?S(t.salt):new Uint8Array(0),iterations:(i=t.iterations)!=null?i:1e5,hash:wt},o,{name:Ue,length:256},!0,["encrypt","decrypt"])}n(Ar,"deriveKeyPbkdf2");var me=new Uint8Array([1,1]);async function Oe(e,t){let r=J(12),o=await crypto.subtle.encrypt({name:Ue,iv:r},t,e),i=new Uint8Array(o),s=me.length+r.length+i.length,c=new Uint8Array(s),a=0;return c.set(me,a),a+=me.length,c.set(r,a),a+=r.length,c.set(i,a),c}n(Oe,"encrypt");async function $e(e,t){let r=e.subarray(0,2);if(!De(r,me))return Promise.reject(`Unknown magic ${r}`);let o=e.subarray(2,2+12),i=e.subarray(2+12,e.length),s=await crypto.subtle.decrypt({name:Ue,iv:o},t,i);return new Uint8Array(s)}n($e,"decrypt");var Lt=",",Er=!1,Fr=!0;function Mr(e){return/^([-+])?([0-9]+(\.[0-9]+)?|Infinity)$/.test(e)?Number(e):NaN}n(Mr,"filterFloat");function kr(e){return Fr&&e==null?"":Er?'="'+String(e).replace(/"/g,'""')+'"':!isNaN(Mr(e))&&isFinite(e)?parseFloat(e):'"'+String(e).replace(/"/g,'""')+'"'}n(kr,"escape");function Pr(e,t){let r="";t&&(r=t.join(Lt)+`\r
2
+ `);for(let o=0;o<e.length;o++)r+=e[o].map(kr).join(Lt)+`\r
3
+ `;return r}n(Pr,"csv");function Ct(e=""){let[t="",r="asc"]=e.split(" ");return r=r.toLowerCase(),{field:t,orderby:r,asc:r!=="desc",desc:r==="desc"}}n(Ct,"parseOrderby");function Sr(e,t=!0){return`${e} ${t?"asc":"desc"}`}n(Sr,"composeOrderby");function ye(e,t,r=!0){let o=e||0,i=t||0;return o>i?r?1:-1:o<i?r?-1:1:0}n(ye,"cmp");function Ir(e,...t){if(t.length>0){let r=t.map(Ct),o=Array.from(e);return o.sort((i,s)=>{for(let{field:c,asc:a}of r){let u=ye(i[c],s[c],a);if(u!==0)return u}return 0}),o}return e}n(Ir,"sortedOrderby");function he(e){return e.filter((t,r)=>e.indexOf(t)===r)}n(he,"arrayUnique");function vt(e,t){return he(e.filter(r=>!t.includes(r)))}n(vt,"arrayMinus");function At(...e){return he(e.reduce((t=[],r)=>t.concat(r),[]))}n(At,"arrayUnion");function Q(...e){return e.flat(1/0)}n(Q,"arrayFlatten");function Et(e,t){return he(e).filter(r=>t.includes(r))}n(Et,"arrayIntersection");function Dr(e,t){return vt(At(e,t),Et(e,t))}n(Dr,"arraySymmetricDifference");function Ur(e,t){if(e&&Array.isArray(e)){let r;for(;(r=e.indexOf(t))!==-1;)e.splice(r,1);return e}return[]}n(Ur,"arrayRemoveElement");function Or(e,t){return e.includes(t)||e.push(t),e}n(Or,"arraySetElement");function be(e,t){return e.splice(0,e.length,...e.filter(t)),e}n(be,"arrayFilterInPlace");function $r(e,t){let r=e.findIndex(o=>o===t);return r>=0?e.splice(r,1):e.push(t),e}n($r,"arrayToggleInPlace");function Rr(e){return e.splice(0,e.length),e}n(Rr,"arrayEmptyInPlace");function Ft(e,t=ye){return Array.from(e).sort(t)}n(Ft,"arraySorted");function Hr(e){return Ft(e,(t,r)=>t-r)}n(Hr,"arraySortedNumbers");function Mt(e,t){return e.length===t.length&&e.every((r,o)=>r===t[o])}n(Mt,"arrayIsEqual");function Re(e){return e.sort(()=>Math.random()>.5?1:-1),e}n(Re,"arrayShuffleInPlace");function Br(e){return Re(Array.from(e))}n(Br,"arrayShuffle");function Nr(e){for(;e.length>1;){let t=Array.from(e);if(Re(t),!Mt(e,t))return t}return e}n(Nr,"arrayShuffleForce");function jr(e){return e[Math.floor(Math.random()*e.length)]}n(jr,"arrayRandomElement");function zr(...e){return Q(e).reduce((t,r)=>t!=null?r>t?r:t:r,void 0)}n(zr,"arrayMax");function qr(...e){return Q(e).reduce((t,r)=>t!=null?r<t?r:t:r,void 0)}n(qr,"arrayMin");function Gr(e=0,t){if(e<=0)return[];let r=new Array(e);for(let o=0;o<e;o++)r[o]=t instanceof Function?t(o):t;return r}n(Gr,"createArray");var Jr=v("zeed:basex"),Wr={"2":"01","8":"01234567","11":"0123456789a","16":"0123456789abcdef","32":"0123456789ABCDEFGHJKMNPQRSTVWXYZ","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 O(e){let t;if(typeof e=="string")t=e;else if(t=Wr[e.toString()],t==null)throw new Error(`Unknown base ${e}`);if(t.length>=255)throw new TypeError("Alphabet too long");let r=new Uint8Array(256);for(let m=0;m<r.length;m++)r[m]=255;for(let m=0;m<t.length;m++){let y=t.charAt(m),h=y.charCodeAt(0);if(r[h]!==255)throw new TypeError(y+" is ambiguous");r[h]=m}let o=t.length,i=t.charAt(0),s=Math.log(o)/Math.log(256),c=Math.log(256)/Math.log(o);function a(m,y=-1){let h=S(m);if(h.byteLength===0)return"";let T=0,C=0,w=h.byteLength;for(;C!==w&&h[C]===0;)C++;let A=(w-C)*c+1>>>0,L=new Uint8Array(A);for(;C!==w;){let f=h[C],l=0;for(let d=A-1;(f!==0||l<T)&&d!==-1;d--,l++)f+=256*L[d]>>>0,L[d]=f%o>>>0,f=f/o>>>0;if(f!==0)throw Jr.warn("Non-zero carry",h,y,l,A),new Error("Non-zero carry");T=l,C++}let b=A-T;for(;b!==A&&L[b]===0;)b++;let p="";for(;b<A;++b)p+=t.charAt(L[b]);return y>0?p.padStart(y,i):p}n(a,"encode");function u(m,y=-1){if(typeof m!="string")throw new TypeError("Expected String");if(m.length===0)return new Uint8Array;m=m.replace(/\s+/gi,"");let h=0,T=0;for(;m[h]===i;)h++;let C=(m.length-h)*s+1>>>0,w=new Uint8Array(C);for(;m[h];){let L=r[m.charCodeAt(h)];if(L===255)throw new Error(`Unsupported character "${m[h]}"`);let b=0;for(let p=C-1;(L!==0||b<T)&&p!==-1;p--,b++)L+=o*w[p]>>>0,w[p]=L%256>>>0,L=L/256>>>0;if(L!==0)throw new Error("Non-zero carry");T=b,h++}let A=C-T;for(;A!==C&&w[A]===0;)A++;return y>0?new Uint8Array([...new Uint8Array(y-w.length+A),...w.slice(A)]):w.slice(A)}return n(u,"decode"),{encode:a,decode:u}}n(O,"useBase");var{encode:_r,decode:Zr}=O(16),{encode:Vr,decode:Qr}=O(32),{encode:Kr,decode:Yr}=O(58),{encode:Xr,decode:en}=O(62),{encode:tn,decode:rn}=O(62);var nn=n(e=>(e.length>0&&(/^[A-Z0-9_\-\ ]*$/g.test(e)&&(e=e.toLowerCase()),e=e.replace(/^[-_\ ]+/gi,"").replace(/[-_\ ]+$/gi,"").replace(/[-_\ ]+([a-z0-9])/gi,(t,r)=>r.toUpperCase()),e=e[0].toLowerCase()+e.substring(1)),e),"toCamelCase");function kt(e){return e.charAt(0).toUpperCase()+e.toLowerCase().slice(1)}n(kt,"toCapitalize");function on(e){return e.replace(/\w\S*/g,kt)}n(on,"toCapitalizeWords");function sn(e,t="-"){return t=typeof t=="undefined"?"_":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()}n(sn,"fromCamelCase");function an(e,t){var r=[],o=[];return t==null&&(t=n(function(i,s){return r[0]===s?"[Circular ~]":"[Circular ~."+o.slice(0,r.indexOf(s)).join(".")+"]"},"cycleReplacer")),function(i,s){if(r.length>0){var c=r.indexOf(this);~c?r.splice(c+1):r.push(this),~c?o.splice(c,1/0,i):o.push(i),~r.indexOf(s)&&(s=t==null?void 0:t.call(this,i,s))}else r.push(s);return e==null?s:e.call(this,i,s)}}n(an,"serializer");function xe(e,t,r,o){return JSON.stringify(e,an(t,o),r)}n(xe,"jsonStringify");var Pt=["1","true","yes","y","on"];function un(e,t=!1){return e==null||typeof e!="string"?t:Pt.includes(String(e).trim().toLowerCase())}n(un,"stringToBoolean");function ln(e,t=0){var r;return e==null||typeof e!="string"?t:(r=parseInt(e.trim(),10))!=null?r:t}n(ln,"stringToInteger");function cn(e,t=0){var r;return e==null||typeof e!="string"?t:(r=parseFloat(e.trim()))!=null?r:t}n(cn,"stringToFloat");function St(e,t=!1){return e==null?t:typeof e=="boolean"?e:typeof e=="number"?e!==0:Pt.includes(String(e).trim().toLowerCase())}n(St,"valueToBoolean");function It(e,t=0){var r;return e==null?t:typeof e=="boolean"?e?1:0:typeof e=="number"?Math.floor(e):(r=parseInt(String(e).trim(),10))!=null?r:t}n(It,"valueToInteger");function Dt(e,t=0){var r;return e==null?t:typeof e=="boolean"?e?1:0:typeof e=="number"?Math.floor(e):(r=parseFloat(String(e).trim()))!=null?r:t}n(Dt,"valueToFloat");function we(e,t=""){var r;return e==null?t:(r=String(e))!=null?r:t}n(we,"valueToString");var fn=Dt,pn=It,dn=we,gn=St;function Ut(e,t={}){let{trace:r=!0,pretty:o=!0}=t;return e.map(i=>i&&typeof i=="object"?i instanceof Error?r?`${i.name||"Error"}: ${i.message}
4
+ ${i.stack}`:`${i.name||"Error"}: ${i.message}`:o?xe(i,null,2):xe(i):String(i))}n(Ut,"formatMessages");function mn(e,t={}){return Ut(e,t).join(" ")}n(mn,"renderMessages");function yn(e){try{return decodeURIComponent(escape(e))}catch{}return e}n(yn,"fixBrokenUth8String");var hn={symbol:"$",separator:",",decimal:".",errorOnInvalid:!1,precision:2,pattern:"!#",negativePattern:"-!#",format:Tn,fromCents:!1},Ot=n(e=>Math.round(e),"round"),He=n(e=>Math.pow(10,e),"pow"),bn=n((e,t)=>Ot(e/t)*t,"rounding"),xn=/(\d)(?=(\d{3})+\b)/g,wn=/(\d)(?=(\d\d)+\d\b)/g;function N(e,t={}){return new $(e,t)}n(N,"currency");var Le=class{constructor(t,r={}){var c;let o=Object.assign({},hn,r),i=He((c=o.precision)!=null?c:2),s=Te(t,o);this.intValue=s,this.value=s/i,o.increment=o.increment||1/i,o.useVedic?o.groups=wn:o.groups=xn,this._settings=o,this._precision=i}add(t){let{intValue:r,_settings:o,_precision:i}=this;return N((r+=Te(t,o))/(o.fromCents?1:i),o)}subtract(t){let{intValue:r,_settings:o,_precision:i}=this;return N((r-=Te(t,o))/(o.fromCents?1:i),o)}multiply(t){let{intValue:r,_settings:o,_precision:i}=this;return N((r*=t)/(o.fromCents?1:He(i)),o)}divide(t){let{intValue:r,_settings:o}=this;return N(r/=Te(t,o,!1),o)}distribute(t){let{intValue:r,_precision:o,_settings:i}=this,s=[],c=Math[r>=0?"floor":"ceil"](r/t),a=Math.abs(r-c*t),u=i.fromCents?1:o;for(;t!==0;t--){let m=N(c/u,i);a-- >0&&(m=m[r>=0?"add":"subtract"](1/u)),s.push(m)}return s}dollars(){return~~this.value}cents(){let{intValue:t,_precision:r}=this;return~~(t%r)}format(t){let{_settings:r}=this;return typeof t=="function"?t(this,r):r.format(this,Object.assign({},r,t))}toString(){let{intValue:t,_precision:r,_settings:o}=this;return bn(t/r,o.increment).toFixed(o.precision)}toJSON(){return this.value}static sum(...t){return Q(t).reduce((r,o)=>N(r).add(o),this.zero)}static avg(...t){let r=Q(t);return r.reduce((o,i)=>N(o).add(i),this.zero).divide(r.length)}},$=Le;n($,"Currency"),$.zero=new Le(0),$.one=new Le(1);function Te(e,t,r=!0){let o=0,{decimal:i,errorOnInvalid:s,precision:c,fromCents:a}=t,u=He(c),m=typeof e=="number";if(e instanceof $&&a)return e.intValue;if(m||e instanceof $)o=e instanceof $?e.value:e;else if(typeof e=="string"){let y=new RegExp("[^-\\d"+i+"]","g"),h=new RegExp("\\"+i,"g");o=e.replace(/\((.*)\)/,"-$1").replace(y,"").replace(h,"."),o=o||0}else{if(s)throw Error("Invalid Input");o=0}return a||(o*=u,o=o.toFixed(4)),r?Ot(o):o}n(Te,"parse");function Tn(e,t){let{pattern:r,negativePattern:o,symbol:i,separator:s,decimal:c,groups:a}=t,u=(""+e).replace(/^-/,"").split("."),m=u[0],y=u[1];return(e.value>=0?r:o).replace("!",i).replace("#",m.replace(a,"$1"+s)+(y?c+y:""))}n(Tn,"format");var K=n(e=>Math.abs(e)%1===.5,"isHalf"),Be=n(e=>e%2===0,"isEven"),Ln=n(e=>Math.ceil(e),"roundUp"),Cn=n(e=>Math.floor(e),"roundDown"),vn=n(e=>Math.round(e),"roundHalfUp"),An=n(e=>{let t=Math.round(e);return K(e)&&Be(t)?t-1:t},"roundHalfOdd"),En=n(e=>K(e)?Math.sign(e)*Math.ceil(Math.abs(e)):Math.round(e),"roundHalfAwayFromZero"),Fn=n(e=>K(e)?Math.floor(e):Math.round(e),"roundHalfDown"),Mn=n(e=>{let t=Math.round(e);return K(e)?Be(t)?t:t-1:t},"roundHalfEven"),kn=n(e=>K(e)?Math.sign(e)*Math.floor(Math.abs(e)):Math.round(e),"roundHalfTowardsZero");var{warn:$t}=v("zeed:promise");async function Pn(e){return new Promise(t=>setTimeout(t,e))}n(Pn,"sleep");async function Sn(){return new Promise(e=>setTimeout(e,0))}n(Sn,"immediate");var Ne=Symbol("timeout");async function In(e,t,r=Ne){return new Promise(async(o,i)=>{let s=!1,c=setTimeout(()=>{s=!0,o(r)},t);try{let a=await e;clearTimeout(c),s||o(a)}catch(a){clearTimeout(c),s||i(a)}})}n(In,"timeout");var je=new Error("Timeout reached");function Dn(e){return e===Ne||e===je}n(Dn,"isTimeout");async function ze(e,t){return t<=0?await e:new Promise(async(r,o)=>{let i=!1,s=setTimeout(()=>{i=!0,o(je)},t);try{let c=await e;clearTimeout(s),i||r(c)}catch(c){clearTimeout(s),i||o(c)}})}n(ze,"tryTimeout");function Un(e,t,r=1e3){return new Promise((o,i)=>{let s=n(u=>{a&&(clearTimeout(a),c(),o(u))},"fn"),c=n(()=>{a=null,e.off?e.off(t,s):e.removeEventListener?e.removeEventListener(t,s):$t("No remove listener method found for",e,t)},"done"),a=setTimeout(()=>{c(),i(new Error("Did not response in time"))},r);e.on?e.on(t,s):e.addEventListener?e.addEventListener(t,s):$t("No listener method found for",e)})}n(Un,"waitOn");function I(e){return Boolean(e&&(e instanceof Promise||typeof e.then=="function"))}n(I,"isPromise");function j(e){return Promise.resolve(e)}n(j,"promisify");var qe=1e3*60*60*24,M=class{constructor(t){var r;if(typeof t=="number"){this.days=t;return}if(t!=null&&(t=(r=M.from(t))==null?void 0:r.days),t==null){let o=new Date;this.days=o.getFullYear()*1e4+(o.getMonth()+1)*100+o.getDate()}else this.days=t}static fromNumber(t){return new M(t)}static fromString(t){return new M(+t.replace(/[^0-9]/g,""))}static fromDate(t,r=!1){return r?M.fromString(t.toISOString().substr(0,10)):new M(t.getFullYear()*1e4+(t.getMonth()+1)*100+t.getDate())}static fromDateGMT(t){return M.fromDate(t,!0)}static from(t,r=!1){if(typeof t=="number")return new M(t);if(typeof t=="string")return M.fromString(t);if(t instanceof Date)return M.fromDate(t,r);if(t instanceof M)return t}toNumber(){return this.days}toJson(){return this.days}toString(t="-"){let r=String(this.days);return r.slice(0,4)+t+r.slice(4,6)+t+r.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)}dayOffset(t){return M.fromDateGMT(new Date(this.toDateGMT().getTime()+t*qe))}daysUntil(t){var r;return Math.round((((r=new M(t))==null?void 0:r.toDateGMT().getTime())-this.toDateGMT().getTime())/qe)}yesterday(){return this.dayOffset(-1)}tomorrow(){return this.dayOffset(1)}};n(M,"Day");async function On(e,t,r){let o=M.from(e),i=M.from(t);for(;o&&i&&(o==null?void 0:o.days)<=(i==null?void 0:i.days);){let s=r(o);I(s)&&await s,o=o.dayOffset(1)}}n(On,"forEachDay");function $n(){return new M}n($n,"today");function Rn(e){return new M(e)}n(Rn,"day");var Ge=n(e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&apos;").replace(/"/g,"&quot;"),"escapeHTML"),Hn=n(e=>e.replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&apos;/gi,"'").replace(/&amp;/gi,"&"),"unescapeHTML");function Bn(e=.25){return Math.random()<e}n(Bn,"randomBoolean");function Nn(e=100,t=0){return t+Math.floor(Math.random()*(e-t))}n(Nn,"randomInt");function jn(e=100,t=0){return t+Math.random()*(e-t)}n(jn,"randomFloat");function zn(e,t,r){return Math.max(e,Math.min(r,t))}n(zn,"between");var qn=100,Rt=/[\u0000-\u001F\u0080-\u009F]/g,Gn=/^\.+/,Jn=/\.+$/;function Ht(){return/[<>:"/\\|?*\u0000-\u001F]/g}n(Ht,"filenameReservedRegex");function Wn(){return/^(con|prn|aux|nul|com\d|lpt\d)$/i}n(Wn,"windowsReservedNameRegex");function _n(e){if(typeof e!="string")throw new TypeError("Expected a string");let t="_";if(Ht().test(t)&&Rt.test(t))throw new Error("Replacement string cannot contain reserved filename characters");return e=e.replace(Ht(),t).replace(Rt,t).replace(Gn,t).replace(Jn,""),e=Wn().test(e)?e+t:e,e.slice(0,qn)}n(_n,"toValidFilename");var Zn=/[\\\-\[\]\/{}()*+?.^$|]/g;function Vn(e){return e?e instanceof RegExp?e.source:e.replace(Zn,"\\$&"):""}n(Vn,"escapeRegExp");function Je(e){return e.reduce((t,r)=>Math.min(t,r.sort_weight||0),0)-1-Math.random()}n(Je,"startSortWeight");function We(e){return e.reduce((t,r)=>Math.max(t,r.sort_weight||0),0)+1+Math.random()}n(We,"endSortWeight");function Qn(e,t,r){let o=r.length,i=e<t;if(o<=0||e>=o-1)return We(r);if(e<=0)return Je(r);r=Bt([...r]);let s=i?-1:0,c=r[e+s].sort_weight||0,u=(r[e+s+1].sort_weight||0)-c;if(u===0)return i?Je(r):We(r);let m=c+u/2,y=u*.01*(Math.random()-.5);return m+y}n(Qn,"moveSortWeight");function Bt(e){return e.sort((t,r)=>(t.sort_weight||0)-(r.sort_weight||0)),e}n(Bt,"sortedItems");var Kn=/((?:(?:(?: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 Yn(e){return e.split(Kn).map((t,r)=>{let o=Ge(t);return r%2?`<a target="_blank" href="${o}">${Nt(o)}</a>`:o}).join("")}n(Yn,"linkifyPlainText");function Nt(e){return e.replace(/^https?:\/\/(www\.)?/,"").replace(/\/$/,"")}n(Nt,"toHumanReadableUrl");function _e(e){let t=[];for(let[r,o]of Object.entries(e))if(o!=null){Array.isArray(o)||(o=[o]);for(let i of o)i!=null&&t.push(encodeURIComponent(r)+"="+encodeURIComponent(i.toString()||""))}return t.join("&")}n(_e,"encodeQuery");function Xn(e){let t={},r=(e[0]==="?"?e.substr(1):e).split("&");for(let o=0;o<r.length;o++){let i=r[o].split("="),s=decodeURIComponent(i[0]),c=decodeURIComponent(i[1]||"");t[s]!=null?(Array.isArray(t[s])||(t[s]=[t[s]]),t[s].push(c)):t[s]=c}return t}n(Xn,"parseQuery");function eo(e){return e!=null?e.size!=null?e.size:e.length!=null?e.length:Object.keys(e).length:0}n(eo,"size");function to(e){return e!=null&&e.length>0?e[e.length-1]:void 0}n(to,"last");function ro(e){try{if(e!=null)return Array.isArray(e)||typeof e=="string"?e.length<=0:(e==null?void 0:e.size)!=null?e.size<=0:Object.keys(e).length<=0}catch(t){console.error("Failed to check if empty for",e,t)}return!0}n(ro,"empty");function Ce(e){return Object(e)!==e?e:JSON.parse(JSON.stringify(e))}n(Ce,"cloneObject");function no(e){return Object(e)!==e?e:JSON.parse(JSON.stringify(e))}n(no,"cloneJsonObject");async function oo(e){typeof e=="function"?await j(e()):I(e)?await e:typeof e.dispose=="function"?await j(e.dispose()):I(e.dispose)?await e.dispose:typeof e.cleanup=="function"?await j(e.cleanup()):I(e.cleanup)&&await e.cleanup}n(oo,"callDisposer");function jt(){let e=[],t=n(async i=>{e.includes(i)&&(be(e,s=>s!==i),await oo(i))},"untrack"),r=n(async()=>{for(;e.length>0;)await t(e[0])},"dispose"),o=n(i=>(e.unshift(i),()=>t(i)),"track");return Object.assign(r,{track:o,add:o,untrack:t,dispose:r,exec:r,getSize(){return e.length}})}n(jt,"useDispose");var io=jt;function so(e={}){let{mode:t="fifo"}=e,r=[],o=n(async(s=!1)=>{for(;r.length>0;){let c=r[0];if(be(r,a=>a!==c),typeof c=="function"){let a=c();if(I(a)){if(s)throw new Error(`Expected sync only function, but found async: ${c}`);await a}}else if(I(c)){if(s)throw new Error(`Expected sync only function, but found async: ${c}`);await c}else throw new Error(`Unhandled disposable: ${c}`)}},"exec");return Object.assign(o,{add:n(s=>{t==="lifo"?r.unshift(s):r.push(s)},"add"),exec:o,getSize(){return r.length}})}n(so,"useDefer");function ao(e,t=0){let r=setTimeout(e,t);return()=>{r&&(clearTimeout(r),r=void 0)}}n(ao,"useTimeout");function uo(e,t){let r=setInterval(e,t);return()=>{r&&(clearInterval(r),r=void 0)}}n(uo,"useInterval");function lo(e,t,r,...o){return e==null?()=>{}:(e.on?e.on(t,r,...o):e.addEventListener&&e.addEventListener(t,r,...o),()=>{e.off?e.off(t,r,...o):e.removeEventListener&&e.removeEventListener(t,r,...o)})}n(lo,"useEventListener");function co(e=(r=>(r=(t=>(t=globalThis==null?void 0:globalThis.location)==null?void 0:t.hostname)())!=null?r:"")()){return["localhost","127.0.0.1","","::1","::"].includes(e)||e.startsWith("192.168.")||e.startsWith("10.0.")||e.endsWith(".local")}n(co,"isLocalHost");var R=n(()=>Date.now(),"getTimestamp");function ae(e){return e>999?(e/1e3).toFixed(1)+"s":e.toFixed(2)+"ms"}n(ae,"formatMilliseconds");function fo(...e){for(let t of e){if(t instanceof Date)return t;if(typeof t=="string"){let r=null;if(t.includes(":"))try{r=new Date(t)}catch{}if(!(r instanceof Date)){let o=/(\d\d\d\d)-(\d\d)-(\d\d)/.exec(t);o&&(r=new Date(+o[1],+o[2]-1,+o[3],12,0))}if(r instanceof Date)return r}}}n(fo,"parseDate");var{encode:Ze,decode:zt}=O(62),{encode:po}=O(32);function Ve(){return J(16)}n(Ve,"uuidBytes");var go=n(()=>new Uint32Array(J(4))[0],"uuid32bit");function Y(){return Ze(Ve(),22)}n(Y,"uuid");function mo(e){return Ze(e,22)}n(mo,"uuidEncode");function yo(e){return zt(e,16)}n(yo,"uuidDecode");function ho(){return po(Ve(),26)}n(ho,"uuidB32");var Qe={};function z(e="id"){return Qe[e]==null&&(Qe[e]=0),`${e}-${Qe[e]++}`}n(z,"uname");var bo=0;function xo(){return`id-${bo++}`}n(xo,"qid");var wo="10000000-1000-4000-8000-100000000000",To=n(()=>wo.replace(/[018]/g,e=>(e^J(1)[0]&15>>e/4).toString(16)),"uuidv4"),qt=16e11;function Lo(e){var t=new Uint8Array([0,0,0,0,0,0]);let r=t.length-1;for(var o=0;o<t.length;o++){var i=e&255;t[r-o]=i,e=(e-i)/256}return t}n(Lo,"longToByteArray");function Gt(){let e=R()-qt;return new Uint8Array([...Lo(e),...J(10)])}n(Gt,"suidBytes");function Co(){return Ze(Gt(),22)}n(Co,"suid");function vo(e){return Jt(zt(e,16))}n(vo,"suidDate");function Jt(e){return new Date(qt+e.slice(0,6).reduce((t,r)=>t*256+r,0))}n(Jt,"suidBytesDate");var X=v("zeed:emitter"),H=class{constructor(){this.subscribers={};this.subscribersOnAny=[];this.call=new Proxy({},{get:(t,r)=>(...o)=>this.emit(r,...o)})}async emit(t,...r){let o=!1;try{let i=this.subscribers[t]||[];if(this.subscribersOnAny.forEach(s=>s(t,...r)),i.length>0){let s=i.map(c=>{try{return j(c(...r))}catch(a){X.warn("emit warning:",a)}});o=!0,await Promise.all(s)}}catch(i){X.error("emit exception",i)}return o}onAny(t){this.subscribersOnAny.push(t)}on(t,r){let o=this.subscribers[t]||[];return o.push(r),this.subscribers[t]=o,()=>{this.off(t,r)}}onCall(t){for(let[r,o]of Object.entries(t))this.on(r,o)}once(t,r){let o=n(async(...i)=>(this.off(t,o),await j(r(...i))),"onceListener");return this.on(t,o),()=>{this.off(t,r)}}off(t,r){return this.subscribers[t]=(this.subscribers[t]||[]).filter(o=>r&&o!==r),this}removeAllListeners(t){return this.subscribers={},this}dispose(){this.subscribers={},this.subscribersOnAny=[]}};n(H,"Emitter");function Ao(){let e=Z().emitter;return e||(e=new H,Z().emitter=e),e}n(Ao,"getGlobalEmitter");var Eo=new H;function Fo(e,t){let r=Math.round(Math.random()*100);var o=[],i;let s=n((a,u)=>{let m={key:a,obj:u};o.push(m),i&&i()},"incoming");return t?e.on?e.on(t,a=>{s(t,a)}):e.addEventListener?e.addEventListener(t,a=>{s(t,a)}):X.error(r,"Cannot listen to key"):e.onAny?e.onAny((a,u)=>{s(a,u)}):X.error(r,"cannot listen to all for",e),n((a,u=!0)=>new Promise((m,y)=>{a||(a=t,a||o.length&&(a=o[0].key)),i=n(()=>{for(;o.length>0;){let h=o.shift();if(h.key===a)i=void 0,m(h.obj);else{if(u){X.warn(r,`Unhandled event ${a} with value: ${h.obj}`);continue}y(`Expected ${a}, but found ${h.key} with value=${h.obj}`),X.error(r,`Unhandled event ${a} with value: ${h.obj}`)}break}},"lazyResolve"),i()}),"on")}n(Fo,"lazyListener");var ve=class extends H{constructor(){super(...arguments);this.id=Y()}close(){}};n(ve,"Channel");var ue=class extends ve{constructor(){super(...arguments);this.isConnected=!0}postMessage(t){var r;(r=this.other)==null||r.emit("message",{data:t,origin:"local",lastEventId:Y()})}};n(ue,"LocalChannel");function Mo(){let e=new ue,t=new ue;return e.other=t,t.other=e,[e,t]}n(Mo,"fakeWorkerPair");var W=class{async encode(t){return de(t)}async decode(t){return ge(t)}};n(W,"JsonEncoder");var Ke=class{constructor(t){this.key=t}async encode(t){let r=de(t);return await Oe(r,this.key)}async decode(t){let r=await $e(t,this.key);return ge(r)}};n(Ke,"CryptoEncoder");var Ye=n((e,t,r={})=>new Proxy(r,{get:(o,i)=>i in o?o[i]:(...s)=>e(i,s,t)}),"createPromiseProxy");function ko(e={}){let{name:t=z("hub"),encoder:r=new W,retryAfter:o=1e3,ignoreUnhandled:i=!0}=e,s=v(t),c={},a,u=[],m,y={},h=n(()=>{clearTimeout(m)},"dispose"),T=n(async()=>{if(clearTimeout(m),a){if(a.isConnected)for(;u.length;){let L=u[0];try{a.postMessage(await r.encode(L)),u.shift()}catch(b){s.warn("postMessage",b);break}}u.length>0&&o>0&&(m=setTimeout(T,o))}},"postNext"),C=n(async L=>{s("enqueue postMessage",L),u.push(L),await T()},"postMessage"),w=n(async L=>{a=L,a.on("connect",T),a.on("message",async b=>{s("onmessage",typeof b);let{name:p,args:f,id:l,result:d,error:g}=await r.decode(b.data);if(p){s(`name ${p} id ${l}`);try{if(c[p]==null)throw new Error(`handler for ${p} was not found`);let F=c[p](...f);I(F)&&(F=await F),s(`result ${F}`),l&&C({id:l,result:F})}catch(F){let q=F instanceof Error?F:new Error(we(F));s.warn("execution error",q.name),C({id:l,error:{message:q.message,stack:q.stack,name:q.name}})}}else if(l)if(s(`response for id=${l}: result=${d}, error=${g}`),y[l]==null)d===void 0?s(`skip response for ${l}`):s.warn(`no response hook for ${l}`);else{let[F,q]=y[l];if(F&&q)if(delete y[l],g){let ce=new Error(g.message);ce.stack=g.stack,ce.name=g.name,s.warn("reject",ce.name),q(ce)}else s("resolve",d),F(d)}else i||s.warn("Unhandled message",b)}),T()},"connect"),A=n(async(L,b,p={})=>{let{timeout:f=5e3}=p,l=Y();return C({name:L,args:b,id:l}),ze(new Promise((d,g)=>y[l]=[d,g]),f)},"fetchMessage");return e.channel&&w(e.channel),{dispose:h,connect:w,listen(L){Object.assign(c,L)},send(){return Ye(A,{},{options(L){return Ye(A,U({},L))}})}}}n(ko,"useMessageHub");var Ae=class extends H{constructor(t){super();this.publish=this.emit;this.subscribe=this.on;var c;let{name:r,encoder:o=new W,channel:i,debug:s=!1}=t;this.channel=i,this.encoder=o,this.debug=s,this.name=(c=r!=null?r:this.channel.id)!=null?c:z("pubsub"),this.log=v(`${this.shortId}`),this.debug&&(this.channel.on("connect",()=>{this.log("channel connected")}),this.channel.on("disconnect",()=>{this.log("channel disconnected")})),this.channel.on("message",async({data:a})=>{let u=await this.encoder.decode(a);if(this.debug?this.log(`channel message, event=${u==null?void 0:u.event}, info=`,u):this.log(`channel message, event=${u==null?void 0:u.event}`),u){let{event:m,args:y}=u;await this.emitSuper(m,...y)}})}get shortId(){return this.name.substr(0,6)}async emitSuper(t,...r){return await super.emit(t,...r)}async emit(t,...r){try{if(this.debug?this.log(`emit(${t})`,t):this.log(`emit(${t})`,r.length),!this.channel.isConnected)return this.log.warn("channel not connected"),!1;let o=await this.encoder.encode({event:t,args:r});return this.channel.postMessage(o),!0}catch(o){this.log.warn(`emit(${t})`,o)}return!1}};n(Ae,"PubSub");function Po(e){return new Ae(e)}n(Po,"usePubSub");function So(){let e=!0;return(t,r)=>{let o=!1;if(e){e=!1;try{t(),o=!0}finally{e=!0}}else r!==void 0&&r();return o}}n(So,"useMutex");function Io(){let e=!0;return async(t,r)=>{let o=!1;if(e){e=!1;try{let i=t();I(i)&&await i,o=!0}finally{e=!0}}else if(r!==void 0){let i=r();I(i)&&await i}return o}}n(Io,"useAsyncMutex");var ee=v("network"),Ee={cache:"no-cache",redirect:"follow"};async function Xe(e,t={},r=fetch){try{let o=await r(e,t);if(o.status<400)return o;try{ee.warn(`Fetch of ${e} with ${t} returned status=${o.status}`),ee.warn(`Response: ${await o.text()}`)}catch(i){ee.error("Exception:",i)}}catch(o){ee.error("fetchBasic",o)}}n(Xe,"fetchBasic");async function Do(e,t={},r=fetch){try{let o=await Xe(e,U(ie(U({method:"GET"},Ee),{headers:{}}),t),r);if(o)return await o.json()}catch(o){ee.error("fetchJSON error:",o)}}n(Do,"fetchJson");function Uo(e,t="POST"){return ie(U({method:t},Ee),{headers:{"Content-Type":"application/x-www-form-urlencoded; charset=utf-8"},body:_e(e)})}n(Uo,"fetchOptionsFormURLEncoded");function Oo(e,t="POST"){return ie(U({method:t},Ee),{headers:{"Content-Type":"application/json; charset=utf-8",Accept:"application/json"},body:JSON.stringify(e)})}n(Oo,"fetchOptionsJson");async function $o(e,t={},r=fetch){try{let o=await Xe(e,U(ie(U({method:"GET"},Ee),{headers:{}}),t),r);if(o)return await o.text()}catch(o){ee.error("fetchHTML error:",o)}}n($o,"fetchText");function et(){if(typeof window!="undefined")return window}n(et,"getWindow");function Wt(){if(typeof navigator!="undefined")return navigator}n(Wt,"getNavigator");function Ro(){var e;return((e=et())!=null?e:typeof WorkerGlobalScope!="undefined")?self:typeof global!="undefined"?global:Function("return this;")()}n(Ro,"getGlobal");var E=Wt(),k=et();function _t(e={ios:!1,macos:!1,windows:!1,beaker:!1,electron:!1,wkwebview:!1,pwa:!1,pwaInstalled:!1,browser:!1,node:!1,worker:!1,jest:!1,macosNative:!1,iosNative:!1,appleNative:!1,touch:!1}){var t,r,o,i,s,c,a,u,m;return e.ios=((t=E==null?void 0:E.platform)==null?void 0:t.match(/(iPhone|iPod|iPad)/i))!=null,e.macos=!!((r=E==null?void 0:E.platform)==null?void 0:r.startsWith("Mac")),e.windows=!!((o=E==null?void 0:E.platform)==null?void 0:o.startsWith("Win")),e.beaker=(k==null?void 0:k.beaker)!=null,e.electron=(((s=(i=E==null?void 0:E.userAgent)==null?void 0:i.toLowerCase())==null?void 0:s.indexOf(" electron/"))||-1)>-1&&!e.beaker,e.wkwebview=((c=k==null?void 0:k.webkit)==null?void 0:c.messageHandlers)!=null,e.pwa=(E==null?void 0:E.serviceWorker)!=null,e.pwaInstalled=(E==null?void 0:E.standalone)||((u=(a=k==null?void 0:k.matchMedia)==null?void 0:a.call(k,"(display-mode: standalone)"))==null?void 0:u.matches),e.node=typeof process!="undefined"&&((m=process==null?void 0:process.release)==null?void 0:m.name)==="node",e.browser=!e.electron&&!e.wkwebview&&!e.node,e.worker=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope,e.jest=typeof jest!="undefined",e.macosNative=e.wkwebview&&e.macos,e.iosNative=e.wkwebview&&e.ios,e.appleNative=e.wkwebview,e.touch=k&&"ontouchstart"in k||((E==null?void 0:E.maxTouchPoints)||0)>1||(E==null?void 0:E.msPointerEnabled)&&(k==null?void 0:k.MSGesture)||(k==null?void 0:k.DocumentTouch)&&document instanceof DocumentTouch,e}n(_t,"detect");var Fe=n(()=>typeof window!="undefined"&&globalThis===window,"isBrowser"),Ho=_t();function Bo(e){Fe()?window.addEventListener("beforeunload",e):typeof process!="undefined"&&process.on("exit",()=>e)}n(Bo,"useExitHandler");function No(e={}){let{maxParallel:t=3}=e,r=0,o=0,i={};function s(){if(r>=t)return;let a=Object.values(i).filter(u=>!u.running);if(a.length>0){let u;for(let m of a)(u==null||m.priority<u.priority)&&(u=m);u&&(u.running=!0,++r,u.task().then(m=>{(u==null?void 0:u.id)&&delete i[u.id],--r,s()}).catch(m=>{(u==null?void 0:u.id)&&delete i[u.id],--r,s()}))}}n(s,"performNext");function c(a){let u=i[a];u&&u.running!==!0&&delete i[a]}return n(c,"cancel"),{cancel:c,enqueue(a,u){return i[a]==null&&(i[a]={id:a,task:u,priority:++o,running:!1},s()),()=>c(a)}}}n(No,"usePool");var jo=v("zeed:queue"),tt=class{constructor(t={}){this.queue=[];this.isPaused=!1;this.waitToFinish=[];let{name:r=z("queue"),logLevel:o}=t;this.name=r,this.log=v(`zeed:queue:${r}`),this.log.level=o!=null?o:1/0}async performNext(){if(this.log("performNext, queue.length =",this.queue.length),this.currentTask!=null){this.log("performNext => skip while another task is running");return}if(this.isPaused){this.log("performNext => skip while is paused");return}for(;this.currentTask==null&&!this.isPaused;){let t=this.queue.shift();if(this.log(`performNext => ${t==null?void 0:t.name}`),t==null)break;let{name:r,task:o,resolve:i}=t;this.currentTask=o();let s;try{this.log.info(`start task ${r}`),s=await this.currentTask,this.log(`finished task ${r} with result =`,s)}catch(c){jo.warn("Error performing task",c)}i(s),this.currentTask=void 0}for(;this.waitToFinish.length>0;)this.waitToFinish.shift()()}async enqueue(t,r={}){let{immediate:o=!1,name:i=z(this.name)}=r;return o?(this.log.info(`immediate execution ${i}`),await t()):(this.log(`enqueue ${i}`),new Promise(s=>{this.queue.push({name:i,task:t,resolve:s}),this.performNext()}))}async enqueueReentrant(t,r={}){return this.enqueue(t,{immediate:this.currentTask!=null,name:r.name})}async cancelAll(t=!0){this.log("cancelAll");let r=this.queue.map(o=>o.resolve);this.queue=[],r.forEach(o=>o(void 0)),await this.wait()}async pause(){this.log("pause"),this.isPaused=!0,await this.wait()}resume(){this.log("resume"),this.isPaused=!1,this.performNext()}async wait(){if(this.log("wait"),!(this.currentTask==null&&(this.queue.length===0||this.isPaused)))return new Promise(t=>{this.waitToFinish.push(t)})}};n(tt,"SerialQueue");var xa=v("zeed:memstorage"),rt=class{constructor(t={}){this.store={}}setItem(t,r){this.store[t]=Ce(r)}getItem(t){if(this.store.hasOwnProperty(t))return Ce(this.store[t])}removeItem(t){delete this.store[t]}clear(){this.store={}}allKeys(){return Object.keys(this.store)}};n(rt,"MemStorage");var te=!1,re=te?v("zeed:throttle"):()=>{};function zo(e,t={}){let{delay:r=100,trailing:o=!0,leading:i=!0}=t,s=0,c=0,a=0,u=Date.now();function m(){s&&(clearTimeout(s),s=void 0)}n(m,"clearExistingTimeout");function y(...h){let T=Date.now(),C=this,w=T-c;function A(){let b=Date.now();return`total ${(b-u).toFixed(1)}ms - elapsed ${(b-c).toFixed(1)}ms - visited ${a}x`}n(A,"debugElapsed");function L(){a=0,c=Date.now(),e.apply(C,h)}if(n(L,"exec"),w>r||!s){te&&re("elapsed",A()),i&&(w>r?(te&&re("\u{1F680} leading",A()),L()):++a);let b=w>r?r:r-w;re(`\u23F1 start timeout with ${b.toFixed(1)}ms}`,A()),m(),c=T,s=setTimeout(()=>{te&&re("\u23F1 reached timeout",A()),s=0,o&&(!i||a>0)&&(te&&re("\u{1F680} trailing",A()),L())},b)}else++a,te&&re("visited",A())}return n(y,"wrapper"),y.cancel=m,y.dispose=m,y}n(zo,"throttle");function qo(e,t={}){let{delay:r=100}=t,o=0;function i(){o&&(clearTimeout(o),o=0)}n(i,"clearExistingTimeout");function s(...c){let a=this;i(),o=setTimeout(()=>{o=0,e.apply(a,c)},r)}return n(s,"wrapper"),s.cancel=i,s.dispose=i,s}n(qo,"debounce");var{error:Go}=v("zeed:base64");function Jo(e){try{let t="=".repeat((4-e.length%4)%4),r=(e+t).replace(/-/g,"+").replace(/_/g,"/"),o=window.atob(r),i=new Uint8Array(o.length);for(let s=0;s<o.length;++s)i[s]=o.charCodeAt(s);return i}catch(t){Go(t,e)}}n(Jo,"urlBase64ToUint8Array");var Wo=v("zeed:gravatar");function _o(e,t){function r(b,p){var f=b[0],l=b[1],d=b[2],g=b[3];f=i(f,l,d,g,p[0],7,-680876936),g=i(g,f,l,d,p[1],12,-389564586),d=i(d,g,f,l,p[2],17,606105819),l=i(l,d,g,f,p[3],22,-1044525330),f=i(f,l,d,g,p[4],7,-176418897),g=i(g,f,l,d,p[5],12,1200080426),d=i(d,g,f,l,p[6],17,-1473231341),l=i(l,d,g,f,p[7],22,-45705983),f=i(f,l,d,g,p[8],7,1770035416),g=i(g,f,l,d,p[9],12,-1958414417),d=i(d,g,f,l,p[10],17,-42063),l=i(l,d,g,f,p[11],22,-1990404162),f=i(f,l,d,g,p[12],7,1804603682),g=i(g,f,l,d,p[13],12,-40341101),d=i(d,g,f,l,p[14],17,-1502002290),l=i(l,d,g,f,p[15],22,1236535329),f=s(f,l,d,g,p[1],5,-165796510),g=s(g,f,l,d,p[6],9,-1069501632),d=s(d,g,f,l,p[11],14,643717713),l=s(l,d,g,f,p[0],20,-373897302),f=s(f,l,d,g,p[5],5,-701558691),g=s(g,f,l,d,p[10],9,38016083),d=s(d,g,f,l,p[15],14,-660478335),l=s(l,d,g,f,p[4],20,-405537848),f=s(f,l,d,g,p[9],5,568446438),g=s(g,f,l,d,p[14],9,-1019803690),d=s(d,g,f,l,p[3],14,-187363961),l=s(l,d,g,f,p[8],20,1163531501),f=s(f,l,d,g,p[13],5,-1444681467),g=s(g,f,l,d,p[2],9,-51403784),d=s(d,g,f,l,p[7],14,1735328473),l=s(l,d,g,f,p[12],20,-1926607734),f=c(f,l,d,g,p[5],4,-378558),g=c(g,f,l,d,p[8],11,-2022574463),d=c(d,g,f,l,p[11],16,1839030562),l=c(l,d,g,f,p[14],23,-35309556),f=c(f,l,d,g,p[1],4,-1530992060),g=c(g,f,l,d,p[4],11,1272893353),d=c(d,g,f,l,p[7],16,-155497632),l=c(l,d,g,f,p[10],23,-1094730640),f=c(f,l,d,g,p[13],4,681279174),g=c(g,f,l,d,p[0],11,-358537222),d=c(d,g,f,l,p[3],16,-722521979),l=c(l,d,g,f,p[6],23,76029189),f=c(f,l,d,g,p[9],4,-640364487),g=c(g,f,l,d,p[12],11,-421815835),d=c(d,g,f,l,p[15],16,530742520),l=c(l,d,g,f,p[2],23,-995338651),f=a(f,l,d,g,p[0],6,-198630844),g=a(g,f,l,d,p[7],10,1126891415),d=a(d,g,f,l,p[14],15,-1416354905),l=a(l,d,g,f,p[5],21,-57434055),f=a(f,l,d,g,p[12],6,1700485571),g=a(g,f,l,d,p[3],10,-1894986606),d=a(d,g,f,l,p[10],15,-1051523),l=a(l,d,g,f,p[1],21,-2054922799),f=a(f,l,d,g,p[8],6,1873313359),g=a(g,f,l,d,p[15],10,-30611744),d=a(d,g,f,l,p[6],15,-1560198380),l=a(l,d,g,f,p[13],21,1309151649),f=a(f,l,d,g,p[4],6,-145523070),g=a(g,f,l,d,p[11],10,-1120210379),d=a(d,g,f,l,p[2],15,718787259),l=a(l,d,g,f,p[9],21,-343485551),b[0]=C(f,b[0]),b[1]=C(l,b[1]),b[2]=C(d,b[2]),b[3]=C(g,b[3])}n(r,"md5cycle");function o(b,p,f,l,d,g){return p=C(C(p,b),C(l,g)),C(p<<d|p>>>32-d,f)}n(o,"cmn");function i(b,p,f,l,d,g,F){return o(p&f|~p&l,b,p,d,g,F)}n(i,"ff");function s(b,p,f,l,d,g,F){return o(p&l|f&~l,b,p,d,g,F)}n(s,"gg");function c(b,p,f,l,d,g,F){return o(p^f^l,b,p,d,g,F)}n(c,"hh");function a(b,p,f,l,d,g,F){return o(f^(p|~l),b,p,d,g,F)}n(a,"ii");function u(b){var p=b.length,f=[1732584193,-271733879,-1732584194,271733878],l;for(l=64;l<=b.length;l+=64)r(f,m(b.substring(l-64,l)));b=b.substring(l-64);var d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(l=0;l<b.length;l++)d[l>>2]|=b.charCodeAt(l)<<(l%4<<3);if(d[l>>2]|=128<<(l%4<<3),l>55)for(r(f,d),l=0;l<16;l++)d[l]=0;return d[14]=p*8,r(f,d),f}n(u,"md51");function m(b){var p=[],f;for(f=0;f<64;f+=4)p[f>>2]=b.charCodeAt(f)+(b.charCodeAt(f+1)<<8)+(b.charCodeAt(f+2)<<16)+(b.charCodeAt(f+3)<<24);return p}n(m,"md5blk");function y(b){for(var p="",f=0;f<4;f++)p+=w[b>>f*8+4&15]+w[b>>f*8&15];return p}n(y,"rhex");function h(b){for(var p=0;p<b.length;p++)b[p]=y(b[p]);return b.join("")}n(h,"hex");function T(b){return h(u(b))}n(T,"md5");function C(b,p){return b+p&4294967295}n(C,"add32");var w="0123456789abcdef".split(""),t=t||{},A,L=[];return t={size:t.size||"50",rating:t.rating||"g",secure:t.secure||location.protocol==="https:",backup:t.backup||""},e=e.trim().toLowerCase(),A=t.secure?"https://secure.gravatar.com/avatar/":"http://www.gravatar.com/avatar/",t.rating&&L.push("r="+t.rating),t.backup&&L.push("d="+encodeURIComponent(t.backup)),t.size&&L.push("s="+t.size),A+T(e)+"?"+L.join("&")}n(_o,"gravatar");function Zo(e,t=""){try{return _o(e,{size:256,backup:"monsterid",secure:!0})}catch{return Wo("Gravatar issue: Did not find an image for "+e),t}}n(Zo,"gravatarURLByEmail");var Zt=v("zeed:localstorage"),nt=class{constructor(t){this.pretty=!1;var r,o;Zt.assert(t.name,"name required"),this.name=t.name,this.prefix=`${t.name}$`,this.objectToString=(r=t.objectToString)!=null?r:i=>this.pretty?JSON.stringify(i,null,2):JSON.stringify(i),this.objectFromString=(o=t.objectFromString)!=null?o:i=>{try{return JSON.parse(i)}catch(s){Zt.warn(`LocalStorage parse error '${s}' in`,i)}}}setItem(t,r){let o=this.objectToString(r);localStorage.setItem(`${this.prefix}${t}`,o)}getItem(t){let r=localStorage.getItem(`${this.prefix}${t}`);if(r!=null)return this.objectFromString(r)}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(r=>r.startsWith(this.prefix)).map(r=>r.substr(t))}};n(nt,"LocalStorage");var Vt=["#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 le(){return typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}n(le,"supportsColors");function ne(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return Vt[Math.abs(t)%Vt.length]}n(ne,"selectColor");var Qt='font-family: "JetBrains Mono", Menlo; font-size: 11px;',Kt=`${Qt}`,Yt=`font-weight: 600; ${Qt}`,Xt=le(),er={},Vo=R();function ot(e={}){let{filter:t=void 0,level:r=void 0,colors:o=!0,levelHelper:i=!1,nameBrackets:s=!0,padding:c=16}=e,a=D(t),u=G(r);return m=>{var A,L;if(!u(m.level)||!a(m.name))return;let y=R(),h=m.name||"",T=er[h||""];T==null&&(T={color:ne(h)},er[h]=T);let C=ae(y-Vo),w;switch(c>0&&(h=h.padEnd(16," ")),o&&Xt?(w=[`%c${h}%c %s %c+${C}`],w.push(`color:${T.color}; ${Yt}`),w.push(Kt),w.push((L=(A=m.messages)==null?void 0:A[0])!=null?L:""),w.push(`color:${T.color};`),w.push(...m.messages.slice(1))):w=[h,...m.messages,`+${C}`],m.level){case 1:e.levelHelper&&(w[0]="I|* "+w[0]),console.info(...w);break;case 2:e.levelHelper&&(w[0]="W|** "+w[0]),console.warn(...w);break;case 3:e.levelHelper&&(w[0]="E|*** "+w[0]),console.error(...w);break;default:e.levelHelper&&(w[0]="D| "+w[0]),console.debug(...w);break}}}n(ot,"LoggerBrowserHandler");function it(e={}){var r,o;let t=(o=(r=e.filter)!=null?r:localStorage.zeed)!=null?o:localStorage.debug;return n(function i(s=""){let c;if(D(t)(s)){let u=[];if(Xt){let m=ne(s);u.push(`%c${s.padEnd(16," ")}%c %s`),u.push(`color:${m}; ${Yt}`),u.push(Kt)}else u.push(`[${s}] %s`);c=console.debug.bind(console,...u),c.debug=console.debug.bind(console,...u),c.info=console.info.bind(console,...u),c.warn=console.warn.bind(console,...u),c.error=console.error.bind(console,...u),c.assert=console.assert.bind(console),c.assertEqual=function(m,y,...h){let T=B(m,y);T||c.assert(T,`Assert did fail. Expected ${y} got ${m}`,y,m,...h)},c.assertNotEqual=function(m,y,...h){let T=B(m,y);T&&c.assert(T,`Assert did fail. Expected ${y} not to be equal with ${m}`,y,m,...h)}}else{let u=n(()=>{},"noop");c=u,c.debug=u,c.info=u,c.warn=u,c.error=u,c.assert=u,c.assertEqual=u,c.assertNotEqual=u}return c.extend=u=>i(s?`${s}:${u}`:u),c},"LoggerBrowserDebugFactory")}n(it,"LoggerBrowserSetupDebugFactory");function Qo(e={}){console.info("activateConsoleDebug is activated by default in browsers")}n(Qo,"activateConsoleDebug");var tr={},Ko=R(),Yo=le();function Xo(e,t={}){let{filter:r=void 0}=t,o=D(r),i=G(e);return s=>{if(!i(s.level)||!o(s.name))return;let c=R(),a=s.name||"",u=tr[a||""];u==null&&(u={color:ne(a)},tr[a]=u);let m=ae(c-Ko),y;switch(t.colors&&Yo?(y=t.nameBrackets?[`%c[${a}]`]:[`%c${a}`],y.push(`color:${u.color}`),y.push(...s.messages)):y=[a,...s.messages],y.push(`+${m}`),s.level){case 1:t.levelHelper&&(y[0]="I|* "+y[0]),console.info(...y);break;case 2:t.levelHelper&&(y[0]="W|** "+y[0]),console.warn(...y);break;case 3:t.levelHelper&&(y[0]="E|*** "+y[0]),console.error(...y);break;default:t.levelHelper&&(y[0]="D| "+y[0]),console.debug(...y);break}}}n(Xo,"LoggerBrowserClassicHandler");Fe()&&(v.setHandlers([ot()]),v.setFactory(it({})));module.exports=cr(ei);0&&(module.exports={Channel,CryptoEncoder,Currency,DAY_MS,Day,Emitter,JsonEncoder,LocalChannel,LocalStorage,LogLevel,LogLevelAlias,Logger,LoggerBrowserClassicHandler,LoggerBrowserHandler,LoggerBrowserSetupDebugFactory,LoggerConsoleHandler,LoggerContext,MemStorage,PubSub,SerialQueue,Uint8ArrayToJson,Uint8ArrayToString,activateConsoleDebug,arrayEmptyInPlace,arrayFilterInPlace,arrayFlatten,arrayIntersection,arrayIsEqual,arrayMax,arrayMin,arrayMinus,arrayRandomElement,arrayRemoveElement,arraySetElement,arrayShuffle,arrayShuffleForce,arrayShuffleInPlace,arraySorted,arraySortedNumbers,arraySymmetricDifference,arrayToggleInPlace,arrayUnion,arrayUnique,between,cloneJsonObject,cloneObject,cmp,composeOrderby,createArray,createPromiseProxy,csv,currency,day,debounce,decodeBase16,decodeBase32,decodeBase58,decodeBase62,decodeBase64,decrypt,deepEqual,deepMerge,deriveKeyPbkdf2,detect,digest,empty,encodeBase16,encodeBase32,encodeBase58,encodeBase62,encodeBase64,encodeQuery,encrypt,endSortWeight,equalBinary,escapeHTML,escapeRegExp,fakeWorkerPair,fetchBasic,fetchJson,fetchOptionsFormURLEncoded,fetchOptionsJson,fetchText,fixBrokenUth8String,forEachDay,formatMessages,formatMilliseconds,fromCamelCase,getGlobal,getGlobalContext,getGlobalEmitter,getNamespaceFilterString,getNavigator,getTimestamp,getWindow,gravatarURLByEmail,immediate,isArray,isBoolean,isBrowser,isEven,isHalf,isInteger,isLocalHost,isNullOrUndefined,isNumber,isObject,isPrimitive,isPromise,isRecord,isSafeInteger,isString,isTimeout,jsonStringify,jsonToUint8Array,last,lazyListener,linkifyPlainText,messages,moveSortWeight,parseDate,parseOrderby,parseQuery,platform,promisify,qid,randomBoolean,randomFloat,randomInt,randomUint8Array,renderMessages,roundDown,roundHalfAwayFromZero,roundHalfDown,roundHalfEven,roundHalfOdd,roundHalfTowardsZero,roundHalfUp,roundUp,selectColor,size,sleep,sortedItems,sortedOrderby,startSortWeight,stringToBoolean,stringToFloat,stringToInteger,stringToUInt8Array,suid,suidBytes,suidBytesDate,suidDate,supportsColors,throttle,timeout,timeoutReached,timoutError,toBase64,toBase64Url,toBool,toCamelCase,toCapitalize,toCapitalizeWords,toFloat,toHex,toHumanReadableUrl,toInt,toString,toUint8Array,toValidFilename,today,tryTimeout,uname,unescapeHTML,urlBase64ToUint8Array,useAsyncMutex,useBase,useDefer,useDispose,useDisposer,useEventListener,useExitHandler,useInterval,useLevelFilter,useMessageHub,useMutex,useNamespaceFilter,usePool,usePubSub,useTimeout,uuid,uuid32bit,uuidB32,uuidBytes,uuidDecode,uuidEncode,uuidv4,valueToBoolean,valueToFloat,valueToInteger,valueToString,waitOn});
5
5
  //# sourceMappingURL=index.browser.cjs.map