extra-request 4.0.0 → 4.0.3

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