mazey 3.5.3 → 3.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +141 -132
- package/lib/index.cjs.js +14 -5
- package/lib/index.d.ts +13 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.esm.js +14 -5
- package/lib/mazey.min.js +2 -2
- package/package.json +4 -3
- package/src/index.ts +16 -4
package/README.md
CHANGED
|
@@ -61,28 +61,28 @@ There ara some examples maintained by hand below. For more information, please c
|
|
|
61
61
|
* [loadScript](#loadscript)
|
|
62
62
|
* [loadCSS](#loadcss)
|
|
63
63
|
* [windowLoaded](#windowloaded)
|
|
64
|
-
- [
|
|
64
|
+
- [Util](#util)
|
|
65
|
+
* [isNumber](#isnumber)
|
|
66
|
+
* [generateRndNum](#generaterndnum)
|
|
67
|
+
* [isJsonString](#isjsonstring)
|
|
68
|
+
* [formatDate](#formatdate)
|
|
65
69
|
* [debounce](#debounce)
|
|
66
70
|
* [throttle](#throttle)
|
|
67
|
-
* [isNumber](#isnumber)
|
|
68
71
|
* [camelCaseToKebabCase](#camelcasetokebabcase)
|
|
69
72
|
* [camelCase2Underscore](#camelcase2underscore)
|
|
70
73
|
* [mTrim](#mtrim)
|
|
71
74
|
* [deepCopyObject](#deepcopyobject)
|
|
72
|
-
* [isJsonString](#isjsonstring)
|
|
73
|
-
* [generateRndNum](#generaterndnum)
|
|
74
|
-
* [formatDate](#formatdate)
|
|
75
75
|
* [isValidData](#isvaliddata)
|
|
76
76
|
- [DOM](#dom)
|
|
77
|
-
* [Class](#class)
|
|
78
77
|
* [addStyle](#addstyle)
|
|
79
78
|
* [newLine](#newline)
|
|
79
|
+
* [Class](#class)
|
|
80
80
|
- [URL](#url)
|
|
81
81
|
* [getQueryParam](#getqueryparam)
|
|
82
82
|
* [getUrlParam](#geturlparam)
|
|
83
|
-
* [updateQueryParam](#updatequeryparam)
|
|
84
83
|
* [getHashQueryParam](#gethashqueryparam)
|
|
85
84
|
* [getDomain](#getdomain)
|
|
85
|
+
* [updateQueryParam](#updatequeryparam)
|
|
86
86
|
- [Cache Data](#cache-data)
|
|
87
87
|
* [Storage](#storage)
|
|
88
88
|
* [Cookie](#cookie)
|
|
@@ -134,7 +134,8 @@ loadScript(
|
|
|
134
134
|
@param {function} options.callback -- 加载后回调函数
|
|
135
135
|
@param {number} options.timeout -- 超时时长
|
|
136
136
|
@param {boolean} options.isDefer -- 是否添加 defer 标签
|
|
137
|
-
@returns {Promise<boolean>} -- true 成功
|
|
137
|
+
@returns {Promise<boolean>} -- true 成功
|
|
138
|
+
@category Load Resource -->
|
|
138
139
|
|
|
139
140
|
#### loadCSS
|
|
140
141
|
|
|
@@ -163,7 +164,8 @@ loadCSS(
|
|
|
163
164
|
|
|
164
165
|
<!-- @param {string} url -- css资源路径
|
|
165
166
|
@param {string} options.id -- link标签id
|
|
166
|
-
@returns {Promise<boolean>} true -- 加载成功
|
|
167
|
+
@returns {Promise<boolean>} true -- 加载成功
|
|
168
|
+
@category Load Resource -->
|
|
167
169
|
|
|
168
170
|
#### windowLoaded
|
|
169
171
|
|
|
@@ -182,9 +184,87 @@ windowLoaded(30) // second
|
|
|
182
184
|
```
|
|
183
185
|
|
|
184
186
|
<!-- @param {number} timeout 超时时间 / 单位:秒
|
|
185
|
-
@returns {Promise<string>} document is loaded? 'complete' 'load' / 'timeout'
|
|
187
|
+
@returns {Promise<string>} document is loaded? 'complete' 'load' / 'timeout'
|
|
188
|
+
@category Load Resource -->
|
|
189
|
+
|
|
190
|
+
### Util
|
|
191
|
+
|
|
192
|
+
#### isNumber
|
|
193
|
+
|
|
194
|
+
Check whether it is a right number.
|
|
195
|
+
|
|
196
|
+
<!-- ZH: 判断是否有效数字 -->
|
|
197
|
+
|
|
198
|
+
```
|
|
199
|
+
isNumber(123); // true
|
|
200
|
+
isNumber('123'); // false
|
|
201
|
+
// Default: NaN, Infinity is not Number
|
|
202
|
+
isNumber(Infinity); // false
|
|
203
|
+
isNumber(Infinity, { isUnFiniteAsNumber: true }); // true
|
|
204
|
+
isNumber(NaN); // false
|
|
205
|
+
isNumber(NaN, { isNaNAsNumber: true, isUnFiniteAsNumber: true }); // true
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
<!-- @param {*} num 被判断的值
|
|
209
|
+
@param {boolean} options.isNaNAsNumber 是否 NaN 算数字(默认不算)
|
|
210
|
+
@param {boolean} options.isUnFiniteAsNumber 是否 无限 算数字(默认不算)
|
|
211
|
+
@returns {boolean} true 是数字 -->
|
|
212
|
+
|
|
213
|
+
#### generateRndNum
|
|
214
|
+
|
|
215
|
+
Produce a random string of number, `generateRndNum(7)` => '7658495'.
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
generateRndNum(4); // '9730'
|
|
219
|
+
generateRndNum(7); // '2262490'
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
#### isJsonString
|
|
223
|
+
|
|
224
|
+
Check whether it is a valid JSON string.
|
|
225
|
+
|
|
226
|
+
Usage:
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
isJsonString(`['a', 'b', 'c']`);
|
|
230
|
+
isJsonString(`["a", "b", "c"]`);
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Output:
|
|
234
|
+
|
|
235
|
+
```
|
|
236
|
+
false
|
|
237
|
+
true
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
<!-- @param {string} str The string to check.
|
|
241
|
+
@returns {boolean} Return the result of checking. -->
|
|
242
|
+
|
|
243
|
+
#### formatDate
|
|
244
|
+
|
|
245
|
+
Return the formatted date string in the given format.
|
|
246
|
+
|
|
247
|
+
Usage:
|
|
248
|
+
|
|
249
|
+
```
|
|
250
|
+
console.log('Default formatDate value:', formatDate());
|
|
251
|
+
console.log('String formatDate value:', formatDate('Tue Jan 11 2022 14:12:26 GMT+0800 (China Standard Time)', 'yyyy-MM-dd hh:mm:ss'));
|
|
252
|
+
console.log('Number formatDate value:', formatDate(1641881235000, 'yyyy-MM-dd hh:mm:ss'));
|
|
253
|
+
console.log('Date formatDate value:', formatDate(new Date(2014, 1, 11), 'MM/dd/yyyy'));
|
|
254
|
+
```
|
|
186
255
|
|
|
187
|
-
|
|
256
|
+
Output:
|
|
257
|
+
|
|
258
|
+
```
|
|
259
|
+
Default formatDate value: 2023-01-11
|
|
260
|
+
String formatDate value: 2022-01-11 14:12:26
|
|
261
|
+
Number formatDate value: 2022-01-11 14:07:15
|
|
262
|
+
Date formatDate value: 02/11/2014
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
<!-- @param {Date|number|string} dateIns Original Date
|
|
266
|
+
@param {string} format Format String
|
|
267
|
+
@returns {string} Return the formatted date string. -->
|
|
188
268
|
|
|
189
269
|
#### debounce
|
|
190
270
|
|
|
@@ -212,27 +292,6 @@ const foo = throttle(() => {
|
|
|
212
292
|
|
|
213
293
|
Reference: [Lodash](https://lodash.com/docs/4.17.15#throttle)
|
|
214
294
|
|
|
215
|
-
#### isNumber
|
|
216
|
-
|
|
217
|
-
Check whether it is a right number.
|
|
218
|
-
|
|
219
|
-
<!-- ZH: 判断是否有效数字 -->
|
|
220
|
-
|
|
221
|
-
```
|
|
222
|
-
isNumber(123); // true
|
|
223
|
-
isNumber('123'); // false
|
|
224
|
-
// Default: NaN, Infinity is not Number
|
|
225
|
-
isNumber(Infinity); // false
|
|
226
|
-
isNumber(Infinity, { isUnFiniteAsNumber: true }); // true
|
|
227
|
-
isNumber(NaN); // false
|
|
228
|
-
isNumber(NaN, { isNaNAsNumber: true, isUnFiniteAsNumber: true }); // true
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
<!-- @param {*} num 被判断的值
|
|
232
|
-
@param {boolean} options.isNaNAsNumber 是否 NaN 算数字(默认不算)
|
|
233
|
-
@param {boolean} options.isUnFiniteAsNumber 是否 无限 算数字(默认不算)
|
|
234
|
-
@returns {boolean} true 是数字 -->
|
|
235
|
-
|
|
236
295
|
#### camelCaseToKebabCase
|
|
237
296
|
|
|
238
297
|
Transfer CamelCase to KebabCase.
|
|
@@ -290,62 +349,6 @@ Output:
|
|
|
290
349
|
<!-- @param {object} obj The value to clone.
|
|
291
350
|
@returns {object} Returns the deep cloned value. -->
|
|
292
351
|
|
|
293
|
-
#### isJsonString
|
|
294
|
-
|
|
295
|
-
Check whether it is a valid JSON string.
|
|
296
|
-
|
|
297
|
-
Usage:
|
|
298
|
-
|
|
299
|
-
```
|
|
300
|
-
isJsonString(`['a', 'b', 'c']`);
|
|
301
|
-
isJsonString(`["a", "b", "c"]`);
|
|
302
|
-
```
|
|
303
|
-
|
|
304
|
-
Output:
|
|
305
|
-
|
|
306
|
-
```
|
|
307
|
-
false
|
|
308
|
-
true
|
|
309
|
-
```
|
|
310
|
-
|
|
311
|
-
<!-- @param {string} str The string to check.
|
|
312
|
-
@returns {boolean} Return the result of checking. -->
|
|
313
|
-
|
|
314
|
-
#### generateRndNum
|
|
315
|
-
|
|
316
|
-
Produce a random string of number, `generateRndNum(7)` => '7658495'.
|
|
317
|
-
|
|
318
|
-
```
|
|
319
|
-
generateRndNum(4); // '9730'
|
|
320
|
-
generateRndNum(7); // '2262490'
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
#### formatDate
|
|
324
|
-
|
|
325
|
-
Return the formatted date string in the given format.
|
|
326
|
-
|
|
327
|
-
Usage:
|
|
328
|
-
|
|
329
|
-
```
|
|
330
|
-
console.log('Default formatDate value:', formatDate());
|
|
331
|
-
console.log('String formatDate value:', formatDate('Tue Jan 11 2022 14:12:26 GMT+0800 (China Standard Time)', 'yyyy-MM-dd hh:mm:ss'));
|
|
332
|
-
console.log('Number formatDate value:', formatDate(1641881235000, 'yyyy-MM-dd hh:mm:ss'));
|
|
333
|
-
console.log('Date formatDate value:', formatDate(new Date(2014, 1, 11), 'MM/dd/yyyy'));
|
|
334
|
-
```
|
|
335
|
-
|
|
336
|
-
Output:
|
|
337
|
-
|
|
338
|
-
```
|
|
339
|
-
Default formatDate value: 2023-01-11
|
|
340
|
-
String formatDate value: 2022-01-11 14:12:26
|
|
341
|
-
Number formatDate value: 2022-01-11 14:07:15
|
|
342
|
-
Date formatDate value: 02/11/2014
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
<!-- @param {Date|number|string} dateIns Original Date
|
|
346
|
-
@param {string} format Format String
|
|
347
|
-
@returns {string} Return the formatted date string. -->
|
|
348
|
-
|
|
349
352
|
#### isValidData
|
|
350
353
|
|
|
351
354
|
Determine the validity of the data.
|
|
@@ -385,21 +388,6 @@ isValidDataResC: false
|
|
|
385
388
|
|
|
386
389
|
### DOM
|
|
387
390
|
|
|
388
|
-
#### Class
|
|
389
|
-
|
|
390
|
-
Modify `class`.
|
|
391
|
-
|
|
392
|
-
```
|
|
393
|
-
const dom = document.querySelector('#box');
|
|
394
|
-
|
|
395
|
-
// Determine `class`
|
|
396
|
-
hasClass(dom, 'test');
|
|
397
|
-
// Add `class`
|
|
398
|
-
addClass(dom, 'test');
|
|
399
|
-
// Remove `class`
|
|
400
|
-
removeClass(dom, 'test');
|
|
401
|
-
```
|
|
402
|
-
|
|
403
391
|
#### addStyle
|
|
404
392
|
|
|
405
393
|
Add `<style>` in `<head>`.
|
|
@@ -450,6 +438,21 @@ newLine('a\nb\nc'); // 'a<br />b<br />c'
|
|
|
450
438
|
newLine('a\n\nbc'); // 'a<br /><br />bc'
|
|
451
439
|
```
|
|
452
440
|
|
|
441
|
+
#### Class
|
|
442
|
+
|
|
443
|
+
Modify `class`.
|
|
444
|
+
|
|
445
|
+
```
|
|
446
|
+
const dom = document.querySelector('#box');
|
|
447
|
+
|
|
448
|
+
// Determine `class`
|
|
449
|
+
hasClass(dom, 'test');
|
|
450
|
+
// Add `class`
|
|
451
|
+
addClass(dom, 'test');
|
|
452
|
+
// Remove `class`
|
|
453
|
+
removeClass(dom, 'test');
|
|
454
|
+
```
|
|
455
|
+
|
|
453
456
|
### URL
|
|
454
457
|
|
|
455
458
|
#### getQueryParam
|
|
@@ -464,7 +467,8 @@ getQueryParam('t4'); // 4
|
|
|
464
467
|
```
|
|
465
468
|
|
|
466
469
|
<!-- @param {string} param Query param.
|
|
467
|
-
@returns {string} value
|
|
470
|
+
@returns {string} value
|
|
471
|
+
@category URL -->
|
|
468
472
|
|
|
469
473
|
#### getUrlParam
|
|
470
474
|
|
|
@@ -477,30 +481,8 @@ getUrlParam('http://example.com/?t1=1&t2=2&t3=3&t4=4', 't4'); // 4
|
|
|
477
481
|
|
|
478
482
|
<!-- @param {string} url URL string.
|
|
479
483
|
@param {string} param Query param.
|
|
480
|
-
@returns {string} value
|
|
481
|
-
|
|
482
|
-
#### updateQueryParam
|
|
483
|
-
|
|
484
|
-
Update the query param's value of the input URL.
|
|
485
|
-
|
|
486
|
-
Usage:
|
|
487
|
-
|
|
488
|
-
```
|
|
489
|
-
updateQueryParam('http://example.com/?t1=1&t2=2&t3=3&t4=4', 't3', 'three');
|
|
490
|
-
updateQueryParam('http://example.com/?t1=1&t2=2&t3=3&t4=4', 't4', 'four');
|
|
491
|
-
```
|
|
492
|
-
|
|
493
|
-
Output:
|
|
494
|
-
|
|
495
|
-
```
|
|
496
|
-
http://example.com/?t1=1&t2=2&t3=three&t4=4
|
|
497
|
-
http://example.com/?t1=1&t2=2&t3=3&t4=four
|
|
498
|
-
```
|
|
499
|
-
|
|
500
|
-
<!-- @param {string} url URL string.
|
|
501
|
-
@param {string} param Query param.
|
|
502
|
-
@param {string} value Param's value.
|
|
503
|
-
@returns {string} URL. -->
|
|
484
|
+
@returns {string} value
|
|
485
|
+
@category URL -->
|
|
504
486
|
|
|
505
487
|
#### getHashQueryParam
|
|
506
488
|
|
|
@@ -523,7 +505,8 @@ Output:
|
|
|
523
505
|
```
|
|
524
506
|
|
|
525
507
|
<!-- @param {string} param Query param.
|
|
526
|
-
@returns {string} value
|
|
508
|
+
@returns {string} value
|
|
509
|
+
@category URL -->
|
|
527
510
|
|
|
528
511
|
#### getDomain
|
|
529
512
|
|
|
@@ -544,7 +527,32 @@ example.com/test/thanks
|
|
|
544
527
|
```
|
|
545
528
|
|
|
546
529
|
<!-- @param {string} url
|
|
547
|
-
@param {array} rules Object.keys(location), ['href', 'protocol', 'host', 'hostname', 'port', 'pathname', 'search', 'hash'], ['hostname', 'pathname'] = 'km.mazey.net/plugins/servlet/mobile'
|
|
530
|
+
@param {array} rules Object.keys(location), ['href', 'protocol', 'host', 'hostname', 'port', 'pathname', 'search', 'hash'], ['hostname', 'pathname'] = 'km.mazey.net/plugins/servlet/mobile'
|
|
531
|
+
@category URL -->
|
|
532
|
+
|
|
533
|
+
#### updateQueryParam
|
|
534
|
+
|
|
535
|
+
Update the query param's value of the input URL.
|
|
536
|
+
|
|
537
|
+
Usage:
|
|
538
|
+
|
|
539
|
+
```
|
|
540
|
+
updateQueryParam('http://example.com/?t1=1&t2=2&t3=3&t4=4', 't3', 'three');
|
|
541
|
+
updateQueryParam('http://example.com/?t1=1&t2=2&t3=3&t4=4', 't4', 'four');
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
Output:
|
|
545
|
+
|
|
546
|
+
```
|
|
547
|
+
http://example.com/?t1=1&t2=2&t3=three&t4=4
|
|
548
|
+
http://example.com/?t1=1&t2=2&t3=3&t4=four
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
<!-- @param {string} url URL string.
|
|
552
|
+
@param {string} param Query param.
|
|
553
|
+
@param {string} value Param's value.
|
|
554
|
+
@returns {string} URL.
|
|
555
|
+
@category URL -->
|
|
548
556
|
|
|
549
557
|
### Cache Data
|
|
550
558
|
|
|
@@ -694,7 +702,7 @@ Results:
|
|
|
694
702
|
| Supporter version | supporterVs | - |
|
|
695
703
|
| Shell | shell | (Optional) wechat, qq_browser, qq_app, uc, 360, 2345, sougou, liebao, maxthon, bilibili |
|
|
696
704
|
| Shell version | shellVs | (Optional) 20/... |
|
|
697
|
-
| Apple device type | appleType | (Optional)
|
|
705
|
+
| Apple device type | appleType | (Optional) ipad, iphone, ipod, iwatch |
|
|
698
706
|
|
|
699
707
|
Example: Determine the environment of the mobile QQ.
|
|
700
708
|
|
|
@@ -703,7 +711,8 @@ const { system, shell } = getBrowserInfo();
|
|
|
703
711
|
const isMobileQQ = ['android', 'ios'].includes(system) && ['qq_browser', 'qq_app'].includes(shell);
|
|
704
712
|
```
|
|
705
713
|
|
|
706
|
-
<!-- @returns 浏览器信息
|
|
714
|
+
<!-- @returns 浏览器信息
|
|
715
|
+
@category Browser Information -->
|
|
707
716
|
|
|
708
717
|
### Web Performance
|
|
709
718
|
|
package/lib/index.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* mazey v3.5.
|
|
2
|
+
* mazey v3.5.4
|
|
3
3
|
* (c) 2018-2023 Mazey Chu
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -3245,6 +3245,7 @@ function calLongestCommonSubsequence(aStr, bStr) {
|
|
|
3245
3245
|
*
|
|
3246
3246
|
* @param {string} param Query param.
|
|
3247
3247
|
* @returns {string} value
|
|
3248
|
+
* @category URL
|
|
3248
3249
|
*/
|
|
3249
3250
|
|
|
3250
3251
|
function getQueryParam(param) {
|
|
@@ -3269,6 +3270,7 @@ function getQueryParam(param) {
|
|
|
3269
3270
|
* @param {string} url URL string.
|
|
3270
3271
|
* @param {string} param Query param.
|
|
3271
3272
|
* @returns {string} value
|
|
3273
|
+
* @category URL
|
|
3272
3274
|
*/
|
|
3273
3275
|
|
|
3274
3276
|
function getUrlParam(url, param) {
|
|
@@ -3310,6 +3312,7 @@ function getUrlParam(url, param) {
|
|
|
3310
3312
|
* @param {string} param Query param.
|
|
3311
3313
|
* @param {string} value Param's value.
|
|
3312
3314
|
* @returns {string} URL.
|
|
3315
|
+
* @category URL
|
|
3313
3316
|
*/
|
|
3314
3317
|
|
|
3315
3318
|
function updateQueryParam(url, param, value) {
|
|
@@ -3343,6 +3346,7 @@ function updateQueryParam(url, param, value) {
|
|
|
3343
3346
|
*
|
|
3344
3347
|
* @param {string} param Query param.
|
|
3345
3348
|
* @returns {string} value
|
|
3349
|
+
* @category URL
|
|
3346
3350
|
*/
|
|
3347
3351
|
|
|
3348
3352
|
function getHashQueryParam(param) {
|
|
@@ -3375,6 +3379,7 @@ function getHashQueryParam(param) {
|
|
|
3375
3379
|
*
|
|
3376
3380
|
* @param {string} url
|
|
3377
3381
|
* @param {array} rules Object.keys(location), ['href', 'protocol', 'host', 'hostname', 'port', 'pathname', 'search', 'hash'], ['hostname', 'pathname'] = 'km.mazey.net/plugins/servlet/mobile'
|
|
3382
|
+
* @category URL
|
|
3378
3383
|
*/
|
|
3379
3384
|
|
|
3380
3385
|
function getDomain(url, rules) {
|
|
@@ -4027,6 +4032,7 @@ function getLocalStorage(key) {
|
|
|
4027
4032
|
* @param {string} url -- css资源路径
|
|
4028
4033
|
* @param {string} options.id -- link标签id
|
|
4029
4034
|
* @returns {Promise<boolean>} true -- 加载成功
|
|
4035
|
+
* @category Load Resource
|
|
4030
4036
|
*/
|
|
4031
4037
|
|
|
4032
4038
|
function loadCSS(url, options) {
|
|
@@ -4183,6 +4189,7 @@ function loadCSS(url, options) {
|
|
|
4183
4189
|
* @param {number} options.timeout -- 超时时长
|
|
4184
4190
|
* @param {boolean} options.isDefer -- 是否添加 defer 标签
|
|
4185
4191
|
* @returns {Promise<boolean>} -- true 成功
|
|
4192
|
+
* @category Load Resource
|
|
4186
4193
|
*/
|
|
4187
4194
|
|
|
4188
4195
|
function loadScript(url, options) {
|
|
@@ -4753,7 +4760,7 @@ function isSafePWAEnv() {
|
|
|
4753
4760
|
* | Supporter version | supporterVs | - |
|
|
4754
4761
|
* | Shell | shell | (Optional) wechat, qq_browser, qq_app, uc, 360, 2345, sougou, liebao, maxthon, bilibili |
|
|
4755
4762
|
* | Shell version | shellVs | (Optional) 20/... |
|
|
4756
|
-
* | Apple device type | appleType | (Optional)
|
|
4763
|
+
* | Apple device type | appleType | (Optional) ipad, iphone, ipod, iwatch |
|
|
4757
4764
|
*
|
|
4758
4765
|
* Example: Determine the environment of the mobile QQ.
|
|
4759
4766
|
*
|
|
@@ -4763,6 +4770,7 @@ function isSafePWAEnv() {
|
|
|
4763
4770
|
* ```
|
|
4764
4771
|
*
|
|
4765
4772
|
* @returns 浏览器信息
|
|
4773
|
+
* @category Browser Information
|
|
4766
4774
|
*/
|
|
4767
4775
|
|
|
4768
4776
|
function getBrowserInfo() {
|
|
@@ -4801,10 +4809,10 @@ function getBrowserInfo() {
|
|
|
4801
4809
|
} else if (testUa(/ios|iphone|ipad|ipod|iwatch/g)) {
|
|
4802
4810
|
system = 'ios'; // ios系统
|
|
4803
4811
|
|
|
4804
|
-
if (testUa(/
|
|
4805
|
-
appleType = 'iphone';
|
|
4806
|
-
} else if (testUa(/ipad/g)) {
|
|
4812
|
+
if (testUa(/ipad/g)) {
|
|
4807
4813
|
appleType = 'ipad';
|
|
4814
|
+
} else if (testUa(/iphone/g)) {
|
|
4815
|
+
appleType = 'iphone';
|
|
4808
4816
|
} else if (testUa(/iwatch/g)) {
|
|
4809
4817
|
appleType = 'iwatch';
|
|
4810
4818
|
} else if (testUa(/ipod/g)) {
|
|
@@ -5046,6 +5054,7 @@ function cutCHSString(str, len, hasDot) {
|
|
|
5046
5054
|
*
|
|
5047
5055
|
* @param {number} timeout 超时时间 / 单位:秒
|
|
5048
5056
|
* @returns {Promise<string>} document is loaded? 'complete' 'load' / 'timeout'
|
|
5057
|
+
* @category Load Resource
|
|
5049
5058
|
*/
|
|
5050
5059
|
|
|
5051
5060
|
function windowLoaded(timeout) {
|
package/lib/index.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ export declare function calLongestCommonSubsequence(aStr: string, bStr: string):
|
|
|
57
57
|
*
|
|
58
58
|
* @param {string} param Query param.
|
|
59
59
|
* @returns {string} value
|
|
60
|
+
* @category URL
|
|
60
61
|
*/
|
|
61
62
|
export declare function getQueryParam(param: string): string;
|
|
62
63
|
/**
|
|
@@ -70,6 +71,7 @@ export declare function getQueryParam(param: string): string;
|
|
|
70
71
|
* @param {string} url URL string.
|
|
71
72
|
* @param {string} param Query param.
|
|
72
73
|
* @returns {string} value
|
|
74
|
+
* @category URL
|
|
73
75
|
*/
|
|
74
76
|
export declare function getUrlParam(url: string, param: string): string | string[];
|
|
75
77
|
/**
|
|
@@ -93,6 +95,7 @@ export declare function getUrlParam(url: string, param: string): string | string
|
|
|
93
95
|
* @param {string} param Query param.
|
|
94
96
|
* @param {string} value Param's value.
|
|
95
97
|
* @returns {string} URL.
|
|
98
|
+
* @category URL
|
|
96
99
|
*/
|
|
97
100
|
export declare function updateQueryParam(url: string, param: string, value: string): string;
|
|
98
101
|
/**
|
|
@@ -116,6 +119,7 @@ export declare function updateQueryParam(url: string, param: string, value: stri
|
|
|
116
119
|
*
|
|
117
120
|
* @param {string} param Query param.
|
|
118
121
|
* @returns {string} value
|
|
122
|
+
* @category URL
|
|
119
123
|
*/
|
|
120
124
|
export declare function getHashQueryParam(param: string): string;
|
|
121
125
|
/**
|
|
@@ -137,6 +141,7 @@ export declare function getHashQueryParam(param: string): string;
|
|
|
137
141
|
*
|
|
138
142
|
* @param {string} url
|
|
139
143
|
* @param {array} rules Object.keys(location), ['href', 'protocol', 'host', 'hostname', 'port', 'pathname', 'search', 'hash'], ['hostname', 'pathname'] = 'km.mazey.net/plugins/servlet/mobile'
|
|
144
|
+
* @category URL
|
|
140
145
|
*/
|
|
141
146
|
export declare function getDomain(url: string, rules?: string[]): string;
|
|
142
147
|
/**
|
|
@@ -388,6 +393,7 @@ export declare function getLocalStorage(key: string): any;
|
|
|
388
393
|
* @param {string} url -- css资源路径
|
|
389
394
|
* @param {string} options.id -- link标签id
|
|
390
395
|
* @returns {Promise<boolean>} true -- 加载成功
|
|
396
|
+
* @category Load Resource
|
|
391
397
|
*/
|
|
392
398
|
export declare function loadCSS(url: string, options?: {
|
|
393
399
|
id?: string;
|
|
@@ -424,6 +430,7 @@ export declare function loadCSS(url: string, options?: {
|
|
|
424
430
|
* @param {number} options.timeout -- 超时时长
|
|
425
431
|
* @param {boolean} options.isDefer -- 是否添加 defer 标签
|
|
426
432
|
* @returns {Promise<boolean>} -- true 成功
|
|
433
|
+
* @category Load Resource
|
|
427
434
|
*/
|
|
428
435
|
export declare function loadScript(url: string, options?: {
|
|
429
436
|
id?: string;
|
|
@@ -446,6 +453,9 @@ export declare function setCookie(name: string, value: string, days: number, dom
|
|
|
446
453
|
* @description 获取 Cookie
|
|
447
454
|
*/
|
|
448
455
|
export declare function getCookie(name: string): string;
|
|
456
|
+
/**
|
|
457
|
+
* @hidden
|
|
458
|
+
*/
|
|
449
459
|
interface WebPerformance {
|
|
450
460
|
[key: string]: string | number;
|
|
451
461
|
}
|
|
@@ -579,7 +589,7 @@ export declare function isSafePWAEnv(): boolean;
|
|
|
579
589
|
* | Supporter version | supporterVs | - |
|
|
580
590
|
* | Shell | shell | (Optional) wechat, qq_browser, qq_app, uc, 360, 2345, sougou, liebao, maxthon, bilibili |
|
|
581
591
|
* | Shell version | shellVs | (Optional) 20/... |
|
|
582
|
-
* | Apple device type | appleType | (Optional)
|
|
592
|
+
* | Apple device type | appleType | (Optional) ipad, iphone, ipod, iwatch |
|
|
583
593
|
*
|
|
584
594
|
* Example: Determine the environment of the mobile QQ.
|
|
585
595
|
*
|
|
@@ -589,6 +599,7 @@ export declare function isSafePWAEnv(): boolean;
|
|
|
589
599
|
* ```
|
|
590
600
|
*
|
|
591
601
|
* @returns 浏览器信息
|
|
602
|
+
* @category Browser Information
|
|
592
603
|
*/
|
|
593
604
|
export declare function getBrowserInfo(): {
|
|
594
605
|
engine: string;
|
|
@@ -635,6 +646,7 @@ export declare function cutCHSString(str: string, len: number, hasDot?: boolean)
|
|
|
635
646
|
*
|
|
636
647
|
* @param {number} timeout 超时时间 / 单位:秒
|
|
637
648
|
* @returns {Promise<string>} document is loaded? 'complete' 'load' / 'timeout'
|
|
649
|
+
* @category Load Resource
|
|
638
650
|
*/
|
|
639
651
|
export declare function windowLoaded(timeout?: number): Promise<string | Error>;
|
|
640
652
|
/**
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAqB5E;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,MAAM,CA8BR;AAED
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAqB5E;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,2BAA2B,CACzC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,GACX,MAAM,CA8BR;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQnD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,CAmBzE;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,GACZ,MAAM,CAQR;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQvD;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,WAAe,GAAG,MAAM,CAOnE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAG9D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAG9D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAQzC;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAM3C;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,CAE5C;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CASjD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAI,GAAG,MAAM,CAM5C;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAI,GAAG,MAAM,CAG/C;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,SAAI,GAAG,MAAM,CAQ/D;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,SAAI,GAAG,MAAM,CAExD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,GAAG,GAAG,IAAI,CASzC;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CASvD;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CASpD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,CAQvD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CACtB,IAAI,EAAE,GAAG,EACT,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAO,GACtD,GAAG,CA0CL;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,GAAG,GAAG,GAAG,CAkCtE;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,SAAI,EACT,GAAG,SAAI,EACP,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAkB,GACzC,MAAM,GAAG,MAAM,CA4BjB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,QAAQ,CACtB,GAAG,EAAE,GAAG,EACR,OAAO,GAAE;IAAE,aAAa,CAAC,EAAE,OAAO,CAAC;IAAC,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAG/D,GACA,OAAO,CAqBT;AAED;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE,GAAG,GAAG,CAMnD;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,GAAE,GAAU,GAAG,IAAI,CAItE;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CASlD;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,GAAE,GAAU,GAAG,IAAI,CAIpE;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAShD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,OAAO,CACrB,GAAG,EAAE,MAAM,EACX,OAAO,GAAE;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAe,GACpC,OAAO,CAAC,OAAO,GAAG,KAAK,GAAG,GAAG,CAAC,CAsHhC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAgB,UAAU,CACxB,GAAG,EAAE,MAAM,EACX,OAAO,GAAE;IACP,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,GAAG,EAAE,KAAK,GAAG,CAAC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CAQnB,GACA,OAAO,CAAC,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC,CAgDnC;AAED;;;GAGG;AACH,wBAAgB,IAAI,IAAI,MAAM,CAQ7B;AAED;;;GAGG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,GACb,IAAI,CAsCN;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAW9C;AAED;;GAEG;AACH,UAAU,cAAc;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CAChC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,cAAc,CAC5B,SAAS,UAAQ,GAChB,OAAO,CAAC,cAAc,GAAG,KAAK,CAAC,CAsPjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAK5C;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAyCtC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,cAAc,IAAI;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAqLA;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,UAAQ,GAAG,MAAM,CA4B7E;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,YAAY,CAAC,OAAO,SAAK,GAAG,OAAO,CAAC,MAAM,GAAG,KAAK,CAAC,CAiBlE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,MAAM,EACb,OAAO,GAAE;IAAE,EAAE,CAAC,EAAE,MAAM,CAAA;CAAe,GACpC,OAAO,CAiCT;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,SAAK,EACX,OAAO,GAAE;IACP,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CAQtB,GACA,OAAO,CAoFT;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,GAAG,EACR,OAAO,GAAE;IACP,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CAItB,GACA,OAAO,CAyBT;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,OAAO,CAMnD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,GAAG,EACT,UAAU,EAAE,MAAM,EAAE,EACpB,UAAU,EAAE,GAAG,GACd,OAAO,CAgBT;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAiBhD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAahD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAU/C;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,UAAU,CACxB,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,EAChC,MAAM,SAAe,GACpB,MAAM,CAiCR"}
|
package/lib/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* mazey v3.5.
|
|
2
|
+
* mazey v3.5.4
|
|
3
3
|
* (c) 2018-2023 Mazey Chu
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -3241,6 +3241,7 @@ function calLongestCommonSubsequence(aStr, bStr) {
|
|
|
3241
3241
|
*
|
|
3242
3242
|
* @param {string} param Query param.
|
|
3243
3243
|
* @returns {string} value
|
|
3244
|
+
* @category URL
|
|
3244
3245
|
*/
|
|
3245
3246
|
|
|
3246
3247
|
function getQueryParam(param) {
|
|
@@ -3265,6 +3266,7 @@ function getQueryParam(param) {
|
|
|
3265
3266
|
* @param {string} url URL string.
|
|
3266
3267
|
* @param {string} param Query param.
|
|
3267
3268
|
* @returns {string} value
|
|
3269
|
+
* @category URL
|
|
3268
3270
|
*/
|
|
3269
3271
|
|
|
3270
3272
|
function getUrlParam(url, param) {
|
|
@@ -3306,6 +3308,7 @@ function getUrlParam(url, param) {
|
|
|
3306
3308
|
* @param {string} param Query param.
|
|
3307
3309
|
* @param {string} value Param's value.
|
|
3308
3310
|
* @returns {string} URL.
|
|
3311
|
+
* @category URL
|
|
3309
3312
|
*/
|
|
3310
3313
|
|
|
3311
3314
|
function updateQueryParam(url, param, value) {
|
|
@@ -3339,6 +3342,7 @@ function updateQueryParam(url, param, value) {
|
|
|
3339
3342
|
*
|
|
3340
3343
|
* @param {string} param Query param.
|
|
3341
3344
|
* @returns {string} value
|
|
3345
|
+
* @category URL
|
|
3342
3346
|
*/
|
|
3343
3347
|
|
|
3344
3348
|
function getHashQueryParam(param) {
|
|
@@ -3371,6 +3375,7 @@ function getHashQueryParam(param) {
|
|
|
3371
3375
|
*
|
|
3372
3376
|
* @param {string} url
|
|
3373
3377
|
* @param {array} rules Object.keys(location), ['href', 'protocol', 'host', 'hostname', 'port', 'pathname', 'search', 'hash'], ['hostname', 'pathname'] = 'km.mazey.net/plugins/servlet/mobile'
|
|
3378
|
+
* @category URL
|
|
3374
3379
|
*/
|
|
3375
3380
|
|
|
3376
3381
|
function getDomain(url, rules) {
|
|
@@ -4023,6 +4028,7 @@ function getLocalStorage(key) {
|
|
|
4023
4028
|
* @param {string} url -- css资源路径
|
|
4024
4029
|
* @param {string} options.id -- link标签id
|
|
4025
4030
|
* @returns {Promise<boolean>} true -- 加载成功
|
|
4031
|
+
* @category Load Resource
|
|
4026
4032
|
*/
|
|
4027
4033
|
|
|
4028
4034
|
function loadCSS(url, options) {
|
|
@@ -4179,6 +4185,7 @@ function loadCSS(url, options) {
|
|
|
4179
4185
|
* @param {number} options.timeout -- 超时时长
|
|
4180
4186
|
* @param {boolean} options.isDefer -- 是否添加 defer 标签
|
|
4181
4187
|
* @returns {Promise<boolean>} -- true 成功
|
|
4188
|
+
* @category Load Resource
|
|
4182
4189
|
*/
|
|
4183
4190
|
|
|
4184
4191
|
function loadScript(url, options) {
|
|
@@ -4749,7 +4756,7 @@ function isSafePWAEnv() {
|
|
|
4749
4756
|
* | Supporter version | supporterVs | - |
|
|
4750
4757
|
* | Shell | shell | (Optional) wechat, qq_browser, qq_app, uc, 360, 2345, sougou, liebao, maxthon, bilibili |
|
|
4751
4758
|
* | Shell version | shellVs | (Optional) 20/... |
|
|
4752
|
-
* | Apple device type | appleType | (Optional)
|
|
4759
|
+
* | Apple device type | appleType | (Optional) ipad, iphone, ipod, iwatch |
|
|
4753
4760
|
*
|
|
4754
4761
|
* Example: Determine the environment of the mobile QQ.
|
|
4755
4762
|
*
|
|
@@ -4759,6 +4766,7 @@ function isSafePWAEnv() {
|
|
|
4759
4766
|
* ```
|
|
4760
4767
|
*
|
|
4761
4768
|
* @returns 浏览器信息
|
|
4769
|
+
* @category Browser Information
|
|
4762
4770
|
*/
|
|
4763
4771
|
|
|
4764
4772
|
function getBrowserInfo() {
|
|
@@ -4797,10 +4805,10 @@ function getBrowserInfo() {
|
|
|
4797
4805
|
} else if (testUa(/ios|iphone|ipad|ipod|iwatch/g)) {
|
|
4798
4806
|
system = 'ios'; // ios系统
|
|
4799
4807
|
|
|
4800
|
-
if (testUa(/
|
|
4801
|
-
appleType = 'iphone';
|
|
4802
|
-
} else if (testUa(/ipad/g)) {
|
|
4808
|
+
if (testUa(/ipad/g)) {
|
|
4803
4809
|
appleType = 'ipad';
|
|
4810
|
+
} else if (testUa(/iphone/g)) {
|
|
4811
|
+
appleType = 'iphone';
|
|
4804
4812
|
} else if (testUa(/iwatch/g)) {
|
|
4805
4813
|
appleType = 'iwatch';
|
|
4806
4814
|
} else if (testUa(/ipod/g)) {
|
|
@@ -5042,6 +5050,7 @@ function cutCHSString(str, len, hasDot) {
|
|
|
5042
5050
|
*
|
|
5043
5051
|
* @param {number} timeout 超时时间 / 单位:秒
|
|
5044
5052
|
* @returns {Promise<string>} document is loaded? 'complete' 'load' / 'timeout'
|
|
5053
|
+
* @category Load Resource
|
|
5045
5054
|
*/
|
|
5046
5055
|
|
|
5047
5056
|
function windowLoaded(timeout) {
|
package/lib/mazey.min.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* mazey v3.5.
|
|
2
|
+
* mazey v3.5.4
|
|
3
3
|
* (c) 2018-2023 Mazey Chu
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
var mazey=function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e,t){return e(t={exports:{}},t.exports),t.exports}var r=function(e){return e&&e.Math==Math&&e},o=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||Function("return this")(),i=function(e){try{return!!e()}catch(e){return!0}},a=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,l={f:u&&!c.call({1:2},1)?function(e){var t=u(this,e);return!!t&&t.enumerable}:c},s=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},f={}.toString,d=function(e){return f.call(e).slice(8,-1)},p="".split,g=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==d(e)?p.call(e,""):Object(e)}:Object,v=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},h=function(e){return g(v(e))},m=function(e){return"object"==typeof e?null!==e:"function"==typeof e},y=function(e,t){if(!m(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!m(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!m(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!m(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},w={}.hasOwnProperty,b=function(e,t){return w.call(e,t)},S=o.document,x=m(S)&&m(S.createElement),E=function(e){return x?S.createElement(e):{}},O=!a&&!i((function(){return 7!=Object.defineProperty(E("div"),"a",{get:function(){return 7}}).a})),A=Object.getOwnPropertyDescriptor,T={f:a?A:function(e,t){if(e=h(e),t=y(t,!0),O)try{return A(e,t)}catch(e){}if(b(e,t))return s(!l.f.call(e,t),e[t])}},j=function(e){if(!m(e))throw TypeError(String(e)+" is not an object");return e},M=Object.defineProperty,_={f:a?M:function(e,t,n){if(j(e),t=y(t,!0),j(n),O)try{return M(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},C=a?function(e,t,n){return _.f(e,t,s(1,n))}:function(e,t,n){return e[t]=n,e},N=function(e,t){try{C(o,e,t)}catch(n){o[e]=t}return t},P="__core-js_shared__",R=o[P]||N(P,{}),I=Function.toString;"function"!=typeof R.inspectSource&&(R.inspectSource=function(e){return I.call(e)});var k,L,F,D=R.inspectSource,U=o.WeakMap,B="function"==typeof U&&/native code/.test(D(U)),$=n((function(e){(e.exports=function(e,t){return R[e]||(R[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),V=0,q=Math.random(),G=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++V+q).toString(36)},H=$("keys"),W=function(e){return H[e]||(H[e]=G(e))},z={},K=o.WeakMap;if(B){var J=new K,Y=J.get,X=J.has,Q=J.set;k=function(e,t){return Q.call(J,e,t),t},L=function(e){return Y.call(J,e)||{}},F=function(e){return X.call(J,e)}}else{var Z=W("state");z[Z]=!0,k=function(e,t){return C(e,Z,t),t},L=function(e){return b(e,Z)?e[Z]:{}},F=function(e){return b(e,Z)}}var ee,te,ne={set:k,get:L,has:F,enforce:function(e){return F(e)?L(e):k(e,{})},getterFor:function(e){return function(t){var n;if(!m(t)||(n=L(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},re=n((function(e){var t=ne.get,n=ne.enforce,r=String(String).split("String");(e.exports=function(e,t,i,a){var c=!!a&&!!a.unsafe,u=!!a&&!!a.enumerable,l=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof t||b(i,"name")||C(i,"name",t),n(i).source=r.join("string"==typeof t?t:"")),e!==o?(c?!l&&e[t]&&(u=!0):delete e[t],u?e[t]=i:C(e,t,i)):u?e[t]=i:N(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||D(this)}))})),oe=o,ie=function(e){return"function"==typeof e?e:void 0},ae=function(e,t){return arguments.length<2?ie(oe[e])||ie(o[e]):oe[e]&&oe[e][t]||o[e]&&o[e][t]},ce=Math.ceil,ue=Math.floor,le=function(e){return isNaN(e=+e)?0:(e>0?ue:ce)(e)},se=Math.min,fe=function(e){return e>0?se(le(e),9007199254740991):0},de=Math.max,pe=Math.min,ge=function(e,t){var n=le(e);return n<0?de(n+t,0):pe(n,t)},ve=function(e){return function(t,n,r){var o,i=h(t),a=fe(i.length),c=ge(r,a);if(e&&n!=n){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((e||c in i)&&i[c]===n)return e||c||0;return!e&&-1}},he={includes:ve(!0),indexOf:ve(!1)},me=he.indexOf,ye=function(e,t){var n,r=h(e),o=0,i=[];for(n in r)!b(z,n)&&b(r,n)&&i.push(n);for(;t.length>o;)b(r,n=t[o++])&&(~me(i,n)||i.push(n));return i},we=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],be=we.concat("length","prototype"),Se={f:Object.getOwnPropertyNames||function(e){return ye(e,be)}},xe={f:Object.getOwnPropertySymbols},Ee=ae("Reflect","ownKeys")||function(e){var t=Se.f(j(e)),n=xe.f;return n?t.concat(n(e)):t},Oe=function(e,t){for(var n=Ee(t),r=_.f,o=T.f,i=0;i<n.length;i++){var a=n[i];b(e,a)||r(e,a,o(t,a))}},Ae=/#|\.prototype\./,Te=function(e,t){var n=Me[je(e)];return n==Ce||n!=_e&&("function"==typeof t?i(t):!!t)},je=Te.normalize=function(e){return String(e).replace(Ae,".").toLowerCase()},Me=Te.data={},_e=Te.NATIVE="N",Ce=Te.POLYFILL="P",Ne=Te,Pe=T.f,Re=function(e,t){var n,r,i,a,c,u=e.target,l=e.global,s=e.stat;if(n=l?o:s?o[u]||N(u,{}):(o[u]||{}).prototype)for(r in t){if(a=t[r],i=e.noTargetGet?(c=Pe(n,r))&&c.value:n[r],!Ne(l?r:u+(s?".":"#")+r,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Oe(a,i)}(e.sham||i&&i.sham)&&C(a,"sham",!0),re(n,r,a,e)}},Ie=Array.isArray||function(e){return"Array"==d(e)},ke=function(e){return Object(v(e))},Le=function(e,t,n){var r=y(t);r in e?_.f(e,r,s(0,n)):e[r]=n},Fe=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())})),De=Fe&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ue=$("wks"),Be=o.Symbol,$e=De?Be:Be&&Be.withoutSetter||G,Ve=function(e){return b(Ue,e)||(Fe&&b(Be,e)?Ue[e]=Be[e]:Ue[e]=$e("Symbol."+e)),Ue[e]},qe=Ve("species"),Ge=function(e,t){var n;return Ie(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!Ie(n.prototype)?m(n)&&null===(n=n[qe])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)},He=ae("navigator","userAgent")||"",We=o.process,ze=We&&We.versions,Ke=ze&&ze.v8;Ke?te=(ee=Ke.split("."))[0]+ee[1]:He&&(!(ee=He.match(/Edge\/(\d+)/))||ee[1]>=74)&&(ee=He.match(/Chrome\/(\d+)/))&&(te=ee[1]);var Je=te&&+te,Ye=Ve("species"),Xe=function(e){return Je>=51||!i((function(){var t=[];return(t.constructor={})[Ye]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Qe=Ve("isConcatSpreadable"),Ze=9007199254740991,et="Maximum allowed index exceeded",tt=Je>=51||!i((function(){var e=[];return e[Qe]=!1,e.concat()[0]!==e})),nt=Xe("concat"),rt=function(e){if(!m(e))return!1;var t=e[Qe];return void 0!==t?!!t:Ie(e)};Re({target:"Array",proto:!0,forced:!tt||!nt},{concat:function(e){var t,n,r,o,i,a=ke(this),c=Ge(a,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(rt(i=-1===t?a:arguments[t])){if(u+(o=fe(i.length))>Ze)throw TypeError(et);for(n=0;n<o;n++,u++)n in i&&Le(c,u,i[n])}else{if(u>=Ze)throw TypeError(et);Le(c,u++,i)}return c.length=u,c}});var ot,it=Object.keys||function(e){return ye(e,we)},at=a?Object.defineProperties:function(e,t){j(e);for(var n,r=it(t),o=r.length,i=0;o>i;)_.f(e,n=r[i++],t[n]);return e},ct=ae("document","documentElement"),ut=W("IE_PROTO"),lt=function(){},st=function(e){return"<script>"+e+"</"+"script>"},ft=function(){try{ot=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;ft=ot?function(e){e.write(st("")),e.close();var t=e.parentWindow.Object;return e=null,t}(ot):((t=E("iframe")).style.display="none",ct.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(st("document.F=Object")),e.close(),e.F);for(var n=we.length;n--;)delete ft.prototype[we[n]];return ft()};z[ut]=!0;var dt=Object.create||function(e,t){var n;return null!==e?(lt.prototype=j(e),n=new lt,lt.prototype=null,n[ut]=e):n=ft(),void 0===t?n:at(n,t)},pt=Ve("unscopables"),gt=Array.prototype;null==gt[pt]&&_.f(gt,pt,{configurable:!0,value:dt(null)});var vt=function(e){gt[pt][e]=!0};Re({target:"Array",proto:!0},{fill:function(e){for(var t=ke(this),n=fe(t.length),r=arguments.length,o=ge(r>1?arguments[1]:void 0,n),i=r>2?arguments[2]:void 0,a=void 0===i?n:ge(i,n);a>o;)t[o++]=e;return t}}),vt("fill");var ht=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},mt=function(e,t,n){if(ht(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}},yt=[].push,wt=function(e){var t=1==e,n=2==e,r=3==e,o=4==e,i=6==e,a=5==e||i;return function(c,u,l,s){for(var f,d,p=ke(c),v=g(p),h=mt(u,l,3),m=fe(v.length),y=0,w=s||Ge,b=t?w(c,m):n?w(c,0):void 0;m>y;y++)if((a||y in v)&&(d=h(f=v[y],y,p),e))if(t)b[y]=d;else if(d)switch(e){case 3:return!0;case 5:return f;case 6:return y;case 2:yt.call(b,f)}else if(o)return!1;return i?-1:r||o?o:b}},bt={forEach:wt(0),map:wt(1),filter:wt(2),some:wt(3),every:wt(4),find:wt(5),findIndex:wt(6)},St=function(e,t){var n=[][e];return!!n&&i((function(){n.call(null,t||function(){throw 1},1)}))},xt=Object.defineProperty,Et={},Ot=function(e){throw e},At=function(e,t){if(b(Et,e))return Et[e];t||(t={});var n=[][e],r=!!b(t,"ACCESSORS")&&t.ACCESSORS,o=b(t,0)?t[0]:Ot,c=b(t,1)?t[1]:void 0;return Et[e]=!!n&&!i((function(){if(r&&!a)return!0;var e={length:-1};r?xt(e,1,{enumerable:!0,get:Ot}):e[1]=1,n.call(e,o,c)}))},Tt=bt.forEach,jt=St("forEach"),Mt=At("forEach"),_t=jt&&Mt?[].forEach:function(e){return Tt(this,e,arguments.length>1?arguments[1]:void 0)};Re({target:"Array",proto:!0,forced:[].forEach!=_t},{forEach:_t});var Ct=he.includes;Re({target:"Array",proto:!0,forced:!At("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return Ct(this,e,arguments.length>1?arguments[1]:void 0)}}),vt("includes");var Nt=he.indexOf,Pt=[].indexOf,Rt=!!Pt&&1/[1].indexOf(1,-0)<0,It=St("indexOf"),kt=At("indexOf",{ACCESSORS:!0,1:0});Re({target:"Array",proto:!0,forced:Rt||!It||!kt},{indexOf:function(e){return Rt?Pt.apply(this,arguments)||0:Nt(this,e,arguments.length>1?arguments[1]:void 0)}});var Lt=[].join,Ft=g!=Object,Dt=St("join",",");Re({target:"Array",proto:!0,forced:Ft||!Dt},{join:function(e){return Lt.call(h(this),void 0===e?",":e)}});var Ut=function(e){return function(t,n,r,o){ht(n);var i=ke(t),a=g(i),c=fe(i.length),u=e?c-1:0,l=e?-1:1;if(r<2)for(;;){if(u in a){o=a[u],u+=l;break}if(u+=l,e?u<0:c<=u)throw TypeError("Reduce of empty array with no initial value")}for(;e?u>=0:c>u;u+=l)u in a&&(o=n(o,a[u],u,i));return o}},Bt={left:Ut(!1),right:Ut(!0)}.left,$t=St("reduce"),Vt=At("reduce",{1:0});Re({target:"Array",proto:!0,forced:!$t||!Vt},{reduce:function(e){return Bt(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}});var qt=Xe("slice"),Gt=At("slice",{ACCESSORS:!0,0:0,1:2}),Ht=Ve("species"),Wt=[].slice,zt=Math.max;Re({target:"Array",proto:!0,forced:!qt||!Gt},{slice:function(e,t){var n,r,o,i=h(this),a=fe(i.length),c=ge(e,a),u=ge(void 0===t?a:t,a);if(Ie(i)&&("function"!=typeof(n=i.constructor)||n!==Array&&!Ie(n.prototype)?m(n)&&null===(n=n[Ht])&&(n=void 0):n=void 0,n===Array||void 0===n))return Wt.call(i,c,u);for(r=new(void 0===n?Array:n)(zt(u-c,0)),o=0;c<u;c++,o++)c in i&&Le(r,o,i[c]);return r.length=o,r}});var Kt=_.f,Jt=Function.prototype,Yt=Jt.toString,Xt=/^\s*function ([^ (]*)/,Qt="name";a&&!(Qt in Jt)&&Kt(Jt,Qt,{configurable:!0,get:function(){try{return Yt.call(this).match(Xt)[1]}catch(e){return""}}});var Zt=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return j(n),function(e){if(!m(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype")}(r),t?e.call(n,r):n.__proto__=r,n}}():void 0),en=function(e,t,n){var r,o;return Zt&&"function"==typeof(r=t.constructor)&&r!==n&&m(o=r.prototype)&&o!==n.prototype&&Zt(e,o),e},tn="\t\n\v\f\r \u2028\u2029\ufeff",nn="["+tn+"]",rn=RegExp("^"+nn+nn+"*"),on=RegExp(nn+nn+"*$"),an=function(e){return function(t){var n=String(v(t));return 1&e&&(n=n.replace(rn,"")),2&e&&(n=n.replace(on,"")),n}},cn={start:an(1),end:an(2),trim:an(3)},un=Se.f,ln=T.f,sn=_.f,fn=cn.trim,dn="Number",pn=o.Number,gn=pn.prototype,vn=d(dt(gn))==dn,hn=function(e){var t,n,r,o,i,a,c,u,l=y(e,!1);if("string"==typeof l&&l.length>2)if(43===(t=(l=fn(l)).charCodeAt(0))||45===t){if(88===(n=l.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(l.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+l}for(a=(i=l.slice(2)).length,c=0;c<a;c++)if((u=i.charCodeAt(c))<48||u>o)return NaN;return parseInt(i,r)}return+l};if(Ne(dn,!pn(" 0o1")||!pn("0b1")||pn("+0x1"))){for(var mn,yn=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof yn&&(vn?i((function(){gn.valueOf.call(n)})):d(n)!=dn)?en(new pn(hn(t)),n,yn):hn(t)},wn=a?un(pn):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),bn=0;wn.length>bn;bn++)b(pn,mn=wn[bn])&&!b(yn,mn)&&sn(yn,mn,ln(pn,mn));yn.prototype=gn,gn.constructor=yn,re(o,dn,yn)}var Sn="".repeat||function(e){var t=String(v(this)),n="",r=le(e);if(r<0||r==1/0)throw RangeError("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n},xn=1..toFixed,En=Math.floor,On=function(e,t,n){return 0===t?n:t%2==1?On(e,t-1,n*e):On(e*e,t/2,n)};Re({target:"Number",proto:!0,forced:xn&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!i((function(){xn.call({})}))},{toFixed:function(e){var t,n,r,o,i=function(e){if("number"!=typeof e&&"Number"!=d(e))throw TypeError("Incorrect invocation");return+e}(this),a=le(e),c=[0,0,0,0,0,0],u="",l="0",s=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*c[n],c[n]=r%1e7,r=En(r/1e7)},f=function(e){for(var t=6,n=0;--t>=0;)n+=c[t],c[t]=En(n/e),n=n%e*1e7},p=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==c[e]){var n=String(c[e]);t=""===t?n:t+Sn.call("0",7-n.length)+n}return t};if(a<0||a>20)throw RangeError("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return String(i);if(i<0&&(u="-",i=-i),i>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(i*On(2,69,1))-69)<0?i*On(2,-t,1):i/On(2,t,1),n*=4503599627370496,(t=52-t)>0){for(s(0,n),r=a;r>=7;)s(1e7,0),r-=7;for(s(On(10,r,1),0),r=t-1;r>=23;)f(1<<23),r-=23;f(1<<r),s(1,1),f(2),l=p()}else s(0,n),s(1<<-t,0),l=p()+Sn.call("0",a);return l=a>0?u+((o=l.length)<=a?"0."+Sn.call("0",a-o)+l:l.slice(0,o-a)+"."+l.slice(o-a)):u+l}});var An=Object.assign,Tn=Object.defineProperty,jn=!An||i((function(){if(a&&1!==An({b:1},An(Tn({},"a",{enumerable:!0,get:function(){Tn(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=An({},e)[n]||it(An({},t)).join("")!=r}))?function(e,t){for(var n=ke(e),r=arguments.length,o=1,i=xe.f,c=l.f;r>o;)for(var u,s=g(arguments[o++]),f=i?it(s).concat(i(s)):it(s),d=f.length,p=0;d>p;)u=f[p++],a&&!c.call(s,u)||(n[u]=s[u]);return n}:An;Re({target:"Object",stat:!0,forced:Object.assign!==jn},{assign:jn});var Mn=!i((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),_n=W("IE_PROTO"),Cn=Object.prototype,Nn=Mn?Object.getPrototypeOf:function(e){return e=ke(e),b(e,_n)?e[_n]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?Cn:null};Re({target:"Object",stat:!0,forced:i((function(){Nn(1)})),sham:!Mn},{getPrototypeOf:function(e){return Nn(ke(e))}}),Re({target:"Object",stat:!0,forced:i((function(){it(1)}))},{keys:function(e){return it(ke(e))}});var Pn={};Pn[Ve("toStringTag")]="z";var Rn="[object z]"===String(Pn),In=Ve("toStringTag"),kn="Arguments"==d(function(){return arguments}()),Ln=Rn?d:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),In))?n:kn?d(t):"Object"==(r=d(t))&&"function"==typeof t.callee?"Arguments":r},Fn=Rn?{}.toString:function(){return"[object "+Ln(this)+"]"};Rn||re(Object.prototype,"toString",Fn,{unsafe:!0});var Dn=cn.trim,Un=o.parseFloat,Bn=1/Un(tn+"-0")!=-1/0?function(e){var t=Dn(String(e)),n=Un(t);return 0===n&&"-"==t.charAt(0)?-0:n}:Un;Re({global:!0,forced:parseFloat!=Bn},{parseFloat:Bn});var $n=o.Promise,Vn=_.f,qn=Ve("toStringTag"),Gn=Ve("species"),Hn=function(e){var t=ae(e),n=_.f;a&&t&&!t[Gn]&&n(t,Gn,{configurable:!0,get:function(){return this}})},Wn={},zn=Ve("iterator"),Kn=Array.prototype,Jn=Ve("iterator"),Yn=function(e,t,n,r){try{return r?t(j(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&j(o.call(e)),t}},Xn=n((function(e){var t=function(e,t){this.stopped=e,this.result=t},n=e.exports=function(e,n,r,o,i){var a,c,u,l,s,f,d,p,g=mt(n,r,o?2:1);if(i)a=e;else{if(c=function(e){if(null!=e)return e[Jn]||e["@@iterator"]||Wn[Ln(e)]}(e),"function"!=typeof c)throw TypeError("Target is not iterable");if(void 0!==(p=c)&&(Wn.Array===p||Kn[zn]===p)){for(u=0,l=fe(e.length);l>u;u++)if((s=o?g(j(d=e[u])[0],d[1]):g(e[u]))&&s instanceof t)return s;return new t(!1)}a=c.call(e)}for(f=a.next;!(d=f.call(a)).done;)if("object"==typeof(s=Yn(a,g,d.value,o))&&s&&s instanceof t)return s;return new t(!1)};n.stop=function(e){return new t(!0,e)}})),Qn=Ve("iterator"),Zn=!1;try{var er=0,tr={next:function(){return{done:!!er++}},return:function(){Zn=!0}};tr[Qn]=function(){return this},Array.from(tr,(function(){throw 2}))}catch(e){}var nr,rr,or,ir=Ve("species"),ar=function(e,t){var n,r=j(e).constructor;return void 0===r||null==(n=j(r)[ir])?t:ht(n)},cr=/(iphone|ipod|ipad).*applewebkit/i.test(He),ur=o.location,lr=o.setImmediate,sr=o.clearImmediate,fr=o.process,dr=o.MessageChannel,pr=o.Dispatch,gr=0,vr={},hr="onreadystatechange",mr=function(e){if(vr.hasOwnProperty(e)){var t=vr[e];delete vr[e],t()}},yr=function(e){return function(){mr(e)}},wr=function(e){mr(e.data)},br=function(e){o.postMessage(e+"",ur.protocol+"//"+ur.host)};lr&&sr||(lr=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return vr[++gr]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},nr(gr),gr},sr=function(e){delete vr[e]},"process"==d(fr)?nr=function(e){fr.nextTick(yr(e))}:pr&&pr.now?nr=function(e){pr.now(yr(e))}:dr&&!cr?(or=(rr=new dr).port2,rr.port1.onmessage=wr,nr=mt(or.postMessage,or,1)):!o.addEventListener||"function"!=typeof postMessage||o.importScripts||i(br)||"file:"===ur.protocol?nr=hr in E("script")?function(e){ct.appendChild(E("script")).onreadystatechange=function(){ct.removeChild(this),mr(e)}}:function(e){setTimeout(yr(e),0)}:(nr=br,o.addEventListener("message",wr,!1)));var Sr,xr,Er,Or,Ar,Tr,jr,Mr,_r={set:lr,clear:sr},Cr=T.f,Nr=_r.set,Pr=o.MutationObserver||o.WebKitMutationObserver,Rr=o.process,Ir=o.Promise,kr="process"==d(Rr),Lr=Cr(o,"queueMicrotask"),Fr=Lr&&Lr.value;Fr||(Sr=function(){var e,t;for(kr&&(e=Rr.domain)&&e.exit();xr;){t=xr.fn,xr=xr.next;try{t()}catch(e){throw xr?Or():Er=void 0,e}}Er=void 0,e&&e.enter()},kr?Or=function(){Rr.nextTick(Sr)}:Pr&&!cr?(Ar=!0,Tr=document.createTextNode(""),new Pr(Sr).observe(Tr,{characterData:!0}),Or=function(){Tr.data=Ar=!Ar}):Ir&&Ir.resolve?(jr=Ir.resolve(void 0),Mr=jr.then,Or=function(){Mr.call(jr,Sr)}):Or=function(){Nr.call(o,Sr)});var Dr,Ur,Br,$r,Vr,qr,Gr,Hr=Fr||function(e){var t={fn:e,next:void 0};Er&&(Er.next=t),xr||(xr=t,Or()),Er=t},Wr=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=ht(t),this.reject=ht(n)},zr={f:function(e){return new Wr(e)}},Kr=function(e,t){if(j(e),m(t)&&t.constructor===e)return t;var n=zr.f(e);return(0,n.resolve)(t),n.promise},Jr=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Yr=_r.set,Xr=Ve("species"),Qr="Promise",Zr=ne.get,eo=ne.set,to=ne.getterFor(Qr),no=$n,ro=o.TypeError,oo=o.document,io=o.process,ao=ae("fetch"),co=zr.f,uo=co,lo="process"==d(io),so=!!(oo&&oo.createEvent&&o.dispatchEvent),fo="unhandledrejection",po=Ne(Qr,(function(){if(!(D(no)!==String(no))){if(66===Je)return!0;if(!lo&&"function"!=typeof PromiseRejectionEvent)return!0}if(Je>=51&&/native code/.test(no))return!1;var e=no.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[Xr]=t,!(e.then((function(){}))instanceof t)})),go=po||!function(e,t){if(!t&&!Zn)return!1;var n=!1;try{var r={};r[Qn]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n}((function(e){no.all(e).catch((function(){}))})),vo=function(e){var t;return!(!m(e)||"function"!=typeof(t=e.then))&&t},ho=function(e,t,n){if(!t.notified){t.notified=!0;var r=t.reactions;Hr((function(){for(var o=t.value,i=1==t.state,a=0;r.length>a;){var c,u,l,s=r[a++],f=i?s.ok:s.fail,d=s.resolve,p=s.reject,g=s.domain;try{f?(i||(2===t.rejection&&bo(e,t),t.rejection=1),!0===f?c=o:(g&&g.enter(),c=f(o),g&&(g.exit(),l=!0)),c===s.promise?p(ro("Promise-chain cycle")):(u=vo(c))?u.call(c,d,p):d(c)):p(o)}catch(e){g&&!l&&g.exit(),p(e)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&yo(e,t)}))}},mo=function(e,t,n){var r,i;so?((r=oo.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),o.dispatchEvent(r)):r={promise:t,reason:n},(i=o["on"+e])?i(r):e===fo&&function(e,t){var n=o.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}("Unhandled promise rejection",n)},yo=function(e,t){Yr.call(o,(function(){var n,r=t.value;if(wo(t)&&(n=Jr((function(){lo?io.emit("unhandledRejection",r,e):mo(fo,e,r)})),t.rejection=lo||wo(t)?2:1,n.error))throw n.value}))},wo=function(e){return 1!==e.rejection&&!e.parent},bo=function(e,t){Yr.call(o,(function(){lo?io.emit("rejectionHandled",e):mo("rejectionhandled",e,t.value)}))},So=function(e,t,n,r){return function(o){e(t,n,o,r)}},xo=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,ho(e,t,!0))},Eo=function(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw ro("Promise can't be resolved itself");var o=vo(n);o?Hr((function(){var r={done:!1};try{o.call(n,So(Eo,e,r,t),So(xo,e,r,t))}catch(n){xo(e,r,n,t)}})):(t.value=n,t.state=1,ho(e,t,!1))}catch(n){xo(e,{done:!1},n,t)}}};po&&(no=function(e){!function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}(this,no,Qr),ht(e),Dr.call(this);var t=Zr(this);try{e(So(Eo,this,t),So(xo,this,t))}catch(e){xo(this,t,e)}},(Dr=function(e){eo(this,{type:Qr,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=function(e,t,n){for(var r in t)re(e,r,t[r],n);return e}(no.prototype,{then:function(e,t){var n=to(this),r=co(ar(this,no));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=lo?io.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&ho(this,n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),Ur=function(){var e=new Dr,t=Zr(e);this.promise=e,this.resolve=So(Eo,e,t),this.reject=So(xo,e,t)},zr.f=co=function(e){return e===no||e===Br?new Ur(e):uo(e)},"function"==typeof $n&&($r=$n.prototype.then,re($n.prototype,"then",(function(e,t){var n=this;return new no((function(e,t){$r.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof ao&&Re({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return Kr(no,ao.apply(o,arguments))}}))),Re({global:!0,wrap:!0,forced:po},{Promise:no}),qr=Qr,Gr=!1,(Vr=no)&&!b(Vr=Gr?Vr:Vr.prototype,qn)&&Vn(Vr,qn,{configurable:!0,value:qr}),Hn(Qr),Br=ae(Qr),Re({target:Qr,stat:!0,forced:po},{reject:function(e){var t=co(this);return t.reject.call(void 0,e),t.promise}}),Re({target:Qr,stat:!0,forced:po},{resolve:function(e){return Kr(this,e)}}),Re({target:Qr,stat:!0,forced:go},{all:function(e){var t=this,n=co(t),r=n.resolve,o=n.reject,i=Jr((function(){var n=ht(t.resolve),i=[],a=0,c=1;Xn(e,(function(e){var u=a++,l=!1;i.push(void 0),c++,n.call(t,e).then((function(e){l||(l=!0,i[u]=e,--c||r(i))}),o)})),--c||r(i)}));return i.error&&o(i.value),n.promise},race:function(e){var t=this,n=co(t),r=n.reject,o=Jr((function(){var o=ht(t.resolve);Xn(e,(function(e){o.call(t,e).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var Oo=Ve("match"),Ao=function(e){var t;return m(e)&&(void 0!==(t=e[Oo])?!!t:"RegExp"==d(e))},To=function(){var e=j(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t};function jo(e,t){return RegExp(e,t)}var Mo={UNSUPPORTED_Y:i((function(){var e=jo("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET:i((function(){var e=jo("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},_o=_.f,Co=Se.f,No=ne.set,Po=Ve("match"),Ro=o.RegExp,Io=Ro.prototype,ko=/a/g,Lo=/a/g,Fo=new Ro(ko)!==ko,Do=Mo.UNSUPPORTED_Y;if(a&&Ne("RegExp",!Fo||Do||i((function(){return Lo[Po]=!1,Ro(ko)!=ko||Ro(Lo)==Lo||"/a/i"!=Ro(ko,"i")})))){for(var Uo=function(e,t){var n,r=this instanceof Uo,o=Ao(e),i=void 0===t;if(!r&&o&&e.constructor===Uo&&i)return e;Fo?o&&!i&&(e=e.source):e instanceof Uo&&(i&&(t=To.call(e)),e=e.source),Do&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var a=en(Fo?new Ro(e,t):Ro(e,t),r?this:Io,Uo);return Do&&n&&No(a,{sticky:n}),a},Bo=function(e){e in Uo||_o(Uo,e,{configurable:!0,get:function(){return Ro[e]},set:function(t){Ro[e]=t}})},$o=Co(Ro),Vo=0;$o.length>Vo;)Bo($o[Vo++]);Io.constructor=Uo,Uo.prototype=Io,re(o,"RegExp",Uo)}Hn("RegExp");var qo=RegExp.prototype.exec,Go=String.prototype.replace,Ho=qo,Wo=function(){var e=/a/,t=/b*/g;return qo.call(e,"a"),qo.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),zo=Mo.UNSUPPORTED_Y||Mo.BROKEN_CARET,Ko=void 0!==/()??/.exec("")[1];(Wo||Ko||zo)&&(Ho=function(e){var t,n,r,o,i=this,a=zo&&i.sticky,c=To.call(i),u=i.source,l=0,s=e;return a&&(-1===(c=c.replace("y","")).indexOf("g")&&(c+="g"),s=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(u="(?: "+u+")",s=" "+s,l++),n=new RegExp("^(?:"+u+")",c)),Ko&&(n=new RegExp("^"+u+"$(?!\\s)",c)),Wo&&(t=i.lastIndex),r=qo.call(a?n:i,s),a?r?(r.input=r.input.slice(l),r[0]=r[0].slice(l),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:Wo&&r&&(i.lastIndex=i.global?r.index+r[0].length:t),Ko&&r&&r.length>1&&Go.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r});var Jo=Ho;Re({target:"RegExp",proto:!0,forced:/./.exec!==Jo},{exec:Jo});var Yo="toString",Xo=RegExp.prototype,Qo=Xo.toString,Zo=i((function(){return"/a/b"!=Qo.call({source:"a",flags:"b"})})),ei=Qo.name!=Yo;(Zo||ei)&&re(RegExp.prototype,Yo,(function(){var e=j(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in Xo)?To.call(e):n)}),{unsafe:!0});var ti=function(e){if(Ao(e))throw TypeError("The method doesn't accept regular expressions");return e},ni=Ve("match");Re({target:"String",proto:!0,forced:!function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[ni]=!1,"/./"[e](t)}catch(e){}}return!1}("includes")},{includes:function(e){return!!~String(v(this)).indexOf(ti(e),arguments.length>1?arguments[1]:void 0)}});var ri=Ve("species"),oi=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),ii="$0"==="a".replace(/./,"$0"),ai=Ve("replace"),ci=!!/./[ai]&&""===/./[ai]("a","$0"),ui=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),li=function(e,t,n,r){var o=Ve(e),a=!i((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),c=a&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[ri]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!a||!c||"replace"===e&&(!oi||!ii||ci)||"split"===e&&!ui){var u=/./[o],l=n(o,""[e],(function(e,t,n,r,o){return t.exec===Jo?a&&!o?{done:!0,value:u.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:ii,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:ci}),s=l[0],f=l[1];re(String.prototype,e,s),re(RegExp.prototype,o,2==t?function(e,t){return f.call(e,this,t)}:function(e){return f.call(e,this)})}r&&C(RegExp.prototype[o],"sham",!0)},si=function(e){return function(t,n){var r,o,i=String(v(t)),a=le(n),c=i.length;return a<0||a>=c?e?"":void 0:(r=i.charCodeAt(a))<55296||r>56319||a+1===c||(o=i.charCodeAt(a+1))<56320||o>57343?e?i.charAt(a):r:e?i.slice(a,a+2):o-56320+(r-55296<<10)+65536}},fi={codeAt:si(!1),charAt:si(!0)}.charAt,di=function(e,t,n){return t+(n?fi(e,t).length:1)},pi=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==d(e))throw TypeError("RegExp#exec called on incompatible receiver");return Jo.call(e,t)};li("match",1,(function(e,t,n){return[function(t){var n=v(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var o=j(e),i=String(this);if(!o.global)return pi(o,i);var a=o.unicode;o.lastIndex=0;for(var c,u=[],l=0;null!==(c=pi(o,i));){var s=String(c[0]);u[l]=s,""===s&&(o.lastIndex=di(i,fe(o.lastIndex),a)),l++}return 0===l?null:u}]}));var gi=Math.max,vi=Math.min,hi=Math.floor,mi=/\$([$&'`]|\d\d?|<[^>]*>)/g,yi=/\$([$&'`]|\d\d?)/g,wi=function(e){return void 0===e?e:String(e)};li("replace",2,(function(e,t,n,r){var o=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,a=o?"$":"$0";return[function(n,r){var o=v(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o,r):t.call(String(o),n,r)},function(e,r){if(!o&&i||"string"==typeof r&&-1===r.indexOf(a)){var u=n(t,e,this,r);if(u.done)return u.value}var l=j(e),s=String(this),f="function"==typeof r;f||(r=String(r));var d=l.global;if(d){var p=l.unicode;l.lastIndex=0}for(var g=[];;){var v=pi(l,s);if(null===v)break;if(g.push(v),!d)break;""===String(v[0])&&(l.lastIndex=di(s,fe(l.lastIndex),p))}for(var h="",m=0,y=0;y<g.length;y++){v=g[y];for(var w=String(v[0]),b=gi(vi(le(v.index),s.length),0),S=[],x=1;x<v.length;x++)S.push(wi(v[x]));var E=v.groups;if(f){var O=[w].concat(S,b,s);void 0!==E&&O.push(E);var A=String(r.apply(void 0,O))}else A=c(w,s,b,S,E,r);b>=m&&(h+=s.slice(m,b)+A,m=b+w.length)}return h+s.slice(m)}];function c(e,n,r,o,i,a){var c=r+e.length,u=o.length,l=yi;return void 0!==i&&(i=ke(i),l=mi),t.call(a,l,(function(t,a){var l;switch(a.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(c);case"<":l=i[a.slice(1,-1)];break;default:var s=+a;if(0===s)return t;if(s>u){var f=hi(s/10);return 0===f?t:f<=u?void 0===o[f-1]?a.charAt(1):o[f-1]+a.charAt(1):t}l=o[s-1]}return void 0===l?"":l}))}}));var bi=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};li("search",1,(function(e,t,n){return[function(t){var n=v(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var o=j(e),i=String(this),a=o.lastIndex;bi(a,0)||(o.lastIndex=0);var c=pi(o,i);return bi(o.lastIndex,a)||(o.lastIndex=a),null===c?-1:c.index}]}));var Si=[].push,xi=Math.min,Ei=4294967295,Oi=!i((function(){return!RegExp(Ei,"y")}));li("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(v(this)),o=void 0===n?Ei:n>>>0;if(0===o)return[];if(void 0===e)return[r];if(!Ao(e))return t.call(r,e,o);for(var i,a,c,u=[],l=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),s=0,f=new RegExp(e.source,l+"g");(i=Jo.call(f,r))&&!((a=f.lastIndex)>s&&(u.push(r.slice(s,i.index)),i.length>1&&i.index<r.length&&Si.apply(u,i.slice(1)),c=i[0].length,s=a,u.length>=o));)f.lastIndex===i.index&&f.lastIndex++;return s===r.length?!c&&f.test("")||u.push(""):u.push(r.slice(s)),u.length>o?u.slice(0,o):u}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var o=v(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,o,n):r.call(String(o),t,n)},function(e,o){var i=n(r,e,this,o,r!==t);if(i.done)return i.value;var a=j(e),c=String(this),u=ar(a,RegExp),l=a.unicode,s=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(Oi?"y":"g"),f=new u(Oi?a:"^(?:"+a.source+")",s),d=void 0===o?Ei:o>>>0;if(0===d)return[];if(0===c.length)return null===pi(f,c)?[c]:[];for(var p=0,g=0,v=[];g<c.length;){f.lastIndex=Oi?g:0;var h,m=pi(f,Oi?c:c.slice(g));if(null===m||(h=xi(fe(f.lastIndex+(Oi?0:g)),c.length))===p)g=di(c,g,l);else{if(v.push(c.slice(p,g)),v.length===d)return v;for(var y=1;y<=m.length-1;y++)if(v.push(m[y]),v.length===d)return v;g=p=h}}return v.push(c.slice(p)),v}]}),!Oi);for(var Ai in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var Ti=o[Ai],ji=Ti&&Ti.prototype;if(ji&&ji.forEach!==_t)try{C(ji,"forEach",_t)}catch(e){ji.forEach=_t}}var Mi,_i=n((function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})),Ci=(Mi=_i)&&Mi.__esModule&&Object.prototype.hasOwnProperty.call(Mi,"default")?Mi.default:Mi;function Ni(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e}function Pi(e){var t=e.replace(/([A-Z])/g,"_$1").toLowerCase();return"_"===t[0]?t.substr(1):t}function Ri(e){return JSON.parse(JSON.stringify(e))}function Ii(e){void 0===e&&(e=5);for(var t="";e--;)t+=Math.floor(10*Math.random());return t}function ki(e,t){void 0===t&&(t={isNaNAsNumber:!1,isUnFiniteAsNumber:!1});var n=Object.assign({isNaNAsNumber:!1,isUnFiniteAsNumber:!1},t),r=n.isNaNAsNumber,o=!0;return"number"!=typeof e&&(o=!1),!1!==n.isUnFiniteAsNumber||isFinite(e)||(o=!1),!1===r&&isNaN(e)&&(o=!1),o}function Li(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=null;return e&&"function"==typeof e&&(r=e.apply(void 0,t)),r}function Fi(){return Date.now?Date.now():(new Date).getTime()}function Di(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""}function Ui(){try{var e=navigator.userAgent.toLowerCase(),t=function(t){return t.test(e)},n=function(t){var n=e.match(t),r="";return n&&(r=n.toString().replace(/[^0-9|_.]/g,"").replace(/_/g,".")),r},r="",o="";t(/windows|win32|win64|wow32|wow64/g)?r="windows":t(/macintosh|macintel/g)?r="macos":t(/x11/g)?r="linux":t(/android|adr/g)?r="android":t(/ios|iphone|ipad|ipod|iwatch/g)&&(r="ios",t(/iphone/g)?o="iphone":t(/ipad/g)?o="ipad":t(/iwatch/g)?o="iwatch":t(/ipod/g)&&(o="ipod"));var i="";"windows"===r?t(/windows nt 5.0|windows 2000/g)?i="2000":t(/windows nt 5.1|windows xp/g)?i="xp":t(/windows nt 5.2|windows 2003/g)?i="2003":t(/windows nt 6.0|windows vista/g)?i="vista":t(/windows nt 6.1|windows 7/g)?i="7":t(/windows nt 6.2|windows 8/g)?i="8":t(/windows nt 6.3|windows 8.1/g)?i="8.1":t(/windows nt 10.0|windows 10/g)&&(i="10"):"macos"===r?i=n(/os x [\d._]+/g):"android"===r?i=n(/android [\d._]+/g):"ios"===r&&(i=n(/os [\d._]+/g));var a="";"windows"===r||"macos"===r||"linux"===r?a="desktop":("android"===r||"ios"===r||t(/mobile/g))&&(a="mobile");var c="",u="";t(/applewebkit/g)?(c="webkit",t(/edge/g)?u="edge":t(/opr/g)?u="opera":t(/chrome/g)?u="chrome":t(/safari/g)&&(u="safari")):t(/gecko/g)&&t(/firefox/g)?(c="gecko",u="firefox"):t(/presto/g)?(c="presto",u="opera"):t(/trident|compatible|msie/g)&&(c="trident",u="iexplore");var l="";"webkit"===c?l=n(/applewebkit\/[\d._]+/g):"gecko"===c?l=n(/gecko\/[\d._]+/g):"presto"===c?l=n(/presto\/[\d._]+/g):"trident"===c&&(l=n(/trident\/[\d._]+/g));var s="";"chrome"===u?s=n(/chrome\/[\d._]+/g):"safari"===u?s=n(/version\/[\d._]+/g):"firefox"===u?s=n(/firefox\/[\d._]+/g):"opera"===u?s=n(/opr\/[\d._]+/g):"iexplore"===u?s=n(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===u&&(s=n(/edge\/[\d._]+/g));var f="",d="";return t(/micromessenger/g)?(f="wechat",d=n(/micromessenger\/[\d._]+/g)):t(/qqbrowser/g)?(f="qq_browser",d=n(/qqbrowser\/[\d._]+/g)):t(/\sqq/g)?f="qq_app":t(/ucbrowser/g)?(f="uc",d=n(/ucbrowser\/[\d._]+/g)):t(/qihu 360se/g)?f="360":t(/2345explorer/g)?(f="2345",d=n(/2345explorer\/[\d._]+/g)):t(/metasr/g)?f="sougou":t(/lbbrowser/g)?f="liebao":t(/maxthon/g)?(f="maxthon",d=n(/maxthon\/[\d._]+/g)):t(/biliapp/g)&&(f="bilibili"),Object.assign({engine:c,engineVs:l,platform:a,supporter:u,supporterVs:s,system:r,systemVs:i},{shell:f,shellVs:d,appleType:o})}catch(e){return console.warn("mazey:",e),{engine:"",engineVs:"",platform:"",supporter:"",supporterVs:"",system:"",systemVs:""}}}return e.addClass=function(e,t){var n,r=e.className,o="";""!==r&&(o=" "),n=r+o+t,e.className=n},e.addStyle=function(e,t){if(void 0===t&&(t={id:""}),!e)return!1;var n=document.createDocumentFragment(),r=null,o="",i=document.createElement("style");return t.id?(o="".concat(t.id),(r=document.getElementById(o))?r.innerHTML=e:(i.setAttribute("id",t.id),i.innerHTML=e,n.appendChild(i),document.head.appendChild(n))):(i.innerHTML=e,n.appendChild(i),document.head.appendChild(n)),!0},e.calLongestCommonSubsequence=function(e,t){for(var n=e.length,r=t.length,o=Ri(new Array(n).fill(new Array(r).fill(0))),i=0;i<n;++i)for(var a=0;a<r;++a)if(e[i]===t[a]){var c=0;i>0&&a>0&&(c=o[i-1][a-1]),o[i][a]=c+1}else{var u=[0,0],l=u[0],s=u[1];a>0&&(l=o[i][a-1]),i>0&&(s=o[i-1][a]),o[i][a]=Math.max(l,s)}var f=Array.prototype.concat.apply([],o);return Math.max.apply(Math,f)},e.calLongestCommonSubstring=function(e,t){for(var n=e.length,r=t.length,o=Ri(new Array(n).fill(new Array(r).fill(0))),i=0;i<n;++i)for(var a=0;a<r;++a)if(e[i]===t[a]){var c=0;i>0&&a>0&&(c=o[i-1][a-1]),o[i][a]=c+1}var u=Array.prototype.concat.apply([],o);return Math.max.apply(Math,u)},e.camelCase2Underscore=Pi,e.camelCaseToKebabCase=function(e){var t=e.replace(/([A-Z])/g,"-$1").toLowerCase();return"-"===t[0]?t.substr(1):t},e.cancelBubble=function(e){var t=e||window.event;t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},e.clearHtml=function(e){return e.replace(/<\/?.+?>/g,"").replace(/[\r\n]/g,"")},e.cutCHSString=function(e,t,n){if(void 0===n&&(n=!1),""!=e&&e){for(var r=0,o="",i=/[^\x00-\xff]/g,a="",c=e.replace(i,"**").length,u=0;u<c&&(null!=(a=e.charAt(u).toString()).match(i)?r+=2:r++,!(r>t));u++)o+=a;return n&&c>t&&(o+="..."),o}return""},e.debounce=function(e,t,n){var r=null,o=null,i=null,a=null,c=null,u=function u(){var l=Fi()-i;l<t&&l>=0?o=setTimeout(u,t-l):(o=null,n||(c=e.apply(r,a),o||(r=a=null)))};return function(){for(var l=[],s=0;s<arguments.length;s++)l[s]=arguments[s];r=this,a=l,i=Fi();var f=n&&!o;return o||(o=setTimeout(u,t)),f&&(c=e.apply(r,a),r=a=null),c}},e.deepCopyObject=Ri,e.doFn=Li,e.floatFixed=function(e,t){return void 0===t&&(t=0),parseFloat(e).toFixed(t)},e.floatToPercent=function(e,t){void 0===t&&(t=0);var n="";return n=t?(100*e).toFixed(t):String(Math.floor(100*e)),"".concat(n,"%")},e.formatDate=function(e,t){void 0===t&&(t="yyyy-MM-dd"),e||(e=new Date);var n=new Date(e),r={yyyy:n.getFullYear(),MM:n.getMonth()+1,dd:n.getDate(),hh:n.getHours()<10?"0"+n.getHours():n.getHours(),mm:n.getMinutes()<10?"0"+n.getMinutes():n.getMinutes(),ss:n.getSeconds()<10?"0"+n.getSeconds():n.getSeconds()},o=t||"yyyy-MM-dd";return Object.keys(r).forEach((function(e){var t=r[e];"MM"===e&&Number(t)<=9&&(t="0".concat(t)),o=o.replace(e,String(t))})),o},e.friendlyInterval=function(e,t,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n={type:"d"});var r=n.type;ki(e)||(e=new Date(e).getTime()),ki(t)||(t=new Date(t).getTime());var o=t-e,i="",a=new Array(4).fill(0),c=a[0],u=(a[1],a[2],a[3]);if(o>=0)switch(c=Math.floor(o/1e3/60/60/24),Math.floor(o/1e3/60/60),Math.floor(o/1e3/60),u=Math.floor(o/1e3),r){case"d":i=c;break;case"text":i=(c=Math.floor(o/1e3/60/60/24))+" 天 "+Math.floor(o/1e3/60/60%24)+" 时 "+Math.floor(o/1e3/60%60)+" 分 "+(u=Math.floor(o/1e3%60))+" 秒";break;default:i=u}return i},e.genCustomConsole=function(e,t){void 0===e&&(e=""),void 0===t&&(t={isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",logFn:function(){},errorFn:function(){}});var n=Object.assign({isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",logFn:function(){},errorFn:function(){}},t),r=n.isClosed,o=n.showWrap,i=n.showDate,a=n.locales,c=n.logFn,u=n.errorFn,l=Object.create(null),s=function(){return(new Date).toLocaleDateString(a,{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})};return["log","info","warn","error"].forEach((function(t){l[t]=function(){for(var n,a,l=[],f=0;f<arguments.length;f++)l[f]=arguments[f];if(r)return!1;var d=e,p=e;if("string"==typeof e&&e.length>=2){var g=e.length;d=":"===e[g-1]?e.substring(0,g-1):e}o&&console.log("--- ".concat(d," - begin ---")),i&&(p=e?"".concat(s()," ").concat(e):"".concat(s())),e||i?(n=console)[t].apply(n,Ni([p],l)):(a=console)[t].apply(a,l),"log"===t&&c(),"error"===t&&u(),o&&console.log("--- ".concat(d," - end ---"))}})),l},e.genHashCode=function(e){var t,n=0;for(t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return n},e.generateRndNum=Ii,e.generateUniqueNum=function(e){void 0===e&&(e=3);var t=[Fi(),Ii(e||3)];return t[0]+t[1]},e.getBrowserInfo=Ui,e.getCookie=Di,e.getDomain=function(e,t){void 0===t&&(t=["hostname"]);var n=document.createElement("a");return n.href=e,t.reduce((function(e,t){return e+=n[t]}),"")},e.getFileSize=function(e){var t=function(e){return String(Math.ceil(e))};if(!e)return"";var n=1024;return e<n?e+" B":e<Math.pow(n,2)?t(e/n)+" KB":e<Math.pow(n,3)?t(e/Math.pow(n,2))+" MB":e<Math.pow(n,4)?t(e/Math.pow(n,3))+" G":t(e/Math.pow(n,4))+" T"},e.getHashQueryParam=function(e){var t=location.hash.split("?");if(1===t.length)return"";var n=new RegExp("(^|&)".concat(e,"=([^&]*)(&|$)")),r=t[1].match(n);return r?r[2]:""},e.getLocalStorage=function(e){var t=null;if(e){var n=localStorage.getItem(e);n&&(t=JSON.parse(n))}return t},e.getPerformance=function(e){var t,n;void 0===e&&(e=!1);var r,o,i=new Promise((function(e,r){var o;t=(o=[e,r])[0],n=o[1]})),a=window.performance.timing,c=a.navigationStart||a.fetchStart;function u(){try{if(window.performance&&Boolean(window.performance.getEntriesByType))window.performance.getEntriesByType("paint").forEach((function(e,t,n){var i=Math.round(e.startTime);"first-paint"===e.name?r=i:"first-contentful-paint"===e.name&&(o=i)}));else console.error("paint")}catch(e){console.error(e.message)}if(window.performance&&"function"==typeof window.performance.getEntries){var i,u=(window.performance.getEntries()||[])[0]||{},v={os:l(),osVersion:s(),deviceType:f(),network:d(),screenDirection:p(),unloadTime:a.unloadEventEnd-a.unloadEventStart,redirectTime:a.redirectEnd-a.redirectStart,dnsTime:a.domainLookupEnd-a.domainLookupStart,tcpTime:a.connectEnd-a.connectStart,sslTime:g(a.connectEnd,a.secureConnectionStart),responseTime:a.responseStart-a.requestStart,downloadTime:a.responseEnd-a.responseStart,firstPaintTime:r,firstContentfulPaintTime:o,domreadyTime:a.domContentLoadedEventStart-c||0,onloadTime:a.loadEventStart-c||0,whiteTime:a.responseStart-c,renderTime:a.loadEventEnd-c||0,decodedBodySize:u.decodedBodySize||"",encodedBodySize:u.encodedBodySize||""};if(Object.keys(v).forEach((function(e){ki(v[e])&&v[e]<0&&(v[e]=0)})),ki(v.whiteTime)&&v.whiteTime>v.onloadTime&&(v.whiteTime=0),c>0)e||Object.keys(v).forEach((function(e){i||(i={}),i[Pi(e)]=v[e]})),t(i||v);else n(Error("startTime"))}else n(Error("getEntries"))}function l(){return navigator.userAgent.indexOf("Android")>-1||navigator.userAgent.indexOf("Linux")>-1?"android":navigator.userAgent.indexOf("iPhone")>-1?"ios":navigator.userAgent.indexOf("Windows Phone")>-1?"wp":"others"}function s(){var e,t=navigator.userAgent,n=t.indexOf("Android")>-1||t.indexOf("Linux")>-1,r=!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return n&&(e=(navigator.userAgent.split(";")[1].match(/\d+\.\d+/g)||[])[0]),r&&(e=(navigator.userAgent.split(";")[1].match(/(\d+)_(\d+)_?(\d+)?/)||[])[0]),e}function f(){var e=navigator.userAgent.toLowerCase(),t=e.match(/(ipad)/i)&&"ipad",n=e.match(/iphone os/i)&&"iphone os",r=e.match(/midp/i)&&"midp",o=e.match(/rv:1.2.3.4/i)&&"rv:1.2.3.4",i=e.match(/ucweb/i)&&"ucweb",a=e.match(/android/i)&&"android",c=e.match(/windows ce/i)&&"windows ce",u=e.match(/windows mobile/i)&&"windows mobile";return t||n||r||o||i||a||c||u?n||r||o||i||a||c||u?"phone":t?"ipad":void 0:"pc"}function d(){var e;if(navigator.connection&&navigator.connection.effectiveType)switch(navigator.connection.effectiveType){case"wifi":e="wifi";break;case"4g":e="4g";break;case"2g":e="2g";break;case"3g":e="3g";break;case"ethernet":e="ethernet";break;case"default":e=void 0}return e}function p(){var e;return window.screen&&window.screen.orientation&&window.screen.orientation.angle&&(180!==window.screen.orientation.angle&&0!==window.screen.orientation.angle||(e="|"),90!==window.screen.orientation.angle&&-90!==window.screen.orientation.angle||(e="-")),e}function g(e,t){var n;return t&&(n=e-t),n}return window.performance&&window.performance.timing&&window.performance.timing.loadEventEnd>0?u():window.addEventListener("load",(function(){window.setTimeout((function(){u()}),0)})),i},e.getQueryParam=function(e){var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),n=location.search.substr(1).match(t);return null!==n?decodeURIComponent(n[2]):""},e.getSessionStorage=function(e){var t=null;if(e){var n=sessionStorage.getItem(e);n&&(t=JSON.parse(n))}return t},e.getUrlParam=function(e,t){var n={};return e.replace(/\??(\w+)=([^&]*)&?/g,(function(e,t,r){if(void 0!==n[t]){var o=n[t];n[t]=[].concat(o,r)}else n[t]=r})),n[t]||""},e.hasClass=function(e,t){for(var n=e.className.split(/\s+/),r=0;r<n.length;r++)if(n[r]===t)return!0;return!1},e.inRate=function(e){return Math.random()<e},e.isJsonString=function(e){try{if("object"===Ci(JSON.parse(e)))return!0}catch(e){}return!1},e.isNonEmptyArray=function(e){var t=!1;return Array.isArray(e)&&e.length&&(t=!0),t},e.isNumber=ki,e.isSafePWAEnv=function(){var e=Ui();return!(!("serviceWorker"in navigator&&function(){var e;try{return e=new Function("return async function(){};")(),null!=Object.getPrototypeOf(e).constructor}catch(e){return!1}}()&&"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")&&Boolean(window.fetch)&&Boolean(window.indexedDB)&&Boolean(window.caches))||e.shell)},e.isSupportWebp=function(){return new Promise((function(e){var t=new Image;t.onload=function(){e(t.width>0&&t.height>0)},t.onerror=function(){e(!1)},t.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="}))},e.isValidData=function(e,t,n){var r=!1;return t.reduce((function(e,t){return e[t]?e=e[t]:Object.create(null)}),e)===n&&(r=!0),r},e.loadCSS=function(e,t){void 0===t&&(t={id:""});var n,r=t.id,o=new Promise((function(e,t){n=[e,t][0]})),i=function(){n(!0)},a=document.createElement("link"),c="onload"in a,u=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/?(\d+).*/i,"$1")<536;if(a.rel="stylesheet",a.type="text/css",a.href=e,void 0!==r&&(a.id=r),document.getElementsByTagName("head")[0].appendChild(a),u||!c)return setTimeout((function(){s(a,i,0)}),1),o;function l(){a.onload=a.onerror=a.onreadystatechange=null,a=null,i()}function s(e,t,n){var r,o=e.sheet;if((n+=1)>3e5)return r=!0,e=null,void t();if(u)o&&(r=!0);else if(o)try{o.cssRules&&(r=!0)}catch(e){"NS_ERROR_DOM_SECURITY_ERR"===e.name&&(r=!0)}setTimeout((function(){r?t():s(e,t,n)}),20)}return c?(a.onload=l,a.onerror=function(){l()}):a.onreadystatechange=function(){/loaded|complete/.test(a.readyState)&&l()},o},e.loadScript=function(e,t){void 0===t&&(t={id:"",callback:function(){},timeout:5e3,isDefer:!1});var n=Object.assign({id:"",callback:function(){},timeout:5e3,isDefer:!1},t),r=n.id,o=n.callback,i=n.timeout,a=n.isDefer,c=null,u=null,l=document.createElement("script"),s=document.getElementsByTagName("script")[0];return l.type="text/javascript",a&&(l.defer="defer"),r&&(l.id=r),l.readyState?l.onreadystatechange=function(){"loaded"!==l.readyState&&"complete"!==l.readyState||(l.onreadystatechange=null,Li(o),Li(c,!0))}:l.onload=function(){Li(o),Li(c,!0)},l.src=e,s&&s.parentNode.insertBefore(l,s),new Promise((function(e,t){var n;c=(n=[e,t])[0],u=n[1],i&&setTimeout(u.bind(null,Error("timeout")),i)}))},e.mNow=Fi,e.mTrim=function(e){for(var t=(e=e.replace(/^\s+/,"")).length-1,n=/\s/;n.test(e.charAt(t));)t--;return e.slice(0,t+1)},e.newLine=function(e){if(!e)return"";var t=new RegExp("\\n","g");return e.replace(t,"<br />")},e.removeClass=function(e,t){var n;n=(n=(n=(n=" "+e.className+" ").replace(/(\s+)/gi," ")).replace(" "+t+" "," ")).replace(/(^\s+)|(\s+$)/g,""),e.className=n},e.setCookie=function(e,t,n,r){var o,i,a;n?((a=new Date).setTime(a.getTime()+24*n*60*60*1e3),i="; expires="+a.toGMTString()):i="";var c=location.host;1===c.split(".").length?document.cookie=e+"="+t+i+"; path=/":((o=c.split(".")).shift(),r=r||"."+o.join("."),document.cookie=e+"="+t+i+"; path=/; domain="+r,null!==Di(e)&&Di(e)===t||(r=r||"."+c,document.cookie=e+"="+t+i+"; path=/; domain="+r))},e.setLocalStorage=function(e,t){void 0===t&&(t=null),e&&localStorage.setItem(e,JSON.stringify(t))},e.setSessionStorage=function(e,t){void 0===t&&(t=null),e&&sessionStorage.setItem(e,JSON.stringify(t))},e.throttle=function(e,t,n){void 0===n&&(n={}),n=Object.assign({},n);var r=null,o=null,i=null,a=[null,0],c=a[0],u=a[1],l=function(){u=!1===n.leading?0:Fi(),i=null,c=e.apply(r,o),i||(r=o=null)};return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var f=Fi();u||!1!==n.leading||(u=f);var d=t-(f-u);return r=this,o=a,d<=0||d>t?(i&&(clearTimeout(i),i=null),u=f,c=e.apply(r,o),i||(r=o=null)):i||!1===n.trailing||(i=setTimeout(l,d)),c}},e.updateQueryParam=function(e,t,n){var r=new RegExp("([?&])"+t+"=.*?(&|$)","i"),o=-1!==e.indexOf("?")?"&":"?";return e.match(r)?e.replace(r,"$1"+t+"="+n+"$2"):e+o+t+"="+n},e.windowLoaded=function(e){void 0===e&&(e=90);var t,n=function(){},r=new Promise((function(e,r){n=e,t=r}));return"complete"===document.readyState?n("complete"):window.addEventListener("load",(function(){return n("load")})),setTimeout((function(){return t(Error("timeout"))}),1e3*e),r},e.zAxiosIsValidRes=function(e,t){void 0===t&&(t={validStatusRange:[200,300],validCode:[0]});var n=Object.assign({validStatusRange:[200,300],validCode:[0]},t),r=n.validStatusRange,o=n.validCode;2!==r.length&&console.error("valid validStatusRange is required");var i=!1;if(e&&e.status&&2===r.length&&e.status>=r[0]&&e.status<r[1]){var a=e.data;a&&o.includes(a.code)&&(i=!0)}return i},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
|
|
6
|
+
var mazey=function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e,t){return e(t={exports:{}},t.exports),t.exports}var r=function(e){return e&&e.Math==Math&&e},o=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof t&&t)||Function("return this")(),i=function(e){try{return!!e()}catch(e){return!0}},a=!i((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),c={}.propertyIsEnumerable,u=Object.getOwnPropertyDescriptor,l={f:u&&!c.call({1:2},1)?function(e){var t=u(this,e);return!!t&&t.enumerable}:c},s=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},f={}.toString,d=function(e){return f.call(e).slice(8,-1)},p="".split,g=i((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==d(e)?p.call(e,""):Object(e)}:Object,v=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},h=function(e){return g(v(e))},m=function(e){return"object"==typeof e?null!==e:"function"==typeof e},y=function(e,t){if(!m(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!m(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!m(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!m(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},w={}.hasOwnProperty,b=function(e,t){return w.call(e,t)},S=o.document,x=m(S)&&m(S.createElement),E=function(e){return x?S.createElement(e):{}},O=!a&&!i((function(){return 7!=Object.defineProperty(E("div"),"a",{get:function(){return 7}}).a})),A=Object.getOwnPropertyDescriptor,T={f:a?A:function(e,t){if(e=h(e),t=y(t,!0),O)try{return A(e,t)}catch(e){}if(b(e,t))return s(!l.f.call(e,t),e[t])}},j=function(e){if(!m(e))throw TypeError(String(e)+" is not an object");return e},M=Object.defineProperty,_={f:a?M:function(e,t,n){if(j(e),t=y(t,!0),j(n),O)try{return M(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},C=a?function(e,t,n){return _.f(e,t,s(1,n))}:function(e,t,n){return e[t]=n,e},N=function(e,t){try{C(o,e,t)}catch(n){o[e]=t}return t},P="__core-js_shared__",R=o[P]||N(P,{}),I=Function.toString;"function"!=typeof R.inspectSource&&(R.inspectSource=function(e){return I.call(e)});var k,L,F,D=R.inspectSource,U=o.WeakMap,B="function"==typeof U&&/native code/.test(D(U)),$=n((function(e){(e.exports=function(e,t){return R[e]||(R[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),V=0,q=Math.random(),G=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++V+q).toString(36)},H=$("keys"),W=function(e){return H[e]||(H[e]=G(e))},z={},K=o.WeakMap;if(B){var J=new K,Y=J.get,X=J.has,Q=J.set;k=function(e,t){return Q.call(J,e,t),t},L=function(e){return Y.call(J,e)||{}},F=function(e){return X.call(J,e)}}else{var Z=W("state");z[Z]=!0,k=function(e,t){return C(e,Z,t),t},L=function(e){return b(e,Z)?e[Z]:{}},F=function(e){return b(e,Z)}}var ee,te,ne={set:k,get:L,has:F,enforce:function(e){return F(e)?L(e):k(e,{})},getterFor:function(e){return function(t){var n;if(!m(t)||(n=L(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}},re=n((function(e){var t=ne.get,n=ne.enforce,r=String(String).split("String");(e.exports=function(e,t,i,a){var c=!!a&&!!a.unsafe,u=!!a&&!!a.enumerable,l=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof t||b(i,"name")||C(i,"name",t),n(i).source=r.join("string"==typeof t?t:"")),e!==o?(c?!l&&e[t]&&(u=!0):delete e[t],u?e[t]=i:C(e,t,i)):u?e[t]=i:N(t,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&t(this).source||D(this)}))})),oe=o,ie=function(e){return"function"==typeof e?e:void 0},ae=function(e,t){return arguments.length<2?ie(oe[e])||ie(o[e]):oe[e]&&oe[e][t]||o[e]&&o[e][t]},ce=Math.ceil,ue=Math.floor,le=function(e){return isNaN(e=+e)?0:(e>0?ue:ce)(e)},se=Math.min,fe=function(e){return e>0?se(le(e),9007199254740991):0},de=Math.max,pe=Math.min,ge=function(e,t){var n=le(e);return n<0?de(n+t,0):pe(n,t)},ve=function(e){return function(t,n,r){var o,i=h(t),a=fe(i.length),c=ge(r,a);if(e&&n!=n){for(;a>c;)if((o=i[c++])!=o)return!0}else for(;a>c;c++)if((e||c in i)&&i[c]===n)return e||c||0;return!e&&-1}},he={includes:ve(!0),indexOf:ve(!1)},me=he.indexOf,ye=function(e,t){var n,r=h(e),o=0,i=[];for(n in r)!b(z,n)&&b(r,n)&&i.push(n);for(;t.length>o;)b(r,n=t[o++])&&(~me(i,n)||i.push(n));return i},we=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],be=we.concat("length","prototype"),Se={f:Object.getOwnPropertyNames||function(e){return ye(e,be)}},xe={f:Object.getOwnPropertySymbols},Ee=ae("Reflect","ownKeys")||function(e){var t=Se.f(j(e)),n=xe.f;return n?t.concat(n(e)):t},Oe=function(e,t){for(var n=Ee(t),r=_.f,o=T.f,i=0;i<n.length;i++){var a=n[i];b(e,a)||r(e,a,o(t,a))}},Ae=/#|\.prototype\./,Te=function(e,t){var n=Me[je(e)];return n==Ce||n!=_e&&("function"==typeof t?i(t):!!t)},je=Te.normalize=function(e){return String(e).replace(Ae,".").toLowerCase()},Me=Te.data={},_e=Te.NATIVE="N",Ce=Te.POLYFILL="P",Ne=Te,Pe=T.f,Re=function(e,t){var n,r,i,a,c,u=e.target,l=e.global,s=e.stat;if(n=l?o:s?o[u]||N(u,{}):(o[u]||{}).prototype)for(r in t){if(a=t[r],i=e.noTargetGet?(c=Pe(n,r))&&c.value:n[r],!Ne(l?r:u+(s?".":"#")+r,e.forced)&&void 0!==i){if(typeof a==typeof i)continue;Oe(a,i)}(e.sham||i&&i.sham)&&C(a,"sham",!0),re(n,r,a,e)}},Ie=Array.isArray||function(e){return"Array"==d(e)},ke=function(e){return Object(v(e))},Le=function(e,t,n){var r=y(t);r in e?_.f(e,r,s(0,n)):e[r]=n},Fe=!!Object.getOwnPropertySymbols&&!i((function(){return!String(Symbol())})),De=Fe&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Ue=$("wks"),Be=o.Symbol,$e=De?Be:Be&&Be.withoutSetter||G,Ve=function(e){return b(Ue,e)||(Fe&&b(Be,e)?Ue[e]=Be[e]:Ue[e]=$e("Symbol."+e)),Ue[e]},qe=Ve("species"),Ge=function(e,t){var n;return Ie(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!Ie(n.prototype)?m(n)&&null===(n=n[qe])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)},He=ae("navigator","userAgent")||"",We=o.process,ze=We&&We.versions,Ke=ze&&ze.v8;Ke?te=(ee=Ke.split("."))[0]+ee[1]:He&&(!(ee=He.match(/Edge\/(\d+)/))||ee[1]>=74)&&(ee=He.match(/Chrome\/(\d+)/))&&(te=ee[1]);var Je=te&&+te,Ye=Ve("species"),Xe=function(e){return Je>=51||!i((function(){var t=[];return(t.constructor={})[Ye]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Qe=Ve("isConcatSpreadable"),Ze=9007199254740991,et="Maximum allowed index exceeded",tt=Je>=51||!i((function(){var e=[];return e[Qe]=!1,e.concat()[0]!==e})),nt=Xe("concat"),rt=function(e){if(!m(e))return!1;var t=e[Qe];return void 0!==t?!!t:Ie(e)};Re({target:"Array",proto:!0,forced:!tt||!nt},{concat:function(e){var t,n,r,o,i,a=ke(this),c=Ge(a,0),u=0;for(t=-1,r=arguments.length;t<r;t++)if(rt(i=-1===t?a:arguments[t])){if(u+(o=fe(i.length))>Ze)throw TypeError(et);for(n=0;n<o;n++,u++)n in i&&Le(c,u,i[n])}else{if(u>=Ze)throw TypeError(et);Le(c,u++,i)}return c.length=u,c}});var ot,it=Object.keys||function(e){return ye(e,we)},at=a?Object.defineProperties:function(e,t){j(e);for(var n,r=it(t),o=r.length,i=0;o>i;)_.f(e,n=r[i++],t[n]);return e},ct=ae("document","documentElement"),ut=W("IE_PROTO"),lt=function(){},st=function(e){return"<script>"+e+"</"+"script>"},ft=function(){try{ot=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;ft=ot?function(e){e.write(st("")),e.close();var t=e.parentWindow.Object;return e=null,t}(ot):((t=E("iframe")).style.display="none",ct.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(st("document.F=Object")),e.close(),e.F);for(var n=we.length;n--;)delete ft.prototype[we[n]];return ft()};z[ut]=!0;var dt=Object.create||function(e,t){var n;return null!==e?(lt.prototype=j(e),n=new lt,lt.prototype=null,n[ut]=e):n=ft(),void 0===t?n:at(n,t)},pt=Ve("unscopables"),gt=Array.prototype;null==gt[pt]&&_.f(gt,pt,{configurable:!0,value:dt(null)});var vt=function(e){gt[pt][e]=!0};Re({target:"Array",proto:!0},{fill:function(e){for(var t=ke(this),n=fe(t.length),r=arguments.length,o=ge(r>1?arguments[1]:void 0,n),i=r>2?arguments[2]:void 0,a=void 0===i?n:ge(i,n);a>o;)t[o++]=e;return t}}),vt("fill");var ht=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e},mt=function(e,t,n){if(ht(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}},yt=[].push,wt=function(e){var t=1==e,n=2==e,r=3==e,o=4==e,i=6==e,a=5==e||i;return function(c,u,l,s){for(var f,d,p=ke(c),v=g(p),h=mt(u,l,3),m=fe(v.length),y=0,w=s||Ge,b=t?w(c,m):n?w(c,0):void 0;m>y;y++)if((a||y in v)&&(d=h(f=v[y],y,p),e))if(t)b[y]=d;else if(d)switch(e){case 3:return!0;case 5:return f;case 6:return y;case 2:yt.call(b,f)}else if(o)return!1;return i?-1:r||o?o:b}},bt={forEach:wt(0),map:wt(1),filter:wt(2),some:wt(3),every:wt(4),find:wt(5),findIndex:wt(6)},St=function(e,t){var n=[][e];return!!n&&i((function(){n.call(null,t||function(){throw 1},1)}))},xt=Object.defineProperty,Et={},Ot=function(e){throw e},At=function(e,t){if(b(Et,e))return Et[e];t||(t={});var n=[][e],r=!!b(t,"ACCESSORS")&&t.ACCESSORS,o=b(t,0)?t[0]:Ot,c=b(t,1)?t[1]:void 0;return Et[e]=!!n&&!i((function(){if(r&&!a)return!0;var e={length:-1};r?xt(e,1,{enumerable:!0,get:Ot}):e[1]=1,n.call(e,o,c)}))},Tt=bt.forEach,jt=St("forEach"),Mt=At("forEach"),_t=jt&&Mt?[].forEach:function(e){return Tt(this,e,arguments.length>1?arguments[1]:void 0)};Re({target:"Array",proto:!0,forced:[].forEach!=_t},{forEach:_t});var Ct=he.includes;Re({target:"Array",proto:!0,forced:!At("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return Ct(this,e,arguments.length>1?arguments[1]:void 0)}}),vt("includes");var Nt=he.indexOf,Pt=[].indexOf,Rt=!!Pt&&1/[1].indexOf(1,-0)<0,It=St("indexOf"),kt=At("indexOf",{ACCESSORS:!0,1:0});Re({target:"Array",proto:!0,forced:Rt||!It||!kt},{indexOf:function(e){return Rt?Pt.apply(this,arguments)||0:Nt(this,e,arguments.length>1?arguments[1]:void 0)}});var Lt=[].join,Ft=g!=Object,Dt=St("join",",");Re({target:"Array",proto:!0,forced:Ft||!Dt},{join:function(e){return Lt.call(h(this),void 0===e?",":e)}});var Ut=function(e){return function(t,n,r,o){ht(n);var i=ke(t),a=g(i),c=fe(i.length),u=e?c-1:0,l=e?-1:1;if(r<2)for(;;){if(u in a){o=a[u],u+=l;break}if(u+=l,e?u<0:c<=u)throw TypeError("Reduce of empty array with no initial value")}for(;e?u>=0:c>u;u+=l)u in a&&(o=n(o,a[u],u,i));return o}},Bt={left:Ut(!1),right:Ut(!0)}.left,$t=St("reduce"),Vt=At("reduce",{1:0});Re({target:"Array",proto:!0,forced:!$t||!Vt},{reduce:function(e){return Bt(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}});var qt=Xe("slice"),Gt=At("slice",{ACCESSORS:!0,0:0,1:2}),Ht=Ve("species"),Wt=[].slice,zt=Math.max;Re({target:"Array",proto:!0,forced:!qt||!Gt},{slice:function(e,t){var n,r,o,i=h(this),a=fe(i.length),c=ge(e,a),u=ge(void 0===t?a:t,a);if(Ie(i)&&("function"!=typeof(n=i.constructor)||n!==Array&&!Ie(n.prototype)?m(n)&&null===(n=n[Ht])&&(n=void 0):n=void 0,n===Array||void 0===n))return Wt.call(i,c,u);for(r=new(void 0===n?Array:n)(zt(u-c,0)),o=0;c<u;c++,o++)c in i&&Le(r,o,i[c]);return r.length=o,r}});var Kt=_.f,Jt=Function.prototype,Yt=Jt.toString,Xt=/^\s*function ([^ (]*)/,Qt="name";a&&!(Qt in Jt)&&Kt(Jt,Qt,{configurable:!0,get:function(){try{return Yt.call(this).match(Xt)[1]}catch(e){return""}}});var Zt=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return j(n),function(e){if(!m(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype")}(r),t?e.call(n,r):n.__proto__=r,n}}():void 0),en=function(e,t,n){var r,o;return Zt&&"function"==typeof(r=t.constructor)&&r!==n&&m(o=r.prototype)&&o!==n.prototype&&Zt(e,o),e},tn="\t\n\v\f\r \u2028\u2029\ufeff",nn="["+tn+"]",rn=RegExp("^"+nn+nn+"*"),on=RegExp(nn+nn+"*$"),an=function(e){return function(t){var n=String(v(t));return 1&e&&(n=n.replace(rn,"")),2&e&&(n=n.replace(on,"")),n}},cn={start:an(1),end:an(2),trim:an(3)},un=Se.f,ln=T.f,sn=_.f,fn=cn.trim,dn="Number",pn=o.Number,gn=pn.prototype,vn=d(dt(gn))==dn,hn=function(e){var t,n,r,o,i,a,c,u,l=y(e,!1);if("string"==typeof l&&l.length>2)if(43===(t=(l=fn(l)).charCodeAt(0))||45===t){if(88===(n=l.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(l.charCodeAt(1)){case 66:case 98:r=2,o=49;break;case 79:case 111:r=8,o=55;break;default:return+l}for(a=(i=l.slice(2)).length,c=0;c<a;c++)if((u=i.charCodeAt(c))<48||u>o)return NaN;return parseInt(i,r)}return+l};if(Ne(dn,!pn(" 0o1")||!pn("0b1")||pn("+0x1"))){for(var mn,yn=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof yn&&(vn?i((function(){gn.valueOf.call(n)})):d(n)!=dn)?en(new pn(hn(t)),n,yn):hn(t)},wn=a?un(pn):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),bn=0;wn.length>bn;bn++)b(pn,mn=wn[bn])&&!b(yn,mn)&&sn(yn,mn,ln(pn,mn));yn.prototype=gn,gn.constructor=yn,re(o,dn,yn)}var Sn="".repeat||function(e){var t=String(v(this)),n="",r=le(e);if(r<0||r==1/0)throw RangeError("Wrong number of repetitions");for(;r>0;(r>>>=1)&&(t+=t))1&r&&(n+=t);return n},xn=1..toFixed,En=Math.floor,On=function(e,t,n){return 0===t?n:t%2==1?On(e,t-1,n*e):On(e*e,t/2,n)};Re({target:"Number",proto:!0,forced:xn&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!i((function(){xn.call({})}))},{toFixed:function(e){var t,n,r,o,i=function(e){if("number"!=typeof e&&"Number"!=d(e))throw TypeError("Incorrect invocation");return+e}(this),a=le(e),c=[0,0,0,0,0,0],u="",l="0",s=function(e,t){for(var n=-1,r=t;++n<6;)r+=e*c[n],c[n]=r%1e7,r=En(r/1e7)},f=function(e){for(var t=6,n=0;--t>=0;)n+=c[t],c[t]=En(n/e),n=n%e*1e7},p=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==c[e]){var n=String(c[e]);t=""===t?n:t+Sn.call("0",7-n.length)+n}return t};if(a<0||a>20)throw RangeError("Incorrect fraction digits");if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return String(i);if(i<0&&(u="-",i=-i),i>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(i*On(2,69,1))-69)<0?i*On(2,-t,1):i/On(2,t,1),n*=4503599627370496,(t=52-t)>0){for(s(0,n),r=a;r>=7;)s(1e7,0),r-=7;for(s(On(10,r,1),0),r=t-1;r>=23;)f(1<<23),r-=23;f(1<<r),s(1,1),f(2),l=p()}else s(0,n),s(1<<-t,0),l=p()+Sn.call("0",a);return l=a>0?u+((o=l.length)<=a?"0."+Sn.call("0",a-o)+l:l.slice(0,o-a)+"."+l.slice(o-a)):u+l}});var An=Object.assign,Tn=Object.defineProperty,jn=!An||i((function(){if(a&&1!==An({b:1},An(Tn({},"a",{enumerable:!0,get:function(){Tn(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=An({},e)[n]||it(An({},t)).join("")!=r}))?function(e,t){for(var n=ke(e),r=arguments.length,o=1,i=xe.f,c=l.f;r>o;)for(var u,s=g(arguments[o++]),f=i?it(s).concat(i(s)):it(s),d=f.length,p=0;d>p;)u=f[p++],a&&!c.call(s,u)||(n[u]=s[u]);return n}:An;Re({target:"Object",stat:!0,forced:Object.assign!==jn},{assign:jn});var Mn=!i((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),_n=W("IE_PROTO"),Cn=Object.prototype,Nn=Mn?Object.getPrototypeOf:function(e){return e=ke(e),b(e,_n)?e[_n]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?Cn:null};Re({target:"Object",stat:!0,forced:i((function(){Nn(1)})),sham:!Mn},{getPrototypeOf:function(e){return Nn(ke(e))}}),Re({target:"Object",stat:!0,forced:i((function(){it(1)}))},{keys:function(e){return it(ke(e))}});var Pn={};Pn[Ve("toStringTag")]="z";var Rn="[object z]"===String(Pn),In=Ve("toStringTag"),kn="Arguments"==d(function(){return arguments}()),Ln=Rn?d:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),In))?n:kn?d(t):"Object"==(r=d(t))&&"function"==typeof t.callee?"Arguments":r},Fn=Rn?{}.toString:function(){return"[object "+Ln(this)+"]"};Rn||re(Object.prototype,"toString",Fn,{unsafe:!0});var Dn=cn.trim,Un=o.parseFloat,Bn=1/Un(tn+"-0")!=-1/0?function(e){var t=Dn(String(e)),n=Un(t);return 0===n&&"-"==t.charAt(0)?-0:n}:Un;Re({global:!0,forced:parseFloat!=Bn},{parseFloat:Bn});var $n=o.Promise,Vn=_.f,qn=Ve("toStringTag"),Gn=Ve("species"),Hn=function(e){var t=ae(e),n=_.f;a&&t&&!t[Gn]&&n(t,Gn,{configurable:!0,get:function(){return this}})},Wn={},zn=Ve("iterator"),Kn=Array.prototype,Jn=Ve("iterator"),Yn=function(e,t,n,r){try{return r?t(j(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&j(o.call(e)),t}},Xn=n((function(e){var t=function(e,t){this.stopped=e,this.result=t},n=e.exports=function(e,n,r,o,i){var a,c,u,l,s,f,d,p,g=mt(n,r,o?2:1);if(i)a=e;else{if(c=function(e){if(null!=e)return e[Jn]||e["@@iterator"]||Wn[Ln(e)]}(e),"function"!=typeof c)throw TypeError("Target is not iterable");if(void 0!==(p=c)&&(Wn.Array===p||Kn[zn]===p)){for(u=0,l=fe(e.length);l>u;u++)if((s=o?g(j(d=e[u])[0],d[1]):g(e[u]))&&s instanceof t)return s;return new t(!1)}a=c.call(e)}for(f=a.next;!(d=f.call(a)).done;)if("object"==typeof(s=Yn(a,g,d.value,o))&&s&&s instanceof t)return s;return new t(!1)};n.stop=function(e){return new t(!0,e)}})),Qn=Ve("iterator"),Zn=!1;try{var er=0,tr={next:function(){return{done:!!er++}},return:function(){Zn=!0}};tr[Qn]=function(){return this},Array.from(tr,(function(){throw 2}))}catch(e){}var nr,rr,or,ir=Ve("species"),ar=function(e,t){var n,r=j(e).constructor;return void 0===r||null==(n=j(r)[ir])?t:ht(n)},cr=/(iphone|ipod|ipad).*applewebkit/i.test(He),ur=o.location,lr=o.setImmediate,sr=o.clearImmediate,fr=o.process,dr=o.MessageChannel,pr=o.Dispatch,gr=0,vr={},hr="onreadystatechange",mr=function(e){if(vr.hasOwnProperty(e)){var t=vr[e];delete vr[e],t()}},yr=function(e){return function(){mr(e)}},wr=function(e){mr(e.data)},br=function(e){o.postMessage(e+"",ur.protocol+"//"+ur.host)};lr&&sr||(lr=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return vr[++gr]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},nr(gr),gr},sr=function(e){delete vr[e]},"process"==d(fr)?nr=function(e){fr.nextTick(yr(e))}:pr&&pr.now?nr=function(e){pr.now(yr(e))}:dr&&!cr?(or=(rr=new dr).port2,rr.port1.onmessage=wr,nr=mt(or.postMessage,or,1)):!o.addEventListener||"function"!=typeof postMessage||o.importScripts||i(br)||"file:"===ur.protocol?nr=hr in E("script")?function(e){ct.appendChild(E("script")).onreadystatechange=function(){ct.removeChild(this),mr(e)}}:function(e){setTimeout(yr(e),0)}:(nr=br,o.addEventListener("message",wr,!1)));var Sr,xr,Er,Or,Ar,Tr,jr,Mr,_r={set:lr,clear:sr},Cr=T.f,Nr=_r.set,Pr=o.MutationObserver||o.WebKitMutationObserver,Rr=o.process,Ir=o.Promise,kr="process"==d(Rr),Lr=Cr(o,"queueMicrotask"),Fr=Lr&&Lr.value;Fr||(Sr=function(){var e,t;for(kr&&(e=Rr.domain)&&e.exit();xr;){t=xr.fn,xr=xr.next;try{t()}catch(e){throw xr?Or():Er=void 0,e}}Er=void 0,e&&e.enter()},kr?Or=function(){Rr.nextTick(Sr)}:Pr&&!cr?(Ar=!0,Tr=document.createTextNode(""),new Pr(Sr).observe(Tr,{characterData:!0}),Or=function(){Tr.data=Ar=!Ar}):Ir&&Ir.resolve?(jr=Ir.resolve(void 0),Mr=jr.then,Or=function(){Mr.call(jr,Sr)}):Or=function(){Nr.call(o,Sr)});var Dr,Ur,Br,$r,Vr,qr,Gr,Hr=Fr||function(e){var t={fn:e,next:void 0};Er&&(Er.next=t),xr||(xr=t,Or()),Er=t},Wr=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=ht(t),this.reject=ht(n)},zr={f:function(e){return new Wr(e)}},Kr=function(e,t){if(j(e),m(t)&&t.constructor===e)return t;var n=zr.f(e);return(0,n.resolve)(t),n.promise},Jr=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},Yr=_r.set,Xr=Ve("species"),Qr="Promise",Zr=ne.get,eo=ne.set,to=ne.getterFor(Qr),no=$n,ro=o.TypeError,oo=o.document,io=o.process,ao=ae("fetch"),co=zr.f,uo=co,lo="process"==d(io),so=!!(oo&&oo.createEvent&&o.dispatchEvent),fo="unhandledrejection",po=Ne(Qr,(function(){if(!(D(no)!==String(no))){if(66===Je)return!0;if(!lo&&"function"!=typeof PromiseRejectionEvent)return!0}if(Je>=51&&/native code/.test(no))return!1;var e=no.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[Xr]=t,!(e.then((function(){}))instanceof t)})),go=po||!function(e,t){if(!t&&!Zn)return!1;var n=!1;try{var r={};r[Qn]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch(e){}return n}((function(e){no.all(e).catch((function(){}))})),vo=function(e){var t;return!(!m(e)||"function"!=typeof(t=e.then))&&t},ho=function(e,t,n){if(!t.notified){t.notified=!0;var r=t.reactions;Hr((function(){for(var o=t.value,i=1==t.state,a=0;r.length>a;){var c,u,l,s=r[a++],f=i?s.ok:s.fail,d=s.resolve,p=s.reject,g=s.domain;try{f?(i||(2===t.rejection&&bo(e,t),t.rejection=1),!0===f?c=o:(g&&g.enter(),c=f(o),g&&(g.exit(),l=!0)),c===s.promise?p(ro("Promise-chain cycle")):(u=vo(c))?u.call(c,d,p):d(c)):p(o)}catch(e){g&&!l&&g.exit(),p(e)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&yo(e,t)}))}},mo=function(e,t,n){var r,i;so?((r=oo.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),o.dispatchEvent(r)):r={promise:t,reason:n},(i=o["on"+e])?i(r):e===fo&&function(e,t){var n=o.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}("Unhandled promise rejection",n)},yo=function(e,t){Yr.call(o,(function(){var n,r=t.value;if(wo(t)&&(n=Jr((function(){lo?io.emit("unhandledRejection",r,e):mo(fo,e,r)})),t.rejection=lo||wo(t)?2:1,n.error))throw n.value}))},wo=function(e){return 1!==e.rejection&&!e.parent},bo=function(e,t){Yr.call(o,(function(){lo?io.emit("rejectionHandled",e):mo("rejectionhandled",e,t.value)}))},So=function(e,t,n,r){return function(o){e(t,n,o,r)}},xo=function(e,t,n,r){t.done||(t.done=!0,r&&(t=r),t.value=n,t.state=2,ho(e,t,!0))},Eo=function(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw ro("Promise can't be resolved itself");var o=vo(n);o?Hr((function(){var r={done:!1};try{o.call(n,So(Eo,e,r,t),So(xo,e,r,t))}catch(n){xo(e,r,n,t)}})):(t.value=n,t.state=1,ho(e,t,!1))}catch(n){xo(e,{done:!1},n,t)}}};po&&(no=function(e){!function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}(this,no,Qr),ht(e),Dr.call(this);var t=Zr(this);try{e(So(Eo,this,t),So(xo,this,t))}catch(e){xo(this,t,e)}},(Dr=function(e){eo(this,{type:Qr,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=function(e,t,n){for(var r in t)re(e,r,t[r],n);return e}(no.prototype,{then:function(e,t){var n=to(this),r=co(ar(this,no));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=lo?io.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&ho(this,n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),Ur=function(){var e=new Dr,t=Zr(e);this.promise=e,this.resolve=So(Eo,e,t),this.reject=So(xo,e,t)},zr.f=co=function(e){return e===no||e===Br?new Ur(e):uo(e)},"function"==typeof $n&&($r=$n.prototype.then,re($n.prototype,"then",(function(e,t){var n=this;return new no((function(e,t){$r.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof ao&&Re({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return Kr(no,ao.apply(o,arguments))}}))),Re({global:!0,wrap:!0,forced:po},{Promise:no}),qr=Qr,Gr=!1,(Vr=no)&&!b(Vr=Gr?Vr:Vr.prototype,qn)&&Vn(Vr,qn,{configurable:!0,value:qr}),Hn(Qr),Br=ae(Qr),Re({target:Qr,stat:!0,forced:po},{reject:function(e){var t=co(this);return t.reject.call(void 0,e),t.promise}}),Re({target:Qr,stat:!0,forced:po},{resolve:function(e){return Kr(this,e)}}),Re({target:Qr,stat:!0,forced:go},{all:function(e){var t=this,n=co(t),r=n.resolve,o=n.reject,i=Jr((function(){var n=ht(t.resolve),i=[],a=0,c=1;Xn(e,(function(e){var u=a++,l=!1;i.push(void 0),c++,n.call(t,e).then((function(e){l||(l=!0,i[u]=e,--c||r(i))}),o)})),--c||r(i)}));return i.error&&o(i.value),n.promise},race:function(e){var t=this,n=co(t),r=n.reject,o=Jr((function(){var o=ht(t.resolve);Xn(e,(function(e){o.call(t,e).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var Oo=Ve("match"),Ao=function(e){var t;return m(e)&&(void 0!==(t=e[Oo])?!!t:"RegExp"==d(e))},To=function(){var e=j(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t};function jo(e,t){return RegExp(e,t)}var Mo={UNSUPPORTED_Y:i((function(){var e=jo("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),BROKEN_CARET:i((function(){var e=jo("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},_o=_.f,Co=Se.f,No=ne.set,Po=Ve("match"),Ro=o.RegExp,Io=Ro.prototype,ko=/a/g,Lo=/a/g,Fo=new Ro(ko)!==ko,Do=Mo.UNSUPPORTED_Y;if(a&&Ne("RegExp",!Fo||Do||i((function(){return Lo[Po]=!1,Ro(ko)!=ko||Ro(Lo)==Lo||"/a/i"!=Ro(ko,"i")})))){for(var Uo=function(e,t){var n,r=this instanceof Uo,o=Ao(e),i=void 0===t;if(!r&&o&&e.constructor===Uo&&i)return e;Fo?o&&!i&&(e=e.source):e instanceof Uo&&(i&&(t=To.call(e)),e=e.source),Do&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var a=en(Fo?new Ro(e,t):Ro(e,t),r?this:Io,Uo);return Do&&n&&No(a,{sticky:n}),a},Bo=function(e){e in Uo||_o(Uo,e,{configurable:!0,get:function(){return Ro[e]},set:function(t){Ro[e]=t}})},$o=Co(Ro),Vo=0;$o.length>Vo;)Bo($o[Vo++]);Io.constructor=Uo,Uo.prototype=Io,re(o,"RegExp",Uo)}Hn("RegExp");var qo=RegExp.prototype.exec,Go=String.prototype.replace,Ho=qo,Wo=function(){var e=/a/,t=/b*/g;return qo.call(e,"a"),qo.call(t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),zo=Mo.UNSUPPORTED_Y||Mo.BROKEN_CARET,Ko=void 0!==/()??/.exec("")[1];(Wo||Ko||zo)&&(Ho=function(e){var t,n,r,o,i=this,a=zo&&i.sticky,c=To.call(i),u=i.source,l=0,s=e;return a&&(-1===(c=c.replace("y","")).indexOf("g")&&(c+="g"),s=String(e).slice(i.lastIndex),i.lastIndex>0&&(!i.multiline||i.multiline&&"\n"!==e[i.lastIndex-1])&&(u="(?: "+u+")",s=" "+s,l++),n=new RegExp("^(?:"+u+")",c)),Ko&&(n=new RegExp("^"+u+"$(?!\\s)",c)),Wo&&(t=i.lastIndex),r=qo.call(a?n:i,s),a?r?(r.input=r.input.slice(l),r[0]=r[0].slice(l),r.index=i.lastIndex,i.lastIndex+=r[0].length):i.lastIndex=0:Wo&&r&&(i.lastIndex=i.global?r.index+r[0].length:t),Ko&&r&&r.length>1&&Go.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r});var Jo=Ho;Re({target:"RegExp",proto:!0,forced:/./.exec!==Jo},{exec:Jo});var Yo="toString",Xo=RegExp.prototype,Qo=Xo.toString,Zo=i((function(){return"/a/b"!=Qo.call({source:"a",flags:"b"})})),ei=Qo.name!=Yo;(Zo||ei)&&re(RegExp.prototype,Yo,(function(){var e=j(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(void 0===n&&e instanceof RegExp&&!("flags"in Xo)?To.call(e):n)}),{unsafe:!0});var ti=function(e){if(Ao(e))throw TypeError("The method doesn't accept regular expressions");return e},ni=Ve("match");Re({target:"String",proto:!0,forced:!function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[ni]=!1,"/./"[e](t)}catch(e){}}return!1}("includes")},{includes:function(e){return!!~String(v(this)).indexOf(ti(e),arguments.length>1?arguments[1]:void 0)}});var ri=Ve("species"),oi=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),ii="$0"==="a".replace(/./,"$0"),ai=Ve("replace"),ci=!!/./[ai]&&""===/./[ai]("a","$0"),ui=!i((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]})),li=function(e,t,n,r){var o=Ve(e),a=!i((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),c=a&&!i((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[ri]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return t=!0,null},n[o](""),!t}));if(!a||!c||"replace"===e&&(!oi||!ii||ci)||"split"===e&&!ui){var u=/./[o],l=n(o,""[e],(function(e,t,n,r,o){return t.exec===Jo?a&&!o?{done:!0,value:u.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}}),{REPLACE_KEEPS_$0:ii,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:ci}),s=l[0],f=l[1];re(String.prototype,e,s),re(RegExp.prototype,o,2==t?function(e,t){return f.call(e,this,t)}:function(e){return f.call(e,this)})}r&&C(RegExp.prototype[o],"sham",!0)},si=function(e){return function(t,n){var r,o,i=String(v(t)),a=le(n),c=i.length;return a<0||a>=c?e?"":void 0:(r=i.charCodeAt(a))<55296||r>56319||a+1===c||(o=i.charCodeAt(a+1))<56320||o>57343?e?i.charAt(a):r:e?i.slice(a,a+2):o-56320+(r-55296<<10)+65536}},fi={codeAt:si(!1),charAt:si(!0)}.charAt,di=function(e,t,n){return t+(n?fi(e,t).length:1)},pi=function(e,t){var n=e.exec;if("function"==typeof n){var r=n.call(e,t);if("object"!=typeof r)throw TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==d(e))throw TypeError("RegExp#exec called on incompatible receiver");return Jo.call(e,t)};li("match",1,(function(e,t,n){return[function(t){var n=v(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var o=j(e),i=String(this);if(!o.global)return pi(o,i);var a=o.unicode;o.lastIndex=0;for(var c,u=[],l=0;null!==(c=pi(o,i));){var s=String(c[0]);u[l]=s,""===s&&(o.lastIndex=di(i,fe(o.lastIndex),a)),l++}return 0===l?null:u}]}));var gi=Math.max,vi=Math.min,hi=Math.floor,mi=/\$([$&'`]|\d\d?|<[^>]*>)/g,yi=/\$([$&'`]|\d\d?)/g,wi=function(e){return void 0===e?e:String(e)};li("replace",2,(function(e,t,n,r){var o=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,i=r.REPLACE_KEEPS_$0,a=o?"$":"$0";return[function(n,r){var o=v(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o,r):t.call(String(o),n,r)},function(e,r){if(!o&&i||"string"==typeof r&&-1===r.indexOf(a)){var u=n(t,e,this,r);if(u.done)return u.value}var l=j(e),s=String(this),f="function"==typeof r;f||(r=String(r));var d=l.global;if(d){var p=l.unicode;l.lastIndex=0}for(var g=[];;){var v=pi(l,s);if(null===v)break;if(g.push(v),!d)break;""===String(v[0])&&(l.lastIndex=di(s,fe(l.lastIndex),p))}for(var h="",m=0,y=0;y<g.length;y++){v=g[y];for(var w=String(v[0]),b=gi(vi(le(v.index),s.length),0),S=[],x=1;x<v.length;x++)S.push(wi(v[x]));var E=v.groups;if(f){var O=[w].concat(S,b,s);void 0!==E&&O.push(E);var A=String(r.apply(void 0,O))}else A=c(w,s,b,S,E,r);b>=m&&(h+=s.slice(m,b)+A,m=b+w.length)}return h+s.slice(m)}];function c(e,n,r,o,i,a){var c=r+e.length,u=o.length,l=yi;return void 0!==i&&(i=ke(i),l=mi),t.call(a,l,(function(t,a){var l;switch(a.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,r);case"'":return n.slice(c);case"<":l=i[a.slice(1,-1)];break;default:var s=+a;if(0===s)return t;if(s>u){var f=hi(s/10);return 0===f?t:f<=u?void 0===o[f-1]?a.charAt(1):o[f-1]+a.charAt(1):t}l=o[s-1]}return void 0===l?"":l}))}}));var bi=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};li("search",1,(function(e,t,n){return[function(t){var n=v(this),r=null==t?void 0:t[e];return void 0!==r?r.call(t,n):new RegExp(t)[e](String(n))},function(e){var r=n(t,e,this);if(r.done)return r.value;var o=j(e),i=String(this),a=o.lastIndex;bi(a,0)||(o.lastIndex=0);var c=pi(o,i);return bi(o.lastIndex,a)||(o.lastIndex=a),null===c?-1:c.index}]}));var Si=[].push,xi=Math.min,Ei=4294967295,Oi=!i((function(){return!RegExp(Ei,"y")}));li("split",2,(function(e,t,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var r=String(v(this)),o=void 0===n?Ei:n>>>0;if(0===o)return[];if(void 0===e)return[r];if(!Ao(e))return t.call(r,e,o);for(var i,a,c,u=[],l=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),s=0,f=new RegExp(e.source,l+"g");(i=Jo.call(f,r))&&!((a=f.lastIndex)>s&&(u.push(r.slice(s,i.index)),i.length>1&&i.index<r.length&&Si.apply(u,i.slice(1)),c=i[0].length,s=a,u.length>=o));)f.lastIndex===i.index&&f.lastIndex++;return s===r.length?!c&&f.test("")||u.push(""):u.push(r.slice(s)),u.length>o?u.slice(0,o):u}:"0".split(void 0,0).length?function(e,n){return void 0===e&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var o=v(this),i=null==t?void 0:t[e];return void 0!==i?i.call(t,o,n):r.call(String(o),t,n)},function(e,o){var i=n(r,e,this,o,r!==t);if(i.done)return i.value;var a=j(e),c=String(this),u=ar(a,RegExp),l=a.unicode,s=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(Oi?"y":"g"),f=new u(Oi?a:"^(?:"+a.source+")",s),d=void 0===o?Ei:o>>>0;if(0===d)return[];if(0===c.length)return null===pi(f,c)?[c]:[];for(var p=0,g=0,v=[];g<c.length;){f.lastIndex=Oi?g:0;var h,m=pi(f,Oi?c:c.slice(g));if(null===m||(h=xi(fe(f.lastIndex+(Oi?0:g)),c.length))===p)g=di(c,g,l);else{if(v.push(c.slice(p,g)),v.length===d)return v;for(var y=1;y<=m.length-1;y++)if(v.push(m[y]),v.length===d)return v;g=p=h}}return v.push(c.slice(p)),v}]}),!Oi);for(var Ai in{CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}){var Ti=o[Ai],ji=Ti&&Ti.prototype;if(ji&&ji.forEach!==_t)try{C(ji,"forEach",_t)}catch(e){ji.forEach=_t}}var Mi,_i=n((function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})),Ci=(Mi=_i)&&Mi.__esModule&&Object.prototype.hasOwnProperty.call(Mi,"default")?Mi.default:Mi;function Ni(e,t){for(var n=0,r=t.length,o=e.length;n<r;n++,o++)e[o]=t[n];return e}function Pi(e){var t=e.replace(/([A-Z])/g,"_$1").toLowerCase();return"_"===t[0]?t.substr(1):t}function Ri(e){return JSON.parse(JSON.stringify(e))}function Ii(e){void 0===e&&(e=5);for(var t="";e--;)t+=Math.floor(10*Math.random());return t}function ki(e,t){void 0===t&&(t={isNaNAsNumber:!1,isUnFiniteAsNumber:!1});var n=Object.assign({isNaNAsNumber:!1,isUnFiniteAsNumber:!1},t),r=n.isNaNAsNumber,o=!0;return"number"!=typeof e&&(o=!1),!1!==n.isUnFiniteAsNumber||isFinite(e)||(o=!1),!1===r&&isNaN(e)&&(o=!1),o}function Li(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=null;return e&&"function"==typeof e&&(r=e.apply(void 0,t)),r}function Fi(){return Date.now?Date.now():(new Date).getTime()}function Di(e){for(var t=e+"=",n=document.cookie.split(";"),r=0;r<n.length;r++){for(var o=n[r];" "==o.charAt(0);)o=o.substring(1,o.length);if(0==o.indexOf(t))return o.substring(t.length,o.length)}return""}function Ui(){try{var e=navigator.userAgent.toLowerCase(),t=function(t){return t.test(e)},n=function(t){var n=e.match(t),r="";return n&&(r=n.toString().replace(/[^0-9|_.]/g,"").replace(/_/g,".")),r},r="",o="";t(/windows|win32|win64|wow32|wow64/g)?r="windows":t(/macintosh|macintel/g)?r="macos":t(/x11/g)?r="linux":t(/android|adr/g)?r="android":t(/ios|iphone|ipad|ipod|iwatch/g)&&(r="ios",t(/ipad/g)?o="ipad":t(/iphone/g)?o="iphone":t(/iwatch/g)?o="iwatch":t(/ipod/g)&&(o="ipod"));var i="";"windows"===r?t(/windows nt 5.0|windows 2000/g)?i="2000":t(/windows nt 5.1|windows xp/g)?i="xp":t(/windows nt 5.2|windows 2003/g)?i="2003":t(/windows nt 6.0|windows vista/g)?i="vista":t(/windows nt 6.1|windows 7/g)?i="7":t(/windows nt 6.2|windows 8/g)?i="8":t(/windows nt 6.3|windows 8.1/g)?i="8.1":t(/windows nt 10.0|windows 10/g)&&(i="10"):"macos"===r?i=n(/os x [\d._]+/g):"android"===r?i=n(/android [\d._]+/g):"ios"===r&&(i=n(/os [\d._]+/g));var a="";"windows"===r||"macos"===r||"linux"===r?a="desktop":("android"===r||"ios"===r||t(/mobile/g))&&(a="mobile");var c="",u="";t(/applewebkit/g)?(c="webkit",t(/edge/g)?u="edge":t(/opr/g)?u="opera":t(/chrome/g)?u="chrome":t(/safari/g)&&(u="safari")):t(/gecko/g)&&t(/firefox/g)?(c="gecko",u="firefox"):t(/presto/g)?(c="presto",u="opera"):t(/trident|compatible|msie/g)&&(c="trident",u="iexplore");var l="";"webkit"===c?l=n(/applewebkit\/[\d._]+/g):"gecko"===c?l=n(/gecko\/[\d._]+/g):"presto"===c?l=n(/presto\/[\d._]+/g):"trident"===c&&(l=n(/trident\/[\d._]+/g));var s="";"chrome"===u?s=n(/chrome\/[\d._]+/g):"safari"===u?s=n(/version\/[\d._]+/g):"firefox"===u?s=n(/firefox\/[\d._]+/g):"opera"===u?s=n(/opr\/[\d._]+/g):"iexplore"===u?s=n(/(msie [\d._]+)|(rv:[\d._]+)/g):"edge"===u&&(s=n(/edge\/[\d._]+/g));var f="",d="";return t(/micromessenger/g)?(f="wechat",d=n(/micromessenger\/[\d._]+/g)):t(/qqbrowser/g)?(f="qq_browser",d=n(/qqbrowser\/[\d._]+/g)):t(/\sqq/g)?f="qq_app":t(/ucbrowser/g)?(f="uc",d=n(/ucbrowser\/[\d._]+/g)):t(/qihu 360se/g)?f="360":t(/2345explorer/g)?(f="2345",d=n(/2345explorer\/[\d._]+/g)):t(/metasr/g)?f="sougou":t(/lbbrowser/g)?f="liebao":t(/maxthon/g)?(f="maxthon",d=n(/maxthon\/[\d._]+/g)):t(/biliapp/g)&&(f="bilibili"),Object.assign({engine:c,engineVs:l,platform:a,supporter:u,supporterVs:s,system:r,systemVs:i},{shell:f,shellVs:d,appleType:o})}catch(e){return console.warn("mazey:",e),{engine:"",engineVs:"",platform:"",supporter:"",supporterVs:"",system:"",systemVs:""}}}return e.addClass=function(e,t){var n,r=e.className,o="";""!==r&&(o=" "),n=r+o+t,e.className=n},e.addStyle=function(e,t){if(void 0===t&&(t={id:""}),!e)return!1;var n=document.createDocumentFragment(),r=null,o="",i=document.createElement("style");return t.id?(o="".concat(t.id),(r=document.getElementById(o))?r.innerHTML=e:(i.setAttribute("id",t.id),i.innerHTML=e,n.appendChild(i),document.head.appendChild(n))):(i.innerHTML=e,n.appendChild(i),document.head.appendChild(n)),!0},e.calLongestCommonSubsequence=function(e,t){for(var n=e.length,r=t.length,o=Ri(new Array(n).fill(new Array(r).fill(0))),i=0;i<n;++i)for(var a=0;a<r;++a)if(e[i]===t[a]){var c=0;i>0&&a>0&&(c=o[i-1][a-1]),o[i][a]=c+1}else{var u=[0,0],l=u[0],s=u[1];a>0&&(l=o[i][a-1]),i>0&&(s=o[i-1][a]),o[i][a]=Math.max(l,s)}var f=Array.prototype.concat.apply([],o);return Math.max.apply(Math,f)},e.calLongestCommonSubstring=function(e,t){for(var n=e.length,r=t.length,o=Ri(new Array(n).fill(new Array(r).fill(0))),i=0;i<n;++i)for(var a=0;a<r;++a)if(e[i]===t[a]){var c=0;i>0&&a>0&&(c=o[i-1][a-1]),o[i][a]=c+1}var u=Array.prototype.concat.apply([],o);return Math.max.apply(Math,u)},e.camelCase2Underscore=Pi,e.camelCaseToKebabCase=function(e){var t=e.replace(/([A-Z])/g,"-$1").toLowerCase();return"-"===t[0]?t.substr(1):t},e.cancelBubble=function(e){var t=e||window.event;t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},e.clearHtml=function(e){return e.replace(/<\/?.+?>/g,"").replace(/[\r\n]/g,"")},e.cutCHSString=function(e,t,n){if(void 0===n&&(n=!1),""!=e&&e){for(var r=0,o="",i=/[^\x00-\xff]/g,a="",c=e.replace(i,"**").length,u=0;u<c&&(null!=(a=e.charAt(u).toString()).match(i)?r+=2:r++,!(r>t));u++)o+=a;return n&&c>t&&(o+="..."),o}return""},e.debounce=function(e,t,n){var r=null,o=null,i=null,a=null,c=null,u=function u(){var l=Fi()-i;l<t&&l>=0?o=setTimeout(u,t-l):(o=null,n||(c=e.apply(r,a),o||(r=a=null)))};return function(){for(var l=[],s=0;s<arguments.length;s++)l[s]=arguments[s];r=this,a=l,i=Fi();var f=n&&!o;return o||(o=setTimeout(u,t)),f&&(c=e.apply(r,a),r=a=null),c}},e.deepCopyObject=Ri,e.doFn=Li,e.floatFixed=function(e,t){return void 0===t&&(t=0),parseFloat(e).toFixed(t)},e.floatToPercent=function(e,t){void 0===t&&(t=0);var n="";return n=t?(100*e).toFixed(t):String(Math.floor(100*e)),"".concat(n,"%")},e.formatDate=function(e,t){void 0===t&&(t="yyyy-MM-dd"),e||(e=new Date);var n=new Date(e),r={yyyy:n.getFullYear(),MM:n.getMonth()+1,dd:n.getDate(),hh:n.getHours()<10?"0"+n.getHours():n.getHours(),mm:n.getMinutes()<10?"0"+n.getMinutes():n.getMinutes(),ss:n.getSeconds()<10?"0"+n.getSeconds():n.getSeconds()},o=t||"yyyy-MM-dd";return Object.keys(r).forEach((function(e){var t=r[e];"MM"===e&&Number(t)<=9&&(t="0".concat(t)),o=o.replace(e,String(t))})),o},e.friendlyInterval=function(e,t,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n={type:"d"});var r=n.type;ki(e)||(e=new Date(e).getTime()),ki(t)||(t=new Date(t).getTime());var o=t-e,i="",a=new Array(4).fill(0),c=a[0],u=(a[1],a[2],a[3]);if(o>=0)switch(c=Math.floor(o/1e3/60/60/24),Math.floor(o/1e3/60/60),Math.floor(o/1e3/60),u=Math.floor(o/1e3),r){case"d":i=c;break;case"text":i=(c=Math.floor(o/1e3/60/60/24))+" 天 "+Math.floor(o/1e3/60/60%24)+" 时 "+Math.floor(o/1e3/60%60)+" 分 "+(u=Math.floor(o/1e3%60))+" 秒";break;default:i=u}return i},e.genCustomConsole=function(e,t){void 0===e&&(e=""),void 0===t&&(t={isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",logFn:function(){},errorFn:function(){}});var n=Object.assign({isClosed:!1,showWrap:!1,showDate:!1,locales:"en-US",logFn:function(){},errorFn:function(){}},t),r=n.isClosed,o=n.showWrap,i=n.showDate,a=n.locales,c=n.logFn,u=n.errorFn,l=Object.create(null),s=function(){return(new Date).toLocaleDateString(a,{weekday:"short",year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})};return["log","info","warn","error"].forEach((function(t){l[t]=function(){for(var n,a,l=[],f=0;f<arguments.length;f++)l[f]=arguments[f];if(r)return!1;var d=e,p=e;if("string"==typeof e&&e.length>=2){var g=e.length;d=":"===e[g-1]?e.substring(0,g-1):e}o&&console.log("--- ".concat(d," - begin ---")),i&&(p=e?"".concat(s()," ").concat(e):"".concat(s())),e||i?(n=console)[t].apply(n,Ni([p],l)):(a=console)[t].apply(a,l),"log"===t&&c(),"error"===t&&u(),o&&console.log("--- ".concat(d," - end ---"))}})),l},e.genHashCode=function(e){var t,n=0;for(t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return n},e.generateRndNum=Ii,e.generateUniqueNum=function(e){void 0===e&&(e=3);var t=[Fi(),Ii(e||3)];return t[0]+t[1]},e.getBrowserInfo=Ui,e.getCookie=Di,e.getDomain=function(e,t){void 0===t&&(t=["hostname"]);var n=document.createElement("a");return n.href=e,t.reduce((function(e,t){return e+=n[t]}),"")},e.getFileSize=function(e){var t=function(e){return String(Math.ceil(e))};if(!e)return"";var n=1024;return e<n?e+" B":e<Math.pow(n,2)?t(e/n)+" KB":e<Math.pow(n,3)?t(e/Math.pow(n,2))+" MB":e<Math.pow(n,4)?t(e/Math.pow(n,3))+" G":t(e/Math.pow(n,4))+" T"},e.getHashQueryParam=function(e){var t=location.hash.split("?");if(1===t.length)return"";var n=new RegExp("(^|&)".concat(e,"=([^&]*)(&|$)")),r=t[1].match(n);return r?r[2]:""},e.getLocalStorage=function(e){var t=null;if(e){var n=localStorage.getItem(e);n&&(t=JSON.parse(n))}return t},e.getPerformance=function(e){var t,n;void 0===e&&(e=!1);var r,o,i=new Promise((function(e,r){var o;t=(o=[e,r])[0],n=o[1]})),a=window.performance.timing,c=a.navigationStart||a.fetchStart;function u(){try{if(window.performance&&Boolean(window.performance.getEntriesByType))window.performance.getEntriesByType("paint").forEach((function(e,t,n){var i=Math.round(e.startTime);"first-paint"===e.name?r=i:"first-contentful-paint"===e.name&&(o=i)}));else console.error("paint")}catch(e){console.error(e.message)}if(window.performance&&"function"==typeof window.performance.getEntries){var i,u=(window.performance.getEntries()||[])[0]||{},v={os:l(),osVersion:s(),deviceType:f(),network:d(),screenDirection:p(),unloadTime:a.unloadEventEnd-a.unloadEventStart,redirectTime:a.redirectEnd-a.redirectStart,dnsTime:a.domainLookupEnd-a.domainLookupStart,tcpTime:a.connectEnd-a.connectStart,sslTime:g(a.connectEnd,a.secureConnectionStart),responseTime:a.responseStart-a.requestStart,downloadTime:a.responseEnd-a.responseStart,firstPaintTime:r,firstContentfulPaintTime:o,domreadyTime:a.domContentLoadedEventStart-c||0,onloadTime:a.loadEventStart-c||0,whiteTime:a.responseStart-c,renderTime:a.loadEventEnd-c||0,decodedBodySize:u.decodedBodySize||"",encodedBodySize:u.encodedBodySize||""};if(Object.keys(v).forEach((function(e){ki(v[e])&&v[e]<0&&(v[e]=0)})),ki(v.whiteTime)&&v.whiteTime>v.onloadTime&&(v.whiteTime=0),c>0)e||Object.keys(v).forEach((function(e){i||(i={}),i[Pi(e)]=v[e]})),t(i||v);else n(Error("startTime"))}else n(Error("getEntries"))}function l(){return navigator.userAgent.indexOf("Android")>-1||navigator.userAgent.indexOf("Linux")>-1?"android":navigator.userAgent.indexOf("iPhone")>-1?"ios":navigator.userAgent.indexOf("Windows Phone")>-1?"wp":"others"}function s(){var e,t=navigator.userAgent,n=t.indexOf("Android")>-1||t.indexOf("Linux")>-1,r=!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);return n&&(e=(navigator.userAgent.split(";")[1].match(/\d+\.\d+/g)||[])[0]),r&&(e=(navigator.userAgent.split(";")[1].match(/(\d+)_(\d+)_?(\d+)?/)||[])[0]),e}function f(){var e=navigator.userAgent.toLowerCase(),t=e.match(/(ipad)/i)&&"ipad",n=e.match(/iphone os/i)&&"iphone os",r=e.match(/midp/i)&&"midp",o=e.match(/rv:1.2.3.4/i)&&"rv:1.2.3.4",i=e.match(/ucweb/i)&&"ucweb",a=e.match(/android/i)&&"android",c=e.match(/windows ce/i)&&"windows ce",u=e.match(/windows mobile/i)&&"windows mobile";return t||n||r||o||i||a||c||u?n||r||o||i||a||c||u?"phone":t?"ipad":void 0:"pc"}function d(){var e;if(navigator.connection&&navigator.connection.effectiveType)switch(navigator.connection.effectiveType){case"wifi":e="wifi";break;case"4g":e="4g";break;case"2g":e="2g";break;case"3g":e="3g";break;case"ethernet":e="ethernet";break;case"default":e=void 0}return e}function p(){var e;return window.screen&&window.screen.orientation&&window.screen.orientation.angle&&(180!==window.screen.orientation.angle&&0!==window.screen.orientation.angle||(e="|"),90!==window.screen.orientation.angle&&-90!==window.screen.orientation.angle||(e="-")),e}function g(e,t){var n;return t&&(n=e-t),n}return window.performance&&window.performance.timing&&window.performance.timing.loadEventEnd>0?u():window.addEventListener("load",(function(){window.setTimeout((function(){u()}),0)})),i},e.getQueryParam=function(e){var t=new RegExp("(^|&)"+e+"=([^&]*)(&|$)"),n=location.search.substr(1).match(t);return null!==n?decodeURIComponent(n[2]):""},e.getSessionStorage=function(e){var t=null;if(e){var n=sessionStorage.getItem(e);n&&(t=JSON.parse(n))}return t},e.getUrlParam=function(e,t){var n={};return e.replace(/\??(\w+)=([^&]*)&?/g,(function(e,t,r){if(void 0!==n[t]){var o=n[t];n[t]=[].concat(o,r)}else n[t]=r})),n[t]||""},e.hasClass=function(e,t){for(var n=e.className.split(/\s+/),r=0;r<n.length;r++)if(n[r]===t)return!0;return!1},e.inRate=function(e){return Math.random()<e},e.isJsonString=function(e){try{if("object"===Ci(JSON.parse(e)))return!0}catch(e){}return!1},e.isNonEmptyArray=function(e){var t=!1;return Array.isArray(e)&&e.length&&(t=!0),t},e.isNumber=ki,e.isSafePWAEnv=function(){var e=Ui();return!(!("serviceWorker"in navigator&&function(){var e;try{return e=new Function("return async function(){};")(),null!=Object.getPrototypeOf(e).constructor}catch(e){return!1}}()&&"undefined"!=typeof Promise&&-1!==Promise.toString().indexOf("[native code]")&&Boolean(window.fetch)&&Boolean(window.indexedDB)&&Boolean(window.caches))||e.shell)},e.isSupportWebp=function(){return new Promise((function(e){var t=new Image;t.onload=function(){e(t.width>0&&t.height>0)},t.onerror=function(){e(!1)},t.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA="}))},e.isValidData=function(e,t,n){var r=!1;return t.reduce((function(e,t){return e[t]?e=e[t]:Object.create(null)}),e)===n&&(r=!0),r},e.loadCSS=function(e,t){void 0===t&&(t={id:""});var n,r=t.id,o=new Promise((function(e,t){n=[e,t][0]})),i=function(){n(!0)},a=document.createElement("link"),c="onload"in a,u=+navigator.userAgent.replace(/.*(?:AppleWebKit|AndroidWebKit)\/?(\d+).*/i,"$1")<536;if(a.rel="stylesheet",a.type="text/css",a.href=e,void 0!==r&&(a.id=r),document.getElementsByTagName("head")[0].appendChild(a),u||!c)return setTimeout((function(){s(a,i,0)}),1),o;function l(){a.onload=a.onerror=a.onreadystatechange=null,a=null,i()}function s(e,t,n){var r,o=e.sheet;if((n+=1)>3e5)return r=!0,e=null,void t();if(u)o&&(r=!0);else if(o)try{o.cssRules&&(r=!0)}catch(e){"NS_ERROR_DOM_SECURITY_ERR"===e.name&&(r=!0)}setTimeout((function(){r?t():s(e,t,n)}),20)}return c?(a.onload=l,a.onerror=function(){l()}):a.onreadystatechange=function(){/loaded|complete/.test(a.readyState)&&l()},o},e.loadScript=function(e,t){void 0===t&&(t={id:"",callback:function(){},timeout:5e3,isDefer:!1});var n=Object.assign({id:"",callback:function(){},timeout:5e3,isDefer:!1},t),r=n.id,o=n.callback,i=n.timeout,a=n.isDefer,c=null,u=null,l=document.createElement("script"),s=document.getElementsByTagName("script")[0];return l.type="text/javascript",a&&(l.defer="defer"),r&&(l.id=r),l.readyState?l.onreadystatechange=function(){"loaded"!==l.readyState&&"complete"!==l.readyState||(l.onreadystatechange=null,Li(o),Li(c,!0))}:l.onload=function(){Li(o),Li(c,!0)},l.src=e,s&&s.parentNode.insertBefore(l,s),new Promise((function(e,t){var n;c=(n=[e,t])[0],u=n[1],i&&setTimeout(u.bind(null,Error("timeout")),i)}))},e.mNow=Fi,e.mTrim=function(e){for(var t=(e=e.replace(/^\s+/,"")).length-1,n=/\s/;n.test(e.charAt(t));)t--;return e.slice(0,t+1)},e.newLine=function(e){if(!e)return"";var t=new RegExp("\\n","g");return e.replace(t,"<br />")},e.removeClass=function(e,t){var n;n=(n=(n=(n=" "+e.className+" ").replace(/(\s+)/gi," ")).replace(" "+t+" "," ")).replace(/(^\s+)|(\s+$)/g,""),e.className=n},e.setCookie=function(e,t,n,r){var o,i,a;n?((a=new Date).setTime(a.getTime()+24*n*60*60*1e3),i="; expires="+a.toGMTString()):i="";var c=location.host;1===c.split(".").length?document.cookie=e+"="+t+i+"; path=/":((o=c.split(".")).shift(),r=r||"."+o.join("."),document.cookie=e+"="+t+i+"; path=/; domain="+r,null!==Di(e)&&Di(e)===t||(r=r||"."+c,document.cookie=e+"="+t+i+"; path=/; domain="+r))},e.setLocalStorage=function(e,t){void 0===t&&(t=null),e&&localStorage.setItem(e,JSON.stringify(t))},e.setSessionStorage=function(e,t){void 0===t&&(t=null),e&&sessionStorage.setItem(e,JSON.stringify(t))},e.throttle=function(e,t,n){void 0===n&&(n={}),n=Object.assign({},n);var r=null,o=null,i=null,a=[null,0],c=a[0],u=a[1],l=function(){u=!1===n.leading?0:Fi(),i=null,c=e.apply(r,o),i||(r=o=null)};return function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var f=Fi();u||!1!==n.leading||(u=f);var d=t-(f-u);return r=this,o=a,d<=0||d>t?(i&&(clearTimeout(i),i=null),u=f,c=e.apply(r,o),i||(r=o=null)):i||!1===n.trailing||(i=setTimeout(l,d)),c}},e.updateQueryParam=function(e,t,n){var r=new RegExp("([?&])"+t+"=.*?(&|$)","i"),o=-1!==e.indexOf("?")?"&":"?";return e.match(r)?e.replace(r,"$1"+t+"="+n+"$2"):e+o+t+"="+n},e.windowLoaded=function(e){void 0===e&&(e=90);var t,n=function(){},r=new Promise((function(e,r){n=e,t=r}));return"complete"===document.readyState?n("complete"):window.addEventListener("load",(function(){return n("load")})),setTimeout((function(){return t(Error("timeout"))}),1e3*e),r},e.zAxiosIsValidRes=function(e,t){void 0===t&&(t={validStatusRange:[200,300],validCode:[0]});var n=Object.assign({validStatusRange:[200,300],validCode:[0]},t),r=n.validStatusRange,o=n.validCode;2!==r.length&&console.error("valid validStatusRange is required");var i=!1;if(e&&e.status&&2===r.length&&e.status>=r[0]&&e.status<r[1]){var a=e.data;a&&o.includes(a.code)&&(i=!0)}return i},Object.defineProperty(e,"__esModule",{value:!0}),e}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mazey",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.4",
|
|
4
4
|
"description": "Mazey's library for front-end.",
|
|
5
5
|
"main": "lib/index.cjs.js",
|
|
6
6
|
"module": "lib/index.esm.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"build": "cross-env SCRIPTS_NPM_PACKAGE_DEBUG=\"close\" rollup --config ./scripts/rollup.config.js",
|
|
15
15
|
"build:debug": "cross-env SCRIPTS_NPM_PACKAGE_DEBUG=\"open\" rollup --config ./scripts/rollup.config.js",
|
|
16
16
|
"test": "jest",
|
|
17
|
-
"docs": "typedoc --hideGenerator",
|
|
17
|
+
"docs": "typedoc --hideGenerator --plugin typedoc-plugin-merge-modules --mergeModulesMergeMode project",
|
|
18
18
|
"lint:fix": "eslint ./src/index.ts --ext 'ts,tsx' --fix",
|
|
19
19
|
"preview": "npm run docs && npm run build && npm run test",
|
|
20
20
|
"release": "npm run preview && cross-env SCRIPTS_NPM_PACKAGE_VERSION=$npm_package_version node ./scripts/release.js"
|
|
@@ -98,7 +98,8 @@
|
|
|
98
98
|
"rollup-plugin-typescript2": "^0.30.0",
|
|
99
99
|
"ts-loader": "^8.0.2",
|
|
100
100
|
"tslib": "^2.4.1",
|
|
101
|
-
"typedoc": "^0.
|
|
101
|
+
"typedoc": "^0.21.10",
|
|
102
|
+
"typedoc-plugin-merge-modules": "^4.0.1",
|
|
102
103
|
"typescript": "^4.4.4",
|
|
103
104
|
"webpack": "^4.30.0",
|
|
104
105
|
"webpack-cli": "^3.3.2",
|
package/src/index.ts
CHANGED
|
@@ -114,6 +114,7 @@ export function calLongestCommonSubsequence(
|
|
|
114
114
|
*
|
|
115
115
|
* @param {string} param Query param.
|
|
116
116
|
* @returns {string} value
|
|
117
|
+
* @category URL
|
|
117
118
|
*/
|
|
118
119
|
export function getQueryParam(param: string): string {
|
|
119
120
|
const reg = new RegExp('(^|&)' + param + '=([^&]*)(&|$)');
|
|
@@ -136,6 +137,7 @@ export function getQueryParam(param: string): string {
|
|
|
136
137
|
* @param {string} url URL string.
|
|
137
138
|
* @param {string} param Query param.
|
|
138
139
|
* @returns {string} value
|
|
140
|
+
* @category URL
|
|
139
141
|
*/
|
|
140
142
|
export function getUrlParam(url: string, param: string): string | string[] {
|
|
141
143
|
const result: {
|
|
@@ -179,6 +181,7 @@ export function getUrlParam(url: string, param: string): string | string[] {
|
|
|
179
181
|
* @param {string} param Query param.
|
|
180
182
|
* @param {string} value Param's value.
|
|
181
183
|
* @returns {string} URL.
|
|
184
|
+
* @category URL
|
|
182
185
|
*/
|
|
183
186
|
export function updateQueryParam(
|
|
184
187
|
url: string,
|
|
@@ -215,6 +218,7 @@ export function updateQueryParam(
|
|
|
215
218
|
*
|
|
216
219
|
* @param {string} param Query param.
|
|
217
220
|
* @returns {string} value
|
|
221
|
+
* @category URL
|
|
218
222
|
*/
|
|
219
223
|
export function getHashQueryParam(param: string): string {
|
|
220
224
|
const hashs = location.hash.split('?');
|
|
@@ -245,6 +249,7 @@ export function getHashQueryParam(param: string): string {
|
|
|
245
249
|
*
|
|
246
250
|
* @param {string} url
|
|
247
251
|
* @param {array} rules Object.keys(location), ['href', 'protocol', 'host', 'hostname', 'port', 'pathname', 'search', 'hash'], ['hostname', 'pathname'] = 'km.mazey.net/plugins/servlet/mobile'
|
|
252
|
+
* @category URL
|
|
248
253
|
*/
|
|
249
254
|
export function getDomain(url: string, rules = ['hostname']): string {
|
|
250
255
|
const aEl: any = document.createElement('a');
|
|
@@ -775,6 +780,7 @@ export function getLocalStorage(key: string): any {
|
|
|
775
780
|
* @param {string} url -- css资源路径
|
|
776
781
|
* @param {string} options.id -- link标签id
|
|
777
782
|
* @returns {Promise<boolean>} true -- 加载成功
|
|
783
|
+
* @category Load Resource
|
|
778
784
|
*/
|
|
779
785
|
export function loadCSS(
|
|
780
786
|
url: string,
|
|
@@ -931,6 +937,7 @@ export function loadCSS(
|
|
|
931
937
|
* @param {number} options.timeout -- 超时时长
|
|
932
938
|
* @param {boolean} options.isDefer -- 是否添加 defer 标签
|
|
933
939
|
* @returns {Promise<boolean>} -- true 成功
|
|
940
|
+
* @category Load Resource
|
|
934
941
|
*/
|
|
935
942
|
export function loadScript(
|
|
936
943
|
url: string,
|
|
@@ -1077,6 +1084,9 @@ export function getCookie(name: string): string {
|
|
|
1077
1084
|
return '';
|
|
1078
1085
|
}
|
|
1079
1086
|
|
|
1087
|
+
/**
|
|
1088
|
+
* @hidden
|
|
1089
|
+
*/
|
|
1080
1090
|
interface WebPerformance {
|
|
1081
1091
|
[key: string]: string | number;
|
|
1082
1092
|
}
|
|
@@ -1508,7 +1518,7 @@ export function isSafePWAEnv(): boolean {
|
|
|
1508
1518
|
* | Supporter version | supporterVs | - |
|
|
1509
1519
|
* | Shell | shell | (Optional) wechat, qq_browser, qq_app, uc, 360, 2345, sougou, liebao, maxthon, bilibili |
|
|
1510
1520
|
* | Shell version | shellVs | (Optional) 20/... |
|
|
1511
|
-
* | Apple device type | appleType | (Optional)
|
|
1521
|
+
* | Apple device type | appleType | (Optional) ipad, iphone, ipod, iwatch |
|
|
1512
1522
|
*
|
|
1513
1523
|
* Example: Determine the environment of the mobile QQ.
|
|
1514
1524
|
*
|
|
@@ -1518,6 +1528,7 @@ export function isSafePWAEnv(): boolean {
|
|
|
1518
1528
|
* ```
|
|
1519
1529
|
*
|
|
1520
1530
|
* @returns 浏览器信息
|
|
1531
|
+
* @category Browser Information
|
|
1521
1532
|
*/
|
|
1522
1533
|
export function getBrowserInfo(): {
|
|
1523
1534
|
engine: string; // webkit gecko presto trident
|
|
@@ -1560,10 +1571,10 @@ export function getBrowserInfo(): {
|
|
|
1560
1571
|
system = 'android'; // android系统
|
|
1561
1572
|
} else if (testUa(/ios|iphone|ipad|ipod|iwatch/g)) {
|
|
1562
1573
|
system = 'ios'; // ios系统
|
|
1563
|
-
if (testUa(/
|
|
1564
|
-
appleType = 'iphone';
|
|
1565
|
-
} else if (testUa(/ipad/g)) {
|
|
1574
|
+
if (testUa(/ipad/g)) {
|
|
1566
1575
|
appleType = 'ipad';
|
|
1576
|
+
} else if (testUa(/iphone/g)) {
|
|
1577
|
+
appleType = 'iphone';
|
|
1567
1578
|
} else if (testUa(/iwatch/g)) {
|
|
1568
1579
|
appleType = 'iwatch';
|
|
1569
1580
|
} else if (testUa(/ipod/g)) {
|
|
@@ -1778,6 +1789,7 @@ export function cutCHSString(str: string, len: number, hasDot = false): string {
|
|
|
1778
1789
|
*
|
|
1779
1790
|
* @param {number} timeout 超时时间 / 单位:秒
|
|
1780
1791
|
* @returns {Promise<string>} document is loaded? 'complete' 'load' / 'timeout'
|
|
1792
|
+
* @category Load Resource
|
|
1781
1793
|
*/
|
|
1782
1794
|
export function windowLoaded(timeout = 90): Promise<string | Error> {
|
|
1783
1795
|
let loaded: (value: string) => void = () => undefined;
|