@blackglory/structures 0.10.0 → 0.10.3

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.
Files changed (54) hide show
  1. package/README.md +39 -9
  2. package/dist/es2015/index.min.mjs +2 -2
  3. package/dist/es2015/index.min.mjs.map +1 -1
  4. package/dist/es2015/index.mjs +9455 -2435
  5. package/dist/es2015/index.mjs.map +1 -1
  6. package/dist/es2015/index.umd.js +9456 -2434
  7. package/dist/es2015/index.umd.js.map +1 -1
  8. package/dist/es2015/index.umd.min.js +2 -2
  9. package/dist/es2015/index.umd.min.js.map +1 -1
  10. package/dist/es2018/index.min.mjs +2 -2
  11. package/dist/es2018/index.min.mjs.map +1 -1
  12. package/dist/es2018/index.mjs +9455 -2435
  13. package/dist/es2018/index.mjs.map +1 -1
  14. package/dist/es2018/index.umd.js +9456 -2434
  15. package/dist/es2018/index.umd.js.map +1 -1
  16. package/dist/es2018/index.umd.min.js +2 -2
  17. package/dist/es2018/index.umd.min.js.map +1 -1
  18. package/lib/es2015/bit-set.d.ts +12 -0
  19. package/lib/es2015/bit-set.js +54 -0
  20. package/lib/es2015/bit-set.js.map +1 -0
  21. package/lib/es2015/hash-set.d.ts +1 -1
  22. package/lib/es2015/index.d.ts +2 -0
  23. package/lib/es2015/index.js +2 -0
  24. package/lib/es2015/index.js.map +1 -1
  25. package/lib/es2015/sorted-set.d.ts +10 -0
  26. package/lib/es2015/sorted-set.js +30 -0
  27. package/lib/es2015/sorted-set.js.map +1 -0
  28. package/lib/es2015/sparse-map.d.ts +3 -3
  29. package/lib/es2015/sparse-set.d.ts +2 -1
  30. package/lib/es2015/sparse-set.js +8 -2
  31. package/lib/es2015/sparse-set.js.map +1 -1
  32. package/lib/es2015/trie-map.d.ts +3 -3
  33. package/lib/es2015/utils/skip-list.d.ts +24 -0
  34. package/lib/es2015/utils/skip-list.js +155 -0
  35. package/lib/es2015/utils/skip-list.js.map +1 -0
  36. package/lib/es2018/bit-set.d.ts +12 -0
  37. package/lib/es2018/bit-set.js +54 -0
  38. package/lib/es2018/bit-set.js.map +1 -0
  39. package/lib/es2018/hash-set.d.ts +1 -1
  40. package/lib/es2018/index.d.ts +2 -0
  41. package/lib/es2018/index.js +2 -0
  42. package/lib/es2018/index.js.map +1 -1
  43. package/lib/es2018/sorted-set.d.ts +10 -0
  44. package/lib/es2018/sorted-set.js +30 -0
  45. package/lib/es2018/sorted-set.js.map +1 -0
  46. package/lib/es2018/sparse-map.d.ts +3 -3
  47. package/lib/es2018/sparse-set.d.ts +2 -1
  48. package/lib/es2018/sparse-set.js +8 -2
  49. package/lib/es2018/sparse-set.js.map +1 -1
  50. package/lib/es2018/trie-map.d.ts +3 -3
  51. package/lib/es2018/utils/skip-list.d.ts +24 -0
  52. package/lib/es2018/utils/skip-list.js +155 -0
  53. package/lib/es2018/utils/skip-list.js.map +1 -0
  54. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- class t{constructor(t){this.value=t}get[Symbol.toStringTag](){return this.constructor.name}set(t){this.value=t}get(){return this.value}}var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n={},r={};function i(t){return Array.isArray(t)}r.isntEmptyArray=r.isEmptyArray=r.isntArray=r.isArray=void 0,r.isArray=i,r.isntArray=function(t){return!i(t)},r.isEmptyArray=function(t){return 0===t.length},r.isntEmptyArray=function(t){return 0!==t.length};var o={},s={};function a(t){return null===t}s.isntNull=s.isNull=void 0,s.isNull=a,s.isntNull=function(t){return!a(t)};var c={};function u(t){return void 0===t}c.isntUndefined=c.isUndefined=void 0,c.isUndefined=u,c.isntUndefined=function(t){return!u(t)};var l={};function f(t){return"function"==typeof t}l.isntFunction=l.isFunction=void 0,l.isFunction=f,l.isntFunction=function(t){return!f(t)},o.isntAsyncIterable=o.isAsyncIterable=void 0;const d=s,y=c,h=l;function v(t){return(0,d.isntNull)(t)&&(0,y.isntUndefined)(t)&&(0,h.isFunction)(t[Symbol.asyncIterator])}o.isAsyncIterable=v,o.isntAsyncIterable=function(t){return!v(t)};var p={};function m(t){return"bigint"==typeof t}p.isntBigInt=p.isBigInt=void 0,p.isBigInt=m,p.isntBigInt=function(t){return!m(t)};var b={};function g(t){return"boolean"==typeof t}b.isntBoolean=b.isBoolean=void 0,b.isBoolean=g,b.isntBoolean=function(t){return!g(t)};var w={},A={};function T(t){return"string"==typeof t}A.isntString=A.isString=void 0,A.isString=T,A.isntString=function(t){return!T(t)},w.isntChar=w.isChar=void 0;const x=A;function I(t){return(0,x.isString)(t)&&1===t.length}w.isChar=I,w.isntChar=function(t){return!I(t)};var S={};function _(t){return t instanceof Date}S.isntDate=S.isDate=void 0,S.isDate=_,S.isntDate=function(t){return!_(t)};var O={};O.inEnum=void 0,O.inEnum=function(t,e){return Object.values(e).includes(t)};var E={};function j(t){return t instanceof Error}E.isntError=E.isError=void 0,E.isError=j,E.isntError=function(t){return!j(t)};var N={};function k(t){return!t}N.isntFalsy=N.isFalsy=void 0,N.isFalsy=k,N.isntFalsy=function(t){return!k(t)};var B={};B.isntIterable=B.isIterable=void 0;const P=s,q=c,C=l;function M(t){return(0,P.isntNull)(t)&&(0,q.isntUndefined)(t)&&(0,C.isFunction)(t[Symbol.iterator])}B.isIterable=M,B.isntIterable=function(t){return!M(t)};var z={},R={};function F(t){return"number"==typeof t}function U(t){return Number.isNaN(t)}R.isntNaN=R.isNaN=R.isNegativeInfinity=R.isPositiveInfinity=R.isFinite=R.isntNumber=R.isNumber=void 0,R.isNumber=F,R.isntNumber=function(t){return!F(t)},R.isFinite=function(t){return Number.isFinite(t)},R.isPositiveInfinity=function(t){return t===1/0},R.isNegativeInfinity=function(t){return t===-1/0},R.isNaN=U,R.isntNaN=function(t){return!U(t)};var D={},V="object"==typeof e&&e&&e.Object===Object&&e,J="object"==typeof self&&self&&self.Object===Object&&self,K=(V||J||Function("return this")()).Symbol,L=K,W=Object.prototype,Y=W.hasOwnProperty,$=W.toString,H=L?L.toStringTag:void 0;var X=function(t){var e=Y.call(t,H),n=t[H];try{t[H]=void 0;var r=!0}catch(t){}var i=$.call(t);return r&&(e?t[H]=n:delete t[H]),i},G=Object.prototype.toString;var Q=X,Z=function(t){return G.call(t)},tt=K?K.toStringTag:void 0;var et=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":tt&&tt in Object(t)?Q(t):Z(t)};var nt=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object);var rt=et,it=nt,ot=function(t){return null!=t&&"object"==typeof t},st=Function.prototype,at=Object.prototype,ct=st.toString,ut=at.hasOwnProperty,lt=ct.call(Object);var ft=function(t){if(!ot(t)||"[object Object]"!=rt(t))return!1;var e=it(t);if(null===e)return!0;var n=ut.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ct.call(n)==lt},dt=e&&e.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};D.isntEmptyObject=D.isEmptyObject=D.isntPlainObject=D.isPlainObject=D.isntObject=D.isObject=void 0;const yt=dt(ft);function ht(t){return null!==t&&"object"==typeof t}function vt(t){return(0,yt.default)(t)}D.isObject=ht,D.isntObject=function(t){return!ht(t)},D.isPlainObject=vt,D.isntPlainObject=function(t){return!vt(t)},D.isEmptyObject=function(t){return 0===Object.keys(t).length},D.isntEmptyObject=function(t){return 0!==Object.keys(t).length},z.isntJsonable=z.isJsonable=z.isntJson=z.isJson=void 0;const pt=s,mt=b,bt=A,gt=R,wt=r,At=D;function Tt(t){return(0,pt.isNull)(t)||(0,mt.isBoolean)(t)||(0,bt.isString)(t)||(0,gt.isNumber)(t)||(0,wt.isArray)(t)&&t.every(Tt)||(0,At.isPlainObject)(t)&&Object.values(t).every(Tt)}z.isJson=Tt,z.isntJson=function(t){return!Tt(t)},z.isJsonable=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},z.isntJsonable=function t(e){return!t()};var xt={};xt.isPromiseLike=xt.isntPromiseLike=xt.isntPromise=xt.isPromise=void 0;const It=D,St=l;function _t(t){return t instanceof Promise}function Ot(t){return(0,It.isObject)(t)&&(0,St.isFunction)(t.then)}xt.isPromise=_t,xt.isntPromise=function(t){return!_t(t)},xt.isntPromiseLike=function(t){return!Ot(t)},xt.isPromiseLike=Ot;var Et={};Et.isAbsoluteURL=void 0,Et.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}};var jt,Nt,kt,Bt={};function Pt(t){return t instanceof RegExp}function qt([t,e]){return n.isNull(e)?[t]:[t,...qt(e)]}function Ct([t,...e]){return[t,e.length?Ct(e):null]}Bt.isntRegExp=Bt.isRegExp=void 0,Bt.isRegExp=Pt,Bt.isntRegExp=function(t){return!Pt(t)},jt=n,Nt=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),(kt=e&&e.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||Nt(e,t,n)})(r,jt),kt(o,jt),kt(p,jt),kt(b,jt),kt(w,jt),kt(S,jt),kt(O,jt),kt(E,jt),kt(N,jt),kt(l,jt),kt(B,jt),kt(z,jt),kt(s,jt),kt(R,jt),kt(D,jt),kt(xt,jt),kt(A,jt),kt(c,jt),kt(Et,jt),kt(Bt,jt);class Mt{constructor(){this.map=new Map}get[Symbol.toStringTag](){return this.constructor.name}on(t,e){this.map.has(t)||this.map.set(t,new Set);return this.map.get(t).add(n),()=>{if(!this.map.has(t))return;const e=this.map.get(t);e.delete(n),0===e.size&&this.map.delete(t)};function n(...t){e(...t)}}once(t,e){const n=this.on(t,((...t)=>{e(...t),n()}));return n}emit(t,...e){this.map.has(t)&&this.map.get(t).forEach((t=>t(...e)))}}class zt{constructor(t){this.hash=t,this.map=new Map}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(t,e){return this.map.set(this.hash(t),e),this}has(t){return this.map.has(this.hash(t))}get(t){return this.map.get(this.hash(t))}delete(t){return this.map.delete(this.hash(t))}clear(){this.map.clear()}}class Rt{constructor(t){this.hash=t,this.map=new Map}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}[Symbol.iterator](){return this.map.values()}add(t){return this.map.set(this.hash(t),t),this}delete(t){return this.map.delete(this.hash(t))}has(t){return this.map.has(this.hash(t))}clear(){this.map.clear()}values(){return this.map.values()}}class Ft{constructor(){this.items=[]}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.items.length}empty(){this.items.length=0}enqueue(...t){this.items.push(...t)}dequeue(){return this.items.shift()}remove(t){let e;for(;(e=this.items.indexOf(t))>=0;)this.items.splice(e,1)}}var Ut={},Dt={},Vt={},Jt={},Kt={},Lt={},Wt={};Wt.go=void 0,Wt.go=function(t){return t()},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(Wt,t)}(Lt);var Yt={},$t={},Ht={},Xt={},Gt={},Qt={},Zt={CustomError:void 0};class te extends Error{get name(){return this.constructor.name}}Zt.CustomError=te;var ee={ExpectedError:void 0};const ne=Zt;class re extends ne.CustomError{}ee.ExpectedError=re;var ie={AssertionError:void 0};const oe=Zt;class se extends oe.CustomError{}ie.AssertionError=se;var ae={};ae.normalize=void 0,ae.normalize=function(t){var e;return{name:t.name,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var ce={refute:void 0};const ue=ee;ce.refute=function(t,e){if(t)throw new ue.ExpectedError(e)};var le={assert:void 0};const fe=ie;le.assert=function(t,e){if(!t)throw new fe.AssertionError(e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Zt,t),r(ee,t),r(ie,t),r(ae,t),r(ce,t),r(le,t)}(Qt),Gt.chunkAsync=void 0;const de=Lt,ye=Qt;Gt.chunkAsync=function(t,e){return(0,ye.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,ye.assert)(e>0,"The parameter size must be greater than 0"),(0,de.go)((async function*(){let n=[];for await(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var he={},ve={},pe={};function me(t){return Array.isArray(t)}pe.isntEmptyArray=pe.isEmptyArray=pe.isntArray=pe.isArray=void 0,pe.isArray=me,pe.isntArray=function(t){return!me(t)},pe.isEmptyArray=function(t){return 0===t.length},pe.isntEmptyArray=function(t){return 0!==t.length};var be={},ge={};function we(t){return null===t}ge.isntNull=ge.isNull=void 0,ge.isNull=we,ge.isntNull=function(t){return!we(t)};var Ae={};function Te(t){return void 0===t}Ae.isntUndefined=Ae.isUndefined=void 0,Ae.isUndefined=Te,Ae.isntUndefined=function(t){return!Te(t)},be.isntAsyncIterable=be.isAsyncIterable=void 0;const xe=ge,Ie=Ae;function Se(t){return(0,xe.isntNull)(t)&&(0,Ie.isntUndefined)(t)&&"function"==typeof t[Symbol.asyncIterator]}be.isAsyncIterable=Se,be.isntAsyncIterable=function(t){return!Se(t)};var _e={};function Oe(t){return"bigint"==typeof t}_e.isntBigInt=_e.isBigInt=void 0,_e.isBigInt=Oe,_e.isntBigInt=function(t){return!Oe(t)};var Ee={};function je(t){return"boolean"==typeof t}Ee.isntBoolean=Ee.isBoolean=void 0,Ee.isBoolean=je,Ee.isntBoolean=function(t){return!je(t)};var Ne={},ke={};function Be(t){return"string"==typeof t}ke.isntString=ke.isString=void 0,ke.isString=Be,ke.isntString=function(t){return!Be(t)},Ne.isntChar=Ne.isChar=void 0;const Pe=ke;function qe(t){return(0,Pe.isString)(t)&&1===t.length}Ne.isChar=qe,Ne.isntChar=function(t){return!qe(t)};var Ce={};function Me(t){return t instanceof Date}Ce.isntDate=Ce.isDate=void 0,Ce.isDate=Me,Ce.isntDate=function(t){return!Me(t)};var ze={};ze.inEnum=void 0,ze.inEnum=function(t,e){return Object.values(e).includes(t)};var Re={};function Fe(t){return t instanceof Error}Re.isntError=Re.isError=void 0,Re.isError=Fe,Re.isntError=function(t){return!Fe(t)};var Ue={};function De(t){return!t}Ue.isntFalsy=Ue.isFalsy=void 0,Ue.isFalsy=De,Ue.isntFalsy=function(t){return!De(t)};var Ve={};function Je(t){return"function"==typeof t}Ve.isntFunction=Ve.isFunction=void 0,Ve.isFunction=Je,Ve.isntFunction=function(t){return!Je(t)};var Ke={};Ke.isntIterable=Ke.isIterable=void 0;const Le=ge,We=Ae;function Ye(t){return(0,Le.isntNull)(t)&&(0,We.isntUndefined)(t)&&"function"==typeof t[Symbol.iterator]}Ke.isIterable=Ye,Ke.isntIterable=function(t){return!Ye(t)};var $e={},He={};var Xe=Function.prototype,Ge=Object.prototype,Qe=Xe.toString,Ze=Ge.hasOwnProperty,tn=Qe.call(Object),en=Ge.toString,nn=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object);var rn=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=en.call(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t))return!1;var e=nn(t);if(null===e)return!0;var n=Ze.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Qe.call(n)==tn},on=e&&e.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};He.isntEmptyObject=He.isEmptyObject=He.isntPlainObject=He.isPlainObject=He.isntObject=He.isObject=void 0;const sn=on(rn);function an(t){return null!==t&&"object"==typeof t}function cn(t){return(0,sn.default)(t)}He.isObject=an,He.isntObject=function(t){return!an(t)},He.isPlainObject=cn,He.isntPlainObject=function(t){return!cn(t)},He.isEmptyObject=function(t){return 0===Object.keys(t).length},He.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var un={};function ln(t){return"number"==typeof t}un.isntNumber=un.isNumber=void 0,un.isNumber=ln,un.isntNumber=function(t){return!ln(t)},$e.isntJsonRpcError=$e.isJsonRpcError=$e.isntJsonRpcSuccess=$e.isJsonRpcSuccess=$e.isntJsonRpcRequest=$e.isJsonRpcRequest=$e.isntJsonRpcNotification=$e.isJsonRpcNotification=void 0;const fn=pe,dn=He,yn=ke,hn=un,vn=Ae;function pn(t){return(0,yn.isString)(t)||(0,hn.isNumber)(t)}function mn(t){return(0,fn.isArray)(t)||(0,dn.isObject)(t)}function bn(t){return(0,dn.isPlainObject)(t)&&(0,yn.isString)(t.jsonrpc)&&(0,yn.isString)(t.method)&&(0,vn.isUndefined)(t.id)&&mn(t.params)}function gn(t){return(0,dn.isPlainObject)(t)&&(0,yn.isString)(t.jsonrpc)&&(0,yn.isString)(t.method)&&pn(t.id)&&mn(t.params)}function wn(t){return(0,dn.isPlainObject)(t)&&(0,yn.isString)(t.jsonrpc)&&(0,yn.isString)(t.id)&&"result"in t}function An(t){return(0,dn.isPlainObject)(t)&&(0,yn.isString)(t.jsonrpc)&&pn(t.id)&&function(t){return(0,dn.isPlainObject)(t)&&(0,hn.isNumber)(t.code)&&(0,yn.isString)(t.message)&&((0,vn.isUndefined)(t.data)||(0,dn.isObject)(t.data))}(t.error)}$e.isJsonRpcNotification=bn,$e.isntJsonRpcNotification=function(t){return!bn(t)},$e.isJsonRpcRequest=gn,$e.isntJsonRpcRequest=function(t){return!gn(t)},$e.isJsonRpcSuccess=wn,$e.isntJsonRpcSuccess=function(t){return!wn(t)},$e.isJsonRpcError=An,$e.isntJsonRpcError=function(t){return!An(t)};var Tn={};Tn.isntJson=Tn.isJson=void 0,Tn.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},Tn.isntJson=function t(e){return!t()};var xn={};xn.isAbsoluteURL=void 0,xn.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(pe,t),r(be,t),r(_e,t),r(Ee,t),r(Ne,t),r(Ce,t),r(ze,t),r(Re,t),r(Ue,t),r(Ve,t),r(Ke,t),r($e,t),r(Tn,t),r(ge,t),r(un,t),r(He,t),r(ke,t),r(Ae,t),r(xn,t)}(ve),he.chunkByAsync=void 0;const In=ve;he.chunkByAsync=function(t,e){return(0,In.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var Sn={};Sn.chunkBy=void 0,Sn.chunkBy=function*(t,e){let n=[],r=0;for(const i of t)n.push(i),e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var _n={chunk:void 0};const On=Lt,En=Qt;_n.chunk=function(t,e){return(0,En.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,En.assert)(e>0,"The parameter size must be greater than 0"),(0,On.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var jn={concatAsync:void 0};const Nn=ve,kn=Lt;jn.concatAsync=function(t,...e){return(0,kn.go)((async function*(){for(const n of[t,...e])if((0,Nn.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var Bn={concat:void 0};const Pn=Lt;Bn.concat=function(t,...e){return(0,Pn.go)((function*(){for(const n of[t,...e])yield*n}))};var qn={},Cn={};Cn.copyIterable=Cn.copyAsyncIterable=void 0,Cn.copyAsyncIterable=async function*(t){for await(const e of t)yield e},Cn.copyIterable=function*(t){for(const e of t)yield e},qn.dropAsync=void 0;const Mn=Lt,zn=Cn,Rn=Qt;qn.dropAsync=function(t,e){return(0,Rn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Rn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,zn.copyAsyncIterable)(t):(0,Mn.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{let t;for(;!(({value:t,done:i}=await r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Fn={dropRightAsync:void 0};const Un=Lt,Dn=Cn,Vn=Qt;Fn.dropRightAsync=function(t,e){return(0,Vn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Vn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Dn.copyAsyncIterable)(t):(0,Un.go)((async function*(){const n=(await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t)).slice(0,-e);for(const t of n)yield t}))};var Jn={dropRight:void 0};const Kn=Lt,Ln=Cn,Wn=Qt;Jn.dropRight=function(t,e){return(0,Wn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Wn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Ln.copyIterable)(t):(0,Kn.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Yn={dropUntilAsync:void 0};const $n=ve;Yn.dropUntilAsync=function(t,e){return(0,$n.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=await r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(t):async function*(t){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var Hn={};Hn.dropUntil=void 0,Hn.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}};var Xn={drop:void 0};const Gn=Lt,Qn=Cn,Zn=Qt;Xn.drop=function(t,e){return(0,Zn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Zn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Qn.copyIterable)(t):(0,Gn.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{let t;for(;!(({value:t,done:i}=r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var tr={filterAsync:void 0};const er=ve;tr.filterAsync=function(t,e){return(0,er.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var nr={};nr.filter=void 0,nr.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var rr={},ir={},or={flattenByAsync:void 0};const sr=ve;function ar(t){return(0,sr.isIterable)(t)&&(0,sr.isntChar)(t)}or.flattenByAsync=function(t,e){return(0,sr.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)ar(i)&&await e(i,r)?yield*n(i,r+1):yield i}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const i of t)ar(i)&&await e(i,r)?yield*n(i,r+1):yield i}},ir.flattenDeepAsync=void 0;const cr=or,ur=Qt;ir.flattenDeepAsync=function(t,e=1/0){return(0,ur.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,ur.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,cr.flattenByAsync)(t,((t,n)=>n<=e))},rr.flattenAsync=void 0;const lr=ir;rr.flattenAsync=function(t){return(0,lr.flattenDeepAsync)(t,1)};var fr={flattenBy:void 0};const dr=ve;fr.flattenBy=function(t,e){return function*t(n,r){for(const o of n)(0,dr.isIterable)(i=o)&&(0,dr.isntChar)(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var yr={flattenDeep:void 0};const hr=fr,vr=Qt;yr.flattenDeep=function(t,e=1/0){return(0,vr.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,vr.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,hr.flattenBy)(t,((t,n)=>n<=e))};var pr={flatten:void 0};const mr=yr;pr.flatten=function(t){return(0,mr.flattenDeep)(t,1)};var br={mapAsync:void 0};const gr=ve;br.mapAsync=function(t,e){return(0,gr.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)yield await e(r,n),n++}(t):async function*(t){let n=0;for(const r of t)yield await e(r,n),n++}(t)};var wr={};wr.map=void 0,wr.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var Ar={repeatAsync:void 0};const Tr=Lt,xr=Qt;Ar.repeatAsync=function(t,e){return(0,xr.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,xr.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,Tr.go)((async function*(){const n=[];if(e>0){for await(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Ir={repeat:void 0};const Sr=Lt,_r=Qt;Ir.repeat=function(t,e){return(0,_r.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,_r.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,Sr.go)((function*(){const n=[];if(e>0){for(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Or={sliceAsync:void 0};const Er=Lt,jr=Qt;Or.sliceAsync=function(t,e,n=1/0){return(0,jr.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,jr.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,jr.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,jr.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Er.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Nr={slice:void 0};const kr=Lt,Br=Qt;Nr.slice=function(t,e,n=1/0){return(0,Br.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Br.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Br.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Br.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,kr.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Pr={};Pr.splitAsync=void 0,Pr.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var qr={splitByAsync:void 0};const Cr=ve;qr.splitByAsync=function(t,e){return(0,Cr.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t):async function*(t){let n=[],r=0;for(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t)};var Mr={};Mr.splitBy=void 0,Mr.splitBy=function*(t,e){let n=[],r=0;for(const i of t)e(i,r)?(yield n,n=[]):n.push(i),r++;yield n};var zr={};zr.split=void 0,zr.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Rr={takeAsync:void 0};const Fr=Lt,Ur=Qt;Rr.takeAsync=function(t,e){return(0,Ur.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ur.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Fr.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Dr={takeRightAsync:void 0};const Vr=Lt,Jr=Qt;Dr.takeRightAsync=function(t,e){return(0,Jr.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Jr.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Vr.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=await r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Kr={takeRight:void 0};const Lr=Lt,Wr=Qt;Kr.takeRight=function(t,e){return(0,Wr.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Wr.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Lr.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var Yr={takeUntilAsync:void 0};const $r=ve;Yr.takeUntilAsync=function(t,e){return(0,$r.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t){if(await e(r,n))break;yield r,n++}}(t):async function*(t){let n=0;for(const r of t){if(await e(r,n))break;yield r,n++}}(t)};var Hr={};Hr.takeUntil=void 0,Hr.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var Xr={take:void 0};const Gr=Lt,Qr=Qt;Xr.take=function(t,e){return(0,Qr.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Qr.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Gr.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Zr={tapAsync:void 0};const ti=ve;Zr.tapAsync=function(t,e){return(0,ti.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n),yield r,n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n),yield r,n++}(t)};var ei={};ei.tap=void 0,ei.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var ni={};ni.toAsyncIterable=void 0,ni.toAsyncIterable=async function*(t){for(const e of t)yield e};var ri={};ri.transformAsync=void 0,ri.transformAsync=async function*(t,e){yield*e(t)};var ii={};ii.transform=void 0,ii.transform=function*(t,e){yield*e(t)};var oi={};oi.uniqAsync=void 0,oi.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var si={uniqByAsync:void 0};const ai=ve;si.uniqByAsync=function(t,e){return(0,ai.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t)};var ci={};ci.uniqBy=void 0,ci.uniqBy=function*(t,e){const n=new Set;let r=0;for(const i of t){const t=e(i,r);n.has(t)||(yield i,n.add(t)),r++}};var ui={};ui.uniq=void 0,ui.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var li={zipAsync:void 0};const fi=ve;var di;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(di||(di={})),li.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,s=t.map((t=>(0,fi.isAsyncIterable)(t)?[di.Async,t[Symbol.asyncIterator]()]:[di.Sync,t[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=s[e];let i;if(i=n===di.Async?await r.next():r.next(),i.done)return void(a[e]=!0);t[e]=i.value}yield t}}finally{const t=s.filter(((t,e)=>!a[e]));for(const[o,s]of t)o===di.Async?await(null===(n=(e=s).return)||void 0===n?void 0:n.call(e)):null===(i=(r=s).return)||void 0===i||i.call(r)}}(t,...e)};var yi={};yi.zip=void 0,yi.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let i=0;i<e;i++){const{value:e,done:o}=n[i].next();if(o)return void(r[i]=!0);t[i]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Gt,t),r(he,t),r(Sn,t),r(_n,t),r(jn,t),r(Bn,t),r(qn,t),r(Fn,t),r(Jn,t),r(Yn,t),r(Hn,t),r(Xn,t),r(tr,t),r(nr,t),r(rr,t),r(or,t),r(fr,t),r(ir,t),r(yr,t),r(pr,t),r(br,t),r(wr,t),r(Ar,t),r(Ir,t),r(Or,t),r(Nr,t),r(Pr,t),r(qr,t),r(Mr,t),r(zr,t),r(Rr,t),r(Dr,t),r(Kr,t),r(Yr,t),r(Hr,t),r(Xr,t),r(Zr,t),r(ei,t),r(ni,t),r(ri,t),r(ii,t),r(oi,t),r(si,t),r(ci,t),r(ui,t),r(li,t),r(yi,t)}(Xt);var hi={},vi={};vi.consume=void 0,vi.consume=function(t,e){return e(t)};var pi={eachAsync:void 0};const mi=ve;pi.eachAsync=function(t,e){return(0,mi.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t)await e(r,n),n++}(t):async function(t){let n=0;for(const r of t)await e(r,n),n++}(t)};var bi={};bi.each=void 0,bi.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var gi={everyAsync:void 0};const wi=ve;gi.everyAsync=function(t,e){return(0,wi.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(!await e(r,n))return!1;n++}return!0}(t):async function(t){let n=0;for(const r of t){if(!await e(r,n))return!1;n++}return!0}(t)};var Ai={};Ai.every=void 0,Ai.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var Ti={findAsync:void 0};const xi=ve;Ti.findAsync=function(t,e){return(0,xi.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return r;n++}return}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return r;n++}return}(t)};var Ii={};Ii.find=void 0,Ii.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var Si={};Si.firstAsync=void 0,Si.firstAsync=async function(t){for await(const e of t)return e};var _i={};_i.first=void 0,_i.first=function(t){for(const e of t)return e};var Oi={};Oi.includesAsync=void 0,Oi.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var Ei={};Ei.includes=void 0,Ei.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var ji={};ji.matchAsync=void 0,ji.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var Ni={};Ni.match=void 0,Ni.match=function(t,e){const n=e.length;let r=0;for(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var ki={reduceAsync:void 0};const Bi=ve;ki.reduceAsync=function(t,e,n){return(0,Bi.isUndefined)(n)?function(t,e){return(0,Bi.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,s=await o(r),a=1;for(;({value:t,done:i}=await r.next()),!i;)s=await e(s,t,a++);return s}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function o(t){const e=await t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=await e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,Bi.isAsyncIterable)(t)?i(t):r(t);async function r(t){let r=n,i=0;for(const n of t)r=await e(r,n,i++);return r}async function i(t){let r=n,i=0;for await(const n of t)r=await e(r,n,i++);return r}}(t,e,n)};var Pi={reduce:void 0};const qi=ve;Pi.reduce=function(t,e,n){return(0,qi.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,i=0;for(const n of t)r=e(r,n,i++);return r}(t,e,n)};var Ci={someAsync:void 0};const Mi=ve;Ci.someAsync=function(t,e){return(0,Mi.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return!0;n++}return!1}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return!0;n++}return!1}(t)};var zi={};zi.some=void 0,zi.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Ri={};Ri.lastAsync=void 0,Ri.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,i;for(;({value:t,done:r}=await n.next()),!r;)i=t;return i}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var Fi={};Fi.last=void 0,Fi.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,i;for(;({value:t,done:r}=n.next()),!r;)i=t;return i}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var Ui={toArrayAsync:void 0};const Di=vi;Ui.toArrayAsync=function(t){return(0,Di.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Vi={toArray:void 0};const Ji=vi;Vi.toArray=function(t){return(0,Ji.consume)(t,(t=>Array.from(t)))};var Ki={toSetAsync:void 0};const Li=vi;Ki.toSetAsync=function(t){return(0,Li.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Wi={toSet:void 0};const Yi=vi;Wi.toSet=function(t){return(0,Yi.consume)(t,(t=>new Set(t)))},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(vi,t),r(pi,t),r(bi,t),r(gi,t),r(Ai,t),r(Ti,t),r(Ii,t),r(Si,t),r(_i,t),r(Oi,t),r(Ei,t),r(ji,t),r(Ni,t),r(ki,t),r(Pi,t),r(Ci,t),r(zi,t),r(Ri,t),r(Fi,t),r(Ui,t),r(Vi,t),r(Ki,t),r(Wi,t)}(hi),function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Xt,t),r(hi,t)}(Ht);var $i={},Hi={};Hi.traverseErrorPrototypeChain=void 0,Hi.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},$i.getErrorNames=void 0;const Xi=ve,Gi=Hi;$i.getErrorNames=function*(t){var e;if((0,Xi.isError)(t))for(const n of(0,Gi.traverseErrorPrototypeChain)(t))(null===(e=n.constructor)||void 0===e?void 0:e.name)&&(yield n.constructor.name);else yield t.name,yield*t.ancestors};var Qi={isSerializableError:void 0};const Zi=ve;Qi.isSerializableError=function(t){return(0,Zi.isObject)(t)&&(0,Zi.isString)(t.name)&&(0,Zi.isString)(t.message)&&((0,Zi.isString)(t.stack)||(0,Zi.isNull)(t.stack))&&(0,Zi.isArray)(t.ancestors)&&t.ancestors.every(Zi.isString)},$t.CustomError=void 0;const to=Ht,eo=$i,no=ve,ro=Qi;class io extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,to.first)((0,eo.getErrorNames)(this)))&&void 0!==t?t:io.name)&&void 0!==e?e:"CustomError"}static[Symbol.hasInstance](t){var e;if((0,no.isError)(t)||(0,ro.isSerializableError)(t)){const n=[null!==(e=this.prototype.constructor.name)&&void 0!==e?e:this.name,...(0,eo.getErrorNames)(this.prototype)].reverse(),r=(0,to.toArray)((0,eo.getErrorNames)(t)).reverse();return n.every(((t,e)=>t===r[e]))}return!1}}$t.CustomError=io;var oo={AssertionError:void 0};const so=$t;class ao extends so.CustomError{}oo.AssertionError=ao;var co={normalize:void 0};const uo=$i,lo=Ht;co.normalize=function(t){var e;const[n,...r]=(0,lo.toArray)((0,uo.getErrorNames)(t));return{name:n,ancestors:r,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var fo={},yo={},ho={};ho.pass=void 0,ho.pass=function(){},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(ho,t)}(yo),fo.hydrate=void 0;const vo=yo;function po(t,e){const n=function(){(0,vo.pass)()};return(n.prototype=Object.create(t.prototype)).constructor=n,Object.defineProperty(n,"name",{value:e}),n}fo.hydrate=function(t){var e;const n=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of n)r=po(r,t);const i=new r;return i.name=t.name,i.message=t.message,i.stack=null!==(e=t.stack)&&void 0!==e?e:void 0,i};var mo={assert:void 0};const bo=oo;mo.assert=function(t,e){if(!t)throw new bo.AssertionError(e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r($t,t),r(oo,t),r(Qi,t),r(co,t),r(fo,t),r(mo,t),r($i,t),r(Hi,t)}(Yt),Kt.chunkAsync=void 0;const go=Lt,wo=Yt;Kt.chunkAsync=function(t,e){return(0,wo.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,wo.assert)(e>0,"The parameter size must be greater than 0"),(0,go.go)((async function*(){let n=[];for await(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Ao={chunkByAsync:void 0};const To=ve;Ao.chunkByAsync=function(t,e){return(0,To.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var xo={};xo.chunkBy=void 0,xo.chunkBy=function*(t,e){let n=[],r=0;for(const i of t)n.push(i),e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var Io={chunk:void 0};const So=Lt,_o=Yt;Io.chunk=function(t,e){return(0,_o.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,_o.assert)(e>0,"The parameter size must be greater than 0"),(0,So.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Oo={concatAsync:void 0};const Eo=ve,jo=Lt;Oo.concatAsync=function(t,...e){return(0,jo.go)((async function*(){for(const n of[t,...e])if((0,Eo.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var No={concat:void 0};const ko=Lt;No.concat=function(t,...e){return(0,ko.go)((function*(){for(const n of[t,...e])yield*n}))};var Bo={},Po={};Po.copyIterable=Po.copyAsyncIterable=void 0,Po.copyAsyncIterable=async function*(t){for await(const e of t)yield e},Po.copyIterable=function*(t){for(const e of t)yield e},Bo.dropAsync=void 0;const qo=Lt,Co=Po,Mo=Yt;Bo.dropAsync=function(t,e){return(0,Mo.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Mo.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Co.copyAsyncIterable)(t):(0,qo.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{let t;for(;!(({value:t,done:i}=await r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var zo={dropRightAsync:void 0};const Ro=Lt,Fo=Po,Uo=Yt;zo.dropRightAsync=function(t,e){return(0,Uo.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Uo.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Fo.copyAsyncIterable)(t):(0,Ro.go)((async function*(){const n=(await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t)).slice(0,-e);for(const t of n)yield t}))};var Do={dropRight:void 0};const Vo=Lt,Jo=Po,Ko=Yt;Do.dropRight=function(t,e){return(0,Ko.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ko.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Jo.copyIterable)(t):(0,Vo.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Lo={dropUntilAsync:void 0};const Wo=ve;Lo.dropUntilAsync=function(t,e){return(0,Wo.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=await r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(t):async function*(t){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var Yo={};Yo.dropUntil=void 0,Yo.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}};var $o={drop:void 0};const Ho=Lt,Xo=Po,Go=Yt;$o.drop=function(t,e){return(0,Go.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Go.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Xo.copyIterable)(t):(0,Ho.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{let t;for(;!(({value:t,done:i}=r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var Qo={filterAsync:void 0};const Zo=ve;Qo.filterAsync=function(t,e){return(0,Zo.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var ts={};ts.filter=void 0,ts.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var es={},ns={},rs={flattenByAsync:void 0};const is=ve;function os(t){return(0,is.isIterable)(t)&&(0,is.isntChar)(t)}rs.flattenByAsync=function(t,e){return(0,is.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)os(i)&&await e(i,r)?yield*n(i,r+1):yield i}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const i of t)os(i)&&await e(i,r)?yield*n(i,r+1):yield i}},ns.flattenDeepAsync=void 0;const ss=rs,as=Yt;ns.flattenDeepAsync=function(t,e=1/0){return(0,as.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,as.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,ss.flattenByAsync)(t,((t,n)=>n<=e))},es.flattenAsync=void 0;const cs=ns;es.flattenAsync=function(t){return(0,cs.flattenDeepAsync)(t,1)};var us={flattenBy:void 0};const ls=ve;us.flattenBy=function(t,e){return function*t(n,r){for(const o of n)(0,ls.isIterable)(i=o)&&(0,ls.isntChar)(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var fs={flattenDeep:void 0};const ds=us,ys=Yt;fs.flattenDeep=function(t,e=1/0){return(0,ys.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,ys.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,ds.flattenBy)(t,((t,n)=>n<=e))};var hs={flatten:void 0};const vs=fs;hs.flatten=function(t){return(0,vs.flattenDeep)(t,1)};var ps={mapAsync:void 0};const ms=ve;ps.mapAsync=function(t,e){return(0,ms.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)yield await e(r,n),n++}(t):async function*(t){let n=0;for(const r of t)yield await e(r,n),n++}(t)};var bs={};bs.map=void 0,bs.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var gs={repeatAsync:void 0};const ws=Lt,As=Yt;gs.repeatAsync=function(t,e){return(0,As.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,As.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,ws.go)((async function*(){const n=[];if(e>0){for await(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Ts={repeat:void 0};const xs=Lt,Is=Yt;Ts.repeat=function(t,e){return(0,Is.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Is.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,xs.go)((function*(){const n=[];if(e>0){for(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Ss={sliceAsync:void 0};const _s=Lt,Os=Yt;Ss.sliceAsync=function(t,e,n=1/0){return(0,Os.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Os.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Os.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Os.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,_s.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Es={slice:void 0};const js=Lt,Ns=Yt;Es.slice=function(t,e,n=1/0){return(0,Ns.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Ns.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Ns.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Ns.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,js.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var ks={};ks.splitAsync=void 0,ks.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Bs={splitByAsync:void 0};const Ps=ve;Bs.splitByAsync=function(t,e){return(0,Ps.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t):async function*(t){let n=[],r=0;for(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t)};var qs={};qs.splitBy=void 0,qs.splitBy=function*(t,e){let n=[],r=0;for(const i of t)e(i,r)?(yield n,n=[]):n.push(i),r++;yield n};var Cs={};Cs.split=void 0,Cs.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Ms={takeAsync:void 0};const zs=Lt,Rs=Yt;Ms.takeAsync=function(t,e){return(0,Rs.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Rs.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,zs.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Fs={takeRightAsync:void 0};const Us=Lt,Ds=Yt;Fs.takeRightAsync=function(t,e){return(0,Ds.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ds.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Us.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=await r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Vs={takeRight:void 0};const Js=Lt,Ks=Yt;Vs.takeRight=function(t,e){return(0,Ks.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ks.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Js.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var Ls={takeUntilAsync:void 0};const Ws=ve;Ls.takeUntilAsync=function(t,e){return(0,Ws.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t){if(await e(r,n))break;yield r,n++}}(t):async function*(t){let n=0;for(const r of t){if(await e(r,n))break;yield r,n++}}(t)};var Ys={};Ys.takeUntil=void 0,Ys.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var $s={take:void 0};const Hs=Lt,Xs=Yt;$s.take=function(t,e){return(0,Xs.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Xs.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Hs.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Gs={tapAsync:void 0};const Qs=ve;Gs.tapAsync=function(t,e){return(0,Qs.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n),yield r,n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n),yield r,n++}(t)};var Zs={};Zs.tap=void 0,Zs.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var ta={};ta.toAsyncIterable=void 0,ta.toAsyncIterable=async function*(t){for(const e of t)yield e};var ea={};ea.transformAsync=void 0,ea.transformAsync=async function*(t,e){yield*e(t)};var na={};na.transform=void 0,na.transform=function*(t,e){yield*e(t)};var ra={};ra.uniqAsync=void 0,ra.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var ia={uniqByAsync:void 0};const oa=ve;ia.uniqByAsync=function(t,e){return(0,oa.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t)};var sa={};sa.uniqBy=void 0,sa.uniqBy=function*(t,e){const n=new Set;let r=0;for(const i of t){const t=e(i,r);n.has(t)||(yield i,n.add(t)),r++}};var aa={};aa.uniq=void 0,aa.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var ca={zipAsync:void 0};const ua=ve;var la;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(la||(la={})),ca.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,s=t.map((t=>(0,ua.isAsyncIterable)(t)?[la.Async,t[Symbol.asyncIterator]()]:[la.Sync,t[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=s[e];let i;if(i=n===la.Async?await r.next():r.next(),i.done)return void(a[e]=!0);t[e]=i.value}yield t}}finally{const t=s.filter(((t,e)=>!a[e]));for(const[o,s]of t)o===la.Async?await(null===(n=(e=s).return)||void 0===n?void 0:n.call(e)):null===(i=(r=s).return)||void 0===i||i.call(r)}}(t,...e)};var fa={};fa.zip=void 0,fa.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let i=0;i<e;i++){const{value:e,done:o}=n[i].next();if(o)return void(r[i]=!0);t[i]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Kt,t),r(Ao,t),r(xo,t),r(Io,t),r(Oo,t),r(No,t),r(Bo,t),r(zo,t),r(Do,t),r(Lo,t),r(Yo,t),r($o,t),r(Qo,t),r(ts,t),r(es,t),r(rs,t),r(us,t),r(ns,t),r(fs,t),r(hs,t),r(ps,t),r(bs,t),r(gs,t),r(Ts,t),r(Ss,t),r(Es,t),r(ks,t),r(Bs,t),r(qs,t),r(Cs,t),r(Ms,t),r(Fs,t),r(Vs,t),r(Ls,t),r(Ys,t),r($s,t),r(Gs,t),r(Zs,t),r(ta,t),r(ea,t),r(na,t),r(ra,t),r(ia,t),r(sa,t),r(aa,t),r(ca,t),r(fa,t)}(Jt);var da={},ya={};ya.consume=void 0,ya.consume=function(t,e){return e(t)};var ha={eachAsync:void 0};const va=ve;ha.eachAsync=function(t,e){return(0,va.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t)await e(r,n),n++}(t):async function(t){let n=0;for(const r of t)await e(r,n),n++}(t)};var pa={};pa.each=void 0,pa.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var ma={everyAsync:void 0};const ba=ve;ma.everyAsync=function(t,e){return(0,ba.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(!await e(r,n))return!1;n++}return!0}(t):async function(t){let n=0;for(const r of t){if(!await e(r,n))return!1;n++}return!0}(t)};var ga={};ga.every=void 0,ga.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var wa={findAsync:void 0};const Aa=ve;wa.findAsync=function(t,e){return(0,Aa.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return r;n++}return}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return r;n++}return}(t)};var Ta={};Ta.find=void 0,Ta.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var xa={};xa.firstAsync=void 0,xa.firstAsync=async function(t){for await(const e of t)return e};var Ia={};Ia.first=void 0,Ia.first=function(t){for(const e of t)return e};var Sa={};Sa.includesAsync=void 0,Sa.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var _a={};_a.includes=void 0,_a.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var Oa={};Oa.matchAsync=void 0,Oa.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var Ea={};Ea.match=void 0,Ea.match=function(t,e){const n=e.length;let r=0;for(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var ja={reduceAsync:void 0};const Na=ve;ja.reduceAsync=function(t,e,n){return(0,Na.isUndefined)(n)?function(t,e){return(0,Na.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,s=await o(r),a=1;for(;({value:t,done:i}=await r.next()),!i;)s=await e(s,t,a++);return s}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function o(t){const e=await t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=await e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,Na.isAsyncIterable)(t)?i(t):r(t);async function r(t){let r=n,i=0;for(const n of t)r=await e(r,n,i++);return r}async function i(t){let r=n,i=0;for await(const n of t)r=await e(r,n,i++);return r}}(t,e,n)};var ka={reduce:void 0};const Ba=ve;ka.reduce=function(t,e,n){return(0,Ba.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,i=0;for(const n of t)r=e(r,n,i++);return r}(t,e,n)};var Pa={someAsync:void 0};const qa=ve;Pa.someAsync=function(t,e){return(0,qa.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return!0;n++}return!1}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return!0;n++}return!1}(t)};var Ca={};Ca.some=void 0,Ca.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Ma={};Ma.lastAsync=void 0,Ma.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,i;for(;({value:t,done:r}=await n.next()),!r;)i=t;return i}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var za={};za.last=void 0,za.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,i;for(;({value:t,done:r}=n.next()),!r;)i=t;return i}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var Ra={toArrayAsync:void 0};const Fa=ya;Ra.toArrayAsync=function(t){return(0,Fa.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Ua={toArray:void 0};const Da=ya;Ua.toArray=function(t){return(0,Da.consume)(t,(t=>Array.from(t)))};var Va={toSetAsync:void 0};const Ja=ya;Va.toSetAsync=function(t){return(0,Ja.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Ka={toSet:void 0};const La=ya;Ka.toSet=function(t){return(0,La.consume)(t,(t=>new Set(t)))},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(ya,t),r(ha,t),r(pa,t),r(ma,t),r(ga,t),r(wa,t),r(Ta,t),r(xa,t),r(Ia,t),r(Sa,t),r(_a,t),r(Oa,t),r(Ea,t),r(ja,t),r(ka,t),r(Pa,t),r(Ca,t),r(Ma,t),r(za,t),r(Ra,t),r(Ua,t),r(Va,t),r(Ka,t)}(da),function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Jt,t),r(da,t)}(Vt);var Wa={},Ya={};Ya.traverseErrorPrototypeChain=void 0,Ya.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},Wa.getErrorNames=void 0;const $a=ve,Ha=Ya;Wa.getErrorNames=function*(t){var e;if((0,$a.isError)(t))for(const n of(0,Ha.traverseErrorPrototypeChain)(t))(null===(e=n.constructor)||void 0===e?void 0:e.name)&&(yield n.constructor.name);else yield t.name,yield*t.ancestors};var Xa={isSerializableError:void 0};const Ga=ve;Xa.isSerializableError=function(t){return(0,Ga.isObject)(t)&&(0,Ga.isString)(t.name)&&(0,Ga.isString)(t.message)&&((0,Ga.isString)(t.stack)||(0,Ga.isNull)(t.stack))&&(0,Ga.isArray)(t.ancestors)&&t.ancestors.every(Ga.isString)},Dt.CustomError=void 0;const Qa=Vt,Za=Wa,tc=ve,ec=Xa;class nc extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,Qa.first)((0,Za.getErrorNames)(this)))&&void 0!==t?t:nc.name)&&void 0!==e?e:"CustomError"}static[Symbol.hasInstance](t){var e;if((0,tc.isError)(t)||(0,ec.isSerializableError)(t)){const n=[null!==(e=this.prototype.constructor.name)&&void 0!==e?e:this.name,...(0,Za.getErrorNames)(this.prototype)].reverse(),r=(0,Qa.toArray)((0,Za.getErrorNames)(t)).reverse();return n.every(((t,e)=>t===r[e]))}return!1}}Dt.CustomError=nc;var rc={AssertionError:void 0};const ic=Dt;class oc extends ic.CustomError{}rc.AssertionError=oc;var sc={normalize:void 0};const ac=Wa,cc=Vt;sc.normalize=function(t){var e;const[n,...r]=(0,cc.toArray)((0,ac.getErrorNames)(t));return{name:n,ancestors:r,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var uc={},lc={},fc={};fc.pass=void 0,fc.pass=function(){},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(fc,t)}(lc),uc.hydrate=void 0;const dc=lc;function yc(t,e){const n=function(){(0,dc.pass)()};return(n.prototype=Object.create(t.prototype)).constructor=n,Object.defineProperty(n,"name",{value:e}),n}uc.hydrate=function(t){var e;const n=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of n)r=yc(r,t);const i=new r;return i.name=t.name,i.message=t.message,i.stack=null!==(e=t.stack)&&void 0!==e?e:void 0,i};var hc={assert:void 0};const vc=rc;hc.assert=function(t,e){if(!t)throw new vc.AssertionError(e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Dt,t),r(rc,t),r(Xa,t),r(sc,t),r(uc,t),r(hc,t),r(Wa,t),r(Ya,t)}(Ut);var pc={},mc={},bc={},gc={},wc={};wc.go=void 0,wc.go=function(t){return t()},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]});(e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(wc,t)}(gc),bc.chunkAsync=void 0;const Ac=gc,Tc=Ut;bc.chunkAsync=function(t,e){return(0,Tc.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,Tc.assert)(e>0,"The parameter size must be greater than 0"),(0,Ac.go)((async function*(){let n=[];for await(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var xc={},Ic={},Sc={};function _c(t){return Array.isArray(t)}Sc.isntEmptyArray=Sc.isEmptyArray=Sc.isntArray=Sc.isArray=void 0,Sc.isArray=_c,Sc.isntArray=function(t){return!_c(t)},Sc.isEmptyArray=function(t){return 0===t.length},Sc.isntEmptyArray=function(t){return 0!==t.length};var Oc={},Ec={};function jc(t){return null===t}Ec.isntNull=Ec.isNull=void 0,Ec.isNull=jc,Ec.isntNull=function(t){return!jc(t)};var Nc={};function kc(t){return void 0===t}Nc.isntUndefined=Nc.isUndefined=void 0,Nc.isUndefined=kc,Nc.isntUndefined=function(t){return!kc(t)};var Bc={};function Pc(t){return"function"==typeof t}Bc.isntFunction=Bc.isFunction=void 0,Bc.isFunction=Pc,Bc.isntFunction=function(t){return!Pc(t)},Oc.isntAsyncIterable=Oc.isAsyncIterable=void 0;const qc=Ec,Cc=Nc,Mc=Bc;function zc(t){return(0,qc.isntNull)(t)&&(0,Cc.isntUndefined)(t)&&(0,Mc.isFunction)(t[Symbol.asyncIterator])}Oc.isAsyncIterable=zc,Oc.isntAsyncIterable=function(t){return!zc(t)};var Rc={};function Fc(t){return"bigint"==typeof t}Rc.isntBigInt=Rc.isBigInt=void 0,Rc.isBigInt=Fc,Rc.isntBigInt=function(t){return!Fc(t)};var Uc={};function Dc(t){return"boolean"==typeof t}Uc.isntBoolean=Uc.isBoolean=void 0,Uc.isBoolean=Dc,Uc.isntBoolean=function(t){return!Dc(t)};var Vc={},Jc={};function Kc(t){return"string"==typeof t}Jc.isntString=Jc.isString=void 0,Jc.isString=Kc,Jc.isntString=function(t){return!Kc(t)},Vc.isntChar=Vc.isChar=void 0;const Lc=Jc;function Wc(t){return(0,Lc.isString)(t)&&1===t.length}Vc.isChar=Wc,Vc.isntChar=function(t){return!Wc(t)};var Yc={};function $c(t){return t instanceof Date}Yc.isntDate=Yc.isDate=void 0,Yc.isDate=$c,Yc.isntDate=function(t){return!$c(t)};var Hc={};Hc.inEnum=void 0,Hc.inEnum=function(t,e){return Object.values(e).includes(t)};var Xc={};function Gc(t){return t instanceof Error}Xc.isntError=Xc.isError=void 0,Xc.isError=Gc,Xc.isntError=function(t){return!Gc(t)};var Qc={};function Zc(t){return!t}Qc.isntFalsy=Qc.isFalsy=void 0,Qc.isFalsy=Zc,Qc.isntFalsy=function(t){return!Zc(t)};var tu={};tu.isntIterable=tu.isIterable=void 0;const eu=Ec,nu=Nc,ru=Bc;function iu(t){return(0,eu.isntNull)(t)&&(0,nu.isntUndefined)(t)&&(0,ru.isFunction)(t[Symbol.iterator])}tu.isIterable=iu,tu.isntIterable=function(t){return!iu(t)};var ou={},su={};function au(t){return"number"==typeof t}function cu(t){return Number.isNaN(t)}su.isntNaN=su.isNaN=su.isNegativeInfinity=su.isPositiveInfinity=su.isFinite=su.isntNumber=su.isNumber=void 0,su.isNumber=au,su.isntNumber=function(t){return!au(t)},su.isFinite=function(t){return Number.isFinite(t)},su.isPositiveInfinity=function(t){return t===1/0},su.isNegativeInfinity=function(t){return t===-1/0},su.isNaN=cu,su.isntNaN=function(t){return!cu(t)};var uu={},lu=e&&e.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};uu.isntEmptyObject=uu.isEmptyObject=uu.isntPlainObject=uu.isPlainObject=uu.isntObject=uu.isObject=void 0;const fu=lu(ft);function du(t){return null!==t&&"object"==typeof t}function yu(t){return(0,fu.default)(t)}uu.isObject=du,uu.isntObject=function(t){return!du(t)},uu.isPlainObject=yu,uu.isntPlainObject=function(t){return!yu(t)},uu.isEmptyObject=function(t){return 0===Object.keys(t).length},uu.isntEmptyObject=function(t){return 0!==Object.keys(t).length},ou.isntJsonable=ou.isJsonable=ou.isntJson=ou.isJson=void 0;const hu=Ec,vu=Uc,pu=Jc,mu=su,bu=Sc,gu=uu;function wu(t){return(0,hu.isNull)(t)||(0,vu.isBoolean)(t)||(0,pu.isString)(t)||(0,mu.isNumber)(t)||(0,bu.isArray)(t)&&t.every(wu)||(0,gu.isPlainObject)(t)&&Object.values(t).every(wu)}ou.isJson=wu,ou.isntJson=function(t){return!wu(t)},ou.isJsonable=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},ou.isntJsonable=function t(e){return!t()};var Au={};Au.isPromiseLike=Au.isntPromiseLike=Au.isntPromise=Au.isPromise=void 0;const Tu=uu,xu=Bc;function Iu(t){return t instanceof Promise}function Su(t){return(0,Tu.isObject)(t)&&(0,xu.isFunction)(t.then)}Au.isPromise=Iu,Au.isntPromise=function(t){return!Iu(t)},Au.isntPromiseLike=function(t){return!Su(t)},Au.isPromiseLike=Su;var _u={};_u.isAbsoluteURL=void 0,_u.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(Sc,t),r(Oc,t),r(Rc,t),r(Uc,t),r(Vc,t),r(Yc,t),r(Hc,t),r(Xc,t),r(Qc,t),r(Bc,t),r(tu,t),r(ou,t),r(Ec,t),r(su,t),r(uu,t),r(Au,t),r(Jc,t),r(Nc,t),r(_u,t)}(Ic),xc.chunkByAsync=void 0;const Ou=Ic;xc.chunkByAsync=function(t,e){return(0,Ou.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t):async function*(t){let n=[],r=0;for(const i of t)n.push(i),await e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(t)};var Eu={};Eu.chunkBy=void 0,Eu.chunkBy=function*(t,e){let n=[],r=0;for(const i of t)n.push(i),e(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var ju={chunk:void 0};const Nu=gc,ku=Ut;ju.chunk=function(t,e){return(0,ku.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,ku.assert)(e>0,"The parameter size must be greater than 0"),(0,Nu.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Bu={concatAsync:void 0};const Pu=Ic,qu=gc;Bu.concatAsync=function(t,...e){return(0,qu.go)((async function*(){for(const n of[t,...e])if((0,Pu.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var Cu={concat:void 0};const Mu=gc;Cu.concat=function(t,...e){return(0,Mu.go)((function*(){for(const n of[t,...e])yield*n}))};var zu={},Ru={};Ru.copyIterable=Ru.copyAsyncIterable=void 0,Ru.copyAsyncIterable=async function*(t){for await(const e of t)yield e},Ru.copyIterable=function*(t){for(const e of t)yield e},zu.dropAsync=void 0;const Fu=gc,Uu=Ru,Du=Ut;zu.dropAsync=function(t,e){return(0,Du.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Du.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Uu.copyAsyncIterable)(t):(0,Fu.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{let t;for(;!(({value:t,done:i}=await r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Vu={dropRightAsync:void 0};const Ju=gc,Ku=Ru,Lu=Ut;Vu.dropRightAsync=function(t,e){return(0,Lu.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Lu.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Ku.copyAsyncIterable)(t):(0,Ju.go)((async function*(){const n=(await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t)).slice(0,-e);for(const t of n)yield t}))};var Wu={dropRight:void 0};const Yu=gc,$u=Ru,Hu=Ut;Wu.dropRight=function(t,e){return(0,Hu.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Hu.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,$u.copyIterable)(t):(0,Yu.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var Xu={dropUntilAsync:void 0};const Gu=Ic;Xu.dropUntilAsync=function(t,e){return(0,Gu.isAsyncIterable)(t)?async function*(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=await r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(t):async function*(t){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||await e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}(t)};var Qu={};Qu.dropUntil=void 0,Qu.dropUntil=function*(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,o=0;for(;!(({value:t,done:i}=r.next()),i||e(t,o++)););for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}};var Zu={drop:void 0};const tl=gc,el=Ru,nl=Ut;Zu.drop=function(t,e){return(0,nl.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,nl.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,el.copyIterable)(t):(0,tl.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{let t;for(;!(({value:t,done:i}=r.next()),i||e<=0);)e--;for(;!i;)yield t,({value:t,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var rl={filterAsync:void 0};const il=Ic;rl.filterAsync=function(t,e){return(0,il.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t)};var ol={};ol.filter=void 0,ol.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var sl={},al={},cl={flattenByAsync:void 0};const ul=Ic;function ll(t){return(0,ul.isIterable)(t)&&(0,ul.isntChar)(t)}cl.flattenByAsync=function(t,e){return(0,ul.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)ll(i)&&await e(i,r)?yield*n(i,r+1):yield i}(t):function(t){return n(t,1)}(t);async function*n(t,r){for(const i of t)ll(i)&&await e(i,r)?yield*n(i,r+1):yield i}},al.flattenDeepAsync=void 0;const fl=cl,dl=Ut;al.flattenDeepAsync=function(t,e=1/0){return(0,dl.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,dl.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,fl.flattenByAsync)(t,((t,n)=>n<=e))},sl.flattenAsync=void 0;const yl=al;sl.flattenAsync=function(t){return(0,yl.flattenDeepAsync)(t,1)};var hl={flattenBy:void 0};const vl=Ic;hl.flattenBy=function(t,e){return function*t(n,r){for(const o of n)(0,vl.isIterable)(i=o)&&(0,vl.isntChar)(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var pl={flattenDeep:void 0};const ml=hl,bl=Ut;pl.flattenDeep=function(t,e=1/0){return(0,bl.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,bl.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,ml.flattenBy)(t,((t,n)=>n<=e))};var gl={flatten:void 0};const wl=pl;gl.flatten=function(t){return(0,wl.flattenDeep)(t,1)};var Al={mapAsync:void 0};const Tl=Ic;Al.mapAsync=function(t,e){return(0,Tl.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)yield await e(r,n),n++}(t):async function*(t){let n=0;for(const r of t)yield await e(r,n),n++}(t)};var xl={};xl.map=void 0,xl.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var Il={repeatAsync:void 0};const Sl=gc,_l=Ut;Il.repeatAsync=function(t,e){return(0,_l.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,_l.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,Sl.go)((async function*(){const n=[];if(e>0){for await(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Ol={repeat:void 0};const El=gc,jl=Ut;Ol.repeat=function(t,e){return(0,jl.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,jl.assert)(e>=0,"The parameter times must be greater than or equal to 0"),e===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,El.go)((function*(){const n=[];if(e>0){for(const e of t)yield e,n.push(e);e--}for(;e>0;)yield*n,e--}))};var Nl={sliceAsync:void 0};const kl=gc,Bl=Ut;Nl.sliceAsync=function(t,e,n=1/0){return(0,Bl.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Bl.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Bl.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Bl.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,kl.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Pl={slice:void 0};const ql=gc,Cl=Ut;Pl.slice=function(t,e,n=1/0){return(0,Cl.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Cl.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Cl.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Cl.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,ql.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Ml={};Ml.splitAsync=void 0,Ml.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var zl={splitByAsync:void 0};const Rl=Ic;zl.splitByAsync=function(t,e){return(0,Rl.isAsyncIterable)(t)?async function*(t){let n=[],r=0;for await(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t):async function*(t){let n=[],r=0;for(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t)};var Fl={};Fl.splitBy=void 0,Fl.splitBy=function*(t,e){let n=[],r=0;for(const i of t)e(i,r)?(yield n,n=[]):n.push(i),r++;yield n};var Ul={};Ul.split=void 0,Ul.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Dl={takeAsync:void 0};const Vl=gc,Jl=Ut;Dl.takeAsync=function(t,e){return(0,Jl.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Jl.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Vl.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var Kl={takeRightAsync:void 0};const Ll=gc,Wl=Ut;Kl.takeRightAsync=function(t,e){return(0,Wl.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Wl.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Ll.go)((async function*(){var n;const r=t[Symbol.asyncIterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=await r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Yl={takeRight:void 0};const $l=gc,Hl=Ut;Yl.takeRight=function(t,e){return(0,Hl.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Hl.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,$l.go)((function*(){var n;const r=t[Symbol.iterator]();let i;try{const t=[];let o;for(;({value:o,done:i}=r.next()),!i;)t.push(o),t.length>e&&t.shift();yield*t}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var Xl={takeUntilAsync:void 0};const Gl=Ic;Xl.takeUntilAsync=function(t,e){return(0,Gl.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t){if(await e(r,n))break;yield r,n++}}(t):async function*(t){let n=0;for(const r of t){if(await e(r,n))break;yield r,n++}}(t)};var Ql={};Ql.takeUntil=void 0,Ql.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var Zl={take:void 0};const tf=gc,ef=Ut;Zl.take=function(t,e){return(0,ef.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,ef.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,tf.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var nf={tapAsync:void 0};const rf=Ic;nf.tapAsync=function(t,e){return(0,rf.isAsyncIterable)(t)?async function*(t){let n=0;for await(const r of t)await e(r,n),yield r,n++}(t):async function*(t){let n=0;for(const r of t)await e(r,n),yield r,n++}(t)};var of={};of.tap=void 0,of.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var sf={};sf.toAsyncIterable=void 0,sf.toAsyncIterable=async function*(t){for(const e of t)yield e};var af={};af.transformAsync=void 0,af.transformAsync=async function*(t,e){yield*e(t)};var cf={};cf.transform=void 0,cf.transform=function*(t,e){yield*e(t)};var uf={};uf.uniqAsync=void 0,uf.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var lf={uniqByAsync:void 0};const ff=Ic;lf.uniqByAsync=function(t,e){return(0,ff.isAsyncIterable)(t)?async function*(t){const n=new Set;let r=0;for await(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t):async function*(t){const n=new Set;let r=0;for(const i of t){const t=await e(i,r);n.has(t)||(yield i,n.add(t)),r++}}(t)};var df={};df.uniqBy=void 0,df.uniqBy=function*(t,e){const n=new Set;let r=0;for(const i of t){const t=e(i,r);n.has(t)||(yield i,n.add(t)),r++}};var yf={};yf.uniq=void 0,yf.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var hf={zipAsync:void 0};const vf=Ic;var pf;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(pf||(pf={})),hf.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,s=t.map((t=>(0,vf.isAsyncIterable)(t)?[pf.Async,t[Symbol.asyncIterator]()]:[pf.Sync,t[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const t=new Array(o);for(let e=0;e<o;e++){const[n,r]=s[e];let i;if(i=n===pf.Async?await r.next():r.next(),i.done)return void(a[e]=!0);t[e]=i.value}yield t}}finally{const t=s.filter(((t,e)=>!a[e]));for(const[o,s]of t)o===pf.Async?await(null===(n=(e=s).return)||void 0===n?void 0:n.call(e)):null===(i=(r=s).return)||void 0===i||i.call(r)}}(t,...e)};var mf={};mf.zip=void 0,mf.zip=function(t,...e){return function*(...t){const e=t.length,n=t.map((t=>t[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const t=new Array(e);for(let i=0;i<e;i++){const{value:e,done:o}=n[i].next();if(o)return void(r[i]=!0);t[i]=e}yield t}}finally{n.filter(((t,e)=>!r[e])).forEach((t=>{var e;return null===(e=t.return)||void 0===e?void 0:e.call(t)}))}}(t,...e)},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(bc,t),r(xc,t),r(Eu,t),r(ju,t),r(Bu,t),r(Cu,t),r(zu,t),r(Vu,t),r(Wu,t),r(Xu,t),r(Qu,t),r(Zu,t),r(rl,t),r(ol,t),r(sl,t),r(cl,t),r(hl,t),r(al,t),r(pl,t),r(gl,t),r(Al,t),r(xl,t),r(Il,t),r(Ol,t),r(Nl,t),r(Pl,t),r(Ml,t),r(zl,t),r(Fl,t),r(Ul,t),r(Dl,t),r(Kl,t),r(Yl,t),r(Xl,t),r(Ql,t),r(Zl,t),r(nf,t),r(of,t),r(sf,t),r(af,t),r(cf,t),r(uf,t),r(lf,t),r(df,t),r(yf,t),r(hf,t),r(mf,t)}(mc);var bf={},gf={};gf.consume=void 0,gf.consume=function(t,e){return e(t)};var wf={eachAsync:void 0};const Af=Ic;wf.eachAsync=function(t,e){return(0,Af.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t)await e(r,n),n++}(t):async function(t){let n=0;for(const r of t)await e(r,n),n++}(t)};var Tf={};Tf.each=void 0,Tf.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var xf={everyAsync:void 0};const If=Ic;xf.everyAsync=function(t,e){return(0,If.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(!await e(r,n))return!1;n++}return!0}(t):async function(t){let n=0;for(const r of t){if(!await e(r,n))return!1;n++}return!0}(t)};var Sf={};Sf.every=void 0,Sf.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var _f={findAsync:void 0};const Of=Ic;_f.findAsync=function(t,e){return(0,Of.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return r;n++}return}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return r;n++}return}(t)};var Ef={};Ef.find=void 0,Ef.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var jf={};jf.firstAsync=void 0,jf.firstAsync=async function(t){for await(const e of t)return e};var Nf={};Nf.first=void 0,Nf.first=function(t){for(const e of t)return e};var kf={};kf.includesAsync=void 0,kf.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var Bf={};Bf.includes=void 0,Bf.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var Pf={};Pf.matchAsync=void 0,Pf.matchAsync=async function(t,e){const n=e.length;let r=0;for await(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var qf={};qf.match=void 0,qf.match=function(t,e){const n=e.length;let r=0;for(const i of t)if(i===e[r]&&r++,r===n)return!0;return!1};var Cf={reduceAsync:void 0};const Mf=Ic;Cf.reduceAsync=function(t,e,n){return(0,Mf.isUndefined)(n)?function(t,e){return(0,Mf.isAsyncIterable)(t)?n(t):r(t);async function n(t){var n;const r=t[Symbol.asyncIterator]();let i;try{let t,s=await o(r),a=1;for(;({value:t,done:i}=await r.next()),!i;)s=await e(s,t,a++);return s}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function o(t){const e=await t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}async function r(t){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=await e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}}(t,e):function(t,e,n){return(0,Mf.isAsyncIterable)(t)?i(t):r(t);async function r(t){let r=n,i=0;for(const n of t)r=await e(r,n,i++);return r}async function i(t){let r=n,i=0;for await(const n of t)r=await e(r,n,i++);return r}}(t,e,n)};var zf={reduce:void 0};const Rf=Ic;zf.reduce=function(t,e,n){return(0,Rf.isUndefined)(n)?function(t,e){var n;const r=t[Symbol.iterator]();let i;try{let t,s=o(r),a=1;for(;({value:t,done:i}=r.next()),!i;)s=e(s,t,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(t){const e=t.next();if(e.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return e.value}}(t,e):function(t,e,n){let r=n,i=0;for(const n of t)r=e(r,n,i++);return r}(t,e,n)};var Ff={someAsync:void 0};const Uf=Ic;Ff.someAsync=function(t,e){return(0,Uf.isAsyncIterable)(t)?async function(t){let n=0;for await(const r of t){if(await e(r,n))return!0;n++}return!1}(t):async function(t){let n=0;for(const r of t){if(await e(r,n))return!0;n++}return!1}(t)};var Df={};Df.some=void 0,Df.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Vf={};Vf.lastAsync=void 0,Vf.lastAsync=async function(t){var e;const n=t[Symbol.asyncIterator]();let r;try{let t,i;for(;({value:t,done:r}=await n.next()),!r;)i=t;return i}finally{r||await(null===(e=n.return)||void 0===e?void 0:e.call(n))}};var Jf={};Jf.last=void 0,Jf.last=function(t){var e;const n=t[Symbol.iterator]();let r;try{let t,i;for(;({value:t,done:r}=n.next()),!r;)i=t;return i}finally{r||null===(e=n.return)||void 0===e||e.call(n)}};var Kf={toArrayAsync:void 0};const Lf=gf;Kf.toArrayAsync=function(t){return(0,Lf.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var Wf={toArray:void 0};const Yf=gf;Wf.toArray=function(t){return(0,Yf.consume)(t,(t=>Array.from(t)))};var $f={toSetAsync:void 0};const Hf=gf;$f.toSetAsync=function(t){return(0,Hf.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Xf={toSet:void 0};const Gf=gf;Xf.toSet=function(t){return(0,Gf.consume)(t,(t=>new Set(t)))};var Qf={};Qf.count=void 0,Qf.count=function(t){let e=0;for(const n of t)e++;return e};var Zf={};Zf.countAsync=void 0,Zf.countAsync=async function(t){let e=0;for await(const n of t)e++;return e},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(gf,t),r(wf,t),r(Tf,t),r(xf,t),r(Sf,t),r(_f,t),r(Ef,t),r(jf,t),r(Nf,t),r(kf,t),r(Bf,t),r(Pf,t),r(qf,t),r(Cf,t),r(zf,t),r(Ff,t),r(Df,t),r(Vf,t),r(Jf,t),r(Kf,t),r(Wf,t),r($f,t),r(Xf,t),r(Qf,t),r(Zf,t)}(bf),function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(mc,t),r(bf,t)}(pc);class td{constructor(t){this.map=new Map,Ut.assert(Number.isInteger(t),"The parameter limit must be an integer"),Ut.assert(t>0,"The parameter limit must be a positive value"),this.limit=t}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(t,e){return this.map.has(t)?this.updateItem(t,e):(this.map.size===this.limit&&this.map.delete(this.getColdestKey()),this.map.set(t,e)),this}has(t){return this.map.has(t)}get(t){if(!this.has(t))return;const e=this.map.get(t);return this.updateItem(t,e),e}delete(t){return this.map.delete(t)}clear(){this.map.clear()}updateItem(t,e){this.map.delete(t),this.map.set(t,e)}getColdestKey(){return pc.first(this.map.keys())}}var ed={},nd={},rd={},id={};id.random=void 0,id.random=function(t,e){return Math.random()*(e-t)+t};var od={};od.randomInt=void 0,od.randomInt=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t};var sd={};sd.randomIntInclusive=void 0,sd.randomIntInclusive=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1))+t},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(id,t),r(od,t),r(sd,t)}(rd),nd.calculateExponentialBackoffTimeout=void 0;const ad=rd;nd.calculateExponentialBackoffTimeout=function({baseTimeout:t,retries:e,maxTimeout:n=1/0,factor:r=2,jitter:i=!0}){const o=Math.min(r**e*t,n);return i?(0,ad.randomIntInclusive)(0,o):o};var cd={};cd.setTimeout=void 0,cd.setTimeout=function(t,e){const n=globalThis.setTimeout(e,t);return()=>clearTimeout(n)};var ud={setSchedule:void 0};const ld=cd;ud.setSchedule=function(t,e){const n=t-Date.now();return(0,ld.setTimeout)(n,e)};var fd={};fd.setInterval=void 0,fd.setInterval=function(t,e){const n=globalThis.setInterval(e,t);return()=>clearInterval(n)};var dd={setImmediate:void 0};const yd=cd;dd.setImmediate=function(t){if(globalThis.setImmediate){const e=globalThis.setImmediate(t);return()=>clearImmediate(e)}return(0,yd.setTimeout)(0,t)};var hd={setTimeoutLoop:void 0};const vd=cd;hd.setTimeoutLoop=function(t,e){let n=!1,r=(0,vd.setTimeout)(t,(async function i(){await e(),n||(r=(0,vd.setTimeout)(t,i))}));return()=>{n=!0,r()}};var pd={setDynamicTimeoutLoop:void 0};const md=cd;pd.setDynamicTimeoutLoop=function(t,e){let n=!1,r=(0,md.setTimeout)(t,(async function i(){const o=Date.now();await e();const s=Date.now()-o;n||(r=(0,md.setTimeout)(Math.max(t-s,0),i))}));return()=>{n=!0,r()}},function(t){var n=e&&e.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n),Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[n]}})}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),r=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};r(nd,t),r(cd,t),r(ud,t),r(fd,t),r(dd,t),r(hd,t),r(pd,t)}(ed);class bd{constructor(){this.map=new Map,this.itemMetadataSortedByExpirationTime=[]}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(t,e,n){return this.map.set(t,e),this.removeItemMetadata(t),this.addItemMetadata(t,Date.now()+n),this}has(t){return this.map.has(t)}get(t){return this.map.get(t)}delete(t){const e=this.map.delete(t);if(e){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout()}return e}clear(){var t;this.map.clear(),null===(t=this.cancelClearTimeout)||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime=[]}addItemMetadata(t,e){for(let n=0;n<this.itemMetadataSortedByExpirationTime.length;n++){if(e<this.itemMetadataSortedByExpirationTime[n].expirationTime)return this.itemMetadataSortedByExpirationTime.splice(n,0,{key:t,expirationTime:e}),void(0===n&&this.rescheduleClearTimeout())}this.itemMetadataSortedByExpirationTime.push({key:t,expirationTime:e}),1===this.itemMetadataSortedByExpirationTime.length&&this.rescheduleClearTimeout()}removeItemMetadata(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));e>=0&&(this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout())}clearExpiredItems(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.expirationTime>t));(e>=0?this.itemMetadataSortedByExpirationTime.splice(0,e):this.itemMetadataSortedByExpirationTime.splice(0,this.itemMetadataSortedByExpirationTime.length)).forEach((t=>this.map.delete(t.key)))}rescheduleClearTimeout(){var t;if(null===(t=this.cancelClearTimeout)||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime.length>0){const t=this.itemMetadataSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const e=ed.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));this.cancelClearTimeout=()=>{e(),this.cancelClearTimeout=void 0}}}}}class gd{constructor(t){this.map=new Map,this.itemMetadataSortedByExpirationTime=[],Ut.assert(Number.isInteger(t),"The parameter limit must be an integer"),Ut.assert(t>0,"The parameter limit must be a positive value"),this.limit=t}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(t,e,n){return this.map.has(t)?(this.updateItem(t,e),this.removeItemMetadata(t),this.addItemMetadata(t,Date.now()+n)):(this.map.size===this.limit&&this.map.delete(this.getColdestKey()),this.map.set(t,e),this.addItemMetadata(t,Date.now()+n)),this}has(t){return this.map.has(t)}get(t){if(this.has(t)){const e=this.map.get(t);return this.updateItem(t,e),e}}delete(t){const e=this.map.delete(t);if(e){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout()}return e}clear(){var t;this.map.clear(),null===(t=this.cancelClearTimeout)||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime=[]}updateItem(t,e){this.map.delete(t),this.map.set(t,e)}addItemMetadata(t,e){for(let n=0;n<this.itemMetadataSortedByExpirationTime.length;n++){if(e<this.itemMetadataSortedByExpirationTime[n].expirationTime)return this.itemMetadataSortedByExpirationTime.splice(n,0,{key:t,expirationTime:e}),void(0===n&&this.rescheduleClearTimeout())}this.itemMetadataSortedByExpirationTime.push({key:t,expirationTime:e}),1===this.itemMetadataSortedByExpirationTime.length&&this.rescheduleClearTimeout()}removeItemMetadata(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.key===t));e>=0&&(this.itemMetadataSortedByExpirationTime.splice(e,1),0===e&&this.rescheduleClearTimeout())}clearExpiredItems(t){const e=this.itemMetadataSortedByExpirationTime.findIndex((e=>e.expirationTime>t));(e>=0?this.itemMetadataSortedByExpirationTime.splice(0,e):this.itemMetadataSortedByExpirationTime.splice(0,this.itemMetadataSortedByExpirationTime.length)).forEach((t=>this.map.delete(t.key)))}rescheduleClearTimeout(){var t;if(null===(t=this.cancelClearTimeout)||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime.length>0){const t=this.itemMetadataSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const e=ed.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));this.cancelClearTimeout=()=>{e(),this.cancelClearTimeout=void 0}}}}getColdestKey(){return pc.first(this.map.keys())}}class wd{constructor(t){this.value=t,this.children=new Map}}class Ad{constructor(){this.root=new wd}get[Symbol.toStringTag](){return this.constructor.name}*entries(){yield*function*t(e,r){for(const[i,o]of e.children){const e=[...r,i];n.isntUndefined(o.value)&&(yield[e,o.value]),yield*t(o,e)}}(this.root,[])}keys(){return pc.map(this.entries(),(([t])=>t))}values(){return pc.map(this.entries(),(([t,e])=>e))}set(t,e){let n=this.root;for(const e of t)n.children.has(e)||n.children.set(e,new wd),n=n.children.get(e);return n.value=e,this}has(t){let e=this.root;for(const n of t){if(!e.children.has(n))return!1;e=e.children.get(n)}return void 0!==e.value}get(t){let e=this.root;for(const n of t){if(!e.children.has(n))return;e=e.children.get(n)}return e.value}delete(t){const e=[];let n=this.root;for(const r of t){if(!n.children.has(r))return!1;e.push(n),n=n.children.get(r)}if(delete n.value,0===n.children.size)for(const[n,r]of pc.toArray(pc.zip(t,e)).reverse())if(r.children.delete(n),0!==r.children.size)break;return!0}}class Td{constructor(t,e){this.schema=t,this._state=e}get[Symbol.toStringTag](){return this.constructor.name}get state(){return this._state}matches(t){return this._state===t}can(t){return t in this.schema[this.state]}send(t){if(!this.can(t))throw new xd(this.state,t);this._state=this.schema[this.state][t]}}class xd extends Ut.CustomError{constructor(t,e){super(`State ${t} cannot react to event ${e}`)}}
1
+ class t{constructor(t){this.value=t}get[Symbol.toStringTag](){return this.constructor.name}set(t){this.value=t}get(){return this.value}}var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e={},r={};function o(t){return Array.isArray(t)}r.isntEmptyArray=r.isEmptyArray=r.isntArray=r.isArray=void 0,r.isArray=o,r.isntArray=function(t){return!o(t)},r.isEmptyArray=function(t){return 0===t.length},r.isntEmptyArray=function(t){return 0!==t.length};var i={},a={};function s(t){return null===t}a.isntNull=a.isNull=void 0,a.isNull=s,a.isntNull=function(t){return!s(t)};var c={};function u(t){return void 0===t}c.isntUndefined=c.isUndefined=void 0,c.isUndefined=u,c.isntUndefined=function(t){return!u(t)};var l={};function f(t){return"function"==typeof t}l.isntFunction=l.isFunction=void 0,l.isFunction=f,l.isntFunction=function(t){return!f(t)},i.isntAsyncIterable=i.isAsyncIterable=void 0;const y=a,d=c,v=l;function h(t){return(0,y.isntNull)(t)&&(0,d.isntUndefined)(t)&&(0,v.isFunction)(t[Symbol.asyncIterator])}i.isAsyncIterable=h,i.isntAsyncIterable=function(t){return!h(t)};var p={};function m(t){return"bigint"==typeof t}p.isntBigInt=p.isBigInt=void 0,p.isBigInt=m,p.isntBigInt=function(t){return!m(t)};var b={};function g(t){return"boolean"==typeof t}b.isntBoolean=b.isBoolean=void 0,b.isBoolean=g,b.isntBoolean=function(t){return!g(t)};var w={},A={};function I(t){return"string"==typeof t}A.isntString=A.isString=void 0,A.isString=I,A.isntString=function(t){return!I(t)},w.isntChar=w.isChar=void 0;const S=A;function x(t){return(0,S.isString)(t)&&1===t.length}w.isChar=x,w.isntChar=function(t){return!x(t)};var T={};function _(t){return t instanceof Date}T.isntDate=T.isDate=void 0,T.isDate=_,T.isntDate=function(t){return!_(t)};var O={};O.inEnum=void 0,O.inEnum=function(t,n){return Object.values(n).includes(t)};var E={};function j(t){return t instanceof Error}E.isntError=E.isError=void 0,E.isError=j,E.isntError=function(t){return!j(t)};var N={};function k(t){return!t}N.isntFalsy=N.isFalsy=void 0,N.isFalsy=k,N.isntFalsy=function(t){return!k(t)};var B={};B.isntIterable=B.isIterable=void 0;const P=a,q=c,C=l;function R(t){return(0,P.isntNull)(t)&&(0,q.isntUndefined)(t)&&(0,C.isFunction)(t[Symbol.iterator])}B.isIterable=R,B.isntIterable=function(t){return!R(t)};var U={},z={};function D(t){return"number"==typeof t}function M(t){return Number.isNaN(t)}z.isntNaN=z.isNaN=z.isNegativeInfinity=z.isPositiveInfinity=z.isFinite=z.isntNumber=z.isNumber=void 0,z.isNumber=D,z.isntNumber=function(t){return!D(t)},z.isFinite=function(t){return Number.isFinite(t)},z.isPositiveInfinity=function(t){return t===1/0},z.isNegativeInfinity=function(t){return t===-1/0},z.isNaN=M,z.isntNaN=function(t){return!M(t)};var F={},J="object"==typeof n&&n&&n.Object===Object&&n,V="object"==typeof self&&self&&self.Object===Object&&self,L=(J||V||Function("return this")()).Symbol,K=L,W=Object.prototype,Y=W.hasOwnProperty,$=W.toString,H=K?K.toStringTag:void 0;var X=function(t){var n=Y.call(t,H),e=t[H];try{t[H]=void 0;var r=!0}catch(t){}var o=$.call(t);return r&&(n?t[H]=e:delete t[H]),o},G=Object.prototype.toString;var Q=X,Z=function(t){return G.call(t)},tt=L?L.toStringTag:void 0;var nt=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":tt&&tt in Object(t)?Q(t):Z(t)};var et=function(t,n){return function(e){return t(n(e))}}(Object.getPrototypeOf,Object);var rt=nt,ot=et,it=function(t){return null!=t&&"object"==typeof t},at=Function.prototype,st=Object.prototype,ct=at.toString,ut=st.hasOwnProperty,lt=ct.call(Object);var ft=function(t){if(!it(t)||"[object Object]"!=rt(t))return!1;var n=ot(t);if(null===n)return!0;var e=ut.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&ct.call(e)==lt},yt=n&&n.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};F.isntEmptyObject=F.isEmptyObject=F.isntPlainObject=F.isPlainObject=F.isntObject=F.isObject=void 0;const dt=yt(ft);function vt(t){return null!==t&&"object"==typeof t}function ht(t){return(0,dt.default)(t)}F.isObject=vt,F.isntObject=function(t){return!vt(t)},F.isPlainObject=ht,F.isntPlainObject=function(t){return!ht(t)},F.isEmptyObject=function(t){return 0===Object.keys(t).length},F.isntEmptyObject=function(t){return 0!==Object.keys(t).length},U.isntJsonable=U.isJsonable=U.isntJson=U.isJson=void 0;const pt=a,mt=b,bt=A,gt=z,wt=r,At=F;function It(t){return(0,pt.isNull)(t)||(0,mt.isBoolean)(t)||(0,bt.isString)(t)||(0,gt.isNumber)(t)||(0,wt.isArray)(t)&&t.every(It)||(0,At.isPlainObject)(t)&&Object.values(t).every(It)}U.isJson=It,U.isntJson=function(t){return!It(t)},U.isJsonable=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},U.isntJsonable=function t(n){return!t()};var St={};St.isPromiseLike=St.isntPromiseLike=St.isntPromise=St.isPromise=void 0;const xt=F,Tt=l;function _t(t){return t instanceof Promise}function Ot(t){return(0,xt.isObject)(t)&&(0,Tt.isFunction)(t.then)}St.isPromise=_t,St.isntPromise=function(t){return!_t(t)},St.isntPromiseLike=function(t){return!Ot(t)},St.isPromiseLike=Ot;var Et={};Et.isAbsoluteURL=void 0,Et.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}};var jt,Nt,kt,Bt={};function Pt(t){return t instanceof RegExp}function qt([t,n]){return e.isNull(n)?[t]:[t,...qt(n)]}function Ct([t,...n]){return[t,n.length?Ct(n):null]}Bt.isntRegExp=Bt.isRegExp=void 0,Bt.isRegExp=Pt,Bt.isntRegExp=function(t){return!Pt(t)},jt=e,Nt=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var o=Object.getOwnPropertyDescriptor(n,e);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,o)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),(kt=n&&n.__exportStar||function(t,n){for(var e in t)"default"===e||Object.prototype.hasOwnProperty.call(n,e)||Nt(n,t,e)})(r,jt),kt(i,jt),kt(p,jt),kt(b,jt),kt(w,jt),kt(T,jt),kt(O,jt),kt(E,jt),kt(N,jt),kt(l,jt),kt(B,jt),kt(U,jt),kt(a,jt),kt(z,jt),kt(F,jt),kt(St,jt),kt(A,jt),kt(c,jt),kt(Et,jt),kt(Bt,jt);class Rt{constructor(){this.map=new Map}get[Symbol.toStringTag](){return this.constructor.name}on(t,n){this.map.has(t)||this.map.set(t,new Set);return this.map.get(t).add(e),()=>{if(!this.map.has(t))return;const n=this.map.get(t);n.delete(e),0===n.size&&this.map.delete(t)};function e(...t){n(...t)}}once(t,n){const e=this.on(t,((...t)=>{n(...t),e()}));return e}emit(t,...n){this.map.has(t)&&this.map.get(t).forEach((t=>t(...n)))}}class Ut{constructor(t){this.hash=t,this.map=new Map}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(t,n){return this.map.set(this.hash(t),n),this}has(t){return this.map.has(this.hash(t))}get(t){return this.map.get(this.hash(t))}delete(t){return this.map.delete(this.hash(t))}clear(){this.map.clear()}}class zt{constructor(t){this.hash=t,this.map=new Map}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}[Symbol.iterator](){return this.map.values()}add(t){return this.map.set(this.hash(t),t),this}delete(t){return this.map.delete(this.hash(t))}has(t){return this.map.has(this.hash(t))}clear(){this.map.clear()}values(){return this.map.values()}}class Dt{constructor(){this.items=[]}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.items.length}empty(){this.items.length=0}enqueue(...t){this.items.push(...t)}dequeue(){return this.items.shift()}remove(t){let n;for(;(n=this.items.indexOf(t))>=0;)this.items.splice(n,1)}}var Mt={},Ft={},Jt={},Vt={},Lt={},Kt={},Wt={};Wt.go=void 0,Wt.go=function(t){return t()},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]});(n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(Wt,t)}(Kt);var Yt={},$t={},Ht={},Xt={},Gt={},Qt={},Zt={CustomError:void 0};class tn extends Error{get name(){return this.constructor.name}}Zt.CustomError=tn;var nn={ExpectedError:void 0};const en=Zt;class rn extends en.CustomError{}nn.ExpectedError=rn;var on={AssertionError:void 0};const an=Zt;class sn extends an.CustomError{}on.AssertionError=sn;var cn={};cn.normalize=void 0,cn.normalize=function(t){var n;return{name:t.name,message:t.message,stack:null!==(n=t.stack)&&void 0!==n?n:null}};var un={refute:void 0};const ln=nn;un.refute=function(t,n){if(t)throw new ln.ExpectedError(n)};var fn={assert:void 0};const yn=on;fn.assert=function(t,n){if(!t)throw new yn.AssertionError(n)},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Zt,t),r(nn,t),r(on,t),r(cn,t),r(un,t),r(fn,t)}(Qt),Gt.chunkAsync=void 0;const dn=Kt,vn=Qt;Gt.chunkAsync=function(t,n){return(0,vn.assert)(Number.isInteger(n),"The parameter size must be an integer"),(0,vn.assert)(n>0,"The parameter size must be greater than 0"),(0,dn.go)((async function*(){let e=[];for await(const r of t)e.push(r),e.length>=n&&(yield e,e=[]);e.length&&(yield e)}))};var hn={},pn={},mn={};function bn(t){return Array.isArray(t)}mn.isntEmptyArray=mn.isEmptyArray=mn.isntArray=mn.isArray=void 0,mn.isArray=bn,mn.isntArray=function(t){return!bn(t)},mn.isEmptyArray=function(t){return 0===t.length},mn.isntEmptyArray=function(t){return 0!==t.length};var gn={},wn={};function An(t){return null===t}wn.isntNull=wn.isNull=void 0,wn.isNull=An,wn.isntNull=function(t){return!An(t)};var In={};function Sn(t){return void 0===t}In.isntUndefined=In.isUndefined=void 0,In.isUndefined=Sn,In.isntUndefined=function(t){return!Sn(t)},gn.isntAsyncIterable=gn.isAsyncIterable=void 0;const xn=wn,Tn=In;function _n(t){return(0,xn.isntNull)(t)&&(0,Tn.isntUndefined)(t)&&"function"==typeof t[Symbol.asyncIterator]}gn.isAsyncIterable=_n,gn.isntAsyncIterable=function(t){return!_n(t)};var On={};function En(t){return"bigint"==typeof t}On.isntBigInt=On.isBigInt=void 0,On.isBigInt=En,On.isntBigInt=function(t){return!En(t)};var jn={};function Nn(t){return"boolean"==typeof t}jn.isntBoolean=jn.isBoolean=void 0,jn.isBoolean=Nn,jn.isntBoolean=function(t){return!Nn(t)};var kn={},Bn={};function Pn(t){return"string"==typeof t}Bn.isntString=Bn.isString=void 0,Bn.isString=Pn,Bn.isntString=function(t){return!Pn(t)},kn.isntChar=kn.isChar=void 0;const qn=Bn;function Cn(t){return(0,qn.isString)(t)&&1===t.length}kn.isChar=Cn,kn.isntChar=function(t){return!Cn(t)};var Rn={};function Un(t){return t instanceof Date}Rn.isntDate=Rn.isDate=void 0,Rn.isDate=Un,Rn.isntDate=function(t){return!Un(t)};var zn={};zn.inEnum=void 0,zn.inEnum=function(t,n){return Object.values(n).includes(t)};var Dn={};function Mn(t){return t instanceof Error}Dn.isntError=Dn.isError=void 0,Dn.isError=Mn,Dn.isntError=function(t){return!Mn(t)};var Fn={};function Jn(t){return!t}Fn.isntFalsy=Fn.isFalsy=void 0,Fn.isFalsy=Jn,Fn.isntFalsy=function(t){return!Jn(t)};var Vn={};function Ln(t){return"function"==typeof t}Vn.isntFunction=Vn.isFunction=void 0,Vn.isFunction=Ln,Vn.isntFunction=function(t){return!Ln(t)};var Kn={};Kn.isntIterable=Kn.isIterable=void 0;const Wn=wn,Yn=In;function $n(t){return(0,Wn.isntNull)(t)&&(0,Yn.isntUndefined)(t)&&"function"==typeof t[Symbol.iterator]}Kn.isIterable=$n,Kn.isntIterable=function(t){return!$n(t)};var Hn={},Xn={};var Gn=Function.prototype,Qn=Object.prototype,Zn=Gn.toString,te=Qn.hasOwnProperty,ne=Zn.call(Object),ee=Qn.toString,re=function(t,n){return function(e){return t(n(e))}}(Object.getPrototypeOf,Object);var oe=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=ee.call(t)||function(t){var n=!1;if(null!=t&&"function"!=typeof t.toString)try{n=!!(t+"")}catch(t){}return n}(t))return!1;var n=re(t);if(null===n)return!0;var e=te.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&Zn.call(e)==ne},ie=n&&n.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Xn.isntEmptyObject=Xn.isEmptyObject=Xn.isntPlainObject=Xn.isPlainObject=Xn.isntObject=Xn.isObject=void 0;const ae=ie(oe);function se(t){return null!==t&&"object"==typeof t}function ce(t){return(0,ae.default)(t)}Xn.isObject=se,Xn.isntObject=function(t){return!se(t)},Xn.isPlainObject=ce,Xn.isntPlainObject=function(t){return!ce(t)},Xn.isEmptyObject=function(t){return 0===Object.keys(t).length},Xn.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var ue={};function le(t){return"number"==typeof t}ue.isntNumber=ue.isNumber=void 0,ue.isNumber=le,ue.isntNumber=function(t){return!le(t)},Hn.isntJsonRpcError=Hn.isJsonRpcError=Hn.isntJsonRpcSuccess=Hn.isJsonRpcSuccess=Hn.isntJsonRpcRequest=Hn.isJsonRpcRequest=Hn.isntJsonRpcNotification=Hn.isJsonRpcNotification=void 0;const fe=mn,ye=Xn,de=Bn,ve=ue,he=In;function pe(t){return(0,de.isString)(t)||(0,ve.isNumber)(t)}function me(t){return(0,fe.isArray)(t)||(0,ye.isObject)(t)}function be(t){return(0,ye.isPlainObject)(t)&&(0,de.isString)(t.jsonrpc)&&(0,de.isString)(t.method)&&(0,he.isUndefined)(t.id)&&me(t.params)}function ge(t){return(0,ye.isPlainObject)(t)&&(0,de.isString)(t.jsonrpc)&&(0,de.isString)(t.method)&&pe(t.id)&&me(t.params)}function we(t){return(0,ye.isPlainObject)(t)&&(0,de.isString)(t.jsonrpc)&&(0,de.isString)(t.id)&&"result"in t}function Ae(t){return(0,ye.isPlainObject)(t)&&(0,de.isString)(t.jsonrpc)&&pe(t.id)&&function(t){return(0,ye.isPlainObject)(t)&&(0,ve.isNumber)(t.code)&&(0,de.isString)(t.message)&&((0,he.isUndefined)(t.data)||(0,ye.isObject)(t.data))}(t.error)}Hn.isJsonRpcNotification=be,Hn.isntJsonRpcNotification=function(t){return!be(t)},Hn.isJsonRpcRequest=ge,Hn.isntJsonRpcRequest=function(t){return!ge(t)},Hn.isJsonRpcSuccess=we,Hn.isntJsonRpcSuccess=function(t){return!we(t)},Hn.isJsonRpcError=Ae,Hn.isntJsonRpcError=function(t){return!Ae(t)};var Ie={};Ie.isntJson=Ie.isJson=void 0,Ie.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},Ie.isntJson=function t(n){return!t()};var Se={};Se.isAbsoluteURL=void 0,Se.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(mn,t),r(gn,t),r(On,t),r(jn,t),r(kn,t),r(Rn,t),r(zn,t),r(Dn,t),r(Fn,t),r(Vn,t),r(Kn,t),r(Hn,t),r(Ie,t),r(wn,t),r(ue,t),r(Xn,t),r(Bn,t),r(In,t),r(Se,t)}(pn),hn.chunkByAsync=void 0;const xe=pn;hn.chunkByAsync=function(t,n){return(0,xe.isAsyncIterable)(t)?async function*(t){let e=[],r=0;for await(const o of t)e.push(o),await n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)}(t):async function*(t){let e=[],r=0;for(const o of t)e.push(o),await n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)}(t)};var Te={};Te.chunkBy=void 0,Te.chunkBy=function*(t,n){let e=[],r=0;for(const o of t)e.push(o),n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)};var _e={chunk:void 0};const Oe=Kt,Ee=Qt;_e.chunk=function(t,n){return(0,Ee.assert)(Number.isInteger(n),"The parameter size must be an integer"),(0,Ee.assert)(n>0,"The parameter size must be greater than 0"),(0,Oe.go)((function*(){let e=[];for(const r of t)e.push(r),e.length>=n&&(yield e,e=[]);e.length&&(yield e)}))};var je={concatAsync:void 0};const Ne=pn,ke=Kt;je.concatAsync=function(t,...n){return(0,ke.go)((async function*(){for(const e of[t,...n])if((0,Ne.isAsyncIterable)(e))for await(const t of e)yield t;else for(const t of e)yield t}))};var Be={concat:void 0};const Pe=Kt;Be.concat=function(t,...n){return(0,Pe.go)((function*(){for(const e of[t,...n])yield*e}))};var qe={},Ce={};Ce.copyIterable=Ce.copyAsyncIterable=void 0,Ce.copyAsyncIterable=async function*(t){for await(const n of t)yield n},Ce.copyIterable=function*(t){for(const n of t)yield n},qe.dropAsync=void 0;const Re=Kt,Ue=Ce,ze=Qt;qe.dropAsync=function(t,n){return(0,ze.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,ze.assert)(n>=0,"The parameter count must be greater than or equal to 0"),0===n?(0,Ue.copyAsyncIterable)(t):(0,Re.go)((async function*(){var e;const r=t[Symbol.asyncIterator]();let o;try{let t;for(;!(({value:t,done:o}=await r.next()),o||n<=0);)n--;for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}))};var De={dropRightAsync:void 0};const Me=Kt,Fe=Ce,Je=Qt;De.dropRightAsync=function(t,n){return(0,Je.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Je.assert)(n>=0,"The parameter count must be greater than or equal to 0"),0===n?(0,Fe.copyAsyncIterable)(t):(0,Me.go)((async function*(){const e=(await async function(t){const n=[];for await(const e of t)n.push(e);return n}(t)).slice(0,-n);for(const t of e)yield t}))};var Ve={dropRight:void 0};const Le=Kt,Ke=Ce,We=Qt;Ve.dropRight=function(t,n){return(0,We.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,We.assert)(n>=0,"The parameter count must be greater than or equal to 0"),0===n?(0,Ke.copyIterable)(t):(0,Le.go)((function*(){const e=Array.from(t);yield*e.slice(0,-n)}))};var Ye={dropUntilAsync:void 0};const $e=pn;Ye.dropUntilAsync=function(t,n){return(0,$e.isAsyncIterable)(t)?async function*(t){var e;const r=t[Symbol.asyncIterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=await r.next()),o||await n(t,i++)););for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}(t):async function*(t){var e;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||await n(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}(t)};var He={};He.dropUntil=void 0,He.dropUntil=function*(t,n){var e;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||n(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}};var Xe={drop:void 0};const Ge=Kt,Qe=Ce,Ze=Qt;Xe.drop=function(t,n){return(0,Ze.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Ze.assert)(n>=0,"The parameter count must be greater than or equal to 0"),0===n?(0,Qe.copyIterable)(t):(0,Ge.go)((function*(){var e;const r=t[Symbol.iterator]();let o;try{let t;for(;!(({value:t,done:o}=r.next()),o||n<=0);)n--;for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}))};var tr={filterAsync:void 0};const nr=pn;tr.filterAsync=function(t,n){return(0,nr.isAsyncIterable)(t)?async function*(t){let e=0;for await(const r of t)await n(r,e)&&(yield r),e++}(t):async function*(t){let e=0;for(const r of t)await n(r,e)&&(yield r),e++}(t)};var er={};er.filter=void 0,er.filter=function*(t,n){let e=0;for(const r of t)n(r,e)&&(yield r),e++};var rr={},or={},ir={flattenByAsync:void 0};const ar=pn;function sr(t){return(0,ar.isIterable)(t)&&(0,ar.isntChar)(t)}ir.flattenByAsync=function(t,n){return(0,ar.isAsyncIterable)(t)?async function*(t){const r=1;for await(const o of t)sr(o)&&await n(o,r)?yield*e(o,r+1):yield o}(t):function(t){return e(t,1)}(t);async function*e(t,r){for(const o of t)sr(o)&&await n(o,r)?yield*e(o,r+1):yield o}},or.flattenDeepAsync=void 0;const cr=ir,ur=Qt;or.flattenDeepAsync=function(t,n=1/0){return(0,ur.assert)(n===1/0||Number.isInteger(n),"The parameter depth must be an integer"),(0,ur.assert)(n>=0,"The parameter depth must be greater than or equal to 0"),(0,cr.flattenByAsync)(t,((t,e)=>e<=n))},rr.flattenAsync=void 0;const lr=or;rr.flattenAsync=function(t){return(0,lr.flattenDeepAsync)(t,1)};var fr={flattenBy:void 0};const yr=pn;fr.flattenBy=function(t,n){return function*t(e,r){for(const i of e)(0,yr.isIterable)(o=i)&&(0,yr.isntChar)(o)&&n(i,r)?yield*t(i,r+1):yield i;var o}(t,1)};var dr={flattenDeep:void 0};const vr=fr,hr=Qt;dr.flattenDeep=function(t,n=1/0){return(0,hr.assert)(n===1/0||Number.isInteger(n),"The parameter depth must be an integer"),(0,hr.assert)(n>=0,"The parameter depth must be greater than or equal to 0"),(0,vr.flattenBy)(t,((t,e)=>e<=n))};var pr={flatten:void 0};const mr=dr;pr.flatten=function(t){return(0,mr.flattenDeep)(t,1)};var br={mapAsync:void 0};const gr=pn;br.mapAsync=function(t,n){return(0,gr.isAsyncIterable)(t)?async function*(t){let e=0;for await(const r of t)yield await n(r,e),e++}(t):async function*(t){let e=0;for(const r of t)yield await n(r,e),e++}(t)};var wr={};wr.map=void 0,wr.map=function*(t,n){let e=0;for(const r of t)yield n(r,e),e++};var Ar={repeatAsync:void 0};const Ir=Kt,Sr=Qt;Ar.repeatAsync=function(t,n){return(0,Sr.assert)(n===1/0||Number.isInteger(n),"The parameter times must be an integer"),(0,Sr.assert)(n>=0,"The parameter times must be greater than or equal to 0"),n===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,Ir.go)((async function*(){const e=[];if(n>0){for await(const n of t)yield n,e.push(n);n--}for(;n>0;)yield*e,n--}))};var xr={repeat:void 0};const Tr=Kt,_r=Qt;xr.repeat=function(t,n){return(0,_r.assert)(n===1/0||Number.isInteger(n),"The parameter times must be an integer"),(0,_r.assert)(n>=0,"The parameter times must be greater than or equal to 0"),n===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,Tr.go)((function*(){const e=[];if(n>0){for(const n of t)yield n,e.push(n);n--}for(;n>0;)yield*e,n--}))};var Or={sliceAsync:void 0};const Er=Kt,jr=Qt;Or.sliceAsync=function(t,n,e=1/0){return(0,jr.assert)(Number.isInteger(n),"The parameter start must be an integer"),(0,jr.assert)(n>=0,"The parameter start must be greater than or equal to 0"),(0,jr.assert)(Number.isInteger(e),"The parameter end must be an integer"),(0,jr.assert)(e>=n,"The parameter end must be greater than or equal to start"),(0,Er.go)((async function*(){let r=0;for await(const o of t){if(r>=e)break;r>=n&&(yield o),r++}}))};var Nr={slice:void 0};const kr=Kt,Br=Qt;Nr.slice=function(t,n,e=1/0){return(0,Br.assert)(Number.isInteger(n),"The parameter start must be an integer"),(0,Br.assert)(n>=0,"The parameter start must be greater than or equal to 0"),(0,Br.assert)(Number.isInteger(e),"The parameter end must be an integer"),(0,Br.assert)(e>=n,"The parameter end must be greater than or equal to start"),(0,kr.go)((function*(){let r=0;for(const o of t){if(r>=e)break;r>=n&&(yield o),r++}}))};var Pr={};Pr.splitAsync=void 0,Pr.splitAsync=async function*(t,n){let e=[];for await(const r of t)r===n?(yield e,e=[]):e.push(r);yield e};var qr={splitByAsync:void 0};const Cr=pn;qr.splitByAsync=function(t,n){return(0,Cr.isAsyncIterable)(t)?async function*(t){let e=[],r=0;for await(const o of t)await n(o,r)?(yield e,e=[]):e.push(o),r++;yield e}(t):async function*(t){let e=[],r=0;for(const o of t)await n(o,r)?(yield e,e=[]):e.push(o),r++;yield e}(t)};var Rr={};Rr.splitBy=void 0,Rr.splitBy=function*(t,n){let e=[],r=0;for(const o of t)n(o,r)?(yield e,e=[]):e.push(o),r++;yield e};var Ur={};Ur.split=void 0,Ur.split=function*(t,n){let e=[];for(const r of t)r===n?(yield e,e=[]):e.push(r);yield e};var zr={takeAsync:void 0};const Dr=Kt,Mr=Qt;zr.takeAsync=function(t,n){return(0,Mr.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Mr.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,Dr.go)((async function*(){if(0!==n)for await(const e of t)if(yield e,0===--n)break}))};var Fr={takeRightAsync:void 0};const Jr=Kt,Vr=Qt;Fr.takeRightAsync=function(t,n){return(0,Vr.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Vr.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,Jr.go)((async function*(){var e;const r=t[Symbol.asyncIterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=await r.next()),!o;)t.push(i),t.length>n&&t.shift();yield*t}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}))};var Lr={takeRight:void 0};const Kr=Kt,Wr=Qt;Lr.takeRight=function(t,n){return(0,Wr.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Wr.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,Kr.go)((function*(){var e;const r=t[Symbol.iterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=r.next()),!o;)t.push(i),t.length>n&&t.shift();yield*t}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}))};var Yr={takeUntilAsync:void 0};const $r=pn;Yr.takeUntilAsync=function(t,n){return(0,$r.isAsyncIterable)(t)?async function*(t){let e=0;for await(const r of t){if(await n(r,e))break;yield r,e++}}(t):async function*(t){let e=0;for(const r of t){if(await n(r,e))break;yield r,e++}}(t)};var Hr={};Hr.takeUntil=void 0,Hr.takeUntil=function*(t,n){let e=0;for(const r of t){if(n(r,e))break;yield r,e++}};var Xr={take:void 0};const Gr=Kt,Qr=Qt;Xr.take=function(t,n){return(0,Qr.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Qr.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,Gr.go)((function*(){if(0!==n)for(const e of t)if(yield e,0===--n)break}))};var Zr={tapAsync:void 0};const to=pn;Zr.tapAsync=function(t,n){return(0,to.isAsyncIterable)(t)?async function*(t){let e=0;for await(const r of t)await n(r,e),yield r,e++}(t):async function*(t){let e=0;for(const r of t)await n(r,e),yield r,e++}(t)};var no={};no.tap=void 0,no.tap=function*(t,n){let e=0;for(const r of t)n(r,e),yield r,e++};var eo={};eo.toAsyncIterable=void 0,eo.toAsyncIterable=async function*(t){for(const n of t)yield n};var ro={};ro.transformAsync=void 0,ro.transformAsync=async function*(t,n){yield*n(t)};var oo={};oo.transform=void 0,oo.transform=function*(t,n){yield*n(t)};var io={};io.uniqAsync=void 0,io.uniqAsync=async function*(t){const n=new Set;for await(const e of t)n.has(e)||(yield e,n.add(e))};var ao={uniqByAsync:void 0};const so=pn;ao.uniqByAsync=function(t,n){return(0,so.isAsyncIterable)(t)?async function*(t){const e=new Set;let r=0;for await(const o of t){const t=await n(o,r);e.has(t)||(yield o,e.add(t)),r++}}(t):async function*(t){const e=new Set;let r=0;for(const o of t){const t=await n(o,r);e.has(t)||(yield o,e.add(t)),r++}}(t)};var co={};co.uniqBy=void 0,co.uniqBy=function*(t,n){const e=new Set;let r=0;for(const o of t){const t=n(o,r);e.has(t)||(yield o,e.add(t)),r++}};var uo={};uo.uniq=void 0,uo.uniq=function*(t){const n=new Set;for(const e of t)n.has(e)||(yield e,n.add(e))};var lo={zipAsync:void 0};const fo=pn;var yo;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(yo||(yo={})),lo.zipAsync=function(t,...n){return async function*(...t){var n,e,r,o;const i=t.length,a=t.map((t=>(0,fo.isAsyncIterable)(t)?[yo.Async,t[Symbol.asyncIterator]()]:[yo.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(i);for(let n=0;n<i;n++){const[e,r]=a[n];let o;if(o=e===yo.Async?await r.next():r.next(),o.done)return void(s[n]=!0);t[n]=o.value}yield t}}finally{const t=a.filter(((t,n)=>!s[n]));for(const[i,a]of t)i===yo.Async?await(null===(e=(n=a).return)||void 0===e?void 0:e.call(n)):null===(o=(r=a).return)||void 0===o||o.call(r)}}(t,...n)};var vo={};vo.zip=void 0,vo.zip=function(t,...n){return function*(...t){const n=t.length,e=t.map((t=>t[Symbol.iterator]())),r=e.map((()=>!1));try{for(;;){const t=new Array(n);for(let o=0;o<n;o++){const{value:n,done:i}=e[o].next();if(i)return void(r[o]=!0);t[o]=n}yield t}}finally{e.filter(((t,n)=>!r[n])).forEach((t=>{var n;return null===(n=t.return)||void 0===n?void 0:n.call(t)}))}}(t,...n)},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Gt,t),r(hn,t),r(Te,t),r(_e,t),r(je,t),r(Be,t),r(qe,t),r(De,t),r(Ve,t),r(Ye,t),r(He,t),r(Xe,t),r(tr,t),r(er,t),r(rr,t),r(ir,t),r(fr,t),r(or,t),r(dr,t),r(pr,t),r(br,t),r(wr,t),r(Ar,t),r(xr,t),r(Or,t),r(Nr,t),r(Pr,t),r(qr,t),r(Rr,t),r(Ur,t),r(zr,t),r(Fr,t),r(Lr,t),r(Yr,t),r(Hr,t),r(Xr,t),r(Zr,t),r(no,t),r(eo,t),r(ro,t),r(oo,t),r(io,t),r(ao,t),r(co,t),r(uo,t),r(lo,t),r(vo,t)}(Xt);var ho={},po={};po.consume=void 0,po.consume=function(t,n){return n(t)};var mo={eachAsync:void 0};const bo=pn;mo.eachAsync=function(t,n){return(0,bo.isAsyncIterable)(t)?async function(t){let e=0;for await(const r of t)await n(r,e),e++}(t):async function(t){let e=0;for(const r of t)await n(r,e),e++}(t)};var go={};go.each=void 0,go.each=function(t,n){let e=0;for(const r of t)n(r,e),e++};var wo={everyAsync:void 0};const Ao=pn;wo.everyAsync=function(t,n){return(0,Ao.isAsyncIterable)(t)?async function(t){let e=0;for await(const r of t){if(!await n(r,e))return!1;e++}return!0}(t):async function(t){let e=0;for(const r of t){if(!await n(r,e))return!1;e++}return!0}(t)};var Io={};Io.every=void 0,Io.every=function(t,n){let e=0;for(const r of t){if(!n(r,e))return!1;e++}return!0};var So={findAsync:void 0};const xo=pn;So.findAsync=function(t,n){return(0,xo.isAsyncIterable)(t)?async function(t){let e=0;for await(const r of t){if(await n(r,e))return r;e++}return}(t):async function(t){let e=0;for(const r of t){if(await n(r,e))return r;e++}return}(t)};var To={};To.find=void 0,To.find=function(t,n){let e=0;for(const r of t){if(n(r,e))return r;e++}};var _o={};_o.firstAsync=void 0,_o.firstAsync=async function(t){for await(const n of t)return n};var Oo={};Oo.first=void 0,Oo.first=function(t){for(const n of t)return n};var Eo={};Eo.includesAsync=void 0,Eo.includesAsync=async function(t,n){for await(const e of t)if(e===n)return!0;return!1};var jo={};jo.includes=void 0,jo.includes=function(t,n){for(const e of t)if(e===n)return!0;return!1};var No={};No.matchAsync=void 0,No.matchAsync=async function(t,n){const e=n.length;let r=0;for await(const o of t)if(o===n[r]&&r++,r===e)return!0;return!1};var ko={};ko.match=void 0,ko.match=function(t,n){const e=n.length;let r=0;for(const o of t)if(o===n[r]&&r++,r===e)return!0;return!1};var Bo={reduceAsync:void 0};const Po=pn;Bo.reduceAsync=function(t,n,e){return(0,Po.isUndefined)(e)?function(t,n){return(0,Po.isAsyncIterable)(t)?e(t):r(t);async function e(t){var e;const r=t[Symbol.asyncIterator]();let o;try{let t,a=await i(r),s=1;for(;({value:t,done:o}=await r.next()),!o;)a=await n(a,t,s++);return a}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}async function i(t){const n=await t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}async function r(t){var e;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=await n(a,t,s++);return a}finally{o||null===(e=r.return)||void 0===e||e.call(r)}function i(t){const n=t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}}(t,n):function(t,n,e){return(0,Po.isAsyncIterable)(t)?o(t):r(t);async function r(t){let r=e,o=0;for(const e of t)r=await n(r,e,o++);return r}async function o(t){let r=e,o=0;for await(const e of t)r=await n(r,e,o++);return r}}(t,n,e)};var qo={reduce:void 0};const Co=pn;qo.reduce=function(t,n,e){return(0,Co.isUndefined)(e)?function(t,n){var e;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=n(a,t,s++);return a}finally{o||null===(e=r.return)||void 0===e||e.call(r)}function i(t){const n=t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}(t,n):function(t,n,e){let r=e,o=0;for(const e of t)r=n(r,e,o++);return r}(t,n,e)};var Ro={someAsync:void 0};const Uo=pn;Ro.someAsync=function(t,n){return(0,Uo.isAsyncIterable)(t)?async function(t){let e=0;for await(const r of t){if(await n(r,e))return!0;e++}return!1}(t):async function(t){let e=0;for(const r of t){if(await n(r,e))return!0;e++}return!1}(t)};var zo={};zo.some=void 0,zo.some=function(t,n){let e=0;for(const r of t){if(n(r,e))return!0;e++}return!1};var Do={};Do.lastAsync=void 0,Do.lastAsync=async function(t){var n;const e=t[Symbol.asyncIterator]();let r;try{let t,o;for(;({value:t,done:r}=await e.next()),!r;)o=t;return o}finally{r||await(null===(n=e.return)||void 0===n?void 0:n.call(e))}};var Mo={};Mo.last=void 0,Mo.last=function(t){var n;const e=t[Symbol.iterator]();let r;try{let t,o;for(;({value:t,done:r}=e.next()),!r;)o=t;return o}finally{r||null===(n=e.return)||void 0===n||n.call(e)}};var Fo={toArrayAsync:void 0};const Jo=po;Fo.toArrayAsync=function(t){return(0,Jo.consume)(t,(async t=>{const n=[];for await(const e of t)n.push(e);return n}))};var Vo={toArray:void 0};const Lo=po;Vo.toArray=function(t){return(0,Lo.consume)(t,(t=>Array.from(t)))};var Ko={toSetAsync:void 0};const Wo=po;Ko.toSetAsync=function(t){return(0,Wo.consume)(t,(async t=>{const n=new Set;for await(const e of t)n.add(e);return n}))};var Yo={toSet:void 0};const $o=po;Yo.toSet=function(t){return(0,$o.consume)(t,(t=>new Set(t)))},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(po,t),r(mo,t),r(go,t),r(wo,t),r(Io,t),r(So,t),r(To,t),r(_o,t),r(Oo,t),r(Eo,t),r(jo,t),r(No,t),r(ko,t),r(Bo,t),r(qo,t),r(Ro,t),r(zo,t),r(Do,t),r(Mo,t),r(Fo,t),r(Vo,t),r(Ko,t),r(Yo,t)}(ho),function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Xt,t),r(ho,t)}(Ht);var Ho={},Xo={};Xo.traverseErrorPrototypeChain=void 0,Xo.traverseErrorPrototypeChain=function*(t){let n=t;for(;(n=Object.getPrototypeOf(n))&&(yield n,n!==Error.prototype););},Ho.getErrorNames=void 0;const Go=pn,Qo=Xo;Ho.getErrorNames=function*(t){var n;if((0,Go.isError)(t))for(const e of(0,Qo.traverseErrorPrototypeChain)(t))(null===(n=e.constructor)||void 0===n?void 0:n.name)&&(yield e.constructor.name);else yield t.name,yield*t.ancestors};var Zo={isSerializableError:void 0};const ti=pn;Zo.isSerializableError=function(t){return(0,ti.isObject)(t)&&(0,ti.isString)(t.name)&&(0,ti.isString)(t.message)&&((0,ti.isString)(t.stack)||(0,ti.isNull)(t.stack))&&(0,ti.isArray)(t.ancestors)&&t.ancestors.every(ti.isString)},$t.CustomError=void 0;const ni=Ht,ei=Ho,ri=pn,oi=Zo;class ii extends Error{get name(){var t,n;return null!==(n=null!==(t=(0,ni.first)((0,ei.getErrorNames)(this)))&&void 0!==t?t:ii.name)&&void 0!==n?n:"CustomError"}static[Symbol.hasInstance](t){var n;if((0,ri.isError)(t)||(0,oi.isSerializableError)(t)){const e=[null!==(n=this.prototype.constructor.name)&&void 0!==n?n:this.name,...(0,ei.getErrorNames)(this.prototype)].reverse(),r=(0,ni.toArray)((0,ei.getErrorNames)(t)).reverse();return e.every(((t,n)=>t===r[n]))}return!1}}$t.CustomError=ii;var ai={AssertionError:void 0};const si=$t;class ci extends si.CustomError{}ai.AssertionError=ci;var ui={normalize:void 0};const li=Ho,fi=Ht;ui.normalize=function(t){var n;const[e,...r]=(0,fi.toArray)((0,li.getErrorNames)(t));return{name:e,ancestors:r,message:t.message,stack:null!==(n=t.stack)&&void 0!==n?n:null}};var yi={},di={},vi={};vi.pass=void 0,vi.pass=function(){},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]});(n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(vi,t)}(di),yi.hydrate=void 0;const hi=di;function pi(t,n){const e=function(){(0,hi.pass)()};return(e.prototype=Object.create(t.prototype)).constructor=e,Object.defineProperty(e,"name",{value:n}),e}yi.hydrate=function(t){var n;const e=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of e)r=pi(r,t);const o=new r;return o.name=t.name,o.message=t.message,o.stack=null!==(n=t.stack)&&void 0!==n?n:void 0,o};var mi={assert:void 0};const bi=ai;mi.assert=function(t,n){if(!t)throw new bi.AssertionError(n)},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r($t,t),r(ai,t),r(Zo,t),r(ui,t),r(yi,t),r(mi,t),r(Ho,t),r(Xo,t)}(Yt),Lt.chunkAsync=void 0;const gi=Kt,wi=Yt;Lt.chunkAsync=function(t,n){return(0,wi.assert)(Number.isInteger(n),"The parameter size must be an integer"),(0,wi.assert)(n>0,"The parameter size must be greater than 0"),(0,gi.go)((async function*(){let e=[];for await(const r of t)e.push(r),e.length>=n&&(yield e,e=[]);e.length&&(yield e)}))};var Ai={chunkByAsync:void 0};const Ii=pn;Ai.chunkByAsync=function(t,n){return(0,Ii.isAsyncIterable)(t)?async function*(t){let e=[],r=0;for await(const o of t)e.push(o),await n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)}(t):async function*(t){let e=[],r=0;for(const o of t)e.push(o),await n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)}(t)};var Si={};Si.chunkBy=void 0,Si.chunkBy=function*(t,n){let e=[],r=0;for(const o of t)e.push(o),n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)};var xi={chunk:void 0};const Ti=Kt,_i=Yt;xi.chunk=function(t,n){return(0,_i.assert)(Number.isInteger(n),"The parameter size must be an integer"),(0,_i.assert)(n>0,"The parameter size must be greater than 0"),(0,Ti.go)((function*(){let e=[];for(const r of t)e.push(r),e.length>=n&&(yield e,e=[]);e.length&&(yield e)}))};var Oi={concatAsync:void 0};const Ei=pn,ji=Kt;Oi.concatAsync=function(t,...n){return(0,ji.go)((async function*(){for(const e of[t,...n])if((0,Ei.isAsyncIterable)(e))for await(const t of e)yield t;else for(const t of e)yield t}))};var Ni={concat:void 0};const ki=Kt;Ni.concat=function(t,...n){return(0,ki.go)((function*(){for(const e of[t,...n])yield*e}))};var Bi={},Pi={};Pi.copyIterable=Pi.copyAsyncIterable=void 0,Pi.copyAsyncIterable=async function*(t){for await(const n of t)yield n},Pi.copyIterable=function*(t){for(const n of t)yield n},Bi.dropAsync=void 0;const qi=Kt,Ci=Pi,Ri=Yt;Bi.dropAsync=function(t,n){return(0,Ri.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Ri.assert)(n>=0,"The parameter count must be greater than or equal to 0"),0===n?(0,Ci.copyAsyncIterable)(t):(0,qi.go)((async function*(){var e;const r=t[Symbol.asyncIterator]();let o;try{let t;for(;!(({value:t,done:o}=await r.next()),o||n<=0);)n--;for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}))};var Ui={dropRightAsync:void 0};const zi=Kt,Di=Pi,Mi=Yt;Ui.dropRightAsync=function(t,n){return(0,Mi.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Mi.assert)(n>=0,"The parameter count must be greater than or equal to 0"),0===n?(0,Di.copyAsyncIterable)(t):(0,zi.go)((async function*(){const e=(await async function(t){const n=[];for await(const e of t)n.push(e);return n}(t)).slice(0,-n);for(const t of e)yield t}))};var Fi={dropRight:void 0};const Ji=Kt,Vi=Pi,Li=Yt;Fi.dropRight=function(t,n){return(0,Li.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Li.assert)(n>=0,"The parameter count must be greater than or equal to 0"),0===n?(0,Vi.copyIterable)(t):(0,Ji.go)((function*(){const e=Array.from(t);yield*e.slice(0,-n)}))};var Ki={dropUntilAsync:void 0};const Wi=pn;Ki.dropUntilAsync=function(t,n){return(0,Wi.isAsyncIterable)(t)?async function*(t){var e;const r=t[Symbol.asyncIterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=await r.next()),o||await n(t,i++)););for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}(t):async function*(t){var e;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||await n(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}(t)};var Yi={};Yi.dropUntil=void 0,Yi.dropUntil=function*(t,n){var e;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||n(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}};var $i={drop:void 0};const Hi=Kt,Xi=Pi,Gi=Yt;$i.drop=function(t,n){return(0,Gi.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Gi.assert)(n>=0,"The parameter count must be greater than or equal to 0"),0===n?(0,Xi.copyIterable)(t):(0,Hi.go)((function*(){var e;const r=t[Symbol.iterator]();let o;try{let t;for(;!(({value:t,done:o}=r.next()),o||n<=0);)n--;for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}))};var Qi={filterAsync:void 0};const Zi=pn;Qi.filterAsync=function(t,n){return(0,Zi.isAsyncIterable)(t)?async function*(t){let e=0;for await(const r of t)await n(r,e)&&(yield r),e++}(t):async function*(t){let e=0;for(const r of t)await n(r,e)&&(yield r),e++}(t)};var ta={};ta.filter=void 0,ta.filter=function*(t,n){let e=0;for(const r of t)n(r,e)&&(yield r),e++};var na={},ea={},ra={flattenByAsync:void 0};const oa=pn;function ia(t){return(0,oa.isIterable)(t)&&(0,oa.isntChar)(t)}ra.flattenByAsync=function(t,n){return(0,oa.isAsyncIterable)(t)?async function*(t){const r=1;for await(const o of t)ia(o)&&await n(o,r)?yield*e(o,r+1):yield o}(t):function(t){return e(t,1)}(t);async function*e(t,r){for(const o of t)ia(o)&&await n(o,r)?yield*e(o,r+1):yield o}},ea.flattenDeepAsync=void 0;const aa=ra,sa=Yt;ea.flattenDeepAsync=function(t,n=1/0){return(0,sa.assert)(n===1/0||Number.isInteger(n),"The parameter depth must be an integer"),(0,sa.assert)(n>=0,"The parameter depth must be greater than or equal to 0"),(0,aa.flattenByAsync)(t,((t,e)=>e<=n))},na.flattenAsync=void 0;const ca=ea;na.flattenAsync=function(t){return(0,ca.flattenDeepAsync)(t,1)};var ua={flattenBy:void 0};const la=pn;ua.flattenBy=function(t,n){return function*t(e,r){for(const i of e)(0,la.isIterable)(o=i)&&(0,la.isntChar)(o)&&n(i,r)?yield*t(i,r+1):yield i;var o}(t,1)};var fa={flattenDeep:void 0};const ya=ua,da=Yt;fa.flattenDeep=function(t,n=1/0){return(0,da.assert)(n===1/0||Number.isInteger(n),"The parameter depth must be an integer"),(0,da.assert)(n>=0,"The parameter depth must be greater than or equal to 0"),(0,ya.flattenBy)(t,((t,e)=>e<=n))};var va={flatten:void 0};const ha=fa;va.flatten=function(t){return(0,ha.flattenDeep)(t,1)};var pa={mapAsync:void 0};const ma=pn;pa.mapAsync=function(t,n){return(0,ma.isAsyncIterable)(t)?async function*(t){let e=0;for await(const r of t)yield await n(r,e),e++}(t):async function*(t){let e=0;for(const r of t)yield await n(r,e),e++}(t)};var ba={};ba.map=void 0,ba.map=function*(t,n){let e=0;for(const r of t)yield n(r,e),e++};var ga={repeatAsync:void 0};const wa=Kt,Aa=Yt;ga.repeatAsync=function(t,n){return(0,Aa.assert)(n===1/0||Number.isInteger(n),"The parameter times must be an integer"),(0,Aa.assert)(n>=0,"The parameter times must be greater than or equal to 0"),n===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,wa.go)((async function*(){const e=[];if(n>0){for await(const n of t)yield n,e.push(n);n--}for(;n>0;)yield*e,n--}))};var Ia={repeat:void 0};const Sa=Kt,xa=Yt;Ia.repeat=function(t,n){return(0,xa.assert)(n===1/0||Number.isInteger(n),"The parameter times must be an integer"),(0,xa.assert)(n>=0,"The parameter times must be greater than or equal to 0"),n===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,Sa.go)((function*(){const e=[];if(n>0){for(const n of t)yield n,e.push(n);n--}for(;n>0;)yield*e,n--}))};var Ta={sliceAsync:void 0};const _a=Kt,Oa=Yt;Ta.sliceAsync=function(t,n,e=1/0){return(0,Oa.assert)(Number.isInteger(n),"The parameter start must be an integer"),(0,Oa.assert)(n>=0,"The parameter start must be greater than or equal to 0"),(0,Oa.assert)(Number.isInteger(e),"The parameter end must be an integer"),(0,Oa.assert)(e>=n,"The parameter end must be greater than or equal to start"),(0,_a.go)((async function*(){let r=0;for await(const o of t){if(r>=e)break;r>=n&&(yield o),r++}}))};var Ea={slice:void 0};const ja=Kt,Na=Yt;Ea.slice=function(t,n,e=1/0){return(0,Na.assert)(Number.isInteger(n),"The parameter start must be an integer"),(0,Na.assert)(n>=0,"The parameter start must be greater than or equal to 0"),(0,Na.assert)(Number.isInteger(e),"The parameter end must be an integer"),(0,Na.assert)(e>=n,"The parameter end must be greater than or equal to start"),(0,ja.go)((function*(){let r=0;for(const o of t){if(r>=e)break;r>=n&&(yield o),r++}}))};var ka={};ka.splitAsync=void 0,ka.splitAsync=async function*(t,n){let e=[];for await(const r of t)r===n?(yield e,e=[]):e.push(r);yield e};var Ba={splitByAsync:void 0};const Pa=pn;Ba.splitByAsync=function(t,n){return(0,Pa.isAsyncIterable)(t)?async function*(t){let e=[],r=0;for await(const o of t)await n(o,r)?(yield e,e=[]):e.push(o),r++;yield e}(t):async function*(t){let e=[],r=0;for(const o of t)await n(o,r)?(yield e,e=[]):e.push(o),r++;yield e}(t)};var qa={};qa.splitBy=void 0,qa.splitBy=function*(t,n){let e=[],r=0;for(const o of t)n(o,r)?(yield e,e=[]):e.push(o),r++;yield e};var Ca={};Ca.split=void 0,Ca.split=function*(t,n){let e=[];for(const r of t)r===n?(yield e,e=[]):e.push(r);yield e};var Ra={takeAsync:void 0};const Ua=Kt,za=Yt;Ra.takeAsync=function(t,n){return(0,za.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,za.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,Ua.go)((async function*(){if(0!==n)for await(const e of t)if(yield e,0===--n)break}))};var Da={takeRightAsync:void 0};const Ma=Kt,Fa=Yt;Da.takeRightAsync=function(t,n){return(0,Fa.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Fa.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,Ma.go)((async function*(){var e;const r=t[Symbol.asyncIterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=await r.next()),!o;)t.push(i),t.length>n&&t.shift();yield*t}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}))};var Ja={takeRight:void 0};const Va=Kt,La=Yt;Ja.takeRight=function(t,n){return(0,La.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,La.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,Va.go)((function*(){var e;const r=t[Symbol.iterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=r.next()),!o;)t.push(i),t.length>n&&t.shift();yield*t}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}))};var Ka={takeUntilAsync:void 0};const Wa=pn;Ka.takeUntilAsync=function(t,n){return(0,Wa.isAsyncIterable)(t)?async function*(t){let e=0;for await(const r of t){if(await n(r,e))break;yield r,e++}}(t):async function*(t){let e=0;for(const r of t){if(await n(r,e))break;yield r,e++}}(t)};var Ya={};Ya.takeUntil=void 0,Ya.takeUntil=function*(t,n){let e=0;for(const r of t){if(n(r,e))break;yield r,e++}};var $a={take:void 0};const Ha=Kt,Xa=Yt;$a.take=function(t,n){return(0,Xa.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Xa.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,Ha.go)((function*(){if(0!==n)for(const e of t)if(yield e,0===--n)break}))};var Ga={tapAsync:void 0};const Qa=pn;Ga.tapAsync=function(t,n){return(0,Qa.isAsyncIterable)(t)?async function*(t){let e=0;for await(const r of t)await n(r,e),yield r,e++}(t):async function*(t){let e=0;for(const r of t)await n(r,e),yield r,e++}(t)};var Za={};Za.tap=void 0,Za.tap=function*(t,n){let e=0;for(const r of t)n(r,e),yield r,e++};var ts={};ts.toAsyncIterable=void 0,ts.toAsyncIterable=async function*(t){for(const n of t)yield n};var ns={};ns.transformAsync=void 0,ns.transformAsync=async function*(t,n){yield*n(t)};var es={};es.transform=void 0,es.transform=function*(t,n){yield*n(t)};var rs={};rs.uniqAsync=void 0,rs.uniqAsync=async function*(t){const n=new Set;for await(const e of t)n.has(e)||(yield e,n.add(e))};var os={uniqByAsync:void 0};const is=pn;os.uniqByAsync=function(t,n){return(0,is.isAsyncIterable)(t)?async function*(t){const e=new Set;let r=0;for await(const o of t){const t=await n(o,r);e.has(t)||(yield o,e.add(t)),r++}}(t):async function*(t){const e=new Set;let r=0;for(const o of t){const t=await n(o,r);e.has(t)||(yield o,e.add(t)),r++}}(t)};var as={};as.uniqBy=void 0,as.uniqBy=function*(t,n){const e=new Set;let r=0;for(const o of t){const t=n(o,r);e.has(t)||(yield o,e.add(t)),r++}};var ss={};ss.uniq=void 0,ss.uniq=function*(t){const n=new Set;for(const e of t)n.has(e)||(yield e,n.add(e))};var cs={zipAsync:void 0};const us=pn;var ls;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(ls||(ls={})),cs.zipAsync=function(t,...n){return async function*(...t){var n,e,r,o;const i=t.length,a=t.map((t=>(0,us.isAsyncIterable)(t)?[ls.Async,t[Symbol.asyncIterator]()]:[ls.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(i);for(let n=0;n<i;n++){const[e,r]=a[n];let o;if(o=e===ls.Async?await r.next():r.next(),o.done)return void(s[n]=!0);t[n]=o.value}yield t}}finally{const t=a.filter(((t,n)=>!s[n]));for(const[i,a]of t)i===ls.Async?await(null===(e=(n=a).return)||void 0===e?void 0:e.call(n)):null===(o=(r=a).return)||void 0===o||o.call(r)}}(t,...n)};var fs={};fs.zip=void 0,fs.zip=function(t,...n){return function*(...t){const n=t.length,e=t.map((t=>t[Symbol.iterator]())),r=e.map((()=>!1));try{for(;;){const t=new Array(n);for(let o=0;o<n;o++){const{value:n,done:i}=e[o].next();if(i)return void(r[o]=!0);t[o]=n}yield t}}finally{e.filter(((t,n)=>!r[n])).forEach((t=>{var n;return null===(n=t.return)||void 0===n?void 0:n.call(t)}))}}(t,...n)},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Lt,t),r(Ai,t),r(Si,t),r(xi,t),r(Oi,t),r(Ni,t),r(Bi,t),r(Ui,t),r(Fi,t),r(Ki,t),r(Yi,t),r($i,t),r(Qi,t),r(ta,t),r(na,t),r(ra,t),r(ua,t),r(ea,t),r(fa,t),r(va,t),r(pa,t),r(ba,t),r(ga,t),r(Ia,t),r(Ta,t),r(Ea,t),r(ka,t),r(Ba,t),r(qa,t),r(Ca,t),r(Ra,t),r(Da,t),r(Ja,t),r(Ka,t),r(Ya,t),r($a,t),r(Ga,t),r(Za,t),r(ts,t),r(ns,t),r(es,t),r(rs,t),r(os,t),r(as,t),r(ss,t),r(cs,t),r(fs,t)}(Vt);var ys={},ds={};ds.consume=void 0,ds.consume=function(t,n){return n(t)};var vs={eachAsync:void 0};const hs=pn;vs.eachAsync=function(t,n){return(0,hs.isAsyncIterable)(t)?async function(t){let e=0;for await(const r of t)await n(r,e),e++}(t):async function(t){let e=0;for(const r of t)await n(r,e),e++}(t)};var ps={};ps.each=void 0,ps.each=function(t,n){let e=0;for(const r of t)n(r,e),e++};var ms={everyAsync:void 0};const bs=pn;ms.everyAsync=function(t,n){return(0,bs.isAsyncIterable)(t)?async function(t){let e=0;for await(const r of t){if(!await n(r,e))return!1;e++}return!0}(t):async function(t){let e=0;for(const r of t){if(!await n(r,e))return!1;e++}return!0}(t)};var gs={};gs.every=void 0,gs.every=function(t,n){let e=0;for(const r of t){if(!n(r,e))return!1;e++}return!0};var ws={findAsync:void 0};const As=pn;ws.findAsync=function(t,n){return(0,As.isAsyncIterable)(t)?async function(t){let e=0;for await(const r of t){if(await n(r,e))return r;e++}return}(t):async function(t){let e=0;for(const r of t){if(await n(r,e))return r;e++}return}(t)};var Is={};Is.find=void 0,Is.find=function(t,n){let e=0;for(const r of t){if(n(r,e))return r;e++}};var Ss={};Ss.firstAsync=void 0,Ss.firstAsync=async function(t){for await(const n of t)return n};var xs={};xs.first=void 0,xs.first=function(t){for(const n of t)return n};var Ts={};Ts.includesAsync=void 0,Ts.includesAsync=async function(t,n){for await(const e of t)if(e===n)return!0;return!1};var _s={};_s.includes=void 0,_s.includes=function(t,n){for(const e of t)if(e===n)return!0;return!1};var Os={};Os.matchAsync=void 0,Os.matchAsync=async function(t,n){const e=n.length;let r=0;for await(const o of t)if(o===n[r]&&r++,r===e)return!0;return!1};var Es={};Es.match=void 0,Es.match=function(t,n){const e=n.length;let r=0;for(const o of t)if(o===n[r]&&r++,r===e)return!0;return!1};var js={reduceAsync:void 0};const Ns=pn;js.reduceAsync=function(t,n,e){return(0,Ns.isUndefined)(e)?function(t,n){return(0,Ns.isAsyncIterable)(t)?e(t):r(t);async function e(t){var e;const r=t[Symbol.asyncIterator]();let o;try{let t,a=await i(r),s=1;for(;({value:t,done:o}=await r.next()),!o;)a=await n(a,t,s++);return a}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}async function i(t){const n=await t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}async function r(t){var e;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=await n(a,t,s++);return a}finally{o||null===(e=r.return)||void 0===e||e.call(r)}function i(t){const n=t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}}(t,n):function(t,n,e){return(0,Ns.isAsyncIterable)(t)?o(t):r(t);async function r(t){let r=e,o=0;for(const e of t)r=await n(r,e,o++);return r}async function o(t){let r=e,o=0;for await(const e of t)r=await n(r,e,o++);return r}}(t,n,e)};var ks={reduce:void 0};const Bs=pn;ks.reduce=function(t,n,e){return(0,Bs.isUndefined)(e)?function(t,n){var e;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=n(a,t,s++);return a}finally{o||null===(e=r.return)||void 0===e||e.call(r)}function i(t){const n=t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}(t,n):function(t,n,e){let r=e,o=0;for(const e of t)r=n(r,e,o++);return r}(t,n,e)};var Ps={someAsync:void 0};const qs=pn;Ps.someAsync=function(t,n){return(0,qs.isAsyncIterable)(t)?async function(t){let e=0;for await(const r of t){if(await n(r,e))return!0;e++}return!1}(t):async function(t){let e=0;for(const r of t){if(await n(r,e))return!0;e++}return!1}(t)};var Cs={};Cs.some=void 0,Cs.some=function(t,n){let e=0;for(const r of t){if(n(r,e))return!0;e++}return!1};var Rs={};Rs.lastAsync=void 0,Rs.lastAsync=async function(t){var n;const e=t[Symbol.asyncIterator]();let r;try{let t,o;for(;({value:t,done:r}=await e.next()),!r;)o=t;return o}finally{r||await(null===(n=e.return)||void 0===n?void 0:n.call(e))}};var Us={};Us.last=void 0,Us.last=function(t){var n;const e=t[Symbol.iterator]();let r;try{let t,o;for(;({value:t,done:r}=e.next()),!r;)o=t;return o}finally{r||null===(n=e.return)||void 0===n||n.call(e)}};var zs={toArrayAsync:void 0};const Ds=ds;zs.toArrayAsync=function(t){return(0,Ds.consume)(t,(async t=>{const n=[];for await(const e of t)n.push(e);return n}))};var Ms={toArray:void 0};const Fs=ds;Ms.toArray=function(t){return(0,Fs.consume)(t,(t=>Array.from(t)))};var Js={toSetAsync:void 0};const Vs=ds;Js.toSetAsync=function(t){return(0,Vs.consume)(t,(async t=>{const n=new Set;for await(const e of t)n.add(e);return n}))};var Ls={toSet:void 0};const Ks=ds;Ls.toSet=function(t){return(0,Ks.consume)(t,(t=>new Set(t)))},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(ds,t),r(vs,t),r(ps,t),r(ms,t),r(gs,t),r(ws,t),r(Is,t),r(Ss,t),r(xs,t),r(Ts,t),r(_s,t),r(Os,t),r(Es,t),r(js,t),r(ks,t),r(Ps,t),r(Cs,t),r(Rs,t),r(Us,t),r(zs,t),r(Ms,t),r(Js,t),r(Ls,t)}(ys),function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Vt,t),r(ys,t)}(Jt);var Ws={},Ys={};Ys.traverseErrorPrototypeChain=void 0,Ys.traverseErrorPrototypeChain=function*(t){let n=t;for(;(n=Object.getPrototypeOf(n))&&(yield n,n!==Error.prototype););},Ws.getErrorNames=void 0;const $s=pn,Hs=Ys;Ws.getErrorNames=function*(t){var n;if((0,$s.isError)(t))for(const e of(0,Hs.traverseErrorPrototypeChain)(t))(null===(n=e.constructor)||void 0===n?void 0:n.name)&&(yield e.constructor.name);else yield t.name,yield*t.ancestors};var Xs={isSerializableError:void 0};const Gs=pn;Xs.isSerializableError=function(t){return(0,Gs.isObject)(t)&&(0,Gs.isString)(t.name)&&(0,Gs.isString)(t.message)&&((0,Gs.isString)(t.stack)||(0,Gs.isNull)(t.stack))&&(0,Gs.isArray)(t.ancestors)&&t.ancestors.every(Gs.isString)},Ft.CustomError=void 0;const Qs=Jt,Zs=Ws,tc=pn,nc=Xs;class ec extends Error{get name(){var t,n;return null!==(n=null!==(t=(0,Qs.first)((0,Zs.getErrorNames)(this)))&&void 0!==t?t:ec.name)&&void 0!==n?n:"CustomError"}static[Symbol.hasInstance](t){var n;if((0,tc.isError)(t)||(0,nc.isSerializableError)(t)){const e=[null!==(n=this.prototype.constructor.name)&&void 0!==n?n:this.name,...(0,Zs.getErrorNames)(this.prototype)].reverse(),r=(0,Qs.toArray)((0,Zs.getErrorNames)(t)).reverse();return e.every(((t,n)=>t===r[n]))}return!1}}Ft.CustomError=ec;var rc={AssertionError:void 0};const oc=Ft;class ic extends oc.CustomError{}rc.AssertionError=ic;var ac={normalize:void 0};const sc=Ws,cc=Jt;ac.normalize=function(t){var n;const[e,...r]=(0,cc.toArray)((0,sc.getErrorNames)(t));return{name:e,ancestors:r,message:t.message,stack:null!==(n=t.stack)&&void 0!==n?n:null}};var uc={},lc={},fc={};fc.pass=void 0,fc.pass=function(){},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]});(n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(fc,t)}(lc),uc.hydrate=void 0;const yc=lc;function dc(t,n){const e=function(){(0,yc.pass)()};return(e.prototype=Object.create(t.prototype)).constructor=e,Object.defineProperty(e,"name",{value:n}),e}uc.hydrate=function(t){var n;const e=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of e)r=dc(r,t);const o=new r;return o.name=t.name,o.message=t.message,o.stack=null!==(n=t.stack)&&void 0!==n?n:void 0,o};var vc={assert:void 0};const hc=rc;vc.assert=function(t,n){if(!t)throw new hc.AssertionError(n)},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var o=Object.getOwnPropertyDescriptor(n,e);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,o)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Ft,t),r(rc,t),r(Xs,t),r(ac,t),r(uc,t),r(vc,t),r(Ws,t),r(Ys,t)}(Mt);var pc={},mc={},bc={},gc={},wc={};wc.go=void 0,wc.go=function(t){return t()};var Ac={};Ac.goMicrotask=void 0,Ac.goMicrotask=function(t){return new Promise(((n,e)=>{queueMicrotask((async()=>{try{n(await t())}catch(t){e(t)}}))}))};var Ic={},Sc={},xc={},Tc={},_c={};_c.random=void 0,_c.random=function(t,n){return Math.random()*(n-t)+t};var Oc={};Oc.randomInt=void 0,Oc.randomInt=function(t,n){return t=Math.ceil(t),n=Math.floor(n),Math.floor(Math.random()*(n-t))+t};var Ec={};Ec.randomIntInclusive=void 0,Ec.randomIntInclusive=function(t,n){return t=Math.ceil(t),n=Math.floor(n),Math.floor(Math.random()*(n-t+1))+t},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(_c,t),r(Oc,t),r(Ec,t)}(Tc),xc.calculateExponentialBackoffTimeout=void 0;const jc=Tc;xc.calculateExponentialBackoffTimeout=function({baseTimeout:t,retries:n,maxTimeout:e=1/0,factor:r=2,jitter:o=!0}){const i=Math.min(r**n*t,e);return o?(0,jc.randomIntInclusive)(0,i):i};var Nc={};Nc.setTimeout=void 0,Nc.setTimeout=function(t,n){const e=globalThis.setTimeout(n,t);return()=>clearTimeout(e)};var kc={setSchedule:void 0};const Bc=Nc;kc.setSchedule=function(t,n){const e=t-Date.now();return(0,Bc.setTimeout)(e,n)};var Pc={};Pc.setInterval=void 0,Pc.setInterval=function(t,n){const e=globalThis.setInterval(n,t);return()=>clearInterval(e)};var qc={setImmediate:void 0};const Cc=Nc;qc.setImmediate=function(t){if(globalThis.setImmediate){const n=globalThis.setImmediate(t);return()=>clearImmediate(n)}return(0,Cc.setTimeout)(0,t)};var Rc={setTimeoutLoop:void 0};const Uc=Nc;Rc.setTimeoutLoop=function(t,n){let e=!1,r=(0,Uc.setTimeout)(t,(async function o(){await n(),e||(r=(0,Uc.setTimeout)(t,o))}));return()=>{e=!0,r()}};var zc={setDynamicTimeoutLoop:void 0};const Dc=Nc;zc.setDynamicTimeoutLoop=function(t,n){let e=!1,r=(0,Dc.setTimeout)(t,(async function o(){const i=Date.now();await n();const a=Date.now()-i;e||(r=(0,Dc.setTimeout)(Math.max(t-a,0),o))}));return()=>{e=!0,r()}},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(xc,t),r(Nc,t),r(kc,t),r(Pc,t),r(qc,t),r(Rc,t),r(zc,t)}(Sc),Ic.goMacrotask=void 0;const Mc=Sc;Ic.goMacrotask=function(t){return new Promise(((n,e)=>{(0,Mc.setImmediate)((async()=>{try{n(await t())}catch(t){e(t)}}))}))},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var o=Object.getOwnPropertyDescriptor(n,e);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,o)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(wc,t),r(Ac,t),r(Ic,t)}(gc);var Fc={},Jc={},Vc={},Lc={},Kc={},Wc={},Yc={};Yc.go=void 0,Yc.go=function(t){return t()},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]});(n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(Yc,t)}(Wc);var $c={},Hc={},Xc={},Gc={},Qc={},Zc={},tu={};tu.go=void 0,tu.go=function(t){return t()},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]});(n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(tu,t)}(Zc);var nu={},eu={},ru={},ou={},iu={},au={},su={CustomError:void 0};class cu extends Error{get name(){return this.constructor.name}}su.CustomError=cu;var uu={ExpectedError:void 0};const lu=su;class fu extends lu.CustomError{}uu.ExpectedError=fu;var yu={AssertionError:void 0};const du=su;class vu extends du.CustomError{}yu.AssertionError=vu;var hu={};hu.normalize=void 0,hu.normalize=function(t){var n;return{name:t.name,message:t.message,stack:null!==(n=t.stack)&&void 0!==n?n:null}};var pu={refute:void 0};const mu=uu;pu.refute=function(t,n){if(t)throw new mu.ExpectedError(n)};var bu={assert:void 0};const gu=yu;bu.assert=function(t,n){if(!t)throw new gu.AssertionError(n)},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(su,t),r(uu,t),r(yu,t),r(hu,t),r(pu,t),r(bu,t)}(au),iu.chunkAsync=void 0;const wu=Zc,Au=au;iu.chunkAsync=function(t,n){return(0,Au.assert)(Number.isInteger(n),"The parameter size must be an integer"),(0,Au.assert)(n>0,"The parameter size must be greater than 0"),(0,wu.go)((async function*(){let e=[];for await(const r of t)e.push(r),e.length>=n&&(yield e,e=[]);e.length&&(yield e)}))};var Iu={},Su={},xu={};function Tu(t){return Array.isArray(t)}xu.isntEmptyArray=xu.isEmptyArray=xu.isntArray=xu.isArray=void 0,xu.isArray=Tu,xu.isntArray=function(t){return!Tu(t)},xu.isEmptyArray=function(t){return 0===t.length},xu.isntEmptyArray=function(t){return 0!==t.length};var _u={},Ou={};function Eu(t){return null===t}Ou.isntNull=Ou.isNull=void 0,Ou.isNull=Eu,Ou.isntNull=function(t){return!Eu(t)};var ju={};function Nu(t){return void 0===t}ju.isntUndefined=ju.isUndefined=void 0,ju.isUndefined=Nu,ju.isntUndefined=function(t){return!Nu(t)},_u.isntAsyncIterable=_u.isAsyncIterable=void 0;const ku=Ou,Bu=ju;function Pu(t){return(0,ku.isntNull)(t)&&(0,Bu.isntUndefined)(t)&&"function"==typeof t[Symbol.asyncIterator]}_u.isAsyncIterable=Pu,_u.isntAsyncIterable=function(t){return!Pu(t)};var qu={};function Cu(t){return"bigint"==typeof t}qu.isntBigInt=qu.isBigInt=void 0,qu.isBigInt=Cu,qu.isntBigInt=function(t){return!Cu(t)};var Ru={};function Uu(t){return"boolean"==typeof t}Ru.isntBoolean=Ru.isBoolean=void 0,Ru.isBoolean=Uu,Ru.isntBoolean=function(t){return!Uu(t)};var zu={},Du={};function Mu(t){return"string"==typeof t}Du.isntString=Du.isString=void 0,Du.isString=Mu,Du.isntString=function(t){return!Mu(t)},zu.isntChar=zu.isChar=void 0;const Fu=Du;function Ju(t){return(0,Fu.isString)(t)&&1===t.length}zu.isChar=Ju,zu.isntChar=function(t){return!Ju(t)};var Vu={};function Lu(t){return t instanceof Date}Vu.isntDate=Vu.isDate=void 0,Vu.isDate=Lu,Vu.isntDate=function(t){return!Lu(t)};var Ku={};Ku.inEnum=void 0,Ku.inEnum=function(t,n){return Object.values(n).includes(t)};var Wu={};function Yu(t){return t instanceof Error}Wu.isntError=Wu.isError=void 0,Wu.isError=Yu,Wu.isntError=function(t){return!Yu(t)};var $u={};function Hu(t){return!t}$u.isntFalsy=$u.isFalsy=void 0,$u.isFalsy=Hu,$u.isntFalsy=function(t){return!Hu(t)};var Xu={};function Gu(t){return"function"==typeof t}Xu.isntFunction=Xu.isFunction=void 0,Xu.isFunction=Gu,Xu.isntFunction=function(t){return!Gu(t)};var Qu={};Qu.isntIterable=Qu.isIterable=void 0;const Zu=Ou,tl=ju;function nl(t){return(0,Zu.isntNull)(t)&&(0,tl.isntUndefined)(t)&&"function"==typeof t[Symbol.iterator]}Qu.isIterable=nl,Qu.isntIterable=function(t){return!nl(t)};var el={},rl={},ol=n&&n.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};rl.isntEmptyObject=rl.isEmptyObject=rl.isntPlainObject=rl.isPlainObject=rl.isntObject=rl.isObject=void 0;const il=ol(oe);function al(t){return null!==t&&"object"==typeof t}function sl(t){return(0,il.default)(t)}rl.isObject=al,rl.isntObject=function(t){return!al(t)},rl.isPlainObject=sl,rl.isntPlainObject=function(t){return!sl(t)},rl.isEmptyObject=function(t){return 0===Object.keys(t).length},rl.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var cl={};function ul(t){return"number"==typeof t}cl.isntNumber=cl.isNumber=void 0,cl.isNumber=ul,cl.isntNumber=function(t){return!ul(t)},el.isntJsonRpcError=el.isJsonRpcError=el.isntJsonRpcSuccess=el.isJsonRpcSuccess=el.isntJsonRpcRequest=el.isJsonRpcRequest=el.isntJsonRpcNotification=el.isJsonRpcNotification=void 0;const ll=xu,fl=rl,yl=Du,dl=cl,vl=ju;function hl(t){return(0,yl.isString)(t)||(0,dl.isNumber)(t)}function pl(t){return(0,ll.isArray)(t)||(0,fl.isObject)(t)}function ml(t){return(0,fl.isPlainObject)(t)&&(0,yl.isString)(t.jsonrpc)&&(0,yl.isString)(t.method)&&(0,vl.isUndefined)(t.id)&&pl(t.params)}function bl(t){return(0,fl.isPlainObject)(t)&&(0,yl.isString)(t.jsonrpc)&&(0,yl.isString)(t.method)&&hl(t.id)&&pl(t.params)}function gl(t){return(0,fl.isPlainObject)(t)&&(0,yl.isString)(t.jsonrpc)&&(0,yl.isString)(t.id)&&"result"in t}function wl(t){return(0,fl.isPlainObject)(t)&&(0,yl.isString)(t.jsonrpc)&&hl(t.id)&&function(t){return(0,fl.isPlainObject)(t)&&(0,dl.isNumber)(t.code)&&(0,yl.isString)(t.message)&&((0,vl.isUndefined)(t.data)||(0,fl.isObject)(t.data))}(t.error)}el.isJsonRpcNotification=ml,el.isntJsonRpcNotification=function(t){return!ml(t)},el.isJsonRpcRequest=bl,el.isntJsonRpcRequest=function(t){return!bl(t)},el.isJsonRpcSuccess=gl,el.isntJsonRpcSuccess=function(t){return!gl(t)},el.isJsonRpcError=wl,el.isntJsonRpcError=function(t){return!wl(t)};var Al={};Al.isntJson=Al.isJson=void 0,Al.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},Al.isntJson=function t(n){return!t()};var Il={};Il.isAbsoluteURL=void 0,Il.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(xu,t),r(_u,t),r(qu,t),r(Ru,t),r(zu,t),r(Vu,t),r(Ku,t),r(Wu,t),r($u,t),r(Xu,t),r(Qu,t),r(el,t),r(Al,t),r(Ou,t),r(cl,t),r(rl,t),r(Du,t),r(ju,t),r(Il,t)}(Su),Iu.chunkByAsync=void 0;const Sl=Su;Iu.chunkByAsync=function(t,n){return(0,Sl.isAsyncIterable)(t)?async function*(t){let e=[],r=0;for await(const o of t)e.push(o),await n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)}(t):async function*(t){let e=[],r=0;for(const o of t)e.push(o),await n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)}(t)};var xl={};xl.chunkBy=void 0,xl.chunkBy=function*(t,n){let e=[],r=0;for(const o of t)e.push(o),n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)};var Tl={chunk:void 0};const _l=Zc,Ol=au;Tl.chunk=function(t,n){return(0,Ol.assert)(Number.isInteger(n),"The parameter size must be an integer"),(0,Ol.assert)(n>0,"The parameter size must be greater than 0"),(0,_l.go)((function*(){let e=[];for(const r of t)e.push(r),e.length>=n&&(yield e,e=[]);e.length&&(yield e)}))};var El={concatAsync:void 0};const jl=Su,Nl=Zc;El.concatAsync=function(t,...n){return(0,Nl.go)((async function*(){for(const e of[t,...n])if((0,jl.isAsyncIterable)(e))for await(const t of e)yield t;else for(const t of e)yield t}))};var kl={concat:void 0};const Bl=Zc;kl.concat=function(t,...n){return(0,Bl.go)((function*(){for(const e of[t,...n])yield*e}))};var Pl={},ql={};ql.copyIterable=ql.copyAsyncIterable=void 0,ql.copyAsyncIterable=async function*(t){for await(const n of t)yield n},ql.copyIterable=function*(t){for(const n of t)yield n},Pl.dropAsync=void 0;const Cl=Zc,Rl=ql,Ul=au;Pl.dropAsync=function(t,n){return(0,Ul.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Ul.assert)(n>=0,"The parameter count must be greater than or equal to 0"),0===n?(0,Rl.copyAsyncIterable)(t):(0,Cl.go)((async function*(){var e;const r=t[Symbol.asyncIterator]();let o;try{let t;for(;!(({value:t,done:o}=await r.next()),o||n<=0);)n--;for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}))};var zl={dropRightAsync:void 0};const Dl=Zc,Ml=ql,Fl=au;zl.dropRightAsync=function(t,n){return(0,Fl.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Fl.assert)(n>=0,"The parameter count must be greater than or equal to 0"),0===n?(0,Ml.copyAsyncIterable)(t):(0,Dl.go)((async function*(){const e=(await async function(t){const n=[];for await(const e of t)n.push(e);return n}(t)).slice(0,-n);for(const t of e)yield t}))};var Jl={dropRight:void 0};const Vl=Zc,Ll=ql,Kl=au;Jl.dropRight=function(t,n){return(0,Kl.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Kl.assert)(n>=0,"The parameter count must be greater than or equal to 0"),0===n?(0,Ll.copyIterable)(t):(0,Vl.go)((function*(){const e=Array.from(t);yield*e.slice(0,-n)}))};var Wl={dropUntilAsync:void 0};const Yl=Su;Wl.dropUntilAsync=function(t,n){return(0,Yl.isAsyncIterable)(t)?async function*(t){var e;const r=t[Symbol.asyncIterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=await r.next()),o||await n(t,i++)););for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}(t):async function*(t){var e;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||await n(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}(t)};var $l={};$l.dropUntil=void 0,$l.dropUntil=function*(t,n){var e;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||n(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}};var Hl={drop:void 0};const Xl=Zc,Gl=ql,Ql=au;Hl.drop=function(t,n){return(0,Ql.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Ql.assert)(n>=0,"The parameter count must be greater than or equal to 0"),0===n?(0,Gl.copyIterable)(t):(0,Xl.go)((function*(){var e;const r=t[Symbol.iterator]();let o;try{let t;for(;!(({value:t,done:o}=r.next()),o||n<=0);)n--;for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}))};var Zl={filterAsync:void 0};const tf=Su;Zl.filterAsync=function(t,n){return(0,tf.isAsyncIterable)(t)?async function*(t){let e=0;for await(const r of t)await n(r,e)&&(yield r),e++}(t):async function*(t){let e=0;for(const r of t)await n(r,e)&&(yield r),e++}(t)};var nf={};nf.filter=void 0,nf.filter=function*(t,n){let e=0;for(const r of t)n(r,e)&&(yield r),e++};var ef={},rf={},of={flattenByAsync:void 0};const af=Su;function sf(t){return(0,af.isIterable)(t)&&(0,af.isntChar)(t)}of.flattenByAsync=function(t,n){return(0,af.isAsyncIterable)(t)?async function*(t){const r=1;for await(const o of t)sf(o)&&await n(o,r)?yield*e(o,r+1):yield o}(t):function(t){return e(t,1)}(t);async function*e(t,r){for(const o of t)sf(o)&&await n(o,r)?yield*e(o,r+1):yield o}},rf.flattenDeepAsync=void 0;const cf=of,uf=au;rf.flattenDeepAsync=function(t,n=1/0){return(0,uf.assert)(n===1/0||Number.isInteger(n),"The parameter depth must be an integer"),(0,uf.assert)(n>=0,"The parameter depth must be greater than or equal to 0"),(0,cf.flattenByAsync)(t,((t,e)=>e<=n))},ef.flattenAsync=void 0;const lf=rf;ef.flattenAsync=function(t){return(0,lf.flattenDeepAsync)(t,1)};var ff={flattenBy:void 0};const yf=Su;ff.flattenBy=function(t,n){return function*t(e,r){for(const i of e)(0,yf.isIterable)(o=i)&&(0,yf.isntChar)(o)&&n(i,r)?yield*t(i,r+1):yield i;var o}(t,1)};var df={flattenDeep:void 0};const vf=ff,hf=au;df.flattenDeep=function(t,n=1/0){return(0,hf.assert)(n===1/0||Number.isInteger(n),"The parameter depth must be an integer"),(0,hf.assert)(n>=0,"The parameter depth must be greater than or equal to 0"),(0,vf.flattenBy)(t,((t,e)=>e<=n))};var pf={flatten:void 0};const mf=df;pf.flatten=function(t){return(0,mf.flattenDeep)(t,1)};var bf={mapAsync:void 0};const gf=Su;bf.mapAsync=function(t,n){return(0,gf.isAsyncIterable)(t)?async function*(t){let e=0;for await(const r of t)yield await n(r,e),e++}(t):async function*(t){let e=0;for(const r of t)yield await n(r,e),e++}(t)};var wf={};wf.map=void 0,wf.map=function*(t,n){let e=0;for(const r of t)yield n(r,e),e++};var Af={repeatAsync:void 0};const If=Zc,Sf=au;Af.repeatAsync=function(t,n){return(0,Sf.assert)(n===1/0||Number.isInteger(n),"The parameter times must be an integer"),(0,Sf.assert)(n>=0,"The parameter times must be greater than or equal to 0"),n===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,If.go)((async function*(){const e=[];if(n>0){for await(const n of t)yield n,e.push(n);n--}for(;n>0;)yield*e,n--}))};var xf={repeat:void 0};const Tf=Zc,_f=au;xf.repeat=function(t,n){return(0,_f.assert)(n===1/0||Number.isInteger(n),"The parameter times must be an integer"),(0,_f.assert)(n>=0,"The parameter times must be greater than or equal to 0"),n===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,Tf.go)((function*(){const e=[];if(n>0){for(const n of t)yield n,e.push(n);n--}for(;n>0;)yield*e,n--}))};var Of={sliceAsync:void 0};const Ef=Zc,jf=au;Of.sliceAsync=function(t,n,e=1/0){return(0,jf.assert)(Number.isInteger(n),"The parameter start must be an integer"),(0,jf.assert)(n>=0,"The parameter start must be greater than or equal to 0"),(0,jf.assert)(Number.isInteger(e),"The parameter end must be an integer"),(0,jf.assert)(e>=n,"The parameter end must be greater than or equal to start"),(0,Ef.go)((async function*(){let r=0;for await(const o of t){if(r>=e)break;r>=n&&(yield o),r++}}))};var Nf={slice:void 0};const kf=Zc,Bf=au;Nf.slice=function(t,n,e=1/0){return(0,Bf.assert)(Number.isInteger(n),"The parameter start must be an integer"),(0,Bf.assert)(n>=0,"The parameter start must be greater than or equal to 0"),(0,Bf.assert)(Number.isInteger(e),"The parameter end must be an integer"),(0,Bf.assert)(e>=n,"The parameter end must be greater than or equal to start"),(0,kf.go)((function*(){let r=0;for(const o of t){if(r>=e)break;r>=n&&(yield o),r++}}))};var Pf={};Pf.splitAsync=void 0,Pf.splitAsync=async function*(t,n){let e=[];for await(const r of t)r===n?(yield e,e=[]):e.push(r);yield e};var qf={splitByAsync:void 0};const Cf=Su;qf.splitByAsync=function(t,n){return(0,Cf.isAsyncIterable)(t)?async function*(t){let e=[],r=0;for await(const o of t)await n(o,r)?(yield e,e=[]):e.push(o),r++;yield e}(t):async function*(t){let e=[],r=0;for(const o of t)await n(o,r)?(yield e,e=[]):e.push(o),r++;yield e}(t)};var Rf={};Rf.splitBy=void 0,Rf.splitBy=function*(t,n){let e=[],r=0;for(const o of t)n(o,r)?(yield e,e=[]):e.push(o),r++;yield e};var Uf={};Uf.split=void 0,Uf.split=function*(t,n){let e=[];for(const r of t)r===n?(yield e,e=[]):e.push(r);yield e};var zf={takeAsync:void 0};const Df=Zc,Mf=au;zf.takeAsync=function(t,n){return(0,Mf.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Mf.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,Df.go)((async function*(){if(0!==n)for await(const e of t)if(yield e,0===--n)break}))};var Ff={takeRightAsync:void 0};const Jf=Zc,Vf=au;Ff.takeRightAsync=function(t,n){return(0,Vf.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Vf.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,Jf.go)((async function*(){var e;const r=t[Symbol.asyncIterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=await r.next()),!o;)t.push(i),t.length>n&&t.shift();yield*t}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}))};var Lf={takeRight:void 0};const Kf=Zc,Wf=au;Lf.takeRight=function(t,n){return(0,Wf.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Wf.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,Kf.go)((function*(){var e;const r=t[Symbol.iterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=r.next()),!o;)t.push(i),t.length>n&&t.shift();yield*t}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}))};var Yf={takeUntilAsync:void 0};const $f=Su;Yf.takeUntilAsync=function(t,n){return(0,$f.isAsyncIterable)(t)?async function*(t){let e=0;for await(const r of t){if(await n(r,e))break;yield r,e++}}(t):async function*(t){let e=0;for(const r of t){if(await n(r,e))break;yield r,e++}}(t)};var Hf={};Hf.takeUntil=void 0,Hf.takeUntil=function*(t,n){let e=0;for(const r of t){if(n(r,e))break;yield r,e++}};var Xf={take:void 0};const Gf=Zc,Qf=au;Xf.take=function(t,n){return(0,Qf.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Qf.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,Gf.go)((function*(){if(0!==n)for(const e of t)if(yield e,0===--n)break}))};var Zf={tapAsync:void 0};const ty=Su;Zf.tapAsync=function(t,n){return(0,ty.isAsyncIterable)(t)?async function*(t){let e=0;for await(const r of t)await n(r,e),yield r,e++}(t):async function*(t){let e=0;for(const r of t)await n(r,e),yield r,e++}(t)};var ny={};ny.tap=void 0,ny.tap=function*(t,n){let e=0;for(const r of t)n(r,e),yield r,e++};var ey={};ey.toAsyncIterable=void 0,ey.toAsyncIterable=async function*(t){for(const n of t)yield n};var ry={};ry.transformAsync=void 0,ry.transformAsync=async function*(t,n){yield*n(t)};var oy={};oy.transform=void 0,oy.transform=function*(t,n){yield*n(t)};var iy={};iy.uniqAsync=void 0,iy.uniqAsync=async function*(t){const n=new Set;for await(const e of t)n.has(e)||(yield e,n.add(e))};var ay={uniqByAsync:void 0};const sy=Su;ay.uniqByAsync=function(t,n){return(0,sy.isAsyncIterable)(t)?async function*(t){const e=new Set;let r=0;for await(const o of t){const t=await n(o,r);e.has(t)||(yield o,e.add(t)),r++}}(t):async function*(t){const e=new Set;let r=0;for(const o of t){const t=await n(o,r);e.has(t)||(yield o,e.add(t)),r++}}(t)};var cy={};cy.uniqBy=void 0,cy.uniqBy=function*(t,n){const e=new Set;let r=0;for(const o of t){const t=n(o,r);e.has(t)||(yield o,e.add(t)),r++}};var uy={};uy.uniq=void 0,uy.uniq=function*(t){const n=new Set;for(const e of t)n.has(e)||(yield e,n.add(e))};var ly={zipAsync:void 0};const fy=Su;var yy;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(yy||(yy={})),ly.zipAsync=function(t,...n){return async function*(...t){var n,e,r,o;const i=t.length,a=t.map((t=>(0,fy.isAsyncIterable)(t)?[yy.Async,t[Symbol.asyncIterator]()]:[yy.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(i);for(let n=0;n<i;n++){const[e,r]=a[n];let o;if(o=e===yy.Async?await r.next():r.next(),o.done)return void(s[n]=!0);t[n]=o.value}yield t}}finally{const t=a.filter(((t,n)=>!s[n]));for(const[i,a]of t)i===yy.Async?await(null===(e=(n=a).return)||void 0===e?void 0:e.call(n)):null===(o=(r=a).return)||void 0===o||o.call(r)}}(t,...n)};var dy={};dy.zip=void 0,dy.zip=function(t,...n){return function*(...t){const n=t.length,e=t.map((t=>t[Symbol.iterator]())),r=e.map((()=>!1));try{for(;;){const t=new Array(n);for(let o=0;o<n;o++){const{value:n,done:i}=e[o].next();if(i)return void(r[o]=!0);t[o]=n}yield t}}finally{e.filter(((t,n)=>!r[n])).forEach((t=>{var n;return null===(n=t.return)||void 0===n?void 0:n.call(t)}))}}(t,...n)},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(iu,t),r(Iu,t),r(xl,t),r(Tl,t),r(El,t),r(kl,t),r(Pl,t),r(zl,t),r(Jl,t),r(Wl,t),r($l,t),r(Hl,t),r(Zl,t),r(nf,t),r(ef,t),r(of,t),r(ff,t),r(rf,t),r(df,t),r(pf,t),r(bf,t),r(wf,t),r(Af,t),r(xf,t),r(Of,t),r(Nf,t),r(Pf,t),r(qf,t),r(Rf,t),r(Uf,t),r(zf,t),r(Ff,t),r(Lf,t),r(Yf,t),r(Hf,t),r(Xf,t),r(Zf,t),r(ny,t),r(ey,t),r(ry,t),r(oy,t),r(iy,t),r(ay,t),r(cy,t),r(uy,t),r(ly,t),r(dy,t)}(ou);var vy={},hy={};hy.consume=void 0,hy.consume=function(t,n){return n(t)};var py={eachAsync:void 0};const my=Su;py.eachAsync=function(t,n){return(0,my.isAsyncIterable)(t)?async function(t){let e=0;for await(const r of t)await n(r,e),e++}(t):async function(t){let e=0;for(const r of t)await n(r,e),e++}(t)};var by={};by.each=void 0,by.each=function(t,n){let e=0;for(const r of t)n(r,e),e++};var gy={everyAsync:void 0};const wy=Su;gy.everyAsync=function(t,n){return(0,wy.isAsyncIterable)(t)?async function(t){let e=0;for await(const r of t){if(!await n(r,e))return!1;e++}return!0}(t):async function(t){let e=0;for(const r of t){if(!await n(r,e))return!1;e++}return!0}(t)};var Ay={};Ay.every=void 0,Ay.every=function(t,n){let e=0;for(const r of t){if(!n(r,e))return!1;e++}return!0};var Iy={findAsync:void 0};const Sy=Su;Iy.findAsync=function(t,n){return(0,Sy.isAsyncIterable)(t)?async function(t){let e=0;for await(const r of t){if(await n(r,e))return r;e++}return}(t):async function(t){let e=0;for(const r of t){if(await n(r,e))return r;e++}return}(t)};var xy={};xy.find=void 0,xy.find=function(t,n){let e=0;for(const r of t){if(n(r,e))return r;e++}};var Ty={};Ty.firstAsync=void 0,Ty.firstAsync=async function(t){for await(const n of t)return n};var _y={};_y.first=void 0,_y.first=function(t){for(const n of t)return n};var Oy={};Oy.includesAsync=void 0,Oy.includesAsync=async function(t,n){for await(const e of t)if(e===n)return!0;return!1};var Ey={};Ey.includes=void 0,Ey.includes=function(t,n){for(const e of t)if(e===n)return!0;return!1};var jy={};jy.matchAsync=void 0,jy.matchAsync=async function(t,n){const e=n.length;let r=0;for await(const o of t)if(o===n[r]&&r++,r===e)return!0;return!1};var Ny={};Ny.match=void 0,Ny.match=function(t,n){const e=n.length;let r=0;for(const o of t)if(o===n[r]&&r++,r===e)return!0;return!1};var ky={reduceAsync:void 0};const By=Su;ky.reduceAsync=function(t,n,e){return(0,By.isUndefined)(e)?function(t,n){return(0,By.isAsyncIterable)(t)?e(t):r(t);async function e(t){var e;const r=t[Symbol.asyncIterator]();let o;try{let t,a=await i(r),s=1;for(;({value:t,done:o}=await r.next()),!o;)a=await n(a,t,s++);return a}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}async function i(t){const n=await t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}async function r(t){var e;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=await n(a,t,s++);return a}finally{o||null===(e=r.return)||void 0===e||e.call(r)}function i(t){const n=t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}}(t,n):function(t,n,e){return(0,By.isAsyncIterable)(t)?o(t):r(t);async function r(t){let r=e,o=0;for(const e of t)r=await n(r,e,o++);return r}async function o(t){let r=e,o=0;for await(const e of t)r=await n(r,e,o++);return r}}(t,n,e)};var Py={reduce:void 0};const qy=Su;Py.reduce=function(t,n,e){return(0,qy.isUndefined)(e)?function(t,n){var e;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=n(a,t,s++);return a}finally{o||null===(e=r.return)||void 0===e||e.call(r)}function i(t){const n=t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}(t,n):function(t,n,e){let r=e,o=0;for(const e of t)r=n(r,e,o++);return r}(t,n,e)};var Cy={someAsync:void 0};const Ry=Su;Cy.someAsync=function(t,n){return(0,Ry.isAsyncIterable)(t)?async function(t){let e=0;for await(const r of t){if(await n(r,e))return!0;e++}return!1}(t):async function(t){let e=0;for(const r of t){if(await n(r,e))return!0;e++}return!1}(t)};var Uy={};Uy.some=void 0,Uy.some=function(t,n){let e=0;for(const r of t){if(n(r,e))return!0;e++}return!1};var zy={};zy.lastAsync=void 0,zy.lastAsync=async function(t){var n;const e=t[Symbol.asyncIterator]();let r;try{let t,o;for(;({value:t,done:r}=await e.next()),!r;)o=t;return o}finally{r||await(null===(n=e.return)||void 0===n?void 0:n.call(e))}};var Dy={};Dy.last=void 0,Dy.last=function(t){var n;const e=t[Symbol.iterator]();let r;try{let t,o;for(;({value:t,done:r}=e.next()),!r;)o=t;return o}finally{r||null===(n=e.return)||void 0===n||n.call(e)}};var My={toArrayAsync:void 0};const Fy=hy;My.toArrayAsync=function(t){return(0,Fy.consume)(t,(async t=>{const n=[];for await(const e of t)n.push(e);return n}))};var Jy={toArray:void 0};const Vy=hy;Jy.toArray=function(t){return(0,Vy.consume)(t,(t=>Array.from(t)))};var Ly={toSetAsync:void 0};const Ky=hy;Ly.toSetAsync=function(t){return(0,Ky.consume)(t,(async t=>{const n=new Set;for await(const e of t)n.add(e);return n}))};var Wy={toSet:void 0};const Yy=hy;Wy.toSet=function(t){return(0,Yy.consume)(t,(t=>new Set(t)))},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(hy,t),r(py,t),r(by,t),r(gy,t),r(Ay,t),r(Iy,t),r(xy,t),r(Ty,t),r(_y,t),r(Oy,t),r(Ey,t),r(jy,t),r(Ny,t),r(ky,t),r(Py,t),r(Cy,t),r(Uy,t),r(zy,t),r(Dy,t),r(My,t),r(Jy,t),r(Ly,t),r(Wy,t)}(vy),function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(ou,t),r(vy,t)}(ru);var $y={},Hy={};Hy.traverseErrorPrototypeChain=void 0,Hy.traverseErrorPrototypeChain=function*(t){let n=t;for(;(n=Object.getPrototypeOf(n))&&(yield n,n!==Error.prototype););},$y.getErrorNames=void 0;const Xy=Su,Gy=Hy;$y.getErrorNames=function*(t){var n;if((0,Xy.isError)(t))for(const e of(0,Gy.traverseErrorPrototypeChain)(t))(null===(n=e.constructor)||void 0===n?void 0:n.name)&&(yield e.constructor.name);else yield t.name,yield*t.ancestors};var Qy={isSerializableError:void 0};const Zy=Su;Qy.isSerializableError=function(t){return(0,Zy.isObject)(t)&&(0,Zy.isString)(t.name)&&(0,Zy.isString)(t.message)&&((0,Zy.isString)(t.stack)||(0,Zy.isNull)(t.stack))&&(0,Zy.isArray)(t.ancestors)&&t.ancestors.every(Zy.isString)},eu.CustomError=void 0;const td=ru,nd=$y,ed=Su,rd=Qy;class od extends Error{get name(){var t,n;return null!==(n=null!==(t=(0,td.first)((0,nd.getErrorNames)(this)))&&void 0!==t?t:od.name)&&void 0!==n?n:"CustomError"}static[Symbol.hasInstance](t){var n;if((0,ed.isError)(t)||(0,rd.isSerializableError)(t)){const e=[null!==(n=this.prototype.constructor.name)&&void 0!==n?n:this.name,...(0,nd.getErrorNames)(this.prototype)].reverse(),r=(0,td.toArray)((0,nd.getErrorNames)(t)).reverse();return e.every(((t,n)=>t===r[n]))}return!1}}eu.CustomError=od;var id={AssertionError:void 0};const ad=eu;class sd extends ad.CustomError{}id.AssertionError=sd;var cd={normalize:void 0};const ud=$y,ld=ru;cd.normalize=function(t){var n;const[e,...r]=(0,ld.toArray)((0,ud.getErrorNames)(t));return{name:e,ancestors:r,message:t.message,stack:null!==(n=t.stack)&&void 0!==n?n:null}};var fd={},yd={},dd={};dd.pass=void 0,dd.pass=function(){},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]});(n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)})(dd,t)}(yd),fd.hydrate=void 0;const vd=yd;function hd(t,n){const e=function(){(0,vd.pass)()};return(e.prototype=Object.create(t.prototype)).constructor=e,Object.defineProperty(e,"name",{value:n}),e}fd.hydrate=function(t){var n;const e=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of e)r=hd(r,t);const o=new r;return o.name=t.name,o.message=t.message,o.stack=null!==(n=t.stack)&&void 0!==n?n:void 0,o};var pd={assert:void 0};const md=id;pd.assert=function(t,n){if(!t)throw new md.AssertionError(n)},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(eu,t),r(id,t),r(Qy,t),r(cd,t),r(fd,t),r(pd,t),r($y,t),r(Hy,t)}(nu),Qc.chunkAsync=void 0;const bd=Zc,gd=nu;Qc.chunkAsync=function(t,n){return(0,gd.assert)(Number.isInteger(n),"The parameter size must be an integer"),(0,gd.assert)(n>0,"The parameter size must be greater than 0"),(0,bd.go)((async function*(){let e=[];for await(const r of t)e.push(r),e.length>=n&&(yield e,e=[]);e.length&&(yield e)}))};var wd={chunkByAsync:void 0};const Ad=Su;wd.chunkByAsync=function(t,n){return(0,Ad.isAsyncIterable)(t)?async function*(t){let e=[],r=0;for await(const o of t)e.push(o),await n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)}(t):async function*(t){let e=[],r=0;for(const o of t)e.push(o),await n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)}(t)};var Id={};Id.chunkBy=void 0,Id.chunkBy=function*(t,n){let e=[],r=0;for(const o of t)e.push(o),n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)};var Sd={chunk:void 0};const xd=Zc,Td=nu;Sd.chunk=function(t,n){return(0,Td.assert)(Number.isInteger(n),"The parameter size must be an integer"),(0,Td.assert)(n>0,"The parameter size must be greater than 0"),(0,xd.go)((function*(){let e=[];for(const r of t)e.push(r),e.length>=n&&(yield e,e=[]);e.length&&(yield e)}))};var _d={concatAsync:void 0};const Od=Su,Ed=Zc;_d.concatAsync=function(t,...n){return(0,Ed.go)((async function*(){for(const e of[t,...n])if((0,Od.isAsyncIterable)(e))for await(const t of e)yield t;else for(const t of e)yield t}))};var jd={concat:void 0};const Nd=Zc;jd.concat=function(t,...n){return(0,Nd.go)((function*(){for(const e of[t,...n])yield*e}))};var kd={},Bd={};Bd.copyIterable=Bd.copyAsyncIterable=void 0,Bd.copyAsyncIterable=async function*(t){for await(const n of t)yield n},Bd.copyIterable=function*(t){for(const n of t)yield n},kd.dropAsync=void 0;const Pd=Zc,qd=Bd,Cd=nu;kd.dropAsync=function(t,n){return(0,Cd.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Cd.assert)(n>=0,"The parameter count must be greater than or equal to 0"),0===n?(0,qd.copyAsyncIterable)(t):(0,Pd.go)((async function*(){var e;const r=t[Symbol.asyncIterator]();let o;try{let t;for(;!(({value:t,done:o}=await r.next()),o||n<=0);)n--;for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}))};var Rd={dropRightAsync:void 0};const Ud=Zc,zd=Bd,Dd=nu;Rd.dropRightAsync=function(t,n){return(0,Dd.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Dd.assert)(n>=0,"The parameter count must be greater than or equal to 0"),0===n?(0,zd.copyAsyncIterable)(t):(0,Ud.go)((async function*(){const e=(await async function(t){const n=[];for await(const e of t)n.push(e);return n}(t)).slice(0,-n);for(const t of e)yield t}))};var Md={dropRight:void 0};const Fd=Zc,Jd=Bd,Vd=nu;Md.dropRight=function(t,n){return(0,Vd.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Vd.assert)(n>=0,"The parameter count must be greater than or equal to 0"),0===n?(0,Jd.copyIterable)(t):(0,Fd.go)((function*(){const e=Array.from(t);yield*e.slice(0,-n)}))};var Ld={dropUntilAsync:void 0};const Kd=Su;Ld.dropUntilAsync=function(t,n){return(0,Kd.isAsyncIterable)(t)?async function*(t){var e;const r=t[Symbol.asyncIterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=await r.next()),o||await n(t,i++)););for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}(t):async function*(t){var e;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||await n(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}(t)};var Wd={};Wd.dropUntil=void 0,Wd.dropUntil=function*(t,n){var e;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||n(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}};var Yd={drop:void 0};const $d=Zc,Hd=Bd,Xd=nu;Yd.drop=function(t,n){return(0,Xd.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Xd.assert)(n>=0,"The parameter count must be greater than or equal to 0"),0===n?(0,Hd.copyIterable)(t):(0,$d.go)((function*(){var e;const r=t[Symbol.iterator]();let o;try{let t;for(;!(({value:t,done:o}=r.next()),o||n<=0);)n--;for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}))};var Gd={filterAsync:void 0};const Qd=Su;Gd.filterAsync=function(t,n){return(0,Qd.isAsyncIterable)(t)?async function*(t){let e=0;for await(const r of t)await n(r,e)&&(yield r),e++}(t):async function*(t){let e=0;for(const r of t)await n(r,e)&&(yield r),e++}(t)};var Zd={};Zd.filter=void 0,Zd.filter=function*(t,n){let e=0;for(const r of t)n(r,e)&&(yield r),e++};var tv={},nv={},ev={flattenByAsync:void 0};const rv=Su;function ov(t){return(0,rv.isIterable)(t)&&(0,rv.isntChar)(t)}ev.flattenByAsync=function(t,n){return(0,rv.isAsyncIterable)(t)?async function*(t){const r=1;for await(const o of t)ov(o)&&await n(o,r)?yield*e(o,r+1):yield o}(t):function(t){return e(t,1)}(t);async function*e(t,r){for(const o of t)ov(o)&&await n(o,r)?yield*e(o,r+1):yield o}},nv.flattenDeepAsync=void 0;const iv=ev,av=nu;nv.flattenDeepAsync=function(t,n=1/0){return(0,av.assert)(n===1/0||Number.isInteger(n),"The parameter depth must be an integer"),(0,av.assert)(n>=0,"The parameter depth must be greater than or equal to 0"),(0,iv.flattenByAsync)(t,((t,e)=>e<=n))},tv.flattenAsync=void 0;const sv=nv;tv.flattenAsync=function(t){return(0,sv.flattenDeepAsync)(t,1)};var cv={flattenBy:void 0};const uv=Su;cv.flattenBy=function(t,n){return function*t(e,r){for(const i of e)(0,uv.isIterable)(o=i)&&(0,uv.isntChar)(o)&&n(i,r)?yield*t(i,r+1):yield i;var o}(t,1)};var lv={flattenDeep:void 0};const fv=cv,yv=nu;lv.flattenDeep=function(t,n=1/0){return(0,yv.assert)(n===1/0||Number.isInteger(n),"The parameter depth must be an integer"),(0,yv.assert)(n>=0,"The parameter depth must be greater than or equal to 0"),(0,fv.flattenBy)(t,((t,e)=>e<=n))};var dv={flatten:void 0};const vv=lv;dv.flatten=function(t){return(0,vv.flattenDeep)(t,1)};var hv={mapAsync:void 0};const pv=Su;hv.mapAsync=function(t,n){return(0,pv.isAsyncIterable)(t)?async function*(t){let e=0;for await(const r of t)yield await n(r,e),e++}(t):async function*(t){let e=0;for(const r of t)yield await n(r,e),e++}(t)};var mv={};mv.map=void 0,mv.map=function*(t,n){let e=0;for(const r of t)yield n(r,e),e++};var bv={repeatAsync:void 0};const gv=Zc,wv=nu;bv.repeatAsync=function(t,n){return(0,wv.assert)(n===1/0||Number.isInteger(n),"The parameter times must be an integer"),(0,wv.assert)(n>=0,"The parameter times must be greater than or equal to 0"),n===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,gv.go)((async function*(){const e=[];if(n>0){for await(const n of t)yield n,e.push(n);n--}for(;n>0;)yield*e,n--}))};var Av={repeat:void 0};const Iv=Zc,Sv=nu;Av.repeat=function(t,n){return(0,Sv.assert)(n===1/0||Number.isInteger(n),"The parameter times must be an integer"),(0,Sv.assert)(n>=0,"The parameter times must be greater than or equal to 0"),n===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,Iv.go)((function*(){const e=[];if(n>0){for(const n of t)yield n,e.push(n);n--}for(;n>0;)yield*e,n--}))};var xv={sliceAsync:void 0};const Tv=Zc,_v=nu;xv.sliceAsync=function(t,n,e=1/0){return(0,_v.assert)(Number.isInteger(n),"The parameter start must be an integer"),(0,_v.assert)(n>=0,"The parameter start must be greater than or equal to 0"),(0,_v.assert)(Number.isInteger(e),"The parameter end must be an integer"),(0,_v.assert)(e>=n,"The parameter end must be greater than or equal to start"),(0,Tv.go)((async function*(){let r=0;for await(const o of t){if(r>=e)break;r>=n&&(yield o),r++}}))};var Ov={slice:void 0};const Ev=Zc,jv=nu;Ov.slice=function(t,n,e=1/0){return(0,jv.assert)(Number.isInteger(n),"The parameter start must be an integer"),(0,jv.assert)(n>=0,"The parameter start must be greater than or equal to 0"),(0,jv.assert)(Number.isInteger(e),"The parameter end must be an integer"),(0,jv.assert)(e>=n,"The parameter end must be greater than or equal to start"),(0,Ev.go)((function*(){let r=0;for(const o of t){if(r>=e)break;r>=n&&(yield o),r++}}))};var Nv={};Nv.splitAsync=void 0,Nv.splitAsync=async function*(t,n){let e=[];for await(const r of t)r===n?(yield e,e=[]):e.push(r);yield e};var kv={splitByAsync:void 0};const Bv=Su;kv.splitByAsync=function(t,n){return(0,Bv.isAsyncIterable)(t)?async function*(t){let e=[],r=0;for await(const o of t)await n(o,r)?(yield e,e=[]):e.push(o),r++;yield e}(t):async function*(t){let e=[],r=0;for(const o of t)await n(o,r)?(yield e,e=[]):e.push(o),r++;yield e}(t)};var Pv={};Pv.splitBy=void 0,Pv.splitBy=function*(t,n){let e=[],r=0;for(const o of t)n(o,r)?(yield e,e=[]):e.push(o),r++;yield e};var qv={};qv.split=void 0,qv.split=function*(t,n){let e=[];for(const r of t)r===n?(yield e,e=[]):e.push(r);yield e};var Cv={takeAsync:void 0};const Rv=Zc,Uv=nu;Cv.takeAsync=function(t,n){return(0,Uv.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Uv.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,Rv.go)((async function*(){if(0!==n)for await(const e of t)if(yield e,0===--n)break}))};var zv={takeRightAsync:void 0};const Dv=Zc,Mv=nu;zv.takeRightAsync=function(t,n){return(0,Mv.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Mv.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,Dv.go)((async function*(){var e;const r=t[Symbol.asyncIterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=await r.next()),!o;)t.push(i),t.length>n&&t.shift();yield*t}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}))};var Fv={takeRight:void 0};const Jv=Zc,Vv=nu;Fv.takeRight=function(t,n){return(0,Vv.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Vv.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,Jv.go)((function*(){var e;const r=t[Symbol.iterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=r.next()),!o;)t.push(i),t.length>n&&t.shift();yield*t}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}))};var Lv={takeUntilAsync:void 0};const Kv=Su;Lv.takeUntilAsync=function(t,n){return(0,Kv.isAsyncIterable)(t)?async function*(t){let e=0;for await(const r of t){if(await n(r,e))break;yield r,e++}}(t):async function*(t){let e=0;for(const r of t){if(await n(r,e))break;yield r,e++}}(t)};var Wv={};Wv.takeUntil=void 0,Wv.takeUntil=function*(t,n){let e=0;for(const r of t){if(n(r,e))break;yield r,e++}};var Yv={take:void 0};const $v=Zc,Hv=nu;Yv.take=function(t,n){return(0,Hv.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Hv.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,$v.go)((function*(){if(0!==n)for(const e of t)if(yield e,0===--n)break}))};var Xv={tapAsync:void 0};const Gv=Su;Xv.tapAsync=function(t,n){return(0,Gv.isAsyncIterable)(t)?async function*(t){let e=0;for await(const r of t)await n(r,e),yield r,e++}(t):async function*(t){let e=0;for(const r of t)await n(r,e),yield r,e++}(t)};var Qv={};Qv.tap=void 0,Qv.tap=function*(t,n){let e=0;for(const r of t)n(r,e),yield r,e++};var Zv={};Zv.toAsyncIterable=void 0,Zv.toAsyncIterable=async function*(t){for(const n of t)yield n};var th={};th.transformAsync=void 0,th.transformAsync=async function*(t,n){yield*n(t)};var nh={};nh.transform=void 0,nh.transform=function*(t,n){yield*n(t)};var eh={};eh.uniqAsync=void 0,eh.uniqAsync=async function*(t){const n=new Set;for await(const e of t)n.has(e)||(yield e,n.add(e))};var rh={uniqByAsync:void 0};const oh=Su;rh.uniqByAsync=function(t,n){return(0,oh.isAsyncIterable)(t)?async function*(t){const e=new Set;let r=0;for await(const o of t){const t=await n(o,r);e.has(t)||(yield o,e.add(t)),r++}}(t):async function*(t){const e=new Set;let r=0;for(const o of t){const t=await n(o,r);e.has(t)||(yield o,e.add(t)),r++}}(t)};var ih={};ih.uniqBy=void 0,ih.uniqBy=function*(t,n){const e=new Set;let r=0;for(const o of t){const t=n(o,r);e.has(t)||(yield o,e.add(t)),r++}};var ah={};ah.uniq=void 0,ah.uniq=function*(t){const n=new Set;for(const e of t)n.has(e)||(yield e,n.add(e))};var sh={zipAsync:void 0};const ch=Su;var uh;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(uh||(uh={})),sh.zipAsync=function(t,...n){return async function*(...t){var n,e,r,o;const i=t.length,a=t.map((t=>(0,ch.isAsyncIterable)(t)?[uh.Async,t[Symbol.asyncIterator]()]:[uh.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(i);for(let n=0;n<i;n++){const[e,r]=a[n];let o;if(o=e===uh.Async?await r.next():r.next(),o.done)return void(s[n]=!0);t[n]=o.value}yield t}}finally{const t=a.filter(((t,n)=>!s[n]));for(const[i,a]of t)i===uh.Async?await(null===(e=(n=a).return)||void 0===e?void 0:e.call(n)):null===(o=(r=a).return)||void 0===o||o.call(r)}}(t,...n)};var lh={};lh.zip=void 0,lh.zip=function(t,...n){return function*(...t){const n=t.length,e=t.map((t=>t[Symbol.iterator]())),r=e.map((()=>!1));try{for(;;){const t=new Array(n);for(let o=0;o<n;o++){const{value:n,done:i}=e[o].next();if(i)return void(r[o]=!0);t[o]=n}yield t}}finally{e.filter(((t,n)=>!r[n])).forEach((t=>{var n;return null===(n=t.return)||void 0===n?void 0:n.call(t)}))}}(t,...n)},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Qc,t),r(wd,t),r(Id,t),r(Sd,t),r(_d,t),r(jd,t),r(kd,t),r(Rd,t),r(Md,t),r(Ld,t),r(Wd,t),r(Yd,t),r(Gd,t),r(Zd,t),r(tv,t),r(ev,t),r(cv,t),r(nv,t),r(lv,t),r(dv,t),r(hv,t),r(mv,t),r(bv,t),r(Av,t),r(xv,t),r(Ov,t),r(Nv,t),r(kv,t),r(Pv,t),r(qv,t),r(Cv,t),r(zv,t),r(Fv,t),r(Lv,t),r(Wv,t),r(Yv,t),r(Xv,t),r(Qv,t),r(Zv,t),r(th,t),r(nh,t),r(eh,t),r(rh,t),r(ih,t),r(ah,t),r(sh,t),r(lh,t)}(Gc);var fh={},yh={};yh.consume=void 0,yh.consume=function(t,n){return n(t)};var dh={eachAsync:void 0};const vh=Su;dh.eachAsync=function(t,n){return(0,vh.isAsyncIterable)(t)?async function(t){let e=0;for await(const r of t)await n(r,e),e++}(t):async function(t){let e=0;for(const r of t)await n(r,e),e++}(t)};var hh={};hh.each=void 0,hh.each=function(t,n){let e=0;for(const r of t)n(r,e),e++};var ph={everyAsync:void 0};const mh=Su;ph.everyAsync=function(t,n){return(0,mh.isAsyncIterable)(t)?async function(t){let e=0;for await(const r of t){if(!await n(r,e))return!1;e++}return!0}(t):async function(t){let e=0;for(const r of t){if(!await n(r,e))return!1;e++}return!0}(t)};var bh={};bh.every=void 0,bh.every=function(t,n){let e=0;for(const r of t){if(!n(r,e))return!1;e++}return!0};var gh={findAsync:void 0};const wh=Su;gh.findAsync=function(t,n){return(0,wh.isAsyncIterable)(t)?async function(t){let e=0;for await(const r of t){if(await n(r,e))return r;e++}return}(t):async function(t){let e=0;for(const r of t){if(await n(r,e))return r;e++}return}(t)};var Ah={};Ah.find=void 0,Ah.find=function(t,n){let e=0;for(const r of t){if(n(r,e))return r;e++}};var Ih={};Ih.firstAsync=void 0,Ih.firstAsync=async function(t){for await(const n of t)return n};var Sh={};Sh.first=void 0,Sh.first=function(t){for(const n of t)return n};var xh={};xh.includesAsync=void 0,xh.includesAsync=async function(t,n){for await(const e of t)if(e===n)return!0;return!1};var Th={};Th.includes=void 0,Th.includes=function(t,n){for(const e of t)if(e===n)return!0;return!1};var _h={};_h.matchAsync=void 0,_h.matchAsync=async function(t,n){const e=n.length;let r=0;for await(const o of t)if(o===n[r]&&r++,r===e)return!0;return!1};var Oh={};Oh.match=void 0,Oh.match=function(t,n){const e=n.length;let r=0;for(const o of t)if(o===n[r]&&r++,r===e)return!0;return!1};var Eh={reduceAsync:void 0};const jh=Su;Eh.reduceAsync=function(t,n,e){return(0,jh.isUndefined)(e)?function(t,n){return(0,jh.isAsyncIterable)(t)?e(t):r(t);async function e(t){var e;const r=t[Symbol.asyncIterator]();let o;try{let t,a=await i(r),s=1;for(;({value:t,done:o}=await r.next()),!o;)a=await n(a,t,s++);return a}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}async function i(t){const n=await t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}async function r(t){var e;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=await n(a,t,s++);return a}finally{o||null===(e=r.return)||void 0===e||e.call(r)}function i(t){const n=t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}}(t,n):function(t,n,e){return(0,jh.isAsyncIterable)(t)?o(t):r(t);async function r(t){let r=e,o=0;for(const e of t)r=await n(r,e,o++);return r}async function o(t){let r=e,o=0;for await(const e of t)r=await n(r,e,o++);return r}}(t,n,e)};var Nh={reduce:void 0};const kh=Su;Nh.reduce=function(t,n,e){return(0,kh.isUndefined)(e)?function(t,n){var e;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=n(a,t,s++);return a}finally{o||null===(e=r.return)||void 0===e||e.call(r)}function i(t){const n=t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}(t,n):function(t,n,e){let r=e,o=0;for(const e of t)r=n(r,e,o++);return r}(t,n,e)};var Bh={someAsync:void 0};const Ph=Su;Bh.someAsync=function(t,n){return(0,Ph.isAsyncIterable)(t)?async function(t){let e=0;for await(const r of t){if(await n(r,e))return!0;e++}return!1}(t):async function(t){let e=0;for(const r of t){if(await n(r,e))return!0;e++}return!1}(t)};var qh={};qh.some=void 0,qh.some=function(t,n){let e=0;for(const r of t){if(n(r,e))return!0;e++}return!1};var Ch={};Ch.lastAsync=void 0,Ch.lastAsync=async function(t){var n;const e=t[Symbol.asyncIterator]();let r;try{let t,o;for(;({value:t,done:r}=await e.next()),!r;)o=t;return o}finally{r||await(null===(n=e.return)||void 0===n?void 0:n.call(e))}};var Rh={};Rh.last=void 0,Rh.last=function(t){var n;const e=t[Symbol.iterator]();let r;try{let t,o;for(;({value:t,done:r}=e.next()),!r;)o=t;return o}finally{r||null===(n=e.return)||void 0===n||n.call(e)}};var Uh={toArrayAsync:void 0};const zh=yh;Uh.toArrayAsync=function(t){return(0,zh.consume)(t,(async t=>{const n=[];for await(const e of t)n.push(e);return n}))};var Dh={toArray:void 0};const Mh=yh;Dh.toArray=function(t){return(0,Mh.consume)(t,(t=>Array.from(t)))};var Fh={toSetAsync:void 0};const Jh=yh;Fh.toSetAsync=function(t){return(0,Jh.consume)(t,(async t=>{const n=new Set;for await(const e of t)n.add(e);return n}))};var Vh={toSet:void 0};const Lh=yh;Vh.toSet=function(t){return(0,Lh.consume)(t,(t=>new Set(t)))},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(yh,t),r(dh,t),r(hh,t),r(ph,t),r(bh,t),r(gh,t),r(Ah,t),r(Ih,t),r(Sh,t),r(xh,t),r(Th,t),r(_h,t),r(Oh,t),r(Eh,t),r(Nh,t),r(Bh,t),r(qh,t),r(Ch,t),r(Rh,t),r(Uh,t),r(Dh,t),r(Fh,t),r(Vh,t)}(fh),function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e),Object.defineProperty(t,r,{enumerable:!0,get:function(){return n[e]}})}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Gc,t),r(fh,t)}(Xc);var Kh={},Wh={},Yh={};function $h(t){return Array.isArray(t)}Yh.isntEmptyArray=Yh.isEmptyArray=Yh.isntArray=Yh.isArray=void 0,Yh.isArray=$h,Yh.isntArray=function(t){return!$h(t)},Yh.isEmptyArray=function(t){return 0===t.length},Yh.isntEmptyArray=function(t){return 0!==t.length};var Hh={},Xh={};function Gh(t){return null===t}Xh.isntNull=Xh.isNull=void 0,Xh.isNull=Gh,Xh.isntNull=function(t){return!Gh(t)};var Qh={};function Zh(t){return void 0===t}Qh.isntUndefined=Qh.isUndefined=void 0,Qh.isUndefined=Zh,Qh.isntUndefined=function(t){return!Zh(t)};var tp={};function np(t){return"function"==typeof t}tp.isntFunction=tp.isFunction=void 0,tp.isFunction=np,tp.isntFunction=function(t){return!np(t)},Hh.isntAsyncIterable=Hh.isAsyncIterable=void 0;const ep=Xh,rp=Qh,op=tp;function ip(t){return(0,ep.isntNull)(t)&&(0,rp.isntUndefined)(t)&&(0,op.isFunction)(t[Symbol.asyncIterator])}Hh.isAsyncIterable=ip,Hh.isntAsyncIterable=function(t){return!ip(t)};var ap={};function sp(t){return"bigint"==typeof t}ap.isntBigInt=ap.isBigInt=void 0,ap.isBigInt=sp,ap.isntBigInt=function(t){return!sp(t)};var cp={};function up(t){return"boolean"==typeof t}cp.isntBoolean=cp.isBoolean=void 0,cp.isBoolean=up,cp.isntBoolean=function(t){return!up(t)};var lp={},fp={};function yp(t){return"string"==typeof t}fp.isntString=fp.isString=void 0,fp.isString=yp,fp.isntString=function(t){return!yp(t)},lp.isntChar=lp.isChar=void 0;const dp=fp;function vp(t){return(0,dp.isString)(t)&&1===t.length}lp.isChar=vp,lp.isntChar=function(t){return!vp(t)};var hp={};function pp(t){return t instanceof Date}hp.isntDate=hp.isDate=void 0,hp.isDate=pp,hp.isntDate=function(t){return!pp(t)};var mp={};mp.inEnum=void 0,mp.inEnum=function(t,n){return Object.values(n).includes(t)};var bp={};function gp(t){return t instanceof Error}bp.isntError=bp.isError=void 0,bp.isError=gp,bp.isntError=function(t){return!gp(t)};var wp={};function Ap(t){return!t}wp.isntFalsy=wp.isFalsy=void 0,wp.isFalsy=Ap,wp.isntFalsy=function(t){return!Ap(t)};var Ip={};Ip.isntIterable=Ip.isIterable=void 0;const Sp=Xh,xp=Qh,Tp=tp;function _p(t){return(0,Sp.isntNull)(t)&&(0,xp.isntUndefined)(t)&&(0,Tp.isFunction)(t[Symbol.iterator])}Ip.isIterable=_p,Ip.isntIterable=function(t){return!_p(t)};var Op={},Ep={};function jp(t){return"number"==typeof t}function Np(t){return Number.isNaN(t)}Ep.isntNaN=Ep.isNaN=Ep.isNegativeInfinity=Ep.isPositiveInfinity=Ep.isFinite=Ep.isntNumber=Ep.isNumber=void 0,Ep.isNumber=jp,Ep.isntNumber=function(t){return!jp(t)},Ep.isFinite=function(t){return Number.isFinite(t)},Ep.isPositiveInfinity=function(t){return t===1/0},Ep.isNegativeInfinity=function(t){return t===-1/0},Ep.isNaN=Np,Ep.isntNaN=function(t){return!Np(t)};var kp={},Bp=n&&n.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};kp.isntEmptyObject=kp.isEmptyObject=kp.isntPlainObject=kp.isPlainObject=kp.isntObject=kp.isObject=void 0;const Pp=Bp(ft);function qp(t){return null!==t&&"object"==typeof t}function Cp(t){return(0,Pp.default)(t)}kp.isObject=qp,kp.isntObject=function(t){return!qp(t)},kp.isPlainObject=Cp,kp.isntPlainObject=function(t){return!Cp(t)},kp.isEmptyObject=function(t){return 0===Object.keys(t).length},kp.isntEmptyObject=function(t){return 0!==Object.keys(t).length},Op.isntJsonable=Op.isJsonable=Op.isntJson=Op.isJson=void 0;const Rp=Xh,Up=cp,zp=fp,Dp=Ep,Mp=Yh,Fp=kp;function Jp(t){return(0,Rp.isNull)(t)||(0,Up.isBoolean)(t)||(0,zp.isString)(t)||(0,Dp.isNumber)(t)||(0,Mp.isArray)(t)&&t.every(Jp)||(0,Fp.isPlainObject)(t)&&Object.values(t).every(Jp)}Op.isJson=Jp,Op.isntJson=function(t){return!Jp(t)},Op.isJsonable=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},Op.isntJsonable=function t(n){return!t()};var Vp={};Vp.isPromiseLike=Vp.isntPromiseLike=Vp.isntPromise=Vp.isPromise=void 0;const Lp=kp,Kp=tp;function Wp(t){return t instanceof Promise}function Yp(t){return(0,Lp.isObject)(t)&&(0,Kp.isFunction)(t.then)}Vp.isPromise=Wp,Vp.isntPromise=function(t){return!Wp(t)},Vp.isntPromiseLike=function(t){return!Yp(t)},Vp.isPromiseLike=Yp;var $p={};$p.isAbsoluteURL=void 0,$p.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var o=Object.getOwnPropertyDescriptor(n,e);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,o)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Yh,t),r(Hh,t),r(ap,t),r(cp,t),r(lp,t),r(hp,t),r(mp,t),r(bp,t),r(wp,t),r(tp,t),r(Ip,t),r(Op,t),r(Xh,t),r(Ep,t),r(kp,t),r(Vp,t),r(fp,t),r(Qh,t),r($p,t)}(Wh);var Hp={};Hp.traverseErrorPrototypeChain=void 0,Hp.traverseErrorPrototypeChain=function*(t){let n=t;for(;(n=Object.getPrototypeOf(n))&&(yield n,n!==Error.prototype););},Kh.getErrorNames=void 0;const Xp=Wh,Gp=Hp;Kh.getErrorNames=function*(t){var n;if((0,Xp.isError)(t))for(const e of(0,Gp.traverseErrorPrototypeChain)(t))(null===(n=e.constructor)||void 0===n?void 0:n.name)&&(yield e.constructor.name);else yield t.name,yield*t.ancestors};var Qp={isSerializableError:void 0};const Zp=Wh;Qp.isSerializableError=function(t){return(0,Zp.isObject)(t)&&(0,Zp.isString)(t.name)&&(0,Zp.isString)(t.message)&&((0,Zp.isString)(t.stack)||(0,Zp.isNull)(t.stack))&&(0,Zp.isArray)(t.ancestors)&&t.ancestors.every(Zp.isString)},Hc.CustomError=void 0;const tm=Xc,nm=Kh,em=Wh,rm=Qp;class om extends Error{get name(){var t,n;return null!==(n=null!==(t=(0,tm.first)((0,nm.getErrorNames)(this)))&&void 0!==t?t:om.name)&&void 0!==n?n:"CustomError"}static[Symbol.hasInstance](t){var n;if((0,em.isError)(t)||(0,rm.isSerializableError)(t)){const e=[null!==(n=this.prototype.constructor.name)&&void 0!==n?n:this.name,...(0,nm.getErrorNames)(this.prototype)].reverse(),r=(0,tm.toArray)((0,nm.getErrorNames)(t)).reverse();return e.every(((t,n)=>t===r[n]))}return!1}}Hc.CustomError=om;var im={AssertionError:void 0};const am=Hc;class sm extends am.CustomError{}im.AssertionError=sm;var cm={normalize:void 0};const um=Kh,lm=Xc;cm.normalize=function(t){var n;const[e,...r]=(0,lm.toArray)((0,um.getErrorNames)(t));return{name:e,ancestors:r,message:t.message,stack:null!==(n=t.stack)&&void 0!==n?n:null}};var fm={hydrate:void 0};const ym=lc;function dm(t,n){const e=function(){(0,ym.pass)()};return(e.prototype=Object.create(t.prototype)).constructor=e,Object.defineProperty(e,"name",{value:n}),e}fm.hydrate=function(t){var n;const e=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of e)r=dm(r,t);const o=new r;return o.name=t.name,o.message=t.message,o.stack=null!==(n=t.stack)&&void 0!==n?n:void 0,o};var vm={assert:void 0};const hm=im;vm.assert=function(t,n){if(!t)throw new hm.AssertionError(n)},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var o=Object.getOwnPropertyDescriptor(n,e);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,o)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Hc,t),r(im,t),r(Qp,t),r(cm,t),r(fm,t),r(vm,t),r(Kh,t),r(Hp,t)}($c),Kc.chunkAsync=void 0;const pm=Wc,mm=$c;Kc.chunkAsync=function(t,n){return(0,mm.assert)(Number.isInteger(n),"The parameter size must be an integer"),(0,mm.assert)(n>0,"The parameter size must be greater than 0"),(0,pm.go)((async function*(){let e=[];for await(const r of t)e.push(r),e.length>=n&&(yield e,e=[]);e.length&&(yield e)}))};var bm={chunkByAsync:void 0};const gm=Wh;bm.chunkByAsync=function(t,n){return(0,gm.isAsyncIterable)(t)?async function*(t){let e=[],r=0;for await(const o of t)e.push(o),await n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)}(t):async function*(t){let e=[],r=0;for(const o of t)e.push(o),await n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)}(t)};var wm={};wm.chunkBy=void 0,wm.chunkBy=function*(t,n){let e=[],r=0;for(const o of t)e.push(o),n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)};var Am={chunk:void 0};const Im=Wc,Sm=$c;Am.chunk=function(t,n){return(0,Sm.assert)(Number.isInteger(n),"The parameter size must be an integer"),(0,Sm.assert)(n>0,"The parameter size must be greater than 0"),(0,Im.go)((function*(){let e=[];for(const r of t)e.push(r),e.length>=n&&(yield e,e=[]);e.length&&(yield e)}))};var xm={concatAsync:void 0};const Tm=Wh,_m=Wc;xm.concatAsync=function(t,...n){return(0,_m.go)((async function*(){for(const e of[t,...n])if((0,Tm.isAsyncIterable)(e))for await(const t of e)yield t;else for(const t of e)yield t}))};var Om={concat:void 0};const Em=Wc;Om.concat=function(t,...n){return(0,Em.go)((function*(){for(const e of[t,...n])yield*e}))};var jm={},Nm={};Nm.copyIterable=Nm.copyAsyncIterable=void 0,Nm.copyAsyncIterable=async function*(t){for await(const n of t)yield n},Nm.copyIterable=function*(t){for(const n of t)yield n},jm.dropAsync=void 0;const km=Wc,Bm=Nm,Pm=$c;jm.dropAsync=function(t,n){return(0,Pm.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Pm.assert)(n>=0,"The parameter count must be greater than or equal to 0"),0===n?(0,Bm.copyAsyncIterable)(t):(0,km.go)((async function*(){var e;const r=t[Symbol.asyncIterator]();let o;try{let t;for(;!(({value:t,done:o}=await r.next()),o||n<=0);)n--;for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}))};var qm={dropRightAsync:void 0};const Cm=Wc,Rm=Nm,Um=$c;qm.dropRightAsync=function(t,n){return(0,Um.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Um.assert)(n>=0,"The parameter count must be greater than or equal to 0"),0===n?(0,Rm.copyAsyncIterable)(t):(0,Cm.go)((async function*(){const e=(await async function(t){const n=[];for await(const e of t)n.push(e);return n}(t)).slice(0,-n);for(const t of e)yield t}))};var zm={dropRight:void 0};const Dm=Wc,Mm=Nm,Fm=$c;zm.dropRight=function(t,n){return(0,Fm.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Fm.assert)(n>=0,"The parameter count must be greater than or equal to 0"),0===n?(0,Mm.copyIterable)(t):(0,Dm.go)((function*(){const e=Array.from(t);yield*e.slice(0,-n)}))};var Jm={dropUntilAsync:void 0};const Vm=Wh;Jm.dropUntilAsync=function(t,n){return(0,Vm.isAsyncIterable)(t)?async function*(t){var e;const r=t[Symbol.asyncIterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=await r.next()),o||await n(t,i++)););for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}(t):async function*(t){var e;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||await n(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}(t)};var Lm={};Lm.dropUntil=void 0,Lm.dropUntil=function*(t,n){var e;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||n(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}};var Km={drop:void 0};const Wm=Wc,Ym=Nm,$m=$c;Km.drop=function(t,n){return(0,$m.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,$m.assert)(n>=0,"The parameter count must be greater than or equal to 0"),0===n?(0,Ym.copyIterable)(t):(0,Wm.go)((function*(){var e;const r=t[Symbol.iterator]();let o;try{let t;for(;!(({value:t,done:o}=r.next()),o||n<=0);)n--;for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}))};var Hm={filterAsync:void 0};const Xm=Wh;Hm.filterAsync=function(t,n){return(0,Xm.isAsyncIterable)(t)?async function*(t){let e=0;for await(const r of t)await n(r,e)&&(yield r),e++}(t):async function*(t){let e=0;for(const r of t)await n(r,e)&&(yield r),e++}(t)};var Gm={};Gm.filter=void 0,Gm.filter=function*(t,n){let e=0;for(const r of t)n(r,e)&&(yield r),e++};var Qm={},Zm={},tb={flattenByAsync:void 0};const nb=Wh;function eb(t){return(0,nb.isIterable)(t)&&(0,nb.isntChar)(t)}tb.flattenByAsync=function(t,n){return(0,nb.isAsyncIterable)(t)?async function*(t){const r=1;for await(const o of t)eb(o)&&await n(o,r)?yield*e(o,r+1):yield o}(t):function(t){return e(t,1)}(t);async function*e(t,r){for(const o of t)eb(o)&&await n(o,r)?yield*e(o,r+1):yield o}},Zm.flattenDeepAsync=void 0;const rb=tb,ob=$c;Zm.flattenDeepAsync=function(t,n=1/0){return(0,ob.assert)(n===1/0||Number.isInteger(n),"The parameter depth must be an integer"),(0,ob.assert)(n>=0,"The parameter depth must be greater than or equal to 0"),(0,rb.flattenByAsync)(t,((t,e)=>e<=n))},Qm.flattenAsync=void 0;const ib=Zm;Qm.flattenAsync=function(t){return(0,ib.flattenDeepAsync)(t,1)};var ab={flattenBy:void 0};const sb=Wh;ab.flattenBy=function(t,n){return function*t(e,r){for(const i of e)(0,sb.isIterable)(o=i)&&(0,sb.isntChar)(o)&&n(i,r)?yield*t(i,r+1):yield i;var o}(t,1)};var cb={flattenDeep:void 0};const ub=ab,lb=$c;cb.flattenDeep=function(t,n=1/0){return(0,lb.assert)(n===1/0||Number.isInteger(n),"The parameter depth must be an integer"),(0,lb.assert)(n>=0,"The parameter depth must be greater than or equal to 0"),(0,ub.flattenBy)(t,((t,e)=>e<=n))};var fb={flatten:void 0};const yb=cb;fb.flatten=function(t){return(0,yb.flattenDeep)(t,1)};var db={mapAsync:void 0};const vb=Wh;db.mapAsync=function(t,n){return(0,vb.isAsyncIterable)(t)?async function*(t){let e=0;for await(const r of t)yield await n(r,e),e++}(t):async function*(t){let e=0;for(const r of t)yield await n(r,e),e++}(t)};var hb={};hb.map=void 0,hb.map=function*(t,n){let e=0;for(const r of t)yield n(r,e),e++};var pb={repeatAsync:void 0};const mb=Wc,bb=$c;pb.repeatAsync=function(t,n){return(0,bb.assert)(n===1/0||Number.isInteger(n),"The parameter times must be an integer"),(0,bb.assert)(n>=0,"The parameter times must be greater than or equal to 0"),n===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,mb.go)((async function*(){const e=[];if(n>0){for await(const n of t)yield n,e.push(n);n--}for(;n>0;)yield*e,n--}))};var gb={repeat:void 0};const wb=Wc,Ab=$c;gb.repeat=function(t,n){return(0,Ab.assert)(n===1/0||Number.isInteger(n),"The parameter times must be an integer"),(0,Ab.assert)(n>=0,"The parameter times must be greater than or equal to 0"),n===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,wb.go)((function*(){const e=[];if(n>0){for(const n of t)yield n,e.push(n);n--}for(;n>0;)yield*e,n--}))};var Ib={sliceAsync:void 0};const Sb=Wc,xb=$c;Ib.sliceAsync=function(t,n,e=1/0){return(0,xb.assert)(Number.isInteger(n),"The parameter start must be an integer"),(0,xb.assert)(n>=0,"The parameter start must be greater than or equal to 0"),(0,xb.assert)(Number.isInteger(e),"The parameter end must be an integer"),(0,xb.assert)(e>=n,"The parameter end must be greater than or equal to start"),(0,Sb.go)((async function*(){let r=0;for await(const o of t){if(r>=e)break;r>=n&&(yield o),r++}}))};var Tb={slice:void 0};const _b=Wc,Ob=$c;Tb.slice=function(t,n,e=1/0){return(0,Ob.assert)(Number.isInteger(n),"The parameter start must be an integer"),(0,Ob.assert)(n>=0,"The parameter start must be greater than or equal to 0"),(0,Ob.assert)(Number.isInteger(e),"The parameter end must be an integer"),(0,Ob.assert)(e>=n,"The parameter end must be greater than or equal to start"),(0,_b.go)((function*(){let r=0;for(const o of t){if(r>=e)break;r>=n&&(yield o),r++}}))};var Eb={};Eb.splitAsync=void 0,Eb.splitAsync=async function*(t,n){let e=[];for await(const r of t)r===n?(yield e,e=[]):e.push(r);yield e};var jb={splitByAsync:void 0};const Nb=Wh;jb.splitByAsync=function(t,n){return(0,Nb.isAsyncIterable)(t)?async function*(t){let e=[],r=0;for await(const o of t)await n(o,r)?(yield e,e=[]):e.push(o),r++;yield e}(t):async function*(t){let e=[],r=0;for(const o of t)await n(o,r)?(yield e,e=[]):e.push(o),r++;yield e}(t)};var kb={};kb.splitBy=void 0,kb.splitBy=function*(t,n){let e=[],r=0;for(const o of t)n(o,r)?(yield e,e=[]):e.push(o),r++;yield e};var Bb={};Bb.split=void 0,Bb.split=function*(t,n){let e=[];for(const r of t)r===n?(yield e,e=[]):e.push(r);yield e};var Pb={takeAsync:void 0};const qb=Wc,Cb=$c;Pb.takeAsync=function(t,n){return(0,Cb.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Cb.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,qb.go)((async function*(){if(0!==n)for await(const e of t)if(yield e,0===--n)break}))};var Rb={takeRightAsync:void 0};const Ub=Wc,zb=$c;Rb.takeRightAsync=function(t,n){return(0,zb.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,zb.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,Ub.go)((async function*(){var e;const r=t[Symbol.asyncIterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=await r.next()),!o;)t.push(i),t.length>n&&t.shift();yield*t}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}))};var Db={takeRight:void 0};const Mb=Wc,Fb=$c;Db.takeRight=function(t,n){return(0,Fb.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Fb.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,Mb.go)((function*(){var e;const r=t[Symbol.iterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=r.next()),!o;)t.push(i),t.length>n&&t.shift();yield*t}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}))};var Jb={takeUntilAsync:void 0};const Vb=Wh;Jb.takeUntilAsync=function(t,n){return(0,Vb.isAsyncIterable)(t)?async function*(t){let e=0;for await(const r of t){if(await n(r,e))break;yield r,e++}}(t):async function*(t){let e=0;for(const r of t){if(await n(r,e))break;yield r,e++}}(t)};var Lb={};Lb.takeUntil=void 0,Lb.takeUntil=function*(t,n){let e=0;for(const r of t){if(n(r,e))break;yield r,e++}};var Kb={take:void 0};const Wb=Wc,Yb=$c;Kb.take=function(t,n){return(0,Yb.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,Yb.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,Wb.go)((function*(){if(0!==n)for(const e of t)if(yield e,0===--n)break}))};var $b={tapAsync:void 0};const Hb=Wh;$b.tapAsync=function(t,n){return(0,Hb.isAsyncIterable)(t)?async function*(t){let e=0;for await(const r of t)await n(r,e),yield r,e++}(t):async function*(t){let e=0;for(const r of t)await n(r,e),yield r,e++}(t)};var Xb={};Xb.tap=void 0,Xb.tap=function*(t,n){let e=0;for(const r of t)n(r,e),yield r,e++};var Gb={};Gb.toAsyncIterable=void 0,Gb.toAsyncIterable=async function*(t){for(const n of t)yield n};var Qb={};Qb.transformAsync=void 0,Qb.transformAsync=async function*(t,n){yield*n(t)};var Zb={};Zb.transform=void 0,Zb.transform=function*(t,n){yield*n(t)};var tg={};tg.uniqAsync=void 0,tg.uniqAsync=async function*(t){const n=new Set;for await(const e of t)n.has(e)||(yield e,n.add(e))};var ng={uniqByAsync:void 0};const eg=Wh;ng.uniqByAsync=function(t,n){return(0,eg.isAsyncIterable)(t)?async function*(t){const e=new Set;let r=0;for await(const o of t){const t=await n(o,r);e.has(t)||(yield o,e.add(t)),r++}}(t):async function*(t){const e=new Set;let r=0;for(const o of t){const t=await n(o,r);e.has(t)||(yield o,e.add(t)),r++}}(t)};var rg={};rg.uniqBy=void 0,rg.uniqBy=function*(t,n){const e=new Set;let r=0;for(const o of t){const t=n(o,r);e.has(t)||(yield o,e.add(t)),r++}};var og={};og.uniq=void 0,og.uniq=function*(t){const n=new Set;for(const e of t)n.has(e)||(yield e,n.add(e))};var ig={zipAsync:void 0};const ag=Wh;var sg;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(sg||(sg={})),ig.zipAsync=function(t,...n){return async function*(...t){var n,e,r,o;const i=t.length,a=t.map((t=>(0,ag.isAsyncIterable)(t)?[sg.Async,t[Symbol.asyncIterator]()]:[sg.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(i);for(let n=0;n<i;n++){const[e,r]=a[n];let o;if(o=e===sg.Async?await r.next():r.next(),o.done)return void(s[n]=!0);t[n]=o.value}yield t}}finally{const t=a.filter(((t,n)=>!s[n]));for(const[i,a]of t)i===sg.Async?await(null===(e=(n=a).return)||void 0===e?void 0:e.call(n)):null===(o=(r=a).return)||void 0===o||o.call(r)}}(t,...n)};var cg={};cg.zip=void 0,cg.zip=function(t,...n){return function*(...t){const n=t.length,e=t.map((t=>t[Symbol.iterator]())),r=e.map((()=>!1));try{for(;;){const t=new Array(n);for(let o=0;o<n;o++){const{value:n,done:i}=e[o].next();if(i)return void(r[o]=!0);t[o]=n}yield t}}finally{e.filter(((t,n)=>!r[n])).forEach((t=>{var n;return null===(n=t.return)||void 0===n?void 0:n.call(t)}))}}(t,...n)},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var o=Object.getOwnPropertyDescriptor(n,e);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,o)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Kc,t),r(bm,t),r(wm,t),r(Am,t),r(xm,t),r(Om,t),r(jm,t),r(qm,t),r(zm,t),r(Jm,t),r(Lm,t),r(Km,t),r(Hm,t),r(Gm,t),r(Qm,t),r(tb,t),r(ab,t),r(Zm,t),r(cb,t),r(fb,t),r(db,t),r(hb,t),r(pb,t),r(gb,t),r(Ib,t),r(Tb,t),r(Eb,t),r(jb,t),r(kb,t),r(Bb,t),r(Pb,t),r(Rb,t),r(Db,t),r(Jb,t),r(Lb,t),r(Kb,t),r($b,t),r(Xb,t),r(Gb,t),r(Qb,t),r(Zb,t),r(tg,t),r(ng,t),r(rg,t),r(og,t),r(ig,t),r(cg,t)}(Lc);var ug={},lg={};lg.consume=void 0,lg.consume=function(t,n){return n(t)};var fg={eachAsync:void 0};const yg=Wh;fg.eachAsync=function(t,n){return(0,yg.isAsyncIterable)(t)?async function(t){let e=0;for await(const r of t)await n(r,e),e++}(t):async function(t){let e=0;for(const r of t)await n(r,e),e++}(t)};var dg={};dg.each=void 0,dg.each=function(t,n){let e=0;for(const r of t)n(r,e),e++};var vg={everyAsync:void 0};const hg=Wh;vg.everyAsync=function(t,n){return(0,hg.isAsyncIterable)(t)?async function(t){let e=0;for await(const r of t){if(!await n(r,e))return!1;e++}return!0}(t):async function(t){let e=0;for(const r of t){if(!await n(r,e))return!1;e++}return!0}(t)};var pg={};pg.every=void 0,pg.every=function(t,n){let e=0;for(const r of t){if(!n(r,e))return!1;e++}return!0};var mg={findAsync:void 0};const bg=Wh;mg.findAsync=function(t,n){return(0,bg.isAsyncIterable)(t)?async function(t){let e=0;for await(const r of t){if(await n(r,e))return r;e++}return}(t):async function(t){let e=0;for(const r of t){if(await n(r,e))return r;e++}return}(t)};var gg={};gg.find=void 0,gg.find=function(t,n){let e=0;for(const r of t){if(n(r,e))return r;e++}};var wg={};wg.firstAsync=void 0,wg.firstAsync=async function(t){for await(const n of t)return n};var Ag={};Ag.first=void 0,Ag.first=function(t){for(const n of t)return n};var Ig={};Ig.includesAsync=void 0,Ig.includesAsync=async function(t,n){for await(const e of t)if(e===n)return!0;return!1};var Sg={};Sg.includes=void 0,Sg.includes=function(t,n){for(const e of t)if(e===n)return!0;return!1};var xg={};xg.matchAsync=void 0,xg.matchAsync=async function(t,n){const e=n.length;let r=0;for await(const o of t)if(o===n[r]&&r++,r===e)return!0;return!1};var Tg={};Tg.match=void 0,Tg.match=function(t,n){const e=n.length;let r=0;for(const o of t)if(o===n[r]&&r++,r===e)return!0;return!1};var _g={reduceAsync:void 0};const Og=Wh;_g.reduceAsync=function(t,n,e){return(0,Og.isUndefined)(e)?function(t,n){return(0,Og.isAsyncIterable)(t)?e(t):r(t);async function e(t){var e;const r=t[Symbol.asyncIterator]();let o;try{let t,a=await i(r),s=1;for(;({value:t,done:o}=await r.next()),!o;)a=await n(a,t,s++);return a}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}async function i(t){const n=await t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}async function r(t){var e;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=await n(a,t,s++);return a}finally{o||null===(e=r.return)||void 0===e||e.call(r)}function i(t){const n=t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}}(t,n):function(t,n,e){return(0,Og.isAsyncIterable)(t)?o(t):r(t);async function r(t){let r=e,o=0;for(const e of t)r=await n(r,e,o++);return r}async function o(t){let r=e,o=0;for await(const e of t)r=await n(r,e,o++);return r}}(t,n,e)};var Eg={reduce:void 0};const jg=Wh;Eg.reduce=function(t,n,e){return(0,jg.isUndefined)(e)?function(t,n){var e;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=n(a,t,s++);return a}finally{o||null===(e=r.return)||void 0===e||e.call(r)}function i(t){const n=t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}(t,n):function(t,n,e){let r=e,o=0;for(const e of t)r=n(r,e,o++);return r}(t,n,e)};var Ng={someAsync:void 0};const kg=Wh;Ng.someAsync=function(t,n){return(0,kg.isAsyncIterable)(t)?async function(t){let e=0;for await(const r of t){if(await n(r,e))return!0;e++}return!1}(t):async function(t){let e=0;for(const r of t){if(await n(r,e))return!0;e++}return!1}(t)};var Bg={};Bg.some=void 0,Bg.some=function(t,n){let e=0;for(const r of t){if(n(r,e))return!0;e++}return!1};var Pg={};Pg.lastAsync=void 0,Pg.lastAsync=async function(t){var n;const e=t[Symbol.asyncIterator]();let r;try{let t,o;for(;({value:t,done:r}=await e.next()),!r;)o=t;return o}finally{r||await(null===(n=e.return)||void 0===n?void 0:n.call(e))}};var qg={};qg.last=void 0,qg.last=function(t){var n;const e=t[Symbol.iterator]();let r;try{let t,o;for(;({value:t,done:r}=e.next()),!r;)o=t;return o}finally{r||null===(n=e.return)||void 0===n||n.call(e)}};var Cg={toArrayAsync:void 0};const Rg=lg;Cg.toArrayAsync=function(t){return(0,Rg.consume)(t,(async t=>{const n=[];for await(const e of t)n.push(e);return n}))};var Ug={toArray:void 0};const zg=lg;Ug.toArray=function(t){return(0,zg.consume)(t,(t=>Array.from(t)))};var Dg={toSetAsync:void 0};const Mg=lg;Dg.toSetAsync=function(t){return(0,Mg.consume)(t,(async t=>{const n=new Set;for await(const e of t)n.add(e);return n}))};var Fg={toSet:void 0};const Jg=lg;Fg.toSet=function(t){return(0,Jg.consume)(t,(t=>new Set(t)))};var Vg={};Vg.count=void 0,Vg.count=function(t){let n=0;for(const e of t)n++;return n};var Lg={};Lg.countAsync=void 0,Lg.countAsync=async function(t){let n=0;for await(const e of t)n++;return n},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var o=Object.getOwnPropertyDescriptor(n,e);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,o)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(lg,t),r(fg,t),r(dg,t),r(vg,t),r(pg,t),r(mg,t),r(gg,t),r(wg,t),r(Ag,t),r(Ig,t),r(Sg,t),r(xg,t),r(Tg,t),r(_g,t),r(Eg,t),r(Ng,t),r(Bg,t),r(Pg,t),r(qg,t),r(Cg,t),r(Ug,t),r(Dg,t),r(Fg,t),r(Vg,t),r(Lg,t)}(ug),function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var o=Object.getOwnPropertyDescriptor(n,e);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,o)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Lc,t),r(ug,t)}(Vc);var Kg={},Wg={},Yg={};function $g(t){return Array.isArray(t)}Yg.isntEmptyArray=Yg.isEmptyArray=Yg.isntArray=Yg.isArray=void 0,Yg.isArray=$g,Yg.isntArray=function(t){return!$g(t)},Yg.isEmptyArray=function(t){return 0===t.length},Yg.isntEmptyArray=function(t){return 0!==t.length};var Hg={},Xg={};function Gg(t){return null===t}Xg.isntNull=Xg.isNull=void 0,Xg.isNull=Gg,Xg.isntNull=function(t){return!Gg(t)};var Qg={};function Zg(t){return void 0===t}Qg.isntUndefined=Qg.isUndefined=void 0,Qg.isUndefined=Zg,Qg.isntUndefined=function(t){return!Zg(t)};var tw={};function nw(t){return"function"==typeof t}tw.isntFunction=tw.isFunction=void 0,tw.isFunction=nw,tw.isntFunction=function(t){return!nw(t)},Hg.isntAsyncIterable=Hg.isAsyncIterable=void 0;const ew=Xg,rw=Qg,ow=tw;function iw(t){return(0,ew.isntNull)(t)&&(0,rw.isntUndefined)(t)&&(0,ow.isFunction)(t[Symbol.asyncIterator])}Hg.isAsyncIterable=iw,Hg.isntAsyncIterable=function(t){return!iw(t)};var aw={};function sw(t){return"bigint"==typeof t}aw.isntBigInt=aw.isBigInt=void 0,aw.isBigInt=sw,aw.isntBigInt=function(t){return!sw(t)};var cw={};function uw(t){return"boolean"==typeof t}cw.isntBoolean=cw.isBoolean=void 0,cw.isBoolean=uw,cw.isntBoolean=function(t){return!uw(t)};var lw={},fw={};function yw(t){return"string"==typeof t}fw.isntString=fw.isString=void 0,fw.isString=yw,fw.isntString=function(t){return!yw(t)},lw.isntChar=lw.isChar=void 0;const dw=fw;function vw(t){return(0,dw.isString)(t)&&1===t.length}lw.isChar=vw,lw.isntChar=function(t){return!vw(t)};var hw={};function pw(t){return t instanceof Date}hw.isntDate=hw.isDate=void 0,hw.isDate=pw,hw.isntDate=function(t){return!pw(t)};var mw={};mw.inEnum=void 0,mw.inEnum=function(t,n){return Object.values(n).includes(t)};var bw={};function gw(t){return t instanceof Error}bw.isntError=bw.isError=void 0,bw.isError=gw,bw.isntError=function(t){return!gw(t)};var ww={};function Aw(t){return!t}ww.isntFalsy=ww.isFalsy=void 0,ww.isFalsy=Aw,ww.isntFalsy=function(t){return!Aw(t)};var Iw={};Iw.isntIterable=Iw.isIterable=void 0;const Sw=Xg,xw=Qg,Tw=tw;function _w(t){return(0,Sw.isntNull)(t)&&(0,xw.isntUndefined)(t)&&(0,Tw.isFunction)(t[Symbol.iterator])}Iw.isIterable=_w,Iw.isntIterable=function(t){return!_w(t)};var Ow={},Ew={};function jw(t){return"number"==typeof t}function Nw(t){return Number.isNaN(t)}Ew.isntNaN=Ew.isNaN=Ew.isNegativeInfinity=Ew.isPositiveInfinity=Ew.isFinite=Ew.isntNumber=Ew.isNumber=void 0,Ew.isNumber=jw,Ew.isntNumber=function(t){return!jw(t)},Ew.isFinite=function(t){return Number.isFinite(t)},Ew.isPositiveInfinity=function(t){return t===1/0},Ew.isNegativeInfinity=function(t){return t===-1/0},Ew.isNaN=Nw,Ew.isntNaN=function(t){return!Nw(t)};var kw={},Bw=n&&n.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};kw.isntEmptyObject=kw.isEmptyObject=kw.isntPlainObject=kw.isPlainObject=kw.isntObject=kw.isObject=void 0;const Pw=Bw(ft);function qw(t){return null!==t&&"object"==typeof t}function Cw(t){return(0,Pw.default)(t)}kw.isObject=qw,kw.isntObject=function(t){return!qw(t)},kw.isPlainObject=Cw,kw.isntPlainObject=function(t){return!Cw(t)},kw.isEmptyObject=function(t){return 0===Object.keys(t).length},kw.isntEmptyObject=function(t){return 0!==Object.keys(t).length},Ow.isntJsonable=Ow.isJsonable=Ow.isntJson=Ow.isJson=void 0;const Rw=Xg,Uw=cw,zw=fw,Dw=Ew,Mw=Yg,Fw=kw;function Jw(t){return(0,Rw.isNull)(t)||(0,Uw.isBoolean)(t)||(0,zw.isString)(t)||(0,Dw.isNumber)(t)||(0,Mw.isArray)(t)&&t.every(Jw)||(0,Fw.isPlainObject)(t)&&Object.values(t).every(Jw)}Ow.isJson=Jw,Ow.isntJson=function(t){return!Jw(t)},Ow.isJsonable=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},Ow.isntJsonable=function t(n){return!t()};var Vw={};Vw.isPromiseLike=Vw.isntPromiseLike=Vw.isntPromise=Vw.isPromise=void 0;const Lw=kw,Kw=tw;function Ww(t){return t instanceof Promise}function Yw(t){return(0,Lw.isObject)(t)&&(0,Kw.isFunction)(t.then)}Vw.isPromise=Ww,Vw.isntPromise=function(t){return!Ww(t)},Vw.isntPromiseLike=function(t){return!Yw(t)},Vw.isPromiseLike=Yw;var $w={};$w.isAbsoluteURL=void 0,$w.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var o=Object.getOwnPropertyDescriptor(n,e);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,o)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Yg,t),r(Hg,t),r(aw,t),r(cw,t),r(lw,t),r(hw,t),r(mw,t),r(bw,t),r(ww,t),r(tw,t),r(Iw,t),r(Ow,t),r(Xg,t),r(Ew,t),r(kw,t),r(Vw,t),r(fw,t),r(Qg,t),r($w,t)}(Wg);var Hw={};Hw.traverseErrorPrototypeChain=void 0,Hw.traverseErrorPrototypeChain=function*(t){let n=t;for(;(n=Object.getPrototypeOf(n))&&(yield n,n!==Error.prototype););},Kg.getErrorNames=void 0;const Xw=Wg,Gw=Hw;Kg.getErrorNames=function*(t){var n;if((0,Xw.isError)(t))for(const e of(0,Gw.traverseErrorPrototypeChain)(t))(null===(n=e.constructor)||void 0===n?void 0:n.name)&&(yield e.constructor.name);else yield t.name,yield*t.ancestors};var Qw={isSerializableError:void 0};const Zw=Wg;Qw.isSerializableError=function(t){return(0,Zw.isObject)(t)&&(0,Zw.isString)(t.name)&&(0,Zw.isString)(t.message)&&((0,Zw.isString)(t.stack)||(0,Zw.isNull)(t.stack))&&(0,Zw.isArray)(t.ancestors)&&t.ancestors.every(Zw.isString)},Jc.CustomError=void 0;const tA=Vc,nA=Kg,eA=Wg,rA=Qw;class oA extends Error{get name(){var t,n;return null!==(n=null!==(t=(0,tA.first)((0,nA.getErrorNames)(this)))&&void 0!==t?t:oA.name)&&void 0!==n?n:"CustomError"}static[Symbol.hasInstance](t){var n;if((0,eA.isError)(t)||(0,rA.isSerializableError)(t)){const e=[null!==(n=this.prototype.constructor.name)&&void 0!==n?n:this.name,...(0,nA.getErrorNames)(this.prototype)].reverse(),r=(0,tA.toArray)((0,nA.getErrorNames)(t)).reverse();return e.every(((t,n)=>t===r[n]))}return!1}}Jc.CustomError=oA;var iA={AssertionError:void 0};const aA=Jc;class sA extends aA.CustomError{}iA.AssertionError=sA;var cA={normalize:void 0};const uA=Kg,lA=Vc;cA.normalize=function(t){var n;const[e,...r]=(0,lA.toArray)((0,uA.getErrorNames)(t));return{name:e,ancestors:r,message:t.message,stack:null!==(n=t.stack)&&void 0!==n?n:null}};var fA={hydrate:void 0};const yA=lc;function dA(t,n){const e=function(){(0,yA.pass)()};return(e.prototype=Object.create(t.prototype)).constructor=e,Object.defineProperty(e,"name",{value:n}),e}fA.hydrate=function(t){var n;const e=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of e)r=dA(r,t);const o=new r;return o.name=t.name,o.message=t.message,o.stack=null!==(n=t.stack)&&void 0!==n?n:void 0,o};var vA={assert:void 0};const hA=iA;vA.assert=function(t,n){if(!t)throw new hA.AssertionError(n)},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var o=Object.getOwnPropertyDescriptor(n,e);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,o)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(Jc,t),r(iA,t),r(Qw,t),r(cA,t),r(fA,t),r(vA,t),r(Kg,t),r(Hw,t)}(Fc),bc.chunkAsync=void 0;const pA=gc,mA=Fc;bc.chunkAsync=function(t,n){return(0,mA.assert)(Number.isInteger(n),"The parameter size must be an integer"),(0,mA.assert)(n>0,"The parameter size must be greater than 0"),(0,pA.go)((async function*(){let e=[];for await(const r of t)e.push(r),e.length>=n&&(yield e,e=[]);e.length&&(yield e)}))};var bA={chunkByAsync:void 0};const gA=Wg;bA.chunkByAsync=function(t,n){return(0,gA.isAsyncIterable)(t)?async function*(t,n){let e=[],r=0;for await(const o of t)e.push(o),await n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)}(t,n):async function*(t,n){let e=[],r=0;for(const o of t)e.push(o),await n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)}(t,n)};var wA={};wA.chunkBy=void 0,wA.chunkBy=function*(t,n){let e=[],r=0;for(const o of t)e.push(o),n(o,r)&&(yield e,e=[]),r++;e.length&&(yield e)};var AA={chunk:void 0};const IA=gc,SA=Fc;AA.chunk=function(t,n){return(0,SA.assert)(Number.isInteger(n),"The parameter size must be an integer"),(0,SA.assert)(n>0,"The parameter size must be greater than 0"),(0,IA.go)((function*(){let e=[];for(const r of t)e.push(r),e.length>=n&&(yield e,e=[]);e.length&&(yield e)}))};var xA={concatAsync:void 0};const TA=Wg,_A=gc;xA.concatAsync=function(t,...n){return(0,_A.go)((async function*(){for(const e of[t,...n])if((0,TA.isAsyncIterable)(e))for await(const t of e)yield t;else for(const t of e)yield t}))};var OA={concat:void 0};const EA=gc;OA.concat=function(t,...n){return(0,EA.go)((function*(){for(const e of[t,...n])yield*e}))};var jA={},NA={};NA.copyIterable=NA.copyAsyncIterable=void 0,NA.copyAsyncIterable=async function*(t){for await(const n of t)yield n},NA.copyIterable=function*(t){for(const n of t)yield n},jA.dropAsync=void 0;const kA=gc,BA=NA,PA=Fc;jA.dropAsync=function(t,n){return(0,PA.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,PA.assert)(n>=0,"The parameter count must be greater than or equal to 0"),0===n?(0,BA.copyAsyncIterable)(t):(0,kA.go)((async function*(){var e;const r=t[Symbol.asyncIterator]();let o;try{let t;for(;!(({value:t,done:o}=await r.next()),o||n<=0);)n--;for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}))};var qA={dropRightAsync:void 0};const CA=gc,RA=NA,UA=Fc;qA.dropRightAsync=function(t,n){return(0,UA.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,UA.assert)(n>=0,"The parameter count must be greater than or equal to 0"),0===n?(0,RA.copyAsyncIterable)(t):(0,CA.go)((async function*(){const e=(await async function(t){const n=[];for await(const e of t)n.push(e);return n}(t)).slice(0,-n);for(const t of e)yield t}))};var zA={dropRight:void 0};const DA=gc,MA=NA,FA=Fc;zA.dropRight=function(t,n){return(0,FA.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,FA.assert)(n>=0,"The parameter count must be greater than or equal to 0"),0===n?(0,MA.copyIterable)(t):(0,DA.go)((function*(){const e=Array.from(t);yield*e.slice(0,-n)}))};var JA={dropUntilAsync:void 0};const VA=Wg;JA.dropUntilAsync=function(t,n){return(0,VA.isAsyncIterable)(t)?async function*(t,n){var e;const r=t[Symbol.asyncIterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=await r.next()),o||await n(t,i++)););for(;!o;)yield t,({value:t,done:o}=await r.next())}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}(t,n):async function*(t,n){var e;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||await n(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}(t,n)};var LA={};LA.dropUntil=void 0,LA.dropUntil=function*(t,n){var e;const r=t[Symbol.iterator]();let o;try{let t,i=0;for(;!(({value:t,done:o}=r.next()),o||n(t,i++)););for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}};var KA={drop:void 0};const WA=gc,YA=NA,$A=Fc;KA.drop=function(t,n){return(0,$A.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,$A.assert)(n>=0,"The parameter count must be greater than or equal to 0"),0===n?(0,YA.copyIterable)(t):(0,WA.go)((function*(){var e;const r=t[Symbol.iterator]();let o;try{let t;for(;!(({value:t,done:o}=r.next()),o||n<=0);)n--;for(;!o;)yield t,({value:t,done:o}=r.next())}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}))};var HA={filterAsync:void 0};const XA=Wg;HA.filterAsync=function(t,n){return(0,XA.isAsyncIterable)(t)?async function*(t,n){let e=0;for await(const r of t)await n(r,e)&&(yield r),e++}(t,n):async function*(t,n){let e=0;for(const r of t)await n(r,e)&&(yield r),e++}(t,n)};var GA={};GA.filter=void 0,GA.filter=function*(t,n){let e=0;for(const r of t)n(r,e)&&(yield r),e++};var QA={},ZA={},tI={flattenByAsync:void 0};const nI=Wg;async function*eI(t,n,e){for(const r of t)rI(r)&&await n(r,e)?yield*eI(r,n,e+1):yield r}function rI(t){return(0,nI.isIterable)(t)&&(0,nI.isntChar)(t)}tI.flattenByAsync=function(t,n){return(0,nI.isAsyncIterable)(t)?async function*(t,n){const e=1;for await(const r of t)rI(r)&&await n(r,e)?yield*eI(r,n,e+1):yield r}(t,n):function(t,n){return eI(t,n,1)}(t,n)},ZA.flattenDeepAsync=void 0;const oI=tI,iI=Fc;ZA.flattenDeepAsync=function(t,n=1/0){return(0,iI.assert)(n===1/0||Number.isInteger(n),"The parameter depth must be an integer"),(0,iI.assert)(n>=0,"The parameter depth must be greater than or equal to 0"),(0,oI.flattenByAsync)(t,((t,e)=>e<=n))},QA.flattenAsync=void 0;const aI=ZA;QA.flattenAsync=function(t){return(0,aI.flattenDeepAsync)(t,1)};var sI={flattenBy:void 0};const cI=Wg;function*uI(t,n,e){for(const o of t)(0,cI.isIterable)(r=o)&&(0,cI.isntChar)(r)&&n(o,e)?yield*uI(o,n,e+1):yield o;var r}sI.flattenBy=function(t,n){return uI(t,n,1)};var lI={flattenDeep:void 0};const fI=sI,yI=Fc;lI.flattenDeep=function(t,n=1/0){return(0,yI.assert)(n===1/0||Number.isInteger(n),"The parameter depth must be an integer"),(0,yI.assert)(n>=0,"The parameter depth must be greater than or equal to 0"),(0,fI.flattenBy)(t,((t,e)=>e<=n))};var dI={flatten:void 0};const vI=lI;dI.flatten=function(t){return(0,vI.flattenDeep)(t,1)};var hI={mapAsync:void 0};const pI=Wg;hI.mapAsync=function(t,n){return(0,pI.isAsyncIterable)(t)?async function*(t,n){let e=0;for await(const r of t)yield await n(r,e),e++}(t,n):async function*(t,n){let e=0;for(const r of t)yield await n(r,e),e++}(t,n)};var mI={};mI.map=void 0,mI.map=function*(t,n){let e=0;for(const r of t)yield n(r,e),e++};var bI={repeatAsync:void 0};const gI=gc,wI=Fc;bI.repeatAsync=function(t,n){return(0,wI.assert)(n===1/0||Number.isInteger(n),"The parameter times must be an integer"),(0,wI.assert)(n>=0,"The parameter times must be greater than or equal to 0"),n===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,gI.go)((async function*(){const e=[];if(n>0){for await(const n of t)yield n,e.push(n);n--}for(;n>0;)yield*e,n--}))};var AI={repeat:void 0};const II=gc,SI=Fc;AI.repeat=function(t,n){return(0,SI.assert)(n===1/0||Number.isInteger(n),"The parameter times must be an integer"),(0,SI.assert)(n>=0,"The parameter times must be greater than or equal to 0"),n===1/0&&function(){if("production"===process.env.NODE_ENV)return;console.warn("When iterable has no elements and times is Infinity, repeat() will be in dead loop")}(),(0,II.go)((function*(){const e=[];if(n>0){for(const n of t)yield n,e.push(n);n--}for(;n>0;)yield*e,n--}))};var xI={sliceAsync:void 0};const TI=gc,_I=Fc;xI.sliceAsync=function(t,n,e=1/0){return(0,_I.assert)(Number.isInteger(n),"The parameter start must be an integer"),(0,_I.assert)(n>=0,"The parameter start must be greater than or equal to 0"),(0,_I.assert)(Number.isInteger(e),"The parameter end must be an integer"),(0,_I.assert)(e>=n,"The parameter end must be greater than or equal to start"),(0,TI.go)((async function*(){let r=0;for await(const o of t){if(r>=e)break;r>=n&&(yield o),r++}}))};var OI={slice:void 0};const EI=gc,jI=Fc;OI.slice=function(t,n,e=1/0){return(0,jI.assert)(Number.isInteger(n),"The parameter start must be an integer"),(0,jI.assert)(n>=0,"The parameter start must be greater than or equal to 0"),(0,jI.assert)(Number.isInteger(e),"The parameter end must be an integer"),(0,jI.assert)(e>=n,"The parameter end must be greater than or equal to start"),(0,EI.go)((function*(){let r=0;for(const o of t){if(r>=e)break;r>=n&&(yield o),r++}}))};var NI={};NI.splitAsync=void 0,NI.splitAsync=async function*(t,n){let e=[];for await(const r of t)r===n?(yield e,e=[]):e.push(r);yield e};var kI={splitByAsync:void 0};const BI=Wg;kI.splitByAsync=function(t,n){return(0,BI.isAsyncIterable)(t)?async function*(t,n){let e=[],r=0;for await(const o of t)await n(o,r)?(yield e,e=[]):e.push(o),r++;yield e}(t,n):async function*(t,n){let e=[],r=0;for(const o of t)await n(o,r)?(yield e,e=[]):e.push(o),r++;yield e}(t,n)};var PI={};PI.splitBy=void 0,PI.splitBy=function*(t,n){let e=[],r=0;for(const o of t)n(o,r)?(yield e,e=[]):e.push(o),r++;yield e};var qI={};qI.split=void 0,qI.split=function*(t,n){let e=[];for(const r of t)r===n?(yield e,e=[]):e.push(r);yield e};var CI={takeAsync:void 0};const RI=gc,UI=Fc;CI.takeAsync=function(t,n){return(0,UI.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,UI.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,RI.go)((async function*(){if(0!==n)for await(const e of t)if(yield e,0===--n)break}))};var zI={takeRightAsync:void 0};const DI=gc,MI=Fc;zI.takeRightAsync=function(t,n){return(0,MI.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,MI.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,DI.go)((async function*(){var e;const r=t[Symbol.asyncIterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=await r.next()),!o;)t.push(i),t.length>n&&t.shift();yield*t}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}}))};var FI={takeRight:void 0};const JI=gc,VI=Fc;FI.takeRight=function(t,n){return(0,VI.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,VI.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,JI.go)((function*(){var e;const r=t[Symbol.iterator]();let o;try{const t=[];let i;for(;({value:i,done:o}=r.next()),!o;)t.push(i),t.length>n&&t.shift();yield*t}finally{o||null===(e=r.return)||void 0===e||e.call(r)}}))};var LI={takeUntilAsync:void 0};const KI=Wg;LI.takeUntilAsync=function(t,n){return(0,KI.isAsyncIterable)(t)?async function*(t,n){let e=0;for await(const r of t){if(await n(r,e))break;yield r,e++}}(t,n):async function*(t,n){let e=0;for(const r of t){if(await n(r,e))break;yield r,e++}}(t,n)};var WI={};WI.takeUntil=void 0,WI.takeUntil=function*(t,n){let e=0;for(const r of t){if(n(r,e))break;yield r,e++}};var YI={take:void 0};const $I=gc,HI=Fc;YI.take=function(t,n){return(0,HI.assert)(Number.isInteger(n),"The parameter count must be an integer"),(0,HI.assert)(n>=0,"The parameter count must be greater than or equal to 0"),(0,$I.go)((function*(){if(0!==n)for(const e of t)if(yield e,0===--n)break}))};var XI={tapAsync:void 0};const GI=Wg;XI.tapAsync=function(t,n){return(0,GI.isAsyncIterable)(t)?async function*(t,n){let e=0;for await(const r of t)await n(r,e),yield r,e++}(t,n):async function*(t,n){let e=0;for(const r of t)await n(r,e),yield r,e++}(t,n)};var QI={};QI.tap=void 0,QI.tap=function*(t,n){let e=0;for(const r of t)n(r,e),yield r,e++};var ZI={};ZI.toAsyncIterable=void 0,ZI.toAsyncIterable=async function*(t){for(const n of t)yield n};var tS={};tS.transformAsync=void 0,tS.transformAsync=async function*(t,n){yield*n(t)};var nS={};nS.transform=void 0,nS.transform=function*(t,n){yield*n(t)};var eS={};eS.uniqAsync=void 0,eS.uniqAsync=async function*(t){const n=new Set;for await(const e of t)n.has(e)||(yield e,n.add(e))};var rS={uniqByAsync:void 0};const oS=Wg;rS.uniqByAsync=function(t,n){return(0,oS.isAsyncIterable)(t)?async function*(t,n){const e=new Set;let r=0;for await(const o of t){const t=await n(o,r);e.has(t)||(yield o,e.add(t)),r++}}(t,n):async function*(t,n){const e=new Set;let r=0;for(const o of t){const t=await n(o,r);e.has(t)||(yield o,e.add(t)),r++}}(t,n)};var iS={};iS.uniqBy=void 0,iS.uniqBy=function*(t,n){const e=new Set;let r=0;for(const o of t){const t=n(o,r);e.has(t)||(yield o,e.add(t)),r++}};var aS={};aS.uniq=void 0,aS.uniq=function*(t){const n=new Set;for(const e of t)n.has(e)||(yield e,n.add(e))};var sS={zipAsync:void 0};const cS=Wg;var uS;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(uS||(uS={})),sS.zipAsync=function(t,...n){return async function*(...t){var n,e,r,o;const i=t.length,a=t.map((t=>(0,cS.isAsyncIterable)(t)?[uS.Async,t[Symbol.asyncIterator]()]:[uS.Sync,t[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const t=new Array(i);for(let n=0;n<i;n++){const[e,r]=a[n];let o;if(o=e===uS.Async?await r.next():r.next(),o.done)return void(s[n]=!0);t[n]=o.value}yield t}}finally{const t=a.filter(((t,n)=>!s[n]));for(const[i,a]of t)i===uS.Async?await(null===(e=(n=a).return)||void 0===e?void 0:e.call(n)):null===(o=(r=a).return)||void 0===o||o.call(r)}}(t,...n)};var lS={};lS.zip=void 0,lS.zip=function(t,...n){return function*(...t){const n=t.length,e=t.map((t=>t[Symbol.iterator]())),r=e.map((()=>!1));try{for(;;){const t=new Array(n);for(let o=0;o<n;o++){const{value:n,done:i}=e[o].next();if(i)return void(r[o]=!0);t[o]=n}yield t}}finally{e.filter(((t,n)=>!r[n])).forEach((t=>{var n;return null===(n=t.return)||void 0===n?void 0:n.call(t)}))}}(t,...n)},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var o=Object.getOwnPropertyDescriptor(n,e);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,o)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(bc,t),r(bA,t),r(wA,t),r(AA,t),r(xA,t),r(OA,t),r(jA,t),r(qA,t),r(zA,t),r(JA,t),r(LA,t),r(KA,t),r(HA,t),r(GA,t),r(QA,t),r(tI,t),r(sI,t),r(ZA,t),r(lI,t),r(dI,t),r(hI,t),r(mI,t),r(bI,t),r(AI,t),r(xI,t),r(OI,t),r(NI,t),r(kI,t),r(PI,t),r(qI,t),r(CI,t),r(zI,t),r(FI,t),r(LI,t),r(WI,t),r(YI,t),r(XI,t),r(QI,t),r(ZI,t),r(tS,t),r(nS,t),r(eS,t),r(rS,t),r(iS,t),r(aS,t),r(sS,t),r(lS,t)}(mc);var fS={},yS={};yS.consume=void 0,yS.consume=function(t,n){return n(t)};var dS={eachAsync:void 0};const vS=Wg;dS.eachAsync=function(t,n){return(0,vS.isAsyncIterable)(t)?async function(t,n){let e=0;for await(const r of t)await n(r,e),e++}(t,n):async function(t,n){let e=0;for(const r of t)await n(r,e),e++}(t,n)};var hS={};hS.each=void 0,hS.each=function(t,n){let e=0;for(const r of t)n(r,e),e++};var pS={everyAsync:void 0};const mS=Wg;pS.everyAsync=function(t,n){return(0,mS.isAsyncIterable)(t)?async function(t,n){let e=0;for await(const r of t){if(!await n(r,e))return!1;e++}return!0}(t,n):async function(t,n){let e=0;for(const r of t){if(!await n(r,e))return!1;e++}return!0}(t,n)};var bS={};bS.every=void 0,bS.every=function(t,n){let e=0;for(const r of t){if(!n(r,e))return!1;e++}return!0};var gS={findAsync:void 0};const wS=Wg;gS.findAsync=function(t,n){return(0,wS.isAsyncIterable)(t)?async function(t,n){let e=0;for await(const r of t){if(await n(r,e))return r;e++}return}(t,n):async function(t,n){let e=0;for(const r of t){if(await n(r,e))return r;e++}return}(t,n)};var AS={};AS.find=void 0,AS.find=function(t,n){let e=0;for(const r of t){if(n(r,e))return r;e++}};var IS={};IS.firstAsync=void 0,IS.firstAsync=async function(t){for await(const n of t)return n};var SS={};SS.first=void 0,SS.first=function(t){for(const n of t)return n};var xS={};xS.includesAsync=void 0,xS.includesAsync=async function(t,n){for await(const e of t)if(e===n)return!0;return!1};var TS={};TS.includes=void 0,TS.includes=function(t,n){for(const e of t)if(e===n)return!0;return!1};var _S={};_S.matchAsync=void 0,_S.matchAsync=async function(t,n){const e=n.length;let r=0;for await(const o of t)if(o===n[r]&&r++,r===e)return!0;return!1};var OS={};OS.match=void 0,OS.match=function(t,n){const e=n.length;let r=0;for(const o of t)if(o===n[r]&&r++,r===e)return!0;return!1};var ES={reduceAsync:void 0};const jS=Wg;ES.reduceAsync=function(t,n,e){return(0,jS.isUndefined)(e)?function(t,n){return(0,jS.isAsyncIterable)(t)?e(t):r(t);async function e(t){var e;const r=t[Symbol.asyncIterator]();let o;try{let t,a=await i(r),s=1;for(;({value:t,done:o}=await r.next()),!o;)a=await n(a,t,s++);return a}finally{o||await(null===(e=r.return)||void 0===e?void 0:e.call(r))}async function i(t){const n=await t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}async function r(t){var e;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=await n(a,t,s++);return a}finally{o||null===(e=r.return)||void 0===e||e.call(r)}function i(t){const n=t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}}(t,n):function(t,n,e){return(0,jS.isAsyncIterable)(t)?o(t):r(t);async function r(t){let r=e,o=0;for(const e of t)r=await n(r,e,o++);return r}async function o(t){let r=e,o=0;for await(const e of t)r=await n(r,e,o++);return r}}(t,n,e)};var NS={reduce:void 0};const kS=Wg;NS.reduce=function(t,n,e){return(0,kS.isUndefined)(e)?function(t,n){var e;const r=t[Symbol.iterator]();let o;try{let t,a=i(r),s=1;for(;({value:t,done:o}=r.next()),!o;)a=n(a,t,s++);return a}finally{o||null===(e=r.return)||void 0===e||e.call(r)}function i(t){const n=t.next();if(n.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return n.value}}(t,n):function(t,n,e){let r=e,o=0;for(const e of t)r=n(r,e,o++);return r}(t,n,e)};var BS={someAsync:void 0};const PS=Wg;BS.someAsync=function(t,n){return(0,PS.isAsyncIterable)(t)?async function(t,n){let e=0;for await(const r of t){if(await n(r,e))return!0;e++}return!1}(t,n):async function(t,n){let e=0;for(const r of t){if(await n(r,e))return!0;e++}return!1}(t,n)};var qS={};qS.some=void 0,qS.some=function(t,n){let e=0;for(const r of t){if(n(r,e))return!0;e++}return!1};var CS={};CS.lastAsync=void 0,CS.lastAsync=async function(t){var n;const e=t[Symbol.asyncIterator]();let r;try{let t,o;for(;({value:t,done:r}=await e.next()),!r;)o=t;return o}finally{r||await(null===(n=e.return)||void 0===n?void 0:n.call(e))}};var RS={};RS.last=void 0,RS.last=function(t){var n;const e=t[Symbol.iterator]();let r;try{let t,o;for(;({value:t,done:r}=e.next()),!r;)o=t;return o}finally{r||null===(n=e.return)||void 0===n||n.call(e)}};var US={toArrayAsync:void 0};const zS=yS;US.toArrayAsync=function(t){return(0,zS.consume)(t,(async t=>{const n=[];for await(const e of t)n.push(e);return n}))};var DS={toArray:void 0};const MS=yS;DS.toArray=function(t){return(0,MS.consume)(t,(t=>Array.from(t)))};var FS={toSetAsync:void 0};const JS=yS;FS.toSetAsync=function(t){return(0,JS.consume)(t,(async t=>{const n=new Set;for await(const e of t)n.add(e);return n}))};var VS={toSet:void 0};const LS=yS;VS.toSet=function(t){return(0,LS.consume)(t,(t=>new Set(t)))};var KS={};KS.count=void 0,KS.count=function(t){let n=0;for(const e of t)n++;return n};var WS={};WS.countAsync=void 0,WS.countAsync=async function(t){let n=0;for await(const e of t)n++;return n};var YS={groupBy:void 0};const $S=hS;YS.groupBy=function(t,n){const e=new Map;return(0,$S.each)(t,((t,r)=>{const o=n(t,r);e.has(o)||e.set(o,[]),e.get(o).push(t)})),e};var HS={groupByAsync:void 0};const XS=dS;HS.groupByAsync=async function(t,n){const e=new Map;return await(0,XS.eachAsync)(t,(async(t,r)=>{const o=await n(t,r);e.has(o)||e.set(o,[]),e.get(o).push(t)})),e},function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var o=Object.getOwnPropertyDescriptor(n,e);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,o)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(yS,t),r(dS,t),r(hS,t),r(pS,t),r(bS,t),r(gS,t),r(AS,t),r(IS,t),r(SS,t),r(xS,t),r(TS,t),r(_S,t),r(OS,t),r(ES,t),r(NS,t),r(BS,t),r(qS,t),r(CS,t),r(RS,t),r(US,t),r(DS,t),r(FS,t),r(VS,t),r(KS,t),r(WS,t),r(YS,t),r(HS,t)}(fS),function(t){var e=n&&n.__createBinding||(Object.create?function(t,n,e,r){void 0===r&&(r=e);var o=Object.getOwnPropertyDescriptor(n,e);o&&!("get"in o?!n.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return n[e]}}),Object.defineProperty(t,r,o)}:function(t,n,e,r){void 0===r&&(r=e),t[r]=n[e]}),r=n&&n.__exportStar||function(t,n){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||e(n,t,r)};r(mc,t),r(fS,t)}(pc);class GS{constructor(t){this.map=new Map,Mt.assert(Number.isInteger(t),"The parameter limit must be an integer"),Mt.assert(t>0,"The parameter limit must be a positive value"),this.limit=t}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(t,n){return this.map.has(t)?this.updateItem(t,n):(this.map.size===this.limit&&this.map.delete(this.getColdestKey()),this.map.set(t,n)),this}has(t){return this.map.has(t)}get(t){if(!this.has(t))return;const n=this.map.get(t);return this.updateItem(t,n),n}delete(t){return this.map.delete(t)}clear(){this.map.clear()}updateItem(t,n){this.map.delete(t),this.map.set(t,n)}getColdestKey(){return pc.first(this.map.keys())}}class QS{constructor(){this.map=new Map,this.itemMetadataSortedByExpirationTime=[]}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(t,n,e){return this.map.set(t,n),this.removeItemMetadata(t),this.addItemMetadata(t,Date.now()+e),this}has(t){return this.map.has(t)}get(t){return this.map.get(t)}delete(t){const n=this.map.delete(t);if(n){const n=this.itemMetadataSortedByExpirationTime.findIndex((n=>n.key===t));this.itemMetadataSortedByExpirationTime.splice(n,1),0===n&&this.rescheduleClearTimeout()}return n}clear(){var t;this.map.clear(),null===(t=this.cancelClearTimeout)||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime=[]}addItemMetadata(t,n){for(let e=0;e<this.itemMetadataSortedByExpirationTime.length;e++){if(n<this.itemMetadataSortedByExpirationTime[e].expirationTime)return this.itemMetadataSortedByExpirationTime.splice(e,0,{key:t,expirationTime:n}),void(0===e&&this.rescheduleClearTimeout())}this.itemMetadataSortedByExpirationTime.push({key:t,expirationTime:n}),1===this.itemMetadataSortedByExpirationTime.length&&this.rescheduleClearTimeout()}removeItemMetadata(t){const n=this.itemMetadataSortedByExpirationTime.findIndex((n=>n.key===t));n>=0&&(this.itemMetadataSortedByExpirationTime.splice(n,1),0===n&&this.rescheduleClearTimeout())}clearExpiredItems(t){const n=this.itemMetadataSortedByExpirationTime.findIndex((n=>n.expirationTime>t));(n>=0?this.itemMetadataSortedByExpirationTime.splice(0,n):this.itemMetadataSortedByExpirationTime.splice(0,this.itemMetadataSortedByExpirationTime.length)).forEach((t=>this.map.delete(t.key)))}rescheduleClearTimeout(){var t;if(null===(t=this.cancelClearTimeout)||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime.length>0){const t=this.itemMetadataSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const n=Sc.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));this.cancelClearTimeout=()=>{n(),this.cancelClearTimeout=void 0}}}}}class ZS{constructor(t){this.map=new Map,this.itemMetadataSortedByExpirationTime=[],Mt.assert(Number.isInteger(t),"The parameter limit must be an integer"),Mt.assert(t>0,"The parameter limit must be a positive value"),this.limit=t}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.map.size}set(t,n,e){return this.map.has(t)?(this.updateItem(t,n),this.removeItemMetadata(t),this.addItemMetadata(t,Date.now()+e)):(this.map.size===this.limit&&this.map.delete(this.getColdestKey()),this.map.set(t,n),this.addItemMetadata(t,Date.now()+e)),this}has(t){return this.map.has(t)}get(t){if(this.has(t)){const n=this.map.get(t);return this.updateItem(t,n),n}}delete(t){const n=this.map.delete(t);if(n){const n=this.itemMetadataSortedByExpirationTime.findIndex((n=>n.key===t));this.itemMetadataSortedByExpirationTime.splice(n,1),0===n&&this.rescheduleClearTimeout()}return n}clear(){var t;this.map.clear(),null===(t=this.cancelClearTimeout)||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime=[]}updateItem(t,n){this.map.delete(t),this.map.set(t,n)}addItemMetadata(t,n){for(let e=0;e<this.itemMetadataSortedByExpirationTime.length;e++){if(n<this.itemMetadataSortedByExpirationTime[e].expirationTime)return this.itemMetadataSortedByExpirationTime.splice(e,0,{key:t,expirationTime:n}),void(0===e&&this.rescheduleClearTimeout())}this.itemMetadataSortedByExpirationTime.push({key:t,expirationTime:n}),1===this.itemMetadataSortedByExpirationTime.length&&this.rescheduleClearTimeout()}removeItemMetadata(t){const n=this.itemMetadataSortedByExpirationTime.findIndex((n=>n.key===t));n>=0&&(this.itemMetadataSortedByExpirationTime.splice(n,1),0===n&&this.rescheduleClearTimeout())}clearExpiredItems(t){const n=this.itemMetadataSortedByExpirationTime.findIndex((n=>n.expirationTime>t));(n>=0?this.itemMetadataSortedByExpirationTime.splice(0,n):this.itemMetadataSortedByExpirationTime.splice(0,this.itemMetadataSortedByExpirationTime.length)).forEach((t=>this.map.delete(t.key)))}rescheduleClearTimeout(){var t;if(null===(t=this.cancelClearTimeout)||void 0===t||t.call(this),this.itemMetadataSortedByExpirationTime.length>0){const t=this.itemMetadataSortedByExpirationTime[0];if(Number.isFinite(t.expirationTime)){const n=Sc.setSchedule(t.expirationTime,(()=>{this.clearExpiredItems(Date.now()),this.rescheduleClearTimeout()}));this.cancelClearTimeout=()=>{n(),this.cancelClearTimeout=void 0}}}}getColdestKey(){return pc.first(this.map.keys())}}class tx{constructor(t){this.value=t,this.children=new Map}}class nx{constructor(){this.root=new tx}get[Symbol.toStringTag](){return this.constructor.name}*entries(){yield*function*t(n,r){for(const[o,i]of n.children){const n=[...r,o];e.isntUndefined(i.value)&&(yield[n,i.value]),yield*t(i,n)}}(this.root,[])}keys(){return pc.map(this.entries(),(([t])=>t))}values(){return pc.map(this.entries(),(([t,n])=>n))}set(t,n){let e=this.root;for(const n of t)e.children.has(n)||e.children.set(n,new tx),e=e.children.get(n);return e.value=n,this}has(t){let n=this.root;for(const e of t){if(!n.children.has(e))return!1;n=n.children.get(e)}return void 0!==n.value}get(t){let n=this.root;for(const e of t){if(!n.children.has(e))return;n=n.children.get(e)}return n.value}delete(t){const n=[];let e=this.root;for(const r of t){if(!e.children.has(r))return!1;n.push(e),e=e.children.get(r)}if(delete e.value,0===e.children.size)for(const[e,r]of pc.toArray(pc.zip(t,n)).reverse())if(r.children.delete(e),0!==r.children.size)break;return!0}}class ex{constructor(t,n){this.schema=t,this._state=n}get[Symbol.toStringTag](){return this.constructor.name}get state(){return this._state}matches(t){return this._state===t}can(t){return t in this.schema[this.state]}send(t){if(!this.can(t))throw new rx(this.state,t);this._state=this.schema[this.state][t]}}class rx extends Mt.CustomError{constructor(t,n){super(`State ${t} cannot react to event ${n}`)}}
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation.
4
4
 
@@ -12,5 +12,5 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
12
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
13
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
14
  PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */var Id=function(t,e){return(Id=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function Sd(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Id(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function _d(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Od(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function Ed(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}function jd(t){return"function"==typeof t}function Nd(t){var e=t((function(t){Error.call(t),t.stack=(new Error).stack}));return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var kd=Nd((function(t){return function(e){t(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e}}));function Bd(t,e){if(t){var n=t.indexOf(e);0<=n&&t.splice(n,1)}}var Pd=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}var e;return t.prototype.unsubscribe=function(){var t,e,n,r,i;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var s=_d(o),a=s.next();!a.done;a=s.next()){a.value.remove(this)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(t)throw t.error}}else o.remove(this);var c=this.initialTeardown;if(jd(c))try{c()}catch(t){i=t instanceof kd?t.errors:[t]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var l=_d(u),f=l.next();!f.done;f=l.next()){var d=f.value;try{Md(d)}catch(t){i=null!=i?i:[],t instanceof kd?i=Ed(Ed([],Od(i)),Od(t.errors)):i.push(t)}}}catch(t){n={error:t}}finally{try{f&&!f.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}if(i)throw new kd(i)}},t.prototype.add=function(e){var n;if(e&&e!==this)if(this.closed)Md(e);else{if(e instanceof t){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=null!==(n=this._finalizers)&&void 0!==n?n:[]).push(e)}},t.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},t.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},t.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Bd(e,t)},t.prototype.remove=function(e){var n=this._finalizers;n&&Bd(n,e),e instanceof t&&e._removeParent(this)},t.EMPTY=((e=new t).closed=!0,e),t}(),qd=Pd.EMPTY;function Cd(t){return t instanceof Pd||t&&"closed"in t&&jd(t.remove)&&jd(t.add)&&jd(t.unsubscribe)}function Md(t){jd(t)?t():t.unsubscribe()}var zd={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Rd=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Ed([t,e],Od(n)))};function Fd(){}function Ud(t){t()}var Dd=function(t){function e(e){var n=t.call(this)||this;return n.isStopped=!1,e?(n.destination=e,Cd(e)&&e.add(n)):n.destination=Yd,n}return Sd(e,t),e.create=function(t,e,n){return new Ld(t,e,n)},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(Pd),Vd=Function.prototype.bind;function Jd(t,e){return Vd.call(t,e)}var Kd=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(t){Wd(t)}},t.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(t){Wd(t)}else Wd(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){Wd(t)}},t}(),Ld=function(t){function e(e,n,r){var i,o,s=t.call(this)||this;jd(e)||!e?i={next:null!=e?e:void 0,error:null!=n?n:void 0,complete:null!=r?r:void 0}:s&&zd.useDeprecatedNextContext?((o=Object.create(e)).unsubscribe=function(){return s.unsubscribe()},i={next:e.next&&Jd(e.next,o),error:e.error&&Jd(e.error,o),complete:e.complete&&Jd(e.complete,o)}):i=e;return s.destination=new Kd(i),s}return Sd(e,t),e}(Dd);function Wd(t){var e;e=t,Rd((function(){throw e}))}var Yd={closed:!0,next:Fd,error:function(t){throw t},complete:Fd},$d="function"==typeof Symbol&&Symbol.observable||"@@observable";function Hd(t){return t}function Xd(t){return 0===t.length?Hd:1===t.length?t[0]:function(e){return t.reduce((function(t,e){return e(t)}),e)}}var Gd=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r,i=this,o=(r=t)&&r instanceof Dd||function(t){return t&&jd(t.next)&&jd(t.error)&&jd(t.complete)}(r)&&Cd(r)?t:new Ld(t,e,n);return Ud((function(){var t=i,e=t.operator,n=t.source;o.add(e?e.call(o,n):n?i._subscribe(o):i._trySubscribe(o))})),o},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=Qd(e))((function(e,r){var i=new Ld({next:function(e){try{t(e)}catch(t){r(t),i.unsubscribe()}},error:r,complete:e});n.subscribe(i)}))},t.prototype._subscribe=function(t){var e;return null===(e=this.source)||void 0===e?void 0:e.subscribe(t)},t.prototype[$d]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Xd(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=Qd(t))((function(t,n){var r;e.subscribe((function(t){return r=t}),(function(t){return n(t)}),(function(){return t(r)}))}))},t.create=function(e){return new t(e)},t}();function Qd(t){var e;return null!==(e=null!=t?t:zd.Promise)&&void 0!==e?e:Promise}function Zd(t){return jd(null==t?void 0:t.lift)}function ty(t,e,n,r,i){return new ey(t,e,n,r,i)}var ey=function(t){function e(e,n,r,i,o,s){var a=t.call(this,e)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=n?function(t){try{n(t)}catch(t){e.error(t)}}:t.prototype._next,a._error=i?function(t){try{i(t)}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._error,a._complete=r?function(){try{r()}catch(t){e.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,a}return Sd(e,t),e.prototype.unsubscribe=function(){var e;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;t.prototype.unsubscribe.call(this),!n&&(null===(e=this.onFinalize)||void 0===e||e.call(this))}},e}(Dd);function ny(){return t=function(t,e){var n=null;t._refCount++;var r=ty(e,void 0,void 0,void 0,(function(){if(!t||t._refCount<=0||0<--t._refCount)n=null;else{var r=t._connection,i=n;n=null,!r||i&&r!==i||r.unsubscribe(),e.unsubscribe()}}));t.subscribe(r),r.closed||(n=t.connect())},function(e){if(Zd(e))return e.lift((function(e){try{return t(e,this)}catch(t){this.error(t)}}));throw new TypeError("Unable to lift unknown Observable type")};var t}!function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._subject=null,r._refCount=0,r._connection=null,Zd(e)&&(r.lift=e.lift),r}Sd(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype._teardown=function(){this._refCount=0;var t=this._connection;this._subject=this._connection=null,null==t||t.unsubscribe()},e.prototype.connect=function(){var t=this,e=this._connection;if(!e){e=this._connection=new Pd;var n=this.getSubject();e.add(this.source.subscribe(ty(n,void 0,(function(){t._teardown(),n.complete()}),(function(e){t._teardown(),n.error(e)}),(function(){return t._teardown()})))),e.closed&&(this._connection=null,e=Pd.EMPTY)}return e},e.prototype.refCount=function(){return ny()(this)}}(Gd);var ry,iy,oy={now:function(){return(oy.delegate||performance).now()},delegate:void 0},sy={schedule:function(t){var e=requestAnimationFrame,n=cancelAnimationFrame,r=e((function(e){n=void 0,t(e)}));return new Pd((function(){return null==n?void 0:n(r)}))},requestAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=sy.delegate;return((null==n?void 0:n.requestAnimationFrame)||requestAnimationFrame).apply(void 0,Ed([],Od(t)))},cancelAnimationFrame:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return cancelAnimationFrame.apply(void 0,Ed([],Od(t)))},delegate:void 0};iy=sy.schedule,new Gd((function(t){var e=new Pd,n=ry||oy,r=n.now(),i=function(o){var s=n.now();t.next({timestamp:ry?s:o,elapsed:s-r}),t.closed||e.add(iy(i))};return e.add(iy(i)),e}));var ay=Nd((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),cy=function(t){function e(){var e=t.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return Sd(e,t),e.prototype.lift=function(t){var e=new uy(this,this);return e.operator=t,e},e.prototype._throwIfClosed=function(){if(this.closed)throw new ay},e.prototype.next=function(t){var e=this;Ud((function(){var n,r;if(e._throwIfClosed(),!e.isStopped){e.currentObservers||(e.currentObservers=Array.from(e.observers));try{for(var i=_d(e.currentObservers),o=i.next();!o.done;o=i.next()){o.value.next(t)}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}}))},e.prototype.error=function(t){var e=this;Ud((function(){if(e._throwIfClosed(),!e.isStopped){e.hasError=e.isStopped=!0,e.thrownError=t;for(var n=e.observers;n.length;)n.shift().error(t)}}))},e.prototype.complete=function(){var t=this;Ud((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var e=t.observers;e.length;)e.shift().complete()}}))},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(e){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var e=this,n=this,r=n.hasError,i=n.isStopped,o=n.observers;return r||i?qd:(this.currentObservers=null,o.push(t),new Pd((function(){e.currentObservers=null,Bd(o,t)})))},e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e.thrownError,i=e.isStopped;n?t.error(r):i&&t.complete()},e.prototype.asObservable=function(){var t=new Gd;return t.source=this,t},e.create=function(t,e){return new uy(t,e)},e}(Gd),uy=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return Sd(e,t),e.prototype.next=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===n||n.call(e,t)},e.prototype.error=function(t){var e,n;null===(n=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===n||n.call(e,t)},e.prototype.complete=function(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)},e.prototype._subscribe=function(t){var e,n;return null!==(n=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==n?n:qd},e}(cy);!function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}Sd(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){var t=this,e=t.hasError,n=t.thrownError,r=t._value;if(e)throw n;return this._throwIfClosed(),r},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)}}(cy);var ly={now:function(){return(ly.delegate||Date).now()},delegate:void 0};!function(t){function e(e,n,r){void 0===e&&(e=1/0),void 0===n&&(n=1/0),void 0===r&&(r=ly);var i=t.call(this)||this;return i._bufferSize=e,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,e),i._windowTime=Math.max(1,n),i}Sd(e,t),e.prototype.next=function(e){var n=this,r=n.isStopped,i=n._buffer,o=n._infiniteTimeWindow,s=n._timestampProvider,a=n._windowTime;r||(i.push(e),!o&&i.push(s.now()+a)),this._trimBuffer(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var e=this._innerSubscribe(t),n=this._infiniteTimeWindow,r=this._buffer.slice(),i=0;i<r.length&&!t.closed;i+=n?1:2)t.next(r[i]);return this._checkFinalizedStatuses(t),e},e.prototype._trimBuffer=function(){var t=this,e=t._bufferSize,n=t._timestampProvider,r=t._buffer,i=t._infiniteTimeWindow,o=(i?1:2)*e;if(e<1/0&&o<r.length&&r.splice(0,r.length-o),!i){for(var s=n.now(),a=0,c=1;c<r.length&&r[c]<=s;c+=2)a=c;a&&r.splice(0,a+1)}}}(cy),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._value=null,e._hasValue=!1,e._isComplete=!1,e}Sd(e,t),e.prototype._checkFinalizedStatuses=function(t){var e=this,n=e.hasError,r=e._hasValue,i=e._value,o=e.thrownError,s=e.isStopped,a=e._isComplete;n?t.error(o):(s||a)&&(r&&t.next(i),t.complete())},e.prototype.next=function(t){this.isStopped||(this._value=t,this._hasValue=!0)},e.prototype.complete=function(){var e=this,n=e._hasValue,r=e._value;e._isComplete||(this._isComplete=!0,n&&t.prototype.next.call(this,r),t.prototype.complete.call(this))}}(cy);var fy,dy=function(t){function e(e,n){return t.call(this)||this}return Sd(e,t),e.prototype.schedule=function(t,e){return this},e}(Pd),yy=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setInterval.apply(void 0,Ed([t,e],Od(n)))},hy=function(t){return clearInterval(t)},vy=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return Sd(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),yy(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!=n&&this.delay===n&&!1===this.pending)return e;hy(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n,r=!1;try{this.work(t)}catch(t){r=!0,n=t||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),n},e.prototype.unsubscribe=function(){if(!this.closed){var e=this.id,n=this.scheduler,r=n.actions;this.work=this.state=this.scheduler=null,this.pending=!1,Bd(r,this),null!=e&&(this.id=this.recycleAsyncId(n,e,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},e}(dy),py=1,my={};function by(t){return t in my&&(delete my[t],!0)}var gy=function(t){var e=py++;return my[e]=!0,fy||(fy=Promise.resolve()),fy.then((function(){return by(e)&&t()})),e},wy=function(t){by(t)},Ay={setImmediate:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Ay.delegate;return((null==n?void 0:n.setImmediate)||gy).apply(void 0,Ed([],Od(t)))},clearImmediate:function(t){return wy(t)},delegate:void 0},Ty=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return Sd(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e._scheduled||(e._scheduled=Ay.setImmediate(e.flush.bind(e,void 0))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);e.actions.some((function(t){return t.id===n}))||(Ay.clearImmediate(n),e._scheduled=void 0)},e}(vy),xy=function(){function t(e,n){void 0===n&&(n=t.now),this.schedulerActionCtor=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.schedulerActionCtor(this,t).schedule(n,e)},t.now=ly.now,t}(),Iy=function(t){function e(e,n){void 0===n&&(n=xy.now);var r=t.call(this,e,n)||this;return r.actions=[],r._active=!1,r._scheduled=void 0,r}return Sd(e,t),e.prototype.flush=function(t){var e=this.actions;if(this._active)e.push(t);else{var n;this._active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this._active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(xy);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Sd(e,t),e.prototype.flush=function(t){this._active=!0;var e=this._scheduled;this._scheduled=void 0;var n,r=this.actions;t=t||r.shift();do{if(n=t.execute(t.state,t.delay))break}while((t=r[0])&&t.id===e&&r.shift());if(this._active=!1,n){for(;(t=r[0])&&t.id===e&&r.shift();)t.unsubscribe();throw n}},e}(Iy))(Ty),new Iy(vy);var Sy=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return Sd(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(vy);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Sd(e,t),e}(Iy))(Sy);var _y=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return Sd(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e._scheduled||(e._scheduled=sy.requestAnimationFrame((function(){return e.flush(void 0)}))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);e.actions.some((function(t){return t.id===n}))||(sy.cancelAnimationFrame(n),e._scheduled=void 0)},e}(vy);new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Sd(e,t),e.prototype.flush=function(t){this._active=!0;var e=this._scheduled;this._scheduled=void 0;var n,r=this.actions;t=t||r.shift();do{if(n=t.execute(t.state,t.delay))break}while((t=r[0])&&t.id===e&&r.shift());if(this._active=!1,n){for(;(t=r[0])&&t.id===e&&r.shift();)t.unsubscribe();throw n}},e}(Iy))(_y),function(t){function e(e,n){void 0===e&&(e=Ey),void 0===n&&(n=1/0);var r=t.call(this,e,(function(){return r.frame}))||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}Sd(e,t),e.prototype.flush=function(){for(var t,e,n=this.actions,r=this.maxFrames;(e=n[0])&&e.delay<=r&&(n.shift(),this.frame=e.delay,!(t=e.execute(e.state,e.delay))););if(t){for(;e=n.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10}(Iy);var Oy,Ey=function(t){function e(e,n,r){void 0===r&&(r=e.index+=1);var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.index=r,i.active=!0,i.index=e.index=r,i}return Sd(e,t),e.prototype.schedule=function(n,r){if(void 0===r&&(r=0),Number.isFinite(r)){if(!this.id)return t.prototype.schedule.call(this,n,r);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(n,r)}return Pd.EMPTY},e.prototype.requestAsyncId=function(t,n,r){void 0===r&&(r=0),this.delay=t.frame+r;var i=t.actions;return i.push(this),i.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,n){},e.prototype._execute=function(e,n){if(!0===this.active)return t.prototype._execute.call(this,e,n)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(vy);new Gd((function(t){return t.complete()})),function(t){t.NEXT="N",t.ERROR="E",t.COMPLETE="C"}(Oy||(Oy={})),Nd((function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}})),Nd((function(t){return function(){t(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})),Nd((function(t){return function(e){t(this),this.name="NotFoundError",this.message=e}})),Nd((function(t){return function(e){t(this),this.name="SequenceError",this.message=e}})),Nd((function(t){return function(e){void 0===e&&(e=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=e}})),new Gd(Fd);class jy extends Td{constructor(){super(...arguments),this.stateChanges=new cy}get[Symbol.toStringTag](){return this.constructor.name}observeStateChanges(){return this.stateChanges}send(t){const e=this.state;super.send(t);const r=this.state;this.stateChanges.next({event:t,oldState:e,newState:r}),n.isEmptyObject(this.schema[r])&&this.stateChanges.complete()}}class Ny{constructor(){this.indexToValue=[],this.valueToIndex=[]}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.indexToValue[Symbol.iterator]()}values(){return this.indexToValue[Symbol.iterator]()}has(t){return t in this.valueToIndex}add(t){if(!this.has(t)){const e=this.indexToValue.length;this.indexToValue.push(t),this.valueToIndex[t]=e}}delete(t){if(this.has(t)){const e=this.indexToValue.pop();if(t===e)delete this.valueToIndex[t];else{const n=this.valueToIndex[t];this.indexToValue[n]=e,this.valueToIndex[e]=n,delete this.valueToIndex[t]}}}}class ky{constructor(){this.keyToIndex=[],this.indexToKey=[],this.indexToValue=[]}get[Symbol.toStringTag](){return this.constructor.name}*entries(){for(let t=0;t<this.indexToKey.length;t++)yield[this.indexToKey[t],this.indexToValue[t]]}keys(){return this.indexToKey.values()}values(){return this.indexToValue.values()}has(t){return t in this.keyToIndex}get(t){if(this.has(t)){const e=this.keyToIndex[t];return this.indexToValue[e]}}set(t,e){if(this.has(t)){const n=this.keyToIndex[t];this.indexToValue[n]=e}else{const n=this.indexToKey.length;this.indexToKey.push(t),this.indexToValue.push(e),this.keyToIndex[t]=n}}delete(t){if(this.has(t)){const e=this.indexToKey.pop(),n=this.indexToValue.pop();if(t===e)delete this.keyToIndex[t];else{const r=this.keyToIndex[t];this.indexToKey[r]=e,this.indexToValue[r]=n,this.keyToIndex[t]=r,delete this.keyToIndex[t]}}}}class By{constructor(t){this.keyToIndex=[],this.indexToKey=[],Ut.assert(0===t.length,"array should be empty"),this.indexToValue=t}get[Symbol.toStringTag](){return this.constructor.name}*entries(){for(let t=0;t<this.indexToKey.length;t++)yield[this.indexToKey[t],this.indexToValue.internalTypedArray[t]]}keys(){return this.indexToKey.values()}*values(){for(let t=0;t<this.indexToKey.length;t++)yield this.indexToValue.internalTypedArray[t]}has(t){const e=this.keyToIndex[t];return this.indexToKey[e]===t}get(t){const e=this.keyToIndex[t];return this.indexToKey[e]===t?this.indexToValue.internalTypedArray[e]:void 0}set(t,e){const n=this.keyToIndex[t];if(this.indexToKey[n]===t)this.indexToValue.internalTypedArray[n]=e;else{const n=this.indexToKey.length;this.indexToKey.push(t),this.indexToValue.push(e),this.keyToIndex[t]=n}}delete(t){const e=this.keyToIndex[t];if(this.indexToKey[e]===t){const n=this.indexToKey.pop(),r=this.indexToValue.pop();t!==n&&(this.indexToKey[e]=n,this.indexToValue.internalTypedArray[e]=r,this.keyToIndex[n]=e)}}}class Py{constructor(t){const e=[];if(t.length>0)for(const[n,r]of t.internalTypedArray.entries())e[r]=n;this.indexToValue=t,this.valueToIndex=e}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.values()}*values(){for(let t=0;t<this.indexToValue.length;t++)yield this.indexToValue.internalTypedArray[t]}has(t){const e=this.valueToIndex[t];return this.indexToValue.internalTypedArray[e]===t}add(t){if(!this.has(t)){const e=this.indexToValue.length;this.indexToValue.push(t),this.valueToIndex[t]=e}}delete(t){const e=this.valueToIndex[t];if(this.indexToValue.internalTypedArray[e]===t){const n=this.indexToValue.pop();t!==n&&(this.indexToValue.internalTypedArray[e]=n,this.valueToIndex[n]=e)}}}class qy{constructor(t,{capacity:e=0,growthFactor:n=1.5}={}){this.typedArrayConstructor=t,this._length=0,Ut.assert(Number.isInteger(e),"capacity must be an integer"),Ut.assert(e>=0,"capacity must be greater than or equal to 0"),Ut.assert(n>=1,"growthFactory must be greater than or equal to 1"),this.array=new t(e),this.growthFactor=n}get internalTypedArray(){return this.array}get[Symbol.toStringTag](){return this.constructor.name}get capacity(){return this.array.length}get length(){return this._length}set(t,e){if(t>=this.capacity){const e=Cy(this.capacity,t+1,this.growthFactor);this.resize(e)}t>=this._length&&(this._length=t+1),this.array[t]=e}get(t){return t<this._length?this.array[t]:void 0}push(...t){const e=this._length+t.length;if(e>this.capacity){const t=Cy(this.capacity,e,this.growthFactor);this.resize(t)}for(const e of t)this.array[this._length++]=e}pop(){if(this._length>0){const t=this.array[this._length-1];this._length--;const e=Cy(this.capacity,this.length,this.growthFactor);return this.resize(e),t}}resize(t){if(this.array.length!==t)if(this.array.length<t){const e=new this.typedArrayConstructor(t);e.set(this.array),this.array=e}else if(this.array.length>t){const e=new this.typedArrayConstructor(t);for(let n=t;n--;)e[n]=this.array[n];this.array=e}}}function Cy(t,e,n){if(1===n)return e;if(t===e)return e;if(t<e){let r=Math.max(t,1);for(;r<e;)r*=n;return Math.floor(r)}if(0===e)return 0;{let r=t;for(;;){const t=r/n;if(t<e)break;r=t}return Math.floor(r)}}export{xd as BadEventError,t as Box,qy as DynamicTypedArray,Mt as Emitter,bd as ExpirableMap,Td as FiniteStateMachine,zt as HashMap,Rt as HashSet,td as LRUMap,jy as ObservableFiniteStateMachine,Ft as Queue,ky as SparseMap,Ny as SparseSet,gd as TLRUMap,Ad as TrieMap,By as TypedSparseMap,Py as TypedSparseSet,Ct as convertArrayToCons,qt as convertConsToArray};
15
+ ***************************************************************************** */var ox=function(t,n){return(ox=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])})(t,n)};function ix(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}ox(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}function ax(t){var n="function"==typeof Symbol&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function sx(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,o,i=e.call(t),a=[];try{for(;(void 0===n||n-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return a}function cx(t,n,e){if(e||2===arguments.length)for(var r,o=0,i=n.length;o<i;o++)!r&&o in n||(r||(r=Array.prototype.slice.call(n,0,o)),r[o]=n[o]);return t.concat(r||Array.prototype.slice.call(n))}function ux(t){return"function"==typeof t}function lx(t){var n=t((function(t){Error.call(t),t.stack=(new Error).stack}));return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var fx=lx((function(t){return function(n){t(this),this.message=n?n.length+" errors occurred during unsubscription:\n"+n.map((function(t,n){return n+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=n}}));function yx(t,n){if(t){var e=t.indexOf(n);0<=e&&t.splice(e,1)}}var dx=function(){function t(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}var n;return t.prototype.unsubscribe=function(){var t,n,e,r,o;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var a=ax(i),s=a.next();!s.done;s=a.next()){s.value.remove(this)}}catch(n){t={error:n}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else i.remove(this);var c=this.initialTeardown;if(ux(c))try{c()}catch(t){o=t instanceof fx?t.errors:[t]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var l=ax(u),f=l.next();!f.done;f=l.next()){var y=f.value;try{px(y)}catch(t){o=null!=o?o:[],t instanceof fx?o=cx(cx([],sx(o)),sx(t.errors)):o.push(t)}}}catch(t){e={error:t}}finally{try{f&&!f.done&&(r=l.return)&&r.call(l)}finally{if(e)throw e.error}}}if(o)throw new fx(o)}},t.prototype.add=function(n){var e;if(n&&n!==this)if(this.closed)px(n);else{if(n instanceof t){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=null!==(e=this._finalizers)&&void 0!==e?e:[]).push(n)}},t.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},t.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},t.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&yx(n,t)},t.prototype.remove=function(n){var e=this._finalizers;e&&yx(e,n),n instanceof t&&n._removeParent(this)},t.EMPTY=((n=new t).closed=!0,n),t}(),vx=dx.EMPTY;function hx(t){return t instanceof dx||t&&"closed"in t&&ux(t.remove)&&ux(t.add)&&ux(t.unsubscribe)}function px(t){ux(t)?t():t.unsubscribe()}var mx={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},bx=function(t,n){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];return setTimeout.apply(void 0,cx([t,n],sx(e)))};function gx(){}function wx(t){t()}var Ax=function(t){function n(n){var e=t.call(this)||this;return e.isStopped=!1,n?(e.destination=n,hx(n)&&n.add(e)):e.destination=Ox,e}return ix(n,t),n.create=function(t,n,e){return new Tx(t,n,e)},n.prototype.next=function(t){this.isStopped||this._next(t)},n.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},n.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},n.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},n.prototype._next=function(t){this.destination.next(t)},n.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},n.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},n}(dx),Ix=Function.prototype.bind;function Sx(t,n){return Ix.call(t,n)}var xx=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(t){_x(t)}},t.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(t){_x(t)}else _x(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){_x(t)}},t}(),Tx=function(t){function n(n,e,r){var o,i,a=t.call(this)||this;ux(n)||!n?o={next:null!=n?n:void 0,error:null!=e?e:void 0,complete:null!=r?r:void 0}:a&&mx.useDeprecatedNextContext?((i=Object.create(n)).unsubscribe=function(){return a.unsubscribe()},o={next:n.next&&Sx(n.next,i),error:n.error&&Sx(n.error,i),complete:n.complete&&Sx(n.complete,i)}):o=n;return a.destination=new xx(o),a}return ix(n,t),n}(Ax);function _x(t){var n;n=t,bx((function(){throw n}))}var Ox={closed:!0,next:gx,error:function(t){throw t},complete:gx},Ex="function"==typeof Symbol&&Symbol.observable||"@@observable";function jx(t){return t}function Nx(t){return 0===t.length?jx:1===t.length?t[0]:function(n){return t.reduce((function(t,n){return n(t)}),n)}}var kx=function(){function t(t){t&&(this._subscribe=t)}return t.prototype.lift=function(n){var e=new t;return e.source=this,e.operator=n,e},t.prototype.subscribe=function(t,n,e){var r,o=this,i=(r=t)&&r instanceof Ax||function(t){return t&&ux(t.next)&&ux(t.error)&&ux(t.complete)}(r)&&hx(r)?t:new Tx(t,n,e);return wx((function(){var t=o,n=t.operator,e=t.source;i.add(n?n.call(i,e):e?o._subscribe(i):o._trySubscribe(i))})),i},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},t.prototype.forEach=function(t,n){var e=this;return new(n=Bx(n))((function(n,r){var o=new Tx({next:function(n){try{t(n)}catch(t){r(t),o.unsubscribe()}},error:r,complete:n});e.subscribe(o)}))},t.prototype._subscribe=function(t){var n;return null===(n=this.source)||void 0===n?void 0:n.subscribe(t)},t.prototype[Ex]=function(){return this},t.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return Nx(t)(this)},t.prototype.toPromise=function(t){var n=this;return new(t=Bx(t))((function(t,e){var r;n.subscribe((function(t){return r=t}),(function(t){return e(t)}),(function(){return t(r)}))}))},t.create=function(n){return new t(n)},t}();function Bx(t){var n;return null!==(n=null!=t?t:mx.Promise)&&void 0!==n?n:Promise}function Px(t){return ux(null==t?void 0:t.lift)}function qx(t,n,e,r,o){return new Cx(t,n,e,r,o)}var Cx=function(t){function n(n,e,r,o,i,a){var s=t.call(this,n)||this;return s.onFinalize=i,s.shouldUnsubscribe=a,s._next=e?function(t){try{e(t)}catch(t){n.error(t)}}:t.prototype._next,s._error=o?function(t){try{o(t)}catch(t){n.error(t)}finally{this.unsubscribe()}}:t.prototype._error,s._complete=r?function(){try{r()}catch(t){n.error(t)}finally{this.unsubscribe()}}:t.prototype._complete,s}return ix(n,t),n.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var e=this.closed;t.prototype.unsubscribe.call(this),!e&&(null===(n=this.onFinalize)||void 0===n||n.call(this))}},n}(Ax);function Rx(){return t=function(t,n){var e=null;t._refCount++;var r=qx(n,void 0,void 0,void 0,(function(){if(!t||t._refCount<=0||0<--t._refCount)e=null;else{var r=t._connection,o=e;e=null,!r||o&&r!==o||r.unsubscribe(),n.unsubscribe()}}));t.subscribe(r),r.closed||(e=t.connect())},function(n){if(Px(n))return n.lift((function(n){try{return t(n,this)}catch(t){this.error(t)}}));throw new TypeError("Unable to lift unknown Observable type")};var t}!function(t){function n(n,e){var r=t.call(this)||this;return r.source=n,r.subjectFactory=e,r._subject=null,r._refCount=0,r._connection=null,Px(n)&&(r.lift=n.lift),r}ix(n,t),n.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},n.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},n.prototype._teardown=function(){this._refCount=0;var t=this._connection;this._subject=this._connection=null,null==t||t.unsubscribe()},n.prototype.connect=function(){var t=this,n=this._connection;if(!n){n=this._connection=new dx;var e=this.getSubject();n.add(this.source.subscribe(qx(e,void 0,(function(){t._teardown(),e.complete()}),(function(n){t._teardown(),e.error(n)}),(function(){return t._teardown()})))),n.closed&&(this._connection=null,n=dx.EMPTY)}return n},n.prototype.refCount=function(){return Rx()(this)}}(kx);var Ux,zx,Dx={now:function(){return(Dx.delegate||performance).now()},delegate:void 0},Mx={schedule:function(t){var n=requestAnimationFrame,e=cancelAnimationFrame,r=n((function(n){e=void 0,t(n)}));return new dx((function(){return null==e?void 0:e(r)}))},requestAnimationFrame:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=Mx.delegate;return((null==e?void 0:e.requestAnimationFrame)||requestAnimationFrame).apply(void 0,cx([],sx(t)))},cancelAnimationFrame:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return cancelAnimationFrame.apply(void 0,cx([],sx(t)))},delegate:void 0};zx=Mx.schedule,new kx((function(t){var n=new dx,e=Ux||Dx,r=e.now(),o=function(i){var a=e.now();t.next({timestamp:Ux?a:i,elapsed:a-r}),t.closed||n.add(zx(o))};return n.add(zx(o)),n}));var Fx=lx((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),Jx=function(t){function n(){var n=t.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return ix(n,t),n.prototype.lift=function(t){var n=new Vx(this,this);return n.operator=t,n},n.prototype._throwIfClosed=function(){if(this.closed)throw new Fx},n.prototype.next=function(t){var n=this;wx((function(){var e,r;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var o=ax(n.currentObservers),i=o.next();!i.done;i=o.next()){i.value.next(t)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}}}))},n.prototype.error=function(t){var n=this;wx((function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=t;for(var e=n.observers;e.length;)e.shift().error(t)}}))},n.prototype.complete=function(){var t=this;wx((function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var n=t.observers;n.length;)n.shift().complete()}}))},n.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(n.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),n.prototype._trySubscribe=function(n){return this._throwIfClosed(),t.prototype._trySubscribe.call(this,n)},n.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},n.prototype._innerSubscribe=function(t){var n=this,e=this,r=e.hasError,o=e.isStopped,i=e.observers;return r||o?vx:(this.currentObservers=null,i.push(t),new dx((function(){n.currentObservers=null,yx(i,t)})))},n.prototype._checkFinalizedStatuses=function(t){var n=this,e=n.hasError,r=n.thrownError,o=n.isStopped;e?t.error(r):o&&t.complete()},n.prototype.asObservable=function(){var t=new kx;return t.source=this,t},n.create=function(t,n){return new Vx(t,n)},n}(kx),Vx=function(t){function n(n,e){var r=t.call(this)||this;return r.destination=n,r.source=e,r}return ix(n,t),n.prototype.next=function(t){var n,e;null===(e=null===(n=this.destination)||void 0===n?void 0:n.next)||void 0===e||e.call(n,t)},n.prototype.error=function(t){var n,e;null===(e=null===(n=this.destination)||void 0===n?void 0:n.error)||void 0===e||e.call(n,t)},n.prototype.complete=function(){var t,n;null===(n=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===n||n.call(t)},n.prototype._subscribe=function(t){var n,e;return null!==(e=null===(n=this.source)||void 0===n?void 0:n.subscribe(t))&&void 0!==e?e:vx},n}(Jx);!function(t){function n(n){var e=t.call(this)||this;return e._value=n,e}ix(n,t),Object.defineProperty(n.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),n.prototype._subscribe=function(n){var e=t.prototype._subscribe.call(this,n);return!e.closed&&n.next(this._value),e},n.prototype.getValue=function(){var t=this,n=t.hasError,e=t.thrownError,r=t._value;if(n)throw e;return this._throwIfClosed(),r},n.prototype.next=function(n){t.prototype.next.call(this,this._value=n)}}(Jx);var Lx={now:function(){return(Lx.delegate||Date).now()},delegate:void 0};!function(t){function n(n,e,r){void 0===n&&(n=1/0),void 0===e&&(e=1/0),void 0===r&&(r=Lx);var o=t.call(this)||this;return o._bufferSize=n,o._windowTime=e,o._timestampProvider=r,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=e===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,e),o}ix(n,t),n.prototype.next=function(n){var e=this,r=e.isStopped,o=e._buffer,i=e._infiniteTimeWindow,a=e._timestampProvider,s=e._windowTime;r||(o.push(n),!i&&o.push(a.now()+s)),this._trimBuffer(),t.prototype.next.call(this,n)},n.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(t),e=this._infiniteTimeWindow,r=this._buffer.slice(),o=0;o<r.length&&!t.closed;o+=e?1:2)t.next(r[o]);return this._checkFinalizedStatuses(t),n},n.prototype._trimBuffer=function(){var t=this,n=t._bufferSize,e=t._timestampProvider,r=t._buffer,o=t._infiniteTimeWindow,i=(o?1:2)*n;if(n<1/0&&i<r.length&&r.splice(0,r.length-i),!o){for(var a=e.now(),s=0,c=1;c<r.length&&r[c]<=a;c+=2)s=c;s&&r.splice(0,s+1)}}}(Jx),function(t){function n(){var n=null!==t&&t.apply(this,arguments)||this;return n._value=null,n._hasValue=!1,n._isComplete=!1,n}ix(n,t),n.prototype._checkFinalizedStatuses=function(t){var n=this,e=n.hasError,r=n._hasValue,o=n._value,i=n.thrownError,a=n.isStopped,s=n._isComplete;e?t.error(i):(a||s)&&(r&&t.next(o),t.complete())},n.prototype.next=function(t){this.isStopped||(this._value=t,this._hasValue=!0)},n.prototype.complete=function(){var n=this,e=n._hasValue,r=n._value;n._isComplete||(this._isComplete=!0,e&&t.prototype.next.call(this,r),t.prototype.complete.call(this))}}(Jx);var Kx,Wx=function(t){function n(n,e){return t.call(this)||this}return ix(n,t),n.prototype.schedule=function(t,n){return this},n}(dx),Yx=function(t,n){for(var e=[],r=2;r<arguments.length;r++)e[r-2]=arguments[r];return setInterval.apply(void 0,cx([t,n],sx(e)))},$x=function(t){return clearInterval(t)},Hx=function(t){function n(n,e){var r=t.call(this,n,e)||this;return r.scheduler=n,r.work=e,r.pending=!1,r}return ix(n,t),n.prototype.schedule=function(t,n){if(void 0===n&&(n=0),this.closed)return this;this.state=t;var e=this.id,r=this.scheduler;return null!=e&&(this.id=this.recycleAsyncId(r,e,n)),this.pending=!0,this.delay=n,this.id=this.id||this.requestAsyncId(r,this.id,n),this},n.prototype.requestAsyncId=function(t,n,e){return void 0===e&&(e=0),Yx(t.flush.bind(t,this),e)},n.prototype.recycleAsyncId=function(t,n,e){if(void 0===e&&(e=0),null!=e&&this.delay===e&&!1===this.pending)return n;$x(n)},n.prototype.execute=function(t,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var e=this._execute(t,n);if(e)return e;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},n.prototype._execute=function(t,n){var e,r=!1;try{this.work(t)}catch(t){r=!0,e=t||new Error("Scheduled action threw falsy error")}if(r)return this.unsubscribe(),e},n.prototype.unsubscribe=function(){if(!this.closed){var n=this.id,e=this.scheduler,r=e.actions;this.work=this.state=this.scheduler=null,this.pending=!1,yx(r,this),null!=n&&(this.id=this.recycleAsyncId(e,n,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},n}(Wx),Xx=1,Gx={};function Qx(t){return t in Gx&&(delete Gx[t],!0)}var Zx=function(t){var n=Xx++;return Gx[n]=!0,Kx||(Kx=Promise.resolve()),Kx.then((function(){return Qx(n)&&t()})),n},tT=function(t){Qx(t)},nT={setImmediate:function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=nT.delegate;return((null==e?void 0:e.setImmediate)||Zx).apply(void 0,cx([],sx(t)))},clearImmediate:function(t){return tT(t)},delegate:void 0},eT=function(t){function n(n,e){var r=t.call(this,n,e)||this;return r.scheduler=n,r.work=e,r}return ix(n,t),n.prototype.requestAsyncId=function(n,e,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,n,e,r):(n.actions.push(this),n._scheduled||(n._scheduled=nT.setImmediate(n.flush.bind(n,void 0))))},n.prototype.recycleAsyncId=function(n,e,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,n,e,r);n.actions.some((function(t){return t.id===e}))||(nT.clearImmediate(e),n._scheduled=void 0)},n}(Hx),rT=function(){function t(n,e){void 0===e&&(e=t.now),this.schedulerActionCtor=n,this.now=e}return t.prototype.schedule=function(t,n,e){return void 0===n&&(n=0),new this.schedulerActionCtor(this,t).schedule(e,n)},t.now=Lx.now,t}(),oT=function(t){function n(n,e){void 0===e&&(e=rT.now);var r=t.call(this,n,e)||this;return r.actions=[],r._active=!1,r._scheduled=void 0,r}return ix(n,t),n.prototype.flush=function(t){var n=this.actions;if(this._active)n.push(t);else{var e;this._active=!0;do{if(e=t.execute(t.state,t.delay))break}while(t=n.shift());if(this._active=!1,e){for(;t=n.shift();)t.unsubscribe();throw e}}},n}(rT);new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return ix(n,t),n.prototype.flush=function(t){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var e,r=this.actions;t=t||r.shift();do{if(e=t.execute(t.state,t.delay))break}while((t=r[0])&&t.id===n&&r.shift());if(this._active=!1,e){for(;(t=r[0])&&t.id===n&&r.shift();)t.unsubscribe();throw e}},n}(oT))(eT),new oT(Hx);var iT=function(t){function n(n,e){var r=t.call(this,n,e)||this;return r.scheduler=n,r.work=e,r}return ix(n,t),n.prototype.schedule=function(n,e){return void 0===e&&(e=0),e>0?t.prototype.schedule.call(this,n,e):(this.delay=e,this.state=n,this.scheduler.flush(this),this)},n.prototype.execute=function(n,e){return e>0||this.closed?t.prototype.execute.call(this,n,e):this._execute(n,e)},n.prototype.requestAsyncId=function(n,e,r){return void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0?t.prototype.requestAsyncId.call(this,n,e,r):n.flush(this)},n}(Hx);new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return ix(n,t),n}(oT))(iT);var aT=function(t){function n(n,e){var r=t.call(this,n,e)||this;return r.scheduler=n,r.work=e,r}return ix(n,t),n.prototype.requestAsyncId=function(n,e,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,n,e,r):(n.actions.push(this),n._scheduled||(n._scheduled=Mx.requestAnimationFrame((function(){return n.flush(void 0)}))))},n.prototype.recycleAsyncId=function(n,e,r){if(void 0===r&&(r=0),null!=r&&r>0||null==r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,n,e,r);n.actions.some((function(t){return t.id===e}))||(Mx.cancelAnimationFrame(e),n._scheduled=void 0)},n}(Hx);new(function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return ix(n,t),n.prototype.flush=function(t){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var e,r=this.actions;t=t||r.shift();do{if(e=t.execute(t.state,t.delay))break}while((t=r[0])&&t.id===n&&r.shift());if(this._active=!1,e){for(;(t=r[0])&&t.id===n&&r.shift();)t.unsubscribe();throw e}},n}(oT))(aT),function(t){function n(n,e){void 0===n&&(n=cT),void 0===e&&(e=1/0);var r=t.call(this,n,(function(){return r.frame}))||this;return r.maxFrames=e,r.frame=0,r.index=-1,r}ix(n,t),n.prototype.flush=function(){for(var t,n,e=this.actions,r=this.maxFrames;(n=e[0])&&n.delay<=r&&(e.shift(),this.frame=n.delay,!(t=n.execute(n.state,n.delay))););if(t){for(;n=e.shift();)n.unsubscribe();throw t}},n.frameTimeFactor=10}(oT);var sT,cT=function(t){function n(n,e,r){void 0===r&&(r=n.index+=1);var o=t.call(this,n,e)||this;return o.scheduler=n,o.work=e,o.index=r,o.active=!0,o.index=n.index=r,o}return ix(n,t),n.prototype.schedule=function(e,r){if(void 0===r&&(r=0),Number.isFinite(r)){if(!this.id)return t.prototype.schedule.call(this,e,r);this.active=!1;var o=new n(this.scheduler,this.work);return this.add(o),o.schedule(e,r)}return dx.EMPTY},n.prototype.requestAsyncId=function(t,e,r){void 0===r&&(r=0),this.delay=t.frame+r;var o=t.actions;return o.push(this),o.sort(n.sortActions),!0},n.prototype.recycleAsyncId=function(t,n,e){},n.prototype._execute=function(n,e){if(!0===this.active)return t.prototype._execute.call(this,n,e)},n.sortActions=function(t,n){return t.delay===n.delay?t.index===n.index?0:t.index>n.index?1:-1:t.delay>n.delay?1:-1},n}(Hx);new kx((function(t){return t.complete()})),function(t){t.NEXT="N",t.ERROR="E",t.COMPLETE="C"}(sT||(sT={})),lx((function(t){return function(){t(this),this.name="EmptyError",this.message="no elements in sequence"}})),lx((function(t){return function(){t(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})),lx((function(t){return function(n){t(this),this.name="NotFoundError",this.message=n}})),lx((function(t){return function(n){t(this),this.name="SequenceError",this.message=n}})),lx((function(t){return function(n){void 0===n&&(n=null),t(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=n}})),new kx(gx);class uT extends ex{constructor(){super(...arguments),this.stateChanges=new Jx}get[Symbol.toStringTag](){return this.constructor.name}observeStateChanges(){return this.stateChanges}send(t){const n=this.state;super.send(t);const r=this.state;this.stateChanges.next({event:t,oldState:n,newState:r}),e.isEmptyObject(this.schema[r])&&this.stateChanges.complete()}}class lT{constructor(t=[]){this.indexToValue=[];const n=[];if(t.length>0)for(const[e,r]of t.entries())n[r]=e;this.valueToIndex=n}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.indexToValue[Symbol.iterator]()}values(){return this.indexToValue[Symbol.iterator]()}has(t){return t in this.valueToIndex}add(t){if(!this.has(t)){const n=this.indexToValue.length;this.indexToValue.push(t),this.valueToIndex[t]=n}}delete(t){if(this.has(t)){const n=this.indexToValue.pop();if(t===n)delete this.valueToIndex[t];else{const e=this.valueToIndex[t];this.indexToValue[e]=n,this.valueToIndex[n]=e,delete this.valueToIndex[t]}}}}class fT{constructor(){this.keyToIndex=[],this.indexToKey=[],this.indexToValue=[]}get[Symbol.toStringTag](){return this.constructor.name}*entries(){for(let t=0;t<this.indexToKey.length;t++)yield[this.indexToKey[t],this.indexToValue[t]]}keys(){return this.indexToKey.values()}values(){return this.indexToValue.values()}has(t){return t in this.keyToIndex}get(t){if(this.has(t)){const n=this.keyToIndex[t];return this.indexToValue[n]}}set(t,n){if(this.has(t)){const e=this.keyToIndex[t];this.indexToValue[e]=n}else{const e=this.indexToKey.length;this.indexToKey.push(t),this.indexToValue.push(n),this.keyToIndex[t]=e}}delete(t){if(this.has(t)){const n=this.indexToKey.pop(),e=this.indexToValue.pop();if(t===n)delete this.keyToIndex[t];else{const r=this.keyToIndex[t];this.indexToKey[r]=n,this.indexToValue[r]=e,this.keyToIndex[t]=r,delete this.keyToIndex[t]}}}}class yT{constructor(t){this.keyToIndex=[],this.indexToKey=[],Mt.assert(0===t.length,"array should be empty"),this.indexToValue=t}get[Symbol.toStringTag](){return this.constructor.name}*entries(){for(let t=0;t<this.indexToKey.length;t++)yield[this.indexToKey[t],this.indexToValue.internalTypedArray[t]]}keys(){return this.indexToKey.values()}*values(){for(let t=0;t<this.indexToKey.length;t++)yield this.indexToValue.internalTypedArray[t]}has(t){const n=this.keyToIndex[t];return this.indexToKey[n]===t}get(t){const n=this.keyToIndex[t];return this.indexToKey[n]===t?this.indexToValue.internalTypedArray[n]:void 0}set(t,n){const e=this.keyToIndex[t];if(this.indexToKey[e]===t)this.indexToValue.internalTypedArray[e]=n;else{const e=this.indexToKey.length;this.indexToKey.push(t),this.indexToValue.push(n),this.keyToIndex[t]=e}}delete(t){const n=this.keyToIndex[t];if(this.indexToKey[n]===t){const e=this.indexToKey.pop(),r=this.indexToValue.pop();t!==e&&(this.indexToKey[n]=e,this.indexToValue.internalTypedArray[n]=r,this.keyToIndex[e]=n)}}}class dT{constructor(t){const n=[];if(t.length>0)for(const[e,r]of t.internalTypedArray.entries())n[r]=e;this.indexToValue=t,this.valueToIndex=n}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.values()}*values(){for(let t=0;t<this.indexToValue.length;t++)yield this.indexToValue.internalTypedArray[t]}has(t){const n=this.valueToIndex[t];return this.indexToValue.internalTypedArray[n]===t}add(t){if(!this.has(t)){const n=this.indexToValue.length;this.indexToValue.push(t),this.valueToIndex[t]=n}}delete(t){const n=this.valueToIndex[t];if(this.indexToValue.internalTypedArray[n]===t){const e=this.indexToValue.pop();t!==e&&(this.indexToValue.internalTypedArray[n]=e,this.valueToIndex[e]=n)}}}class vT{constructor(t,{capacity:n=0,growthFactor:e=1.5}={}){this.typedArrayConstructor=t,this._length=0,Mt.assert(Number.isInteger(n),"capacity must be an integer"),Mt.assert(n>=0,"capacity must be greater than or equal to 0"),Mt.assert(e>=1,"growthFactory must be greater than or equal to 1"),this.array=new t(n),this.growthFactor=e}get internalTypedArray(){return this.array}get[Symbol.toStringTag](){return this.constructor.name}get capacity(){return this.array.length}get length(){return this._length}set(t,n){if(t>=this.capacity){const n=hT(this.capacity,t+1,this.growthFactor);this.resize(n)}t>=this._length&&(this._length=t+1),this.array[t]=n}get(t){return t<this._length?this.array[t]:void 0}push(...t){const n=this._length+t.length;if(n>this.capacity){const t=hT(this.capacity,n,this.growthFactor);this.resize(t)}for(const n of t)this.array[this._length++]=n}pop(){if(this._length>0){const t=this.array[this._length-1];this._length--;const n=hT(this.capacity,this.length,this.growthFactor);return this.resize(n),t}}resize(t){if(this.array.length!==t)if(this.array.length<t){const n=new this.typedArrayConstructor(t);n.set(this.array),this.array=n}else if(this.array.length>t){const n=new this.typedArrayConstructor(t);for(let e=t;e--;)n[e]=this.array[e];this.array=n}}}function hT(t,n,e){if(1===e)return n;if(t===n)return n;if(t<n){let r=Math.max(t,1);for(;r<n;)r*=e;return Math.floor(r)}if(0===n)return 0;{let r=t;for(;;){const t=r/e;if(t<n)break;r=t}return Math.floor(r)}}class pT{constructor(t){this.value=t,this.previous=null,this.next=null,this.up=null,this.down=null}}class mT{constructor(t){this.compare=t,this.head=new pT(null),this.tail=new pT(null),this.height=0,this._size=0,this.head.next=this.tail,this.tail.previous=this.head}get size(){return this._size}*elements(){let t=this.head;for(;t.down;)t=t.down;for(;t.next&&e.isntNull(t.next.value);)t=t.next,yield t}dumpList(){const t=[];let n=this.head;do{t.push([]);let e=n;do{t[t.length-1].push(e.value),e=e.next}while(e)}while(n=n.down);return t}delete(t){let n=this.findNode(t);for(;n;)n.previous.next=n.next,n.next.previous=n.previous,n=n.down;this._size--}has(t){return e.isntNull(this.findNode(t))}findNode(t){let n=this.head;for(;;){for(;n.next&&e.isntNull(n.next.value);){const e=this.compare(n.next.value,t);if(0===e)return n.next;if(!(e<0))break;n=n.next}if(!n.down)return null;n=n.down}}add(t){let n=this.findPreviousNode(t);if(n.next&&e.isntNull(n.next.value)&&0===this.compare(n.next.value,t))return;let r=new pT(t);n.next&&(r.next=n.next,n.next.previous=r),n.next=r,r.previous=n;let o=0;for(;Math.random()<.5;){if(o===this.height){const t=new pT(null),n=new pT(null);t.next=n,t.down=this.head,n.previous=t,n.down=this.tail,this.head.up=t,this.tail.up=n,this.head=t,this.tail=n,this.height++}for(;!n.up;)n=n.previous;n=n.up;const e=new pT(t);n.next&&(e.next=n.next,n.next.previous=e),n.next=e,e.previous=n,e.down=r,r.up=e,r=e,o++}this._size++}findPreviousNode(t){let n=this.head;for(;;){for(;n.next&&e.isntNull(n.next.value);){if(this.compare(n.next.value,t)>=0)break;n=n.next}if(!n.down)return n;n=n.down}}}class bT{constructor(t){this.skipList=new mT(t)}get[Symbol.toStringTag](){return this.constructor.name}[Symbol.iterator](){return this.values()}values(){return pc.map(this.skipList.elements(),(t=>t.value))}has(t){return this.skipList.has(t)}add(t){this.skipList.add(t)}delete(t){this.skipList.delete(t)}}class gT{constructor(){this.length=0,this.array=new vT(Uint8Array)}get[Symbol.toStringTag](){return this.constructor.name}get size(){return this.length}has(t){var n;const{index:e,mask:r}=this.getPosition(t);return((null!==(n=this.array.get(e))&&void 0!==n?n:0)&r)===r}add(t){var n;Mt.assert(t>=0,"value must be greater than or equal to 0"),t>=this.length&&(this.length=t+1);const{index:e,mask:r}=this.getPosition(t);this.array.set(e,(null!==(n=this.array.get(e))&&void 0!==n?n:0)|r)}delete(t){var n;const{index:e,mask:r}=this.getPosition(t);this.array.set(e,(null!==(n=this.array.get(e))&&void 0!==n?n:0)&~r)}clear(){for(let t=this.array.length;t--;)this.array.set(t,0)}getPosition(t){const n=8*Uint8Array.BYTES_PER_ELEMENT,e=(t-t%n)/n;return{index:Math.max(0,e-1),mask:this.getMask(t)}}getMask(t){return 2**t}}export{rx as BadEventError,gT as BitSet,t as Box,vT as DynamicTypedArray,Rt as Emitter,QS as ExpirableMap,ex as FiniteStateMachine,Ut as HashMap,zt as HashSet,GS as LRUMap,uT as ObservableFiniteStateMachine,Dt as Queue,bT as SortedSet,fT as SparseMap,lT as SparseSet,ZS as TLRUMap,nx as TrieMap,yT as TypedSparseMap,dT as TypedSparseSet,Ct as convertArrayToCons,qt as convertConsToArray};
16
16
  //# sourceMappingURL=index.min.mjs.map