extra-request 4.1.2 → 4.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es2015/index.min.mjs +2 -2
- package/dist/es2015/index.min.mjs.map +1 -1
- package/dist/es2015/index.mjs +578 -997
- package/dist/es2015/index.mjs.map +1 -1
- package/dist/es2015/index.umd.js +578 -997
- package/dist/es2015/index.umd.js.map +1 -1
- package/dist/es2015/index.umd.min.js +2 -2
- package/dist/es2015/index.umd.min.js.map +1 -1
- package/dist/es2018/index.min.mjs +2 -2
- package/dist/es2018/index.min.mjs.map +1 -1
- package/dist/es2018/index.mjs +578 -997
- package/dist/es2018/index.mjs.map +1 -1
- package/dist/es2018/index.umd.js +578 -997
- package/dist/es2018/index.umd.js.map +1 -1
- package/dist/es2018/index.umd.min.js +2 -2
- package/dist/es2018/index.umd.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ExtraRequest={})}(this,(function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n={},r={fetch:void 0};r.fetch=globalThis.fetch.bind(globalThis);var i={Headers:void 0};i.Headers=globalThis.Headers;var o={Request:void 0};o.Request=globalThis.Request;var s={Response:void 0};s.Response=globalThis.Response;var a={FormData:void 0};a.FormData=globalThis.FormData;var c={AbortController:void 0};c.AbortController=globalThis.AbortController;var u={AbortError:void 0};u.AbortError=globalThis.DOMException;var f={Blob:void 0};f.Blob=globalThis.Blob;var l={EventSource:void 0};l.EventSource=globalThis.EventSource,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]}),d=e&&e.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};d(r,t),d(i,t),d(o,t),d(s,t),d(a,t),d(c,t),d(u,t),d(f,t),d(l,t)}(n);var d={},y={},h={},p={},v={},b={},m={},g={};g.go=void 0,g.go=function(t){return t()};var O={};O.goMicrotask=void 0,O.goMicrotask=function(t){return new Promise(((e,n)=>{queueMicrotask((async()=>{try{e(await t())}catch(t){n(t)}}))}))};var w={},_={},j={},A={},E={};E.random=void 0,E.random=function(t,e){return Math.random()*(e-t)+t};var P={};P.randomInt=void 0,P.randomInt=function(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t};var S={};S.randomIntInclusive=void 0,S.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(E,t),r(P,t),r(S,t)}(A),j.calculateExponentialBackoffTimeout=void 0;const I=A;j.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,I.randomIntInclusive)(0,o):o};var k={};k.setTimeout=void 0,k.setTimeout=function(t,e){const n=globalThis.setTimeout(e,t);return()=>clearTimeout(n)};var x={setSchedule:void 0};const T=k;x.setSchedule=function(t,e){const n=t-Date.now();return(0,T.setTimeout)(n,e)};var R={};R.setInterval=void 0,R.setInterval=function(t,e){const n=globalThis.setInterval(e,t);return()=>clearInterval(n)};var N={setImmediate:void 0};const C=k;N.setImmediate=function(t){if(globalThis.setImmediate){const e=globalThis.setImmediate(t);return()=>clearImmediate(e)}return(0,C.setTimeout)(0,t)};var D={setTimeoutLoop:void 0};const F=k;D.setTimeoutLoop=function(t,e){let n=!1,r=(0,F.setTimeout)(t,(async function i(){await e(),n||(r=(0,F.setTimeout)(t,i))}));return()=>{n=!0,r()}};var B={setDynamicTimeoutLoop:void 0};const L=k;B.setDynamicTimeoutLoop=function(t,e){let n=!1,r=(0,L.setTimeout)(t,(async function i(){const o=Date.now();await e();const s=Date.now()-o;n||(r=(0,L.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(j,t),r(k,t),r(x,t),r(R,t),r(N,t),r(D,t),r(B,t)}(_),w.goMacrotask=void 0;const U=_;w.goMacrotask=function(t){return new Promise(((e,n)=>{(0,U.setImmediate)((async()=>{try{e(await t())}catch(t){n(t)}}))}))},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(g,t),r(O,t),r(w,t)}(m),b.chunkAsync=void 0;const M=m,z=y;b.chunkAsync=function(t,e){return(0,z.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,z.assert)(e>0,"The parameter size must be greater than 0"),(0,M.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 q={},J={},H={};function W(t){return Array.isArray(t)}H.isntEmptyArray=H.isEmptyArray=H.isntArray=H.isArray=void 0,H.isArray=W,H.isntArray=function(t){return!W(t)},H.isEmptyArray=function(t){return 0===t.length},H.isntEmptyArray=function(t){return 0!==t.length};var K={},$={};function Q(t){return null===t}$.isntNull=$.isNull=void 0,$.isNull=Q,$.isntNull=function(t){return!Q(t)};var G={};function Z(t){return void 0===t}G.isntUndefined=G.isUndefined=void 0,G.isUndefined=Z,G.isntUndefined=function(t){return!Z(t)};var V={};function Y(t){return"function"==typeof t}V.isntFunction=V.isFunction=void 0,V.isFunction=Y,V.isntFunction=function(t){return!Y(t)},K.isntAsyncIterable=K.isAsyncIterable=void 0;const X=$,tt=G,et=V;function nt(t){return(0,X.isntNull)(t)&&(0,tt.isntUndefined)(t)&&(0,et.isFunction)(t[Symbol.asyncIterator])}K.isAsyncIterable=nt,K.isntAsyncIterable=function(t){return!nt(t)};var rt={};function it(t){return"bigint"==typeof t}rt.isntBigInt=rt.isBigInt=void 0,rt.isBigInt=it,rt.isntBigInt=function(t){return!it(t)};var ot={};function st(t){return"boolean"==typeof t}ot.isntBoolean=ot.isBoolean=void 0,ot.isBoolean=st,ot.isntBoolean=function(t){return!st(t)};var at={},ct={};function ut(t){return"string"==typeof t}ct.isntString=ct.isString=void 0,ct.isString=ut,ct.isntString=function(t){return!ut(t)},at.isntChar=at.isChar=void 0;const ft=ct;function lt(t){return(0,ft.isString)(t)&&1===t.length}at.isChar=lt,at.isntChar=function(t){return!lt(t)};var dt={};function yt(t){return t instanceof Date}dt.isntDate=dt.isDate=void 0,dt.isDate=yt,dt.isntDate=function(t){return!yt(t)};var ht={};ht.inEnum=void 0,ht.inEnum=function(t,e){return Object.values(e).includes(t)};var pt={};function vt(t){return t instanceof Error}pt.isntError=pt.isError=void 0,pt.isError=vt,pt.isntError=function(t){return!vt(t)};var bt={};function mt(t){return!t}bt.isntFalsy=bt.isFalsy=void 0,bt.isFalsy=mt,bt.isntFalsy=function(t){return!mt(t)};var gt={};gt.isntIterable=gt.isIterable=void 0;const Ot=$,wt=G,_t=V;function jt(t){return(0,Ot.isntNull)(t)&&(0,wt.isntUndefined)(t)&&(0,_t.isFunction)(t[Symbol.iterator])}gt.isIterable=jt,gt.isntIterable=function(t){return!jt(t)};var At={},Et={};function Pt(t){return"number"==typeof t}function St(t){return Number.isNaN(t)}Et.isntNaN=Et.isNaN=Et.isNegativeInfinity=Et.isPositiveInfinity=Et.isFinite=Et.isntNumber=Et.isNumber=void 0,Et.isNumber=Pt,Et.isntNumber=function(t){return!Pt(t)},Et.isFinite=function(t){return Number.isFinite(t)},Et.isPositiveInfinity=function(t){return t===1/0},Et.isNegativeInfinity=function(t){return t===-1/0},Et.isNaN=St,Et.isntNaN=function(t){return!St(t)};var It={},kt="object"==typeof e&&e&&e.Object===Object&&e,xt="object"==typeof self&&self&&self.Object===Object&&self,Tt=(kt||xt||Function("return this")()).Symbol,Rt=Tt,Nt=Object.prototype,Ct=Nt.hasOwnProperty,Dt=Nt.toString,Ft=Rt?Rt.toStringTag:void 0;var Bt=function(t){var e=Ct.call(t,Ft),n=t[Ft];try{t[Ft]=void 0;var r=!0}catch(t){}var i=Dt.call(t);return r&&(e?t[Ft]=n:delete t[Ft]),i},Lt=Object.prototype.toString;var Ut=Bt,Mt=function(t){return Lt.call(t)},zt=Tt?Tt.toStringTag:void 0;var qt=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":zt&&zt in Object(t)?Ut(t):Mt(t)};var Jt=function(t,e){return function(n){return t(e(n))}},Ht=Jt(Object.getPrototypeOf,Object);var Wt=qt,Kt=Ht,$t=function(t){return null!=t&&"object"==typeof t},Qt=Function.prototype,Gt=Object.prototype,Zt=Qt.toString,Vt=Gt.hasOwnProperty,Yt=Zt.call(Object);var Xt=function(t){if(!$t(t)||"[object Object]"!=Wt(t))return!1;var e=Kt(t);if(null===e)return!0;var n=Vt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Zt.call(n)==Yt},te=e&&e.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};It.isntEmptyObject=It.isEmptyObject=It.isntPlainObject=It.isPlainObject=It.isntObject=It.isObject=void 0;const ee=te(Xt);function ne(t){return null!==t&&"object"==typeof t}function re(t){return(0,ee.default)(t)}It.isObject=ne,It.isntObject=function(t){return!ne(t)},It.isPlainObject=re,It.isntPlainObject=function(t){return!re(t)},It.isEmptyObject=function(t){return 0===Object.keys(t).length},It.isntEmptyObject=function(t){return 0!==Object.keys(t).length},At.isntJsonable=At.isJsonable=At.isntJson=At.isJson=void 0;const ie=$,oe=ot,se=ct,ae=Et,ce=H,ue=It;function fe(t){return(0,ie.isNull)(t)||(0,oe.isBoolean)(t)||(0,se.isString)(t)||(0,ae.isNumber)(t)||(0,ce.isArray)(t)&&t.every(fe)||(0,ue.isPlainObject)(t)&&Object.values(t).every(fe)}At.isJson=fe,At.isntJson=function(t){return!fe(t)},At.isJsonable=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},At.isntJsonable=function t(e){return!t()};var le={};le.isPromiseLike=le.isntPromiseLike=le.isntPromise=le.isPromise=void 0;const de=It,ye=V;function he(t){return t instanceof Promise}function pe(t){return(0,de.isObject)(t)&&(0,ye.isFunction)(t.then)}le.isPromise=he,le.isntPromise=function(t){return!he(t)},le.isntPromiseLike=function(t){return!pe(t)},le.isPromiseLike=pe;var ve={};ve.isAbsoluteURL=void 0,ve.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}};var be={};function me(t){return t instanceof RegExp}be.isntRegExp=be.isRegExp=void 0,be.isRegExp=me,be.isntRegExp=function(t){return!me(t)};var ge={};function Oe(t){return"symbol"==typeof t}ge.isntSymbol=ge.isSymbol=void 0,ge.isSymbol=Oe,ge.isntSymbol=function(t){return!Oe(t)},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(H,t),r(K,t),r(rt,t),r(ot,t),r(at,t),r(dt,t),r(ht,t),r(pt,t),r(bt,t),r(V,t),r(gt,t),r(At,t),r($,t),r(Et,t),r(It,t),r(le,t),r(ct,t),r(G,t),r(ve,t),r(be,t),r(ge,t)}(J),q.chunkByAsync=void 0;const we=J;q.chunkByAsync=function(t,e){return(0,we.isAsyncIterable)(t)?async function*(t,e){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,e):async function*(t,e){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,e)};var _e={};_e.chunkBy=void 0,_e.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 je={chunk:void 0};const Ae=m,Ee=y;je.chunk=function(t,e){return(0,Ee.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,Ee.assert)(e>0,"The parameter size must be greater than 0"),(0,Ae.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var Pe={concatAsync:void 0};const Se=J,Ie=m;Pe.concatAsync=function(t,...e){return(0,Ie.go)((async function*(){for(const n of[t,...e])if((0,Se.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var ke={concat:void 0};const xe=m;ke.concat=function(t,...e){return(0,xe.go)((function*(){for(const n of[t,...e])yield*n}))};var Te={},Re={};Re.copyIterable=Re.copyAsyncIterable=void 0,Re.copyAsyncIterable=async function*(t){for await(const e of t)yield e},Re.copyIterable=function*(t){for(const e of t)yield e},Te.dropAsync=void 0;const Ne=m,Ce=Re,De=y;Te.dropAsync=function(t,e){return(0,De.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,De.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Ce.copyAsyncIterable)(t):(0,Ne.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 Fe={dropRightAsync:void 0};const Be=m,Le=Re,Ue=y;Fe.dropRightAsync=function(t,e){return(0,Ue.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ue.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Le.copyAsyncIterable)(t):(0,Be.go)((async function*(){const n=await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t),r=n.slice(0,-e);for(const t of r)yield t}))};var Me={dropRight:void 0};const ze=m,qe=Re,Je=y;Me.dropRight=function(t,e){return(0,Je.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Je.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,qe.copyIterable)(t):(0,ze.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var He={dropUntilAsync:void 0};const We=J;He.dropUntilAsync=function(t,e){return(0,We.isAsyncIterable)(t)?async function*(t,e){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,e):async 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||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,e)};var Ke={};Ke.dropUntil=void 0,Ke.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 $e={drop:void 0};const Qe=m,Ge=Re,Ze=y;$e.drop=function(t,e){return(0,Ze.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ze.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,Ge.copyIterable)(t):(0,Qe.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 Ve={filterAsync:void 0};const Ye=J;Ve.filterAsync=function(t,e){return(0,Ye.isAsyncIterable)(t)?async function*(t,e){let n=0;for await(const r of t)await e(r,n)&&(yield r),n++}(t,e):async function*(t,e){let n=0;for(const r of t)await e(r,n)&&(yield r),n++}(t,e)};var Xe={};Xe.filter=void 0,Xe.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var tn={},en={},nn={flattenByAsync:void 0};const rn=J;async function*on(t,e,n){for(const r of t)sn(r)&&await e(r,n)?yield*on(r,e,n+1):yield r}function sn(t){return(0,rn.isIterable)(t)&&(0,rn.isntChar)(t)}nn.flattenByAsync=function(t,e){return(0,rn.isAsyncIterable)(t)?async function*(t,e){const n=1;for await(const r of t)sn(r)&&await e(r,n)?yield*on(r,e,n+1):yield r}(t,e):function(t,e){return on(t,e,1)}(t,e)},en.flattenDeepAsync=void 0;const an=nn,cn=y;en.flattenDeepAsync=function(t,e=1/0){return(0,cn.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,cn.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,an.flattenByAsync)(t,((t,n)=>n<=e))},tn.flattenAsync=void 0;const un=en;tn.flattenAsync=function(t){return(0,un.flattenDeepAsync)(t,1)};var fn={flattenBy:void 0};const ln=J;function*dn(t,e,n){for(const i of t)(0,ln.isIterable)(r=i)&&(0,ln.isntChar)(r)&&e(i,n)?yield*dn(i,e,n+1):yield i;var r}fn.flattenBy=function(t,e){return dn(t,e,1)};var yn={flattenDeep:void 0};const hn=fn,pn=y;yn.flattenDeep=function(t,e=1/0){return(0,pn.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,pn.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,hn.flattenBy)(t,((t,n)=>n<=e))};var vn={flatten:void 0};const bn=yn;vn.flatten=function(t){return(0,bn.flattenDeep)(t,1)};var mn={mapAsync:void 0};const gn=J;mn.mapAsync=function(t,e){return(0,gn.isAsyncIterable)(t)?async function*(t,e){let n=0;for await(const r of t)yield await e(r,n),n++}(t,e):async function*(t,e){let n=0;for(const r of t)yield await e(r,n),n++}(t,e)};var On={};On.map=void 0,On.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var wn={repeatAsync:void 0};const _n=m,jn=y;wn.repeatAsync=function(t,e){return(0,jn.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,jn.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,_n.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 An={repeat:void 0};const En=m,Pn=y;An.repeat=function(t,e){return(0,Pn.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Pn.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,En.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 Sn={sliceAsync:void 0};const In=m,kn=y;Sn.sliceAsync=function(t,e,n=1/0){return(0,kn.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,kn.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,kn.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,kn.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,In.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var xn={slice:void 0};const Tn=m,Rn=y;xn.slice=function(t,e,n=1/0){return(0,Rn.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,Rn.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,Rn.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Rn.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,Tn.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var Nn={};Nn.splitAsync=void 0,Nn.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Cn={splitByAsync:void 0};const Dn=J;Cn.splitByAsync=function(t,e){return(0,Dn.isAsyncIterable)(t)?async function*(t,e){let n=[],r=0;for await(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t,e):async function*(t,e){let n=[],r=0;for(const i of t)await e(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(t,e)};var Fn={};Fn.splitBy=void 0,Fn.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 Bn={};Bn.split=void 0,Bn.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var Ln={takeAsync:void 0};const Un=m,Mn=y;Ln.takeAsync=function(t,e){return(0,Mn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Mn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Un.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var zn={takeRightAsync:void 0};const qn=m,Jn=y;zn.takeRightAsync=function(t,e){return(0,Jn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Jn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,qn.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 Hn={takeRight:void 0};const Wn=m,Kn=y;Hn.takeRight=function(t,e){return(0,Kn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Kn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Wn.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 $n={takeUntilAsync:void 0};const Qn=J;$n.takeUntilAsync=function(t,e){return(0,Qn.isAsyncIterable)(t)?async function*(t,e){let n=0;for await(const r of t){if(await e(r,n))break;yield r,n++}}(t,e):async function*(t,e){let n=0;for(const r of t){if(await e(r,n))break;yield r,n++}}(t,e)};var Gn={};Gn.takeUntil=void 0,Gn.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var Zn={take:void 0};const Vn=m,Yn=y;Zn.take=function(t,e){return(0,Yn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Yn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,Vn.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Xn={tapAsync:void 0};const tr=J;Xn.tapAsync=function(t,e){return(0,tr.isAsyncIterable)(t)?async function*(t,e){let n=0;for await(const r of t)await e(r,n),yield r,n++}(t,e):async function*(t,e){let n=0;for(const r of t)await e(r,n),yield r,n++}(t,e)};var er={};er.tap=void 0,er.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var nr={};nr.toAsyncIterable=void 0,nr.toAsyncIterable=async function*(t){for(const e of t)yield e};var rr={};rr.transformAsync=void 0,rr.transformAsync=async function*(t,e){yield*e(t)};var ir={};ir.transform=void 0,ir.transform=function*(t,e){yield*e(t)};var or={};or.uniqAsync=void 0,or.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var sr={uniqByAsync:void 0};const ar=J;sr.uniqByAsync=function(t,e){return(0,ar.isAsyncIterable)(t)?async function*(t,e){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,e):async function*(t,e){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,e)};var cr={};cr.uniqBy=void 0,cr.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 ur={};ur.uniq=void 0,ur.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var fr={zipAsync:void 0};const lr=J;var dr;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(dr||(dr={})),fr.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,s=t.map((t=>(0,lr.isAsyncIterable)(t)?[dr.Async,t[Symbol.asyncIterator]()]:[dr.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===dr.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===dr.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 yr={};yr.zip=void 0,yr.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(b,t),r(q,t),r(_e,t),r(je,t),r(Pe,t),r(ke,t),r(Te,t),r(Fe,t),r(Me,t),r(He,t),r(Ke,t),r($e,t),r(Ve,t),r(Xe,t),r(tn,t),r(nn,t),r(fn,t),r(en,t),r(yn,t),r(vn,t),r(mn,t),r(On,t),r(wn,t),r(An,t),r(Sn,t),r(xn,t),r(Nn,t),r(Cn,t),r(Fn,t),r(Bn,t),r(Ln,t),r(zn,t),r(Hn,t),r($n,t),r(Gn,t),r(Zn,t),r(Xn,t),r(er,t),r(nr,t),r(rr,t),r(ir,t),r(or,t),r(sr,t),r(cr,t),r(ur,t),r(fr,t),r(yr,t)}(v);var hr={},pr={};pr.consume=void 0,pr.consume=function(t,e){return e(t)};var vr={eachAsync:void 0};const br=J;vr.eachAsync=function(t,e){return(0,br.isAsyncIterable)(t)?async function(t,e){let n=0;for await(const r of t)await e(r,n),n++}(t,e):async function(t,e){let n=0;for(const r of t)await e(r,n),n++}(t,e)};var mr={};mr.each=void 0,mr.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var gr={everyAsync:void 0};const Or=J;gr.everyAsync=function(t,e){return(0,Or.isAsyncIterable)(t)?async function(t,e){let n=0;for await(const r of t){if(!await e(r,n))return!1;n++}return!0}(t,e):async function(t,e){let n=0;for(const r of t){if(!await e(r,n))return!1;n++}return!0}(t,e)};var wr={};wr.every=void 0,wr.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var _r={findAsync:void 0};const jr=J;_r.findAsync=function(t,e){return(0,jr.isAsyncIterable)(t)?async function(t,e){let n=0;for await(const r of t){if(await e(r,n))return r;n++}return}(t,e):async function(t,e){let n=0;for(const r of t){if(await e(r,n))return r;n++}return}(t,e)};var Ar={};Ar.find=void 0,Ar.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var Er={};Er.firstAsync=void 0,Er.firstAsync=async function(t){for await(const e of t)return e};var Pr={};Pr.first=void 0,Pr.first=function(t){for(const e of t)return e};var Sr={};Sr.includesAsync=void 0,Sr.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var Ir={};Ir.includes=void 0,Ir.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var kr={};kr.matchAsync=void 0,kr.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 xr={};xr.match=void 0,xr.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 Tr={reduceAsync:void 0};const Rr=J;Tr.reduceAsync=function(t,e,n){return(0,Rr.isUndefined)(n)?function(t,e){return(0,Rr.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,Rr.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 Nr={reduce:void 0};const Cr=J;Nr.reduce=function(t,e,n){return(0,Cr.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 Dr={someAsync:void 0};const Fr=J;Dr.someAsync=function(t,e){return(0,Fr.isAsyncIterable)(t)?async function(t,e){let n=0;for await(const r of t){if(await e(r,n))return!0;n++}return!1}(t,e):async function(t,e){let n=0;for(const r of t){if(await e(r,n))return!0;n++}return!1}(t,e)};var Br={};Br.some=void 0,Br.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var Lr={};Lr.lastAsync=void 0,Lr.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 Ur={};Ur.last=void 0,Ur.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 Mr={toArrayAsync:void 0};const zr=pr;Mr.toArrayAsync=function(t){return(0,zr.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var qr={toArray:void 0};const Jr=pr;qr.toArray=function(t){return(0,Jr.consume)(t,(t=>Array.from(t)))};var Hr={toSetAsync:void 0};const Wr=pr;Hr.toSetAsync=function(t){return(0,Wr.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Kr={toSet:void 0};const $r=pr;Kr.toSet=function(t){return(0,$r.consume)(t,(t=>new Set(t)))};var Qr={};Qr.count=void 0,Qr.count=function(t){let e=0;for(const n of t)e++;return e};var Gr={};Gr.countAsync=void 0,Gr.countAsync=async function(t){let e=0;for await(const n of t)e++;return e};var Zr={groupBy:void 0};const Vr=mr;Zr.groupBy=function(t,e){const n=new Map;return(0,Vr.each)(t,((t,r)=>{const i=e(t,r);n.has(i)||n.set(i,[]),n.get(i).push(t)})),n};var Yr={groupByAsync:void 0};const Xr=vr;Yr.groupByAsync=async function(t,e){const n=new Map;return await(0,Xr.eachAsync)(t,(async(t,r)=>{const i=await e(t,r);n.has(i)||n.set(i,[]),n.get(i).push(t)})),n},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(pr,t),r(vr,t),r(mr,t),r(gr,t),r(wr,t),r(_r,t),r(Ar,t),r(Er,t),r(Pr,t),r(Sr,t),r(Ir,t),r(kr,t),r(xr,t),r(Tr,t),r(Nr,t),r(Dr,t),r(Br,t),r(Lr,t),r(Ur,t),r(Mr,t),r(qr,t),r(Hr,t),r(Kr,t),r(Qr,t),r(Gr,t),r(Zr,t),r(Yr,t)}(hr),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(v,t),r(hr,t)}(p);var ti={},ei={};ei.traverseErrorPrototypeChain=void 0,ei.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},ti.getErrorNames=void 0;const ni=J,ri=ei;ti.getErrorNames=function*(t){var e;if((0,ni.isError)(t))for(const n of(0,ri.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 ii={isSerializableError:void 0};const oi=J;ii.isSerializableError=function(t){return(0,oi.isObject)(t)&&(0,oi.isString)(t.name)&&(0,oi.isString)(t.message)&&((0,oi.isString)(t.stack)||(0,oi.isNull)(t.stack))&&(0,oi.isArray)(t.ancestors)&&t.ancestors.every(oi.isString)},h.CustomError=void 0;const si=p,ai=ti,ci=J,ui=ii;class fi extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,si.first)((0,ai.getErrorNames)(this)))&&void 0!==t?t:fi.name)&&void 0!==e?e:"CustomError"}static[Symbol.hasInstance](t){var e;if((0,ci.isError)(t)||(0,ui.isSerializableError)(t)){const n=[null!==(e=this.prototype.constructor.name)&&void 0!==e?e:this.name,...(0,ai.getErrorNames)(this.prototype)].reverse(),r=(0,si.toArray)((0,ai.getErrorNames)(t)).reverse();return n.every(((t,e)=>t===r[e]))}return!1}}h.CustomError=fi;var li={AssertionError:void 0};const di=h;class yi extends di.CustomError{}li.AssertionError=yi;var hi={normalize:void 0};const pi=ti,vi=p;hi.normalize=function(t){var e;const[n,...r]=(0,vi.toArray)((0,pi.getErrorNames)(t));return{name:n,ancestors:r,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var bi={},mi={},gi={};gi.pass=void 0,gi.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]}),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(gi,t)}(mi),bi.hydrate=void 0;const Oi=mi;function wi(t,e){const n=function(){(0,Oi.pass)()};return(n.prototype=Object.create(t.prototype)).constructor=n,Object.defineProperty(n,"name",{value:e}),n}bi.hydrate=function(t){var e;const n=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of n)r=wi(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 _i={assert:void 0};const ji=li;_i.assert=function(t,e){if(!t)throw new ji.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(h,t),r(li,t),r(ii,t),r(hi,t),r(bi,t),r(_i,t),r(ti,t),r(ei,t)}(y);var Ai={},Ei={};Ei.log=void 0,Ei.log=function(...t){return console.log(...t),t[t.length-1]};var Pi={},Si={};Si.elapsed=Si.now=void 0,Si.now=function(){return performance.now()},Si.elapsed=function(t,e){return e-t+"ms"};var Ii={},ki={};function xi(t){return Array.isArray(t)}ki.isntEmptyArray=ki.isEmptyArray=ki.isntArray=ki.isArray=void 0,ki.isArray=xi,ki.isntArray=function(t){return!xi(t)},ki.isEmptyArray=function(t){return 0===t.length},ki.isntEmptyArray=function(t){return 0!==t.length};var Ti={},Ri={};function Ni(t){return null===t}Ri.isntNull=Ri.isNull=void 0,Ri.isNull=Ni,Ri.isntNull=function(t){return!Ni(t)};var Ci={};function Di(t){return void 0===t}Ci.isntUndefined=Ci.isUndefined=void 0,Ci.isUndefined=Di,Ci.isntUndefined=function(t){return!Di(t)};var Fi={};function Bi(t){return"function"==typeof t}Fi.isntFunction=Fi.isFunction=void 0,Fi.isFunction=Bi,Fi.isntFunction=function(t){return!Bi(t)},Ti.isntAsyncIterable=Ti.isAsyncIterable=void 0;const Li=Ri,Ui=Ci,Mi=Fi;function zi(t){return(0,Li.isntNull)(t)&&(0,Ui.isntUndefined)(t)&&(0,Mi.isFunction)(t[Symbol.asyncIterator])}Ti.isAsyncIterable=zi,Ti.isntAsyncIterable=function(t){return!zi(t)};var qi={};function Ji(t){return"bigint"==typeof t}qi.isntBigInt=qi.isBigInt=void 0,qi.isBigInt=Ji,qi.isntBigInt=function(t){return!Ji(t)};var Hi={};function Wi(t){return"boolean"==typeof t}Hi.isntBoolean=Hi.isBoolean=void 0,Hi.isBoolean=Wi,Hi.isntBoolean=function(t){return!Wi(t)};var Ki={},$i={};function Qi(t){return"string"==typeof t}$i.isntString=$i.isString=void 0,$i.isString=Qi,$i.isntString=function(t){return!Qi(t)},Ki.isntChar=Ki.isChar=void 0;const Gi=$i;function Zi(t){return(0,Gi.isString)(t)&&1===t.length}Ki.isChar=Zi,Ki.isntChar=function(t){return!Zi(t)};var Vi={};function Yi(t){return t instanceof Date}Vi.isntDate=Vi.isDate=void 0,Vi.isDate=Yi,Vi.isntDate=function(t){return!Yi(t)};var Xi={};Xi.inEnum=void 0,Xi.inEnum=function(t,e){return Object.values(e).includes(t)};var to={};function eo(t){return t instanceof Error}to.isntError=to.isError=void 0,to.isError=eo,to.isntError=function(t){return!eo(t)};var no={};function ro(t){return!t}no.isntFalsy=no.isFalsy=void 0,no.isFalsy=ro,no.isntFalsy=function(t){return!ro(t)};var io={};io.isntIterable=io.isIterable=void 0;const oo=Ri,so=Ci,ao=Fi;function co(t){return(0,oo.isntNull)(t)&&(0,so.isntUndefined)(t)&&(0,ao.isFunction)(t[Symbol.iterator])}io.isIterable=co,io.isntIterable=function(t){return!co(t)};var uo={},fo={};function lo(t){return"number"==typeof t}function yo(t){return Number.isNaN(t)}fo.isntNaN=fo.isNaN=fo.isNegativeInfinity=fo.isPositiveInfinity=fo.isFinite=fo.isntNumber=fo.isNumber=void 0,fo.isNumber=lo,fo.isntNumber=function(t){return!lo(t)},fo.isFinite=function(t){return Number.isFinite(t)},fo.isPositiveInfinity=function(t){return t===1/0},fo.isNegativeInfinity=function(t){return t===-1/0},fo.isNaN=yo,fo.isntNaN=function(t){return!yo(t)};var ho={},po=e&&e.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};ho.isntEmptyObject=ho.isEmptyObject=ho.isntPlainObject=ho.isPlainObject=ho.isntObject=ho.isObject=void 0;const vo=po(Xt);function bo(t){return null!==t&&"object"==typeof t}function mo(t){return(0,vo.default)(t)}ho.isObject=bo,ho.isntObject=function(t){return!bo(t)},ho.isPlainObject=mo,ho.isntPlainObject=function(t){return!mo(t)},ho.isEmptyObject=function(t){return 0===Object.keys(t).length},ho.isntEmptyObject=function(t){return 0!==Object.keys(t).length},uo.isntJsonable=uo.isJsonable=uo.isntJson=uo.isJson=void 0;const go=Ri,Oo=Hi,wo=$i,_o=fo,jo=ki,Ao=ho;function Eo(t){return(0,go.isNull)(t)||(0,Oo.isBoolean)(t)||(0,wo.isString)(t)||(0,_o.isNumber)(t)||(0,jo.isArray)(t)&&t.every(Eo)||(0,Ao.isPlainObject)(t)&&Object.values(t).every(Eo)}uo.isJson=Eo,uo.isntJson=function(t){return!Eo(t)},uo.isJsonable=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},uo.isntJsonable=function t(e){return!t()};var Po={};Po.isPromiseLike=Po.isntPromiseLike=Po.isntPromise=Po.isPromise=void 0;const So=ho,Io=Fi;function ko(t){return t instanceof Promise}function xo(t){return(0,So.isObject)(t)&&(0,Io.isFunction)(t.then)}Po.isPromise=ko,Po.isntPromise=function(t){return!ko(t)},Po.isntPromiseLike=function(t){return!xo(t)},Po.isPromiseLike=xo;var To={};To.isAbsoluteURL=void 0,To.isAbsoluteURL=function(t){try{return new URL(t),!0}catch(t){return!1}};var Ro={};function No(t){return t instanceof RegExp}Ro.isntRegExp=Ro.isRegExp=void 0,Ro.isRegExp=No,Ro.isntRegExp=function(t){return!No(t)};var Co={};function Do(t){return"symbol"==typeof t}Co.isntSymbol=Co.isSymbol=void 0,Co.isSymbol=Do,Co.isntSymbol=function(t){return!Do(t)},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(ki,t),r(Ti,t),r(qi,t),r(Hi,t),r(Ki,t),r(Vi,t),r(Xi,t),r(to,t),r(no,t),r(Fi,t),r(io,t),r(uo,t),r(Ri,t),r(fo,t),r(ho,t),r(Po,t),r($i,t),r(Ci,t),r(To,t),r(Ro,t),r(Co,t)}(Ii),Pi.time=void 0;const Fo=Si,Bo=Ii;Pi.time=function(t,e){const n=(0,Fo.now)(),r=e();if((0,Bo.isPromiseLike)(r))return r.then((()=>{const e=(0,Fo.now)();return console.log(t,(0,Fo.elapsed)(n,e)),r}));{const e=(0,Fo.now)();return console.log(t,(0,Fo.elapsed)(n,e)),r}};var Lo={timeFunction:void 0};const Uo=Si;Lo.timeFunction=function(t,e){return function(...n){const r=(0,Uo.now)(),i=e(...n),o=(0,Uo.now)();return console.log(t,(0,Uo.elapsed)(r,o)),i}};var Mo={timeAsyncFunction:void 0};const zo=Si;Mo.timeAsyncFunction=function(t,e){return async function(...n){const r=(0,zo.now)(),i=await e(...n),o=(0,zo.now)();return console.log(t,(0,zo.elapsed)(r,o)),i}};var qo={},Jo={},Ho={};Ho.go=void 0,Ho.go=function(t){return t()};var Wo={};Wo.goMicrotask=void 0,Wo.goMicrotask=function(t){return new Promise(((e,n)=>{queueMicrotask((async()=>{try{e(await t())}catch(t){n(t)}}))}))};var Ko={goMacrotask:void 0};const $o=_;Ko.goMacrotask=function(t){return new Promise(((e,n)=>{(0,$o.setImmediate)((async()=>{try{e(await t())}catch(t){n(t)}}))}))},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(Ho,t),r(Wo,t),r(Ko,t)}(Jo),qo.group=void 0;const Qo=Jo,Go=Ii;qo.group=function(...t){const[e,n]=(0,Qo.go)((()=>{if(1===t.length){const[e]=t;return[void 0,e]}{const[e,n]=t;return[e,n]}}));(0,Go.isUndefined)(e)?console.group():console.group(e);const r=n();return console.groupEnd(),r},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(Ei,t),r(Pi,t),r(Lo,t),r(Mo,t),r(qo,t)}(Ai);var Zo={},Vo={};Vo.lazy=void 0,Vo.lazy=function(t){let e,n=!1;return function(){return n||(e=t(),n=!0),e}};var Yo={lazyFunction:void 0};const Xo=Vo;Yo.lazyFunction=function(t){const e=(0,Xo.lazy)(t);return(...t)=>e()(...t)};var ts={lazyAsyncFunction:void 0};const es=Vo;ts.lazyAsyncFunction=function(t){const e=(0,es.lazy)(t);return async(...t)=>(await e())(...t)};var ns={};ns.lazyStatic=ns.withLazyStatic=void 0;const rs=[];ns.withLazyStatic=function(t){const e=[];return(...n)=>{rs.push({cache:e,index:0});try{return t(...n)}finally{rs.pop()}}},ns.lazyStatic=function(t,e=[]){if(rs.length){const n=rs[rs.length-1],r=n.index++;if(r===n.cache.length)i();else{const o=n.cache[r].deps;e.length===o.length?e.some(((t,e)=>t!==o[e]))&&i():i()}return n.cache[r].value;function i(){n.cache[r]=null,n.cache[r]={value:t(),deps:Array.from(e)}}}throw new Error("lazyStatic can only be called in the function wrapped by withlazyStatic.")},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(Vo,t),r(Yo,t),r(ts,t),r(ns,t)}(Zo);var is={},os={};os.pass=void 0,os.pass=function(){};var ss={};function as(t,...e){const r=e.reduce(((t,e)=>d.isFunction(e)?e(t):t),{url:new URL("http://localhost"),headers:new n.Headers}),i=new n.Headers(r.headers);return new n.Request(r.url.href,{method:t,headers:i,signal:r.signal,body:r.payload,keepalive:r.keepalive})}ss.passAsync=void 0,ss.passAsync=async 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]}),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(os,t),r(ss,t)}(is),function(t){t.isntNumber=t.isntNull=t.isntJson=t.isntIterable=t.isntFunction=t.isntFalsy=t.isntError=t.isntEmptyObject=t.isntEmptyArray=t.isntDate=t.isntChar=t.isntBoolean=t.isntBigInt=t.isntAsyncIterable=t.isntArray=t.isSymbol=t.isRegExp=t.isUndefined=t.isString=t.isPromiseLike=t.isPromise=t.isPlainObject=t.isObject=t.isntNaN=t.isNaN=t.isNegativeInfinity=t.isPositiveInfinity=t.isFinite=t.isNumber=t.isNull=t.isJson=t.isIterable=t.isFunction=t.isFalsy=t.isError=t.isEmptyObject=t.isEmptyArray=t.isDate=t.isChar=t.isBoolean=t.isBigInt=t.isAsyncIterable=t.isArray=t.toArrayAsync=t.toArray=t.pass=t.lazy=t.log=t.go=t.assert=void 0,t.isntSymbol=t.isntRegExp=t.isntUndefined=t.isntString=t.isntPromiseLike=t.isntPromise=t.isntPlainObject=t.isntObject=void 0;var e=y;Object.defineProperty(t,"assert",{enumerable:!0,get:function(){return e.assert}});var n=m;Object.defineProperty(t,"go",{enumerable:!0,get:function(){return n.go}});var r=Ai;Object.defineProperty(t,"log",{enumerable:!0,get:function(){return r.log}});var i=Zo;Object.defineProperty(t,"lazy",{enumerable:!0,get:function(){return i.lazy}});var o=is;Object.defineProperty(t,"pass",{enumerable:!0,get:function(){return o.pass}});var s=p;Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return s.toArray}}),Object.defineProperty(t,"toArrayAsync",{enumerable:!0,get:function(){return s.toArrayAsync}});var a=J;Object.defineProperty(t,"isArray",{enumerable:!0,get:function(){return a.isArray}}),Object.defineProperty(t,"isAsyncIterable",{enumerable:!0,get:function(){return a.isAsyncIterable}}),Object.defineProperty(t,"isBigInt",{enumerable:!0,get:function(){return a.isBigInt}}),Object.defineProperty(t,"isBoolean",{enumerable:!0,get:function(){return a.isBoolean}}),Object.defineProperty(t,"isChar",{enumerable:!0,get:function(){return a.isChar}}),Object.defineProperty(t,"isDate",{enumerable:!0,get:function(){return a.isDate}}),Object.defineProperty(t,"isEmptyArray",{enumerable:!0,get:function(){return a.isEmptyArray}}),Object.defineProperty(t,"isEmptyObject",{enumerable:!0,get:function(){return a.isEmptyObject}}),Object.defineProperty(t,"isError",{enumerable:!0,get:function(){return a.isError}}),Object.defineProperty(t,"isFalsy",{enumerable:!0,get:function(){return a.isFalsy}}),Object.defineProperty(t,"isFunction",{enumerable:!0,get:function(){return a.isFunction}}),Object.defineProperty(t,"isIterable",{enumerable:!0,get:function(){return a.isIterable}}),Object.defineProperty(t,"isJson",{enumerable:!0,get:function(){return a.isJson}}),Object.defineProperty(t,"isNull",{enumerable:!0,get:function(){return a.isNull}}),Object.defineProperty(t,"isNumber",{enumerable:!0,get:function(){return a.isNumber}}),Object.defineProperty(t,"isFinite",{enumerable:!0,get:function(){return a.isFinite}}),Object.defineProperty(t,"isPositiveInfinity",{enumerable:!0,get:function(){return a.isPositiveInfinity}}),Object.defineProperty(t,"isNegativeInfinity",{enumerable:!0,get:function(){return a.isNegativeInfinity}}),Object.defineProperty(t,"isNaN",{enumerable:!0,get:function(){return a.isNaN}}),Object.defineProperty(t,"isntNaN",{enumerable:!0,get:function(){return a.isntNaN}}),Object.defineProperty(t,"isObject",{enumerable:!0,get:function(){return a.isObject}}),Object.defineProperty(t,"isPlainObject",{enumerable:!0,get:function(){return a.isPlainObject}}),Object.defineProperty(t,"isPromise",{enumerable:!0,get:function(){return a.isPromise}}),Object.defineProperty(t,"isPromiseLike",{enumerable:!0,get:function(){return a.isPromiseLike}}),Object.defineProperty(t,"isString",{enumerable:!0,get:function(){return a.isString}}),Object.defineProperty(t,"isUndefined",{enumerable:!0,get:function(){return a.isUndefined}}),Object.defineProperty(t,"isRegExp",{enumerable:!0,get:function(){return a.isRegExp}}),Object.defineProperty(t,"isSymbol",{enumerable:!0,get:function(){return a.isSymbol}}),Object.defineProperty(t,"isntArray",{enumerable:!0,get:function(){return a.isntArray}}),Object.defineProperty(t,"isntAsyncIterable",{enumerable:!0,get:function(){return a.isntAsyncIterable}}),Object.defineProperty(t,"isntBigInt",{enumerable:!0,get:function(){return a.isntBigInt}}),Object.defineProperty(t,"isntBoolean",{enumerable:!0,get:function(){return a.isntBoolean}}),Object.defineProperty(t,"isntChar",{enumerable:!0,get:function(){return a.isntChar}}),Object.defineProperty(t,"isntDate",{enumerable:!0,get:function(){return a.isntDate}}),Object.defineProperty(t,"isntEmptyArray",{enumerable:!0,get:function(){return a.isntEmptyArray}}),Object.defineProperty(t,"isntEmptyObject",{enumerable:!0,get:function(){return a.isntEmptyObject}}),Object.defineProperty(t,"isntError",{enumerable:!0,get:function(){return a.isntError}}),Object.defineProperty(t,"isntFalsy",{enumerable:!0,get:function(){return a.isntFalsy}}),Object.defineProperty(t,"isntFunction",{enumerable:!0,get:function(){return a.isntFunction}}),Object.defineProperty(t,"isntIterable",{enumerable:!0,get:function(){return a.isntIterable}}),Object.defineProperty(t,"isntJson",{enumerable:!0,get:function(){return a.isntJson}}),Object.defineProperty(t,"isntNull",{enumerable:!0,get:function(){return a.isntNull}}),Object.defineProperty(t,"isntNumber",{enumerable:!0,get:function(){return a.isntNumber}}),Object.defineProperty(t,"isntObject",{enumerable:!0,get:function(){return a.isntObject}}),Object.defineProperty(t,"isntPlainObject",{enumerable:!0,get:function(){return a.isntPlainObject}}),Object.defineProperty(t,"isntPromise",{enumerable:!0,get:function(){return a.isntPromise}}),Object.defineProperty(t,"isntPromiseLike",{enumerable:!0,get:function(){return a.isntPromiseLike}}),Object.defineProperty(t,"isntString",{enumerable:!0,get:function(){return a.isntString}}),Object.defineProperty(t,"isntUndefined",{enumerable:!0,get:function(){return a.isntUndefined}}),Object.defineProperty(t,"isntRegExp",{enumerable:!0,get:function(){return a.isntRegExp}}),Object.defineProperty(t,"isntSymbol",{enumerable:!0,get:function(){return a.isntSymbol}})}(d);var cs={exports:{}};
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ExtraRequest={})}(this,(function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n={},r={fetch:void 0};r.fetch=globalThis.fetch.bind(globalThis);var i={Headers:void 0};i.Headers=globalThis.Headers;var o={Request:void 0};o.Request=globalThis.Request;var s={Response:void 0};s.Response=globalThis.Response;var a={FormData:void 0};a.FormData=globalThis.FormData;var c={AbortController:void 0};c.AbortController=globalThis.AbortController;var u={AbortError:void 0};u.AbortError=globalThis.DOMException;var f={Blob:void 0};f.Blob=globalThis.Blob;var l={EventSource:void 0};l.EventSource=globalThis.EventSource,function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),d=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};d(r,e),d(i,e),d(o,e),d(s,e),d(a,e),d(c,e),d(u,e),d(f,e),d(l,e)}(n);var d={},y={},h={},p={},m={},v={},b={},g={};g.go=void 0,g.go=function(e){return e()};var O={};O.goMicrotask=void 0,O.goMicrotask=function(e){return new Promise(((t,n)=>{queueMicrotask((async()=>{try{t(await e())}catch(e){n(e)}}))}))};var w={},_={},A={},j={},E={};E.random=void 0,E.random=function(e,t){return Math.random()*(t-e)+e};var S={};S.randomInt=void 0,S.randomInt=function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e))+e};var P={};P.randomIntInclusive=void 0,P.randomIntInclusive=function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(E,e),r(S,e),r(P,e)}(j),A.calculateExponentialBackoffTimeout=void 0;const k=j;A.calculateExponentialBackoffTimeout=function({baseTimeout:e,retries:t,maxTimeout:n=1/0,factor:r=2,jitter:i=!0}){const o=Math.min(r**t*e,n);return i?(0,k.randomIntInclusive)(0,o):o};var I={};I.setTimeout=void 0,I.setTimeout=function(e,t){const n=globalThis.setTimeout(t,e);return()=>clearTimeout(n)};var T={setSchedule:void 0};const x=I;T.setSchedule=function(e,t){const n=e-Date.now();return(0,x.setTimeout)(n,t)};var R={};R.setInterval=void 0,R.setInterval=function(e,t){const n=globalThis.setInterval(t,e);return()=>clearInterval(n)};var N={setImmediate:void 0};const C=I;N.setImmediate=function(e){if(globalThis.setImmediate){const t=globalThis.setImmediate(e);return()=>clearImmediate(t)}return(0,C.setTimeout)(0,e)};var D={setTimeoutLoop:void 0};const B=I;D.setTimeoutLoop=function(e,t){let n=!1,r=(0,B.setTimeout)(e,(async function i(){await t(),n||(r=(0,B.setTimeout)(e,i))}));return()=>{n=!0,r()}};var F={setDynamicTimeoutLoop:void 0};const L=I;F.setDynamicTimeoutLoop=function(e,t){let n=!1,r=(0,L.setTimeout)(e,(async function i(){const o=Date.now();await t();const s=Date.now()-o;n||(r=(0,L.setTimeout)(Math.max(e-s,0),i))}));return()=>{n=!0,r()}},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(A,e),r(I,e),r(T,e),r(R,e),r(N,e),r(D,e),r(F,e)}(_),w.goMacrotask=void 0;const U=_;w.goMacrotask=function(e){return new Promise(((t,n)=>{(0,U.setImmediate)((async()=>{try{t(await e())}catch(e){n(e)}}))}))},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(g,e),r(O,e),r(w,e)}(b),v.chunkAsync=void 0;const z=b,M=y;v.chunkAsync=function(e,t){return(0,M.assert)(Number.isInteger(t),"The parameter size must be an integer"),(0,M.assert)(t>0,"The parameter size must be greater than 0"),(0,z.go)((async function*(){let n=[];for await(const r of e)n.push(r),n.length>=t&&(yield n,n=[]);n.length&&(yield n)}))};var q={},H={},J={};function W(e){return Array.isArray(e)}J.isntEmptyArray=J.isEmptyArray=J.isntArray=J.isArray=void 0,J.isArray=W,J.isntArray=function(e){return!W(e)},J.isEmptyArray=function(e){return 0===e.length},J.isntEmptyArray=function(e){return 0!==e.length};var K={},$={};function Q(e){return null===e}$.isntNull=$.isNull=void 0,$.isNull=Q,$.isntNull=function(e){return!Q(e)};var G={};function Z(e){return void 0===e}G.isntUndefined=G.isUndefined=void 0,G.isUndefined=Z,G.isntUndefined=function(e){return!Z(e)};var V={};function Y(e){return"function"==typeof e}V.isntFunction=V.isFunction=void 0,V.isFunction=Y,V.isntFunction=function(e){return!Y(e)},K.isntAsyncIterable=K.isAsyncIterable=void 0;const X=$,ee=G,te=V;function ne(e){return(0,X.isntNull)(e)&&(0,ee.isntUndefined)(e)&&(0,te.isFunction)(e[Symbol.asyncIterator])}K.isAsyncIterable=ne,K.isntAsyncIterable=function(e){return!ne(e)};var re={};function ie(e){return"bigint"==typeof e}re.isntBigInt=re.isBigInt=void 0,re.isBigInt=ie,re.isntBigInt=function(e){return!ie(e)};var oe={};function se(e){return"boolean"==typeof e}oe.isntBoolean=oe.isBoolean=void 0,oe.isBoolean=se,oe.isntBoolean=function(e){return!se(e)};var ae={},ce={};function ue(e){return"string"==typeof e}ce.isntString=ce.isString=void 0,ce.isString=ue,ce.isntString=function(e){return!ue(e)},ae.isntChar=ae.isChar=void 0;const fe=ce;function le(e){return(0,fe.isString)(e)&&1===e.length}ae.isChar=le,ae.isntChar=function(e){return!le(e)};var de={};function ye(e){return e instanceof Date}de.isntDate=de.isDate=void 0,de.isDate=ye,de.isntDate=function(e){return!ye(e)};var he={};he.inEnum=void 0,he.inEnum=function(e,t){return Object.values(t).includes(e)};var pe={};function me(e){return e instanceof Error}pe.isntError=pe.isError=void 0,pe.isError=me,pe.isntError=function(e){return!me(e)};var ve={};function be(e){return!e}ve.isntFalsy=ve.isFalsy=void 0,ve.isFalsy=be,ve.isntFalsy=function(e){return!be(e)};var ge={};ge.isntIterable=ge.isIterable=void 0;const Oe=$,we=G,_e=V;function Ae(e){return(0,Oe.isntNull)(e)&&(0,we.isntUndefined)(e)&&(0,_e.isFunction)(e[Symbol.iterator])}ge.isIterable=Ae,ge.isntIterable=function(e){return!Ae(e)};var je={},Ee={};function Se(e){return"number"==typeof e}function Pe(e){return Number.isNaN(e)}Ee.isntNaN=Ee.isNaN=Ee.isNegativeInfinity=Ee.isPositiveInfinity=Ee.isFinite=Ee.isntNumber=Ee.isNumber=void 0,Ee.isNumber=Se,Ee.isntNumber=function(e){return!Se(e)},Ee.isFinite=function(e){return Number.isFinite(e)},Ee.isPositiveInfinity=function(e){return e===1/0},Ee.isNegativeInfinity=function(e){return e===-1/0},Ee.isNaN=Pe,Ee.isntNaN=function(e){return!Pe(e)};var ke={},Ie="object"==typeof t&&t&&t.Object===Object&&t,Te="object"==typeof self&&self&&self.Object===Object&&self,xe=(Ie||Te||Function("return this")()).Symbol,Re=xe,Ne=Object.prototype,Ce=Ne.hasOwnProperty,De=Ne.toString,Be=Re?Re.toStringTag:void 0;var Fe=function(e){var t=Ce.call(e,Be),n=e[Be];try{e[Be]=void 0;var r=!0}catch(e){}var i=De.call(e);return r&&(t?e[Be]=n:delete e[Be]),i},Le=Object.prototype.toString;var Ue=Fe,ze=function(e){return Le.call(e)},Me=xe?xe.toStringTag:void 0;var qe=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Me&&Me in Object(e)?Ue(e):ze(e)};var He=function(e,t){return function(n){return e(t(n))}},Je=He(Object.getPrototypeOf,Object);var We=qe,Ke=Je,$e=function(e){return null!=e&&"object"==typeof e},Qe=Function.prototype,Ge=Object.prototype,Ze=Qe.toString,Ve=Ge.hasOwnProperty,Ye=Ze.call(Object);var Xe=function(e){if(!$e(e)||"[object Object]"!=We(e))return!1;var t=Ke(e);if(null===t)return!0;var n=Ve.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ze.call(n)==Ye},et=t&&t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};ke.isntEmptyObject=ke.isEmptyObject=ke.isntPlainObject=ke.isPlainObject=ke.isntObject=ke.isObject=void 0;const tt=et(Xe);function nt(e){return null!==e&&"object"==typeof e}function rt(e){return(0,tt.default)(e)}ke.isObject=nt,ke.isntObject=function(e){return!nt(e)},ke.isPlainObject=rt,ke.isntPlainObject=function(e){return!rt(e)},ke.isEmptyObject=function(e){return 0===Object.keys(e).length},ke.isntEmptyObject=function(e){return 0!==Object.keys(e).length},je.isntJsonable=je.isJsonable=je.isntJson=je.isJson=void 0;const it=$,ot=oe,st=ce,at=Ee,ct=J,ut=ke;function ft(e){return(0,it.isNull)(e)||(0,ot.isBoolean)(e)||(0,st.isString)(e)||(0,at.isNumber)(e)||(0,ct.isArray)(e)&&e.every(ft)||(0,ut.isPlainObject)(e)&&Object.values(e).every(ft)}je.isJson=ft,je.isntJson=function(e){return!ft(e)},je.isJsonable=function(e){try{return JSON.stringify(e),!0}catch(e){return!1}},je.isntJsonable=function e(t){return!e()};var lt={};lt.isntNullish=lt.isNullish=void 0;const dt=$,yt=G;function ht(e){return(0,dt.isNull)(e)||(0,yt.isUndefined)(e)}lt.isNullish=ht,lt.isntNullish=function(e){return!ht(e)};var pt={};pt.isPromiseLike=pt.isntPromiseLike=pt.isntPromise=pt.isPromise=void 0;const mt=ke,vt=V;function bt(e){return e instanceof Promise}function gt(e){return(0,mt.isObject)(e)&&(0,vt.isFunction)(e.then)}pt.isPromise=bt,pt.isntPromise=function(e){return!bt(e)},pt.isntPromiseLike=function(e){return!gt(e)},pt.isPromiseLike=gt;var Ot={};Ot.isAbsoluteURL=void 0,Ot.isAbsoluteURL=function(e){try{return new URL(e),!0}catch(e){return!1}};var wt={};function _t(e){return e instanceof RegExp}wt.isntRegExp=wt.isRegExp=void 0,wt.isRegExp=_t,wt.isntRegExp=function(e){return!_t(e)};var At={};function jt(e){return"symbol"==typeof e}At.isntSymbol=At.isSymbol=void 0,At.isSymbol=jt,At.isntSymbol=function(e){return!jt(e)},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(J,e),r(K,e),r(re,e),r(oe,e),r(ae,e),r(de,e),r(he,e),r(pe,e),r(ve,e),r(V,e),r(ge,e),r(je,e),r($,e),r(lt,e),r(Ee,e),r(ke,e),r(pt,e),r(ce,e),r(G,e),r(Ot,e),r(wt,e),r(At,e)}(H),q.chunkByAsync=void 0;const Et=H;q.chunkByAsync=function(e,t){return(0,Et.isAsyncIterable)(e)?async function*(e,t){let n=[],r=0;for await(const i of e)n.push(i),await t(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(e,t):async function*(e,t){let n=[],r=0;for(const i of e)n.push(i),await t(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(e,t)};var St={};St.chunkBy=void 0,St.chunkBy=function*(e,t){let n=[],r=0;for(const i of e)n.push(i),t(i,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var Pt={chunk:void 0};const kt=b,It=y;Pt.chunk=function(e,t){return(0,It.assert)(Number.isInteger(t),"The parameter size must be an integer"),(0,It.assert)(t>0,"The parameter size must be greater than 0"),(0,kt.go)((function*(){let n=[];for(const r of e)n.push(r),n.length>=t&&(yield n,n=[]);n.length&&(yield n)}))};var Tt={concatAsync:void 0};const xt=H,Rt=b;Tt.concatAsync=function(e,...t){return(0,Rt.go)((async function*(){for(const n of[e,...t])if((0,xt.isAsyncIterable)(n))for await(const e of n)yield e;else for(const e of n)yield e}))};var Nt={concat:void 0};const Ct=b;Nt.concat=function(e,...t){return(0,Ct.go)((function*(){for(const n of[e,...t])yield*n}))};var Dt={},Bt={filterAsync:void 0};const Ft=H;Bt.filterAsync=function(e,t){return(0,Ft.isAsyncIterable)(e)?async function*(e,t){let n=0;for await(const r of e)await t(r,n)&&(yield r),n++}(e,t):async function*(e,t){let n=0;for(const r of e)await t(r,n)&&(yield r),n++}(e,t)};var Lt={};Lt.toSetAsync=void 0,Lt.toSetAsync=async function(e){const t=new Set;for await(const n of e)t.add(await n);return t},Dt.differenceAsync=void 0;const Ut=Bt,zt=Lt;Dt.differenceAsync=async function*(e,t){const n=await(0,zt.toSetAsync)(t);yield*(0,Ut.filterAsync)(e,(async e=>!n.has(await e)))};var Mt={},qt={};qt.filter=void 0,qt.filter=function*(e,t){let n=0;for(const r of e)t(r,n)&&(yield r),n++};var Ht={};Ht.toSet=void 0,Ht.toSet=function(e){return new Set(e)},Mt.difference=void 0;const Jt=qt,Wt=Ht;Mt.difference=function(e,t){const n=(0,Wt.toSet)(t);return(0,Jt.filter)(e,(e=>!n.has(e)))};var Kt={},$t={};$t.copyIterable=$t.copyAsyncIterable=void 0,$t.copyAsyncIterable=async function*(e){for await(const t of e)yield t},$t.copyIterable=function*(e){for(const t of e)yield t},Kt.dropAsync=void 0;const Qt=b,Gt=$t,Zt=y;Kt.dropAsync=function(e,t){return(0,Zt.assert)(Number.isInteger(t),"The parameter count must be an integer"),(0,Zt.assert)(t>=0,"The parameter count must be greater than or equal to 0"),0===t?(0,Gt.copyAsyncIterable)(e):(0,Qt.go)((async function*(){var n;const r=e[Symbol.asyncIterator]();let i;try{let e;for(;!(({value:e,done:i}=await r.next()),i||t<=0);)t--;for(;!i;)yield e,({value:e,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var Vt={},Yt={};Yt.toArrayAsync=void 0,Yt.toArrayAsync=async function(e){const t=[];for await(const n of e)t.push(n);return t},Vt.dropRightAsync=void 0;const Xt=b,en=$t,tn=y,nn=Yt;Vt.dropRightAsync=function(e,t){return(0,tn.assert)(Number.isInteger(t),"The parameter count must be an integer"),(0,tn.assert)(t>=0,"The parameter count must be greater than or equal to 0"),0===t?(0,en.copyAsyncIterable)(e):(0,Xt.go)((async function*(){const n=(await(0,nn.toArrayAsync)(e)).slice(0,-t);for(const e of n)yield e}))};var rn={dropRight:void 0};const on=b,sn=$t,an=y;rn.dropRight=function(e,t){return(0,an.assert)(Number.isInteger(t),"The parameter count must be an integer"),(0,an.assert)(t>=0,"The parameter count must be greater than or equal to 0"),0===t?(0,sn.copyIterable)(e):(0,on.go)((function*(){const n=Array.from(e);yield*n.slice(0,-t)}))};var cn={dropUntilAsync:void 0};const un=H;cn.dropUntilAsync=function(e,t){return(0,un.isAsyncIterable)(e)?async function*(e,t){var n;const r=e[Symbol.asyncIterator]();let i;try{let e,o=0;for(;!(({value:e,done:i}=await r.next()),i||await t(e,o++)););for(;!i;)yield e,({value:e,done:i}=await r.next())}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}(e,t):async function*(e,t){var n;const r=e[Symbol.iterator]();let i;try{let e,o=0;for(;!(({value:e,done:i}=r.next()),i||await t(e,o++)););for(;!i;)yield e,({value:e,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}(e,t)};var fn={};fn.dropUntil=void 0,fn.dropUntil=function*(e,t){var n;const r=e[Symbol.iterator]();let i;try{let e,o=0;for(;!(({value:e,done:i}=r.next()),i||t(e,o++)););for(;!i;)yield e,({value:e,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}};var ln={drop:void 0};const dn=b,yn=$t,hn=y;ln.drop=function(e,t){return(0,hn.assert)(Number.isInteger(t),"The parameter count must be an integer"),(0,hn.assert)(t>=0,"The parameter count must be greater than or equal to 0"),0===t?(0,yn.copyIterable)(e):(0,dn.go)((function*(){var n;const r=e[Symbol.iterator]();let i;try{let e;for(;!(({value:e,done:i}=r.next()),i||t<=0);)t--;for(;!i;)yield e,({value:e,done:i}=r.next())}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var pn={},mn={},vn={flattenByAsync:void 0};const bn=H;async function*gn(e,t,n){for(const r of e)On(r)&&await t(r,n)?yield*gn(r,t,n+1):yield r}function On(e){return(0,bn.isIterable)(e)&&(0,bn.isntChar)(e)}vn.flattenByAsync=function(e,t){return(0,bn.isAsyncIterable)(e)?async function*(e,t){const n=1;for await(const r of e)On(r)&&await t(r,n)?yield*gn(r,t,n+1):yield r}(e,t):function(e,t){return gn(e,t,1)}(e,t)},mn.flattenDeepAsync=void 0;const wn=vn,_n=y;mn.flattenDeepAsync=function(e,t=1/0){return(0,_n.assert)(t===1/0||Number.isInteger(t),"The parameter depth must be an integer"),(0,_n.assert)(t>=0,"The parameter depth must be greater than or equal to 0"),(0,wn.flattenByAsync)(e,((e,n)=>n<=t))},pn.flattenAsync=void 0;const An=mn;pn.flattenAsync=function(e){return(0,An.flattenDeepAsync)(e,1)};var jn={flattenBy:void 0};const En=H;function*Sn(e,t,n){for(const i of e)(0,En.isIterable)(r=i)&&(0,En.isntChar)(r)&&t(i,n)?yield*Sn(i,t,n+1):yield i;var r}jn.flattenBy=function(e,t){return Sn(e,t,1)};var Pn={flattenDeep:void 0};const kn=jn,In=y;Pn.flattenDeep=function(e,t=1/0){return(0,In.assert)(t===1/0||Number.isInteger(t),"The parameter depth must be an integer"),(0,In.assert)(t>=0,"The parameter depth must be greater than or equal to 0"),(0,kn.flattenBy)(e,((e,n)=>n<=t))};var Tn={flatten:void 0};const xn=Pn;Tn.flatten=function(e){return(0,xn.flattenDeep)(e,1)};var Rn={intersectionAsync:void 0};const Nn=Bt,Cn=Lt;Rn.intersectionAsync=async function*(e,t){const n=await(0,Cn.toSetAsync)(t);yield*(0,Nn.filterAsync)(e,(async e=>n.has(await e)))};var Dn={intersection:void 0};const Bn=qt,Fn=Ht;Dn.intersection=function(e,t){const n=(0,Fn.toSet)(t);return(0,Bn.filter)(e,(e=>n.has(e)))};var Ln={mapAsync:void 0};const Un=H;Ln.mapAsync=function(e,t){return(0,Un.isAsyncIterable)(e)?async function*(e,t){let n=0;for await(const r of e)yield await t(r,n),n++}(e,t):async function*(e,t){let n=0;for(const r of e)yield await t(r,n),n++}(e,t)};var zn={};zn.map=void 0,zn.map=function*(e,t){let n=0;for(const r of e)yield t(r,n),n++};var Mn={repeatAsync:void 0};const qn=b,Hn=y;Mn.repeatAsync=function(e,t){return(0,Hn.assert)(t===1/0||Number.isInteger(t),"The parameter times must be an integer"),(0,Hn.assert)(t>=0,"The parameter times must be greater than or equal to 0"),t===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,qn.go)((async function*(){const n=[];if(t>0){for await(const t of e)yield t,n.push(t);t--}for(;t>0;)yield*n,t--}))};var Jn={repeat:void 0};const Wn=b,Kn=y;Jn.repeat=function(e,t){return(0,Kn.assert)(t===1/0||Number.isInteger(t),"The parameter times must be an integer"),(0,Kn.assert)(t>=0,"The parameter times must be greater than or equal to 0"),t===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,Wn.go)((function*(){const n=[];if(t>0){for(const t of e)yield t,n.push(t);t--}for(;t>0;)yield*n,t--}))};var $n={sliceAsync:void 0};const Qn=b,Gn=y;$n.sliceAsync=function(e,t,n=1/0){return(0,Gn.assert)(Number.isInteger(t),"The parameter start must be an integer"),(0,Gn.assert)(t>=0,"The parameter start must be greater than or equal to 0"),(0,Gn.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Gn.assert)(n>=t,"The parameter end must be greater than or equal to start"),(0,Qn.go)((async function*(){let r=0;for await(const i of e){if(r>=n)break;r>=t&&(yield i),r++}}))};var Zn={slice:void 0};const Vn=b,Yn=y;Zn.slice=function(e,t,n=1/0){return(0,Yn.assert)(Number.isInteger(t),"The parameter start must be an integer"),(0,Yn.assert)(t>=0,"The parameter start must be greater than or equal to 0"),(0,Yn.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,Yn.assert)(n>=t,"The parameter end must be greater than or equal to start"),(0,Vn.go)((function*(){let r=0;for(const i of e){if(r>=n)break;r>=t&&(yield i),r++}}))};var Xn={};Xn.splitAsync=void 0,Xn.splitAsync=async function*(e,t){let n=[];for await(const r of e)r===t?(yield n,n=[]):n.push(r);yield n};var er={splitByAsync:void 0};const tr=H;er.splitByAsync=function(e,t){return(0,tr.isAsyncIterable)(e)?async function*(e,t){let n=[],r=0;for await(const i of e)await t(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(e,t):async function*(e,t){let n=[],r=0;for(const i of e)await t(i,r)?(yield n,n=[]):n.push(i),r++;yield n}(e,t)};var nr={};nr.splitBy=void 0,nr.splitBy=function*(e,t){let n=[],r=0;for(const i of e)t(i,r)?(yield n,n=[]):n.push(i),r++;yield n};var rr={};rr.split=void 0,rr.split=function*(e,t){let n=[];for(const r of e)r===t?(yield n,n=[]):n.push(r);yield n};var ir={takeAsync:void 0};const or=b,sr=y;ir.takeAsync=function(e,t){return(0,sr.assert)(Number.isInteger(t),"The parameter count must be an integer"),(0,sr.assert)(t>=0,"The parameter count must be greater than or equal to 0"),(0,or.go)((async function*(){if(0!==t)for await(const n of e)if(yield n,0===--t)break}))};var ar={takeRightAsync:void 0};const cr=b,ur=y;ar.takeRightAsync=function(e,t){return(0,ur.assert)(Number.isInteger(t),"The parameter count must be an integer"),(0,ur.assert)(t>=0,"The parameter count must be greater than or equal to 0"),(0,cr.go)((async function*(){var n;const r=e[Symbol.asyncIterator]();let i;try{const e=[];let o;for(;({value:o,done:i}=await r.next()),!i;)e.push(o),e.length>t&&e.shift();yield*e}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}}))};var fr={takeRight:void 0};const lr=b,dr=y;fr.takeRight=function(e,t){return(0,dr.assert)(Number.isInteger(t),"The parameter count must be an integer"),(0,dr.assert)(t>=0,"The parameter count must be greater than or equal to 0"),(0,lr.go)((function*(){var n;const r=e[Symbol.iterator]();let i;try{const e=[];let o;for(;({value:o,done:i}=r.next()),!i;)e.push(o),e.length>t&&e.shift();yield*e}finally{i||null===(n=r.return)||void 0===n||n.call(r)}}))};var yr={takeUntilAsync:void 0};const hr=H;yr.takeUntilAsync=function(e,t){return(0,hr.isAsyncIterable)(e)?async function*(e,t){let n=0;for await(const r of e){if(await t(r,n))break;yield r,n++}}(e,t):async function*(e,t){let n=0;for(const r of e){if(await t(r,n))break;yield r,n++}}(e,t)};var pr={};pr.takeUntil=void 0,pr.takeUntil=function*(e,t){let n=0;for(const r of e){if(t(r,n))break;yield r,n++}};var mr={take:void 0};const vr=b,br=y;mr.take=function(e,t){return(0,br.assert)(Number.isInteger(t),"The parameter count must be an integer"),(0,br.assert)(t>=0,"The parameter count must be greater than or equal to 0"),(0,vr.go)((function*(){if(0!==t)for(const n of e)if(yield n,0===--t)break}))};var gr={tapAsync:void 0};const Or=H;gr.tapAsync=function(e,t){return(0,Or.isAsyncIterable)(e)?async function*(e,t){let n=0;for await(const r of e)await t(r,n),yield r,n++}(e,t):async function*(e,t){let n=0;for(const r of e)await t(r,n),yield r,n++}(e,t)};var wr={};wr.tap=void 0,wr.tap=function*(e,t){let n=0;for(const r of e)t(r,n),yield r,n++};var _r={};_r.toAsyncIterable=void 0,_r.toAsyncIterable=async function*(e){for(const t of e)yield await t};var Ar={};Ar.transformAsync=void 0,Ar.transformAsync=async function*(e,t){yield*t(e)};var jr={};jr.transform=void 0,jr.transform=function*(e,t){yield*t(e)};var Er={};Er.uniqAsync=void 0,Er.uniqAsync=async function*(e){const t=new Set;for await(const n of e)t.has(n)||(yield n,t.add(n))};var Sr={uniqByAsync:void 0};const Pr=H;Sr.uniqByAsync=function(e,t){return(0,Pr.isAsyncIterable)(e)?async function*(e,t){const n=new Set;let r=0;for await(const i of e){const e=await t(i,r);n.has(e)||(yield i,n.add(e)),r++}}(e,t):async function*(e,t){const n=new Set;let r=0;for(const i of e){const e=await t(i,r);n.has(e)||(yield i,n.add(e)),r++}}(e,t)};var kr={};kr.uniqBy=void 0,kr.uniqBy=function*(e,t){const n=new Set;let r=0;for(const i of e){const e=t(i,r);n.has(e)||(yield i,n.add(e)),r++}};var Ir={};Ir.uniq=void 0,Ir.uniq=function*(e){const t=new Set;for(const n of e)t.has(n)||(yield n,t.add(n))};var Tr={zipAsync:void 0};const xr=H;var Rr;!function(e){e[e.Sync=0]="Sync",e[e.Async=1]="Async"}(Rr||(Rr={})),Tr.zipAsync=function(e,...t){return async function*(...e){var t,n,r,i;const o=e.length,s=e.map((e=>(0,xr.isAsyncIterable)(e)?[Rr.Async,e[Symbol.asyncIterator]()]:[Rr.Sync,e[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const e=new Array(o);for(let t=0;t<o;t++){const[n,r]=s[t];let i;if(i=n===Rr.Async?await r.next():r.next(),i.done)return void(a[t]=!0);e[t]=await i.value}yield e}}finally{const e=s.filter(((e,t)=>!a[t]));for(const[o,s]of e)o===Rr.Async?await(null===(n=(t=s).return)||void 0===n?void 0:n.call(t)):null===(i=(r=s).return)||void 0===i||i.call(r)}}(e,...t)};var Nr={};Nr.zip=void 0,Nr.zip=function(e,...t){return function*(...e){const t=e.length,n=e.map((e=>e[Symbol.iterator]())),r=n.map((()=>!1));try{for(;;){const e=new Array(t);for(let i=0;i<t;i++){const{value:t,done:o}=n[i].next();if(o)return void(r[i]=!0);e[i]=t}yield e}}finally{n.filter(((e,t)=>!r[t])).forEach((e=>{var t;return null===(t=e.return)||void 0===t?void 0:t.call(e)}))}}(e,...t)},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(v,e),r(q,e),r(St,e),r(Pt,e),r(Tt,e),r(Nt,e),r(Dt,e),r(Mt,e),r(Kt,e),r(Vt,e),r(rn,e),r(cn,e),r(fn,e),r(ln,e),r(Bt,e),r(qt,e),r(pn,e),r(vn,e),r(jn,e),r(mn,e),r(Pn,e),r(Tn,e),r(Rn,e),r(Dn,e),r(Ln,e),r(zn,e),r(Mn,e),r(Jn,e),r($n,e),r(Zn,e),r(Xn,e),r(er,e),r(nr,e),r(rr,e),r(ir,e),r(ar,e),r(fr,e),r(yr,e),r(pr,e),r(mr,e),r(gr,e),r(wr,e),r(_r,e),r(Ar,e),r(jr,e),r(Er,e),r(Sr,e),r(kr,e),r(Ir,e),r(Tr,e),r(Nr,e)}(m);var Cr={},Dr={};Dr.consume=void 0,Dr.consume=function(e,t){return t(e)};var Br={};Br.consumeAsync=void 0,Br.consumeAsync=async function(e,t){return await t(e)};var Fr={eachAsync:void 0};const Lr=H;Fr.eachAsync=function(e,t){return(0,Lr.isAsyncIterable)(e)?async function(e,t){let n=0;for await(const r of e)await t(r,n),n++}(e,t):async function(e,t){let n=0;for(const r of e)await t(r,n),n++}(e,t)};var Ur={};Ur.each=void 0,Ur.each=function(e,t){let n=0;for(const r of e)t(r,n),n++};var zr={everyAsync:void 0};const Mr=H;zr.everyAsync=function(e,t){return(0,Mr.isAsyncIterable)(e)?async function(e,t){let n=0;for await(const r of e){if(!await t(r,n))return!1;n++}return!0}(e,t):async function(e,t){let n=0;for(const r of e){if(!await t(r,n))return!1;n++}return!0}(e,t)};var qr={};qr.every=void 0,qr.every=function(e,t){let n=0;for(const r of e){if(!t(r,n))return!1;n++}return!0};var Hr={findAsync:void 0};const Jr=H;Hr.findAsync=function(e,t){return(0,Jr.isAsyncIterable)(e)?async function(e,t){let n=0;for await(const r of e){if(await t(r,n))return r;n++}return}(e,t):async function(e,t){let n=0;for(const r of e){if(await t(r,n))return r;n++}return}(e,t)};var Wr={};Wr.find=void 0,Wr.find=function(e,t){let n=0;for(const r of e){if(t(r,n))return r;n++}};var Kr={};Kr.firstAsync=void 0,Kr.firstAsync=async function(e){for await(const t of e)return t};var $r={};$r.first=void 0,$r.first=function(e){for(const t of e)return t};var Qr={};Qr.includesAsync=void 0,Qr.includesAsync=async function(e,t){for await(const n of e)if(n===t)return!0;return!1};var Gr={};Gr.includes=void 0,Gr.includes=function(e,t){for(const n of e)if(n===t)return!0;return!1};var Zr={reduceAsync:void 0};const Vr=H;Zr.reduceAsync=function(e,t,n){return(0,Vr.isUndefined)(n)?function(e,t){return(0,Vr.isAsyncIterable)(e)?n(e):r(e);async function n(e){var n;const r=e[Symbol.asyncIterator]();let i;try{let e,s=await o(r),a=1;for(;({value:e,done:i}=await r.next()),!i;)s=await t(s,e,a++);return s}finally{i||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function o(e){const t=await e.next();if(t.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return t.value}}async function r(e){var n;const r=e[Symbol.iterator]();let i;try{let e,s=o(r),a=1;for(;({value:e,done:i}=r.next()),!i;)s=await t(s,e,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(e){const t=e.next();if(t.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return t.value}}}(e,t):function(e,t,n){return(0,Vr.isAsyncIterable)(e)?i(e):r(e);async function r(e){let r=n,i=0;for(const n of e)r=await t(r,n,i++);return r}async function i(e){let r=n,i=0;for await(const n of e)r=await t(r,n,i++);return r}}(e,t,n)};var Yr={reduce:void 0};const Xr=H;Yr.reduce=function(e,t,n){return(0,Xr.isUndefined)(n)?function(e,t){var n;const r=e[Symbol.iterator]();let i;try{let e,s=o(r),a=1;for(;({value:e,done:i}=r.next()),!i;)s=t(s,e,a++);return s}finally{i||null===(n=r.return)||void 0===n||n.call(r)}function o(e){const t=e.next();if(t.done)throw i=!0,new Error("Reduce of empty iterable with no initial value");return t.value}}(e,t):function(e,t,n){let r=n,i=0;for(const n of e)r=t(r,n,i++);return r}(e,t,n)};var ei={someAsync:void 0};const ti=H;ei.someAsync=function(e,t){return(0,ti.isAsyncIterable)(e)?async function(e,t){let n=0;for await(const r of e){if(await t(r,n))return!0;n++}return!1}(e,t):async function(e,t){let n=0;for(const r of e){if(await t(r,n))return!0;n++}return!1}(e,t)};var ni={};ni.some=void 0,ni.some=function(e,t){let n=0;for(const r of e){if(t(r,n))return!0;n++}return!1};var ri={};ri.lastAsync=void 0,ri.lastAsync=async function(e){var t;const n=e[Symbol.asyncIterator]();let r;try{let e,i;for(;({value:e,done:r}=await n.next()),!r;)i=e;return i}finally{r||await(null===(t=n.return)||void 0===t?void 0:t.call(n))}};var ii={};ii.last=void 0,ii.last=function(e){var t;const n=e[Symbol.iterator]();let r;try{let e,i;for(;({value:e,done:r}=n.next()),!r;)i=e;return i}finally{r||null===(t=n.return)||void 0===t||t.call(n)}};var oi={};oi.toArray=void 0,oi.toArray=function(e){return Array.from(e)};var si={};si.count=void 0,si.count=function(e){let t=0;for(const n of e)t++;return t};var ai={};ai.countAsync=void 0,ai.countAsync=async function(e){let t=0;for await(const n of e)t++;return t};var ci={groupBy:void 0};const ui=Ur;ci.groupBy=function(e,t){const n=new Map;return(0,ui.each)(e,((e,r)=>{const i=t(e,r);n.has(i)||n.set(i,[]),n.get(i).push(e)})),n};var fi={groupByAsync:void 0};const li=Fr;fi.groupByAsync=async function(e,t){const n=new Map;return await(0,li.eachAsync)(e,(async(e,r)=>{const i=await t(e,r);n.has(i)||n.set(i,[]),n.get(i).push(e)})),n},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(Dr,e),r(Br,e),r(Fr,e),r(Ur,e),r(zr,e),r(qr,e),r(Hr,e),r(Wr,e),r(Kr,e),r($r,e),r(Qr,e),r(Gr,e),r(Zr,e),r(Yr,e),r(ei,e),r(ni,e),r(ri,e),r(ii,e),r(Yt,e),r(oi,e),r(Lt,e),r(Ht,e),r(si,e),r(ai,e),r(ci,e),r(fi,e)}(Cr),function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(m,e),r(Cr,e)}(p);var di={},yi={};yi.traverseErrorPrototypeChain=void 0,yi.traverseErrorPrototypeChain=function*(e){let t=e;for(;(t=Object.getPrototypeOf(t))&&(yield t,t!==Error.prototype););},di.getErrorNames=void 0;const hi=H,pi=yi;di.getErrorNames=function*(e){var t;if((0,hi.isError)(e))for(const n of(0,pi.traverseErrorPrototypeChain)(e))(null===(t=n.constructor)||void 0===t?void 0:t.name)&&(yield n.constructor.name);else yield e.name,yield*e.ancestors};var mi={isSerializableError:void 0};const vi=H;mi.isSerializableError=function(e){return(0,vi.isObject)(e)&&(0,vi.isString)(e.name)&&(0,vi.isString)(e.message)&&((0,vi.isString)(e.stack)||(0,vi.isNull)(e.stack))&&(0,vi.isArray)(e.ancestors)&&e.ancestors.every(vi.isString)},h.CustomError=void 0;const bi=p,gi=di,Oi=H,wi=mi;class _i extends Error{get name(){var e,t;return null!==(t=null!==(e=(0,bi.first)((0,gi.getErrorNames)(this)))&&void 0!==e?e:_i.name)&&void 0!==t?t:"CustomError"}static[Symbol.hasInstance](e){var t;if((0,Oi.isError)(e)||(0,wi.isSerializableError)(e)){const n=[null!==(t=this.prototype.constructor.name)&&void 0!==t?t:this.name,...(0,gi.getErrorNames)(this.prototype)].reverse(),r=(0,bi.toArray)((0,gi.getErrorNames)(e)).reverse();return n.every(((e,t)=>e===r[t]))}return!1}}h.CustomError=_i;var Ai={AssertionError:void 0};const ji=h;class Ei extends ji.CustomError{}Ai.AssertionError=Ei;var Si={normalize:void 0};const Pi=di,ki=p;Si.normalize=function(e){var t;const[n,...r]=(0,ki.toArray)((0,Pi.getErrorNames)(e));return{name:n,ancestors:r,message:e.message,stack:null!==(t=e.stack)&&void 0!==t?t:null}};var Ii={},Ti={},xi={};xi.pass=void 0,xi.pass=function(){};var Ri={};Ri.passAsync=void 0,Ri.passAsync=async function(){},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(xi,e),r(Ri,e)}(Ti),Ii.hydrate=void 0;const Ni=Ti;function Ci(e,t){const n=function(){(0,Ni.pass)()};return(n.prototype=Object.create(e.prototype)).constructor=n,Object.defineProperty(n,"name",{value:t}),n}Ii.hydrate=function(e){var t;const n=[e.name,...e.ancestors].slice(0,-1).reverse();let r=Error;for(const e of n)r=Ci(r,e);const i=new r;return i.name=e.name,i.message=e.message,i.stack=null!==(t=e.stack)&&void 0!==t?t:void 0,i};var Di={assert:void 0};const Bi=Ai;Di.assert=function(e,t){if(!e)throw new Bi.AssertionError(t)},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(h,e),r(Ai,e),r(mi,e),r(Si,e),r(Ii,e),r(Di,e),r(di,e),r(yi,e)}(y);var Fi={},Li={};Li.log=void 0,Li.log=function(...e){return console.log(...e),e[e.length-1]};var Ui={},zi={},Mi={};Mi.performanceNow=void 0,Mi.performanceNow=function(){return performance.now()},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(Mi,e)}(zi);var qi={};qi.getElapsedTime=void 0,qi.getElapsedTime=function(e,t){return t-e+"ms"},Ui.time=void 0;const Hi=zi,Ji=qi,Wi=H;Ui.time=function(e,t){const n=(0,Hi.performanceNow)(),r=t();if((0,Wi.isPromiseLike)(r))return r.then((()=>{const t=(0,Hi.performanceNow)();return console.log(e,(0,Ji.getElapsedTime)(n,t)),r}));{const t=(0,Hi.performanceNow)();return console.log(e,(0,Ji.getElapsedTime)(n,t)),r}};var Ki={timeFunction:void 0};const $i=zi,Qi=qi;Ki.timeFunction=function(e,t){return function(...n){const r=(0,$i.performanceNow)(),i=t(...n),o=(0,$i.performanceNow)();return console.log(e,(0,Qi.getElapsedTime)(r,o)),i}};var Gi={timeAsyncFunction:void 0};const Zi=zi,Vi=qi;Gi.timeAsyncFunction=function(e,t){return async function(...n){const r=(0,Zi.performanceNow)(),i=await t(...n),o=(0,Zi.performanceNow)();return console.log(e,(0,Vi.getElapsedTime)(r,o)),i}};var Yi={group:void 0};const Xi=b,eo=H;Yi.group=function(...e){const[t,n]=(0,Xi.go)((()=>{if(1===e.length){const[t]=e;return[void 0,t]}{const[t,n]=e;return[t,n]}}));(0,eo.isUndefined)(t)?console.group():console.group(t);const r=n();return console.groupEnd(),r},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(Li,e),r(Ui,e),r(Ki,e),r(Gi,e),r(Yi,e)}(Fi);var to={},no={};no.lazy=void 0,no.lazy=function(e){let t,n=!1;return function(){return n||(t=e(),n=!0),t}};var ro={lazyFunction:void 0};const io=no;ro.lazyFunction=function(e){const t=(0,io.lazy)(e);return(...e)=>t()(...e)};var oo={lazyAsyncFunction:void 0};const so=no;oo.lazyAsyncFunction=function(e){const t=(0,so.lazy)(e);return async(...e)=>(await t())(...e)};var ao={};ao.lazyStatic=ao.withLazyStatic=void 0;const co=[];function uo(e,...t){const r=t.reduce(((e,t)=>d.isFunction(t)?t(e):e),{url:new URL("http://localhost"),headers:new n.Headers}),i=new n.Headers(r.headers);return new n.Request(r.url.href,{method:e,headers:i,signal:r.signal,body:r.payload,keepalive:r.keepalive})}ao.withLazyStatic=function(e){const t=[];return(...n)=>{co.push({cache:t,index:0});try{return e(...n)}finally{co.pop()}}},ao.lazyStatic=function(e,t=[]){if(co.length){const n=co[co.length-1],r=n.index++;if(r===n.cache.length)i();else{const o=n.cache[r].deps;t.length===o.length?t.some(((e,t)=>e!==o[t]))&&i():i()}return n.cache[r].value;function i(){n.cache[r]=null,n.cache[r]={value:e(),deps:Array.from(t)}}}throw new Error("lazyStatic can only be called in the function wrapped by withlazyStatic.")},function(e){var n=t&&t.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=t&&t.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(no,e),r(ro,e),r(oo,e),r(ao,e)}(to),function(e){e.isntNull=e.isntJson=e.isntIterable=e.isntFunction=e.isntFalsy=e.isntError=e.isntEmptyObject=e.isntEmptyArray=e.isntDate=e.isntChar=e.isntBoolean=e.isntBigInt=e.isntAsyncIterable=e.isntArray=e.isSymbol=e.isRegExp=e.isUndefined=e.isString=e.isPromiseLike=e.isPromise=e.isPlainObject=e.isObject=e.isntNaN=e.isNaN=e.isNegativeInfinity=e.isPositiveInfinity=e.isFinite=e.isNumber=e.isNullish=e.isNull=e.isJson=e.isIterable=e.isFunction=e.isFalsy=e.isError=e.isEmptyObject=e.isEmptyArray=e.isDate=e.isChar=e.isBoolean=e.isBigInt=e.isAsyncIterable=e.isArray=e.toArrayAsync=e.toArray=e.pass=e.lazy=e.log=e.go=e.assert=void 0,e.isntSymbol=e.isntRegExp=e.isntUndefined=e.isntString=e.isntPromiseLike=e.isntPromise=e.isntPlainObject=e.isntObject=e.isntNumber=e.isntNullish=void 0;var t=y;Object.defineProperty(e,"assert",{enumerable:!0,get:function(){return t.assert}});var n=b;Object.defineProperty(e,"go",{enumerable:!0,get:function(){return n.go}});var r=Fi;Object.defineProperty(e,"log",{enumerable:!0,get:function(){return r.log}});var i=to;Object.defineProperty(e,"lazy",{enumerable:!0,get:function(){return i.lazy}});var o=Ti;Object.defineProperty(e,"pass",{enumerable:!0,get:function(){return o.pass}});var s=p;Object.defineProperty(e,"toArray",{enumerable:!0,get:function(){return s.toArray}}),Object.defineProperty(e,"toArrayAsync",{enumerable:!0,get:function(){return s.toArrayAsync}});var a=H;Object.defineProperty(e,"isArray",{enumerable:!0,get:function(){return a.isArray}}),Object.defineProperty(e,"isAsyncIterable",{enumerable:!0,get:function(){return a.isAsyncIterable}}),Object.defineProperty(e,"isBigInt",{enumerable:!0,get:function(){return a.isBigInt}}),Object.defineProperty(e,"isBoolean",{enumerable:!0,get:function(){return a.isBoolean}}),Object.defineProperty(e,"isChar",{enumerable:!0,get:function(){return a.isChar}}),Object.defineProperty(e,"isDate",{enumerable:!0,get:function(){return a.isDate}}),Object.defineProperty(e,"isEmptyArray",{enumerable:!0,get:function(){return a.isEmptyArray}}),Object.defineProperty(e,"isEmptyObject",{enumerable:!0,get:function(){return a.isEmptyObject}}),Object.defineProperty(e,"isError",{enumerable:!0,get:function(){return a.isError}}),Object.defineProperty(e,"isFalsy",{enumerable:!0,get:function(){return a.isFalsy}}),Object.defineProperty(e,"isFunction",{enumerable:!0,get:function(){return a.isFunction}}),Object.defineProperty(e,"isIterable",{enumerable:!0,get:function(){return a.isIterable}}),Object.defineProperty(e,"isJson",{enumerable:!0,get:function(){return a.isJson}}),Object.defineProperty(e,"isNull",{enumerable:!0,get:function(){return a.isNull}}),Object.defineProperty(e,"isNullish",{enumerable:!0,get:function(){return a.isNullish}}),Object.defineProperty(e,"isNumber",{enumerable:!0,get:function(){return a.isNumber}}),Object.defineProperty(e,"isFinite",{enumerable:!0,get:function(){return a.isFinite}}),Object.defineProperty(e,"isPositiveInfinity",{enumerable:!0,get:function(){return a.isPositiveInfinity}}),Object.defineProperty(e,"isNegativeInfinity",{enumerable:!0,get:function(){return a.isNegativeInfinity}}),Object.defineProperty(e,"isNaN",{enumerable:!0,get:function(){return a.isNaN}}),Object.defineProperty(e,"isntNaN",{enumerable:!0,get:function(){return a.isntNaN}}),Object.defineProperty(e,"isObject",{enumerable:!0,get:function(){return a.isObject}}),Object.defineProperty(e,"isPlainObject",{enumerable:!0,get:function(){return a.isPlainObject}}),Object.defineProperty(e,"isPromise",{enumerable:!0,get:function(){return a.isPromise}}),Object.defineProperty(e,"isPromiseLike",{enumerable:!0,get:function(){return a.isPromiseLike}}),Object.defineProperty(e,"isString",{enumerable:!0,get:function(){return a.isString}}),Object.defineProperty(e,"isUndefined",{enumerable:!0,get:function(){return a.isUndefined}}),Object.defineProperty(e,"isRegExp",{enumerable:!0,get:function(){return a.isRegExp}}),Object.defineProperty(e,"isSymbol",{enumerable:!0,get:function(){return a.isSymbol}}),Object.defineProperty(e,"isntArray",{enumerable:!0,get:function(){return a.isntArray}}),Object.defineProperty(e,"isntAsyncIterable",{enumerable:!0,get:function(){return a.isntAsyncIterable}}),Object.defineProperty(e,"isntBigInt",{enumerable:!0,get:function(){return a.isntBigInt}}),Object.defineProperty(e,"isntBoolean",{enumerable:!0,get:function(){return a.isntBoolean}}),Object.defineProperty(e,"isntChar",{enumerable:!0,get:function(){return a.isntChar}}),Object.defineProperty(e,"isntDate",{enumerable:!0,get:function(){return a.isntDate}}),Object.defineProperty(e,"isntEmptyArray",{enumerable:!0,get:function(){return a.isntEmptyArray}}),Object.defineProperty(e,"isntEmptyObject",{enumerable:!0,get:function(){return a.isntEmptyObject}}),Object.defineProperty(e,"isntError",{enumerable:!0,get:function(){return a.isntError}}),Object.defineProperty(e,"isntFalsy",{enumerable:!0,get:function(){return a.isntFalsy}}),Object.defineProperty(e,"isntFunction",{enumerable:!0,get:function(){return a.isntFunction}}),Object.defineProperty(e,"isntIterable",{enumerable:!0,get:function(){return a.isntIterable}}),Object.defineProperty(e,"isntJson",{enumerable:!0,get:function(){return a.isntJson}}),Object.defineProperty(e,"isntNull",{enumerable:!0,get:function(){return a.isntNull}}),Object.defineProperty(e,"isntNullish",{enumerable:!0,get:function(){return a.isntNullish}}),Object.defineProperty(e,"isntNumber",{enumerable:!0,get:function(){return a.isntNumber}}),Object.defineProperty(e,"isntObject",{enumerable:!0,get:function(){return a.isntObject}}),Object.defineProperty(e,"isntPlainObject",{enumerable:!0,get:function(){return a.isntPlainObject}}),Object.defineProperty(e,"isntPromise",{enumerable:!0,get:function(){return a.isntPromise}}),Object.defineProperty(e,"isntPromiseLike",{enumerable:!0,get:function(){return a.isntPromiseLike}}),Object.defineProperty(e,"isntString",{enumerable:!0,get:function(){return a.isntString}}),Object.defineProperty(e,"isntUndefined",{enumerable:!0,get:function(){return a.isntUndefined}}),Object.defineProperty(e,"isntRegExp",{enumerable:!0,get:function(){return a.isntRegExp}}),Object.defineProperty(e,"isntSymbol",{enumerable:!0,get:function(){return a.isntSymbol}})}(d);var fo={exports:{}};
|
|
2
2
|
/* @license
|
|
3
3
|
Papa Parse
|
|
4
4
|
v5.3.2
|
|
5
5
|
https://github.com/mholt/PapaParse
|
|
6
6
|
License: MIT
|
|
7
|
-
*/function us(t){const e=Object.keys(t[0]);return cs.exports.unparse({data:t,fields:e})}function fs(t,e){return r=>{const i=new n.Headers(r.headers);return i.set(t,e),Object.assign(Object.assign({},r),{headers:i})}}function ls(t,e){return r=>{const i=new n.Headers(r.headers);return i.append(t,e),Object.assign(Object.assign({},r),{headers:i})}}!function(t,e){t.exports=function t(){var e="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:{},n=!e.document&&!!e.postMessage,r=n&&/blob:/i.test((e.location||{}).protocol),i={},o=0,s={parse:function(n,r){var a=(r=r||{}).dynamicTyping||!1;if(w(a)&&(r.dynamicTypingFunction=a,a={}),r.dynamicTyping=a,r.transform=!!w(r.transform)&&r.transform,r.worker&&s.WORKERS_SUPPORTED){var c=function(){if(!s.WORKERS_SUPPORTED)return!1;var n,r,a=(n=e.URL||e.webkitURL||null,r=t.toString(),s.BLOB_URL||(s.BLOB_URL=n.createObjectURL(new Blob(["(",r,")();"],{type:"text/javascript"})))),c=new e.Worker(a);return c.onmessage=v,c.id=o++,i[c.id]=c}();return c.userStep=r.step,c.userChunk=r.chunk,c.userComplete=r.complete,c.userError=r.error,r.step=w(r.step),r.chunk=w(r.chunk),r.complete=w(r.complete),r.error=w(r.error),delete r.worker,void c.postMessage({input:n,config:r,workerId:c.id})}var y=null;return s.NODE_STREAM_INPUT,"string"==typeof n?y=r.download?new u(r):new l(r):!0===n.readable&&w(n.read)&&w(n.on)?y=new d(r):(e.File&&n instanceof File||n instanceof Object)&&(y=new f(r)),y.stream(n)},unparse:function(t,e){var n=!1,r=!0,i=",",o="\r\n",a='"',c=a+a,u=!1,f=null,l=!1;!function(){if("object"==typeof e){if("string"!=typeof e.delimiter||s.BAD_DELIMITERS.filter((function(t){return-1!==e.delimiter.indexOf(t)})).length||(i=e.delimiter),("boolean"==typeof e.quotes||"function"==typeof e.quotes||Array.isArray(e.quotes))&&(n=e.quotes),"boolean"!=typeof e.skipEmptyLines&&"string"!=typeof e.skipEmptyLines||(u=e.skipEmptyLines),"string"==typeof e.newline&&(o=e.newline),"string"==typeof e.quoteChar&&(a=e.quoteChar),"boolean"==typeof e.header&&(r=e.header),Array.isArray(e.columns)){if(0===e.columns.length)throw new Error("Option columns is empty");f=e.columns}void 0!==e.escapeChar&&(c=e.escapeChar+a),("boolean"==typeof e.escapeFormulae||e.escapeFormulae instanceof RegExp)&&(l=e.escapeFormulae instanceof RegExp?e.escapeFormulae:/^[=+\-@\t\r].*$/)}}();var d=new RegExp(h(a),"g");if("string"==typeof t&&(t=JSON.parse(t)),Array.isArray(t)){if(!t.length||Array.isArray(t[0]))return y(null,t,u);if("object"==typeof t[0])return y(f||Object.keys(t[0]),t,u)}else if("object"==typeof t)return"string"==typeof t.data&&(t.data=JSON.parse(t.data)),Array.isArray(t.data)&&(t.fields||(t.fields=t.meta&&t.meta.fields||f),t.fields||(t.fields=Array.isArray(t.data[0])?t.fields:"object"==typeof t.data[0]?Object.keys(t.data[0]):[]),Array.isArray(t.data[0])||"object"==typeof t.data[0]||(t.data=[t.data])),y(t.fields||[],t.data||[],u);throw new Error("Unable to serialize unrecognized input");function y(t,e,n){var s="";"string"==typeof t&&(t=JSON.parse(t)),"string"==typeof e&&(e=JSON.parse(e));var a=Array.isArray(t)&&0<t.length,c=!Array.isArray(e[0]);if(a&&r){for(var u=0;u<t.length;u++)0<u&&(s+=i),s+=p(t[u],u);0<e.length&&(s+=o)}for(var f=0;f<e.length;f++){var l=a?t.length:e[f].length,d=!1,y=a?0===Object.keys(e[f]).length:0===e[f].length;if(n&&!a&&(d="greedy"===n?""===e[f].join("").trim():1===e[f].length&&0===e[f][0].length),"greedy"===n&&a){for(var h=[],v=0;v<l;v++){var b=c?t[v]:v;h.push(e[f][b])}d=""===h.join("").trim()}if(!d){for(var m=0;m<l;m++){0<m&&!y&&(s+=i);var g=a&&c?t[m]:m;s+=p(e[f][g],m)}f<e.length-1&&(!n||0<l&&!y)&&(s+=o)}}return s}function p(t,e){if(null==t)return"";if(t.constructor===Date)return JSON.stringify(t).slice(1,25);var r=!1;l&&"string"==typeof t&&l.test(t)&&(t="'"+t,r=!0);var o=t.toString().replace(d,c);return(r=r||!0===n||"function"==typeof n&&n(t,e)||Array.isArray(n)&&n[e]||function(t,e){for(var n=0;n<e.length;n++)if(-1<t.indexOf(e[n]))return!0;return!1}(o,s.BAD_DELIMITERS)||-1<o.indexOf(i)||" "===o.charAt(0)||" "===o.charAt(o.length-1))?a+o+a:o}}};if(s.RECORD_SEP=String.fromCharCode(30),s.UNIT_SEP=String.fromCharCode(31),s.BYTE_ORDER_MARK="\ufeff",s.BAD_DELIMITERS=["\r","\n",'"',s.BYTE_ORDER_MARK],s.WORKERS_SUPPORTED=!n&&!!e.Worker,s.NODE_STREAM_INPUT=1,s.LocalChunkSize=10485760,s.RemoteChunkSize=5242880,s.DefaultDelimiter=",",s.Parser=p,s.ParserHandle=y,s.NetworkStreamer=u,s.FileStreamer=f,s.StringStreamer=l,s.ReadableStreamStreamer=d,e.jQuery){var a=e.jQuery;a.fn.parse=function(t){var n=t.config||{},r=[];return this.each((function(t){if("INPUT"!==a(this).prop("tagName").toUpperCase()||"file"!==a(this).attr("type").toLowerCase()||!e.FileReader||!this.files||0===this.files.length)return!0;for(var i=0;i<this.files.length;i++)r.push({file:this.files[i],inputElem:this,instanceConfig:a.extend({},n)})})),i(),this;function i(){if(0!==r.length){var e,n,i,c,u=r[0];if(w(t.before)){var f=t.before(u.file,u.inputElem);if("object"==typeof f){if("abort"===f.action)return e="AbortError",n=u.file,i=u.inputElem,c=f.reason,void(w(t.error)&&t.error({name:e},n,i,c));if("skip"===f.action)return void o();"object"==typeof f.config&&(u.instanceConfig=a.extend(u.instanceConfig,f.config))}else if("skip"===f)return void o()}var l=u.instanceConfig.complete;u.instanceConfig.complete=function(t){w(l)&&l(t,u.file,u.inputElem),o()},s.parse(u.file,u.instanceConfig)}else w(t.complete)&&t.complete()}function o(){r.splice(0,1),i()}}}function c(t){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(t){var e=g(t);e.chunkSize=parseInt(e.chunkSize),t.step||t.chunk||(e.chunkSize=null),this._handle=new y(e),(this._handle.streamer=this)._config=e}.call(this,t),this.parseChunk=function(t,n){if(this.isFirstChunk&&w(this._config.beforeFirstChunk)){var i=this._config.beforeFirstChunk(t);void 0!==i&&(t=i)}this.isFirstChunk=!1,this._halted=!1;var o=this._partialLine+t;this._partialLine="";var a=this._handle.parse(o,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var c=a.meta.cursor;this._finished||(this._partialLine=o.substring(c-this._baseIndex),this._baseIndex=c),a&&a.data&&(this._rowCount+=a.data.length);var u=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(r)e.postMessage({results:a,workerId:s.WORKER_ID,finished:u});else if(w(this._config.chunk)&&!n){if(this._config.chunk(a,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);a=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(a.data),this._completeResults.errors=this._completeResults.errors.concat(a.errors),this._completeResults.meta=a.meta),this._completed||!u||!w(this._config.complete)||a&&a.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),u||a&&a.meta.paused||this._nextChunk(),a}this._halted=!0},this._sendError=function(t){w(this._config.error)?this._config.error(t):r&&this._config.error&&e.postMessage({workerId:s.WORKER_ID,error:t,finished:!1})}}function u(t){var e;(t=t||{}).chunkSize||(t.chunkSize=s.RemoteChunkSize),c.call(this,t),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(t){this._input=t,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(e=new XMLHttpRequest,this._config.withCredentials&&(e.withCredentials=this._config.withCredentials),n||(e.onload=O(this._chunkLoaded,this),e.onerror=O(this._chunkError,this)),e.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var t=this._config.downloadRequestHeaders;for(var r in t)e.setRequestHeader(r,t[r])}if(this._config.chunkSize){var i=this._start+this._config.chunkSize-1;e.setRequestHeader("Range","bytes="+this._start+"-"+i)}try{e.send(this._config.downloadRequestBody)}catch(t){this._chunkError(t.message)}n&&0===e.status&&this._chunkError()}},this._chunkLoaded=function(){4===e.readyState&&(e.status<200||400<=e.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:e.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(t){var e=t.getResponseHeader("Content-Range");return null===e?-1:parseInt(e.substring(e.lastIndexOf("/")+1))}(e),this.parseChunk(e.responseText)))},this._chunkError=function(t){var n=e.statusText||t;this._sendError(new Error(n))}}function f(t){var e,n;(t=t||{}).chunkSize||(t.chunkSize=s.LocalChunkSize),c.call(this,t);var r="undefined"!=typeof FileReader;this.stream=function(t){this._input=t,n=t.slice||t.webkitSlice||t.mozSlice,r?((e=new FileReader).onload=O(this._chunkLoaded,this),e.onerror=O(this._chunkError,this)):e=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var t=this._input;if(this._config.chunkSize){var i=Math.min(this._start+this._config.chunkSize,this._input.size);t=n.call(t,this._start,i)}var o=e.readAsText(t,this._config.encoding);r||this._chunkLoaded({target:{result:o}})},this._chunkLoaded=function(t){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(t.target.result)},this._chunkError=function(){this._sendError(e.error)}}function l(t){var e;c.call(this,t=t||{}),this.stream=function(t){return e=t,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var t,n=this._config.chunkSize;return n?(t=e.substring(0,n),e=e.substring(n)):(t=e,e=""),this._finished=!e,this.parseChunk(t)}}}function d(t){c.call(this,t=t||{});var e=[],n=!0,r=!1;this.pause=function(){c.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){c.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(t){this._input=t,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===e.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),e.length?this.parseChunk(e.shift()):n=!0},this._streamData=O((function(t){try{e.push("string"==typeof t?t:t.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(e.shift()))}catch(t){this._streamError(t)}}),this),this._streamError=O((function(t){this._streamCleanUp(),this._sendError(t)}),this),this._streamEnd=O((function(){this._streamCleanUp(),r=!0,this._streamData("")}),this),this._streamCleanUp=O((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function y(t){var e,n,r,i=Math.pow(2,53),o=-i,a=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,c=/^(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$/,u=this,f=0,l=0,d=!1,y=!1,v=[],b={data:[],errors:[],meta:{}};if(w(t.step)){var m=t.step;t.step=function(e){if(b=e,j())_();else{if(_(),0===b.data.length)return;f+=e.data.length,t.preview&&f>t.preview?n.abort():(b.data=b.data[0],m(b,u))}}}function O(e){return"greedy"===t.skipEmptyLines?""===e.join("").trim():1===e.length&&0===e[0].length}function _(){return b&&r&&(E("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+s.DefaultDelimiter+"'"),r=!1),t.skipEmptyLines&&(b.data=b.data.filter((function(t){return!O(t)}))),j()&&function(){if(b)if(Array.isArray(b.data[0])){for(var e=0;j()&&e<b.data.length;e++)b.data[e].forEach(n);b.data.splice(0,1)}else b.data.forEach(n);function n(e,n){w(t.transformHeader)&&(e=t.transformHeader(e,n)),v.push(e)}}(),function(){if(!b||!t.header&&!t.dynamicTyping&&!t.transform)return b;function e(e,n){var r,i=t.header?{}:[];for(r=0;r<e.length;r++){var o=r,s=e[r];t.header&&(o=r>=v.length?"__parsed_extra":v[r]),t.transform&&(s=t.transform(s,o)),s=A(o,s),"__parsed_extra"===o?(i[o]=i[o]||[],i[o].push(s)):i[o]=s}return t.header&&(r>v.length?E("FieldMismatch","TooManyFields","Too many fields: expected "+v.length+" fields but parsed "+r,l+n):r<v.length&&E("FieldMismatch","TooFewFields","Too few fields: expected "+v.length+" fields but parsed "+r,l+n)),i}var n=1;return!b.data.length||Array.isArray(b.data[0])?(b.data=b.data.map(e),n=b.data.length):b.data=e(b.data,0),t.header&&b.meta&&(b.meta.fields=v),l+=n,b}()}function j(){return t.header&&0===v.length}function A(e,n){return r=e,t.dynamicTypingFunction&&void 0===t.dynamicTyping[r]&&(t.dynamicTyping[r]=t.dynamicTypingFunction(r)),!0===(t.dynamicTyping[r]||t.dynamicTyping)?"true"===n||"TRUE"===n||"false"!==n&&"FALSE"!==n&&(function(t){if(a.test(t)){var e=parseFloat(t);if(o<e&&e<i)return!0}return!1}(n)?parseFloat(n):c.test(n)?new Date(n):""===n?null:n):n;var r}function E(t,e,n,r){var i={type:t,code:e,message:n};void 0!==r&&(i.row=r),b.errors.push(i)}this.parse=function(i,o,a){var c=t.quoteChar||'"';if(t.newline||(t.newline=function(t,e){t=t.substring(0,1048576);var n=new RegExp(h(e)+"([^]*?)"+h(e),"gm"),r=(t=t.replace(n,"")).split("\r"),i=t.split("\n"),o=1<i.length&&i[0].length<r[0].length;if(1===r.length||o)return"\n";for(var s=0,a=0;a<r.length;a++)"\n"===r[a][0]&&s++;return s>=r.length/2?"\r\n":"\r"}(i,c)),r=!1,t.delimiter)w(t.delimiter)&&(t.delimiter=t.delimiter(i),b.meta.delimiter=t.delimiter);else{var u=function(e,n,r,i,o){var a,c,u,f;o=o||[",","\t","|",";",s.RECORD_SEP,s.UNIT_SEP];for(var l=0;l<o.length;l++){var d=o[l],y=0,h=0,v=0;u=void 0;for(var b=new p({comments:i,delimiter:d,newline:n,preview:10}).parse(e),m=0;m<b.data.length;m++)if(r&&O(b.data[m]))v++;else{var g=b.data[m].length;h+=g,void 0!==u?0<g&&(y+=Math.abs(g-u),u=g):u=g}0<b.data.length&&(h/=b.data.length-v),(void 0===c||y<=c)&&(void 0===f||f<h)&&1.99<h&&(c=y,a=d,f=h)}return{successful:!!(t.delimiter=a),bestDelimiter:a}}(i,t.newline,t.skipEmptyLines,t.comments,t.delimitersToGuess);u.successful?t.delimiter=u.bestDelimiter:(r=!0,t.delimiter=s.DefaultDelimiter),b.meta.delimiter=t.delimiter}var f=g(t);return t.preview&&t.header&&f.preview++,e=i,n=new p(f),b=n.parse(e,o,a),_(),d?{meta:{paused:!0}}:b||{meta:{paused:!1}}},this.paused=function(){return d},this.pause=function(){d=!0,n.abort(),e=w(t.chunk)?"":e.substring(n.getCharIndex())},this.resume=function(){u.streamer._halted?(d=!1,u.streamer.parseChunk(e,!0)):setTimeout(u.resume,3)},this.aborted=function(){return y},this.abort=function(){y=!0,n.abort(),b.meta.aborted=!0,w(t.complete)&&t.complete(b),e=""}}function h(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function p(t){var e,n=(t=t||{}).delimiter,r=t.newline,i=t.comments,o=t.step,a=t.preview,c=t.fastMode,u=e=void 0===t.quoteChar||null===t.quoteChar?'"':t.quoteChar;if(void 0!==t.escapeChar&&(u=t.escapeChar),("string"!=typeof n||-1<s.BAD_DELIMITERS.indexOf(n))&&(n=","),i===n)throw new Error("Comment character same as delimiter");!0===i?i="#":("string"!=typeof i||-1<s.BAD_DELIMITERS.indexOf(i))&&(i=!1),"\n"!==r&&"\r"!==r&&"\r\n"!==r&&(r="\n");var f=0,l=!1;this.parse=function(t,s,d){if("string"!=typeof t)throw new Error("Input must be a string");var y=t.length,p=n.length,v=r.length,b=i.length,m=w(o),g=[],O=[],_=[],j=f=0;if(!t)return F();if(c||!1!==c&&-1===t.indexOf(e)){for(var A=t.split(r),E=0;E<A.length;E++){if(_=A[E],f+=_.length,E!==A.length-1)f+=r.length;else if(d)return F();if(!i||_.substring(0,b)!==i){if(m){if(g=[],R(_.split(n)),B(),l)return F()}else R(_.split(n));if(a&&a<=E)return g=g.slice(0,a),F(!0)}}return F()}for(var P=t.indexOf(n,f),S=t.indexOf(r,f),I=new RegExp(h(u)+h(e),"g"),k=t.indexOf(e,f);;)if(t[f]!==e)if(i&&0===_.length&&t.substring(f,f+b)===i){if(-1===S)return F();f=S+v,S=t.indexOf(r,f),P=t.indexOf(n,f)}else if(-1!==P&&(P<S||-1===S))_.push(t.substring(f,P)),f=P+p,P=t.indexOf(n,f);else{if(-1===S)break;if(_.push(t.substring(f,S)),D(S+v),m&&(B(),l))return F();if(a&&g.length>=a)return F(!0)}else for(k=f,f++;;){if(-1===(k=t.indexOf(e,k+1)))return d||O.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:g.length,index:f}),C();if(k===y-1)return C(t.substring(f,k).replace(I,e));if(e!==u||t[k+1]!==u){if(e===u||0===k||t[k-1]!==u){-1!==P&&P<k+1&&(P=t.indexOf(n,k+1)),-1!==S&&S<k+1&&(S=t.indexOf(r,k+1));var x=N(-1===S?P:Math.min(P,S));if(t.substr(k+1+x,p)===n){_.push(t.substring(f,k).replace(I,e)),t[f=k+1+x+p]!==e&&(k=t.indexOf(e,f)),P=t.indexOf(n,f),S=t.indexOf(r,f);break}var T=N(S);if(t.substring(k+1+T,k+1+T+v)===r){if(_.push(t.substring(f,k).replace(I,e)),D(k+1+T+v),P=t.indexOf(n,f),k=t.indexOf(e,f),m&&(B(),l))return F();if(a&&g.length>=a)return F(!0);break}O.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:g.length,index:f}),k++}}else k++}return C();function R(t){g.push(t),j=f}function N(e){var n=0;if(-1!==e){var r=t.substring(k+1,e);r&&""===r.trim()&&(n=r.length)}return n}function C(e){return d||(void 0===e&&(e=t.substring(f)),_.push(e),f=y,R(_),m&&B()),F()}function D(e){f=e,R(_),_=[],S=t.indexOf(r,f)}function F(t){return{data:g,errors:O,meta:{delimiter:n,linebreak:r,aborted:l,truncated:!!t,cursor:j+(s||0)}}}function B(){o(F()),g=[],O=[]}},this.abort=function(){l=!0},this.getCharIndex=function(){return f}}function v(t){var e=t.data,n=i[e.workerId],r=!1;if(e.error)n.userError(e.error,e.file);else if(e.results&&e.results.data){var o={abort:function(){r=!0,b(e.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:m,resume:m};if(w(n.userStep)){for(var s=0;s<e.results.data.length&&(n.userStep({data:e.results.data[s],errors:e.results.errors,meta:e.results.meta},o),!r);s++);delete e.results}else w(n.userChunk)&&(n.userChunk(e.results,o,e.file),delete e.results)}e.finished&&!r&&b(e.workerId,e.results)}function b(t,e){var n=i[t];w(n.userComplete)&&n.userComplete(e),n.terminate(),delete i[t]}function m(){throw new Error("Not implemented.")}function g(t){if("object"!=typeof t||null===t)return t;var e=Array.isArray(t)?[]:{};for(var n in t)e[n]=g(t[n]);return e}function O(t,e){return function(){t.apply(e,arguments)}}function w(t){return"function"==typeof t}return r&&(e.onmessage=function(t){var n=t.data;if(void 0===s.WORKER_ID&&n&&(s.WORKER_ID=n.workerId),"string"==typeof n.input)e.postMessage({workerId:s.WORKER_ID,results:s.parse(n.input,n.config),finished:!0});else if(e.File&&n.input instanceof File||n.input instanceof Object){var r=s.parse(n.input,n.config);r&&e.postMessage({workerId:s.WORKER_ID,results:r,finished:!0})}}),(u.prototype=Object.create(c.prototype)).constructor=u,(f.prototype=Object.create(c.prototype)).constructor=f,(l.prototype=Object.create(l.prototype)).constructor=l,(d.prototype=Object.create(c.prototype)).constructor=d,s}()}(cs);const ds="function"==typeof btoa,ys="function"==typeof Buffer;"function"==typeof TextDecoder&&new TextDecoder,"function"==typeof TextEncoder&&new TextEncoder;const hs=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");(t=>{let e={};t.forEach(((t,n)=>e[t]=n))})(hs),String.fromCharCode.bind(String),"function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array);const ps=ds?t=>btoa(t):ys?t=>Buffer.from(t,"binary").toString("base64"):t=>{let e,n,r,i,o="";const s=t.length%3;for(let s=0;s<t.length;){if((n=t.charCodeAt(s++))>255||(r=t.charCodeAt(s++))>255||(i=t.charCodeAt(s++))>255)throw new TypeError("invalid character found");e=n<<16|r<<8|i,o+=hs[e>>18&63]+hs[e>>12&63]+hs[e>>6&63]+hs[63&e]}return s?o.slice(0,s-3)+"===".substring(s):o};t.accept=function(t){return ls("Accept",t)},t.appendHeader=ls,t.appendPathname=function(t){return e=>{const n=d.go((()=>{const t=new URL(e.url.href);return t.pathname=t.pathname.endsWith("/")?t.pathname:`${t.pathname}/`,t})),r=new URL(t.replace(/^\/*/,""),n);return r.search=n.search,r.hash=n.hash,Object.assign(Object.assign({},e),{url:r})}},t.appendSearchParam=function(t,e){return n=>{const r=new URL(n.url.href),i=new URLSearchParams(r.searchParams);return i.append(t,e.toString()),r.search=i.toString(),Object.assign(Object.assign({},n),{url:r})}},t.basicAuth=function(t,e){return fs("Authorization","Basic "+ps(`${t}:${e}`))},t.bearerAuth=function(t){return fs("Authorization",`Bearer ${t}`)},t.csv=function(t){return d.assert(t.length>0,"payload must be a non-empty array"),e=>{const r=new n.Headers(e.headers);return r.set("Content-Type","text/csv"),Object.assign(Object.assign({},e),{headers:r,payload:us(t)})}},t.del=function(...t){return as("DELETE",...t)},t.formDataField=function(t,e){return r=>{const i=r.payload instanceof n.FormData?function(t){const e=new n.FormData;for(const[n,r]of t.entries())e.append(n,r);return e}(r.payload):new n.FormData;return d.isArray(e)?e.forEach((e=>i.append(t,e))):i.append(t,e),Object.assign(Object.assign({},r),{payload:i})}},t.get=function(...t){return as("GET",...t)},t.head=function(...t){return as("HEAD",...t)},t.header=fs,t.headers=function(t){return e=>{const r=new n.Headers(e.headers);for(const[e,n]of Object.entries(t))r.set(e,n);return Object.assign(Object.assign({},e),{headers:r})}},t.host=function(t){return e=>{const n=new URL(e.url.href);return n.host=t,Object.assign(Object.assign({},e),{url:n})}},t.json=function(t){return e=>{const r=new n.Headers(e.headers);return r.set("Content-Type","application/json"),Object.assign(Object.assign({},e),{headers:r,payload:JSON.stringify(t)})}},t.keepalive=function(t=!0){return e=>Object.assign(Object.assign({},e),{keepalive:t})},t.patch=function(...t){return as("PATCH",...t)},t.pathname=function(t){return e=>{const n=new URL(e.url.href);return n.pathname=t,Object.assign(Object.assign({},e),{url:n})}},t.port=function(t){return e=>{const n=new URL(e.url.href);return n.port=t.toString(),Object.assign(Object.assign({},e),{url:n})}},t.post=function(...t){return as("POST",...t)},t.put=function(...t){return as("PUT",...t)},t.search=function(t){return e=>{const n=new URL(e.url.href);return n.search=t,Object.assign(Object.assign({},e),{url:n})}},t.searchParam=function(t,e){return n=>{const r=new URL(n.url.href),i=new URLSearchParams(r.searchParams);return i.set(t,e.toString()),r.search=i.toString(),Object.assign(Object.assign({},n),{url:r})}},t.searchParams=function(t){return e=>{const n=new URL(e.url.href),r=new URLSearchParams(n.searchParams);for(const[e,n]of Object.entries(t))r.set(e,n.toString());return n.search=r.toString(),Object.assign(Object.assign({},e),{url:n})}},t.signal=function(t){return e=>Object.assign(Object.assign({},e),{signal:t})},t.text=function(t){return e=>{const r=new n.Headers(e.headers);return r.set("Content-Type","application/x-www-form-urlencoded"),Object.assign(Object.assign({},e),{headers:r,payload:t})}},t.url=function(...t){return e=>{const n=new URL(t.reduce(((t,e)=>new URL(e,t).href)));return Object.assign(Object.assign({},e),{url:n})}},Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
7
|
+
*/function lo(e){const t=Object.keys(e[0]);return fo.exports.unparse({data:e,fields:t})}function yo(e,t){return r=>{const i=new n.Headers(r.headers);return i.set(e,t),Object.assign(Object.assign({},r),{headers:i})}}function ho(e,t){return r=>{const i=new n.Headers(r.headers);return i.append(e,t),Object.assign(Object.assign({},r),{headers:i})}}!function(e,t){e.exports=function e(){var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},n=!t.document&&!!t.postMessage,r=n&&/blob:/i.test((t.location||{}).protocol),i={},o=0,s={parse:function(n,r){var a=(r=r||{}).dynamicTyping||!1;if(w(a)&&(r.dynamicTypingFunction=a,a={}),r.dynamicTyping=a,r.transform=!!w(r.transform)&&r.transform,r.worker&&s.WORKERS_SUPPORTED){var c=function(){if(!s.WORKERS_SUPPORTED)return!1;var n,r,a=(n=t.URL||t.webkitURL||null,r=e.toString(),s.BLOB_URL||(s.BLOB_URL=n.createObjectURL(new Blob(["(",r,")();"],{type:"text/javascript"})))),c=new t.Worker(a);return c.onmessage=m,c.id=o++,i[c.id]=c}();return c.userStep=r.step,c.userChunk=r.chunk,c.userComplete=r.complete,c.userError=r.error,r.step=w(r.step),r.chunk=w(r.chunk),r.complete=w(r.complete),r.error=w(r.error),delete r.worker,void c.postMessage({input:n,config:r,workerId:c.id})}var y=null;return s.NODE_STREAM_INPUT,"string"==typeof n?y=r.download?new u(r):new l(r):!0===n.readable&&w(n.read)&&w(n.on)?y=new d(r):(t.File&&n instanceof File||n instanceof Object)&&(y=new f(r)),y.stream(n)},unparse:function(e,t){var n=!1,r=!0,i=",",o="\r\n",a='"',c=a+a,u=!1,f=null,l=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||s.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(i=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(u=t.skipEmptyLines),"string"==typeof t.newline&&(o=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(r=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");f=t.columns}void 0!==t.escapeChar&&(c=t.escapeChar+a),("boolean"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(l=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\-@\t\r].*$/)}}();var d=new RegExp(h(a),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return y(null,e,u);if("object"==typeof e[0])return y(f||Object.keys(e[0]),e,u)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||f),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),y(e.fields||[],e.data||[],u);throw new Error("Unable to serialize unrecognized input");function y(e,t,n){var s="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var a=Array.isArray(e)&&0<e.length,c=!Array.isArray(t[0]);if(a&&r){for(var u=0;u<e.length;u++)0<u&&(s+=i),s+=p(e[u],u);0<t.length&&(s+=o)}for(var f=0;f<t.length;f++){var l=a?e.length:t[f].length,d=!1,y=a?0===Object.keys(t[f]).length:0===t[f].length;if(n&&!a&&(d="greedy"===n?""===t[f].join("").trim():1===t[f].length&&0===t[f][0].length),"greedy"===n&&a){for(var h=[],m=0;m<l;m++){var v=c?e[m]:m;h.push(t[f][v])}d=""===h.join("").trim()}if(!d){for(var b=0;b<l;b++){0<b&&!y&&(s+=i);var g=a&&c?e[b]:b;s+=p(t[f][g],b)}f<t.length-1&&(!n||0<l&&!y)&&(s+=o)}}return s}function p(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);var r=!1;l&&"string"==typeof e&&l.test(e)&&(e="'"+e,r=!0);var o=e.toString().replace(d,c);return(r=r||!0===n||"function"==typeof n&&n(e,t)||Array.isArray(n)&&n[t]||function(e,t){for(var n=0;n<t.length;n++)if(-1<e.indexOf(t[n]))return!0;return!1}(o,s.BAD_DELIMITERS)||-1<o.indexOf(i)||" "===o.charAt(0)||" "===o.charAt(o.length-1))?a+o+a:o}}};if(s.RECORD_SEP=String.fromCharCode(30),s.UNIT_SEP=String.fromCharCode(31),s.BYTE_ORDER_MARK="\ufeff",s.BAD_DELIMITERS=["\r","\n",'"',s.BYTE_ORDER_MARK],s.WORKERS_SUPPORTED=!n&&!!t.Worker,s.NODE_STREAM_INPUT=1,s.LocalChunkSize=10485760,s.RemoteChunkSize=5242880,s.DefaultDelimiter=",",s.Parser=p,s.ParserHandle=y,s.NetworkStreamer=u,s.FileStreamer=f,s.StringStreamer=l,s.ReadableStreamStreamer=d,t.jQuery){var a=t.jQuery;a.fn.parse=function(e){var n=e.config||{},r=[];return this.each((function(e){if("INPUT"!==a(this).prop("tagName").toUpperCase()||"file"!==a(this).attr("type").toLowerCase()||!t.FileReader||!this.files||0===this.files.length)return!0;for(var i=0;i<this.files.length;i++)r.push({file:this.files[i],inputElem:this,instanceConfig:a.extend({},n)})})),i(),this;function i(){if(0!==r.length){var t,n,i,c,u=r[0];if(w(e.before)){var f=e.before(u.file,u.inputElem);if("object"==typeof f){if("abort"===f.action)return t="AbortError",n=u.file,i=u.inputElem,c=f.reason,void(w(e.error)&&e.error({name:t},n,i,c));if("skip"===f.action)return void o();"object"==typeof f.config&&(u.instanceConfig=a.extend(u.instanceConfig,f.config))}else if("skip"===f)return void o()}var l=u.instanceConfig.complete;u.instanceConfig.complete=function(e){w(l)&&l(e,u.file,u.inputElem),o()},s.parse(u.file,u.instanceConfig)}else w(e.complete)&&e.complete()}function o(){r.splice(0,1),i()}}}function c(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=g(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new y(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,n){if(this.isFirstChunk&&w(this._config.beforeFirstChunk)){var i=this._config.beforeFirstChunk(e);void 0!==i&&(e=i)}this.isFirstChunk=!1,this._halted=!1;var o=this._partialLine+e;this._partialLine="";var a=this._handle.parse(o,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var c=a.meta.cursor;this._finished||(this._partialLine=o.substring(c-this._baseIndex),this._baseIndex=c),a&&a.data&&(this._rowCount+=a.data.length);var u=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(r)t.postMessage({results:a,workerId:s.WORKER_ID,finished:u});else if(w(this._config.chunk)&&!n){if(this._config.chunk(a,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);a=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(a.data),this._completeResults.errors=this._completeResults.errors.concat(a.errors),this._completeResults.meta=a.meta),this._completed||!u||!w(this._config.complete)||a&&a.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),u||a&&a.meta.paused||this._nextChunk(),a}this._halted=!0},this._sendError=function(e){w(this._config.error)?this._config.error(e):r&&this._config.error&&t.postMessage({workerId:s.WORKER_ID,error:e,finished:!1})}}function u(e){var t;(e=e||{}).chunkSize||(e.chunkSize=s.RemoteChunkSize),c.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),n||(t.onload=O(this._chunkLoaded,this),t.onerror=O(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var r in e)t.setRequestHeader(r,e[r])}if(this._config.chunkSize){var i=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+i)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}n&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var n=t.statusText||e;this._sendError(new Error(n))}}function f(e){var t,n;(e=e||{}).chunkSize||(e.chunkSize=s.LocalChunkSize),c.call(this,e);var r="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,r?((t=new FileReader).onload=O(this._chunkLoaded,this),t.onerror=O(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var i=Math.min(this._start+this._config.chunkSize,this._input.size);e=n.call(e,this._start,i)}var o=t.readAsText(e,this._config.encoding);r||this._chunkLoaded({target:{result:o}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(t.error)}}function l(e){var t;c.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,n=this._config.chunkSize;return n?(e=t.substring(0,n),t=t.substring(n)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function d(e){c.call(this,e=e||{});var t=[],n=!0,r=!1;this.pause=function(){c.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){c.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=O((function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}}),this),this._streamError=O((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=O((function(){this._streamCleanUp(),r=!0,this._streamData("")}),this),this._streamCleanUp=O((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function y(e){var t,n,r,i=Math.pow(2,53),o=-i,a=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,c=/^(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$/,u=this,f=0,l=0,d=!1,y=!1,m=[],v={data:[],errors:[],meta:{}};if(w(e.step)){var b=e.step;e.step=function(t){if(v=t,A())_();else{if(_(),0===v.data.length)return;f+=t.data.length,e.preview&&f>e.preview?n.abort():(v.data=v.data[0],b(v,u))}}}function O(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function _(){return v&&r&&(E("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+s.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines&&(v.data=v.data.filter((function(e){return!O(e)}))),A()&&function(){if(v)if(Array.isArray(v.data[0])){for(var t=0;A()&&t<v.data.length;t++)v.data[t].forEach(n);v.data.splice(0,1)}else v.data.forEach(n);function n(t,n){w(e.transformHeader)&&(t=e.transformHeader(t,n)),m.push(t)}}(),function(){if(!v||!e.header&&!e.dynamicTyping&&!e.transform)return v;function t(t,n){var r,i=e.header?{}:[];for(r=0;r<t.length;r++){var o=r,s=t[r];e.header&&(o=r>=m.length?"__parsed_extra":m[r]),e.transform&&(s=e.transform(s,o)),s=j(o,s),"__parsed_extra"===o?(i[o]=i[o]||[],i[o].push(s)):i[o]=s}return e.header&&(r>m.length?E("FieldMismatch","TooManyFields","Too many fields: expected "+m.length+" fields but parsed "+r,l+n):r<m.length&&E("FieldMismatch","TooFewFields","Too few fields: expected "+m.length+" fields but parsed "+r,l+n)),i}var n=1;return!v.data.length||Array.isArray(v.data[0])?(v.data=v.data.map(t),n=v.data.length):v.data=t(v.data,0),e.header&&v.meta&&(v.meta.fields=m),l+=n,v}()}function A(){return e.header&&0===m.length}function j(t,n){return r=t,e.dynamicTypingFunction&&void 0===e.dynamicTyping[r]&&(e.dynamicTyping[r]=e.dynamicTypingFunction(r)),!0===(e.dynamicTyping[r]||e.dynamicTyping)?"true"===n||"TRUE"===n||"false"!==n&&"FALSE"!==n&&(function(e){if(a.test(e)){var t=parseFloat(e);if(o<t&&t<i)return!0}return!1}(n)?parseFloat(n):c.test(n)?new Date(n):""===n?null:n):n;var r}function E(e,t,n,r){var i={type:e,code:t,message:n};void 0!==r&&(i.row=r),v.errors.push(i)}this.parse=function(i,o,a){var c=e.quoteChar||'"';if(e.newline||(e.newline=function(e,t){e=e.substring(0,1048576);var n=new RegExp(h(t)+"([^]*?)"+h(t),"gm"),r=(e=e.replace(n,"")).split("\r"),i=e.split("\n"),o=1<i.length&&i[0].length<r[0].length;if(1===r.length||o)return"\n";for(var s=0,a=0;a<r.length;a++)"\n"===r[a][0]&&s++;return s>=r.length/2?"\r\n":"\r"}(i,c)),r=!1,e.delimiter)w(e.delimiter)&&(e.delimiter=e.delimiter(i),v.meta.delimiter=e.delimiter);else{var u=function(t,n,r,i,o){var a,c,u,f;o=o||[",","\t","|",";",s.RECORD_SEP,s.UNIT_SEP];for(var l=0;l<o.length;l++){var d=o[l],y=0,h=0,m=0;u=void 0;for(var v=new p({comments:i,delimiter:d,newline:n,preview:10}).parse(t),b=0;b<v.data.length;b++)if(r&&O(v.data[b]))m++;else{var g=v.data[b].length;h+=g,void 0!==u?0<g&&(y+=Math.abs(g-u),u=g):u=g}0<v.data.length&&(h/=v.data.length-m),(void 0===c||y<=c)&&(void 0===f||f<h)&&1.99<h&&(c=y,a=d,f=h)}return{successful:!!(e.delimiter=a),bestDelimiter:a}}(i,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);u.successful?e.delimiter=u.bestDelimiter:(r=!0,e.delimiter=s.DefaultDelimiter),v.meta.delimiter=e.delimiter}var f=g(e);return e.preview&&e.header&&f.preview++,t=i,n=new p(f),v=n.parse(t,o,a),_(),d?{meta:{paused:!0}}:v||{meta:{paused:!1}}},this.paused=function(){return d},this.pause=function(){d=!0,n.abort(),t=w(e.chunk)?"":t.substring(n.getCharIndex())},this.resume=function(){u.streamer._halted?(d=!1,u.streamer.parseChunk(t,!0)):setTimeout(u.resume,3)},this.aborted=function(){return y},this.abort=function(){y=!0,n.abort(),v.meta.aborted=!0,w(e.complete)&&e.complete(v),t=""}}function h(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function p(e){var t,n=(e=e||{}).delimiter,r=e.newline,i=e.comments,o=e.step,a=e.preview,c=e.fastMode,u=t=void 0===e.quoteChar||null===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(u=e.escapeChar),("string"!=typeof n||-1<s.BAD_DELIMITERS.indexOf(n))&&(n=","),i===n)throw new Error("Comment character same as delimiter");!0===i?i="#":("string"!=typeof i||-1<s.BAD_DELIMITERS.indexOf(i))&&(i=!1),"\n"!==r&&"\r"!==r&&"\r\n"!==r&&(r="\n");var f=0,l=!1;this.parse=function(e,s,d){if("string"!=typeof e)throw new Error("Input must be a string");var y=e.length,p=n.length,m=r.length,v=i.length,b=w(o),g=[],O=[],_=[],A=f=0;if(!e)return B();if(c||!1!==c&&-1===e.indexOf(t)){for(var j=e.split(r),E=0;E<j.length;E++){if(_=j[E],f+=_.length,E!==j.length-1)f+=r.length;else if(d)return B();if(!i||_.substring(0,v)!==i){if(b){if(g=[],R(_.split(n)),F(),l)return B()}else R(_.split(n));if(a&&a<=E)return g=g.slice(0,a),B(!0)}}return B()}for(var S=e.indexOf(n,f),P=e.indexOf(r,f),k=new RegExp(h(u)+h(t),"g"),I=e.indexOf(t,f);;)if(e[f]!==t)if(i&&0===_.length&&e.substring(f,f+v)===i){if(-1===P)return B();f=P+m,P=e.indexOf(r,f),S=e.indexOf(n,f)}else if(-1!==S&&(S<P||-1===P))_.push(e.substring(f,S)),f=S+p,S=e.indexOf(n,f);else{if(-1===P)break;if(_.push(e.substring(f,P)),D(P+m),b&&(F(),l))return B();if(a&&g.length>=a)return B(!0)}else for(I=f,f++;;){if(-1===(I=e.indexOf(t,I+1)))return d||O.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:g.length,index:f}),C();if(I===y-1)return C(e.substring(f,I).replace(k,t));if(t!==u||e[I+1]!==u){if(t===u||0===I||e[I-1]!==u){-1!==S&&S<I+1&&(S=e.indexOf(n,I+1)),-1!==P&&P<I+1&&(P=e.indexOf(r,I+1));var T=N(-1===P?S:Math.min(S,P));if(e.substr(I+1+T,p)===n){_.push(e.substring(f,I).replace(k,t)),e[f=I+1+T+p]!==t&&(I=e.indexOf(t,f)),S=e.indexOf(n,f),P=e.indexOf(r,f);break}var x=N(P);if(e.substring(I+1+x,I+1+x+m)===r){if(_.push(e.substring(f,I).replace(k,t)),D(I+1+x+m),S=e.indexOf(n,f),I=e.indexOf(t,f),b&&(F(),l))return B();if(a&&g.length>=a)return B(!0);break}O.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:g.length,index:f}),I++}}else I++}return C();function R(e){g.push(e),A=f}function N(t){var n=0;if(-1!==t){var r=e.substring(I+1,t);r&&""===r.trim()&&(n=r.length)}return n}function C(t){return d||(void 0===t&&(t=e.substring(f)),_.push(t),f=y,R(_),b&&F()),B()}function D(t){f=t,R(_),_=[],P=e.indexOf(r,f)}function B(e){return{data:g,errors:O,meta:{delimiter:n,linebreak:r,aborted:l,truncated:!!e,cursor:A+(s||0)}}}function F(){o(B()),g=[],O=[]}},this.abort=function(){l=!0},this.getCharIndex=function(){return f}}function m(e){var t=e.data,n=i[t.workerId],r=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var o={abort:function(){r=!0,v(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:b,resume:b};if(w(n.userStep)){for(var s=0;s<t.results.data.length&&(n.userStep({data:t.results.data[s],errors:t.results.errors,meta:t.results.meta},o),!r);s++);delete t.results}else w(n.userChunk)&&(n.userChunk(t.results,o,t.file),delete t.results)}t.finished&&!r&&v(t.workerId,t.results)}function v(e,t){var n=i[e];w(n.userComplete)&&n.userComplete(t),n.terminate(),delete i[e]}function b(){throw new Error("Not implemented.")}function g(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var n in e)t[n]=g(e[n]);return t}function O(e,t){return function(){e.apply(t,arguments)}}function w(e){return"function"==typeof e}return r&&(t.onmessage=function(e){var n=e.data;if(void 0===s.WORKER_ID&&n&&(s.WORKER_ID=n.workerId),"string"==typeof n.input)t.postMessage({workerId:s.WORKER_ID,results:s.parse(n.input,n.config),finished:!0});else if(t.File&&n.input instanceof File||n.input instanceof Object){var r=s.parse(n.input,n.config);r&&t.postMessage({workerId:s.WORKER_ID,results:r,finished:!0})}}),(u.prototype=Object.create(c.prototype)).constructor=u,(f.prototype=Object.create(c.prototype)).constructor=f,(l.prototype=Object.create(l.prototype)).constructor=l,(d.prototype=Object.create(c.prototype)).constructor=d,s}()}(fo);const po="function"==typeof btoa,mo="function"==typeof Buffer;"function"==typeof TextDecoder&&new TextDecoder,"function"==typeof TextEncoder&&new TextEncoder;const vo=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");(e=>{let t={};e.forEach(((e,n)=>t[e]=n))})(vo),String.fromCharCode.bind(String),"function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array);const bo=po?e=>btoa(e):mo?e=>Buffer.from(e,"binary").toString("base64"):e=>{let t,n,r,i,o="";const s=e.length%3;for(let s=0;s<e.length;){if((n=e.charCodeAt(s++))>255||(r=e.charCodeAt(s++))>255||(i=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|i,o+=vo[t>>18&63]+vo[t>>12&63]+vo[t>>6&63]+vo[63&t]}return s?o.slice(0,s-3)+"===".substring(s):o};e.accept=function(e){return ho("Accept",e)},e.appendHeader=ho,e.appendPathname=function(e){return t=>{const n=d.go((()=>{const e=new URL(t.url.href);return e.pathname=e.pathname.endsWith("/")?e.pathname:`${e.pathname}/`,e})),r=new URL(e.replace(/^\/*/,""),n);return r.search=n.search,r.hash=n.hash,Object.assign(Object.assign({},t),{url:r})}},e.appendSearchParam=function(e,t){return n=>{const r=new URL(n.url.href),i=new URLSearchParams(r.searchParams);return i.append(e,t.toString()),r.search=i.toString(),Object.assign(Object.assign({},n),{url:r})}},e.basicAuth=function(e,t){return yo("Authorization","Basic "+bo(`${e}:${t}`))},e.bearerAuth=function(e){return yo("Authorization",`Bearer ${e}`)},e.csv=function(e){return d.assert(e.length>0,"payload must be a non-empty array"),t=>{const r=new n.Headers(t.headers);return r.set("Content-Type","text/csv"),Object.assign(Object.assign({},t),{headers:r,payload:lo(e)})}},e.del=function(...e){return uo("DELETE",...e)},e.formDataField=function(e,t){return r=>{const i=r.payload instanceof n.FormData?function(e){const t=new n.FormData;for(const[n,r]of e.entries())t.append(n,r);return t}(r.payload):new n.FormData;return d.isArray(t)?t.forEach((t=>i.append(e,t))):i.append(e,t),Object.assign(Object.assign({},r),{payload:i})}},e.get=function(...e){return uo("GET",...e)},e.head=function(...e){return uo("HEAD",...e)},e.header=yo,e.headers=function(e){return t=>{const r=new n.Headers(t.headers);for(const[t,n]of Object.entries(e))r.set(t,n);return Object.assign(Object.assign({},t),{headers:r})}},e.host=function(e){return t=>{const n=new URL(t.url.href);return n.host=e,Object.assign(Object.assign({},t),{url:n})}},e.json=function(e){return t=>{const r=new n.Headers(t.headers);return r.set("Content-Type","application/json"),Object.assign(Object.assign({},t),{headers:r,payload:JSON.stringify(e)})}},e.keepalive=function(e=!0){return t=>Object.assign(Object.assign({},t),{keepalive:e})},e.patch=function(...e){return uo("PATCH",...e)},e.pathname=function(e){return t=>{const n=new URL(t.url.href);return n.pathname=e,Object.assign(Object.assign({},t),{url:n})}},e.port=function(e){return t=>{const n=new URL(t.url.href);return n.port=e.toString(),Object.assign(Object.assign({},t),{url:n})}},e.post=function(...e){return uo("POST",...e)},e.put=function(...e){return uo("PUT",...e)},e.search=function(e){return t=>{const n=new URL(t.url.href);return n.search=e,Object.assign(Object.assign({},t),{url:n})}},e.searchParam=function(e,t){return n=>{const r=new URL(n.url.href),i=new URLSearchParams(r.searchParams);return i.set(e,t.toString()),r.search=i.toString(),Object.assign(Object.assign({},n),{url:r})}},e.searchParams=function(e){return t=>{const n=new URL(t.url.href),r=new URLSearchParams(n.searchParams);for(const[t,n]of Object.entries(e))r.set(t,n.toString());return n.search=r.toString(),Object.assign(Object.assign({},t),{url:n})}},e.signal=function(e){return t=>Object.assign(Object.assign({},t),{signal:e})},e.text=function(e){return t=>{const r=new n.Headers(t.headers);return r.set("Content-Type","application/x-www-form-urlencoded"),Object.assign(Object.assign({},t),{headers:r,payload:e})}},e.url=function(...e){return t=>{const n=new URL(e.reduce(((e,t)=>new URL(t,e).href)));return Object.assign(Object.assign({},t),{url:n})}},Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
8
8
|
//# sourceMappingURL=index.umd.min.js.map
|