@qlover/fe-corekit 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +295 -32
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/interface/index.d.ts +24 -5
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -551,7 +551,7 @@ declare abstract class Executor<ExecutorConfig = unknown> {
|
|
|
551
551
|
*
|
|
552
552
|
* @since 1.0.14
|
|
553
553
|
*/
|
|
554
|
-
|
|
554
|
+
interface RequestAdapterConfig<RequestData = unknown> {
|
|
555
555
|
/**
|
|
556
556
|
* Request URL path
|
|
557
557
|
* Will be combined with baseURL if provided
|
|
@@ -637,7 +637,7 @@ type RequestAdapterConfig<RequestData = unknown> = {
|
|
|
637
637
|
*/
|
|
638
638
|
requestId?: string;
|
|
639
639
|
[key: string]: any;
|
|
640
|
-
}
|
|
640
|
+
}
|
|
641
641
|
/**
|
|
642
642
|
* Request adapter response
|
|
643
643
|
*
|
|
@@ -647,7 +647,7 @@ type RequestAdapterConfig<RequestData = unknown> = {
|
|
|
647
647
|
* @typeParam Req - The type of the request data.
|
|
648
648
|
* @typeParam Res - The type of the response data.
|
|
649
649
|
*/
|
|
650
|
-
|
|
650
|
+
interface RequestAdapterResponse<Req = unknown, Res = unknown> {
|
|
651
651
|
data: Res;
|
|
652
652
|
status: number;
|
|
653
653
|
statusText: string;
|
|
@@ -657,7 +657,7 @@ type RequestAdapterResponse<Req = unknown, Res = unknown> = {
|
|
|
657
657
|
config: RequestAdapterConfig<Req>;
|
|
658
658
|
response: Response;
|
|
659
659
|
[key: string]: unknown;
|
|
660
|
-
}
|
|
660
|
+
}
|
|
661
661
|
/**
|
|
662
662
|
* Request adapter interface
|
|
663
663
|
*
|
|
@@ -754,6 +754,25 @@ declare enum RequestErrorID {
|
|
|
754
754
|
URL_NONE = "URL_NONE"
|
|
755
755
|
}
|
|
756
756
|
|
|
757
|
+
/**
|
|
758
|
+
* Represents a transaction for a request.
|
|
759
|
+
*
|
|
760
|
+
* This interface defines a transaction that contains a request and a response.
|
|
761
|
+
* It can be used to track the request and response of a transaction.
|
|
762
|
+
*
|
|
763
|
+
* @since 1.2.2
|
|
764
|
+
*/
|
|
765
|
+
interface RequestTransactionInterface<Request, Response> {
|
|
766
|
+
/**
|
|
767
|
+
* The request object
|
|
768
|
+
*/
|
|
769
|
+
request: Request;
|
|
770
|
+
/**
|
|
771
|
+
* The response object
|
|
772
|
+
*/
|
|
773
|
+
response: Response;
|
|
774
|
+
}
|
|
775
|
+
|
|
757
776
|
/**
|
|
758
777
|
* Generic interface for data serialization/deserialization operations
|
|
759
778
|
* Provides a standard contract for implementing serialization strategies
|
|
@@ -1684,12 +1703,27 @@ declare class Logger {
|
|
|
1684
1703
|
*
|
|
1685
1704
|
* @since 1.0.14
|
|
1686
1705
|
*/
|
|
1687
|
-
|
|
1706
|
+
interface RequestAdapterFetchConfig<Request = unknown> extends RequestAdapterConfig<Request>, Omit<globalThis.RequestInit, 'headers'> {
|
|
1707
|
+
/**
|
|
1708
|
+
* The fetcher function
|
|
1709
|
+
*
|
|
1710
|
+
* You can override the default fetch function
|
|
1711
|
+
*
|
|
1712
|
+
* Some environments may not have a global fetch function, or you may want to override the default fetch logic.
|
|
1713
|
+
*
|
|
1714
|
+
* @example
|
|
1715
|
+
* ```typescript
|
|
1716
|
+
* const fetchRequest = new FetchRequest({ fetcher: customFetch });
|
|
1717
|
+
* ```
|
|
1718
|
+
*
|
|
1719
|
+
* @example Or configure it for each request
|
|
1720
|
+
* ```typescript
|
|
1721
|
+
* const fetchRequest = new FetchRequest();
|
|
1722
|
+
* fetchRequest.request({ url: '/data', fetcher: customFetch });
|
|
1723
|
+
* ```
|
|
1724
|
+
*/
|
|
1688
1725
|
fetcher?: typeof fetch;
|
|
1689
|
-
|
|
1690
|
-
signal?: AbortSignal;
|
|
1691
|
-
onAbort?(config: RequestAdapterFetchConfig): void;
|
|
1692
|
-
};
|
|
1726
|
+
}
|
|
1693
1727
|
declare class RequestAdapterFetch implements RequestAdapterInterface<RequestAdapterFetchConfig> {
|
|
1694
1728
|
readonly config: RequestAdapterFetchConfig;
|
|
1695
1729
|
private executor;
|
|
@@ -1740,7 +1774,7 @@ declare class RequestAdapterFetch implements RequestAdapterInterface<RequestAdap
|
|
|
1740
1774
|
* @param config The configuration used for the fetch request.
|
|
1741
1775
|
* @returns A RequestAdapterResponse containing the processed response data.
|
|
1742
1776
|
*/
|
|
1743
|
-
toAdapterResponse<Request>(data:
|
|
1777
|
+
toAdapterResponse<Request, Res = unknown>(data: Res, response: Response, config: RequestAdapterFetchConfig<Request>): RequestAdapterResponse<Request, Res>;
|
|
1744
1778
|
/**
|
|
1745
1779
|
* Extracts headers from the fetch Response object and returns them as a record.
|
|
1746
1780
|
*
|
|
@@ -2044,6 +2078,46 @@ declare class FetchURLPlugin implements ExecutorPlugin {
|
|
|
2044
2078
|
onError({ error }: ExecutorContext): RequestError;
|
|
2045
2079
|
}
|
|
2046
2080
|
|
|
2081
|
+
/**
|
|
2082
|
+
* Represents a manager for handling HTTP requests.
|
|
2083
|
+
*
|
|
2084
|
+
* This interface defines a manager that contains an adapter and an executor.
|
|
2085
|
+
* It provides methods for adding plugins to the executor and making requests.
|
|
2086
|
+
*
|
|
2087
|
+
* Why this is an abstract class?
|
|
2088
|
+
*
|
|
2089
|
+
* - Because the Executor can be overridden at runtime, the type cannot be fixed,
|
|
2090
|
+
* so we need to reasonably flexibly control it.
|
|
2091
|
+
* - So we need to redefine the request type when implementing the current class.
|
|
2092
|
+
*
|
|
2093
|
+
* @since 1.2.2
|
|
2094
|
+
*/
|
|
2095
|
+
declare abstract class RequestManager<Config extends RequestAdapterConfig> {
|
|
2096
|
+
protected readonly adapter: RequestAdapterInterface<Config>;
|
|
2097
|
+
protected readonly executor: AsyncExecutor;
|
|
2098
|
+
constructor(adapter: RequestAdapterInterface<Config>, executor?: AsyncExecutor);
|
|
2099
|
+
/**
|
|
2100
|
+
* Adds a plugin to the executor.
|
|
2101
|
+
*
|
|
2102
|
+
* @since 1.2.2
|
|
2103
|
+
*
|
|
2104
|
+
* @param plugin - The plugin to be used by the executor.
|
|
2105
|
+
* @returns The current instance of RequestManagerInterface for chaining.
|
|
2106
|
+
*/
|
|
2107
|
+
usePlugin(plugin: ExecutorPlugin | ExecutorPlugin[]): this;
|
|
2108
|
+
/**
|
|
2109
|
+
* Executes a request with the given configuration.
|
|
2110
|
+
*
|
|
2111
|
+
* This method need to be overridden by the subclass, override type definition of request method.
|
|
2112
|
+
*
|
|
2113
|
+
* Of course, you can also override its logic.
|
|
2114
|
+
*
|
|
2115
|
+
* @param config - The configuration for the request.
|
|
2116
|
+
* @returns A promise that resolves to the response of the request.
|
|
2117
|
+
*/
|
|
2118
|
+
request(config: unknown): Promise<unknown>;
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2047
2121
|
/**
|
|
2048
2122
|
* Represents a scheduler for managing HTTP requests.
|
|
2049
2123
|
*
|
|
@@ -2098,31 +2172,13 @@ declare class FetchURLPlugin implements ExecutorPlugin {
|
|
|
2098
2172
|
*
|
|
2099
2173
|
* @template Config - The configuration type extending RequestAdapterConfig.
|
|
2100
2174
|
*/
|
|
2101
|
-
declare class RequestScheduler<Config extends RequestAdapterConfig> {
|
|
2102
|
-
readonly adapter: RequestAdapterInterface<Config>;
|
|
2103
|
-
readonly executor: AsyncExecutor;
|
|
2104
|
-
/**
|
|
2105
|
-
* Initializes a new instance of the RequestScheduler class.
|
|
2106
|
-
*
|
|
2107
|
-
* @since 1.0.14
|
|
2108
|
-
*
|
|
2109
|
-
* @param adapter - The request adapter interface to be used for making requests.
|
|
2110
|
-
*/
|
|
2111
|
-
constructor(adapter: RequestAdapterInterface<Config>);
|
|
2112
|
-
/**
|
|
2113
|
-
* Adds a plugin to the request execution process.
|
|
2114
|
-
*
|
|
2115
|
-
* @since 1.0.14
|
|
2116
|
-
*
|
|
2117
|
-
* @param plugin - The plugin to be used by the executor.
|
|
2118
|
-
* @returns The current instance of RequestScheduler for chaining.
|
|
2119
|
-
*/
|
|
2120
|
-
usePlugin(plugin: ExecutorPlugin): this;
|
|
2175
|
+
declare class RequestScheduler<Config extends RequestAdapterConfig> extends RequestManager<Config> {
|
|
2121
2176
|
/**
|
|
2122
2177
|
* Executes a request with the given configuration.
|
|
2123
2178
|
*
|
|
2124
2179
|
* @since 1.0.14
|
|
2125
2180
|
*
|
|
2181
|
+
* @override
|
|
2126
2182
|
* @param config - The configuration for the request.
|
|
2127
2183
|
* @returns A promise that resolves to the response of the request.
|
|
2128
2184
|
*/
|
|
@@ -2192,6 +2248,213 @@ declare class RequestScheduler<Config extends RequestAdapterConfig> {
|
|
|
2192
2248
|
connect<Request, Response>(url: string, config?: RequestAdapterConfig<Request>): Promise<RequestAdapterResponse<Response, Request>>;
|
|
2193
2249
|
}
|
|
2194
2250
|
|
|
2251
|
+
/**
|
|
2252
|
+
* Represents a transaction for managing HTTP requests.
|
|
2253
|
+
*
|
|
2254
|
+
* Now `RequestTransaction` and `RequestScheduler` have the same purpose, only different in form.
|
|
2255
|
+
*
|
|
2256
|
+
* If you want to override the return type of the request, you can use `RequestTransaction`.
|
|
2257
|
+
*
|
|
2258
|
+
* If you don't consider type, you can also use `requestScheduler`, just manually declare the return type.
|
|
2259
|
+
*
|
|
2260
|
+
* If you have the need to override the response or execution context, it is recommended to use `RequestTransaction`,
|
|
2261
|
+
* because it can match the type through typescript.
|
|
2262
|
+
*
|
|
2263
|
+
* The `request` method of `RequestTransaction` can do the following:
|
|
2264
|
+
* 1. Directly declare the return type through generics
|
|
2265
|
+
* 2. Declare the config type through generics
|
|
2266
|
+
* 3. Declare the request parameters and return values through `RequestTransactionInterface`
|
|
2267
|
+
*
|
|
2268
|
+
* Currently, it does not support passing parameters through generics, but you can use `RequestTransactionInterface`.
|
|
2269
|
+
*
|
|
2270
|
+
* @example Directly declare the return type through generics
|
|
2271
|
+
* ```typescript
|
|
2272
|
+
* const client = new RequestTransaction<CustomConfig>(new RequestAdapterFetch());
|
|
2273
|
+
*
|
|
2274
|
+
* client
|
|
2275
|
+
* .request<{
|
|
2276
|
+
* list: string[];
|
|
2277
|
+
* }>({ url: 'https://api.example.com/data', method: 'GET', hasCatchError: true })
|
|
2278
|
+
* .then((response) => {
|
|
2279
|
+
* console.log(response.data.list);
|
|
2280
|
+
* });
|
|
2281
|
+
* ```
|
|
2282
|
+
*
|
|
2283
|
+
* @example Declare the config type through generics
|
|
2284
|
+
* ```typescript
|
|
2285
|
+
* const client = new RequestTransaction<
|
|
2286
|
+
* RequestAdapterConfig & { hasCatchError?: boolean }
|
|
2287
|
+
* >(new RequestAdapterFetch());
|
|
2288
|
+
*
|
|
2289
|
+
* client.request({
|
|
2290
|
+
* url: 'https://api.example.com/data',
|
|
2291
|
+
* method: 'GET',
|
|
2292
|
+
* hasCatchError: true,
|
|
2293
|
+
* data: { name: 'John Doe' }
|
|
2294
|
+
* });
|
|
2295
|
+
* ```
|
|
2296
|
+
*
|
|
2297
|
+
* @example You can also extend the config type
|
|
2298
|
+
*
|
|
2299
|
+
* ```typescript
|
|
2300
|
+
* interface CustomConfig extends RequestAdapterConfig {
|
|
2301
|
+
* hasCatchError?: boolean;
|
|
2302
|
+
* }
|
|
2303
|
+
*
|
|
2304
|
+
* const client = new RequestTransaction<CustomConfig>(new RequestAdapterFetch());
|
|
2305
|
+
*
|
|
2306
|
+
* client.request({
|
|
2307
|
+
* url: 'https://api.example.com/data',
|
|
2308
|
+
* method: 'GET',
|
|
2309
|
+
* hasCatchError: true,
|
|
2310
|
+
* data: { name: 'John Doe' }
|
|
2311
|
+
* });
|
|
2312
|
+
* ```
|
|
2313
|
+
*
|
|
2314
|
+
* @example Directly declare the request parameters and return values through `RequestTransactionInterface`
|
|
2315
|
+
* ```typescript
|
|
2316
|
+
* interface CustomConfig extends RequestAdapterConfig {
|
|
2317
|
+
* hasCatchError?: boolean;
|
|
2318
|
+
* }
|
|
2319
|
+
* interface CustomResponse<T = unknown>
|
|
2320
|
+
* extends RequestAdapterResponse<unknown, T> {
|
|
2321
|
+
* catchError?: unknown;
|
|
2322
|
+
* }
|
|
2323
|
+
*
|
|
2324
|
+
* const client = new RequestTransaction<CustomConfig>(new RequestAdapterFetch());
|
|
2325
|
+
*
|
|
2326
|
+
* client
|
|
2327
|
+
* .request<
|
|
2328
|
+
* RequestTransactionInterface<
|
|
2329
|
+
* CustomConfig,
|
|
2330
|
+
* CustomResponse<{ list?: string[] }>
|
|
2331
|
+
* >
|
|
2332
|
+
* >({ url: 'https://api.example.com/data', method: 'GET', hasCatchError: true })
|
|
2333
|
+
* .then((response) => {
|
|
2334
|
+
* console.log(response.catchError);
|
|
2335
|
+
* // => (property) CustomResponse<T = unknown>.catchError?: unknown
|
|
2336
|
+
* console.log(response.data.list);
|
|
2337
|
+
* // => (property) list?: string[] | undefined
|
|
2338
|
+
* });
|
|
2339
|
+
* ```
|
|
2340
|
+
*
|
|
2341
|
+
* @example Finally, you can also use `RequestTransaction` to create a complete api client
|
|
2342
|
+
* ```typescript
|
|
2343
|
+
* // catch plugin
|
|
2344
|
+
* interface CatchPluginConfig {
|
|
2345
|
+
* hasCatchError?: boolean;
|
|
2346
|
+
* }
|
|
2347
|
+
* interface CatchPluginResponseData {
|
|
2348
|
+
* catchError?: unknown;
|
|
2349
|
+
* }
|
|
2350
|
+
*
|
|
2351
|
+
* // The main api client configuration
|
|
2352
|
+
* // You can inherit multiple config types from other plugins
|
|
2353
|
+
* interface ApiClientConfig extends RequestAdapterConfig, CatchPluginConfig {}
|
|
2354
|
+
*
|
|
2355
|
+
* // The main api client response type
|
|
2356
|
+
* // You can inherit multiple response types from other plugins
|
|
2357
|
+
* interface ApiClientResponse<T = unknown>
|
|
2358
|
+
* extends RequestAdapterResponse<unknown, T>,
|
|
2359
|
+
* CatchPluginResponseData {}
|
|
2360
|
+
*
|
|
2361
|
+
* // Independently declare a specific method Transaction
|
|
2362
|
+
* interface ApiTestTransaction
|
|
2363
|
+
* extends RequestTransactionInterface<
|
|
2364
|
+
* ApiClientConfig,
|
|
2365
|
+
* ApiClientResponse<{ list: string[] }>
|
|
2366
|
+
* > {}
|
|
2367
|
+
* class ApiClient extends RequestTransaction<ApiClientConfig> {
|
|
2368
|
+
* // If you don't require displaying the return type of the method
|
|
2369
|
+
* // Automatically deduce: Promise<ApiClientResponse<{ list: string[] }>>
|
|
2370
|
+
* test() {
|
|
2371
|
+
* return this.request<ApiTestTransaction>({
|
|
2372
|
+
* url: 'https://api.example.com/data',
|
|
2373
|
+
* method: 'GET',
|
|
2374
|
+
* hasCatchError: true
|
|
2375
|
+
* });
|
|
2376
|
+
* }
|
|
2377
|
+
*
|
|
2378
|
+
* // Displayly declare
|
|
2379
|
+
* test2(data: ApiTestTransaction['request']): Promise<ApiTestTransaction['response']> {
|
|
2380
|
+
* return this.request({
|
|
2381
|
+
* url: 'https://api.example.com/data',
|
|
2382
|
+
* method: 'GET',
|
|
2383
|
+
* hasCatchError: true,
|
|
2384
|
+
* data
|
|
2385
|
+
* });
|
|
2386
|
+
* }
|
|
2387
|
+
* }
|
|
2388
|
+
*
|
|
2389
|
+
* // Call the test method
|
|
2390
|
+
*
|
|
2391
|
+
* const req = new ApiClient(new RequestAdapterFetch());
|
|
2392
|
+
*
|
|
2393
|
+
* req.test().then((response) => {
|
|
2394
|
+
* console.log(response.catchError);
|
|
2395
|
+
* // => (property) CustomResponse<T = unknown>.catchError?: unknown
|
|
2396
|
+
* console.log(response.data.list);
|
|
2397
|
+
* // => (property) list?: string[] | undefined
|
|
2398
|
+
* });
|
|
2399
|
+
* ```
|
|
2400
|
+
*
|
|
2401
|
+
* If you are not satisfied with `RequestTransaction`, you can completely rewrite your own `RequestTransaction`.
|
|
2402
|
+
*
|
|
2403
|
+
* Only need to inherit `RequestManager` and override the `request` method.
|
|
2404
|
+
*
|
|
2405
|
+
* Finally, if you don't need typescript support, then it's basically the same as `RequestScheduler`,
|
|
2406
|
+
* except that some of the shortcuts have different parameters.
|
|
2407
|
+
*
|
|
2408
|
+
* @since 1.2.2
|
|
2409
|
+
*/
|
|
2410
|
+
declare class RequestTransaction<Config extends RequestAdapterConfig<unknown>> extends RequestManager<Config> {
|
|
2411
|
+
/**
|
|
2412
|
+
* Makes an HTTP request with flexible type definitions
|
|
2413
|
+
* @template Transaction - Can be either the direct response data type or a RequestTransactionInterface
|
|
2414
|
+
* @param config - Request configuration object
|
|
2415
|
+
* @returns Promise of response data
|
|
2416
|
+
*/
|
|
2417
|
+
request<Transaction = unknown>(config: Transaction extends RequestTransactionInterface<Config, unknown> ? Transaction['request'] : Config): Promise<Transaction extends RequestTransactionInterface<Config, unknown> ? Transaction['response'] : RequestAdapterResponse<unknown, Transaction>>;
|
|
2418
|
+
/**
|
|
2419
|
+
* Sends a GET request
|
|
2420
|
+
* @template Transaction - Response data type or RequestTransactionInterface
|
|
2421
|
+
* @param {string} url - The URL to send the request to
|
|
2422
|
+
* @param {Omit<Config, 'url' | 'method'>} [config] - Additional configuration options
|
|
2423
|
+
*/
|
|
2424
|
+
get<Transaction = unknown>(url: string, config?: Omit<Config, 'url' | 'method'>): Promise<Transaction extends RequestTransactionInterface<Config, unknown> ? Transaction['response'] : RequestAdapterResponse<unknown, Transaction>>;
|
|
2425
|
+
/**
|
|
2426
|
+
* Sends a POST request
|
|
2427
|
+
* @template Transaction - Response data type or RequestTransactionInterface
|
|
2428
|
+
* @param {string} url - The URL to send the request to
|
|
2429
|
+
* @param {Transaction extends RequestTransactionInterface<Config, unknown> ? Transaction['request']['data'] : Config['data']} [data] - The data to be sent in the request body
|
|
2430
|
+
* @param {Omit<Config, 'url' | 'method' | 'data'>} [config] - Additional configuration options
|
|
2431
|
+
*/
|
|
2432
|
+
post<Transaction = unknown>(url: string, data?: Transaction extends RequestTransactionInterface<Config, unknown> ? Transaction['request']['data'] : Config['data'], config?: Omit<Config, 'url' | 'method' | 'data'>): Promise<Transaction extends RequestTransactionInterface<Config, unknown> ? Transaction['response'] : RequestAdapterResponse<unknown, Transaction>>;
|
|
2433
|
+
/**
|
|
2434
|
+
* Sends a PUT request
|
|
2435
|
+
* @template Transaction - Response data type or RequestTransactionInterface
|
|
2436
|
+
* @param {string} url - The URL to send the request to
|
|
2437
|
+
* @param {Transaction extends RequestTransactionInterface<Config, unknown> ? Transaction['request']['data'] : Config['data']} [data] - The data to be sent in the request body
|
|
2438
|
+
* @param {Omit<Config, 'url' | 'method' | 'data'>} [config] - Additional configuration options
|
|
2439
|
+
*/
|
|
2440
|
+
put<Transaction = unknown>(url: string, data?: Transaction extends RequestTransactionInterface<Config, unknown> ? Transaction['request']['data'] : Config['data'], config?: Omit<Config, 'url' | 'method' | 'data'>): Promise<Transaction extends RequestTransactionInterface<Config, unknown> ? Transaction['response'] : RequestAdapterResponse<unknown, Transaction>>;
|
|
2441
|
+
/**
|
|
2442
|
+
* Sends a DELETE request
|
|
2443
|
+
* @template Transaction - Response data type or RequestTransactionInterface
|
|
2444
|
+
* @param {string} url - The URL to send the request to
|
|
2445
|
+
* @param {Omit<Config, 'url' | 'method'>} [config] - Additional configuration options
|
|
2446
|
+
*/
|
|
2447
|
+
delete<Transaction = unknown>(url: string, config?: Omit<Config, 'url' | 'method'>): Promise<Transaction extends RequestTransactionInterface<Config, unknown> ? Transaction['response'] : RequestAdapterResponse<unknown, Transaction>>;
|
|
2448
|
+
/**
|
|
2449
|
+
* Sends a PATCH request
|
|
2450
|
+
* @template Transaction - Response data type or RequestTransactionInterface
|
|
2451
|
+
* @param {string} url - The URL to send the request to
|
|
2452
|
+
* @param {Transaction extends RequestTransactionInterface<Config, unknown> ? Transaction['request']['data'] : Config['data']} [data] - The data to be sent in the request body
|
|
2453
|
+
* @param {Omit<Config, 'url' | 'method' | 'data'>} [config] - Additional configuration options
|
|
2454
|
+
*/
|
|
2455
|
+
patch<Transaction = unknown>(url: string, data?: Transaction extends RequestTransactionInterface<Config, unknown> ? Transaction['request']['data'] : Config['data'], config?: Omit<Config, 'url' | 'method' | 'data'>): Promise<Transaction extends RequestTransactionInterface<Config, unknown> ? Transaction['response'] : RequestAdapterResponse<unknown, Transaction>>;
|
|
2456
|
+
}
|
|
2457
|
+
|
|
2195
2458
|
/**
|
|
2196
2459
|
* Enhanced JSON serialization implementation that combines standard JSON API with additional features
|
|
2197
2460
|
*
|
|
@@ -2570,5 +2833,5 @@ declare class JSONStorage implements SyncStorage<string> {
|
|
|
2570
2833
|
clear(): void;
|
|
2571
2834
|
}
|
|
2572
2835
|
|
|
2573
|
-
export { AsyncExecutor, Base64Serializer, Executor, ExecutorError, FetchAbortPlugin, FetchURLPlugin, JSONSerializer, JSONStorage, LEVELS, Logger, RequestAdapterAxios, RequestAdapterFetch, RequestError, RequestErrorID, RequestScheduler, RetryPlugin, SyncExecutor };
|
|
2574
|
-
export type { AsyncStorage, Encryptor, ExecOptions, ExecutorContext, ExecutorPlugin, HookRuntimes, Intersection, LogArgument, LogLevel, PromiseTask, RequestAdapterConfig, RequestAdapterFetchConfig, RequestAdapterInterface, RequestAdapterResponse, RetryOptions, Serializer, SyncStorage, SyncTask, Task, ValueOf };
|
|
2836
|
+
export { AsyncExecutor, Base64Serializer, Executor, ExecutorError, FetchAbortPlugin, FetchURLPlugin, JSONSerializer, JSONStorage, LEVELS, Logger, RequestAdapterAxios, RequestAdapterFetch, RequestError, RequestErrorID, RequestManager, RequestScheduler, RequestTransaction, RetryPlugin, SyncExecutor };
|
|
2837
|
+
export type { AsyncStorage, Encryptor, ExecOptions, ExecutorContext, ExecutorPlugin, HookRuntimes, Intersection, LogArgument, LogLevel, PromiseTask, RequestAdapterConfig, RequestAdapterFetchConfig, RequestAdapterInterface, RequestAdapterResponse, RequestTransactionInterface, RetryOptions, Serializer, SyncStorage, SyncTask, Task, ValueOf };
|
package/dist/index.es.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var t=function(){function t(t){this.config=t,this.plugins=[]}return t.prototype.use=function(t){this.plugins.find((function(r){return r===t||r.pluginName===t.pluginName||r.constructor===t.constructor}))&&t.onlyOne?console.warn("Plugin ".concat(t.pluginName," is already used, skip adding")):this.plugins.push(t)},t}(),r=function(t,n){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])},r(t,n)};function n(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}var e=function(){return e=Object.assign||function(t){for(var r,n=1,e=arguments.length;n<e;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t},e.apply(this,arguments)};function o(t,r,n,e){return new(n||(n=Promise))((function(o,i){function u(t){try{a(e.next(t))}catch(t){i(t)}}function s(t){try{a(e.throw(t))}catch(t){i(t)}}function a(t){var r;t.done?o(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(u,s)}a((e=e.apply(t,r||[])).next())}))}function i(t,r){var n,e,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return u.next=s(0),u.throw=s(1),u.return=s(2),"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function s(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;u&&(u=0,s[0]&&(i=0)),i;)try{if(n=1,e&&(o=2&s[0]?e.return:s[0]?e.throw||((o=e.return)&&o.call(e),0):e.next)&&!(o=o.call(e,s[1])).done)return o;switch(e=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,e=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=r.call(t,i)}catch(t){s=[6,t],e=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function u(t,r,n){if(n||2===arguments.length)for(var e,o=0,i=r.length;o<i;o++)!e&&o in r||(e||(e=Array.prototype.slice.call(r,0,o)),e[o]=r[o]);return t.concat(e||Array.prototype.slice.call(r))}"function"==typeof SuppressedError&&SuppressedError;var s,a=function(t){function r(r,n){var e=this.constructor,o=t.call(this,n instanceof Error?n.message:n||r)||this;return o.id=r,n instanceof Error&&"stack"in n&&(o.stack=n.stack),Object.setPrototypeOf(o,e.prototype),o}return n(r,t),r}(Error),c=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r}(a);!function(t){t.REQUEST_ERROR="REQUEST_ERROR",t.ENV_FETCH_NOT_SUPPORT="ENV_FETCH_NOT_SUPPORT",t.FETCHER_NONE="FETCHER_NONE",t.RESPONSE_NOT_OK="RESPONSE_NOT_OK",t.ABORT_ERROR="ABORT_ERROR",t.URL_NONE="URL_NONE"}(s||(s={}));var f,l,p,h,v=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.runHooks=function(t,r,n){for(var e=[],s=3;s<arguments.length;s++)e[s-3]=arguments[s];return o(this,void 0,void 0,(function(){var o,s,a,c,f,l,p,h;return i(this,(function(i){switch(i.label){case 0:o=-1,(a=n||{parameters:void 0,hooksRuntimes:{}}).hooksRuntimes.times=0,a.hooksRuntimes.index=void 0,c=0,f=t,i.label=1;case 1:return c<f.length?(l=f[c],o++,"function"!=typeof l[r]||"function"==typeof l.enabled&&!l.enabled(r,n)?[3,3]:(null===(h=a.hooksRuntimes)||void 0===h?void 0:h.breakChain)?[3,4]:(a.hooksRuntimes.pluginName=l.pluginName,a.hooksRuntimes.hookName=r,a.hooksRuntimes.times++,a.hooksRuntimes.index=o,[4,l[r].apply(l,u([n],e,!1))])):[3,4];case 2:if(void 0!==(p=i.sent())&&(s=p,a.hooksRuntimes.returnValue=p,a.hooksRuntimes.returnBreakChain))return[2,s];i.label=3;case 3:return c++,[3,1];case 4:return[2,s]}}))}))},r.prototype.execNoError=function(t,r){return o(this,void 0,void 0,(function(){var n;return i(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.exec(t,r)];case 1:return[2,e.sent()];case 2:return(n=e.sent())instanceof a?[2,n]:[2,new a("UNKNOWN_ASYNC_ERROR",n)];case 3:return[2]}}))}))},r.prototype.exec=function(t,r){var n=r||t,e=r?t:void 0;if("function"!=typeof n)throw new Error("Task must be a async function!");return this.run(e,n)},r.prototype.run=function(t,r){return o(this,void 0,void 0,(function(){var n,e,u,s=this;return i(this,(function(c){switch(c.label){case 0:n={parameters:t,returnValue:void 0,error:void 0,hooksRuntimes:{pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0}},e=function(t){return o(s,void 0,void 0,(function(){var n;return i(this,(function(e){switch(e.label){case 0:return[4,this.runHooks(this.plugins,"onExec",t,r)];case 1:return e.sent(),0!==t.hooksRuntimes.times?[3,3]:(n=t,[4,r(t)]);case 2:return n.returnValue=e.sent(),[2];case 3:return t.returnValue=t.hooksRuntimes.returnValue,[2]}}))}))},c.label=1;case 1:return c.trys.push([1,5,7,8]),[4,this.runHooks(this.plugins,"onBefore",n)];case 2:return c.sent(),[4,e(n)];case 3:return c.sent(),[4,this.runHooks(this.plugins,"onSuccess",n)];case 4:return c.sent(),[2,n.returnValue];case 5:return u=c.sent(),n.error=u,[4,this.runHooks(this.plugins,"onError",n)];case 6:if(c.sent(),n.hooksRuntimes.returnValue&&(n.error=n.hooksRuntimes.returnValue),n.error instanceof a)throw n.error;throw new a("UNKNOWN_ASYNC_ERROR",n.error);case 7:return n.hooksRuntimes={pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0},[7];case 8:return[2]}}))}))},r}(t),y=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.runHooks=function(t,r,n){for(var e,o=[],i=3;i<arguments.length;i++)o[i-3]=arguments[i];var s,a=-1,c=n||{parameters:void 0,hooksRuntimes:{}};c.hooksRuntimes.times=0,c.hooksRuntimes.index=void 0;for(var f=0,l=t;f<l.length;f++){var p=l[f];if(a++,"function"==typeof p[r]&&("function"!=typeof p.enabled||p.enabled(r,c))){if(null===(e=c.hooksRuntimes)||void 0===e?void 0:e.breakChain)break;c.hooksRuntimes.pluginName=p.pluginName,c.hooksRuntimes.hookName=r,c.hooksRuntimes.times++,c.hooksRuntimes.index=a;var h=p[r].apply(p,u([n],o,!1));if(void 0!==h&&(s=h,c.hooksRuntimes.returnValue=h,c.hooksRuntimes.returnBreakChain))return s}}return s},r.prototype.execNoError=function(t,r){try{return this.exec(t,r)}catch(t){return t instanceof a?t:new a("UNKNOWN_SYNC_ERROR",t)}},r.prototype.exec=function(t,r){var n=r||t,e=r?t:void 0;if("function"!=typeof n)throw new Error("Task must be a function!");return this.run(e,n)},r.prototype.run=function(t,r){var n,e=this,o={parameters:t,returnValue:void 0,error:void 0,hooksRuntimes:{pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0}};try{return this.runHooks(this.plugins,"onBefore",o),n=o,e.runHooks(e.plugins,"onExec",n,r),n.returnValue=n.hooksRuntimes.times?n.hooksRuntimes.returnValue:r(n),this.runHooks(this.plugins,"onSuccess",o),o.returnValue}catch(t){if(o.error=t,this.runHooks(this.plugins,"onError",o),o.hooksRuntimes.returnValue&&(o.error=o.hooksRuntimes.returnValue),o.error instanceof a)throw o.error;throw new a("UNKNOWN_SYNC_ERROR",o.error)}finally{o.hooksRuntimes={pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0}}},r}(t),d=function(){return!0},g=function(){function t(t){var r;void 0===t&&(t={}),this.pluginName="RetryPlugin",this.onlyOne=!0,this.options=e(e({retryDelay:1e3,useExponentialBackoff:!1,shouldRetry:d},t),{maxRetries:Math.min(Math.max(1,null!==(r=t.maxRetries)&&void 0!==r?r:3),16)})}return t.prototype.delay=function(t){return o(this,void 0,void 0,(function(){var r;return i(this,(function(n){return r=this.options.useExponentialBackoff?this.options.retryDelay*Math.pow(2,t):this.options.retryDelay,[2,new Promise((function(t){return setTimeout(t,r)}))]}))}))},t.prototype.onExec=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return this.options.maxRetries<1?[2,r(t)]:[2,this.retry(r,t,this.options,this.options.maxRetries)]}))}))},t.prototype.shouldRetry=function(t){var r=t.error;return t.retryCount>0&&this.options.shouldRetry(r)},t.prototype.retry=function(t,r,n,e){return o(this,void 0,void 0,(function(){var o;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,4]),[4,t(r)];case 1:return[2,i.sent()];case 2:if(o=i.sent(),!this.shouldRetry({error:o,retryCount:e}))throw new a("RETRY_ERROR","All ".concat(n.maxRetries," attempts failed: ").concat(o.message));return[4,this.delay(n.maxRetries-e)];case 3:return i.sent(),e--,[2,this.retry(t,r,n,e)];case 4:return[2]}}))}))},t}(),m="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function b(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var R,_,O=b(h?p:(h=1,p=l?f:(l=1,f=function(t){return t&&t.length?t[0]:void 0})));var E,w,N,k,j,S,x,T,P,A,C,U,q,B,I,z,V,F,H,D,G=b(_?R:(_=1,R=function(t){var r=null==t?0:t.length;return r?t[r-1]:void 0}));function L(){if(k)return N;k=1;var t=function(){if(w)return E;w=1;var t="object"==typeof m&&m&&m.Object===Object&&m;return E=t}(),r="object"==typeof self&&self&&self.Object===Object&&self,n=t||r||Function("return this")();return N=n}function $(){if(S)return j;S=1;var t=L().Symbol;return j=t}function K(){if(U)return C;U=1;var t=$(),r=function(){if(T)return x;T=1;var t=$(),r=Object.prototype,n=r.hasOwnProperty,e=r.toString,o=t?t.toStringTag:void 0;return x=function(t){var r=n.call(t,o),i=t[o];try{t[o]=void 0;var u=!0}catch(t){}var s=e.call(t);return u&&(r?t[o]=i:delete t[o]),s}}(),n=function(){if(A)return P;A=1;var t=Object.prototype.toString;return P=function(r){return t.call(r)}}(),e=t?t.toStringTag:void 0;return C=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":e&&e in Object(t)?r(t):n(t)}}function W(){if(z)return I;z=1;var t=(B?q:(B=1,q=function(t,r){return function(n){return t(r(n))}}))(Object.getPrototypeOf,Object);return I=t}function M(){if(F)return V;return F=1,V=function(t){return null!=t&&"object"==typeof t}}var J,Q,Y,Z,X=b(function(){if(D)return H;D=1;var t=K(),r=W(),n=M(),e=Function.prototype,o=Object.prototype,i=e.toString,u=o.hasOwnProperty,s=i.call(Object);return H=function(e){if(!n(e)||"[object Object]"!=t(e))return!1;var o=r(e);if(null===o)return!0;var a=u.call(o,"constructor")&&o.constructor;return"function"==typeof a&&a instanceof a&&i.call(a)==s}}());function tt(){if(Q)return J;Q=1;var t=Array.isArray;return J=t}var rt,nt,et=function(){if(Z)return Y;Z=1;var t=K(),r=tt(),n=M();return Y=function(e){return"string"==typeof e||!r(e)&&n(e)&&"[object String]"==t(e)}}(),ot=b(et),it=b(tt());function ut(){if(nt)return rt;return nt=1,rt=function(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}}var st,at=b(ut()),ct={LOG:"LOG",INFO:"INFO",ERROR:"ERROR",WARN:"WARN",DEBUG:"DEBUG"},ft=function(){function t(t){var r=void 0===t?{}:t,n=r.isCI,e=void 0!==n&&n,o=r.dryRun,i=void 0!==o&&o,u=r.debug,s=void 0!==u&&u,a=r.silent,c=void 0!==a&&a;this.isCI=e,this.isDryRun=i,this.isDebug=s,this.isSilent=c}return t.prototype.print=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.isSilent||console.log.apply(console,r)},t.prototype.prefix=function(t,r){return t},t.prototype.log=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.print.apply(this,u([ct.LOG],t,!1))},t.prototype.info=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.print.apply(this,u([ct.INFO,this.prefix(ct.INFO)],t,!1))},t.prototype.warn=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.print.apply(this,u([ct.WARN,this.prefix(ct.WARN)],t,!1))},t.prototype.error=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.print.apply(this,u([ct.ERROR,this.prefix(ct.ERROR)],t,!1))},t.prototype.debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(this.isDebug){var n=O(t),e=at(n)?JSON.stringify(n):String(n);this.print.apply(this,u([ct.DEBUG,this.prefix(ct.DEBUG),e],t.slice(1),!1))}},t.prototype.verbose=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.isDebug&&this.print.apply(this,u([ct.DEBUG],t,!1))},t.prototype.exec=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=X(G(t))?G(t):void 0,e=n||{},o=e.isDryRun,i=e.isExternal;if(o||this.isDryRun){var u=[null==i?"$":"!",t.slice(0,null==n?void 0:-1).map((function(t){return ot(t)?t:it(t)?t.join(" "):String(t)})).join(" ")].join(" ").trim();this.log(u)}},t.prototype.obtrusive=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.isCI||this.log(),this.log.apply(this,t),this.isCI||this.log()},t}(),lt={exports:{}};var pt,ht,vt,yt,dt,gt,mt,bt,Rt,_t,Ot,Et,wt,Nt,kt,jt,St,xt,Tt,Pt,At,Ct,Ut,qt,Bt,It,zt,Vt,Ft,Ht,Dt,Gt,Lt,$t,Kt,Wt,Mt,Jt,Qt,Yt,Zt,Xt,tr,rr,nr,er,or,ir,ur,sr,ar,cr,fr,lr,pr,hr,vr,yr,dr,gr,mr,br,Rr,_r,Or,Er,wr,Nr,kr,jr,Sr,xr,Tr,Pr,Ar,Cr,Ur,qr,Br,Ir,zr,Vr,Fr,Hr,Dr,Gr,Lr,$r,Kr,Wr,Mr,Jr,Qr,Yr,Zr,Xr,tn,rn,nn,en,on,un,sn,an,cn,fn,ln,pn,hn,vn,yn,dn,gn,mn,bn,Rn,_n,On,En,wn,Nn,kn,jn,Sn,xn,Tn,Pn,An,Cn,Un,qn,Bn,In,zn,Vn,Fn,Hn=(st||(st=1,function(t,r){function n(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.apply(void 0,t)}function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return a(!0===t[0],!1,t)}function o(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return a(!0===t[0],!0,t)}function i(t){if(Array.isArray(t)){for(var r=[],n=0;n<t.length;++n)r.push(i(t[n]));return r}if(u(t)){for(var n in r={},t)r[n]=i(t[n]);return r}return t}function u(t){return t&&"object"==typeof t&&!Array.isArray(t)}function s(t,r){if(!u(t))return r;for(var n in r)"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(t[n]=u(t[n])&&u(r[n])?s(t[n],r[n]):r[n]);return t}function a(t,r,n){var e;!t&&u(e=n.shift())||(e={});for(var o=0;o<n.length;++o){var a=n[o];if(u(a))for(var c in a)if("__proto__"!==c&&"constructor"!==c&&"prototype"!==c){var f=t?i(a[c]):a[c];e[c]=r?s(e[c],f):f}}return e}Object.defineProperty(r,"__esModule",{value:!0}),r.isPlainObject=r.clone=r.recursive=r.merge=r.main=void 0,t.exports=r=n,r.default=n,r.main=n,n.clone=i,n.isPlainObject=u,n.recursive=o,r.merge=e,r.recursive=o,r.clone=i,r.isPlainObject=u}(lt,lt.exports)),lt.exports),Dn=b(Hn);function Gn(){if(ht)return pt;ht=1;var t=K(),r=M();return pt=function(n){return"symbol"==typeof n||r(n)&&"[object Symbol]"==t(n)}}function Ln(){if(_t)return Rt;_t=1;var t,r=function(){if(bt)return mt;bt=1;var t=L()["__core-js_shared__"];return mt=t}(),n=(t=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return Rt=function(t){return!!n&&n in t}}function $n(){if(Nt)return wt;Nt=1;var t=function(){if(gt)return dt;gt=1;var t=K(),r=ut();return dt=function(n){if(!r(n))return!1;var e=t(n);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}}(),r=Ln(),n=ut(),e=function(){if(Et)return Ot;Et=1;var t=Function.prototype.toString;return Ot=function(r){if(null!=r){try{return t.call(r)}catch(t){}try{return r+""}catch(t){}}return""}}(),o=/^\[object .+?Constructor\]$/,i=Function.prototype,u=Object.prototype,s=i.toString,a=u.hasOwnProperty,c=RegExp("^"+s.call(a).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return wt=function(i){return!(!n(i)||r(i))&&(t(i)?c:o).test(e(i))}}function Kn(){if(xt)return St;xt=1;var t=$n(),r=jt?kt:(jt=1,kt=function(t,r){return null==t?void 0:t[r]});return St=function(n,e){var o=r(n,e);return t(o)?o:void 0}}function Wn(){if(Pt)return Tt;Pt=1;var t=Kn()(Object,"create");return Tt=t}function Mn(){if(Gt)return Dt;Gt=1;var t=function(){if(Ct)return At;Ct=1;var t=Wn();return At=function(){this.__data__=t?t(null):{},this.size=0}}(),r=qt?Ut:(qt=1,Ut=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}),n=function(){if(It)return Bt;It=1;var t=Wn(),r=Object.prototype.hasOwnProperty;return Bt=function(n){var e=this.__data__;if(t){var o=e[n];return"__lodash_hash_undefined__"===o?void 0:o}return r.call(e,n)?e[n]:void 0}}(),e=function(){if(Vt)return zt;Vt=1;var t=Wn(),r=Object.prototype.hasOwnProperty;return zt=function(n){var e=this.__data__;return t?void 0!==e[n]:r.call(e,n)}}(),o=function(){if(Ht)return Ft;Ht=1;var t=Wn();return Ft=function(r,n){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=t&&void 0===n?"__lodash_hash_undefined__":n,this}}();function i(t){var r=-1,n=null==t?0:t.length;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=n,i.prototype.has=e,i.prototype.set=o,Dt=i}function Jn(){if(Wt)return Kt;return Wt=1,Kt=function(t,r){return t===r||t!=t&&r!=r}}function Qn(){if(Jt)return Mt;Jt=1;var t=Jn();return Mt=function(r,n){for(var e=r.length;e--;)if(t(r[e][0],n))return e;return-1}}function Yn(){if(ir)return or;ir=1;var t=$t?Lt:($t=1,Lt=function(){this.__data__=[],this.size=0}),r=function(){if(Yt)return Qt;Yt=1;var t=Qn(),r=Array.prototype.splice;return Qt=function(n){var e=this.__data__,o=t(e,n);return!(o<0||(o==e.length-1?e.pop():r.call(e,o,1),--this.size,0))}}(),n=function(){if(Xt)return Zt;Xt=1;var t=Qn();return Zt=function(r){var n=this.__data__,e=t(n,r);return e<0?void 0:n[e][1]}}(),e=function(){if(rr)return tr;rr=1;var t=Qn();return tr=function(r){return t(this.__data__,r)>-1}}(),o=function(){if(er)return nr;er=1;var t=Qn();return nr=function(r,n){var e=this.__data__,o=t(e,r);return o<0?(++this.size,e.push([r,n])):e[o][1]=n,this}}();function i(t){var r=-1,n=null==t?0:t.length;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=n,i.prototype.has=e,i.prototype.set=o,or=i}function Zn(){if(cr)return ar;cr=1;var t=Mn(),r=Yn(),n=function(){if(sr)return ur;sr=1;var t=Kn()(L(),"Map");return ur=t}();return ar=function(){this.size=0,this.__data__={hash:new t,map:new(n||r),string:new t}}}function Xn(){if(hr)return pr;hr=1;var t=lr?fr:(lr=1,fr=function(t){var r=typeof t;return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t});return pr=function(r,n){var e=r.__data__;return t(n)?e["string"==typeof n?"string":"hash"]:e.map}}function te(){if(Er)return Or;Er=1;var t=Zn(),r=function(){if(yr)return vr;yr=1;var t=Xn();return vr=function(r){var n=t(this,r).delete(r);return this.size-=n?1:0,n}}(),n=function(){if(gr)return dr;gr=1;var t=Xn();return dr=function(r){return t(this,r).get(r)}}(),e=function(){if(br)return mr;br=1;var t=Xn();return mr=function(r){return t(this,r).has(r)}}(),o=function(){if(_r)return Rr;_r=1;var t=Xn();return Rr=function(r,n){var e=t(this,r),o=e.size;return e.set(r,n),this.size+=e.size==o?0:1,this}}();function i(t){var r=-1,n=null==t?0:t.length;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=n,i.prototype.has=e,i.prototype.set=o,Or=i}function re(){if(jr)return kr;jr=1;var t=function(){if(Nr)return wr;Nr=1;var t=te();function r(n,e){if("function"!=typeof n||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var o=function(){var t=arguments,r=e?e.apply(this,t):t[0],i=o.cache;if(i.has(r))return i.get(r);var u=n.apply(this,t);return o.cache=i.set(r,u)||i,u};return o.cache=new(r.Cache||t),o}return r.Cache=t,wr=r}();return kr=function(r){var n=t(r,(function(t){return 500===e.size&&e.clear(),t})),e=n.cache;return n}}function ne(){if(Cr)return Ar;Cr=1;var t=$(),r=Pr?Tr:(Pr=1,Tr=function(t,r){for(var n=-1,e=null==t?0:t.length,o=Array(e);++n<e;)o[n]=r(t[n],n,t);return o}),n=tt(),e=Gn(),o=t?t.prototype:void 0,i=o?o.toString:void 0;return Ar=function t(o){if("string"==typeof o)return o;if(n(o))return r(o,t)+"";if(e(o))return i?i.call(o):"";var u=o+"";return"0"==u&&1/o==-1/0?"-0":u},Ar}function ee(){if(Ir)return Br;Ir=1;var t=tt(),r=function(){if(yt)return vt;yt=1;var t=tt(),r=Gn(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,e=/^\w*$/;return vt=function(o,i){if(t(o))return!1;var u=typeof o;return!("number"!=u&&"symbol"!=u&&"boolean"!=u&&null!=o&&!r(o))||e.test(o)||!n.test(o)||null!=i&&o in Object(i)}}(),n=function(){if(xr)return Sr;xr=1;var t=re(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,e=t((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(r,(function(t,r,o,i){e.push(o?i.replace(n,"$1"):r||t)})),e}));return Sr=e}(),e=function(){if(qr)return Ur;qr=1;var t=ne();return Ur=function(r){return null==r?"":t(r)}}();return Br=function(o,i){return t(o)?o:r(o,i)?[o]:n(e(o))}}function oe(){if(Vr)return zr;Vr=1;var t=Gn();return zr=function(r){if("string"==typeof r||t(r))return r;var n=r+"";return"0"==n&&1/r==-1/0?"-0":n}}function ie(){if(Gr)return Dr;Gr=1;var t=Kn(),r=function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch(t){}}();return Dr=r}function ue(){if(Wr)return Kr;Wr=1;var t=function(){if($r)return Lr;$r=1;var t=ie();return Lr=function(r,n,e){"__proto__"==n&&t?t(r,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[n]=e}}(),r=Jn(),n=Object.prototype.hasOwnProperty;return Kr=function(e,o,i){var u=e[o];n.call(e,o)&&r(u,i)&&(void 0!==i||o in e)||t(e,o,i)}}function se(){if(Jr)return Mr;Jr=1;var t=/^(?:0|[1-9]\d*)$/;return Mr=function(r,n){var e=typeof r;return!!(n=null==n?9007199254740991:n)&&("number"==e||"symbol"!=e&&t.test(r))&&r>-1&&r%1==0&&r<n}}function ae(){if(Xr)return Zr;Xr=1;var t=function(){if(Hr)return Fr;Hr=1;var t=ee(),r=oe();return Fr=function(n,e){for(var o=0,i=(e=t(e,n)).length;null!=n&&o<i;)n=n[r(e[o++])];return o&&o==i?n:void 0}}(),r=function(){if(Yr)return Qr;Yr=1;var t=ue(),r=ee(),n=se(),e=ut(),o=oe();return Qr=function(i,u,s,a){if(!e(i))return i;for(var c=-1,f=(u=r(u,i)).length,l=f-1,p=i;null!=p&&++c<f;){var h=o(u[c]),v=s;if("__proto__"===h||"constructor"===h||"prototype"===h)return i;if(c!=l){var y=p[h];void 0===(v=a?a(y,h,p):void 0)&&(v=e(y)?y:n(u[c+1])?[]:{})}t(p,h,v),p=p[h]}return i}}(),n=ee();return Zr=function(e,o,i){for(var u=-1,s=o.length,a={};++u<s;){var c=o[u],f=t(e,c);i(f,c)&&r(a,n(c,e),f)}return a}}function ce(){if(un)return on;un=1;var t=function(){if(en)return nn;en=1;var t=K(),r=M();return nn=function(n){return r(n)&&"[object Arguments]"==t(n)}}(),r=M(),n=Object.prototype,e=n.hasOwnProperty,o=n.propertyIsEnumerable,i=t(function(){return arguments}())?t:function(t){return r(t)&&e.call(t,"callee")&&!o.call(t,"callee")};return on=i}function fe(){if(fn)return cn;fn=1;var t=ee(),r=ce(),n=tt(),e=se(),o=an?sn:(an=1,sn=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}),i=oe();return cn=function(u,s,a){for(var c=-1,f=(s=t(s,u)).length,l=!1;++c<f;){var p=i(s[c]);if(!(l=null!=u&&a(u,p)))break;u=u[p]}return l||++c!=f?l:!!(f=null==u?0:u.length)&&o(f)&&e(p,f)&&(n(u)||r(u))}}function le(){if(pn)return ln;pn=1;var t=rn?tn:(rn=1,tn=function(t,r){return null!=t&&r in Object(t)}),r=fe();return ln=function(n,e){return null!=n&&r(n,e,t)}}function pe(){if(Rn)return bn;Rn=1;var t=dn?yn:(dn=1,yn=function(t,r){for(var n=-1,e=r.length,o=t.length;++n<e;)t[o+n]=r[n];return t}),r=function(){if(mn)return gn;mn=1;var t=$(),r=ce(),n=tt(),e=t?t.isConcatSpreadable:void 0;return gn=function(t){return n(t)||r(t)||!!(e&&t&&t[e])}}();return bn=function n(e,o,i,u,s){var a=-1,c=e.length;for(i||(i=r),s||(s=[]);++a<c;){var f=e[a];o>0&&i(f)?o>1?n(f,o-1,i,u,s):t(s,f):u||(s[s.length]=f)}return s},bn}function he(){if(kn)return Nn;kn=1;var t=wn?En:(wn=1,En=function(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}),r=Math.max;return Nn=function(n,e,o){return e=r(void 0===e?n.length-1:e,0),function(){for(var i=arguments,u=-1,s=r(i.length-e,0),a=Array(s);++u<s;)a[u]=i[e+u];u=-1;for(var c=Array(e+1);++u<e;)c[u]=i[u];return c[e]=o(a),t(n,this,c)}},Nn}function ve(){if(An)return Pn;An=1;var t=Sn?jn:(Sn=1,jn=function(t){return function(){return t}}),r=ie(),n=Tn?xn:(Tn=1,xn=function(t){return t});return Pn=r?function(n,e){return r(n,"toString",{configurable:!0,enumerable:!1,value:t(e),writable:!0})}:n}function ye(){if(Bn)return qn;Bn=1;var t=ve(),r=function(){if(Un)return Cn;Un=1;var t=Date.now;return Cn=function(r){var n=0,e=0;return function(){var o=t(),i=16-(o-e);if(e=o,i>0){if(++n>=800)return arguments[0]}else n=0;return r.apply(void 0,arguments)}},Cn}(),n=r(t);return qn=n}function de(){if(zn)return In;zn=1;var t=function(){if(On)return _n;On=1;var t=pe();return _n=function(r){return null!=r&&r.length?t(r,1):[]}}(),r=he(),n=ye();return In=function(e){return n(r(e,void 0,t),e+"")}}var ge,me=function(){if(Fn)return Vn;Fn=1;var t=function(){if(vn)return hn;vn=1;var t=ae(),r=le();return hn=function(n,e){return t(n,e,(function(t,e){return r(n,e)}))}}(),r=de()((function(r,n){return null==r?{}:t(r,n)}));return Vn=r}(),be=b(me),Re=["cache","credentials","headers","integrity","keepalive","mode","priority","redirect","referrer","referrerPolicy","signal"],_e=function(){function t(t){if(void 0===t&&(t={}),!t.fetcher){if("function"!=typeof fetch)throw new a(s.ENV_FETCH_NOT_SUPPORT);t.fetcher=fetch}this.executor=new v,this.config=t}return t.prototype.getConfig=function(){return this.config},t.prototype.usePlugin=function(t){this.executor.use(t)},t.prototype.request=function(t){return o(this,void 0,void 0,(function(){var r,n,e,u,c,f=this;return i(this,(function(l){if(r=this.getConfig(),n=Hn.merge({},r,t),e=n.fetcher,u=function(t,r){var n={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.indexOf(e)<0&&(n[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(e=Object.getOwnPropertySymbols(t);o<e.length;o++)r.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(t,e[o])&&(n[e[o]]=t[e[o]])}return n}(n,["fetcher"]),"function"!=typeof e)throw new a(s.FETCHER_NONE);if(!u.url)throw new a(s.URL_NONE);return c=function(t){return o(f,void 0,void 0,(function(){var r;return i(this,(function(n){switch(n.label){case 0:return[4,e(this.parametersToRequest(t.parameters))];case 1:return r=n.sent(),[2,this.toAdapterResponse(r,r,t.parameters)]}}))}))},[2,this.executor.exec(u,c)]}))}))},t.prototype.parametersToRequest=function(t){var r=t.url,n=void 0===r?"/":r,e=t.method,o=void 0===e?"GET":e,i=t.data,u=be(t,Re);return new Request(n,Object.assign(u,{body:i,method:o.toUpperCase()}))},t.prototype.toAdapterResponse=function(t,r,n){return{data:t,status:r.status,statusText:r.statusText,headers:this.getResponseHeaders(r),config:n,response:r}},t.prototype.getResponseHeaders=function(t){var r={};return t.headers.forEach((function(t,n){r[n]=t})),r},t}(),Oe=function(){function t(t,r){void 0===r&&(r={}),this.config=r,this.axiosInstance=t.create(r)}return t.prototype.getConfig=function(){return this.config},t.prototype.request=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(r){return[2,this.axiosInstance.request(t)]}))}))},t}(),Ee=function(){function t(){this.pluginName="FetchAbortPlugin",this.onlyOne=!0,this.controllers=new Map}return t.prototype.generateRequestKey=function(t){if(t.requestId)return t.requestId;var r=t.params?JSON.stringify(t.params):"",n=t.body?JSON.stringify(t.body):"";return"".concat(t.method||"GET","-").concat(t.url,"-").concat(r,"-").concat(n)},t.prototype.onBefore=function(t){var r=this.generateRequestKey(t.parameters);if(this.controllers.has(r)&&this.abort(t.parameters),!t.parameters.signal){var n=new AbortController;this.controllers.set(r,n),t.parameters.signal=n.signal}},t.prototype.onSuccess=function(t){var r=t.parameters;r&&this.controllers.delete(this.generateRequestKey(r))},t.prototype.onError=function(t){var r=t.error,n=t.parameters;if(this.isSameAbortError(r)&&n){var e=this.generateRequestKey(n),o=this.controllers.get(e);return this.controllers.delete(e),new c(s.ABORT_ERROR,(null==o?void 0:o.signal.reason)||r)}},t.prototype.isSameAbortError=function(t){return t instanceof Error&&"AbortError"===t.name||(t instanceof DOMException&&"AbortError"===t.name||t instanceof Event&&"abort"===t.type)},t.prototype.abort=function(t){var r="string"==typeof t?t:this.generateRequestKey(t),n=this.controllers.get(r);n&&(n.abort(new c(s.ABORT_ERROR,"The operation was aborted")),this.controllers.delete(r),"string"!=typeof t&&"function"==typeof t.onAbort&&t.onAbort.call(t,t))},t.prototype.abortAll=function(){this.controllers.forEach((function(t){return t.abort()})),this.controllers.clear()},t}(),we=function(){function t(){this.pluginName="FetchURLPlugin"}return t.prototype.isFullURL=function(t){return t.startsWith("http://")||t.startsWith("https://")},t.prototype.appendQueryParams=function(t,r){void 0===r&&(r={});var n=t.split("?"),e=n[0],o=n[1];(void 0===o?"":o).split("&").forEach((function(t){var n=t.split("="),e=n[0],o=n[1];e&&o&&(r[e]=o)}));var i=Object.entries(r).map((function(t){var r=t[0],n=t[1];return"".concat(r,"=").concat(n)})).join("&");return[e,i].join("?")},t.prototype.connectBaseURL=function(t,r){return"".concat(r,"/").concat(t)},t.prototype.buildUrl=function(t){var r=t.url,n=void 0===r?"":r,e=t.baseURL,o=void 0===e?"":e,i=t.params;if(!this.isFullURL(n)){var u=n.startsWith("/")?n.slice(1):n,s=o.endsWith("/")?o.slice(0,-1):o;n=this.connectBaseURL(u,s)}return i&&Object.keys(i).length>0&&(n=this.appendQueryParams(n,i)),n},t.prototype.onBefore=function(t){var r=t.parameters;r.url=this.buildUrl(r)},t.prototype.onSuccess=function(t){var r=t.returnValue;if(!r.response.ok){var n=new c(s.RESPONSE_NOT_OK,"Request failed with status: ".concat(r.status," ").concat(r.statusText));throw n.response=r.response,n}},t.prototype.onError=function(t){var r=t.error;return r instanceof c?r:new c(s.REQUEST_ERROR,r)},t}(),Ne=function(){function t(t){this.adapter=t,this.executor=new v}return t.prototype.usePlugin=function(t){return this.executor.use(t),this},t.prototype.request=function(t){return o(this,void 0,void 0,(function(){var r,n,e=this;return i(this,(function(o){return r=this.adapter.getConfig(),n=Dn({},r,t),[2,this.executor.exec(n,(function(t){return e.adapter.request(t.parameters)}))]}))}))},t.prototype.get=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"GET"}))]}))}))},t.prototype.post=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"POST"}))]}))}))},t.prototype.put=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"PUT"}))]}))}))},t.prototype.delete=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"DELETE"}))]}))}))},t.prototype.patch=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"PATCH"}))]}))}))},t.prototype.head=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"HEAD"}))]}))}))},t.prototype.options=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"OPTIONS"}))]}))}))},t.prototype.trace=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"TRACE"}))]}))}))},t.prototype.connect=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"CONNECT"}))]}))}))},t}(),ke=function(){function t(t){void 0===t&&(t={}),this.options=t,this[ge]="JSONSerializer"}return t.prototype.createReplacer=function(t){return Array.isArray(t)?t:null===t?function(t,r){return"string"==typeof r?r.replace(/\r\n/g,"\n"):r}:"function"==typeof t?function(r,n){var e="string"==typeof n?n.replace(/\r\n/g,"\n"):n;return t.call(this,r,e)}:function(t,r){return"string"==typeof r?r.replace(/\r\n/g,"\n"):r}},t.prototype.stringify=function(t,r,n){try{var e=this.createReplacer(r);return Array.isArray(e)?JSON.stringify(t,e,n):JSON.stringify(t,e,null!=n?n:this.options.pretty?this.options.indent||2:void 0)}catch(t){if(t instanceof TypeError&&t.message.includes("circular"))throw new TypeError("Cannot stringify data with circular references");throw t}},t.prototype.parse=function(t,r){return JSON.parse(t,r)},t.prototype.serialize=function(t){return this.stringify(t,this.options.replacer||null,this.options.pretty?this.options.indent||2:void 0)},t.prototype.deserialize=function(t,r){try{return this.parse(t)}catch(t){return r}},t.prototype.serializeArray=function(t){return"["+t.map((function(t){return JSON.stringify(t)})).join(",")+"]"},t}();ge=Symbol.toStringTag;var je=function(){function t(t){void 0===t&&(t={}),this.options=t}return t.prototype.serialize=function(t){var r=Buffer.from(t,"utf8").toString("base64");return this.options.urlSafe?this.makeUrlSafe(r):r},t.prototype.deserialize=function(t,r){try{return/^[A-Za-z0-9+/]*={0,2}$/.test(t)?(this.options.urlSafe&&(t=this.makeUrlUnsafe(t)),Buffer.from(t,"base64").toString("utf8")):null!=r?r:""}catch(t){return null!=r?r:""}},t.prototype.makeUrlSafe=function(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},t.prototype.makeUrlUnsafe=function(t){for(t=t.replace(/-/g,"+").replace(/_/g,"/");t.length%4;)t+="=";return t},t}(),Se=function(){function t(t,r){void 0===r&&(r=new ke),this.storage=t,this.serializer=r,this.store={}}return Object.defineProperty(t.prototype,"length",{get:function(){return this.storage?this.storage.length:Object.keys(this.store).length},enumerable:!1,configurable:!0}),t.prototype.setItem=function(t,r,n){var e={key:t,value:r,expire:n};"number"==typeof n&&n>0&&(e.expire=n);var o=this.serializer.serialize(e);this.storage?this.storage.setItem(t,o):this.store[t]=o},t.prototype.getItem=function(t,r){var n,e=this.storage?this.storage.getItem(t):this.store[t],o=null!=r?r:null;if(!e)return o;var i=this.serializer.deserialize(e,o);return"object"==typeof i?"number"==typeof i.expire&&i.expire<Date.now()?(this.removeItem(t),o):null!==(n=null==i?void 0:i.value)&&void 0!==n?n:o:o},t.prototype.removeItem=function(t){this.storage?this.storage.removeItem(t):delete this.store[t]},t.prototype.clear=function(){this.storage?this.storage.clear():this.store={}},t}();export{v as AsyncExecutor,je as Base64Serializer,t as Executor,a as ExecutorError,Ee as FetchAbortPlugin,we as FetchURLPlugin,ke as JSONSerializer,Se as JSONStorage,ct as LEVELS,ft as Logger,Oe as RequestAdapterAxios,_e as RequestAdapterFetch,c as RequestError,s as RequestErrorID,Ne as RequestScheduler,g as RetryPlugin,y as SyncExecutor};
|
|
1
|
+
var t=function(){function t(t){this.config=t,this.plugins=[]}return t.prototype.use=function(t){this.plugins.find((function(r){return r===t||r.pluginName===t.pluginName||r.constructor===t.constructor}))&&t.onlyOne?console.warn("Plugin ".concat(t.pluginName," is already used, skip adding")):this.plugins.push(t)},t}(),r=function(t,n){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])},r(t,n)};function n(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function e(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}var e=function(){return e=Object.assign||function(t){for(var r,n=1,e=arguments.length;n<e;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t},e.apply(this,arguments)};function o(t,r,n,e){return new(n||(n=Promise))((function(o,i){function u(t){try{s(e.next(t))}catch(t){i(t)}}function a(t){try{s(e.throw(t))}catch(t){i(t)}}function s(t){var r;t.done?o(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(u,a)}s((e=e.apply(t,r||[])).next())}))}function i(t,r){var n,e,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return u.next=a(0),u.throw=a(1),u.return=a(2),"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function a(a){return function(s){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;u&&(u=0,a[0]&&(i=0)),i;)try{if(n=1,e&&(o=2&a[0]?e.return:a[0]?e.throw||((o=e.return)&&o.call(e),0):e.next)&&!(o=o.call(e,a[1])).done)return o;switch(e=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return i.label++,{value:a[1],done:!1};case 5:i.label++,e=a[1],a=[0];continue;case 7:a=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){i=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(6===a[0]&&i.label<o[1]){i.label=o[1],o=a;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(a);break}o[2]&&i.ops.pop(),i.trys.pop();continue}a=r.call(t,i)}catch(t){a=[6,t],e=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function u(t,r,n){if(n||2===arguments.length)for(var e,o=0,i=r.length;o<i;o++)!e&&o in r||(e||(e=Array.prototype.slice.call(r,0,o)),e[o]=r[o]);return t.concat(e||Array.prototype.slice.call(r))}"function"==typeof SuppressedError&&SuppressedError;var a,s=function(t){function r(r,n){var e=this.constructor,o=t.call(this,n instanceof Error?n.message:n||r)||this;return o.id=r,n instanceof Error&&"stack"in n&&(o.stack=n.stack),Object.setPrototypeOf(o,e.prototype),o}return n(r,t),r}(Error),c=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r}(s);!function(t){t.REQUEST_ERROR="REQUEST_ERROR",t.ENV_FETCH_NOT_SUPPORT="ENV_FETCH_NOT_SUPPORT",t.FETCHER_NONE="FETCHER_NONE",t.RESPONSE_NOT_OK="RESPONSE_NOT_OK",t.ABORT_ERROR="ABORT_ERROR",t.URL_NONE="URL_NONE"}(a||(a={}));var f,p,l,h,v=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.runHooks=function(t,r,n){for(var e=[],a=3;a<arguments.length;a++)e[a-3]=arguments[a];return o(this,void 0,void 0,(function(){var o,a,s,c,f,p,l,h;return i(this,(function(i){switch(i.label){case 0:o=-1,(s=n||{parameters:void 0,hooksRuntimes:{}}).hooksRuntimes.times=0,s.hooksRuntimes.index=void 0,c=0,f=t,i.label=1;case 1:return c<f.length?(p=f[c],o++,"function"!=typeof p[r]||"function"==typeof p.enabled&&!p.enabled(r,n)?[3,3]:(null===(h=s.hooksRuntimes)||void 0===h?void 0:h.breakChain)?[3,4]:(s.hooksRuntimes.pluginName=p.pluginName,s.hooksRuntimes.hookName=r,s.hooksRuntimes.times++,s.hooksRuntimes.index=o,[4,p[r].apply(p,u([n],e,!1))])):[3,4];case 2:if(void 0!==(l=i.sent())&&(a=l,s.hooksRuntimes.returnValue=l,s.hooksRuntimes.returnBreakChain))return[2,a];i.label=3;case 3:return c++,[3,1];case 4:return[2,a]}}))}))},r.prototype.execNoError=function(t,r){return o(this,void 0,void 0,(function(){var n;return i(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.exec(t,r)];case 1:return[2,e.sent()];case 2:return(n=e.sent())instanceof s?[2,n]:[2,new s("UNKNOWN_ASYNC_ERROR",n)];case 3:return[2]}}))}))},r.prototype.exec=function(t,r){var n=r||t,e=r?t:void 0;if("function"!=typeof n)throw new Error("Task must be a async function!");return this.run(e,n)},r.prototype.run=function(t,r){return o(this,void 0,void 0,(function(){var n,e,u,a=this;return i(this,(function(c){switch(c.label){case 0:n={parameters:t,returnValue:void 0,error:void 0,hooksRuntimes:{pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0}},e=function(t){return o(a,void 0,void 0,(function(){var n;return i(this,(function(e){switch(e.label){case 0:return[4,this.runHooks(this.plugins,"onExec",t,r)];case 1:return e.sent(),0!==t.hooksRuntimes.times?[3,3]:(n=t,[4,r(t)]);case 2:return n.returnValue=e.sent(),[2];case 3:return t.returnValue=t.hooksRuntimes.returnValue,[2]}}))}))},c.label=1;case 1:return c.trys.push([1,5,7,8]),[4,this.runHooks(this.plugins,"onBefore",n)];case 2:return c.sent(),[4,e(n)];case 3:return c.sent(),[4,this.runHooks(this.plugins,"onSuccess",n)];case 4:return c.sent(),[2,n.returnValue];case 5:return u=c.sent(),n.error=u,[4,this.runHooks(this.plugins,"onError",n)];case 6:if(c.sent(),n.hooksRuntimes.returnValue&&(n.error=n.hooksRuntimes.returnValue),n.error instanceof s)throw n.error;throw new s("UNKNOWN_ASYNC_ERROR",n.error);case 7:return n.hooksRuntimes={pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0},[7];case 8:return[2]}}))}))},r}(t),y=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.runHooks=function(t,r,n){for(var e,o=[],i=3;i<arguments.length;i++)o[i-3]=arguments[i];var a,s=-1,c=n||{parameters:void 0,hooksRuntimes:{}};c.hooksRuntimes.times=0,c.hooksRuntimes.index=void 0;for(var f=0,p=t;f<p.length;f++){var l=p[f];if(s++,"function"==typeof l[r]&&("function"!=typeof l.enabled||l.enabled(r,c))){if(null===(e=c.hooksRuntimes)||void 0===e?void 0:e.breakChain)break;c.hooksRuntimes.pluginName=l.pluginName,c.hooksRuntimes.hookName=r,c.hooksRuntimes.times++,c.hooksRuntimes.index=s;var h=l[r].apply(l,u([n],o,!1));if(void 0!==h&&(a=h,c.hooksRuntimes.returnValue=h,c.hooksRuntimes.returnBreakChain))return a}}return a},r.prototype.execNoError=function(t,r){try{return this.exec(t,r)}catch(t){return t instanceof s?t:new s("UNKNOWN_SYNC_ERROR",t)}},r.prototype.exec=function(t,r){var n=r||t,e=r?t:void 0;if("function"!=typeof n)throw new Error("Task must be a function!");return this.run(e,n)},r.prototype.run=function(t,r){var n,e=this,o={parameters:t,returnValue:void 0,error:void 0,hooksRuntimes:{pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0}};try{return this.runHooks(this.plugins,"onBefore",o),n=o,e.runHooks(e.plugins,"onExec",n,r),n.returnValue=n.hooksRuntimes.times?n.hooksRuntimes.returnValue:r(n),this.runHooks(this.plugins,"onSuccess",o),o.returnValue}catch(t){if(o.error=t,this.runHooks(this.plugins,"onError",o),o.hooksRuntimes.returnValue&&(o.error=o.hooksRuntimes.returnValue),o.error instanceof s)throw o.error;throw new s("UNKNOWN_SYNC_ERROR",o.error)}finally{o.hooksRuntimes={pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0}}},r}(t),d=function(){return!0},g=function(){function t(t){var r;void 0===t&&(t={}),this.pluginName="RetryPlugin",this.onlyOne=!0,this.options=e(e({retryDelay:1e3,useExponentialBackoff:!1,shouldRetry:d},t),{maxRetries:Math.min(Math.max(1,null!==(r=t.maxRetries)&&void 0!==r?r:3),16)})}return t.prototype.delay=function(t){return o(this,void 0,void 0,(function(){var r;return i(this,(function(n){return r=this.options.useExponentialBackoff?this.options.retryDelay*Math.pow(2,t):this.options.retryDelay,[2,new Promise((function(t){return setTimeout(t,r)}))]}))}))},t.prototype.onExec=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return this.options.maxRetries<1?[2,r(t)]:[2,this.retry(r,t,this.options,this.options.maxRetries)]}))}))},t.prototype.shouldRetry=function(t){var r=t.error;return t.retryCount>0&&this.options.shouldRetry(r)},t.prototype.retry=function(t,r,n,e){return o(this,void 0,void 0,(function(){var o;return i(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,4]),[4,t(r)];case 1:return[2,i.sent()];case 2:if(o=i.sent(),!this.shouldRetry({error:o,retryCount:e}))throw new s("RETRY_ERROR","All ".concat(n.maxRetries," attempts failed: ").concat(o.message));return[4,this.delay(n.maxRetries-e)];case 3:return i.sent(),e--,[2,this.retry(t,r,n,e)];case 4:return[2]}}))}))},t}(),b="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function m(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var _,O,R=m(h?l:(h=1,l=p?f:(p=1,f=function(t){return t&&t.length?t[0]:void 0})));var E,w,j,k,N,x,S,A,T,P,C,U,q,z,B,I,F,V,D,H,L=m(O?_:(O=1,_=function(t){var r=null==t?0:t.length;return r?t[r-1]:void 0}));function G(){if(w)return E;w=1;var t="object"==typeof b&&b&&b.Object===Object&&b;return E=t}function W(){if(k)return j;k=1;var t=G(),r="object"==typeof self&&self&&self.Object===Object&&self,n=t||r||Function("return this")();return j=n}function $(){if(x)return N;x=1;var t=W().Symbol;return N=t}function K(){if(U)return C;U=1;var t=$(),r=function(){if(A)return S;A=1;var t=$(),r=Object.prototype,n=r.hasOwnProperty,e=r.toString,o=t?t.toStringTag:void 0;return S=function(t){var r=n.call(t,o),i=t[o];try{t[o]=void 0;var u=!0}catch(t){}var a=e.call(t);return u&&(r?t[o]=i:delete t[o]),a}}(),n=function(){if(P)return T;P=1;var t=Object.prototype.toString;return T=function(r){return t.call(r)}}(),e=t?t.toStringTag:void 0;return C=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":e&&e in Object(t)?r(t):n(t)}}function M(){if(I)return B;I=1;var t=(z?q:(z=1,q=function(t,r){return function(n){return t(r(n))}}))(Object.getPrototypeOf,Object);return B=t}function J(){if(V)return F;return V=1,F=function(t){return null!=t&&"object"==typeof t}}function Q(){if(H)return D;H=1;var t=K(),r=M(),n=J(),e=Function.prototype,o=Object.prototype,i=e.toString,u=o.hasOwnProperty,a=i.call(Object);return D=function(e){if(!n(e)||"[object Object]"!=t(e))return!1;var o=r(e);if(null===o)return!0;var s=u.call(o,"constructor")&&o.constructor;return"function"==typeof s&&s instanceof s&&i.call(s)==a}}var Y,Z,X,tt,rt=m(Q());function nt(){if(Z)return Y;Z=1;var t=Array.isArray;return Y=t}var et,ot,it=function(){if(tt)return X;tt=1;var t=K(),r=nt(),n=J();return X=function(e){return"string"==typeof e||!r(e)&&n(e)&&"[object String]"==t(e)}}(),ut=m(it),at=m(nt());function st(){if(ot)return et;return ot=1,et=function(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}}var ct,ft=m(st()),pt={LOG:"LOG",INFO:"INFO",ERROR:"ERROR",WARN:"WARN",DEBUG:"DEBUG"},lt=function(){function t(t){var r=void 0===t?{}:t,n=r.isCI,e=void 0!==n&&n,o=r.dryRun,i=void 0!==o&&o,u=r.debug,a=void 0!==u&&u,s=r.silent,c=void 0!==s&&s;this.isCI=e,this.isDryRun=i,this.isDebug=a,this.isSilent=c}return t.prototype.print=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.isSilent||console.log.apply(console,r)},t.prototype.prefix=function(t,r){return t},t.prototype.log=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.print.apply(this,u([pt.LOG],t,!1))},t.prototype.info=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.print.apply(this,u([pt.INFO,this.prefix(pt.INFO)],t,!1))},t.prototype.warn=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.print.apply(this,u([pt.WARN,this.prefix(pt.WARN)],t,!1))},t.prototype.error=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.print.apply(this,u([pt.ERROR,this.prefix(pt.ERROR)],t,!1))},t.prototype.debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(this.isDebug){var n=R(t),e=ft(n)?JSON.stringify(n):String(n);this.print.apply(this,u([pt.DEBUG,this.prefix(pt.DEBUG),e],t.slice(1),!1))}},t.prototype.verbose=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.isDebug&&this.print.apply(this,u([pt.DEBUG],t,!1))},t.prototype.exec=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=rt(L(t))?L(t):void 0,e=n||{},o=e.isDryRun,i=e.isExternal;if(o||this.isDryRun){var u=[null==i?"$":"!",t.slice(0,null==n?void 0:-1).map((function(t){return ut(t)?t:at(t)?t.join(" "):String(t)})).join(" ")].join(" ").trim();this.log(u)}},t.prototype.obtrusive=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.isCI||this.log(),this.log.apply(this,t),this.isCI||this.log()},t}(),ht={exports:{}};var vt,yt,dt,gt,bt,mt,_t,Ot,Rt,Et,wt,jt,kt,Nt,xt,St,At,Tt,Pt,Ct,Ut,qt,zt,Bt,It,Ft,Vt,Dt,Ht,Lt,Gt,Wt,$t,Kt,Mt,Jt,Qt,Yt,Zt,Xt,tr,rr,nr,er,or,ir,ur,ar,sr,cr,fr,pr,lr,hr,vr,yr,dr,gr,br,mr,_r,Or,Rr,Er,wr,jr,kr,Nr,xr,Sr,Ar,Tr,Pr,Cr,Ur,qr,zr,Br,Ir,Fr,Vr,Dr,Hr,Lr,Gr,Wr,$r,Kr,Mr,Jr,Qr,Yr,Zr,Xr,tn,rn,nn,en,on,un,an,sn,cn,fn,pn,ln,hn,vn,yn,dn,gn,bn,mn,_n,On,Rn,En,wn,jn,kn,Nn,xn,Sn,An,Tn,Pn,Cn,Un,qn,zn,Bn,In,Fn,Vn,Dn,Hn,Ln=(ct||(ct=1,function(t,r){function n(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.apply(void 0,t)}function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return s(!0===t[0],!1,t)}function o(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return s(!0===t[0],!0,t)}function i(t){if(Array.isArray(t)){for(var r=[],n=0;n<t.length;++n)r.push(i(t[n]));return r}if(u(t)){for(var n in r={},t)r[n]=i(t[n]);return r}return t}function u(t){return t&&"object"==typeof t&&!Array.isArray(t)}function a(t,r){if(!u(t))return r;for(var n in r)"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(t[n]=u(t[n])&&u(r[n])?a(t[n],r[n]):r[n]);return t}function s(t,r,n){var e;!t&&u(e=n.shift())||(e={});for(var o=0;o<n.length;++o){var s=n[o];if(u(s))for(var c in s)if("__proto__"!==c&&"constructor"!==c&&"prototype"!==c){var f=t?i(s[c]):s[c];e[c]=r?a(e[c],f):f}}return e}Object.defineProperty(r,"__esModule",{value:!0}),r.isPlainObject=r.clone=r.recursive=r.merge=r.main=void 0,t.exports=r=n,r.default=n,r.main=n,n.clone=i,n.isPlainObject=u,n.recursive=o,r.merge=e,r.recursive=o,r.clone=i,r.isPlainObject=u}(ht,ht.exports)),ht.exports);function Gn(){if(yt)return vt;yt=1;var t=K(),r=J();return vt=function(n){return"symbol"==typeof n||r(n)&&"[object Symbol]"==t(n)}}function Wn(){if(mt)return bt;mt=1;var t=K(),r=st();return bt=function(n){if(!r(n))return!1;var e=t(n);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}}function $n(){if(Et)return Rt;Et=1;var t,r=function(){if(Ot)return _t;Ot=1;var t=W()["__core-js_shared__"];return _t=t}(),n=(t=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return Rt=function(t){return!!n&&n in t}}function Kn(){if(Nt)return kt;Nt=1;var t=Wn(),r=$n(),n=st(),e=function(){if(jt)return wt;jt=1;var t=Function.prototype.toString;return wt=function(r){if(null!=r){try{return t.call(r)}catch(t){}try{return r+""}catch(t){}}return""}}(),o=/^\[object .+?Constructor\]$/,i=Function.prototype,u=Object.prototype,a=i.toString,s=u.hasOwnProperty,c=RegExp("^"+a.call(s).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return kt=function(i){return!(!n(i)||r(i))&&(t(i)?c:o).test(e(i))}}function Mn(){if(Tt)return At;Tt=1;var t=Kn(),r=St?xt:(St=1,xt=function(t,r){return null==t?void 0:t[r]});return At=function(n,e){var o=r(n,e);return t(o)?o:void 0}}function Jn(){if(Ct)return Pt;Ct=1;var t=Mn()(Object,"create");return Pt=t}function Qn(){if(Wt)return Gt;Wt=1;var t=function(){if(qt)return Ut;qt=1;var t=Jn();return Ut=function(){this.__data__=t?t(null):{},this.size=0}}(),r=Bt?zt:(Bt=1,zt=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}),n=function(){if(Ft)return It;Ft=1;var t=Jn(),r=Object.prototype.hasOwnProperty;return It=function(n){var e=this.__data__;if(t){var o=e[n];return"__lodash_hash_undefined__"===o?void 0:o}return r.call(e,n)?e[n]:void 0}}(),e=function(){if(Dt)return Vt;Dt=1;var t=Jn(),r=Object.prototype.hasOwnProperty;return Vt=function(n){var e=this.__data__;return t?void 0!==e[n]:r.call(e,n)}}(),o=function(){if(Lt)return Ht;Lt=1;var t=Jn();return Ht=function(r,n){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=t&&void 0===n?"__lodash_hash_undefined__":n,this}}();function i(t){var r=-1,n=null==t?0:t.length;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=n,i.prototype.has=e,i.prototype.set=o,Gt=i}function Yn(){if(Jt)return Mt;return Jt=1,Mt=function(t,r){return t===r||t!=t&&r!=r}}function Zn(){if(Yt)return Qt;Yt=1;var t=Yn();return Qt=function(r,n){for(var e=r.length;e--;)if(t(r[e][0],n))return e;return-1}}function Xn(){if(ar)return ur;ar=1;var t=Kt?$t:(Kt=1,$t=function(){this.__data__=[],this.size=0}),r=function(){if(Xt)return Zt;Xt=1;var t=Zn(),r=Array.prototype.splice;return Zt=function(n){var e=this.__data__,o=t(e,n);return!(o<0||(o==e.length-1?e.pop():r.call(e,o,1),--this.size,0))}}(),n=function(){if(rr)return tr;rr=1;var t=Zn();return tr=function(r){var n=this.__data__,e=t(n,r);return e<0?void 0:n[e][1]}}(),e=function(){if(er)return nr;er=1;var t=Zn();return nr=function(r){return t(this.__data__,r)>-1}}(),o=function(){if(ir)return or;ir=1;var t=Zn();return or=function(r,n){var e=this.__data__,o=t(e,r);return o<0?(++this.size,e.push([r,n])):e[o][1]=n,this}}();function i(t){var r=-1,n=null==t?0:t.length;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=n,i.prototype.has=e,i.prototype.set=o,ur=i}function te(){if(cr)return sr;cr=1;var t=Mn()(W(),"Map");return sr=t}function re(){if(yr)return vr;yr=1;var t=hr?lr:(hr=1,lr=function(t){var r=typeof t;return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t});return vr=function(r,n){var e=r.__data__;return t(n)?e["string"==typeof n?"string":"hash"]:e.map}}function ne(){if(jr)return wr;jr=1;var t=function(){if(pr)return fr;pr=1;var t=Qn(),r=Xn(),n=te();return fr=function(){this.size=0,this.__data__={hash:new t,map:new(n||r),string:new t}}}(),r=function(){if(gr)return dr;gr=1;var t=re();return dr=function(r){var n=t(this,r).delete(r);return this.size-=n?1:0,n}}(),n=function(){if(mr)return br;mr=1;var t=re();return br=function(r){return t(this,r).get(r)}}(),e=function(){if(Or)return _r;Or=1;var t=re();return _r=function(r){return t(this,r).has(r)}}(),o=function(){if(Er)return Rr;Er=1;var t=re();return Rr=function(r,n){var e=t(this,r),o=e.size;return e.set(r,n),this.size+=e.size==o?0:1,this}}();function i(t){var r=-1,n=null==t?0:t.length;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=n,i.prototype.has=e,i.prototype.set=o,wr=i}function ee(){if(Sr)return xr;Sr=1;var t=function(){if(Nr)return kr;Nr=1;var t=ne();function r(n,e){if("function"!=typeof n||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var o=function(){var t=arguments,r=e?e.apply(this,t):t[0],i=o.cache;if(i.has(r))return i.get(r);var u=n.apply(this,t);return o.cache=i.set(r,u)||i,u};return o.cache=new(r.Cache||t),o}return r.Cache=t,kr=r}();return xr=function(r){var n=t(r,(function(t){return 500===e.size&&e.clear(),t})),e=n.cache;return n}}function oe(){if(qr)return Ur;qr=1;var t=$(),r=Cr?Pr:(Cr=1,Pr=function(t,r){for(var n=-1,e=null==t?0:t.length,o=Array(e);++n<e;)o[n]=r(t[n],n,t);return o}),n=nt(),e=Gn(),o=t?t.prototype:void 0,i=o?o.toString:void 0;return Ur=function t(o){if("string"==typeof o)return o;if(n(o))return r(o,t)+"";if(e(o))return i?i.call(o):"";var u=o+"";return"0"==u&&1/o==-1/0?"-0":u},Ur}function ie(){if(Fr)return Ir;Fr=1;var t=nt(),r=function(){if(gt)return dt;gt=1;var t=nt(),r=Gn(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,e=/^\w*$/;return dt=function(o,i){if(t(o))return!1;var u=typeof o;return!("number"!=u&&"symbol"!=u&&"boolean"!=u&&null!=o&&!r(o))||e.test(o)||!n.test(o)||null!=i&&o in Object(i)}}(),n=function(){if(Tr)return Ar;Tr=1;var t=ee(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,e=t((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(r,(function(t,r,o,i){e.push(o?i.replace(n,"$1"):r||t)})),e}));return Ar=e}(),e=function(){if(Br)return zr;Br=1;var t=oe();return zr=function(r){return null==r?"":t(r)}}();return Ir=function(o,i){return t(o)?o:r(o,i)?[o]:n(e(o))}}function ue(){if(Dr)return Vr;Dr=1;var t=Gn();return Vr=function(r){if("string"==typeof r||t(r))return r;var n=r+"";return"0"==n&&1/r==-1/0?"-0":n}}function ae(){if(Wr)return Gr;Wr=1;var t=Mn(),r=function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch(t){}}();return Gr=r}function se(){if(Kr)return $r;Kr=1;var t=ae();return $r=function(r,n,e){"__proto__"==n&&t?t(r,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[n]=e}}function ce(){if(Jr)return Mr;Jr=1;var t=se(),r=Yn(),n=Object.prototype.hasOwnProperty;return Mr=function(e,o,i){var u=e[o];n.call(e,o)&&r(u,i)&&(void 0!==i||o in e)||t(e,o,i)}}function fe(){if(Yr)return Qr;Yr=1;var t=/^(?:0|[1-9]\d*)$/;return Qr=function(r,n){var e=typeof r;return!!(n=null==n?9007199254740991:n)&&("number"==e||"symbol"!=e&&t.test(r))&&r>-1&&r%1==0&&r<n}}function pe(){if(rn)return tn;rn=1;var t=function(){if(Lr)return Hr;Lr=1;var t=ie(),r=ue();return Hr=function(n,e){for(var o=0,i=(e=t(e,n)).length;null!=n&&o<i;)n=n[r(e[o++])];return o&&o==i?n:void 0}}(),r=function(){if(Xr)return Zr;Xr=1;var t=ce(),r=ie(),n=fe(),e=st(),o=ue();return Zr=function(i,u,a,s){if(!e(i))return i;for(var c=-1,f=(u=r(u,i)).length,p=f-1,l=i;null!=l&&++c<f;){var h=o(u[c]),v=a;if("__proto__"===h||"constructor"===h||"prototype"===h)return i;if(c!=p){var y=l[h];void 0===(v=s?s(y,h,l):void 0)&&(v=e(y)?y:n(u[c+1])?[]:{})}t(l,h,v),l=l[h]}return i}}(),n=ie();return tn=function(e,o,i){for(var u=-1,a=o.length,s={};++u<a;){var c=o[u],f=t(e,c);i(f,c)&&r(s,n(c,e),f)}return s}}function le(){if(sn)return an;sn=1;var t=function(){if(un)return on;un=1;var t=K(),r=J();return on=function(n){return r(n)&&"[object Arguments]"==t(n)}}(),r=J(),n=Object.prototype,e=n.hasOwnProperty,o=n.propertyIsEnumerable,i=t(function(){return arguments}())?t:function(t){return r(t)&&e.call(t,"callee")&&!o.call(t,"callee")};return an=i}function he(){if(fn)return cn;fn=1;return cn=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}}function ve(){if(vn)return hn;vn=1;var t=en?nn:(en=1,nn=function(t,r){return null!=t&&r in Object(t)}),r=function(){if(ln)return pn;ln=1;var t=ie(),r=le(),n=nt(),e=fe(),o=he(),i=ue();return pn=function(u,a,s){for(var c=-1,f=(a=t(a,u)).length,p=!1;++c<f;){var l=i(a[c]);if(!(p=null!=u&&s(u,l)))break;u=u[l]}return p||++c!=f?p:!!(f=null==u?0:u.length)&&o(f)&&e(l,f)&&(n(u)||r(u))}}();return hn=function(n,e){return null!=n&&r(n,e,t)}}function ye(){if(Rn)return On;Rn=1;var t=bn?gn:(bn=1,gn=function(t,r){for(var n=-1,e=r.length,o=t.length;++n<e;)t[o+n]=r[n];return t}),r=function(){if(_n)return mn;_n=1;var t=$(),r=le(),n=nt(),e=t?t.isConcatSpreadable:void 0;return mn=function(t){return n(t)||r(t)||!!(e&&t&&t[e])}}();return On=function n(e,o,i,u,a){var s=-1,c=e.length;for(i||(i=r),a||(a=[]);++s<c;){var f=e[s];o>0&&i(f)?o>1?n(f,o-1,i,u,a):t(a,f):u||(a[a.length]=f)}return a},On}function de(){if(xn)return Nn;xn=1;var t=kn?jn:(kn=1,jn=function(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}),r=Math.max;return Nn=function(n,e,o){return e=r(void 0===e?n.length-1:e,0),function(){for(var i=arguments,u=-1,a=r(i.length-e,0),s=Array(a);++u<a;)s[u]=i[e+u];u=-1;for(var c=Array(e+1);++u<e;)c[u]=i[u];return c[e]=o(s),t(n,this,c)}},Nn}function ge(){if(Pn)return Tn;return Pn=1,Tn=function(t){return t}}function be(){if(Un)return Cn;Un=1;var t=An?Sn:(An=1,Sn=function(t){return function(){return t}}),r=ae(),n=ge();return Cn=r?function(n,e){return r(n,"toString",{configurable:!0,enumerable:!1,value:t(e),writable:!0})}:n}function me(){if(In)return Bn;In=1;var t=be(),r=function(){if(zn)return qn;zn=1;var t=Date.now;return qn=function(r){var n=0,e=0;return function(){var o=t(),i=16-(o-e);if(e=o,i>0){if(++n>=800)return arguments[0]}else n=0;return r.apply(void 0,arguments)}},qn}(),n=r(t);return Bn=n}function _e(){if(Vn)return Fn;Vn=1;var t=function(){if(wn)return En;wn=1;var t=ye();return En=function(r){return null!=r&&r.length?t(r,1):[]}}(),r=de(),n=me();return Fn=function(e){return n(r(e,void 0,t),e+"")}}var Oe,Re,Ee,we,je,ke,Ne,xe,Se,Ae,Te,Pe,Ce,Ue,qe,ze,Be,Ie,Fe=function(){if(Hn)return Dn;Hn=1;var t=function(){if(dn)return yn;dn=1;var t=pe(),r=ve();return yn=function(n,e){return t(n,e,(function(t,e){return r(n,e)}))}}(),r=_e()((function(r,n){return null==r?{}:t(r,n)}));return Dn=r}(),Ve=m(Fe),De=["cache","credentials","headers","integrity","keepalive","mode","priority","redirect","referrer","referrerPolicy","signal"],He=function(){function t(t){if(void 0===t&&(t={}),!t.fetcher){if("function"!=typeof fetch)throw new s(a.ENV_FETCH_NOT_SUPPORT);t.fetcher=fetch}this.executor=new v,this.config=t}return t.prototype.getConfig=function(){return this.config},t.prototype.usePlugin=function(t){this.executor.use(t)},t.prototype.request=function(t){return o(this,void 0,void 0,(function(){var r,n,e,u,c,f=this;return i(this,(function(p){if(r=this.getConfig(),n=Ln.merge({},r,t),e=n.fetcher,u=function(t,r){var n={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.indexOf(e)<0&&(n[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(e=Object.getOwnPropertySymbols(t);o<e.length;o++)r.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(t,e[o])&&(n[e[o]]=t[e[o]])}return n}(n,["fetcher"]),"function"!=typeof e)throw new s(a.FETCHER_NONE);if(!u.url)throw new s(a.URL_NONE);return c=function(t){return o(f,void 0,void 0,(function(){var r;return i(this,(function(n){switch(n.label){case 0:return[4,e(this.parametersToRequest(t.parameters))];case 1:return r=n.sent(),[2,this.toAdapterResponse(r,r,t.parameters)]}}))}))},[2,this.executor.exec(u,c)]}))}))},t.prototype.parametersToRequest=function(t){var r=t.url,n=void 0===r?"/":r,e=t.method,o=void 0===e?"GET":e,i=t.data,u=Ve(t,De);return new Request(n,Object.assign(u,{body:i,method:o.toUpperCase()}))},t.prototype.toAdapterResponse=function(t,r,n){return{data:t,status:r.status,statusText:r.statusText,headers:this.getResponseHeaders(r),config:n,response:r}},t.prototype.getResponseHeaders=function(t){var r={};return t.headers.forEach((function(t,n){r[n]=t})),r},t}(),Le=function(){function t(t,r){void 0===r&&(r={}),this.config=r,this.axiosInstance=t.create(r)}return t.prototype.getConfig=function(){return this.config},t.prototype.request=function(t){return o(this,void 0,void 0,(function(){return i(this,(function(r){return[2,this.axiosInstance.request(t)]}))}))},t}(),Ge=function(){function t(){this.pluginName="FetchAbortPlugin",this.onlyOne=!0,this.controllers=new Map}return t.prototype.generateRequestKey=function(t){if(t.requestId)return t.requestId;var r=t.params?JSON.stringify(t.params):"",n=t.body?JSON.stringify(t.body):"";return"".concat(t.method||"GET","-").concat(t.url,"-").concat(r,"-").concat(n)},t.prototype.onBefore=function(t){var r=this.generateRequestKey(t.parameters);if(this.controllers.has(r)&&this.abort(t.parameters),!t.parameters.signal){var n=new AbortController;this.controllers.set(r,n),t.parameters.signal=n.signal}},t.prototype.onSuccess=function(t){var r=t.parameters;r&&this.controllers.delete(this.generateRequestKey(r))},t.prototype.onError=function(t){var r=t.error,n=t.parameters;if(this.isSameAbortError(r)&&n){var e=this.generateRequestKey(n),o=this.controllers.get(e);return this.controllers.delete(e),new c(a.ABORT_ERROR,(null==o?void 0:o.signal.reason)||r)}},t.prototype.isSameAbortError=function(t){return t instanceof Error&&"AbortError"===t.name||(t instanceof DOMException&&"AbortError"===t.name||t instanceof Event&&"abort"===t.type)},t.prototype.abort=function(t){var r="string"==typeof t?t:this.generateRequestKey(t),n=this.controllers.get(r);n&&(n.abort(new c(a.ABORT_ERROR,"The operation was aborted")),this.controllers.delete(r),"string"!=typeof t&&"function"==typeof t.onAbort&&t.onAbort.call(t,t))},t.prototype.abortAll=function(){this.controllers.forEach((function(t){return t.abort()})),this.controllers.clear()},t}(),We=function(){function t(){this.pluginName="FetchURLPlugin"}return t.prototype.isFullURL=function(t){return t.startsWith("http://")||t.startsWith("https://")},t.prototype.appendQueryParams=function(t,r){void 0===r&&(r={});var n=t.split("?"),e=n[0],o=n[1];(void 0===o?"":o).split("&").forEach((function(t){var n=t.split("="),e=n[0],o=n[1];e&&o&&(r[e]=o)}));var i=Object.entries(r).map((function(t){var r=t[0],n=t[1];return"".concat(r,"=").concat(n)})).join("&");return[e,i].join("?")},t.prototype.connectBaseURL=function(t,r){return"".concat(r,"/").concat(t)},t.prototype.buildUrl=function(t){var r=t.url,n=void 0===r?"":r,e=t.baseURL,o=void 0===e?"":e,i=t.params;if(!this.isFullURL(n)){var u=n.startsWith("/")?n.slice(1):n,a=o.endsWith("/")?o.slice(0,-1):o;n=this.connectBaseURL(u,a)}return i&&Object.keys(i).length>0&&(n=this.appendQueryParams(n,i)),n},t.prototype.onBefore=function(t){var r=t.parameters;r.url=this.buildUrl(r)},t.prototype.onSuccess=function(t){var r=t.returnValue;if(!r.response.ok){var n=new c(a.RESPONSE_NOT_OK,"Request failed with status: ".concat(r.status," ").concat(r.statusText));throw n.response=r.response,n}},t.prototype.onError=function(t){var r=t.error;return r instanceof c?r:new c(a.REQUEST_ERROR,r)},t}();function $e(){if(Pe)return Te;Pe=1;var t=Xn(),r=function(){if(Re)return Oe;Re=1;var t=Xn();return Oe=function(){this.__data__=new t,this.size=0}}(),n=we?Ee:(we=1,Ee=function(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}),e=ke?je:(ke=1,je=function(t){return this.__data__.get(t)}),o=xe?Ne:(xe=1,Ne=function(t){return this.__data__.has(t)}),i=function(){if(Ae)return Se;Ae=1;var t=Xn(),r=te(),n=ne();return Se=function(e,o){var i=this.__data__;if(i instanceof t){var u=i.__data__;if(!r||u.length<199)return u.push([e,o]),this.size=++i.size,this;i=this.__data__=new n(u)}return i.set(e,o),this.size=i.size,this}}();function u(r){var n=this.__data__=new t(r);this.size=n.size}return u.prototype.clear=r,u.prototype.delete=n,u.prototype.get=e,u.prototype.has=o,u.prototype.set=i,Te=u}function Ke(){if(Ue)return Ce;Ue=1;var t=se(),r=Yn();return Ce=function(n,e,o){(void 0!==o&&!r(n[e],o)||void 0===o&&!(e in n))&&t(n,e,o)}}function Me(){if(Ie)return Be;Ie=1;var t=(ze?qe:(ze=1,qe=function(t){return function(r,n,e){for(var o=-1,i=Object(r),u=e(r),a=u.length;a--;){var s=u[t?a:++o];if(!1===n(i[s],s,i))break}return r}}))();return Be=t}var Je,Qe,Ye,Ze,Xe,to,ro,no,eo,oo,io,uo,ao,so,co,fo,po,lo,ho,vo={exports:{}};function yo(){if(Xe)return Ze;Xe=1;var t=function(){if(Ye)return Qe;Ye=1;var t=W().Uint8Array;return Qe=t}();return Ze=function(r){var n=new r.constructor(r.byteLength);return new t(n).set(new t(r)),n}}function go(){if(ao)return uo;ao=1;var t=Object.prototype;return uo=function(r){var n=r&&r.constructor;return r===("function"==typeof n&&n.prototype||t)}}function bo(){if(co)return so;co=1;var t=function(){if(io)return oo;io=1;var t=st(),r=Object.create,n=function(){function n(){}return function(e){if(!t(e))return{};if(r)return r(e);n.prototype=e;var o=new n;return n.prototype=void 0,o}}();return oo=n}(),r=M(),n=go();return so=function(e){return"function"!=typeof e.constructor||n(e)?{}:t(r(e))}}function mo(){if(po)return fo;po=1;var t=Wn(),r=he();return fo=function(n){return null!=n&&r(n.length)&&!t(n)}}var _o,Oo,Ro,Eo,wo,jo,ko,No={exports:{}};function xo(){return Ro||(Ro=1,function(t,r){var n=W(),e=Oo?_o:(Oo=1,_o=function(){return!1}),o=r&&!r.nodeType&&r,i=o&&t&&!t.nodeType&&t,u=i&&i.exports===o?n.Buffer:void 0,a=(u?u.isBuffer:void 0)||e;t.exports=a}(No,No.exports)),No.exports}var So,Ao,To,Po,Co,Uo,qo,zo,Bo,Io,Fo,Vo,Do,Ho,Lo,Go,Wo,$o,Ko,Mo,Jo,Qo,Yo,Zo,Xo,ti,ri,ni,ei,oi,ii,ui={exports:{}};function ai(){if(To)return Ao;To=1;var t=function(){if(wo)return Eo;wo=1;var t=K(),r=he(),n=J(),e={};return e["[object Float32Array]"]=e["[object Float64Array]"]=e["[object Int8Array]"]=e["[object Int16Array]"]=e["[object Int32Array]"]=e["[object Uint8Array]"]=e["[object Uint8ClampedArray]"]=e["[object Uint16Array]"]=e["[object Uint32Array]"]=!0,e["[object Arguments]"]=e["[object Array]"]=e["[object ArrayBuffer]"]=e["[object Boolean]"]=e["[object DataView]"]=e["[object Date]"]=e["[object Error]"]=e["[object Function]"]=e["[object Map]"]=e["[object Number]"]=e["[object Object]"]=e["[object RegExp]"]=e["[object Set]"]=e["[object String]"]=e["[object WeakMap]"]=!1,Eo=function(o){return n(o)&&r(o.length)&&!!e[t(o)]}}(),r=ko?jo:(ko=1,jo=function(t){return function(r){return t(r)}}),n=function(){return So||(So=1,t=ui,r=ui.exports,n=G(),e=r&&!r.nodeType&&r,o=e&&t&&!t.nodeType&&t,i=o&&o.exports===e&&n.process,u=function(){try{return o&&o.require&&o.require("util").types||i&&i.binding&&i.binding("util")}catch(t){}}(),t.exports=u),ui.exports;var t,r,n,e,o,i,u}(),e=n&&n.isTypedArray,o=e?r(e):t;return Ao=o}function si(){if(Co)return Po;return Co=1,Po=function(t,r){if(("constructor"!==r||"function"!=typeof t[r])&&"__proto__"!=r)return t[r]}}function ci(){if(Fo)return Io;Fo=1;var t=Bo?zo:(Bo=1,zo=function(t,r){for(var n=-1,e=Array(t);++n<t;)e[n]=r(n);return e}),r=le(),n=nt(),e=xo(),o=fe(),i=ai(),u=Object.prototype.hasOwnProperty;return Io=function(a,s){var c=n(a),f=!c&&r(a),p=!c&&!f&&e(a),l=!c&&!f&&!p&&i(a),h=c||f||p||l,v=h?t(a.length,String):[],y=v.length;for(var d in a)!s&&!u.call(a,d)||h&&("length"==d||p&&("offset"==d||"parent"==d)||l&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||o(d,y))||v.push(d);return v}}function fi(){if(Lo)return Ho;Lo=1;var t=st(),r=go(),n=Do?Vo:(Do=1,Vo=function(t){var r=[];if(null!=t)for(var n in Object(t))r.push(n);return r}),e=Object.prototype.hasOwnProperty;return Ho=function(o){if(!t(o))return n(o);var i=r(o),u=[];for(var a in o)("constructor"!=a||!i&&e.call(o,a))&&u.push(a);return u}}function pi(){if(Wo)return Go;Wo=1;var t=ci(),r=fi(),n=mo();return Go=function(e){return n(e)?t(e,!0):r(e)}}function li(){if(Ko)return $o;Ko=1;var t=function(){if(qo)return Uo;qo=1;var t=ce(),r=se();return Uo=function(n,e,o,i){var u=!o;o||(o={});for(var a=-1,s=e.length;++a<s;){var c=e[a],f=i?i(o[c],n[c],c,o,n):void 0;void 0===f&&(f=n[c]),u?r(o,c,f):t(o,c,f)}return o}}(),r=pi();return $o=function(n){return t(n,r(n))}}function hi(){if(Jo)return Mo;Jo=1;var t=Ke(),r=(Je||(Je=1,function(t,r){var n=W(),e=r&&!r.nodeType&&r,o=e&&t&&!t.nodeType&&t,i=o&&o.exports===e?n.Buffer:void 0,u=i?i.allocUnsafe:void 0;t.exports=function(t,r){if(r)return t.slice();var n=t.length,e=u?u(n):new t.constructor(n);return t.copy(e),e}}(vo,vo.exports)),vo.exports),n=function(){if(ro)return to;ro=1;var t=yo();return to=function(r,n){var e=n?t(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.length)}}(),e=eo?no:(eo=1,no=function(t,r){var n=-1,e=t.length;for(r||(r=Array(e));++n<e;)r[n]=t[n];return r}),o=bo(),i=le(),u=nt(),a=function(){if(ho)return lo;ho=1;var t=mo(),r=J();return lo=function(n){return r(n)&&t(n)}}(),s=xo(),c=Wn(),f=st(),p=Q(),l=ai(),h=si(),v=li();return Mo=function(y,d,g,b,m,_,O){var R=h(y,g),E=h(d,g),w=O.get(E);if(w)t(y,g,w);else{var j=_?_(R,E,g+"",y,d,O):void 0,k=void 0===j;if(k){var N=u(E),x=!N&&s(E),S=!N&&!x&&l(E);j=E,N||x||S?u(R)?j=R:a(R)?j=e(R):x?(k=!1,j=r(E,!0)):S?(k=!1,j=n(E,!0)):j=[]:p(E)||i(E)?(j=R,i(R)?j=v(R):f(R)&&!c(R)||(j=o(E))):k=!1}k&&(O.set(E,j),m(j,E,b,_,O),O.delete(E)),t(y,g,j)}}}function vi(){if(ei)return ni;ei=1;var t=function(){if(Xo)return Zo;Xo=1;var t=ge(),r=de(),n=me();return Zo=function(e,o){return n(r(e,o,t),e+"")}}(),r=function(){if(ri)return ti;ri=1;var t=Yn(),r=mo(),n=fe(),e=st();return ti=function(o,i,u){if(!e(u))return!1;var a=typeof i;return!!("number"==a?r(u)&&n(i,u.length):"string"==a&&i in u)&&t(u[i],o)}}();return ni=function(n){return t((function(t,e){var o=-1,i=e.length,u=i>1?e[i-1]:void 0,a=i>2?e[2]:void 0;for(u=n.length>3&&"function"==typeof u?(i--,u):void 0,a&&r(e[0],e[1],a)&&(u=i<3?void 0:u,i=1),t=Object(t);++o<i;){var s=e[o];s&&n(t,s,o,u)}return t}))}}var yi,di=function(){if(ii)return oi;ii=1;var t=function(){if(Yo)return Qo;Yo=1;var t=$e(),r=Ke(),n=Me(),e=hi(),o=st(),i=pi(),u=si();return Qo=function a(s,c,f,p,l){s!==c&&n(c,(function(n,i){if(l||(l=new t),o(n))e(s,c,i,f,a,p,l);else{var h=p?p(u(s,i),n,i+"",s,c,l):void 0;void 0===h&&(h=n),r(s,i,h)}}),i)},Qo}(),r=vi()((function(r,n,e){t(r,n,e)}));return oi=r}(),gi=m(di),bi=function(){function t(t,r){void 0===r&&(r=new v),this.adapter=t,this.executor=r}return t.prototype.usePlugin=function(t){var r=this;return Array.isArray(t)?t.forEach((function(t){return r.executor.use(t)})):this.executor.use(t),this},t.prototype.request=function(t){var r=this,n=gi({},this.adapter.getConfig(),t);return this.executor.exec(n,(function(t){return r.adapter.request(t.parameters)}))},t}(),mi=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.request=function(r){return t.prototype.request.call(this,r)},r.prototype.get=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"GET"}))]}))}))},r.prototype.post=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"POST"}))]}))}))},r.prototype.put=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"PUT"}))]}))}))},r.prototype.delete=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"DELETE"}))]}))}))},r.prototype.patch=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"PATCH"}))]}))}))},r.prototype.head=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"HEAD"}))]}))}))},r.prototype.options=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"OPTIONS"}))]}))}))},r.prototype.trace=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"TRACE"}))]}))}))},r.prototype.connect=function(t,r){return o(this,void 0,void 0,(function(){return i(this,(function(n){return[2,this.request(e(e({url:t},r),{method:"CONNECT"}))]}))}))},r}(bi),_i=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return n(r,t),r.prototype.request=function(r){return t.prototype.request.call(this,r)},r.prototype.get=function(t,r){return this.request(e(e({},r),{url:t,method:"GET"}))},r.prototype.post=function(t,r,n){return this.request(e(e({},n),{url:t,method:"POST",data:r}))},r.prototype.put=function(t,r,n){return this.request(e(e({},n),{url:t,method:"PUT",data:r}))},r.prototype.delete=function(t,r){return this.request(e(e({},r),{url:t,method:"DELETE"}))},r.prototype.patch=function(t,r,n){return this.request(e(e({},n),{url:t,method:"PATCH",data:r}))},r}(bi),Oi=function(){function t(t){void 0===t&&(t={}),this.options=t,this[yi]="JSONSerializer"}return t.prototype.createReplacer=function(t){return Array.isArray(t)?t:null===t?function(t,r){return"string"==typeof r?r.replace(/\r\n/g,"\n"):r}:"function"==typeof t?function(r,n){var e="string"==typeof n?n.replace(/\r\n/g,"\n"):n;return t.call(this,r,e)}:function(t,r){return"string"==typeof r?r.replace(/\r\n/g,"\n"):r}},t.prototype.stringify=function(t,r,n){try{var e=this.createReplacer(r);return Array.isArray(e)?JSON.stringify(t,e,n):JSON.stringify(t,e,null!=n?n:this.options.pretty?this.options.indent||2:void 0)}catch(t){if(t instanceof TypeError&&t.message.includes("circular"))throw new TypeError("Cannot stringify data with circular references");throw t}},t.prototype.parse=function(t,r){return JSON.parse(t,r)},t.prototype.serialize=function(t){return this.stringify(t,this.options.replacer||null,this.options.pretty?this.options.indent||2:void 0)},t.prototype.deserialize=function(t,r){try{return this.parse(t)}catch(t){return r}},t.prototype.serializeArray=function(t){return"["+t.map((function(t){return JSON.stringify(t)})).join(",")+"]"},t}();yi=Symbol.toStringTag;var Ri=function(){function t(t){void 0===t&&(t={}),this.options=t}return t.prototype.serialize=function(t){var r=Buffer.from(t,"utf8").toString("base64");return this.options.urlSafe?this.makeUrlSafe(r):r},t.prototype.deserialize=function(t,r){try{return/^[A-Za-z0-9+/]*={0,2}$/.test(t)?(this.options.urlSafe&&(t=this.makeUrlUnsafe(t)),Buffer.from(t,"base64").toString("utf8")):null!=r?r:""}catch(t){return null!=r?r:""}},t.prototype.makeUrlSafe=function(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},t.prototype.makeUrlUnsafe=function(t){for(t=t.replace(/-/g,"+").replace(/_/g,"/");t.length%4;)t+="=";return t},t}(),Ei=function(){function t(t,r){void 0===r&&(r=new Oi),this.storage=t,this.serializer=r,this.store={}}return Object.defineProperty(t.prototype,"length",{get:function(){return this.storage?this.storage.length:Object.keys(this.store).length},enumerable:!1,configurable:!0}),t.prototype.setItem=function(t,r,n){var e={key:t,value:r,expire:n};"number"==typeof n&&n>0&&(e.expire=n);var o=this.serializer.serialize(e);this.storage?this.storage.setItem(t,o):this.store[t]=o},t.prototype.getItem=function(t,r){var n,e=this.storage?this.storage.getItem(t):this.store[t],o=null!=r?r:null;if(!e)return o;var i=this.serializer.deserialize(e,o);return"object"==typeof i?"number"==typeof i.expire&&i.expire<Date.now()?(this.removeItem(t),o):null!==(n=null==i?void 0:i.value)&&void 0!==n?n:o:o},t.prototype.removeItem=function(t){this.storage?this.storage.removeItem(t):delete this.store[t]},t.prototype.clear=function(){this.storage?this.storage.clear():this.store={}},t}();export{v as AsyncExecutor,Ri as Base64Serializer,t as Executor,s as ExecutorError,Ge as FetchAbortPlugin,We as FetchURLPlugin,Oi as JSONSerializer,Ei as JSONStorage,pt as LEVELS,lt as Logger,Le as RequestAdapterAxios,He as RequestAdapterFetch,c as RequestError,a as RequestErrorID,bi as RequestManager,mi as RequestScheduler,_i as RequestTransaction,g as RetryPlugin,y as SyncExecutor};
|
package/dist/index.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((t="undefined"!=typeof globalThis?globalThis:t||self).FeUtilsCommon={})}(this,(function(t){"use strict";var r=function(){function t(t){this.config=t,this.plugins=[]}return t.prototype.use=function(t){this.plugins.find((function(r){return r===t||r.pluginName===t.pluginName||r.constructor===t.constructor}))&&t.onlyOne?console.warn("Plugin ".concat(t.pluginName," is already used, skip adding")):this.plugins.push(t)},t}(),n=function(t,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])},n(t,r)};function e(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)}var o=function(){return o=Object.assign||function(t){for(var r,n=1,e=arguments.length;n<e;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t},o.apply(this,arguments)};function i(t,r,n,e){return new(n||(n=Promise))((function(o,i){function u(t){try{a(e.next(t))}catch(t){i(t)}}function s(t){try{a(e.throw(t))}catch(t){i(t)}}function a(t){var r;t.done?o(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(u,s)}a((e=e.apply(t,r||[])).next())}))}function u(t,r){var n,e,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return u.next=s(0),u.throw=s(1),u.return=s(2),"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function s(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;u&&(u=0,s[0]&&(i=0)),i;)try{if(n=1,e&&(o=2&s[0]?e.return:s[0]?e.throw||((o=e.return)&&o.call(e),0):e.next)&&!(o=o.call(e,s[1])).done)return o;switch(e=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,e=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=r.call(t,i)}catch(t){s=[6,t],e=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function s(t,r,n){if(n||2===arguments.length)for(var e,o=0,i=r.length;o<i;o++)!e&&o in r||(e||(e=Array.prototype.slice.call(r,0,o)),e[o]=r[o]);return t.concat(e||Array.prototype.slice.call(r))}"function"==typeof SuppressedError&&SuppressedError;var a,c=function(t){function r(r,n){var e=this.constructor,o=t.call(this,n instanceof Error?n.message:n||r)||this;return o.id=r,n instanceof Error&&"stack"in n&&(o.stack=n.stack),Object.setPrototypeOf(o,e.prototype),o}return e(r,t),r}(Error),f=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r}(c);t.RequestErrorID=void 0,(a=t.RequestErrorID||(t.RequestErrorID={})).REQUEST_ERROR="REQUEST_ERROR",a.ENV_FETCH_NOT_SUPPORT="ENV_FETCH_NOT_SUPPORT",a.FETCHER_NONE="FETCHER_NONE",a.RESPONSE_NOT_OK="RESPONSE_NOT_OK",a.ABORT_ERROR="ABORT_ERROR",a.URL_NONE="URL_NONE";var l,p,h,v,y=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.runHooks=function(t,r,n){for(var e=[],o=3;o<arguments.length;o++)e[o-3]=arguments[o];return i(this,void 0,void 0,(function(){var o,i,a,c,f,l,p,h;return u(this,(function(u){switch(u.label){case 0:o=-1,(a=n||{parameters:void 0,hooksRuntimes:{}}).hooksRuntimes.times=0,a.hooksRuntimes.index=void 0,c=0,f=t,u.label=1;case 1:return c<f.length?(l=f[c],o++,"function"!=typeof l[r]||"function"==typeof l.enabled&&!l.enabled(r,n)?[3,3]:(null===(h=a.hooksRuntimes)||void 0===h?void 0:h.breakChain)?[3,4]:(a.hooksRuntimes.pluginName=l.pluginName,a.hooksRuntimes.hookName=r,a.hooksRuntimes.times++,a.hooksRuntimes.index=o,[4,l[r].apply(l,s([n],e,!1))])):[3,4];case 2:if(void 0!==(p=u.sent())&&(i=p,a.hooksRuntimes.returnValue=p,a.hooksRuntimes.returnBreakChain))return[2,i];u.label=3;case 3:return c++,[3,1];case 4:return[2,i]}}))}))},r.prototype.execNoError=function(t,r){return i(this,void 0,void 0,(function(){var n;return u(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.exec(t,r)];case 1:return[2,e.sent()];case 2:return(n=e.sent())instanceof c?[2,n]:[2,new c("UNKNOWN_ASYNC_ERROR",n)];case 3:return[2]}}))}))},r.prototype.exec=function(t,r){var n=r||t,e=r?t:void 0;if("function"!=typeof n)throw new Error("Task must be a async function!");return this.run(e,n)},r.prototype.run=function(t,r){return i(this,void 0,void 0,(function(){var n,e,o,s=this;return u(this,(function(a){switch(a.label){case 0:n={parameters:t,returnValue:void 0,error:void 0,hooksRuntimes:{pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0}},e=function(t){return i(s,void 0,void 0,(function(){var n;return u(this,(function(e){switch(e.label){case 0:return[4,this.runHooks(this.plugins,"onExec",t,r)];case 1:return e.sent(),0!==t.hooksRuntimes.times?[3,3]:(n=t,[4,r(t)]);case 2:return n.returnValue=e.sent(),[2];case 3:return t.returnValue=t.hooksRuntimes.returnValue,[2]}}))}))},a.label=1;case 1:return a.trys.push([1,5,7,8]),[4,this.runHooks(this.plugins,"onBefore",n)];case 2:return a.sent(),[4,e(n)];case 3:return a.sent(),[4,this.runHooks(this.plugins,"onSuccess",n)];case 4:return a.sent(),[2,n.returnValue];case 5:return o=a.sent(),n.error=o,[4,this.runHooks(this.plugins,"onError",n)];case 6:if(a.sent(),n.hooksRuntimes.returnValue&&(n.error=n.hooksRuntimes.returnValue),n.error instanceof c)throw n.error;throw new c("UNKNOWN_ASYNC_ERROR",n.error);case 7:return n.hooksRuntimes={pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0},[7];case 8:return[2]}}))}))},r}(r),d=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.runHooks=function(t,r,n){for(var e,o=[],i=3;i<arguments.length;i++)o[i-3]=arguments[i];var u,a=-1,c=n||{parameters:void 0,hooksRuntimes:{}};c.hooksRuntimes.times=0,c.hooksRuntimes.index=void 0;for(var f=0,l=t;f<l.length;f++){var p=l[f];if(a++,"function"==typeof p[r]&&("function"!=typeof p.enabled||p.enabled(r,c))){if(null===(e=c.hooksRuntimes)||void 0===e?void 0:e.breakChain)break;c.hooksRuntimes.pluginName=p.pluginName,c.hooksRuntimes.hookName=r,c.hooksRuntimes.times++,c.hooksRuntimes.index=a;var h=p[r].apply(p,s([n],o,!1));if(void 0!==h&&(u=h,c.hooksRuntimes.returnValue=h,c.hooksRuntimes.returnBreakChain))return u}}return u},r.prototype.execNoError=function(t,r){try{return this.exec(t,r)}catch(t){return t instanceof c?t:new c("UNKNOWN_SYNC_ERROR",t)}},r.prototype.exec=function(t,r){var n=r||t,e=r?t:void 0;if("function"!=typeof n)throw new Error("Task must be a function!");return this.run(e,n)},r.prototype.run=function(t,r){var n,e=this,o={parameters:t,returnValue:void 0,error:void 0,hooksRuntimes:{pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0}};try{return this.runHooks(this.plugins,"onBefore",o),n=o,e.runHooks(e.plugins,"onExec",n,r),n.returnValue=n.hooksRuntimes.times?n.hooksRuntimes.returnValue:r(n),this.runHooks(this.plugins,"onSuccess",o),o.returnValue}catch(t){if(o.error=t,this.runHooks(this.plugins,"onError",o),o.hooksRuntimes.returnValue&&(o.error=o.hooksRuntimes.returnValue),o.error instanceof c)throw o.error;throw new c("UNKNOWN_SYNC_ERROR",o.error)}finally{o.hooksRuntimes={pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0}}},r}(r),g=function(){return!0},m=function(){function t(t){var r;void 0===t&&(t={}),this.pluginName="RetryPlugin",this.onlyOne=!0,this.options=o(o({retryDelay:1e3,useExponentialBackoff:!1,shouldRetry:g},t),{maxRetries:Math.min(Math.max(1,null!==(r=t.maxRetries)&&void 0!==r?r:3),16)})}return t.prototype.delay=function(t){return i(this,void 0,void 0,(function(){var r;return u(this,(function(n){return r=this.options.useExponentialBackoff?this.options.retryDelay*Math.pow(2,t):this.options.retryDelay,[2,new Promise((function(t){return setTimeout(t,r)}))]}))}))},t.prototype.onExec=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return this.options.maxRetries<1?[2,r(t)]:[2,this.retry(r,t,this.options,this.options.maxRetries)]}))}))},t.prototype.shouldRetry=function(t){var r=t.error;return t.retryCount>0&&this.options.shouldRetry(r)},t.prototype.retry=function(t,r,n,e){return i(this,void 0,void 0,(function(){var o;return u(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,4]),[4,t(r)];case 1:return[2,i.sent()];case 2:if(o=i.sent(),!this.shouldRetry({error:o,retryCount:e}))throw new c("RETRY_ERROR","All ".concat(n.maxRetries," attempts failed: ").concat(o.message));return[4,this.delay(n.maxRetries-e)];case 3:return i.sent(),e--,[2,this.retry(t,r,n,e)];case 4:return[2]}}))}))},t}(),b="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function R(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var _,O,E=R(v?h:(v=1,h=p?l:(p=1,l=function(t){return t&&t.length?t[0]:void 0})));var w,N,k,S,x,j,T,A,P,C,q,U,I,D,z,B,F,V,H,L,G=R(O?_:(O=1,_=function(t){var r=null==t?0:t.length;return r?t[r-1]:void 0}));function $(){if(S)return k;S=1;var t=function(){if(N)return w;N=1;var t="object"==typeof b&&b&&b.Object===Object&&b;return w=t}(),r="object"==typeof self&&self&&self.Object===Object&&self,n=t||r||Function("return this")();return k=n}function K(){if(j)return x;j=1;var t=$().Symbol;return x=t}function W(){if(U)return q;U=1;var t=K(),r=function(){if(A)return T;A=1;var t=K(),r=Object.prototype,n=r.hasOwnProperty,e=r.toString,o=t?t.toStringTag:void 0;return T=function(t){var r=n.call(t,o),i=t[o];try{t[o]=void 0;var u=!0}catch(t){}var s=e.call(t);return u&&(r?t[o]=i:delete t[o]),s}}(),n=function(){if(C)return P;C=1;var t=Object.prototype.toString;return P=function(r){return t.call(r)}}(),e=t?t.toStringTag:void 0;return q=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":e&&e in Object(t)?r(t):n(t)}}function J(){if(B)return z;B=1;var t=(D?I:(D=1,I=function(t,r){return function(n){return t(r(n))}}))(Object.getPrototypeOf,Object);return z=t}function M(){if(V)return F;return V=1,F=function(t){return null!=t&&"object"==typeof t}}var Q,Y,Z,X,tt=R(function(){if(L)return H;L=1;var t=W(),r=J(),n=M(),e=Function.prototype,o=Object.prototype,i=e.toString,u=o.hasOwnProperty,s=i.call(Object);return H=function(e){if(!n(e)||"[object Object]"!=t(e))return!1;var o=r(e);if(null===o)return!0;var a=u.call(o,"constructor")&&o.constructor;return"function"==typeof a&&a instanceof a&&i.call(a)==s}}());function rt(){if(Y)return Q;Y=1;var t=Array.isArray;return Q=t}var nt,et,ot=function(){if(X)return Z;X=1;var t=W(),r=rt(),n=M();return Z=function(e){return"string"==typeof e||!r(e)&&n(e)&&"[object String]"==t(e)}}(),it=R(ot),ut=R(rt());function st(){if(et)return nt;return et=1,nt=function(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}}var at,ct=R(st()),ft={LOG:"LOG",INFO:"INFO",ERROR:"ERROR",WARN:"WARN",DEBUG:"DEBUG"},lt=function(){function t(t){var r=void 0===t?{}:t,n=r.isCI,e=void 0!==n&&n,o=r.dryRun,i=void 0!==o&&o,u=r.debug,s=void 0!==u&&u,a=r.silent,c=void 0!==a&&a;this.isCI=e,this.isDryRun=i,this.isDebug=s,this.isSilent=c}return t.prototype.print=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.isSilent||console.log.apply(console,r)},t.prototype.prefix=function(t,r){return t},t.prototype.log=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.print.apply(this,s([ft.LOG],t,!1))},t.prototype.info=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.print.apply(this,s([ft.INFO,this.prefix(ft.INFO)],t,!1))},t.prototype.warn=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.print.apply(this,s([ft.WARN,this.prefix(ft.WARN)],t,!1))},t.prototype.error=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.print.apply(this,s([ft.ERROR,this.prefix(ft.ERROR)],t,!1))},t.prototype.debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(this.isDebug){var n=E(t),e=ct(n)?JSON.stringify(n):String(n);this.print.apply(this,s([ft.DEBUG,this.prefix(ft.DEBUG),e],t.slice(1),!1))}},t.prototype.verbose=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.isDebug&&this.print.apply(this,s([ft.DEBUG],t,!1))},t.prototype.exec=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=tt(G(t))?G(t):void 0,e=n||{},o=e.isDryRun,i=e.isExternal;if(o||this.isDryRun){var u=[null==i?"$":"!",t.slice(0,null==n?void 0:-1).map((function(t){return it(t)?t:ut(t)?t.join(" "):String(t)})).join(" ")].join(" ").trim();this.log(u)}},t.prototype.obtrusive=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.isCI||this.log(),this.log.apply(this,t),this.isCI||this.log()},t}(),pt={exports:{}};var ht,vt,yt,dt,gt,mt,bt,Rt,_t,Ot,Et,wt,Nt,kt,St,xt,jt,Tt,At,Pt,Ct,qt,Ut,It,Dt,zt,Bt,Ft,Vt,Ht,Lt,Gt,$t,Kt,Wt,Jt,Mt,Qt,Yt,Zt,Xt,tr,rr,nr,er,or,ir,ur,sr,ar,cr,fr,lr,pr,hr,vr,yr,dr,gr,mr,br,Rr,_r,Or,Er,wr,Nr,kr,Sr,xr,jr,Tr,Ar,Pr,Cr,qr,Ur,Ir,Dr,zr,Br,Fr,Vr,Hr,Lr,Gr,$r,Kr,Wr,Jr,Mr,Qr,Yr,Zr,Xr,tn,rn,nn,en,on,un,sn,an,cn,fn,ln,pn,hn,vn,yn,dn,gn,mn,bn,Rn,_n,On,En,wn,Nn,kn,Sn,xn,jn,Tn,An,Pn,Cn,qn,Un,In,Dn,zn,Bn,Fn,Vn,Hn=(at||(at=1,function(t,r){function n(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.apply(void 0,t)}function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return a(!0===t[0],!1,t)}function o(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return a(!0===t[0],!0,t)}function i(t){if(Array.isArray(t)){for(var r=[],n=0;n<t.length;++n)r.push(i(t[n]));return r}if(u(t)){for(var n in r={},t)r[n]=i(t[n]);return r}return t}function u(t){return t&&"object"==typeof t&&!Array.isArray(t)}function s(t,r){if(!u(t))return r;for(var n in r)"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(t[n]=u(t[n])&&u(r[n])?s(t[n],r[n]):r[n]);return t}function a(t,r,n){var e;!t&&u(e=n.shift())||(e={});for(var o=0;o<n.length;++o){var a=n[o];if(u(a))for(var c in a)if("__proto__"!==c&&"constructor"!==c&&"prototype"!==c){var f=t?i(a[c]):a[c];e[c]=r?s(e[c],f):f}}return e}Object.defineProperty(r,"__esModule",{value:!0}),r.isPlainObject=r.clone=r.recursive=r.merge=r.main=void 0,t.exports=r=n,r.default=n,r.main=n,n.clone=i,n.isPlainObject=u,n.recursive=o,r.merge=e,r.recursive=o,r.clone=i,r.isPlainObject=u}(pt,pt.exports)),pt.exports),Ln=R(Hn);function Gn(){if(vt)return ht;vt=1;var t=W(),r=M();return ht=function(n){return"symbol"==typeof n||r(n)&&"[object Symbol]"==t(n)}}function $n(){if(Ot)return _t;Ot=1;var t,r=function(){if(Rt)return bt;Rt=1;var t=$()["__core-js_shared__"];return bt=t}(),n=(t=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return _t=function(t){return!!n&&n in t}}function Kn(){if(kt)return Nt;kt=1;var t=function(){if(mt)return gt;mt=1;var t=W(),r=st();return gt=function(n){if(!r(n))return!1;var e=t(n);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}}(),r=$n(),n=st(),e=function(){if(wt)return Et;wt=1;var t=Function.prototype.toString;return Et=function(r){if(null!=r){try{return t.call(r)}catch(t){}try{return r+""}catch(t){}}return""}}(),o=/^\[object .+?Constructor\]$/,i=Function.prototype,u=Object.prototype,s=i.toString,a=u.hasOwnProperty,c=RegExp("^"+s.call(a).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return Nt=function(i){return!(!n(i)||r(i))&&(t(i)?c:o).test(e(i))}}function Wn(){if(Tt)return jt;Tt=1;var t=Kn(),r=xt?St:(xt=1,St=function(t,r){return null==t?void 0:t[r]});return jt=function(n,e){var o=r(n,e);return t(o)?o:void 0}}function Jn(){if(Pt)return At;Pt=1;var t=Wn()(Object,"create");return At=t}function Mn(){if(Gt)return Lt;Gt=1;var t=function(){if(qt)return Ct;qt=1;var t=Jn();return Ct=function(){this.__data__=t?t(null):{},this.size=0}}(),r=It?Ut:(It=1,Ut=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}),n=function(){if(zt)return Dt;zt=1;var t=Jn(),r=Object.prototype.hasOwnProperty;return Dt=function(n){var e=this.__data__;if(t){var o=e[n];return"__lodash_hash_undefined__"===o?void 0:o}return r.call(e,n)?e[n]:void 0}}(),e=function(){if(Ft)return Bt;Ft=1;var t=Jn(),r=Object.prototype.hasOwnProperty;return Bt=function(n){var e=this.__data__;return t?void 0!==e[n]:r.call(e,n)}}(),o=function(){if(Ht)return Vt;Ht=1;var t=Jn();return Vt=function(r,n){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=t&&void 0===n?"__lodash_hash_undefined__":n,this}}();function i(t){var r=-1,n=null==t?0:t.length;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=n,i.prototype.has=e,i.prototype.set=o,Lt=i}function Qn(){if(Jt)return Wt;return Jt=1,Wt=function(t,r){return t===r||t!=t&&r!=r}}function Yn(){if(Qt)return Mt;Qt=1;var t=Qn();return Mt=function(r,n){for(var e=r.length;e--;)if(t(r[e][0],n))return e;return-1}}function Zn(){if(ur)return ir;ur=1;var t=Kt?$t:(Kt=1,$t=function(){this.__data__=[],this.size=0}),r=function(){if(Zt)return Yt;Zt=1;var t=Yn(),r=Array.prototype.splice;return Yt=function(n){var e=this.__data__,o=t(e,n);return!(o<0||(o==e.length-1?e.pop():r.call(e,o,1),--this.size,0))}}(),n=function(){if(tr)return Xt;tr=1;var t=Yn();return Xt=function(r){var n=this.__data__,e=t(n,r);return e<0?void 0:n[e][1]}}(),e=function(){if(nr)return rr;nr=1;var t=Yn();return rr=function(r){return t(this.__data__,r)>-1}}(),o=function(){if(or)return er;or=1;var t=Yn();return er=function(r,n){var e=this.__data__,o=t(e,r);return o<0?(++this.size,e.push([r,n])):e[o][1]=n,this}}();function i(t){var r=-1,n=null==t?0:t.length;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=n,i.prototype.has=e,i.prototype.set=o,ir=i}function Xn(){if(fr)return cr;fr=1;var t=Mn(),r=Zn(),n=function(){if(ar)return sr;ar=1;var t=Wn()($(),"Map");return sr=t}();return cr=function(){this.size=0,this.__data__={hash:new t,map:new(n||r),string:new t}}}function te(){if(vr)return hr;vr=1;var t=pr?lr:(pr=1,lr=function(t){var r=typeof t;return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t});return hr=function(r,n){var e=r.__data__;return t(n)?e["string"==typeof n?"string":"hash"]:e.map}}function re(){if(wr)return Er;wr=1;var t=Xn(),r=function(){if(dr)return yr;dr=1;var t=te();return yr=function(r){var n=t(this,r).delete(r);return this.size-=n?1:0,n}}(),n=function(){if(mr)return gr;mr=1;var t=te();return gr=function(r){return t(this,r).get(r)}}(),e=function(){if(Rr)return br;Rr=1;var t=te();return br=function(r){return t(this,r).has(r)}}(),o=function(){if(Or)return _r;Or=1;var t=te();return _r=function(r,n){var e=t(this,r),o=e.size;return e.set(r,n),this.size+=e.size==o?0:1,this}}();function i(t){var r=-1,n=null==t?0:t.length;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=n,i.prototype.has=e,i.prototype.set=o,Er=i}function ne(){if(xr)return Sr;xr=1;var t=function(){if(kr)return Nr;kr=1;var t=re();function r(n,e){if("function"!=typeof n||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var o=function(){var t=arguments,r=e?e.apply(this,t):t[0],i=o.cache;if(i.has(r))return i.get(r);var u=n.apply(this,t);return o.cache=i.set(r,u)||i,u};return o.cache=new(r.Cache||t),o}return r.Cache=t,Nr=r}();return Sr=function(r){var n=t(r,(function(t){return 500===e.size&&e.clear(),t})),e=n.cache;return n}}function ee(){if(qr)return Cr;qr=1;var t=K(),r=Pr?Ar:(Pr=1,Ar=function(t,r){for(var n=-1,e=null==t?0:t.length,o=Array(e);++n<e;)o[n]=r(t[n],n,t);return o}),n=rt(),e=Gn(),o=t?t.prototype:void 0,i=o?o.toString:void 0;return Cr=function t(o){if("string"==typeof o)return o;if(n(o))return r(o,t)+"";if(e(o))return i?i.call(o):"";var u=o+"";return"0"==u&&1/o==-1/0?"-0":u},Cr}function oe(){if(zr)return Dr;zr=1;var t=rt(),r=function(){if(dt)return yt;dt=1;var t=rt(),r=Gn(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,e=/^\w*$/;return yt=function(o,i){if(t(o))return!1;var u=typeof o;return!("number"!=u&&"symbol"!=u&&"boolean"!=u&&null!=o&&!r(o))||e.test(o)||!n.test(o)||null!=i&&o in Object(i)}}(),n=function(){if(Tr)return jr;Tr=1;var t=ne(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,e=t((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(r,(function(t,r,o,i){e.push(o?i.replace(n,"$1"):r||t)})),e}));return jr=e}(),e=function(){if(Ir)return Ur;Ir=1;var t=ee();return Ur=function(r){return null==r?"":t(r)}}();return Dr=function(o,i){return t(o)?o:r(o,i)?[o]:n(e(o))}}function ie(){if(Fr)return Br;Fr=1;var t=Gn();return Br=function(r){if("string"==typeof r||t(r))return r;var n=r+"";return"0"==n&&1/r==-1/0?"-0":n}}function ue(){if(Gr)return Lr;Gr=1;var t=Wn(),r=function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch(t){}}();return Lr=r}function se(){if(Jr)return Wr;Jr=1;var t=function(){if(Kr)return $r;Kr=1;var t=ue();return $r=function(r,n,e){"__proto__"==n&&t?t(r,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[n]=e}}(),r=Qn(),n=Object.prototype.hasOwnProperty;return Wr=function(e,o,i){var u=e[o];n.call(e,o)&&r(u,i)&&(void 0!==i||o in e)||t(e,o,i)}}function ae(){if(Qr)return Mr;Qr=1;var t=/^(?:0|[1-9]\d*)$/;return Mr=function(r,n){var e=typeof r;return!!(n=null==n?9007199254740991:n)&&("number"==e||"symbol"!=e&&t.test(r))&&r>-1&&r%1==0&&r<n}}function ce(){if(tn)return Xr;tn=1;var t=function(){if(Hr)return Vr;Hr=1;var t=oe(),r=ie();return Vr=function(n,e){for(var o=0,i=(e=t(e,n)).length;null!=n&&o<i;)n=n[r(e[o++])];return o&&o==i?n:void 0}}(),r=function(){if(Zr)return Yr;Zr=1;var t=se(),r=oe(),n=ae(),e=st(),o=ie();return Yr=function(i,u,s,a){if(!e(i))return i;for(var c=-1,f=(u=r(u,i)).length,l=f-1,p=i;null!=p&&++c<f;){var h=o(u[c]),v=s;if("__proto__"===h||"constructor"===h||"prototype"===h)return i;if(c!=l){var y=p[h];void 0===(v=a?a(y,h,p):void 0)&&(v=e(y)?y:n(u[c+1])?[]:{})}t(p,h,v),p=p[h]}return i}}(),n=oe();return Xr=function(e,o,i){for(var u=-1,s=o.length,a={};++u<s;){var c=o[u],f=t(e,c);i(f,c)&&r(a,n(c,e),f)}return a}}function fe(){if(sn)return un;sn=1;var t=function(){if(on)return en;on=1;var t=W(),r=M();return en=function(n){return r(n)&&"[object Arguments]"==t(n)}}(),r=M(),n=Object.prototype,e=n.hasOwnProperty,o=n.propertyIsEnumerable,i=t(function(){return arguments}())?t:function(t){return r(t)&&e.call(t,"callee")&&!o.call(t,"callee")};return un=i}function le(){if(ln)return fn;ln=1;var t=oe(),r=fe(),n=rt(),e=ae(),o=cn?an:(cn=1,an=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}),i=ie();return fn=function(u,s,a){for(var c=-1,f=(s=t(s,u)).length,l=!1;++c<f;){var p=i(s[c]);if(!(l=null!=u&&a(u,p)))break;u=u[p]}return l||++c!=f?l:!!(f=null==u?0:u.length)&&o(f)&&e(p,f)&&(n(u)||r(u))}}function pe(){if(hn)return pn;hn=1;var t=nn?rn:(nn=1,rn=function(t,r){return null!=t&&r in Object(t)}),r=le();return pn=function(n,e){return null!=n&&r(n,e,t)}}function he(){if(_n)return Rn;_n=1;var t=gn?dn:(gn=1,dn=function(t,r){for(var n=-1,e=r.length,o=t.length;++n<e;)t[o+n]=r[n];return t}),r=function(){if(bn)return mn;bn=1;var t=K(),r=fe(),n=rt(),e=t?t.isConcatSpreadable:void 0;return mn=function(t){return n(t)||r(t)||!!(e&&t&&t[e])}}();return Rn=function n(e,o,i,u,s){var a=-1,c=e.length;for(i||(i=r),s||(s=[]);++a<c;){var f=e[a];o>0&&i(f)?o>1?n(f,o-1,i,u,s):t(s,f):u||(s[s.length]=f)}return s},Rn}function ve(){if(Sn)return kn;Sn=1;var t=Nn?wn:(Nn=1,wn=function(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}),r=Math.max;return kn=function(n,e,o){return e=r(void 0===e?n.length-1:e,0),function(){for(var i=arguments,u=-1,s=r(i.length-e,0),a=Array(s);++u<s;)a[u]=i[e+u];u=-1;for(var c=Array(e+1);++u<e;)c[u]=i[u];return c[e]=o(a),t(n,this,c)}},kn}function ye(){if(Cn)return Pn;Cn=1;var t=jn?xn:(jn=1,xn=function(t){return function(){return t}}),r=ue(),n=An?Tn:(An=1,Tn=function(t){return t});return Pn=r?function(n,e){return r(n,"toString",{configurable:!0,enumerable:!1,value:t(e),writable:!0})}:n}function de(){if(Dn)return In;Dn=1;var t=ye(),r=function(){if(Un)return qn;Un=1;var t=Date.now;return qn=function(r){var n=0,e=0;return function(){var o=t(),i=16-(o-e);if(e=o,i>0){if(++n>=800)return arguments[0]}else n=0;return r.apply(void 0,arguments)}},qn}(),n=r(t);return In=n}function ge(){if(Bn)return zn;Bn=1;var t=function(){if(En)return On;En=1;var t=he();return On=function(r){return null!=r&&r.length?t(r,1):[]}}(),r=ve(),n=de();return zn=function(e){return n(r(e,void 0,t),e+"")}}var me,be=function(){if(Vn)return Fn;Vn=1;var t=function(){if(yn)return vn;yn=1;var t=ce(),r=pe();return vn=function(n,e){return t(n,e,(function(t,e){return r(n,e)}))}}(),r=ge()((function(r,n){return null==r?{}:t(r,n)}));return Fn=r}(),Re=R(be),_e=["cache","credentials","headers","integrity","keepalive","mode","priority","redirect","referrer","referrerPolicy","signal"],Oe=function(){function r(r){if(void 0===r&&(r={}),!r.fetcher){if("function"!=typeof fetch)throw new c(t.RequestErrorID.ENV_FETCH_NOT_SUPPORT);r.fetcher=fetch}this.executor=new y,this.config=r}return r.prototype.getConfig=function(){return this.config},r.prototype.usePlugin=function(t){this.executor.use(t)},r.prototype.request=function(r){return i(this,void 0,void 0,(function(){var n,e,o,s,a,f=this;return u(this,(function(l){if(n=this.getConfig(),e=Hn.merge({},n,r),o=e.fetcher,s=function(t,r){var n={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.indexOf(e)<0&&(n[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(e=Object.getOwnPropertySymbols(t);o<e.length;o++)r.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(t,e[o])&&(n[e[o]]=t[e[o]])}return n}(e,["fetcher"]),"function"!=typeof o)throw new c(t.RequestErrorID.FETCHER_NONE);if(!s.url)throw new c(t.RequestErrorID.URL_NONE);return a=function(t){return i(f,void 0,void 0,(function(){var r;return u(this,(function(n){switch(n.label){case 0:return[4,o(this.parametersToRequest(t.parameters))];case 1:return r=n.sent(),[2,this.toAdapterResponse(r,r,t.parameters)]}}))}))},[2,this.executor.exec(s,a)]}))}))},r.prototype.parametersToRequest=function(t){var r=t.url,n=void 0===r?"/":r,e=t.method,o=void 0===e?"GET":e,i=t.data,u=Re(t,_e);return new Request(n,Object.assign(u,{body:i,method:o.toUpperCase()}))},r.prototype.toAdapterResponse=function(t,r,n){return{data:t,status:r.status,statusText:r.statusText,headers:this.getResponseHeaders(r),config:n,response:r}},r.prototype.getResponseHeaders=function(t){var r={};return t.headers.forEach((function(t,n){r[n]=t})),r},r}(),Ee=function(){function t(t,r){void 0===r&&(r={}),this.config=r,this.axiosInstance=t.create(r)}return t.prototype.getConfig=function(){return this.config},t.prototype.request=function(t){return i(this,void 0,void 0,(function(){return u(this,(function(r){return[2,this.axiosInstance.request(t)]}))}))},t}(),we=function(){function r(){this.pluginName="FetchAbortPlugin",this.onlyOne=!0,this.controllers=new Map}return r.prototype.generateRequestKey=function(t){if(t.requestId)return t.requestId;var r=t.params?JSON.stringify(t.params):"",n=t.body?JSON.stringify(t.body):"";return"".concat(t.method||"GET","-").concat(t.url,"-").concat(r,"-").concat(n)},r.prototype.onBefore=function(t){var r=this.generateRequestKey(t.parameters);if(this.controllers.has(r)&&this.abort(t.parameters),!t.parameters.signal){var n=new AbortController;this.controllers.set(r,n),t.parameters.signal=n.signal}},r.prototype.onSuccess=function(t){var r=t.parameters;r&&this.controllers.delete(this.generateRequestKey(r))},r.prototype.onError=function(r){var n=r.error,e=r.parameters;if(this.isSameAbortError(n)&&e){var o=this.generateRequestKey(e),i=this.controllers.get(o);return this.controllers.delete(o),new f(t.RequestErrorID.ABORT_ERROR,(null==i?void 0:i.signal.reason)||n)}},r.prototype.isSameAbortError=function(t){return t instanceof Error&&"AbortError"===t.name||(t instanceof DOMException&&"AbortError"===t.name||t instanceof Event&&"abort"===t.type)},r.prototype.abort=function(r){var n="string"==typeof r?r:this.generateRequestKey(r),e=this.controllers.get(n);e&&(e.abort(new f(t.RequestErrorID.ABORT_ERROR,"The operation was aborted")),this.controllers.delete(n),"string"!=typeof r&&"function"==typeof r.onAbort&&r.onAbort.call(r,r))},r.prototype.abortAll=function(){this.controllers.forEach((function(t){return t.abort()})),this.controllers.clear()},r}(),Ne=function(){function r(){this.pluginName="FetchURLPlugin"}return r.prototype.isFullURL=function(t){return t.startsWith("http://")||t.startsWith("https://")},r.prototype.appendQueryParams=function(t,r){void 0===r&&(r={});var n=t.split("?"),e=n[0],o=n[1];(void 0===o?"":o).split("&").forEach((function(t){var n=t.split("="),e=n[0],o=n[1];e&&o&&(r[e]=o)}));var i=Object.entries(r).map((function(t){var r=t[0],n=t[1];return"".concat(r,"=").concat(n)})).join("&");return[e,i].join("?")},r.prototype.connectBaseURL=function(t,r){return"".concat(r,"/").concat(t)},r.prototype.buildUrl=function(t){var r=t.url,n=void 0===r?"":r,e=t.baseURL,o=void 0===e?"":e,i=t.params;if(!this.isFullURL(n)){var u=n.startsWith("/")?n.slice(1):n,s=o.endsWith("/")?o.slice(0,-1):o;n=this.connectBaseURL(u,s)}return i&&Object.keys(i).length>0&&(n=this.appendQueryParams(n,i)),n},r.prototype.onBefore=function(t){var r=t.parameters;r.url=this.buildUrl(r)},r.prototype.onSuccess=function(r){var n=r.returnValue;if(!n.response.ok){var e=new f(t.RequestErrorID.RESPONSE_NOT_OK,"Request failed with status: ".concat(n.status," ").concat(n.statusText));throw e.response=n.response,e}},r.prototype.onError=function(r){var n=r.error;return n instanceof f?n:new f(t.RequestErrorID.REQUEST_ERROR,n)},r}(),ke=function(){function t(t){this.adapter=t,this.executor=new y}return t.prototype.usePlugin=function(t){return this.executor.use(t),this},t.prototype.request=function(t){return i(this,void 0,void 0,(function(){var r,n,e=this;return u(this,(function(o){return r=this.adapter.getConfig(),n=Ln({},r,t),[2,this.executor.exec(n,(function(t){return e.adapter.request(t.parameters)}))]}))}))},t.prototype.get=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"GET"}))]}))}))},t.prototype.post=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"POST"}))]}))}))},t.prototype.put=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"PUT"}))]}))}))},t.prototype.delete=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"DELETE"}))]}))}))},t.prototype.patch=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"PATCH"}))]}))}))},t.prototype.head=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"HEAD"}))]}))}))},t.prototype.options=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"OPTIONS"}))]}))}))},t.prototype.trace=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"TRACE"}))]}))}))},t.prototype.connect=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"CONNECT"}))]}))}))},t}(),Se=function(){function t(t){void 0===t&&(t={}),this.options=t,this[me]="JSONSerializer"}return t.prototype.createReplacer=function(t){return Array.isArray(t)?t:null===t?function(t,r){return"string"==typeof r?r.replace(/\r\n/g,"\n"):r}:"function"==typeof t?function(r,n){var e="string"==typeof n?n.replace(/\r\n/g,"\n"):n;return t.call(this,r,e)}:function(t,r){return"string"==typeof r?r.replace(/\r\n/g,"\n"):r}},t.prototype.stringify=function(t,r,n){try{var e=this.createReplacer(r);return Array.isArray(e)?JSON.stringify(t,e,n):JSON.stringify(t,e,null!=n?n:this.options.pretty?this.options.indent||2:void 0)}catch(t){if(t instanceof TypeError&&t.message.includes("circular"))throw new TypeError("Cannot stringify data with circular references");throw t}},t.prototype.parse=function(t,r){return JSON.parse(t,r)},t.prototype.serialize=function(t){return this.stringify(t,this.options.replacer||null,this.options.pretty?this.options.indent||2:void 0)},t.prototype.deserialize=function(t,r){try{return this.parse(t)}catch(t){return r}},t.prototype.serializeArray=function(t){return"["+t.map((function(t){return JSON.stringify(t)})).join(",")+"]"},t}();me=Symbol.toStringTag;var xe=function(){function t(t){void 0===t&&(t={}),this.options=t}return t.prototype.serialize=function(t){var r=Buffer.from(t,"utf8").toString("base64");return this.options.urlSafe?this.makeUrlSafe(r):r},t.prototype.deserialize=function(t,r){try{return/^[A-Za-z0-9+/]*={0,2}$/.test(t)?(this.options.urlSafe&&(t=this.makeUrlUnsafe(t)),Buffer.from(t,"base64").toString("utf8")):null!=r?r:""}catch(t){return null!=r?r:""}},t.prototype.makeUrlSafe=function(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},t.prototype.makeUrlUnsafe=function(t){for(t=t.replace(/-/g,"+").replace(/_/g,"/");t.length%4;)t+="=";return t},t}(),je=function(){function t(t,r){void 0===r&&(r=new Se),this.storage=t,this.serializer=r,this.store={}}return Object.defineProperty(t.prototype,"length",{get:function(){return this.storage?this.storage.length:Object.keys(this.store).length},enumerable:!1,configurable:!0}),t.prototype.setItem=function(t,r,n){var e={key:t,value:r,expire:n};"number"==typeof n&&n>0&&(e.expire=n);var o=this.serializer.serialize(e);this.storage?this.storage.setItem(t,o):this.store[t]=o},t.prototype.getItem=function(t,r){var n,e=this.storage?this.storage.getItem(t):this.store[t],o=null!=r?r:null;if(!e)return o;var i=this.serializer.deserialize(e,o);return"object"==typeof i?"number"==typeof i.expire&&i.expire<Date.now()?(this.removeItem(t),o):null!==(n=null==i?void 0:i.value)&&void 0!==n?n:o:o},t.prototype.removeItem=function(t){this.storage?this.storage.removeItem(t):delete this.store[t]},t.prototype.clear=function(){this.storage?this.storage.clear():this.store={}},t}();t.AsyncExecutor=y,t.Base64Serializer=xe,t.Executor=r,t.ExecutorError=c,t.FetchAbortPlugin=we,t.FetchURLPlugin=Ne,t.JSONSerializer=Se,t.JSONStorage=je,t.LEVELS=ft,t.Logger=lt,t.RequestAdapterAxios=Ee,t.RequestAdapterFetch=Oe,t.RequestError=f,t.RequestScheduler=ke,t.RetryPlugin=m,t.SyncExecutor=d}));
|
|
1
|
+
!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((t="undefined"!=typeof globalThis?globalThis:t||self).FeUtilsCommon={})}(this,(function(t){"use strict";var r=function(){function t(t){this.config=t,this.plugins=[]}return t.prototype.use=function(t){this.plugins.find((function(r){return r===t||r.pluginName===t.pluginName||r.constructor===t.constructor}))&&t.onlyOne?console.warn("Plugin ".concat(t.pluginName," is already used, skip adding")):this.plugins.push(t)},t}(),n=function(t,r){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])},n(t,r)};function e(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function e(){this.constructor=t}n(t,r),t.prototype=null===r?Object.create(r):(e.prototype=r.prototype,new e)}var o=function(){return o=Object.assign||function(t){for(var r,n=1,e=arguments.length;n<e;n++)for(var o in r=arguments[n])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t},o.apply(this,arguments)};function i(t,r,n,e){return new(n||(n=Promise))((function(o,i){function u(t){try{a(e.next(t))}catch(t){i(t)}}function s(t){try{a(e.throw(t))}catch(t){i(t)}}function a(t){var r;t.done?o(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(u,s)}a((e=e.apply(t,r||[])).next())}))}function u(t,r){var n,e,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return u.next=s(0),u.throw=s(1),u.return=s(2),"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function s(s){return function(a){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;u&&(u=0,s[0]&&(i=0)),i;)try{if(n=1,e&&(o=2&s[0]?e.return:s[0]?e.throw||((o=e.return)&&o.call(e),0):e.next)&&!(o=o.call(e,s[1])).done)return o;switch(e=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,e=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=r.call(t,i)}catch(t){s=[6,t],e=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,a])}}}function s(t,r,n){if(n||2===arguments.length)for(var e,o=0,i=r.length;o<i;o++)!e&&o in r||(e||(e=Array.prototype.slice.call(r,0,o)),e[o]=r[o]);return t.concat(e||Array.prototype.slice.call(r))}"function"==typeof SuppressedError&&SuppressedError;var a,c=function(t){function r(r,n){var e=this.constructor,o=t.call(this,n instanceof Error?n.message:n||r)||this;return o.id=r,n instanceof Error&&"stack"in n&&(o.stack=n.stack),Object.setPrototypeOf(o,e.prototype),o}return e(r,t),r}(Error),f=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r}(c);t.RequestErrorID=void 0,(a=t.RequestErrorID||(t.RequestErrorID={})).REQUEST_ERROR="REQUEST_ERROR",a.ENV_FETCH_NOT_SUPPORT="ENV_FETCH_NOT_SUPPORT",a.FETCHER_NONE="FETCHER_NONE",a.RESPONSE_NOT_OK="RESPONSE_NOT_OK",a.ABORT_ERROR="ABORT_ERROR",a.URL_NONE="URL_NONE";var p,l,h,v,y=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.runHooks=function(t,r,n){for(var e=[],o=3;o<arguments.length;o++)e[o-3]=arguments[o];return i(this,void 0,void 0,(function(){var o,i,a,c,f,p,l,h;return u(this,(function(u){switch(u.label){case 0:o=-1,(a=n||{parameters:void 0,hooksRuntimes:{}}).hooksRuntimes.times=0,a.hooksRuntimes.index=void 0,c=0,f=t,u.label=1;case 1:return c<f.length?(p=f[c],o++,"function"!=typeof p[r]||"function"==typeof p.enabled&&!p.enabled(r,n)?[3,3]:(null===(h=a.hooksRuntimes)||void 0===h?void 0:h.breakChain)?[3,4]:(a.hooksRuntimes.pluginName=p.pluginName,a.hooksRuntimes.hookName=r,a.hooksRuntimes.times++,a.hooksRuntimes.index=o,[4,p[r].apply(p,s([n],e,!1))])):[3,4];case 2:if(void 0!==(l=u.sent())&&(i=l,a.hooksRuntimes.returnValue=l,a.hooksRuntimes.returnBreakChain))return[2,i];u.label=3;case 3:return c++,[3,1];case 4:return[2,i]}}))}))},r.prototype.execNoError=function(t,r){return i(this,void 0,void 0,(function(){var n;return u(this,(function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.exec(t,r)];case 1:return[2,e.sent()];case 2:return(n=e.sent())instanceof c?[2,n]:[2,new c("UNKNOWN_ASYNC_ERROR",n)];case 3:return[2]}}))}))},r.prototype.exec=function(t,r){var n=r||t,e=r?t:void 0;if("function"!=typeof n)throw new Error("Task must be a async function!");return this.run(e,n)},r.prototype.run=function(t,r){return i(this,void 0,void 0,(function(){var n,e,o,s=this;return u(this,(function(a){switch(a.label){case 0:n={parameters:t,returnValue:void 0,error:void 0,hooksRuntimes:{pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0}},e=function(t){return i(s,void 0,void 0,(function(){var n;return u(this,(function(e){switch(e.label){case 0:return[4,this.runHooks(this.plugins,"onExec",t,r)];case 1:return e.sent(),0!==t.hooksRuntimes.times?[3,3]:(n=t,[4,r(t)]);case 2:return n.returnValue=e.sent(),[2];case 3:return t.returnValue=t.hooksRuntimes.returnValue,[2]}}))}))},a.label=1;case 1:return a.trys.push([1,5,7,8]),[4,this.runHooks(this.plugins,"onBefore",n)];case 2:return a.sent(),[4,e(n)];case 3:return a.sent(),[4,this.runHooks(this.plugins,"onSuccess",n)];case 4:return a.sent(),[2,n.returnValue];case 5:return o=a.sent(),n.error=o,[4,this.runHooks(this.plugins,"onError",n)];case 6:if(a.sent(),n.hooksRuntimes.returnValue&&(n.error=n.hooksRuntimes.returnValue),n.error instanceof c)throw n.error;throw new c("UNKNOWN_ASYNC_ERROR",n.error);case 7:return n.hooksRuntimes={pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0},[7];case 8:return[2]}}))}))},r}(r),d=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.runHooks=function(t,r,n){for(var e,o=[],i=3;i<arguments.length;i++)o[i-3]=arguments[i];var u,a=-1,c=n||{parameters:void 0,hooksRuntimes:{}};c.hooksRuntimes.times=0,c.hooksRuntimes.index=void 0;for(var f=0,p=t;f<p.length;f++){var l=p[f];if(a++,"function"==typeof l[r]&&("function"!=typeof l.enabled||l.enabled(r,c))){if(null===(e=c.hooksRuntimes)||void 0===e?void 0:e.breakChain)break;c.hooksRuntimes.pluginName=l.pluginName,c.hooksRuntimes.hookName=r,c.hooksRuntimes.times++,c.hooksRuntimes.index=a;var h=l[r].apply(l,s([n],o,!1));if(void 0!==h&&(u=h,c.hooksRuntimes.returnValue=h,c.hooksRuntimes.returnBreakChain))return u}}return u},r.prototype.execNoError=function(t,r){try{return this.exec(t,r)}catch(t){return t instanceof c?t:new c("UNKNOWN_SYNC_ERROR",t)}},r.prototype.exec=function(t,r){var n=r||t,e=r?t:void 0;if("function"!=typeof n)throw new Error("Task must be a function!");return this.run(e,n)},r.prototype.run=function(t,r){var n,e=this,o={parameters:t,returnValue:void 0,error:void 0,hooksRuntimes:{pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0}};try{return this.runHooks(this.plugins,"onBefore",o),n=o,e.runHooks(e.plugins,"onExec",n,r),n.returnValue=n.hooksRuntimes.times?n.hooksRuntimes.returnValue:r(n),this.runHooks(this.plugins,"onSuccess",o),o.returnValue}catch(t){if(o.error=t,this.runHooks(this.plugins,"onError",o),o.hooksRuntimes.returnValue&&(o.error=o.hooksRuntimes.returnValue),o.error instanceof c)throw o.error;throw new c("UNKNOWN_SYNC_ERROR",o.error)}finally{o.hooksRuntimes={pluginName:"",hookName:"",returnValue:void 0,returnBreakChain:!1,times:0}}},r}(r),g=function(){return!0},b=function(){function t(t){var r;void 0===t&&(t={}),this.pluginName="RetryPlugin",this.onlyOne=!0,this.options=o(o({retryDelay:1e3,useExponentialBackoff:!1,shouldRetry:g},t),{maxRetries:Math.min(Math.max(1,null!==(r=t.maxRetries)&&void 0!==r?r:3),16)})}return t.prototype.delay=function(t){return i(this,void 0,void 0,(function(){var r;return u(this,(function(n){return r=this.options.useExponentialBackoff?this.options.retryDelay*Math.pow(2,t):this.options.retryDelay,[2,new Promise((function(t){return setTimeout(t,r)}))]}))}))},t.prototype.onExec=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return this.options.maxRetries<1?[2,r(t)]:[2,this.retry(r,t,this.options,this.options.maxRetries)]}))}))},t.prototype.shouldRetry=function(t){var r=t.error;return t.retryCount>0&&this.options.shouldRetry(r)},t.prototype.retry=function(t,r,n,e){return i(this,void 0,void 0,(function(){var o;return u(this,(function(i){switch(i.label){case 0:return i.trys.push([0,2,,4]),[4,t(r)];case 1:return[2,i.sent()];case 2:if(o=i.sent(),!this.shouldRetry({error:o,retryCount:e}))throw new c("RETRY_ERROR","All ".concat(n.maxRetries," attempts failed: ").concat(o.message));return[4,this.delay(n.maxRetries-e)];case 3:return i.sent(),e--,[2,this.retry(t,r,n,e)];case 4:return[2]}}))}))},t}(),m="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function _(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var R,O,E=_(v?h:(v=1,h=l?p:(l=1,p=function(t){return t&&t.length?t[0]:void 0})));var w,j,x,N,k,S,A,T,P,q,C,U,I,z,D,B,F,V,H,L,G=_(O?R:(O=1,R=function(t){var r=null==t?0:t.length;return r?t[r-1]:void 0}));function W(){if(j)return w;j=1;var t="object"==typeof m&&m&&m.Object===Object&&m;return w=t}function $(){if(N)return x;N=1;var t=W(),r="object"==typeof self&&self&&self.Object===Object&&self,n=t||r||Function("return this")();return x=n}function K(){if(S)return k;S=1;var t=$().Symbol;return k=t}function M(){if(U)return C;U=1;var t=K(),r=function(){if(T)return A;T=1;var t=K(),r=Object.prototype,n=r.hasOwnProperty,e=r.toString,o=t?t.toStringTag:void 0;return A=function(t){var r=n.call(t,o),i=t[o];try{t[o]=void 0;var u=!0}catch(t){}var s=e.call(t);return u&&(r?t[o]=i:delete t[o]),s}}(),n=function(){if(q)return P;q=1;var t=Object.prototype.toString;return P=function(r){return t.call(r)}}(),e=t?t.toStringTag:void 0;return C=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":e&&e in Object(t)?r(t):n(t)}}function J(){if(B)return D;B=1;var t=(z?I:(z=1,I=function(t,r){return function(n){return t(r(n))}}))(Object.getPrototypeOf,Object);return D=t}function Q(){if(V)return F;return V=1,F=function(t){return null!=t&&"object"==typeof t}}function Y(){if(L)return H;L=1;var t=M(),r=J(),n=Q(),e=Function.prototype,o=Object.prototype,i=e.toString,u=o.hasOwnProperty,s=i.call(Object);return H=function(e){if(!n(e)||"[object Object]"!=t(e))return!1;var o=r(e);if(null===o)return!0;var a=u.call(o,"constructor")&&o.constructor;return"function"==typeof a&&a instanceof a&&i.call(a)==s}}var Z,X,tt,rt,nt=_(Y());function et(){if(X)return Z;X=1;var t=Array.isArray;return Z=t}var ot,it,ut=function(){if(rt)return tt;rt=1;var t=M(),r=et(),n=Q();return tt=function(e){return"string"==typeof e||!r(e)&&n(e)&&"[object String]"==t(e)}}(),st=_(ut),at=_(et());function ct(){if(it)return ot;return it=1,ot=function(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)}}var ft,pt=_(ct()),lt={LOG:"LOG",INFO:"INFO",ERROR:"ERROR",WARN:"WARN",DEBUG:"DEBUG"},ht=function(){function t(t){var r=void 0===t?{}:t,n=r.isCI,e=void 0!==n&&n,o=r.dryRun,i=void 0!==o&&o,u=r.debug,s=void 0!==u&&u,a=r.silent,c=void 0!==a&&a;this.isCI=e,this.isDryRun=i,this.isDebug=s,this.isSilent=c}return t.prototype.print=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];this.isSilent||console.log.apply(console,r)},t.prototype.prefix=function(t,r){return t},t.prototype.log=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.print.apply(this,s([lt.LOG],t,!1))},t.prototype.info=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.print.apply(this,s([lt.INFO,this.prefix(lt.INFO)],t,!1))},t.prototype.warn=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.print.apply(this,s([lt.WARN,this.prefix(lt.WARN)],t,!1))},t.prototype.error=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.print.apply(this,s([lt.ERROR,this.prefix(lt.ERROR)],t,!1))},t.prototype.debug=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(this.isDebug){var n=E(t),e=pt(n)?JSON.stringify(n):String(n);this.print.apply(this,s([lt.DEBUG,this.prefix(lt.DEBUG),e],t.slice(1),!1))}},t.prototype.verbose=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.isDebug&&this.print.apply(this,s([lt.DEBUG],t,!1))},t.prototype.exec=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=nt(G(t))?G(t):void 0,e=n||{},o=e.isDryRun,i=e.isExternal;if(o||this.isDryRun){var u=[null==i?"$":"!",t.slice(0,null==n?void 0:-1).map((function(t){return st(t)?t:at(t)?t.join(" "):String(t)})).join(" ")].join(" ").trim();this.log(u)}},t.prototype.obtrusive=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.isCI||this.log(),this.log.apply(this,t),this.isCI||this.log()},t}(),vt={exports:{}};var yt,dt,gt,bt,mt,_t,Rt,Ot,Et,wt,jt,xt,Nt,kt,St,At,Tt,Pt,qt,Ct,Ut,It,zt,Dt,Bt,Ft,Vt,Ht,Lt,Gt,Wt,$t,Kt,Mt,Jt,Qt,Yt,Zt,Xt,tr,rr,nr,er,or,ir,ur,sr,ar,cr,fr,pr,lr,hr,vr,yr,dr,gr,br,mr,_r,Rr,Or,Er,wr,jr,xr,Nr,kr,Sr,Ar,Tr,Pr,qr,Cr,Ur,Ir,zr,Dr,Br,Fr,Vr,Hr,Lr,Gr,Wr,$r,Kr,Mr,Jr,Qr,Yr,Zr,Xr,tn,rn,nn,en,on,un,sn,an,cn,fn,pn,ln,hn,vn,yn,dn,gn,bn,mn,_n,Rn,On,En,wn,jn,xn,Nn,kn,Sn,An,Tn,Pn,qn,Cn,Un,In,zn,Dn,Bn,Fn,Vn,Hn,Ln,Gn=(ft||(ft=1,function(t,r){function n(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.apply(void 0,t)}function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return a(!0===t[0],!1,t)}function o(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return a(!0===t[0],!0,t)}function i(t){if(Array.isArray(t)){for(var r=[],n=0;n<t.length;++n)r.push(i(t[n]));return r}if(u(t)){for(var n in r={},t)r[n]=i(t[n]);return r}return t}function u(t){return t&&"object"==typeof t&&!Array.isArray(t)}function s(t,r){if(!u(t))return r;for(var n in r)"__proto__"!==n&&"constructor"!==n&&"prototype"!==n&&(t[n]=u(t[n])&&u(r[n])?s(t[n],r[n]):r[n]);return t}function a(t,r,n){var e;!t&&u(e=n.shift())||(e={});for(var o=0;o<n.length;++o){var a=n[o];if(u(a))for(var c in a)if("__proto__"!==c&&"constructor"!==c&&"prototype"!==c){var f=t?i(a[c]):a[c];e[c]=r?s(e[c],f):f}}return e}Object.defineProperty(r,"__esModule",{value:!0}),r.isPlainObject=r.clone=r.recursive=r.merge=r.main=void 0,t.exports=r=n,r.default=n,r.main=n,n.clone=i,n.isPlainObject=u,n.recursive=o,r.merge=e,r.recursive=o,r.clone=i,r.isPlainObject=u}(vt,vt.exports)),vt.exports);function Wn(){if(dt)return yt;dt=1;var t=M(),r=Q();return yt=function(n){return"symbol"==typeof n||r(n)&&"[object Symbol]"==t(n)}}function $n(){if(_t)return mt;_t=1;var t=M(),r=ct();return mt=function(n){if(!r(n))return!1;var e=t(n);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}}function Kn(){if(wt)return Et;wt=1;var t,r=function(){if(Ot)return Rt;Ot=1;var t=$()["__core-js_shared__"];return Rt=t}(),n=(t=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return Et=function(t){return!!n&&n in t}}function Mn(){if(kt)return Nt;kt=1;var t=$n(),r=Kn(),n=ct(),e=function(){if(xt)return jt;xt=1;var t=Function.prototype.toString;return jt=function(r){if(null!=r){try{return t.call(r)}catch(t){}try{return r+""}catch(t){}}return""}}(),o=/^\[object .+?Constructor\]$/,i=Function.prototype,u=Object.prototype,s=i.toString,a=u.hasOwnProperty,c=RegExp("^"+s.call(a).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return Nt=function(i){return!(!n(i)||r(i))&&(t(i)?c:o).test(e(i))}}function Jn(){if(Pt)return Tt;Pt=1;var t=Mn(),r=At?St:(At=1,St=function(t,r){return null==t?void 0:t[r]});return Tt=function(n,e){var o=r(n,e);return t(o)?o:void 0}}function Qn(){if(Ct)return qt;Ct=1;var t=Jn()(Object,"create");return qt=t}function Yn(){if($t)return Wt;$t=1;var t=function(){if(It)return Ut;It=1;var t=Qn();return Ut=function(){this.__data__=t?t(null):{},this.size=0}}(),r=Dt?zt:(Dt=1,zt=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}),n=function(){if(Ft)return Bt;Ft=1;var t=Qn(),r=Object.prototype.hasOwnProperty;return Bt=function(n){var e=this.__data__;if(t){var o=e[n];return"__lodash_hash_undefined__"===o?void 0:o}return r.call(e,n)?e[n]:void 0}}(),e=function(){if(Ht)return Vt;Ht=1;var t=Qn(),r=Object.prototype.hasOwnProperty;return Vt=function(n){var e=this.__data__;return t?void 0!==e[n]:r.call(e,n)}}(),o=function(){if(Gt)return Lt;Gt=1;var t=Qn();return Lt=function(r,n){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=t&&void 0===n?"__lodash_hash_undefined__":n,this}}();function i(t){var r=-1,n=null==t?0:t.length;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=n,i.prototype.has=e,i.prototype.set=o,Wt=i}function Zn(){if(Qt)return Jt;return Qt=1,Jt=function(t,r){return t===r||t!=t&&r!=r}}function Xn(){if(Zt)return Yt;Zt=1;var t=Zn();return Yt=function(r,n){for(var e=r.length;e--;)if(t(r[e][0],n))return e;return-1}}function te(){if(ar)return sr;ar=1;var t=Mt?Kt:(Mt=1,Kt=function(){this.__data__=[],this.size=0}),r=function(){if(tr)return Xt;tr=1;var t=Xn(),r=Array.prototype.splice;return Xt=function(n){var e=this.__data__,o=t(e,n);return!(o<0||(o==e.length-1?e.pop():r.call(e,o,1),--this.size,0))}}(),n=function(){if(nr)return rr;nr=1;var t=Xn();return rr=function(r){var n=this.__data__,e=t(n,r);return e<0?void 0:n[e][1]}}(),e=function(){if(or)return er;or=1;var t=Xn();return er=function(r){return t(this.__data__,r)>-1}}(),o=function(){if(ur)return ir;ur=1;var t=Xn();return ir=function(r,n){var e=this.__data__,o=t(e,r);return o<0?(++this.size,e.push([r,n])):e[o][1]=n,this}}();function i(t){var r=-1,n=null==t?0:t.length;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=n,i.prototype.has=e,i.prototype.set=o,sr=i}function re(){if(fr)return cr;fr=1;var t=Jn()($(),"Map");return cr=t}function ne(){if(dr)return yr;dr=1;var t=vr?hr:(vr=1,hr=function(t){var r=typeof t;return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t});return yr=function(r,n){var e=r.__data__;return t(n)?e["string"==typeof n?"string":"hash"]:e.map}}function ee(){if(xr)return jr;xr=1;var t=function(){if(lr)return pr;lr=1;var t=Yn(),r=te(),n=re();return pr=function(){this.size=0,this.__data__={hash:new t,map:new(n||r),string:new t}}}(),r=function(){if(br)return gr;br=1;var t=ne();return gr=function(r){var n=t(this,r).delete(r);return this.size-=n?1:0,n}}(),n=function(){if(_r)return mr;_r=1;var t=ne();return mr=function(r){return t(this,r).get(r)}}(),e=function(){if(Or)return Rr;Or=1;var t=ne();return Rr=function(r){return t(this,r).has(r)}}(),o=function(){if(wr)return Er;wr=1;var t=ne();return Er=function(r,n){var e=t(this,r),o=e.size;return e.set(r,n),this.size+=e.size==o?0:1,this}}();function i(t){var r=-1,n=null==t?0:t.length;for(this.clear();++r<n;){var e=t[r];this.set(e[0],e[1])}}return i.prototype.clear=t,i.prototype.delete=r,i.prototype.get=n,i.prototype.has=e,i.prototype.set=o,jr=i}function oe(){if(Ar)return Sr;Ar=1;var t=function(){if(kr)return Nr;kr=1;var t=ee();function r(n,e){if("function"!=typeof n||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var o=function(){var t=arguments,r=e?e.apply(this,t):t[0],i=o.cache;if(i.has(r))return i.get(r);var u=n.apply(this,t);return o.cache=i.set(r,u)||i,u};return o.cache=new(r.Cache||t),o}return r.Cache=t,Nr=r}();return Sr=function(r){var n=t(r,(function(t){return 500===e.size&&e.clear(),t})),e=n.cache;return n}}function ie(){if(Ir)return Ur;Ir=1;var t=K(),r=Cr?qr:(Cr=1,qr=function(t,r){for(var n=-1,e=null==t?0:t.length,o=Array(e);++n<e;)o[n]=r(t[n],n,t);return o}),n=et(),e=Wn(),o=t?t.prototype:void 0,i=o?o.toString:void 0;return Ur=function t(o){if("string"==typeof o)return o;if(n(o))return r(o,t)+"";if(e(o))return i?i.call(o):"";var u=o+"";return"0"==u&&1/o==-1/0?"-0":u},Ur}function ue(){if(Fr)return Br;Fr=1;var t=et(),r=function(){if(bt)return gt;bt=1;var t=et(),r=Wn(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,e=/^\w*$/;return gt=function(o,i){if(t(o))return!1;var u=typeof o;return!("number"!=u&&"symbol"!=u&&"boolean"!=u&&null!=o&&!r(o))||e.test(o)||!n.test(o)||null!=i&&o in Object(i)}}(),n=function(){if(Pr)return Tr;Pr=1;var t=oe(),r=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,e=t((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(r,(function(t,r,o,i){e.push(o?i.replace(n,"$1"):r||t)})),e}));return Tr=e}(),e=function(){if(Dr)return zr;Dr=1;var t=ie();return zr=function(r){return null==r?"":t(r)}}();return Br=function(o,i){return t(o)?o:r(o,i)?[o]:n(e(o))}}function se(){if(Hr)return Vr;Hr=1;var t=Wn();return Vr=function(r){if("string"==typeof r||t(r))return r;var n=r+"";return"0"==n&&1/r==-1/0?"-0":n}}function ae(){if($r)return Wr;$r=1;var t=Jn(),r=function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch(t){}}();return Wr=r}function ce(){if(Mr)return Kr;Mr=1;var t=ae();return Kr=function(r,n,e){"__proto__"==n&&t?t(r,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[n]=e}}function fe(){if(Qr)return Jr;Qr=1;var t=ce(),r=Zn(),n=Object.prototype.hasOwnProperty;return Jr=function(e,o,i){var u=e[o];n.call(e,o)&&r(u,i)&&(void 0!==i||o in e)||t(e,o,i)}}function pe(){if(Zr)return Yr;Zr=1;var t=/^(?:0|[1-9]\d*)$/;return Yr=function(r,n){var e=typeof r;return!!(n=null==n?9007199254740991:n)&&("number"==e||"symbol"!=e&&t.test(r))&&r>-1&&r%1==0&&r<n}}function le(){if(nn)return rn;nn=1;var t=function(){if(Gr)return Lr;Gr=1;var t=ue(),r=se();return Lr=function(n,e){for(var o=0,i=(e=t(e,n)).length;null!=n&&o<i;)n=n[r(e[o++])];return o&&o==i?n:void 0}}(),r=function(){if(tn)return Xr;tn=1;var t=fe(),r=ue(),n=pe(),e=ct(),o=se();return Xr=function(i,u,s,a){if(!e(i))return i;for(var c=-1,f=(u=r(u,i)).length,p=f-1,l=i;null!=l&&++c<f;){var h=o(u[c]),v=s;if("__proto__"===h||"constructor"===h||"prototype"===h)return i;if(c!=p){var y=l[h];void 0===(v=a?a(y,h,l):void 0)&&(v=e(y)?y:n(u[c+1])?[]:{})}t(l,h,v),l=l[h]}return i}}(),n=ue();return rn=function(e,o,i){for(var u=-1,s=o.length,a={};++u<s;){var c=o[u],f=t(e,c);i(f,c)&&r(a,n(c,e),f)}return a}}function he(){if(cn)return an;cn=1;var t=function(){if(sn)return un;sn=1;var t=M(),r=Q();return un=function(n){return r(n)&&"[object Arguments]"==t(n)}}(),r=Q(),n=Object.prototype,e=n.hasOwnProperty,o=n.propertyIsEnumerable,i=t(function(){return arguments}())?t:function(t){return r(t)&&e.call(t,"callee")&&!o.call(t,"callee")};return an=i}function ve(){if(pn)return fn;pn=1;return fn=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}}function ye(){if(yn)return vn;yn=1;var t=on?en:(on=1,en=function(t,r){return null!=t&&r in Object(t)}),r=function(){if(hn)return ln;hn=1;var t=ue(),r=he(),n=et(),e=pe(),o=ve(),i=se();return ln=function(u,s,a){for(var c=-1,f=(s=t(s,u)).length,p=!1;++c<f;){var l=i(s[c]);if(!(p=null!=u&&a(u,l)))break;u=u[l]}return p||++c!=f?p:!!(f=null==u?0:u.length)&&o(f)&&e(l,f)&&(n(u)||r(u))}}();return vn=function(n,e){return null!=n&&r(n,e,t)}}function de(){if(En)return On;En=1;var t=mn?bn:(mn=1,bn=function(t,r){for(var n=-1,e=r.length,o=t.length;++n<e;)t[o+n]=r[n];return t}),r=function(){if(Rn)return _n;Rn=1;var t=K(),r=he(),n=et(),e=t?t.isConcatSpreadable:void 0;return _n=function(t){return n(t)||r(t)||!!(e&&t&&t[e])}}();return On=function n(e,o,i,u,s){var a=-1,c=e.length;for(i||(i=r),s||(s=[]);++a<c;){var f=e[a];o>0&&i(f)?o>1?n(f,o-1,i,u,s):t(s,f):u||(s[s.length]=f)}return s},On}function ge(){if(Sn)return kn;Sn=1;var t=Nn?xn:(Nn=1,xn=function(t,r,n){switch(n.length){case 0:return t.call(r);case 1:return t.call(r,n[0]);case 2:return t.call(r,n[0],n[1]);case 3:return t.call(r,n[0],n[1],n[2])}return t.apply(r,n)}),r=Math.max;return kn=function(n,e,o){return e=r(void 0===e?n.length-1:e,0),function(){for(var i=arguments,u=-1,s=r(i.length-e,0),a=Array(s);++u<s;)a[u]=i[e+u];u=-1;for(var c=Array(e+1);++u<e;)c[u]=i[u];return c[e]=o(a),t(n,this,c)}},kn}function be(){if(qn)return Pn;return qn=1,Pn=function(t){return t}}function me(){if(Un)return Cn;Un=1;var t=Tn?An:(Tn=1,An=function(t){return function(){return t}}),r=ae(),n=be();return Cn=r?function(n,e){return r(n,"toString",{configurable:!0,enumerable:!1,value:t(e),writable:!0})}:n}function _e(){if(Bn)return Dn;Bn=1;var t=me(),r=function(){if(zn)return In;zn=1;var t=Date.now;return In=function(r){var n=0,e=0;return function(){var o=t(),i=16-(o-e);if(e=o,i>0){if(++n>=800)return arguments[0]}else n=0;return r.apply(void 0,arguments)}},In}(),n=r(t);return Dn=n}function Re(){if(Vn)return Fn;Vn=1;var t=function(){if(jn)return wn;jn=1;var t=de();return wn=function(r){return null!=r&&r.length?t(r,1):[]}}(),r=ge(),n=_e();return Fn=function(e){return n(r(e,void 0,t),e+"")}}var Oe,Ee,we,je,xe,Ne,ke,Se,Ae,Te,Pe,qe,Ce,Ue,Ie,ze,De,Be,Fe=function(){if(Ln)return Hn;Ln=1;var t=function(){if(gn)return dn;gn=1;var t=le(),r=ye();return dn=function(n,e){return t(n,e,(function(t,e){return r(n,e)}))}}(),r=Re()((function(r,n){return null==r?{}:t(r,n)}));return Hn=r}(),Ve=_(Fe),He=["cache","credentials","headers","integrity","keepalive","mode","priority","redirect","referrer","referrerPolicy","signal"],Le=function(){function r(r){if(void 0===r&&(r={}),!r.fetcher){if("function"!=typeof fetch)throw new c(t.RequestErrorID.ENV_FETCH_NOT_SUPPORT);r.fetcher=fetch}this.executor=new y,this.config=r}return r.prototype.getConfig=function(){return this.config},r.prototype.usePlugin=function(t){this.executor.use(t)},r.prototype.request=function(r){return i(this,void 0,void 0,(function(){var n,e,o,s,a,f=this;return u(this,(function(p){if(n=this.getConfig(),e=Gn.merge({},n,r),o=e.fetcher,s=function(t,r){var n={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.indexOf(e)<0&&(n[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(e=Object.getOwnPropertySymbols(t);o<e.length;o++)r.indexOf(e[o])<0&&Object.prototype.propertyIsEnumerable.call(t,e[o])&&(n[e[o]]=t[e[o]])}return n}(e,["fetcher"]),"function"!=typeof o)throw new c(t.RequestErrorID.FETCHER_NONE);if(!s.url)throw new c(t.RequestErrorID.URL_NONE);return a=function(t){return i(f,void 0,void 0,(function(){var r;return u(this,(function(n){switch(n.label){case 0:return[4,o(this.parametersToRequest(t.parameters))];case 1:return r=n.sent(),[2,this.toAdapterResponse(r,r,t.parameters)]}}))}))},[2,this.executor.exec(s,a)]}))}))},r.prototype.parametersToRequest=function(t){var r=t.url,n=void 0===r?"/":r,e=t.method,o=void 0===e?"GET":e,i=t.data,u=Ve(t,He);return new Request(n,Object.assign(u,{body:i,method:o.toUpperCase()}))},r.prototype.toAdapterResponse=function(t,r,n){return{data:t,status:r.status,statusText:r.statusText,headers:this.getResponseHeaders(r),config:n,response:r}},r.prototype.getResponseHeaders=function(t){var r={};return t.headers.forEach((function(t,n){r[n]=t})),r},r}(),Ge=function(){function t(t,r){void 0===r&&(r={}),this.config=r,this.axiosInstance=t.create(r)}return t.prototype.getConfig=function(){return this.config},t.prototype.request=function(t){return i(this,void 0,void 0,(function(){return u(this,(function(r){return[2,this.axiosInstance.request(t)]}))}))},t}(),We=function(){function r(){this.pluginName="FetchAbortPlugin",this.onlyOne=!0,this.controllers=new Map}return r.prototype.generateRequestKey=function(t){if(t.requestId)return t.requestId;var r=t.params?JSON.stringify(t.params):"",n=t.body?JSON.stringify(t.body):"";return"".concat(t.method||"GET","-").concat(t.url,"-").concat(r,"-").concat(n)},r.prototype.onBefore=function(t){var r=this.generateRequestKey(t.parameters);if(this.controllers.has(r)&&this.abort(t.parameters),!t.parameters.signal){var n=new AbortController;this.controllers.set(r,n),t.parameters.signal=n.signal}},r.prototype.onSuccess=function(t){var r=t.parameters;r&&this.controllers.delete(this.generateRequestKey(r))},r.prototype.onError=function(r){var n=r.error,e=r.parameters;if(this.isSameAbortError(n)&&e){var o=this.generateRequestKey(e),i=this.controllers.get(o);return this.controllers.delete(o),new f(t.RequestErrorID.ABORT_ERROR,(null==i?void 0:i.signal.reason)||n)}},r.prototype.isSameAbortError=function(t){return t instanceof Error&&"AbortError"===t.name||(t instanceof DOMException&&"AbortError"===t.name||t instanceof Event&&"abort"===t.type)},r.prototype.abort=function(r){var n="string"==typeof r?r:this.generateRequestKey(r),e=this.controllers.get(n);e&&(e.abort(new f(t.RequestErrorID.ABORT_ERROR,"The operation was aborted")),this.controllers.delete(n),"string"!=typeof r&&"function"==typeof r.onAbort&&r.onAbort.call(r,r))},r.prototype.abortAll=function(){this.controllers.forEach((function(t){return t.abort()})),this.controllers.clear()},r}(),$e=function(){function r(){this.pluginName="FetchURLPlugin"}return r.prototype.isFullURL=function(t){return t.startsWith("http://")||t.startsWith("https://")},r.prototype.appendQueryParams=function(t,r){void 0===r&&(r={});var n=t.split("?"),e=n[0],o=n[1];(void 0===o?"":o).split("&").forEach((function(t){var n=t.split("="),e=n[0],o=n[1];e&&o&&(r[e]=o)}));var i=Object.entries(r).map((function(t){var r=t[0],n=t[1];return"".concat(r,"=").concat(n)})).join("&");return[e,i].join("?")},r.prototype.connectBaseURL=function(t,r){return"".concat(r,"/").concat(t)},r.prototype.buildUrl=function(t){var r=t.url,n=void 0===r?"":r,e=t.baseURL,o=void 0===e?"":e,i=t.params;if(!this.isFullURL(n)){var u=n.startsWith("/")?n.slice(1):n,s=o.endsWith("/")?o.slice(0,-1):o;n=this.connectBaseURL(u,s)}return i&&Object.keys(i).length>0&&(n=this.appendQueryParams(n,i)),n},r.prototype.onBefore=function(t){var r=t.parameters;r.url=this.buildUrl(r)},r.prototype.onSuccess=function(r){var n=r.returnValue;if(!n.response.ok){var e=new f(t.RequestErrorID.RESPONSE_NOT_OK,"Request failed with status: ".concat(n.status," ").concat(n.statusText));throw e.response=n.response,e}},r.prototype.onError=function(r){var n=r.error;return n instanceof f?n:new f(t.RequestErrorID.REQUEST_ERROR,n)},r}();function Ke(){if(qe)return Pe;qe=1;var t=te(),r=function(){if(Ee)return Oe;Ee=1;var t=te();return Oe=function(){this.__data__=new t,this.size=0}}(),n=je?we:(je=1,we=function(t){var r=this.__data__,n=r.delete(t);return this.size=r.size,n}),e=Ne?xe:(Ne=1,xe=function(t){return this.__data__.get(t)}),o=Se?ke:(Se=1,ke=function(t){return this.__data__.has(t)}),i=function(){if(Te)return Ae;Te=1;var t=te(),r=re(),n=ee();return Ae=function(e,o){var i=this.__data__;if(i instanceof t){var u=i.__data__;if(!r||u.length<199)return u.push([e,o]),this.size=++i.size,this;i=this.__data__=new n(u)}return i.set(e,o),this.size=i.size,this}}();function u(r){var n=this.__data__=new t(r);this.size=n.size}return u.prototype.clear=r,u.prototype.delete=n,u.prototype.get=e,u.prototype.has=o,u.prototype.set=i,Pe=u}function Me(){if(Ue)return Ce;Ue=1;var t=ce(),r=Zn();return Ce=function(n,e,o){(void 0!==o&&!r(n[e],o)||void 0===o&&!(e in n))&&t(n,e,o)}}function Je(){if(Be)return De;Be=1;var t=(ze?Ie:(ze=1,Ie=function(t){return function(r,n,e){for(var o=-1,i=Object(r),u=e(r),s=u.length;s--;){var a=u[t?s:++o];if(!1===n(i[a],a,i))break}return r}}))();return De=t}var Qe,Ye,Ze,Xe,to,ro,no,eo,oo,io,uo,so,ao,co,fo,po,lo,ho,vo,yo={exports:{}};function go(){if(to)return Xe;to=1;var t=function(){if(Ze)return Ye;Ze=1;var t=$().Uint8Array;return Ye=t}();return Xe=function(r){var n=new r.constructor(r.byteLength);return new t(n).set(new t(r)),n}}function bo(){if(ao)return so;ao=1;var t=Object.prototype;return so=function(r){var n=r&&r.constructor;return r===("function"==typeof n&&n.prototype||t)}}function mo(){if(fo)return co;fo=1;var t=function(){if(uo)return io;uo=1;var t=ct(),r=Object.create,n=function(){function n(){}return function(e){if(!t(e))return{};if(r)return r(e);n.prototype=e;var o=new n;return n.prototype=void 0,o}}();return io=n}(),r=J(),n=bo();return co=function(e){return"function"!=typeof e.constructor||n(e)?{}:t(r(e))}}function _o(){if(lo)return po;lo=1;var t=$n(),r=ve();return po=function(n){return null!=n&&r(n.length)&&!t(n)}}var Ro,Oo,Eo,wo,jo,xo,No,ko={exports:{}};function So(){return Eo||(Eo=1,function(t,r){var n=$(),e=Oo?Ro:(Oo=1,Ro=function(){return!1}),o=r&&!r.nodeType&&r,i=o&&t&&!t.nodeType&&t,u=i&&i.exports===o?n.Buffer:void 0,s=(u?u.isBuffer:void 0)||e;t.exports=s}(ko,ko.exports)),ko.exports}var Ao,To,Po,qo,Co,Uo,Io,zo,Do,Bo,Fo,Vo,Ho,Lo,Go,Wo,$o,Ko,Mo,Jo,Qo,Yo,Zo,Xo,ti,ri,ni,ei,oi,ii,ui,si={exports:{}};function ai(){if(Po)return To;Po=1;var t=function(){if(jo)return wo;jo=1;var t=M(),r=ve(),n=Q(),e={};return e["[object Float32Array]"]=e["[object Float64Array]"]=e["[object Int8Array]"]=e["[object Int16Array]"]=e["[object Int32Array]"]=e["[object Uint8Array]"]=e["[object Uint8ClampedArray]"]=e["[object Uint16Array]"]=e["[object Uint32Array]"]=!0,e["[object Arguments]"]=e["[object Array]"]=e["[object ArrayBuffer]"]=e["[object Boolean]"]=e["[object DataView]"]=e["[object Date]"]=e["[object Error]"]=e["[object Function]"]=e["[object Map]"]=e["[object Number]"]=e["[object Object]"]=e["[object RegExp]"]=e["[object Set]"]=e["[object String]"]=e["[object WeakMap]"]=!1,wo=function(o){return n(o)&&r(o.length)&&!!e[t(o)]}}(),r=No?xo:(No=1,xo=function(t){return function(r){return t(r)}}),n=(Ao||(Ao=1,function(t,r){var n=W(),e=r&&!r.nodeType&&r,o=e&&t&&!t.nodeType&&t,i=o&&o.exports===e&&n.process,u=function(){try{return o&&o.require&&o.require("util").types||i&&i.binding&&i.binding("util")}catch(t){}}();t.exports=u}(si,si.exports)),si.exports),e=n&&n.isTypedArray,o=e?r(e):t;return To=o}function ci(){if(Co)return qo;return Co=1,qo=function(t,r){if(("constructor"!==r||"function"!=typeof t[r])&&"__proto__"!=r)return t[r]}}function fi(){if(Fo)return Bo;Fo=1;var t=Do?zo:(Do=1,zo=function(t,r){for(var n=-1,e=Array(t);++n<t;)e[n]=r(n);return e}),r=he(),n=et(),e=So(),o=pe(),i=ai(),u=Object.prototype.hasOwnProperty;return Bo=function(s,a){var c=n(s),f=!c&&r(s),p=!c&&!f&&e(s),l=!c&&!f&&!p&&i(s),h=c||f||p||l,v=h?t(s.length,String):[],y=v.length;for(var d in s)!a&&!u.call(s,d)||h&&("length"==d||p&&("offset"==d||"parent"==d)||l&&("buffer"==d||"byteLength"==d||"byteOffset"==d)||o(d,y))||v.push(d);return v}}function pi(){if(Go)return Lo;Go=1;var t=ct(),r=bo(),n=Ho?Vo:(Ho=1,Vo=function(t){var r=[];if(null!=t)for(var n in Object(t))r.push(n);return r}),e=Object.prototype.hasOwnProperty;return Lo=function(o){if(!t(o))return n(o);var i=r(o),u=[];for(var s in o)("constructor"!=s||!i&&e.call(o,s))&&u.push(s);return u}}function li(){if($o)return Wo;$o=1;var t=fi(),r=pi(),n=_o();return Wo=function(e){return n(e)?t(e,!0):r(e)}}function hi(){if(Mo)return Ko;Mo=1;var t=function(){if(Io)return Uo;Io=1;var t=fe(),r=ce();return Uo=function(n,e,o,i){var u=!o;o||(o={});for(var s=-1,a=e.length;++s<a;){var c=e[s],f=i?i(o[c],n[c],c,o,n):void 0;void 0===f&&(f=n[c]),u?r(o,c,f):t(o,c,f)}return o}}(),r=li();return Ko=function(n){return t(n,r(n))}}function vi(){if(Qo)return Jo;Qo=1;var t=Me(),r=(Qe||(Qe=1,function(t,r){var n=$(),e=r&&!r.nodeType&&r,o=e&&t&&!t.nodeType&&t,i=o&&o.exports===e?n.Buffer:void 0,u=i?i.allocUnsafe:void 0;t.exports=function(t,r){if(r)return t.slice();var n=t.length,e=u?u(n):new t.constructor(n);return t.copy(e),e}}(yo,yo.exports)),yo.exports),n=function(){if(no)return ro;no=1;var t=go();return ro=function(r,n){var e=n?t(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.length)}}(),e=oo?eo:(oo=1,eo=function(t,r){var n=-1,e=t.length;for(r||(r=Array(e));++n<e;)r[n]=t[n];return r}),o=mo(),i=he(),u=et(),s=function(){if(vo)return ho;vo=1;var t=_o(),r=Q();return ho=function(n){return r(n)&&t(n)}}(),a=So(),c=$n(),f=ct(),p=Y(),l=ai(),h=ci(),v=hi();return Jo=function(y,d,g,b,m,_,R){var O=h(y,g),E=h(d,g),w=R.get(E);if(w)t(y,g,w);else{var j=_?_(O,E,g+"",y,d,R):void 0,x=void 0===j;if(x){var N=u(E),k=!N&&a(E),S=!N&&!k&&l(E);j=E,N||k||S?u(O)?j=O:s(O)?j=e(O):k?(x=!1,j=r(E,!0)):S?(x=!1,j=n(E,!0)):j=[]:p(E)||i(E)?(j=O,i(O)?j=v(O):f(O)&&!c(O)||(j=o(E))):x=!1}x&&(R.set(E,j),m(j,E,b,_,R),R.delete(E)),t(y,g,j)}}}function yi(){if(oi)return ei;oi=1;var t=function(){if(ti)return Xo;ti=1;var t=be(),r=ge(),n=_e();return Xo=function(e,o){return n(r(e,o,t),e+"")}}(),r=function(){if(ni)return ri;ni=1;var t=Zn(),r=_o(),n=pe(),e=ct();return ri=function(o,i,u){if(!e(u))return!1;var s=typeof i;return!!("number"==s?r(u)&&n(i,u.length):"string"==s&&i in u)&&t(u[i],o)}}();return ei=function(n){return t((function(t,e){var o=-1,i=e.length,u=i>1?e[i-1]:void 0,s=i>2?e[2]:void 0;for(u=n.length>3&&"function"==typeof u?(i--,u):void 0,s&&r(e[0],e[1],s)&&(u=i<3?void 0:u,i=1),t=Object(t);++o<i;){var a=e[o];a&&n(t,a,o,u)}return t}))}}var di,gi=function(){if(ui)return ii;ui=1;var t=function(){if(Zo)return Yo;Zo=1;var t=Ke(),r=Me(),n=Je(),e=vi(),o=ct(),i=li(),u=ci();return Yo=function s(a,c,f,p,l){a!==c&&n(c,(function(n,i){if(l||(l=new t),o(n))e(a,c,i,f,s,p,l);else{var h=p?p(u(a,i),n,i+"",a,c,l):void 0;void 0===h&&(h=n),r(a,i,h)}}),i)},Yo}(),r=yi()((function(r,n,e){t(r,n,e)}));return ii=r}(),bi=_(gi),mi=function(){function t(t,r){void 0===r&&(r=new y),this.adapter=t,this.executor=r}return t.prototype.usePlugin=function(t){var r=this;return Array.isArray(t)?t.forEach((function(t){return r.executor.use(t)})):this.executor.use(t),this},t.prototype.request=function(t){var r=this,n=bi({},this.adapter.getConfig(),t);return this.executor.exec(n,(function(t){return r.adapter.request(t.parameters)}))},t}(),_i=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.request=function(r){return t.prototype.request.call(this,r)},r.prototype.get=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"GET"}))]}))}))},r.prototype.post=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"POST"}))]}))}))},r.prototype.put=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"PUT"}))]}))}))},r.prototype.delete=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"DELETE"}))]}))}))},r.prototype.patch=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"PATCH"}))]}))}))},r.prototype.head=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"HEAD"}))]}))}))},r.prototype.options=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"OPTIONS"}))]}))}))},r.prototype.trace=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"TRACE"}))]}))}))},r.prototype.connect=function(t,r){return i(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request(o(o({url:t},r),{method:"CONNECT"}))]}))}))},r}(mi),Ri=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.prototype.request=function(r){return t.prototype.request.call(this,r)},r.prototype.get=function(t,r){return this.request(o(o({},r),{url:t,method:"GET"}))},r.prototype.post=function(t,r,n){return this.request(o(o({},n),{url:t,method:"POST",data:r}))},r.prototype.put=function(t,r,n){return this.request(o(o({},n),{url:t,method:"PUT",data:r}))},r.prototype.delete=function(t,r){return this.request(o(o({},r),{url:t,method:"DELETE"}))},r.prototype.patch=function(t,r,n){return this.request(o(o({},n),{url:t,method:"PATCH",data:r}))},r}(mi),Oi=function(){function t(t){void 0===t&&(t={}),this.options=t,this[di]="JSONSerializer"}return t.prototype.createReplacer=function(t){return Array.isArray(t)?t:null===t?function(t,r){return"string"==typeof r?r.replace(/\r\n/g,"\n"):r}:"function"==typeof t?function(r,n){var e="string"==typeof n?n.replace(/\r\n/g,"\n"):n;return t.call(this,r,e)}:function(t,r){return"string"==typeof r?r.replace(/\r\n/g,"\n"):r}},t.prototype.stringify=function(t,r,n){try{var e=this.createReplacer(r);return Array.isArray(e)?JSON.stringify(t,e,n):JSON.stringify(t,e,null!=n?n:this.options.pretty?this.options.indent||2:void 0)}catch(t){if(t instanceof TypeError&&t.message.includes("circular"))throw new TypeError("Cannot stringify data with circular references");throw t}},t.prototype.parse=function(t,r){return JSON.parse(t,r)},t.prototype.serialize=function(t){return this.stringify(t,this.options.replacer||null,this.options.pretty?this.options.indent||2:void 0)},t.prototype.deserialize=function(t,r){try{return this.parse(t)}catch(t){return r}},t.prototype.serializeArray=function(t){return"["+t.map((function(t){return JSON.stringify(t)})).join(",")+"]"},t}();di=Symbol.toStringTag;var Ei=function(){function t(t){void 0===t&&(t={}),this.options=t}return t.prototype.serialize=function(t){var r=Buffer.from(t,"utf8").toString("base64");return this.options.urlSafe?this.makeUrlSafe(r):r},t.prototype.deserialize=function(t,r){try{return/^[A-Za-z0-9+/]*={0,2}$/.test(t)?(this.options.urlSafe&&(t=this.makeUrlUnsafe(t)),Buffer.from(t,"base64").toString("utf8")):null!=r?r:""}catch(t){return null!=r?r:""}},t.prototype.makeUrlSafe=function(t){return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},t.prototype.makeUrlUnsafe=function(t){for(t=t.replace(/-/g,"+").replace(/_/g,"/");t.length%4;)t+="=";return t},t}(),wi=function(){function t(t,r){void 0===r&&(r=new Oi),this.storage=t,this.serializer=r,this.store={}}return Object.defineProperty(t.prototype,"length",{get:function(){return this.storage?this.storage.length:Object.keys(this.store).length},enumerable:!1,configurable:!0}),t.prototype.setItem=function(t,r,n){var e={key:t,value:r,expire:n};"number"==typeof n&&n>0&&(e.expire=n);var o=this.serializer.serialize(e);this.storage?this.storage.setItem(t,o):this.store[t]=o},t.prototype.getItem=function(t,r){var n,e=this.storage?this.storage.getItem(t):this.store[t],o=null!=r?r:null;if(!e)return o;var i=this.serializer.deserialize(e,o);return"object"==typeof i?"number"==typeof i.expire&&i.expire<Date.now()?(this.removeItem(t),o):null!==(n=null==i?void 0:i.value)&&void 0!==n?n:o:o},t.prototype.removeItem=function(t){this.storage?this.storage.removeItem(t):delete this.store[t]},t.prototype.clear=function(){this.storage?this.storage.clear():this.store={}},t}();t.AsyncExecutor=y,t.Base64Serializer=Ei,t.Executor=r,t.ExecutorError=c,t.FetchAbortPlugin=We,t.FetchURLPlugin=$e,t.JSONSerializer=Oi,t.JSONStorage=wi,t.LEVELS=lt,t.Logger=ht,t.RequestAdapterAxios=Ge,t.RequestAdapterFetch=Le,t.RequestError=f,t.RequestManager=mi,t.RequestScheduler=_i,t.RequestTransaction=Ri,t.RetryPlugin=b,t.SyncExecutor=d}));
|
|
@@ -549,7 +549,7 @@ declare abstract class Executor<ExecutorConfig = unknown> {
|
|
|
549
549
|
*
|
|
550
550
|
* @since 1.0.14
|
|
551
551
|
*/
|
|
552
|
-
|
|
552
|
+
interface RequestAdapterConfig<RequestData = unknown> {
|
|
553
553
|
/**
|
|
554
554
|
* Request URL path
|
|
555
555
|
* Will be combined with baseURL if provided
|
|
@@ -635,7 +635,7 @@ type RequestAdapterConfig<RequestData = unknown> = {
|
|
|
635
635
|
*/
|
|
636
636
|
requestId?: string;
|
|
637
637
|
[key: string]: any;
|
|
638
|
-
}
|
|
638
|
+
}
|
|
639
639
|
/**
|
|
640
640
|
* Request adapter response
|
|
641
641
|
*
|
|
@@ -645,7 +645,7 @@ type RequestAdapterConfig<RequestData = unknown> = {
|
|
|
645
645
|
* @typeParam Req - The type of the request data.
|
|
646
646
|
* @typeParam Res - The type of the response data.
|
|
647
647
|
*/
|
|
648
|
-
|
|
648
|
+
interface RequestAdapterResponse<Req = unknown, Res = unknown> {
|
|
649
649
|
data: Res;
|
|
650
650
|
status: number;
|
|
651
651
|
statusText: string;
|
|
@@ -655,7 +655,7 @@ type RequestAdapterResponse<Req = unknown, Res = unknown> = {
|
|
|
655
655
|
config: RequestAdapterConfig<Req>;
|
|
656
656
|
response: Response;
|
|
657
657
|
[key: string]: unknown;
|
|
658
|
-
}
|
|
658
|
+
}
|
|
659
659
|
/**
|
|
660
660
|
* Request adapter interface
|
|
661
661
|
*
|
|
@@ -752,6 +752,25 @@ declare enum RequestErrorID {
|
|
|
752
752
|
URL_NONE = "URL_NONE"
|
|
753
753
|
}
|
|
754
754
|
|
|
755
|
+
/**
|
|
756
|
+
* Represents a transaction for a request.
|
|
757
|
+
*
|
|
758
|
+
* This interface defines a transaction that contains a request and a response.
|
|
759
|
+
* It can be used to track the request and response of a transaction.
|
|
760
|
+
*
|
|
761
|
+
* @since 1.2.2
|
|
762
|
+
*/
|
|
763
|
+
interface RequestTransactionInterface<Request, Response> {
|
|
764
|
+
/**
|
|
765
|
+
* The request object
|
|
766
|
+
*/
|
|
767
|
+
request: Request;
|
|
768
|
+
/**
|
|
769
|
+
* The response object
|
|
770
|
+
*/
|
|
771
|
+
response: Response;
|
|
772
|
+
}
|
|
773
|
+
|
|
755
774
|
/**
|
|
756
775
|
* Generic interface for data serialization/deserialization operations
|
|
757
776
|
* Provides a standard contract for implementing serialization strategies
|
|
@@ -925,4 +944,4 @@ type Intersection<T1, T2> = {
|
|
|
925
944
|
};
|
|
926
945
|
|
|
927
946
|
export { Executor, ExecutorError, RequestError, RequestErrorID };
|
|
928
|
-
export type { AsyncStorage, Encryptor, ExecutorContext, ExecutorPlugin, HookRuntimes, Intersection, PromiseTask, RequestAdapterConfig, RequestAdapterInterface, RequestAdapterResponse, Serializer, SyncStorage, SyncTask, Task, ValueOf };
|
|
947
|
+
export type { AsyncStorage, Encryptor, ExecutorContext, ExecutorPlugin, HookRuntimes, Intersection, PromiseTask, RequestAdapterConfig, RequestAdapterInterface, RequestAdapterResponse, RequestTransactionInterface, Serializer, SyncStorage, SyncTask, Task, ValueOf };
|