extra-request 3.0.3 → 4.0.0

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 e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t={},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,d,l={};l.EventSource=void 0,l.EventSource=globalThis.EventSource,f=t,h=e&&e.__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]}),(d=e&&e.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||h(t,e,n)})(n,f),d(r,f),d(i,f),d(s,f),d(o,f),d(a,f),d(u,f),d(c,f),d(l,f);var p={},g={};function m(e){return Array.isArray(e)}g.isntEmptyArray=g.isEmptyArray=g.isntArray=g.isArray=void 0,g.isArray=m,g.isntArray=function(e){return!m(e)},g.isEmptyArray=function(e){return 0===e.length},g.isntEmptyArray=function(e){return 0!==e.length};var y={},v={};function _(e){return null===e}v.isntNull=v.isNull=void 0,v.isNull=_,v.isntNull=function(e){return!_(e)};var b={};function E(e){return void 0===e}b.isntUndefined=b.isUndefined=void 0,b.isUndefined=E,b.isntUndefined=function(e){return!E(e)},y.isntAsyncIterable=y.isAsyncIterable=void 0;const O=v,w=b;function R(e){return(0,O.isntNull)(e)&&(0,w.isntUndefined)(e)&&"function"==typeof e[Symbol.asyncIterator]}y.isAsyncIterable=R,y.isntAsyncIterable=function(e){return!R(e)};var k={};function S(e){return"bigint"==typeof e}k.isntBigInt=k.isBigInt=void 0,k.isBigInt=S,k.isntBigInt=function(e){return!S(e)};var C={};function j(e){return"boolean"==typeof e}C.isntBoolean=C.isBoolean=void 0,C.isBoolean=j,C.isntBoolean=function(e){return!j(e)};var A={},x={};function T(e){return"string"==typeof e}x.isntString=x.isString=void 0,x.isString=T,x.isntString=function(e){return!T(e)},A.isntChar=A.isChar=void 0;const D=x;function I(e){return(0,D.isString)(e)&&1===e.length}A.isChar=I,A.isntChar=function(e){return!I(e)};var L={};function U(e){return e instanceof Date}L.isntDate=L.isDate=void 0,L.isDate=U,L.isntDate=function(e){return!U(e)};var F={};F.inEnum=void 0,F.inEnum=function(e,t){return Object.values(t).includes(e)};var N={};function B(e){return e instanceof Error}N.isntError=N.isError=void 0,N.isError=B,N.isntError=function(e){return!B(e)};var P={};function z(e){return!e}P.isntFalsy=P.isFalsy=void 0,P.isFalsy=z,P.isntFalsy=function(e){return!z(e)};var J={};function q(e){return"function"==typeof e}J.isntFunction=J.isFunction=void 0,J.isFunction=q,J.isntFunction=function(e){return!q(e)};var M={};M.isntIterable=M.isIterable=void 0;const H=v,K=b;function W(e){return(0,H.isntNull)(e)&&(0,K.isntUndefined)(e)&&"function"==typeof e[Symbol.iterator]}M.isIterable=W,M.isntIterable=function(e){return!W(e)};var Q={},$={};function G(e){return null!==e&&"object"==typeof e}$.isntEmptyObject=$.isEmptyObject=$.isRecord=$.isntObject=$.isObject=void 0,$.isObject=G,$.isntObject=function(e){return!G(e)},$.isRecord=function(e){return G(e)},$.isEmptyObject=function(e){return 0===Object.keys(e).length},$.isntEmptyObject=function(e){return 0!==Object.keys(e).length};var Z={};function Y(e){return"number"==typeof e}Z.isntNumber=Z.isNumber=void 0,Z.isNumber=Y,Z.isntNumber=function(e){return!Y(e)},Q.isntJsonRpcError=Q.isJsonRpcError=Q.isntJsonRpcSuccess=Q.isJsonRpcSuccess=Q.isntJsonRpcRequest=Q.isJsonRpcRequest=Q.isntJsonRpcNotification=Q.isJsonRpcNotification=void 0;const X=g,V=$,ee=x,te=Z,ne=b;function re(e){return(0,ee.isString)(e)||(0,te.isNumber)(e)}function ie(e){return(0,X.isArray)(e)||(0,V.isObject)(e)}function se(e){return(0,V.isRecord)(e)&&(0,ee.isString)(e.jsonrpc)&&(0,ee.isString)(e.method)&&(0,ne.isUndefined)(e.id)&&ie(e.params)}function oe(e){return(0,V.isRecord)(e)&&(0,ee.isString)(e.jsonrpc)&&(0,ee.isString)(e.method)&&re(e.id)&&ie(e.params)}function ae(e){return(0,V.isRecord)(e)&&(0,ee.isString)(e.jsonrpc)&&(0,ee.isString)(e.id)&&"result"in e}function ue(e){return(0,V.isRecord)(e)&&(0,ee.isString)(e.jsonrpc)&&re(e.id)&&function(e){return(0,V.isRecord)(e)&&(0,te.isNumber)(e.code)&&(0,ee.isString)(e.message)&&((0,ne.isUndefined)(e.data)||(0,V.isObject)(e.data))}(e.error)}Q.isJsonRpcNotification=se,Q.isntJsonRpcNotification=function(e){return!se(e)},Q.isJsonRpcRequest=oe,Q.isntJsonRpcRequest=function(e){return!oe(e)},Q.isJsonRpcSuccess=ae,Q.isntJsonRpcSuccess=function(e){return!ae(e)},Q.isJsonRpcError=ue,Q.isntJsonRpcError=function(e){return!ue(e)};var ce={};ce.isntJson=ce.isJson=void 0,ce.isJson=function(e){try{return JSON.stringify(e),!0}catch(e){return!1}},ce.isntJson=function e(t){return!e()};var fe={};function he(...e){return ye("GET",...e)}function de(...e){return ye("HEAD",...e)}function le(...e){return ye("POST",...e)}function pe(...e){return ye("PUT",...e)}function ge(...e){return ye("PATCH",...e)}function me(...e){return ye("DELETE",...e)}function ye(e,...n){const r=n.reduce(((e,t)=>p.isFunction(t)?t(e):e),{url:new URL("http://localhost"),headers:new t.Headers}),i=new t.Headers(r.headers);return new t.Request(r.url.href,{method:e,headers:i,signal:r.signal,body:r.payload,keepalive:r.keepalive})}function ve(...e){return t=>{const n=new URL(e.reduce(((e,t)=>new URL(t,e).href)));return Object.assign(Object.assign({},t),{url:n})}}function _e(e){return n=>{const r=new t.Headers(n.headers);return r.set("Content-Type","application/x-www-form-urlencoded"),Object.assign(Object.assign({},n),{headers:r,payload:e})}}function be(e){return n=>{const r=new t.Headers(n.headers);return r.set("Content-Type","application/json"),Object.assign(Object.assign({},n),{headers:r,payload:JSON.stringify(e)})}}fe.isAbsoluteURL=void 0,fe.isAbsoluteURL=function(e){try{return new URL(e),!0}catch(e){return!1}},function(t){var n=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(g,t),r(y,t),r(k,t),r(C,t),r(A,t),r(L,t),r(F,t),r(N,t),r(P,t),r(J,t),r(M,t),r(Q,t),r(ce,t),r(v,t),r(Z,t),r($,t),r(x,t),r(b,t),r(fe,t)}(p);var Ee={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 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:{}};
2
2
  /* @license
3
3
  Papa Parse
4
4
  v5.3.1
5
5
  https://github.com/mholt/PapaParse
6
6
  License: MIT
7
- */Ee.exports=function e(){var t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==t?t:{},n=!t.document&&!!t.postMessage,r=n&&/blob:/i.test((t.location||{}).protocol),i={},s=0,o={parse:function(n,r){var a=(r=r||{}).dynamicTyping||!1;if(E(a)&&(r.dynamicTypingFunction=a,a={}),r.dynamicTyping=a,r.transform=!!E(r.transform)&&r.transform,r.worker&&o.WORKERS_SUPPORTED){var u=function(){if(!o.WORKERS_SUPPORTED)return!1;var n,r,a=(n=t.URL||t.webkitURL||null,r=e.toString(),o.BLOB_URL||(o.BLOB_URL=n.createObjectURL(new Blob(["(",r,")();"],{type:"text/javascript"})))),u=new t.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=E(r.step),r.chunk=E(r.chunk),r.complete=E(r.complete),r.error=E(r.error),delete r.worker,void u.postMessage({input:n,config:r,workerId:u.id})}var l=null;return o.NODE_STREAM_INPUT,"string"==typeof n?l=r.download?new c(r):new h(r):!0===n.readable&&E(n.read)&&E(n.on)?l=new d(r):(t.File&&n instanceof File||n instanceof Object)&&(l=new f(r)),l.stream(n)},unparse:function(e,t){var n=!1,r=!0,i=",",s="\r\n",a='"',u=a+a,c=!1,f=null,h=!1;!function(){if("object"==typeof t){if("string"!=typeof t.delimiter||o.BAD_DELIMITERS.filter((function(e){return-1!==t.delimiter.indexOf(e)})).length||(i=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes),"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(c=t.skipEmptyLines),"string"==typeof t.newline&&(s=t.newline),"string"==typeof t.quoteChar&&(a=t.quoteChar),"boolean"==typeof t.header&&(r=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");f=t.columns}void 0!==t.escapeChar&&(u=t.escapeChar+a),"boolean"==typeof t.escapeFormulae&&(h=t.escapeFormulae)}}();var d=new RegExp(p(a),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return l(null,e,c);if("object"==typeof e[0])return l(f||Object.keys(e[0]),e,c)}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),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])),l(e.fields||[],e.data||[],c);throw new Error("Unable to serialize unrecognized input");function l(e,t,n){var o="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var a=Array.isArray(e)&&0<e.length,u=!Array.isArray(t[0]);if(a&&r){for(var c=0;c<e.length;c++)0<c&&(o+=i),o+=g(e[c],c);0<t.length&&(o+=s)}for(var f=0;f<t.length;f++){var h=a?e.length:t[f].length,d=!1,l=a?0===Object.keys(t[f]).length:0===t[f].length;if(n&&!a&&(d="greedy"===n?""===t[f].join("").trim():1===t[f].length&&0===t[f][0].length),"greedy"===n&&a){for(var p=[],m=0;m<h;m++){var y=u?e[m]:m;p.push(t[f][y])}d=""===p.join("").trim()}if(!d){for(var v=0;v<h;v++){0<v&&!l&&(o+=i);var _=a&&u?e[v]:v;o+=g(t[f][_],v)}f<t.length-1&&(!n||0<h&&!l)&&(o+=s)}}return o}function g(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);!0===h&&"string"==typeof e&&null!==e.match(/^[=+\-@].*$/)&&(e="'"+e);var r=e.toString().replace(d,u);return"boolean"==typeof n&&n||"function"==typeof n&&n(e,t)||Array.isArray(n)&&n[t]||function(e,t){for(var n=0;n<t.length;n++)if(-1<e.indexOf(t[n]))return!0;return!1}(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&&!!t.Worker,o.NODE_STREAM_INPUT=1,o.LocalChunkSize=10485760,o.RemoteChunkSize=5242880,o.DefaultDelimiter=",",o.Parser=g,o.ParserHandle=l,o.NetworkStreamer=c,o.FileStreamer=f,o.StringStreamer=h,o.ReadableStreamStreamer=d,t.jQuery){var a=t.jQuery;a.fn.parse=function(e){var n=e.config||{},r=[];return this.each((function(e){if("INPUT"!==a(this).prop("tagName").toUpperCase()||"file"!==a(this).attr("type").toLowerCase()||!t.FileReader||!this.files||0===this.files.length)return!0;for(var i=0;i<this.files.length;i++)r.push({file:this.files[i],inputElem:this,instanceConfig:a.extend({},n)})})),i(),this;function i(){if(0!==r.length){var t,n,i,u,c=r[0];if(E(e.before)){var f=e.before(c.file,c.inputElem);if("object"==typeof f){if("abort"===f.action)return t="AbortError",n=c.file,i=c.inputElem,u=f.reason,void(E(e.error)&&e.error({name:t},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(e){E(h)&&h(e,c.file,c.inputElem),s()},o.parse(c.file,c.instanceConfig)}else E(e.complete)&&e.complete()}function s(){r.splice(0,1),i()}}}function u(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=_(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null),this._handle=new l(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,n){if(this.isFirstChunk&&E(this._config.beforeFirstChunk)){var i=this._config.beforeFirstChunk(e);void 0!==i&&(e=i)}this.isFirstChunk=!1,this._halted=!1;var s=this._partialLine+e;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)t.postMessage({results:a,workerId:o.WORKER_ID,finished:c});else if(E(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||!E(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(e){E(this._config.error)?this._config.error(e):r&&this._config.error&&t.postMessage({workerId:o.WORKER_ID,error:e,finished:!1})}}function c(e){var t;(e=e||{}).chunkSize||(e.chunkSize=o.RemoteChunkSize),u.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),n||(t.onload=b(this._chunkLoaded,this),t.onerror=b(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var r in e)t.setRequestHeader(r,e[r])}if(this._config.chunkSize){var i=this._start+this._config.chunkSize-1;t.setRequestHeader("Range","bytes="+this._start+"-"+i)}try{t.send(this._config.downloadRequestBody)}catch(e){this._chunkError(e.message)}n&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){4===t.readyState&&(t.status<200||400<=t.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");return null===t?-1:parseInt(t.substring(t.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)))},this._chunkError=function(e){var n=t.statusText||e;this._sendError(new Error(n))}}function f(e){var t,n;(e=e||{}).chunkSize||(e.chunkSize=o.LocalChunkSize),u.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=b(this._chunkLoaded,this),t.onerror=b(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var i=Math.min(this._start+this._config.chunkSize,this._input.size);e=n.call(e,this._start,i)}var s=t.readAsText(e,this._config.encoding);r||this._chunkLoaded({target:{result:s}})},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 h(e){var t;u.call(this,e=e||{}),this.stream=function(e){return t=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,n=this._config.chunkSize;return n?(e=t.substring(0,n),t=t.substring(n)):(e=t,t=""),this._finished=!t,this.parseChunk(e)}}}function d(e){u.call(this,e=e||{});var t=[],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(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=b((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=b((function(e){this._streamCleanUp(),this._sendError(e)}),this),this._streamEnd=b((function(){this._streamCleanUp(),r=!0,this._streamData("")}),this),this._streamCleanUp=b((function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)}),this)}function l(e){var t,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,d=!1,l=!1,m=[],y={data:[],errors:[],meta:{}};if(E(e.step)){var v=e.step;e.step=function(t){if(y=t,w())O();else{if(O(),0===y.data.length)return;f+=t.data.length,e.preview&&f>e.preview?n.abort():(y.data=y.data[0],v(y,c))}}}function b(t){return"greedy"===e.skipEmptyLines?""===t.join("").trim():1===t.length&&0===t[0].length}function O(){if(y&&r&&(k("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+o.DefaultDelimiter+"'"),r=!1),e.skipEmptyLines)for(var t=0;t<y.data.length;t++)b(y.data[t])&&y.data.splice(t--,1);return w()&&function(){if(y)if(Array.isArray(y.data[0])){for(var t=0;w()&&t<y.data.length;t++)y.data[t].forEach(n);y.data.splice(0,1)}else y.data.forEach(n);function n(t,n){E(e.transformHeader)&&(t=e.transformHeader(t,n)),m.push(t)}}(),function(){if(!y||!e.header&&!e.dynamicTyping&&!e.transform)return y;function t(t,n){var r,i=e.header?{}:[];for(r=0;r<t.length;r++){var s=r,o=t[r];e.header&&(s=r>=m.length?"__parsed_extra":m[r]),e.transform&&(o=e.transform(o,s)),o=R(s,o),"__parsed_extra"===s?(i[s]=i[s]||[],i[s].push(o)):i[s]=o}return e.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(t),n=y.data.length):y.data=t(y.data,0),e.header&&y.meta&&(y.meta.fields=m),h+=n,y}()}function w(){return e.header&&0===m.length}function R(t,n){return r=t,e.dynamicTypingFunction&&void 0===e.dynamicTyping[r]&&(e.dynamicTyping[r]=e.dynamicTypingFunction(r)),!0===(e.dynamicTyping[r]||e.dynamicTyping)?"true"===n||"TRUE"===n||"false"!==n&&"FALSE"!==n&&(function(e){if(a.test(e)){var t=parseFloat(e);if(s<t&&t<i)return!0}return!1}(n)?parseFloat(n):u.test(n)?new Date(n):""===n?null:n):n;var r}function k(e,t,n,r){var i={type:e,code:t,message:n};void 0!==r&&(i.row=r),y.errors.push(i)}this.parse=function(i,s,a){var u=e.quoteChar||'"';if(e.newline||(e.newline=function(e,t){e=e.substring(0,1048576);var n=new RegExp(p(t)+"([^]*?)"+p(t),"gm"),r=(e=e.replace(n,"")).split("\r"),i=e.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,e.delimiter)E(e.delimiter)&&(e.delimiter=e.delimiter(i),y.meta.delimiter=e.delimiter);else{var c=function(t,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 d=s[h],l=0,p=0,m=0;c=void 0;for(var y=new g({comments:i,delimiter:d,newline:n,preview:10}).parse(t),v=0;v<y.data.length;v++)if(r&&b(y.data[v]))m++;else{var _=y.data[v].length;p+=_,void 0!==c?0<_&&(l+=Math.abs(_-c),c=_):c=_}0<y.data.length&&(p/=y.data.length-m),(void 0===u||l<=u)&&(void 0===f||f<p)&&1.99<p&&(u=l,a=d,f=p)}return{successful:!!(e.delimiter=a),bestDelimiter:a}}(i,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);c.successful?e.delimiter=c.bestDelimiter:(r=!0,e.delimiter=o.DefaultDelimiter),y.meta.delimiter=e.delimiter}var f=_(e);return e.preview&&e.header&&f.preview++,t=i,n=new g(f),y=n.parse(t,s,a),O(),d?{meta:{paused:!0}}:y||{meta:{paused:!1}}},this.paused=function(){return d},this.pause=function(){d=!0,n.abort(),t=E(e.chunk)?"":t.substring(n.getCharIndex())},this.resume=function(){c.streamer._halted?(d=!1,c.streamer.parseChunk(t,!0)):setTimeout(c.resume,3)},this.aborted=function(){return l},this.abort=function(){l=!0,n.abort(),y.meta.aborted=!0,E(e.complete)&&e.complete(y),t=""}}function p(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function g(e){var t,n=(e=e||{}).delimiter,r=e.newline,i=e.comments,s=e.step,a=e.preview,u=e.fastMode,c=t=void 0===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(c=e.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(e,o,d){if("string"!=typeof e)throw new Error("Input must be a string");var l=e.length,g=n.length,m=r.length,y=i.length,v=E(s),_=[],b=[],O=[],w=f=0;if(!e)return F();if(u||!1!==u&&-1===e.indexOf(t)){for(var R=e.split(r),k=0;k<R.length;k++){if(O=R[k],f+=O.length,k!==R.length-1)f+=r.length;else if(d)return F();if(!i||O.substring(0,y)!==i){if(v){if(_=[],D(O.split(n)),N(),h)return F()}else D(O.split(n));if(a&&a<=k)return _=_.slice(0,a),F(!0)}}return F()}for(var S=e.indexOf(n,f),C=e.indexOf(r,f),j=new RegExp(p(c)+p(t),"g"),A=e.indexOf(t,f);;)if(e[f]!==t)if(i&&0===O.length&&e.substring(f,f+y)===i){if(-1===C)return F();f=C+m,C=e.indexOf(r,f),S=e.indexOf(n,f)}else if(-1!==S&&(S<C||-1===C))O.push(e.substring(f,S)),f=S+g,S=e.indexOf(n,f);else{if(-1===C)break;if(O.push(e.substring(f,C)),U(C+m),v&&(N(),h))return F();if(a&&_.length>=a)return F(!0)}else for(A=f,f++;;){if(-1===(A=e.indexOf(t,A+1)))return d||b.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:_.length,index:f}),L();if(A===l-1)return L(e.substring(f,A).replace(j,t));if(t!==c||e[A+1]!==c){if(t===c||0===A||e[A-1]!==c){-1!==S&&S<A+1&&(S=e.indexOf(n,A+1)),-1!==C&&C<A+1&&(C=e.indexOf(r,A+1));var x=I(-1===C?S:Math.min(S,C));if(e[A+1+x]===n){O.push(e.substring(f,A).replace(j,t)),e[f=A+1+x+g]!==t&&(A=e.indexOf(t,f)),S=e.indexOf(n,f),C=e.indexOf(r,f);break}var T=I(C);if(e.substring(A+1+T,A+1+T+m)===r){if(O.push(e.substring(f,A).replace(j,t)),U(A+1+T+m),S=e.indexOf(n,f),A=e.indexOf(t,f),v&&(N(),h))return F();if(a&&_.length>=a)return F(!0);break}b.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:_.length,index:f}),A++}}else A++}return L();function D(e){_.push(e),w=f}function I(t){var n=0;if(-1!==t){var r=e.substring(A+1,t);r&&""===r.trim()&&(n=r.length)}return n}function L(t){return d||(void 0===t&&(t=e.substring(f)),O.push(t),f=l,D(O),v&&N()),F()}function U(t){f=t,D(O),O=[],C=e.indexOf(r,f)}function F(e){return{data:_,errors:b,meta:{delimiter:n,linebreak:r,aborted:h,truncated:!!e,cursor:w+(o||0)}}}function N(){s(F()),_=[],b=[]}},this.abort=function(){h=!0},this.getCharIndex=function(){return f}}function m(e){var t=e.data,n=i[t.workerId],r=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var s={abort:function(){r=!0,y(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:v,resume:v};if(E(n.userStep)){for(var o=0;o<t.results.data.length&&(n.userStep({data:t.results.data[o],errors:t.results.errors,meta:t.results.meta},s),!r);o++);delete t.results}else E(n.userChunk)&&(n.userChunk(t.results,s,t.file),delete t.results)}t.finished&&!r&&y(t.workerId,t.results)}function y(e,t){var n=i[e];E(n.userComplete)&&n.userComplete(t),n.terminate(),delete i[e]}function v(){throw new Error("Not implemented.")}function _(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var n in e)t[n]=_(e[n]);return t}function b(e,t){return function(){e.apply(t,arguments)}}function E(e){return"function"==typeof e}return r&&(t.onmessage=function(e){var n=e.data;if(void 0===o.WORKER_ID&&n&&(o.WORKER_ID=n.workerId),"string"==typeof n.input)t.postMessage({workerId:o.WORKER_ID,results:o.parse(n.input,n.config),finished:!0});else if(t.File&&n.input instanceof File||n.input instanceof Object){var r=o.parse(n.input,n.config);r&&t.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,(d.prototype=Object.create(u.prototype)).constructor=d,o}();var Oe={},we={CustomError:void 0};class Re extends Error{get name(){return this.constructor.name}}we.CustomError=Re;var ke={ExpectedError:void 0};const Se=we;class Ce extends Se.CustomError{}ke.ExpectedError=Ce;var je={AssertionError:void 0};const Ae=we;class xe extends Ae.CustomError{}je.AssertionError=xe;var Te={};Te.normalize=void 0,Te.normalize=function(e){var t;return{name:e.name,message:e.message,stack:null!==(t=e.stack)&&void 0!==t?t:null}};var De={refute:void 0};const Ie=ke;De.refute=function(e,t){if(e)throw new Ie.ExpectedError(t)};var Le={assert:void 0};const Ue=je;function Fe(e){return Oe.assert(e.length>0,"payload must be a non-empty array"),n=>{const r=new t.Headers(n.headers);return r.set("Content-Type","text/csv"),Object.assign(Object.assign({},n),{headers:r,payload:Ne(e)})}}function Ne(e){const t=Object.keys(e[0]);return Ee.exports.unparse({data:e,fields:t})}function Be(e){return t=>Object.assign(Object.assign({},t),{signal:e})}function Pe(e,n){return r=>{const i=new t.Headers(r.headers);return i.set(e,n),Object.assign(Object.assign({},r),{headers:i})}}function ze(e,n){return r=>{const i=new t.Headers(r.headers);return i.append(e,n),Object.assign(Object.assign({},r),{headers:i})}}function Je(e){return n=>{const r=new t.Headers(n.headers);for(const[t,n]of Object.entries(e))r.set(t,n);return Object.assign(Object.assign({},n),{headers:r})}}function qe(e){return ze("Accept",e)}function Me(e){return t=>{const n=new URL(t.url.href);return n.host=e,Object.assign(Object.assign({},t),{url:n})}}function He(e){return t=>{const n=new URL(t.url.href);return n.port=e.toString(),Object.assign(Object.assign({},t),{url:n})}}function Ke(e){return t=>{const n=new URL(t.url.href);return n.pathname=e,Object.assign(Object.assign({},t),{url:n})}}function We(e){return t=>{const n=new URL(t.url.href);return n.search=e,Object.assign(Object.assign({},t),{url:n})}}function Qe(e,t){return n=>{const r=new URL(n.url.href),i=new URLSearchParams(r.searchParams);return i.set(e,t.toString()),r.search=i.toString(),Object.assign(Object.assign({},n),{url:r})}}function $e(e){return t=>{const n=new URL(t.url.href),r=new URLSearchParams(n.searchParams);for(const[t,n]of Object.entries(e))r.set(t,n.toString());return n.search=r.toString(),Object.assign(Object.assign({},t),{url:n})}}function Ge(e,t){return n=>{const r=new URL(n.url.href),i=new URLSearchParams(r.searchParams);return i.append(e,t.toString()),r.search=i.toString(),Object.assign(Object.assign({},n),{url:r})}}function Ze(e,n){return r=>{const i=r.payload instanceof t.FormData?function(e){const n=new t.FormData;for(const[t,r]of e.entries())n.append(t,r);return n}(r.payload):new t.FormData;return p.isArray(n)?n.forEach((t=>i.append(e,t))):i.append(e,n),Object.assign(Object.assign({},r),{payload:i})}}Le.assert=function(e,t){if(!e)throw new Ue.AssertionError(t)},function(t){var n=e&&e.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=e&&e.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};r(we,t),r(ke,t),r(je,t),r(Te,t),r(De,t),r(Le,t)}(Oe);const Ye="function"==typeof btoa,Xe="function"==typeof Buffer;"function"==typeof TextDecoder&&new TextDecoder,"function"==typeof TextEncoder&&new TextEncoder;const Ve=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");(e=>{let t={};Ve.forEach(((e,n)=>t[e]=n))})(),String.fromCharCode.bind(String),"function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array);const et=Ye?e=>btoa(e):Xe?e=>Buffer.from(e,"binary").toString("base64"):e=>{let t,n,r,i,s="";const o=e.length%3;for(let o=0;o<e.length;){if((n=e.charCodeAt(o++))>255||(r=e.charCodeAt(o++))>255||(i=e.charCodeAt(o++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|i,s+=Ve[t>>18&63]+Ve[t>>12&63]+Ve[t>>6&63]+Ve[63&t]}return o?s.slice(0,o-3)+"===".substring(o):s};function tt(e,t){return Pe("Authorization","Basic "+et(`${e}:${t}`))}function nt(e){return Pe("Authorization",`Bearer ${e}`)}function rt(e=!0){return t=>Object.assign(Object.assign({},t),{keepalive:e})}export{qe as accept,ze as appendHeader,Ge as appendSearchParam,tt as basicAuth,nt as bearerAuth,Fe as csv,me as del,Ze as formDataField,he as get,de as head,Pe as header,Je as headers,Me as host,be as json,rt as keepalive,ge as patch,Ke as pathname,He as port,le as post,pe as put,We as search,Qe as searchParam,$e as searchParams,Be as signal,_e as text,ve as url};
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};
8
8
  //# sourceMappingURL=index.min.mjs.map