newt-client-js 3.2.7 → 3.3.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 +15 -1
- package/dist/cjs/newtClient.js +1 -1
- package/dist/esm/newtClient.js +1 -1
- package/dist/types/createClient.d.ts +1 -1
- package/dist/types/errorHandler.d.ts +3 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/types.d.ts +14 -0
- package/dist/umd/newtClient.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -56,7 +56,11 @@ client
|
|
|
56
56
|
|
|
57
57
|
## Documentation & References
|
|
58
58
|
|
|
59
|
-
Please refer to the
|
|
59
|
+
Please refer to the following documents.
|
|
60
|
+
|
|
61
|
+
- [ガイド: SDK](https://www.newt.so/docs/js-sdk)
|
|
62
|
+
- [チュートリアル: NewtのAPIで利用できるクエリパラメータを理解して、様々なクエリを実行する](https://www.newt.so/docs/tutorials/understanding-query-parameters)
|
|
63
|
+
- [REST API reference](https://developers.newt.so/)
|
|
60
64
|
|
|
61
65
|
### Configuration
|
|
62
66
|
|
|
@@ -72,6 +76,13 @@ The `createClient` method supports several options you may set to achieve the ex
|
|
|
72
76
|
| `adapter` | `undefined` | Custom adapter to handle making the requests. Find further information in the axios request config documentation. <https://github.com/mzabriskie/axios#request-config> |
|
|
73
77
|
| `retryOnError` | `true` | By default, this client will retry if the response status is 429 too many requests or 500 server error. To turn off this behavior, set this to `false`. |
|
|
74
78
|
| `retryLimit` | `3` | The number of times to retry before failure. Please specify a value less than or equal to `10`. |
|
|
79
|
+
| `fetch` | `undefined` | You can specify a custom fetch function for the HTTP request like `globalThis.fetch` or `node-fetch`.<br />**Note that if you use the fetch option, the adapter option will be ignored and no retry will be performed.** |
|
|
80
|
+
|
|
81
|
+
You can choose to use axios or fetch for your request, whichever you prefer.<br />
|
|
82
|
+
<br />
|
|
83
|
+
If you do not specify the `fetch` option, the request will be made with axios, in which case the values specified for the options `adapter`, `retryOnError`, and `retryLimit` will be taken into account.<br />
|
|
84
|
+
<br />
|
|
85
|
+
If you set a value for the `fetch` option, the request will be made using fetch instead of axios. Note that in that case, the `adapter` option will not be taken into account and retries will not be performed.
|
|
75
86
|
|
|
76
87
|
### Get contents
|
|
77
88
|
|
|
@@ -175,6 +186,7 @@ By using the type Content, you can easily define the type.
|
|
|
175
186
|
* _sys: {
|
|
176
187
|
* createdAt: string;
|
|
177
188
|
* updatedAt: string;
|
|
189
|
+
* customOrder: number;
|
|
178
190
|
* raw: {
|
|
179
191
|
* createdAt: string;
|
|
180
192
|
* updatedAt: string;
|
|
@@ -221,6 +233,7 @@ client.getContents<Post>({
|
|
|
221
233
|
* _sys: {
|
|
222
234
|
* createdAt: string;
|
|
223
235
|
* updatedAt: string;
|
|
236
|
+
* customOrder: number;
|
|
224
237
|
* raw: {
|
|
225
238
|
* createdAt: string;
|
|
226
239
|
* updatedAt: string;
|
|
@@ -249,6 +262,7 @@ client
|
|
|
249
262
|
* _sys: {
|
|
250
263
|
* createdAt: string;
|
|
251
264
|
* updatedAt: string;
|
|
265
|
+
* customOrder: number;
|
|
252
266
|
* raw: {
|
|
253
267
|
* createdAt: string;
|
|
254
268
|
* updatedAt: string;
|
package/dist/cjs/newtClient.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("axios"),r=require("axios-retry"),t=require("qs");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("axios"),r=require("axios-retry"),t=require("qs");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=a(e),n=a(r);const s=e=>{let r={raw:"",encoded:""};e.and&&(r=(e=>{if(!e)throw new Error("invalid query");const r=[],t=[];return e.forEach((e=>{const{raw:a,encoded:o}=s(e);r.push(a),t.push(o)})),{raw:r.join("&"),encoded:t.join("&")}})(e.and),delete e.and);let a={raw:"",encoded:""};e.or&&(a=(e=>{if(!e)throw new Error("invalid query");const r=[];e.forEach((e=>{const{raw:t}=s(e);r.push(t)}));const t=new URLSearchParams;return t.set("[or]",`(${r.join(";")})`),{raw:`[or]=(${r.join(";")})`,encoded:t.toString()}})(e.or),delete e.or);const o=t.stringify(e,{encode:!1,arrayFormat:"comma"}),n=t.stringify(e,{arrayFormat:"comma"});return{raw:[o,a.raw,r.raw].filter((e=>e)).join("&"),encoded:[n,a.encoded,r.encoded].filter((e=>e)).join("&")}},i=e=>{if(!o.default.isAxiosError(e))throw e;const{config:r,response:t}=e;if(null==t||!t.data)throw e;const{data:a}=t,n={status:a.status,code:a.code,message:a.message};if(r&&(n.request={method:r.method,headers:r.headers},r.url)){const e=new URL(r.url,r.baseURL);n.request.url=e.toString()}const s=new Error;s.name=`${a.status} ${a.code}`;try{s.message=JSON.stringify(n,null,2)}catch{s.message=a.message}throw s},d=(e,r)=>{if(!(e=>{if("object"!=typeof e||null===e)return!1;const r=e;return"number"==typeof r.status&&"string"==typeof r.code&&"string"==typeof r.message})(e))throw e;const{status:t,code:a,message:o}=e,n={status:t,code:a,message:o,request:r},s=new Error;s.name=`${t} ${a}`;try{s.message=JSON.stringify(n,null,2)}catch{s.message=o}throw s};exports.createClient=({spaceUid:e,token:r,apiType:t="cdn",adapter:a,retryOnError:c=!0,retryLimit:u=3,fetch:h})=>{if(!e)throw new Error("spaceUid parameter is required.");if(!r)throw new Error("token parameter is required.");if(!["cdn","api"].includes(t))throw new Error(`apiType parameter should be set to "cdn" or "api". apiType: ${t}`);if(u>10)throw new Error("retryLimit should be a value less than or equal to 10.");const p=new URL(`https://${e}.${t}.newt.so`),l={Authorization:`Bearer ${r}`},w=o.default.create({baseURL:p.toString(),headers:l,adapter:a});c&&n.default(w,{retries:u,retryCondition:e=>{var r,t;return 429===(null===(r=e.response)||void 0===r?void 0:r.status)||500===(null===(t=e.response)||void 0===t?void 0:t.status)},retryDelay:e=>1e3*e});const m=async({appUid:e,modelUid:r,query:t})=>{if(!e)throw new Error("appUid parameter is required.");if(!r)throw new Error("modelUid parameter is required.");const a=new URL(`/v1/${e}/${r}`,p.toString());if(t&&Object.keys(t).length){const{encoded:e}=s(t);a.search=e}if(h){const e={method:"get",headers:l,url:a.toString()};try{const r=await h(a.toString(),{headers:l}),t=await r.json();return r.ok?t:d(t,e)}catch(r){return d(r,e)}}else try{const{data:e}=await w.get(a.pathname+a.search);return e}catch(e){return i(e)}};return{getContents:m,getContent:async({appUid:e,modelUid:r,contentId:t,query:a})=>{if(!e)throw new Error("appUid parameter is required.");if(!r)throw new Error("modelUid parameter is required.");if(!t)throw new Error("contentId parameter is required.");const o=new URL(`/v1/${e}/${r}/${t}`,p.toString());if(a&&Object.keys(a).length){const{encoded:e}=s(a);o.search=e}if(h){const e={method:"get",headers:l,url:o.toString()};try{const r=await h(o.toString(),{headers:l}),t=await r.json();return r.ok?t:d(t,e)}catch(r){return d(r,e)}}else try{const{data:e}=await w.get(o.pathname+o.search);return e}catch(e){return i(e)}},getFirstContent:async({appUid:e,modelUid:r,query:t})=>{if(t&&t.limit)throw new Error("query.limit parameter cannot have a value.");const a={...t,limit:1},{items:o}=await m({appUid:e,modelUid:r,query:a});return 0===o.length?null:o[0]},getApp:async({appUid:e})=>{if(!e)throw new Error("appUid parameter is required.");const r=new URL(`/v1/space/apps/${e}`,p.toString());if(h){const e={method:"get",headers:l,url:r.toString()};try{const t=await h(r.toString(),{headers:l}),a=await t.json();return t.ok?a:d(a,e)}catch(r){return d(r,e)}}else try{const{data:e}=await w.get(r.pathname);return e}catch(e){return i(e)}}}};
|
|
2
2
|
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmV3dENsaWVudC5qcyIsInNvdXJjZXMiOltdLCJzb3VyY2VzQ29udGVudCI6W10sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
package/dist/esm/newtClient.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"axios";import r from"axios-retry";import{stringify as t}from"qs";const
|
|
1
|
+
import e from"axios";import r from"axios-retry";import{stringify as t}from"qs";const o=e=>{let r={raw:"",encoded:""};e.and&&(r=(e=>{if(!e)throw new Error("invalid query");const r=[],t=[];return e.forEach((e=>{const{raw:a,encoded:n}=o(e);r.push(a),t.push(n)})),{raw:r.join("&"),encoded:t.join("&")}})(e.and),delete e.and);let a={raw:"",encoded:""};e.or&&(a=(e=>{if(!e)throw new Error("invalid query");const r=[];e.forEach((e=>{const{raw:t}=o(e);r.push(t)}));const t=new URLSearchParams;return t.set("[or]",`(${r.join(";")})`),{raw:`[or]=(${r.join(";")})`,encoded:t.toString()}})(e.or),delete e.or);const n=t(e,{encode:!1,arrayFormat:"comma"}),s=t(e,{arrayFormat:"comma"});return{raw:[n,a.raw,r.raw].filter((e=>e)).join("&"),encoded:[s,a.encoded,r.encoded].filter((e=>e)).join("&")}},a=r=>{if(!e.isAxiosError(r))throw r;const{config:t,response:o}=r;if(null==o||!o.data)throw r;const{data:a}=o,n={status:a.status,code:a.code,message:a.message};if(t&&(n.request={method:t.method,headers:t.headers},t.url)){const e=new URL(t.url,t.baseURL);n.request.url=e.toString()}const s=new Error;s.name=`${a.status} ${a.code}`;try{s.message=JSON.stringify(n,null,2)}catch{s.message=a.message}throw s},n=(e,r)=>{if(!(e=>{if("object"!=typeof e||null===e)return!1;const r=e;return"number"==typeof r.status&&"string"==typeof r.code&&"string"==typeof r.message})(e))throw e;const{status:t,code:o,message:a}=e,n={status:t,code:o,message:a,request:r},s=new Error;s.name=`${t} ${o}`;try{s.message=JSON.stringify(n,null,2)}catch{s.message=a}throw s},s=t=>{let{spaceUid:s,token:i,apiType:d="cdn",adapter:c,retryOnError:u=!0,retryLimit:h=3,fetch:p}=t;if(!s)throw new Error("spaceUid parameter is required.");if(!i)throw new Error("token parameter is required.");if(!["cdn","api"].includes(d))throw new Error(`apiType parameter should be set to "cdn" or "api". apiType: ${d}`);if(h>10)throw new Error("retryLimit should be a value less than or equal to 10.");const w=new URL(`https://${s}.${d}.newt.so`),l={Authorization:`Bearer ${i}`},m=e.create({baseURL:w.toString(),headers:l,adapter:c});u&&r(m,{retries:h,retryCondition:e=>{var r,t;return 429===(null===(r=e.response)||void 0===r?void 0:r.status)||500===(null===(t=e.response)||void 0===t?void 0:t.status)},retryDelay:e=>1e3*e});const g=async e=>{let{appUid:r,modelUid:t,query:s}=e;if(!r)throw new Error("appUid parameter is required.");if(!t)throw new Error("modelUid parameter is required.");const i=new URL(`/v1/${r}/${t}`,w.toString());if(s&&Object.keys(s).length){const{encoded:e}=o(s);i.search=e}if(p){const e={method:"get",headers:l,url:i.toString()};try{const r=await p(i.toString(),{headers:l}),t=await r.json();return r.ok?t:n(t,e)}catch(r){return n(r,e)}}else try{const{data:e}=await m.get(i.pathname+i.search);return e}catch(e){return a(e)}};return{getContents:g,getContent:async e=>{let{appUid:r,modelUid:t,contentId:s,query:i}=e;if(!r)throw new Error("appUid parameter is required.");if(!t)throw new Error("modelUid parameter is required.");if(!s)throw new Error("contentId parameter is required.");const d=new URL(`/v1/${r}/${t}/${s}`,w.toString());if(i&&Object.keys(i).length){const{encoded:e}=o(i);d.search=e}if(p){const e={method:"get",headers:l,url:d.toString()};try{const r=await p(d.toString(),{headers:l}),t=await r.json();return r.ok?t:n(t,e)}catch(r){return n(r,e)}}else try{const{data:e}=await m.get(d.pathname+d.search);return e}catch(e){return a(e)}},getFirstContent:async e=>{let{appUid:r,modelUid:t,query:o}=e;if(o&&o.limit)throw new Error("query.limit parameter cannot have a value.");const a={...o,limit:1},{items:n}=await g({appUid:r,modelUid:t,query:a});return 0===n.length?null:n[0]},getApp:async e=>{let{appUid:r}=e;if(!r)throw new Error("appUid parameter is required.");const t=new URL(`/v1/space/apps/${r}`,w.toString());if(p){const e={method:"get",headers:l,url:t.toString()};try{const r=await p(t.toString(),{headers:l}),o=await r.json();return r.ok?o:n(o,e)}catch(r){return n(r,e)}}else try{const{data:e}=await m.get(t.pathname);return e}catch(e){return a(e)}}}};export{s as createClient};
|
|
2
2
|
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmV3dENsaWVudC5qcyIsInNvdXJjZXMiOltdLCJzb3VyY2VzQ29udGVudCI6W10sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CreateClientParams, GetContentsParams, GetContentParams, GetFirstContentParams, Contents, GetAppParams, AppMeta } from './types';
|
|
2
|
-
export declare const createClient: ({ spaceUid, token, apiType, adapter, retryOnError, retryLimit, }: CreateClientParams) => {
|
|
2
|
+
export declare const createClient: ({ spaceUid, token, apiType, adapter, retryOnError, retryLimit, fetch, }: CreateClientParams) => {
|
|
3
3
|
getContents: <T>({ appUid, modelUid, query, }: GetContentsParams) => Promise<Contents<T>>;
|
|
4
4
|
getContent: <T_1>({ appUid, modelUid, contentId, query, }: GetContentParams) => Promise<T_1>;
|
|
5
5
|
getFirstContent: <T_2>({ appUid, modelUid, query, }: GetFirstContentParams) => Promise<T_2 | null>;
|
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import type { ErrorRequest } from './types';
|
|
2
|
+
export declare const axiosErrorHandler: (errorResponse: unknown) => never;
|
|
3
|
+
export declare const fetchErrorHandler: (errorResponse: unknown, errorRequest: ErrorRequest) => never;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { createClient } from './createClient';
|
|
2
|
-
export { CreateClientParams, Client, GetContentsParams, GetContentParams, GetFirstContentParams, GetContentsQuery, GetContentQuery, GetFirstContentQuery, Contents, Content, Image, File, Media, AppMeta, AppCover, AppIcon, GetAppParams, } from './types';
|
|
2
|
+
export { CreateClientParams, Client, GetContentsParams, GetContentParams, GetFirstContentParams, GetContentsQuery, GetContentQuery, GetFirstContentQuery, Contents, Content, Image, File, Media, AppMeta, AppCover, AppIcon, GetAppParams, NewtError, ErrorRequest, ErrorResponse, } from './types';
|
package/dist/types/types.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export interface CreateClientParams {
|
|
|
6
6
|
adapter?: AxiosAdapter;
|
|
7
7
|
retryOnError?: boolean;
|
|
8
8
|
retryLimit?: number;
|
|
9
|
+
fetch?: typeof fetch;
|
|
9
10
|
}
|
|
10
11
|
export interface Client {
|
|
11
12
|
getContents: <T>(params: GetContentsParams) => Promise<Contents<T>>;
|
|
@@ -146,4 +147,17 @@ export interface AppMeta {
|
|
|
146
147
|
export interface GetAppParams {
|
|
147
148
|
appUid: string;
|
|
148
149
|
}
|
|
150
|
+
export interface NewtError {
|
|
151
|
+
status: number;
|
|
152
|
+
code: string;
|
|
153
|
+
message: string;
|
|
154
|
+
}
|
|
155
|
+
export interface ErrorRequest {
|
|
156
|
+
method?: string;
|
|
157
|
+
headers?: Record<string, string>;
|
|
158
|
+
url?: string;
|
|
159
|
+
}
|
|
160
|
+
export interface ErrorResponse extends NewtError {
|
|
161
|
+
request?: ErrorRequest;
|
|
162
|
+
}
|
|
149
163
|
export {};
|
package/dist/umd/newtClient.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).newtClient={})}(this,(function(e){"use strict";function t(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})})),t}var r={exports:{}},n=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}},o=n,i=Object.prototype.toString;function a(e){return Array.isArray(e)}function c(e){return void 0===e}function u(e){return"[object ArrayBuffer]"===i.call(e)}function s(e){return null!==e&&"object"==typeof e}function f(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function p(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var y={isArray:a,isArrayBuffer:u,isBuffer:function(e){return null!==e&&!c(e)&&null!==e.constructor&&!c(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"[object FormData]"===i.call(e)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&u(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:s,isPlainObject:f,isUndefined:c,isDate:function(e){return"[object Date]"===i.call(e)},isFile:function(e){return"[object File]"===i.call(e)},isBlob:function(e){return"[object Blob]"===i.call(e)},isFunction:p,isStream:function(e){return s(e)&&p(e.pipe)},isURLSearchParams:function(e){return"[object URLSearchParams]"===i.call(e)},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:l,merge:function e(){var t={};function r(r,n){f(t[n])&&f(r)?t[n]=e(t[n],r):f(r)?t[n]=e({},r):a(r)?t[n]=r.slice():t[n]=r}for(var n=0,o=arguments.length;n<o;n++)l(arguments[n],r);return t},extend:function(e,t,r){return l(t,(function(t,n){e[n]=r&&"function"==typeof t?o(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}},d=y;function h(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var m=function(e,t,r){if(!t)return e;var n;if(r)n=r(t);else if(d.isURLSearchParams(t))n=t.toString();else{var o=[];d.forEach(t,(function(e,t){null!=e&&(d.isArray(e)?t+="[]":e=[e],d.forEach(e,(function(e){d.isDate(e)?e=e.toISOString():d.isObject(e)&&(e=JSON.stringify(e)),o.push(h(t)+"="+h(e))})))})),n=o.join("&")}if(n){var i=e.indexOf("#");-1!==i&&(e=e.slice(0,i)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e},g=y;function b(){this.handlers=[]}b.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},b.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},b.prototype.forEach=function(e){g.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var v=b,E=y,w=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e},S={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},O=w,j=function(e,t,r,n,o){var i=new Error(e);return O(i,t,r,n,o)},A=j,P=y,R=P.isStandardBrowserEnv()?{write:function(e,t,r,n,o,i){var a=[];a.push(e+"="+encodeURIComponent(t)),P.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),P.isString(n)&&a.push("path="+n),P.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},_=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},N=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},T=y,x=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],U=y,C=U.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=U.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0};function I(e){this.message=e}I.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},I.prototype.__CANCEL__=!0;var L=I,D=y,k=function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(A("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)},F=R,B=m,M=function(e,t){return e&&!_(t)?N(e,t):t},q=function(e){var t,r,n,o={};return e?(T.forEach(e.split("\n"),(function(e){if(n=e.indexOf(":"),t=T.trim(e.substr(0,n)).toLowerCase(),r=T.trim(e.substr(n+1)),t){if(o[t]&&x.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([r]):o[t]?o[t]+", "+r:r}})),o):o},W=C,H=j,G=S,$=L,V=function(e){return new Promise((function(t,r){var n,o=e.data,i=e.headers,a=e.responseType;function c(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}D.isFormData(o)&&delete i["Content-Type"];var u=new XMLHttpRequest;if(e.auth){var s=e.auth.username||"",f=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.Authorization="Basic "+btoa(s+":"+f)}var p=M(e.baseURL,e.url);function l(){if(u){var n="getAllResponseHeaders"in u?q(u.getAllResponseHeaders()):null,o={data:a&&"text"!==a&&"json"!==a?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:n,config:e,request:u};k((function(e){t(e),c()}),(function(e){r(e),c()}),o),u=null}}if(u.open(e.method.toUpperCase(),B(p,e.params,e.paramsSerializer),!0),u.timeout=e.timeout,"onloadend"in u?u.onloadend=l:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(l)},u.onabort=function(){u&&(r(H("Request aborted",e,"ECONNABORTED",u)),u=null)},u.onerror=function(){r(H("Network Error",e,null,u)),u=null},u.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||G;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(H(t,e,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",u)),u=null},D.isStandardBrowserEnv()){var y=(e.withCredentials||W(p))&&e.xsrfCookieName?F.read(e.xsrfCookieName):void 0;y&&(i[e.xsrfHeaderName]=y)}"setRequestHeader"in u&&D.forEach(i,(function(e,t){void 0===o&&"content-type"===t.toLowerCase()?delete i[t]:u.setRequestHeader(t,e)})),D.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),a&&"json"!==a&&(u.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&u.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(n=function(e){u&&(r(!e||e&&e.type?new $("canceled"):e),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n))),o||(o=null),u.send(o)}))},z=y,J=function(e,t){E.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))},Q=w,X={"Content-Type":"application/x-www-form-urlencoded"};function Y(e,t){!z.isUndefined(e)&&z.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var K,Z={transitional:S,adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(K=V),K),transformRequest:[function(e,t){return J(t,"Accept"),J(t,"Content-Type"),z.isFormData(e)||z.isArrayBuffer(e)||z.isBuffer(e)||z.isStream(e)||z.isFile(e)||z.isBlob(e)?e:z.isArrayBufferView(e)?e.buffer:z.isURLSearchParams(e)?(Y(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):z.isObject(e)||t&&"application/json"===t["Content-Type"]?(Y(t,"application/json"),function(e,t,r){if(z.isString(e))try{return(t||JSON.parse)(e),z.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||Z.transitional,r=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,o=!r&&"json"===this.responseType;if(o||n&&z.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw Q(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};z.forEach(["delete","get","head"],(function(e){Z.headers[e]={}})),z.forEach(["post","put","patch"],(function(e){Z.headers[e]=z.merge(X)}));var ee=Z,te=y,re=ee,ne=function(e){return!(!e||!e.__CANCEL__)},oe=y,ie=function(e,t,r){var n=this||re;return te.forEach(r,(function(r){e=r.call(n,e,t)})),e},ae=ne,ce=ee,ue=L;function se(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ue("canceled")}var fe=y,pe=function(e,t){t=t||{};var r={};function n(e,t){return fe.isPlainObject(e)&&fe.isPlainObject(t)?fe.merge(e,t):fe.isPlainObject(t)?fe.merge({},t):fe.isArray(t)?t.slice():t}function o(r){return fe.isUndefined(t[r])?fe.isUndefined(e[r])?void 0:n(void 0,e[r]):n(e[r],t[r])}function i(e){if(!fe.isUndefined(t[e]))return n(void 0,t[e])}function a(r){return fe.isUndefined(t[r])?fe.isUndefined(e[r])?void 0:n(void 0,e[r]):n(void 0,t[r])}function c(r){return r in t?n(e[r],t[r]):r in e?n(void 0,e[r]):void 0}var u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c};return fe.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||o,n=t(e);fe.isUndefined(n)&&t!==c||(r[e]=n)})),r},le="0.26.1",ye=le,de={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){de[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var he={};de.transitional=function(e,t,r){function n(e,t){return"[Axios v"+ye+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,o,i){if(!1===e)throw new Error(n(o," has been removed"+(t?" in "+t:"")));return t&&!he[o]&&(he[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}};var me={assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),o=n.length;o-- >0;){var i=n[o],a=t[i];if(a){var c=e[i],u=void 0===c||a(c,i,e);if(!0!==u)throw new TypeError("option "+i+" must be "+u)}else if(!0!==r)throw Error("Unknown option "+i)}},validators:de},ge=y,be=m,ve=v,Ee=function(e){return se(e),e.headers=e.headers||{},e.data=ie.call(e,e.data,e.headers,e.transformRequest),e.headers=oe.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),oe.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||ce.adapter)(e).then((function(t){return se(e),t.data=ie.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return ae(t)||(se(e),t&&t.response&&(t.response.data=ie.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},we=pe,Se=me,Oe=Se.validators;function je(e){this.defaults=e,this.interceptors={request:new ve,response:new ve}}je.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=we(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&Se.assertOptions(r,{silentJSONParsing:Oe.transitional(Oe.boolean),forcedJSONParsing:Oe.transitional(Oe.boolean),clarifyTimeoutError:Oe.transitional(Oe.boolean)},!1);var n=[],o=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var i,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!o){var c=[Ee,void 0];for(Array.prototype.unshift.apply(c,n),c=c.concat(a),i=Promise.resolve(t);c.length;)i=i.then(c.shift(),c.shift());return i}for(var u=t;n.length;){var s=n.shift(),f=n.shift();try{u=s(u)}catch(e){f(e);break}}try{i=Ee(u)}catch(e){return Promise.reject(e)}for(;a.length;)i=i.then(a.shift(),a.shift());return i},je.prototype.getUri=function(e){return e=we(this.defaults,e),be(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},ge.forEach(["delete","get","head","options"],(function(e){je.prototype[e]=function(t,r){return this.request(we(r||{},{method:e,url:t,data:(r||{}).data}))}})),ge.forEach(["post","put","patch"],(function(e){je.prototype[e]=function(t,r,n){return this.request(we(n||{},{method:e,url:t,data:r}))}}));var Ae=je,Pe=L;function Re(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t<n;t++)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e){r.reason||(r.reason=new Pe(e),t(r.reason))}))}Re.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},Re.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},Re.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},Re.source=function(){var e;return{token:new Re((function(t){e=t})),cancel:e}};var _e=Re,Ne=y,Te=y,xe=n,Ue=Ae,Ce=pe;var Ie=function e(t){var r=new Ue(t),n=xe(Ue.prototype.request,r);return Te.extend(n,Ue.prototype,r),Te.extend(n,r),n.create=function(r){return e(Ce(t,r))},n}(ee);Ie.Axios=Ue,Ie.Cancel=L,Ie.CancelToken=_e,Ie.isCancel=ne,Ie.VERSION=le,Ie.all=function(e){return Promise.all(e)},Ie.spread=function(e){return function(t){return e.apply(null,t)}},Ie.isAxiosError=function(e){return Ne.isObject(e)&&!0===e.isAxiosError},r.exports=Ie,r.exports.default=Ie;var Le=r.exports;const De=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);function ke(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void r(e)}c.done?t(u):Promise.resolve(u).then(n,o)}function Fe(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){ke(i,n,o,a,c,"next",e)}function c(e){ke(i,n,o,a,c,"throw",e)}a(void 0)}))}}function Be(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Me(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(r),!0).forEach((function(t){qe(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function qe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var We="axios-retry";function He(e){return!e.response&&Boolean(e.code)&&"ECONNABORTED"!==e.code&&(e=>!De.has(e&&e.code))(e)}var Ge=["get","head","options"],$e=Ge.concat(["put","delete"]);function Ve(e){return"ECONNABORTED"!==e.code&&(!e.response||e.response.status>=500&&e.response.status<=599)}function ze(e){return!!e.config&&(Ve(e)&&-1!==$e.indexOf(e.config.method))}function Je(e){return He(e)||ze(e)}function Qe(){return 0}function Xe(e){var t=e[We]||{};return t.retryCount=t.retryCount||0,e[We]=t,t}function Ye(){return(Ye=Fe((function*(e,t,r,n){var o=r.retryCount<e&&t(n);if("object"==typeof o)try{return yield o,!0}catch(e){return!1}return o}))).apply(this,arguments)}function Ke(e,t){e.interceptors.request.use((e=>(Xe(e).lastRequestTime=Date.now(),e))),e.interceptors.response.use(null,function(){var r=Fe((function*(r){var{config:n}=r;if(!n)return Promise.reject(r);var{retries:o=3,retryCondition:i=Je,retryDelay:a=Qe,shouldResetTimeout:c=!1}=function(e,t){return Me(Me({},t),e[We])}(n,t),u=Xe(n);if(yield function(e,t,r,n){return Ye.apply(this,arguments)}(o,i,u,r)){u.retryCount+=1;var s=a(u.retryCount,r);if(function(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}(e,n),!c&&n.timeout&&u.lastRequestTime){var f=Date.now()-u.lastRequestTime;n.timeout=Math.max(n.timeout-f-s,1)}return n.transformRequest=[e=>e],new Promise((t=>setTimeout((()=>t(e(n))),s)))}return Promise.reject(r)}));return function(e){return r.apply(this,arguments)}}())}Ke.isNetworkError=He,Ke.isSafeRequestError=function(e){return!!e.config&&(Ve(e)&&-1!==Ge.indexOf(e.config.method))},Ke.isIdempotentRequestError=ze,Ke.isNetworkOrIdempotentRequestError=Je,Ke.exponentialDelay=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=100*Math.pow(2,e),r=.2*t*Math.random();return t+r},Ke.isRetryableError=Ve;var Ze,et="undefined"!=typeof Symbol&&Symbol,tt=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0},rt="Function.prototype.bind called on incompatible ",nt=Array.prototype.slice,ot=Object.prototype.toString,it="[object Function]",at=function(e){var t=this;if("function"!=typeof t||ot.call(t)!==it)throw new TypeError(rt+t);for(var r,n=nt.call(arguments,1),o=function(){if(this instanceof r){var o=t.apply(this,n.concat(nt.call(arguments)));return Object(o)===o?o:this}return t.apply(e,n.concat(nt.call(arguments)))},i=Math.max(0,t.length-n.length),a=[],c=0;c<i;c++)a.push("$"+c);if(r=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(o),t.prototype){var u=function(){};u.prototype=t.prototype,r.prototype=new u,u.prototype=null}return r},ct=Function.prototype.bind||at,ut=ct.call(Function.call,Object.prototype.hasOwnProperty),st=SyntaxError,ft=Function,pt=TypeError,lt=function(e){try{return ft('"use strict"; return ('+e+").constructor;")()}catch(e){}},yt=Object.getOwnPropertyDescriptor;if(yt)try{yt({},"")}catch(e){yt=null}var dt=function(){throw new pt},ht=yt?function(){try{return dt}catch(e){try{return yt(arguments,"callee").get}catch(e){return dt}}}():dt,mt="function"==typeof et&&"function"==typeof Symbol&&"symbol"==typeof et("foo")&&"symbol"==typeof Symbol("bar")&&tt(),gt=Object.getPrototypeOf||function(e){return e.__proto__},bt={},vt="undefined"==typeof Uint8Array?Ze:gt(Uint8Array),Et={"%AggregateError%":"undefined"==typeof AggregateError?Ze:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?Ze:ArrayBuffer,"%ArrayIteratorPrototype%":mt?gt([][Symbol.iterator]()):Ze,"%AsyncFromSyncIteratorPrototype%":Ze,"%AsyncFunction%":bt,"%AsyncGenerator%":bt,"%AsyncGeneratorFunction%":bt,"%AsyncIteratorPrototype%":bt,"%Atomics%":"undefined"==typeof Atomics?Ze:Atomics,"%BigInt%":"undefined"==typeof BigInt?Ze:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?Ze:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?Ze:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?Ze:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?Ze:FinalizationRegistry,"%Function%":ft,"%GeneratorFunction%":bt,"%Int8Array%":"undefined"==typeof Int8Array?Ze:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?Ze:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?Ze:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":mt?gt(gt([][Symbol.iterator]())):Ze,"%JSON%":"object"==typeof JSON?JSON:Ze,"%Map%":"undefined"==typeof Map?Ze:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&mt?gt((new Map)[Symbol.iterator]()):Ze,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?Ze:Promise,"%Proxy%":"undefined"==typeof Proxy?Ze:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?Ze:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?Ze:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&mt?gt((new Set)[Symbol.iterator]()):Ze,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?Ze:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":mt?gt(""[Symbol.iterator]()):Ze,"%Symbol%":mt?Symbol:Ze,"%SyntaxError%":st,"%ThrowTypeError%":ht,"%TypedArray%":vt,"%TypeError%":pt,"%Uint8Array%":"undefined"==typeof Uint8Array?Ze:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?Ze:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?Ze:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?Ze:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?Ze:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?Ze:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?Ze:WeakSet},wt=function e(t){var r;if("%AsyncFunction%"===t)r=lt("async function () {}");else if("%GeneratorFunction%"===t)r=lt("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=lt("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(r=gt(o.prototype))}return Et[t]=r,r},St={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Ot=ct,jt=ut,At=Ot.call(Function.call,Array.prototype.concat),Pt=Ot.call(Function.apply,Array.prototype.splice),Rt=Ot.call(Function.call,String.prototype.replace),_t=Ot.call(Function.call,String.prototype.slice),Nt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Tt=/\\(\\)?/g,xt=function(e){var t=_t(e,0,1),r=_t(e,-1);if("%"===t&&"%"!==r)throw new st("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new st("invalid intrinsic syntax, expected opening `%`");var n=[];return Rt(e,Nt,(function(e,t,r,o){n[n.length]=r?Rt(o,Tt,"$1"):t||e})),n},Ut=function(e,t){var r,n=e;if(jt(St,n)&&(n="%"+(r=St[n])[0]+"%"),jt(Et,n)){var o=Et[n];if(o===bt&&(o=wt(n)),void 0===o&&!t)throw new pt("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new st("intrinsic "+e+" does not exist!")},Ct=function(e,t){if("string"!=typeof e||0===e.length)throw new pt("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new pt('"allowMissing" argument must be a boolean');var r=xt(e),n=r.length>0?r[0]:"",o=Ut("%"+n+"%",t),i=o.name,a=o.value,c=!1,u=o.alias;u&&(n=u[0],Pt(r,At([0,1],u)));for(var s=1,f=!0;s<r.length;s+=1){var p=r[s],l=_t(p,0,1),y=_t(p,-1);if(('"'===l||"'"===l||"`"===l||'"'===y||"'"===y||"`"===y)&&l!==y)throw new st("property names with quotes must have matching quotes");if("constructor"!==p&&f||(c=!0),jt(Et,i="%"+(n+="."+p)+"%"))a=Et[i];else if(null!=a){if(!(p in a)){if(!t)throw new pt("base intrinsic for "+e+" exists, but the property is not available.");return}if(yt&&s+1>=r.length){var d=yt(a,p);a=(f=!!d)&&"get"in d&&!("originalValue"in d.get)?d.get:a[p]}else f=jt(a,p),a=a[p];f&&!c&&(Et[i]=a)}}return a},It={exports:{}};!function(e){var t=ct,r=Ct,n=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||t.call(o,n),a=r("%Object.getOwnPropertyDescriptor%",!0),c=r("%Object.defineProperty%",!0),u=r("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var r=i(t,o,arguments);if(a&&c){var n=a(r,"length");n.configurable&&c(r,"length",{value:1+u(0,e.length-(arguments.length-1))})}return r};var s=function(){return i(t,n,arguments)};c?c(e.exports,"apply",{value:s}):e.exports.apply=s}(It);var Lt=Ct,Dt=It.exports,kt=Dt(Lt("String.prototype.indexOf")),Ft=t(Object.freeze({__proto__:null,default:{}})),Bt="function"==typeof Map&&Map.prototype,Mt=Object.getOwnPropertyDescriptor&&Bt?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,qt=Bt&&Mt&&"function"==typeof Mt.get?Mt.get:null,Wt=Bt&&Map.prototype.forEach,Ht="function"==typeof Set&&Set.prototype,Gt=Object.getOwnPropertyDescriptor&&Ht?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,$t=Ht&&Gt&&"function"==typeof Gt.get?Gt.get:null,Vt=Ht&&Set.prototype.forEach,zt="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,Jt="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,Qt="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,Xt=Boolean.prototype.valueOf,Yt=Object.prototype.toString,Kt=Function.prototype.toString,Zt=String.prototype.match,er="function"==typeof BigInt?BigInt.prototype.valueOf:null,tr=Object.getOwnPropertySymbols,rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,nr="function"==typeof Symbol&&"object"==typeof Symbol.iterator,or=Object.prototype.propertyIsEnumerable,ir=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null),ar=Ft.custom,cr=ar&&lr(ar)?ar:null,ur="function"==typeof Symbol&&void 0!==Symbol.toStringTag?Symbol.toStringTag:null;function sr(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function fr(e){return String(e).replace(/"/g,""")}function pr(e){return!("[object Array]"!==hr(e)||ur&&"object"==typeof e&&ur in e)}function lr(e){if(nr)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!rr)return!1;try{return rr.call(e),!0}catch(e){}return!1}var yr=Object.prototype.hasOwnProperty||function(e){return e in this};function dr(e,t){return yr.call(e,t)}function hr(e){return Yt.call(e)}function mr(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function gr(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return gr(e.slice(0,t.maxStringLength),t)+n}return sr(e.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,br),"single",t)}function br(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+t.toString(16).toUpperCase()}function vr(e){return"Object("+e+")"}function Er(e){return e+" { ? }"}function wr(e,t,r,n){return e+" ("+t+") {"+(n?Sr(r,n):r.join(", "))+"}"}function Sr(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+e.join(","+r)+"\n"+t.prev}function Or(e,t){var r=pr(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=dr(e,o)?t(e[o],e):""}var i,a="function"==typeof tr?tr(e):[];if(nr){i={};for(var c=0;c<a.length;c++)i["$"+a[c]]=a[c]}for(var u in e)dr(e,u)&&(r&&String(Number(u))===u&&u<e.length||nr&&i["$"+u]instanceof Symbol||(/[^\w$]/.test(u)?n.push(t(u,e)+": "+t(e[u],e)):n.push(u+": "+t(e[u],e))));if("function"==typeof tr)for(var s=0;s<a.length;s++)or.call(e,a[s])&&n.push("["+t(a[s])+"]: "+t(e[a[s]],e));return n}var jr=Ct,Ar=function(e,t){var r=Lt(e,!!t);return"function"==typeof r&&kt(e,".prototype.")>-1?Dt(r):r},Pr=function e(t,r,n,o){var i=r||{};if(dr(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(dr(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!dr(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(dr(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return gr(t,i);if("number"==typeof t)return 0===t?1/0/t>0?"0":"-0":String(t);if("bigint"==typeof t)return String(t)+"n";var c=void 0===i.depth?5:i.depth;if(void 0===n&&(n=0),n>=c&&c>0&&"object"==typeof t)return pr(t)?"[Array]":"[Object]";var u=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=Array(e.indent+1).join(" ")}return{base:r,prev:Array(t+1).join(r)}}(i,n);if(void 0===o)o=[];else if(mr(o,t)>=0)return"[Circular]";function s(t,r,a){if(r&&(o=o.slice()).push(r),a){var c={depth:i.depth};return dr(i,"quoteStyle")&&(c.quoteStyle=i.quoteStyle),e(t,c,n+1,o)}return e(t,i,n+1,o)}if("function"==typeof t){var f=function(e){if(e.name)return e.name;var t=Zt.call(Kt.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),p=Or(t,s);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(p.length>0?" { "+p.join(", ")+" }":"")}if(lr(t)){var l=nr?String(t).replace(/^(Symbol\(.*\))_[^)]*$/,"$1"):rr.call(t);return"object"!=typeof t||nr?l:vr(l)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var y="<"+String(t.nodeName).toLowerCase(),d=t.attributes||[],h=0;h<d.length;h++)y+=" "+d[h].name+"="+sr(fr(d[h].value),"double",i);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+String(t.nodeName).toLowerCase()+">"}if(pr(t)){if(0===t.length)return"[]";var m=Or(t,s);return u&&!function(e){for(var t=0;t<e.length;t++)if(mr(e[t],"\n")>=0)return!1;return!0}(m)?"["+Sr(m,u)+"]":"[ "+m.join(", ")+" ]"}if(function(e){return!("[object Error]"!==hr(e)||ur&&"object"==typeof e&&ur in e)}(t)){var g=Or(t,s);return 0===g.length?"["+String(t)+"]":"{ ["+String(t)+"] "+g.join(", ")+" }"}if("object"==typeof t&&a){if(cr&&"function"==typeof t[cr])return t[cr]();if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!qt||!e||"object"!=typeof e)return!1;try{qt.call(e);try{$t.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var b=[];return Wt.call(t,(function(e,r){b.push(s(r,t,!0)+" => "+s(e,t))})),wr("Map",qt.call(t),b,u)}if(function(e){if(!$t||!e||"object"!=typeof e)return!1;try{$t.call(e);try{qt.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var v=[];return Vt.call(t,(function(e){v.push(s(e,t))})),wr("Set",$t.call(t),v,u)}if(function(e){if(!zt||!e||"object"!=typeof e)return!1;try{zt.call(e,zt);try{Jt.call(e,Jt)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Er("WeakMap");if(function(e){if(!Jt||!e||"object"!=typeof e)return!1;try{Jt.call(e,Jt);try{zt.call(e,zt)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Er("WeakSet");if(function(e){if(!Qt||!e||"object"!=typeof e)return!1;try{return Qt.call(e),!0}catch(e){}return!1}(t))return Er("WeakRef");if(function(e){return!("[object Number]"!==hr(e)||ur&&"object"==typeof e&&ur in e)}(t))return vr(s(Number(t)));if(function(e){if(!e||"object"!=typeof e||!er)return!1;try{return er.call(e),!0}catch(e){}return!1}(t))return vr(s(er.call(t)));if(function(e){return!("[object Boolean]"!==hr(e)||ur&&"object"==typeof e&&ur in e)}(t))return vr(Xt.call(t));if(function(e){return!("[object String]"!==hr(e)||ur&&"object"==typeof e&&ur in e)}(t))return vr(s(String(t)));if(!function(e){return!("[object Date]"!==hr(e)||ur&&"object"==typeof e&&ur in e)}(t)&&!function(e){return!("[object RegExp]"!==hr(e)||ur&&"object"==typeof e&&ur in e)}(t)){var E=Or(t,s),w=ir?ir(t)===Object.prototype:t instanceof Object||t.constructor===Object,S=t instanceof Object?"":"null prototype",O=!w&&ur&&Object(t)===t&&ur in t?hr(t).slice(8,-1):S?"Object":"",j=(w||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(O||S?"["+[].concat(O||[],S||[]).join(": ")+"] ":"");return 0===E.length?j+"{}":u?j+"{"+Sr(E,u)+"}":j+"{ "+E.join(", ")+" }"}return String(t)},Rr=jr("%TypeError%"),_r=jr("%WeakMap%",!0),Nr=jr("%Map%",!0),Tr=Ar("WeakMap.prototype.get",!0),xr=Ar("WeakMap.prototype.set",!0),Ur=Ar("WeakMap.prototype.has",!0),Cr=Ar("Map.prototype.get",!0),Ir=Ar("Map.prototype.set",!0),Lr=Ar("Map.prototype.has",!0),Dr=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},kr=String.prototype.replace,Fr=/%20/g,Br="RFC3986",Mr={default:Br,formatters:{RFC1738:function(e){return kr.call(e,Fr,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:Br},qr=Mr,Wr=Object.prototype.hasOwnProperty,Hr=Array.isArray,Gr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),$r=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},Vr={arrayToObject:$r,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],a=Object.keys(i),c=0;c<a.length;++c){var u=a[c],s=i[u];"object"==typeof s&&null!==s&&-1===r.indexOf(s)&&(t.push({obj:i,prop:u}),r.push(s))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(Hr(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,n,o){if(0===e.length)return e;var i=e;if("symbol"==typeof e?i=Symbol.prototype.toString.call(e):"string"!=typeof e&&(i=String(e)),"iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var a="",c=0;c<i.length;++c){var u=i.charCodeAt(c);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===qr.RFC1738&&(40===u||41===u)?a+=i.charAt(c):u<128?a+=Gr[u]:u<2048?a+=Gr[192|u>>6]+Gr[128|63&u]:u<55296||u>=57344?a+=Gr[224|u>>12]+Gr[128|u>>6&63]+Gr[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&i.charCodeAt(c)),a+=Gr[240|u>>18]+Gr[128|u>>12&63]+Gr[128|u>>6&63]+Gr[128|63&u])}return a},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(Hr(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(Hr(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!Wr.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var o=t;return Hr(t)&&!Hr(r)&&(o=$r(t,n)),Hr(t)&&Hr(r)?(r.forEach((function(r,o){if(Wr.call(t,o)){var i=t[o];i&&"object"==typeof i&&r&&"object"==typeof r?t[o]=e(i,r,n):t.push(r)}else t[o]=r})),t):Object.keys(r).reduce((function(t,o){var i=r[o];return Wr.call(t,o)?t[o]=e(t[o],i,n):t[o]=i,t}),o)}},zr=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new Rr("Side channel does not contain "+Pr(e))},get:function(n){if(_r&&n&&("object"==typeof n||"function"==typeof n)){if(e)return Tr(e,n)}else if(Nr){if(t)return Cr(t,n)}else if(r)return function(e,t){var r=Dr(e,t);return r&&r.value}(r,n)},has:function(n){if(_r&&n&&("object"==typeof n||"function"==typeof n)){if(e)return Ur(e,n)}else if(Nr){if(t)return Lr(t,n)}else if(r)return function(e,t){return!!Dr(e,t)}(r,n);return!1},set:function(n,o){_r&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new _r),xr(e,n,o)):Nr?(t||(t=new Nr),Ir(t,n,o)):(r||(r={key:{},next:null}),function(e,t,r){var n=Dr(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,o))}};return n},Jr=Vr,Qr=Mr,Xr=Object.prototype.hasOwnProperty,Yr={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},Kr=Array.isArray,Zr=String.prototype.split,en=Array.prototype.push,tn=function(e,t){en.apply(e,Kr(t)?t:[t])},rn=Date.prototype.toISOString,nn=Qr.default,on={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Jr.encode,encodeValuesOnly:!1,format:nn,formatter:Qr.formatters[nn],indices:!1,serializeDate:function(e){return rn.call(e)},skipNulls:!1,strictNullHandling:!1},an={},cn=function e(t,r,n,o,i,a,c,u,s,f,p,l,y,d,h){for(var m,g=t,b=h,v=0,E=!1;void 0!==(b=b.get(an))&&!E;){var w=b.get(t);if(v+=1,void 0!==w){if(w===v)throw new RangeError("Cyclic object value");E=!0}void 0===b.get(an)&&(v=0)}if("function"==typeof c?g=c(r,g):g instanceof Date?g=f(g):"comma"===n&&Kr(g)&&(g=Jr.maybeMap(g,(function(e){return e instanceof Date?f(e):e}))),null===g){if(o)return a&&!y?a(r,on.encoder,d,"key",p):r;g=""}if("string"==typeof(m=g)||"number"==typeof m||"boolean"==typeof m||"symbol"==typeof m||"bigint"==typeof m||Jr.isBuffer(g)){if(a){var S=y?r:a(r,on.encoder,d,"key",p);if("comma"===n&&y){for(var O=Zr.call(String(g),","),j="",A=0;A<O.length;++A)j+=(0===A?"":",")+l(a(O[A],on.encoder,d,"value",p));return[l(S)+"="+j]}return[l(S)+"="+l(a(g,on.encoder,d,"value",p))]}return[l(r)+"="+l(String(g))]}var P,R=[];if(void 0===g)return R;if("comma"===n&&Kr(g))P=[{value:g.length>0?g.join(",")||null:void 0}];else if(Kr(c))P=c;else{var _=Object.keys(g);P=u?_.sort(u):_}for(var N=0;N<P.length;++N){var T=P[N],x="object"==typeof T&&void 0!==T.value?T.value:g[T];if(!i||null!==x){var U=Kr(g)?"function"==typeof n?n(r,T):r:r+(s?"."+T:"["+T+"]");h.set(t,v);var C=zr();C.set(an,h),tn(R,e(x,U,n,o,i,a,c,u,s,f,p,l,y,d,C))}}return R},un=Vr,sn=Object.prototype.hasOwnProperty,fn=Array.isArray,pn={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:un.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},ln=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},yn=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},dn=function(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,a=r.depth>0&&/(\[[^[\]]*])/.exec(o),c=a?o.slice(0,a.index):o,u=[];if(c){if(!r.plainObjects&&sn.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var s=0;r.depth>0&&null!==(a=i.exec(o))&&s<r.depth;){if(s+=1,!r.plainObjects&&sn.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(a[1])}return a&&u.push("["+o.slice(a.index)+"]"),function(e,t,r,n){for(var o=n?t:yn(t,r),i=e.length-1;i>=0;--i){var a,c=e[i];if("[]"===c&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var u="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,s=parseInt(u,10);r.parseArrays||""!==u?!isNaN(s)&&c!==u&&String(s)===u&&s>=0&&r.parseArrays&&s<=r.arrayLimit?(a=[])[s]=o:"__proto__"!==u&&(a[u]=o):a={0:o}}o=a}return o}(u,t,r,n)}},hn=function(e,t){var r,n=e,o=function(e){if(!e)return on;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||on.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Qr.default;if(void 0!==e.format){if(!Xr.call(Qr.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=Qr.formatters[r],o=on.filter;return("function"==typeof e.filter||Kr(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:on.addQueryPrefix,allowDots:void 0===e.allowDots?on.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:on.charsetSentinel,delimiter:void 0===e.delimiter?on.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:on.encode,encoder:"function"==typeof e.encoder?e.encoder:on.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:on.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:on.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:on.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:on.strictNullHandling}}(t);"function"==typeof o.filter?n=(0,o.filter)("",n):Kr(o.filter)&&(r=o.filter);var i,a=[];if("object"!=typeof n||null===n)return"";i=t&&t.arrayFormat in Yr?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var c=Yr[i];r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var u=zr(),s=0;s<r.length;++s){var f=r[s];o.skipNulls&&null===n[f]||tn(a,cn(n[f],f,c,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,u))}var p=a.join(o.delimiter),l=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?l+="utf8=%26%2310003%3B&":l+="utf8=%E2%9C%93&"),p.length>0?l+p:""},mn={formats:Mr,parse:function(e,t){var r=function(e){if(!e)return pn;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?pn.charset:e.charset;return{allowDots:void 0===e.allowDots?pn.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:pn.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:pn.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:pn.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:pn.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:pn.comma,decoder:"function"==typeof e.decoder?e.decoder:pn.decoder,delimiter:"string"==typeof e.delimiter||un.isRegExp(e.delimiter)?e.delimiter:pn.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:pn.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:pn.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:pn.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:pn.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:pn.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof e?function(e,t){var r,n={},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,a=o.split(t.delimiter,i),c=-1,u=t.charset;if(t.charsetSentinel)for(r=0;r<a.length;++r)0===a[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===a[r]?u="utf-8":"utf8=%26%2310003%3B"===a[r]&&(u="iso-8859-1"),c=r,r=a.length);for(r=0;r<a.length;++r)if(r!==c){var s,f,p=a[r],l=p.indexOf("]="),y=-1===l?p.indexOf("="):l+1;-1===y?(s=t.decoder(p,pn.decoder,u,"key"),f=t.strictNullHandling?null:""):(s=t.decoder(p.slice(0,y),pn.decoder,u,"key"),f=un.maybeMap(yn(p.slice(y+1),t),(function(e){return t.decoder(e,pn.decoder,u,"value")}))),f&&t.interpretNumericEntities&&"iso-8859-1"===u&&(f=ln(f)),p.indexOf("[]=")>-1&&(f=fn(f)?[f]:f),sn.call(n,s)?n[s]=un.combine(n[s],f):n[s]=f}return n}(e,r):e,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),a=0;a<i.length;++a){var c=i[a],u=dn(c,n[c],r,"string"==typeof e);o=un.merge(o,u,r)}return!0===r.allowSparse?o:un.compact(o)},stringify:hn};const gn=e=>{let t={raw:"",encoded:""};e.and&&(t=(e=>{if(!e)throw new Error("invalid query");const t=[],r=[];return e.forEach((e=>{const{raw:n,encoded:o}=gn(e);t.push(n),r.push(o)})),{raw:t.join("&"),encoded:r.join("&")}})(e.and),delete e.and);let r={raw:"",encoded:""};e.or&&(r=(e=>{if(!e)throw new Error("invalid query");const t=[];e.forEach((e=>{const{raw:r}=gn(e);t.push(r)}));const r=new URLSearchParams;return r.set("[or]",`(${t.join(";")})`),{raw:`[or]=(${t.join(";")})`,encoded:r.toString()}})(e.or),delete e.or);const n=mn.stringify(e,{encode:!1,arrayFormat:"comma"}),o=mn.stringify(e,{arrayFormat:"comma"});return{raw:[n,r.raw,t.raw].filter((e=>e)).join("&"),encoded:[o,r.encoded,t.encoded].filter((e=>e)).join("&")}},bn=e=>{if(!Le.isAxiosError(e))throw e;const{config:t,response:r}=e;if(null==r||!r.data)throw e;const{data:n}=r,o={status:n.status,statusText:n.code,message:n.message};if(t&&(o.request={method:t.method,headers:t.headers},t.url)){const e=new URL(t.url,t.baseURL);o.request.url=e.toString()}const i=new Error;i.name=`${n.status} ${n.code}`;try{i.message=JSON.stringify(o,null,2)}catch{i.message=n.message}throw i};e.createClient=e=>{let{spaceUid:t,token:r,apiType:n="cdn",adapter:o,retryOnError:i=!0,retryLimit:a=3}=e;if(!t)throw new Error("spaceUid parameter is required.");if(!r)throw new Error("token parameter is required.");if(!["cdn","api"].includes(n))throw new Error(`apiType parameter should be set to "cdn" or "api". apiType: ${n}`);if(a>10)throw new Error("retryLimit should be a value less than or equal to 10.");const c=new URL(`https://${t}.${n}.newt.so`),u=Le.create({baseURL:c.toString(),headers:{Authorization:`Bearer ${r}`},adapter:o});i&&Ke(u,{retries:a,retryCondition:e=>{var t,r;return 429===(null===(t=e.response)||void 0===t?void 0:t.status)||500===(null===(r=e.response)||void 0===r?void 0:r.status)},retryDelay:e=>1e3*e});const s=async e=>{let{appUid:t,modelUid:r,query:n}=e;if(!t)throw new Error("appUid parameter is required.");if(!r)throw new Error("modelUid parameter is required.");const o=new URL(`/v1/${t}/${r}`,c.toString());if(n&&Object.keys(n).length){const{encoded:e}=gn(n);o.search=e}try{const{data:e}=await u.get(o.pathname+o.search);return e}catch(e){return bn(e)}};return{getContents:s,getContent:async e=>{let{appUid:t,modelUid:r,contentId:n,query:o}=e;if(!t)throw new Error("appUid parameter is required.");if(!r)throw new Error("modelUid parameter is required.");if(!n)throw new Error("contentId parameter is required.");const i=new URL(`/v1/${t}/${r}/${n}`,c.toString());if(o&&Object.keys(o).length){const{encoded:e}=gn(o);i.search=e}try{const{data:e}=await u.get(i.pathname+i.search);return e}catch(e){return bn(e)}},getFirstContent:async e=>{let{appUid:t,modelUid:r,query:n}=e;if(n&&n.limit)throw new Error("query.limit parameter cannot have a value.");const o={...n,limit:1},{items:i}=await s({appUid:t,modelUid:r,query:o});return 0===i.length?null:i[0]},getApp:async e=>{let{appUid:t}=e;if(!t)throw new Error("appUid parameter is required.");const r=new URL(`/v1/space/apps/${t}`,c.toString());try{const{data:e}=await u.get(r.pathname);return e}catch(e){return bn(e)}}}},Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).newtClient={})}(this,(function(e){"use strict";function t(e,t){return function(){return e.apply(t,arguments)}}const{toString:r}=Object.prototype,{getPrototypeOf:n}=Object,o=(i=Object.create(null),e=>{const t=r.call(e);return i[t]||(i[t]=t.slice(8,-1).toLowerCase())});var i;const a=e=>(e=e.toLowerCase(),t=>o(t)===e),s=e=>t=>typeof t===e,{isArray:c}=Array,u=s("undefined");const l=a("ArrayBuffer");const f=s("string"),p=s("function"),y=s("number"),d=e=>null!==e&&"object"==typeof e,h=e=>{if("object"!==o(e))return!1;const t=n(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},m=a("Date"),g=a("File"),b=a("Blob"),E=a("FileList"),w=a("URLSearchParams");function O(e,t){let r,n,{allOwnKeys:o=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null!=e)if("object"!=typeof e&&(e=[e]),c(e))for(r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else{const n=o?Object.getOwnPropertyNames(e):Object.keys(e),i=n.length;let a;for(r=0;r<i;r++)a=n[r],t.call(null,e[a],a,e)}}function S(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,A=e=>!u(e)&&e!==v;const j=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&n(Uint8Array)),R=a("HTMLFormElement"),P=(e=>{let{hasOwnProperty:t}=e;return(e,r)=>t.call(e,r)})(Object.prototype),T=a("RegExp"),_=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};O(r,((r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)},N="abcdefghijklmnopqrstuvwxyz",x="0123456789",C={DIGIT:x,ALPHA:N,ALPHA_DIGIT:N+N.toUpperCase()+x};const U=a("AsyncFunction");var F={isArray:c,isArrayBuffer:l,isBuffer:function(e){return null!==e&&!u(e)&&null!==e.constructor&&!u(e.constructor)&&p(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||p(e.append)&&("formdata"===(t=o(e))||"object"===t&&p(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&l(e.buffer),t},isString:f,isNumber:y,isBoolean:e=>!0===e||!1===e,isObject:d,isPlainObject:h,isUndefined:u,isDate:m,isFile:g,isBlob:b,isRegExp:T,isFunction:p,isStream:e=>d(e)&&p(e.pipe),isURLSearchParams:w,isTypedArray:j,isFileList:E,forEach:O,merge:function e(){const{caseless:t}=A(this)&&this||{},r={},n=(n,o)=>{const i=t&&S(r,o)||o;h(r[i])&&h(n)?r[i]=e(r[i],n):h(n)?r[i]=e({},n):c(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&O(arguments[e],n);return r},extend:function(e,r,n){let{allOwnKeys:o}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return O(r,((r,o)=>{n&&p(r)?e[o]=t(r,n):e[o]=r}),{allOwnKeys:o}),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,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,o)=>{let i,a,s;const c={};if(t=t||{},null==e)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)s=i[a],o&&!o(s,e,t)||c[s]||(t[s]=e[s],c[s]=!0);e=!1!==r&&n(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:o,kindOfTest:a,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(c(e))return e;let t=e.length;if(!y(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:R,hasOwnProperty:P,hasOwnProp:P,reduceDescriptors:_,freezeMethods:e=>{_(e,((t,r)=>{if(p(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];p(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach((e=>{r[e]=!0}))};return c(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:S,global:v,isContextDefined:A,ALPHABET:C,generateString:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C.ALPHA_DIGIT,r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function(e){return!!(e&&p(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(d(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;const o=c(e)?[]:{};return O(e,((e,t)=>{const i=r(e,n+1);!u(i)&&(o[t]=i)})),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:U,isThenable:e=>e&&(d(e)||p(e))&&p(e.then)&&p(e.catch)};function D(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}F.inherits(D,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:F.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const L=D.prototype,I={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{I[e]={value:e}})),Object.defineProperties(D,I),Object.defineProperty(L,"isAxiosError",{value:!0}),D.from=(e,t,r,n,o,i)=>{const a=Object.create(L);return F.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),D.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};function k(e){return F.isPlainObject(e)||F.isArray(e)}function B(e){return F.endsWith(e,"[]")?e.slice(0,-2):e}function M(e,t,r){return e?e.concat(t).map((function(e,t){return e=B(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const q=F.toFlatObject(F,{},null,(function(e){return/^is[A-Z]/.test(e)}));function H(e,t,r){if(!F.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=F.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!F.isUndefined(t[e])}))).metaTokens,o=r.visitor||u,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&F.isSpecCompliantForm(t);if(!F.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(F.isDate(e))return e.toISOString();if(!s&&F.isBlob(e))throw new D("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(e)||F.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,r,o){let s=e;if(e&&!o&&"object"==typeof e)if(F.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(F.isArray(e)&&function(e){return F.isArray(e)&&!e.some(k)}(e)||(F.isFileList(e)||F.endsWith(r,"[]"))&&(s=F.toArray(e)))return r=B(r),s.forEach((function(e,n){!F.isUndefined(e)&&null!==e&&t.append(!0===a?M([r],n,i):null===a?r:r+"[]",c(e))})),!1;return!!k(e)||(t.append(M(o,r,i),c(e)),!1)}const l=[],f=Object.assign(q,{defaultVisitor:u,convertValue:c,isVisitable:k});if(!F.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!F.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),F.forEach(r,(function(r,i){!0===(!(F.isUndefined(r)||null===r)&&o.call(t,r,F.isString(i)?i.trim():i,n,f))&&e(r,n?n.concat(i):[i])})),l.pop()}}(e),t}function W(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function z(e,t){this._pairs=[],e&&H(e,this,t)}const G=z.prototype;function $(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function V(e,t,r){if(!t)return e;const n=r&&r.encode||$,o=r&&r.serialize;let i;if(i=o?o(t,r):F.isURLSearchParams(t)?t.toString():new z(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}G.append=function(e,t){this._pairs.push([e,t])},G.toString=function(e){const t=e?function(t){return e.call(this,t,W)}:W;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var J=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){F.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},K={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var Q={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:z,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},isStandardBrowserEnv:(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),isStandardBrowserWebWorkerEnv:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,protocols:["http","https","file","blob","url","data"]};function X(e){function t(e,r,n,o){let i=e[o++];const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&F.isArray(n)?n.length:i,s)return F.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a;n[i]&&F.isObject(n[i])||(n[i]=[]);return t(e,r,n[i],o)&&F.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(n[i])),!a}if(F.isFormData(e)&&F.isFunction(e.entries)){const r={};return F.forEachEntry(e,((e,n)=>{t(function(e){return F.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),n,r,0)})),r}return null}const Y={transitional:K,adapter:["xhr","http"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=F.isObject(e);o&&F.isHTMLForm(e)&&(e=new FormData(e));if(F.isFormData(e))return n&&n?JSON.stringify(X(e)):e;if(F.isArrayBuffer(e)||F.isBuffer(e)||F.isStream(e)||F.isFile(e)||F.isBlob(e))return e;if(F.isArrayBufferView(e))return e.buffer;if(F.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return H(e,new Q.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=F.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return H(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(F.isString(e))try{return(t||JSON.parse)(e),F.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Y.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&F.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw D.from(e,D.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Q.classes.FormData,Blob:Q.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};F.forEach(["delete","get","head","post","put","patch"],(e=>{Y.headers[e]={}}));var Z=Y;const ee=F.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 te=Symbol("internals");function re(e){return e&&String(e).trim().toLowerCase()}function ne(e){return!1===e||null==e?e:F.isArray(e)?e.map(ne):String(e)}function oe(e,t,r,n,o){return F.isFunction(n)?n.call(this,t,r):(o&&(t=r),F.isString(t)?F.isString(n)?-1!==t.indexOf(n):F.isRegExp(n)?n.test(t):void 0:void 0)}class ie{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=re(t);if(!o)throw new Error("header name must be a non-empty string");const i=F.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=ne(e))}const i=(e,t)=>F.forEach(e,((e,r)=>o(e,r,t)));return F.isPlainObject(e)||e instanceof this.constructor?i(e,t):F.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&ee[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&o(t,e,r),this}get(e,t){if(e=re(e)){const r=F.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(F.isFunction(t))return t.call(this,e,r);if(F.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=re(e)){const r=F.findKey(this,e);return!(!r||void 0===this[r]||t&&!oe(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=re(e)){const o=F.findKey(r,e);!o||t&&!oe(0,r[o],o,t)||(delete r[o],n=!0)}}return F.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!oe(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return F.forEach(this,((n,o)=>{const i=F.findKey(r,o);if(i)return t[i]=ne(n),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();a!==o&&delete t[o],t[a]=ne(n),r[a]=!0})),this}concat(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return this.constructor.concat(this,...t)}toJSON(e){const t=Object.create(null);return F.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&F.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((e=>{let[t,r]=e;return t+": "+r})).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e){const t=new this(e);for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return n.forEach((e=>t.set(e))),t}static accessor(e){const t=(this[te]=this[te]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=re(e);t[n]||(!function(e,t){const r=F.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return F.isArray(e)?e.forEach(n):n(e),this}}ie.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),F.reduceDescriptors(ie.prototype,((e,t)=>{let{value:r}=e,n=t[0].toUpperCase()+t.slice(1);return{get:()=>r,set(e){this[n]=e}}})),F.freezeMethods(ie);var ae=ie;function se(e,t){const r=this||Z,n=t||r,o=ae.from(n.headers);let i=n.data;return F.forEach(e,(function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function ce(e){return!(!e||!e.__CANCEL__)}function ue(e,t,r){D.call(this,null==e?"canceled":e,D.ERR_CANCELED,t,r),this.name="CanceledError"}F.inherits(ue,D,{__CANCEL__:!0});var le=Q.isStandardBrowserEnv?{write:function(e,t,r,n,o,i){const a=[];a.push(e+"="+encodeURIComponent(t)),F.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),F.isString(n)&&a.push("path="+n),F.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function fe(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var pe=Q.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function n(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=n(window.location.href),function(e){const t=F.isString(e)?n(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function(){return!0};function ye(e,t){let r=0;const n=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),u=n[a];o||(o=c),r[i]=s,n[i]=c;let l=a,f=0;for(;l!==i;)f+=r[l++],l%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;const p=u&&c-u;return p?Math.round(1e3*f/p):void 0}}(50,250);return o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-r,c=n(s);r=i;const u={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}var de="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,r){let n=e.data;const o=ae.from(e.headers).normalize(),i=e.responseType;let a,s;function c(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}F.isFormData(n)&&(Q.isStandardBrowserEnv||Q.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.getContentType(/^\s*multipart\/form-data/)?F.isString(s=o.getContentType())&&o.setContentType(s.replace(/^\s*(multipart\/form-data);+/,"$1")):o.setContentType("multipart/form-data"));let u=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+r))}const l=fe(e.baseURL,e.url);function f(){if(!u)return;const n=ae.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders());!function(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new D("Request failed with status code "+r.status,[D.ERR_BAD_REQUEST,D.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function(e){t(e),c()}),(function(e){r(e),c()}),{data:i&&"text"!==i&&"json"!==i?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:n,config:e,request:u}),u=null}if(u.open(e.method.toUpperCase(),V(l,e.params,e.paramsSerializer),!0),u.timeout=e.timeout,"onloadend"in u?u.onloadend=f:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(f)},u.onabort=function(){u&&(r(new D("Request aborted",D.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new D("Network Error",D.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||K;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new D(t,n.clarifyTimeoutError?D.ETIMEDOUT:D.ECONNABORTED,e,u)),u=null},Q.isStandardBrowserEnv){const t=pe(l)&&e.xsrfCookieName&&le.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===n&&o.setContentType(null),"setRequestHeader"in u&&F.forEach(o.toJSON(),(function(e,t){u.setRequestHeader(t,e)})),F.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),i&&"json"!==i&&(u.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&u.addEventListener("progress",ye(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",ye(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=t=>{u&&(r(!t||t.type?new ue(null,e,u):t),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const p=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(l);p&&-1===Q.protocols.indexOf(p)?r(new D("Unsupported protocol "+p+":",D.ERR_BAD_REQUEST,e)):u.send(n||null)}))};const he={http:null,xhr:de};F.forEach(he,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const me=e=>`- ${e}`,ge=e=>F.isFunction(e)||null===e||!1===e;var be=e=>{e=F.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){let t;if(r=e[i],n=r,!ge(r)&&(n=he[(t=String(r)).toLowerCase()],void 0===n))throw new D(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+i]=n}if(!n){const e=Object.entries(o).map((e=>{let[t,r]=e;return`adapter ${t} `+(!1===r?"is not supported by the environment":"is not available in the build")}));throw new D("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(me).join("\n"):" "+me(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function Ee(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ue(null,e)}function we(e){Ee(e),e.headers=ae.from(e.headers),e.data=se.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return be(e.adapter||Z.adapter)(e).then((function(t){return Ee(e),t.data=se.call(e,e.transformResponse,t),t.headers=ae.from(t.headers),t}),(function(t){return ce(t)||(Ee(e),t&&t.response&&(t.response.data=se.call(e,e.transformResponse,t.response),t.response.headers=ae.from(t.response.headers))),Promise.reject(t)}))}const Oe=e=>e instanceof ae?e.toJSON():e;function Se(e,t){t=t||{};const r={};function n(e,t,r){return F.isPlainObject(e)&&F.isPlainObject(t)?F.merge.call({caseless:r},e,t):F.isPlainObject(t)?F.merge({},t):F.isArray(t)?t.slice():t}function o(e,t,r){return F.isUndefined(t)?F.isUndefined(e)?void 0:n(void 0,e,r):n(e,t,r)}function i(e,t){if(!F.isUndefined(t))return n(void 0,t)}function a(e,t){return F.isUndefined(t)?F.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>o(Oe(e),Oe(t),!0)};return F.forEach(Object.keys(Object.assign({},e,t)),(function(n){const i=c[n]||o,a=i(e[n],t[n],n);F.isUndefined(a)&&i!==s||(r[n]=a)})),r}const ve="1.6.0",Ae={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Ae[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const je={};Ae.transitional=function(e,t,r){function n(e,t){return"[Axios v1.6.0] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new D(n(o," has been removed"+(t?" in "+t:"")),D.ERR_DEPRECATED);return t&&!je[o]&&(je[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}};var Re={assertOptions:function(e,t,r){if("object"!=typeof e)throw new D("options must be an object",D.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],a=t[i];if(a){const t=e[i],r=void 0===t||a(t,i,e);if(!0!==r)throw new D("option "+i+" must be "+r,D.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new D("Unknown option "+i,D.ERR_BAD_OPTION)}},validators:Ae};const Pe=Re.validators;class Te{constructor(e){this.defaults=e,this.interceptors={request:new J,response:new J}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Se(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&Re.assertOptions(r,{silentJSONParsing:Pe.transitional(Pe.boolean),forcedJSONParsing:Pe.transitional(Pe.boolean),clarifyTimeoutError:Pe.transitional(Pe.boolean)},!1),null!=n&&(F.isFunction(n)?t.paramsSerializer={serialize:n}:Re.assertOptions(n,{encode:Pe.function,serialize:Pe.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&F.merge(o.common,o[t.method]);o&&F.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=ae.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(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(!s){const e=[we.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,c),l=e.length,u=Promise.resolve(t);f<l;)u=u.then(e[f++],e[f++]);return u}l=a.length;let p=t;for(f=0;f<l;){const e=a[f++],t=a[f++];try{p=e(p)}catch(e){t.call(this,e);break}}try{u=we.call(this,p)}catch(e){return Promise.reject(e)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(e){return V(fe((e=Se(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}F.forEach(["delete","get","head","options"],(function(e){Te.prototype[e]=function(t,r){return this.request(Se(r||{},{method:e,url:t,data:(r||{}).data}))}})),F.forEach(["post","put","patch"],(function(e){function t(t){return function(r,n,o){return this.request(Se(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Te.prototype[e]=t(),Te.prototype[e+"Form"]=t(!0)}));var _e=Te;class Ne{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 r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e,n,o){r.reason||(r.reason=new ue(e,n,o),t(r.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)}static source(){let e;return{token:new Ne((function(t){e=t})),cancel:e}}}var xe=Ne;const Ce={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};Object.entries(Ce).forEach((e=>{let[t,r]=e;Ce[r]=t}));var Ue=Ce;const Fe=function e(r){const n=new _e(r),o=t(_e.prototype.request,n);return F.extend(o,_e.prototype,n,{allOwnKeys:!0}),F.extend(o,n,null,{allOwnKeys:!0}),o.create=function(t){return e(Se(r,t))},o}(Z);Fe.Axios=_e,Fe.CanceledError=ue,Fe.CancelToken=xe,Fe.isCancel=ce,Fe.VERSION=ve,Fe.toFormData=H,Fe.AxiosError=D,Fe.Cancel=Fe.CanceledError,Fe.all=function(e){return Promise.all(e)},Fe.spread=function(e){return function(t){return e.apply(null,t)}},Fe.isAxiosError=function(e){return F.isObject(e)&&!0===e.isAxiosError},Fe.mergeConfig=Se,Fe.AxiosHeaders=ae,Fe.formToJSON=e=>X(F.isHTMLForm(e)?new FormData(e):e),Fe.getAdapter=be,Fe.HttpStatusCode=Ue,Fe.default=Fe;var De=Fe;function Le(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})})),t}const Ie=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);function ke(e,t,r,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function Be(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){ke(i,n,o,a,s,"next",e)}function s(e){ke(i,n,o,a,s,"throw",e)}a(void 0)}))}}function Me(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function qe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Me(Object(r),!0).forEach((function(t){He(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Me(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function He(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var We="axios-retry";function ze(e){return!e.response&&Boolean(e.code)&&"ECONNABORTED"!==e.code&&(e=>!Ie.has(e&&e.code))(e)}var Ge=["get","head","options"],$e=Ge.concat(["put","delete"]);function Ve(e){return"ECONNABORTED"!==e.code&&(!e.response||e.response.status>=500&&e.response.status<=599)}function Je(e){return!!e.config&&(Ve(e)&&-1!==$e.indexOf(e.config.method))}function Ke(e){return ze(e)||Je(e)}function Qe(){return 0}function Xe(e){var t=e[We]||{};return t.retryCount=t.retryCount||0,e[We]=t,t}function Ye(){return(Ye=Be((function*(e,t,r,n){var o=r.retryCount<e&&t(n);if("object"==typeof o)try{return yield o,!0}catch(e){return!1}return o}))).apply(this,arguments)}function Ze(e,t){e.interceptors.request.use((e=>(Xe(e).lastRequestTime=Date.now(),e))),e.interceptors.response.use(null,function(){var r=Be((function*(r){var{config:n}=r;if(!n)return Promise.reject(r);var{retries:o=3,retryCondition:i=Ke,retryDelay:a=Qe,shouldResetTimeout:s=!1}=function(e,t){return qe(qe({},t),e[We])}(n,t),c=Xe(n);if(yield function(e,t,r,n){return Ye.apply(this,arguments)}(o,i,c,r)){c.retryCount+=1;var u=a(c.retryCount,r);if(function(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}(e,n),!s&&n.timeout&&c.lastRequestTime){var l=Date.now()-c.lastRequestTime;n.timeout=Math.max(n.timeout-l-u,1)}return n.transformRequest=[e=>e],new Promise((t=>setTimeout((()=>t(e(n))),u)))}return Promise.reject(r)}));return function(e){return r.apply(this,arguments)}}())}Ze.isNetworkError=ze,Ze.isSafeRequestError=function(e){return!!e.config&&(Ve(e)&&-1!==Ge.indexOf(e.config.method))},Ze.isIdempotentRequestError=Je,Ze.isNetworkOrIdempotentRequestError=Ke,Ze.exponentialDelay=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=100*Math.pow(2,e),r=.2*t*Math.random();return t+r},Ze.isRetryableError=Ve;var et,tt="undefined"!=typeof Symbol&&Symbol,rt=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0},nt="Function.prototype.bind called on incompatible ",ot=Array.prototype.slice,it=Object.prototype.toString,at="[object Function]",st=function(e){var t=this;if("function"!=typeof t||it.call(t)!==at)throw new TypeError(nt+t);for(var r,n=ot.call(arguments,1),o=function(){if(this instanceof r){var o=t.apply(this,n.concat(ot.call(arguments)));return Object(o)===o?o:this}return t.apply(e,n.concat(ot.call(arguments)))},i=Math.max(0,t.length-n.length),a=[],s=0;s<i;s++)a.push("$"+s);if(r=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(o),t.prototype){var c=function(){};c.prototype=t.prototype,r.prototype=new c,c.prototype=null}return r},ct=Function.prototype.bind||st,ut=ct.call(Function.call,Object.prototype.hasOwnProperty),lt=SyntaxError,ft=Function,pt=TypeError,yt=function(e){try{return ft('"use strict"; return ('+e+").constructor;")()}catch(e){}},dt=Object.getOwnPropertyDescriptor;if(dt)try{dt({},"")}catch(e){dt=null}var ht=function(){throw new pt},mt=dt?function(){try{return ht}catch(e){try{return dt(arguments,"callee").get}catch(e){return ht}}}():ht,gt="function"==typeof tt&&"function"==typeof Symbol&&"symbol"==typeof tt("foo")&&"symbol"==typeof Symbol("bar")&&rt(),bt=Object.getPrototypeOf||function(e){return e.__proto__},Et={},wt="undefined"==typeof Uint8Array?et:bt(Uint8Array),Ot={"%AggregateError%":"undefined"==typeof AggregateError?et:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?et:ArrayBuffer,"%ArrayIteratorPrototype%":gt?bt([][Symbol.iterator]()):et,"%AsyncFromSyncIteratorPrototype%":et,"%AsyncFunction%":Et,"%AsyncGenerator%":Et,"%AsyncGeneratorFunction%":Et,"%AsyncIteratorPrototype%":Et,"%Atomics%":"undefined"==typeof Atomics?et:Atomics,"%BigInt%":"undefined"==typeof BigInt?et:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?et:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?et:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?et:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?et:FinalizationRegistry,"%Function%":ft,"%GeneratorFunction%":Et,"%Int8Array%":"undefined"==typeof Int8Array?et:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?et:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?et:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":gt?bt(bt([][Symbol.iterator]())):et,"%JSON%":"object"==typeof JSON?JSON:et,"%Map%":"undefined"==typeof Map?et:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&>?bt((new Map)[Symbol.iterator]()):et,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?et:Promise,"%Proxy%":"undefined"==typeof Proxy?et:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?et:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?et:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&>?bt((new Set)[Symbol.iterator]()):et,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?et:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":gt?bt(""[Symbol.iterator]()):et,"%Symbol%":gt?Symbol:et,"%SyntaxError%":lt,"%ThrowTypeError%":mt,"%TypedArray%":wt,"%TypeError%":pt,"%Uint8Array%":"undefined"==typeof Uint8Array?et:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?et:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?et:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?et:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?et:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?et:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?et:WeakSet},St=function e(t){var r;if("%AsyncFunction%"===t)r=yt("async function () {}");else if("%GeneratorFunction%"===t)r=yt("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=yt("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(r=bt(o.prototype))}return Ot[t]=r,r},vt={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},At=ct,jt=ut,Rt=At.call(Function.call,Array.prototype.concat),Pt=At.call(Function.apply,Array.prototype.splice),Tt=At.call(Function.call,String.prototype.replace),_t=At.call(Function.call,String.prototype.slice),Nt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,xt=/\\(\\)?/g,Ct=function(e){var t=_t(e,0,1),r=_t(e,-1);if("%"===t&&"%"!==r)throw new lt("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new lt("invalid intrinsic syntax, expected opening `%`");var n=[];return Tt(e,Nt,(function(e,t,r,o){n[n.length]=r?Tt(o,xt,"$1"):t||e})),n},Ut=function(e,t){var r,n=e;if(jt(vt,n)&&(n="%"+(r=vt[n])[0]+"%"),jt(Ot,n)){var o=Ot[n];if(o===Et&&(o=St(n)),void 0===o&&!t)throw new pt("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new lt("intrinsic "+e+" does not exist!")},Ft=function(e,t){if("string"!=typeof e||0===e.length)throw new pt("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new pt('"allowMissing" argument must be a boolean');var r=Ct(e),n=r.length>0?r[0]:"",o=Ut("%"+n+"%",t),i=o.name,a=o.value,s=!1,c=o.alias;c&&(n=c[0],Pt(r,Rt([0,1],c)));for(var u=1,l=!0;u<r.length;u+=1){var f=r[u],p=_t(f,0,1),y=_t(f,-1);if(('"'===p||"'"===p||"`"===p||'"'===y||"'"===y||"`"===y)&&p!==y)throw new lt("property names with quotes must have matching quotes");if("constructor"!==f&&l||(s=!0),jt(Ot,i="%"+(n+="."+f)+"%"))a=Ot[i];else if(null!=a){if(!(f in a)){if(!t)throw new pt("base intrinsic for "+e+" exists, but the property is not available.");return}if(dt&&u+1>=r.length){var d=dt(a,f);a=(l=!!d)&&"get"in d&&!("originalValue"in d.get)?d.get:a[f]}else l=jt(a,f),a=a[f];l&&!s&&(Ot[i]=a)}}return a},Dt={exports:{}};!function(e){var t=ct,r=Ft,n=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||t.call(o,n),a=r("%Object.getOwnPropertyDescriptor%",!0),s=r("%Object.defineProperty%",!0),c=r("%Math.max%");if(s)try{s({},"a",{value:1})}catch(e){s=null}e.exports=function(e){var r=i(t,o,arguments);if(a&&s){var n=a(r,"length");n.configurable&&s(r,"length",{value:1+c(0,e.length-(arguments.length-1))})}return r};var u=function(){return i(t,n,arguments)};s?s(e.exports,"apply",{value:u}):e.exports.apply=u}(Dt);var Lt=Ft,It=Dt.exports,kt=It(Lt("String.prototype.indexOf")),Bt=Le(Object.freeze({__proto__:null,default:{}})),Mt="function"==typeof Map&&Map.prototype,qt=Object.getOwnPropertyDescriptor&&Mt?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Ht=Mt&&qt&&"function"==typeof qt.get?qt.get:null,Wt=Mt&&Map.prototype.forEach,zt="function"==typeof Set&&Set.prototype,Gt=Object.getOwnPropertyDescriptor&&zt?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,$t=zt&&Gt&&"function"==typeof Gt.get?Gt.get:null,Vt=zt&&Set.prototype.forEach,Jt="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,Kt="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,Qt="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,Xt=Boolean.prototype.valueOf,Yt=Object.prototype.toString,Zt=Function.prototype.toString,er=String.prototype.match,tr="function"==typeof BigInt?BigInt.prototype.valueOf:null,rr=Object.getOwnPropertySymbols,nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,or="function"==typeof Symbol&&"object"==typeof Symbol.iterator,ir=Object.prototype.propertyIsEnumerable,ar=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null),sr=Bt.custom,cr=sr&&yr(sr)?sr:null,ur="function"==typeof Symbol&&void 0!==Symbol.toStringTag?Symbol.toStringTag:null;function lr(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function fr(e){return String(e).replace(/"/g,""")}function pr(e){return!("[object Array]"!==mr(e)||ur&&"object"==typeof e&&ur in e)}function yr(e){if(or)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!nr)return!1;try{return nr.call(e),!0}catch(e){}return!1}var dr=Object.prototype.hasOwnProperty||function(e){return e in this};function hr(e,t){return dr.call(e,t)}function mr(e){return Yt.call(e)}function gr(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function br(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return br(e.slice(0,t.maxStringLength),t)+n}return lr(e.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,Er),"single",t)}function Er(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+t.toString(16).toUpperCase()}function wr(e){return"Object("+e+")"}function Or(e){return e+" { ? }"}function Sr(e,t,r,n){return e+" ("+t+") {"+(n?vr(r,n):r.join(", "))+"}"}function vr(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+e.join(","+r)+"\n"+t.prev}function Ar(e,t){var r=pr(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=hr(e,o)?t(e[o],e):""}var i,a="function"==typeof rr?rr(e):[];if(or){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var c in e)hr(e,c)&&(r&&String(Number(c))===c&&c<e.length||or&&i["$"+c]instanceof Symbol||(/[^\w$]/.test(c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if("function"==typeof rr)for(var u=0;u<a.length;u++)ir.call(e,a[u])&&n.push("["+t(a[u])+"]: "+t(e[a[u]],e));return n}var jr=Ft,Rr=function(e,t){var r=Lt(e,!!t);return"function"==typeof r&&kt(e,".prototype.")>-1?It(r):r},Pr=function e(t,r,n,o){var i=r||{};if(hr(i,"quoteStyle")&&"single"!==i.quoteStyle&&"double"!==i.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(hr(i,"maxStringLength")&&("number"==typeof i.maxStringLength?i.maxStringLength<0&&i.maxStringLength!==1/0:null!==i.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=!hr(i,"customInspect")||i.customInspect;if("boolean"!=typeof a&&"symbol"!==a)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(hr(i,"indent")&&null!==i.indent&&"\t"!==i.indent&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return br(t,i);if("number"==typeof t)return 0===t?1/0/t>0?"0":"-0":String(t);if("bigint"==typeof t)return String(t)+"n";var s=void 0===i.depth?5:i.depth;if(void 0===n&&(n=0),n>=s&&s>0&&"object"==typeof t)return pr(t)?"[Array]":"[Object]";var c=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=Array(e.indent+1).join(" ")}return{base:r,prev:Array(t+1).join(r)}}(i,n);if(void 0===o)o=[];else if(gr(o,t)>=0)return"[Circular]";function u(t,r,a){if(r&&(o=o.slice()).push(r),a){var s={depth:i.depth};return hr(i,"quoteStyle")&&(s.quoteStyle=i.quoteStyle),e(t,s,n+1,o)}return e(t,i,n+1,o)}if("function"==typeof t){var l=function(e){if(e.name)return e.name;var t=er.call(Zt.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),f=Ar(t,u);return"[Function"+(l?": "+l:" (anonymous)")+"]"+(f.length>0?" { "+f.join(", ")+" }":"")}if(yr(t)){var p=or?String(t).replace(/^(Symbol\(.*\))_[^)]*$/,"$1"):nr.call(t);return"object"!=typeof t||or?p:wr(p)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var y="<"+String(t.nodeName).toLowerCase(),d=t.attributes||[],h=0;h<d.length;h++)y+=" "+d[h].name+"="+lr(fr(d[h].value),"double",i);return y+=">",t.childNodes&&t.childNodes.length&&(y+="..."),y+="</"+String(t.nodeName).toLowerCase()+">"}if(pr(t)){if(0===t.length)return"[]";var m=Ar(t,u);return c&&!function(e){for(var t=0;t<e.length;t++)if(gr(e[t],"\n")>=0)return!1;return!0}(m)?"["+vr(m,c)+"]":"[ "+m.join(", ")+" ]"}if(function(e){return!("[object Error]"!==mr(e)||ur&&"object"==typeof e&&ur in e)}(t)){var g=Ar(t,u);return 0===g.length?"["+String(t)+"]":"{ ["+String(t)+"] "+g.join(", ")+" }"}if("object"==typeof t&&a){if(cr&&"function"==typeof t[cr])return t[cr]();if("symbol"!==a&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!Ht||!e||"object"!=typeof e)return!1;try{Ht.call(e);try{$t.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var b=[];return Wt.call(t,(function(e,r){b.push(u(r,t,!0)+" => "+u(e,t))})),Sr("Map",Ht.call(t),b,c)}if(function(e){if(!$t||!e||"object"!=typeof e)return!1;try{$t.call(e);try{Ht.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var E=[];return Vt.call(t,(function(e){E.push(u(e,t))})),Sr("Set",$t.call(t),E,c)}if(function(e){if(!Jt||!e||"object"!=typeof e)return!1;try{Jt.call(e,Jt);try{Kt.call(e,Kt)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Or("WeakMap");if(function(e){if(!Kt||!e||"object"!=typeof e)return!1;try{Kt.call(e,Kt);try{Jt.call(e,Jt)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Or("WeakSet");if(function(e){if(!Qt||!e||"object"!=typeof e)return!1;try{return Qt.call(e),!0}catch(e){}return!1}(t))return Or("WeakRef");if(function(e){return!("[object Number]"!==mr(e)||ur&&"object"==typeof e&&ur in e)}(t))return wr(u(Number(t)));if(function(e){if(!e||"object"!=typeof e||!tr)return!1;try{return tr.call(e),!0}catch(e){}return!1}(t))return wr(u(tr.call(t)));if(function(e){return!("[object Boolean]"!==mr(e)||ur&&"object"==typeof e&&ur in e)}(t))return wr(Xt.call(t));if(function(e){return!("[object String]"!==mr(e)||ur&&"object"==typeof e&&ur in e)}(t))return wr(u(String(t)));if(!function(e){return!("[object Date]"!==mr(e)||ur&&"object"==typeof e&&ur in e)}(t)&&!function(e){return!("[object RegExp]"!==mr(e)||ur&&"object"==typeof e&&ur in e)}(t)){var w=Ar(t,u),O=ar?ar(t)===Object.prototype:t instanceof Object||t.constructor===Object,S=t instanceof Object?"":"null prototype",v=!O&&ur&&Object(t)===t&&ur in t?mr(t).slice(8,-1):S?"Object":"",A=(O||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(v||S?"["+[].concat(v||[],S||[]).join(": ")+"] ":"");return 0===w.length?A+"{}":c?A+"{"+vr(w,c)+"}":A+"{ "+w.join(", ")+" }"}return String(t)},Tr=jr("%TypeError%"),_r=jr("%WeakMap%",!0),Nr=jr("%Map%",!0),xr=Rr("WeakMap.prototype.get",!0),Cr=Rr("WeakMap.prototype.set",!0),Ur=Rr("WeakMap.prototype.has",!0),Fr=Rr("Map.prototype.get",!0),Dr=Rr("Map.prototype.set",!0),Lr=Rr("Map.prototype.has",!0),Ir=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},kr=String.prototype.replace,Br=/%20/g,Mr="RFC3986",qr={default:Mr,formatters:{RFC1738:function(e){return kr.call(e,Br,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:Mr},Hr=qr,Wr=Object.prototype.hasOwnProperty,zr=Array.isArray,Gr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),$r=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},Vr={arrayToObject:$r,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],a=Object.keys(i),s=0;s<a.length;++s){var c=a[s],u=i[c];"object"==typeof u&&null!==u&&-1===r.indexOf(u)&&(t.push({obj:i,prop:c}),r.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(zr(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,n,o){if(0===e.length)return e;var i=e;if("symbol"==typeof e?i=Symbol.prototype.toString.call(e):"string"!=typeof e&&(i=String(e)),"iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var a="",s=0;s<i.length;++s){var c=i.charCodeAt(s);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===Hr.RFC1738&&(40===c||41===c)?a+=i.charAt(s):c<128?a+=Gr[c]:c<2048?a+=Gr[192|c>>6]+Gr[128|63&c]:c<55296||c>=57344?a+=Gr[224|c>>12]+Gr[128|c>>6&63]+Gr[128|63&c]:(s+=1,c=65536+((1023&c)<<10|1023&i.charCodeAt(s)),a+=Gr[240|c>>18]+Gr[128|c>>12&63]+Gr[128|c>>6&63]+Gr[128|63&c])}return a},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(zr(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(zr(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!Wr.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var o=t;return zr(t)&&!zr(r)&&(o=$r(t,n)),zr(t)&&zr(r)?(r.forEach((function(r,o){if(Wr.call(t,o)){var i=t[o];i&&"object"==typeof i&&r&&"object"==typeof r?t[o]=e(i,r,n):t.push(r)}else t[o]=r})),t):Object.keys(r).reduce((function(t,o){var i=r[o];return Wr.call(t,o)?t[o]=e(t[o],i,n):t[o]=i,t}),o)}},Jr=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new Tr("Side channel does not contain "+Pr(e))},get:function(n){if(_r&&n&&("object"==typeof n||"function"==typeof n)){if(e)return xr(e,n)}else if(Nr){if(t)return Fr(t,n)}else if(r)return function(e,t){var r=Ir(e,t);return r&&r.value}(r,n)},has:function(n){if(_r&&n&&("object"==typeof n||"function"==typeof n)){if(e)return Ur(e,n)}else if(Nr){if(t)return Lr(t,n)}else if(r)return function(e,t){return!!Ir(e,t)}(r,n);return!1},set:function(n,o){_r&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new _r),Cr(e,n,o)):Nr?(t||(t=new Nr),Dr(t,n,o)):(r||(r={key:{},next:null}),function(e,t,r){var n=Ir(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,o))}};return n},Kr=Vr,Qr=qr,Xr=Object.prototype.hasOwnProperty,Yr={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},Zr=Array.isArray,en=String.prototype.split,tn=Array.prototype.push,rn=function(e,t){tn.apply(e,Zr(t)?t:[t])},nn=Date.prototype.toISOString,on=Qr.default,an={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Kr.encode,encodeValuesOnly:!1,format:on,formatter:Qr.formatters[on],indices:!1,serializeDate:function(e){return nn.call(e)},skipNulls:!1,strictNullHandling:!1},sn={},cn=function e(t,r,n,o,i,a,s,c,u,l,f,p,y,d,h){for(var m,g=t,b=h,E=0,w=!1;void 0!==(b=b.get(sn))&&!w;){var O=b.get(t);if(E+=1,void 0!==O){if(O===E)throw new RangeError("Cyclic object value");w=!0}void 0===b.get(sn)&&(E=0)}if("function"==typeof s?g=s(r,g):g instanceof Date?g=l(g):"comma"===n&&Zr(g)&&(g=Kr.maybeMap(g,(function(e){return e instanceof Date?l(e):e}))),null===g){if(o)return a&&!y?a(r,an.encoder,d,"key",f):r;g=""}if("string"==typeof(m=g)||"number"==typeof m||"boolean"==typeof m||"symbol"==typeof m||"bigint"==typeof m||Kr.isBuffer(g)){if(a){var S=y?r:a(r,an.encoder,d,"key",f);if("comma"===n&&y){for(var v=en.call(String(g),","),A="",j=0;j<v.length;++j)A+=(0===j?"":",")+p(a(v[j],an.encoder,d,"value",f));return[p(S)+"="+A]}return[p(S)+"="+p(a(g,an.encoder,d,"value",f))]}return[p(r)+"="+p(String(g))]}var R,P=[];if(void 0===g)return P;if("comma"===n&&Zr(g))R=[{value:g.length>0?g.join(",")||null:void 0}];else if(Zr(s))R=s;else{var T=Object.keys(g);R=c?T.sort(c):T}for(var _=0;_<R.length;++_){var N=R[_],x="object"==typeof N&&void 0!==N.value?N.value:g[N];if(!i||null!==x){var C=Zr(g)?"function"==typeof n?n(r,N):r:r+(u?"."+N:"["+N+"]");h.set(t,E);var U=Jr();U.set(sn,h),rn(P,e(x,C,n,o,i,a,s,c,u,l,f,p,y,d,U))}}return P},un=Vr,ln=Object.prototype.hasOwnProperty,fn=Array.isArray,pn={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:un.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},yn=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},dn=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},hn=function(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,a=r.depth>0&&/(\[[^[\]]*])/.exec(o),s=a?o.slice(0,a.index):o,c=[];if(s){if(!r.plainObjects&&ln.call(Object.prototype,s)&&!r.allowPrototypes)return;c.push(s)}for(var u=0;r.depth>0&&null!==(a=i.exec(o))&&u<r.depth;){if(u+=1,!r.plainObjects&&ln.call(Object.prototype,a[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(a[1])}return a&&c.push("["+o.slice(a.index)+"]"),function(e,t,r,n){for(var o=n?t:dn(t,r),i=e.length-1;i>=0;--i){var a,s=e[i];if("[]"===s&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(c,10);r.parseArrays||""!==c?!isNaN(u)&&s!==c&&String(u)===c&&u>=0&&r.parseArrays&&u<=r.arrayLimit?(a=[])[u]=o:"__proto__"!==c&&(a[c]=o):a={0:o}}o=a}return o}(c,t,r,n)}},mn=function(e,t){var r,n=e,o=function(e){if(!e)return an;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||an.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Qr.default;if(void 0!==e.format){if(!Xr.call(Qr.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=Qr.formatters[r],o=an.filter;return("function"==typeof e.filter||Zr(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:an.addQueryPrefix,allowDots:void 0===e.allowDots?an.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:an.charsetSentinel,delimiter:void 0===e.delimiter?an.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:an.encode,encoder:"function"==typeof e.encoder?e.encoder:an.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:an.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:an.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:an.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:an.strictNullHandling}}(t);"function"==typeof o.filter?n=(0,o.filter)("",n):Zr(o.filter)&&(r=o.filter);var i,a=[];if("object"!=typeof n||null===n)return"";i=t&&t.arrayFormat in Yr?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var s=Yr[i];r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var c=Jr(),u=0;u<r.length;++u){var l=r[u];o.skipNulls&&null===n[l]||rn(a,cn(n[l],l,s,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,c))}var f=a.join(o.delimiter),p=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?p+="utf8=%26%2310003%3B&":p+="utf8=%E2%9C%93&"),f.length>0?p+f:""},gn={formats:qr,parse:function(e,t){var r=function(e){if(!e)return pn;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?pn.charset:e.charset;return{allowDots:void 0===e.allowDots?pn.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:pn.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:pn.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:pn.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:pn.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:pn.comma,decoder:"function"==typeof e.decoder?e.decoder:pn.decoder,delimiter:"string"==typeof e.delimiter||un.isRegExp(e.delimiter)?e.delimiter:pn.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:pn.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:pn.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:pn.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:pn.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:pn.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof e?function(e,t){var r,n={},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,a=o.split(t.delimiter,i),s=-1,c=t.charset;if(t.charsetSentinel)for(r=0;r<a.length;++r)0===a[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===a[r]?c="utf-8":"utf8=%26%2310003%3B"===a[r]&&(c="iso-8859-1"),s=r,r=a.length);for(r=0;r<a.length;++r)if(r!==s){var u,l,f=a[r],p=f.indexOf("]="),y=-1===p?f.indexOf("="):p+1;-1===y?(u=t.decoder(f,pn.decoder,c,"key"),l=t.strictNullHandling?null:""):(u=t.decoder(f.slice(0,y),pn.decoder,c,"key"),l=un.maybeMap(dn(f.slice(y+1),t),(function(e){return t.decoder(e,pn.decoder,c,"value")}))),l&&t.interpretNumericEntities&&"iso-8859-1"===c&&(l=yn(l)),f.indexOf("[]=")>-1&&(l=fn(l)?[l]:l),ln.call(n,u)?n[u]=un.combine(n[u],l):n[u]=l}return n}(e,r):e,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),a=0;a<i.length;++a){var s=i[a],c=hn(s,n[s],r,"string"==typeof e);o=un.merge(o,c,r)}return!0===r.allowSparse?o:un.compact(o)},stringify:mn};const bn=e=>{let t={raw:"",encoded:""};e.and&&(t=(e=>{if(!e)throw new Error("invalid query");const t=[],r=[];return e.forEach((e=>{const{raw:n,encoded:o}=bn(e);t.push(n),r.push(o)})),{raw:t.join("&"),encoded:r.join("&")}})(e.and),delete e.and);let r={raw:"",encoded:""};e.or&&(r=(e=>{if(!e)throw new Error("invalid query");const t=[];e.forEach((e=>{const{raw:r}=bn(e);t.push(r)}));const r=new URLSearchParams;return r.set("[or]",`(${t.join(";")})`),{raw:`[or]=(${t.join(";")})`,encoded:r.toString()}})(e.or),delete e.or);const n=gn.stringify(e,{encode:!1,arrayFormat:"comma"}),o=gn.stringify(e,{arrayFormat:"comma"});return{raw:[n,r.raw,t.raw].filter((e=>e)).join("&"),encoded:[o,r.encoded,t.encoded].filter((e=>e)).join("&")}},En=e=>{if(!De.isAxiosError(e))throw e;const{config:t,response:r}=e;if(null==r||!r.data)throw e;const{data:n}=r,o={status:n.status,code:n.code,message:n.message};if(t&&(o.request={method:t.method,headers:t.headers},t.url)){const e=new URL(t.url,t.baseURL);o.request.url=e.toString()}const i=new Error;i.name=`${n.status} ${n.code}`;try{i.message=JSON.stringify(o,null,2)}catch{i.message=n.message}throw i},wn=(e,t)=>{if(!(e=>{if("object"!=typeof e||null===e)return!1;const t=e;return"number"==typeof t.status&&"string"==typeof t.code&&"string"==typeof t.message})(e))throw e;const{status:r,code:n,message:o}=e,i={status:r,code:n,message:o,request:t},a=new Error;a.name=`${r} ${n}`;try{a.message=JSON.stringify(i,null,2)}catch{a.message=o}throw a};e.createClient=e=>{let{spaceUid:t,token:r,apiType:n="cdn",adapter:o,retryOnError:i=!0,retryLimit:a=3,fetch:s}=e;if(!t)throw new Error("spaceUid parameter is required.");if(!r)throw new Error("token parameter is required.");if(!["cdn","api"].includes(n))throw new Error(`apiType parameter should be set to "cdn" or "api". apiType: ${n}`);if(a>10)throw new Error("retryLimit should be a value less than or equal to 10.");const c=new URL(`https://${t}.${n}.newt.so`),u={Authorization:`Bearer ${r}`},l=De.create({baseURL:c.toString(),headers:u,adapter:o});i&&Ze(l,{retries:a,retryCondition:e=>{var t,r;return 429===(null===(t=e.response)||void 0===t?void 0:t.status)||500===(null===(r=e.response)||void 0===r?void 0:r.status)},retryDelay:e=>1e3*e});const f=async e=>{let{appUid:t,modelUid:r,query:n}=e;if(!t)throw new Error("appUid parameter is required.");if(!r)throw new Error("modelUid parameter is required.");const o=new URL(`/v1/${t}/${r}`,c.toString());if(n&&Object.keys(n).length){const{encoded:e}=bn(n);o.search=e}if(s){const e={method:"get",headers:u,url:o.toString()};try{const t=await s(o.toString(),{headers:u}),r=await t.json();return t.ok?r:wn(r,e)}catch(t){return wn(t,e)}}else try{const{data:e}=await l.get(o.pathname+o.search);return e}catch(e){return En(e)}};return{getContents:f,getContent:async e=>{let{appUid:t,modelUid:r,contentId:n,query:o}=e;if(!t)throw new Error("appUid parameter is required.");if(!r)throw new Error("modelUid parameter is required.");if(!n)throw new Error("contentId parameter is required.");const i=new URL(`/v1/${t}/${r}/${n}`,c.toString());if(o&&Object.keys(o).length){const{encoded:e}=bn(o);i.search=e}if(s){const e={method:"get",headers:u,url:i.toString()};try{const t=await s(i.toString(),{headers:u}),r=await t.json();return t.ok?r:wn(r,e)}catch(t){return wn(t,e)}}else try{const{data:e}=await l.get(i.pathname+i.search);return e}catch(e){return En(e)}},getFirstContent:async e=>{let{appUid:t,modelUid:r,query:n}=e;if(n&&n.limit)throw new Error("query.limit parameter cannot have a value.");const o={...n,limit:1},{items:i}=await f({appUid:t,modelUid:r,query:o});return 0===i.length?null:i[0]},getApp:async e=>{let{appUid:t}=e;if(!t)throw new Error("appUid parameter is required.");const r=new URL(`/v1/space/apps/${t}`,c.toString());if(s){const e={method:"get",headers:u,url:r.toString()};try{const t=await s(r.toString(),{headers:u}),n=await t.json();return t.ok?n:wn(n,e)}catch(t){return wn(t,e)}}else try{const{data:e}=await l.get(r.pathname);return e}catch(e){return En(e)}}}},Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "newt-client-js",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "JavaScript SDK for Newt's API",
|
|
5
5
|
"main": "./dist/cjs/newtClient.js",
|
|
6
6
|
"module": "./dist/esm/newtClient.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
]
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"axios": "^
|
|
52
|
+
"axios": "^1.6.0",
|
|
53
53
|
"axios-retry": "^3.2.4",
|
|
54
54
|
"qs": "^6.10.1"
|
|
55
55
|
},
|