newt-client-js 2.0.1 → 2.0.2
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/umd/newtClient.js +1 -1
- package/package.json +2 -2
package/dist/umd/newtClient.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).newtClient={})}(this,(function(e){"use strict";function t(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})})),t}var r={exports:{}},n=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}},o=n,i=Object.prototype.toString;function a(e){return Array.isArray(e)}function u(e){return void 0===e}function c(e){return"[object ArrayBuffer]"===i.call(e)}function s(e){return null!==e&&"object"==typeof e}function f(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function p(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var y={isArray:a,isArrayBuffer:c,isBuffer:function(e){return null!==e&&!u(e)&&null!==e.constructor&&!u(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"[object FormData]"===i.call(e)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&c(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isPlainObject:f,isUndefined:u,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:p,isStream:function(e){return s(e)&&p(e.pipe)},isURLSearchParams:function(e){return"[object URLSearchParams]"===i.call(e)},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function e(){var t={};function r(r,n){f(t[n])&&f(r)?t[n]=e(t[n],r):f(r)?t[n]=e({},r):a(r)?t[n]=r.slice():t[n]=r}for(var n=0,o=arguments.length;n<o;n++)l(arguments[n],r);return t},extend:function(e,t,r){return l(t,(function(t,n){e[n]=r&&"function"==typeof t?o(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}},d=y;function h(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var m=function(e,t,r){if(!t)return e;var n;if(r)n=r(t);else if(d.isURLSearchParams(t))n=t.toString();else{var o=[];d.forEach(t,(function(e,t){null!=e&&(d.isArray(e)?t+="[]":e=[e],d.forEach(e,(function(e){d.isDate(e)?e=e.toISOString():d.isObject(e)&&(e=JSON.stringify(e)),o.push(h(t)+"="+h(e))})))})),n=o.join("&")}if(n){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e},g=y;function b(){this.handlers=[]}b.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},b.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},b.prototype.forEach=function(e){g.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var v=b,E=y,O=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e},S=O,w=function(e,t,r,n,o){var i=new Error(e);return S(i,t,r,n,o)},j=w,A=y,P=A.isStandardBrowserEnv()?{write:function(e,t,r,n,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),A.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),A.isString(n)&&a.push("path="+n),A.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},R=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},_=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},N=y,T=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],x=y,C=x.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=x.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0};function U(e){this.message=e}U.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},U.prototype.__CANCEL__=!0;var I=U,D=y,k=function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(j("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)},L=P,F=m,B=function(e,t){return e&&!R(t)?_(e,t):t},M=function(e){var t,r,n,o={};return e?(N.forEach(e.split("\n"),(function(e){if(n=e.indexOf(":"),t=N.trim(e.substr(0,n)).toLowerCase(),r=N.trim(e.substr(n+1)),t){if(o[t]&&T.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([r]):o[t]?o[t]+", "+r:r}})),o):o},q=C,W=w,H=Z,G=I,$=function(e){return new Promise((function(t,r){var n,o=e.data,i=e.headers,a=e.responseType;function u(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}D.isFormData(o)&&delete i["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var s=e.auth.username||"",f=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.Authorization="Basic "+btoa(s+":"+f)}var p=B(e.baseURL,e.url);function l(){if(c){var n="getAllResponseHeaders"in c?M(c.getAllResponseHeaders()):null,o={data:a&&"text"!==a&&"json"!==a?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:n,config:e,request:c};k((function(e){t(e),u()}),(function(e){r(e),u()}),o),c=null}}if(c.open(e.method.toUpperCase(),F(p,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=l:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(l)},c.onabort=function(){c&&(r(W("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){r(W("Network Error",e,null,c)),c=null},c.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||H.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(W(t,e,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},D.isStandardBrowserEnv()){var y=(e.withCredentials||q(p))&&e.xsrfCookieName?L.read(e.xsrfCookieName):void 0;y&&(i[e.xsrfHeaderName]=y)}"setRequestHeader"in c&&D.forEach(i,(function(e,t){void 0===o&&"content-type"===t.toLowerCase()?delete i[t]:c.setRequestHeader(t,e)})),D.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&"json"!==a&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(n=function(e){c&&(r(!e||e&&e.type?new G("canceled"):e),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n))),o||(o=null),c.send(o)}))},V=y,z=function(e,t){E.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))},J=O,Q={"Content-Type":"application/x-www-form-urlencoded"};function X(e,t){!V.isUndefined(e)&&V.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var Y,K={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(Y=$),Y),transformRequest:[function(e,t){return z(t,"Accept"),z(t,"Content-Type"),V.isFormData(e)||V.isArrayBuffer(e)||V.isBuffer(e)||V.isStream(e)||V.isFile(e)||V.isBlob(e)?e:V.isArrayBufferView(e)?e.buffer:V.isURLSearchParams(e)?(X(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):V.isObject(e)||t&&"application/json"===t["Content-Type"]?(X(t,"application/json"),function(e,t,r){if(V.isString(e))try{return(t||JSON.parse)(e),V.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||K.transitional,r=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,o=!r&&"json"===this.responseType;if(o||n&&V.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw J(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};V.forEach(["delete","get","head"],(function(e){K.headers[e]={}})),V.forEach(["post","put","patch"],(function(e){K.headers[e]=V.merge(Q)}));var Z=K,ee=y,te=Z,re=function(e){return!(!e||!e.__CANCEL__)},ne=y,oe=function(e,t,r){var n=this||te;return ee.forEach(r,(function(r){e=r.call(n,e,t)})),e},ie=re,ae=Z,ue=I;function ce(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ue("canceled")}var se=y,fe=function(e,t){t=t||{};var r={};function n(e,t){return se.isPlainObject(e)&&se.isPlainObject(t)?se.merge(e,t):se.isPlainObject(t)?se.merge({},t):se.isArray(t)?t.slice():t}function o(r){return se.isUndefined(t[r])?se.isUndefined(e[r])?void 0:n(void 0,e[r]):n(e[r],t[r])}function i(e){if(!se.isUndefined(t[e]))return n(void 0,t[e])}function a(r){return se.isUndefined(t[r])?se.isUndefined(e[r])?void 0:n(void 0,e[r]):n(void 0,t[r])}function u(r){return r in t?n(e[r],t[r]):r in e?n(void 0,e[r]):void 0}var c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u};return se.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,n=t(e);se.isUndefined(n)&&t!==u||(r[e]=n)})),r},pe="0.25.0",le=pe,ye={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){ye[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var de={};ye.transitional=function(e,t,r){function n(e,t){return"[Axios v"+le+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,o,i){if(!1===e)throw new Error(n(o," has been removed"+(t?" in "+t:"")));return t&&!de[o]&&(de[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}};var he={assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],a=t[i];if(a){var u=e[i],c=void 0===u||a(u,i,e);if(!0!==c)throw new TypeError("option "+i+" must be "+c)}else if(!0!==r)throw Error("Unknown option "+i)}},validators:ye},me=y,ge=m,be=v,ve=function(e){return ce(e),e.headers=e.headers||{},e.data=oe.call(e,e.data,e.headers,e.transformRequest),e.headers=ne.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),ne.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||ae.adapter)(e).then((function(t){return ce(e),t.data=oe.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return ie(t)||(ce(e),t&&t.response&&(t.response.data=oe.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},Ee=fe,Oe=he,Se=Oe.validators;function we(e){this.defaults=e,this.interceptors={request:new be,response:new be}}we.prototype.request=function(e,t){if("string"==typeof e?(t=t||{}).url=e:t=e||{},!t.url)throw new Error("Provided config url is not valid");(t=Ee(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&Oe.assertOptions(r,{silentJSONParsing:Se.transitional(Se.boolean),forcedJSONParsing:Se.transitional(Se.boolean),clarifyTimeoutError:Se.transitional(Se.boolean)},!1);var n=[],o=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var i,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!o){var u=[ve,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(a),i=Promise.resolve(t);u.length;)i=i.then(u.shift(),u.shift());return i}for(var c=t;n.length;){var s=n.shift(),f=n.shift();try{c=s(c)}catch(e){f(e);break}}try{i=ve(c)}catch(e){return Promise.reject(e)}for(;a.length;)i=i.then(a.shift(),a.shift());return i},we.prototype.getUri=function(e){if(!e.url)throw new Error("Provided config url is not valid");return e=Ee(this.defaults,e),ge(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},me.forEach(["delete","get","head","options"],(function(e){we.prototype[e]=function(t,r){return this.request(Ee(r||{},{method:e,url:t,data:(r||{}).data}))}})),me.forEach(["post","put","patch"],(function(e){we.prototype[e]=function(t,r,n){return this.request(Ee(n||{},{method:e,url:t,data:r}))}}));var je=we,Ae=I;function Pe(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t<n;t++)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e){r.reason||(r.reason=new Ae(e),t(r.reason))}))}Pe.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},Pe.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},Pe.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},Pe.source=function(){var e;return{token:new Pe((function(t){e=t})),cancel:e}};var Re=Pe,_e=y,Ne=y,Te=n,xe=je,Ce=fe;var Ue=function e(t){var r=new xe(t),n=Te(xe.prototype.request,r);return Ne.extend(n,xe.prototype,r),Ne.extend(n,r),n.create=function(r){return e(Ce(t,r))},n}(Z);Ue.Axios=xe,Ue.Cancel=I,Ue.CancelToken=Re,Ue.isCancel=re,Ue.VERSION=pe,Ue.all=function(e){return Promise.all(e)},Ue.spread=function(e){return function(t){return e.apply(null,t)}},Ue.isAxiosError=function(e){return _e.isObject(e)&&!0===e.isAxiosError},r.exports=Ue,r.exports.default=Ue;var Ie=r.exports;const De=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);function ke(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function Le(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){ke(i,n,o,a,u,"next",e)}function u(e){ke(i,n,o,a,u,"throw",e)}a(void 0)}))}}function Fe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Be(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Fe(Object(r),!0).forEach((function(t){Me(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Me(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var qe="axios-retry";function We(e){return!e.response&&Boolean(e.code)&&"ECONNABORTED"!==e.code&&(e=>!De.has(e&&e.code))(e)}var He=["get","head","options"],Ge=He.concat(["put","delete"]);function $e(e){return"ECONNABORTED"!==e.code&&(!e.response||e.response.status>=500&&e.response.status<=599)}function Ve(e){return!!e.config&&($e(e)&&-1!==Ge.indexOf(e.config.method))}function ze(e){return We(e)||Ve(e)}function Je(){return 0}function Qe(e){var t=e[qe]||{};return t.retryCount=t.retryCount||0,e[qe]=t,t}function Xe(){return(Xe=Le((function*(e,t,r,n){var o=r.retryCount<e&&t(n);if("object"==typeof o)try{return yield o,!0}catch(e){return!1}return o}))).apply(this,arguments)}function Ye(e,t){e.interceptors.request.use((e=>(Qe(e).lastRequestTime=Date.now(),e))),e.interceptors.response.use(null,function(){var r=Le((function*(r){var{config:n}=r;if(!n)return Promise.reject(r);var{retries:o=3,retryCondition:i=ze,retryDelay:a=Je,shouldResetTimeout:u=!1}=function(e,t){return Be(Be({},t),e[qe])}(n,t),c=Qe(n);if(yield function(e,t,r,n){return Xe.apply(this,arguments)}(o,i,c,r)){c.retryCount+=1;var s=a(c.retryCount,r);if(function(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}(e,n),!u&&n.timeout&&c.lastRequestTime){var f=Date.now()-c.lastRequestTime;n.timeout=Math.max(n.timeout-f-s,1)}return n.transformRequest=[e=>e],new Promise((t=>setTimeout((()=>t(e(n))),s)))}return Promise.reject(r)}));return function(e){return r.apply(this,arguments)}}())}Ye.isNetworkError=We,Ye.isSafeRequestError=function(e){return!!e.config&&($e(e)&&-1!==He.indexOf(e.config.method))},Ye.isIdempotentRequestError=Ve,Ye.isNetworkOrIdempotentRequestError=ze,Ye.exponentialDelay=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=100*Math.pow(2,e),r=.2*t*Math.random();return t+r},Ye.isRetryableError=$e;var Ke,Ze="undefined"!=typeof Symbol&&Symbol,et=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0},tt="Function.prototype.bind called on incompatible ",rt=Array.prototype.slice,nt=Object.prototype.toString,ot="[object Function]",it=function(e){var t=this;if("function"!=typeof t||nt.call(t)!==ot)throw new TypeError(tt+t);for(var r,n=rt.call(arguments,1),o=function(){if(this instanceof r){var o=t.apply(this,n.concat(rt.call(arguments)));return Object(o)===o?o:this}return t.apply(e,n.concat(rt.call(arguments)))},i=Math.max(0,t.length-n.length),a=[],u=0;u<i;u++)a.push("$"+u);if(r=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(o),t.prototype){var c=function(){};c.prototype=t.prototype,r.prototype=new c,c.prototype=null}return r},at=Function.prototype.bind||it,ut=at.call(Function.call,Object.prototype.hasOwnProperty),ct=SyntaxError,st=Function,ft=TypeError,pt=function(e){try{return st('"use strict"; return ('+e+").constructor;")()}catch(e){}},lt=Object.getOwnPropertyDescriptor;if(lt)try{lt({},"")}catch(e){lt=null}var yt=function(){throw new ft},dt=lt?function(){try{return yt}catch(e){try{return lt(arguments,"callee").get}catch(e){return yt}}}():yt,ht="function"==typeof Ze&&"function"==typeof Symbol&&"symbol"==typeof Ze("foo")&&"symbol"==typeof Symbol("bar")&&et(),mt=Object.getPrototypeOf||function(e){return e.__proto__},gt={},bt="undefined"==typeof Uint8Array?Ke:mt(Uint8Array),vt={"%AggregateError%":"undefined"==typeof AggregateError?Ke:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?Ke:ArrayBuffer,"%ArrayIteratorPrototype%":ht?mt([][Symbol.iterator]()):Ke,"%AsyncFromSyncIteratorPrototype%":Ke,"%AsyncFunction%":gt,"%AsyncGenerator%":gt,"%AsyncGeneratorFunction%":gt,"%AsyncIteratorPrototype%":gt,"%Atomics%":"undefined"==typeof Atomics?Ke:Atomics,"%BigInt%":"undefined"==typeof BigInt?Ke:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?Ke:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?Ke:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?Ke:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?Ke:FinalizationRegistry,"%Function%":st,"%GeneratorFunction%":gt,"%Int8Array%":"undefined"==typeof Int8Array?Ke:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?Ke:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?Ke:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ht?mt(mt([][Symbol.iterator]())):Ke,"%JSON%":"object"==typeof JSON?JSON:Ke,"%Map%":"undefined"==typeof Map?Ke:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&ht?mt((new Map)[Symbol.iterator]()):Ke,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?Ke:Promise,"%Proxy%":"undefined"==typeof Proxy?Ke:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?Ke:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?Ke:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&ht?mt((new Set)[Symbol.iterator]()):Ke,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?Ke:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ht?mt(""[Symbol.iterator]()):Ke,"%Symbol%":ht?Symbol:Ke,"%SyntaxError%":ct,"%ThrowTypeError%":dt,"%TypedArray%":bt,"%TypeError%":ft,"%Uint8Array%":"undefined"==typeof Uint8Array?Ke:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?Ke:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?Ke:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?Ke:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?Ke:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?Ke:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?Ke:WeakSet},Et=function e(t){var r;if("%AsyncFunction%"===t)r=pt("async function () {}");else if("%GeneratorFunction%"===t)r=pt("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=pt("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(r=mt(o.prototype))}return vt[t]=r,r},Ot={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},St=at,wt=ut,jt=St.call(Function.call,Array.prototype.concat),At=St.call(Function.apply,Array.prototype.splice),Pt=St.call(Function.call,String.prototype.replace),Rt=St.call(Function.call,String.prototype.slice),_t=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Nt=/\\(\\)?/g,Tt=function(e){var t=Rt(e,0,1),r=Rt(e,-1);if("%"===t&&"%"!==r)throw new ct("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new ct("invalid intrinsic syntax, expected opening `%`");var n=[];return Pt(e,_t,(function(e,t,r,o){n[n.length]=r?Pt(o,Nt,"$1"):t||e})),n},xt=function(e,t){var r,n=e;if(wt(Ot,n)&&(n="%"+(r=Ot[n])[0]+"%"),wt(vt,n)){var o=vt[n];if(o===gt&&(o=Et(n)),void 0===o&&!t)throw new ft("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new ct("intrinsic "+e+" does not exist!")},Ct=function(e,t){if("string"!=typeof e||0===e.length)throw new ft("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new ft('"allowMissing" argument must be a boolean');var r=Tt(e),n=r.length>0?r[0]:"",o=xt("%"+n+"%",t),i=o.name,a=o.value,u=!1,c=o.alias;c&&(n=c[0],At(r,jt([0,1],c)));for(var s=1,f=!0;s<r.length;s+=1){var p=r[s],l=Rt(p,0,1),y=Rt(p,-1);if(('"'===l||"'"===l||"`"===l||'"'===y||"'"===y||"`"===y)&&l!==y)throw new ct("property names with quotes must have matching quotes");if("constructor"!==p&&f||(u=!0),wt(vt,i="%"+(n+="."+p)+"%"))a=vt[i];else if(null!=a){if(!(p in a)){if(!t)throw new ft("base intrinsic for "+e+" exists, but the property is not available.");return}if(lt&&s+1>=r.length){var d=lt(a,p);a=(f=!!d)&&"get"in d&&!("originalValue"in d.get)?d.get:a[p]}else f=wt(a,p),a=a[p];f&&!u&&(vt[i]=a)}}return a},Ut={exports:{}};!function(e){var t=at,r=Ct,n=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||t.call(o,n),a=r("%Object.getOwnPropertyDescriptor%",!0),u=r("%Object.defineProperty%",!0),c=r("%Math.max%");if(u)try{u({},"a",{value:1})}catch(e){u=null}e.exports=function(e){var r=i(t,o,arguments);if(a&&u){var n=a(r,"length");n.configurable&&u(r,"length",{value:1+c(0,e.length-(arguments.length-1))})}return r};var s=function(){return i(t,n,arguments)};u?u(e.exports,"apply",{value:s}):e.exports.apply=s}(Ut);var It=Ct,Dt=Ut.exports,kt=Dt(It("String.prototype.indexOf")),Lt=t(Object.freeze({__proto__:null,default:{}})),Ft="function"==typeof Map&&Map.prototype,Bt=Object.getOwnPropertyDescriptor&&Ft?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Mt=Ft&&Bt&&"function"==typeof Bt.get?Bt.get:null,qt=Ft&&Map.prototype.forEach,Wt="function"==typeof Set&&Set.prototype,Ht=Object.getOwnPropertyDescriptor&&Wt?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Gt=Wt&&Ht&&"function"==typeof Ht.get?Ht.get:null,$t=Wt&&Set.prototype.forEach,Vt="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,zt="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,Jt="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,Qt=Boolean.prototype.valueOf,Xt=Object.prototype.toString,Yt=Function.prototype.toString,Kt=String.prototype.match,Zt="function"==typeof BigInt?BigInt.prototype.valueOf:null,er=Object.getOwnPropertySymbols,tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,rr="function"==typeof Symbol&&"object"==typeof Symbol.iterator,nr=Object.prototype.propertyIsEnumerable,or=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null),ir=Lt.custom,ar=ir&&pr(ir)?ir:null,ur="function"==typeof Symbol&&void 0!==Symbol.toStringTag?Symbol.toStringTag:null;function cr(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function sr(e){return String(e).replace(/"/g,""")}function fr(e){return!("[object Array]"!==dr(e)||ur&&"object"==typeof e&&ur in e)}function pr(e){if(rr)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!tr)return!1;try{return tr.call(e),!0}catch(e){}return!1}var lr=Object.prototype.hasOwnProperty||function(e){return e in this};function yr(e,t){return lr.call(e,t)}function dr(e){return Xt.call(e)}function hr(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function mr(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return mr(e.slice(0,t.maxStringLength),t)+n}return cr(e.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,gr),"single",t)}function gr(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+t.toString(16).toUpperCase()}function br(e){return"Object("+e+")"}function vr(e){return e+" { ? }"}function Er(e,t,r,n){return e+" ("+t+") {"+(n?Or(r,n):r.join(", "))+"}"}function Or(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+e.join(","+r)+"\n"+t.prev}function Sr(e,t){var r=fr(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=yr(e,o)?t(e[o],e):""}var i,a="function"==typeof er?er(e):[];if(rr){i={};for(var u=0;u<a.length;u++)i["$"+a[u]]=a[u]}for(var c in e)yr(e,c)&&(r&&String(Number(c))===c&&c<e.length||rr&&i["$"+c]instanceof Symbol||(/[^\w$]/.test(c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if("function"==typeof er)for(var s=0;s<a.length;s++)nr.call(e,a[s])&&n.push("["+t(a[s])+"]: "+t(e[a[s]],e));return n}var wr=Ct,jr=function(e,t){var r=It(e,!!t);return"function"==typeof r&&kt(e,".prototype.")>-1?Dt(r):r},Ar=function e(t,r,n,o){var i=r||{};if(yr(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(yr(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!yr(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(yr(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return mr(t,i);if("number"==typeof t)return 0===t?1/0/t>0?"0":"-0":String(t);if("bigint"==typeof t)return String(t)+"n";var u=void 0===i.depth?5:i.depth;if(void 0===n&&(n=0),n>=u&&u>0&&"object"==typeof t)return fr(t)?"[Array]":"[Object]";var c=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=Array(e.indent+1).join(" ")}return{base:r,prev:Array(t+1).join(r)}}(i,n);if(void 0===o)o=[];else if(hr(o,t)>=0)return"[Circular]";function s(t,r,a){if(r&&(o=o.slice()).push(r),a){var u={depth:i.depth};return yr(i,"quoteStyle")&&(u.quoteStyle=i.quoteStyle),e(t,u,n+1,o)}return e(t,i,n+1,o)}if("function"==typeof t){var f=function(e){if(e.name)return e.name;var t=Kt.call(Yt.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),p=Sr(t,s);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(p.length>0?" { "+p.join(", ")+" }":"")}if(pr(t)){var l=rr?String(t).replace(/^(Symbol\(.*\))_[^)]*$/,"$1"):tr.call(t);return"object"!=typeof t||rr?l:br(l)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var y="<"+String(t.nodeName).toLowerCase(),d=t.attributes||[],h=0;h<d.length;h++)y+=" "+d[h].name+"="+cr(sr(d[h].value),"double",i);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+String(t.nodeName).toLowerCase()+">"}if(fr(t)){if(0===t.length)return"[]";var m=Sr(t,s);return c&&!function(e){for(var t=0;t<e.length;t++)if(hr(e[t],"\n")>=0)return!1;return!0}(m)?"["+Or(m,c)+"]":"[ "+m.join(", ")+" ]"}if(function(e){return!("[object Error]"!==dr(e)||ur&&"object"==typeof e&&ur in e)}(t)){var g=Sr(t,s);return 0===g.length?"["+String(t)+"]":"{ ["+String(t)+"] "+g.join(", ")+" }"}if("object"==typeof t&&a){if(ar&&"function"==typeof t[ar])return t[ar]();if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!Mt||!e||"object"!=typeof e)return!1;try{Mt.call(e);try{Gt.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var b=[];return qt.call(t,(function(e,r){b.push(s(r,t,!0)+" => "+s(e,t))})),Er("Map",Mt.call(t),b,c)}if(function(e){if(!Gt||!e||"object"!=typeof e)return!1;try{Gt.call(e);try{Mt.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var v=[];return $t.call(t,(function(e){v.push(s(e,t))})),Er("Set",Gt.call(t),v,c)}if(function(e){if(!Vt||!e||"object"!=typeof e)return!1;try{Vt.call(e,Vt);try{zt.call(e,zt)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return vr("WeakMap");if(function(e){if(!zt||!e||"object"!=typeof e)return!1;try{zt.call(e,zt);try{Vt.call(e,Vt)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return vr("WeakSet");if(function(e){if(!Jt||!e||"object"!=typeof e)return!1;try{return Jt.call(e),!0}catch(e){}return!1}(t))return vr("WeakRef");if(function(e){return!("[object Number]"!==dr(e)||ur&&"object"==typeof e&&ur in e)}(t))return br(s(Number(t)));if(function(e){if(!e||"object"!=typeof e||!Zt)return!1;try{return Zt.call(e),!0}catch(e){}return!1}(t))return br(s(Zt.call(t)));if(function(e){return!("[object Boolean]"!==dr(e)||ur&&"object"==typeof e&&ur in e)}(t))return br(Qt.call(t));if(function(e){return!("[object String]"!==dr(e)||ur&&"object"==typeof e&&ur in e)}(t))return br(s(String(t)));if(!function(e){return!("[object Date]"!==dr(e)||ur&&"object"==typeof e&&ur in e)}(t)&&!function(e){return!("[object RegExp]"!==dr(e)||ur&&"object"==typeof e&&ur in e)}(t)){var E=Sr(t,s),O=or?or(t)===Object.prototype:t instanceof Object||t.constructor===Object,S=t instanceof Object?"":"null prototype",w=!O&&ur&&Object(t)===t&&ur in t?dr(t).slice(8,-1):S?"Object":"",j=(O||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(w||S?"["+[].concat(w||[],S||[]).join(": ")+"] ":"");return 0===E.length?j+"{}":c?j+"{"+Or(E,c)+"}":j+"{ "+E.join(", ")+" }"}return String(t)},Pr=wr("%TypeError%"),Rr=wr("%WeakMap%",!0),_r=wr("%Map%",!0),Nr=jr("WeakMap.prototype.get",!0),Tr=jr("WeakMap.prototype.set",!0),xr=jr("WeakMap.prototype.has",!0),Cr=jr("Map.prototype.get",!0),Ur=jr("Map.prototype.set",!0),Ir=jr("Map.prototype.has",!0),Dr=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},kr=String.prototype.replace,Lr=/%20/g,Fr="RFC3986",Br={default:Fr,formatters:{RFC1738:function(e){return kr.call(e,Lr,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:Fr},Mr=Br,qr=Object.prototype.hasOwnProperty,Wr=Array.isArray,Hr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Gr=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},$r={arrayToObject:Gr,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],a=Object.keys(i),u=0;u<a.length;++u){var c=a[u],s=i[c];"object"==typeof s&&null!==s&&-1===r.indexOf(s)&&(t.push({obj:i,prop:c}),r.push(s))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(Wr(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,n,o){if(0===e.length)return e;var i=e;if("symbol"==typeof e?i=Symbol.prototype.toString.call(e):"string"!=typeof e&&(i=String(e)),"iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var a="",u=0;u<i.length;++u){var c=i.charCodeAt(u);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===Mr.RFC1738&&(40===c||41===c)?a+=i.charAt(u):c<128?a+=Hr[c]:c<2048?a+=Hr[192|c>>6]+Hr[128|63&c]:c<55296||c>=57344?a+=Hr[224|c>>12]+Hr[128|c>>6&63]+Hr[128|63&c]:(u+=1,c=65536+((1023&c)<<10|1023&i.charCodeAt(u)),a+=Hr[240|c>>18]+Hr[128|c>>12&63]+Hr[128|c>>6&63]+Hr[128|63&c])}return a},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(Wr(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(Wr(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!qr.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var o=t;return Wr(t)&&!Wr(r)&&(o=Gr(t,n)),Wr(t)&&Wr(r)?(r.forEach((function(r,o){if(qr.call(t,o)){var i=t[o];i&&"object"==typeof i&&r&&"object"==typeof r?t[o]=e(i,r,n):t.push(r)}else t[o]=r})),t):Object.keys(r).reduce((function(t,o){var i=r[o];return qr.call(t,o)?t[o]=e(t[o],i,n):t[o]=i,t}),o)}},Vr=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new Pr("Side channel does not contain "+Ar(e))},get:function(n){if(Rr&&n&&("object"==typeof n||"function"==typeof n)){if(e)return Nr(e,n)}else if(_r){if(t)return Cr(t,n)}else if(r)return function(e,t){var r=Dr(e,t);return r&&r.value}(r,n)},has:function(n){if(Rr&&n&&("object"==typeof n||"function"==typeof n)){if(e)return xr(e,n)}else if(_r){if(t)return Ir(t,n)}else if(r)return function(e,t){return!!Dr(e,t)}(r,n);return!1},set:function(n,o){Rr&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new Rr),Tr(e,n,o)):_r?(t||(t=new _r),Ur(t,n,o)):(r||(r={key:{},next:null}),function(e,t,r){var n=Dr(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,o))}};return n},zr=$r,Jr=Br,Qr=Object.prototype.hasOwnProperty,Xr={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},Yr=Array.isArray,Kr=Array.prototype.push,Zr=function(e,t){Kr.apply(e,Yr(t)?t:[t])},en=Date.prototype.toISOString,tn=Jr.default,rn={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:zr.encode,encodeValuesOnly:!1,format:tn,formatter:Jr.formatters[tn],indices:!1,serializeDate:function(e){return en.call(e)},skipNulls:!1,strictNullHandling:!1},nn=function e(t,r,n,o,i,a,u,c,s,f,p,l,y,d,h){var m,g=t;if(h.has(t))throw new RangeError("Cyclic object value");if("function"==typeof u?g=u(r,g):g instanceof Date?g=f(g):"comma"===n&&Yr(g)&&(g=zr.maybeMap(g,(function(e){return e instanceof Date?f(e):e}))),null===g){if(o)return a&&!y?a(r,rn.encoder,d,"key",p):r;g=""}if("string"==typeof(m=g)||"number"==typeof m||"boolean"==typeof m||"symbol"==typeof m||"bigint"==typeof m||zr.isBuffer(g))return a?[l(y?r:a(r,rn.encoder,d,"key",p))+"="+l(a(g,rn.encoder,d,"value",p))]:[l(r)+"="+l(String(g))];var b,v=[];if(void 0===g)return v;if("comma"===n&&Yr(g))b=[{value:g.length>0?g.join(",")||null:void 0}];else if(Yr(u))b=u;else{var E=Object.keys(g);b=c?E.sort(c):E}for(var O=0;O<b.length;++O){var S=b[O],w="object"==typeof S&&void 0!==S.value?S.value:g[S];if(!i||null!==w){var j=Yr(g)?"function"==typeof n?n(r,S):r:r+(s?"."+S:"["+S+"]");h.set(t,!0);var A=Vr();Zr(v,e(w,j,n,o,i,a,u,c,s,f,p,l,y,d,A))}}return v},on=$r,an=Object.prototype.hasOwnProperty,un=Array.isArray,cn={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:on.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},sn=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},fn=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},pn=function(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,a=r.depth>0&&/(\[[^[\]]*])/.exec(o),u=a?o.slice(0,a.index):o,c=[];if(u){if(!r.plainObjects&&an.call(Object.prototype,u)&&!r.allowPrototypes)return;c.push(u)}for(var s=0;r.depth>0&&null!==(a=i.exec(o))&&s<r.depth;){if(s+=1,!r.plainObjects&&an.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(a[1])}return a&&c.push("["+o.slice(a.index)+"]"),function(e,t,r,n){for(var o=n?t:fn(t,r),i=e.length-1;i>=0;--i){var a,u=e[i];if("[]"===u&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var c="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,s=parseInt(c,10);r.parseArrays||""!==c?!isNaN(s)&&u!==c&&String(s)===c&&s>=0&&r.parseArrays&&s<=r.arrayLimit?(a=[])[s]=o:a[c]=o:a={0:o}}o=a}return o}(c,t,r,n)}},ln=function(e,t){var r,n=e,o=function(e){if(!e)return rn;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||rn.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Jr.default;if(void 0!==e.format){if(!Qr.call(Jr.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=Jr.formatters[r],o=rn.filter;return("function"==typeof e.filter||Yr(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:rn.addQueryPrefix,allowDots:void 0===e.allowDots?rn.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:rn.charsetSentinel,delimiter:void 0===e.delimiter?rn.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:rn.encode,encoder:"function"==typeof e.encoder?e.encoder:rn.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:rn.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:rn.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:rn.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:rn.strictNullHandling}}(t);"function"==typeof o.filter?n=(0,o.filter)("",n):Yr(o.filter)&&(r=o.filter);var i,a=[];if("object"!=typeof n||null===n)return"";i=t&&t.arrayFormat in Xr?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var u=Xr[i];r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var c=Vr(),s=0;s<r.length;++s){var f=r[s];o.skipNulls&&null===n[f]||Zr(a,nn(n[f],f,u,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,c))}var p=a.join(o.delimiter),l=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?l+="utf8=%26%2310003%3B&":l+="utf8=%E2%9C%93&"),p.length>0?l+p:""},yn={formats:Br,parse:function(e,t){var r=function(e){if(!e)return cn;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?cn.charset:e.charset;return{allowDots:void 0===e.allowDots?cn.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:cn.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:cn.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:cn.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:cn.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:cn.comma,decoder:"function"==typeof e.decoder?e.decoder:cn.decoder,delimiter:"string"==typeof e.delimiter||on.isRegExp(e.delimiter)?e.delimiter:cn.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:cn.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:cn.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:cn.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:cn.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:cn.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof e?function(e,t){var r,n={},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,a=o.split(t.delimiter,i),u=-1,c=t.charset;if(t.charsetSentinel)for(r=0;r<a.length;++r)0===a[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===a[r]?c="utf-8":"utf8=%26%2310003%3B"===a[r]&&(c="iso-8859-1"),u=r,r=a.length);for(r=0;r<a.length;++r)if(r!==u){var s,f,p=a[r],l=p.indexOf("]="),y=-1===l?p.indexOf("="):l+1;-1===y?(s=t.decoder(p,cn.decoder,c,"key"),f=t.strictNullHandling?null:""):(s=t.decoder(p.slice(0,y),cn.decoder,c,"key"),f=on.maybeMap(fn(p.slice(y+1),t),(function(e){return t.decoder(e,cn.decoder,c,"value")}))),f&&t.interpretNumericEntities&&"iso-8859-1"===c&&(f=sn(f)),p.indexOf("[]=")>-1&&(f=un(f)?[f]:f),an.call(n,s)?n[s]=on.combine(n[s],f):n[s]=f}return n}(e,r):e,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),a=0;a<i.length;++a){var u=i[a],c=pn(u,n[u],r,"string"==typeof e);o=on.merge(o,c,r)}return!0===r.allowSparse?o:on.compact(o)},stringify:ln};const dn=e=>{let t="";e.and&&(t=(e=>{if(!e)throw new Error("invalid query");const t=[];return e.forEach((e=>{t.push(dn(e))})),t.join("&")})(e.and),delete e.and);let r="";e.or&&(r=(e=>{if(!e)throw new Error("invalid query");const t=[];return e.forEach((e=>{t.push(dn(e))})),"[or]=("+t.join(";")+")"})(e.or),delete e.or);let n=yn.stringify(e,{encode:!1,arrayFormat:"comma"});return n=[n,r,t].filter((e=>e)).join("&"),n};e.createClient=e=>{let{spaceUid:t,token:r,apiType:n="cdn",retryOnError:o=!0,retryLimit:i=3}=e;if(!t)throw new Error("spaceUid parameter is required.");if(!r)throw new Error("token parameter is required.");if(!["cdn","api"].includes(n))throw new Error(`apiType parameter should be set to "cdn" or "api". apiType: ${n}`);if(i>10)throw new Error("retryLimit should be a value less than or equal to 10.");const a=Ie.create({baseURL:`https://${t}.${n}.newt.so/v1`,headers:{Authorization:`Bearer ${r}`}});o&&Ye(a,{retries:i,retryCondition:e=>{var t,r;return 429===(null===(t=e.response)||void 0===t?void 0:t.status)||500===(null===(r=e.response)||void 0===r?void 0:r.status)},retryDelay:e=>1e3*e});return{getContents:async e=>{let{appUid:t,modelUid:r,query:n}=e;if(!t)throw new Error("app parameter is required.");if(!r)throw new Error("model parameter is required.");let o=`/${t}/${r}`;n&&Object.keys(n).length&&(o=o+"?"+dn(n));const{data:i}=await a.get(o);return i},getContent:async e=>{let{appUid:t,modelUid:r,contentId:n,query:o}=e;if(!t)throw new Error("appUid parameter is required.");if(!r)throw new Error("modelUid parameter is required.");if(!n)throw new Error("contentId parameter is required.");let i=`/${t}/${r}/${n}`;o&&Object.keys(o).length&&(i=i+"?"+dn(o));const{data:u}=await a.get(i);return u},getApp:async e=>{let{appUid:t}=e;if(!t)throw new Error("appUid parameter is required.");const r=`/space/apps/${t}`,{data:n}=await a.get(r);return n}}},Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).newtClient={})}(this,(function(e){"use strict";function t(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})})),t}var r={exports:{}},n=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}},o=n,i=Object.prototype.toString;function a(e){return Array.isArray(e)}function u(e){return void 0===e}function c(e){return"[object ArrayBuffer]"===i.call(e)}function s(e){return null!==e&&"object"==typeof e}function f(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function p(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var y={isArray:a,isArrayBuffer:c,isBuffer:function(e){return null!==e&&!u(e)&&null!==e.constructor&&!u(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"[object FormData]"===i.call(e)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&c(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isPlainObject:f,isUndefined:u,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:p,isStream:function(e){return s(e)&&p(e.pipe)},isURLSearchParams:function(e){return"[object URLSearchParams]"===i.call(e)},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function e(){var t={};function r(r,n){f(t[n])&&f(r)?t[n]=e(t[n],r):f(r)?t[n]=e({},r):a(r)?t[n]=r.slice():t[n]=r}for(var n=0,o=arguments.length;n<o;n++)l(arguments[n],r);return t},extend:function(e,t,r){return l(t,(function(t,n){e[n]=r&&"function"==typeof t?o(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}},d=y;function h(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var m=function(e,t,r){if(!t)return e;var n;if(r)n=r(t);else if(d.isURLSearchParams(t))n=t.toString();else{var o=[];d.forEach(t,(function(e,t){null!=e&&(d.isArray(e)?t+="[]":e=[e],d.forEach(e,(function(e){d.isDate(e)?e=e.toISOString():d.isObject(e)&&(e=JSON.stringify(e)),o.push(h(t)+"="+h(e))})))})),n=o.join("&")}if(n){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e},g=y;function b(){this.handlers=[]}b.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},b.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},b.prototype.forEach=function(e){g.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var v=b,E=y,O=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e},S={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},w=O,j=function(e,t,r,n,o){var i=new Error(e);return w(i,t,r,n,o)},A=j,P=y,R=P.isStandardBrowserEnv()?{write:function(e,t,r,n,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),P.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),P.isString(n)&&a.push("path="+n),P.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},_=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},N=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},T=y,x=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],C=y,U=C.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=C.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0};function I(e){this.message=e}I.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},I.prototype.__CANCEL__=!0;var D=I,k=y,L=function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(A("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)},F=R,B=m,M=function(e,t){return e&&!_(t)?N(e,t):t},q=function(e){var t,r,n,o={};return e?(T.forEach(e.split("\n"),(function(e){if(n=e.indexOf(":"),t=T.trim(e.substr(0,n)).toLowerCase(),r=T.trim(e.substr(n+1)),t){if(o[t]&&x.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([r]):o[t]?o[t]+", "+r:r}})),o):o},W=U,H=j,G=S,$=D,V=function(e){return new Promise((function(t,r){var n,o=e.data,i=e.headers,a=e.responseType;function u(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}k.isFormData(o)&&delete i["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var s=e.auth.username||"",f=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.Authorization="Basic "+btoa(s+":"+f)}var p=M(e.baseURL,e.url);function l(){if(c){var n="getAllResponseHeaders"in c?q(c.getAllResponseHeaders()):null,o={data:a&&"text"!==a&&"json"!==a?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:n,config:e,request:c};L((function(e){t(e),u()}),(function(e){r(e),u()}),o),c=null}}if(c.open(e.method.toUpperCase(),B(p,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=l:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(l)},c.onabort=function(){c&&(r(H("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){r(H("Network Error",e,null,c)),c=null},c.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||G;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(H(t,e,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},k.isStandardBrowserEnv()){var y=(e.withCredentials||W(p))&&e.xsrfCookieName?F.read(e.xsrfCookieName):void 0;y&&(i[e.xsrfHeaderName]=y)}"setRequestHeader"in c&&k.forEach(i,(function(e,t){void 0===o&&"content-type"===t.toLowerCase()?delete i[t]:c.setRequestHeader(t,e)})),k.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),a&&"json"!==a&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(n=function(e){c&&(r(!e||e&&e.type?new $("canceled"):e),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n))),o||(o=null),c.send(o)}))},z=y,J=function(e,t){E.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))},Q=O,X={"Content-Type":"application/x-www-form-urlencoded"};function Y(e,t){!z.isUndefined(e)&&z.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var K,Z={transitional:S,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(K=V),K),transformRequest:[function(e,t){return J(t,"Accept"),J(t,"Content-Type"),z.isFormData(e)||z.isArrayBuffer(e)||z.isBuffer(e)||z.isStream(e)||z.isFile(e)||z.isBlob(e)?e:z.isArrayBufferView(e)?e.buffer:z.isURLSearchParams(e)?(Y(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):z.isObject(e)||t&&"application/json"===t["Content-Type"]?(Y(t,"application/json"),function(e,t,r){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||Z.transitional,r=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,o=!r&&"json"===this.responseType;if(o||n&&z.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw Q(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};z.forEach(["delete","get","head"],(function(e){Z.headers[e]={}})),z.forEach(["post","put","patch"],(function(e){Z.headers[e]=z.merge(X)}));var ee=Z,te=y,re=ee,ne=function(e){return!(!e||!e.__CANCEL__)},oe=y,ie=function(e,t,r){var n=this||re;return te.forEach(r,(function(r){e=r.call(n,e,t)})),e},ae=ne,ue=ee,ce=D;function se(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ce("canceled")}var fe=y,pe=function(e,t){t=t||{};var r={};function n(e,t){return fe.isPlainObject(e)&&fe.isPlainObject(t)?fe.merge(e,t):fe.isPlainObject(t)?fe.merge({},t):fe.isArray(t)?t.slice():t}function o(r){return fe.isUndefined(t[r])?fe.isUndefined(e[r])?void 0:n(void 0,e[r]):n(e[r],t[r])}function i(e){if(!fe.isUndefined(t[e]))return n(void 0,t[e])}function a(r){return fe.isUndefined(t[r])?fe.isUndefined(e[r])?void 0:n(void 0,e[r]):n(void 0,t[r])}function u(r){return r in t?n(e[r],t[r]):r in e?n(void 0,e[r]):void 0}var c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:u};return fe.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,n=t(e);fe.isUndefined(n)&&t!==u||(r[e]=n)})),r},le="0.26.1",ye=le,de={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){de[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var he={};de.transitional=function(e,t,r){function n(e,t){return"[Axios v"+ye+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,o,i){if(!1===e)throw new Error(n(o," has been removed"+(t?" in "+t:"")));return t&&!he[o]&&(he[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}};var me={assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],a=t[i];if(a){var u=e[i],c=void 0===u||a(u,i,e);if(!0!==c)throw new TypeError("option "+i+" must be "+c)}else if(!0!==r)throw Error("Unknown option "+i)}},validators:de},ge=y,be=m,ve=v,Ee=function(e){return se(e),e.headers=e.headers||{},e.data=ie.call(e,e.data,e.headers,e.transformRequest),e.headers=oe.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),oe.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||ue.adapter)(e).then((function(t){return se(e),t.data=ie.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return ae(t)||(se(e),t&&t.response&&(t.response.data=ie.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},Oe=pe,Se=me,we=Se.validators;function je(e){this.defaults=e,this.interceptors={request:new ve,response:new ve}}je.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=Oe(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&Se.assertOptions(r,{silentJSONParsing:we.transitional(we.boolean),forcedJSONParsing:we.transitional(we.boolean),clarifyTimeoutError:we.transitional(we.boolean)},!1);var n=[],o=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var i,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!o){var u=[Ee,void 0];for(Array.prototype.unshift.apply(u,n),u=u.concat(a),i=Promise.resolve(t);u.length;)i=i.then(u.shift(),u.shift());return i}for(var c=t;n.length;){var s=n.shift(),f=n.shift();try{c=s(c)}catch(e){f(e);break}}try{i=Ee(c)}catch(e){return Promise.reject(e)}for(;a.length;)i=i.then(a.shift(),a.shift());return i},je.prototype.getUri=function(e){return e=Oe(this.defaults,e),be(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},ge.forEach(["delete","get","head","options"],(function(e){je.prototype[e]=function(t,r){return this.request(Oe(r||{},{method:e,url:t,data:(r||{}).data}))}})),ge.forEach(["post","put","patch"],(function(e){je.prototype[e]=function(t,r,n){return this.request(Oe(n||{},{method:e,url:t,data:r}))}}));var Ae=je,Pe=D;function Re(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t<n;t++)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e){r.reason||(r.reason=new Pe(e),t(r.reason))}))}Re.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},Re.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},Re.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},Re.source=function(){var e;return{token:new Re((function(t){e=t})),cancel:e}};var _e=Re,Ne=y,Te=y,xe=n,Ce=Ae,Ue=pe;var Ie=function e(t){var r=new Ce(t),n=xe(Ce.prototype.request,r);return Te.extend(n,Ce.prototype,r),Te.extend(n,r),n.create=function(r){return e(Ue(t,r))},n}(ee);Ie.Axios=Ce,Ie.Cancel=D,Ie.CancelToken=_e,Ie.isCancel=ne,Ie.VERSION=le,Ie.all=function(e){return Promise.all(e)},Ie.spread=function(e){return function(t){return e.apply(null,t)}},Ie.isAxiosError=function(e){return Ne.isObject(e)&&!0===e.isAxiosError},r.exports=Ie,r.exports.default=Ie;var De=r.exports;const ke=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);function Le(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function Fe(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Le(i,n,o,a,u,"next",e)}function u(e){Le(i,n,o,a,u,"throw",e)}a(void 0)}))}}function Be(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Me(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(r),!0).forEach((function(t){qe(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function qe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var We="axios-retry";function He(e){return!e.response&&Boolean(e.code)&&"ECONNABORTED"!==e.code&&(e=>!ke.has(e&&e.code))(e)}var Ge=["get","head","options"],$e=Ge.concat(["put","delete"]);function Ve(e){return"ECONNABORTED"!==e.code&&(!e.response||e.response.status>=500&&e.response.status<=599)}function ze(e){return!!e.config&&(Ve(e)&&-1!==$e.indexOf(e.config.method))}function Je(e){return He(e)||ze(e)}function Qe(){return 0}function Xe(e){var t=e[We]||{};return t.retryCount=t.retryCount||0,e[We]=t,t}function Ye(){return(Ye=Fe((function*(e,t,r,n){var o=r.retryCount<e&&t(n);if("object"==typeof o)try{return yield o,!0}catch(e){return!1}return o}))).apply(this,arguments)}function Ke(e,t){e.interceptors.request.use((e=>(Xe(e).lastRequestTime=Date.now(),e))),e.interceptors.response.use(null,function(){var r=Fe((function*(r){var{config:n}=r;if(!n)return Promise.reject(r);var{retries:o=3,retryCondition:i=Je,retryDelay:a=Qe,shouldResetTimeout:u=!1}=function(e,t){return Me(Me({},t),e[We])}(n,t),c=Xe(n);if(yield function(e,t,r,n){return Ye.apply(this,arguments)}(o,i,c,r)){c.retryCount+=1;var s=a(c.retryCount,r);if(function(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}(e,n),!u&&n.timeout&&c.lastRequestTime){var f=Date.now()-c.lastRequestTime;n.timeout=Math.max(n.timeout-f-s,1)}return n.transformRequest=[e=>e],new Promise((t=>setTimeout((()=>t(e(n))),s)))}return Promise.reject(r)}));return function(e){return r.apply(this,arguments)}}())}Ke.isNetworkError=He,Ke.isSafeRequestError=function(e){return!!e.config&&(Ve(e)&&-1!==Ge.indexOf(e.config.method))},Ke.isIdempotentRequestError=ze,Ke.isNetworkOrIdempotentRequestError=Je,Ke.exponentialDelay=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=100*Math.pow(2,e),r=.2*t*Math.random();return t+r},Ke.isRetryableError=Ve;var Ze,et="undefined"!=typeof Symbol&&Symbol,tt=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0},rt="Function.prototype.bind called on incompatible ",nt=Array.prototype.slice,ot=Object.prototype.toString,it="[object Function]",at=function(e){var t=this;if("function"!=typeof t||ot.call(t)!==it)throw new TypeError(rt+t);for(var r,n=nt.call(arguments,1),o=function(){if(this instanceof r){var o=t.apply(this,n.concat(nt.call(arguments)));return Object(o)===o?o:this}return t.apply(e,n.concat(nt.call(arguments)))},i=Math.max(0,t.length-n.length),a=[],u=0;u<i;u++)a.push("$"+u);if(r=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(o),t.prototype){var c=function(){};c.prototype=t.prototype,r.prototype=new c,c.prototype=null}return r},ut=Function.prototype.bind||at,ct=ut.call(Function.call,Object.prototype.hasOwnProperty),st=SyntaxError,ft=Function,pt=TypeError,lt=function(e){try{return ft('"use strict"; return ('+e+").constructor;")()}catch(e){}},yt=Object.getOwnPropertyDescriptor;if(yt)try{yt({},"")}catch(e){yt=null}var dt=function(){throw new pt},ht=yt?function(){try{return dt}catch(e){try{return yt(arguments,"callee").get}catch(e){return dt}}}():dt,mt="function"==typeof et&&"function"==typeof Symbol&&"symbol"==typeof et("foo")&&"symbol"==typeof Symbol("bar")&&tt(),gt=Object.getPrototypeOf||function(e){return e.__proto__},bt={},vt="undefined"==typeof Uint8Array?Ze:gt(Uint8Array),Et={"%AggregateError%":"undefined"==typeof AggregateError?Ze:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?Ze:ArrayBuffer,"%ArrayIteratorPrototype%":mt?gt([][Symbol.iterator]()):Ze,"%AsyncFromSyncIteratorPrototype%":Ze,"%AsyncFunction%":bt,"%AsyncGenerator%":bt,"%AsyncGeneratorFunction%":bt,"%AsyncIteratorPrototype%":bt,"%Atomics%":"undefined"==typeof Atomics?Ze:Atomics,"%BigInt%":"undefined"==typeof BigInt?Ze:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?Ze:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?Ze:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?Ze:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?Ze:FinalizationRegistry,"%Function%":ft,"%GeneratorFunction%":bt,"%Int8Array%":"undefined"==typeof Int8Array?Ze:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?Ze:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?Ze:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":mt?gt(gt([][Symbol.iterator]())):Ze,"%JSON%":"object"==typeof JSON?JSON:Ze,"%Map%":"undefined"==typeof Map?Ze:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&mt?gt((new Map)[Symbol.iterator]()):Ze,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?Ze:Promise,"%Proxy%":"undefined"==typeof Proxy?Ze:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?Ze:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?Ze:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&mt?gt((new Set)[Symbol.iterator]()):Ze,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?Ze:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":mt?gt(""[Symbol.iterator]()):Ze,"%Symbol%":mt?Symbol:Ze,"%SyntaxError%":st,"%ThrowTypeError%":ht,"%TypedArray%":vt,"%TypeError%":pt,"%Uint8Array%":"undefined"==typeof Uint8Array?Ze:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?Ze:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?Ze:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?Ze:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?Ze:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?Ze:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?Ze:WeakSet},Ot=function e(t){var r;if("%AsyncFunction%"===t)r=lt("async function () {}");else if("%GeneratorFunction%"===t)r=lt("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=lt("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(r=gt(o.prototype))}return Et[t]=r,r},St={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},wt=ut,jt=ct,At=wt.call(Function.call,Array.prototype.concat),Pt=wt.call(Function.apply,Array.prototype.splice),Rt=wt.call(Function.call,String.prototype.replace),_t=wt.call(Function.call,String.prototype.slice),Nt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Tt=/\\(\\)?/g,xt=function(e){var t=_t(e,0,1),r=_t(e,-1);if("%"===t&&"%"!==r)throw new st("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new st("invalid intrinsic syntax, expected opening `%`");var n=[];return Rt(e,Nt,(function(e,t,r,o){n[n.length]=r?Rt(o,Tt,"$1"):t||e})),n},Ct=function(e,t){var r,n=e;if(jt(St,n)&&(n="%"+(r=St[n])[0]+"%"),jt(Et,n)){var o=Et[n];if(o===bt&&(o=Ot(n)),void 0===o&&!t)throw new pt("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new st("intrinsic "+e+" does not exist!")},Ut=function(e,t){if("string"!=typeof e||0===e.length)throw new pt("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new pt('"allowMissing" argument must be a boolean');var r=xt(e),n=r.length>0?r[0]:"",o=Ct("%"+n+"%",t),i=o.name,a=o.value,u=!1,c=o.alias;c&&(n=c[0],Pt(r,At([0,1],c)));for(var s=1,f=!0;s<r.length;s+=1){var p=r[s],l=_t(p,0,1),y=_t(p,-1);if(('"'===l||"'"===l||"`"===l||'"'===y||"'"===y||"`"===y)&&l!==y)throw new st("property names with quotes must have matching quotes");if("constructor"!==p&&f||(u=!0),jt(Et,i="%"+(n+="."+p)+"%"))a=Et[i];else if(null!=a){if(!(p in a)){if(!t)throw new pt("base intrinsic for "+e+" exists, but the property is not available.");return}if(yt&&s+1>=r.length){var d=yt(a,p);a=(f=!!d)&&"get"in d&&!("originalValue"in d.get)?d.get:a[p]}else f=jt(a,p),a=a[p];f&&!u&&(Et[i]=a)}}return a},It={exports:{}};!function(e){var t=ut,r=Ut,n=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||t.call(o,n),a=r("%Object.getOwnPropertyDescriptor%",!0),u=r("%Object.defineProperty%",!0),c=r("%Math.max%");if(u)try{u({},"a",{value:1})}catch(e){u=null}e.exports=function(e){var r=i(t,o,arguments);if(a&&u){var n=a(r,"length");n.configurable&&u(r,"length",{value:1+c(0,e.length-(arguments.length-1))})}return r};var s=function(){return i(t,n,arguments)};u?u(e.exports,"apply",{value:s}):e.exports.apply=s}(It);var Dt=Ut,kt=It.exports,Lt=kt(Dt("String.prototype.indexOf")),Ft=t(Object.freeze({__proto__:null,default:{}})),Bt="function"==typeof Map&&Map.prototype,Mt=Object.getOwnPropertyDescriptor&&Bt?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,qt=Bt&&Mt&&"function"==typeof Mt.get?Mt.get:null,Wt=Bt&&Map.prototype.forEach,Ht="function"==typeof Set&&Set.prototype,Gt=Object.getOwnPropertyDescriptor&&Ht?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,$t=Ht&&Gt&&"function"==typeof Gt.get?Gt.get:null,Vt=Ht&&Set.prototype.forEach,zt="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,Jt="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,Qt="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,Xt=Boolean.prototype.valueOf,Yt=Object.prototype.toString,Kt=Function.prototype.toString,Zt=String.prototype.match,er="function"==typeof BigInt?BigInt.prototype.valueOf:null,tr=Object.getOwnPropertySymbols,rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,nr="function"==typeof Symbol&&"object"==typeof Symbol.iterator,or=Object.prototype.propertyIsEnumerable,ir=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null),ar=Ft.custom,ur=ar&&lr(ar)?ar:null,cr="function"==typeof Symbol&&void 0!==Symbol.toStringTag?Symbol.toStringTag:null;function sr(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function fr(e){return String(e).replace(/"/g,""")}function pr(e){return!("[object Array]"!==hr(e)||cr&&"object"==typeof e&&cr in e)}function lr(e){if(nr)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!rr)return!1;try{return rr.call(e),!0}catch(e){}return!1}var yr=Object.prototype.hasOwnProperty||function(e){return e in this};function dr(e,t){return yr.call(e,t)}function hr(e){return Yt.call(e)}function mr(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function gr(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return gr(e.slice(0,t.maxStringLength),t)+n}return sr(e.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,br),"single",t)}function br(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+t.toString(16).toUpperCase()}function vr(e){return"Object("+e+")"}function Er(e){return e+" { ? }"}function Or(e,t,r,n){return e+" ("+t+") {"+(n?Sr(r,n):r.join(", "))+"}"}function Sr(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+e.join(","+r)+"\n"+t.prev}function wr(e,t){var r=pr(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=dr(e,o)?t(e[o],e):""}var i,a="function"==typeof tr?tr(e):[];if(nr){i={};for(var u=0;u<a.length;u++)i["$"+a[u]]=a[u]}for(var c in e)dr(e,c)&&(r&&String(Number(c))===c&&c<e.length||nr&&i["$"+c]instanceof Symbol||(/[^\w$]/.test(c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if("function"==typeof tr)for(var s=0;s<a.length;s++)or.call(e,a[s])&&n.push("["+t(a[s])+"]: "+t(e[a[s]],e));return n}var jr=Ut,Ar=function(e,t){var r=Dt(e,!!t);return"function"==typeof r&&Lt(e,".prototype.")>-1?kt(r):r},Pr=function e(t,r,n,o){var i=r||{};if(dr(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(dr(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!dr(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(dr(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return gr(t,i);if("number"==typeof t)return 0===t?1/0/t>0?"0":"-0":String(t);if("bigint"==typeof t)return String(t)+"n";var u=void 0===i.depth?5:i.depth;if(void 0===n&&(n=0),n>=u&&u>0&&"object"==typeof t)return pr(t)?"[Array]":"[Object]";var c=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=Array(e.indent+1).join(" ")}return{base:r,prev:Array(t+1).join(r)}}(i,n);if(void 0===o)o=[];else if(mr(o,t)>=0)return"[Circular]";function s(t,r,a){if(r&&(o=o.slice()).push(r),a){var u={depth:i.depth};return dr(i,"quoteStyle")&&(u.quoteStyle=i.quoteStyle),e(t,u,n+1,o)}return e(t,i,n+1,o)}if("function"==typeof t){var f=function(e){if(e.name)return e.name;var t=Zt.call(Kt.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),p=wr(t,s);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(p.length>0?" { "+p.join(", ")+" }":"")}if(lr(t)){var l=nr?String(t).replace(/^(Symbol\(.*\))_[^)]*$/,"$1"):rr.call(t);return"object"!=typeof t||nr?l:vr(l)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var y="<"+String(t.nodeName).toLowerCase(),d=t.attributes||[],h=0;h<d.length;h++)y+=" "+d[h].name+"="+sr(fr(d[h].value),"double",i);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+String(t.nodeName).toLowerCase()+">"}if(pr(t)){if(0===t.length)return"[]";var m=wr(t,s);return c&&!function(e){for(var t=0;t<e.length;t++)if(mr(e[t],"\n")>=0)return!1;return!0}(m)?"["+Sr(m,c)+"]":"[ "+m.join(", ")+" ]"}if(function(e){return!("[object Error]"!==hr(e)||cr&&"object"==typeof e&&cr in e)}(t)){var g=wr(t,s);return 0===g.length?"["+String(t)+"]":"{ ["+String(t)+"] "+g.join(", ")+" }"}if("object"==typeof t&&a){if(ur&&"function"==typeof t[ur])return t[ur]();if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!qt||!e||"object"!=typeof e)return!1;try{qt.call(e);try{$t.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var b=[];return Wt.call(t,(function(e,r){b.push(s(r,t,!0)+" => "+s(e,t))})),Or("Map",qt.call(t),b,c)}if(function(e){if(!$t||!e||"object"!=typeof e)return!1;try{$t.call(e);try{qt.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var v=[];return Vt.call(t,(function(e){v.push(s(e,t))})),Or("Set",$t.call(t),v,c)}if(function(e){if(!zt||!e||"object"!=typeof e)return!1;try{zt.call(e,zt);try{Jt.call(e,Jt)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Er("WeakMap");if(function(e){if(!Jt||!e||"object"!=typeof e)return!1;try{Jt.call(e,Jt);try{zt.call(e,zt)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Er("WeakSet");if(function(e){if(!Qt||!e||"object"!=typeof e)return!1;try{return Qt.call(e),!0}catch(e){}return!1}(t))return Er("WeakRef");if(function(e){return!("[object Number]"!==hr(e)||cr&&"object"==typeof e&&cr in e)}(t))return vr(s(Number(t)));if(function(e){if(!e||"object"!=typeof e||!er)return!1;try{return er.call(e),!0}catch(e){}return!1}(t))return vr(s(er.call(t)));if(function(e){return!("[object Boolean]"!==hr(e)||cr&&"object"==typeof e&&cr in e)}(t))return vr(Xt.call(t));if(function(e){return!("[object String]"!==hr(e)||cr&&"object"==typeof e&&cr in e)}(t))return vr(s(String(t)));if(!function(e){return!("[object Date]"!==hr(e)||cr&&"object"==typeof e&&cr in e)}(t)&&!function(e){return!("[object RegExp]"!==hr(e)||cr&&"object"==typeof e&&cr in e)}(t)){var E=wr(t,s),O=ir?ir(t)===Object.prototype:t instanceof Object||t.constructor===Object,S=t instanceof Object?"":"null prototype",w=!O&&cr&&Object(t)===t&&cr in t?hr(t).slice(8,-1):S?"Object":"",j=(O||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(w||S?"["+[].concat(w||[],S||[]).join(": ")+"] ":"");return 0===E.length?j+"{}":c?j+"{"+Sr(E,c)+"}":j+"{ "+E.join(", ")+" }"}return String(t)},Rr=jr("%TypeError%"),_r=jr("%WeakMap%",!0),Nr=jr("%Map%",!0),Tr=Ar("WeakMap.prototype.get",!0),xr=Ar("WeakMap.prototype.set",!0),Cr=Ar("WeakMap.prototype.has",!0),Ur=Ar("Map.prototype.get",!0),Ir=Ar("Map.prototype.set",!0),Dr=Ar("Map.prototype.has",!0),kr=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},Lr=String.prototype.replace,Fr=/%20/g,Br="RFC3986",Mr={default:Br,formatters:{RFC1738:function(e){return Lr.call(e,Fr,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:Br},qr=Mr,Wr=Object.prototype.hasOwnProperty,Hr=Array.isArray,Gr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),$r=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},Vr={arrayToObject:$r,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],a=Object.keys(i),u=0;u<a.length;++u){var c=a[u],s=i[c];"object"==typeof s&&null!==s&&-1===r.indexOf(s)&&(t.push({obj:i,prop:c}),r.push(s))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(Hr(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,n,o){if(0===e.length)return e;var i=e;if("symbol"==typeof e?i=Symbol.prototype.toString.call(e):"string"!=typeof e&&(i=String(e)),"iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var a="",u=0;u<i.length;++u){var c=i.charCodeAt(u);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===qr.RFC1738&&(40===c||41===c)?a+=i.charAt(u):c<128?a+=Gr[c]:c<2048?a+=Gr[192|c>>6]+Gr[128|63&c]:c<55296||c>=57344?a+=Gr[224|c>>12]+Gr[128|c>>6&63]+Gr[128|63&c]:(u+=1,c=65536+((1023&c)<<10|1023&i.charCodeAt(u)),a+=Gr[240|c>>18]+Gr[128|c>>12&63]+Gr[128|c>>6&63]+Gr[128|63&c])}return a},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(Hr(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(Hr(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!Wr.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var o=t;return Hr(t)&&!Hr(r)&&(o=$r(t,n)),Hr(t)&&Hr(r)?(r.forEach((function(r,o){if(Wr.call(t,o)){var i=t[o];i&&"object"==typeof i&&r&&"object"==typeof r?t[o]=e(i,r,n):t.push(r)}else t[o]=r})),t):Object.keys(r).reduce((function(t,o){var i=r[o];return Wr.call(t,o)?t[o]=e(t[o],i,n):t[o]=i,t}),o)}},zr=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new Rr("Side channel does not contain "+Pr(e))},get:function(n){if(_r&&n&&("object"==typeof n||"function"==typeof n)){if(e)return Tr(e,n)}else if(Nr){if(t)return Ur(t,n)}else if(r)return function(e,t){var r=kr(e,t);return r&&r.value}(r,n)},has:function(n){if(_r&&n&&("object"==typeof n||"function"==typeof n)){if(e)return Cr(e,n)}else if(Nr){if(t)return Dr(t,n)}else if(r)return function(e,t){return!!kr(e,t)}(r,n);return!1},set:function(n,o){_r&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new _r),xr(e,n,o)):Nr?(t||(t=new Nr),Ir(t,n,o)):(r||(r={key:{},next:null}),function(e,t,r){var n=kr(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,o))}};return n},Jr=Vr,Qr=Mr,Xr=Object.prototype.hasOwnProperty,Yr={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},Kr=Array.isArray,Zr=Array.prototype.push,en=function(e,t){Zr.apply(e,Kr(t)?t:[t])},tn=Date.prototype.toISOString,rn=Qr.default,nn={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Jr.encode,encodeValuesOnly:!1,format:rn,formatter:Qr.formatters[rn],indices:!1,serializeDate:function(e){return tn.call(e)},skipNulls:!1,strictNullHandling:!1},on=function e(t,r,n,o,i,a,u,c,s,f,p,l,y,d,h){var m,g=t;if(h.has(t))throw new RangeError("Cyclic object value");if("function"==typeof u?g=u(r,g):g instanceof Date?g=f(g):"comma"===n&&Kr(g)&&(g=Jr.maybeMap(g,(function(e){return e instanceof Date?f(e):e}))),null===g){if(o)return a&&!y?a(r,nn.encoder,d,"key",p):r;g=""}if("string"==typeof(m=g)||"number"==typeof m||"boolean"==typeof m||"symbol"==typeof m||"bigint"==typeof m||Jr.isBuffer(g))return a?[l(y?r:a(r,nn.encoder,d,"key",p))+"="+l(a(g,nn.encoder,d,"value",p))]:[l(r)+"="+l(String(g))];var b,v=[];if(void 0===g)return v;if("comma"===n&&Kr(g))b=[{value:g.length>0?g.join(",")||null:void 0}];else if(Kr(u))b=u;else{var E=Object.keys(g);b=c?E.sort(c):E}for(var O=0;O<b.length;++O){var S=b[O],w="object"==typeof S&&void 0!==S.value?S.value:g[S];if(!i||null!==w){var j=Kr(g)?"function"==typeof n?n(r,S):r:r+(s?"."+S:"["+S+"]");h.set(t,!0);var A=zr();en(v,e(w,j,n,o,i,a,u,c,s,f,p,l,y,d,A))}}return v},an=Vr,un=Object.prototype.hasOwnProperty,cn=Array.isArray,sn={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:an.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},fn=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},pn=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},ln=function(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,a=r.depth>0&&/(\[[^[\]]*])/.exec(o),u=a?o.slice(0,a.index):o,c=[];if(u){if(!r.plainObjects&&un.call(Object.prototype,u)&&!r.allowPrototypes)return;c.push(u)}for(var s=0;r.depth>0&&null!==(a=i.exec(o))&&s<r.depth;){if(s+=1,!r.plainObjects&&un.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(a[1])}return a&&c.push("["+o.slice(a.index)+"]"),function(e,t,r,n){for(var o=n?t:pn(t,r),i=e.length-1;i>=0;--i){var a,u=e[i];if("[]"===u&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var c="["===u.charAt(0)&&"]"===u.charAt(u.length-1)?u.slice(1,-1):u,s=parseInt(c,10);r.parseArrays||""!==c?!isNaN(s)&&u!==c&&String(s)===c&&s>=0&&r.parseArrays&&s<=r.arrayLimit?(a=[])[s]=o:a[c]=o:a={0:o}}o=a}return o}(c,t,r,n)}},yn=function(e,t){var r,n=e,o=function(e){if(!e)return nn;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||nn.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Qr.default;if(void 0!==e.format){if(!Xr.call(Qr.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=Qr.formatters[r],o=nn.filter;return("function"==typeof e.filter||Kr(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:nn.addQueryPrefix,allowDots:void 0===e.allowDots?nn.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:nn.charsetSentinel,delimiter:void 0===e.delimiter?nn.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:nn.encode,encoder:"function"==typeof e.encoder?e.encoder:nn.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:nn.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:nn.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:nn.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:nn.strictNullHandling}}(t);"function"==typeof o.filter?n=(0,o.filter)("",n):Kr(o.filter)&&(r=o.filter);var i,a=[];if("object"!=typeof n||null===n)return"";i=t&&t.arrayFormat in Yr?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var u=Yr[i];r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var c=zr(),s=0;s<r.length;++s){var f=r[s];o.skipNulls&&null===n[f]||en(a,on(n[f],f,u,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,c))}var p=a.join(o.delimiter),l=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?l+="utf8=%26%2310003%3B&":l+="utf8=%E2%9C%93&"),p.length>0?l+p:""},dn={formats:Mr,parse:function(e,t){var r=function(e){if(!e)return sn;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?sn.charset:e.charset;return{allowDots:void 0===e.allowDots?sn.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:sn.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:sn.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:sn.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:sn.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:sn.comma,decoder:"function"==typeof e.decoder?e.decoder:sn.decoder,delimiter:"string"==typeof e.delimiter||an.isRegExp(e.delimiter)?e.delimiter:sn.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:sn.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:sn.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:sn.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:sn.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:sn.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof e?function(e,t){var r,n={},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,a=o.split(t.delimiter,i),u=-1,c=t.charset;if(t.charsetSentinel)for(r=0;r<a.length;++r)0===a[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===a[r]?c="utf-8":"utf8=%26%2310003%3B"===a[r]&&(c="iso-8859-1"),u=r,r=a.length);for(r=0;r<a.length;++r)if(r!==u){var s,f,p=a[r],l=p.indexOf("]="),y=-1===l?p.indexOf("="):l+1;-1===y?(s=t.decoder(p,sn.decoder,c,"key"),f=t.strictNullHandling?null:""):(s=t.decoder(p.slice(0,y),sn.decoder,c,"key"),f=an.maybeMap(pn(p.slice(y+1),t),(function(e){return t.decoder(e,sn.decoder,c,"value")}))),f&&t.interpretNumericEntities&&"iso-8859-1"===c&&(f=fn(f)),p.indexOf("[]=")>-1&&(f=cn(f)?[f]:f),un.call(n,s)?n[s]=an.combine(n[s],f):n[s]=f}return n}(e,r):e,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),a=0;a<i.length;++a){var u=i[a],c=ln(u,n[u],r,"string"==typeof e);o=an.merge(o,c,r)}return!0===r.allowSparse?o:an.compact(o)},stringify:yn};const hn=e=>{let t="";e.and&&(t=(e=>{if(!e)throw new Error("invalid query");const t=[];return e.forEach((e=>{t.push(hn(e))})),t.join("&")})(e.and),delete e.and);let r="";e.or&&(r=(e=>{if(!e)throw new Error("invalid query");const t=[];return e.forEach((e=>{t.push(hn(e))})),"[or]=("+t.join(";")+")"})(e.or),delete e.or);let n=dn.stringify(e,{encode:!1,arrayFormat:"comma"});return n=[n,r,t].filter((e=>e)).join("&"),n};e.createClient=e=>{let{spaceUid:t,token:r,apiType:n="cdn",retryOnError:o=!0,retryLimit:i=3}=e;if(!t)throw new Error("spaceUid parameter is required.");if(!r)throw new Error("token parameter is required.");if(!["cdn","api"].includes(n))throw new Error(`apiType parameter should be set to "cdn" or "api". apiType: ${n}`);if(i>10)throw new Error("retryLimit should be a value less than or equal to 10.");const a=De.create({baseURL:`https://${t}.${n}.newt.so/v1`,headers:{Authorization:`Bearer ${r}`}});o&&Ke(a,{retries:i,retryCondition:e=>{var t,r;return 429===(null===(t=e.response)||void 0===t?void 0:t.status)||500===(null===(r=e.response)||void 0===r?void 0:r.status)},retryDelay:e=>1e3*e});return{getContents:async e=>{let{appUid:t,modelUid:r,query:n}=e;if(!t)throw new Error("app parameter is required.");if(!r)throw new Error("model parameter is required.");let o=`/${t}/${r}`;n&&Object.keys(n).length&&(o=o+"?"+hn(n));const{data:i}=await a.get(o);return i},getContent:async e=>{let{appUid:t,modelUid:r,contentId:n,query:o}=e;if(!t)throw new Error("appUid parameter is required.");if(!r)throw new Error("modelUid parameter is required.");if(!n)throw new Error("contentId parameter is required.");let i=`/${t}/${r}/${n}`;o&&Object.keys(o).length&&(i=i+"?"+hn(o));const{data:u}=await a.get(i);return u},getApp:async e=>{let{appUid:t}=e;if(!t)throw new Error("appUid parameter is required.");const r=`/space/apps/${t}`,{data:n}=await a.get(r);return n}}},Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "newt-client-js",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "JavaScript SDK for Newt's API",
|
|
5
5
|
"main": "./dist/cjs/newtClient.js",
|
|
6
6
|
"module": "./dist/esm/newtClient.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
]
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"axios": "^0.
|
|
52
|
+
"axios": "^0.26.1",
|
|
53
53
|
"axios-retry": "^3.2.4",
|
|
54
54
|
"qs": "^6.10.1"
|
|
55
55
|
},
|