extra-request 3.0.2 → 5.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.
- package/LICENSE +1 -1
- package/dist/es2015/index.min.mjs +2 -2
- package/dist/es2015/index.min.mjs.map +1 -1
- package/dist/es2015/index.mjs +2751 -283
- package/dist/es2015/index.mjs.map +1 -1
- package/dist/es2015/index.umd.js +2752 -284
- package/dist/es2015/index.umd.js.map +1 -1
- package/dist/es2015/index.umd.min.js +2 -2
- package/dist/es2015/index.umd.min.js.map +1 -1
- package/dist/es2018/index.min.mjs +2 -2
- package/dist/es2018/index.min.mjs.map +1 -1
- package/dist/es2018/index.mjs +2751 -283
- package/dist/es2018/index.mjs.map +1 -1
- package/dist/es2018/index.umd.js +2752 -284
- package/dist/es2018/index.umd.js.map +1 -1
- package/dist/es2018/index.umd.min.js +2 -2
- package/dist/es2018/index.umd.min.js.map +1 -1
- package/lib/es2015/transformers/form-data-field.js +2 -1
- package/lib/es2015/transformers/form-data-field.js.map +1 -1
- package/lib/es2018/transformers/form-data-field.js +2 -1
- package/lib/es2018/transformers/form-data-field.js.map +1 -1
- package/package.json +27 -24
- package/CHANGELOG.md +0 -231
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2020 BlackGlory <woshenmedoubuzhidao@blackglory.me>
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
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={Blob:void 0};c.Blob=globalThis.Blob;var u,f,l,d={};d.EventSource=void 0,d.EventSource=globalThis.EventSource,u=e,f=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)||f(e,t,n)})(n,u),l(r,u),l(i,u),l(o,u),l(s,u),l(a,u),l(c,u),l(d,u);var h={},y={};function p(t){return Array.isArray(t)}y.isntEmptyArray=y.isEmptyArray=y.isntArray=y.isArray=void 0,y.isArray=p,y.isntArray=function(t){return!p(t)},y.isEmptyArray=function(t){return 0===t.length},y.isntEmptyArray=function(t){return 0!==t.length};var v={},m={};function g(t){return null===t}m.isntNull=m.isNull=void 0,m.isNull=g,m.isntNull=function(t){return!g(t)};var b={};function _(t){return void 0===t}b.isntUndefined=b.isUndefined=void 0,b.isUndefined=_,b.isntUndefined=function(t){return!_(t)},v.isntAsyncIterable=v.isAsyncIterable=void 0;const w=m,A=b;function O(t){return(0,w.isntNull)(t)&&(0,A.isntUndefined)(t)&&"function"==typeof t[Symbol.asyncIterator]}v.isAsyncIterable=O,v.isntAsyncIterable=function(t){return!O(t)};var E={};function S(t){return"bigint"==typeof t}E.isntBigInt=E.isBigInt=void 0,E.isBigInt=S,E.isntBigInt=function(t){return!S(t)};var R={};function j(t){return"boolean"==typeof t}R.isntBoolean=R.isBoolean=void 0,R.isBoolean=j,R.isntBoolean=function(t){return!j(t)};var k={},I={};function C(t){return"string"==typeof t}I.isntString=I.isString=void 0,I.isString=C,I.isntString=function(t){return!C(t)},k.isntChar=k.isChar=void 0;const x=I;function T(t){return(0,x.isString)(t)&&1===t.length}k.isChar=T,k.isntChar=function(t){return!T(t)};var N={};function U(t){return t instanceof Date}N.isntDate=N.isDate=void 0,N.isDate=U,N.isntDate=function(t){return!U(t)};var D={};D.inEnum=void 0,D.inEnum=function(t,e){return Object.values(e).includes(t)};var B={};function P(t){return t instanceof Error}B.isntError=B.isError=void 0,B.isError=P,B.isntError=function(t){return!P(t)};var L={};function q(t){return!t}L.isntFalsy=L.isFalsy=void 0,L.isFalsy=q,L.isntFalsy=function(t){return!q(t)};var F={};function J(t){return"function"==typeof t}F.isntFunction=F.isFunction=void 0,F.isFunction=J,F.isntFunction=function(t){return!J(t)};var z={};z.isntIterable=z.isIterable=void 0;const M=m,H=b;function W(t){return(0,M.isntNull)(t)&&(0,H.isntUndefined)(t)&&"function"==typeof t[Symbol.iterator]}z.isIterable=W,z.isntIterable=function(t){return!W(t)};var K={},Q={};var $=Function.prototype,G=Object.prototype,Z=$.toString,V=G.hasOwnProperty,Y=Z.call(Object),X=G.toString,tt=function(t,e){return function(n){return t(e(n))}}(Object.getPrototypeOf,Object);var et=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=X.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=tt(t);if(null===e)return!0;var n=V.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Z.call(n)==Y},nt=t&&t.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Q.isntEmptyObject=Q.isEmptyObject=Q.isntPlainObject=Q.isPlainObject=Q.isntObject=Q.isObject=void 0;const rt=nt(et);function it(t){return null!==t&&"object"==typeof t}function ot(t){return(0,rt.default)(t)}Q.isObject=it,Q.isntObject=function(t){return!it(t)},Q.isPlainObject=ot,Q.isntPlainObject=function(t){return!ot(t)},Q.isEmptyObject=function(t){return 0===Object.keys(t).length},Q.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var st={};function at(t){return"number"==typeof t}st.isntNumber=st.isNumber=void 0,st.isNumber=at,st.isntNumber=function(t){return!at(t)},K.isntJsonRpcError=K.isJsonRpcError=K.isntJsonRpcSuccess=K.isJsonRpcSuccess=K.isntJsonRpcRequest=K.isJsonRpcRequest=K.isntJsonRpcNotification=K.isJsonRpcNotification=void 0;const ct=y,ut=Q,ft=I,lt=st,dt=b;function ht(t){return(0,ft.isString)(t)||(0,lt.isNumber)(t)}function yt(t){return(0,ct.isArray)(t)||(0,ut.isObject)(t)}function pt(t){return(0,ut.isPlainObject)(t)&&(0,ft.isString)(t.jsonrpc)&&(0,ft.isString)(t.method)&&(0,dt.isUndefined)(t.id)&&yt(t.params)}function vt(t){return(0,ut.isPlainObject)(t)&&(0,ft.isString)(t.jsonrpc)&&(0,ft.isString)(t.method)&&ht(t.id)&&yt(t.params)}function mt(t){return(0,ut.isPlainObject)(t)&&(0,ft.isString)(t.jsonrpc)&&(0,ft.isString)(t.id)&&"result"in t}function gt(t){return(0,ut.isPlainObject)(t)&&(0,ft.isString)(t.jsonrpc)&&ht(t.id)&&function(t){return(0,ut.isPlainObject)(t)&&(0,lt.isNumber)(t.code)&&(0,ft.isString)(t.message)&&((0,dt.isUndefined)(t.data)||(0,ut.isObject)(t.data))}(t.error)}K.isJsonRpcNotification=pt,K.isntJsonRpcNotification=function(t){return!pt(t)},K.isJsonRpcRequest=vt,K.isntJsonRpcRequest=function(t){return!vt(t)},K.isJsonRpcSuccess=mt,K.isntJsonRpcSuccess=function(t){return!mt(t)},K.isJsonRpcError=gt,K.isntJsonRpcError=function(t){return!gt(t)};var bt={};bt.isntJson=bt.isJson=void 0,bt.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},bt.isntJson=function t(e){return!t()};var _t={};function wt(...t){return jt("GET",...t)}function At(...t){return jt("HEAD",...t)}function Ot(...t){return jt("POST",...t)}function Et(...t){return jt("PUT",...t)}function St(...t){return jt("PATCH",...t)}function Rt(...t){return jt("DELETE",...t)}function jt(t,...n){const r=n.reduce(((t,e)=>h.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 kt(...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 It(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 Ct(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)})}}_t.isAbsoluteURL=void 0,_t.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(y,e),r(v,e),r(E,e),r(R,e),r(k,e),r(N,e),r(D,e),r(B,e),r(L,e),r(F,e),r(z,e),r(K,e),r(bt,e),r(m,e),r(st,e),r(Q,e),r(I,e),r(b,e),r(_t,e)}(h);var xt={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 Array.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
|
+
*/xt.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&&(l=e.escapeFormulae)}}();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),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 m=c?t[v]:v;y.push(e[f][m])}d=""===y.join("").trim()}if(!d){for(var g=0;g<l;g++){0<g&&!h&&(s+=i);var b=a&&c?t[g]:g;s+=p(e[f][b],g)}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);!0===l&&"string"==typeof t&&null!==t.match(/^[=+\-@].*$/)&&(t="'"+t);var r=t.toString().replace(d,c);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,s.BAD_DELIMITERS)||-1<r.indexOf(i)||" "===r.charAt(0)||" "===r.charAt(r.length-1)?a+r+a:r}}};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=[],m={data:[],errors:[],meta:{}};if(w(t.step)){var g=t.step;t.step=function(e){if(m=e,O())A();else{if(A(),0===m.data.length)return;f+=e.data.length,t.preview&&f>t.preview?n.abort():(m.data=m.data[0],g(m,u))}}}function _(e){return"greedy"===t.skipEmptyLines?""===e.join("").trim():1===e.length&&0===e[0].length}function A(){if(m&&r&&(S("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+s.DefaultDelimiter+"'"),r=!1),t.skipEmptyLines)for(var e=0;e<m.data.length;e++)_(m.data[e])&&m.data.splice(e--,1);return O()&&function(){if(m)if(Array.isArray(m.data[0])){for(var e=0;O()&&e<m.data.length;e++)m.data[e].forEach(n);m.data.splice(0,1)}else m.data.forEach(n);function n(e,n){w(t.transformHeader)&&(e=t.transformHeader(e,n)),v.push(e)}}(),function(){if(!m||!t.header&&!t.dynamicTyping&&!t.transform)return m;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=E(o,s),"__parsed_extra"===o?(i[o]=i[o]||[],i[o].push(s)):i[o]=s}return t.header&&(r>v.length?S("FieldMismatch","TooManyFields","Too many fields: expected "+v.length+" fields but parsed "+r,l+n):r<v.length&&S("FieldMismatch","TooFewFields","Too few fields: expected "+v.length+" fields but parsed "+r,l+n)),i}var n=1;return!m.data.length||Array.isArray(m.data[0])?(m.data=m.data.map(e),n=m.data.length):m.data=e(m.data,0),t.header&&m.meta&&(m.meta.fields=v),l+=n,m}()}function O(){return t.header&&0===v.length}function E(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 S(t,e,n,r){var i={type:t,code:e,message:n};void 0!==r&&(i.row=r),m.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),m.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 m=new p({comments:i,delimiter:d,newline:n,preview:10}).parse(e),g=0;g<m.data.length;g++)if(r&&_(m.data[g]))v++;else{var b=m.data[g].length;y+=b,void 0!==u?0<b&&(h+=Math.abs(b-u),u=b):u=b}0<m.data.length&&(y/=m.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),m.meta.delimiter=t.delimiter}var f=b(t);return t.preview&&t.header&&f.preview++,e=i,n=new p(f),m=n.parse(e,o,a),A(),d?{meta:{paused:!0}}:m||{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(),m.meta.aborted=!0,w(t.complete)&&t.complete(m),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?'"':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,m=i.length,g=w(o),b=[],_=[],A=[],O=f=0;if(!t)return B();if(c||!1!==c&&-1===t.indexOf(e)){for(var E=t.split(r),S=0;S<E.length;S++){if(A=E[S],f+=A.length,S!==E.length-1)f+=r.length;else if(d)return B();if(!i||A.substring(0,m)!==i){if(g){if(b=[],T(A.split(n)),P(),l)return B()}else T(A.split(n));if(a&&a<=S)return b=b.slice(0,a),B(!0)}}return B()}for(var R=t.indexOf(n,f),j=t.indexOf(r,f),k=new RegExp(y(u)+y(e),"g"),I=t.indexOf(e,f);;)if(t[f]!==e)if(i&&0===A.length&&t.substring(f,f+m)===i){if(-1===j)return B();f=j+v,j=t.indexOf(r,f),R=t.indexOf(n,f)}else if(-1!==R&&(R<j||-1===j))A.push(t.substring(f,R)),f=R+p,R=t.indexOf(n,f);else{if(-1===j)break;if(A.push(t.substring(f,j)),D(j+v),g&&(P(),l))return B();if(a&&b.length>=a)return B(!0)}else for(I=f,f++;;){if(-1===(I=t.indexOf(e,I+1)))return d||_.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:b.length,index:f}),U();if(I===h-1)return U(t.substring(f,I).replace(k,e));if(e!==u||t[I+1]!==u){if(e===u||0===I||t[I-1]!==u){-1!==R&&R<I+1&&(R=t.indexOf(n,I+1)),-1!==j&&j<I+1&&(j=t.indexOf(r,I+1));var C=N(-1===j?R:Math.min(R,j));if(t[I+1+C]===n){A.push(t.substring(f,I).replace(k,e)),t[f=I+1+C+p]!==e&&(I=t.indexOf(e,f)),R=t.indexOf(n,f),j=t.indexOf(r,f);break}var x=N(j);if(t.substring(I+1+x,I+1+x+v)===r){if(A.push(t.substring(f,I).replace(k,e)),D(I+1+x+v),R=t.indexOf(n,f),I=t.indexOf(e,f),g&&(P(),l))return B();if(a&&b.length>=a)return B(!0);break}_.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:b.length,index:f}),I++}}else I++}return U();function T(t){b.push(t),O=f}function N(e){var n=0;if(-1!==e){var r=t.substring(I+1,e);r&&""===r.trim()&&(n=r.length)}return n}function U(e){return d||(void 0===e&&(e=t.substring(f)),A.push(e),f=h,T(A),g&&P()),B()}function D(e){f=e,T(A),A=[],j=t.indexOf(r,f)}function B(t){return{data:b,errors:_,meta:{delimiter:n,linebreak:r,aborted:l,truncated:!!t,cursor:O+(s||0)}}}function P(){o(B()),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,m(e.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:g,resume:g};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&&m(e.workerId,e.results)}function m(t,e){var n=i[t];w(n.userComplete)&&n.userComplete(e),n.terminate(),delete i[t]}function g(){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 Tt={},Nt={},Ut={},Dt={},Bt={},Pt={},Lt={};Lt.go=void 0,Lt.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]});(t&&t.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(Lt,e)}(Pt);var qt={},Ft={CustomError:void 0};class Jt extends Error{get name(){return this.constructor.name}}Ft.CustomError=Jt;var zt={ExpectedError:void 0};const Mt=Ft;class Ht extends Mt.CustomError{}zt.ExpectedError=Ht;var Wt={AssertionError:void 0};const Kt=Ft;class Qt extends Kt.CustomError{}Wt.AssertionError=Qt;var $t={};$t.normalize=void 0,$t.normalize=function(t){var e;return{name:t.name,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var Gt={refute:void 0};const Zt=zt;Gt.refute=function(t,e){if(t)throw new Zt.ExpectedError(e)};var Vt={assert:void 0};const Yt=Wt;Vt.assert=function(t,e){if(!t)throw new Yt.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(zt,e),r(Wt,e),r($t,e),r(Gt,e),r(Vt,e)}(qt),Bt.chunkAsync=void 0;const Xt=Pt,te=qt;Bt.chunkAsync=function(t,e){return(0,te.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,te.assert)(e>0,"The parameter size must be greater than 0"),(0,Xt.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 ee={},ne={},re={};function ie(t){return Array.isArray(t)}re.isntEmptyArray=re.isEmptyArray=re.isntArray=re.isArray=void 0,re.isArray=ie,re.isntArray=function(t){return!ie(t)},re.isEmptyArray=function(t){return 0===t.length},re.isntEmptyArray=function(t){return 0!==t.length};var oe={},se={};function ae(t){return null===t}se.isntNull=se.isNull=void 0,se.isNull=ae,se.isntNull=function(t){return!ae(t)};var ce={};function ue(t){return void 0===t}ce.isntUndefined=ce.isUndefined=void 0,ce.isUndefined=ue,ce.isntUndefined=function(t){return!ue(t)},oe.isntAsyncIterable=oe.isAsyncIterable=void 0;const fe=se,le=ce;function de(t){return(0,fe.isntNull)(t)&&(0,le.isntUndefined)(t)&&"function"==typeof t[Symbol.asyncIterator]}oe.isAsyncIterable=de,oe.isntAsyncIterable=function(t){return!de(t)};var he={};function ye(t){return"bigint"==typeof t}he.isntBigInt=he.isBigInt=void 0,he.isBigInt=ye,he.isntBigInt=function(t){return!ye(t)};var pe={};function ve(t){return"boolean"==typeof t}pe.isntBoolean=pe.isBoolean=void 0,pe.isBoolean=ve,pe.isntBoolean=function(t){return!ve(t)};var me={},ge={};function be(t){return"string"==typeof t}ge.isntString=ge.isString=void 0,ge.isString=be,ge.isntString=function(t){return!be(t)},me.isntChar=me.isChar=void 0;const _e=ge;function we(t){return(0,_e.isString)(t)&&1===t.length}me.isChar=we,me.isntChar=function(t){return!we(t)};var Ae={};function Oe(t){return t instanceof Date}Ae.isntDate=Ae.isDate=void 0,Ae.isDate=Oe,Ae.isntDate=function(t){return!Oe(t)};var Ee={};Ee.inEnum=void 0,Ee.inEnum=function(t,e){return Object.values(e).includes(t)};var Se={};function Re(t){return t instanceof Error}Se.isntError=Se.isError=void 0,Se.isError=Re,Se.isntError=function(t){return!Re(t)};var je={};function ke(t){return!t}je.isntFalsy=je.isFalsy=void 0,je.isFalsy=ke,je.isntFalsy=function(t){return!ke(t)};var Ie={};function Ce(t){return"function"==typeof t}Ie.isntFunction=Ie.isFunction=void 0,Ie.isFunction=Ce,Ie.isntFunction=function(t){return!Ce(t)};var xe={};xe.isntIterable=xe.isIterable=void 0;const Te=se,Ne=ce;function Ue(t){return(0,Te.isntNull)(t)&&(0,Ne.isntUndefined)(t)&&"function"==typeof t[Symbol.iterator]}xe.isIterable=Ue,xe.isntIterable=function(t){return!Ue(t)};var De={},Be={};function Pe(t){return null!==t&&"object"==typeof t}Be.isntEmptyObject=Be.isEmptyObject=Be.isRecord=Be.isntObject=Be.isObject=void 0,Be.isObject=Pe,Be.isntObject=function(t){return!Pe(t)},Be.isRecord=function(t){return Pe(t)},Be.isEmptyObject=function(t){return 0===Object.keys(t).length},Be.isntEmptyObject=function(t){return 0!==Object.keys(t).length};var Le={};function qe(t){return"number"==typeof t}Le.isntNumber=Le.isNumber=void 0,Le.isNumber=qe,Le.isntNumber=function(t){return!qe(t)},De.isntJsonRpcError=De.isJsonRpcError=De.isntJsonRpcSuccess=De.isJsonRpcSuccess=De.isntJsonRpcRequest=De.isJsonRpcRequest=De.isntJsonRpcNotification=De.isJsonRpcNotification=void 0;const Fe=re,Je=Be,ze=ge,Me=Le,He=ce;function We(t){return(0,ze.isString)(t)||(0,Me.isNumber)(t)}function Ke(t){return(0,Fe.isArray)(t)||(0,Je.isObject)(t)}function Qe(t){return(0,Je.isRecord)(t)&&(0,ze.isString)(t.jsonrpc)&&(0,ze.isString)(t.method)&&(0,He.isUndefined)(t.id)&&Ke(t.params)}function $e(t){return(0,Je.isRecord)(t)&&(0,ze.isString)(t.jsonrpc)&&(0,ze.isString)(t.method)&&We(t.id)&&Ke(t.params)}function Ge(t){return(0,Je.isRecord)(t)&&(0,ze.isString)(t.jsonrpc)&&(0,ze.isString)(t.id)&&(0,He.isntUndefined)(t.result)}function Ze(t){return(0,Je.isRecord)(t)&&(0,ze.isString)(t.jsonrpc)&&We(t.id)&&function(t){return(0,Je.isRecord)(t)&&(0,Me.isNumber)(t.code)&&(0,ze.isString)(t.message)&&((0,He.isUndefined)(t.data)||(0,Je.isObject)(t.data))}(t.error)}De.isJsonRpcNotification=Qe,De.isntJsonRpcNotification=function(t){return!Qe(t)},De.isJsonRpcRequest=$e,De.isntJsonRpcRequest=function(t){return!$e(t)},De.isJsonRpcSuccess=Ge,De.isntJsonRpcSuccess=function(t){return!Ge(t)},De.isJsonRpcError=Ze,De.isntJsonRpcError=function(t){return!Ze(t)};var Ve={};Ve.isntJson=Ve.isJson=void 0,Ve.isJson=function(t){try{return JSON.stringify(t),!0}catch(t){return!1}},Ve.isntJson=function t(e){return!t()};var Ye={};Ye.isAbsoluteURL=void 0,Ye.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(re,e),r(oe,e),r(he,e),r(pe,e),r(me,e),r(Ae,e),r(Ee,e),r(Se,e),r(je,e),r(Ie,e),r(xe,e),r(De,e),r(Ve,e),r(se,e),r(Le,e),r(Be,e),r(ge,e),r(ce,e),r(Ye,e)}(ne),ee.chunkByAsync=void 0;const Xe=ne;ee.chunkByAsync=function(t,e){return(0,Xe.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 tn={};tn.chunkBy=void 0,tn.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 en={chunk:void 0};const nn=Pt,rn=qt;en.chunk=function(t,e){return(0,rn.assert)(Number.isInteger(e),"The parameter size must be an integer"),(0,rn.assert)(e>0,"The parameter size must be greater than 0"),(0,nn.go)((function*(){let n=[];for(const r of t)n.push(r),n.length>=e&&(yield n,n=[]);n.length&&(yield n)}))};var on={concatAsync:void 0};const sn=ne,an=Pt;on.concatAsync=function(t,...e){return(0,an.go)((async function*(){for(const n of[t,...e])if((0,sn.isAsyncIterable)(n))for await(const t of n)yield t;else for(const t of n)yield t}))};var cn={concat:void 0};const un=Pt;cn.concat=function(t,...e){return(0,un.go)((function*(){for(const n of[t,...e])yield*n}))};var fn={},ln={};ln.copyIterable=ln.copyAsyncIterable=void 0,ln.copyAsyncIterable=async function*(t){for await(const e of t)yield e},ln.copyIterable=function*(t){for(const e of t)yield e},fn.dropAsync=void 0;const dn=Pt,hn=ln,yn=qt;fn.dropAsync=function(t,e){return(0,yn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,yn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,hn.copyAsyncIterable)(t):(0,dn.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 pn={dropRightAsync:void 0};const vn=Pt,mn=ln,gn=qt;pn.dropRightAsync=function(t,e){return(0,gn.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,gn.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,mn.copyAsyncIterable)(t):(0,vn.go)((async function*(){const n=(await async function(t){const e=[];for await(const n of t)e.push(n);return e}(t)).slice(0,-e);for(const t of n)yield t}))};var bn={dropRight:void 0};const _n=Pt,wn=ln,An=qt;bn.dropRight=function(t,e){return(0,An.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,An.assert)(e>=0,"The parameter count must be greater than or equal to 0"),0===e?(0,wn.copyIterable)(t):(0,_n.go)((function*(){const n=Array.from(t);yield*n.slice(0,-e)}))};var On={dropUntilAsync:void 0};const En=ne;On.dropUntilAsync=function(t,e){return(0,En.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 Sn={};Sn.dropUntil=void 0,Sn.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 Rn={drop:void 0};const jn=Pt,kn=ln,In=qt;Rn.drop=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===e?(0,kn.copyIterable)(t):(0,jn.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 Cn={filterAsync:void 0};const xn=ne;Cn.filterAsync=function(t,e){return(0,xn.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 Tn={};Tn.filter=void 0,Tn.filter=function*(t,e){let n=0;for(const r of t)e(r,n)&&(yield r),n++};var Nn={},Un={},Dn={flattenByAsync:void 0};const Bn=ne;function Pn(t){return(0,Bn.isIterable)(t)&&(0,Bn.isntChar)(t)}Dn.flattenByAsync=function(t,e){return(0,Bn.isAsyncIterable)(t)?async function*(t){const r=1;for await(const i of t)Pn(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)Pn(i)&&await e(i,r)?yield*n(i,r+1):yield i}},Un.flattenDeepAsync=void 0;const Ln=Dn,qn=qt;Un.flattenDeepAsync=function(t,e=1/0){return(0,qn.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,qn.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,Ln.flattenByAsync)(t,((t,n)=>n<=e))},Nn.flattenAsync=void 0;const Fn=Un;Nn.flattenAsync=function(t){return(0,Fn.flattenDeepAsync)(t,1)};var Jn={flattenBy:void 0};const zn=ne;Jn.flattenBy=function(t,e){return function*t(n,r){for(const o of n)(0,zn.isIterable)(i=o)&&(0,zn.isntChar)(i)&&e(o,r)?yield*t(o,r+1):yield o;var i}(t,1)};var Mn={flattenDeep:void 0};const Hn=Jn,Wn=qt;Mn.flattenDeep=function(t,e=1/0){return(0,Wn.assert)(e===1/0||Number.isInteger(e),"The parameter depth must be an integer"),(0,Wn.assert)(e>=0,"The parameter depth must be greater than or equal to 0"),(0,Hn.flattenBy)(t,((t,n)=>n<=e))};var Kn={flatten:void 0};const Qn=Mn;Kn.flatten=function(t){return(0,Qn.flattenDeep)(t,1)};var $n={mapAsync:void 0};const Gn=ne;$n.mapAsync=function(t,e){return(0,Gn.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 Zn={};Zn.map=void 0,Zn.map=function*(t,e){let n=0;for(const r of t)yield e(r,n),n++};var Vn={repeatAsync:void 0};const Yn=Pt,Xn=qt;Vn.repeatAsync=function(t,e){return(0,Xn.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,Xn.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,Yn.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 tr={repeat:void 0};const er=Pt,nr=qt;tr.repeat=function(t,e){return(0,nr.assert)(e===1/0||Number.isInteger(e),"The parameter times must be an integer"),(0,nr.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,er.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 rr={sliceAsync:void 0};const ir=Pt,or=qt;rr.sliceAsync=function(t,e,n=1/0){return(0,or.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,or.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,or.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,or.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,ir.go)((async function*(){let r=0;for await(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var sr={slice:void 0};const ar=Pt,cr=qt;sr.slice=function(t,e,n=1/0){return(0,cr.assert)(Number.isInteger(e),"The parameter start must be an integer"),(0,cr.assert)(e>=0,"The parameter start must be greater than or equal to 0"),(0,cr.assert)(Number.isInteger(n),"The parameter end must be an integer"),(0,cr.assert)(n>=e,"The parameter end must be greater than or equal to start"),(0,ar.go)((function*(){let r=0;for(const i of t){if(r>=n)break;r>=e&&(yield i),r++}}))};var ur={};ur.splitAsync=void 0,ur.splitAsync=async function*(t,e){let n=[];for await(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var fr={splitByAsync:void 0};const lr=ne;fr.splitByAsync=function(t,e){return(0,lr.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 dr={};dr.splitBy=void 0,dr.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 hr={};hr.split=void 0,hr.split=function*(t,e){let n=[];for(const r of t)r===e?(yield n,n=[]):n.push(r);yield n};var yr={takeAsync:void 0};const pr=Pt,vr=qt;yr.takeAsync=function(t,e){return(0,vr.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,vr.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,pr.go)((async function*(){if(0!==e)for await(const n of t)if(yield n,0===--e)break}))};var mr={takeRightAsync:void 0};const gr=Pt,br=qt;mr.takeRightAsync=function(t,e){return(0,br.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,br.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,gr.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 _r={takeRight:void 0};const wr=Pt,Ar=qt;_r.takeRight=function(t,e){return(0,Ar.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,Ar.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,wr.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 Or={takeUntilAsync:void 0};const Er=ne;Or.takeUntilAsync=function(t,e){return(0,Er.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 Sr={};Sr.takeUntil=void 0,Sr.takeUntil=function*(t,e){let n=0;for(const r of t){if(e(r,n))break;yield r,n++}};var Rr={take:void 0};const jr=Pt,kr=qt;Rr.take=function(t,e){return(0,kr.assert)(Number.isInteger(e),"The parameter count must be an integer"),(0,kr.assert)(e>=0,"The parameter count must be greater than or equal to 0"),(0,jr.go)((function*(){if(0!==e)for(const n of t)if(yield n,0===--e)break}))};var Ir={tapAsync:void 0};const Cr=ne;Ir.tapAsync=function(t,e){return(0,Cr.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 xr={};xr.tap=void 0,xr.tap=function*(t,e){let n=0;for(const r of t)e(r,n),yield r,n++};var Tr={};Tr.toAsyncIterable=void 0,Tr.toAsyncIterable=async function*(t){for(const e of t)yield e};var Nr={};Nr.transformAsync=void 0,Nr.transformAsync=async function*(t,e){yield*e(t)};var Ur={};Ur.transform=void 0,Ur.transform=function*(t,e){yield*e(t)};var Dr={};Dr.uniqAsync=void 0,Dr.uniqAsync=async function*(t){const e=new Set;for await(const n of t)e.has(n)||(yield n,e.add(n))};var Br={uniqByAsync:void 0};const Pr=ne;Br.uniqByAsync=function(t,e){return(0,Pr.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 Lr={};Lr.uniqBy=void 0,Lr.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 qr={};qr.uniq=void 0,qr.uniq=function*(t){const e=new Set;for(const n of t)e.has(n)||(yield n,e.add(n))};var Fr={zipAsync:void 0};const Jr=ne;var zr;!function(t){t[t.Sync=0]="Sync",t[t.Async=1]="Async"}(zr||(zr={})),Fr.zipAsync=function(t,...e){return async function*(...t){var e,n,r,i;const o=t.length,s=t.map((t=>(0,Jr.isAsyncIterable)(t)?[zr.Async,t[Symbol.asyncIterator]()]:[zr.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===zr.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===zr.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 Mr={};Mr.zip=void 0,Mr.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),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(Bt,e),r(ee,e),r(tn,e),r(en,e),r(on,e),r(cn,e),r(fn,e),r(pn,e),r(bn,e),r(On,e),r(Sn,e),r(Rn,e),r(Cn,e),r(Tn,e),r(Nn,e),r(Dn,e),r(Jn,e),r(Un,e),r(Mn,e),r(Kn,e),r($n,e),r(Zn,e),r(Vn,e),r(tr,e),r(rr,e),r(sr,e),r(ur,e),r(fr,e),r(dr,e),r(hr,e),r(yr,e),r(mr,e),r(_r,e),r(Or,e),r(Sr,e),r(Rr,e),r(Ir,e),r(xr,e),r(Tr,e),r(Nr,e),r(Ur,e),r(Dr,e),r(Br,e),r(Lr,e),r(qr,e),r(Fr,e),r(Mr,e)}(Dt);var Hr={},Wr={};Wr.consume=void 0,Wr.consume=function(t,e){return e(t)};var Kr={eachAsync:void 0};const Qr=ne;Kr.eachAsync=function(t,e){return(0,Qr.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 $r={};$r.each=void 0,$r.each=function(t,e){let n=0;for(const r of t)e(r,n),n++};var Gr={everyAsync:void 0};const Zr=ne;Gr.everyAsync=function(t,e){return(0,Zr.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 Vr={};Vr.every=void 0,Vr.every=function(t,e){let n=0;for(const r of t){if(!e(r,n))return!1;n++}return!0};var Yr={findAsync:void 0};const Xr=ne;Yr.findAsync=function(t,e){return(0,Xr.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 ti={};ti.find=void 0,ti.find=function(t,e){let n=0;for(const r of t){if(e(r,n))return r;n++}};var ei={};ei.firstAsync=void 0,ei.firstAsync=async function(t){for await(const e of t)return e};var ni={};ni.first=void 0,ni.first=function(t){for(const e of t)return e};var ri={};ri.includesAsync=void 0,ri.includesAsync=async function(t,e){for await(const n of t)if(n===e)return!0;return!1};var ii={};ii.includes=void 0,ii.includes=function(t,e){for(const n of t)if(n===e)return!0;return!1};var oi={};oi.matchAsync=void 0,oi.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 si={};si.match=void 0,si.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 ai={reduceAsync:void 0};const ci=ne;ai.reduceAsync=function(t,e,n){return(0,ci.isUndefined)(n)?function(t,e){return(0,ci.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,ci.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 ui={reduce:void 0};const fi=ne;ui.reduce=function(t,e,n){return(0,fi.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 li={someAsync:void 0};const di=ne;li.someAsync=function(t,e){return(0,di.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 hi={};hi.some=void 0,hi.some=function(t,e){let n=0;for(const r of t){if(e(r,n))return!0;n++}return!1};var yi={};yi.lastAsync=void 0,yi.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 pi={};pi.last=void 0,pi.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 vi={toArrayAsync:void 0};const mi=Wr;vi.toArrayAsync=function(t){return(0,mi.consume)(t,(async t=>{const e=[];for await(const n of t)e.push(n);return e}))};var gi={toArray:void 0};const bi=Wr;gi.toArray=function(t){return(0,bi.consume)(t,(t=>Array.from(t)))};var _i={toSetAsync:void 0};const wi=Wr;_i.toSetAsync=function(t){return(0,wi.consume)(t,(async t=>{const e=new Set;for await(const n of t)e.add(n);return e}))};var Ai={toSet:void 0};const Oi=Wr;Ai.toSet=function(t){return(0,Oi.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),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(Wr,e),r(Kr,e),r($r,e),r(Gr,e),r(Vr,e),r(Yr,e),r(ti,e),r(ei,e),r(ni,e),r(ri,e),r(ii,e),r(oi,e),r(si,e),r(ai,e),r(ui,e),r(li,e),r(hi,e),r(yi,e),r(pi,e),r(vi,e),r(gi,e),r(_i,e),r(Ai,e)}(Hr),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(Dt,e),r(Hr,e)}(Ut);var Ei={},Si={};Si.traverseErrorPrototypeChain=void 0,Si.traverseErrorPrototypeChain=function*(t){let e=t;for(;(e=Object.getPrototypeOf(e))&&(yield e,e!==Error.prototype););},Ei.getErrorNames=void 0;const Ri=h,ji=Si;Ei.getErrorNames=function*(t){var e;if((0,Ri.isError)(t))for(const n of(0,ji.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 ki={isSerializableError:void 0};const Ii=h;ki.isSerializableError=function(t){return(0,Ii.isObject)(t)&&(0,Ii.isString)(t.name)&&(0,Ii.isString)(t.message)&&((0,Ii.isString)(t.stack)||(0,Ii.isNull)(t.stack))&&(0,Ii.isArray)(t.ancestors)&&t.ancestors.every(Ii.isString)},Nt.CustomError=void 0;const Ci=Ut,xi=Ei,Ti=h,Ni=ki;class Ui extends Error{get name(){var t,e;return null!==(e=null!==(t=(0,Ci.first)((0,xi.getErrorNames)(this)))&&void 0!==t?t:Ui.name)&&void 0!==e?e:"CustomError"}static[Symbol.hasInstance](t){var e;if((0,Ti.isError)(t)||(0,Ni.isSerializableError)(t)){const n=[null!==(e=this.prototype.constructor.name)&&void 0!==e?e:this.name,...(0,xi.getErrorNames)(this.prototype)].reverse(),r=(0,Ci.toArray)((0,xi.getErrorNames)(t)).reverse();return n.every(((t,e)=>t===r[e]))}return!1}}Nt.CustomError=Ui;var Di={AssertionError:void 0};const Bi=Nt;class Pi extends Bi.CustomError{}Di.AssertionError=Pi;var Li={normalize:void 0};const qi=Ei,Fi=Ut;Li.normalize=function(t){var e;const[n,...r]=(0,Fi.toArray)((0,qi.getErrorNames)(t));return{name:n,ancestors:r,message:t.message,stack:null!==(e=t.stack)&&void 0!==e?e:null}};var Ji={},zi={},Mi={};Mi.pass=void 0,Mi.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]});(t&&t.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)})(Mi,e)}(zi),Ji.hydrate=void 0;const Hi=zi;function Wi(t,e){const n=function(){(0,Hi.pass)()};return(n.prototype=Object.create(t.prototype)).constructor=n,Object.defineProperty(n,"name",{value:e}),n}Ji.hydrate=function(t){var e;const n=[t.name,...t.ancestors].slice(0,-1).reverse();let r=Error;for(const t of n)r=Wi(r,t);const i=new r;return i.name=t.name,i.message=t.message,i.stack=null!==(e=t.stack)&&void 0!==e?e:void 0,i};var Ki={assert:void 0};const Qi=Di;function $i(t){return Tt.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:Gi(t)})}}function Gi(t){const e=Object.keys(t[0]);return xt.exports.unparse({data:t,fields:e})}function Zi(t){return e=>Object.assign(Object.assign({},e),{signal:t})}function Vi(t,n){return r=>{const i=new e.Headers(r.headers);return i.set(t,n),Object.assign(Object.assign({},r),{headers:i})}}function Yi(t,n){return r=>{const i=new e.Headers(r.headers);return i.append(t,n),Object.assign(Object.assign({},r),{headers:i})}}function Xi(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 to(t){return Yi("Accept",t)}function eo(t){return e=>{const n=new URL(e.url.href);return n.host=t,Object.assign(Object.assign({},e),{url:n})}}function no(t){return e=>{const n=new URL(e.url.href);return n.port=t.toString(),Object.assign(Object.assign({},e),{url:n})}}function ro(t){return e=>{const n=new URL(e.url.href);return n.pathname=t,Object.assign(Object.assign({},e),{url:n})}}function io(t){return e=>{const n=new URL(e.url.href);return n.search=t,Object.assign(Object.assign({},e),{url:n})}}function oo(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 so(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 ao(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 co(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 h.isArray(n)?n.forEach((e=>i.append(t,e))):i.append(t,n),Object.assign(Object.assign({},r),{payload:i})}}Ki.assert=function(t,e){if(!t)throw new Qi.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(Nt,e),r(Di,e),r(ki,e),r(Li,e),r(Ji,e),r(Ki,e),r(Ei,e),r(Si,e)}(Tt);const uo="function"==typeof btoa,fo="function"==typeof Buffer;"function"==typeof TextDecoder&&new TextDecoder,"function"==typeof TextEncoder&&new TextEncoder;const lo=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=");(t=>{let e={};lo.forEach(((t,n)=>e[t]=n))})(),String.fromCharCode.bind(String),"function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array);const ho=uo?t=>btoa(t):fo?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+=lo[e>>18&63]+lo[e>>12&63]+lo[e>>6&63]+lo[63&e]}return s?o.slice(0,s-3)+"===".substring(s):o};function yo(t,e){return Vi("Authorization","Basic "+ho(`${t}:${e}`))}function po(t){return Vi("Authorization",`Bearer ${t}`)}function vo(t=!0){return e=>Object.assign(Object.assign({},e),{keepalive:t})}export{to as accept,Yi as appendHeader,ao as appendSearchParam,yo as basicAuth,po as bearerAuth,$i as csv,Rt as del,co as formDataField,wt as get,At as head,Vi as header,Xi as headers,eo as host,Ct as json,vo as keepalive,St as patch,ro as pathname,no as port,Ot as post,Et as put,io as search,oo as searchParam,so as searchParams,Zi as signal,It as text,kt as url};
|
|
8
8
|
//# sourceMappingURL=index.min.mjs.map
|