appmesh 1.3.3 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/dist/453.appmesh.esm.js +1 -1
- package/dist/603.appmesh.esm.js +1 -1
- package/dist/840.appmesh.esm.js +1 -1
- package/dist/894.appmesh.esm.js +1 -1
- package/dist/994.appmesh.esm.js +1 -1
- package/dist/appmesh.esm.js +1 -1
- package/package.json +3 -13
- package/src/appmesh.js +50 -673
- package/src/appmesh_tcp.js +24 -70
- package/src/worker.js +35 -15
- package/src/appmesh_oauth.js +0 -367
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ npm i appmesh
|
|
|
22
22
|
import { AppMeshClient } from "appmesh";
|
|
23
23
|
|
|
24
24
|
const client = new AppMeshClient();
|
|
25
|
-
|
|
25
|
+
client.set_bearer_token(process.env.APPMESH_BEARER_TOKEN);
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
#### Browser (VUE Example)
|
|
@@ -92,7 +92,7 @@ npm install msgpack-lite uuid
|
|
|
92
92
|
#### Basic HTTP Server
|
|
93
93
|
|
|
94
94
|
```javascript
|
|
95
|
-
import { AppMeshWorker, ProcessSupersededError } from "appmesh/worker";
|
|
95
|
+
import { AppMeshWorker, ProcessSupersededError, WorkerRejectedError } from "appmesh/worker";
|
|
96
96
|
|
|
97
97
|
const server = new AppMeshWorker();
|
|
98
98
|
|
|
@@ -107,8 +107,8 @@ try {
|
|
|
107
107
|
// Return result to client
|
|
108
108
|
await server.send_task_result(result);
|
|
109
109
|
} catch (error) {
|
|
110
|
-
if (error instanceof ProcessSupersededError) {
|
|
111
|
-
// This process
|
|
110
|
+
if (error instanceof ProcessSupersededError || error instanceof WorkerRejectedError) {
|
|
111
|
+
// This process was replaced (412), or its request is permanently invalid (400).
|
|
112
112
|
// Exiting is an app entry-point decision; the SDK only surfaces the error.
|
|
113
113
|
console.error(error.message);
|
|
114
114
|
process.exit(1);
|
|
@@ -193,11 +193,11 @@ new AppMeshWorker(baseURL, sslConfig, options);
|
|
|
193
193
|
|
|
194
194
|
###### `fetch_task()`
|
|
195
195
|
|
|
196
|
-
Fetch task payload from the App Mesh service. Automatically retries
|
|
196
|
+
Fetch task payload from the App Mesh service. Automatically retries transient failures.
|
|
197
197
|
|
|
198
198
|
**Returns:** `Promise<string|Buffer>` - The payload sent by the client
|
|
199
199
|
|
|
200
|
-
**Throws:** `ProcessSupersededError`
|
|
200
|
+
**Throws:** `ProcessSupersededError` for HTTP 412, or `WorkerRejectedError` for a permanent HTTP 400. The caller should stop serving; exit at the app entry point if appropriate.
|
|
201
201
|
|
|
202
202
|
**Example:**
|
|
203
203
|
|
|
@@ -370,7 +370,7 @@ await server.send_task_result(
|
|
|
370
370
|
import { AppMeshClient } from "appmesh";
|
|
371
371
|
|
|
372
372
|
const client = new AppMeshClient();
|
|
373
|
-
|
|
373
|
+
client.set_bearer_token(process.env.APPMESH_BEARER_TOKEN);
|
|
374
374
|
|
|
375
375
|
const result = await client.run_task(
|
|
376
376
|
"my-app",
|
|
@@ -404,4 +404,4 @@ await server.send_task_result(JSON.stringify(result));
|
|
|
404
404
|
|
|
405
405
|
## Behavioral contract
|
|
406
406
|
|
|
407
|
-
Cross-SDK client guarantees (event demuxer ordering, `__disconnected__` event, buffering caps, timeout/cleanup policy,
|
|
407
|
+
Cross-SDK client guarantees (event demuxer ordering, `__disconnected__` event, buffering caps, timeout/cleanup policy, and bearer authentication) are defined in [SDKContract.md](https://github.com/laoshanxi/app-mesh/blob/main/docs/source/SDKContract.md).
|
package/dist/453.appmesh.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const __webpack_esm_ids__=[453];export const __webpack_esm_modules__={453(){}};
|
package/dist/603.appmesh.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const __webpack_esm_ids__=[603];export const __webpack_esm_modules__={603(){}};
|
package/dist/840.appmesh.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const __webpack_esm_ids__=[840];export const __webpack_esm_modules__={840(){}};
|
package/dist/894.appmesh.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const __webpack_esm_ids__=[894];export const __webpack_esm_modules__={894(e){e.exports="object"==typeof self?self.FormData:window.FormData}};
|
package/dist/994.appmesh.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const __webpack_esm_ids__=[994];export const __webpack_esm_modules__={994(){}};
|
package/dist/appmesh.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={};const t={};function n(r){const o=t[r];if(void 0!==o)return o.exports;const s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}n.m=e,(()=>{const e=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;let t;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}const s=Object.create(null);n.r(s);const i={};t=t||[null,e({}),e([]),e(e)];for(var a=2&o&&r;("object"==typeof a||"function"==typeof a)&&!~t.indexOf(a);a=e(a))Object.getOwnPropertyNames(a).forEach(e=>i[e]=()=>r[e]);return i.default=()=>r,n.d(s,i),s}})(),n.d=(e,t)=>{if(Array.isArray(t))for(var r=0;r<t.length;){var o=t[r++],s=t[r++];n.o(e,o)?0===s&&r++:0===s?Object.defineProperty(e,o,{enumerable:!0,value:t[r++]}):Object.defineProperty(e,o,{enumerable:!0,get:s})}else for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,r)=>(n.f[r](e,t),t),[])),n.u=e=>e+".appmesh.esm.js",n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{const e={792:0},t=t=>{let{__webpack_esm_ids__:r,__webpack_esm_modules__:o,__webpack_esm_runtime__:s}=t;var i,a,u=0;for(i in o)n.o(o,i)&&(n.m[i]=o[i]);for(s&&s(n);u<r.length;u++)a=r[u],n.o(e,a)&&e[a]&&e[a][0](),e[r[u]]=0};n.f.j=(r,o)=>{let s=n.o(e,r)?e[r]:void 0;if(0!==s)if(s)o.push(s[1]);else{let i=import("./"+n.u(r)).then(t,t=>{throw 0!==e[r]&&(e[r]=void 0),t});i=Promise.race([i,new Promise(t=>s=e[r]=[t])]),o.push(s[1]=i)}}})();var r={};function o(e,t){return function(){return e.apply(t,arguments)}}n.r(r),n.d(r,{hasBrowserEnv:()=>De,hasStandardBrowserEnv:()=>xe,hasStandardBrowserWebWorkerEnv:()=>Fe,navigator:()=>Ue,origin:()=>Le});const{toString:s}=Object.prototype,{getPrototypeOf:i}=Object,{iterator:a,toStringTag:u}=Symbol,c=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),l=(e,t)=>{let n=e;const r=[];for(;null!=n&&n!==Object.prototype;){if(-1!==r.indexOf(n))return!1;if(r.push(n),c(n,t))return!0;n=i(n)}return!1},f=(h=Object.create(null),e=>{const t=s.call(e);return h[t]||(h[t]=t.slice(8,-1).toLowerCase())});var h;const p=e=>(e=e.toLowerCase(),t=>f(t)===e),d=e=>t=>typeof t===e,{isArray:m}=Array,y=d("undefined");function _(e){return null!==e&&!y(e)&&null!==e.constructor&&!y(e.constructor)&&b(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const w=p("ArrayBuffer");const g=d("string"),b=d("function"),v=d("number"),E=e=>null!==e&&"object"==typeof e,O=e=>{if(!E(e))return!1;const t=i(e);return!(null!==t&&t!==Object.prototype&&null!==i(t)||l(e,u)||l(e,a))},R=p("Date"),T=p("File"),S=p("Blob"),k=p("FileList"),A=p("Set");const P="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{},C=void 0!==P.FormData?P.FormData:void 0,N=p("URLSearchParams"),[j,D,U,x]=["ReadableStream","Request","Response","Headers"].map(p);function F(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),m(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(_(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let i;for(r=0;r<s;r++)i=o[r],t.call(null,e[i],i,e)}}function L(e,t){if(_(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const I="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,q=e=>!y(e)&&e!==I;const B=(H="undefined"!=typeof Uint8Array&&i(Uint8Array),e=>H&&e instanceof H);var H;const M=p("HTMLFormElement"),{propertyIsEnumerable:z}=Object.prototype,X=p("RegExp"),K=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};F(n,(n,o)=>{let s;!1!==(s=t(n,o,e))&&(r[o]=s||n)}),Object.defineProperties(e,r)};const J=p("AsyncFunction"),W=($="function"==typeof setImmediate,V=b(I.postMessage),$?setImmediate:V?(G=`axios@${Math.random()}`,Y=[],I.addEventListener("message",({source:e,data:t})=>{e===I&&t===G&&Y.length&&Y.shift()()},!1),e=>{Y.push(e),I.postMessage(G,"*")}):e=>setTimeout(e));var $,V,G,Y;const Q="undefined"!=typeof queueMicrotask?queueMicrotask.bind(I):"undefined"!=typeof process&&process.nextTick||W,Z=e=>null!=e&&b(e[a]),ee={isArray:m,isArrayBuffer:w,isBuffer:_,isFormData:e=>{if(!e)return!1;if(C&&e instanceof C)return!0;const t=i(e);if(!t||t===Object.prototype)return!1;if(!b(e.append))return!1;const n=f(e);return"formdata"===n||"object"===n&&b(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&w(e.buffer),t},isString:g,isNumber:v,isBoolean:e=>!0===e||!1===e,isObject:E,isPlainObject:O,isEmptyObject:e=>{if(!E(e)||_(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:j,isRequest:D,isResponse:U,isHeaders:x,isUndefined:y,isDate:R,isFile:T,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:S,isRegExp:X,isFunction:b,isStream:e=>E(e)&&b(e.pipe),isURLSearchParams:N,isTypedArray:B,isFileList:k,forEach:F,merge:function e(...t){const{caseless:n,skipUndefined:r}=q(this)&&this||{},o={},s=(t,s)=>{if("__proto__"===s||"constructor"===s||"prototype"===s)return;const i=n&&"string"==typeof s&&L(o,s)||s,a=c(o,i)?o[i]:void 0;O(a)&&O(t)?o[i]=e(a,t):O(t)?o[i]=e({},t):m(t)?o[i]=t.slice():r&&y(t)||(o[i]=t)};for(let e=0,n=t.length;e<n;e++){const n=t[e];if(!n||_(n))continue;if(F(n,s),"object"!=typeof n||m(n))continue;const r=Object.getOwnPropertySymbols(n);for(let e=0;e<r.length;e++){const t=r[e];z.call(n,t)&&s(n[t],t)}}return o},extend:(e,t,n,{allOwnKeys:r}={})=>(F(t,(t,r)=>{n&&b(t)?Object.defineProperty(e,r,{__proto__:null,value:o(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,s,a;const u={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],r&&!r(a,e,t)||u[a]||(t[a]=e[a],u[a]=!0);e=!1!==n&&i(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:f,kindOfTest:p,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(m(e))return e;let t=e.length;if(!v(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[a]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:M,hasOwnProperty:c,hasOwnProp:c,hasOwnInPrototypeChain:l,getSafeProp:(e,t)=>null!=e&&l(e,t)?e[t]:void 0,reduceDescriptors:K,freezeMethods:e=>{K(e,(t,n)=>{if(b(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];b(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return m(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:L,global:I,isContextDefined:q,isSpecCompliantForm:function(e){return!!(e&&b(e.append)&&"FormData"===e[u]&&e[a])},toJSONObject:e=>{const t=new WeakSet,n=e=>{if(E(e)){if(t.has(e))return;if(_(e))return e;if(!("toJSON"in e)){let r;if(t.add(e),A(e)){r=[];for(const t of e){const e=n(t);!y(e)&&r.push(e)}}else r=m(e)?[]:{},F(e,(e,t)=>{const o=n(e);!y(o)&&(r[t]=o)});return t.delete(e),r}}return e};return n(e)},isAsyncFn:J,isThenable:e=>e&&(E(e)||b(e))&&b(e.then)&&b(e.catch),setImmediate:W,asap:Q,isIterable:Z,isSafeIterable:e=>null!=e&&l(e,a)&&Z(e)},te=ee.toObjectSet(["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"]);const ne=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),re=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function oe(e,t){return ee.isArray(e)?e.map(e=>oe(e,t)):function(e){let t=0,n=e.length;for(;t<n;){const n=e.charCodeAt(t);if(9!==n&&32!==n)break;t+=1}for(;n>t;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}(String(e).replace(t,""))}function se(e){const t=Object.create(null);return ee.forEach(e.toJSON(),(e,n)=>{t[n]=(e=>oe(e,re))(e)}),t}const ie=Symbol("internals");function ae(e){return e&&String(e).trim().toLowerCase()}function ue(e){return!1===e||null==e?e:ee.isArray(e)?e.map(ue):(e=>oe(e,ne))(String(e))}const ce=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function le(e){let t=0,n=e.length;for(;t<n;){const n=e.charCodeAt(t);if(9!==n&&32!==n)break;t+=1}for(;n>t;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}function fe(e,t,n,r,o){return ee.isFunction(r)?r.call(this,t,n):(o&&(t=n),ee.isString(t)?ee.isString(r)?-1!==t.indexOf(r):ee.isRegExp(r)?r.test(t):void 0:void 0)}class he{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=ae(t);if(!o)return;const s=ee.findKey(r,o);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=ue(e))}const s=(e,t)=>ee.forEach(e,(e,n)=>o(e,n,t));if(ee.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(ee.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim();const s=ee.hasOwnProp(t,n);!n||s&&ee.hasOwnProp(te,n)||("set-cookie"===n?s?t[n].push(r):t[n]=[r]:t[n]=s?t[n]+", "+r:r)}),t})(e),t);else if(ee.isObject(e)&&ee.isSafeIterable(e)){let n,r,o=Object.create(null);for(const t of e){if(!ee.isArray(t))throw new TypeError("Object iterator must return a key-value pair");r=t[0],ee.hasOwnProp(o,r)?(n=o[r],o[r]=ee.isArray(n)?[...n,t[1]]:[n,t[1]]):o[r]=t[1]}s(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=ae(e)){const n=ee.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(ee.isFunction(t))return t.call(this,e,n);if(ee.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ae(e)){const n=ee.findKey(this,e);return!(!n||void 0===this[n]||t&&!fe(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=ae(e)){const o=ee.findKey(n,e);!o||t&&!fe(0,n[o],o,t)||(delete n[o],r=!0)}}return ee.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!fe(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return ee.forEach(this,(r,o)=>{const s=ee.findKey(n,o);if(s)return t[s]=ue(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();i!==o&&delete t[o],t[i]=ue(r),n[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ee.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&ee.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){const e=this.get("set-cookie");return ee.isArray(e)?e:null==e||!1===e?[]:[e]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return function(e){const t=Object.create(null),n=String(e);let r=0,o=!1,s=!1;function i(e){const o=le(n.slice(r,e)),s=o.indexOf("=");if(s<1)return;const i=le(o.slice(0,s));if(!ce.test(i))return;const a=i.toLowerCase();if("__proto__"===a||"constructor"===a||"prototype"===a)return;const u=le(o.slice(s+1));t[a]=function(e){const t=e.length-1;if(t<1||34!==e.charCodeAt(0)||34!==e.charCodeAt(t))return e;let n="";for(let r=1;r<t;r++){const o=e.charCodeAt(r);if(34===o)return e;if(92===o&&(r+=1,r>=t))return e;n+=e[r]}return n}(u)}for(let e=0;e<n.length;e++){const t=n.charCodeAt(e);o?s?s=!1:92===t?s=!0:34===t&&(o=!1):34===t?o=!0:44!==t&&59!==t||(i(e),r=e+1)}return i(n.length),t}(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[ie]=this[ie]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ae(e);t[r]||(!function(e,t){const n=ee.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return ee.isArray(e)?e.forEach(r):r(e),this}}he.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ee.reduceDescriptors(he.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),ee.freezeMethods(he);const pe=he,de="[REDACTED ****]";function me(e,t){const n=new Set(t.map(e=>String(e).toLowerCase())),r=[],o=e=>{if(null===e||"object"!=typeof e)return e;if(ee.isBuffer(e))return e;if(-1!==r.indexOf(e))return;let t;if(e instanceof pe&&(e=e.toJSON()),r.push(e),ee.isArray(e))t=[],e.forEach((e,n)=>{const r=o(e);ee.isUndefined(r)||(t[n]=r)});else{if(!ee.isPlainObject(e)&&function(e){if(ee.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(ee.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(e))return r.pop(),e;t=Object.create(null);for(const[r,s]of Object.entries(e)){const e=n.has(r.toLowerCase())?de:o(s);ee.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return o(e)}function ye(e){try{return String(e)}catch(e){return""}}class _e extends Error{static from(e,t,n,r,o,s){let i=e.message;!i&&ee.isArray(e.errors)&&e.errors.length&&(i=function(e){return e.errors.map(e=>{try{return e&&e.message?ye(e.message):ye(e)}catch(e){return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}(e));const a=new _e(i,t||e.code,n,r,o);return Object.defineProperty(a,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),a.name=e.name,null!=e.status&&null==a.status&&(a.status=e.status),s&&Object.assign(a,s),a}constructor(e,t,n,r,o){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status)}toJSON(){const e=this.config,t=e&&ee.hasOwnProp(e,"redact")?e.redact:void 0,n=ee.isArray(t)&&t.length>0?me(e,t):ee.toJSONObject(e);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:n,code:this.code,status:this.status}}}_e.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",_e.ERR_BAD_OPTION="ERR_BAD_OPTION",_e.ECONNABORTED="ECONNABORTED",_e.ETIMEDOUT="ETIMEDOUT",_e.ECONNREFUSED="ECONNREFUSED",_e.ERR_NETWORK="ERR_NETWORK",_e.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",_e.ERR_DEPRECATED="ERR_DEPRECATED",_e.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",_e.ERR_BAD_REQUEST="ERR_BAD_REQUEST",_e.ERR_CANCELED="ERR_CANCELED",_e.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",_e.ERR_INVALID_URL="ERR_INVALID_URL",_e.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const we=_e;function ge(e){return ee.isPlainObject(e)||ee.isArray(e)}function be(e){return ee.endsWith(e,"[]")?e.slice(0,-2):e}function ve(e,t,n){return e?e.concat(t).map(function(e,t){return e=be(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const Ee=ee.toFlatObject(ee,{},null,function(e){return/^is[A-Z]/.test(e)});const Oe=function(e,t,n){if(!ee.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=ee.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!ee.isUndefined(t[e])})).metaTokens,o=n.visitor||p,s=n.dots,i=n.indexes,a=n.Blob||"undefined"!=typeof Blob&&Blob,u=void 0===n.maxDepth?100:n.maxDepth,c=a&&ee.isSpecCompliantForm(t),l=[];if(!ee.isFunction(o))throw new TypeError("visitor must be a function");function f(e){if(null===e)return"";if(ee.isDate(e))return e.toISOString();if(ee.isBoolean(e))return e.toString();if(!c&&ee.isBlob(e))throw new we("Blob is not supported. Use a Buffer instead.");if(ee.isArrayBuffer(e)||ee.isTypedArray(e)){if(c&&"function"==typeof a)return new a([e]);throw new we("Blob is not supported. Use a Buffer instead.",we.ERR_NOT_SUPPORT)}return e}function h(e){if(e>u)throw new we("Object is too deeply nested ("+e+" levels). Max depth: "+u,we.ERR_FORM_DATA_DEPTH_EXCEEDED)}function p(e,n,o){let a=e;if(ee.isReactNative(t)&&ee.isReactNativeBlob(e))return t.append(ve(o,n,s),f(e)),!1;if(e&&!o&&"object"==typeof e)if(ee.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=function(e,t){if(u===1/0)return JSON.stringify(e);const n=[];return JSON.stringify(e,function(e,r){if(!ee.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),h(t+n.length-1),r})}(e,1);else if(ee.isArray(e)&&function(e){return ee.isArray(e)&&!e.some(ge)}(e)||(ee.isFileList(e)||ee.endsWith(n,"[]"))&&(a=ee.toArray(e)))return n=be(n),a.forEach(function(e,r){!ee.isUndefined(e)&&null!==e&&t.append(!0===i?ve([n],r,s):null===i?n:n+"[]",f(e))}),!1;return!!ge(e)||(t.append(ve(o,n,s),f(e)),!1)}const d=Object.assign(Ee,{defaultVisitor:p,convertValue:f,isVisitable:ge});if(!ee.isObject(e))throw new TypeError("data must be an object");return function e(n,r,s=0){if(!ee.isUndefined(n)){if(h(s),-1!==l.indexOf(n))throw new Error("Circular reference detected in "+r.join("."));l.push(n),ee.forEach(n,function(n,i){!0===(!(ee.isUndefined(n)||null===n)&&o.call(t,n,ee.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i],s+1)}),l.pop()}}(e),t};function Re(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function Te(e,t){this._pairs=[],e&&Oe(e,this,t)}const Se=Te.prototype;Se.append=function(e,t){this._pairs.push([e,t])},Se.toString=function(e){const t=e?t=>e.call(this,t,Re):Re;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const ke=Te;function Ae(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Pe(e,t,n){if(!t)return e;e=e||"";const r=ee.isFunction(n)?{serialize:n}:n,o=ee.getSafeProp(r,"encode")||Ae,s=ee.getSafeProp(r,"serialize");let i;if(i=s?s(t,r):ee.isURLSearchParams(t)?t.toString():new ke(t,r).toString(o),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const Ce=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){ee.forEach(this.handlers,function(t){null!==t&&e(t)})}},Ne={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},je={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ke,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},De="undefined"!=typeof window&&"undefined"!=typeof document,Ue="object"==typeof navigator&&navigator||void 0,xe=De&&(!Ue||["ReactNative","NativeScript","NS"].indexOf(Ue.product)<0),Fe="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Le=De&&window.location.href||"http://localhost",Ie={...r,...je};function qe(e){if(e>100)throw new we("FormData field is too deeply nested ("+e+" levels). Max depth: 100",we.ERR_FORM_DATA_DEPTH_EXCEEDED)}const Be=function(e){function t(e,n,r,o){qe(o);let s=e[o++];if("__proto__"===s)return!0;const i=Number.isFinite(+s),a=o>=e.length;if(s=!s&&ee.isArray(r)?r.length:s,a)return ee.hasOwnProp(r,s)?r[s]=ee.isArray(r[s])?r[s].concat(n):[r[s],n]:r[s]=n,!i;ee.hasOwnProp(r,s)&&ee.isObject(r[s])||(r[s]=[]);return t(e,n,r[s],o)&&ee.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}(r[s])),!i}if(ee.isFormData(e)&&ee.isFunction(e.entries)){const n={};return ee.forEachEntry(e,(e,r)=>{t(function(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;null!==(r=n.exec(e));)qe(t.length),t.push("[]"===r[0]?"":r[1]||r[0]);return t}(e),r,n,0)}),n}return null},He=(e,t)=>null!=e&&ee.hasOwnProp(e,t)?e[t]:void 0;const Me={transitional:Ne,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=ee.isObject(e);o&&ee.isHTMLForm(e)&&(e=new FormData(e));if(ee.isFormData(e))return r?JSON.stringify(Be(e)):e;if(ee.isArrayBuffer(e)||ee.isBuffer(e)||ee.isStream(e)||ee.isFile(e)||ee.isBlob(e)||ee.isReadableStream(e))return e;if(ee.isArrayBufferView(e))return e.buffer;if(ee.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){const t=He(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Oe(e,new Ie.classes.URLSearchParams,{visitor:function(e,t,n,r){return Ie.isNode&&ee.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,t).toString();if((s=ee.isFileList(e))||n.indexOf("multipart/form-data")>-1){const n=He(this,"env"),r=n&&n.FormData;return Oe(s?{"files[]":e}:e,r&&new r,t)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(ee.isString(e))try{return(t||JSON.parse)(e),ee.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=He(this,"transitional")||Me.transitional,n=t&&t.forcedJSONParsing,r=He(this,"responseType"),o="json"===r;if(ee.isResponse(e)||ee.isReadableStream(e))return e;if(e&&ee.isString(e)&&(n&&!r||o)){const n=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,He(this,"parseReviver"))}catch(e){if(n){if("SyntaxError"===e.name)throw we.from(e,we.ERR_BAD_RESPONSE,this,null,He(this,"response"));throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ie.classes.FormData,Blob:Ie.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ee.forEach(["delete","get","head","post","put","patch","query"],e=>{Me.headers[e]={}});const ze=Me;function Xe(e,t){const n=this||ze,r=t||n,o=pe.from(r.headers);let s=r.data;return ee.forEach(e,function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Ke(e){return!(!e||!e.__CANCEL__)}const Je=class extends we{constructor(e,t,n){super(e??"canceled",we.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function We(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new we("Request failed with status code "+n.status,n.status>=400&&n.status<500?we.ERR_BAD_REQUEST:we.ERR_BAD_RESPONSE,n.config,n.request,n)):e(n)}const $e=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const u=Date.now(),c=r[i];o||(o=u),n[s]=a,r[s]=u;let l=i,f=0;for(;l!==s;)f+=n[l++],l%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),u-o<t)return;const h=c&&u-c;return h?Math.round(1e3*f/h):void 0}};const Ve=function(e,t){let n,r,o=0,s=1e3/t;const i=(t,s=Date.now())=>{o=s,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=s?i(e,t):(n=e,r||(r=setTimeout(()=>{r=null,i(n)},s-a)))},()=>n&&i(n)]},Ge=(e,t,n=3)=>{let r=0;const o=$e(50,250);return Ve(n=>{if(!n||"number"!=typeof n.loaded)return;const s=n.loaded,i=n.lengthComputable?n.total:void 0,a=Math.max(0,null!=i?Math.min(s,i):s),u=Math.max(0,a-r),c=o(u);r=Math.max(r,a);e({loaded:a,total:i,progress:i?a/i:void 0,bytes:u,rate:c||void 0,estimated:c&&i?(i-a)/c:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})},n)},Ye=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Qe=(e,t=ee.asap)=>(...n)=>t(()=>e(...n)),Ze=Ie.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ie.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ie.origin),Ie.navigator&&/(msie|trident)/i.test(Ie.navigator.userAgent)):()=>!0,et=Ie.hasStandardBrowserEnv?{write(e,t,n,r,o,s,i){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];ee.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),ee.isString(r)&&a.push(`path=${r}`),ee.isString(o)&&a.push(`domain=${o}`),!0===s&&a.push("secure"),ee.isString(i)&&a.push(`SameSite=${i}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(-1!==o&&r.slice(0,o)===e)try{return decodeURIComponent(r.slice(o+1))}catch(e){return r.slice(o+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};const tt=/^https?:(?!\/\/)/i,nt=/[\t\n\r]/g;function rt(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${de}@`),n=t.indexOf("#"),r=(-1===n?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${de}`);return-1===n?r:`${r}#${o=t.slice(n+1),o?o.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,t,n="")=>`${t}${n}${de}`):o}`;var o}function ot(e,t){if("string"==typeof e){const n=function(e){return function(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}(e).replace(nt,"")}(e);if(tt.test(n))throw new we(`Invalid URL ${JSON.stringify(rt(n))}: missing "//" after protocol`,we.ERR_INVALID_URL,t)}}function st(e,t,n,r){ot(t,r);let o=!("string"==typeof(s=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s));var s;return e&&(o||!1===n)?(ot(e,r),function(e,t){if(!t)return e;let n=e.length;for(;n>0&&47===e.charCodeAt(n-1);)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}(e,t)):t}const it=e=>e instanceof pe?{...e}:e;function at(e,t){e=e||{},t=t||{};const n=Object.create(null);function r(e,t,n,r){return ee.isPlainObject(e)&&ee.isPlainObject(t)?ee.merge.call({caseless:r},e,t):ee.isPlainObject(t)?ee.merge({},t):ee.isArray(t)?t.slice():t}function o(e,t,n,o){return ee.isUndefined(t)?ee.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function s(e,t){if(!ee.isUndefined(t))return r(void 0,t)}function i(e,t){return ee.isUndefined(t)?ee.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,s){return ee.hasOwnProp(t,s)?r(n,o):ee.hasOwnProp(e,s)?r(void 0,n):void 0}Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});const u={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,allowedSocketPaths:i,responseEncoding:i,validateStatus:a,headers:(e,t,n)=>o(it(e),it(t),0,!0)};var c;return ee.forEach((c={...e,...t},Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(c).concat(Object.getOwnPropertySymbols(c).filter(e=>Object.getOwnPropertyDescriptor(c,e).enumerable)):Object.keys(c)),function(r){if("__proto__"===r||"constructor"===r||"prototype"===r)return;const s=ee.hasOwnProp(u,r)?u[r]:o,i=s(ee.hasOwnProp(e,r)?e[r]:void 0,ee.hasOwnProp(t,r)?t[r]:void 0,r);ee.isUndefined(i)&&s!==a||(n[r]=i)}),ee.hasOwnProp(t,"validateStatus")&&ee.isUndefined(t.validateStatus)&&!1===function(n){const r=ee.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!ee.isUndefined(r)){if(!ee.isPlainObject(r))return;if(ee.hasOwnProp(r,n))return r[n]}const o=ee.hasOwnProp(e,"transitional")?e.transitional:void 0;if(ee.isPlainObject(o)&&ee.hasOwnProp(o,n))return o[n]}("validateStatusUndefinedResolves")&&(ee.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const ut=["content-type","content-length"];const ct=function(e){const t=at({},e),n=e=>ee.hasOwnProp(t,e)?t[e]:void 0,r=n("data");let o=n("withXSRFToken");const s=n("xsrfHeaderName"),i=n("xsrfCookieName");let a=n("headers");const u=n("auth"),c=n("baseURL"),l=n("allowAbsoluteUrls"),f=n("url");if(t.headers=a=pe.from(a),t.url=Pe(st(c,f,l,t),n("params"),n("paramsSerializer")),u){const t=ee.getSafeProp(u,"username")||"",n=ee.getSafeProp(u,"password")||"";try{a.set("Authorization","Basic "+btoa(t+":"+(n?encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))):"")))}catch(t){throw we.from(t,we.ERR_BAD_OPTION_VALUE,e)}}if(ee.isFormData(r)&&(Ie.hasStandardBrowserEnv||Ie.hasStandardBrowserWebWorkerEnv||ee.isReactNative(r)?a.setContentType(void 0):ee.isFunction(r.getHeaders)&&function(e,t,n){"content-only"===n?Object.entries(t||{}).forEach(([t,n])=>{ut.includes(t.toLowerCase())&&e.set(t,n)}):e.set(t)}(a,r.getHeaders(),n("formDataHeaderPolicy"))),Ie.hasStandardBrowserEnv){ee.isFunction(o)&&(o=o(t));if(!0===o||null==o&&Ze(t.url)){const e=s&&i&&et.read(i);e&&a.set(s,e)}}return t},lt="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=ct(e);let o=r.data;const s=pe.from(r.headers).normalize();let i,a,u,c,l,{responseType:f,onUploadProgress:h,onDownloadProgress:p}=r;function d(){c&&c(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;function y(){if(!m)return;const r=pe.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());We(function(e){t(e),d()},function(e){n(e),d()},{data:f&&"text"!==f&&"json"!==f?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=y:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&m.responseURL.startsWith("file:"))&&setTimeout(y)},m.onabort=function(){m&&(n(new we("Request aborted",we.ECONNABORTED,e,m)),d(),m=null)},m.onerror=function(t){const r=t&&t.message?t.message:"Network Error",o=new we(r,we.ERR_NETWORK,e,m);o.event=t||null,n(o),d(),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||Ne;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new we(t,o.clarifyTimeoutError?we.ETIMEDOUT:we.ECONNABORTED,e,m)),d(),m=null},void 0===o&&s.setContentType(null),"setRequestHeader"in m&&ee.forEach(se(s),function(e,t){m.setRequestHeader(t,e)}),ee.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),f&&"json"!==f&&(m.responseType=r.responseType),p&&([u,l]=Ge(p,!0),m.addEventListener("progress",u)),h&&m.upload&&([a,c]=Ge(h),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(i=t=>{m&&(n(!t||t.type?new Je(null,e,m):t),m.abort(),d(),m=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const _=function(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}(r.url);if(_&&!Ie.protocols.includes(_))return n(new we("Unsupported protocol "+_+":",we.ERR_BAD_REQUEST,e)),void d();m.send(o||null)})},ft=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(e){if(!r){r=!0,i();const t=e instanceof Error?e:this.reason;n.abort(t instanceof we?t:new Je(t instanceof Error?t.message:t))}};let s=t&&setTimeout(()=>{s=null,o(new we(`timeout of ${t}ms exceeded`,we.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>{r||(e.aborted?o.call(e):e.addEventListener("abort",o,{once:!0}))});const{signal:a}=n;return a.unsubscribe=()=>ee.asap(i),a},ht=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},pt=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},dt=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of pt(e))yield*ht(n,t)}(e,t);let s,i=0,a=e=>{s||(s=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return a(),void e.close();let s=r.byteLength;if(n){let e=i+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},mt=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,yt=(e,t,n)=>t+2<n&&mt(e.charCodeAt(t+1))&&mt(e.charCodeAt(t+2)),_t=e=>e<=57?e-48:(223&e)-55,wt=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||43===e||47===e||45===e||95===e,gt=e=>9===e||10===e||12===e||13===e||32===e,bt=e=>{const t=e.length;let n=0;return t>0&&61===e.charCodeAt(t-1)&&(n++,t>1&&61===e.charCodeAt(t-2)&&n++),Math.floor(3*(t-n)/4)},vt=e=>{const t=e.length;let n=0,r=0,o=!1;for(let s=0;s<t;s++){let i=e.charCodeAt(s);37===i&&yt(e,s,t)&&(i=16*_t(e.charCodeAt(s+1))+_t(e.charCodeAt(s+2)),s+=2),gt(i)||(61!==i?!wt(i)||r>0?o=!0:n++:r++)}return o||r>2||r>0&&(n+r)%4!=0||n%4==1?bt(e):(e=>{const t=e%4;return 3*Math.floor(e/4)+(2===t?1:3===t?2:0)})(n)},Et=(e,t)=>{if(!e||"string"!=typeof e)return 0;if(!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),o=e.slice(n+1);if(/;base64/i.test(r))return t(o);let s=0;for(let e=0,t=o.length;e<t;e++){const n=o.charCodeAt(e);if(37===n&&yt(o,e,t))s+=1,e+=2;else if(n<128)s+=1;else if(n<2048)s+=2;else if(n>=55296&&n<=56319&&e+1<t){const t=o.charCodeAt(e+1);t>=56320&&t<=57343?(s+=4,e++):s+=3}else s+=3}return s};const{isFunction:Ot}=ee,Rt=e=>{if(!ee.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},Tt=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},St=e=>{const t=void 0!==ee.global&&null!==ee.global?ee.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=ee.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:s,Response:i}=e,a=o?Ot(o):"function"==typeof fetch,u=Ot(s),c=Ot(i);if(!a)return!1;const l=a&&Ot(n),f=a&&("function"==typeof r?(h=new r,e=>h.encode(e)):async e=>new Uint8Array(await new s(e).arrayBuffer()));var h;const p=u&&l&&Tt(()=>{let e=!1;const t=new s(Ie.origin,{body:new n,method:"POST",get duplex(){return e=!0,"half"}}),r=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!r}),d=c&&l&&Tt(()=>ee.isReadableStream(new i("").body)),m={stream:d&&(e=>e.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!m[e]&&(m[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new we(`Response type '${e}' is not supported`,we.ERR_NOT_SUPPORT,n)})});const y=async e=>{if(null==e)return 0;if(ee.isBlob(e))return e.size;if(ee.isSpecCompliantForm(e)){const t=new s(Ie.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return ee.isArrayBufferView(e)||ee.isArrayBuffer(e)?e.byteLength:(ee.isURLSearchParams(e)&&(e+=""),ee.isString(e)?(await f(e)).byteLength:void 0)};return async e=>{let{url:t,method:n,data:a,signal:c,cancelToken:f,timeout:h,onDownloadProgress:_,onUploadProgress:w,responseType:g,headers:b,withCredentials:v="same-origin",fetchOptions:E,maxContentLength:O,maxBodyLength:R}=ct(e);const T=ee.isNumber(O)&&O>-1,S=ee.isNumber(R)&&R>-1;let k=o||fetch;g=g?(g+"").toLowerCase():"text";let A=ft([c,f&&f.toAbortSignal()],h),P=null;const C=A&&A.unsubscribe&&(()=>{A.unsubscribe()});let N,j=null;const D=()=>new we("Request body larger than maxBodyLength limit",we.ERR_BAD_REQUEST,e,P);try{let o;const c=(x="auth",ee.hasOwnProp(e,x)?e[x]:void 0);if(c){const e=ee.getSafeProp(c,"username")||"";o={username:e,password:ee.getSafeProp(c,"password")||""}}if((e=>{const t=e.indexOf("://");let n=e;return-1!==t&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")})(t)){const e=new URL(t,Ie.origin);if(!o&&(e.username||e.password)){const t=Rt(e.username);o={username:t,password:Rt(e.password)}}(e.username||e.password)&&(e.username="",e.password="",t=e.href)}if(o&&(b.delete("authorization"),b.set("Authorization","Basic "+btoa((U=(o.username||"")+":"+(o.password||""),encodeURIComponent(U).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))))),T&&"string"==typeof t&&t.startsWith("data:")){const n=function(e){const t="string"==typeof e?e.indexOf("#"):-1;return Et(-1===t?e:e.slice(0,t),vt)}(t);if(n>O)throw new we("maxContentLength size of "+O+" exceeded",we.ERR_BAD_RESPONSE,e,P)}if(S&&"get"!==n&&"head"!==n){const e=await y(a);if("number"==typeof e&&isFinite(e)&&(N=e,e>R))throw D()}const f=S&&(ee.isReadableStream(a)||ee.isStream(a)),h=(e,t,n)=>dt(e,65536,e=>{if(S&&e>R)throw j=D();t&&t(e)},n);if(p&&"get"!==n&&"head"!==n&&(w||f)){if(N=N??await(async(e,t)=>{const n=ee.toFiniteNumber(e.getContentLength());return n??y(t)})(b,a),0!==N||f){let e,n=new s(t,{method:"POST",body:a,duplex:"half"});if(ee.isFormData(a)&&(e=n.headers.get("content-type"))&&b.setContentType(e),n.body){const[e,t]=w&&Ye(N,Ge(Qe(w)))||[];a=h(n.body,e,t)}}}else if(f&&!u&&l&&"get"!==n&&"head"!==n)a=h(a);else if(f&&u&&!p&&"get"!==n&&"head"!==n)throw new we("Stream request bodies are not supported by the current fetch implementation",we.ERR_NOT_SUPPORT,e,P);ee.isString(v)||(v=v?"include":"omit");const F=u&&"credentials"in s.prototype;if(ee.isFormData(a)){const e=b.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&b.delete("content-type")}b.set("User-Agent","axios/1.19.0",!1);const L={...E,signal:A,method:n.toUpperCase(),headers:se(b.normalize()),body:a,duplex:"half",credentials:F?v:void 0};P=u&&new s(t,L);let I=await(u?k(P,E):k(t,L));const q=pe.from(I.headers);if(T){const t=ee.toFiniteNumber(q.getContentLength());if(null!=t&&t>O)throw new we("maxContentLength size of "+O+" exceeded",we.ERR_BAD_RESPONSE,e,P)}const B=d&&("stream"===g||"response"===g);if(d&&I.body&&(_||T||B&&C)){const t={};["status","statusText","headers"].forEach(e=>{t[e]=I[e]});const n=ee.toFiniteNumber(q.getContentLength()),[r,o]=_&&Ye(n,Ge(Qe(_),!0))||[];let s=0;const a=t=>{if(T&&(s=t,s>O))throw new we("maxContentLength size of "+O+" exceeded",we.ERR_BAD_RESPONSE,e,P);r&&r(t)};I=new i(dt(I.body,65536,a,()=>{o&&o(),C&&C()}),t)}g=g||"text";let H=await m[ee.findKey(m,g)||"text"](I,e);if(T&&!d&&!B){let t;if(null!=H&&("number"==typeof H.byteLength?t=H.byteLength:"number"==typeof H.size?t=H.size:"string"==typeof H&&(t="function"==typeof r?(new r).encode(H).byteLength:H.length)),"number"==typeof t&&t>O)throw new we("maxContentLength size of "+O+" exceeded",we.ERR_BAD_RESPONSE,e,P)}return!B&&C&&C(),await new Promise((t,n)=>{We(t,n,{data:H,headers:pe.from(I.headers),status:I.status,statusText:I.statusText,config:e,request:P})})}catch(t){if(C&&C(),A&&A.aborted&&A.reason instanceof we){const n=A.reason;throw n.config=e,P&&(n.request=P),t!==n&&Object.defineProperty(n,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),n}if(j)throw P&&!j.request&&(j.request=P),j;if(t instanceof we)throw P&&!t.request&&(t.request=P),t;if(t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message)){const n=new we("Network Error",we.ERR_NETWORK,e,P,t&&t.response);throw Object.defineProperty(n,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),n}throw we.from(t,t&&t.code,e,P,t&&t.response)}var U,x}},kt=new Map,At=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,s=[r,o,n];let i,a,u=s.length,c=kt;for(;u--;)i=s[u],a=c.get(i),void 0===a&&c.set(i,a=u?new Map:St(t)),c=a;return a},Pt=(At(),{http:null,xhr:lt,fetch:{get:At}});ee.forEach(Pt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Ct=e=>`- ${e}`,Nt=e=>ee.isFunction(e)||null===e||!1===e;const jt={getAdapter:function(e,t){e=ee.isArray(e)?e:[e];const{length:n}=e;let r,o;const s={};for(let i=0;i<n;i++){let n;if(r=e[i],o=r,!Nt(r)&&(o=Pt[(n=String(r)).toLowerCase()],void 0===o))throw new we(`Unknown adapter '${n}'`);if(o&&(ee.isFunction(o)||(o=o.get(t))))break;s[n||"#"+i]=o}if(!o){const e=Object.entries(s).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(Ct).join("\n"):" "+Ct(e[0]):"as no adapter specified";throw new we("There is no suitable adapter to dispatch the request "+t,we.ERR_NOT_SUPPORT)}return o},adapters:Pt};function Dt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Je(null,e)}function Ut(e){Dt(e),e.headers=pe.from(e.headers),e.data=Xe.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return jt.getAdapter(e.adapter||ze.adapter,e)(e).then(function(t){Dt(e),e.response=t;try{t.data=Xe.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=pe.from(t.headers),t},function(t){if(!Ke(t)&&(Dt(e),t&&t.response)){e.response=t.response;try{t.response.data=Xe.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=pe.from(t.response.headers)}return Promise.reject(t)})}const xt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{xt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Ft={};xt.transitional=function(e,t,n){function r(e,t){return"[Axios v1.19.0] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,s)=>{if(!1===e)throw new we(r(o," has been removed"+(t?" in "+t:"")),we.ERR_DEPRECATED);return t&&!Ft[o]&&(Ft[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,s)}},xt.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const Lt={assertOptions:function(e,t,n){if("object"!=typeof e||null===e)throw new we("options must be an object",we.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=Object.prototype.hasOwnProperty.call(t,s)?t[s]:void 0;if(i){const t=e[s],n=void 0===t||i(t,s,e);if(!0!==n)throw new we("option "+s+" must be "+n,we.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new we("Unknown option "+s,we.ERR_BAD_OPTION)}},validators:xt},It=Lt.validators;class qt{constructor(e){this.defaults=e||{},this.interceptors={request:new Ce,response:new Ce}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=(()=>{if(!t.stack)return"";const e=t.stack.indexOf("\n");return-1===e?"":t.stack.slice(e+1)})();try{if(e.stack){if(n){const t=n.indexOf("\n"),r=-1===t?-1:n.indexOf("\n",t+1),o=-1===r?"":n.slice(r+1);String(e.stack).endsWith(o)||(e.stack+="\n"+n)}}else e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=at(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&Lt.assertOptions(n,{silentJSONParsing:It.transitional(It.boolean),forcedJSONParsing:It.transitional(It.boolean),clarifyTimeoutError:It.transitional(It.boolean),legacyInterceptorReqResOrdering:It.transitional(It.boolean),advertiseZstdAcceptEncoding:It.transitional(It.boolean),validateStatusUndefinedResolves:It.transitional(It.boolean)},!1),null!=r&&(ee.isFunction(r)?t.paramsSerializer={serialize:r}:Lt.assertOptions(r,{encode:It.function,serialize:It.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Lt.assertOptions(t,{baseUrl:It.spelling("baseURL"),withXsrfToken:It.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&ee.merge(o.common,o[t.method]);o&&ee.forEach(["delete","get","head","post","put","patch","query","common"],e=>{delete o[e]}),t.headers=pe.concat(s,o);const i=[];let a=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;a=a&&e.synchronous;const n=t.transitional||Ne;n&&n.legacyInterceptorReqResOrdering?i.unshift(e.fulfilled,e.rejected):i.push(e.fulfilled,e.rejected)});const u=[];let c;this.interceptors.response.forEach(function(e){u.push(e.fulfilled,e.rejected)});let l,f=0;if(!a){const e=[Ut.bind(this),void 0];for(e.unshift(...i),e.push(...u),l=e.length,c=Promise.resolve(t);f<l;)c=c.then(e[f++],e[f++]);return c}l=i.length;let h=t;for(;f<l;){const e=i[f++],t=i[f++];try{h=e?e(h):h}catch(e){if(!t){c=Promise.reject(e);break}try{const n=t.call(this,e);ee.isThenable(n)&&(c=Promise.resolve(n).then(()=>Ut.call(this,h)))}catch(e){c=Promise.reject(e)}break}}if(!c)try{c=Ut.call(this,h)}catch(e){c=Promise.reject(e)}for(f=0,l=u.length;f<l;)c=c.then(u[f++],u[f++]);return c}getUri(e){return Pe(st((e=at(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}}ee.forEach(["delete","get","head","options"],function(e){qt.prototype[e]=function(t,n){return this.request(at(n||{},{method:e,url:t,data:n&&ee.hasOwnProp(n,"data")?n.data:void 0}))}}),ee.forEach(["post","put","patch","query"],function(e){function t(t){return function(n,r,o){return this.request(at(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}qt.prototype[e]=t(),"query"!==e&&(qt.prototype[e+"Form"]=t(!0))});const Bt=qt;class Ht{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new Je(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Ht(function(t){e=t}),cancel:e}}}const Mt=Ht;const zt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(zt).forEach(([e,t])=>{zt[t]=e});const Xt=zt;const Kt=function e(t){const n=new Bt(t),r=o(Bt.prototype.request,n);return ee.extend(r,Bt.prototype,n,{allOwnKeys:!0}),ee.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(at(t,n))},r}(ze);Kt.Axios=Bt,Kt.CanceledError=Je,Kt.CancelToken=Mt,Kt.isCancel=Ke,Kt.VERSION="1.19.0",Kt.toFormData=Oe,Kt.AxiosError=we,Kt.Cancel=Kt.CanceledError,Kt.all=function(e){return Promise.all(e)},Kt.spread=function(e){return function(t){return e.apply(null,t)}},Kt.isAxiosError=function(e){return ee.isObject(e)&&!0===e.isAxiosError},Kt.mergeConfig=at,Kt.AxiosHeaders=pe,Kt.formToJSON=e=>Be(ee.isHTMLForm(e)?new FormData(e):e),Kt.getAdapter=jt.getAdapter,Kt.HttpStatusCode=Xt,Kt.default=Kt;const Jt=Kt;function Wt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function s(n,r,o,s){var u=r&&r.prototype instanceof a?r:a,c=Object.create(u.prototype);return $t(c,"_invoke",function(n,r,o){var s,a,u,c=0,l=o||[],f=!1,h={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(t,n){return s=t,a=0,u=e,h.n=n,i}};function p(n,r){for(a=n,u=r,t=0;!f&&c&&!o&&t<l.length;t++){var o,s=l[t],p=h.p,d=s[2];n>3?(o=d===r)&&(u=s[(a=s[4])?5:(a=3,3)],s[4]=s[5]=e):s[0]<=p&&((o=n<2&&p<s[1])?(a=0,h.v=r,h.n=s[1]):p<d&&(o=n<3||s[0]>r||r>d)&&(s[4]=n,s[5]=r,h.n=d,a=0))}if(o||n>1)return i;throw f=!0,r}return function(o,l,d){if(c>1)throw TypeError("Generator is already running");for(f&&1===l&&p(l,d),a=l,u=d;(t=a<2?e:u)||!f;){s||(a?a<3?(a>1&&(h.n=-1),p(a,u)):h.n=u:h.v=u);try{if(c=2,s){if(a||(o="next"),t=s[o]){if(!(t=t.call(s,u)))throw TypeError("iterator result is not an object");if(!t.done)return t;u=t.value,a<2&&(a=0)}else 1===a&&(t=s.return)&&t.call(s),a<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),a=1);s=e}else if((t=(f=h.n<0)?u:n.call(r,h))!==i)break}catch(t){s=e,a=1,u=t}finally{c=1}}return{value:t,done:f}}}(n,o,s),!0),c}var i={};function a(){}function u(){}function c(){}t=Object.getPrototypeOf;var l=[][r]?t(t([][r]())):($t(t={},r,function(){return this}),t),f=c.prototype=a.prototype=Object.create(l);function h(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,c):(e.__proto__=c,$t(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=c,$t(f,"constructor",c),$t(c,"constructor",u),u.displayName="GeneratorFunction",$t(c,o,"GeneratorFunction"),$t(f),$t(f,o,"Generator"),$t(f,r,function(){return this}),$t(f,"toString",function(){return"[object Generator]"}),(Wt=function(){return{w:s,m:h}})()}function $t(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}$t=function(e,t,n,r){function s(t,n){$t(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(s("next",0),s("throw",1),s("return",2))},$t(e,t,n,r)}function Vt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,s,i,a=[],u=!0,c=!1;try{if(s=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=s.call(n)).done)&&(a.push(r.value),a.length!==t);u=!0);}catch(e){c=!0,o=e}finally{try{if(!u&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Gt(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gt(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Gt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Qt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Yt(Object(n),!0).forEach(function(t){Zt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Zt(e,t,n){return(t=sn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function en(e,t,n,r,o,s,i){try{var a=e[s](i),u=a.value}catch(e){return void n(e)}a.done?t(u):Promise.resolve(u).then(r,o)}function tn(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var s=e.apply(t,n);function i(e){en(s,r,o,i,a,"next",e)}function a(e){en(s,r,o,i,a,"throw",e)}i(void 0)})}}function nn(e){return nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},nn(e)}function rn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,sn(r.key),r)}}function on(e,t,n){return t&&rn(e.prototype,t),n&&rn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function sn(e){var t=function(e,t){if("object"!=nn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=nn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==nn(t)?t:t+""}function an(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function un(e,t,n){return t=pn(t),function(e,t){if(t&&("object"==nn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,fn()?Reflect.construct(t,n||[],pn(e).constructor):t.apply(e,n))}function cn(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&hn(e,t)}function ln(e){var t="function"==typeof Map?new Map:void 0;return ln=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(fn())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&hn(o,n.prototype),o}(e,arguments,pn(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),hn(n,e)},ln(e)}function fn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(fn=function(){return!!e})()}function hn(e,t){return hn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},hn(e,t)}function pn(e){return pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},pn(e)}var dn=null,mn=null,yn=null,_n=Object.freeze({HTTP_USER_AGENT_HEADER_NAME:"User-Agent",HTTP_USER_AGENT:"appmesh/javascript",HTTP_STATUS_PRECONDITION_REQUIRED:428,DEFAULT_TOKEN_EXPIRE_SECONDS:"P1W",DEFAULT_RUN_APP_TIMEOUT_SECONDS:"P2D",DEFAULT_RUN_APP_LIFECYCLE_SECONDS:"P2DT12H",DEFAULT_JWT_AUDIENCE:"appmesh-service",HTTP_HEADER_KEY_AUTH:"Authorization",HTTP_HEADER_KEY_X_TARGET_HOST:"X-Target-Host",HTTP_HEADER_KEY_X_FILE_PATH:"X-File-Path",TOKEN_REFRESH_POLL_SECONDS:300,TOKEN_REFRESH_OFFSET_SECONDS:30,TOKEN_REFRESH_LIFETIME_RATIO:.6,TOKEN_REFRESH_JITTER_RATIO:.1,TOKEN_REFRESH_RETRY_BASE_SECONDS:5,TOKEN_REFRESH_RETRY_MAX_SECONDS:60,TOKEN_REFRESH_LOG_EVERY:10}),wn=Object.freeze({isNode:!("undefined"!=typeof window&&void 0!==window.document)}),gn=wn.isNode?{encode:function(e){return Buffer.from(e).toString("base64")},decode:function(e){return Buffer.from(e,"base64").toString()}}:{encode:function(e){return btoa(e)},decode:function(e){return atob(e)}},bn=function(){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return an(this,e),(n=un(this,e,[t])).name="AppMeshError",n.statusCode=r,n.responseData=o,n.errorCode=s,n.timestamp=(new Date).toISOString(),n}return cn(e,ln(Error)),on(e)}(),vn=function(){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;an(this,e),(n=un(this,e,[t,428,r,"TOTP_REQUIRED"])).name="TotpRequiredError";var o=r;if("string"==typeof o)try{o=JSON.parse(o)}catch(e){o=null}return n.totpChallenge=o&&"object"===nn(o)&&"string"==typeof o.totp_challenge?o.totp_challenge:null,n}return cn(e,bn),on(e)}(),En=function(){function e(t){var n;return an(this,e),(n=un(this,e,[t,null,null,"APP_REMOVED"])).name="AppRemovedError",n}return cn(e,bn),on(e)}(),On=function(){function e(t){var n;return an(this,e),(n=un(this,e,[t,null,null,"TRANSPORT_DISCONNECTED"])).name="TransportDisconnectedError",n}return cn(e,bn),on(e)}(),Rn=function(e,t){wn.isNode?process.stdout.write(e):console.log(e)};function Tn(e){if("number"==typeof e)return e;if("string"!=typeof e)throw new Error("Invalid input type. Expected number or ISO 8601 duration string.");if(/^\d+$/.test(e))return parseInt(e,10);if(!e.trim())throw new Error("Duration string cannot be empty");if(!e.startsWith("P"))throw new Error("Invalid ISO8601 duration: must start with P");var t="\\d+",n="".concat(t,"(?:[\\.,]").concat(t,")?"),r="(".concat(t,"Y)?(").concat(t,"M)?(").concat(t,"W)?(").concat(t,"D)?"),o="T(".concat(n,"H)?(").concat(n,"M)?(").concat(n,"S)?"),s="P(?:".concat(r,"(?:").concat(o,")?)"),i=["years","months","weeks","days","hours","minutes","seconds"],a=e.replace(/,/g,".").match(new RegExp(s));if(!a)throw new RangeError("invalid duration: "+e);var u=a.slice(1);if(0===u.filter(function(e){return null!=e}).length)throw new RangeError("invalid duration: "+e);if(u.filter(function(e){return/\./.test(e||"")}).length>1)throw new RangeError("only the smallest unit can be fractional");var c=u.reduce(function(e,t,n){return e[i[n]]=parseFloat(t||"0")||0,e},{}),l=0;return l+=31536e3*c.years,l+=2592e3*c.months,l+=604800*c.weeks,l+=86400*c.days,l+=3600*c.hours,l+=60*c.minutes,l+=c.seconds}function Sn(e,t){if(e){var n=t.toLowerCase(),r=Object.keys(e).find(function(e){return e.toLowerCase()===n});return void 0===r?void 0:e[r]}}function kn(e){return An.apply(this,arguments)}function An(){return(An=tn(Wt().m(function e(t){var r,o,s,i;return Wt().w(function(e){for(;;)switch(e.p=e.n){case 0:if(r=parseInt(t,10),isNaN(r)||String(r)!==t.trim()){e.n=1;break}return e.a(2,r);case 1:return e.p=1,e.n=2,n.e(994).then(n.t.bind(n,994,19));case 2:if(o=e.v,s=o.spawnSync,0===(i=s("id",["-u",t],{encoding:"utf8",timeout:3e3})).status&&i.stdout){e.n=3;break}return e.a(2,null);case 3:return e.a(2,parseInt(i.stdout.trim(),10));case 4:return e.p=4,e.v,e.a(2,null)}},e,null,[[1,4]])}))).apply(this,arguments)}function Pn(e){return Cn.apply(this,arguments)}function Cn(){return(Cn=tn(Wt().m(function e(t){var r,o,s,i,a;return Wt().w(function(e){for(;;)switch(e.p=e.n){case 0:if(r=parseInt(t,10),isNaN(r)||String(r)!==t.trim()){e.n=1;break}return e.a(2,r);case 1:return e.p=1,e.n=2,n.e(994).then(n.t.bind(n,994,19));case 2:if(o=e.v,s=o.spawnSync,0===(i=s("getent",["group",t],{encoding:"utf8",timeout:3e3})).status&&i.stdout){e.n=3;break}return e.a(2,null);case 3:return a=i.stdout.trim().split(":"),e.a(2,a.length>=3?parseInt(a[2],10):null);case 4:return e.p=4,e.v,e.a(2,null)}},e,null,[[1,4]])}))).apply(this,arguments)}var Nn="/opt/appmesh/ssl/ca.pem";function jn(e){return"string"!=typeof e||e.includes("-----BEGIN")?e:mn.readFileSync(e)}function Dn(e){if(!1===e)return{rejectUnauthorized:!1};if(!e)return mn.existsSync(Nn)?{ca:mn.readFileSync(Nn),rejectUnauthorized:!0}:{rejectUnauthorized:!0};for(var t=Qt({},e),n=0,r=["ca","cert","key"];n<r.length;n++){var o=r[n];t[o]&&(t[o]=jn(t[o]))}return"boolean"!=typeof t.rejectUnauthorized&&(t.rejectUnauthorized=!0),t}var Un=function(){function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wn.isNode?"https://127.0.0.1:6060":window.location.origin,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;an(this,e),this.baseURL=r,this.forwardingHost=null,this._token=null,this._refreshToken=null,this._tokenExpireSeconds=null,this._tokenTimes=null,this._jitterSeed=Math.random().toString(36).slice(2),this._sessionEpoch=0,this._autoRefreshEnabled=!1,this._autoRefreshJwt=null,this._useRefreshToken=s,this._refreshTimer=null,this._refreshFailures=0,this._renewChain=null;var i={baseURL:r,timeout:3e5,validateStatus:function(e){return!0}};this._sslConfig=o,this._client=Jt.create(i),wn.isNode&&!yn&&(yn=Promise.all([n.e(453).then(n.t.bind(n,453,19)),n.e(603).then(n.t.bind(n,603,19))]).then(function(e){var t=Vt(e,2),n=t[0],r=t[1];dn=n.default||n,mn=r.default||r}).catch(function(){})),this._client.interceptors.request.use(function(e){return e.headers=Qt(Qt({},e.headers),t._commonHeaders()),e},function(e){var t=new bn("Request configuration error: "+(e.message||"Unknown error"));return Promise.reject(t)}),this._client.interceptors.response.use(function(e){return e},function(e){var t,n,r,o,s=new bn("Request failed: "+(e.message||"Unknown error"),null!==(t=null===(n=e.response)||void 0===n?void 0:n.status)&&void 0!==t?t:null,null!==(r=null===(o=e.response)||void 0===o?void 0:o.data)&&void 0!==r?r:null);return s.cause=e,Promise.reject(s)})}return on(e,[{key:"login",value:(G=tn(Wt().m(function e(t,n){var r,o,s,i,a,u,c=arguments;return Wt().w(function(e){for(;;)switch(e.n){case 0:if(r=c.length>2&&void 0!==c[2]?c[2]:null,o=c.length>3&&void 0!==c[3]?c[3]:_n.DEFAULT_TOKEN_EXPIRE_SECONDS,s=c.length>4&&void 0!==c[4]?c[4]:_n.DEFAULT_JWT_AUDIENCE,t&&n){e.n=1;break}throw new bn("Username and password are required",400,null,"INVALID_CREDENTIALS");case 1:return i=gn.encode("".concat(t,":").concat(n)),a=Zt(Zt({},_n.HTTP_HEADER_KEY_AUTH,"Basic ".concat(i)),"X-Set-Cookie","true"),this._wantRefreshToken()&&(a["X-Refresh-Token-Request"]="true"),r&&(a["X-Totp-Code"]=r),o&&(a["X-Expire-Seconds"]=Tn(o)),s&&(a["X-Audience"]=s),e.n=2,this._request("post","/appmesh/login",null,{headers:a});case 2:u=e.v,this._captureRefreshToken(u),this._tokenExpireSeconds=o?Tn(o):null;case 3:return e.a(2)}},e,this)})),function(e,t){return G.apply(this,arguments)})},{key:"authenticate",value:(V=tn(Wt().m(function e(t){var n,r,o,s,i,a,u=arguments;return Wt().w(function(e){for(;;)switch(e.n){case 0:return n=u.length>1&&void 0!==u[1]?u[1]:null,r=u.length>2&&void 0!==u[2]?u[2]:_n.DEFAULT_JWT_AUDIENCE,o=!(u.length>3&&void 0!==u[3])||u[3],s={Authorization:"Bearer ".concat(t)},n&&(s["X-Permission"]=n),r&&(s["X-Audience"]=r),o&&(s["X-Set-Cookie"]="true"),e.n=1,this._request("post","/appmesh/auth",null,{headers:s});case 1:return i=e.v,o&&this._captureRefreshToken(i),a="string"==typeof i.data?i.data:JSON.stringify(i.data),e.a(2,{success:!0,responseText:a})}},e,this)})),function(e){return V.apply(this,arguments)})},{key:"set_token",value:function(e){wn.isNode?this._handleTokenUpdate(e):console.warn("set_token() is not supported in browser mode (auth cookie is HttpOnly). Use authenticate() instead.")}},{key:"_getAccessToken",value:function(){return this._token||null}},{key:"_handleTokenUpdate",value:function(e){var t="appmesh_auth_token";if(this._token=e||null,wn.isNode&&this._token){var n=(this._client.defaults.headers.Cookie||"").split("; ").filter(function(e){return e&&!e.startsWith(t+"=")});n.push("".concat(t,"=").concat(this._token)),this._client.defaults.headers.Cookie=n.join("; ")}this._autoRefreshJwt=this._token,this._autoRefreshEnabled&&this._scheduleTokenRefresh()}},{key:"_captureRefreshToken",value:function(e){if((arguments.length>1&&void 0!==arguments[1]?arguments[1]:this._sessionEpoch)===this._sessionEpoch){var t=e&&e.data;if("string"==typeof t)try{t=JSON.parse(t)}catch(e){return}t&&("string"==typeof t.refresh_token&&t.refresh_token&&(this._refreshToken=t.refresh_token),Number.isFinite(t.expire_time)&&Number.isFinite(t.issued_at)&&(this._tokenTimes={exp:t.expire_time,iat:t.issued_at}))}}},{key:"logout",value:($=tn(Wt().m(function e(){var t,n;return Wt().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,t=this._refreshToken?{"X-Refresh-Token":this._refreshToken}:{},e.n=1,this._request("post","/appmesh/self/logoff",null,{headers:t});case 1:e.n=3;break;case 2:e.p=2,n=e.v,console.error("Failed to logoff:",n.message);case 3:return e.p=3,wn.isNode&&this._client.defaults.httpsAgent&&this._client.defaults.httpsAgent.destroy(),this._stopAutoRefresh(),this._sessionEpoch++,this._token=null,this._refreshToken=null,this._tokenTimes=null,wn.isNode&&(this._client.defaults.headers.Cookie=null),e.f(3);case 4:return e.a(2)}},e,this,[[0,2,3,4]])})),function(){return $.apply(this,arguments)})},{key:"set_auto_refresh_token",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this._stopAutoRefresh(),this._autoRefreshEnabled=e,e&&(this._autoRefreshJwt=t||this._getAccessToken()||null,this._scheduleTokenRefresh())}},{key:"set_use_refresh_token",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this._useRefreshToken=e}},{key:"_wantRefreshToken",value:function(){return"boolean"==typeof this._useRefreshToken?this._useRefreshToken:wn.isNode&&this._autoRefreshEnabled}},{key:"_stopAutoRefresh",value:function(){this._autoRefreshEnabled=!1,this._refreshFailures=0,this._refreshTimer&&(clearTimeout(this._refreshTimer),this._refreshTimer=null)}},{key:"_computeRefreshPlan",value:function(){var t=_n.TOKEN_REFRESH_POLL_SECONDS,n=this._autoRefreshJwt||this._getAccessToken(),r=n?function(e){try{var t=e.split(".");if(3!==t.length)return null;var n=JSON.parse(gn.decode(t[1].replace(/-/g,"+").replace(/_/g,"/")));return"number"!=typeof n.exp?null:{exp:n.exp,iat:"number"==typeof n.iat?n.iat:0}}catch(e){return null}}(n):null,o=this._tokenTimes&&(!r||this._tokenTimes.exp>r.exp)?this._tokenTimes:r;if(!n&&!o)return this._refreshToken?{delaySec:1,due:!0}:{delaySec:t,due:!1};if(!o)return{delaySec:t,due:!0};var s=Date.now()/1e3;if(o.exp<=s)return{delaySec:t,due:!0};var i=n||"".concat(this._jitterSeed,".").concat(o.iat,".").concat(o.exp),a=o.exp-e._refreshMargin(i,o.exp,o.iat)-s;return a<=0?{delaySec:1,due:!0}:a>t?{delaySec:t,due:!1}:{delaySec:a,due:!0}}},{key:"_scheduleTokenRefresh",value:function(){var t=this;if(this._autoRefreshEnabled){this._refreshTimer&&(clearTimeout(this._refreshTimer),this._refreshTimer=null);var n=this._computeRefreshPlan(),r=n.delaySec,o=n.due;this._refreshFailures>0&&(r=e._refreshRetryDelay(this._refreshFailures),o=!0),this._refreshTimer=setTimeout(tn(Wt().m(function e(){var n;return Wt().w(function(e){for(;;)switch(e.p=e.n){case 0:if(t._refreshTimer=null,t._autoRefreshEnabled){e.n=1;break}return e.a(2);case 1:if(!o){e.n=5;break}return e.p=2,e.n=3,t.renew_token();case 3:t._refreshFailures>0&&console.info("Auto-refresh: token renewal recovered after ".concat(t._refreshFailures," failure(s)")),t._refreshFailures=0,e.n=5;break;case 4:e.p=4,n=e.v,t._refreshFailures++,1!==t._refreshFailures&&t._refreshFailures%_n.TOKEN_REFRESH_LOG_EVERY!==0||console.warn("Auto-refresh: token renewal failed (attempt ".concat(t._refreshFailures,"):"),n.message);case 5:t._scheduleTokenRefresh();case 6:return e.a(2)}},e,null,[[2,4]])})),1e3*r),this._refreshTimer.unref&&this._refreshTimer.unref()}}},{key:"renew_token",value:(W=tn(Wt().m(function e(){var t,n,r=this,o=arguments;return Wt().w(function(e){for(;;)if(0===e.n)return t=o.length>0&&void 0!==o[0]?o[0]:null,n=(this._renewChain||Promise.resolve()).then(function(){return r._renewTokenOnce(t)}),this._renewChain=n.catch(function(){}),e.a(2,n)},e,this)})),function(){return W.apply(this,arguments)})},{key:"_renewTokenOnce",value:(J=tn(Wt().m(function e(t){var n,r,o,s;return Wt().w(function(e){for(;;)switch(e.p=e.n){case 0:return n=t??this._tokenExpireSeconds,r={},this._wantRefreshToken()&&(r["X-Refresh-Token-Request"]="true"),null!=n&&(r["X-Expire-Seconds"]=Tn(n)),this._refreshToken&&(r["X-Refresh-Token"]=this._refreshToken),e.p=1,e.n=2,this._request("post","/appmesh/token/renew",null,{headers:r});case 2:o=e.v,e.n=4;break;case 3:throw e.p=3,(s=e.v)&&401===s.statusCode&&(this._refreshToken=null),s;case 4:this._captureRefreshToken(o);case 5:return e.a(2)}},e,this,[[1,3]])})),function(e){return J.apply(this,arguments)})},{key:"get_totp_uri",value:(K=tn(Wt().m(function e(){var t;return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("post","/appmesh/totp/secret");case 1:return t=e.v,e.a(2,gn.decode(t.data.mfa_uri))}},e,this)})),function(){return K.apply(this,arguments)})},{key:"enable_totp",value:(X=tn(Wt().m(function e(t){var n;return Wt().w(function(e){for(;;)switch(e.n){case 0:return n={"X-Totp-Code":t},e.n=1,this._request("post","/appmesh/totp/setup",null,{headers:n});case 1:return e.a(2)}},e,this)})),function(e){return X.apply(this,arguments)})},{key:"validate_totp",value:(z=tn(Wt().m(function e(t,n,r){var o,s,i,a,u=arguments;return Wt().w(function(e){for(;;)switch(e.n){case 0:return o=u.length>3&&void 0!==u[3]?u[3]:_n.DEFAULT_TOKEN_EXPIRE_SECONDS,s={user_name:t,totp_code:r,totp_challenge:n,expire_seconds:Tn(o)},i={"X-Set-Cookie":"true"},this._wantRefreshToken()&&(i["X-Refresh-Token-Request"]="true"),e.n=1,this._request("post","/appmesh/totp/validate",s,{headers:i});case 1:a=e.v,this._captureRefreshToken(a),this._tokenExpireSeconds=o?Tn(o):null;case 2:return e.a(2)}},e,this)})),function(e,t,n){return z.apply(this,arguments)})},{key:"disable_totp",value:(M=tn(Wt().m(function e(){var t,n=arguments;return Wt().w(function(e){for(;;)switch(e.n){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:"self",e.n=1,this._request("post","/appmesh/totp/".concat(t,"/disable"));case 1:return e.a(2,!0)}},e,this)})),function(){return M.apply(this,arguments)})},{key:"list_apps",value:(H=tn(Wt().m(function e(){var t;return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("get","/appmesh/applications");case 1:return t=e.v,e.a(2,t.data)}},e,this)})),function(){return H.apply(this,arguments)})},{key:"get_app",value:(B=tn(Wt().m(function e(t){var n;return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("get","/appmesh/app/".concat(t));case 1:return n=e.v,e.a(2,n.data)}},e,this)})),function(e){return B.apply(this,arguments)})},{key:"check_app_health",value:(q=tn(Wt().m(function e(t){var n,r;return Wt().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this._request("get","/appmesh/app/".concat(t,"/health"));case 1:return n=e.v,e.a(2,0===parseInt(n.data,10));case 2:if(e.p=2,null==(r=e.v).statusCode){e.n=3;break}return e.a(2,!1);case 3:throw r;case 4:return e.a(2)}},e,this,[[0,2]])})),function(e){return q.apply(this,arguments)})},{key:"add_app",value:(I=tn(Wt().m(function e(t,n){var r;return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("put","/appmesh/app/".concat(t),n);case 1:return r=e.v,e.a(2,r.data)}},e,this)})),function(e,t){return I.apply(this,arguments)})},{key:"delete_app",value:(L=tn(Wt().m(function e(t){var n,r;return Wt().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this._request("delete","/appmesh/app/".concat(t));case 1:return n=e.v,e.a(2,200===n.status);case 2:if(e.p=2,404!==(r=e.v).statusCode){e.n=3;break}return e.a(2,!1);case 3:throw r;case 4:return e.a(2)}},e,this,[[0,2]])})),function(e){return L.apply(this,arguments)})},{key:"enable_app",value:(F=tn(Wt().m(function e(t){return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("post","/appmesh/app/".concat(t,"/enable"));case 1:return e.a(2,!0)}},e,this)})),function(e){return F.apply(this,arguments)})},{key:"disable_app",value:(x=tn(Wt().m(function e(t){return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("post","/appmesh/app/".concat(t,"/disable"));case 1:return e.a(2,!0)}},e,this)})),function(e){return x.apply(this,arguments)})},{key:"get_app_output",value:(U=tn(Wt().m(function e(t){var n,r,o,s,i,a,u,c,l,f,h=arguments;return Wt().w(function(e){for(;;)switch(e.n){case 0:return n=h.length>2&&void 0!==h[2]?h[2]:0,r=h.length>3&&void 0!==h[3]?h[3]:10240,o=h.length>4&&void 0!==h[4]?h[4]:"",s=h.length>5&&void 0!==h[5]?h[5]:0,i={stdout_position:(h.length>1&&void 0!==h[1]?h[1]:0).toString(),stdout_index:n.toString(),stdout_maxsize:r.toString(),process_uuid:o,timeout:Tn(s).toString()},e.n=1,this._request("get","/appmesh/app/".concat(t,"/output"),null,{params:i});case 1:return a=e.v,u=Sn(a.headers,"X-Output-Position"),c=Sn(a.headers,"X-Exit-Code"),l=u?parseInt(u,10):null,f=c?parseInt(c,10):null,e.a(2,new xn(a.status,a.data,l,f))}},e,this)})),function(e){return U.apply(this,arguments)})},{key:"run_app_sync",value:(D=tn(Wt().m(function e(t){var n,r,o,s,i,a,u,c=arguments;return Wt().w(function(e){for(;;)switch(e.n){case 0:return n=c.length>1&&void 0!==c[1]?c[1]:Rn,r=c.length>2&&void 0!==c[2]?c[2]:_n.DEFAULT_RUN_APP_TIMEOUT_SECONDS,o=c.length>3&&void 0!==c[3]?c[3]:_n.DEFAULT_RUN_APP_LIFECYCLE_SECONDS,s={timeout:Tn(r),lifecycle:Tn(o)},e.n=1,this._request("post","/appmesh/app/syncrun",t,{params:s});case 1:return i=e.v,a=null,200===i.status?(n&&n(i.data,0),(u=Sn(i.headers,"X-Exit-Code"))&&(a=parseInt(u,10))):n&&n(i.data,0),e.a(2,a)}},e,this)})),function(e){return D.apply(this,arguments)})},{key:"run_app_async",value:(j=tn(Wt().m(function e(t){var n,r,o,s,i=arguments;return Wt().w(function(e){for(;;)switch(e.n){case 0:return n=i.length>1&&void 0!==i[1]?i[1]:_n.DEFAULT_RUN_APP_TIMEOUT_SECONDS,r=i.length>2&&void 0!==i[2]?i[2]:_n.DEFAULT_RUN_APP_LIFECYCLE_SECONDS,o={timeout:Tn(n),lifecycle:Tn(r)},e.n=1,this._request("post","/appmesh/app/run",t,{params:o});case 1:return s=e.v,e.a(2,new Fn(this,s.data.name,s.data.process_uuid))}},e,this)})),function(e){return j.apply(this,arguments)})},{key:"wait_for_async_run",value:(N=tn(Wt().m(function e(t){var n,r,o,s,i,a,u=arguments;return Wt().w(function(e){for(;;)switch(e.n){case 0:if(n=u.length>1&&void 0!==u[1]?u[1]:Rn,r=u.length>2&&void 0!==u[2]?u[2]:0,!t){e.n=7;break}o=0,s=new Date,i=1;case 1:if(!(t.procUid.length>0)){e.n=7;break}return e.n=2,this.get_app_output(t.appName,o,0,20480,t.procUid,i);case 2:if((a=e.v).output&&n&&n(a.output,o),null!==a.outPosition&&(o=a.outPosition),null===a.exitCode){e.n=4;break}return e.n=3,this.delete_app(t.appName);case 3:return e.a(2,a.exitCode);case 4:if(!(r>0&&(new Date-s)/1e3>r)){e.n=5;break}return e.a(3,7);case 5:return e.n=6,new Promise(function(e){return setTimeout(e,100)});case 6:e.n=1;break;case 7:return e.a(2,null)}},e,this)})),function(e){return N.apply(this,arguments)})},{key:"run_task",value:(C=tn(Wt().m(function e(t,n){var r,o,s=arguments;return Wt().w(function(e){for(;;)switch(e.n){case 0:return(r=s.length>2&&void 0!==s[2]?s[2]:300)<=0&&(r=300),e.n=1,this._request("post","/appmesh/app/".concat(t,"/task"),n,{params:{timeout:r.toString()}});case 1:return o=e.v,e.a(2,o.data)}},e,this)})),function(e,t){return C.apply(this,arguments)})},{key:"cancel_task",value:(P=tn(Wt().m(function e(t){return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("delete","/appmesh/app/".concat(t,"/task"));case 1:return e.a(2,!0)}},e,this)})),function(e){return P.apply(this,arguments)})},{key:"download_file",value:(A=tn(Wt().m(function e(t){var r,o,s,i,a,u,c,l,f,h,p,d,m,y,_,w,g=arguments;return Wt().w(function(e){for(;;)switch(e.p=e.n){case 0:return o=!(g.length>2&&void 0!==g[2])||g[2],(r=g.length>1&&void 0!==g[1]?g[1]:null)||(r=t.split(/[\\/]/).pop()),s=Zt({},_n.HTTP_HEADER_KEY_X_FILE_PATH,encodeURIComponent(t)),e.n=1,this._request("get","/appmesh/file/download",null,{headers:s,config:{responseType:"arraybuffer"}});case 1:if(200===(i=e.v).status){e.n=2;break}throw new bn("Failed to download file: ".concat(t),i.status,i.data);case 2:if(!wn.isNode){e.n=15;break}return e.n=3,n.e(840).then(n.t.bind(n,840,19));case 3:return a=e.v,e.p=4,e.n=5,a.writeFile(r,Buffer.from(i.data));case 5:if(!o||"win32"===process.platform){e.n=12;break}if(u=i.headers,e.p=6,!(c=u["x-file-mode"])){e.n=7;break}return e.n=7,a.chmod(r,parseInt(c,10));case 7:if(l=u["x-file-user"],f=u["x-file-group"],!l||!f){e.n=10;break}return e.n=8,kn(l);case 8:return h=e.v,e.n=9,Pn(f);case 9:if(p=e.v,null===h||null===p){e.n=10;break}return e.n=10,a.chown(r,h,p);case 10:e.n=12;break;case 11:e.p=11,_=e.v,console.warn("Warning: Unable to apply file attributes to",r,_.message);case 12:e.n=14;break;case 13:throw e.p=13,w=e.v,new bn("Failed to write file to ".concat(r,": ").concat(w.message),i.status);case 14:e.n=16;break;case 15:d=new Blob([i.data]),m=window.URL.createObjectURL(d),(y=document.createElement("a")).style.display="none",y.href=m,y.download=r.split("/").pop(),document.body.appendChild(y),y.click(),window.URL.revokeObjectURL(m),document.body.removeChild(y);case 16:return e.a(2)}},e,this,[[6,11],[4,13]])})),function(e){return A.apply(this,arguments)})},{key:"upload_file",value:(k=tn(Wt().m(function e(t){var r,o,s,i,a,u,c,l,f,h,p=arguments;return Wt().w(function(e){for(;;)switch(e.n){case 0:if(o=!(p.length>2&&void 0!==p[2])||p[2],(r=p.length>1&&void 0!==p[1]?p[1]:null)||(r=t.split(/[\\/]/).pop()),s=Zt({},_n.HTTP_HEADER_KEY_X_FILE_PATH,encodeURIComponent(r)),!wn.isNode){e.n=3;break}return e.n=1,n.e(894).then(n.t.bind(n,894,19));case 1:return a=e.v.default,e.n=2,n.e(603).then(n.t.bind(n,603,19));case 2:u=e.v,i=new a,c=r.split("/").pop(),i.append("filename",c),(l=u.statSync(t)).size<10485760?(f=u.readFileSync(t),i.append("file",f,{filename:t.split("/").pop()})):i.append("file",u.createReadStream(t)),o&&(s["X-File-Mode"]=(511&l.mode).toString()),Object.assign(s,i.getHeaders()),e.n=7;break;case 3:if(i=new FormData,!(t instanceof File)){e.n=4;break}h=t.name,e.n=6;break;case 4:if(!(t instanceof Blob)){e.n=5;break}h=r.split("/").pop(),e.n=6;break;case 5:throw new bn("In browser, localFile must be File or Blob");case 6:i.append("filename",h),i.append("file",t);case 7:return e.n=8,this._request("post","/appmesh/file/upload",i,{headers:s,config:{maxBodyLength:1/0,maxContentLength:1/0}});case 8:return e.a(2)}},e,this)})),function(e){return k.apply(this,arguments)})},{key:"get_host_resources",value:(S=tn(Wt().m(function e(){var t;return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("get","/appmesh/resources");case 1:return t=e.v,e.a(2,t.data)}},e,this)})),function(){return S.apply(this,arguments)})},{key:"get_config",value:(T=tn(Wt().m(function e(){var t;return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("get","/appmesh/config");case 1:return t=e.v,e.a(2,t.data)}},e,this)})),function(){return T.apply(this,arguments)})},{key:"set_config",value:(R=tn(Wt().m(function e(t){var n;return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("post","/appmesh/config",t);case 1:return n=e.v,e.a(2,n.data)}},e,this)})),function(e){return R.apply(this,arguments)})},{key:"set_log_level",value:(O=tn(Wt().m(function e(){var t,n,r=arguments;return Wt().w(function(e){for(;;)switch(e.n){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:"DEBUG",e.n=1,this.set_config({BaseConfig:{LogLevel:t}});case 1:return n=e.v,e.a(2,n.BaseConfig.LogLevel)}},e,this)})),function(){return O.apply(this,arguments)})},{key:"add_label",value:(E=tn(Wt().m(function e(t,n){return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("put","/appmesh/label/".concat(t),null,{params:{value:n}});case 1:return e.a(2,!0)}},e,this)})),function(e,t){return E.apply(this,arguments)})},{key:"delete_label",value:(v=tn(Wt().m(function e(t){return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("delete","/appmesh/label/".concat(t));case 1:return e.a(2,!0)}},e,this)})),function(e){return v.apply(this,arguments)})},{key:"list_labels",value:(b=tn(Wt().m(function e(){var t;return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("get","/appmesh/labels");case 1:return t=e.v,e.a(2,t.data)}},e,this)})),function(){return b.apply(this,arguments)})},{key:"update_password",value:(g=tn(Wt().m(function e(t,n){var r,o,s=arguments;return Wt().w(function(e){for(;;)switch(e.n){case 0:return r=s.length>2&&void 0!==s[2]?s[2]:"self",o={old_password:gn.encode(t),new_password:gn.encode(n)},e.n=1,this._request("post","/appmesh/user/".concat(r,"/passwd"),o);case 1:return e.a(2,!0)}},e,this)})),function(e,t){return g.apply(this,arguments)})},{key:"add_user",value:(w=tn(Wt().m(function e(t,n){return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("put","/appmesh/user/".concat(t),n);case 1:return e.a(2,!0)}},e,this)})),function(e,t){return w.apply(this,arguments)})},{key:"delete_user",value:(_=tn(Wt().m(function e(t){return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("delete","/appmesh/user/".concat(t));case 1:return e.a(2,!0)}},e,this)})),function(e){return _.apply(this,arguments)})},{key:"lock_user",value:(y=tn(Wt().m(function e(t){return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("post","/appmesh/user/".concat(t,"/lock"));case 1:return e.a(2,!0)}},e,this)})),function(e){return y.apply(this,arguments)})},{key:"unlock_user",value:(m=tn(Wt().m(function e(t){return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("post","/appmesh/user/".concat(t,"/unlock"));case 1:return e.a(2,!0)}},e,this)})),function(e){return m.apply(this,arguments)})},{key:"list_users",value:(d=tn(Wt().m(function e(){var t;return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("get","/appmesh/users");case 1:return t=e.v,e.a(2,t.data)}},e,this)})),function(){return d.apply(this,arguments)})},{key:"get_current_user",value:(p=tn(Wt().m(function e(){var t;return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("get","/appmesh/user/self");case 1:return t=e.v,e.a(2,t.data)}},e,this)})),function(){return p.apply(this,arguments)})},{key:"list_groups",value:(h=tn(Wt().m(function e(){var t;return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("get","/appmesh/user/groups");case 1:return t=e.v,e.a(2,t.data)}},e,this)})),function(){return h.apply(this,arguments)})},{key:"list_permissions",value:(f=tn(Wt().m(function e(){var t;return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("get","/appmesh/permissions");case 1:return t=e.v,e.a(2,t.data)}},e,this)})),function(){return f.apply(this,arguments)})},{key:"get_user_permissions",value:(l=tn(Wt().m(function e(){var t;return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("get","/appmesh/user/permissions");case 1:return t=e.v,e.a(2,t.data)}},e,this)})),function(){return l.apply(this,arguments)})},{key:"list_roles",value:(c=tn(Wt().m(function e(){var t;return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("get","/appmesh/roles");case 1:return t=e.v,e.a(2,t.data)}},e,this)})),function(){return c.apply(this,arguments)})},{key:"update_role",value:(u=tn(Wt().m(function e(t,n){return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("post","/appmesh/role/".concat(t),n);case 1:return e.a(2,!0)}},e,this)})),function(e,t){return u.apply(this,arguments)})},{key:"delete_role",value:(a=tn(Wt().m(function e(t){return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("delete","/appmesh/role/".concat(t));case 1:return e.a(2,!0)}},e,this)})),function(e){return a.apply(this,arguments)})},{key:"get_metrics",value:(i=tn(Wt().m(function e(){var t;return Wt().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("get","/appmesh/metrics",null,{config:{responseType:"text"}});case 1:return t=e.v,e.a(2,t.data)}},e,this)})),function(){return i.apply(this,arguments)})},{key:"subscribe",value:(s=tn(Wt().m(function e(){return Wt().w(function(e){for(;;)switch(e.n){case 0:throw new bn("subscribe requires the TCP client (AppMeshClientTCP, imported from 'appmesh/tcp'); the HTTP client does not support event subscriptions");case 1:return e.a(2)}},e)})),function(){return s.apply(this,arguments)})},{key:"unsubscribe",value:(o=tn(Wt().m(function e(){return Wt().w(function(e){for(;;)switch(e.n){case 0:throw new bn("unsubscribe requires the TCP client (AppMeshClientTCP, imported from 'appmesh/tcp'); the HTTP client does not support event subscriptions");case 1:return e.a(2)}},e)})),function(){return o.apply(this,arguments)})},{key:"request",value:(r=tn(Wt().m(function e(t,n){var r,o,s=arguments;return Wt().w(function(e){for(;;)if(0===e.n)return r=s.length>2&&void 0!==s[2]?s[2]:null,o=s.length>3&&void 0!==s[3]?s[3]:{},e.a(2,this._request(t,n,r,o))},e,this)})),function(e,t){return r.apply(this,arguments)})},{key:"_commonHeaders",value:function(){var e={};if(wn.isNode&&(e[_n.HTTP_USER_AGENT_HEADER_NAME]=_n.HTTP_USER_AGENT),this.forwardingHost)if(this.forwardingHost.includes(":"))e[_n.HTTP_HEADER_KEY_X_TARGET_HOST]=this.forwardingHost;else{var t=new URL(this.baseURL),n="https:"===t.protocol?"443":"80",r=t.port||n;e[_n.HTTP_HEADER_KEY_X_TARGET_HOST]="".concat(this.forwardingHost,":").concat(r)}return e}},{key:"_request",value:(t=tn(Wt().m(function e(t,n){var r,o,s,i,a,u,c,l,f,h,p,d,m,y,_=arguments;return Wt().w(function(e){for(;;)switch(e.p=e.n){case 0:if(r=_.length>2&&void 0!==_[2]?_[2]:null,o=_.length>3&&void 0!==_[3]?_[3]:{},!wn.isNode||!yn||this._client.defaults.httpsAgent){e.n=2;break}return e.n=1,yn;case 1:dn&&(this._client.defaults.httpsAgent=new dn.Agent(Qt(Qt({},Dn(this._sslConfig)),{},{keepAlive:!0,keepAliveMsecs:3e3})));case 2:return s=o.headers,i=void 0===s?{}:s,a=o.params,u=void 0===a?{}:a,c=o.config,l=void 0===c?{}:c,e.p=3,f=Qt(Qt({method:t,url:n,withCredentials:!0},l),{},{headers:Qt({},i),params:Qt({},u)}),null!==r&&(f.data=r),e.n=4,this._client(f);case 4:if(200===(h=e.v).status){e.n=6;break}if(p=this._extractErrorMessage(h.data),h.status!==_n.HTTP_STATUS_PRECONDITION_REQUIRED){e.n=5;break}throw new vn(p,h.data);case 5:throw new bn(p,h.status,h.data);case 6:return wn.isNode&&h.headers["Set-Cookie".toLowerCase()]&&(d=Array.isArray(h.headers["Set-Cookie".toLowerCase()])?h.headers["Set-Cookie".toLowerCase()]:[h.headers["Set-Cookie".toLowerCase()]],this._client.defaults.headers.Cookie=d.join("; "),(m=d.map(function(e){return e.split(";")[0].trim()}).find(function(e){return e.startsWith("appmesh_auth_token=")}))&&this._handleTokenUpdate(m.substring(19))),e.a(2,h);case 7:if(e.p=7,!((y=e.v)instanceof bn&&y.statusCode===_n.HTTP_STATUS_PRECONDITION_REQUIRED)){e.n=8;break}throw y;case 8:throw this.onError(y);case 9:return e.a(2)}},e,this,[[3,7]])})),function(e,n){return t.apply(this,arguments)})},{key:"_extractErrorMessage",value:function(e){if(!e)return"Unknown error";if(e instanceof ArrayBuffer)try{var t=new TextDecoder("utf-8").decode(e);try{var n=JSON.parse(t);return n.message||n.error||"Binary response error"}catch(e){return t}}catch(e){return"Binary response error (could not decode)"}if("string"==typeof e)try{var r=JSON.parse(e);return r.message||r.error||e}catch(t){return e}return"object"===nn(e)?e.message||e.error||JSON.stringify(e):String(e)}},{key:"onError",value:function(e){return console.log("AppMeshClient error:",e),e instanceof bn?e:new bn(e.message||"Unknown error")}}],[{key:"_refreshMargin",value:function(e,t,n){var r=n>0&&t>n?t-n:t-Date.now()/1e3,o=Math.max(r*(1-_n.TOKEN_REFRESH_LIFETIME_RATIO),_n.TOKEN_REFRESH_OFFSET_SECONDS),s=o*_n.TOKEN_REFRESH_JITTER_RATIO;return o+=(function(e){for(var t=2166136261,n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}(e)%2001/1e3-1)*s,r>0?Math.min(o,r/2):o}},{key:"_refreshRetryDelay",value:function(e){var t=Math.min(Math.max(e-1,0),16);return Math.min(_n.TOKEN_REFRESH_RETRY_BASE_SECONDS*Math.pow(2,t),_n.TOKEN_REFRESH_RETRY_MAX_SECONDS)}}]);var t,r,o,s,i,a,u,c,l,f,h,p,d,m,y,_,w,g,b,v,E,O,R,T,S,k,A,P,C,N,j,D,U,x,F,L,I,q,B,H,M,z,X,K,J,W,$,V,G}(),xn=on(function e(t,n,r,o){an(this,e),this.statusCode=Number(t),this.output=String(n),this.outPosition=null!==r?Number(r):null,this.exitCode=null!==o?Number(o):null}),Fn=function(){return on(function e(t,n,r){an(this,e),this.appName=n,this.procUid=r,this._client=t,this._forwardingHost=t.forwardingHost},[{key:"with_forwarding_host",value:(t=tn(Wt().m(function e(t){var n;return Wt().w(function(e){for(;;)switch(e.p=e.n){case 0:return n=this._client.forwardingHost,this._client.forwardingHost=this._forwardingHost,e.p=1,e.n=2,t();case 2:return e.a(2,e.v);case 3:return e.p=3,this._client.forwardingHost=n,e.f(3);case 4:return e.a(2)}},e,this,[[1,,3,4]])})),function(e){return t.apply(this,arguments)})},{key:"wait",value:(e=tn(Wt().m(function e(){var t,n,r=this,o=arguments;return Wt().w(function(e){for(;;)if(0===e.n)return t=o.length>0&&void 0!==o[0]?o[0]:Rn,n=o.length>1&&void 0!==o[1]?o[1]:0,e.a(2,this.with_forwarding_host(function(){return r._client.wait_for_async_run(r,t,n)}))},e,this)})),function(){return e.apply(this,arguments)})}]);var e,t}();const Ln=Un;export{Un as AppMeshClient,bn as AppMeshError,xn as AppOutput,En as AppRemovedError,Fn as AppRun,Nn as DEFAULT_CA_FILE,vn as TotpRequiredError,On as TransportDisconnectedError,Ln as default};
|
|
1
|
+
var e={};const t={};function n(r){const o=t[r];if(void 0!==o)return o.exports;const i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.m=e,(()=>{const e=Object.getPrototypeOf;let t;n.t=function(r,o){if(1&o&&(r=this(r)),8&o)return r;if("object"==typeof r&&r){if(4&o&&r.__esModule)return r;if(16&o&&"function"==typeof r.then)return r}const i=Object.create(null);n.r(i);const s={};t=t||[null,e({}),e([]),e(e)];for(var a=2&o&&r;("object"==typeof a||"function"==typeof a)&&!~t.indexOf(a);a=e(a))Object.getOwnPropertyNames(a).forEach(e=>s[e]=()=>r[e]);return s.default=()=>r,n.d(i,s),i}})(),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{const e={792:0},t=t=>{let{__webpack_esm_ids__:r,__webpack_esm_modules__:o,__webpack_esm_runtime__:i}=t;var s,a,c=0;for(s in o)n.o(o,s)&&(n.m[s]=o[s]);for(i&&i(n);c<r.length;c++)a=r[c],n.o(e,a)&&e[a]&&e[a][0](),e[a]=0};n.ei=(r,o)=>{let i=[],s=n.o(e,r)?e[r]:void 0;if(0!==s)if(s)i.push(s[1]);else{let n=o().then(t,t=>{throw 0!==e[r]&&(e[r]=void 0),t});n=Promise.race([n,new Promise(t=>s=e[r]=[t])]),i.push(s[1]=n)}return Promise.all(i)}})();var r={};function o(e,t){return function(){return e.apply(t,arguments)}}n.r(r),n.d(r,{hasBrowserEnv:()=>qe,hasStandardBrowserEnv:()=>He,hasStandardBrowserWebWorkerEnv:()=>Me,navigator:()=>Ie,origin:()=>ze});const{toString:i}=Object.prototype,{getPrototypeOf:s}=Object,{iterator:a,toStringTag:c}=Symbol,u=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),l=e=>"string"==typeof e&&("__proto__"===e||"constructor"===e||"prototype"===e),f=(e,t,n)=>e===Object.prototype||!n&&null===t,p=(e,t)=>{let n=e;const r=[];for(;null!=n;){if(-1!==r.indexOf(n))return!1;r.push(n);const o=s(n);if(f(n,o,n===e))return!1;if(u(n,t))return!0;n=o}return!1},d=(h=Object.create(null),e=>{const t=i.call(e);return h[t]||(h[t]=t.slice(8,-1).toLowerCase())});var h;const m=e=>(e=e.toLowerCase(),t=>d(t)===e),y=e=>t=>typeof t===e,{isArray:g}=Array,b=y("undefined");function w(e){return null!==e&&!b(e)&&null!==e.constructor&&!b(e.constructor)&&O(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const v=m("ArrayBuffer");const _=y("string"),O=y("function"),E=y("number"),R=e=>null!==e&&"object"==typeof e,S=e=>{if(!R(e))return!1;const t=s(e);return!(null!==t&&t!==Object.prototype&&null!==s(t)||p(e,c)||p(e,a))},P=m("Date"),T=m("File"),A=m("Blob"),j=m("FileList"),C=m("Set");const k="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{},N=void 0!==k.FormData?k.FormData:void 0,U=m("URLSearchParams"),[x,D,L,F]=["ReadableStream","Request","Response","Headers"].map(m);function B(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),g(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(w(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(r=0;r<i;r++)s=o[r],t.call(null,e[s],s,e)}}function q(e,t){if(w(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const I="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:n.g,H=e=>!b(e)&&e!==I;const M=(z="undefined"!=typeof Uint8Array&&s(Uint8Array),e=>z&&e instanceof z);var z;const $=m("HTMLFormElement"),{propertyIsEnumerable:W}=Object.prototype,J=m("RegExp"),K=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};B(n,(n,o)=>{let i;!1!==(i=t(n,o,e))&&(r[o]=i||n)}),Object.defineProperties(e,r)};const X=m("AsyncFunction"),V=(G="function"==typeof setImmediate,Y=O(I.postMessage),G?setImmediate:Y?(Q=`axios@${Math.random()}`,Z=[],I.addEventListener("message",({source:e,data:t})=>{e===I&&t===Q&&Z.length&&Z.shift()()},!1),e=>{Z.push(e),I.postMessage(Q,"*")}):e=>setTimeout(e));var G,Y,Q,Z;const ee="undefined"!=typeof queueMicrotask?queueMicrotask.bind(I):"undefined"!=typeof process&&process.nextTick||V,te=e=>null!=e&&O(e[a]),ne={isArray:g,isArrayBuffer:v,isBuffer:w,isFormData:e=>{if(!e)return!1;if(N&&e instanceof N)return!0;const t=s(e);if(!t||t===Object.prototype)return!1;if(!O(e.append))return!1;const n=d(e);return"formdata"===n||"object"===n&&O(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&v(e.buffer),t},isString:_,isNumber:E,isBoolean:e=>!0===e||!1===e,isObject:R,isPlainObject:S,isEmptyObject:e=>{if(!R(e)||w(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:x,isRequest:D,isResponse:L,isHeaders:F,isUndefined:b,isDate:P,isFile:T,isReactNativeBlob:e=>!(!e||void 0===e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:A,isRegExp:J,isFunction:O,isStream:e=>R(e)&&O(e.pipe),isURLSearchParams:U,isTypedArray:M,isFileList:j,forEach:B,merge:function e(...t){const{caseless:n,skipUndefined:r}=H(this)&&this||{},o={},i=(t,i)=>{if("__proto__"===i||"constructor"===i||"prototype"===i)return;const s=n&&"string"==typeof i&&q(o,i)||i,a=u(o,s)?o[s]:void 0;S(a)&&S(t)?o[s]=e(a,t):S(t)?o[s]=e({},t):g(t)?o[s]=t.slice():r&&b(t)||(o[s]=t)};for(let e=0,n=t.length;e<n;e++){const n=t[e];if(!n||w(n))continue;if(B(n,i),"object"!=typeof n||g(n))continue;const r=Object.getOwnPropertySymbols(n);for(let e=0;e<r.length;e++){const t=r[e];W.call(n,t)&&i(n[t],t)}}return o},extend:(e,t,n,{allOwnKeys:r}={})=>(B(t,(t,r)=>{n&&O(t)?Object.defineProperty(e,r,{__proto__:null,value:o(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,i,a;const c={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],r&&!r(a,e,t)||c[a]||(t[a]=e[a],c[a]=!0);e=!1!==n&&s(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:d,kindOfTest:m,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(g(e))return e;let t=e.length;if(!E(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[a]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:$,hasOwnProperty:u,hasOwnProp:u,hasOwnInPrototypeChain:p,getSafeProp:(e,t)=>null!=e&&p(e,t)?e[t]:void 0,toSafeFlatObject:e=>{if(null==e||"object"!=typeof e&&"function"!=typeof e)return e;const t=s(e);if(null===t&&(e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(t=>{if(l(t))return!1;const n=Object.getOwnPropertyDescriptor(e,t);return!!n&&n.configurable&&!0===n.writable})})(e))return e;const n=Object.create(null),r=Object.create(null),o=[];let i=e;for(;null!=i&&-1===o.indexOf(i);){o.push(i);const a=i===e?t:s(i);if(f(i,a,i===e))break;const c=Object.getOwnPropertyNames(i);Object.getOwnPropertySymbols&&c.push(...Object.getOwnPropertySymbols(i));for(const t of c)l(t)||u(r,t)||(n[t]=e[t],r[t]=!0);i=a}return n},reduceDescriptors:K,freezeMethods:e=>{K(e,(t,n)=>{if(O(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];O(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return g(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:q,global:I,isContextDefined:H,isSpecCompliantForm:function(e){return!!(e&&O(e.append)&&"FormData"===e[c]&&e[a])},toJSONObject:e=>{const t=new WeakSet,n=e=>{if(R(e)){if(t.has(e))return;if(w(e))return e;if(!("toJSON"in e)){let r;if(t.add(e),C(e)){r=[];for(const t of e){const e=n(t);!b(e)&&r.push(e)}}else r=g(e)?[]:{},B(e,(e,t)=>{const o=n(e);!b(o)&&(r[t]=o)});return t.delete(e),r}}return e};return n(e)},isAsyncFn:X,isThenable:e=>e&&(R(e)||O(e))&&O(e.then)&&O(e.catch),setImmediate:V,asap:ee,isIterable:te,isSafeIterable:e=>null!=e&&p(e,a)&&te(e)},re=ne.toObjectSet(["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"]);const oe=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),ie=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function se(e,t){return ne.isArray(e)?e.map(e=>se(e,t)):function(e){let t=0,n=e.length;for(;t<n;){const n=e.charCodeAt(t);if(9!==n&&32!==n)break;t+=1}for(;n>t;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}(String(e).replace(t,""))}function ae(e){const t=Object.create(null);return ne.forEach(e.toJSON(),(e,n)=>{t[n]=(e=>se(e,ie))(e)}),t}const ce=Symbol("internals");function ue(e){return e&&String(e).trim().toLowerCase()}function le(e){return!1===e||null==e?e:ne.isArray(e)?e.map(le):(e=>se(e,oe))(String(e))}const fe=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function pe(e){let t=0,n=e.length;for(;t<n;){const n=e.charCodeAt(t);if(9!==n&&32!==n)break;t+=1}for(;n>t;){const t=e.charCodeAt(n-1);if(9!==t&&32!==t)break;n-=1}return 0===t&&n===e.length?e:e.slice(t,n)}function de(e,t,n,r,o){return ne.isFunction(r)?r.call(this,t,n):(o&&(t=n),ne.isString(t)?ne.isString(r)?-1!==t.indexOf(r):ne.isRegExp(r)?r.test(t):void 0:void 0)}class he{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=ue(t);if(!o)return;const i=ne.findKey(r,o);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=le(e))}const i=(e,t)=>ne.forEach(e,(e,n)=>o(e,n,t));if(ne.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(ne.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim();const i=ne.hasOwnProp(t,n);!n||i&&ne.hasOwnProp(re,n)||("set-cookie"===n?i?t[n].push(r):t[n]=[r]:t[n]=i?t[n]+", "+r:r)}),t})(e),t);else if(ne.isObject(e)&&ne.isSafeIterable(e)){let n,r,o=Object.create(null);for(const t of e){if(!ne.isArray(t))throw new TypeError("Object iterator must return a key-value pair");r=t[0],ne.hasOwnProp(o,r)?(n=o[r],o[r]=ne.isArray(n)?[...n,t[1]]:[n,t[1]]):o[r]=t[1]}i(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=ue(e)){const n=ne.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(ne.isFunction(t))return t.call(this,e,n);if(ne.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ue(e)){const n=ne.findKey(this,e);return!(!n||void 0===this[n]||t&&!de(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=ue(e)){const o=ne.findKey(n,e);!o||t&&!de(0,n[o],o,t)||(delete n[o],r=!0)}}return ne.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!de(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return ne.forEach(this,(r,o)=>{const i=ne.findKey(n,o);if(i)return t[i]=le(r),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();s!==o&&delete t[o],t[s]=le(r),n[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return ne.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&ne.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){const e=this.get("set-cookie");return ne.isArray(e)?e:null==e||!1===e?[]:[e]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return function(e){const t=Object.create(null),n=String(e);let r=0,o=!1,i=!1;function s(e){const o=pe(n.slice(r,e)),i=o.indexOf("=");if(i<1)return;const s=pe(o.slice(0,i));if(!fe.test(s))return;const a=s.toLowerCase();if("__proto__"===a||"constructor"===a||"prototype"===a)return;const c=pe(o.slice(i+1));t[a]=function(e){const t=e.length-1;if(t<1||34!==e.charCodeAt(0)||34!==e.charCodeAt(t))return e;let n="";for(let r=1;r<t;r++){const o=e.charCodeAt(r);if(34===o)return e;if(92===o&&(r+=1,r>=t))return e;n+=e[r]}return n}(c)}for(let e=0;e<n.length;e++){const t=n.charCodeAt(e);o?i?i=!1:92===t?i=!0:34===t&&(o=!1):34===t?o=!0:44!==t&&59!==t||(s(e),r=e+1)}return s(n.length),t}(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[ce]=this[ce]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ue(e);t[r]||(!function(e,t){const n=ne.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return ne.isArray(e)?e.forEach(r):r(e),this}}he.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),ne.reduceDescriptors(he.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),ne.freezeMethods(he);const me=he,ye="[REDACTED ****]";function ge(e,t){const n=new Set(t.map(e=>String(e).toLowerCase())),r=[],o=e=>{if(null===e||"object"!=typeof e)return e;if(ne.isBuffer(e))return e;if(-1!==r.indexOf(e))return;let t;if(e instanceof me&&(e=e.toJSON()),r.push(e),ne.isArray(e))t=[],e.forEach((e,n)=>{const r=o(e);ne.isUndefined(r)||(t[n]=r)});else{if(!ne.isPlainObject(e)&&function(e){if(ne.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(ne.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}(e))return r.pop(),e;t=Object.create(null);for(const[r,i]of Object.entries(e)){const e=n.has(r.toLowerCase())?ye:o(i);ne.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return o(e)}function be(e){try{return String(e)}catch(e){return""}}class we extends Error{static from(e,t,n,r,o,i){let s=e.message;!s&&ne.isArray(e.errors)&&e.errors.length&&(s=function(e){return e.errors.map(e=>{try{return e&&e.message?be(e.message):be(e)}catch(e){return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}(e));const a=new we(s,t||e.code,n,r,o);return Object.defineProperty(a,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),a.name=e.name,null!=e.status&&null==a.status&&(a.status=e.status),i&&Object.assign(a,i),a}constructor(e,t,n,r,o){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o,this.status=o.status)}toJSON(){const e=this.config,t=e&&ne.hasOwnProp(e,"redact")?e.redact:void 0,n=ne.isArray(t)&&t.length>0?ge(e,t):ne.toJSONObject(e);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:n,code:this.code,status:this.status}}}we.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",we.ERR_BAD_OPTION="ERR_BAD_OPTION",we.ECONNABORTED="ECONNABORTED",we.ETIMEDOUT="ETIMEDOUT",we.ECONNREFUSED="ECONNREFUSED",we.ERR_NETWORK="ERR_NETWORK",we.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",we.ERR_DEPRECATED="ERR_DEPRECATED",we.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",we.ERR_BAD_REQUEST="ERR_BAD_REQUEST",we.ERR_CANCELED="ERR_CANCELED",we.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",we.ERR_INVALID_URL="ERR_INVALID_URL",we.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const ve=we;function _e(e){return ne.isPlainObject(e)||ne.isArray(e)}function Oe(e){return ne.endsWith(e,"[]")?e.slice(0,-2):e}function Ee(e,t,n){return e?e.concat(t).map(function(e,t){return e=Oe(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const Re=ne.toFlatObject(ne,{},null,function(e){return/^is[A-Z]/.test(e)});const Se=function(e,t,n){if(!ne.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(e,t)=>{const r=ne.getSafeProp(n,e);return ne.isUndefined(r)?t:r},o=r("metaTokens",!0),i=r("visitor")||h,s=r("dots",!1),a=r("indexes",!1),c=r("Blob")||"undefined"!=typeof Blob&&Blob,u=r("maxDepth",100),l=c&&ne.isSpecCompliantForm(t),f=[];if(!ne.isFunction(i))throw new TypeError("visitor must be a function");function p(e){if(null===e)return"";if(ne.isDate(e))return e.toISOString();if(ne.isBoolean(e))return e.toString();if(!l&&ne.isBlob(e))throw new ve("Blob is not supported. Use a Buffer instead.");if(ne.isArrayBuffer(e)||ne.isTypedArray(e)){if(l&&"function"==typeof c)return new c([e]);throw new ve("Blob is not supported. Use a Buffer instead.",ve.ERR_NOT_SUPPORT)}return e}function d(e){if(e>u)throw new ve("Object is too deeply nested ("+e+" levels). Max depth: "+u,ve.ERR_FORM_DATA_DEPTH_EXCEEDED)}function h(e,n,r){let i=e;if(ne.isReactNative(t)&&ne.isReactNativeBlob(e))return t.append(Ee(r,n,s),p(e)),!1;if(e&&!r&&"object"==typeof e)if(ne.endsWith(n,"{}"))n=o?n:n.slice(0,-2),e=function(e,t){if(u===1/0)return JSON.stringify(e);const n=[];return JSON.stringify(e,function(e,r){if(!ne.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),d(t+n.length-1),r})}(e,1);else if(ne.isArray(e)&&function(e){return ne.isArray(e)&&!e.some(_e)}(e)||(ne.isFileList(e)||ne.endsWith(n,"[]"))&&(i=ne.toArray(e)))return n=Oe(n),i.forEach(function(e,r){!ne.isUndefined(e)&&null!==e&&t.append(!0===a?Ee([n],r,s):null===a?n:n+"[]",p(e))}),!1;return!!_e(e)||(t.append(Ee(r,n,s),p(e)),!1)}const m=Object.assign(Re,{defaultVisitor:h,convertValue:p,isVisitable:_e});if(!ne.isObject(e))throw new TypeError("data must be an object");return function e(n,r,o=0){if(!ne.isUndefined(n)){if(d(o),-1!==f.indexOf(n))throw new Error("Circular reference detected in "+r.join("."));f.push(n),ne.forEach(n,function(n,s){!0===(!(ne.isUndefined(n)||null===n)&&i.call(t,n,ne.isString(s)?s.trim():s,r,m))&&e(n,r?r.concat(s):[s],o+1)}),f.pop()}}(e),t};function Pe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function Te(e,t){this._pairs=[],e&&Se(e,this,t)}const Ae=Te.prototype;Ae.append=function(e,t){this._pairs.push([e,t])},Ae.toString=function(e){const t=e?t=>e.call(this,t,Pe):Pe;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const je=Te;function Ce(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ke(e,t,n){if(!t)return e;e=e||"";const r=ne.isFunction(n)?{serialize:n}:n,o=ne.getSafeProp(r,"encode")||Ce,i=ne.getSafeProp(r,"serialize");let s;if(s=i?i(t,r):ne.isURLSearchParams(t)?t.toString():new je(t,r).toString(o),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}const Ne=Symbol("internals");function Ue(e){return e?e.length:0}function xe(e){if(e)for(;e.length&&null===e[e.length-1];)e.pop()}function De(e,t){const n=e.handlers,r=Ue(n);n!==t.handlersRef?(t.handlersRef=n,t.handlerEntries.clear()):r!==t.handlersLength&&(r?t.handlerEntries.forEach(function(e,r){n[e.index]!==e.handler&&t.handlerEntries.delete(r)}):t.handlerEntries.clear()),t.handlersLength=r}const Le=class{constructor(){this.handlers=[],this[Ne]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(e,t,n){const r={fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null},o=this[Ne];null==this.handlers&&(this.handlers=[]),De(this,o);const i=o.nextId++;return this.handlers.push(r),o.handlerEntries.set(i,{handler:r,index:this.handlers.length-1}),o.handlersLength=this.handlers.length,i}eject(e){const t=this[Ne];De(this,t);const n=t.handlerEntries.get(e);if(n){if(t.handlerEntries.delete(e),this.handlers[n.index]!==n.handler)return;this.handlers[n.index]=null,t.iterationDepth||(xe(this.handlers),t.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],De(this,this[Ne]))}forEach(e){const t=this[Ne];De(this,t),t.iterationDepth++;try{ne.forEach(this.handlers,function(t){null!==t&&e(t)})}finally{--t.iterationDepth||(De(this,t),xe(this.handlers),t.handlersLength=Ue(this.handlers))}}},Fe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Be={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:je,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},qe="undefined"!=typeof window&&"undefined"!=typeof document,Ie="object"==typeof navigator&&navigator||void 0,He=qe&&(!Ie||["ReactNative","NativeScript","NS"].indexOf(Ie.product)<0),Me="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ze=qe&&window.location.href||"http://localhost",$e={...r,...Be};function We(e){if(e>100)throw new ve("FormData field is too deeply nested ("+e+" levels). Max depth: 100",ve.ERR_FORM_DATA_DEPTH_EXCEEDED)}const Je=function(e){function t(e,n,r,o){We(o);let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;if(i=!i&&ne.isArray(r)?r.length:i,a)return ne.hasOwnProp(r,i)?r[i]=ne.isArray(r[i])?r[i].concat(n):[r[i],n]:r[i]=n,!s;ne.hasOwnProp(r,i)&&ne.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],o)&&ne.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let i;for(r=0;r<o;r++)i=n[r],t[i]=e[i];return t}(r[i])),!s}if(ne.isFormData(e)&&ne.isFunction(e.entries)){const n={};return ne.forEachEntry(e,(e,r)=>{t(function(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;null!==(r=n.exec(e));)We(t.length),t.push("[]"===r[0]?"":r[1]||r[0]);return t}(e),r,n,0)}),n}return null},Ke=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),Xe=(e,t)=>null!=e&&ne.hasOwnProp(e,t)?e[t]:void 0;const Ve={transitional:Fe,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=ne.isObject(e);o&&ne.isHTMLForm(e)&&(e=new FormData(e));if(ne.isFormData(e))return r?JSON.stringify(Je(e)):e;if(ne.isArrayBuffer(e)||ne.isBuffer(e)||ne.isStream(e)||ne.isFile(e)||ne.isBlob(e)||ne.isReadableStream(e))return e;if(ne.isArrayBufferView(e))return e.buffer;if(ne.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){const t=Xe(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Se(e,new $e.classes.URLSearchParams,{visitor:function(e,t,n,r){return $e.isNode&&ne.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,t).toString();if((i=ne.isFileList(e))||n.indexOf("multipart/form-data")>-1){const n=Xe(this,"env"),r=n&&n.FormData;return Se(i?{"files[]":e}:e,r&&new r,t)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(ne.isString(e))try{return(t||JSON.parse)(e),ne.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=Xe(this,"transitional")||Ve.transitional,n=t&&t.forcedJSONParsing,r=Xe(this,"responseType"),o="json"===r;if(ne.isResponse(e)||ne.isReadableStream(e))return e;if(e&&ne.isString(e)&&(n&&!r||o)){const n=!(t&&t.silentJSONParsing)&&o;try{return JSON.parse(e,Xe(this,"parseReviver"))}catch(e){if(n){if("SyntaxError"===e.name)throw ve.from(e,ve.ERR_BAD_RESPONSE,this,null,Xe(this,"response"));throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:$e.classes.FormData,Blob:$e.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};ne.forEach(Ke,e=>{Ve.headers[e]={}});const Ge=Ve;function Ye(e,t){const n=this||Ge,r=t||n,o=me.from(r.headers);let i=r.data;return ne.forEach(e,function(e){i=e.call(n,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function Qe(e){return!(!e||!e.__CANCEL__)}const Ze=class extends ve{constructor(e,t,n){super(e??"canceled",ve.ERR_CANCELED,t,n),this.name="CanceledError",this.__CANCEL__=!0}};function et(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new ve("Request failed with status code "+n.status,n.status>=400&&n.status<500?ve.ERR_BAD_REQUEST:ve.ERR_BAD_RESPONSE,n.config,n.request,n)):e(n)}const tt=/[\t\n\r]/g;function nt(e){if("string"!=typeof e)return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(tt,"")}function rt(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}const ot=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[s];o||(o=c),n[i]=a,r[i]=c;let l=s,f=0;for(;l!==i;)f+=n[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o<t)return;const p=u&&c-u;return p?Math.round(1e3*f/p):void 0}};const it=function(e,t){let n,r,o=0,i=1e3/t;const s=(t,i=Date.now())=>{o=i,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=i?s(e,t):(n=e,r||(r=setTimeout(()=>{r=null,s(n)},i-a)))},()=>n&&s(n),(...e)=>s(e)]},st=(e,t,n=3)=>{let r=0;const o=ot(50,250);return it(n=>{if(!n||!ne.isNumber(n.loaded))return;const i=n.loaded,s=n.lengthComputable?n.total:void 0,a=Math.max(0,null!=s?Math.min(i,s):i),c=Math.max(0,a-r),u=o(c);r=Math.max(r,a);e({loaded:a,total:s,progress:s?a/s:void 0,bytes:c,rate:u||void 0,estimated:u&&s?(s-a)/u:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})},n)},at=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},ct=(e,t=ne.asap)=>(...n)=>t(()=>e(...n)),ut=$e.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,$e.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL($e.origin),$e.navigator&&/(msie|trident)/i.test($e.navigator.userAgent)):()=>!0,lt=$e.hasStandardBrowserEnv?{write(e,t,n,r,o,i,s){if("undefined"==typeof document)return;const a=[`${e}=${encodeURIComponent(t)}`];ne.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),ne.isString(r)&&a.push(`path=${r}`),ne.isString(o)&&a.push(`domain=${o}`),!0===i&&a.push("secure"),ne.isString(s)&&a.push(`SameSite=${s}`),document.cookie=a.join("; ")},read(e){if("undefined"==typeof document)return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(-1!==o&&r.slice(0,o)===e)try{return decodeURIComponent(r.slice(o+1))}catch(e){return r.slice(o+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};const ft=/^https?:(?!\/\/)/i;function pt(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${ye}@`),n=t.indexOf("#"),r=(-1===n?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${ye}`);return-1===n?r:`${r}#${o=t.slice(n+1),o?o.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,t,n="")=>`${t}${n}${ye}`):o}`;var o}function dt(e,t){if("string"==typeof e){const n=nt(e);if(ft.test(n))throw new ve(`Invalid URL ${JSON.stringify(pt(n))}: missing "//" after protocol`,ve.ERR_INVALID_URL,t)}}function ht(e,t,n,r){dt(t,r);let o=!("string"==typeof(i=t)&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(i));var i;return e&&(o||!1===n)?(dt(e,r),function(e,t){if(!t)return e;let n=e.length;for(;n>0&&47===e.charCodeAt(n-1);)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}(e,t)):t}const mt=e=>e instanceof me?{...e}:e;function yt(e,t){e=e||{},t=t||{};const n=Object.create(null);function r(e,t,n,r){return ne.isPlainObject(e)&&ne.isPlainObject(t)?ne.merge.call({caseless:r},e,t):ne.isPlainObject(t)?ne.merge({},t):ne.isArray(t)?t.slice():t}function o(e,t,n,o){return ne.isUndefined(t)?ne.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function i(e,t){if(!ne.isUndefined(t))return r(void 0,t)}function s(e,t){return ne.isUndefined(t)?ne.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,i){return ne.hasOwnProp(t,i)?r(n,o):ne.hasOwnProp(e,i)?r(void 0,n):void 0}Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});const c={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutErrorMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,allowedSocketPaths:s,responseEncoding:s,validateStatus:a,headers:(e,t,n)=>o(mt(e),mt(t),0,!0)};var u;return ne.forEach((u={...e,...t},Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(u).concat(Object.getOwnPropertySymbols(u).filter(e=>Object.getOwnPropertyDescriptor(u,e).enumerable)):Object.keys(u)),function(r){if("__proto__"===r||"constructor"===r||"prototype"===r)return;const i=ne.hasOwnProp(c,r)?c[r]:o,s=i(ne.hasOwnProp(e,r)?e[r]:void 0,ne.hasOwnProp(t,r)?t[r]:void 0,r);ne.isUndefined(s)&&i!==a||(n[r]=s)}),ne.hasOwnProp(t,"validateStatus")&&ne.isUndefined(t.validateStatus)&&!1===function(n){const r=ne.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!ne.isUndefined(r)){if(!ne.isPlainObject(r))return;if(ne.hasOwnProp(r,n))return r[n]}const o=ne.hasOwnProp(e,"transitional")?e.transitional:void 0;if(ne.isPlainObject(o)&&ne.hasOwnProp(o,n))return o[n]}("validateStatusUndefinedResolves")&&(ne.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const gt=["content-type","content-length"];const bt=function(e){const t=yt({},e),n=e=>ne.hasOwnProp(t,e)?t[e]:void 0,r=n("data");let o=n("withXSRFToken");const i=n("xsrfHeaderName"),s=n("xsrfCookieName");let a=n("headers");const c=n("auth"),u=n("baseURL"),l=n("allowAbsoluteUrls"),f=n("url");if(t.headers=a=me.from(a),t.url=ke(ht(u,f,l,t),n("params"),n("paramsSerializer")),c){const t=ne.getSafeProp(c,"username")||"",n=ne.getSafeProp(c,"password")||"";try{a.set("Authorization","Basic "+btoa(t+":"+(n?encodeURIComponent(n).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))):"")))}catch(t){throw ve.from(t,ve.ERR_BAD_OPTION_VALUE,e)}}if(ne.isFormData(r)){const e=ne.getSafeProp(r,"getHeaders");$e.hasStandardBrowserEnv||$e.hasStandardBrowserWebWorkerEnv||ne.isReactNative(r)?a.setContentType(void 0):ne.isFunction(e)&&function(e,t,n){"content-only"===n?Object.entries(t||{}).forEach(([t,n])=>{gt.includes(t.toLowerCase())&&e.set(t,n)}):e.set(t)}(a,e.call(r),n("formDataHeaderPolicy"))}if($e.hasStandardBrowserEnv){ne.isFunction(o)&&(o=o(t));if(!0===o||null==o&&ut(t.url)){const e=i&&s&<.read(s);e&&a.set(i,e)}}return t},wt="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=bt(e);let o=r.data;const i=me.from(r.headers).normalize();let s,a,c,u,l,f,{responseType:p,onUploadProgress:d,onDownloadProgress:h}=r;function m(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let y=new XMLHttpRequest;function g(o){if(!y)return;if(!(0!==y.status||"file"===(rt(nt(r.url))||rt($e.origin))||y.responseURL&&y.responseURL.startsWith("file:")))return n(new ve("Request aborted",ve.ECONNABORTED,e,y)),m(),void(y=null);try{o?f&&f(o):l&&l()}catch(e){setTimeout(()=>{throw e})}if(!y)return;const i=me.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());et(function(e){t(e),m()},function(e){n(e),m()},{data:p&&"text"!==p&&"json"!==p?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:i,config:e,request:y}),y=null}y.open(r.method.toUpperCase(),r.url,!0),y.timeout=r.timeout,"onloadend"in y?y.onloadend=g:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&y.responseURL.startsWith("file:"))&&setTimeout(g)},y.onabort=function(){y&&(n(new ve("Request aborted",ve.ECONNABORTED,e,y)),m(),y=null)},y.onerror=function(t){const r=t&&t.message?t.message:"Network Error",o=new ve(r,ve.ERR_NETWORK,e,y);o.event=t||null,n(o),m(),y=null},y.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||Fe;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new ve(t,o.clarifyTimeoutError?ve.ETIMEDOUT:ve.ECONNABORTED,e,y)),m(),y=null},void 0===o&&i.setContentType(null),"setRequestHeader"in y&&ne.forEach(ae(i),function(e,t){y.setRequestHeader(t,e)}),ne.isUndefined(r.withCredentials)||(y.withCredentials=!!r.withCredentials),p&&"json"!==p&&(y.responseType=r.responseType),h&&([c,l,f]=st(h,!0),y.addEventListener("progress",c)),d&&y.upload&&([a,u]=st(d),y.upload.addEventListener("progress",a),y.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(s=t=>{y&&(n(!t||t.type?new Ze(null,e,y):t),y.abort(),m(),y=null)},r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const b=rt(r.url);if(b&&!$e.protocols.includes(b))return n(new ve("Unsupported protocol "+b+":",ve.ERR_BAD_REQUEST,e)),void m();y.send(o||null)})},vt=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(e){if(!r){r=!0,s();const t=e instanceof Error?e:this.reason;n.abort(t instanceof ve?t:new Ze(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new ve(`timeout of ${t}ms exceeded`,ve.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>{r||(e.aborted?o.call(e):e.addEventListener("abort",o,{once:!0}))});const{signal:a}=n;return a.unsubscribe=()=>ne.asap(s),a},_t=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},Ot=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Et=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of Ot(e))yield*_t(n,t)}(e,t);let i,s=0,a=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return a(),void e.close();let i=r.byteLength;if(n){let e=s+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},Rt=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,St=(e,t,n)=>t+2<n&&Rt(e.charCodeAt(t+1))&&Rt(e.charCodeAt(t+2)),Pt=e=>e<=57?e-48:(223&e)-55,Tt=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||43===e||47===e||45===e||95===e,At=e=>9===e||10===e||12===e||13===e||32===e,jt=e=>{const t=e.length;let n=0;return t>0&&61===e.charCodeAt(t-1)&&(n++,t>1&&61===e.charCodeAt(t-2)&&n++),Math.floor(3*(t-n)/4)},Ct=e=>{const t=e.length;let n=0,r=0,o=!1;for(let i=0;i<t;i++){let s=e.charCodeAt(i);37===s&&St(e,i,t)&&(s=16*Pt(e.charCodeAt(i+1))+Pt(e.charCodeAt(i+2)),i+=2),At(s)||(61!==s?!Tt(s)||r>0?o=!0:n++:r++)}return o||r>2||r>0&&(n+r)%4!=0||n%4==1?jt(e):(e=>{const t=e%4;return 3*Math.floor(e/4)+(2===t?1:3===t?2:0)})(n)},kt=(e,t)=>{if(!e||"string"!=typeof e)return 0;if(!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),o=e.slice(n+1);if(/;base64/i.test(r))return t(o);let i=0;for(let e=0,t=o.length;e<t;e++){const n=o.charCodeAt(e);if(37===n&&St(o,e,t))i+=1,e+=2;else if(n<128)i+=1;else if(n<2048)i+=2;else if(n>=55296&&n<=56319&&e+1<t){const t=o.charCodeAt(e+1);t>=56320&&t<=57343?(i+=4,e++):i+=3}else i+=3}return i};const Nt={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:Ut}=ne,xt=e=>{if(!ne.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},Dt=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Lt=e=>{const t=void 0!==ne.global&&null!==ne.global?ne.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=ne.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:i,Response:s}=e,a=o?Ut(o):"function"==typeof fetch,c=Ut(i),u=Ut(s);if(!a)return!1;const l=a&&Ut(n),f=a&&("function"==typeof r?(p=new r,e=>p.encode(e)):async e=>new Uint8Array(await new i(e).arrayBuffer()));var p;const d=c&&l&&Dt(()=>{let e=!1;const t=new i($e.origin,{body:new n,method:"POST",get duplex(){return e=!0,"half"}}),r=t.headers.has("Content-Type");return null!=t.body&&t.body.cancel(),e&&!r}),h=u&&l&&Dt(()=>ne.isReadableStream(new s("").body)),m={stream:h&&(e=>e.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!m[e]&&(m[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new ve(`Response type '${e}' is not supported`,ve.ERR_NOT_SUPPORT,n)})});const y=async e=>{if(null==e)return 0;if(ne.isBlob(e))return e.size;if(ne.isSpecCompliantForm(e)){const t=new i($e.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return ne.isArrayBufferView(e)||ne.isArrayBuffer(e)?e.byteLength:(ne.isURLSearchParams(e)&&(e+=""),ne.isString(e)?(await f(e)).byteLength:void 0)};return async e=>{let{url:t,method:n,data:a,signal:u,cancelToken:f,timeout:p,onDownloadProgress:g,onUploadProgress:b,responseType:w,headers:v,withCredentials:_="same-origin",fetchOptions:O,maxContentLength:E,maxBodyLength:R,maxRedirects:S}=bt(e);const P=ne.isNumber(E)&&E>-1,T=ne.isNumber(R)&&R>-1;let A=o||fetch;w=w?(w+"").toLowerCase():"text";let j=vt([u,f&&f.toAbortSignal()],p),C=null;const k=j&&j.unsubscribe&&(()=>{j.unsubscribe()});let N,U=null;const x=()=>new ve("Request body larger than maxBodyLength limit",ve.ERR_BAD_REQUEST,e,C);try{let o;const u=(L="auth",ne.hasOwnProp(e,L)?e[L]:void 0);if(u){const e=ne.getSafeProp(u,"username")||"";o={username:e,password:ne.getSafeProp(u,"password")||""}}if((e=>{const t=e.indexOf("://");let n=e;return-1!==t&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")})(t)){const e=new URL(t,$e.origin);if(!o&&(e.username||e.password)){const t=xt(e.username);o={username:t,password:xt(e.password)}}(e.username||e.password)&&(e.username="",e.password="",t=e.href)}if(o&&(v.delete("authorization"),v.set("Authorization","Basic "+btoa((D=(o.username||"")+":"+(o.password||""),encodeURIComponent(D).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))))),P&&"string"==typeof t&&t.startsWith("data:")){const n=function(e){const t="string"==typeof e?e.indexOf("#"):-1;return kt(-1===t?e:e.slice(0,t),Ct)}(t);if(n>E)throw new ve("maxContentLength size of "+E+" exceeded",ve.ERR_BAD_RESPONSE,e,C)}if(T&&"get"!==n&&"head"!==n){const e=await y(a);if("number"==typeof e&&isFinite(e)&&(N=e,e>R))throw x()}const f=T&&(ne.isReadableStream(a)||ne.isStream(a)),p=(e,t,n)=>Et(e,65536,e=>{if(T&&e>R)throw U=x();t&&t(e)},n);if(d&&"get"!==n&&"head"!==n&&(b||f)){if(N=N??await(async(e,t)=>{const n=ne.toFiniteNumber(e.getContentLength());return n??y(t)})(v,a),0!==N||f){let e,n=new i(t,{method:"POST",body:a,duplex:"half"});if(ne.isFormData(a)&&(e=n.headers.get("content-type"))&&v.setContentType(e),n.body){const[e,t]=b&&at(N,st(ct(b)))||[];a=p(n.body,e,t)}}}else if(f&&!c&&l&&"get"!==n&&"head"!==n)a=p(a);else if(f&&c&&!d&&"get"!==n&&"head"!==n)throw new ve("Stream request bodies are not supported by the current fetch implementation",ve.ERR_NOT_SUPPORT,e,C);ne.isString(_)||(_=_?"include":"omit");const F=c&&"credentials"in i.prototype;if(ne.isFormData(a)){const e=v.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&v.delete("content-type")}v.set("User-Agent","axios/1.20.0",!1);const B=null==O?O:Object.assign(Object.create(null),O);B&&(delete B.body,delete B.headers,delete B.method,delete B.signal,delete B.duplex,delete B.credentials);const q=Object.assign(Object.create(null),B,{signal:j,method:n.toUpperCase(),headers:ae(v.normalize()),body:a,duplex:"half",credentials:F?_:void 0});c&&(ne.forEach(Nt,(e,t)=>{void 0===q[t]&&(q[t]=e)}),void 0===q.signal&&(q.signal=null),void 0===q.body&&(q.body=null)),0===S&&(q.redirect="manual",B&&(B.redirect="manual")),C=c&&new i(t,q);let I=await(c?A(C,B):A(t,q));const H=me.from(I.headers);if(P){const t=ne.toFiniteNumber(H.getContentLength());if(null!=t&&t>E)throw new ve("maxContentLength size of "+E+" exceeded",ve.ERR_BAD_RESPONSE,e,C)}const M=h&&("stream"===w||"response"===w);if(h&&I.body&&(g||P||M&&k)){const t={};["status","statusText","headers"].forEach(e=>{t[e]=I[e]});const n=ne.toFiniteNumber(H.getContentLength()),[r,o]=g&&at(n,st(ct(g),!0))||[];let i=0;const a=t=>{if(P&&(i=t,i>E))throw new ve("maxContentLength size of "+E+" exceeded",ve.ERR_BAD_RESPONSE,e,C);r&&r(t)};I=new s(Et(I.body,65536,a,()=>{o&&o(),k&&k()}),t)}w=w||"text";let z=await m[ne.findKey(m,w)||"text"](I,e);if(P&&!h&&!M){let t;if(null!=z&&("number"==typeof z.byteLength?t=z.byteLength:"number"==typeof z.size?t=z.size:"string"==typeof z&&(t="function"==typeof r?(new r).encode(z).byteLength:z.length)),"number"==typeof t&&t>E)throw new ve("maxContentLength size of "+E+" exceeded",ve.ERR_BAD_RESPONSE,e,C)}return!M&&k&&k(),await new Promise((t,n)=>{et(t,n,{data:z,headers:me.from(I.headers),status:I.status,statusText:I.statusText,config:e,request:C})})}catch(t){if(k&&k(),j&&j.aborted&&j.reason instanceof ve){const n=j.reason;throw n.config=e,C&&(n.request=C),t!==n&&Object.defineProperty(n,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),n}if(U)throw C&&!U.request&&(U.request=C),U;if(t instanceof ve)throw C&&!t.request&&(t.request=C),t;if(t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message)){const n=new ve("Network Error",ve.ERR_NETWORK,e,C,t&&t.response);throw Object.defineProperty(n,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),n}throw ve.from(t,t&&t.code,e,C,t&&t.response)}var D,L}},Ft=new Map,Bt=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,i=[r,o,n];let s,a,c=i.length,u=Ft;for(;c--;)s=i[c],a=u.get(s),void 0===a&&u.set(s,a=c?new Map:Lt(t)),u=a;return a},qt=(Bt(),{http:null,xhr:wt,fetch:{get:Bt}});ne.forEach(qt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(e){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const It=e=>`- ${e}`,Ht=e=>ne.isFunction(e)||null===e||!1===e;const Mt={getAdapter:function(e,t){e=ne.isArray(e)?e:[e];const{length:n}=e;let r,o;const i={};for(let s=0;s<n;s++){let n;if(r=e[s],o=r,!Ht(r)&&(o=qt[(n=String(r)).toLowerCase()],void 0===o))throw new ve(`Unknown adapter '${n}'`);if(o&&(ne.isFunction(o)||(o=o.get(t))))break;i[n||"#"+s]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));let t=n?e.length>1?"since :\n"+e.map(It).join("\n"):" "+It(e[0]):"as no adapter specified";throw new ve("There is no suitable adapter to dispatch the request "+t,ve.ERR_NOT_SUPPORT)}return o},adapters:qt};function zt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ze(null,e)}function $t(e){const t=ne.toSafeFlatObject(e);zt(t),t.headers=me.from(ne.getSafeProp(t,"headers")),t.data=Ye.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return Mt.getAdapter(t.adapter||Ge.adapter,t)(t).then(function(e){zt(t),t.response=e;try{e.data=Ye.call(t,t.transformResponse,e)}finally{delete t.response}return e.headers=me.from(e.headers),e},function(e){if(!Qe(e)&&(zt(t),e&&e.response)){t.response=e.response;try{e.response.data=Ye.call(t,t.transformResponse,e.response)}finally{delete t.response}e.response.headers=me.from(e.response.headers)}return Promise.reject(e)})}const Wt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Wt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Jt={};Wt.transitional=function(e,t,n){function r(e,t){return"[Axios v1.20.0] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,i)=>{if(!1===e)throw new ve(r(o," has been removed"+(t?" in "+t:"")),ve.ERR_DEPRECATED);return t&&!Jt[o]&&(Jt[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,i)}},Wt.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};const Kt={assertOptions:function(e,t,n){if("object"!=typeof e||null===e)throw new ve("options must be an object",ve.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const i=r[o],s=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new ve("option "+i+" must be "+n,ve.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new ve("Unknown option "+i,ve.ERR_BAD_OPTION)}},validators:Wt},Xt=Kt.validators;class Vt{constructor(e){this.defaults=e||{},this.interceptors={request:new Le,response:new Le}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error)try{let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack;let r="";if("string"==typeof n){const e=n.indexOf("\n");r=-1===e?"":n.slice(e+1)}if(e.stack){if(r){const t=r.indexOf("\n"),n=-1===t?-1:r.indexOf("\n",t+1),o=-1===n?"":r.slice(n+1);String(e.stack).endsWith(o)||(e.stack+="\n"+r)}}else e.stack=r}catch(e){}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=yt(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&&Kt.assertOptions(n,{silentJSONParsing:Xt.transitional(Xt.boolean),forcedJSONParsing:Xt.transitional(Xt.boolean),clarifyTimeoutError:Xt.transitional(Xt.boolean),legacyInterceptorReqResOrdering:Xt.transitional(Xt.boolean),advertiseZstdAcceptEncoding:Xt.transitional(Xt.boolean),validateStatusUndefinedResolves:Xt.transitional(Xt.boolean)},!1),null!=r&&(ne.isFunction(r)?t.paramsSerializer={serialize:r}:Kt.assertOptions(r,{encode:Xt.function,serialize:Xt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Kt.assertOptions(t,{baseUrl:Xt.spelling("baseURL"),withXsrfToken:Xt.spelling("withXSRFToken")},!0),t.method=(ne.getSafeProp(t,"method")||ne.getSafeProp(this.defaults,"method")||"get").toLowerCase();let i=o&&ne.merge(o.common,o[t.method]);o&&ne.forEach(Ke.concat("common"),e=>{delete o[e]}),t.headers=me.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach(function(e){if("function"==typeof e.runWhen&&!1===e.runWhen(t))return;a=a&&e.synchronous;const n=t.transitional||Fe;n&&n.legacyInterceptorReqResOrdering?s.unshift(e.fulfilled,e.rejected):s.push(e.fulfilled,e.rejected)});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,f=0;if(!a){const e=[$t.bind(this),void 0];for(e.unshift(...s),e.push(...c),l=e.length,u=Promise.resolve(t);f<l;)u=u.then(e[f++],e[f++]);return u}l=s.length;let p=t;for(;f<l;){const e=s[f++],t=s[f++];try{p=e?e(p):p}catch(e){if(!t){u=Promise.reject(e);break}try{const n=t.call(this,e);ne.isThenable(n)&&(u=Promise.resolve(n).then(()=>$t.call(this,p)))}catch(e){u=Promise.reject(e)}break}}if(!u)try{u=$t.call(this,p)}catch(e){u=Promise.reject(e)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(e){return ke(ht((e=yt(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}}ne.forEach(["delete","get","head","options"],function(e){Vt.prototype[e]=function(t,n){return this.request(yt(n||{},{method:e,url:t,data:n&&ne.hasOwnProp(n,"data")?n.data:void 0}))}}),ne.forEach(["post","put","patch","query"],function(e){function t(t){return function(n,r,o){return this.request(yt(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Vt.prototype[e]=t(),"query"!==e&&(Vt.prototype[e+"Form"]=t(!0))});const Gt=Vt;class Yt{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new Ze(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new Yt(function(t){e=t}),cancel:e}}}const Qt=Yt;const Zt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Zt).forEach(([e,t])=>{void 0===Zt[t]&&(Zt[t]=e)});const en=Zt;const tn=function e(t){const n=new Gt(t),r=o(Gt.prototype.request,n);return ne.extend(r,Gt.prototype,n,{allOwnKeys:!0}),ne.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(yt(t,n))},r}(Ge);tn.Axios=Gt,tn.CanceledError=Ze,tn.CancelToken=Qt,tn.isCancel=Qe,tn.VERSION="1.20.0",tn.toFormData=Se,tn.AxiosError=ve,tn.Cancel=tn.CanceledError,tn.all=function(e){return Promise.all(e)},tn.spread=function(e){return function(t){return e.apply(null,t)}},tn.isAxiosError=function(e){return ne.isObject(e)&&!0===e.isAxiosError},tn.mergeConfig=yt,tn.AxiosHeaders=me,tn.formToJSON=e=>Je(ne.isHTMLForm(e)?new FormData(e):e),tn.getAdapter=Mt.getAdapter,tn.HttpStatusCode=en,tn.default=tn;const nn=tn;function rn(e){return rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rn(e)}function on(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var e,t,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function i(n,r,o,i){var c=r&&r.prototype instanceof a?r:a,u=Object.create(c.prototype);return sn(u,"_invoke",function(n,r,o){var i,a,c,u=0,l=o||[],f=!1,p={p:0,n:0,v:e,a:d,f:d.bind(e,4),d:function(t,n){return i=t,a=0,c=e,p.n=n,s}};function d(n,r){for(a=n,c=r,t=0;!f&&u&&!o&&t<l.length;t++){var o,i=l[t],d=p.p,h=i[2];n>3?(o=h===r)&&(c=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=e):i[0]<=d&&((o=n<2&&d<i[1])?(a=0,p.v=r,p.n=i[1]):d<h&&(o=n<3||i[0]>r||r>h)&&(i[4]=n,i[5]=r,p.n=h,a=0))}if(o||n>1)return s;throw f=!0,r}return function(o,l,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===l&&d(l,h),a=l,c=h;(t=a<2?e:c)||!f;){i||(a?a<3?(a>1&&(p.n=-1),d(a,c)):p.n=c:p.v=c);try{if(u=2,i){if(a||(o="next"),t=i[o]){if(!(t=t.call(i,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,a<2&&(a=0)}else 1===a&&(t=i.return)&&t.call(i),a<2&&(c=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=e}else if((t=(f=p.n<0)?c:n.call(r,p))!==s)break}catch(t){i=e,a=1,c=t}finally{u=1}}return{value:t,done:f}}}(n,o,i),!0),u}var s={};function a(){}function c(){}function u(){}t=Object.getPrototypeOf;var l=[][r]?t(t([][r]())):(sn(t={},r,function(){return this}),t),f=u.prototype=a.prototype=Object.create(l);function p(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,u):(e.__proto__=u,sn(e,o,"GeneratorFunction")),e.prototype=Object.create(f),e}return c.prototype=u,sn(f,"constructor",u),sn(u,"constructor",c),c.displayName="GeneratorFunction",sn(u,o,"GeneratorFunction"),sn(f),sn(f,o,"Generator"),sn(f,r,function(){return this}),sn(f,"toString",function(){return"[object Generator]"}),(on=function(){return{w:i,m:p}})()}function sn(e,t,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(e){o=0}sn=function(e,t,n,r){function i(t,n){sn(e,t,function(e){return this._invoke(t,n,e)})}t?o?o(e,t,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},sn(e,t,n,r)}function an(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,s,a=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw o}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return cn(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cn(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function cn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function un(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function ln(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?un(Object(n),!0).forEach(function(t){fn(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):un(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function fn(e,t,n){return(t=yn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pn(e,t,n,r,o,i,s){try{var a=e[i](s),c=a.value}catch(e){return void n(e)}a.done?t(c):Promise.resolve(c).then(r,o)}function dn(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function s(e){pn(i,r,o,s,a,"next",e)}function a(e){pn(i,r,o,s,a,"throw",e)}s(void 0)})}}function hn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,yn(r.key),r)}}function mn(e,t,n){return t&&hn(e.prototype,t),n&&hn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function yn(e){var t=function(e,t){if("object"!=rn(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=rn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==rn(t)?t:t+""}function gn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bn(e,t,n){return t=En(t),function(e,t){if(t&&("object"==rn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,_n()?Reflect.construct(t,n||[],En(e).constructor):t.apply(e,n))}function wn(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&On(e,t)}function vn(e){var t="function"==typeof Map?new Map:void 0;return vn=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(_n())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var o=new(e.bind.apply(e,r));return n&&On(o,n.prototype),o}(e,arguments,En(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),On(n,e)},vn(e)}function _n(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(_n=function(){return!!e})()}function On(e,t){return On=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},On(e,t)}function En(e){return En=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},En(e)}var Rn=null,Sn=null,Pn=null,Tn=Object.freeze({HTTP_USER_AGENT_HEADER_NAME:"User-Agent",HTTP_USER_AGENT:"appmesh/javascript",DEFAULT_RUN_APP_TIMEOUT_SECONDS:"P2D",DEFAULT_RUN_APP_LIFECYCLE_SECONDS:"P2DT12H",HTTP_HEADER_KEY_AUTH:"Authorization",HTTP_HEADER_KEY_X_TARGET_HOST:"X-Target-Host",HTTP_HEADER_KEY_X_FILE_PATH:"X-File-Path"}),An=Object.freeze({isNode:!("undefined"!=typeof window&&void 0!==window.document)}),jn=function(){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return gn(this,e),(n=bn(this,e,[t])).name="AppMeshError",n.statusCode=r,n.responseData=o,n.errorCode=i,n.timestamp=(new Date).toISOString(),n}return wn(e,vn(Error)),mn(e)}(),Cn=function(){function e(t){var n;return gn(this,e),(n=bn(this,e,[t,null,null,"APP_REMOVED"])).name="AppRemovedError",n}return wn(e,jn),mn(e)}(),kn=function(){function e(t){var n;return gn(this,e),(n=bn(this,e,[t,null,null,"TRANSPORT_DISCONNECTED"])).name="TransportDisconnectedError",n}return wn(e,jn),mn(e)}(),Nn=function(e,t){An.isNode?process.stdout.write(e):console.log(e)};function Un(e){if("number"==typeof e)return e;if("string"!=typeof e)throw new Error("Invalid input type. Expected number or ISO 8601 duration string.");if(/^\d+$/.test(e))return parseInt(e,10);if(!e.trim())throw new Error("Duration string cannot be empty");if(!e.startsWith("P"))throw new Error("Invalid ISO8601 duration: must start with P");var t="\\d+",n="".concat(t,"(?:[\\.,]").concat(t,")?"),r="(".concat(t,"Y)?(").concat(t,"M)?(").concat(t,"W)?(").concat(t,"D)?"),o="T(".concat(n,"H)?(").concat(n,"M)?(").concat(n,"S)?"),i="P(?:".concat(r,"(?:").concat(o,")?)"),s=["years","months","weeks","days","hours","minutes","seconds"],a=e.replace(/,/g,".").match(new RegExp(i));if(!a)throw new RangeError("invalid duration: "+e);var c=a.slice(1);if(0===c.filter(function(e){return null!=e}).length)throw new RangeError("invalid duration: "+e);if(c.filter(function(e){return/\./.test(e||"")}).length>1)throw new RangeError("only the smallest unit can be fractional");var u=c.reduce(function(e,t,n){return e[s[n]]=parseFloat(t||"0")||0,e},{}),l=0;return l+=31536e3*u.years,l+=2592e3*u.months,l+=604800*u.weeks,l+=86400*u.days,l+=3600*u.hours,l+=60*u.minutes,l+=u.seconds}function xn(e,t){if(e){var n=t.toLowerCase(),r=Object.keys(e).find(function(e){return e.toLowerCase()===n});return void 0===r?void 0:e[r]}}function Dn(e){return Ln.apply(this,arguments)}function Ln(){return(Ln=dn(on().m(function e(t){var r,o,i,s;return on().w(function(e){for(;;)switch(e.p=e.n){case 0:if(r=parseInt(t,10),isNaN(r)||String(r)!==t.trim()){e.n=1;break}return e.a(2,r);case 1:return e.p=1,e.n=2,n.ei(994,()=>import("./994.appmesh.esm.js")).then(()=>n.t(994,19));case 2:if(o=e.v,i=o.spawnSync,0===(s=i("id",["-u",t],{encoding:"utf8",timeout:3e3})).status&&s.stdout){e.n=3;break}return e.a(2,null);case 3:return e.a(2,parseInt(s.stdout.trim(),10));case 4:return e.p=4,e.v,e.a(2,null)}},e,null,[[1,4]])}))).apply(this,arguments)}function Fn(e){return Bn.apply(this,arguments)}function Bn(){return(Bn=dn(on().m(function e(t){var r,o,i,s,a;return on().w(function(e){for(;;)switch(e.p=e.n){case 0:if(r=parseInt(t,10),isNaN(r)||String(r)!==t.trim()){e.n=1;break}return e.a(2,r);case 1:return e.p=1,e.n=2,n.ei(994,()=>import("./994.appmesh.esm.js")).then(()=>n.t(994,19));case 2:if(o=e.v,i=o.spawnSync,0===(s=i("getent",["group",t],{encoding:"utf8",timeout:3e3})).status&&s.stdout){e.n=3;break}return e.a(2,null);case 3:return a=s.stdout.trim().split(":"),e.a(2,a.length>=3?parseInt(a[2],10):null);case 4:return e.p=4,e.v,e.a(2,null)}},e,null,[[1,4]])}))).apply(this,arguments)}var qn="/opt/appmesh/ssl/ca.pem";function In(e){return"string"!=typeof e||e.includes("-----BEGIN")?e:Sn.readFileSync(e)}function Hn(e){if(!1===e)return{rejectUnauthorized:!1};if(!e)return Sn.existsSync(qn)?{ca:Sn.readFileSync(qn),rejectUnauthorized:!0}:{rejectUnauthorized:!0};for(var t=ln({},e),n=0,r=["ca","cert","key"];n<r.length;n++){var o=r[n];t[o]&&(t[o]=In(t[o]))}return"boolean"!=typeof t.rejectUnauthorized&&(t.rejectUnauthorized=!0),t}var Mn=function(){return mn(function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:An.isNode?"https://127.0.0.1:6060":window.location.origin,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;gn(this,e),this.baseURL=r,this.forwardingHost=null,this._token=null;var i={baseURL:r,timeout:3e5,validateStatus:function(e){return!0}};this._sslConfig=o,this._client=nn.create(i),An.isNode&&!Pn&&(Pn=Promise.all([n.ei(453,()=>import("./453.appmesh.esm.js")).then(()=>n.t(453,19)),n.ei(603,()=>import("./603.appmesh.esm.js")).then(()=>n.t(603,19))]).then(function(e){var t=an(e,2),n=t[0],r=t[1];Rn=n.default||n,Sn=r.default||r}).catch(function(){})),this._client.interceptors.request.use(function(e){return e.headers=ln(ln({},e.headers),t._commonHeaders()),e},function(e){var t=new jn("Request configuration error: "+(e.message||"Unknown error"));return Promise.reject(t)}),this._client.interceptors.response.use(function(e){return e},function(e){var t,n,r,o,i=new jn("Request failed: "+(e.message||"Unknown error"),null!==(t=null===(n=e.response)||void 0===n?void 0:n.status)&&void 0!==t?t:null,null!==(r=null===(o=e.response)||void 0===o?void 0:o.data)&&void 0!==r?r:null);return i.cause=e,Promise.reject(i)})},[{key:"set_bearer_token",value:function(e){var t="string"==typeof e?e.trim():"";this._handleTokenUpdate(t||null)}},{key:"set_token",value:function(e){this.set_bearer_token(e)}},{key:"clear_bearer_token",value:function(){this._handleTokenUpdate(null)}},{key:"_getAccessToken",value:function(){return this._token||null}},{key:"_handleTokenUpdate",value:function(e){this._token=e||null}},{key:"get_auth_config",value:(q=dn(on().m(function e(){return on().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("get","/appmesh/auth/config");case 1:return e.a(2,e.v.data)}},e,this)})),function(){return q.apply(this,arguments)})},{key:"get_current_principal",value:(B=dn(on().m(function e(){return on().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("get","/appmesh/principal/self");case 1:return e.a(2,e.v.data)}},e,this)})),function(){return B.apply(this,arguments)})},{key:"list_apps",value:(F=dn(on().m(function e(){var t;return on().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("get","/appmesh/applications");case 1:return t=e.v,e.a(2,t.data)}},e,this)})),function(){return F.apply(this,arguments)})},{key:"get_app",value:(L=dn(on().m(function e(t){var n;return on().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("get","/appmesh/app/".concat(t));case 1:return n=e.v,e.a(2,n.data)}},e,this)})),function(e){return L.apply(this,arguments)})},{key:"check_app_health",value:(D=dn(on().m(function e(t){var n,r;return on().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this._request("get","/appmesh/app/".concat(t,"/health"));case 1:return n=e.v,e.a(2,0===parseInt(n.data,10));case 2:if(e.p=2,null==(r=e.v).statusCode){e.n=3;break}return e.a(2,!1);case 3:throw r;case 4:return e.a(2)}},e,this,[[0,2]])})),function(e){return D.apply(this,arguments)})},{key:"add_app",value:(x=dn(on().m(function e(t,n){var r;return on().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("put","/appmesh/app/".concat(t),n);case 1:return r=e.v,e.a(2,r.data)}},e,this)})),function(e,t){return x.apply(this,arguments)})},{key:"delete_app",value:(U=dn(on().m(function e(t){var n,r;return on().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,this._request("delete","/appmesh/app/".concat(t));case 1:return n=e.v,e.a(2,200===n.status);case 2:if(e.p=2,404!==(r=e.v).statusCode){e.n=3;break}return e.a(2,!1);case 3:throw r;case 4:return e.a(2)}},e,this,[[0,2]])})),function(e){return U.apply(this,arguments)})},{key:"enable_app",value:(N=dn(on().m(function e(t){return on().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("post","/appmesh/app/".concat(t,"/enable"));case 1:return e.a(2,!0)}},e,this)})),function(e){return N.apply(this,arguments)})},{key:"disable_app",value:(k=dn(on().m(function e(t){return on().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("post","/appmesh/app/".concat(t,"/disable"));case 1:return e.a(2,!0)}},e,this)})),function(e){return k.apply(this,arguments)})},{key:"get_app_output",value:(C=dn(on().m(function e(t){var n,r,o,i,s,a,c,u,l,f,p=arguments;return on().w(function(e){for(;;)switch(e.n){case 0:return n=p.length>2&&void 0!==p[2]?p[2]:0,r=p.length>3&&void 0!==p[3]?p[3]:10240,o=p.length>4&&void 0!==p[4]?p[4]:"",i=p.length>5&&void 0!==p[5]?p[5]:0,s={stdout_position:(p.length>1&&void 0!==p[1]?p[1]:0).toString(),stdout_index:n.toString(),stdout_maxsize:r.toString(),process_uuid:o,timeout:Un(i).toString()},e.n=1,this._request("get","/appmesh/app/".concat(t,"/output"),null,{params:s});case 1:return a=e.v,c=xn(a.headers,"X-Output-Position"),u=xn(a.headers,"X-Exit-Code"),l=c?parseInt(c,10):null,f=u?parseInt(u,10):null,e.a(2,new zn(a.status,a.data,l,f))}},e,this)})),function(e){return C.apply(this,arguments)})},{key:"run_app_sync",value:(j=dn(on().m(function e(t){var n,r,o,i,s,a,c,u=arguments;return on().w(function(e){for(;;)switch(e.n){case 0:return n=u.length>1&&void 0!==u[1]?u[1]:Nn,r=u.length>2&&void 0!==u[2]?u[2]:Tn.DEFAULT_RUN_APP_TIMEOUT_SECONDS,o=u.length>3&&void 0!==u[3]?u[3]:Tn.DEFAULT_RUN_APP_LIFECYCLE_SECONDS,i={timeout:Un(r),lifecycle:Un(o)},e.n=1,this._request("post","/appmesh/app/syncrun",t,{params:i});case 1:return s=e.v,a=null,200===s.status?(n&&n(s.data,0),(c=xn(s.headers,"X-Exit-Code"))&&(a=parseInt(c,10))):n&&n(s.data,0),e.a(2,a)}},e,this)})),function(e){return j.apply(this,arguments)})},{key:"run_app_async",value:(A=dn(on().m(function e(t){var n,r,o,i,s=arguments;return on().w(function(e){for(;;)switch(e.n){case 0:return n=s.length>1&&void 0!==s[1]?s[1]:Tn.DEFAULT_RUN_APP_TIMEOUT_SECONDS,r=s.length>2&&void 0!==s[2]?s[2]:Tn.DEFAULT_RUN_APP_LIFECYCLE_SECONDS,o={timeout:Un(n),lifecycle:Un(r)},e.n=1,this._request("post","/appmesh/app/run",t,{params:o});case 1:return i=e.v,e.a(2,new $n(this,i.data.name,i.data.process_uuid))}},e,this)})),function(e){return A.apply(this,arguments)})},{key:"wait_for_async_run",value:(T=dn(on().m(function e(t){var n,r,o,i,s,a,c=arguments;return on().w(function(e){for(;;)switch(e.n){case 0:if(n=c.length>1&&void 0!==c[1]?c[1]:Nn,r=c.length>2&&void 0!==c[2]?c[2]:0,!t){e.n=7;break}o=0,i=new Date,s=1;case 1:if(!(t.procUid.length>0)){e.n=7;break}return e.n=2,this.get_app_output(t.appName,o,0,20480,t.procUid,s);case 2:if((a=e.v).output&&n&&n(a.output,o),null!==a.outPosition&&(o=a.outPosition),null===a.exitCode){e.n=4;break}return e.n=3,this.delete_app(t.appName);case 3:return e.a(2,a.exitCode);case 4:if(!(r>0&&(new Date-i)/1e3>r)){e.n=5;break}return e.a(3,7);case 5:return e.n=6,new Promise(function(e){return setTimeout(e,100)});case 6:e.n=1;break;case 7:return e.a(2,null)}},e,this)})),function(e){return T.apply(this,arguments)})},{key:"run_task",value:(P=dn(on().m(function e(t,n){var r,o,i=arguments;return on().w(function(e){for(;;)switch(e.n){case 0:return(r=i.length>2&&void 0!==i[2]?i[2]:300)<=0&&(r=300),e.n=1,this._request("post","/appmesh/app/".concat(t,"/task"),n,{params:{timeout:r.toString()}});case 1:return o=e.v,e.a(2,o.data)}},e,this)})),function(e,t){return P.apply(this,arguments)})},{key:"cancel_task",value:(S=dn(on().m(function e(t){return on().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("delete","/appmesh/app/".concat(t,"/task"));case 1:return e.a(2,!0)}},e,this)})),function(e){return S.apply(this,arguments)})},{key:"download_file",value:(R=dn(on().m(function e(t){var r,o,i,s,a,c,u,l,f,p,d,h,m,y,g,b,w=arguments;return on().w(function(e){for(;;)switch(e.p=e.n){case 0:return o=w.length>2&&void 0!==w[2]&&w[2],(r=w.length>1&&void 0!==w[1]?w[1]:null)||(r=t.split(/[\\/]/).pop()),i=fn({},Tn.HTTP_HEADER_KEY_X_FILE_PATH,encodeURIComponent(t)),e.n=1,this._request("get","/appmesh/file/download",null,{headers:i,config:{responseType:"arraybuffer"}});case 1:if(200===(s=e.v).status){e.n=2;break}throw new jn("Failed to download file: ".concat(t),s.status,s.data);case 2:if(!An.isNode){e.n=15;break}return e.n=3,n.ei(840,()=>import("./840.appmesh.esm.js")).then(()=>n.t(840,19));case 3:return a=e.v,e.p=4,e.n=5,a.writeFile(r,Buffer.from(s.data));case 5:if(!o||"win32"===process.platform){e.n=12;break}if(c=s.headers,e.p=6,!(u=c["x-file-mode"])){e.n=7;break}return e.n=7,a.chmod(r,parseInt(u,10));case 7:if(l=c["x-file-user"],f=c["x-file-group"],!l||!f){e.n=10;break}return e.n=8,Dn(l);case 8:return p=e.v,e.n=9,Fn(f);case 9:if(d=e.v,null===p||null===d){e.n=10;break}return e.n=10,a.chown(r,p,d);case 10:e.n=12;break;case 11:e.p=11,g=e.v,console.warn("Warning: Unable to apply file attributes to",r,g.message);case 12:e.n=14;break;case 13:throw e.p=13,b=e.v,new jn("Failed to write file to ".concat(r,": ").concat(b.message),s.status);case 14:e.n=16;break;case 15:h=new Blob([s.data]),m=window.URL.createObjectURL(h),(y=document.createElement("a")).style.display="none",y.href=m,y.download=r.split("/").pop(),document.body.appendChild(y),y.click(),window.URL.revokeObjectURL(m),document.body.removeChild(y);case 16:return e.a(2)}},e,this,[[6,11],[4,13]])})),function(e){return R.apply(this,arguments)})},{key:"upload_file",value:(E=dn(on().m(function e(t){var r,o,i,s,a,c,u,l,f,p,d=arguments;return on().w(function(e){for(;;)switch(e.n){case 0:if(o=d.length>2&&void 0!==d[2]&&d[2],(r=d.length>1&&void 0!==d[1]?d[1]:null)||(r=t.split(/[\\/]/).pop()),i=fn({},Tn.HTTP_HEADER_KEY_X_FILE_PATH,encodeURIComponent(r)),!An.isNode){e.n=3;break}return e.n=1,n.ei(894,()=>import("./894.appmesh.esm.js")).then(()=>n.t(894,19));case 1:return a=e.v.default,e.n=2,n.ei(603,()=>import("./603.appmesh.esm.js")).then(()=>n.t(603,19));case 2:c=e.v,s=new a,u=r.split("/").pop(),s.append("filename",u),(l=c.statSync(t)).size<10485760?(f=c.readFileSync(t),s.append("file",f,{filename:t.split("/").pop()})):s.append("file",c.createReadStream(t)),o&&(i["X-File-Mode"]=(511&l.mode).toString()),Object.assign(i,s.getHeaders()),e.n=7;break;case 3:if(s=new FormData,!(t instanceof File)){e.n=4;break}p=t.name,e.n=6;break;case 4:if(!(t instanceof Blob)){e.n=5;break}p=r.split("/").pop(),e.n=6;break;case 5:throw new jn("In browser, localFile must be File or Blob");case 6:s.append("filename",p),s.append("file",t);case 7:return e.n=8,this._request("post","/appmesh/file/upload",s,{headers:i,config:{maxBodyLength:1/0,maxContentLength:1/0}});case 8:return e.a(2)}},e,this)})),function(e){return E.apply(this,arguments)})},{key:"get_host_resources",value:(O=dn(on().m(function e(){var t;return on().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("get","/appmesh/resources");case 1:return t=e.v,e.a(2,t.data)}},e,this)})),function(){return O.apply(this,arguments)})},{key:"get_config",value:(_=dn(on().m(function e(){var t;return on().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("get","/appmesh/config");case 1:return t=e.v,e.a(2,t.data)}},e,this)})),function(){return _.apply(this,arguments)})},{key:"set_config",value:(v=dn(on().m(function e(t){var n;return on().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("post","/appmesh/config",t);case 1:return n=e.v,e.a(2,n.data)}},e,this)})),function(e){return v.apply(this,arguments)})},{key:"set_log_level",value:(w=dn(on().m(function e(){var t,n,r=arguments;return on().w(function(e){for(;;)switch(e.n){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:"DEBUG",e.n=1,this.set_config({BaseConfig:{LogLevel:t}});case 1:return n=e.v,e.a(2,n.BaseConfig.LogLevel)}},e,this)})),function(){return w.apply(this,arguments)})},{key:"add_label",value:(b=dn(on().m(function e(t,n){return on().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("put","/appmesh/label/".concat(t),null,{params:{value:n}});case 1:return e.a(2,!0)}},e,this)})),function(e,t){return b.apply(this,arguments)})},{key:"delete_label",value:(g=dn(on().m(function e(t){return on().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("delete","/appmesh/label/".concat(t));case 1:return e.a(2,!0)}},e,this)})),function(e){return g.apply(this,arguments)})},{key:"list_labels",value:(y=dn(on().m(function e(){var t;return on().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("get","/appmesh/labels");case 1:return t=e.v,e.a(2,t.data)}},e,this)})),function(){return y.apply(this,arguments)})},{key:"list_principals",value:(m=dn(on().m(function e(){return on().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("get","/appmesh/principals");case 1:return e.a(2,e.v.data)}},e,this)})),function(){return m.apply(this,arguments)})},{key:"update_principal",value:(h=dn(on().m(function e(t,n){return on().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("post","/appmesh/principal/".concat(encodeURIComponent(t)),n);case 1:return e.a(2,!0)}},e,this)})),function(e,t){return h.apply(this,arguments)})},{key:"delete_principal",value:(d=dn(on().m(function e(t){return on().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("delete","/appmesh/principal/".concat(encodeURIComponent(t)));case 1:return e.a(2,!0)}},e,this)})),function(e){return d.apply(this,arguments)})},{key:"get_current_user",value:(p=dn(on().m(function e(){return on().w(function(e){for(;;)if(0===e.n)return e.a(2,this.get_current_principal())},e,this)})),function(){return p.apply(this,arguments)})},{key:"list_permissions",value:(f=dn(on().m(function e(){var t;return on().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("get","/appmesh/permissions");case 1:return t=e.v,e.a(2,t.data)}},e,this)})),function(){return f.apply(this,arguments)})},{key:"get_principal_permissions",value:(l=dn(on().m(function e(){var t;return on().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("get","/appmesh/principal/self/permissions");case 1:return t=e.v,e.a(2,t.data)}},e,this)})),function(){return l.apply(this,arguments)})},{key:"get_user_permissions",value:(u=dn(on().m(function e(){return on().w(function(e){for(;;)if(0===e.n)return e.a(2,this.get_principal_permissions())},e,this)})),function(){return u.apply(this,arguments)})},{key:"list_roles",value:(c=dn(on().m(function e(){var t;return on().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("get","/appmesh/roles");case 1:return t=e.v,e.a(2,t.data)}},e,this)})),function(){return c.apply(this,arguments)})},{key:"update_role",value:(a=dn(on().m(function e(t,n){return on().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("post","/appmesh/role/".concat(t),n);case 1:return e.a(2,!0)}},e,this)})),function(e,t){return a.apply(this,arguments)})},{key:"delete_role",value:(s=dn(on().m(function e(t){return on().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("delete","/appmesh/role/".concat(t));case 1:return e.a(2,!0)}},e,this)})),function(e){return s.apply(this,arguments)})},{key:"get_metrics",value:(i=dn(on().m(function e(){var t;return on().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,this._request("get","/appmesh/metrics",null,{config:{responseType:"text"}});case 1:return t=e.v,e.a(2,t.data)}},e,this)})),function(){return i.apply(this,arguments)})},{key:"subscribe",value:(o=dn(on().m(function e(){return on().w(function(e){for(;;)switch(e.n){case 0:throw new jn("subscribe requires the TCP client (AppMeshClientTCP, imported from 'appmesh/tcp'); the HTTP client does not support event subscriptions");case 1:return e.a(2)}},e)})),function(){return o.apply(this,arguments)})},{key:"unsubscribe",value:(r=dn(on().m(function e(){return on().w(function(e){for(;;)switch(e.n){case 0:throw new jn("unsubscribe requires the TCP client (AppMeshClientTCP, imported from 'appmesh/tcp'); the HTTP client does not support event subscriptions");case 1:return e.a(2)}},e)})),function(){return r.apply(this,arguments)})},{key:"request",value:(t=dn(on().m(function e(t,n){var r,o,i=arguments;return on().w(function(e){for(;;)if(0===e.n)return r=i.length>2&&void 0!==i[2]?i[2]:null,o=i.length>3&&void 0!==i[3]?i[3]:{},e.a(2,this._request(t,n,r,o))},e,this)})),function(e,n){return t.apply(this,arguments)})},{key:"_commonHeaders",value:function(){var e={};An.isNode&&(e[Tn.HTTP_USER_AGENT_HEADER_NAME]=Tn.HTTP_USER_AGENT);var t=this._getAccessToken();if(t&&(e[Tn.HTTP_HEADER_KEY_AUTH]="Bearer ".concat(t)),this.forwardingHost)if(this.forwardingHost.includes(":"))e[Tn.HTTP_HEADER_KEY_X_TARGET_HOST]=this.forwardingHost;else{var n=new URL(this.baseURL),r="https:"===n.protocol?"443":"80",o=n.port||r;e[Tn.HTTP_HEADER_KEY_X_TARGET_HOST]="".concat(this.forwardingHost,":").concat(o)}return e}},{key:"_request",value:(e=dn(on().m(function e(t,n){var r,o,i,s,a,c,u,l,f,p,d,h,m=arguments;return on().w(function(e){for(;;)switch(e.p=e.n){case 0:if(r=m.length>2&&void 0!==m[2]?m[2]:null,o=m.length>3&&void 0!==m[3]?m[3]:{},!An.isNode||!Pn||this._client.defaults.httpsAgent){e.n=2;break}return e.n=1,Pn;case 1:Rn&&(this._client.defaults.httpsAgent=new Rn.Agent(ln(ln({},Hn(this._sslConfig)),{},{keepAlive:!0,keepAliveMsecs:3e3})));case 2:return i=o.headers,s=void 0===i?{}:i,a=o.params,c=void 0===a?{}:a,u=o.config,l=void 0===u?{}:u,e.p=3,f=ln(ln({method:t,url:n,withCredentials:!1},l),{},{headers:ln({},s),params:ln({},c)}),null!==r&&(f.data=r),e.n=4,this._client(f);case 4:if(!((p=e.v).status<200||p.status>=300)){e.n=5;break}throw d=this._extractErrorMessage(p.data),new jn(d,p.status,p.data);case 5:return e.a(2,p);case 6:throw e.p=6,h=e.v,this.onError(h);case 7:return e.a(2)}},e,this,[[3,6]])})),function(t,n){return e.apply(this,arguments)})},{key:"_extractErrorMessage",value:function(e){if(!e)return"Unknown error";if(e instanceof ArrayBuffer)try{var t=new TextDecoder("utf-8").decode(e);try{var n=JSON.parse(t);return n.message||n.error||"Binary response error"}catch(e){return t}}catch(e){return"Binary response error (could not decode)"}if("string"==typeof e)try{var r=JSON.parse(e);return r.message||r.error||e}catch(t){return e}return"object"===rn(e)?e.message||e.error||JSON.stringify(e):String(e)}},{key:"onError",value:function(e){return console.log("AppMeshClient error:",e),e instanceof jn?e:new jn(e.message||"Unknown error")}}]);var e,t,r,o,i,s,a,c,u,l,f,p,d,h,m,y,g,b,w,v,_,O,E,R,S,P,T,A,j,C,k,N,U,x,D,L,F,B,q}(),zn=mn(function e(t,n,r,o){gn(this,e),this.statusCode=Number(t),this.output=String(n),this.outPosition=null!==r?Number(r):null,this.exitCode=null!==o?Number(o):null}),$n=function(){return mn(function e(t,n,r){gn(this,e),this.appName=n,this.procUid=r,this._client=t,this._forwardingHost=t.forwardingHost},[{key:"with_forwarding_host",value:(t=dn(on().m(function e(t){var n;return on().w(function(e){for(;;)switch(e.p=e.n){case 0:return n=this._client.forwardingHost,this._client.forwardingHost=this._forwardingHost,e.p=1,e.n=2,t();case 2:return e.a(2,e.v);case 3:return e.p=3,this._client.forwardingHost=n,e.f(3);case 4:return e.a(2)}},e,this,[[1,,3,4]])})),function(e){return t.apply(this,arguments)})},{key:"wait",value:(e=dn(on().m(function e(){var t,n,r=this,o=arguments;return on().w(function(e){for(;;)if(0===e.n)return t=o.length>0&&void 0!==o[0]?o[0]:Nn,n=o.length>1&&void 0!==o[1]?o[1]:0,e.a(2,this.with_forwarding_host(function(){return r._client.wait_for_async_run(r,t,n)}))},e,this)})),function(){return e.apply(this,arguments)})}]);var e,t}();const Wn=Mn;export{Mn as AppMeshClient,jn as AppMeshError,zn as AppOutput,Cn as AppRemovedError,$n as AppRun,qn as DEFAULT_CA_FILE,kn as TransportDisconnectedError,Wn as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appmesh",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "JavaScript SDK for App Mesh (https://github.com/laoshanxi/app-mesh)",
|
|
5
5
|
"main": "./src/appmesh.js",
|
|
6
6
|
"module": "./dist/appmesh.esm.js",
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
"scripts": {
|
|
10
10
|
"lint": "prettier --write .",
|
|
11
11
|
"test": "node test/appmesh_test.js",
|
|
12
|
-
"test:
|
|
13
|
-
"test:oauth": "node test/appmesh_oauth_test.js",
|
|
12
|
+
"test:subscribe": "node test/subscribe_test.js",
|
|
14
13
|
"build": "webpack --config webpack.config.cjs --mode production",
|
|
15
14
|
"prepare": "npm run build",
|
|
16
15
|
"clean": "rm -rf dist"
|
|
@@ -39,11 +38,6 @@
|
|
|
39
38
|
"node": "./src/appmesh_tcp.js",
|
|
40
39
|
"import": null,
|
|
41
40
|
"default": null
|
|
42
|
-
},
|
|
43
|
-
"./oauth": {
|
|
44
|
-
"node": "./src/appmesh_oauth.js",
|
|
45
|
-
"import": "./src/appmesh_oauth.js",
|
|
46
|
-
"default": "./src/appmesh_oauth.js"
|
|
47
41
|
}
|
|
48
42
|
},
|
|
49
43
|
"repository": {
|
|
@@ -66,8 +60,7 @@
|
|
|
66
60
|
"npm": ">=6.0.0"
|
|
67
61
|
},
|
|
68
62
|
"dependencies": {
|
|
69
|
-
"axios": "^1.8.4"
|
|
70
|
-
"base-64": ">=1.0.0"
|
|
63
|
+
"axios": "^1.8.4"
|
|
71
64
|
},
|
|
72
65
|
"optionalDependencies": {
|
|
73
66
|
"msgpack-lite": "^0.1.26",
|
|
@@ -83,9 +76,6 @@
|
|
|
83
76
|
"webpack": "^5.89.0",
|
|
84
77
|
"webpack-cli": "^5.1.4"
|
|
85
78
|
},
|
|
86
|
-
"peerDependencies": {
|
|
87
|
-
"base-64": ">=1.0.0"
|
|
88
|
-
},
|
|
89
79
|
"directories": {
|
|
90
80
|
"test": "test"
|
|
91
81
|
},
|