@blackglory/estore-js 0.1.3 → 0.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.
@@ -1,9 +1,9 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("stream")):"function"==typeof define&&define.amd?define(["exports","stream"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).EStore={},e.require$$0)}(this,(function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(t),o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i={},s={fetch:void 0};s.fetch=globalThis.fetch.bind(globalThis);var a={Headers:void 0};a.Headers=globalThis.Headers;var c={Request:void 0};c.Request=globalThis.Request;var u={Response:void 0};u.Response=globalThis.Response;var l={FormData:void 0};l.FormData=globalThis.FormData;var f={AbortController:void 0};f.AbortController=globalThis.AbortController;var d={AbortError:void 0};d.AbortError=globalThis.DOMException;var h={Blob:void 0};h.Blob=globalThis.Blob;var p={EventSource:void 0};p.EventSource=globalThis.EventSource,function(e){var t=o&&o.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(s,e),n(a,e),n(c,e),n(u,e),n(l,e),n(f,e),n(d,e),n(h,e),n(p,e)}(i);var y={},m={},v={},g={},b={};function w(e){return Array.isArray(e)}b.isntEmptyArray=b.isEmptyArray=b.isntArray=b.isArray=void 0,b.isArray=w,b.isntArray=function(e){return!w(e)},b.isEmptyArray=function(e){return 0===e.length},b.isntEmptyArray=function(e){return 0!==e.length};var A={},_={};function S(e){return null===e}_.isntNull=_.isNull=void 0,_.isNull=S,_.isntNull=function(e){return!S(e)};var T={};function E(e){return void 0===e}T.isntUndefined=T.isUndefined=void 0,T.isUndefined=E,T.isntUndefined=function(e){return!E(e)};var k={};function R(e){return"function"==typeof e}k.isntFunction=k.isFunction=void 0,k.isFunction=R,k.isntFunction=function(e){return!R(e)},A.isntAsyncIterable=A.isAsyncIterable=void 0;const C=_,O=T,x=k;function P(e){return(0,C.isntNull)(e)&&(0,O.isntUndefined)(e)&&(0,x.isFunction)(e[Symbol.asyncIterator])}A.isAsyncIterable=P,A.isntAsyncIterable=function(e){return!P(e)};var N={};function I(e){return"bigint"==typeof e}N.isntBigInt=N.isBigInt=void 0,N.isBigInt=I,N.isntBigInt=function(e){return!I(e)};var j={};function F(e){return"boolean"==typeof e}j.isntBoolean=j.isBoolean=void 0,j.isBoolean=F,j.isntBoolean=function(e){return!F(e)};var U={},q={};function L(e){return"string"==typeof e}q.isntString=q.isString=void 0,q.isString=L,q.isntString=function(e){return!L(e)},U.isntChar=U.isChar=void 0;const M=q;function D(e){return(0,M.isString)(e)&&1===e.length}U.isChar=D,U.isntChar=function(e){return!D(e)};var B={};function H(e){return e instanceof Date}B.isntDate=B.isDate=void 0,B.isDate=H,B.isntDate=function(e){return!H(e)};var z={};z.inEnum=void 0,z.inEnum=function(e,t){return Object.values(t).includes(e)};var $={};function J(e){return e instanceof Error}$.isntError=$.isError=void 0,$.isError=J,$.isntError=function(e){return!J(e)};var W={};function G(e){return!e}W.isntFalsy=W.isFalsy=void 0,W.isFalsy=G,W.isntFalsy=function(e){return!G(e)};var V={};V.isntIterable=V.isIterable=void 0;const K=_,Q=T,Z=k;function X(e){return(0,K.isntNull)(e)&&(0,Q.isntUndefined)(e)&&(0,Z.isFunction)(e[Symbol.iterator])}V.isIterable=X,V.isntIterable=function(e){return!X(e)};var Y={},ee={};function te(e){return"number"==typeof e}function ne(e){return Number.isNaN(e)}ee.isntNaN=ee.isNaN=ee.isNegativeInfinity=ee.isPositiveInfinity=ee.isFinite=ee.isntNumber=ee.isNumber=void 0,ee.isNumber=te,ee.isntNumber=function(e){return!te(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=ne,ee.isntNaN=function(e){return!ne(e)};var re={},oe="object"==typeof o&&o&&o.Object===Object&&o,ie="object"==typeof self&&self&&self.Object===Object&&self,se=(oe||ie||Function("return this")()).Symbol,ae=se,ce=Object.prototype,ue=ce.hasOwnProperty,le=ce.toString,fe=ae?ae.toStringTag:void 0;var de=function(e){var t=ue.call(e,fe),n=e[fe];try{e[fe]=void 0;var r=!0}catch(e){}var o=le.call(e);return r&&(t?e[fe]=n:delete e[fe]),o},he=Object.prototype.toString;var pe=de,ye=function(e){return he.call(e)},me=se?se.toStringTag:void 0;var ve=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":me&&me in Object(e)?pe(e):ye(e)};var ge=function(e,t){return function(n){return e(t(n))}}(Object.getPrototypeOf,Object);var be=ve,we=ge,Ae=function(e){return null!=e&&"object"==typeof e},_e=Function.prototype,Se=Object.prototype,Te=_e.toString,Ee=Se.hasOwnProperty,ke=Te.call(Object);var Re=function(e){if(!Ae(e)||"[object Object]"!=be(e))return!1;var t=we(e);if(null===t)return!0;var n=Ee.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Te.call(n)==ke},Ce=o&&o.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};re.isntEmptyObject=re.isEmptyObject=re.isntPlainObject=re.isPlainObject=re.isntObject=re.isObject=void 0;const Oe=Ce(Re);function xe(e){return null!==e&&"object"==typeof e}function Pe(e){return(0,Oe.default)(e)}re.isObject=xe,re.isntObject=function(e){return!xe(e)},re.isPlainObject=Pe,re.isntPlainObject=function(e){return!Pe(e)},re.isEmptyObject=function(e){return 0===Object.keys(e).length},re.isntEmptyObject=function(e){return 0!==Object.keys(e).length},Y.isntJsonable=Y.isJsonable=Y.isntJson=Y.isJson=void 0;const Ne=_,Ie=j,je=q,Fe=ee,Ue=b,qe=re;function Le(e){return(0,Ne.isNull)(e)||(0,Ie.isBoolean)(e)||(0,je.isString)(e)||(0,Fe.isNumber)(e)||(0,Ue.isArray)(e)&&e.every(Le)||(0,qe.isPlainObject)(e)&&Object.values(e).every(Le)}Y.isJson=Le,Y.isntJson=function(e){return!Le(e)},Y.isJsonable=function(e){try{return JSON.stringify(e),!0}catch(e){return!1}},Y.isntJsonable=function e(t){return!e()};var Me={};Me.isPromiseLike=Me.isntPromiseLike=Me.isntPromise=Me.isPromise=void 0;const De=re,Be=k;function He(e){return e instanceof Promise}function ze(e){return(0,De.isObject)(e)&&(0,Be.isFunction)(e.then)}Me.isPromise=He,Me.isntPromise=function(e){return!He(e)},Me.isntPromiseLike=function(e){return!ze(e)},Me.isPromiseLike=ze;var $e={};$e.isAbsoluteURL=void 0,$e.isAbsoluteURL=function(e){try{return new URL(e),!0}catch(e){return!1}};var Je={};function We(e){return e instanceof RegExp}Je.isntRegExp=Je.isRegExp=void 0,Je.isRegExp=We,Je.isntRegExp=function(e){return!We(e)};var Ge={};function Ve(e){return"symbol"==typeof e}Ge.isntSymbol=Ge.isSymbol=void 0,Ge.isSymbol=Ve,Ge.isntSymbol=function(e){return!Ve(e)},function(e){var t=o&&o.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(b,e),n(A,e),n(N,e),n(j,e),n(U,e),n(B,e),n(z,e),n($,e),n(W,e),n(k,e),n(V,e),n(Y,e),n(_,e),n(ee,e),n(re,e),n(Me,e),n(q,e),n(T,e),n($e,e),n(Je,e),n(Ge,e)}(g),v.del=v.patch=v.put=v.post=v.head=v.get=void 0;const Ke=i,Qe=g;function Ze(e,...t){const n=t.reduce(((e,t)=>(0,Qe.isFunction)(t)?t(e):e),{url:new URL("http://localhost"),headers:new Ke.Headers}),r=new Ke.Headers(n.headers);return new Ke.Request(n.url.href,{method:e,headers:r,signal:n.signal,body:n.payload,keepalive:n.keepalive})}v.get=function(...e){return Ze("GET",...e)},v.head=function(...e){return Ze("HEAD",...e)},v.post=function(...e){return Ze("POST",...e)},v.put=function(...e){return Ze("PUT",...e)},v.patch=function(...e){return Ze("PATCH",...e)},v.del=function(...e){return Ze("DELETE",...e)},function(e){var t=o&&o.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(m,e),n(v,e)}(y);var Xe={},Ye={};Ye.url=void 0,Ye.url=function(...e){return t=>({...t,url:new URL(e.reduce(((e,t)=>new URL(t,e).href)))})};var et={text:void 0};const tt=i;et.text=function(e){return t=>{const n=new tt.Headers(t.headers);return n.set("Content-Type","application/x-www-form-urlencoded"),{...t,headers:n,payload:e}}};var nt={json:void 0};const rt=i;nt.json=function(e){return t=>{const n=new rt.Headers(t.headers);return n.set("Content-Type","application/json"),{...t,headers:n,payload:JSON.stringify(e)}}};var ot={},it={exports:{}};
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("stream")):"function"==typeof define&&define.amd?define(["exports","stream"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).EStore={},e.require$$0)}(this,(function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(t),o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},i={},a={fetch:void 0};a.fetch=globalThis.fetch.bind(globalThis);var s={Headers:void 0};s.Headers=globalThis.Headers;var c={Request:void 0};c.Request=globalThis.Request;var u={Response:void 0};u.Response=globalThis.Response;var l={FormData:void 0};l.FormData=globalThis.FormData;var d={AbortController:void 0};d.AbortController=globalThis.AbortController;var f={AbortError:void 0};f.AbortError=globalThis.DOMException;var h={Blob:void 0};h.Blob=globalThis.Blob;var p={EventSource:void 0};p.EventSource=globalThis.EventSource,function(e){var t=o&&o.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(a,e),n(s,e),n(c,e),n(u,e),n(l,e),n(d,e),n(f,e),n(h,e),n(p,e)}(i);var m={},y={},v={},g={},b={};function w(e){return Array.isArray(e)}b.isntEmptyArray=b.isEmptyArray=b.isntArray=b.isArray=void 0,b.isArray=w,b.isntArray=function(e){return!w(e)},b.isEmptyArray=function(e){return 0===e.length},b.isntEmptyArray=function(e){return 0!==e.length};var A={},T={};function _(e){return null===e}T.isntNull=T.isNull=void 0,T.isNull=_,T.isntNull=function(e){return!_(e)};var S={};function E(e){return void 0===e}S.isntUndefined=S.isUndefined=void 0,S.isUndefined=E,S.isntUndefined=function(e){return!E(e)};var k={};function R(e){return"function"==typeof e}k.isntFunction=k.isFunction=void 0,k.isFunction=R,k.isntFunction=function(e){return!R(e)},A.isntAsyncIterable=A.isAsyncIterable=void 0;const C=T,x=S,O=k;function P(e){return(0,C.isntNull)(e)&&(0,x.isntUndefined)(e)&&(0,O.isFunction)(e[Symbol.asyncIterator])}A.isAsyncIterable=P,A.isntAsyncIterable=function(e){return!P(e)};var I={};function N(e){return"bigint"==typeof e}I.isntBigInt=I.isBigInt=void 0,I.isBigInt=N,I.isntBigInt=function(e){return!N(e)};var j={};function q(e){return"boolean"==typeof e}j.isntBoolean=j.isBoolean=void 0,j.isBoolean=q,j.isntBoolean=function(e){return!q(e)};var F={},U={};function M(e){return"string"==typeof e}U.isntString=U.isString=void 0,U.isString=M,U.isntString=function(e){return!M(e)},F.isntChar=F.isChar=void 0;const L=U;function D(e){return(0,L.isString)(e)&&1===e.length}F.isChar=D,F.isntChar=function(e){return!D(e)};var B={};function H(e){return e instanceof Date}B.isntDate=B.isDate=void 0,B.isDate=H,B.isntDate=function(e){return!H(e)};var z={};z.inEnum=void 0,z.inEnum=function(e,t){return Object.values(t).includes(e)};var $={};function J(e){return e instanceof Error}$.isntError=$.isError=void 0,$.isError=J,$.isntError=function(e){return!J(e)};var W={};function G(e){return!e}W.isntFalsy=W.isFalsy=void 0,W.isFalsy=G,W.isntFalsy=function(e){return!G(e)};var V={};V.isntIterable=V.isIterable=void 0;const K=T,Q=S,Z=k;function X(e){return(0,K.isntNull)(e)&&(0,Q.isntUndefined)(e)&&(0,Z.isFunction)(e[Symbol.iterator])}V.isIterable=X,V.isntIterable=function(e){return!X(e)};var Y={},ee={};function te(e){return"number"==typeof e}function ne(e){return Number.isNaN(e)}ee.isntNaN=ee.isNaN=ee.isNegativeInfinity=ee.isPositiveInfinity=ee.isFinite=ee.isntNumber=ee.isNumber=void 0,ee.isNumber=te,ee.isntNumber=function(e){return!te(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=ne,ee.isntNaN=function(e){return!ne(e)};var re={},oe="object"==typeof o&&o&&o.Object===Object&&o,ie="object"==typeof self&&self&&self.Object===Object&&self,ae=(oe||ie||Function("return this")()).Symbol,se=ae,ce=Object.prototype,ue=ce.hasOwnProperty,le=ce.toString,de=se?se.toStringTag:void 0;var fe=function(e){var t=ue.call(e,de),n=e[de];try{e[de]=void 0;var r=!0}catch(e){}var o=le.call(e);return r&&(t?e[de]=n:delete e[de]),o},he=Object.prototype.toString;var pe=fe,me=function(e){return he.call(e)},ye=ae?ae.toStringTag:void 0;var ve=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":ye&&ye in Object(e)?pe(e):me(e)};var ge=function(e,t){return function(n){return e(t(n))}}(Object.getPrototypeOf,Object);var be=ve,we=ge,Ae=function(e){return null!=e&&"object"==typeof e},Te=Function.prototype,_e=Object.prototype,Se=Te.toString,Ee=_e.hasOwnProperty,ke=Se.call(Object);var Re=function(e){if(!Ae(e)||"[object Object]"!=be(e))return!1;var t=we(e);if(null===t)return!0;var n=Ee.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Se.call(n)==ke},Ce=o&&o.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};re.isntEmptyObject=re.isEmptyObject=re.isntPlainObject=re.isPlainObject=re.isntObject=re.isObject=void 0;const xe=Ce(Re);function Oe(e){return null!==e&&"object"==typeof e}function Pe(e){return(0,xe.default)(e)}re.isObject=Oe,re.isntObject=function(e){return!Oe(e)},re.isPlainObject=Pe,re.isntPlainObject=function(e){return!Pe(e)},re.isEmptyObject=function(e){return 0===Object.keys(e).length},re.isntEmptyObject=function(e){return 0!==Object.keys(e).length},Y.isntJsonable=Y.isJsonable=Y.isntJson=Y.isJson=void 0;const Ie=T,Ne=j,je=U,qe=ee,Fe=b,Ue=re;function Me(e){return(0,Ie.isNull)(e)||(0,Ne.isBoolean)(e)||(0,je.isString)(e)||(0,qe.isNumber)(e)||(0,Fe.isArray)(e)&&e.every(Me)||(0,Ue.isPlainObject)(e)&&Object.values(e).every(Me)}Y.isJson=Me,Y.isntJson=function(e){return!Me(e)},Y.isJsonable=function(e){try{return JSON.stringify(e),!0}catch(e){return!1}},Y.isntJsonable=function e(t){return!e()};var Le={};Le.isPromiseLike=Le.isntPromiseLike=Le.isntPromise=Le.isPromise=void 0;const De=re,Be=k;function He(e){return e instanceof Promise}function ze(e){return(0,De.isObject)(e)&&(0,Be.isFunction)(e.then)}Le.isPromise=He,Le.isntPromise=function(e){return!He(e)},Le.isntPromiseLike=function(e){return!ze(e)},Le.isPromiseLike=ze;var $e={};$e.isAbsoluteURL=void 0,$e.isAbsoluteURL=function(e){try{return new URL(e),!0}catch(e){return!1}};var Je={};function We(e){return e instanceof RegExp}Je.isntRegExp=Je.isRegExp=void 0,Je.isRegExp=We,Je.isntRegExp=function(e){return!We(e)};var Ge={};function Ve(e){return"symbol"==typeof e}Ge.isntSymbol=Ge.isSymbol=void 0,Ge.isSymbol=Ve,Ge.isntSymbol=function(e){return!Ve(e)},function(e){var t=o&&o.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(b,e),n(A,e),n(I,e),n(j,e),n(F,e),n(B,e),n(z,e),n($,e),n(W,e),n(k,e),n(V,e),n(Y,e),n(T,e),n(ee,e),n(re,e),n(Le,e),n(U,e),n(S,e),n($e,e),n(Je,e),n(Ge,e)}(g),v.del=v.patch=v.put=v.post=v.head=v.get=void 0;const Ke=i,Qe=g;function Ze(e,...t){const n=t.reduce(((e,t)=>(0,Qe.isFunction)(t)?t(e):e),{url:new URL("http://localhost"),headers:new Ke.Headers}),r=new Ke.Headers(n.headers);return new Ke.Request(n.url.href,{method:e,headers:r,signal:n.signal,body:n.payload,keepalive:n.keepalive})}v.get=function(...e){return Ze("GET",...e)},v.head=function(...e){return Ze("HEAD",...e)},v.post=function(...e){return Ze("POST",...e)},v.put=function(...e){return Ze("PUT",...e)},v.patch=function(...e){return Ze("PATCH",...e)},v.del=function(...e){return Ze("DELETE",...e)},function(e){var t=o&&o.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(y,e),n(v,e)}(m);var Xe={},Ye={};Ye.url=void 0,Ye.url=function(...e){return t=>({...t,url:new URL(e.reduce(((e,t)=>new URL(t,e).href)))})};var et={text:void 0};const tt=i;et.text=function(e){return t=>{const n=new tt.Headers(t.headers);return n.set("Content-Type","application/x-www-form-urlencoded"),{...t,headers:n,payload:e}}};var nt={json:void 0};const rt=i;nt.json=function(e){return t=>{const n=new rt.Headers(t.headers);return n.set("Content-Type","application/json"),{...t,headers:n,payload:JSON.stringify(e)}}};var ot={},it={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
7
  */
8
- !function(e,t){e.exports=function e(){var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{};function n(){var n=t.URL||t.webkitURL||null,r=e.toString();return c.BLOB_URL||(c.BLOB_URL=n.createObjectURL(new Blob(["(",r,")();"],{type:"text/javascript"})))}var o=!t.document&&!!t.postMessage,i=o&&/blob:/i.test((t.location||{}).protocol),s={},a=0,c={};if(c.parse=l,c.unparse=f,c.RECORD_SEP=String.fromCharCode(30),c.UNIT_SEP=String.fromCharCode(31),c.BYTE_ORDER_MARK="\ufeff",c.BAD_DELIMITERS=["\r","\n",'"',c.BYTE_ORDER_MARK],c.WORKERS_SUPPORTED=!o&&!!t.Worker,c.NODE_STREAM_INPUT=1,c.LocalChunkSize=10485760,c.RemoteChunkSize=5242880,c.DefaultDelimiter=",",c.Parser=w,c.ParserHandle=g,c.NetworkStreamer=h,c.FileStreamer=p,c.StringStreamer=y,c.ReadableStreamStreamer=m,"undefined"==typeof PAPA_BROWSER_CONTEXT&&(c.DuplexStreamStreamer=v),t.jQuery){var u=t.jQuery;u.fn.parse=function(e){var n=e.config||{},r=[];return this.each((function(e){if("INPUT"!==u(this).prop("tagName").toUpperCase()||"file"!==u(this).attr("type").toLowerCase()||!t.FileReader||!this.files||0===this.files.length)return!0;for(var o=0;o<this.files.length;o++)r.push({file:this.files[o],inputElem:this,instanceConfig:u.extend({},n)})})),o(),this;function o(){if(0!==r.length){var t=r[0];if(C(e.before)){var n=e.before(t.file,t.inputElem);if("object"==typeof n){if("abort"===n.action)return void i("AbortError",t.file,t.inputElem,n.reason);if("skip"===n.action)return void s();"object"==typeof n.config&&(t.instanceConfig=u.extend(t.instanceConfig,n.config))}else if("skip"===n)return void s()}var o=t.instanceConfig.complete;t.instanceConfig.complete=function(e){C(o)&&o(e,t.file,t.inputElem),s()},c.parse(t.file,t.instanceConfig)}else C(e.complete)&&e.complete()}function i(t,n,r,o){C(e.error)&&e.error({name:t},n,r,o)}function s(){r.splice(0,1),o()}}}function l(e,n){var r=(n=n||{}).dynamicTyping||!1;if(C(r)&&(n.dynamicTypingFunction=r,r={}),n.dynamicTyping=r,n.transform=!!C(n.transform)&&n.transform,n.worker&&c.WORKERS_SUPPORTED){var o=A();return o.userStep=n.step,o.userChunk=n.chunk,o.userComplete=n.complete,o.userError=n.error,n.step=C(n.step),n.chunk=C(n.chunk),n.complete=C(n.complete),n.error=C(n.error),delete n.worker,void o.postMessage({input:e,config:n,workerId:o.id})}var i=null;return e===c.NODE_STREAM_INPUT&&"undefined"==typeof PAPA_BROWSER_CONTEXT?(i=new v(n)).getStream():("string"==typeof e?i=n.download?new h(n):new y(n):!0===e.readable&&C(e.read)&&C(e.on)?i=new m(n):(t.File&&e instanceof File||e instanceof Object)&&(i=new p(n)),i.stream(e))}function f(e,t){var n=!1,r=!0,o=",",i="\r\n",s='"',a=s+s,u=!1,l=null,f=!1;h();var d=new RegExp(b(s),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return p(null,e,u);if("object"==typeof e[0])return p(l||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||l),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])),p(e.fields||[],e.data||[],u);throw new Error("Unable to serialize unrecognized input");function h(){if("object"==typeof t){if("string"!=typeof t.delimiter||c.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(o=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&&(i=t.newline),"string"==typeof t.quoteChar&&(s=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");l=t.columns}void 0!==t.escapeChar&&(a=t.escapeChar+s),("boolean"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(f=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\-@\t\r].*$/)}}function p(e,t,n){var s="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var a=Array.isArray(e)&&e.length>0,c=!Array.isArray(t[0]);if(a&&r){for(var u=0;u<e.length;u++)u>0&&(s+=o),s+=y(e[u],u);t.length>0&&(s+=i)}for(var l=0;l<t.length;l++){var f=a?e.length:t[l].length,d=!1,h=a?0===Object.keys(t[l]).length:0===t[l].length;if(n&&!a&&(d="greedy"===n?""===t[l].join("").trim():1===t[l].length&&0===t[l][0].length),"greedy"===n&&a){for(var p=[],m=0;m<f;m++){var v=c?e[m]:m;p.push(t[l][v])}d=""===p.join("").trim()}if(!d){for(var g=0;g<f;g++){g>0&&!h&&(s+=o);var b=a&&c?e[g]:g;s+=y(t[l][b],g)}l<t.length-1&&(!n||f>0&&!h)&&(s+=i)}}return s}function y(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);var r=!1;f&&"string"==typeof e&&f.test(e)&&(e="'"+e,r=!0);var i=e.toString().replace(d,a);return(r=r||!0===n||"function"==typeof n&&n(e,t)||Array.isArray(n)&&n[t]||m(i,c.BAD_DELIMITERS)||i.indexOf(o)>-1||" "===i.charAt(0)||" "===i.charAt(i.length-1))?s+i+s:i}function m(e,t){for(var n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return!0;return!1}}function d(e){function n(e){var t=k(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new g(t),this._handle.streamer=this,this._config=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:{}},n.call(this,e),this.parseChunk=function(e,n){if(this.isFirstChunk&&C(this._config.beforeFirstChunk)){var r=this._config.beforeFirstChunk(e);void 0!==r&&(e=r)}this.isFirstChunk=!1,this._halted=!1;var o=this._partialLine+e;this._partialLine="";var s=this._handle.parse(o,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var a=s.meta.cursor;this._finished||(this._partialLine=o.substring(a-this._baseIndex),this._baseIndex=a),s&&s.data&&(this._rowCount+=s.data.length);var u=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(i)t.postMessage({results:s,workerId:c.WORKER_ID,finished:u});else if(C(this._config.chunk)&&!n){if(this._config.chunk(s,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);s=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(s.data),this._completeResults.errors=this._completeResults.errors.concat(s.errors),this._completeResults.meta=s.meta),this._completed||!u||!C(this._config.complete)||s&&s.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),u||s&&s.meta.paused||this._nextChunk(),s}this._halted=!0},this._sendError=function(e){C(this._config.error)?this._config.error(e):i&&this._config.error&&t.postMessage({workerId:c.WORKER_ID,error:e,finished:!1})}}function h(e){var t;function n(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(e=e||{}).chunkSize||(e.chunkSize=c.RemoteChunkSize),d.call(this,e),this._nextChunk=o?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),o||(t.onload=R(this._chunkLoaded,this),t.onerror=R(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!o),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var n in e)t.setRequestHeader(n,e[n])}if(this._config.chunkSize){var r=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+r)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}o&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||t.status>=400?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=n(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var n=t.statusText||e;this._sendError(new Error(n))}}function p(e){var t,n;(e=e||{}).chunkSize||(e.chunkSize=c.LocalChunkSize),d.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=R(this._chunkLoaded,this),t.onerror=R(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 o=Math.min(this._start+this._config.chunkSize,this._input.size);e=n.call(e,this._start,o)}var i=t.readAsText(e,this._config.encoding);r||this._chunkLoaded({target:{result:i}})},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 y(e){var t;e=e||{},d.call(this,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 m(e){e=e||{},d.call(this,e);var t=[],n=!0,r=!1;this.pause=function(){d.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){d.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=R((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=R((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=R((function(){this._streamCleanUp(),r=!0,this._streamData("")}),this),this._streamCleanUp=R((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function v(e){var t=r.default.Duplex,n=k(e),o=!0,i=!1,s=[],a=null;this._onCsvData=function(e){var t=e.data;a.push(t)||this._handle.paused()||this._handle.pause()},this._onCsvComplete=function(){a.push(null)},n.step=R(this._onCsvData,this),n.complete=R(this._onCsvComplete,this),d.call(this,n),this._nextChunk=function(){i&&1===s.length&&(this._finished=!0),s.length?s.shift()():o=!0},this._addToParseQueue=function(e,t){s.push(R((function(){if(this.parseChunk("string"==typeof e?e:e.toString(n.encoding)),C(t))return t()}),this)),o&&(o=!1,this._nextChunk())},this._onRead=function(){this._handle.paused()&&this._handle.resume()},this._onWrite=function(e,t,n){this._addToParseQueue(e,n)},this._onWriteComplete=function(){i=!0,this._addToParseQueue("")},this.getStream=function(){return a},(a=new t({readableObjectMode:!0,decodeStrings:!1,read:R(this._onRead,this),write:R(this._onWrite,this)})).once("finish",R(this._onWriteComplete,this))}function g(e){var t,n,r,o=Math.pow(2,53),i=-o,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,a=/^(\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,l=0,f=0,d=!1,h=!1,p=[],y={data:[],errors:[],meta:{}};if(C(e.step)){var m=e.step;e.step=function(t){if(y=t,_())A();else{if(A(),0===y.data.length)return;l+=t.data.length,e.preview&&l>e.preview?n.abort():(y.data=y.data[0],m(y,u))}}}function v(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function g(e){if(s.test(e)){var t=parseFloat(e);if(t>i&&t<o)return!0}return!1}function A(){return y&&r&&(P("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+c.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines&&(y.data=y.data.filter((function(e){return!v(e)}))),_()&&S(),R()}function _(){return e.header&&0===p.length}function S(){if(y)if(Array.isArray(y.data[0])){for(var t=0;_()&&t<y.data.length;t++)y.data[t].forEach(n);y.data.splice(0,1)}else y.data.forEach(n);function n(t,n){C(e.transformHeader)&&(t=e.transformHeader(t,n)),p.push(t)}}function T(t){return e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping)}function E(e,t){return T(e)?"true"===t||"TRUE"===t||"false"!==t&&"FALSE"!==t&&(g(t)?parseFloat(t):a.test(t)?new Date(t):""===t?null:t):t}function R(){if(!y||!e.header&&!e.dynamicTyping&&!e.transform)return y;function t(t,n){var r,o=e.header?{}:[];for(r=0;r<t.length;r++){var i=r,s=t[r];e.header&&(i=r>=p.length?"__parsed_extra":p[r]),e.transform&&(s=e.transform(s,i)),s=E(i,s),"__parsed_extra"===i?(o[i]=o[i]||[],o[i].push(s)):o[i]=s}return e.header&&(r>p.length?P("FieldMismatch","TooManyFields","Too many fields: expected "+p.length+" fields but parsed "+r,f+n):r<p.length&&P("FieldMismatch","TooFewFields","Too few fields: expected "+p.length+" fields but parsed "+r,f+n)),o}var n=1;return!y.data.length||Array.isArray(y.data[0])?(y.data=y.data.map(t),n=y.data.length):y.data=t(y.data,0),e.header&&y.meta&&(y.meta.fields=p),f+=n,y}function O(t,n,r,o,i){var s,a,u,l;i=i||[",","\t","|",";",c.RECORD_SEP,c.UNIT_SEP];for(var f=0;f<i.length;f++){var d=i[f],h=0,p=0,y=0;u=void 0;for(var m=new w({comments:o,delimiter:d,newline:n,preview:10}).parse(t),g=0;g<m.data.length;g++)if(r&&v(m.data[g]))y++;else{var b=m.data[g].length;p+=b,void 0!==u?b>0&&(h+=Math.abs(b-u),u=b):u=b}m.data.length>0&&(p/=m.data.length-y),(void 0===a||h<=a)&&(void 0===l||p>l)&&p>1.99&&(a=h,s=d,l=p)}return e.delimiter=s,{successful:!!s,bestDelimiter:s}}function x(e,t){e=e.substring(0,1048576);var n=new RegExp(b(t)+"([^]*?)"+b(t),"gm"),r=(e=e.replace(n,"")).split("\r"),o=e.split("\n"),i=o.length>1&&o[0].length<r[0].length;if(1===r.length||i)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"}function P(e,t,n,r){var o={type:e,code:t,message:n};void 0!==r&&(o.row=r),y.errors.push(o)}this.parse=function(o,i,s){var a=e.quoteChar||'"';if(e.newline||(e.newline=x(o,a)),r=!1,e.delimiter)C(e.delimiter)&&(e.delimiter=e.delimiter(o),y.meta.delimiter=e.delimiter);else{var u=O(o,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);u.successful?e.delimiter=u.bestDelimiter:(r=!0,e.delimiter=c.DefaultDelimiter),y.meta.delimiter=e.delimiter}var l=k(e);return e.preview&&e.header&&l.preview++,t=o,n=new w(l),y=n.parse(t,i,s),A(),d?{meta:{paused:!0}}:y||{meta:{paused:!1}}},this.paused=function(){return d},this.pause=function(){d=!0,n.abort(),t=C(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 h},this.abort=function(){h=!0,n.abort(),y.meta.aborted=!0,C(e.complete)&&e.complete(y),t=""}}function b(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function w(e){var t,n=(e=e||{}).delimiter,r=e.newline,o=e.comments,i=e.step,s=e.preview,a=e.fastMode,u=t=void 0===e.quoteChar||null===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(u=e.escapeChar),("string"!=typeof n||c.BAD_DELIMITERS.indexOf(n)>-1)&&(n=","),o===n)throw new Error("Comment character same as delimiter");!0===o?o="#":("string"!=typeof o||c.BAD_DELIMITERS.indexOf(o)>-1)&&(o=!1),"\n"!==r&&"\r"!==r&&"\r\n"!==r&&(r="\n");var l=0,f=!1;this.parse=function(e,c,d){if("string"!=typeof e)throw new Error("Input must be a string");var h=e.length,p=n.length,y=r.length,m=o.length,v=C(i);l=0;var g=[],w=[],A=[],_=0;if(!e)return U();if(a||!1!==a&&-1===e.indexOf(t)){for(var S=e.split(r),T=0;T<S.length;T++){if(A=S[T],l+=A.length,T!==S.length-1)l+=r.length;else if(d)return U();if(!o||A.substring(0,m)!==o){if(v){if(g=[],N(A.split(n)),q(),f)return U()}else N(A.split(n));if(s&&T>=s)return g=g.slice(0,s),U(!0)}}return U()}for(var E=e.indexOf(n,l),k=e.indexOf(r,l),R=new RegExp(b(u)+b(t),"g"),O=e.indexOf(t,l);;)if(e[l]!==t)if(o&&0===A.length&&e.substring(l,l+m)===o){if(-1===k)return U();l=k+y,k=e.indexOf(r,l),E=e.indexOf(n,l)}else if(-1!==E&&(E<k||-1===k))A.push(e.substring(l,E)),l=E+p,E=e.indexOf(n,l);else{if(-1===k)break;if(A.push(e.substring(l,k)),F(k+y),v&&(q(),f))return U();if(s&&g.length>=s)return U(!0)}else for(O=l,l++;;){if(-1===(O=e.indexOf(t,O+1)))return d||w.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:g.length,index:l}),j();if(O===h-1)return j(e.substring(l,O).replace(R,t));if(t!==u||e[O+1]!==u){if(t===u||0===O||e[O-1]!==u){-1!==E&&E<O+1&&(E=e.indexOf(n,O+1)),-1!==k&&k<O+1&&(k=e.indexOf(r,O+1));var x=I(-1===k?E:Math.min(E,k));if(e.substr(O+1+x,p)===n){A.push(e.substring(l,O).replace(R,t)),l=O+1+x+p,e[O+1+x+p]!==t&&(O=e.indexOf(t,l)),E=e.indexOf(n,l),k=e.indexOf(r,l);break}var P=I(k);if(e.substring(O+1+P,O+1+P+y)===r){if(A.push(e.substring(l,O).replace(R,t)),F(O+1+P+y),E=e.indexOf(n,l),O=e.indexOf(t,l),v&&(q(),f))return U();if(s&&g.length>=s)return U(!0);break}w.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:g.length,index:l}),O++}}else O++}return j();function N(e){g.push(e),_=l}function I(t){var n=0;if(-1!==t){var r=e.substring(O+1,t);r&&""===r.trim()&&(n=r.length)}return n}function j(t){return d||(void 0===t&&(t=e.substring(l)),A.push(t),l=h,N(A),v&&q()),U()}function F(t){l=t,N(A),A=[],k=e.indexOf(r,l)}function U(e){return{data:g,errors:w,meta:{delimiter:n,linebreak:r,aborted:f,truncated:!!e,cursor:_+(c||0)}}}function q(){i(U()),g=[],w=[]}},this.abort=function(){f=!0},this.getCharIndex=function(){return l}}function A(){if(!c.WORKERS_SUPPORTED)return!1;var e=n(),r=new t.Worker(e);return r.onmessage=_,r.id=a++,s[r.id]=r,r}function _(e){var t=e.data,n=s[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,S(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:T,resume:T};if(C(n.userStep)){for(var i=0;i<t.results.data.length&&(n.userStep({data:t.results.data[i],errors:t.results.errors,meta:t.results.meta},o),!r);i++);delete t.results}else C(n.userChunk)&&(n.userChunk(t.results,o,t.file),delete t.results)}t.finished&&!r&&S(t.workerId,t.results)}function S(e,t){var n=s[e];C(n.userComplete)&&n.userComplete(t),n.terminate(),delete s[e]}function T(){throw new Error("Not implemented.")}function E(e){var n=e.data;if(void 0===c.WORKER_ID&&n&&(c.WORKER_ID=n.workerId),"string"==typeof n.input)t.postMessage({workerId:c.WORKER_ID,results:c.parse(n.input,n.config),finished:!0});else if(t.File&&n.input instanceof File||n.input instanceof Object){var r=c.parse(n.input,n.config);r&&t.postMessage({workerId:c.WORKER_ID,results:r,finished:!0})}}function k(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var n in e)t[n]=k(e[n]);return t}function R(e,t){return function(){e.apply(t,arguments)}}function C(e){return"function"==typeof e}return i&&(t.onmessage=E),h.prototype=Object.create(d.prototype),h.prototype.constructor=h,p.prototype=Object.create(d.prototype),p.prototype.constructor=p,y.prototype=Object.create(y.prototype),y.prototype.constructor=y,m.prototype=Object.create(d.prototype),m.prototype.constructor=m,"undefined"==typeof PAPA_BROWSER_CONTEXT&&(v.prototype=Object.create(d.prototype),v.prototype.constructor=v),c}()}(it);var st={},at={},ct={},ut={},lt={},ft={},dt={};dt.go=void 0,dt.go=function(e){return e()};var ht={};ht.goMicrotask=void 0,ht.goMicrotask=function(e){return new Promise(((t,n)=>{queueMicrotask((async()=>{try{t(await e())}catch(e){n(e)}}))}))};var pt={},yt={},mt={},vt={},gt={};gt.random=void 0,gt.random=function(e,t){return Math.random()*(t-e)+e};var bt={};bt.randomInt=void 0,bt.randomInt=function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e))+e};var wt={};wt.randomIntInclusive=void 0,wt.randomIntInclusive=function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e},function(e){var t=o&&o.__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]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(gt,e),n(bt,e),n(wt,e)}(vt),mt.calculateExponentialBackoffTimeout=void 0;const At=vt;mt.calculateExponentialBackoffTimeout=function({baseTimeout:e,retries:t,maxTimeout:n=1/0,factor:r=2,jitter:o=!0}){const i=Math.min(r**t*e,n);return o?(0,At.randomIntInclusive)(0,i):i};var _t={};_t.setTimeout=void 0,_t.setTimeout=function(e,t){const n=globalThis.setTimeout(t,e);return()=>clearTimeout(n)};var St={setSchedule:void 0};const Tt=_t;St.setSchedule=function(e,t){const n=e-Date.now();return(0,Tt.setTimeout)(n,t)};var Et={};Et.setInterval=void 0,Et.setInterval=function(e,t){const n=globalThis.setInterval(t,e);return()=>clearInterval(n)};var kt={setImmediate:void 0};const Rt=_t;kt.setImmediate=function(e){if(globalThis.setImmediate){const t=globalThis.setImmediate(e);return()=>clearImmediate(t)}return(0,Rt.setTimeout)(0,e)};var Ct={setTimeoutLoop:void 0};const Ot=_t;Ct.setTimeoutLoop=function(e,t){let n=!1,r=(0,Ot.setTimeout)(e,(async function o(){await t(),n||(r=(0,Ot.setTimeout)(e,o))}));return()=>{n=!0,r()}};var xt={setDynamicTimeoutLoop:void 0};const Pt=_t;xt.setDynamicTimeoutLoop=function(e,t){let n=!1,r=(0,Pt.setTimeout)(e,(async function o(){const i=Date.now();await t();const s=Date.now()-i;n||(r=(0,Pt.setTimeout)(Math.max(e-s,0),o))}));return()=>{n=!0,r()}},function(e){var t=o&&o.__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]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(mt,e),n(_t,e),n(St,e),n(Et,e),n(kt,e),n(Ct,e),n(xt,e)}(yt),pt.goMacrotask=void 0;const Nt=yt;var It;pt.goMacrotask=function(e){return new Promise(((t,n)=>{(0,Nt.setImmediate)((async()=>{try{t(await e())}catch(e){n(e)}}))}))},function(e){var t=o&&o.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(dt,e),n(ht,e),n(pt,e)}(ft);var jt={},Ft={},Ut={};function qt(e){return Array.isArray(e)}Ut.isntEmptyArray=Ut.isEmptyArray=Ut.isntArray=Ut.isArray=void 0,Ut.isArray=qt,Ut.isntArray=function(e){return!qt(e)},Ut.isEmptyArray=function(e){return 0===e.length},Ut.isntEmptyArray=function(e){return 0!==e.length};var Lt={},Mt={};function Dt(e){return null===e}Mt.isntNull=Mt.isNull=void 0,Mt.isNull=Dt,Mt.isntNull=function(e){return!Dt(e)};var Bt={};function Ht(e){return void 0===e}Bt.isntUndefined=Bt.isUndefined=void 0,Bt.isUndefined=Ht,Bt.isntUndefined=function(e){return!Ht(e)};var zt={};function $t(e){return"function"==typeof e}zt.isntFunction=zt.isFunction=void 0,zt.isFunction=$t,zt.isntFunction=function(e){return!$t(e)},Lt.isntAsyncIterable=Lt.isAsyncIterable=void 0;const Jt=Mt,Wt=Bt,Gt=zt;function Vt(e){return(0,Jt.isntNull)(e)&&(0,Wt.isntUndefined)(e)&&(0,Gt.isFunction)(e[Symbol.asyncIterator])}Lt.isAsyncIterable=Vt,Lt.isntAsyncIterable=function(e){return!Vt(e)};var Kt={};function Qt(e){return"bigint"==typeof e}Kt.isntBigInt=Kt.isBigInt=void 0,Kt.isBigInt=Qt,Kt.isntBigInt=function(e){return!Qt(e)};var Zt={};function Xt(e){return"boolean"==typeof e}Zt.isntBoolean=Zt.isBoolean=void 0,Zt.isBoolean=Xt,Zt.isntBoolean=function(e){return!Xt(e)};var Yt={},en={};function tn(e){return"string"==typeof e}en.isntString=en.isString=void 0,en.isString=tn,en.isntString=function(e){return!tn(e)},Yt.isntChar=Yt.isChar=void 0;const nn=en;function rn(e){return(0,nn.isString)(e)&&1===e.length}Yt.isChar=rn,Yt.isntChar=function(e){return!rn(e)};var on={};function sn(e){return e instanceof Date}on.isntDate=on.isDate=void 0,on.isDate=sn,on.isntDate=function(e){return!sn(e)};var an={};an.inEnum=void 0,an.inEnum=function(e,t){return Object.values(t).includes(e)};var cn={};function un(e){return e instanceof Error}cn.isntError=cn.isError=void 0,cn.isError=un,cn.isntError=function(e){return!un(e)};var ln={};function fn(e){return!e}ln.isntFalsy=ln.isFalsy=void 0,ln.isFalsy=fn,ln.isntFalsy=function(e){return!fn(e)};var dn={};dn.isntIterable=dn.isIterable=void 0;const hn=Mt,pn=Bt,yn=zt;function mn(e){return(0,hn.isntNull)(e)&&(0,pn.isntUndefined)(e)&&(0,yn.isFunction)(e[Symbol.iterator])}dn.isIterable=mn,dn.isntIterable=function(e){return!mn(e)};var vn={},gn={};function bn(e){return"number"==typeof e}function wn(e){return Number.isNaN(e)}gn.isntNaN=gn.isNaN=gn.isNegativeInfinity=gn.isPositiveInfinity=gn.isFinite=gn.isntNumber=gn.isNumber=void 0,gn.isNumber=bn,gn.isntNumber=function(e){return!bn(e)},gn.isFinite=function(e){return Number.isFinite(e)},gn.isPositiveInfinity=function(e){return e===1/0},gn.isNegativeInfinity=function(e){return e===-1/0},gn.isNaN=wn,gn.isntNaN=function(e){return!wn(e)};var An={},_n=o&&o.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};An.isntEmptyObject=An.isEmptyObject=An.isntPlainObject=An.isPlainObject=An.isntObject=An.isObject=void 0;const Sn=_n(Re);function Tn(e){return null!==e&&"object"==typeof e}function En(e){return(0,Sn.default)(e)}An.isObject=Tn,An.isntObject=function(e){return!Tn(e)},An.isPlainObject=En,An.isntPlainObject=function(e){return!En(e)},An.isEmptyObject=function(e){return 0===Object.keys(e).length},An.isntEmptyObject=function(e){return 0!==Object.keys(e).length},vn.isntJsonable=vn.isJsonable=vn.isntJson=vn.isJson=void 0;const kn=Mt,Rn=Zt,Cn=en,On=gn,xn=Ut,Pn=An;function Nn(e){return(0,kn.isNull)(e)||(0,Rn.isBoolean)(e)||(0,Cn.isString)(e)||(0,On.isNumber)(e)||(0,xn.isArray)(e)&&e.every(Nn)||(0,Pn.isPlainObject)(e)&&Object.values(e).every(Nn)}vn.isJson=Nn,vn.isntJson=function(e){return!Nn(e)},vn.isJsonable=function(e){try{return JSON.stringify(e),!0}catch(e){return!1}},vn.isntJsonable=function e(t){return!e()};var In={};In.isPromiseLike=In.isntPromiseLike=In.isntPromise=In.isPromise=void 0;const jn=An,Fn=zt;function Un(e){return e instanceof Promise}function qn(e){return(0,jn.isObject)(e)&&(0,Fn.isFunction)(e.then)}In.isPromise=Un,In.isntPromise=function(e){return!Un(e)},In.isntPromiseLike=function(e){return!qn(e)},In.isPromiseLike=qn;var Ln={};Ln.isAbsoluteURL=void 0,Ln.isAbsoluteURL=function(e){try{return new URL(e),!0}catch(e){return!1}};var Mn={};function Dn(e){return e instanceof RegExp}Mn.isntRegExp=Mn.isRegExp=void 0,Mn.isRegExp=Dn,Mn.isntRegExp=function(e){return!Dn(e)};var Bn={};function Hn(e){return"symbol"==typeof e}Bn.isntSymbol=Bn.isSymbol=void 0,Bn.isSymbol=Hn,Bn.isntSymbol=function(e){return!Hn(e)},function(e){var t=o&&o.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(Ut,e),n(Lt,e),n(Kt,e),n(Zt,e),n(Yt,e),n(on,e),n(an,e),n(cn,e),n(ln,e),n(zt,e),n(dn,e),n(vn,e),n(Mt,e),n(gn,e),n(An,e),n(In,e),n(en,e),n(Bt,e),n(Ln,e),n(Mn,e),n(Bn,e)}(Ft),jt.chunkByAsync=void 0;const zn=Ft;jt.chunkByAsync=function(e,t){return(0,zn.isAsyncIterable)(e)?async function*(e,t){let n=[],r=0;for await(const o of e)n.push(o),await t(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(e,t):async function*(e,t){let n=[],r=0;for(const o of e)n.push(o),await t(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(e,t)};var $n={};$n.chunkBy=void 0,$n.chunkBy=function*(e,t){let n=[],r=0;for(const o of e)n.push(o),t(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var Jn,Wn={};var Gn={concatAsync:void 0};const Vn=Ft,Kn=ft;Gn.concatAsync=function(e,...t){return(0,Kn.go)((async function*(){for(const n of[e,...t])if((0,Vn.isAsyncIterable)(n))for await(const e of n)yield e;else for(const e of n)yield e}))};var Qn={concat:void 0};const Zn=ft;Qn.concat=function(e,...t){return(0,Zn.go)((function*(){for(const n of[e,...t])yield*n}))};var Xn,Yn={},er={};er.copyIterable=er.copyAsyncIterable=void 0,er.copyAsyncIterable=async function*(e){for await(const t of e)yield t},er.copyIterable=function*(e){for(const t of e)yield t};var tr,nr={};var rr,or={};var ir={dropUntilAsync:void 0};const sr=Ft;ir.dropUntilAsync=function(e,t){return(0,sr.isAsyncIterable)(e)?async function*(e,t){var n;const r=e[Symbol.asyncIterator]();let o;try{let e,i=0;for(;!(({value:e,done:o}=await r.next()),o||await t(e,i++)););for(;!o;)yield e,({value:e,done:o}=await r.next())}finally{o||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 o;try{let e,i=0;for(;!(({value:e,done:o}=r.next()),o||await t(e,i++)););for(;!o;)yield e,({value:e,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}(e,t)};var ar={};ar.dropUntil=void 0,ar.dropUntil=function*(e,t){var n;const r=e[Symbol.iterator]();let o;try{let e,i=0;for(;!(({value:e,done:o}=r.next()),o||t(e,i++)););for(;!o;)yield e,({value:e,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}};var cr,ur={};var lr={filterAsync:void 0};const fr=Ft;lr.filterAsync=function(e,t){return(0,fr.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 dr={};dr.filter=void 0,dr.filter=function*(e,t){let n=0;for(const r of e)t(r,n)&&(yield r),n++};var hr={},pr={},yr={flattenByAsync:void 0};const mr=Ft;async function*vr(e,t,n){for(const r of e)gr(r)&&await t(r,n)?yield*vr(r,t,n+1):yield r}function gr(e){return(0,mr.isIterable)(e)&&(0,mr.isntChar)(e)}var br,wr;function Ar(){if(br)return pr;br=1,pr.flattenDeepAsync=void 0;const e=yr,t=Ii();return pr.flattenDeepAsync=function(n,r=1/0){return(0,t.assert)(r===1/0||Number.isInteger(r),"The parameter depth must be an integer"),(0,t.assert)(r>=0,"The parameter depth must be greater than or equal to 0"),(0,e.flattenByAsync)(n,((e,t)=>t<=r))},pr}yr.flattenByAsync=function(e,t){return(0,mr.isAsyncIterable)(e)?async function*(e,t){const n=1;for await(const r of e)gr(r)&&await t(r,n)?yield*vr(r,t,n+1):yield r}(e,t):function(e,t){return vr(e,t,1)}(e,t)};var _r={flattenBy:void 0};const Sr=Ft;function*Tr(e,t,n){for(const o of e)(0,Sr.isIterable)(r=o)&&(0,Sr.isntChar)(r)&&t(o,n)?yield*Tr(o,t,n+1):yield o;var r}_r.flattenBy=function(e,t){return Tr(e,t,1)};var Er,kr={};function Rr(){if(Er)return kr;Er=1,kr.flattenDeep=void 0;const e=_r,t=Ii();return kr.flattenDeep=function(n,r=1/0){return(0,t.assert)(r===1/0||Number.isInteger(r),"The parameter depth must be an integer"),(0,t.assert)(r>=0,"The parameter depth must be greater than or equal to 0"),(0,e.flattenBy)(n,((e,t)=>t<=r))},kr}var Cr,Or={};var xr={mapAsync:void 0};const Pr=Ft;xr.mapAsync=function(e,t){return(0,Pr.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 Nr={};Nr.map=void 0,Nr.map=function*(e,t){let n=0;for(const r of e)yield t(r,n),n++};var Ir,jr={};function Fr(){if(Ir)return jr;Ir=1,jr.repeatAsync=void 0;const e=ft,t=Ii();return jr.repeatAsync=function(n,r){return(0,t.assert)(r===1/0||Number.isInteger(r),"The parameter times must be an integer"),(0,t.assert)(r>=0,"The parameter times must be greater than or equal to 0"),r===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,e.go)((async function*(){const e=[];if(r>0){for await(const t of n)yield t,e.push(t);r--}for(;r>0;)yield*e,r--}))},jr}var Ur,qr={};function Lr(){if(Ur)return qr;Ur=1,qr.repeat=void 0;const e=ft,t=Ii();return qr.repeat=function(n,r){return(0,t.assert)(r===1/0||Number.isInteger(r),"The parameter times must be an integer"),(0,t.assert)(r>=0,"The parameter times must be greater than or equal to 0"),r===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,e.go)((function*(){const e=[];if(r>0){for(const t of n)yield t,e.push(t);r--}for(;r>0;)yield*e,r--}))},qr}var Mr,Dr={};var Br,Hr={};var zr={};zr.splitAsync=void 0,zr.splitAsync=async function*(e,t){let n=[];for await(const r of e)r===t?(yield n,n=[]):n.push(r);yield n};var $r={splitByAsync:void 0};const Jr=Ft;$r.splitByAsync=function(e,t){return(0,Jr.isAsyncIterable)(e)?async function*(e,t){let n=[],r=0;for await(const o of e)await t(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(e,t):async function*(e,t){let n=[],r=0;for(const o of e)await t(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(e,t)};var Wr={};Wr.splitBy=void 0,Wr.splitBy=function*(e,t){let n=[],r=0;for(const o of e)t(o,r)?(yield n,n=[]):n.push(o),r++;yield n};var Gr={};Gr.split=void 0,Gr.split=function*(e,t){let n=[];for(const r of e)r===t?(yield n,n=[]):n.push(r);yield n};var Vr,Kr={};var Qr,Zr={};var Xr,Yr={};var eo={takeUntilAsync:void 0};const to=Ft;eo.takeUntilAsync=function(e,t){return(0,to.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 no={};no.takeUntil=void 0,no.takeUntil=function*(e,t){let n=0;for(const r of e){if(t(r,n))break;yield r,n++}};var ro,oo={};var io={tapAsync:void 0};const so=Ft;io.tapAsync=function(e,t){return(0,so.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 ao={};ao.tap=void 0,ao.tap=function*(e,t){let n=0;for(const r of e)t(r,n),yield r,n++};var co={};co.toAsyncIterable=void 0,co.toAsyncIterable=async function*(e){for(const t of e)yield t};var uo={};uo.transformAsync=void 0,uo.transformAsync=async function*(e,t){yield*t(e)};var lo={};lo.transform=void 0,lo.transform=function*(e,t){yield*t(e)};var fo={};fo.uniqAsync=void 0,fo.uniqAsync=async function*(e){const t=new Set;for await(const n of e)t.has(n)||(yield n,t.add(n))};var ho={uniqByAsync:void 0};const po=Ft;ho.uniqByAsync=function(e,t){return(0,po.isAsyncIterable)(e)?async function*(e,t){const n=new Set;let r=0;for await(const o of e){const e=await t(o,r);n.has(e)||(yield o,n.add(e)),r++}}(e,t):async function*(e,t){const n=new Set;let r=0;for(const o of e){const e=await t(o,r);n.has(e)||(yield o,n.add(e)),r++}}(e,t)};var yo={};yo.uniqBy=void 0,yo.uniqBy=function*(e,t){const n=new Set;let r=0;for(const o of e){const e=t(o,r);n.has(e)||(yield o,n.add(e)),r++}};var mo={};mo.uniq=void 0,mo.uniq=function*(e){const t=new Set;for(const n of e)t.has(n)||(yield n,t.add(n))};var vo={zipAsync:void 0};const go=Ft;var bo;!function(e){e[e.Sync=0]="Sync",e[e.Async=1]="Async"}(bo||(bo={})),vo.zipAsync=function(e,...t){return async function*(...e){var t,n,r,o;const i=e.length,s=e.map((e=>(0,go.isAsyncIterable)(e)?[bo.Async,e[Symbol.asyncIterator]()]:[bo.Sync,e[Symbol.iterator]()])),a=s.map((()=>!1));try{for(;;){const e=new Array(i);for(let t=0;t<i;t++){const[n,r]=s[t];let o;if(o=n===bo.Async?await r.next():r.next(),o.done)return void(a[t]=!0);e[t]=o.value}yield e}}finally{const e=s.filter(((e,t)=>!a[t]));for(const[i,s]of e)i===bo.Async?await(null===(n=(t=s).return)||void 0===n?void 0:n.call(t)):null===(o=(r=s).return)||void 0===o||o.call(r)}}(e,...t)};var wo,Ao={};function _o(){return wo||(wo=1,function(e){var t=o&&o.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(function(){if(It)return lt;It=1,lt.chunkAsync=void 0;const e=ft,t=Ii();return lt.chunkAsync=function(n,r){return(0,t.assert)(Number.isInteger(r),"The parameter size must be an integer"),(0,t.assert)(r>0,"The parameter size must be greater than 0"),(0,e.go)((async function*(){let e=[];for await(const t of n)e.push(t),e.length>=r&&(yield e,e=[]);e.length&&(yield e)}))},lt}(),e),n(jt,e),n($n,e),n(function(){if(Jn)return Wn;Jn=1,Wn.chunk=void 0;const e=ft,t=Ii();return Wn.chunk=function(n,r){return(0,t.assert)(Number.isInteger(r),"The parameter size must be an integer"),(0,t.assert)(r>0,"The parameter size must be greater than 0"),(0,e.go)((function*(){let e=[];for(const t of n)e.push(t),e.length>=r&&(yield e,e=[]);e.length&&(yield e)}))},Wn}(),e),n(Gn,e),n(Qn,e),n(function(){if(Xn)return Yn;Xn=1,Yn.dropAsync=void 0;const e=ft,t=er,n=Ii();return Yn.dropAsync=function(r,o){return(0,n.assert)(Number.isInteger(o),"The parameter count must be an integer"),(0,n.assert)(o>=0,"The parameter count must be greater than or equal to 0"),0===o?(0,t.copyAsyncIterable)(r):(0,e.go)((async function*(){var e;const t=r[Symbol.asyncIterator]();let n;try{let r;for(;({value:r,done:n}=await t.next()),!(n||o<=0);)o--;for(;!n;)yield r,({value:r,done:n}=await t.next())}finally{n||await(null===(e=t.return)||void 0===e?void 0:e.call(t))}}))},Yn}(),e),n(function(){if(tr)return nr;tr=1,nr.dropRightAsync=void 0;const e=ft,t=er,n=Ii();return nr.dropRightAsync=function(r,o){return(0,n.assert)(Number.isInteger(o),"The parameter count must be an integer"),(0,n.assert)(o>=0,"The parameter count must be greater than or equal to 0"),0===o?(0,t.copyAsyncIterable)(r):(0,e.go)((async function*(){const e=(await async function(e){const t=[];for await(const n of e)t.push(n);return t}(r)).slice(0,-o);for(const t of e)yield t}))},nr}(),e),n(function(){if(rr)return or;rr=1,or.dropRight=void 0;const e=ft,t=er,n=Ii();return or.dropRight=function(r,o){return(0,n.assert)(Number.isInteger(o),"The parameter count must be an integer"),(0,n.assert)(o>=0,"The parameter count must be greater than or equal to 0"),0===o?(0,t.copyIterable)(r):(0,e.go)((function*(){const e=Array.from(r);yield*e.slice(0,-o)}))},or}(),e),n(ir,e),n(ar,e),n(function(){if(cr)return ur;cr=1,ur.drop=void 0;const e=ft,t=er,n=Ii();return ur.drop=function(r,o){return(0,n.assert)(Number.isInteger(o),"The parameter count must be an integer"),(0,n.assert)(o>=0,"The parameter count must be greater than or equal to 0"),0===o?(0,t.copyIterable)(r):(0,e.go)((function*(){var e;const t=r[Symbol.iterator]();let n;try{let r;for(;({value:r,done:n}=t.next()),!(n||o<=0);)o--;for(;!n;)yield r,({value:r,done:n}=t.next())}finally{n||null===(e=t.return)||void 0===e||e.call(t)}}))},ur}(),e),n(lr,e),n(dr,e),n(function(){if(wr)return hr;wr=1,hr.flattenAsync=void 0;const e=Ar();return hr.flattenAsync=function(t){return(0,e.flattenDeepAsync)(t,1)},hr}(),e),n(yr,e),n(_r,e),n(Ar(),e),n(Rr(),e),n(function(){if(Cr)return Or;Cr=1,Or.flatten=void 0;const e=Rr();return Or.flatten=function(t){return(0,e.flattenDeep)(t,1)},Or}(),e),n(xr,e),n(Nr,e),n(Fr(),e),n(Lr(),e),n(function(){if(Mr)return Dr;Mr=1,Dr.sliceAsync=void 0;const e=ft,t=Ii();return Dr.sliceAsync=function(n,r,o=1/0){return(0,t.assert)(Number.isInteger(r),"The parameter start must be an integer"),(0,t.assert)(r>=0,"The parameter start must be greater than or equal to 0"),(0,t.assert)(Number.isInteger(o),"The parameter end must be an integer"),(0,t.assert)(o>=r,"The parameter end must be greater than or equal to start"),(0,e.go)((async function*(){let e=0;for await(const t of n){if(e>=o)break;e>=r&&(yield t),e++}}))},Dr}(),e),n(function(){if(Br)return Hr;Br=1,Hr.slice=void 0;const e=ft,t=Ii();return Hr.slice=function(n,r,o=1/0){return(0,t.assert)(Number.isInteger(r),"The parameter start must be an integer"),(0,t.assert)(r>=0,"The parameter start must be greater than or equal to 0"),(0,t.assert)(Number.isInteger(o),"The parameter end must be an integer"),(0,t.assert)(o>=r,"The parameter end must be greater than or equal to start"),(0,e.go)((function*(){let e=0;for(const t of n){if(e>=o)break;e>=r&&(yield t),e++}}))},Hr}(),e),n(zr,e),n($r,e),n(Wr,e),n(Gr,e),n(function(){if(Vr)return Kr;Vr=1,Kr.takeAsync=void 0;const e=ft,t=Ii();return Kr.takeAsync=function(n,r){return(0,t.assert)(Number.isInteger(r),"The parameter count must be an integer"),(0,t.assert)(r>=0,"The parameter count must be greater than or equal to 0"),(0,e.go)((async function*(){if(0!==r)for await(const e of n)if(yield e,0==--r)break}))},Kr}(),e),n(function(){if(Qr)return Zr;Qr=1,Zr.takeRightAsync=void 0;const e=ft,t=Ii();return Zr.takeRightAsync=function(n,r){return(0,t.assert)(Number.isInteger(r),"The parameter count must be an integer"),(0,t.assert)(r>=0,"The parameter count must be greater than or equal to 0"),(0,e.go)((async function*(){var e;const t=n[Symbol.asyncIterator]();let o;try{const n=[];let i;for(;({value:i,done:o}=await t.next()),!o;)n.push(i),n.length>r&&n.shift();yield*n}finally{o||await(null===(e=t.return)||void 0===e?void 0:e.call(t))}}))},Zr}(),e),n(function(){if(Xr)return Yr;Xr=1,Yr.takeRight=void 0;const e=ft,t=Ii();return Yr.takeRight=function(n,r){return(0,t.assert)(Number.isInteger(r),"The parameter count must be an integer"),(0,t.assert)(r>=0,"The parameter count must be greater than or equal to 0"),(0,e.go)((function*(){var e;const t=n[Symbol.iterator]();let o;try{const n=[];let i;for(;({value:i,done:o}=t.next()),!o;)n.push(i),n.length>r&&n.shift();yield*n}finally{o||null===(e=t.return)||void 0===e||e.call(t)}}))},Yr}(),e),n(eo,e),n(no,e),n(function(){if(ro)return oo;ro=1,oo.take=void 0;const e=ft,t=Ii();return oo.take=function(n,r){return(0,t.assert)(Number.isInteger(r),"The parameter count must be an integer"),(0,t.assert)(r>=0,"The parameter count must be greater than or equal to 0"),(0,e.go)((function*(){if(0!==r)for(const e of n)if(yield e,0==--r)break}))},oo}(),e),n(io,e),n(ao,e),n(co,e),n(uo,e),n(lo,e),n(fo,e),n(ho,e),n(yo,e),n(mo,e),n(vo,e),n(Ao,e)}(ut)),ut}Ao.zip=void 0,Ao.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 o=0;o<t;o++){const{value:t,done:i}=n[o].next();if(i)return void(r[o]=!0);e[o]=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)};var So={},To={};To.consume=void 0,To.consume=function(e,t){return t(e)};var Eo={eachAsync:void 0};const ko=Ft;Eo.eachAsync=function(e,t){return(0,ko.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 Ro={};Ro.each=void 0,Ro.each=function(e,t){let n=0;for(const r of e)t(r,n),n++};var Co={everyAsync:void 0};const Oo=Ft;Co.everyAsync=function(e,t){return(0,Oo.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 xo={};xo.every=void 0,xo.every=function(e,t){let n=0;for(const r of e){if(!t(r,n))return!1;n++}return!0};var Po={findAsync:void 0};const No=Ft;Po.findAsync=function(e,t){return(0,No.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 Io={};Io.find=void 0,Io.find=function(e,t){let n=0;for(const r of e){if(t(r,n))return r;n++}};var jo={};jo.firstAsync=void 0,jo.firstAsync=async function(e){for await(const t of e)return t};var Fo={};Fo.first=void 0,Fo.first=function(e){for(const t of e)return t};var Uo={};Uo.includesAsync=void 0,Uo.includesAsync=async function(e,t){for await(const n of e)if(n===t)return!0;return!1};var qo={};qo.includes=void 0,qo.includes=function(e,t){for(const n of e)if(n===t)return!0;return!1};var Lo={};Lo.matchAsync=void 0,Lo.matchAsync=async function(e,t){const n=t.length;let r=0;for await(const o of e)if(o===t[r]&&r++,r===n)return!0;return!1};var Mo={};Mo.match=void 0,Mo.match=function(e,t){const n=t.length;let r=0;for(const o of e)if(o===t[r]&&r++,r===n)return!0;return!1};var Do={reduceAsync:void 0};const Bo=Ft;Do.reduceAsync=function(e,t,n){return(0,Bo.isUndefined)(n)?function(e,t){return(0,Bo.isAsyncIterable)(e)?n(e):r(e);async function n(e){var n;const r=e[Symbol.asyncIterator]();let o;try{let e,s=await i(r),a=1;for(;({value:e,done:o}=await r.next()),!o;)s=await t(s,e,a++);return s}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function i(e){const t=await e.next();if(t.done)throw o=!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 o;try{let e,s=i(r),a=1;for(;({value:e,done:o}=r.next()),!o;)s=await t(s,e,a++);return s}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(e){const t=e.next();if(t.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return t.value}}}(e,t):function(e,t,n){return(0,Bo.isAsyncIterable)(e)?o(e):r(e);async function r(e){let r=n,o=0;for(const n of e)r=await t(r,n,o++);return r}async function o(e){let r=n,o=0;for await(const n of e)r=await t(r,n,o++);return r}}(e,t,n)};var Ho={reduce:void 0};const zo=Ft;Ho.reduce=function(e,t,n){return(0,zo.isUndefined)(n)?function(e,t){var n;const r=e[Symbol.iterator]();let o;try{let e,s=i(r),a=1;for(;({value:e,done:o}=r.next()),!o;)s=t(s,e,a++);return s}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(e){const t=e.next();if(t.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return t.value}}(e,t):function(e,t,n){let r=n,o=0;for(const n of e)r=t(r,n,o++);return r}(e,t,n)};var $o={someAsync:void 0};const Jo=Ft;$o.someAsync=function(e,t){return(0,Jo.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 Wo={};Wo.some=void 0,Wo.some=function(e,t){let n=0;for(const r of e){if(t(r,n))return!0;n++}return!1};var Go={};Go.lastAsync=void 0,Go.lastAsync=async function(e){var t;const n=e[Symbol.asyncIterator]();let r;try{let e,o;for(;({value:e,done:r}=await n.next()),!r;)o=e;return o}finally{r||await(null===(t=n.return)||void 0===t?void 0:t.call(n))}};var Vo={};Vo.last=void 0,Vo.last=function(e){var t;const n=e[Symbol.iterator]();let r;try{let e,o;for(;({value:e,done:r}=n.next()),!r;)o=e;return o}finally{r||null===(t=n.return)||void 0===t||t.call(n)}};var Ko={toArrayAsync:void 0};const Qo=To;Ko.toArrayAsync=function(e){return(0,Qo.consume)(e,(async e=>{const t=[];for await(const n of e)t.push(n);return t}))};var Zo={toArray:void 0};const Xo=To;Zo.toArray=function(e){return(0,Xo.consume)(e,(e=>Array.from(e)))};var Yo={toSetAsync:void 0};const ei=To;Yo.toSetAsync=function(e){return(0,ei.consume)(e,(async e=>{const t=new Set;for await(const n of e)t.add(n);return t}))};var ti={toSet:void 0};const ni=To;ti.toSet=function(e){return(0,ni.consume)(e,(e=>new Set(e)))};var ri={};ri.count=void 0,ri.count=function(e){let t=0;for(const n of e)t++;return t};var oi={};oi.countAsync=void 0,oi.countAsync=async function(e){let t=0;for await(const n of e)t++;return t};var ii={groupBy:void 0};const si=Ro;ii.groupBy=function(e,t){const n=new Map;return(0,si.each)(e,((e,r)=>{const o=t(e,r);n.has(o)||n.set(o,[]),n.get(o).push(e)})),n};var ai={groupByAsync:void 0};const ci=Eo;var ui;function li(){return ui||(ui=1,function(e){var t=o&&o.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(_o(),e),n(So,e)}(ct)),ct}ai.groupByAsync=async function(e,t){const n=new Map;return await(0,ci.eachAsync)(e,(async(e,r)=>{const o=await t(e,r);n.has(o)||n.set(o,[]),n.get(o).push(e)})),n},function(e){var t=o&&o.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(To,e),n(Eo,e),n(Ro,e),n(Co,e),n(xo,e),n(Po,e),n(Io,e),n(jo,e),n(Fo,e),n(Uo,e),n(qo,e),n(Lo,e),n(Mo,e),n(Do,e),n(Ho,e),n($o,e),n(Wo,e),n(Go,e),n(Vo,e),n(Ko,e),n(Zo,e),n(Yo,e),n(ti,e),n(ri,e),n(oi,e),n(ii,e),n(ai,e)}(So);var fi={},di={};di.traverseErrorPrototypeChain=void 0,di.traverseErrorPrototypeChain=function*(e){let t=e;for(;(t=Object.getPrototypeOf(t))&&(yield t,t!==Error.prototype););},fi.getErrorNames=void 0;const hi=g,pi=di;fi.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 yi={isSerializableError:void 0};const mi=g;var vi;function gi(){if(vi)return at;vi=1,at.CustomError=void 0;const e=li(),t=fi,n=g,r=yi;class o extends Error{get name(){var n,r;return null!==(r=null!==(n=(0,e.first)((0,t.getErrorNames)(this)))&&void 0!==n?n:o.name)&&void 0!==r?r:"CustomError"}static[Symbol.hasInstance](o){var i;if((0,n.isError)(o)||(0,r.isSerializableError)(o)){const n=[null!==(i=this.prototype.constructor.name)&&void 0!==i?i:this.name,...(0,t.getErrorNames)(this.prototype)].reverse(),r=(0,e.toArray)((0,t.getErrorNames)(o)).reverse();return n.every(((e,t)=>e===r[t]))}return!1}}return at.CustomError=o,at}yi.isSerializableError=function(e){return(0,mi.isObject)(e)&&(0,mi.isString)(e.name)&&(0,mi.isString)(e.message)&&((0,mi.isString)(e.stack)||(0,mi.isNull)(e.stack))&&(0,mi.isArray)(e.ancestors)&&e.ancestors.every(mi.isString)};var bi,wi={};function Ai(){if(bi)return wi;bi=1,wi.AssertionError=void 0;const e=gi();class t extends e.CustomError{}return wi.AssertionError=t,wi}var _i,Si={};var Ti={},Ei={},ki={};ki.pass=void 0,ki.pass=function(){};var Ri={};Ri.passAsync=void 0,Ri.passAsync=async function(){},function(e){var t=o&&o.__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]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(ki,e),n(Ri,e)}(Ei),Ti.hydrate=void 0;const Ci=Ei;function Oi(e,t){const n=function(){(0,Ci.pass)()};return(n.prototype=Object.create(e.prototype)).constructor=n,Object.defineProperty(n,"name",{value:t}),n}Ti.hydrate=function(e){var t;const n=[e.name,...e.ancestors].slice(0,-1).reverse();let r=Error;for(const e of n)r=Oi(r,e);const o=new r;return o.name=e.name,o.message=e.message,o.stack=null!==(t=e.stack)&&void 0!==t?t:void 0,o};var xi,Pi,Ni={};function Ii(){return Pi||(Pi=1,function(e){var t=o&&o.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(gi(),e),n(Ai(),e),n(yi,e),n(function(){if(_i)return Si;_i=1,Si.normalize=void 0;const e=fi,t=li();return Si.normalize=function(n){var r;const[o,...i]=(0,t.toArray)((0,e.getErrorNames)(n));return{name:o,ancestors:i,message:n.message,stack:null!==(r=n.stack)&&void 0!==r?r:null}},Si}(),e),n(Ti,e),n(function(){if(xi)return Ni;xi=1,Ni.assert=void 0;const e=Ai();return Ni.assert=function(t,n){if(!t)throw new e.AssertionError(n)},Ni}(),e),n(fi,e),n(di,e)}(st)),st}ot.csv=void 0;const ji=i,Fi=it.exports,Ui=Ii();function qi(e){const t=Object.keys(e[0]);return(0,Fi.unparse)({data:e,fields:t})}ot.csv=function(e){return(0,Ui.assert)(e.length>0,"payload must be a non-empty array"),t=>{const n=new ji.Headers(t.headers);return n.set("Content-Type","text/csv"),{...t,headers:n,payload:qi(e)}}};var Li={};Li.signal=void 0,Li.signal=function(e){return t=>({...t,signal:e})};var Mi={header:void 0};const Di=i;Mi.header=function(e,t){return n=>{const r=new Di.Headers(n.headers);return r.set(e,t),{...n,headers:r}}};var Bi={appendHeader:void 0};const Hi=i;Bi.appendHeader=function(e,t){return n=>{const r=new Hi.Headers(n.headers);return r.append(e,t),{...n,headers:r}}};var zi={headers:void 0};const $i=i;zi.headers=function(e){return t=>{const n=new $i.Headers(t.headers);for(const[t,r]of Object.entries(e))n.set(t,r);return{...t,headers:n}}};var Ji={accept:void 0};const Wi=Bi;Ji.accept=function(e){return(0,Wi.appendHeader)("Accept",e)};var Gi={};Gi.host=void 0,Gi.host=function(e){return t=>{const n=new URL(t.url.href);return n.host=e,{...t,url:n}}};var Vi={};Vi.port=void 0,Vi.port=function(e){return t=>{const n=new URL(t.url.href);return n.port=e.toString(),{...t,url:n}}};var Ki={};Ki.pathname=void 0,Ki.pathname=function(e){return t=>{const n=new URL(t.url.href);return n.pathname=e,{...t,url:n}}};var Qi={};Qi.search=void 0,Qi.search=function(e){return t=>{const n=new URL(t.url.href);return n.search=e,{...t,url:n}}};var Zi={};Zi.searchParam=void 0,Zi.searchParam=function(e,t){return n=>{const r=new URL(n.url.href),o=new URLSearchParams(r.searchParams);return o.set(e,t.toString()),r.search=o.toString(),{...n,url:r}}};var Xi={};Xi.searchParams=void 0,Xi.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(),{...t,url:n}}};var Yi={};Yi.appendSearchParam=void 0,Yi.appendSearchParam=function(e,t){return n=>{const r=new URL(n.url.href),o=new URLSearchParams(r.searchParams);return o.append(e,t.toString()),r.search=o.toString(),{...n,url:r}}};var es={formDataField:void 0};const ts=i,ns=g;es.formDataField=function(e,t){return n=>{const r=n.payload instanceof ts.FormData?function(e){const t=new ts.FormData;for(const[n,r]of e.entries())t.append(n,r);return t}(n.payload):new ts.FormData;return(0,ns.isArray)(t)?t.forEach((t=>r.append(e,t))):r.append(e,t),{...n,payload:r}}};var rs={},os={exports:{}};!function(e,t){var n,r,o,i,s,a,c,u,l,f,d,h,p,y,m,v,g,b,w,A,_,S,T,E,k,R,C,O,x,P,N,I,j,F,U,q,L,M,D,B,H;"undefined"!=typeof self?self:"undefined"!=typeof window&&window,e.exports=(r=n="3.7.2",o="function"==typeof atob,i="function"==typeof btoa,s="function"==typeof Buffer,a="function"==typeof TextDecoder?new TextDecoder:void 0,c="function"==typeof TextEncoder?new TextEncoder:void 0,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=Array.prototype.slice.call(u),H={},l.forEach((function(e,t){return H[e]=t})),f=H,d=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,h=String.fromCharCode.bind(String),p="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(e,t){return void 0===t&&(t=function(e){return e}),new Uint8Array(Array.prototype.slice.call(e,0).map(t))},y=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"}))},m=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},v=function(e){for(var t,n,r,o,i="",s=e.length%3,a=0;a<e.length;){if((n=e.charCodeAt(a++))>255||(r=e.charCodeAt(a++))>255||(o=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");i+=l[(t=n<<16|r<<8|o)>>18&63]+l[t>>12&63]+l[t>>6&63]+l[63&t]}return s?i.slice(0,s-3)+"===".substring(s):i},b=s?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=4096,n=[],r=0,o=e.length;r<o;r+=t)n.push(h.apply(null,e.subarray(r,r+t)));return g(n.join(""))},A=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?h(192|t>>>6)+h(128|63&t):h(224|t>>>12&15)+h(128|t>>>6&63)+h(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return h(240|t>>>18&7)+h(128|t>>>12&63)+h(128|t>>>6&63)+h(128|63&t)},_=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,T=s?function(e){return Buffer.from(e,"utf8").toString("base64")}:c?function(e){return b(c.encode(e))}:function(e){return g(S(e))},k=function(e){return E(e,!0)},R=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,C=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return h(55296+(t>>>10))+h(56320+(1023&t));case 3:return h((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return h((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},x=function(e){if(e=e.replace(/\s+/g,""),!d.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));for(var t,n,r,o="",i=0;i<e.length;)t=f[e.charAt(i++)]<<18|f[e.charAt(i++)]<<12|(n=f[e.charAt(i++)])<<6|(r=f[e.charAt(i++)]),o+=64===n?h(t>>16&255):64===r?h(t>>16&255,t>>8&255):h(t>>16&255,t>>8&255,255&t);return o},N=s?function(e){return p(Buffer.from(e,"base64"))}:function(e){return p(P(e),(function(e){return e.charCodeAt(0)}))},I=function(e){return N(F(e))},j=s?function(e){return Buffer.from(e,"base64").toString("utf8")}:a?function(e){return a.decode(N(e))}:function(e){return O(P(e))},F=function(e){return m(e.replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})))},q=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}},L=function(){var e=function(e,t){return Object.defineProperty(String.prototype,e,q(t))};e("fromBase64",(function(){return U(this)})),e("toBase64",(function(e){return E(this,e)})),e("toBase64URI",(function(){return E(this,!0)})),e("toBase64URL",(function(){return E(this,!0)})),e("toUint8Array",(function(){return I(this)}))},M=function(){var e=function(e,t){return Object.defineProperty(Uint8Array.prototype,e,q(t))};e("toBase64",(function(e){return w(this,e)})),e("toBase64URI",(function(){return w(this,!0)})),e("toBase64URL",(function(){return w(this,!0)}))},D=function(){L(),M()},B={version:n,VERSION:r,atob:P=o?function(e){return atob(m(e))}:s?function(e){return Buffer.from(e,"base64").toString("binary")}:x,atobPolyfill:x,btoa:g=i?function(e){return btoa(e)}:s?function(e){return Buffer.from(e,"binary").toString("base64")}:v,btoaPolyfill:v,fromBase64:U=function(e){return j(F(e))},toBase64:E=function(e,t){return void 0===t&&(t=!1),t?y(T(e)):T(e)},encode:E,encodeURI:k,encodeURL:k,utob:S=function(e){return e.replace(_,A)},btou:O=function(e){return e.replace(R,C)},decode:U,isValid:function(e){if("string"!=typeof e)return!1;var t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:w=function(e,t){return void 0===t&&(t=!1),t?y(b(e)):b(e)},toUint8Array:I,extendString:L,extendUint8Array:M,extendBuiltins:D,Base64:{}},Object.keys(B).forEach((function(e){return B.Base64[e]=B[e]})),B)}(os),rs.basicAuth=void 0;const is=Mi,ss=os.exports;rs.basicAuth=function(e,t){return(0,is.header)("Authorization","Basic "+(0,ss.btoa)(`${e}:${t}`))};var as={bearerAuth:void 0};const cs=Mi;as.bearerAuth=function(e){return(0,cs.header)("Authorization",`Bearer ${e}`)};var us={};us.keepalive=void 0,us.keepalive=function(e=!0){return t=>({...t,keepalive:e})},function(e){var t=o&&o.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(Ye,e),n(et,e),n(nt,e),n(ot,e),n(Li,e),n(Mi,e),n(Bi,e),n(zi,e),n(Ji,e),n(Gi,e),n(Vi,e),n(Ki,e),n(Qi,e),n(Zi,e),n(Xi,e),n(Yi,e),n(es,e),n(rs,e),n(as,e),n(us,e)}(Xe);var ls={},fs={},ds={},hs={},ps={CustomError:void 0};class ys extends Error{get name(){return this.constructor.name}}ps.CustomError=ys;var ms={ExpectedError:void 0};const vs=ps;class gs extends vs.CustomError{}ms.ExpectedError=gs;var bs={AssertionError:void 0};const ws=ps;class As extends ws.CustomError{}bs.AssertionError=As;var _s={};_s.normalize=void 0,_s.normalize=function(e){var t;return{name:e.name,message:e.message,stack:null!==(t=e.stack)&&void 0!==t?t:null}};var Ss={refute:void 0};const Ts=ms;Ss.refute=function(e,t){if(e)throw new Ts.ExpectedError(t)};var Es={assert:void 0};const ks=bs;Es.assert=function(e,t){if(!e)throw new ks.AssertionError(t)},function(e){var t=o&&o.__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]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(ps,e),n(ms,e),n(bs,e),n(_s,e),n(Ss,e),n(Es,e)}(hs),ds.HTTPError=void 0;const Rs=hs;ds.HTTPError=class extends Rs.CustomError{constructor(e,t){super(t),this.code=e}};var Cs={},Os={};!function(e){e.ServerError=e.ClientError=e.Redirection=e.Successful=e.Informational=void 0,function(e){e[e.Continue=100]="Continue",e[e.SwitchingProtocol=101]="SwitchingProtocol",e[e.Processing=102]="Processing",e[e.EarlyHints=103]="EarlyHints"}(e.Informational||(e.Informational={})),function(e){e[e.OK=200]="OK",e[e.Created=201]="Created",e[e.Accepted=202]="Accepted",e[e.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",e[e.NoContent=204]="NoContent",e[e.ResetContent=205]="ResetContent",e[e.PartialContent=206]="PartialContent",e[e.MultiStatus=207]="MultiStatus",e[e.AlreadyReported=208]="AlreadyReported",e[e.IMUsed=226]="IMUsed"}(e.Successful||(e.Successful={})),function(e){e[e.MultipleChoice=300]="MultipleChoice",e[e.MovedPermanently=3011]="MovedPermanently",e[e.Found=302]="Found",e[e.SeeOther=303]="SeeOther",e[e.NotModified=304]="NotModified",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect"}(e.Redirection||(e.Redirection={})),function(e){e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.MethodNotAllowed=405]="MethodNotAllowed",e[e.NotAcceptable=406]="NotAcceptable",e[e.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",e[e.RequestTimeout=408]="RequestTimeout",e[e.Conflict=409]="Conflict",e[e.Gone=410]="Gone",e[e.LengthRequired=411]="LengthRequired",e[e.PreconditionFailed=412]="PreconditionFailed",e[e.PayloadTooLarge=413]="PayloadTooLarge",e[e.URITooLong=414]="URITooLong",e[e.UnsupportedMediaType=415]="UnsupportedMediaType",e[e.RangeNotSatisfiable=416]="RangeNotSatisfiable",e[e.ExpectationFailed=417]="ExpectationFailed",e[e.MisdirectedRequest=421]="MisdirectedRequest",e[e.UnprocessableEntity=422]="UnprocessableEntity",e[e.Locked=423]="Locked",e[e.FailedDependency=424]="FailedDependency",e[e.UpgradeRequired=426]="UpgradeRequired",e[e.PreconditionRequired=428]="PreconditionRequired",e[e.TooManyRequests=429]="TooManyRequests",e[e.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",e[e.UnavailableForLegalReasons=451]="UnavailableForLegalReasons"}(e.ClientError||(e.ClientError={})),function(e){e[e.InternalServerError=500]="InternalServerError",e[e.NotImplemented=501]="NotImplemented",e[e.BadGateway=502]="BadGateway",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout",e[e.HTTPVersionNotSupported=505]="HTTPVersionNotSupported",e[e.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",e[e.InsufficientStorage=507]="InsufficientStorage",e[e.LoopDetected=508]="LoopDetected",e[e.NotExtended=510]="NotExtended",e[e.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(e.ServerError||(e.ServerError={}))}(Os),Cs.EarlyHints=Cs.Processing=Cs.SwitchingProtocol=Cs.Continue=Cs.HTTPInformational=void 0;const xs=Os;class Ps{constructor(e,t){this.code=e,this.message=t}}Cs.HTTPInformational=Ps;Cs.Continue=class extends Ps{constructor(){super(xs.Informational.Continue,"Continue")}};Cs.SwitchingProtocol=class extends Ps{constructor(){super(xs.Informational.SwitchingProtocol,"Switching Protocol")}};Cs.Processing=class extends Ps{constructor(){super(xs.Informational.Processing,"Processing")}};Cs.EarlyHints=class extends Ps{constructor(){super(xs.Informational.EarlyHints,"Early Hints")}};var Ns={};Ns.IMUsed=Ns.AlreadyReported=Ns.MultiStatus=Ns.PartialContent=Ns.ResetContent=Ns.NoContent=Ns.NonAuthoritativeInformation=Ns.Accepted=Ns.Created=Ns.OK=Ns.HTTPSuccessful=void 0;const Is=Os;class js{constructor(e,t){this.code=e,this.message=t}}Ns.HTTPSuccessful=js;Ns.OK=class extends js{constructor(){super(Is.Successful.OK,"OK")}};Ns.Created=class extends js{constructor(){super(Is.Successful.Created,"Created")}};Ns.Accepted=class extends js{constructor(){super(Is.Successful.Accepted,"Accepted")}};Ns.NonAuthoritativeInformation=class extends js{constructor(){super(Is.Successful.NonAuthoritativeInformation,"Non-Authoritative Information")}};Ns.NoContent=class extends js{constructor(){super(Is.Successful.NoContent,"No Content")}};Ns.ResetContent=class extends js{constructor(){super(Is.Successful.ResetContent,"Reset Content")}};Ns.PartialContent=class extends js{constructor(){super(Is.Successful.PartialContent,"Partial Content")}};Ns.MultiStatus=class extends js{constructor(){super(Is.Successful.MultiStatus,"Multi-Status")}};Ns.AlreadyReported=class extends js{constructor(){super(Is.Successful.AlreadyReported,"Already Reported")}};Ns.IMUsed=class extends js{constructor(){super(Is.Successful.IMUsed,"IM Used")}};var Fs={};Fs.PermanentRedirect=Fs.TemporaryRedirect=Fs.NotModified=Fs.SeeOther=Fs.Found=Fs.MovedPermanently=Fs.MultipleChoice=Fs.HTTPRedirection=void 0;const Us=Os;class qs{constructor(e,t){this.code=e,this.message=t}}Fs.HTTPRedirection=qs;Fs.MultipleChoice=class extends qs{constructor(){super(Us.Redirection.MultipleChoice,"Multiple Choice")}};Fs.MovedPermanently=class extends qs{constructor(){super(Us.Redirection.MovedPermanently,"Moved Permanently")}};Fs.Found=class extends qs{constructor(){super(Us.Redirection.Found,"Found")}};Fs.SeeOther=class extends qs{constructor(){super(Us.Redirection.SeeOther,"See Other")}};Fs.NotModified=class extends qs{constructor(){super(Us.Redirection.NotModified,"Not Modified")}};Fs.TemporaryRedirect=class extends qs{constructor(){super(Us.Redirection.TemporaryRedirect,"Temporary Redirect")}};Fs.PermanentRedirect=class extends qs{constructor(){super(Us.Redirection.PermanentRedirect,"Permanent Redirect")}};var Ls={};Ls.UnavailableForLegalReasons=Ls.RequestHeaderFieldsTooLarge=Ls.TooManyRequests=Ls.PreconditionRequired=Ls.UpgradeRequired=Ls.FailedDependency=Ls.Locked=Ls.UnprocessableEntity=Ls.MisdirectedRequest=Ls.ExpectationFailed=Ls.RangeNotSatisfiable=Ls.UnsupportedMediaType=Ls.URITooLong=Ls.PayloadTooLarge=Ls.PreconditionFailed=Ls.LengthRequired=Ls.Gone=Ls.Conflict=Ls.RequestTimeout=Ls.ProxyAuthenticationRequired=Ls.NotAcceptable=Ls.MethodNotAllowed=Ls.NotFound=Ls.Forbidden=Ls.Unauthorized=Ls.BadRequest=Ls.HTTPClientError=void 0;const Ms=ds,Ds=Os;class Bs extends Ms.HTTPError{}Ls.HTTPClientError=Bs;Ls.BadRequest=class extends Bs{constructor(e){super(Ds.ClientError.BadRequest,null!=e?e:"Bad Request")}};Ls.Unauthorized=class extends Bs{constructor(e){super(Ds.ClientError.Unauthorized,null!=e?e:"Unauthorized")}};Ls.Forbidden=class extends Bs{constructor(e){super(Ds.ClientError.Forbidden,null!=e?e:"Forbidden")}};Ls.NotFound=class extends Bs{constructor(e){super(Ds.ClientError.NotFound,null!=e?e:"Not Found")}};Ls.MethodNotAllowed=class extends Bs{constructor(e){super(Ds.ClientError.MethodNotAllowed,null!=e?e:"Method Not Allowed")}};Ls.NotAcceptable=class extends Bs{constructor(e){super(Ds.ClientError.NotAcceptable,null!=e?e:"Not Acceptable")}};Ls.ProxyAuthenticationRequired=class extends Bs{constructor(e){super(Ds.ClientError.ProxyAuthenticationRequired,null!=e?e:"Proxy Authentication Required")}};Ls.RequestTimeout=class extends Bs{constructor(e){super(Ds.ClientError.RequestTimeout,null!=e?e:"Request Timeout")}};Ls.Conflict=class extends Bs{constructor(e){super(Ds.ClientError.Conflict,null!=e?e:"Conflict")}};Ls.Gone=class extends Bs{constructor(e){super(Ds.ClientError.Gone,null!=e?e:"Gone")}};Ls.LengthRequired=class extends Bs{constructor(e){super(Ds.ClientError.LengthRequired,null!=e?e:"Length Required")}};Ls.PreconditionFailed=class extends Bs{constructor(e){super(Ds.ClientError.PreconditionFailed,null!=e?e:"Precondition Failed")}};Ls.PayloadTooLarge=class extends Bs{constructor(e){super(Ds.ClientError.PayloadTooLarge,null!=e?e:"Payload Too Large")}};Ls.URITooLong=class extends Bs{constructor(e){super(Ds.ClientError.URITooLong,null!=e?e:"URI Too Long")}};Ls.UnsupportedMediaType=class extends Bs{constructor(e){super(Ds.ClientError.UnsupportedMediaType,null!=e?e:"Unsupported Media Type")}};Ls.RangeNotSatisfiable=class extends Bs{constructor(e){super(Ds.ClientError.RangeNotSatisfiable,null!=e?e:"Range Not Satisfiable")}};Ls.ExpectationFailed=class extends Bs{constructor(e){super(Ds.ClientError.ExpectationFailed,null!=e?e:"Expectation Failed")}};Ls.MisdirectedRequest=class extends Bs{constructor(e){super(Ds.ClientError.MisdirectedRequest,null!=e?e:"Misdirected Request")}};Ls.UnprocessableEntity=class extends Bs{constructor(e){super(Ds.ClientError.UnprocessableEntity,null!=e?e:"Unprocessable Entity")}};Ls.Locked=class extends Bs{constructor(e){super(Ds.ClientError.Locked,null!=e?e:"Locked")}};Ls.FailedDependency=class extends Bs{constructor(e){super(Ds.ClientError.FailedDependency,null!=e?e:"Failed Dependency")}};Ls.UpgradeRequired=class extends Bs{constructor(e){super(Ds.ClientError.UpgradeRequired,null!=e?e:"Upgrade Required")}};Ls.PreconditionRequired=class extends Bs{constructor(e){super(Ds.ClientError.PreconditionRequired,null!=e?e:"Precondition Required")}};Ls.TooManyRequests=class extends Bs{constructor(e){super(Ds.ClientError.TooManyRequests,null!=e?e:"Too Many Requests")}};Ls.RequestHeaderFieldsTooLarge=class extends Bs{constructor(e){super(Ds.ClientError.RequestHeaderFieldsTooLarge,null!=e?e:"Request Header Fields Too Large")}};Ls.UnavailableForLegalReasons=class extends Bs{constructor(e){super(Ds.ClientError.UnavailableForLegalReasons,null!=e?e:"Unavailable For Legal Reasons")}};var Hs={};Hs.NetworkAuthenticationRequired=Hs.NotExtended=Hs.LoopDetected=Hs.InsufficientStorage=Hs.VariantAlsoNegotiates=Hs.HTTPVersionNotSupported=Hs.GatewayTimeout=Hs.ServiceUnavailable=Hs.BadGateway=Hs.NotImplemented=Hs.InternalServerError=Hs.HTTPServerError=void 0;const zs=ds,$s=Os;class Js extends zs.HTTPError{}Hs.HTTPServerError=Js;Hs.InternalServerError=class extends Js{constructor(e){super($s.ServerError.InternalServerError,null!=e?e:"Internal Server Error")}};Hs.NotImplemented=class extends Js{constructor(e){super($s.ServerError.NotImplemented,null!=e?e:"Not Implemented")}};Hs.BadGateway=class extends Js{constructor(e){super($s.ServerError.BadGateway,null!=e?e:"Bad Gateway")}};Hs.ServiceUnavailable=class extends Js{constructor(e){super($s.ServerError.ServiceUnavailable,null!=e?e:"Service Unavailable")}};Hs.GatewayTimeout=class extends Js{constructor(e){super($s.ServerError.GatewayTimeout,null!=e?e:"Gateway Timeout")}};Hs.HTTPVersionNotSupported=class extends Js{constructor(e){super($s.ServerError.HTTPVersionNotSupported,null!=e?e:"HTTP Version Not Supported")}};Hs.VariantAlsoNegotiates=class extends Js{constructor(e){super($s.ServerError.VariantAlsoNegotiates,null!=e?e:"Variant Also Negotiates")}};Hs.InsufficientStorage=class extends Js{constructor(e){super($s.ServerError.InsufficientStorage,null!=e?e:"Insufficient Storage")}};Hs.LoopDetected=class extends Js{constructor(e){super($s.ServerError.LoopDetected,null!=e?e:"Loop Detected")}};Hs.NotExtended=class extends Js{constructor(e){super($s.ServerError.NotExtended,null!=e?e:"Not Extended")}};Hs.NetworkAuthenticationRequired=class extends Js{constructor(e){super($s.ServerError.NetworkAuthenticationRequired,null!=e?e:"Network Authentication Required")}};var Ws={};Ws.fromCode=Ws.UnknownHTTPStatusError=void 0;const Gs=Cs,Vs=Ns,Ks=Fs,Qs=Ls,Zs=Hs;class Xs extends Error{constructor(e){super(`The HTTP status code ${e} is unknown`),this.name=this.constructor.name}}Ws.UnknownHTTPStatusError=Xs,Ws.fromCode=function(e,t){switch(e){case 100:return new Gs.Continue;case 101:return new Gs.SwitchingProtocol;case 102:return new Gs.Processing;case 103:return new Gs.EarlyHints;case 200:return new Vs.OK;case 201:return new Vs.Created;case 202:return new Vs.Accepted;case 203:return new Vs.NonAuthoritativeInformation;case 204:return new Vs.NoContent;case 205:return new Vs.ResetContent;case 206:return new Vs.PartialContent;case 207:return new Vs.MultiStatus;case 208:return new Vs.AlreadyReported;case 226:return new Vs.IMUsed;case 300:return new Ks.MultipleChoice;case 301:return new Ks.MovedPermanently;case 302:return new Ks.Found;case 303:return new Ks.SeeOther;case 304:return new Ks.NotModified;case 307:return new Ks.TemporaryRedirect;case 308:return new Ks.PermanentRedirect;case 400:return new Qs.BadRequest(t);case 401:return new Qs.Unauthorized(t);case 403:return new Qs.Forbidden(t);case 404:return new Qs.NotFound(t);case 405:return new Qs.MethodNotAllowed(t);case 406:return new Qs.NotAcceptable(t);case 407:return new Qs.ProxyAuthenticationRequired(t);case 408:return new Qs.RequestTimeout(t);case 409:return new Qs.Conflict(t);case 410:return new Qs.Gone(t);case 411:return new Qs.LengthRequired(t);case 412:return new Qs.PreconditionFailed(t);case 413:return new Qs.PayloadTooLarge(t);case 414:return new Qs.URITooLong(t);case 415:return new Qs.UnsupportedMediaType(t);case 416:return new Qs.RangeNotSatisfiable(t);case 417:return new Qs.ExpectationFailed(t);case 421:return new Qs.MisdirectedRequest(t);case 422:return new Qs.UnprocessableEntity(t);case 423:return new Qs.Locked(t);case 424:return new Qs.FailedDependency(t);case 426:return new Qs.UpgradeRequired(t);case 428:return new Qs.PreconditionRequired(t);case 429:return new Qs.TooManyRequests(t);case 431:return new Qs.RequestHeaderFieldsTooLarge(t);case 451:return new Qs.UnavailableForLegalReasons(t);case 500:return new Zs.InternalServerError(t);case 501:return new Zs.NotImplemented(t);case 502:return new Zs.BadGateway(t);case 503:return new Zs.ServiceUnavailable(t);case 504:return new Zs.GatewayTimeout(t);case 505:return new Zs.HTTPVersionNotSupported(t);case 506:return new Zs.VariantAlsoNegotiates(t);case 507:return new Zs.InsufficientStorage(t);case 508:return new Zs.LoopDetected(t);case 510:return new Zs.NotExtended(t);case 511:return new Zs.NetworkAuthenticationRequired(t);default:throw new Xs(e)}},function(e){var t=o&&o.__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]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(fs,e),n(ds,e),n(Cs,e),n(Ns,e),n(Fs,e),n(Ls,e),n(Hs,e),n(Ws,e)}(ls);var Ys={},ea={};!function(e){e.ok=e.HTTPError=void 0;const t=ls;var n=ls;Object.defineProperty(e,"HTTPError",{enumerable:!0,get:function(){return n.HTTPError}}),e.ok=async function(e){if(!e.ok){const n=await e.text();throw(0,t.fromCode)(e.status,n)}return e}}(ea);var ta={};ta.toJSON=void 0,ta.toJSON=function(e){return e.json()};var na={};na.toText=void 0,na.toText=async function(e,t){if(t){const n=await e.arrayBuffer();return new TextDecoder(t).decode(n)}return await e.text()};var ra={};ra.toLines=void 0,ra.toLines=async function*(e){const t=e.body.pipeThrough(new TextDecoderStream).getReader();let n="";for(;;){const{value:e,done:r}=await t.read();if(r)break;let o=e;for(;o.includes("\n");){const e=o.indexOf("\n");yield o.slice(0,e),o=o.slice(e+1)}n+=o}n&&(yield n)};var oa={toNDJSON:void 0};const ia=li(),sa=ra;oa.toNDJSON=function(e){return(0,ia.mapAsync)((0,sa.toLines)(e),(e=>JSON.parse(e)))};var aa={toCSV:void 0};const ca=it.exports;aa.toCSV=async function(e){const t=await e.text();return(0,ca.parse)(t,{header:!0,skipEmptyLines:"greedy"}).data},function(e){var t=o&&o.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(ea,e),n(ta,e),n(na,e),n(ra,e),n(oa,e),n(aa,e)}(Ys);var ua={},la={},fa={exports:{}};const{AbortController:da,AbortSignal:ha}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;fa.exports=da,fa.exports.AbortSignal=ha,fa.exports.default=da;var pa,ya=o&&o.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};la.AbortController=void 0;const ma=ya(fa.exports);la.AbortController=null!==(pa=globalThis.AbortController)&&void 0!==pa?pa:ma.default;var va={AbortError:void 0};const ga=Ii(),ba=g,wa=li();class Aa extends ga.CustomError{static[Symbol.hasInstance](e){return(0,ba.isError)(e)?(0,wa.some)((0,ga.getErrorNames)(e),(e=>"AbortError"===e)):super[Symbol.hasInstance](e)}}va.AbortError=Aa;var _a,Sa={};Sa.AbortSignal=void 0;const Ta=fa.exports;Sa.AbortSignal=null!==(_a=globalThis.AbortSignal)&&void 0!==_a?_a:Ta.AbortSignal;var Ea={raceAbortSignals:void 0};const ka=la;Ea.raceAbortSignals=function(e){const t=new ka.AbortController,n=[];for(const o of e)if(o){if(o.aborted){t.abort();break}o.addEventListener("abort",r),n.push(o)}return t.signal;function r(){t.abort(),n.forEach((e=>e.removeEventListener("abort",r)))}};var Ra={timeoutSignal:void 0};const Ca=la;Ra.timeoutSignal=function(e){const t=new Ca.AbortController;return setTimeout((()=>t.abort()),e),t.signal};var Oa={withAbortSignal:void 0};const xa=va;Oa.withAbortSignal=async function(e,t){return new Promise((async(n,r)=>{if(e.aborted)return o();e.addEventListener("abort",o);try{n(await t())}catch(e){r(e)}finally{e.removeEventListener("abort",o)}function o(){r(new xa.AbortError)}}))},function(e){var t=o&&o.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(la,e),n(va,e),n(Sa,e),n(Ea,e),n(Ra,e),n(Oa,e)}(ua);const Pa="0.1.0";class Na{constructor(e){this.options=e}getCommonTransformers(e){var t,n;return[Xe.url(this.options.server),Xe.bearerAuth(this.options.adminPassword),Xe.signal(ua.raceAbortSignals([e.signal,!1!==e.timeout&&(null!==(t=e.timeout&&ua.timeoutSignal(e.timeout))&&void 0!==t?t:this.options.timeout&&ua.timeoutSignal(this.options.timeout))])),Xe.keepalive(null!==(n=e.keepalive)&&void 0!==n?n:this.options.keepalive),Xe.header("Accept-Version",Pa)]}}class Ia extends Na{async getNamespaces(e={}){const t=y.get(...this.getCommonTransformers(e),Xe.pathname("/admin/estore-with-json-schema"));return await i.fetch(t).then(Ys.ok).then(Ys.toJSON)}async get(e,t={}){const n=y.get(...this.getCommonTransformers(t),Xe.pathname(`/admin/estore/${e}/json-schema`));return await i.fetch(n).then(Ys.ok).then(Ys.toJSON)}async set(e,t,n={}){const r=y.put(...this.getCommonTransformers(n),Xe.pathname(`/admin/estore/${e}/json-schema`),Xe.json(t));await i.fetch(r).then(Ys.ok)}async remove(e,t={}){const n=y.del(...this.getCommonTransformers(t),Xe.pathname(`/admin/estore/${e}/json-schema`));await i.fetch(n).then(Ys.ok)}}class ja extends Na{async getNamespaces(e={}){const t=y.get(...this.getCommonTransformers(e),Xe.pathname("/admin/blacklist"));return await i.fetch(t).then(Ys.ok).then(Ys.toJSON)}async add(e,t={}){const n=y.put(...this.getCommonTransformers(t),Xe.pathname(`/admin/blacklist/${e}`));await i.fetch(n).then(Ys.ok)}async remove(e,t={}){const n=y.del(...this.getCommonTransformers(t),Xe.pathname(`/admin/blacklist/${e}`));await i.fetch(n).then(Ys.ok)}}class Fa extends Na{async getNamespaces(e={}){const t=y.get(...this.getCommonTransformers(e),Xe.pathname("/admin/whitelist"));return await i.fetch(t).then(Ys.ok).then(Ys.toJSON)}async add(e,t={}){const n=y.put(...this.getCommonTransformers(t),Xe.pathname(`/admin/whitelist/${e}`));await i.fetch(n).then(Ys.ok)}async remove(e,t={}){const n=y.del(...this.getCommonTransformers(t),Xe.pathname(`/admin/whitelist/${e}`));await i.fetch(n).then(Ys.ok)}}class Ua extends Na{async getNamespaces(e={}){const t=y.get(...this.getCommonTransformers(e),Xe.pathname("/admin/estore-with-token-policies"));return await i.fetch(t).then(Ys.ok).then(Ys.toJSON)}async get(e,t={}){const n=y.get(...this.getCommonTransformers(t),Xe.pathname(`/admin/estore/${e}/token-policies`));return await i.fetch(n).then(Ys.ok).then(Ys.toJSON)}async setWriteTokenRequired(e,t,n={}){const r=y.put(...this.getCommonTransformers(n),Xe.pathname(`/admin/estore/${e}/token-policies/write-token-required`),Xe.json(t));await i.fetch(r).then(Ys.ok)}async removeWriteTokenRequired(e,t={}){const n=y.del(...this.getCommonTransformers(t),Xe.pathname(`/admin/estore/${e}/token-policies/write-token-required`));await i.fetch(n).then(Ys.ok)}async setReadTokenRequired(e,t,n={}){const r=y.put(...this.getCommonTransformers(n),Xe.pathname(`/admin/estore/${e}/token-policies/read-token-required`),Xe.json(t));await i.fetch(r).then(Ys.ok)}async removeReadTokenRequired(e,t={}){const n=y.del(...this.getCommonTransformers(t),Xe.pathname(`/admin/estore/${e}/token-policies/read-token-required`));await i.fetch(n).then(Ys.ok)}async setDeleteTokenRequired(e,t,n={}){const r=y.put(...this.getCommonTransformers(n),Xe.pathname(`/admin/estore/${e}/token-policies/delete-token-required`),Xe.json(t));await i.fetch(r).then(Ys.ok)}async removeDeleteTokenRequired(e,t={}){const n=y.del(...this.getCommonTransformers(t),Xe.pathname(`/admin/estore/${e}/token-policies/delete-token-required`));await i.fetch(n).then(Ys.ok)}}class qa extends Na{async getNamespaces(e={}){const t=y.get(...this.getCommonTransformers(e),Xe.pathname("/admin/estore-with-tokens"));return await i.fetch(t).then(Ys.ok).then(Ys.toJSON)}async getTokens(e,t={}){const n=y.get(...this.getCommonTransformers(t),Xe.pathname(`/admin/estore/${e}/tokens`));return await i.fetch(n).then(Ys.ok).then(Ys.toJSON)}async addWriteToken(e,t,n={}){const r=y.put(...this.getCommonTransformers(n),Xe.pathname(`/admin/estore/${e}/tokens/${t}/write`));await i.fetch(r).then(Ys.ok)}async removeWriteToken(e,t,n={}){const r=y.del(...this.getCommonTransformers(n),Xe.pathname(`/admin/estore/${e}/tokens/${t}/write`));await i.fetch(r).then(Ys.ok)}async addReadToken(e,t,n={}){const r=y.put(...this.getCommonTransformers(n),Xe.pathname(`/admin/estore/${e}/tokens/${t}/read`));await i.fetch(r).then(Ys.ok)}async removeReadToken(e,t,n={}){const r=y.del(...this.getCommonTransformers(n),Xe.pathname(`/admin/estore/${e}/tokens/${t}/read`));await i.fetch(r).then(Ys.ok)}async addDeleteToken(e,t,n={}){const r=y.put(...this.getCommonTransformers(n),Xe.pathname(`/admin/estore/${e}/tokens/${t}/delete`));await i.fetch(r).then(Ys.ok)}async removeDeleteToken(e,t,n={}){const r=y.del(...this.getCommonTransformers(n),Xe.pathname(`/admin/estore/${e}/tokens/${t}/delete`));await i.fetch(r).then(Ys.ok)}}e.AbortError=i.AbortError,e.EStoreClient=class{constructor(e){this.options=e}getCommonTransformers(e){var t,n,r;const o="token"in e&&null!==(t=e.token)&&void 0!==t?t:this.options.token,i=this.options.basicAuth;return[Xe.url(this.options.server),i&&Xe.basicAuth(i.username,i.password),o&&Xe.searchParams({token:o}),Xe.signal(ua.raceAbortSignals([e.signal,!1!==e.timeout&&(null!==(n=e.timeout&&ua.timeoutSignal(e.timeout))&&void 0!==n?n:this.options.timeout&&ua.timeoutSignal(this.options.timeout))])),Xe.keepalive(null!==(r=e.keepalive)&&void 0!==r?r:this.options.keepalive),Xe.header("Accept-Version",Pa)]}async append(e,t,n,r,o={}){const s=y.post(...this.getCommonTransformers(o),Xe.pathname(`/estore/${e}/items/${t}/events`),g.isntUndefined(r)&&Xe.header("If-Match",`${r}`),Xe.json(n));await i.fetch(s).then(Ys.ok)}async getEvent(e,t,n,r={}){const o=y.get(...this.getCommonTransformers(r),Xe.pathname(`/estore/${e}/items/${t}/events/${n}`));try{return await i.fetch(o).then(Ys.ok).then(Ys.toJSON)}catch(e){if(e instanceof ls.NotFound)return;throw e}}async getEvents(e,t,n={}){const r=y.get(...this.getCommonTransformers(n),Xe.pathname(`/estore/${e}/items/${t}/events`));try{return await i.fetch(r).then(Ys.ok).then(Ys.toJSON)}catch(e){if(e instanceof ls.NotFound)return;throw e}}async getSize(e,t,n={}){const r=y.get(...this.getCommonTransformers(n),Xe.pathname(`/estore/${e}/items/${t}/size`));return await i.fetch(r).then(Ys.ok).then(Ys.toJSON)}async has(e,t,n={}){const r=y.head(...this.getCommonTransformers(n),Xe.pathname(`/estore/${e}/items/${t}`));try{return await i.fetch(r).then(Ys.ok),!0}catch(e){if(e instanceof ls.NotFound)return!1;throw e}}async del(e,t,n={}){const r=y.del(...this.getCommonTransformers(n),Xe.pathname(`/estore/${e}/items/${t}`));await i.fetch(r).then(Ys.ok)}async clear(e,t={}){const n=y.del(...this.getCommonTransformers(t),Xe.pathname(`/estore/${e}`));await i.fetch(n).then(Ys.ok)}async getAllItemIds(e,t={}){const n=y.get(...this.getCommonTransformers(t),Xe.pathname(`/estore/${e}/items`));return await i.fetch(n).then(Ys.ok).then(Ys.toJSON)}async getAllNamespaces(e={}){const t=y.get(...this.getCommonTransformers(e),Xe.pathname("/estore"));return await i.fetch(t).then(Ys.ok).then(Ys.toJSON)}async stats(e,t={}){const n=y.get(...this.getCommonTransformers(t),Xe.pathname(`/estore/${e}/stats`));return await i.fetch(n).then(Ys.ok).then(Ys.toJSON)}},e.EStoreManager=class{constructor(e){this.options=e,this.JsonSchema=new Ia(this.options),this.Blacklist=new ja(this.options),this.Whitelist=new Fa(this.options),this.TokenPolicy=new Ua(this.options),this.Token=new qa(this.options)}},e.HTTPClientError=ls.HTTPClientError,e.HTTPError=Ys.HTTPError,Object.defineProperty(e,"__esModule",{value:!0})}));
8
+ !function(e,t){e.exports=function e(){var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{};function n(){var n=t.URL||t.webkitURL||null,r=e.toString();return c.BLOB_URL||(c.BLOB_URL=n.createObjectURL(new Blob(["(",r,")();"],{type:"text/javascript"})))}var o=!t.document&&!!t.postMessage,i=o&&/blob:/i.test((t.location||{}).protocol),a={},s=0,c={};if(c.parse=l,c.unparse=d,c.RECORD_SEP=String.fromCharCode(30),c.UNIT_SEP=String.fromCharCode(31),c.BYTE_ORDER_MARK="\ufeff",c.BAD_DELIMITERS=["\r","\n",'"',c.BYTE_ORDER_MARK],c.WORKERS_SUPPORTED=!o&&!!t.Worker,c.NODE_STREAM_INPUT=1,c.LocalChunkSize=10485760,c.RemoteChunkSize=5242880,c.DefaultDelimiter=",",c.Parser=w,c.ParserHandle=g,c.NetworkStreamer=h,c.FileStreamer=p,c.StringStreamer=m,c.ReadableStreamStreamer=y,"undefined"==typeof PAPA_BROWSER_CONTEXT&&(c.DuplexStreamStreamer=v),t.jQuery){var u=t.jQuery;u.fn.parse=function(e){var n=e.config||{},r=[];return this.each((function(e){if("INPUT"!==u(this).prop("tagName").toUpperCase()||"file"!==u(this).attr("type").toLowerCase()||!t.FileReader||!this.files||0===this.files.length)return!0;for(var o=0;o<this.files.length;o++)r.push({file:this.files[o],inputElem:this,instanceConfig:u.extend({},n)})})),o(),this;function o(){if(0!==r.length){var t=r[0];if(C(e.before)){var n=e.before(t.file,t.inputElem);if("object"==typeof n){if("abort"===n.action)return void i("AbortError",t.file,t.inputElem,n.reason);if("skip"===n.action)return void a();"object"==typeof n.config&&(t.instanceConfig=u.extend(t.instanceConfig,n.config))}else if("skip"===n)return void a()}var o=t.instanceConfig.complete;t.instanceConfig.complete=function(e){C(o)&&o(e,t.file,t.inputElem),a()},c.parse(t.file,t.instanceConfig)}else C(e.complete)&&e.complete()}function i(t,n,r,o){C(e.error)&&e.error({name:t},n,r,o)}function a(){r.splice(0,1),o()}}}function l(e,n){var r=(n=n||{}).dynamicTyping||!1;if(C(r)&&(n.dynamicTypingFunction=r,r={}),n.dynamicTyping=r,n.transform=!!C(n.transform)&&n.transform,n.worker&&c.WORKERS_SUPPORTED){var o=A();return o.userStep=n.step,o.userChunk=n.chunk,o.userComplete=n.complete,o.userError=n.error,n.step=C(n.step),n.chunk=C(n.chunk),n.complete=C(n.complete),n.error=C(n.error),delete n.worker,void o.postMessage({input:e,config:n,workerId:o.id})}var i=null;return e===c.NODE_STREAM_INPUT&&"undefined"==typeof PAPA_BROWSER_CONTEXT?(i=new v(n)).getStream():("string"==typeof e?i=n.download?new h(n):new m(n):!0===e.readable&&C(e.read)&&C(e.on)?i=new y(n):(t.File&&e instanceof File||e instanceof Object)&&(i=new p(n)),i.stream(e))}function d(e,t){var n=!1,r=!0,o=",",i="\r\n",a='"',s=a+a,u=!1,l=null,d=!1;h();var f=new RegExp(b(a),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return p(null,e,u);if("object"==typeof e[0])return p(l||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||l),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])),p(e.fields||[],e.data||[],u);throw new Error("Unable to serialize unrecognized input");function h(){if("object"==typeof t){if("string"!=typeof t.delimiter||c.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(o=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&&(i=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");l=t.columns}void 0!==t.escapeChar&&(s=t.escapeChar+a),("boolean"==typeof t.escapeFormulae||t.escapeFormulae instanceof RegExp)&&(d=t.escapeFormulae instanceof RegExp?t.escapeFormulae:/^[=+\-@\t\r].*$/)}}function p(e,t,n){var a="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var s=Array.isArray(e)&&e.length>0,c=!Array.isArray(t[0]);if(s&&r){for(var u=0;u<e.length;u++)u>0&&(a+=o),a+=m(e[u],u);t.length>0&&(a+=i)}for(var l=0;l<t.length;l++){var d=s?e.length:t[l].length,f=!1,h=s?0===Object.keys(t[l]).length:0===t[l].length;if(n&&!s&&(f="greedy"===n?""===t[l].join("").trim():1===t[l].length&&0===t[l][0].length),"greedy"===n&&s){for(var p=[],y=0;y<d;y++){var v=c?e[y]:y;p.push(t[l][v])}f=""===p.join("").trim()}if(!f){for(var g=0;g<d;g++){g>0&&!h&&(a+=o);var b=s&&c?e[g]:g;a+=m(t[l][b],g)}l<t.length-1&&(!n||d>0&&!h)&&(a+=i)}}return a}function m(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);var r=!1;d&&"string"==typeof e&&d.test(e)&&(e="'"+e,r=!0);var i=e.toString().replace(f,s);return(r=r||!0===n||"function"==typeof n&&n(e,t)||Array.isArray(n)&&n[t]||y(i,c.BAD_DELIMITERS)||i.indexOf(o)>-1||" "===i.charAt(0)||" "===i.charAt(i.length-1))?a+i+a:i}function y(e,t){for(var n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return!0;return!1}}function f(e){function n(e){var t=k(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new g(t),this._handle.streamer=this,this._config=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:{}},n.call(this,e),this.parseChunk=function(e,n){if(this.isFirstChunk&&C(this._config.beforeFirstChunk)){var r=this._config.beforeFirstChunk(e);void 0!==r&&(e=r)}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 s=a.meta.cursor;this._finished||(this._partialLine=o.substring(s-this._baseIndex),this._baseIndex=s),a&&a.data&&(this._rowCount+=a.data.length);var u=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(i)t.postMessage({results:a,workerId:c.WORKER_ID,finished:u});else if(C(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||!C(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){C(this._config.error)?this._config.error(e):i&&this._config.error&&t.postMessage({workerId:c.WORKER_ID,error:e,finished:!1})}}function h(e){var t;function n(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(e=e||{}).chunkSize||(e.chunkSize=c.RemoteChunkSize),f.call(this,e),this._nextChunk=o?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),o||(t.onload=R(this._chunkLoaded,this),t.onerror=R(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!o),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var n in e)t.setRequestHeader(n,e[n])}if(this._config.chunkSize){var r=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+r)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}o&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||t.status>=400?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=n(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var n=t.statusText||e;this._sendError(new Error(n))}}function p(e){var t,n;(e=e||{}).chunkSize||(e.chunkSize=c.LocalChunkSize),f.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=R(this._chunkLoaded,this),t.onerror=R(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 o=Math.min(this._start+this._config.chunkSize,this._input.size);e=n.call(e,this._start,o)}var i=t.readAsText(e,this._config.encoding);r||this._chunkLoaded({target:{result:i}})},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 m(e){var t;e=e||{},f.call(this,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 y(e){e=e||{},f.call(this,e);var t=[],n=!0,r=!1;this.pause=function(){f.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){f.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=R((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=R((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=R((function(){this._streamCleanUp(),r=!0,this._streamData("")}),this),this._streamCleanUp=R((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function v(e){var t=r.default.Duplex,n=k(e),o=!0,i=!1,a=[],s=null;this._onCsvData=function(e){var t=e.data;s.push(t)||this._handle.paused()||this._handle.pause()},this._onCsvComplete=function(){s.push(null)},n.step=R(this._onCsvData,this),n.complete=R(this._onCsvComplete,this),f.call(this,n),this._nextChunk=function(){i&&1===a.length&&(this._finished=!0),a.length?a.shift()():o=!0},this._addToParseQueue=function(e,t){a.push(R((function(){if(this.parseChunk("string"==typeof e?e:e.toString(n.encoding)),C(t))return t()}),this)),o&&(o=!1,this._nextChunk())},this._onRead=function(){this._handle.paused()&&this._handle.resume()},this._onWrite=function(e,t,n){this._addToParseQueue(e,n)},this._onWriteComplete=function(){i=!0,this._addToParseQueue("")},this.getStream=function(){return s},(s=new t({readableObjectMode:!0,decodeStrings:!1,read:R(this._onRead,this),write:R(this._onWrite,this)})).once("finish",R(this._onWriteComplete,this))}function g(e){var t,n,r,o=Math.pow(2,53),i=-o,a=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,s=/^(\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,l=0,d=0,f=!1,h=!1,p=[],m={data:[],errors:[],meta:{}};if(C(e.step)){var y=e.step;e.step=function(t){if(m=t,T())A();else{if(A(),0===m.data.length)return;l+=t.data.length,e.preview&&l>e.preview?n.abort():(m.data=m.data[0],y(m,u))}}}function v(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function g(e){if(a.test(e)){var t=parseFloat(e);if(t>i&&t<o)return!0}return!1}function A(){return m&&r&&(P("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+c.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines&&(m.data=m.data.filter((function(e){return!v(e)}))),T()&&_(),R()}function T(){return e.header&&0===p.length}function _(){if(m)if(Array.isArray(m.data[0])){for(var t=0;T()&&t<m.data.length;t++)m.data[t].forEach(n);m.data.splice(0,1)}else m.data.forEach(n);function n(t,n){C(e.transformHeader)&&(t=e.transformHeader(t,n)),p.push(t)}}function S(t){return e.dynamicTypingFunction&&void 0===e.dynamicTyping[t]&&(e.dynamicTyping[t]=e.dynamicTypingFunction(t)),!0===(e.dynamicTyping[t]||e.dynamicTyping)}function E(e,t){return S(e)?"true"===t||"TRUE"===t||"false"!==t&&"FALSE"!==t&&(g(t)?parseFloat(t):s.test(t)?new Date(t):""===t?null:t):t}function R(){if(!m||!e.header&&!e.dynamicTyping&&!e.transform)return m;function t(t,n){var r,o=e.header?{}:[];for(r=0;r<t.length;r++){var i=r,a=t[r];e.header&&(i=r>=p.length?"__parsed_extra":p[r]),e.transform&&(a=e.transform(a,i)),a=E(i,a),"__parsed_extra"===i?(o[i]=o[i]||[],o[i].push(a)):o[i]=a}return e.header&&(r>p.length?P("FieldMismatch","TooManyFields","Too many fields: expected "+p.length+" fields but parsed "+r,d+n):r<p.length&&P("FieldMismatch","TooFewFields","Too few fields: expected "+p.length+" fields but parsed "+r,d+n)),o}var n=1;return!m.data.length||Array.isArray(m.data[0])?(m.data=m.data.map(t),n=m.data.length):m.data=t(m.data,0),e.header&&m.meta&&(m.meta.fields=p),d+=n,m}function x(t,n,r,o,i){var a,s,u,l;i=i||[",","\t","|",";",c.RECORD_SEP,c.UNIT_SEP];for(var d=0;d<i.length;d++){var f=i[d],h=0,p=0,m=0;u=void 0;for(var y=new w({comments:o,delimiter:f,newline:n,preview:10}).parse(t),g=0;g<y.data.length;g++)if(r&&v(y.data[g]))m++;else{var b=y.data[g].length;p+=b,void 0!==u?b>0&&(h+=Math.abs(b-u),u=b):u=b}y.data.length>0&&(p/=y.data.length-m),(void 0===s||h<=s)&&(void 0===l||p>l)&&p>1.99&&(s=h,a=f,l=p)}return e.delimiter=a,{successful:!!a,bestDelimiter:a}}function O(e,t){e=e.substring(0,1048576);var n=new RegExp(b(t)+"([^]*?)"+b(t),"gm"),r=(e=e.replace(n,"")).split("\r"),o=e.split("\n"),i=o.length>1&&o[0].length<r[0].length;if(1===r.length||i)return"\n";for(var a=0,s=0;s<r.length;s++)"\n"===r[s][0]&&a++;return a>=r.length/2?"\r\n":"\r"}function P(e,t,n,r){var o={type:e,code:t,message:n};void 0!==r&&(o.row=r),m.errors.push(o)}this.parse=function(o,i,a){var s=e.quoteChar||'"';if(e.newline||(e.newline=O(o,s)),r=!1,e.delimiter)C(e.delimiter)&&(e.delimiter=e.delimiter(o),m.meta.delimiter=e.delimiter);else{var u=x(o,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);u.successful?e.delimiter=u.bestDelimiter:(r=!0,e.delimiter=c.DefaultDelimiter),m.meta.delimiter=e.delimiter}var l=k(e);return e.preview&&e.header&&l.preview++,t=o,n=new w(l),m=n.parse(t,i,a),A(),f?{meta:{paused:!0}}:m||{meta:{paused:!1}}},this.paused=function(){return f},this.pause=function(){f=!0,n.abort(),t=C(e.chunk)?"":t.substring(n.getCharIndex())},this.resume=function(){u.streamer._halted?(f=!1,u.streamer.parseChunk(t,!0)):setTimeout(u.resume,3)},this.aborted=function(){return h},this.abort=function(){h=!0,n.abort(),m.meta.aborted=!0,C(e.complete)&&e.complete(m),t=""}}function b(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function w(e){var t,n=(e=e||{}).delimiter,r=e.newline,o=e.comments,i=e.step,a=e.preview,s=e.fastMode,u=t=void 0===e.quoteChar||null===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(u=e.escapeChar),("string"!=typeof n||c.BAD_DELIMITERS.indexOf(n)>-1)&&(n=","),o===n)throw new Error("Comment character same as delimiter");!0===o?o="#":("string"!=typeof o||c.BAD_DELIMITERS.indexOf(o)>-1)&&(o=!1),"\n"!==r&&"\r"!==r&&"\r\n"!==r&&(r="\n");var l=0,d=!1;this.parse=function(e,c,f){if("string"!=typeof e)throw new Error("Input must be a string");var h=e.length,p=n.length,m=r.length,y=o.length,v=C(i);l=0;var g=[],w=[],A=[],T=0;if(!e)return F();if(s||!1!==s&&-1===e.indexOf(t)){for(var _=e.split(r),S=0;S<_.length;S++){if(A=_[S],l+=A.length,S!==_.length-1)l+=r.length;else if(f)return F();if(!o||A.substring(0,y)!==o){if(v){if(g=[],I(A.split(n)),U(),d)return F()}else I(A.split(n));if(a&&S>=a)return g=g.slice(0,a),F(!0)}}return F()}for(var E=e.indexOf(n,l),k=e.indexOf(r,l),R=new RegExp(b(u)+b(t),"g"),x=e.indexOf(t,l);;)if(e[l]!==t)if(o&&0===A.length&&e.substring(l,l+y)===o){if(-1===k)return F();l=k+m,k=e.indexOf(r,l),E=e.indexOf(n,l)}else if(-1!==E&&(E<k||-1===k))A.push(e.substring(l,E)),l=E+p,E=e.indexOf(n,l);else{if(-1===k)break;if(A.push(e.substring(l,k)),q(k+m),v&&(U(),d))return F();if(a&&g.length>=a)return F(!0)}else for(x=l,l++;;){if(-1===(x=e.indexOf(t,x+1)))return f||w.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:g.length,index:l}),j();if(x===h-1)return j(e.substring(l,x).replace(R,t));if(t!==u||e[x+1]!==u){if(t===u||0===x||e[x-1]!==u){-1!==E&&E<x+1&&(E=e.indexOf(n,x+1)),-1!==k&&k<x+1&&(k=e.indexOf(r,x+1));var O=N(-1===k?E:Math.min(E,k));if(e.substr(x+1+O,p)===n){A.push(e.substring(l,x).replace(R,t)),l=x+1+O+p,e[x+1+O+p]!==t&&(x=e.indexOf(t,l)),E=e.indexOf(n,l),k=e.indexOf(r,l);break}var P=N(k);if(e.substring(x+1+P,x+1+P+m)===r){if(A.push(e.substring(l,x).replace(R,t)),q(x+1+P+m),E=e.indexOf(n,l),x=e.indexOf(t,l),v&&(U(),d))return F();if(a&&g.length>=a)return F(!0);break}w.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:g.length,index:l}),x++}}else x++}return j();function I(e){g.push(e),T=l}function N(t){var n=0;if(-1!==t){var r=e.substring(x+1,t);r&&""===r.trim()&&(n=r.length)}return n}function j(t){return f||(void 0===t&&(t=e.substring(l)),A.push(t),l=h,I(A),v&&U()),F()}function q(t){l=t,I(A),A=[],k=e.indexOf(r,l)}function F(e){return{data:g,errors:w,meta:{delimiter:n,linebreak:r,aborted:d,truncated:!!e,cursor:T+(c||0)}}}function U(){i(F()),g=[],w=[]}},this.abort=function(){d=!0},this.getCharIndex=function(){return l}}function A(){if(!c.WORKERS_SUPPORTED)return!1;var e=n(),r=new t.Worker(e);return r.onmessage=T,r.id=s++,a[r.id]=r,r}function T(e){var t=e.data,n=a[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,_(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:S,resume:S};if(C(n.userStep)){for(var i=0;i<t.results.data.length&&(n.userStep({data:t.results.data[i],errors:t.results.errors,meta:t.results.meta},o),!r);i++);delete t.results}else C(n.userChunk)&&(n.userChunk(t.results,o,t.file),delete t.results)}t.finished&&!r&&_(t.workerId,t.results)}function _(e,t){var n=a[e];C(n.userComplete)&&n.userComplete(t),n.terminate(),delete a[e]}function S(){throw new Error("Not implemented.")}function E(e){var n=e.data;if(void 0===c.WORKER_ID&&n&&(c.WORKER_ID=n.workerId),"string"==typeof n.input)t.postMessage({workerId:c.WORKER_ID,results:c.parse(n.input,n.config),finished:!0});else if(t.File&&n.input instanceof File||n.input instanceof Object){var r=c.parse(n.input,n.config);r&&t.postMessage({workerId:c.WORKER_ID,results:r,finished:!0})}}function k(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var n in e)t[n]=k(e[n]);return t}function R(e,t){return function(){e.apply(t,arguments)}}function C(e){return"function"==typeof e}return i&&(t.onmessage=E),h.prototype=Object.create(f.prototype),h.prototype.constructor=h,p.prototype=Object.create(f.prototype),p.prototype.constructor=p,m.prototype=Object.create(m.prototype),m.prototype.constructor=m,y.prototype=Object.create(f.prototype),y.prototype.constructor=y,"undefined"==typeof PAPA_BROWSER_CONTEXT&&(v.prototype=Object.create(f.prototype),v.prototype.constructor=v),c}()}(it);var at={},st={},ct={},ut={},lt={},dt={},ft={};ft.go=void 0,ft.go=function(e){return e()};var ht={};ht.goMicrotask=void 0,ht.goMicrotask=function(e){return new Promise(((t,n)=>{queueMicrotask((async()=>{try{t(await e())}catch(e){n(e)}}))}))};var pt={},mt={},yt={},vt={},gt={};gt.random=void 0,gt.random=function(e,t){return Math.random()*(t-e)+e};var bt={};bt.randomInt=void 0,bt.randomInt=function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e))+e};var wt={};wt.randomIntInclusive=void 0,wt.randomIntInclusive=function(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e},function(e){var t=o&&o.__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]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(gt,e),n(bt,e),n(wt,e)}(vt),yt.calculateExponentialBackoffTimeout=void 0;const At=vt;yt.calculateExponentialBackoffTimeout=function({baseTimeout:e,retries:t,maxTimeout:n=1/0,factor:r=2,jitter:o=!0}){const i=Math.min(r**t*e,n);return o?(0,At.randomIntInclusive)(0,i):i};var Tt={};Tt.setTimeout=void 0,Tt.setTimeout=function(e,t){const n=globalThis.setTimeout(t,e);return()=>clearTimeout(n)};var _t={setSchedule:void 0};const St=Tt;_t.setSchedule=function(e,t){const n=e-Date.now();return(0,St.setTimeout)(n,t)};var Et={};Et.setInterval=void 0,Et.setInterval=function(e,t){const n=globalThis.setInterval(t,e);return()=>clearInterval(n)};var kt={setImmediate:void 0};const Rt=Tt;kt.setImmediate=function(e){if(globalThis.setImmediate){const t=globalThis.setImmediate(e);return()=>clearImmediate(t)}return(0,Rt.setTimeout)(0,e)};var Ct={setTimeoutLoop:void 0};const xt=Tt;Ct.setTimeoutLoop=function(e,t){let n=!1,r=(0,xt.setTimeout)(e,(async function o(){await t(),n||(r=(0,xt.setTimeout)(e,o))}));return()=>{n=!0,r()}};var Ot={setDynamicTimeoutLoop:void 0};const Pt=Tt;Ot.setDynamicTimeoutLoop=function(e,t){let n=!1,r=(0,Pt.setTimeout)(e,(async function o(){const i=Date.now();await t();const a=Date.now()-i;n||(r=(0,Pt.setTimeout)(Math.max(e-a,0),o))}));return()=>{n=!0,r()}},function(e){var t=o&&o.__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]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(yt,e),n(Tt,e),n(_t,e),n(Et,e),n(kt,e),n(Ct,e),n(Ot,e)}(mt),pt.goMacrotask=void 0;const It=mt;var Nt;pt.goMacrotask=function(e){return new Promise(((t,n)=>{(0,It.setImmediate)((async()=>{try{t(await e())}catch(e){n(e)}}))}))},function(e){var t=o&&o.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(ft,e),n(ht,e),n(pt,e)}(dt);var jt={chunkByAsync:void 0};const qt=g;jt.chunkByAsync=function(e,t){return(0,qt.isAsyncIterable)(e)?async function*(e,t){let n=[],r=0;for await(const o of e)n.push(o),await t(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(e,t):async function*(e,t){let n=[],r=0;for(const o of e)n.push(o),await t(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)}(e,t)};var Ft={};Ft.chunkBy=void 0,Ft.chunkBy=function*(e,t){let n=[],r=0;for(const o of e)n.push(o),t(o,r)&&(yield n,n=[]),r++;n.length&&(yield n)};var Ut,Mt={};var Lt={concatAsync:void 0};const Dt=g,Bt=dt;Lt.concatAsync=function(e,...t){return(0,Bt.go)((async function*(){for(const n of[e,...t])if((0,Dt.isAsyncIterable)(n))for await(const e of n)yield e;else for(const e of n)yield e}))};var Ht={concat:void 0};const zt=dt;Ht.concat=function(e,...t){return(0,zt.go)((function*(){for(const n of[e,...t])yield*n}))};var $t,Jt={},Wt={};Wt.copyIterable=Wt.copyAsyncIterable=void 0,Wt.copyAsyncIterable=async function*(e){for await(const t of e)yield t},Wt.copyIterable=function*(e){for(const t of e)yield t};var Gt,Vt={};var Kt,Qt={};var Zt={dropUntilAsync:void 0};const Xt=g;Zt.dropUntilAsync=function(e,t){return(0,Xt.isAsyncIterable)(e)?async function*(e,t){var n;const r=e[Symbol.asyncIterator]();let o;try{let e,i=0;for(;!(({value:e,done:o}=await r.next()),o||await t(e,i++)););for(;!o;)yield e,({value:e,done:o}=await r.next())}finally{o||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 o;try{let e,i=0;for(;!(({value:e,done:o}=r.next()),o||await t(e,i++)););for(;!o;)yield e,({value:e,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}}(e,t)};var Yt={};Yt.dropUntil=void 0,Yt.dropUntil=function*(e,t){var n;const r=e[Symbol.iterator]();let o;try{let e,i=0;for(;!(({value:e,done:o}=r.next()),o||t(e,i++)););for(;!o;)yield e,({value:e,done:o}=r.next())}finally{o||null===(n=r.return)||void 0===n||n.call(r)}};var en,tn={};var nn={filterAsync:void 0};const rn=g;nn.filterAsync=function(e,t){return(0,rn.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 on={};on.filter=void 0,on.filter=function*(e,t){let n=0;for(const r of e)t(r,n)&&(yield r),n++};var an={},sn={},cn={flattenByAsync:void 0};const un=g;async function*ln(e,t,n){for(const r of e)dn(r)&&await t(r,n)?yield*ln(r,t,n+1):yield r}function dn(e){return(0,un.isIterable)(e)&&(0,un.isntChar)(e)}var fn,hn;function pn(){if(fn)return sn;fn=1,sn.flattenDeepAsync=void 0;const e=cn,t=ko();return sn.flattenDeepAsync=function(n,r=1/0){return(0,t.assert)(r===1/0||Number.isInteger(r),"The parameter depth must be an integer"),(0,t.assert)(r>=0,"The parameter depth must be greater than or equal to 0"),(0,e.flattenByAsync)(n,((e,t)=>t<=r))},sn}cn.flattenByAsync=function(e,t){return(0,un.isAsyncIterable)(e)?async function*(e,t){const n=1;for await(const r of e)dn(r)&&await t(r,n)?yield*ln(r,t,n+1):yield r}(e,t):function(e,t){return ln(e,t,1)}(e,t)};var mn={flattenBy:void 0};const yn=g;function*vn(e,t,n){for(const o of e)r=o,(0,yn.isIterable)(r)&&(0,yn.isntChar)(r)&&t(o,n)?yield*vn(o,t,n+1):yield o;var r}mn.flattenBy=function(e,t){return vn(e,t,1)};var gn,bn={};function wn(){if(gn)return bn;gn=1,bn.flattenDeep=void 0;const e=mn,t=ko();return bn.flattenDeep=function(n,r=1/0){return(0,t.assert)(r===1/0||Number.isInteger(r),"The parameter depth must be an integer"),(0,t.assert)(r>=0,"The parameter depth must be greater than or equal to 0"),(0,e.flattenBy)(n,((e,t)=>t<=r))},bn}var An,Tn={};var _n={mapAsync:void 0};const Sn=g;_n.mapAsync=function(e,t){return(0,Sn.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 En={};En.map=void 0,En.map=function*(e,t){let n=0;for(const r of e)yield t(r,n),n++};var kn,Rn={};function Cn(){if(kn)return Rn;kn=1,Rn.repeatAsync=void 0;const e=dt,t=ko();return Rn.repeatAsync=function(n,r){return(0,t.assert)(r===1/0||Number.isInteger(r),"The parameter times must be an integer"),(0,t.assert)(r>=0,"The parameter times must be greater than or equal to 0"),r===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,e.go)((async function*(){const e=[];if(r>0){for await(const t of n)yield t,e.push(t);r--}for(;r>0;)yield*e,r--}))},Rn}var xn,On={};function Pn(){if(xn)return On;xn=1,On.repeat=void 0;const e=dt,t=ko();return On.repeat=function(n,r){return(0,t.assert)(r===1/0||Number.isInteger(r),"The parameter times must be an integer"),(0,t.assert)(r>=0,"The parameter times must be greater than or equal to 0"),r===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,e.go)((function*(){const e=[];if(r>0){for(const t of n)yield t,e.push(t);r--}for(;r>0;)yield*e,r--}))},On}var In,Nn={};var jn,qn={};var Fn={};Fn.splitAsync=void 0,Fn.splitAsync=async function*(e,t){let n=[];for await(const r of e)r===t?(yield n,n=[]):n.push(r);yield n};var Un={splitByAsync:void 0};const Mn=g;Un.splitByAsync=function(e,t){return(0,Mn.isAsyncIterable)(e)?async function*(e,t){let n=[],r=0;for await(const o of e)await t(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(e,t):async function*(e,t){let n=[],r=0;for(const o of e)await t(o,r)?(yield n,n=[]):n.push(o),r++;yield n}(e,t)};var Ln={};Ln.splitBy=void 0,Ln.splitBy=function*(e,t){let n=[],r=0;for(const o of e)t(o,r)?(yield n,n=[]):n.push(o),r++;yield n};var Dn={};Dn.split=void 0,Dn.split=function*(e,t){let n=[];for(const r of e)r===t?(yield n,n=[]):n.push(r);yield n};var Bn,Hn={};var zn,$n={};var Jn,Wn={};var Gn={takeUntilAsync:void 0};const Vn=g;Gn.takeUntilAsync=function(e,t){return(0,Vn.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 Kn={};Kn.takeUntil=void 0,Kn.takeUntil=function*(e,t){let n=0;for(const r of e){if(t(r,n))break;yield r,n++}};var Qn,Zn={};var Xn={tapAsync:void 0};const Yn=g;Xn.tapAsync=function(e,t){return(0,Yn.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 er={};er.tap=void 0,er.tap=function*(e,t){let n=0;for(const r of e)t(r,n),yield r,n++};var tr={};tr.toAsyncIterable=void 0,tr.toAsyncIterable=async function*(e){for(const t of e)yield t};var nr={};nr.transformAsync=void 0,nr.transformAsync=async function*(e,t){yield*t(e)};var rr={};rr.transform=void 0,rr.transform=function*(e,t){yield*t(e)};var or={};or.uniqAsync=void 0,or.uniqAsync=async function*(e){const t=new Set;for await(const n of e)t.has(n)||(yield n,t.add(n))};var ir={uniqByAsync:void 0};const ar=g;ir.uniqByAsync=function(e,t){return(0,ar.isAsyncIterable)(e)?async function*(e,t){const n=new Set;let r=0;for await(const o of e){const e=await t(o,r);n.has(e)||(yield o,n.add(e)),r++}}(e,t):async function*(e,t){const n=new Set;let r=0;for(const o of e){const e=await t(o,r);n.has(e)||(yield o,n.add(e)),r++}}(e,t)};var sr={};sr.uniqBy=void 0,sr.uniqBy=function*(e,t){const n=new Set;let r=0;for(const o of e){const e=t(o,r);n.has(e)||(yield o,n.add(e)),r++}};var cr={};cr.uniq=void 0,cr.uniq=function*(e){const t=new Set;for(const n of e)t.has(n)||(yield n,t.add(n))};var ur={zipAsync:void 0};const lr=g;var dr;!function(e){e[e.Sync=0]="Sync",e[e.Async=1]="Async"}(dr||(dr={})),ur.zipAsync=function(e,...t){return async function*(...e){var t,n,r,o;const i=e.length,a=e.map((e=>(0,lr.isAsyncIterable)(e)?[dr.Async,e[Symbol.asyncIterator]()]:[dr.Sync,e[Symbol.iterator]()])),s=a.map((()=>!1));try{for(;;){const e=new Array(i);for(let t=0;t<i;t++){const[n,r]=a[t];let o;if(o=n===dr.Async?await r.next():r.next(),o.done)return void(s[t]=!0);e[t]=o.value}yield e}}finally{const e=a.filter(((e,t)=>!s[t]));for(const[i,a]of e)i===dr.Async?await(null===(n=(t=a).return)||void 0===n?void 0:n.call(t)):null===(o=(r=a).return)||void 0===o||o.call(r)}}(e,...t)};var fr,hr={};function pr(){return fr||(fr=1,function(e){var t=o&&o.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(function(){if(Nt)return lt;Nt=1,lt.chunkAsync=void 0;const e=dt,t=ko();return lt.chunkAsync=function(n,r){return(0,t.assert)(Number.isInteger(r),"The parameter size must be an integer"),(0,t.assert)(r>0,"The parameter size must be greater than 0"),(0,e.go)((async function*(){let e=[];for await(const t of n)e.push(t),e.length>=r&&(yield e,e=[]);e.length&&(yield e)}))},lt}(),e),n(jt,e),n(Ft,e),n(function(){if(Ut)return Mt;Ut=1,Mt.chunk=void 0;const e=dt,t=ko();return Mt.chunk=function(n,r){return(0,t.assert)(Number.isInteger(r),"The parameter size must be an integer"),(0,t.assert)(r>0,"The parameter size must be greater than 0"),(0,e.go)((function*(){let e=[];for(const t of n)e.push(t),e.length>=r&&(yield e,e=[]);e.length&&(yield e)}))},Mt}(),e),n(Lt,e),n(Ht,e),n(function(){if($t)return Jt;$t=1,Jt.dropAsync=void 0;const e=dt,t=Wt,n=ko();return Jt.dropAsync=function(r,o){return(0,n.assert)(Number.isInteger(o),"The parameter count must be an integer"),(0,n.assert)(o>=0,"The parameter count must be greater than or equal to 0"),0===o?(0,t.copyAsyncIterable)(r):(0,e.go)((async function*(){var e;const t=r[Symbol.asyncIterator]();let n;try{let r;for(;({value:r,done:n}=await t.next()),!(n||o<=0);)o--;for(;!n;)yield r,({value:r,done:n}=await t.next())}finally{n||await(null===(e=t.return)||void 0===e?void 0:e.call(t))}}))},Jt}(),e),n(function(){if(Gt)return Vt;Gt=1,Vt.dropRightAsync=void 0;const e=dt,t=Wt,n=ko();return Vt.dropRightAsync=function(r,o){return(0,n.assert)(Number.isInteger(o),"The parameter count must be an integer"),(0,n.assert)(o>=0,"The parameter count must be greater than or equal to 0"),0===o?(0,t.copyAsyncIterable)(r):(0,e.go)((async function*(){const e=(await async function(e){const t=[];for await(const n of e)t.push(n);return t}(r)).slice(0,-o);for(const t of e)yield t}))},Vt}(),e),n(function(){if(Kt)return Qt;Kt=1,Qt.dropRight=void 0;const e=dt,t=Wt,n=ko();return Qt.dropRight=function(r,o){return(0,n.assert)(Number.isInteger(o),"The parameter count must be an integer"),(0,n.assert)(o>=0,"The parameter count must be greater than or equal to 0"),0===o?(0,t.copyIterable)(r):(0,e.go)((function*(){const e=Array.from(r);yield*e.slice(0,-o)}))},Qt}(),e),n(Zt,e),n(Yt,e),n(function(){if(en)return tn;en=1,tn.drop=void 0;const e=dt,t=Wt,n=ko();return tn.drop=function(r,o){return(0,n.assert)(Number.isInteger(o),"The parameter count must be an integer"),(0,n.assert)(o>=0,"The parameter count must be greater than or equal to 0"),0===o?(0,t.copyIterable)(r):(0,e.go)((function*(){var e;const t=r[Symbol.iterator]();let n;try{let r;for(;({value:r,done:n}=t.next()),!(n||o<=0);)o--;for(;!n;)yield r,({value:r,done:n}=t.next())}finally{n||null===(e=t.return)||void 0===e||e.call(t)}}))},tn}(),e),n(nn,e),n(on,e),n(function(){if(hn)return an;hn=1,an.flattenAsync=void 0;const e=pn();return an.flattenAsync=function(t){return(0,e.flattenDeepAsync)(t,1)},an}(),e),n(cn,e),n(mn,e),n(pn(),e),n(wn(),e),n(function(){if(An)return Tn;An=1,Tn.flatten=void 0;const e=wn();return Tn.flatten=function(t){return(0,e.flattenDeep)(t,1)},Tn}(),e),n(_n,e),n(En,e),n(Cn(),e),n(Pn(),e),n(function(){if(In)return Nn;In=1,Nn.sliceAsync=void 0;const e=dt,t=ko();return Nn.sliceAsync=function(n,r,o=1/0){return(0,t.assert)(Number.isInteger(r),"The parameter start must be an integer"),(0,t.assert)(r>=0,"The parameter start must be greater than or equal to 0"),(0,t.assert)(Number.isInteger(o),"The parameter end must be an integer"),(0,t.assert)(o>=r,"The parameter end must be greater than or equal to start"),(0,e.go)((async function*(){let e=0;for await(const t of n){if(e>=o)break;e>=r&&(yield t),e++}}))},Nn}(),e),n(function(){if(jn)return qn;jn=1,qn.slice=void 0;const e=dt,t=ko();return qn.slice=function(n,r,o=1/0){return(0,t.assert)(Number.isInteger(r),"The parameter start must be an integer"),(0,t.assert)(r>=0,"The parameter start must be greater than or equal to 0"),(0,t.assert)(Number.isInteger(o),"The parameter end must be an integer"),(0,t.assert)(o>=r,"The parameter end must be greater than or equal to start"),(0,e.go)((function*(){let e=0;for(const t of n){if(e>=o)break;e>=r&&(yield t),e++}}))},qn}(),e),n(Fn,e),n(Un,e),n(Ln,e),n(Dn,e),n(function(){if(Bn)return Hn;Bn=1,Hn.takeAsync=void 0;const e=dt,t=ko();return Hn.takeAsync=function(n,r){return(0,t.assert)(Number.isInteger(r),"The parameter count must be an integer"),(0,t.assert)(r>=0,"The parameter count must be greater than or equal to 0"),(0,e.go)((async function*(){if(0!==r)for await(const e of n)if(yield e,0==--r)break}))},Hn}(),e),n(function(){if(zn)return $n;zn=1,$n.takeRightAsync=void 0;const e=dt,t=ko();return $n.takeRightAsync=function(n,r){return(0,t.assert)(Number.isInteger(r),"The parameter count must be an integer"),(0,t.assert)(r>=0,"The parameter count must be greater than or equal to 0"),(0,e.go)((async function*(){var e;const t=n[Symbol.asyncIterator]();let o;try{const n=[];let i;for(;({value:i,done:o}=await t.next()),!o;)n.push(i),n.length>r&&n.shift();yield*n}finally{o||await(null===(e=t.return)||void 0===e?void 0:e.call(t))}}))},$n}(),e),n(function(){if(Jn)return Wn;Jn=1,Wn.takeRight=void 0;const e=dt,t=ko();return Wn.takeRight=function(n,r){return(0,t.assert)(Number.isInteger(r),"The parameter count must be an integer"),(0,t.assert)(r>=0,"The parameter count must be greater than or equal to 0"),(0,e.go)((function*(){var e;const t=n[Symbol.iterator]();let o;try{const n=[];let i;for(;({value:i,done:o}=t.next()),!o;)n.push(i),n.length>r&&n.shift();yield*n}finally{o||null===(e=t.return)||void 0===e||e.call(t)}}))},Wn}(),e),n(Gn,e),n(Kn,e),n(function(){if(Qn)return Zn;Qn=1,Zn.take=void 0;const e=dt,t=ko();return Zn.take=function(n,r){return(0,t.assert)(Number.isInteger(r),"The parameter count must be an integer"),(0,t.assert)(r>=0,"The parameter count must be greater than or equal to 0"),(0,e.go)((function*(){if(0!==r)for(const e of n)if(yield e,0==--r)break}))},Zn}(),e),n(Xn,e),n(er,e),n(tr,e),n(nr,e),n(rr,e),n(or,e),n(ir,e),n(sr,e),n(cr,e),n(ur,e),n(hr,e)}(ut)),ut}hr.zip=void 0,hr.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 o=0;o<t;o++){const{value:t,done:i}=n[o].next();if(i)return void(r[o]=!0);e[o]=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)};var mr={},yr={};yr.consume=void 0,yr.consume=function(e,t){return t(e)};var vr={eachAsync:void 0};const gr=g;vr.eachAsync=function(e,t){return(0,gr.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 br={};br.each=void 0,br.each=function(e,t){let n=0;for(const r of e)t(r,n),n++};var wr={everyAsync:void 0};const Ar=g;wr.everyAsync=function(e,t){return(0,Ar.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 Tr={};Tr.every=void 0,Tr.every=function(e,t){let n=0;for(const r of e){if(!t(r,n))return!1;n++}return!0};var _r={findAsync:void 0};const Sr=g;_r.findAsync=function(e,t){return(0,Sr.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 Er={};Er.find=void 0,Er.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 Rr={};Rr.first=void 0,Rr.first=function(e){for(const t of e)return t};var Cr={};Cr.includesAsync=void 0,Cr.includesAsync=async function(e,t){for await(const n of e)if(n===t)return!0;return!1};var xr={};xr.includes=void 0,xr.includes=function(e,t){for(const n of e)if(n===t)return!0;return!1};var Or={};Or.matchAsync=void 0,Or.matchAsync=async function(e,t){const n=t.length;let r=0;for await(const o of e)if(o===t[r]&&r++,r===n)return!0;return!1};var Pr={};Pr.match=void 0,Pr.match=function(e,t){const n=t.length;let r=0;for(const o of e)if(o===t[r]&&r++,r===n)return!0;return!1};var Ir={reduceAsync:void 0};const Nr=g;Ir.reduceAsync=function(e,t,n){return(0,Nr.isUndefined)(n)?function(e,t){return(0,Nr.isAsyncIterable)(e)?n(e):r(e);async function n(e){var n;const r=e[Symbol.asyncIterator]();let o;try{let e,a=await i(r),s=1;for(;({value:e,done:o}=await r.next()),!o;)a=await t(a,e,s++);return a}finally{o||await(null===(n=r.return)||void 0===n?void 0:n.call(r))}async function i(e){const t=await e.next();if(t.done)throw o=!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 o;try{let e,a=i(r),s=1;for(;({value:e,done:o}=r.next()),!o;)a=await t(a,e,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(e){const t=e.next();if(t.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return t.value}}}(e,t):function(e,t,n){return(0,Nr.isAsyncIterable)(e)?o(e):r(e);async function r(e){let r=n,o=0;for(const n of e)r=await t(r,n,o++);return r}async function o(e){let r=n,o=0;for await(const n of e)r=await t(r,n,o++);return r}}(e,t,n)};var jr={reduce:void 0};const qr=g;jr.reduce=function(e,t,n){return(0,qr.isUndefined)(n)?function(e,t){var n;const r=e[Symbol.iterator]();let o;try{let e,a=i(r),s=1;for(;({value:e,done:o}=r.next()),!o;)a=t(a,e,s++);return a}finally{o||null===(n=r.return)||void 0===n||n.call(r)}function i(e){const t=e.next();if(t.done)throw o=!0,new Error("Reduce of empty iterable with no initial value");return t.value}}(e,t):function(e,t,n){let r=n,o=0;for(const n of e)r=t(r,n,o++);return r}(e,t,n)};var Fr={someAsync:void 0};const Ur=g;Fr.someAsync=function(e,t){return(0,Ur.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 Mr={};Mr.some=void 0,Mr.some=function(e,t){let n=0;for(const r of e){if(t(r,n))return!0;n++}return!1};var Lr={};Lr.lastAsync=void 0,Lr.lastAsync=async function(e){var t;const n=e[Symbol.asyncIterator]();let r;try{let e,o;for(;({value:e,done:r}=await n.next()),!r;)o=e;return o}finally{r||await(null===(t=n.return)||void 0===t?void 0:t.call(n))}};var Dr={};Dr.last=void 0,Dr.last=function(e){var t;const n=e[Symbol.iterator]();let r;try{let e,o;for(;({value:e,done:r}=n.next()),!r;)o=e;return o}finally{r||null===(t=n.return)||void 0===t||t.call(n)}};var Br={toArrayAsync:void 0};const Hr=yr;Br.toArrayAsync=function(e){return(0,Hr.consume)(e,(async e=>{const t=[];for await(const n of e)t.push(n);return t}))};var zr={toArray:void 0};const $r=yr;zr.toArray=function(e){return(0,$r.consume)(e,(e=>Array.from(e)))};var Jr={toSetAsync:void 0};const Wr=yr;Jr.toSetAsync=function(e){return(0,Wr.consume)(e,(async e=>{const t=new Set;for await(const n of e)t.add(n);return t}))};var Gr={toSet:void 0};const Vr=yr;Gr.toSet=function(e){return(0,Vr.consume)(e,(e=>new Set(e)))};var Kr={};Kr.count=void 0,Kr.count=function(e){let t=0;for(const n of e)t++;return t};var Qr={};Qr.countAsync=void 0,Qr.countAsync=async function(e){let t=0;for await(const n of e)t++;return t};var Zr={groupBy:void 0};const Xr=br;Zr.groupBy=function(e,t){const n=new Map;return(0,Xr.each)(e,((e,r)=>{const o=t(e,r);n.has(o)||n.set(o,[]),n.get(o).push(e)})),n};var Yr={groupByAsync:void 0};const eo=vr;var to;function no(){return to||(to=1,function(e){var t=o&&o.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(pr(),e),n(mr,e)}(ct)),ct}Yr.groupByAsync=async function(e,t){const n=new Map;return await(0,eo.eachAsync)(e,(async(e,r)=>{const o=await t(e,r);n.has(o)||n.set(o,[]),n.get(o).push(e)})),n},function(e){var t=o&&o.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(yr,e),n(vr,e),n(br,e),n(wr,e),n(Tr,e),n(_r,e),n(Er,e),n(kr,e),n(Rr,e),n(Cr,e),n(xr,e),n(Or,e),n(Pr,e),n(Ir,e),n(jr,e),n(Fr,e),n(Mr,e),n(Lr,e),n(Dr,e),n(Br,e),n(zr,e),n(Jr,e),n(Gr,e),n(Kr,e),n(Qr,e),n(Zr,e),n(Yr,e)}(mr);var ro={},oo={};oo.traverseErrorPrototypeChain=void 0,oo.traverseErrorPrototypeChain=function*(e){let t=e;for(;(t=Object.getPrototypeOf(t))&&(yield t,t!==Error.prototype););},ro.getErrorNames=void 0;const io=g,ao=oo;ro.getErrorNames=function*(e){var t;if((0,io.isError)(e))for(const n of(0,ao.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 so={isSerializableError:void 0};const co=g;var uo;function lo(){if(uo)return st;uo=1,st.CustomError=void 0;const e=no(),t=ro,n=g,r=so;class o extends Error{get name(){var n,r;return null!==(r=null!==(n=(0,e.first)((0,t.getErrorNames)(this)))&&void 0!==n?n:o.name)&&void 0!==r?r:"CustomError"}static[Symbol.hasInstance](o){var i;if((0,n.isError)(o)||(0,r.isSerializableError)(o)){const n=[null!==(i=this.prototype.constructor.name)&&void 0!==i?i:this.name,...(0,t.getErrorNames)(this.prototype)].reverse(),r=(0,e.toArray)((0,t.getErrorNames)(o)).reverse();return n.every(((e,t)=>e===r[t]))}return!1}}return st.CustomError=o,st}so.isSerializableError=function(e){return(0,co.isObject)(e)&&(0,co.isString)(e.name)&&(0,co.isString)(e.message)&&((0,co.isString)(e.stack)||(0,co.isNull)(e.stack))&&(0,co.isArray)(e.ancestors)&&e.ancestors.every(co.isString)};var fo,ho={};function po(){if(fo)return ho;fo=1,ho.AssertionError=void 0;const e=lo();class t extends e.CustomError{}return ho.AssertionError=t,ho}var mo,yo={};var vo={},go={},bo={};bo.pass=void 0,bo.pass=function(){};var wo={};wo.passAsync=void 0,wo.passAsync=async function(){},function(e){var t=o&&o.__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]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(bo,e),n(wo,e)}(go),vo.hydrate=void 0;const Ao=go;function To(e,t){const n=function(){(0,Ao.pass)()};return(n.prototype=Object.create(e.prototype)).constructor=n,Object.defineProperty(n,"name",{value:t}),n}vo.hydrate=function(e){var t;const n=[e.name,...e.ancestors].slice(0,-1).reverse();let r=Error;for(const e of n)r=To(r,e);const o=new r;return o.name=e.name,o.message=e.message,o.stack=null!==(t=e.stack)&&void 0!==t?t:void 0,o};var _o,So,Eo={};function ko(){return So||(So=1,function(e){var t=o&&o.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(lo(),e),n(po(),e),n(so,e),n(function(){if(mo)return yo;mo=1,yo.normalize=void 0;const e=ro,t=no();return yo.normalize=function(n){var r;const[o,...i]=(0,t.toArray)((0,e.getErrorNames)(n));return{name:o,ancestors:i,message:n.message,stack:null!==(r=n.stack)&&void 0!==r?r:null}},yo}(),e),n(vo,e),n(function(){if(_o)return Eo;_o=1,Eo.assert=void 0;const e=po();return Eo.assert=function(t,n){if(!t)throw new e.AssertionError(n)},Eo}(),e),n(ro,e),n(oo,e)}(at)),at}ot.csv=void 0;const Ro=i,Co=it.exports,xo=ko();function Oo(e){const t=Object.keys(e[0]);return(0,Co.unparse)({data:e,fields:t})}ot.csv=function(e){return(0,xo.assert)(e.length>0,"payload must be a non-empty array"),t=>{const n=new Ro.Headers(t.headers);return n.set("Content-Type","text/csv"),{...t,headers:n,payload:Oo(e)}}};var Po={};Po.signal=void 0,Po.signal=function(e){return t=>({...t,signal:e})};var Io={header:void 0};const No=i;Io.header=function(e,t){return n=>{const r=new No.Headers(n.headers);return r.set(e,t),{...n,headers:r}}};var jo={appendHeader:void 0};const qo=i;jo.appendHeader=function(e,t){return n=>{const r=new qo.Headers(n.headers);return r.append(e,t),{...n,headers:r}}};var Fo={headers:void 0};const Uo=i;Fo.headers=function(e){return t=>{const n=new Uo.Headers(t.headers);for(const[t,r]of Object.entries(e))n.set(t,r);return{...t,headers:n}}};var Mo={accept:void 0};const Lo=jo;Mo.accept=function(e){return(0,Lo.appendHeader)("Accept",e)};var Do={};Do.host=void 0,Do.host=function(e){return t=>{const n=new URL(t.url.href);return n.host=e,{...t,url:n}}};var Bo={};Bo.port=void 0,Bo.port=function(e){return t=>{const n=new URL(t.url.href);return n.port=e.toString(),{...t,url:n}}};var Ho={};Ho.pathname=void 0,Ho.pathname=function(e){return t=>{const n=new URL(t.url.href);return n.pathname=e,{...t,url:n}}};var zo={};zo.search=void 0,zo.search=function(e){return t=>{const n=new URL(t.url.href);return n.search=e,{...t,url:n}}};var $o={};$o.searchParam=void 0,$o.searchParam=function(e,t){return n=>{const r=new URL(n.url.href),o=new URLSearchParams(r.searchParams);return o.set(e,t.toString()),r.search=o.toString(),{...n,url:r}}};var Jo={};Jo.searchParams=void 0,Jo.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(),{...t,url:n}}};var Wo={};Wo.appendSearchParam=void 0,Wo.appendSearchParam=function(e,t){return n=>{const r=new URL(n.url.href),o=new URLSearchParams(r.searchParams);return o.append(e,t.toString()),r.search=o.toString(),{...n,url:r}}};var Go={formDataField:void 0};const Vo=i,Ko=g;Go.formDataField=function(e,t){return n=>{const r=n.payload instanceof Vo.FormData?function(e){const t=new Vo.FormData;for(const[n,r]of e.entries())t.append(n,r);return t}(n.payload):new Vo.FormData;return(0,Ko.isArray)(t)?t.forEach((t=>r.append(e,t))):r.append(e,t),{...n,payload:r}}};var Qo={},Zo={exports:{}};!function(e,t){var n,r,o,i,a,s,c,u,l,d,f,h,p,m,y,v,g,b,w,A,T,_,S,E,k,R,C,x,O,P,I,N,j,q,F,U,M,L,D,B,H;"undefined"!=typeof self?self:"undefined"!=typeof window&&window,e.exports=(r=n="3.7.2",o="function"==typeof atob,i="function"==typeof btoa,a="function"==typeof Buffer,s="function"==typeof TextDecoder?new TextDecoder:void 0,c="function"==typeof TextEncoder?new TextEncoder:void 0,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=Array.prototype.slice.call(u),H={},l.forEach((function(e,t){return H[e]=t})),d=H,f=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,h=String.fromCharCode.bind(String),p="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(e,t){return void 0===t&&(t=function(e){return e}),new Uint8Array(Array.prototype.slice.call(e,0).map(t))},m=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"}))},y=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},v=function(e){for(var t,n,r,o,i="",a=e.length%3,s=0;s<e.length;){if((n=e.charCodeAt(s++))>255||(r=e.charCodeAt(s++))>255||(o=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");i+=l[(t=n<<16|r<<8|o)>>18&63]+l[t>>12&63]+l[t>>6&63]+l[63&t]}return a?i.slice(0,a-3)+"===".substring(a):i},b=a?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=4096,n=[],r=0,o=e.length;r<o;r+=t)n.push(h.apply(null,e.subarray(r,r+t)));return g(n.join(""))},A=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?h(192|t>>>6)+h(128|63&t):h(224|t>>>12&15)+h(128|t>>>6&63)+h(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return h(240|t>>>18&7)+h(128|t>>>12&63)+h(128|t>>>6&63)+h(128|63&t)},T=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,S=a?function(e){return Buffer.from(e,"utf8").toString("base64")}:c?function(e){return b(c.encode(e))}:function(e){return g(_(e))},k=function(e){return E(e,!0)},R=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,C=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return h(55296+(t>>>10))+h(56320+(1023&t));case 3:return h((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return h((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},O=function(e){if(e=e.replace(/\s+/g,""),!f.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));for(var t,n,r,o="",i=0;i<e.length;)t=d[e.charAt(i++)]<<18|d[e.charAt(i++)]<<12|(n=d[e.charAt(i++)])<<6|(r=d[e.charAt(i++)]),o+=64===n?h(t>>16&255):64===r?h(t>>16&255,t>>8&255):h(t>>16&255,t>>8&255,255&t);return o},I=a?function(e){return p(Buffer.from(e,"base64"))}:function(e){return p(P(e),(function(e){return e.charCodeAt(0)}))},N=function(e){return I(q(e))},j=a?function(e){return Buffer.from(e,"base64").toString("utf8")}:s?function(e){return s.decode(I(e))}:function(e){return x(P(e))},q=function(e){return y(e.replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})))},U=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}},M=function(){var e=function(e,t){return Object.defineProperty(String.prototype,e,U(t))};e("fromBase64",(function(){return F(this)})),e("toBase64",(function(e){return E(this,e)})),e("toBase64URI",(function(){return E(this,!0)})),e("toBase64URL",(function(){return E(this,!0)})),e("toUint8Array",(function(){return N(this)}))},L=function(){var e=function(e,t){return Object.defineProperty(Uint8Array.prototype,e,U(t))};e("toBase64",(function(e){return w(this,e)})),e("toBase64URI",(function(){return w(this,!0)})),e("toBase64URL",(function(){return w(this,!0)}))},D=function(){M(),L()},B={version:n,VERSION:r,atob:P=o?function(e){return atob(y(e))}:a?function(e){return Buffer.from(e,"base64").toString("binary")}:O,atobPolyfill:O,btoa:g=i?function(e){return btoa(e)}:a?function(e){return Buffer.from(e,"binary").toString("base64")}:v,btoaPolyfill:v,fromBase64:F=function(e){return j(q(e))},toBase64:E=function(e,t){return void 0===t&&(t=!1),t?m(S(e)):S(e)},encode:E,encodeURI:k,encodeURL:k,utob:_=function(e){return e.replace(T,A)},btou:x=function(e){return e.replace(R,C)},decode:F,isValid:function(e){if("string"!=typeof e)return!1;var t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:w=function(e,t){return void 0===t&&(t=!1),t?m(b(e)):b(e)},toUint8Array:N,extendString:M,extendUint8Array:L,extendBuiltins:D,Base64:{}},Object.keys(B).forEach((function(e){return B.Base64[e]=B[e]})),B)}(Zo),Qo.basicAuth=void 0;const Xo=Io,Yo=Zo.exports;Qo.basicAuth=function(e,t){return(0,Xo.header)("Authorization","Basic "+(0,Yo.btoa)(`${e}:${t}`))};var ei={bearerAuth:void 0};const ti=Io;ei.bearerAuth=function(e){return(0,ti.header)("Authorization",`Bearer ${e}`)};var ni={};ni.keepalive=void 0,ni.keepalive=function(e=!0){return t=>({...t,keepalive:e})},function(e){var t=o&&o.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(Ye,e),n(et,e),n(nt,e),n(ot,e),n(Po,e),n(Io,e),n(jo,e),n(Fo,e),n(Mo,e),n(Do,e),n(Bo,e),n(Ho,e),n(zo,e),n($o,e),n(Jo,e),n(Wo,e),n(Go,e),n(Qo,e),n(ei,e),n(ni,e)}(Xe);var ri={},oi={},ii={},ai={},si={CustomError:void 0};class ci extends Error{get name(){return this.constructor.name}}si.CustomError=ci;var ui={ExpectedError:void 0};const li=si;class di extends li.CustomError{}ui.ExpectedError=di;var fi={AssertionError:void 0};const hi=si;class pi extends hi.CustomError{}fi.AssertionError=pi;var mi={};mi.normalize=void 0,mi.normalize=function(e){var t;return{name:e.name,message:e.message,stack:null!==(t=e.stack)&&void 0!==t?t:null}};var yi={refute:void 0};const vi=ui;yi.refute=function(e,t){if(e)throw new vi.ExpectedError(t)};var gi={assert:void 0};const bi=fi;gi.assert=function(e,t){if(!e)throw new bi.AssertionError(t)},function(e){var t=o&&o.__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]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(si,e),n(ui,e),n(fi,e),n(mi,e),n(yi,e),n(gi,e)}(ai),ii.HTTPError=void 0;const wi=ai;ii.HTTPError=class extends wi.CustomError{constructor(e,t){super(t),this.code=e}};var Ai={},Ti={};!function(e){e.ServerError=e.ClientError=e.Redirection=e.Successful=e.Informational=void 0,function(e){e[e.Continue=100]="Continue",e[e.SwitchingProtocol=101]="SwitchingProtocol",e[e.Processing=102]="Processing",e[e.EarlyHints=103]="EarlyHints"}(e.Informational||(e.Informational={})),function(e){e[e.OK=200]="OK",e[e.Created=201]="Created",e[e.Accepted=202]="Accepted",e[e.NonAuthoritativeInformation=203]="NonAuthoritativeInformation",e[e.NoContent=204]="NoContent",e[e.ResetContent=205]="ResetContent",e[e.PartialContent=206]="PartialContent",e[e.MultiStatus=207]="MultiStatus",e[e.AlreadyReported=208]="AlreadyReported",e[e.IMUsed=226]="IMUsed"}(e.Successful||(e.Successful={})),function(e){e[e.MultipleChoice=300]="MultipleChoice",e[e.MovedPermanently=3011]="MovedPermanently",e[e.Found=302]="Found",e[e.SeeOther=303]="SeeOther",e[e.NotModified=304]="NotModified",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect"}(e.Redirection||(e.Redirection={})),function(e){e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.MethodNotAllowed=405]="MethodNotAllowed",e[e.NotAcceptable=406]="NotAcceptable",e[e.ProxyAuthenticationRequired=407]="ProxyAuthenticationRequired",e[e.RequestTimeout=408]="RequestTimeout",e[e.Conflict=409]="Conflict",e[e.Gone=410]="Gone",e[e.LengthRequired=411]="LengthRequired",e[e.PreconditionFailed=412]="PreconditionFailed",e[e.PayloadTooLarge=413]="PayloadTooLarge",e[e.URITooLong=414]="URITooLong",e[e.UnsupportedMediaType=415]="UnsupportedMediaType",e[e.RangeNotSatisfiable=416]="RangeNotSatisfiable",e[e.ExpectationFailed=417]="ExpectationFailed",e[e.MisdirectedRequest=421]="MisdirectedRequest",e[e.UnprocessableEntity=422]="UnprocessableEntity",e[e.Locked=423]="Locked",e[e.FailedDependency=424]="FailedDependency",e[e.UpgradeRequired=426]="UpgradeRequired",e[e.PreconditionRequired=428]="PreconditionRequired",e[e.TooManyRequests=429]="TooManyRequests",e[e.RequestHeaderFieldsTooLarge=431]="RequestHeaderFieldsTooLarge",e[e.UnavailableForLegalReasons=451]="UnavailableForLegalReasons"}(e.ClientError||(e.ClientError={})),function(e){e[e.InternalServerError=500]="InternalServerError",e[e.NotImplemented=501]="NotImplemented",e[e.BadGateway=502]="BadGateway",e[e.ServiceUnavailable=503]="ServiceUnavailable",e[e.GatewayTimeout=504]="GatewayTimeout",e[e.HTTPVersionNotSupported=505]="HTTPVersionNotSupported",e[e.VariantAlsoNegotiates=506]="VariantAlsoNegotiates",e[e.InsufficientStorage=507]="InsufficientStorage",e[e.LoopDetected=508]="LoopDetected",e[e.NotExtended=510]="NotExtended",e[e.NetworkAuthenticationRequired=511]="NetworkAuthenticationRequired"}(e.ServerError||(e.ServerError={}))}(Ti),Ai.EarlyHints=Ai.Processing=Ai.SwitchingProtocol=Ai.Continue=Ai.HTTPInformational=void 0;const _i=Ti;class Si{constructor(e,t){this.code=e,this.message=t}}Ai.HTTPInformational=Si;Ai.Continue=class extends Si{constructor(){super(_i.Informational.Continue,"Continue")}};Ai.SwitchingProtocol=class extends Si{constructor(){super(_i.Informational.SwitchingProtocol,"Switching Protocol")}};Ai.Processing=class extends Si{constructor(){super(_i.Informational.Processing,"Processing")}};Ai.EarlyHints=class extends Si{constructor(){super(_i.Informational.EarlyHints,"Early Hints")}};var Ei={};Ei.IMUsed=Ei.AlreadyReported=Ei.MultiStatus=Ei.PartialContent=Ei.ResetContent=Ei.NoContent=Ei.NonAuthoritativeInformation=Ei.Accepted=Ei.Created=Ei.OK=Ei.HTTPSuccessful=void 0;const ki=Ti;class Ri{constructor(e,t){this.code=e,this.message=t}}Ei.HTTPSuccessful=Ri;Ei.OK=class extends Ri{constructor(){super(ki.Successful.OK,"OK")}};Ei.Created=class extends Ri{constructor(){super(ki.Successful.Created,"Created")}};Ei.Accepted=class extends Ri{constructor(){super(ki.Successful.Accepted,"Accepted")}};Ei.NonAuthoritativeInformation=class extends Ri{constructor(){super(ki.Successful.NonAuthoritativeInformation,"Non-Authoritative Information")}};Ei.NoContent=class extends Ri{constructor(){super(ki.Successful.NoContent,"No Content")}};Ei.ResetContent=class extends Ri{constructor(){super(ki.Successful.ResetContent,"Reset Content")}};Ei.PartialContent=class extends Ri{constructor(){super(ki.Successful.PartialContent,"Partial Content")}};Ei.MultiStatus=class extends Ri{constructor(){super(ki.Successful.MultiStatus,"Multi-Status")}};Ei.AlreadyReported=class extends Ri{constructor(){super(ki.Successful.AlreadyReported,"Already Reported")}};Ei.IMUsed=class extends Ri{constructor(){super(ki.Successful.IMUsed,"IM Used")}};var Ci={};Ci.PermanentRedirect=Ci.TemporaryRedirect=Ci.NotModified=Ci.SeeOther=Ci.Found=Ci.MovedPermanently=Ci.MultipleChoice=Ci.HTTPRedirection=void 0;const xi=Ti;class Oi{constructor(e,t){this.code=e,this.message=t}}Ci.HTTPRedirection=Oi;Ci.MultipleChoice=class extends Oi{constructor(){super(xi.Redirection.MultipleChoice,"Multiple Choice")}};Ci.MovedPermanently=class extends Oi{constructor(){super(xi.Redirection.MovedPermanently,"Moved Permanently")}};Ci.Found=class extends Oi{constructor(){super(xi.Redirection.Found,"Found")}};Ci.SeeOther=class extends Oi{constructor(){super(xi.Redirection.SeeOther,"See Other")}};Ci.NotModified=class extends Oi{constructor(){super(xi.Redirection.NotModified,"Not Modified")}};Ci.TemporaryRedirect=class extends Oi{constructor(){super(xi.Redirection.TemporaryRedirect,"Temporary Redirect")}};Ci.PermanentRedirect=class extends Oi{constructor(){super(xi.Redirection.PermanentRedirect,"Permanent Redirect")}};var Pi={};Pi.UnavailableForLegalReasons=Pi.RequestHeaderFieldsTooLarge=Pi.TooManyRequests=Pi.PreconditionRequired=Pi.UpgradeRequired=Pi.FailedDependency=Pi.Locked=Pi.UnprocessableEntity=Pi.MisdirectedRequest=Pi.ExpectationFailed=Pi.RangeNotSatisfiable=Pi.UnsupportedMediaType=Pi.URITooLong=Pi.PayloadTooLarge=Pi.PreconditionFailed=Pi.LengthRequired=Pi.Gone=Pi.Conflict=Pi.RequestTimeout=Pi.ProxyAuthenticationRequired=Pi.NotAcceptable=Pi.MethodNotAllowed=Pi.NotFound=Pi.Forbidden=Pi.Unauthorized=Pi.BadRequest=Pi.HTTPClientError=void 0;const Ii=ii,Ni=Ti;class ji extends Ii.HTTPError{}Pi.HTTPClientError=ji;Pi.BadRequest=class extends ji{constructor(e){super(Ni.ClientError.BadRequest,null!=e?e:"Bad Request")}};Pi.Unauthorized=class extends ji{constructor(e){super(Ni.ClientError.Unauthorized,null!=e?e:"Unauthorized")}};Pi.Forbidden=class extends ji{constructor(e){super(Ni.ClientError.Forbidden,null!=e?e:"Forbidden")}};Pi.NotFound=class extends ji{constructor(e){super(Ni.ClientError.NotFound,null!=e?e:"Not Found")}};Pi.MethodNotAllowed=class extends ji{constructor(e){super(Ni.ClientError.MethodNotAllowed,null!=e?e:"Method Not Allowed")}};Pi.NotAcceptable=class extends ji{constructor(e){super(Ni.ClientError.NotAcceptable,null!=e?e:"Not Acceptable")}};Pi.ProxyAuthenticationRequired=class extends ji{constructor(e){super(Ni.ClientError.ProxyAuthenticationRequired,null!=e?e:"Proxy Authentication Required")}};Pi.RequestTimeout=class extends ji{constructor(e){super(Ni.ClientError.RequestTimeout,null!=e?e:"Request Timeout")}};Pi.Conflict=class extends ji{constructor(e){super(Ni.ClientError.Conflict,null!=e?e:"Conflict")}};Pi.Gone=class extends ji{constructor(e){super(Ni.ClientError.Gone,null!=e?e:"Gone")}};Pi.LengthRequired=class extends ji{constructor(e){super(Ni.ClientError.LengthRequired,null!=e?e:"Length Required")}};Pi.PreconditionFailed=class extends ji{constructor(e){super(Ni.ClientError.PreconditionFailed,null!=e?e:"Precondition Failed")}};Pi.PayloadTooLarge=class extends ji{constructor(e){super(Ni.ClientError.PayloadTooLarge,null!=e?e:"Payload Too Large")}};Pi.URITooLong=class extends ji{constructor(e){super(Ni.ClientError.URITooLong,null!=e?e:"URI Too Long")}};Pi.UnsupportedMediaType=class extends ji{constructor(e){super(Ni.ClientError.UnsupportedMediaType,null!=e?e:"Unsupported Media Type")}};Pi.RangeNotSatisfiable=class extends ji{constructor(e){super(Ni.ClientError.RangeNotSatisfiable,null!=e?e:"Range Not Satisfiable")}};Pi.ExpectationFailed=class extends ji{constructor(e){super(Ni.ClientError.ExpectationFailed,null!=e?e:"Expectation Failed")}};Pi.MisdirectedRequest=class extends ji{constructor(e){super(Ni.ClientError.MisdirectedRequest,null!=e?e:"Misdirected Request")}};Pi.UnprocessableEntity=class extends ji{constructor(e){super(Ni.ClientError.UnprocessableEntity,null!=e?e:"Unprocessable Entity")}};Pi.Locked=class extends ji{constructor(e){super(Ni.ClientError.Locked,null!=e?e:"Locked")}};Pi.FailedDependency=class extends ji{constructor(e){super(Ni.ClientError.FailedDependency,null!=e?e:"Failed Dependency")}};Pi.UpgradeRequired=class extends ji{constructor(e){super(Ni.ClientError.UpgradeRequired,null!=e?e:"Upgrade Required")}};Pi.PreconditionRequired=class extends ji{constructor(e){super(Ni.ClientError.PreconditionRequired,null!=e?e:"Precondition Required")}};Pi.TooManyRequests=class extends ji{constructor(e){super(Ni.ClientError.TooManyRequests,null!=e?e:"Too Many Requests")}};Pi.RequestHeaderFieldsTooLarge=class extends ji{constructor(e){super(Ni.ClientError.RequestHeaderFieldsTooLarge,null!=e?e:"Request Header Fields Too Large")}};Pi.UnavailableForLegalReasons=class extends ji{constructor(e){super(Ni.ClientError.UnavailableForLegalReasons,null!=e?e:"Unavailable For Legal Reasons")}};var qi={};qi.NetworkAuthenticationRequired=qi.NotExtended=qi.LoopDetected=qi.InsufficientStorage=qi.VariantAlsoNegotiates=qi.HTTPVersionNotSupported=qi.GatewayTimeout=qi.ServiceUnavailable=qi.BadGateway=qi.NotImplemented=qi.InternalServerError=qi.HTTPServerError=void 0;const Fi=ii,Ui=Ti;class Mi extends Fi.HTTPError{}qi.HTTPServerError=Mi;qi.InternalServerError=class extends Mi{constructor(e){super(Ui.ServerError.InternalServerError,null!=e?e:"Internal Server Error")}};qi.NotImplemented=class extends Mi{constructor(e){super(Ui.ServerError.NotImplemented,null!=e?e:"Not Implemented")}};qi.BadGateway=class extends Mi{constructor(e){super(Ui.ServerError.BadGateway,null!=e?e:"Bad Gateway")}};qi.ServiceUnavailable=class extends Mi{constructor(e){super(Ui.ServerError.ServiceUnavailable,null!=e?e:"Service Unavailable")}};qi.GatewayTimeout=class extends Mi{constructor(e){super(Ui.ServerError.GatewayTimeout,null!=e?e:"Gateway Timeout")}};qi.HTTPVersionNotSupported=class extends Mi{constructor(e){super(Ui.ServerError.HTTPVersionNotSupported,null!=e?e:"HTTP Version Not Supported")}};qi.VariantAlsoNegotiates=class extends Mi{constructor(e){super(Ui.ServerError.VariantAlsoNegotiates,null!=e?e:"Variant Also Negotiates")}};qi.InsufficientStorage=class extends Mi{constructor(e){super(Ui.ServerError.InsufficientStorage,null!=e?e:"Insufficient Storage")}};qi.LoopDetected=class extends Mi{constructor(e){super(Ui.ServerError.LoopDetected,null!=e?e:"Loop Detected")}};qi.NotExtended=class extends Mi{constructor(e){super(Ui.ServerError.NotExtended,null!=e?e:"Not Extended")}};qi.NetworkAuthenticationRequired=class extends Mi{constructor(e){super(Ui.ServerError.NetworkAuthenticationRequired,null!=e?e:"Network Authentication Required")}};var Li={};Li.fromCode=Li.UnknownHTTPStatusError=void 0;const Di=Ai,Bi=Ei,Hi=Ci,zi=Pi,$i=qi;class Ji extends Error{constructor(e){super(`The HTTP status code ${e} is unknown`),this.name=this.constructor.name}}Li.UnknownHTTPStatusError=Ji,Li.fromCode=function(e,t){switch(e){case 100:return new Di.Continue;case 101:return new Di.SwitchingProtocol;case 102:return new Di.Processing;case 103:return new Di.EarlyHints;case 200:return new Bi.OK;case 201:return new Bi.Created;case 202:return new Bi.Accepted;case 203:return new Bi.NonAuthoritativeInformation;case 204:return new Bi.NoContent;case 205:return new Bi.ResetContent;case 206:return new Bi.PartialContent;case 207:return new Bi.MultiStatus;case 208:return new Bi.AlreadyReported;case 226:return new Bi.IMUsed;case 300:return new Hi.MultipleChoice;case 301:return new Hi.MovedPermanently;case 302:return new Hi.Found;case 303:return new Hi.SeeOther;case 304:return new Hi.NotModified;case 307:return new Hi.TemporaryRedirect;case 308:return new Hi.PermanentRedirect;case 400:return new zi.BadRequest(t);case 401:return new zi.Unauthorized(t);case 403:return new zi.Forbidden(t);case 404:return new zi.NotFound(t);case 405:return new zi.MethodNotAllowed(t);case 406:return new zi.NotAcceptable(t);case 407:return new zi.ProxyAuthenticationRequired(t);case 408:return new zi.RequestTimeout(t);case 409:return new zi.Conflict(t);case 410:return new zi.Gone(t);case 411:return new zi.LengthRequired(t);case 412:return new zi.PreconditionFailed(t);case 413:return new zi.PayloadTooLarge(t);case 414:return new zi.URITooLong(t);case 415:return new zi.UnsupportedMediaType(t);case 416:return new zi.RangeNotSatisfiable(t);case 417:return new zi.ExpectationFailed(t);case 421:return new zi.MisdirectedRequest(t);case 422:return new zi.UnprocessableEntity(t);case 423:return new zi.Locked(t);case 424:return new zi.FailedDependency(t);case 426:return new zi.UpgradeRequired(t);case 428:return new zi.PreconditionRequired(t);case 429:return new zi.TooManyRequests(t);case 431:return new zi.RequestHeaderFieldsTooLarge(t);case 451:return new zi.UnavailableForLegalReasons(t);case 500:return new $i.InternalServerError(t);case 501:return new $i.NotImplemented(t);case 502:return new $i.BadGateway(t);case 503:return new $i.ServiceUnavailable(t);case 504:return new $i.GatewayTimeout(t);case 505:return new $i.HTTPVersionNotSupported(t);case 506:return new $i.VariantAlsoNegotiates(t);case 507:return new $i.InsufficientStorage(t);case 508:return new $i.LoopDetected(t);case 510:return new $i.NotExtended(t);case 511:return new $i.NetworkAuthenticationRequired(t);default:throw new Ji(e)}},function(e){var t=o&&o.__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]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(oi,e),n(ii,e),n(Ai,e),n(Ei,e),n(Ci,e),n(Pi,e),n(qi,e),n(Li,e)}(ri);var Wi={},Gi={};!function(e){e.ok=e.HTTPError=void 0;const t=ri;var n=ri;Object.defineProperty(e,"HTTPError",{enumerable:!0,get:function(){return n.HTTPError}}),e.ok=async function(e){if(!e.ok){const n=await e.text();throw(0,t.fromCode)(e.status,n)}return e}}(Gi);var Vi={};Vi.toJSON=void 0,Vi.toJSON=function(e){return e.json()};var Ki={};Ki.toText=void 0,Ki.toText=async function(e,t){if(t){const n=await e.arrayBuffer();return new TextDecoder(t).decode(n)}return await e.text()};var Qi={};Qi.toLines=void 0,Qi.toLines=async function*(e){const t=e.body.pipeThrough(new TextDecoderStream).getReader();let n="";for(;;){const{value:e,done:r}=await t.read();if(r)break;let o=e;for(;o.includes("\n");){const e=o.indexOf("\n");yield o.slice(0,e),o=o.slice(e+1)}n+=o}n&&(yield n)};var Zi={toNDJSON:void 0};const Xi=no(),Yi=Qi;Zi.toNDJSON=function(e){return(0,Xi.mapAsync)((0,Yi.toLines)(e),(e=>JSON.parse(e)))};var ea={toCSV:void 0};const ta=it.exports;ea.toCSV=async function(e){const t=await e.text();return(0,ta.parse)(t,{header:!0,skipEmptyLines:"greedy"}).data},function(e){var t=o&&o.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(Gi,e),n(Vi,e),n(Ki,e),n(Qi,e),n(Zi,e),n(ea,e)}(Wi);var na={},ra={},oa={exports:{}};const{AbortController:ia,AbortSignal:aa}="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;oa.exports=ia,oa.exports.AbortSignal=aa,oa.exports.default=ia;var sa,ca=o&&o.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};ra.AbortController=void 0;const ua=ca(oa.exports);ra.AbortController=null!==(sa=globalThis.AbortController)&&void 0!==sa?sa:ua.default;var la={AbortError:void 0};const da=ko(),fa=g,ha=no();class pa extends da.CustomError{static[Symbol.hasInstance](e){return(0,fa.isError)(e)?(0,ha.some)((0,da.getErrorNames)(e),(e=>"AbortError"===e)):super[Symbol.hasInstance](e)}}la.AbortError=pa;var ma,ya={};ya.AbortSignal=void 0;const va=oa.exports;ya.AbortSignal=null!==(ma=globalThis.AbortSignal)&&void 0!==ma?ma:va.AbortSignal;var ga={raceAbortSignals:void 0};const ba=ra;ga.raceAbortSignals=function(e){const t=new ba.AbortController,n=[];for(const o of e)if(o){if(o.aborted){t.abort();break}o.addEventListener("abort",r),n.push(o)}return t.signal;function r(){t.abort(),n.forEach((e=>e.removeEventListener("abort",r)))}};var wa={timeoutSignal:void 0};const Aa=ra;wa.timeoutSignal=function(e){const t=new Aa.AbortController;return setTimeout((()=>t.abort()),e),t.signal};var Ta={withAbortSignal:void 0};const _a=la;Ta.withAbortSignal=async function(e,t){return new Promise((async(n,r)=>{if(e.aborted)return o();e.addEventListener("abort",o);try{n(await t())}catch(e){r(e)}finally{e.removeEventListener("abort",o)}function o(){r(new _a.AbortError)}}))},function(e){var t=o&&o.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),n=o&&o.__exportStar||function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||t(n,e,r)};n(ra,e),n(la,e),n(ya,e),n(ga,e),n(wa,e),n(Ta,e)}(na);const Sa="0.1.0";class Ea{constructor(e){this.options=e}getCommonTransformers(e){var t,n;return[Xe.url(this.options.server),Xe.bearerAuth(this.options.adminPassword),Xe.signal(na.raceAbortSignals([e.signal,!1!==e.timeout&&(null!==(t=e.timeout&&na.timeoutSignal(e.timeout))&&void 0!==t?t:this.options.timeout&&na.timeoutSignal(this.options.timeout))])),(null!==(n=e.keepalive)&&void 0!==n?n:this.options.keepalive)&&Xe.keepalive(),Xe.header("Accept-Version",Sa)]}}class ka extends Ea{async getNamespaces(e={}){const t=m.get(...this.getCommonTransformers(e),Xe.pathname("/admin/estore-with-json-schema"));return await i.fetch(t).then(Wi.ok).then(Wi.toJSON)}async get(e,t={}){const n=m.get(...this.getCommonTransformers(t),Xe.pathname(`/admin/estore/${e}/json-schema`));return await i.fetch(n).then(Wi.ok).then(Wi.toJSON)}async set(e,t,n={}){const r=m.put(...this.getCommonTransformers(n),Xe.pathname(`/admin/estore/${e}/json-schema`),Xe.json(t));await i.fetch(r).then(Wi.ok)}async remove(e,t={}){const n=m.del(...this.getCommonTransformers(t),Xe.pathname(`/admin/estore/${e}/json-schema`));await i.fetch(n).then(Wi.ok)}}class Ra extends Ea{async getNamespaces(e={}){const t=m.get(...this.getCommonTransformers(e),Xe.pathname("/admin/blacklist"));return await i.fetch(t).then(Wi.ok).then(Wi.toJSON)}async add(e,t={}){const n=m.put(...this.getCommonTransformers(t),Xe.pathname(`/admin/blacklist/${e}`));await i.fetch(n).then(Wi.ok)}async remove(e,t={}){const n=m.del(...this.getCommonTransformers(t),Xe.pathname(`/admin/blacklist/${e}`));await i.fetch(n).then(Wi.ok)}}class Ca extends Ea{async getNamespaces(e={}){const t=m.get(...this.getCommonTransformers(e),Xe.pathname("/admin/whitelist"));return await i.fetch(t).then(Wi.ok).then(Wi.toJSON)}async add(e,t={}){const n=m.put(...this.getCommonTransformers(t),Xe.pathname(`/admin/whitelist/${e}`));await i.fetch(n).then(Wi.ok)}async remove(e,t={}){const n=m.del(...this.getCommonTransformers(t),Xe.pathname(`/admin/whitelist/${e}`));await i.fetch(n).then(Wi.ok)}}class xa extends Ea{async getNamespaces(e={}){const t=m.get(...this.getCommonTransformers(e),Xe.pathname("/admin/estore-with-token-policies"));return await i.fetch(t).then(Wi.ok).then(Wi.toJSON)}async get(e,t={}){const n=m.get(...this.getCommonTransformers(t),Xe.pathname(`/admin/estore/${e}/token-policies`));return await i.fetch(n).then(Wi.ok).then(Wi.toJSON)}async setWriteTokenRequired(e,t,n={}){const r=m.put(...this.getCommonTransformers(n),Xe.pathname(`/admin/estore/${e}/token-policies/write-token-required`),Xe.json(t));await i.fetch(r).then(Wi.ok)}async removeWriteTokenRequired(e,t={}){const n=m.del(...this.getCommonTransformers(t),Xe.pathname(`/admin/estore/${e}/token-policies/write-token-required`));await i.fetch(n).then(Wi.ok)}async setReadTokenRequired(e,t,n={}){const r=m.put(...this.getCommonTransformers(n),Xe.pathname(`/admin/estore/${e}/token-policies/read-token-required`),Xe.json(t));await i.fetch(r).then(Wi.ok)}async removeReadTokenRequired(e,t={}){const n=m.del(...this.getCommonTransformers(t),Xe.pathname(`/admin/estore/${e}/token-policies/read-token-required`));await i.fetch(n).then(Wi.ok)}async setDeleteTokenRequired(e,t,n={}){const r=m.put(...this.getCommonTransformers(n),Xe.pathname(`/admin/estore/${e}/token-policies/delete-token-required`),Xe.json(t));await i.fetch(r).then(Wi.ok)}async removeDeleteTokenRequired(e,t={}){const n=m.del(...this.getCommonTransformers(t),Xe.pathname(`/admin/estore/${e}/token-policies/delete-token-required`));await i.fetch(n).then(Wi.ok)}}class Oa extends Ea{async getNamespaces(e={}){const t=m.get(...this.getCommonTransformers(e),Xe.pathname("/admin/estore-with-tokens"));return await i.fetch(t).then(Wi.ok).then(Wi.toJSON)}async getTokens(e,t={}){const n=m.get(...this.getCommonTransformers(t),Xe.pathname(`/admin/estore/${e}/tokens`));return await i.fetch(n).then(Wi.ok).then(Wi.toJSON)}async addWriteToken(e,t,n={}){const r=m.put(...this.getCommonTransformers(n),Xe.pathname(`/admin/estore/${e}/tokens/${t}/write`));await i.fetch(r).then(Wi.ok)}async removeWriteToken(e,t,n={}){const r=m.del(...this.getCommonTransformers(n),Xe.pathname(`/admin/estore/${e}/tokens/${t}/write`));await i.fetch(r).then(Wi.ok)}async addReadToken(e,t,n={}){const r=m.put(...this.getCommonTransformers(n),Xe.pathname(`/admin/estore/${e}/tokens/${t}/read`));await i.fetch(r).then(Wi.ok)}async removeReadToken(e,t,n={}){const r=m.del(...this.getCommonTransformers(n),Xe.pathname(`/admin/estore/${e}/tokens/${t}/read`));await i.fetch(r).then(Wi.ok)}async addDeleteToken(e,t,n={}){const r=m.put(...this.getCommonTransformers(n),Xe.pathname(`/admin/estore/${e}/tokens/${t}/delete`));await i.fetch(r).then(Wi.ok)}async removeDeleteToken(e,t,n={}){const r=m.del(...this.getCommonTransformers(n),Xe.pathname(`/admin/estore/${e}/tokens/${t}/delete`));await i.fetch(r).then(Wi.ok)}}e.AbortError=i.AbortError,e.EStoreClient=class{constructor(e){this.options=e}getCommonTransformers(e){var t,n,r;const o="token"in e&&null!==(t=e.token)&&void 0!==t?t:this.options.token,i=this.options.basicAuth;return[Xe.url(this.options.server),i&&Xe.basicAuth(i.username,i.password),o&&Xe.searchParams({token:o}),Xe.signal(na.raceAbortSignals([e.signal,!1!==e.timeout&&(null!==(n=e.timeout&&na.timeoutSignal(e.timeout))&&void 0!==n?n:this.options.timeout&&na.timeoutSignal(this.options.timeout))])),(null!==(r=e.keepalive)&&void 0!==r?r:this.options.keepalive)&&Xe.keepalive(),Xe.header("Accept-Version",Sa)]}async append(e,t,n,r,o={}){const a=m.post(...this.getCommonTransformers(o),Xe.pathname(`/estore/${e}/items/${t}/events`),g.isntUndefined(r)&&Xe.header("If-Match",`${r}`),Xe.json(n));await i.fetch(a).then(Wi.ok)}async getEvent(e,t,n,r={}){const o=m.get(...this.getCommonTransformers(r),Xe.pathname(`/estore/${e}/items/${t}/events/${n}`));try{return await i.fetch(o).then(Wi.ok).then(Wi.toJSON)}catch(e){if(e instanceof ri.NotFound)return;throw e}}async getEvents(e,t,n={}){const r=m.get(...this.getCommonTransformers(n),Xe.pathname(`/estore/${e}/items/${t}/events`));try{return await i.fetch(r).then(Wi.ok).then(Wi.toJSON)}catch(e){if(e instanceof ri.NotFound)return;throw e}}async getSize(e,t,n={}){const r=m.get(...this.getCommonTransformers(n),Xe.pathname(`/estore/${e}/items/${t}/size`));return await i.fetch(r).then(Wi.ok).then(Wi.toJSON)}async has(e,t,n={}){const r=m.head(...this.getCommonTransformers(n),Xe.pathname(`/estore/${e}/items/${t}`));try{return await i.fetch(r).then(Wi.ok),!0}catch(e){if(e instanceof ri.NotFound)return!1;throw e}}async del(e,t,n={}){const r=m.del(...this.getCommonTransformers(n),Xe.pathname(`/estore/${e}/items/${t}`));await i.fetch(r).then(Wi.ok)}async clear(e,t={}){const n=m.del(...this.getCommonTransformers(t),Xe.pathname(`/estore/${e}`));await i.fetch(n).then(Wi.ok)}async getAllItemIds(e,t={}){const n=m.get(...this.getCommonTransformers(t),Xe.pathname(`/estore/${e}/items`));return await i.fetch(n).then(Wi.ok).then(Wi.toJSON)}async getAllNamespaces(e={}){const t=m.get(...this.getCommonTransformers(e),Xe.pathname("/estore"));return await i.fetch(t).then(Wi.ok).then(Wi.toJSON)}async stats(e,t={}){const n=m.get(...this.getCommonTransformers(t),Xe.pathname(`/estore/${e}/stats`));return await i.fetch(n).then(Wi.ok).then(Wi.toJSON)}},e.EStoreManager=class{constructor(e){this.options=e,this.JsonSchema=new ka(this.options),this.Blacklist=new Ra(this.options),this.Whitelist=new Ca(this.options),this.TokenPolicy=new xa(this.options),this.Token=new Oa(this.options)}},e.HTTPClientError=ri.HTTPClientError,e.HTTPError=Wi.HTTPError,Object.defineProperty(e,"__esModule",{value:!0})}));
9
9
  //# sourceMappingURL=index.umd.min.js.map