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